rsuite 4.9.3 → 4.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist/rsuite.js +18 -601
- package/dist/rsuite.min.js +2 -2
- package/dist/rsuite.min.js.map +1 -1
- package/dist/styles/rsuite-dark-rtl.css +2 -1
- 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 -1
- 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 -1
- 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 -1
- package/dist/styles/rsuite-default.min.css +1 -1
- package/dist/styles/rsuite-default.min.css.map +1 -1
- package/es/CheckTreePicker/CheckTreePicker.js +8 -7
- package/es/MultiCascader/DropdownMenu.js +1 -1
- package/es/MultiCascader/MultiCascader.d.ts +8 -0
- package/es/MultiCascader/MultiCascader.js +6 -3
- package/es/Overlay/OverlayTrigger.d.ts +1 -1
- package/es/Overlay/OverlayTrigger.js +12 -1
- package/es/Table/styles/common.less +2 -1
- package/es/utils/treeUtils.js +5 -1
- package/lib/CheckTreePicker/CheckTreePicker.js +8 -7
- package/lib/MultiCascader/DropdownMenu.js +1 -1
- package/lib/MultiCascader/MultiCascader.d.ts +8 -0
- package/lib/MultiCascader/MultiCascader.js +6 -3
- package/lib/Overlay/OverlayTrigger.d.ts +1 -1
- package/lib/Overlay/OverlayTrigger.js +12 -1
- package/lib/Table/styles/common.less +2 -1
- package/lib/utils/treeUtils.js +5 -1
- package/package.json +3 -3
- package/src/CheckTreePicker/CheckTreePicker.tsx +15 -7
- package/src/CheckTreePicker/test/CheckTreePickerSpec.js +184 -1
- package/src/MultiCascader/DropdownMenu.tsx +1 -1
- package/src/MultiCascader/MultiCascader.d.ts +8 -0
- package/src/MultiCascader/MultiCascader.tsx +4 -2
- package/src/MultiCascader/test/DropdownMenuSpec.js +17 -0
- package/src/MultiCascader/test/MultiCascaderSpec.js +14 -1
- package/src/Overlay/OverlayTrigger.d.ts +1 -1
- package/src/Overlay/OverlayTrigger.tsx +22 -1
- package/src/Overlay/test/OverlayTriggerSpec.js +155 -0
- package/src/Table/styles/common.less +2 -1
- package/src/TreePicker/test/TreePickerSpec.js +43 -15
- package/src/utils/treeUtils.ts +4 -1
package/dist/rsuite.js
CHANGED
|
@@ -231,578 +231,6 @@ eval("module.exports = __webpack_require__(/*! regenerator-runtime */ \"./node_m
|
|
|
231
231
|
|
|
232
232
|
/***/ }),
|
|
233
233
|
|
|
234
|
-
/***/ "./node_modules/@rsuite/icon-font/lib/direction/ArrowDown.js":
|
|
235
|
-
/*!*******************************************************************!*\
|
|
236
|
-
!*** ./node_modules/@rsuite/icon-font/lib/direction/ArrowDown.js ***!
|
|
237
|
-
\*******************************************************************/
|
|
238
|
-
/*! no static exports found */
|
|
239
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
240
|
-
|
|
241
|
-
"use strict";
|
|
242
|
-
eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar React = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ArrowDown(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"1em\",\n height: \"1em\",\n viewBox: \"0 0 16 16\",\n fill: \"currentColor\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4 6l4 4 4-4z\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(ArrowDown);\nvar _default = ForwardRef;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icon-font/lib/direction/ArrowDown.js?");
|
|
243
|
-
|
|
244
|
-
/***/ }),
|
|
245
|
-
|
|
246
|
-
/***/ "./node_modules/@rsuite/icon-font/lib/direction/ArrowRight.js":
|
|
247
|
-
/*!********************************************************************!*\
|
|
248
|
-
!*** ./node_modules/@rsuite/icon-font/lib/direction/ArrowRight.js ***!
|
|
249
|
-
\********************************************************************/
|
|
250
|
-
/*! no static exports found */
|
|
251
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
252
|
-
|
|
253
|
-
"use strict";
|
|
254
|
-
eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar React = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ArrowRight(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"1em\",\n height: \"1em\",\n viewBox: \"0 0 16 16\",\n fill: \"currentColor\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 12l4-4-4-4z\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(ArrowRight);\nvar _default = ForwardRef;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icon-font/lib/direction/ArrowRight.js?");
|
|
255
|
-
|
|
256
|
-
/***/ }),
|
|
257
|
-
|
|
258
|
-
/***/ "./node_modules/@rsuite/icon-font/lib/direction/Sort.js":
|
|
259
|
-
/*!**************************************************************!*\
|
|
260
|
-
!*** ./node_modules/@rsuite/icon-font/lib/direction/Sort.js ***!
|
|
261
|
-
\**************************************************************/
|
|
262
|
-
/*! no static exports found */
|
|
263
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
264
|
-
|
|
265
|
-
"use strict";
|
|
266
|
-
eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar React = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction Sort(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"1em\",\n height: \"1em\",\n viewBox: \"0 0 16 16\",\n fill: \"currentColor\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.616 3.18a.5.5 0 01.696-.071l.072.071 2.5 3a.5.5 0 01-.704.704l-.064-.064L8 4.281 5.884 6.82a.5.5 0 01-.63.115l-.074-.051a.5.5 0 01-.115-.63l.051-.074 2.5-3zM7.616 12.82a.5.5 0 00.696.071l.072-.071 2.5-3a.5.5 0 00-.704-.704l-.064.064L8 11.719 5.884 9.18a.5.5 0 00-.63-.115l-.074.051a.5.5 0 00-.115.63l.051.074 2.5 3z\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(Sort);\nvar _default = ForwardRef;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icon-font/lib/direction/Sort.js?");
|
|
267
|
-
|
|
268
|
-
/***/ }),
|
|
269
|
-
|
|
270
|
-
/***/ "./node_modules/@rsuite/icon-font/lib/direction/SortDown.js":
|
|
271
|
-
/*!******************************************************************!*\
|
|
272
|
-
!*** ./node_modules/@rsuite/icon-font/lib/direction/SortDown.js ***!
|
|
273
|
-
\******************************************************************/
|
|
274
|
-
/*! no static exports found */
|
|
275
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
276
|
-
|
|
277
|
-
"use strict";
|
|
278
|
-
eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar React = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction SortDown(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"1em\",\n height: \"1em\",\n viewBox: \"0 0 16 16\",\n fill: \"currentColor\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 13a.997.997 0 01-.707-.293l-3-3a.999.999 0 111.414-1.414L7 9.586V4a1 1 0 012 0v5.586l1.293-1.293a.999.999 0 111.414 1.414l-3 3A.997.997 0 018 13z\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SortDown);\nvar _default = ForwardRef;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icon-font/lib/direction/SortDown.js?");
|
|
279
|
-
|
|
280
|
-
/***/ }),
|
|
281
|
-
|
|
282
|
-
/***/ "./node_modules/@rsuite/icon-font/lib/direction/SortUp.js":
|
|
283
|
-
/*!****************************************************************!*\
|
|
284
|
-
!*** ./node_modules/@rsuite/icon-font/lib/direction/SortUp.js ***!
|
|
285
|
-
\****************************************************************/
|
|
286
|
-
/*! no static exports found */
|
|
287
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
288
|
-
|
|
289
|
-
"use strict";
|
|
290
|
-
eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar React = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction SortUp(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"1em\",\n height: \"1em\",\n viewBox: \"0 0 16 16\",\n fill: \"currentColor\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 3c.276 0 .526.112.707.293l3 3a.999.999 0 11-1.414 1.414L9 6.414V12a1 1 0 01-2 0V6.414L5.707 7.707a.999.999 0 11-1.414-1.414l3-3A.997.997 0 018 3z\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SortUp);\nvar _default = ForwardRef;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icon-font/lib/direction/SortUp.js?");
|
|
291
|
-
|
|
292
|
-
/***/ }),
|
|
293
|
-
|
|
294
|
-
/***/ "./node_modules/@rsuite/icons/ArrowDown.js":
|
|
295
|
-
/*!*************************************************!*\
|
|
296
|
-
!*** ./node_modules/@rsuite/icons/ArrowDown.js ***!
|
|
297
|
-
\*************************************************/
|
|
298
|
-
/*! no static exports found */
|
|
299
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
300
|
-
|
|
301
|
-
"use strict";
|
|
302
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _ArrowDown[\"default\"];\n }\n});\n\nvar _ArrowDown = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/ArrowDown */ \"./node_modules/@rsuite/icons/lib/icons/ArrowDown.js\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/ArrowDown.js?");
|
|
303
|
-
|
|
304
|
-
/***/ }),
|
|
305
|
-
|
|
306
|
-
/***/ "./node_modules/@rsuite/icons/ArrowRight.js":
|
|
307
|
-
/*!**************************************************!*\
|
|
308
|
-
!*** ./node_modules/@rsuite/icons/ArrowRight.js ***!
|
|
309
|
-
\**************************************************/
|
|
310
|
-
/*! no static exports found */
|
|
311
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
312
|
-
|
|
313
|
-
"use strict";
|
|
314
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _ArrowRight[\"default\"];\n }\n});\n\nvar _ArrowRight = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/ArrowRight */ \"./node_modules/@rsuite/icons/lib/icons/ArrowRight.js\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/ArrowRight.js?");
|
|
315
|
-
|
|
316
|
-
/***/ }),
|
|
317
|
-
|
|
318
|
-
/***/ "./node_modules/@rsuite/icons/Sort.js":
|
|
319
|
-
/*!********************************************!*\
|
|
320
|
-
!*** ./node_modules/@rsuite/icons/Sort.js ***!
|
|
321
|
-
\********************************************/
|
|
322
|
-
/*! no static exports found */
|
|
323
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
324
|
-
|
|
325
|
-
"use strict";
|
|
326
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _Sort[\"default\"];\n }\n});\n\nvar _Sort = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/Sort */ \"./node_modules/@rsuite/icons/lib/icons/Sort.js\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/Sort.js?");
|
|
327
|
-
|
|
328
|
-
/***/ }),
|
|
329
|
-
|
|
330
|
-
/***/ "./node_modules/@rsuite/icons/SortDown.js":
|
|
331
|
-
/*!************************************************!*\
|
|
332
|
-
!*** ./node_modules/@rsuite/icons/SortDown.js ***!
|
|
333
|
-
\************************************************/
|
|
334
|
-
/*! no static exports found */
|
|
335
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
336
|
-
|
|
337
|
-
"use strict";
|
|
338
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _SortDown[\"default\"];\n }\n});\n\nvar _SortDown = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/SortDown */ \"./node_modules/@rsuite/icons/lib/icons/SortDown.js\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/SortDown.js?");
|
|
339
|
-
|
|
340
|
-
/***/ }),
|
|
341
|
-
|
|
342
|
-
/***/ "./node_modules/@rsuite/icons/SortUp.js":
|
|
343
|
-
/*!**********************************************!*\
|
|
344
|
-
!*** ./node_modules/@rsuite/icons/SortUp.js ***!
|
|
345
|
-
\**********************************************/
|
|
346
|
-
/*! no static exports found */
|
|
347
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
348
|
-
|
|
349
|
-
"use strict";
|
|
350
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _SortUp[\"default\"];\n }\n});\n\nvar _SortUp = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/SortUp */ \"./node_modules/@rsuite/icons/lib/icons/SortUp.js\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/SortUp.js?");
|
|
351
|
-
|
|
352
|
-
/***/ }),
|
|
353
|
-
|
|
354
|
-
/***/ "./node_modules/@rsuite/icons/lib/Icon.js":
|
|
355
|
-
/*!************************************************!*\
|
|
356
|
-
!*** ./node_modules/@rsuite/icons/lib/Icon.js ***!
|
|
357
|
-
\************************************************/
|
|
358
|
-
/*! no static exports found */
|
|
359
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
360
|
-
|
|
361
|
-
"use strict";
|
|
362
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.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 _react = _interopRequireDefault(__webpack_require__(/*! react */ \"react\"));\n\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _utils = __webpack_require__(/*! ./utils */ \"./node_modules/@rsuite/icons/lib/utils/index.js\");\n\nvar defaultProps = {\n as: 'svg',\n fill: 'currentColor',\n width: '1em',\n height: '1em'\n};\n\nfunction filterProps(props) {\n var nextProps = {};\n Object.entries(props).forEach(function (_ref) {\n var key = _ref[0],\n value = _ref[1];\n\n if (typeof value !== 'undefined') {\n nextProps[key] = value;\n }\n });\n return nextProps;\n}\n\nvar Icon = /*#__PURE__*/_react[\"default\"].forwardRef(function (props, ref) {\n var _classNames;\n\n var Component = props.as,\n spin = props.spin,\n pulse = props.pulse,\n flip = props.flip,\n fill = props.fill,\n className = props.className,\n rotate = props.rotate,\n children = props.children,\n viewBox = props.viewBox,\n width = props.width,\n height = props.height,\n style = props.style,\n rest = (0, _objectWithoutPropertiesLoose2[\"default\"])(props, [\"as\", \"spin\", \"pulse\", \"flip\", \"fill\", \"className\", \"rotate\", \"children\", \"viewBox\", \"width\", \"height\", \"style\"]);\n\n var _useClassNames = (0, _utils.useClassNames)(),\n componentClassName = _useClassNames[0],\n addPrefix = _useClassNames[1];\n\n var classes = (0, _classnames[\"default\"])(className, componentClassName, (_classNames = {}, _classNames[addPrefix('spin')] = spin, _classNames[addPrefix('pulse')] = pulse, _classNames[addPrefix(\"flip-\" + flip)] = !!flip, _classNames));\n var rotateStyles = {\n msTransform: \"rotate(\" + rotate + \"deg)\",\n transform: \"rotate(\" + rotate + \"deg)\"\n };\n (0, _utils.useInsertStyles)();\n var svgProps = filterProps({\n width: width,\n height: height,\n fill: fill,\n viewBox: viewBox,\n className: classes,\n style: rotate ? (0, _extends2[\"default\"])({}, rotateStyles, style) : style\n });\n return /*#__PURE__*/_react[\"default\"].createElement(Component, (0, _extends2[\"default\"])({\n \"aria-hidden\": true,\n focusable: false,\n ref: ref\n }, svgProps, rest), children);\n});\n\nIcon.displayName = 'Icon';\nIcon.defaultProps = defaultProps;\nIcon.propTypes = {\n spin: _propTypes[\"default\"].bool,\n pulse: _propTypes[\"default\"].bool,\n rotate: _propTypes[\"default\"].number,\n viewBox: _propTypes[\"default\"].string,\n as: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].elementType, _propTypes[\"default\"].string]),\n flip: _propTypes[\"default\"].oneOf(['horizontal', 'vertical']),\n fill: _propTypes[\"default\"].string\n};\nvar _default = Icon;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/Icon.js?");
|
|
363
|
-
|
|
364
|
-
/***/ }),
|
|
365
|
-
|
|
366
|
-
/***/ "./node_modules/@rsuite/icons/lib/createSvgIcon.js":
|
|
367
|
-
/*!*********************************************************!*\
|
|
368
|
-
!*** ./node_modules/@rsuite/icons/lib/createSvgIcon.js ***!
|
|
369
|
-
\*********************************************************/
|
|
370
|
-
/*! no static exports found */
|
|
371
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
372
|
-
|
|
373
|
-
"use strict";
|
|
374
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.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 _react = _interopRequireDefault(__webpack_require__(/*! react */ \"react\"));\n\nvar _Icon = _interopRequireDefault(__webpack_require__(/*! ./Icon */ \"./node_modules/@rsuite/icons/lib/Icon.js\"));\n\nfunction createSvgIcon(_ref) {\n var as = _ref.as,\n ariaLabel = _ref.ariaLabel,\n displayName = _ref.displayName,\n category = _ref.category;\n\n var IconComponent = /*#__PURE__*/_react[\"default\"].forwardRef(function (props, ref) {\n return /*#__PURE__*/_react[\"default\"].createElement(_Icon[\"default\"], (0, _extends2[\"default\"])({\n \"aria-label\": ariaLabel,\n \"data-category\": category,\n ref: ref,\n as: as\n }, props));\n });\n\n IconComponent.displayName = displayName;\n return IconComponent;\n}\n\nvar _default = createSvgIcon;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/createSvgIcon.js?");
|
|
375
|
-
|
|
376
|
-
/***/ }),
|
|
377
|
-
|
|
378
|
-
/***/ "./node_modules/@rsuite/icons/lib/icons/ArrowDown.js":
|
|
379
|
-
/*!***********************************************************!*\
|
|
380
|
-
!*** ./node_modules/@rsuite/icons/lib/icons/ArrowDown.js ***!
|
|
381
|
-
\***********************************************************/
|
|
382
|
-
/*! no static exports found */
|
|
383
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
384
|
-
|
|
385
|
-
"use strict";
|
|
386
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ../createSvgIcon */ \"./node_modules/@rsuite/icons/lib/createSvgIcon.js\"));\n\nvar _ArrowDown = _interopRequireDefault(__webpack_require__(/*! @rsuite/icon-font/lib/direction/ArrowDown */ \"./node_modules/@rsuite/icon-font/lib/direction/ArrowDown.js\"));\n\n// Generated by script, don't edit it please.\nvar ArrowDown = (0, _createSvgIcon[\"default\"])({\n as: _ArrowDown[\"default\"],\n ariaLabel: 'arrow down',\n category: 'direction',\n displayName: 'ArrowDown'\n});\nvar _default = ArrowDown;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/icons/ArrowDown.js?");
|
|
387
|
-
|
|
388
|
-
/***/ }),
|
|
389
|
-
|
|
390
|
-
/***/ "./node_modules/@rsuite/icons/lib/icons/ArrowRight.js":
|
|
391
|
-
/*!************************************************************!*\
|
|
392
|
-
!*** ./node_modules/@rsuite/icons/lib/icons/ArrowRight.js ***!
|
|
393
|
-
\************************************************************/
|
|
394
|
-
/*! no static exports found */
|
|
395
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
396
|
-
|
|
397
|
-
"use strict";
|
|
398
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ../createSvgIcon */ \"./node_modules/@rsuite/icons/lib/createSvgIcon.js\"));\n\nvar _ArrowRight = _interopRequireDefault(__webpack_require__(/*! @rsuite/icon-font/lib/direction/ArrowRight */ \"./node_modules/@rsuite/icon-font/lib/direction/ArrowRight.js\"));\n\n// Generated by script, don't edit it please.\nvar ArrowRight = (0, _createSvgIcon[\"default\"])({\n as: _ArrowRight[\"default\"],\n ariaLabel: 'arrow right',\n category: 'direction',\n displayName: 'ArrowRight'\n});\nvar _default = ArrowRight;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/icons/ArrowRight.js?");
|
|
399
|
-
|
|
400
|
-
/***/ }),
|
|
401
|
-
|
|
402
|
-
/***/ "./node_modules/@rsuite/icons/lib/icons/Sort.js":
|
|
403
|
-
/*!******************************************************!*\
|
|
404
|
-
!*** ./node_modules/@rsuite/icons/lib/icons/Sort.js ***!
|
|
405
|
-
\******************************************************/
|
|
406
|
-
/*! no static exports found */
|
|
407
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
408
|
-
|
|
409
|
-
"use strict";
|
|
410
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ../createSvgIcon */ \"./node_modules/@rsuite/icons/lib/createSvgIcon.js\"));\n\nvar _Sort = _interopRequireDefault(__webpack_require__(/*! @rsuite/icon-font/lib/direction/Sort */ \"./node_modules/@rsuite/icon-font/lib/direction/Sort.js\"));\n\n// Generated by script, don't edit it please.\nvar Sort = (0, _createSvgIcon[\"default\"])({\n as: _Sort[\"default\"],\n ariaLabel: 'sort',\n category: 'direction',\n displayName: 'Sort'\n});\nvar _default = Sort;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/icons/Sort.js?");
|
|
411
|
-
|
|
412
|
-
/***/ }),
|
|
413
|
-
|
|
414
|
-
/***/ "./node_modules/@rsuite/icons/lib/icons/SortDown.js":
|
|
415
|
-
/*!**********************************************************!*\
|
|
416
|
-
!*** ./node_modules/@rsuite/icons/lib/icons/SortDown.js ***!
|
|
417
|
-
\**********************************************************/
|
|
418
|
-
/*! no static exports found */
|
|
419
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
420
|
-
|
|
421
|
-
"use strict";
|
|
422
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ../createSvgIcon */ \"./node_modules/@rsuite/icons/lib/createSvgIcon.js\"));\n\nvar _SortDown = _interopRequireDefault(__webpack_require__(/*! @rsuite/icon-font/lib/direction/SortDown */ \"./node_modules/@rsuite/icon-font/lib/direction/SortDown.js\"));\n\n// Generated by script, don't edit it please.\nvar SortDown = (0, _createSvgIcon[\"default\"])({\n as: _SortDown[\"default\"],\n ariaLabel: 'sort down',\n category: 'direction',\n displayName: 'SortDown'\n});\nvar _default = SortDown;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/icons/SortDown.js?");
|
|
423
|
-
|
|
424
|
-
/***/ }),
|
|
425
|
-
|
|
426
|
-
/***/ "./node_modules/@rsuite/icons/lib/icons/SortUp.js":
|
|
427
|
-
/*!********************************************************!*\
|
|
428
|
-
!*** ./node_modules/@rsuite/icons/lib/icons/SortUp.js ***!
|
|
429
|
-
\********************************************************/
|
|
430
|
-
/*! no static exports found */
|
|
431
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
432
|
-
|
|
433
|
-
"use strict";
|
|
434
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ../createSvgIcon */ \"./node_modules/@rsuite/icons/lib/createSvgIcon.js\"));\n\nvar _SortUp = _interopRequireDefault(__webpack_require__(/*! @rsuite/icon-font/lib/direction/SortUp */ \"./node_modules/@rsuite/icon-font/lib/direction/SortUp.js\"));\n\n// Generated by script, don't edit it please.\nvar SortUp = (0, _createSvgIcon[\"default\"])({\n as: _SortUp[\"default\"],\n ariaLabel: 'sort up',\n category: 'direction',\n displayName: 'SortUp'\n});\nvar _default = SortUp;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/icons/SortUp.js?");
|
|
435
|
-
|
|
436
|
-
/***/ }),
|
|
437
|
-
|
|
438
|
-
/***/ "./node_modules/@rsuite/icons/lib/utils/inBrowserEnv.js":
|
|
439
|
-
/*!**************************************************************!*\
|
|
440
|
-
!*** ./node_modules/@rsuite/icons/lib/utils/inBrowserEnv.js ***!
|
|
441
|
-
\**************************************************************/
|
|
442
|
-
/*! no static exports found */
|
|
443
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
444
|
-
|
|
445
|
-
"use strict";
|
|
446
|
-
eval("\n\nexports.__esModule = true;\nexports[\"default\"] = _default;\n\nfunction _default() {\n return typeof document !== 'undefined' && typeof window !== 'undefined' && typeof document.createElement === 'function';\n}\n\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/utils/inBrowserEnv.js?");
|
|
447
|
-
|
|
448
|
-
/***/ }),
|
|
449
|
-
|
|
450
|
-
/***/ "./node_modules/@rsuite/icons/lib/utils/index.js":
|
|
451
|
-
/*!*******************************************************!*\
|
|
452
|
-
!*** ./node_modules/@rsuite/icons/lib/utils/index.js ***!
|
|
453
|
-
\*******************************************************/
|
|
454
|
-
/*! no static exports found */
|
|
455
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
456
|
-
|
|
457
|
-
"use strict";
|
|
458
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nvar _exportNames = {\n useClassNames: true,\n inBrowserEnv: true,\n useInsertStyles: true\n};\nexports.useInsertStyles = exports.inBrowserEnv = exports.useClassNames = void 0;\n\nvar _prefix = __webpack_require__(/*! ./prefix */ \"./node_modules/@rsuite/icons/lib/utils/prefix.js\");\n\nObject.keys(_prefix).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _prefix[key]) return;\n exports[key] = _prefix[key];\n});\n\nvar _useClassNames = _interopRequireDefault(__webpack_require__(/*! ./useClassNames */ \"./node_modules/@rsuite/icons/lib/utils/useClassNames.js\"));\n\nexports.useClassNames = _useClassNames[\"default\"];\n\nvar _inBrowserEnv = _interopRequireDefault(__webpack_require__(/*! ./inBrowserEnv */ \"./node_modules/@rsuite/icons/lib/utils/inBrowserEnv.js\"));\n\nexports.inBrowserEnv = _inBrowserEnv[\"default\"];\n\nvar _useInsertStyles = _interopRequireDefault(__webpack_require__(/*! ./useInsertStyles */ \"./node_modules/@rsuite/icons/lib/utils/useInsertStyles.js\"));\n\nexports.useInsertStyles = _useInsertStyles[\"default\"];\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/utils/index.js?");
|
|
459
|
-
|
|
460
|
-
/***/ }),
|
|
461
|
-
|
|
462
|
-
/***/ "./node_modules/@rsuite/icons/lib/utils/prefix.js":
|
|
463
|
-
/*!********************************************************!*\
|
|
464
|
-
!*** ./node_modules/@rsuite/icons/lib/utils/prefix.js ***!
|
|
465
|
-
\********************************************************/
|
|
466
|
-
/*! no static exports found */
|
|
467
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
468
|
-
|
|
469
|
-
"use strict";
|
|
470
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.prefix = exports.defaultClassPrefix = exports.getClassNamePrefix = exports.globalKey = void 0;\n\nvar _curry = _interopRequireDefault(__webpack_require__(/*! lodash/curry */ \"./node_modules/@rsuite/icons/node_modules/lodash/curry.js\"));\n\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\"));\n\nvar globalKey = 'rs-';\nexports.globalKey = globalKey;\n\nvar getClassNamePrefix = function getClassNamePrefix() {\n if (typeof __RSUITE_CLASSNAME_PREFIX__ !== 'undefined') {\n return __RSUITE_CLASSNAME_PREFIX__;\n }\n\n return globalKey;\n};\n\nexports.getClassNamePrefix = getClassNamePrefix;\n\nvar defaultClassPrefix = function defaultClassPrefix(name) {\n return name ? \"\" + getClassNamePrefix() + name : undefined;\n};\n\nexports.defaultClassPrefix = defaultClassPrefix;\nvar prefix = (0, _curry[\"default\"])(function (pre, className) {\n if (!pre || !className) {\n return '';\n }\n\n if (Array.isArray(className)) {\n return (0, _classnames[\"default\"])(className.filter(function (name) {\n return !!name;\n }).map(function (name) {\n return pre + \"-\" + name;\n }));\n }\n\n return pre + \"-\" + className;\n});\nexports.prefix = prefix;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/utils/prefix.js?");
|
|
471
|
-
|
|
472
|
-
/***/ }),
|
|
473
|
-
|
|
474
|
-
/***/ "./node_modules/@rsuite/icons/lib/utils/useClassNames.js":
|
|
475
|
-
/*!***************************************************************!*\
|
|
476
|
-
!*** ./node_modules/@rsuite/icons/lib/utils/useClassNames.js ***!
|
|
477
|
-
\***************************************************************/
|
|
478
|
-
/*! no static exports found */
|
|
479
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
480
|
-
|
|
481
|
-
"use strict";
|
|
482
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports[\"default\"] = useClassNames;\n\nvar _prefix = __webpack_require__(/*! ./prefix */ \"./node_modules/@rsuite/icons/lib/utils/prefix.js\");\n\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\"));\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nfunction useClassNames(componentClassName) {\n var className = (0, _prefix.defaultClassPrefix)('icon');\n var addPrefix = (0, _react.useCallback)(function (blockClassName) {\n return (0, _prefix.prefix)(className, blockClassName);\n }, []);\n return [(0, _classnames[\"default\"])(className, (0, _prefix.defaultClassPrefix)(componentClassName)), addPrefix];\n}\n\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/utils/useClassNames.js?");
|
|
483
|
-
|
|
484
|
-
/***/ }),
|
|
485
|
-
|
|
486
|
-
/***/ "./node_modules/@rsuite/icons/lib/utils/useInsertStyles.js":
|
|
487
|
-
/*!*****************************************************************!*\
|
|
488
|
-
!*** ./node_modules/@rsuite/icons/lib/utils/useInsertStyles.js ***!
|
|
489
|
-
\*****************************************************************/
|
|
490
|
-
/*! no static exports found */
|
|
491
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
492
|
-
|
|
493
|
-
"use strict";
|
|
494
|
-
eval("\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _insertCss = __webpack_require__(/*! insert-css */ \"./node_modules/insert-css/index.js\");\n\nvar _prefix = __webpack_require__(/*! ./prefix */ \"./node_modules/@rsuite/icons/lib/utils/prefix.js\");\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar prefix = (0, _prefix.getClassNamePrefix)(); // Generated with ../less/index.less\n\nvar styles = \".\" + prefix + \"icon {\\n display: -webkit-inline-box;\\n display: -ms-inline-flexbox;\\n display: inline-flex;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n vertical-align: middle;\\n}\\n.\" + prefix + \"icon[tabindex] {\\n cursor: pointer;\\n}\\n.\" + prefix + \"icon-spin {\\n -webkit-animation: icon-spin 2s infinite linear;\\n animation: icon-spin 2s infinite linear;\\n}\\n.\" + prefix + \"icon-pulse {\\n -webkit-animation: icon-spin 1s infinite steps(8);\\n animation: icon-spin 1s infinite steps(8);\\n}\\n.\" + prefix + \"icon-flip-horizontal {\\n -webkit-transform: scaleX(-1);\\n -ms-transform: scaleX(-1);\\n transform: scaleX(-1);\\n}\\n.\" + prefix + \"icon-flip-vertical {\\n -webkit-transform: scaleY(-1);\\n -ms-transform: scaleY(-1);\\n transform: scaleY(-1);\\n}\\n@-webkit-keyframes icon-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(359deg);\\n transform: rotate(359deg);\\n }\\n}\\n@keyframes icon-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(359deg);\\n transform: rotate(359deg);\\n }\\n}\";\nvar cssInjected = false;\n\nvar useInsertStyles = function useInsertStyles(styleStr) {\n if (styleStr === void 0) {\n styleStr = styles;\n }\n\n (0, _react.useEffect)(function () {\n // Make sure css injected once.\n if (!cssInjected) {\n (0, _insertCss.insertCss)(styleStr, {\n prepend: true\n });\n cssInjected = true;\n }\n }, []);\n};\n\nvar _default = useInsertStyles;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/lib/utils/useInsertStyles.js?");
|
|
495
|
-
|
|
496
|
-
/***/ }),
|
|
497
|
-
|
|
498
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_apply.js":
|
|
499
|
-
/*!******************************************************************!*\
|
|
500
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_apply.js ***!
|
|
501
|
-
\******************************************************************/
|
|
502
|
-
/*! no static exports found */
|
|
503
|
-
/***/ (function(module, exports) {
|
|
504
|
-
|
|
505
|
-
eval("/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_apply.js?");
|
|
506
|
-
|
|
507
|
-
/***/ }),
|
|
508
|
-
|
|
509
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_baseCreate.js":
|
|
510
|
-
/*!***********************************************************************!*\
|
|
511
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_baseCreate.js ***!
|
|
512
|
-
\***********************************************************************/
|
|
513
|
-
/*! no static exports found */
|
|
514
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
515
|
-
|
|
516
|
-
eval("var isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/@rsuite/icons/node_modules/lodash/isObject.js\");\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_baseCreate.js?");
|
|
517
|
-
|
|
518
|
-
/***/ }),
|
|
519
|
-
|
|
520
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_baseSetData.js":
|
|
521
|
-
/*!************************************************************************!*\
|
|
522
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_baseSetData.js ***!
|
|
523
|
-
\************************************************************************/
|
|
524
|
-
/*! no static exports found */
|
|
525
|
-
/***/ (function(module, exports) {
|
|
526
|
-
|
|
527
|
-
eval("/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_baseSetData.js?");
|
|
528
|
-
|
|
529
|
-
/***/ }),
|
|
530
|
-
|
|
531
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_composeArgs.js":
|
|
532
|
-
/*!************************************************************************!*\
|
|
533
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_composeArgs.js ***!
|
|
534
|
-
\************************************************************************/
|
|
535
|
-
/*! no static exports found */
|
|
536
|
-
/***/ (function(module, exports) {
|
|
537
|
-
|
|
538
|
-
eval("/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n}\n\nmodule.exports = composeArgs;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_composeArgs.js?");
|
|
539
|
-
|
|
540
|
-
/***/ }),
|
|
541
|
-
|
|
542
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_composeArgsRight.js":
|
|
543
|
-
/*!*****************************************************************************!*\
|
|
544
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_composeArgsRight.js ***!
|
|
545
|
-
\*****************************************************************************/
|
|
546
|
-
/*! no static exports found */
|
|
547
|
-
/***/ (function(module, exports) {
|
|
548
|
-
|
|
549
|
-
eval("/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n}\n\nmodule.exports = composeArgsRight;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_composeArgsRight.js?");
|
|
550
|
-
|
|
551
|
-
/***/ }),
|
|
552
|
-
|
|
553
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_copyArray.js":
|
|
554
|
-
/*!**********************************************************************!*\
|
|
555
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_copyArray.js ***!
|
|
556
|
-
\**********************************************************************/
|
|
557
|
-
/*! no static exports found */
|
|
558
|
-
/***/ (function(module, exports) {
|
|
559
|
-
|
|
560
|
-
eval("/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_copyArray.js?");
|
|
561
|
-
|
|
562
|
-
/***/ }),
|
|
563
|
-
|
|
564
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_countHolders.js":
|
|
565
|
-
/*!*************************************************************************!*\
|
|
566
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_countHolders.js ***!
|
|
567
|
-
\*************************************************************************/
|
|
568
|
-
/*! no static exports found */
|
|
569
|
-
/***/ (function(module, exports) {
|
|
570
|
-
|
|
571
|
-
eval("/**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\nfunction countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n}\n\nmodule.exports = countHolders;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_countHolders.js?");
|
|
572
|
-
|
|
573
|
-
/***/ }),
|
|
574
|
-
|
|
575
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_createBind.js":
|
|
576
|
-
/*!***********************************************************************!*\
|
|
577
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_createBind.js ***!
|
|
578
|
-
\***********************************************************************/
|
|
579
|
-
/*! no static exports found */
|
|
580
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
581
|
-
|
|
582
|
-
eval("var createCtor = __webpack_require__(/*! ./_createCtor */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createCtor.js\"),\n root = __webpack_require__(/*! ./_root */ \"./node_modules/@rsuite/icons/node_modules/lodash/_root.js\");\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n}\n\nmodule.exports = createBind;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_createBind.js?");
|
|
583
|
-
|
|
584
|
-
/***/ }),
|
|
585
|
-
|
|
586
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_createCtor.js":
|
|
587
|
-
/*!***********************************************************************!*\
|
|
588
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_createCtor.js ***!
|
|
589
|
-
\***********************************************************************/
|
|
590
|
-
/*! no static exports found */
|
|
591
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
592
|
-
|
|
593
|
-
eval("var baseCreate = __webpack_require__(/*! ./_baseCreate */ \"./node_modules/@rsuite/icons/node_modules/lodash/_baseCreate.js\"),\n isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/@rsuite/icons/node_modules/lodash/isObject.js\");\n\n/**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n}\n\nmodule.exports = createCtor;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_createCtor.js?");
|
|
594
|
-
|
|
595
|
-
/***/ }),
|
|
596
|
-
|
|
597
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_createCurry.js":
|
|
598
|
-
/*!************************************************************************!*\
|
|
599
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_createCurry.js ***!
|
|
600
|
-
\************************************************************************/
|
|
601
|
-
/*! no static exports found */
|
|
602
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
603
|
-
|
|
604
|
-
eval("var apply = __webpack_require__(/*! ./_apply */ \"./node_modules/@rsuite/icons/node_modules/lodash/_apply.js\"),\n createCtor = __webpack_require__(/*! ./_createCtor */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createCtor.js\"),\n createHybrid = __webpack_require__(/*! ./_createHybrid */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createHybrid.js\"),\n createRecurry = __webpack_require__(/*! ./_createRecurry */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createRecurry.js\"),\n getHolder = __webpack_require__(/*! ./_getHolder */ \"./node_modules/@rsuite/icons/node_modules/lodash/_getHolder.js\"),\n replaceHolders = __webpack_require__(/*! ./_replaceHolders */ \"./node_modules/@rsuite/icons/node_modules/lodash/_replaceHolders.js\"),\n root = __webpack_require__(/*! ./_root */ \"./node_modules/@rsuite/icons/node_modules/lodash/_root.js\");\n\n/**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n}\n\nmodule.exports = createCurry;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_createCurry.js?");
|
|
605
|
-
|
|
606
|
-
/***/ }),
|
|
607
|
-
|
|
608
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_createHybrid.js":
|
|
609
|
-
/*!*************************************************************************!*\
|
|
610
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_createHybrid.js ***!
|
|
611
|
-
\*************************************************************************/
|
|
612
|
-
/*! no static exports found */
|
|
613
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
614
|
-
|
|
615
|
-
eval("var composeArgs = __webpack_require__(/*! ./_composeArgs */ \"./node_modules/@rsuite/icons/node_modules/lodash/_composeArgs.js\"),\n composeArgsRight = __webpack_require__(/*! ./_composeArgsRight */ \"./node_modules/@rsuite/icons/node_modules/lodash/_composeArgsRight.js\"),\n countHolders = __webpack_require__(/*! ./_countHolders */ \"./node_modules/@rsuite/icons/node_modules/lodash/_countHolders.js\"),\n createCtor = __webpack_require__(/*! ./_createCtor */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createCtor.js\"),\n createRecurry = __webpack_require__(/*! ./_createRecurry */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createRecurry.js\"),\n getHolder = __webpack_require__(/*! ./_getHolder */ \"./node_modules/@rsuite/icons/node_modules/lodash/_getHolder.js\"),\n reorder = __webpack_require__(/*! ./_reorder */ \"./node_modules/@rsuite/icons/node_modules/lodash/_reorder.js\"),\n replaceHolders = __webpack_require__(/*! ./_replaceHolders */ \"./node_modules/@rsuite/icons/node_modules/lodash/_replaceHolders.js\"),\n root = __webpack_require__(/*! ./_root */ \"./node_modules/@rsuite/icons/node_modules/lodash/_root.js\");\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_ARY_FLAG = 128,\n WRAP_FLIP_FLAG = 512;\n\n/**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n}\n\nmodule.exports = createHybrid;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_createHybrid.js?");
|
|
616
|
-
|
|
617
|
-
/***/ }),
|
|
618
|
-
|
|
619
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_createPartial.js":
|
|
620
|
-
/*!**************************************************************************!*\
|
|
621
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_createPartial.js ***!
|
|
622
|
-
\**************************************************************************/
|
|
623
|
-
/*! no static exports found */
|
|
624
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
625
|
-
|
|
626
|
-
eval("var apply = __webpack_require__(/*! ./_apply */ \"./node_modules/@rsuite/icons/node_modules/lodash/_apply.js\"),\n createCtor = __webpack_require__(/*! ./_createCtor */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createCtor.js\"),\n root = __webpack_require__(/*! ./_root */ \"./node_modules/@rsuite/icons/node_modules/lodash/_root.js\");\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n}\n\nmodule.exports = createPartial;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_createPartial.js?");
|
|
627
|
-
|
|
628
|
-
/***/ }),
|
|
629
|
-
|
|
630
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_createRecurry.js":
|
|
631
|
-
/*!**************************************************************************!*\
|
|
632
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_createRecurry.js ***!
|
|
633
|
-
\**************************************************************************/
|
|
634
|
-
/*! no static exports found */
|
|
635
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
636
|
-
|
|
637
|
-
eval("var isLaziable = __webpack_require__(/*! ./_isLaziable */ \"./node_modules/@rsuite/icons/node_modules/lodash/_isLaziable.js\"),\n setData = __webpack_require__(/*! ./_setData */ \"./node_modules/@rsuite/icons/node_modules/lodash/_setData.js\"),\n setWrapToString = __webpack_require__(/*! ./_setWrapToString */ \"./node_modules/@rsuite/icons/node_modules/lodash/_setWrapToString.js\");\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n}\n\nmodule.exports = createRecurry;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_createRecurry.js?");
|
|
638
|
-
|
|
639
|
-
/***/ }),
|
|
640
|
-
|
|
641
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_createWrap.js":
|
|
642
|
-
/*!***********************************************************************!*\
|
|
643
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_createWrap.js ***!
|
|
644
|
-
\***********************************************************************/
|
|
645
|
-
/*! no static exports found */
|
|
646
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
647
|
-
|
|
648
|
-
eval("var baseSetData = __webpack_require__(/*! ./_baseSetData */ \"./node_modules/@rsuite/icons/node_modules/lodash/_baseSetData.js\"),\n createBind = __webpack_require__(/*! ./_createBind */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createBind.js\"),\n createCurry = __webpack_require__(/*! ./_createCurry */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createCurry.js\"),\n createHybrid = __webpack_require__(/*! ./_createHybrid */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createHybrid.js\"),\n createPartial = __webpack_require__(/*! ./_createPartial */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createPartial.js\"),\n getData = __webpack_require__(/*! ./_getData */ \"./node_modules/@rsuite/icons/node_modules/lodash/_getData.js\"),\n mergeData = __webpack_require__(/*! ./_mergeData */ \"./node_modules/@rsuite/icons/node_modules/lodash/_mergeData.js\"),\n setData = __webpack_require__(/*! ./_setData */ \"./node_modules/@rsuite/icons/node_modules/lodash/_setData.js\"),\n setWrapToString = __webpack_require__(/*! ./_setWrapToString */ \"./node_modules/@rsuite/icons/node_modules/lodash/_setWrapToString.js\"),\n toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/@rsuite/icons/node_modules/lodash/toInteger.js\");\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n}\n\nmodule.exports = createWrap;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_createWrap.js?");
|
|
649
|
-
|
|
650
|
-
/***/ }),
|
|
651
|
-
|
|
652
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_freeGlobal.js":
|
|
653
|
-
/*!***********************************************************************!*\
|
|
654
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_freeGlobal.js ***!
|
|
655
|
-
\***********************************************************************/
|
|
656
|
-
/*! no static exports found */
|
|
657
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
658
|
-
|
|
659
|
-
eval("/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_freeGlobal.js?");
|
|
660
|
-
|
|
661
|
-
/***/ }),
|
|
662
|
-
|
|
663
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_getData.js":
|
|
664
|
-
/*!********************************************************************!*\
|
|
665
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_getData.js ***!
|
|
666
|
-
\********************************************************************/
|
|
667
|
-
/*! no static exports found */
|
|
668
|
-
/***/ (function(module, exports) {
|
|
669
|
-
|
|
670
|
-
eval("/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_getData.js?");
|
|
671
|
-
|
|
672
|
-
/***/ }),
|
|
673
|
-
|
|
674
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_getHolder.js":
|
|
675
|
-
/*!**********************************************************************!*\
|
|
676
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_getHolder.js ***!
|
|
677
|
-
\**********************************************************************/
|
|
678
|
-
/*! no static exports found */
|
|
679
|
-
/***/ (function(module, exports) {
|
|
680
|
-
|
|
681
|
-
eval("/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_getHolder.js?");
|
|
682
|
-
|
|
683
|
-
/***/ }),
|
|
684
|
-
|
|
685
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_isIndex.js":
|
|
686
|
-
/*!********************************************************************!*\
|
|
687
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_isIndex.js ***!
|
|
688
|
-
\********************************************************************/
|
|
689
|
-
/*! no static exports found */
|
|
690
|
-
/***/ (function(module, exports) {
|
|
691
|
-
|
|
692
|
-
eval("/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_isIndex.js?");
|
|
693
|
-
|
|
694
|
-
/***/ }),
|
|
695
|
-
|
|
696
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_isLaziable.js":
|
|
697
|
-
/*!***********************************************************************!*\
|
|
698
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_isLaziable.js ***!
|
|
699
|
-
\***********************************************************************/
|
|
700
|
-
/*! no static exports found */
|
|
701
|
-
/***/ (function(module, exports) {
|
|
702
|
-
|
|
703
|
-
eval("/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_isLaziable.js?");
|
|
704
|
-
|
|
705
|
-
/***/ }),
|
|
706
|
-
|
|
707
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_mergeData.js":
|
|
708
|
-
/*!**********************************************************************!*\
|
|
709
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_mergeData.js ***!
|
|
710
|
-
\**********************************************************************/
|
|
711
|
-
/*! no static exports found */
|
|
712
|
-
/***/ (function(module, exports) {
|
|
713
|
-
|
|
714
|
-
eval("/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_mergeData.js?");
|
|
715
|
-
|
|
716
|
-
/***/ }),
|
|
717
|
-
|
|
718
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_reorder.js":
|
|
719
|
-
/*!********************************************************************!*\
|
|
720
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_reorder.js ***!
|
|
721
|
-
\********************************************************************/
|
|
722
|
-
/*! no static exports found */
|
|
723
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
724
|
-
|
|
725
|
-
eval("var copyArray = __webpack_require__(/*! ./_copyArray */ \"./node_modules/@rsuite/icons/node_modules/lodash/_copyArray.js\"),\n isIndex = __webpack_require__(/*! ./_isIndex */ \"./node_modules/@rsuite/icons/node_modules/lodash/_isIndex.js\");\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\nfunction reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n}\n\nmodule.exports = reorder;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_reorder.js?");
|
|
726
|
-
|
|
727
|
-
/***/ }),
|
|
728
|
-
|
|
729
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_replaceHolders.js":
|
|
730
|
-
/*!***************************************************************************!*\
|
|
731
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_replaceHolders.js ***!
|
|
732
|
-
\***************************************************************************/
|
|
733
|
-
/*! no static exports found */
|
|
734
|
-
/***/ (function(module, exports) {
|
|
735
|
-
|
|
736
|
-
eval("/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_replaceHolders.js?");
|
|
737
|
-
|
|
738
|
-
/***/ }),
|
|
739
|
-
|
|
740
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_root.js":
|
|
741
|
-
/*!*****************************************************************!*\
|
|
742
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_root.js ***!
|
|
743
|
-
\*****************************************************************/
|
|
744
|
-
/*! no static exports found */
|
|
745
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
746
|
-
|
|
747
|
-
eval("var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ \"./node_modules/@rsuite/icons/node_modules/lodash/_freeGlobal.js\");\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_root.js?");
|
|
748
|
-
|
|
749
|
-
/***/ }),
|
|
750
|
-
|
|
751
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_setData.js":
|
|
752
|
-
/*!********************************************************************!*\
|
|
753
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_setData.js ***!
|
|
754
|
-
\********************************************************************/
|
|
755
|
-
/*! no static exports found */
|
|
756
|
-
/***/ (function(module, exports) {
|
|
757
|
-
|
|
758
|
-
eval("/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_setData.js?");
|
|
759
|
-
|
|
760
|
-
/***/ }),
|
|
761
|
-
|
|
762
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/_setWrapToString.js":
|
|
763
|
-
/*!****************************************************************************!*\
|
|
764
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/_setWrapToString.js ***!
|
|
765
|
-
\****************************************************************************/
|
|
766
|
-
/*! no static exports found */
|
|
767
|
-
/***/ (function(module, exports) {
|
|
768
|
-
|
|
769
|
-
eval("/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/_setWrapToString.js?");
|
|
770
|
-
|
|
771
|
-
/***/ }),
|
|
772
|
-
|
|
773
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/curry.js":
|
|
774
|
-
/*!*****************************************************************!*\
|
|
775
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/curry.js ***!
|
|
776
|
-
\*****************************************************************/
|
|
777
|
-
/*! no static exports found */
|
|
778
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
779
|
-
|
|
780
|
-
eval("var createWrap = __webpack_require__(/*! ./_createWrap */ \"./node_modules/@rsuite/icons/node_modules/lodash/_createWrap.js\");\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8;\n\n/**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\nfunction curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n}\n\n// Assign default placeholders.\ncurry.placeholder = {};\n\nmodule.exports = curry;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/curry.js?");
|
|
781
|
-
|
|
782
|
-
/***/ }),
|
|
783
|
-
|
|
784
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/isObject.js":
|
|
785
|
-
/*!********************************************************************!*\
|
|
786
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/isObject.js ***!
|
|
787
|
-
\********************************************************************/
|
|
788
|
-
/*! no static exports found */
|
|
789
|
-
/***/ (function(module, exports) {
|
|
790
|
-
|
|
791
|
-
eval("/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/isObject.js?");
|
|
792
|
-
|
|
793
|
-
/***/ }),
|
|
794
|
-
|
|
795
|
-
/***/ "./node_modules/@rsuite/icons/node_modules/lodash/toInteger.js":
|
|
796
|
-
/*!*********************************************************************!*\
|
|
797
|
-
!*** ./node_modules/@rsuite/icons/node_modules/lodash/toInteger.js ***!
|
|
798
|
-
\*********************************************************************/
|
|
799
|
-
/*! no static exports found */
|
|
800
|
-
/***/ (function(module, exports) {
|
|
801
|
-
|
|
802
|
-
eval("/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/@rsuite/icons/node_modules/lodash/toInteger.js?");
|
|
803
|
-
|
|
804
|
-
/***/ }),
|
|
805
|
-
|
|
806
234
|
/***/ "./node_modules/babel-runtime/core-js/object/assign.js":
|
|
807
235
|
/*!*************************************************************!*\
|
|
808
236
|
!*** ./node_modules/babel-runtime/core-js/object/assign.js ***!
|
|
@@ -3411,7 +2839,7 @@ eval("\n\nexports.__esModule = true;\nexports.underscore = underscore;\nexports.
|
|
|
3411
2839
|
/*! no static exports found */
|
|
3412
2840
|
/***/ (function(module, exports) {
|
|
3413
2841
|
|
|
3414
|
-
eval("function resizeListener(e) {\
|
|
2842
|
+
eval("function resizeListener(e) {\n var win = e.target || e.srcElement\n if (win.__resizeRAF__) {\n cancelAnimationFrame(win.__resizeRAF__)\n }\n win.__resizeRAF__ = requestAnimationFrame(function () {\n var trigger = win.__resizeTrigger__\n var listeners = trigger && trigger.__resizeListeners__\n if (listeners) {\n listeners.forEach(function (fn) {\n fn.call(trigger, e)\n })\n }\n })\n}\n\nvar _exports = function exports(element, fn) {\n var window = this\n var document = window.document\n var isIE\n\n var attachEvent = document.attachEvent\n if (typeof navigator !== \"undefined\") {\n isIE =\n navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/Edge/)\n }\n\n function objectLoad() {\n this.contentDocument.defaultView.__resizeTrigger__ = this.__resizeElement__\n this.contentDocument.defaultView.addEventListener(\"resize\", resizeListener)\n }\n\n if (!element.__resizeListeners__) {\n element.__resizeListeners__ = []\n if (attachEvent) {\n element.__resizeTrigger__ = element\n element.attachEvent(\"onresize\", resizeListener)\n } else {\n if (getComputedStyle(element).position === \"static\") {\n element.style.position = \"relative\"\n }\n var obj = (element.__resizeTrigger__ = document.createElement(\"object\"))\n obj.setAttribute(\n \"style\",\n \"position: absolute; top: 0; left: 0; height: 100%; width: 100%; pointer-events: none; z-index: -1; opacity: 0;\"\n )\n obj.setAttribute(\"class\", \"resize-sensor\")\n\n // prevent <object> from stealing keyboard focus\n obj.setAttribute(\"tabindex\", \"-1\")\n\n // prevent screenreaders to see this object\n obj.setAttribute(\"title\", \"\")\n\n obj.__resizeElement__ = element\n obj.onload = objectLoad\n obj.type = \"text/html\"\n if (isIE) {\n element.appendChild(obj)\n }\n obj.data = \"about:blank\"\n if (!isIE) {\n element.appendChild(obj)\n }\n }\n }\n element.__resizeListeners__.push(fn)\n}\n\nmodule.exports =\n typeof window === \"undefined\" ? _exports : _exports.bind(window)\n\nmodule.exports.unbind = function (element, fn) {\n var attachEvent = document.attachEvent\n var listeners = element.__resizeListeners__ || []\n if (fn) {\n var index = listeners.indexOf(fn)\n if (index !== -1) {\n listeners.splice(index, 1)\n }\n } else {\n listeners = element.__resizeListeners__ = []\n }\n if (!listeners.length) {\n if (attachEvent) {\n element.detachEvent(\"onresize\", resizeListener)\n } else if (element.__resizeTrigger__) {\n var contentDocument = element.__resizeTrigger__.contentDocument\n var defaultView = contentDocument && contentDocument.defaultView\n if (defaultView) {\n defaultView.removeEventListener(\"resize\", resizeListener)\n delete defaultView.__resizeTrigger__\n }\n element.__resizeTrigger__ = !element.removeChild(\n element.__resizeTrigger__\n )\n }\n delete element.__resizeListeners__\n }\n}\n\n\n//# sourceURL=webpack://rsuite/./node_modules/element-resize-event/index.js?");
|
|
3415
2843
|
|
|
3416
2844
|
/***/ }),
|
|
3417
2845
|
|
|
@@ -3439,17 +2867,6 @@ eval("\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the
|
|
|
3439
2867
|
|
|
3440
2868
|
/***/ }),
|
|
3441
2869
|
|
|
3442
|
-
/***/ "./node_modules/insert-css/index.js":
|
|
3443
|
-
/*!******************************************!*\
|
|
3444
|
-
!*** ./node_modules/insert-css/index.js ***!
|
|
3445
|
-
\******************************************/
|
|
3446
|
-
/*! no static exports found */
|
|
3447
|
-
/***/ (function(module, exports) {
|
|
3448
|
-
|
|
3449
|
-
eval("var containers = []; // will store container HTMLElement references\nvar styleElements = []; // will store {prepend: HTMLElement, append: HTMLElement}\n\nvar usage = 'insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).';\n\nfunction insertCss(css, options) {\n options = options || {};\n\n if (css === undefined) {\n throw new Error(usage);\n }\n\n var position = options.prepend === true ? 'prepend' : 'append';\n var container = options.container !== undefined ? options.container : document.querySelector('head');\n var containerId = containers.indexOf(container);\n\n // first time we see this container, create the necessary entries\n if (containerId === -1) {\n containerId = containers.push(container) - 1;\n styleElements[containerId] = {};\n }\n\n // try to get the correponding container + position styleElement, create it otherwise\n var styleElement;\n\n if (styleElements[containerId] !== undefined && styleElements[containerId][position] !== undefined) {\n styleElement = styleElements[containerId][position];\n } else {\n styleElement = styleElements[containerId][position] = createStyleElement();\n\n if (position === 'prepend') {\n container.insertBefore(styleElement, container.childNodes[0]);\n } else {\n container.appendChild(styleElement);\n }\n }\n\n // strip potential UTF-8 BOM if css was read from a file\n if (css.charCodeAt(0) === 0xFEFF) { css = css.substr(1, css.length); }\n\n // actually add the stylesheet\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText += css\n } else {\n styleElement.textContent += css;\n }\n\n return styleElement;\n};\n\nfunction createStyleElement() {\n var styleElement = document.createElement('style');\n styleElement.setAttribute('type', 'text/css');\n return styleElement;\n}\n\nmodule.exports = insertCss;\nmodule.exports.insertCss = insertCss;\n\n\n//# sourceURL=webpack://rsuite/./node_modules/insert-css/index.js?");
|
|
3450
|
-
|
|
3451
|
-
/***/ }),
|
|
3452
|
-
|
|
3453
2870
|
/***/ "./node_modules/lodash/_SetCache.js":
|
|
3454
2871
|
/*!******************************************!*\
|
|
3455
2872
|
!*** ./node_modules/lodash/_SetCache.js ***!
|
|
@@ -5657,7 +5074,7 @@ eval("/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source cod
|
|
|
5657
5074
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5658
5075
|
|
|
5659
5076
|
"use strict";
|
|
5660
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"propTypes\", function() { return propTypes; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n/* harmony import */ var _Column__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Column */ \"./node_modules/rsuite-table/es/Column.js\");\n/* harmony import */ var _rsuite_icons_ArrowRight__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @rsuite/icons/ArrowRight */ \"./node_modules/@rsuite/icons/ArrowRight.js\");\n/* harmony import */ var _rsuite_icons_ArrowRight__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_rsuite_icons_ArrowRight__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _rsuite_icons_ArrowDown__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @rsuite/icons/ArrowDown */ \"./node_modules/@rsuite/icons/ArrowDown.js\");\n/* harmony import */ var _rsuite_icons_ArrowDown__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_rsuite_icons_ArrowDown__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n align: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['left', 'center', 'right']),\n verticalAlign: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['top', 'middle', 'bottom']),\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n classPrefix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n dataKey: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n isHeaderCell: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n width: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n height: 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 left: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n headerHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n firstColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n lastColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n hasChildren: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any,\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 rowIndex: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n rowData: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n depth: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n onTreeToggle: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n renderTreeToggle: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n renderCell: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n wordWrap: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n removed: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n treeCol: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n expanded: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n groupHeader: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n groupCount: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n};\n\nvar Cell = /*#__PURE__*/function (_React$PureComponent) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Cell, _React$PureComponent);\n\n function Cell() {\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$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n\n _this.addPrefix = function (name) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"prefix\"])(_this.props.classPrefix)(name);\n };\n\n _this.handleExpandClick = function (event) {\n var _this$props$onTreeTog, _this$props2;\n\n var _this$props = _this.props,\n rowKey = _this$props.rowKey,\n rowIndex = _this$props.rowIndex,\n rowData = _this$props.rowData;\n (_this$props$onTreeTog = (_this$props2 = _this.props).onTreeToggle) === null || _this$props$onTreeTog === void 0 ? void 0 : _this$props$onTreeTog.call(_this$props2, rowKey, rowIndex, rowData, event);\n };\n\n return _this;\n }\n\n var _proto = Cell.prototype;\n\n _proto.isTreeCol = function isTreeCol() {\n var _this$props3 = this.props,\n treeCol = _this$props3.treeCol,\n firstColumn = _this$props3.firstColumn;\n var _this$context = this.context,\n hasCustomTreeCol = _this$context.hasCustomTreeCol,\n isTree = _this$context.isTree;\n\n if (treeCol) {\n return true;\n }\n\n if (!hasCustomTreeCol && firstColumn && isTree) {\n return true;\n }\n\n return false;\n };\n\n _proto.getHeight = function getHeight() {\n var _this$props4 = this.props,\n height = _this$props4.height,\n rowData = _this$props4.rowData;\n return typeof height === 'function' ? height(rowData) : height;\n };\n\n _proto.renderTreeNodeExpandIcon = function renderTreeNodeExpandIcon() {\n var _this$props5 = this.props,\n rowData = _this$props5.rowData,\n renderTreeToggle = _this$props5.renderTreeToggle,\n hasChildren = _this$props5.hasChildren,\n expanded = _this$props5.expanded;\n var ExpandIconComponent = expanded ? _rsuite_icons_ArrowDown__WEBPACK_IMPORTED_MODULE_11___default.a : _rsuite_icons_ArrowRight__WEBPACK_IMPORTED_MODULE_10___default.a;\n var expandButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](ExpandIconComponent, {\n className: this.addPrefix('expand-icon')\n });\n\n if (this.isTreeCol() && hasChildren) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n role: \"button\",\n tabIndex: -1,\n className: this.addPrefix('expand-wrapper'),\n onClick: this.handleExpandClick\n }, renderTreeToggle ? renderTreeToggle(expandButton, rowData, expanded) : expandButton);\n }\n\n return null;\n };\n\n _proto.render = function render() {\n var _classNames, _styles, _extends2;\n\n var _this$props6 = this.props,\n width = _this$props6.width,\n left = _this$props6.left,\n style = _this$props6.style,\n className = _this$props6.className,\n firstColumn = _this$props6.firstColumn,\n lastColumn = _this$props6.lastColumn,\n isHeaderCell = _this$props6.isHeaderCell,\n headerHeight = _this$props6.headerHeight,\n align = _this$props6.align,\n children = _this$props6.children,\n rowData = _this$props6.rowData,\n dataKey = _this$props6.dataKey,\n rowIndex = _this$props6.rowIndex,\n renderCell = _this$props6.renderCell,\n removed = _this$props6.removed,\n wordWrap = _this$props6.wordWrap,\n classPrefix = _this$props6.classPrefix,\n depth = _this$props6.depth,\n verticalAlign = _this$props6.verticalAlign,\n expanded = _this$props6.expanded,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props6, [\"width\", \"left\", \"style\", \"className\", \"firstColumn\", \"lastColumn\", \"isHeaderCell\", \"headerHeight\", \"align\", \"children\", \"rowData\", \"dataKey\", \"rowIndex\", \"renderCell\", \"removed\", \"wordWrap\", \"classPrefix\", \"depth\", \"verticalAlign\", \"expanded\"]);\n\n if (removed) {\n return null;\n }\n\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[this.addPrefix('expanded')] = expanded && this.isTreeCol(), _classNames[this.addPrefix('first')] = firstColumn, _classNames[this.addPrefix('last')] = lastColumn, _classNames));\n var rtl = this.context.rtl;\n var nextHeight = isHeaderCell ? headerHeight : this.getHeight();\n var styles = (_styles = {\n width: width,\n height: nextHeight,\n zIndex: depth\n }, _styles[rtl ? 'right' : 'left'] = left, _styles);\n\n var contentStyles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((_extends2 = {\n width: width,\n height: nextHeight,\n textAlign: align\n }, _extends2[rtl ? 'paddingRight' : 'paddingLeft'] = this.isTreeCol() ? depth * _constants__WEBPACK_IMPORTED_MODULE_6__[\"LAYER_WIDTH\"] + 10 : null, _extends2), style);\n\n if (verticalAlign) {\n contentStyles.display = 'table-cell';\n contentStyles.verticalAlign = verticalAlign;\n }\n\n var cellContent = Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"isNullOrUndefined\"])(children) && rowData ? rowData[dataKey] : children;\n\n if (typeof children === 'function') {\n var getChildren = children;\n cellContent = getChildren(rowData, rowIndex);\n }\n\n var unhandledProps = Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"getUnhandledProps\"])(Cell, Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"getUnhandledProps\"])(_Column__WEBPACK_IMPORTED_MODULE_9__[\"default\"], rest));\n var cell = renderCell ? renderCell(cellContent) : cellContent;\n var content = wordWrap ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('wrap')\n }, this.renderTreeNodeExpandIcon(), cell) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_3__[\"Fragment\"], null, this.renderTreeNodeExpandIcon(), cell);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: isHeaderCell ? 'columnheader' : 'gridcell'\n }, unhandledProps, {\n className: classes,\n style: styles\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('content'),\n style: contentStyles\n }, content));\n };\n\n return Cell;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"PureComponent\"]);\n\nCell.contextType = _TableContext__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\nCell.propTypes = propTypes;\nCell.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"defaultClassPrefix\"])('table-cell'),\n headerHeight: 36,\n depth: 0,\n height: 36,\n width: 0,\n left: 0\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Cell);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/Cell.js?");
|
|
5077
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"propTypes\", function() { return propTypes; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n/* harmony import */ var _Column__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Column */ \"./node_modules/rsuite-table/es/Column.js\");\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n align: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['left', 'center', 'right']),\n verticalAlign: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['top', 'middle', 'bottom']),\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n classPrefix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n dataKey: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n isHeaderCell: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n width: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n height: 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 left: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n headerHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n firstColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n lastColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n hasChildren: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any,\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 rowIndex: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n rowData: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n depth: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n onTreeToggle: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n renderTreeToggle: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n renderCell: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n wordWrap: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n removed: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n treeCol: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n expanded: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n groupHeader: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n groupCount: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n};\n\nvar Cell = /*#__PURE__*/function (_React$PureComponent) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Cell, _React$PureComponent);\n\n function Cell() {\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$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n\n _this.addPrefix = function (name) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"prefix\"])(_this.props.classPrefix)(name);\n };\n\n _this.handleExpandClick = function (event) {\n var _this$props$onTreeTog, _this$props2;\n\n var _this$props = _this.props,\n rowKey = _this$props.rowKey,\n rowIndex = _this$props.rowIndex,\n rowData = _this$props.rowData;\n (_this$props$onTreeTog = (_this$props2 = _this.props).onTreeToggle) === null || _this$props$onTreeTog === void 0 ? void 0 : _this$props$onTreeTog.call(_this$props2, rowKey, rowIndex, rowData, event);\n };\n\n return _this;\n }\n\n var _proto = Cell.prototype;\n\n _proto.isTreeCol = function isTreeCol() {\n var _this$props3 = this.props,\n treeCol = _this$props3.treeCol,\n firstColumn = _this$props3.firstColumn;\n var _this$context = this.context,\n hasCustomTreeCol = _this$context.hasCustomTreeCol,\n isTree = _this$context.isTree;\n\n if (treeCol) {\n return true;\n }\n\n if (!hasCustomTreeCol && firstColumn && isTree) {\n return true;\n }\n\n return false;\n };\n\n _proto.getHeight = function getHeight() {\n var _this$props4 = this.props,\n height = _this$props4.height,\n rowData = _this$props4.rowData;\n return typeof height === 'function' ? height(rowData) : height;\n };\n\n _proto.renderTreeNodeExpandIcon = function renderTreeNodeExpandIcon() {\n var _this$props5 = this.props,\n rowData = _this$props5.rowData,\n renderTreeToggle = _this$props5.renderTreeToggle,\n hasChildren = _this$props5.hasChildren,\n expanded = _this$props5.expanded;\n var expandButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"i\", {\n className: this.addPrefix('expand-icon')\n });\n\n if (this.isTreeCol() && hasChildren) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n role: \"button\",\n tabIndex: -1,\n className: this.addPrefix('expand-wrapper'),\n onClick: this.handleExpandClick\n }, renderTreeToggle ? renderTreeToggle(expandButton, rowData, expanded) : expandButton);\n }\n\n return null;\n };\n\n _proto.render = function render() {\n var _classNames, _extends2, _contentStyles;\n\n var _this$props6 = this.props,\n width = _this$props6.width,\n left = _this$props6.left,\n style = _this$props6.style,\n className = _this$props6.className,\n firstColumn = _this$props6.firstColumn,\n lastColumn = _this$props6.lastColumn,\n isHeaderCell = _this$props6.isHeaderCell,\n headerHeight = _this$props6.headerHeight,\n align = _this$props6.align,\n children = _this$props6.children,\n rowData = _this$props6.rowData,\n dataKey = _this$props6.dataKey,\n rowIndex = _this$props6.rowIndex,\n renderCell = _this$props6.renderCell,\n removed = _this$props6.removed,\n wordWrap = _this$props6.wordWrap,\n classPrefix = _this$props6.classPrefix,\n depth = _this$props6.depth,\n verticalAlign = _this$props6.verticalAlign,\n expanded = _this$props6.expanded,\n onClick = _this$props6.onClick,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props6, [\"width\", \"left\", \"style\", \"className\", \"firstColumn\", \"lastColumn\", \"isHeaderCell\", \"headerHeight\", \"align\", \"children\", \"rowData\", \"dataKey\", \"rowIndex\", \"renderCell\", \"removed\", \"wordWrap\", \"classPrefix\", \"depth\", \"verticalAlign\", \"expanded\", \"onClick\"]);\n\n if (removed) {\n return null;\n }\n\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[this.addPrefix('expanded')] = expanded && this.isTreeCol(), _classNames[this.addPrefix('first')] = firstColumn, _classNames[this.addPrefix('last')] = lastColumn, _classNames));\n var rtl = this.context.rtl;\n var nextHeight = isHeaderCell ? headerHeight : this.getHeight();\n\n var styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, style, (_extends2 = {\n width: width,\n height: nextHeight,\n zIndex: depth\n }, _extends2[rtl ? 'right' : 'left'] = left, _extends2));\n\n var contentStyles = (_contentStyles = {\n width: width,\n height: nextHeight,\n textAlign: align\n }, _contentStyles[rtl ? 'paddingRight' : 'paddingLeft'] = this.isTreeCol() ? depth * _constants__WEBPACK_IMPORTED_MODULE_6__[\"LAYER_WIDTH\"] + 10 : null, _contentStyles);\n\n if (verticalAlign) {\n contentStyles.display = 'table-cell';\n contentStyles.verticalAlign = verticalAlign;\n }\n\n var cellContent = Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"isNullOrUndefined\"])(children) && rowData ? rowData[dataKey] : children;\n\n if (typeof children === 'function') {\n var getChildren = children;\n cellContent = getChildren(rowData, rowIndex);\n }\n\n var unhandledProps = Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"getUnhandledProps\"])(propTypes, Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"getUnhandledProps\"])(_Column__WEBPACK_IMPORTED_MODULE_9__[\"default\"].propTypes, rest));\n var cell = renderCell ? renderCell(cellContent) : cellContent;\n var content = wordWrap ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('wrap')\n }, this.renderTreeNodeExpandIcon(), cell) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_3__[\"Fragment\"], null, this.renderTreeNodeExpandIcon(), cell);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: isHeaderCell ? 'columnheader' : 'gridcell'\n }, unhandledProps, {\n onClick: onClick,\n className: classes,\n style: styles\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('content'),\n style: contentStyles\n }, content));\n };\n\n return Cell;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"PureComponent\"]);\n\nCell.contextType = _TableContext__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\nCell.propTypes = propTypes;\nCell.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"defaultClassPrefix\"])('table-cell'),\n headerHeight: 36,\n depth: 0,\n height: 36,\n width: 0,\n left: 0\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Cell);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/Cell.js?");
|
|
5661
5078
|
|
|
5662
5079
|
/***/ }),
|
|
5663
5080
|
|
|
@@ -5669,7 +5086,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
5669
5086
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5670
5087
|
|
|
5671
5088
|
"use strict";
|
|
5672
|
-
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/rsuite-table/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/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n\n\n\n\n\n\n\n\n\nvar CellGroup = /*#__PURE__*/function (_React$PureComponent) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(CellGroup, _React$PureComponent);\n\n function CellGroup() {\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$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n\n _this.addPrefix = function (name) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"prefix\"])(_this.props.classPrefix)(name);\n };\n\n return _this;\n }\n\n var _proto = CellGroup.prototype;\n\n _proto.render = function render() {\n var _classNames;\n\n var _this$props = this.props,\n fixed = _this$props.fixed,\n width = _this$props.width,\n left = _this$props.left,\n height = _this$props.height,\n style = _this$props.style,\n classPrefix = _this$props.classPrefix,\n className = _this$props.className,\n children = _this$props.children,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props, [\"fixed\", \"width\", \"left\", \"height\", \"style\", \"classPrefix\", \"className\", \"children\"]);\n\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[this.addPrefix(\"fixed-\" + (fixed || ''))] = fixed, _classNames[this.addPrefix('scroll')] = !fixed, _classNames));\n\n var styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n width: width,\n height: height\n }, style);\n\n var unhandledProps = Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"getUnhandledProps\"])(
|
|
5089
|
+
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/rsuite-table/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/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n\n\n\n\n\n\n\n\nvar propTypes = {\n fixed: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['left', 'right']),\n width: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n height: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n left: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n classPrefix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string\n};\n\nvar CellGroup = /*#__PURE__*/function (_React$PureComponent) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(CellGroup, _React$PureComponent);\n\n function CellGroup() {\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$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n\n _this.addPrefix = function (name) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"prefix\"])(_this.props.classPrefix)(name);\n };\n\n return _this;\n }\n\n var _proto = CellGroup.prototype;\n\n _proto.render = function render() {\n var _classNames;\n\n var _this$props = this.props,\n fixed = _this$props.fixed,\n width = _this$props.width,\n left = _this$props.left,\n height = _this$props.height,\n style = _this$props.style,\n classPrefix = _this$props.classPrefix,\n className = _this$props.className,\n children = _this$props.children,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props, [\"fixed\", \"width\", \"left\", \"height\", \"style\", \"classPrefix\", \"className\", \"children\"]);\n\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[this.addPrefix(\"fixed-\" + (fixed || ''))] = fixed, _classNames[this.addPrefix('scroll')] = !fixed, _classNames));\n\n var styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n width: width,\n height: height\n }, style);\n\n var unhandledProps = Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"getUnhandledProps\"])(propTypes, rest);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_TableContext__WEBPACK_IMPORTED_MODULE_7__[\"default\"].Consumer, null, function (_ref) {\n var translateDOMPositionXY = _ref.translateDOMPositionXY;\n translateDOMPositionXY === null || translateDOMPositionXY === void 0 ? void 0 : translateDOMPositionXY(styles, left, 0);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, unhandledProps, {\n className: classes,\n style: styles\n }), children);\n });\n };\n\n return CellGroup;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"PureComponent\"]);\n\nCellGroup.propTypes = propTypes;\nCellGroup.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"defaultClassPrefix\"])('table-cell-group')\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (CellGroup);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/CellGroup.js?");
|
|
5673
5090
|
|
|
5674
5091
|
/***/ }),
|
|
5675
5092
|
|
|
@@ -5693,7 +5110,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop
|
|
|
5693
5110
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5694
5111
|
|
|
5695
5112
|
"use strict";
|
|
5696
|
-
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/rsuite-table/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/rsuite-table/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 = /*#__PURE__*/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 /*#__PURE__*/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), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: addPrefix('header'),\n style: styles\n }, /*#__PURE__*/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
|
|
5113
|
+
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/rsuite-table/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/rsuite-table/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 = /*#__PURE__*/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 /*#__PURE__*/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), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: addPrefix('header'),\n style: styles\n }, /*#__PURE__*/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;\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 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](node, {\n className: addPrefix('cell'),\n style: nodeStyles,\n headerHeight: height,\n verticalAlign: verticalAlign,\n children: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: addPrefix('cell-content')\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?");
|
|
5697
5114
|
|
|
5698
5115
|
/***/ }),
|
|
5699
5116
|
|
|
@@ -5705,7 +5122,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab
|
|
|
5705
5122
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5706
5123
|
|
|
5707
5124
|
"use strict";
|
|
5708
|
-
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/rsuite-table/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/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_clamp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/clamp */ \"./node_modules/rsuite-table/node_modules/lodash/clamp.js\");\n/* harmony import */ var lodash_clamp__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_clamp__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var dom_lib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n\n\n\n\n\n\n\n\n\n\n\nvar ColumnResizeHandler = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(ColumnResizeHandler, _React$Component);\n\n function ColumnResizeHandler(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.columnWidth = 0;\n _this.cursorDelta = 0;\n _this.mouseMoveTracker = void 0;\n _this.isKeyDown = void 0;\n\n _this.onMove = function (deltaX) {\n if (!_this.isKeyDown) {\n return;\n }\n\n var _this$props = _this.props,\n onColumnResizeMove = _this$props.onColumnResizeMove,\n defaultColumnWidth = _this$props.defaultColumnWidth,\n columnLeft = _this$props.columnLeft,\n columnFixed = _this$props.columnFixed;\n var rtl = _this.context.rtl;\n _this.cursorDelta += deltaX;\n _this.columnWidth = lodash_clamp__WEBPACK_IMPORTED_MODULE_6___default()(defaultColumnWidth + (rtl ? -_this.cursorDelta : _this.cursorDelta), 20, 20000);\n onColumnResizeMove === null || onColumnResizeMove === void 0 ? void 0 : onColumnResizeMove(_this.columnWidth, columnLeft, columnFixed);\n };\n\n _this.onColumnResizeEnd = function () {\n var _this$props$onColumnR, _this$props2, _this$mouseMoveTracke, _this$mouseMoveTracke2;\n\n _this.isKeyDown = false;\n (_this$props$onColumnR = (_this$props2 = _this.props).onColumnResizeEnd) === null || _this$props$onColumnR === void 0 ? void 0 : _this$props$onColumnR.call(_this$props2, _this.columnWidth, _this.cursorDelta);\n (_this$mouseMoveTracke = _this.mouseMoveTracker) === null || _this$mouseMoveTracke === void 0 ? void 0 : (_this$mouseMoveTracke2 = _this$mouseMoveTracke.releaseMouseMoves) === null || _this$mouseMoveTracke2 === void 0 ? void 0 : _this$mouseMoveTracke2.call(_this$mouseMoveTracke);\n _this.mouseMoveTracker = null;\n };\n\n _this.onColumnResizeMouseDown = function (event) {\n var _this$props$onColumnR2, _this$props3;\n\n _this.mouseMoveTracker = _this.getMouseMoveTracker();\n\n _this.mouseMoveTracker.captureMouseMoves(event);\n\n _this.isKeyDown = true;\n _this.cursorDelta = 0;\n var client = {\n clientX: event.clientX,\n clientY: event.clientY,\n preventDefault: Function()\n };\n (_this$props$onColumnR2 = (_this$props3 = _this.props).onColumnResizeStart) === null || _this$props$onColumnR2 === void 0 ? void 0 : _this$props$onColumnR2.call(_this$props3, client);\n };\n\n _this.columnWidth = props.defaultColumnWidth || 0;\n return _this;\n }\n\n var _proto = ColumnResizeHandler.prototype;\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.mouseMoveTracker) {\n this.mouseMoveTracker.releaseMouseMoves();\n this.mouseMoveTracker = null;\n }\n };\n\n _proto.getMouseMoveTracker = function getMouseMoveTracker() {\n return this.mouseMoveTracker || new dom_lib__WEBPACK_IMPORTED_MODULE_7__[\"DOMMouseMoveTracker\"](this.onMove, this.onColumnResizeEnd, document.body);\n };\n\n _proto.render = function render() {\n var _extends2;\n\n var _this$props4 = this.props,\n _this$props4$columnLe = _this$props4.columnLeft,\n columnLeft = _this$props4$columnLe === void 0 ? 0 : _this$props4$columnLe,\n classPrefix = _this$props4.classPrefix,\n height = _this$props4.height,\n className = _this$props4.className,\n style = _this$props4.style,\n columnFixed = _this$props4.columnFixed,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props4, [\"columnLeft\", \"classPrefix\", \"height\", \"className\", \"style\", \"columnFixed\"]);\n\n if (columnFixed === 'right') {\n return null;\n }\n\n var rtl = this.context.rtl;\n\n var styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((_extends2 = {}, _extends2[rtl ? 'right' : 'left'] = this.columnWidth + columnLeft - 2, _extends2.height = height, _extends2), style);\n\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className);\n var unhandled = Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"getUnhandledProps\"])(
|
|
5125
|
+
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/rsuite-table/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/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_clamp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/clamp */ \"./node_modules/rsuite-table/node_modules/lodash/clamp.js\");\n/* harmony import */ var lodash_clamp__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_clamp__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var dom_lib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n height: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n defaultColumnWidth: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n columnLeft: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n columnFixed: 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.oneOf(['left', 'right'])]),\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n classPrefix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n onColumnResizeStart: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onColumnResizeEnd: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onColumnResizeMove: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func\n};\n\nvar ColumnResizeHandler = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(ColumnResizeHandler, _React$Component);\n\n function ColumnResizeHandler(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.columnWidth = 0;\n _this.cursorDelta = 0;\n _this.mouseMoveTracker = void 0;\n _this.isKeyDown = void 0;\n\n _this.onMove = function (deltaX) {\n if (!_this.isKeyDown) {\n return;\n }\n\n var _this$props = _this.props,\n onColumnResizeMove = _this$props.onColumnResizeMove,\n defaultColumnWidth = _this$props.defaultColumnWidth,\n columnLeft = _this$props.columnLeft,\n columnFixed = _this$props.columnFixed;\n var rtl = _this.context.rtl;\n _this.cursorDelta += deltaX;\n _this.columnWidth = lodash_clamp__WEBPACK_IMPORTED_MODULE_6___default()(defaultColumnWidth + (rtl ? -_this.cursorDelta : _this.cursorDelta), 20, 20000);\n onColumnResizeMove === null || onColumnResizeMove === void 0 ? void 0 : onColumnResizeMove(_this.columnWidth, columnLeft, columnFixed);\n };\n\n _this.onColumnResizeEnd = function () {\n var _this$props$onColumnR, _this$props2, _this$mouseMoveTracke, _this$mouseMoveTracke2;\n\n _this.isKeyDown = false;\n (_this$props$onColumnR = (_this$props2 = _this.props).onColumnResizeEnd) === null || _this$props$onColumnR === void 0 ? void 0 : _this$props$onColumnR.call(_this$props2, _this.columnWidth, _this.cursorDelta);\n (_this$mouseMoveTracke = _this.mouseMoveTracker) === null || _this$mouseMoveTracke === void 0 ? void 0 : (_this$mouseMoveTracke2 = _this$mouseMoveTracke.releaseMouseMoves) === null || _this$mouseMoveTracke2 === void 0 ? void 0 : _this$mouseMoveTracke2.call(_this$mouseMoveTracke);\n _this.mouseMoveTracker = null;\n };\n\n _this.onColumnResizeMouseDown = function (event) {\n var _this$props$onColumnR2, _this$props3;\n\n _this.mouseMoveTracker = _this.getMouseMoveTracker();\n\n _this.mouseMoveTracker.captureMouseMoves(event);\n\n _this.isKeyDown = true;\n _this.cursorDelta = 0;\n var client = {\n clientX: event.clientX,\n clientY: event.clientY,\n preventDefault: Function()\n };\n (_this$props$onColumnR2 = (_this$props3 = _this.props).onColumnResizeStart) === null || _this$props$onColumnR2 === void 0 ? void 0 : _this$props$onColumnR2.call(_this$props3, client);\n };\n\n _this.columnWidth = props.defaultColumnWidth || 0;\n return _this;\n }\n\n var _proto = ColumnResizeHandler.prototype;\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.mouseMoveTracker) {\n this.mouseMoveTracker.releaseMouseMoves();\n this.mouseMoveTracker = null;\n }\n };\n\n _proto.getMouseMoveTracker = function getMouseMoveTracker() {\n return this.mouseMoveTracker || new dom_lib__WEBPACK_IMPORTED_MODULE_7__[\"DOMMouseMoveTracker\"](this.onMove, this.onColumnResizeEnd, document.body);\n };\n\n _proto.render = function render() {\n var _extends2;\n\n var _this$props4 = this.props,\n _this$props4$columnLe = _this$props4.columnLeft,\n columnLeft = _this$props4$columnLe === void 0 ? 0 : _this$props4$columnLe,\n classPrefix = _this$props4.classPrefix,\n height = _this$props4.height,\n className = _this$props4.className,\n style = _this$props4.style,\n columnFixed = _this$props4.columnFixed,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props4, [\"columnLeft\", \"classPrefix\", \"height\", \"className\", \"style\", \"columnFixed\"]);\n\n if (columnFixed === 'right') {\n return null;\n }\n\n var rtl = this.context.rtl;\n\n var styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((_extends2 = {}, _extends2[rtl ? 'right' : 'left'] = this.columnWidth + columnLeft - 2, _extends2.height = height, _extends2), style);\n\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className);\n var unhandled = Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"getUnhandledProps\"])(propTypes, rest);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, unhandled, {\n className: classes,\n style: styles,\n onMouseDown: this.onColumnResizeMouseDown,\n role: \"button\",\n tabIndex: -1\n }));\n };\n\n return ColumnResizeHandler;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"Component\"]);\n\nColumnResizeHandler.contextType = _TableContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\nColumnResizeHandler.propTypes = propTypes;\nColumnResizeHandler.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"defaultClassPrefix\"])('table-column-resize-spanner')\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ColumnResizeHandler);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/ColumnResizeHandler.js?");
|
|
5709
5126
|
|
|
5710
5127
|
/***/ }),
|
|
5711
5128
|
|
|
@@ -5717,7 +5134,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab
|
|
|
5717
5134
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5718
5135
|
|
|
5719
5136
|
"use strict";
|
|
5720
|
-
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/rsuite-table/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/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _rsuite_icons_Sort__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @rsuite/icons/Sort */ \"./node_modules/@rsuite/icons/Sort.js\");\n/* harmony import */ var _rsuite_icons_Sort__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_rsuite_icons_Sort__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _rsuite_icons_SortUp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @rsuite/icons/SortUp */ \"./node_modules/@rsuite/icons/SortUp.js\");\n/* harmony import */ var _rsuite_icons_SortUp__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_rsuite_icons_SortUp__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _rsuite_icons_SortDown__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @rsuite/icons/SortDown */ \"./node_modules/@rsuite/icons/SortDown.js\");\n/* harmony import */ var _rsuite_icons_SortDown__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_rsuite_icons_SortDown__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _ColumnResizeHandler__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ColumnResizeHandler */ \"./node_modules/rsuite-table/es/ColumnResizeHandler.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Cell */ \"./node_modules/rsuite-table/es/Cell.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nvar SORTED_MAP = {\n desc: _rsuite_icons_SortDown__WEBPACK_IMPORTED_MODULE_8___default.a,\n asc: _rsuite_icons_SortUp__WEBPACK_IMPORTED_MODULE_7___default.a\n};\n\nvar HeaderCell = /*#__PURE__*/function (_React$PureComponent) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(HeaderCell, _React$PureComponent);\n\n HeaderCell.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.width !== prevState.width || nextProps.flexGrow !== prevState.flexGrow) {\n return {\n width: nextProps.width,\n flexGrow: nextProps.flexGrow,\n columnWidth: Object(_utils__WEBPACK_IMPORTED_MODULE_10__[\"isNullOrUndefined\"])(nextProps.flexGrow) ? nextProps.width : 0\n };\n }\n\n return null;\n };\n\n function HeaderCell(props) {\n var _this;\n\n _this = _React$PureComponent.call(this, props) || this;\n\n _this.handleColumnResizeStart = function () {\n var _this$props = _this.props,\n left = _this$props.left,\n fixed = _this$props.fixed,\n onColumnResizeStart = _this$props.onColumnResizeStart;\n onColumnResizeStart === null || onColumnResizeStart === void 0 ? void 0 : onColumnResizeStart(_this.state.columnWidth, left, !!fixed);\n };\n\n _this.handleColumnResizeEnd = function (columnWidth, cursorDelta) {\n var _this$props2 = _this.props,\n dataKey = _this$props2.dataKey,\n index = _this$props2.index,\n onColumnResizeEnd = _this$props2.onColumnResizeEnd,\n onResize = _this$props2.onResize;\n\n _this.setState({\n columnWidth: columnWidth\n });\n\n onColumnResizeEnd === null || onColumnResizeEnd === void 0 ? void 0 : onColumnResizeEnd(columnWidth, cursorDelta, dataKey, index);\n onResize === null || onResize === void 0 ? void 0 : onResize(columnWidth, dataKey);\n };\n\n _this.handleClick = function () {\n if (_this.props.sortable) {\n var _this$props$onSortCol, _this$props3;\n\n (_this$props$onSortCol = (_this$props3 = _this.props).onSortColumn) === null || _this$props$onSortCol === void 0 ? void 0 : _this$props$onSortCol.call(_this$props3, _this.props.dataKey);\n }\n };\n\n _this.addPrefix = function (name) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_10__[\"prefix\"])(_this.props.classPrefix)(name);\n };\n\n _this.state = {\n width: props.width,\n flexGrow: props.flexGrow,\n columnWidth: Object(_utils__WEBPACK_IMPORTED_MODULE_10__[\"isNullOrUndefined\"])(props.flexGrow) ? props.width : 0\n };\n return _this;\n }\n\n var _proto = HeaderCell.prototype;\n\n _proto.renderResizeSpanner = function renderResizeSpanner() {\n var _this$props4 = this.props,\n resizable = _this$props4.resizable,\n left = _this$props4.left,\n onColumnResizeMove = _this$props4.onColumnResizeMove,\n fixed = _this$props4.fixed,\n headerHeight = _this$props4.headerHeight;\n var columnWidth = this.state.columnWidth;\n\n if (!resizable) {\n return null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_ColumnResizeHandler__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n defaultColumnWidth: columnWidth,\n key: columnWidth,\n columnLeft: left,\n columnFixed: fixed,\n height: headerHeight ? headerHeight - 1 : undefined,\n onColumnResizeMove: onColumnResizeMove,\n onColumnResizeStart: this.handleColumnResizeStart,\n onColumnResizeEnd: this.handleColumnResizeEnd\n });\n };\n\n _proto.renderSortColumn = function renderSortColumn() {\n var _this$props5 = this.props,\n sortable = _this$props5.sortable,\n sortColumn = _this$props5.sortColumn,\n _this$props5$sortType = _this$props5.sortType,\n sortType = _this$props5$sortType === void 0 ? '' : _this$props5$sortType,\n dataKey = _this$props5.dataKey;\n\n if (sortable) {\n var _classNames;\n\n var SortIcon = sortColumn === dataKey ? SORTED_MAP[sortType] : _rsuite_icons_Sort__WEBPACK_IMPORTED_MODULE_6___default.a;\n var iconClasses = classnames__WEBPACK_IMPORTED_MODULE_5___default()(this.addPrefix('icon-sort'), (_classNames = {}, _classNames[this.addPrefix(\"icon-sort-\" + sortType)] = sortColumn === dataKey, _classNames));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n className: this.addPrefix('sort-wrapper')\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](SortIcon, {\n className: iconClasses\n }));\n }\n\n return null;\n };\n\n _proto.render = function render() {\n var _classNames2;\n\n var _this$props6 = this.props,\n className = _this$props6.className,\n width = _this$props6.width,\n dataKey = _this$props6.dataKey,\n headerHeight = _this$props6.headerHeight,\n children = _this$props6.children,\n left = _this$props6.left,\n sortable = _this$props6.sortable,\n classPrefix = _this$props6.classPrefix,\n sortColumn = _this$props6.sortColumn,\n sortType = _this$props6.sortType,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props6, [\"className\", \"width\", \"dataKey\", \"headerHeight\", \"children\", \"left\", \"sortable\", \"classPrefix\", \"sortColumn\", \"sortType\"]);\n\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames2 = {}, _classNames2[this.addPrefix('sortable')] = sortable, _classNames2));\n var unhandledProps = Object(_utils__WEBPACK_IMPORTED_MODULE_10__[\"getUnhandledProps\"])(HeaderCell, rest);\n var ariaSort;\n\n if (sortColumn === dataKey) {\n ariaSort = 'other';\n\n if (sortType === 'asc') {\n ariaSort = 'ascending';\n } else if (sortType === 'desc') {\n ariaSort = 'descending';\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classes\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Cell__WEBPACK_IMPORTED_MODULE_11__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"aria-sort\": ariaSort\n }, unhandledProps, {\n width: width,\n dataKey: dataKey,\n left: left,\n headerHeight: headerHeight,\n isHeaderCell: true,\n onClick: this.handleClick\n }), children, this.renderSortColumn()), this.renderResizeSpanner());\n };\n\n return HeaderCell;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"PureComponent\"]);\n\nHeaderCell.propTypes = {\n index: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n sortColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n sortType: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['desc', 'asc']),\n sortable: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n resizable: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n onColumnResizeStart: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onColumnResizeEnd: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onResize: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onColumnResizeMove: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onSortColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n flexGrow: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n fixed: 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.oneOf(['left', 'right'])]),\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node\n};\nHeaderCell.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_10__[\"defaultClassPrefix\"])('table-cell-header')\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (HeaderCell);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/HeaderCell.js?");
|
|
5137
|
+
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/rsuite-table/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/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _ColumnResizeHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ColumnResizeHandler */ \"./node_modules/rsuite-table/es/ColumnResizeHandler.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Cell */ \"./node_modules/rsuite-table/es/Cell.js\");\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n index: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n sortColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n sortType: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['desc', 'asc']),\n sortable: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n resizable: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n onColumnResizeStart: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onColumnResizeEnd: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onResize: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onColumnResizeMove: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onSortColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n flexGrow: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n fixed: 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.oneOf(['left', 'right'])]),\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node\n};\n\nvar HeaderCell = /*#__PURE__*/function (_React$PureComponent) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(HeaderCell, _React$PureComponent);\n\n HeaderCell.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.width !== prevState.width || nextProps.flexGrow !== prevState.flexGrow) {\n return {\n width: nextProps.width,\n flexGrow: nextProps.flexGrow,\n columnWidth: Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"isNullOrUndefined\"])(nextProps.flexGrow) ? nextProps.width : 0\n };\n }\n\n return null;\n };\n\n function HeaderCell(props) {\n var _this;\n\n _this = _React$PureComponent.call(this, props) || this;\n\n _this.handleColumnResizeStart = function () {\n var _this$props = _this.props,\n left = _this$props.left,\n fixed = _this$props.fixed,\n onColumnResizeStart = _this$props.onColumnResizeStart;\n onColumnResizeStart === null || onColumnResizeStart === void 0 ? void 0 : onColumnResizeStart(_this.state.columnWidth, left, !!fixed);\n };\n\n _this.handleColumnResizeEnd = function (columnWidth, cursorDelta) {\n var _this$props2 = _this.props,\n dataKey = _this$props2.dataKey,\n index = _this$props2.index,\n onColumnResizeEnd = _this$props2.onColumnResizeEnd,\n onResize = _this$props2.onResize;\n\n _this.setState({\n columnWidth: columnWidth\n });\n\n onColumnResizeEnd === null || onColumnResizeEnd === void 0 ? void 0 : onColumnResizeEnd(columnWidth, cursorDelta, dataKey, index);\n onResize === null || onResize === void 0 ? void 0 : onResize(columnWidth, dataKey);\n };\n\n _this.handleClick = function () {\n if (_this.props.sortable) {\n var _this$props$onSortCol, _this$props3;\n\n (_this$props$onSortCol = (_this$props3 = _this.props).onSortColumn) === null || _this$props$onSortCol === void 0 ? void 0 : _this$props$onSortCol.call(_this$props3, _this.props.dataKey);\n }\n };\n\n _this.addPrefix = function (name) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"prefix\"])(_this.props.classPrefix)(name);\n };\n\n _this.state = {\n width: props.width,\n flexGrow: props.flexGrow,\n columnWidth: Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"isNullOrUndefined\"])(props.flexGrow) ? props.width : 0\n };\n return _this;\n }\n\n var _proto = HeaderCell.prototype;\n\n _proto.renderResizeSpanner = function renderResizeSpanner() {\n var _this$props4 = this.props,\n resizable = _this$props4.resizable,\n left = _this$props4.left,\n onColumnResizeMove = _this$props4.onColumnResizeMove,\n fixed = _this$props4.fixed,\n headerHeight = _this$props4.headerHeight;\n var columnWidth = this.state.columnWidth;\n\n if (!resizable) {\n return null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_ColumnResizeHandler__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n defaultColumnWidth: columnWidth,\n key: columnWidth,\n columnLeft: left,\n columnFixed: fixed,\n height: headerHeight ? headerHeight - 1 : undefined,\n onColumnResizeMove: onColumnResizeMove,\n onColumnResizeStart: this.handleColumnResizeStart,\n onColumnResizeEnd: this.handleColumnResizeEnd\n });\n };\n\n _proto.renderSortColumn = function renderSortColumn() {\n var _this$props5 = this.props,\n sortable = _this$props5.sortable,\n sortColumn = _this$props5.sortColumn,\n _this$props5$sortType = _this$props5.sortType,\n sortType = _this$props5$sortType === void 0 ? '' : _this$props5$sortType,\n dataKey = _this$props5.dataKey,\n groupHeader = _this$props5.groupHeader;\n\n if (sortable && !groupHeader) {\n var _classNames;\n\n var iconClasses = classnames__WEBPACK_IMPORTED_MODULE_5___default()(this.addPrefix('icon-sort'), (_classNames = {}, _classNames[this.addPrefix(\"icon-sort-\" + sortType)] = sortColumn === dataKey, _classNames));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n className: this.addPrefix('sort-wrapper')\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"i\", {\n className: iconClasses\n }));\n }\n\n return null;\n };\n\n _proto.render = function render() {\n var _classNames2;\n\n var _this$props6 = this.props,\n className = _this$props6.className,\n width = _this$props6.width,\n dataKey = _this$props6.dataKey,\n headerHeight = _this$props6.headerHeight,\n children = _this$props6.children,\n left = _this$props6.left,\n sortable = _this$props6.sortable,\n classPrefix = _this$props6.classPrefix,\n sortColumn = _this$props6.sortColumn,\n sortType = _this$props6.sortType,\n groupHeader = _this$props6.groupHeader,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props6, [\"className\", \"width\", \"dataKey\", \"headerHeight\", \"children\", \"left\", \"sortable\", \"classPrefix\", \"sortColumn\", \"sortType\", \"groupHeader\"]);\n\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames2 = {}, _classNames2[this.addPrefix('sortable')] = sortable, _classNames2));\n var unhandledProps = Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"getUnhandledProps\"])(propTypes, rest);\n var ariaSort;\n\n if (sortColumn === dataKey) {\n ariaSort = 'other';\n\n if (sortType === 'asc') {\n ariaSort = 'ascending';\n } else if (sortType === 'desc') {\n ariaSort = 'descending';\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classes\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Cell__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"aria-sort\": ariaSort\n }, unhandledProps, {\n width: width,\n dataKey: dataKey,\n left: left,\n headerHeight: headerHeight,\n isHeaderCell: true,\n onClick: !groupHeader ? this.handleClick : null\n }), children, this.renderSortColumn()), this.renderResizeSpanner());\n };\n\n return HeaderCell;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"PureComponent\"]);\n\nHeaderCell.propTypes = propTypes;\nHeaderCell.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"defaultClassPrefix\"])('table-cell-header')\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (HeaderCell);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/HeaderCell.js?");
|
|
5721
5138
|
|
|
5722
5139
|
/***/ }),
|
|
5723
5140
|
|
|
@@ -5729,7 +5146,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab
|
|
|
5729
5146
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5730
5147
|
|
|
5731
5148
|
"use strict";
|
|
5732
|
-
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/rsuite-table/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/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n\n\n\n\n\n\n\n\n\nvar Row = /*#__PURE__*/function (_React$PureComponent) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Row, _React$PureComponent);\n\n function Row() {\n return _React$PureComponent.apply(this, arguments) || this;\n }\n\n var _proto = Row.prototype;\n\n _proto.render = function render() {\n var _classNames;\n\n var _this$props = this.props,\n className = _this$props.className,\n width = _this$props.width,\n height = _this$props.height,\n top = _this$props.top,\n style = _this$props.style,\n isHeaderRow = _this$props.isHeaderRow,\n headerHeight = _this$props.headerHeight,\n rowRef = _this$props.rowRef,\n classPrefix = _this$props.classPrefix,\n children = _this$props.children,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props, [\"className\", \"width\", \"height\", \"top\", \"style\", \"isHeaderRow\", \"headerHeight\", \"rowRef\", \"classPrefix\", \"children\"]);\n\n var addPrefix = Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"prefix\"])(classPrefix);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[addPrefix('header')] = isHeaderRow, _classNames));\n\n var styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n minWidth: width,\n height: isHeaderRow ? headerHeight : height\n }, style);\n\n var unhandledProps = Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"getUnhandledProps\"])(
|
|
5149
|
+
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/rsuite-table/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/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n\n\n\n\n\n\n\n\nvar propTypes = {\n width: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n height: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n headerHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n top: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n isHeaderRow: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n rowRef: 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.object]),\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n classPrefix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object\n};\n\nvar Row = /*#__PURE__*/function (_React$PureComponent) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Row, _React$PureComponent);\n\n function Row() {\n return _React$PureComponent.apply(this, arguments) || this;\n }\n\n var _proto = Row.prototype;\n\n _proto.render = function render() {\n var _classNames;\n\n var _this$props = this.props,\n className = _this$props.className,\n width = _this$props.width,\n height = _this$props.height,\n top = _this$props.top,\n style = _this$props.style,\n isHeaderRow = _this$props.isHeaderRow,\n headerHeight = _this$props.headerHeight,\n rowRef = _this$props.rowRef,\n classPrefix = _this$props.classPrefix,\n children = _this$props.children,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props, [\"className\", \"width\", \"height\", \"top\", \"style\", \"isHeaderRow\", \"headerHeight\", \"rowRef\", \"classPrefix\", \"children\"]);\n\n var addPrefix = Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"prefix\"])(classPrefix);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[addPrefix('header')] = isHeaderRow, _classNames));\n\n var styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n minWidth: width,\n height: isHeaderRow ? headerHeight : height\n }, style);\n\n var unhandledProps = Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"getUnhandledProps\"])(propTypes, rest);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_TableContext__WEBPACK_IMPORTED_MODULE_7__[\"default\"].Consumer, null, function (_ref) {\n var translateDOMPositionXY = _ref.translateDOMPositionXY;\n translateDOMPositionXY === null || translateDOMPositionXY === void 0 ? void 0 : translateDOMPositionXY(styles, 0, top);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: \"row\"\n }, unhandledProps, {\n ref: rowRef,\n className: classes,\n style: styles\n }), children);\n });\n };\n\n return Row;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"PureComponent\"]);\n\nRow.propTypes = propTypes;\nRow.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"defaultClassPrefix\"])('table-row'),\n height: 46,\n headerHeight: 40\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Row);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/Row.js?");
|
|
5733
5150
|
|
|
5734
5151
|
/***/ }),
|
|
5735
5152
|
|
|
@@ -5741,7 +5158,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab
|
|
|
5741
5158
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5742
5159
|
|
|
5743
5160
|
"use strict";
|
|
5744
|
-
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/rsuite-table/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/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var dom_lib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n\n\n\n\n\n\n\n\n\n\n\nvar Scrollbar = /*#__PURE__*/function (_React$PureComponent) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Scrollbar, _React$PureComponent);\n\n function Scrollbar(props) {\n var _this;\n\n _this = _React$PureComponent.call(this, props) || this;\n _this.scrollOffset = 0;\n _this.mouseMoveTracker = null;\n _this.handleRef = void 0;\n _this.barRef = void 0;\n\n _this.handleMouseDown = function (event) {\n var _this$mouseMoveTracke, _this$props$onMouseDo, _this$props;\n\n _this.mouseMoveTracker = _this.getMouseMoveTracker();\n (_this$mouseMoveTracke = _this.mouseMoveTracker) === null || _this$mouseMoveTracke === void 0 ? void 0 : _this$mouseMoveTracke.captureMouseMoves(event);\n\n _this.setState({\n handlePressed: true\n });\n\n (_this$props$onMouseDo = (_this$props = _this.props).onMouseDown) === null || _this$props$onMouseDo === void 0 ? void 0 : _this$props$onMouseDo.call(_this$props, event);\n };\n\n _this.handleDragEnd = function () {\n _this.releaseMouseMoves();\n\n _this.setState({\n handlePressed: false\n });\n };\n\n _this.handleDragMove = function (deltaX, deltaY, event) {\n var _window, _window$event;\n\n var vertical = _this.props.vertical;\n\n if (!_this.mouseMoveTracker || !_this.mouseMoveTracker.isDragging()) {\n return;\n }\n\n if ((event === null || event === void 0 ? void 0 : event.buttons) === 0 || ((_window = window) === null || _window === void 0 ? void 0 : (_window$event = _window.event) === null || _window$event === void 0 ? void 0 : _window$event['buttons']) === 0) {\n _this.releaseMouseMoves();\n\n return;\n }\n\n _this.handleScroll(vertical ? deltaY : deltaX, event);\n };\n\n _this.handleClick = function (event) {\n var _this$handleRef$curre;\n\n if (_this.handleRef.current && (_this$handleRef$curre = _this.handleRef.current) !== null && _this$handleRef$curre !== void 0 && _this$handleRef$curre.contains(event.target)) {\n return;\n }\n\n var _this$props2 = _this.props,\n vertical = _this$props2.vertical,\n length = _this$props2.length,\n scrollLength = _this$props2.scrollLength;\n var barOffset = _this.state.barOffset;\n var offset = vertical ? event.pageY - barOffset.top : event.pageX - barOffset.left;\n var handleWidth = length / scrollLength * length;\n var delta = offset - handleWidth;\n var nextDelta = offset > _this.scrollOffset ? delta - _this.scrollOffset : offset - _this.scrollOffset;\n\n _this.handleScroll(nextDelta, event);\n };\n\n _this.state = {\n barOffset: {\n top: 0,\n left: 0\n },\n handlePressed: false\n };\n _this.handleRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.barRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n return _this;\n }\n\n var _proto = Scrollbar.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.initBarOffset();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.releaseMouseMoves();\n };\n\n _proto.onWheelScroll = function onWheelScroll(delta) {\n var _this$props3 = this.props,\n length = _this$props3.length,\n scrollLength = _this$props3.scrollLength;\n var nextDelta = delta / (scrollLength / length);\n this.updateScrollBarPosition(nextDelta);\n };\n\n _proto.getMouseMoveTracker = function getMouseMoveTracker() {\n return this.mouseMoveTracker || new dom_lib__WEBPACK_IMPORTED_MODULE_6__[\"DOMMouseMoveTracker\"](this.handleDragMove, this.handleDragEnd, document.body);\n };\n\n _proto.initBarOffset = function initBarOffset() {\n var _this2 = this;\n\n setTimeout(function () {\n _this2.barRef.current && _this2.setState({\n barOffset: Object(dom_lib__WEBPACK_IMPORTED_MODULE_6__[\"getOffset\"])(_this2.barRef.current)\n });\n }, 1);\n };\n\n _proto.handleScroll = function handleScroll(delta, event) {\n var _this$props$onScroll, _this$props5;\n\n var _this$props4 = this.props,\n length = _this$props4.length,\n scrollLength = _this$props4.scrollLength;\n var scrollDelta = delta * (scrollLength / length);\n this.updateScrollBarPosition(delta);\n (_this$props$onScroll = (_this$props5 = this.props).onScroll) === null || _this$props$onScroll === void 0 ? void 0 : _this$props$onScroll.call(_this$props5, scrollDelta, event);\n };\n\n _proto.resetScrollBarPosition = function resetScrollBarPosition(forceDelta) {\n if (forceDelta === void 0) {\n forceDelta = 0;\n }\n\n this.scrollOffset = 0;\n this.updateScrollBarPosition(0, forceDelta);\n };\n\n _proto.updateScrollBarPosition = function updateScrollBarPosition(delta, forceDelta) {\n var _this$props6 = this.props,\n vertical = _this$props6.vertical,\n length = _this$props6.length,\n scrollLength = _this$props6.scrollLength;\n var translateDOMPositionXY = this.context.translateDOMPositionXY;\n var max = scrollLength && length ? length - Math.max(length / scrollLength * length, _constants__WEBPACK_IMPORTED_MODULE_7__[\"SCROLLBAR_MIN_WIDTH\"] + 2) : 0;\n var styles = {};\n\n if (typeof forceDelta === 'undefined') {\n this.scrollOffset += delta;\n this.scrollOffset = Math.max(this.scrollOffset, 0);\n this.scrollOffset = Math.min(this.scrollOffset, max);\n } else {\n this.scrollOffset = forceDelta || 0;\n }\n\n if (vertical) {\n translateDOMPositionXY === null || translateDOMPositionXY === void 0 ? void 0 : translateDOMPositionXY(styles, 0, this.scrollOffset);\n } else {\n translateDOMPositionXY === null || translateDOMPositionXY === void 0 ? void 0 : translateDOMPositionXY(styles, this.scrollOffset, 0);\n }\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_6__[\"addStyle\"])(this.handleRef.current, styles);\n };\n\n _proto.releaseMouseMoves = function releaseMouseMoves() {\n var _this$mouseMoveTracke2, _this$mouseMoveTracke3;\n\n (_this$mouseMoveTracke2 = this.mouseMoveTracker) === null || _this$mouseMoveTracke2 === void 0 ? void 0 : (_this$mouseMoveTracke3 = _this$mouseMoveTracke2.releaseMouseMoves) === null || _this$mouseMoveTracke3 === void 0 ? void 0 : _this$mouseMoveTracke3.call(_this$mouseMoveTracke2);\n this.mouseMoveTracker = null;\n };\n\n _proto.render = function render() {\n var _classNames, _styles;\n\n var _this$props7 = this.props,\n vertical = _this$props7.vertical,\n length = _this$props7.length,\n scrollLength = _this$props7.scrollLength,\n classPrefix = _this$props7.classPrefix,\n className = _this$props7.className,\n tableId = _this$props7.tableId,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props7, [\"vertical\", \"length\", \"scrollLength\", \"classPrefix\", \"className\", \"tableId\"]);\n\n var handlePressed = this.state.handlePressed;\n var addPrefix = Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"prefix\"])(classPrefix);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[addPrefix('vertical')] = vertical, _classNames[addPrefix('horizontal')] = !vertical, _classNames[addPrefix('hide')] = scrollLength <= length, _classNames[addPrefix('pressed')] = handlePressed, _classNames));\n var width = length / scrollLength * 100;\n var styles = (_styles = {}, _styles[vertical ? 'height' : 'width'] = width + \"%\", _styles[vertical ? 'minHeight' : 'minWidth'] = _constants__WEBPACK_IMPORTED_MODULE_7__[\"SCROLLBAR_MIN_WIDTH\"], _styles);\n var unhandled = Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"getUnhandledProps\"])(Scrollbar, rest);\n var valuenow = this.scrollOffset / length * 100 + width;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: \"scrollbar\",\n \"aria-controls\": tableId,\n \"aria-valuemax\": \"100\",\n \"aria-valuemin\": \"0\",\n \"aria-valuenow\": valuenow,\n \"aria-orientation\": vertical ? 'vertical' : 'horizontal'\n }, unhandled, {\n ref: this.barRef,\n className: classes,\n onClick: this.handleClick\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.handleRef,\n className: addPrefix('handle'),\n style: styles,\n onMouseDown: this.handleMouseDown,\n role: \"button\",\n tabIndex: -1\n }));\n };\n\n return Scrollbar;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"PureComponent\"]);\n\nScrollbar.contextType = _TableContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\nScrollbar.propTypes = {\n tableId: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n vertical: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n length: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n scrollLength: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n classPrefix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n onScroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onMouseDown: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func\n};\nScrollbar.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"defaultClassPrefix\"])('table-scrollbar'),\n scrollLength: 1,\n length: 1\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Scrollbar);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/Scrollbar.js?");
|
|
5161
|
+
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/rsuite-table/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/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var dom_lib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n\n\n\n\n\n\n\n\n\n\nvar propTypes = {\n tableId: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n vertical: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n length: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n scrollLength: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n classPrefix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n onScroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onMouseDown: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func\n};\n\nvar Scrollbar = /*#__PURE__*/function (_React$PureComponent) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Scrollbar, _React$PureComponent);\n\n function Scrollbar(props) {\n var _this;\n\n _this = _React$PureComponent.call(this, props) || this;\n _this.scrollOffset = 0;\n _this.mouseMoveTracker = null;\n _this.handleRef = void 0;\n _this.barRef = void 0;\n\n _this.handleMouseDown = function (event) {\n var _this$mouseMoveTracke, _this$props$onMouseDo, _this$props;\n\n _this.mouseMoveTracker = _this.getMouseMoveTracker();\n (_this$mouseMoveTracke = _this.mouseMoveTracker) === null || _this$mouseMoveTracke === void 0 ? void 0 : _this$mouseMoveTracke.captureMouseMoves(event);\n\n _this.setState({\n handlePressed: true\n });\n\n (_this$props$onMouseDo = (_this$props = _this.props).onMouseDown) === null || _this$props$onMouseDo === void 0 ? void 0 : _this$props$onMouseDo.call(_this$props, event);\n };\n\n _this.handleDragEnd = function () {\n _this.releaseMouseMoves();\n\n _this.setState({\n handlePressed: false\n });\n };\n\n _this.handleDragMove = function (deltaX, deltaY, event) {\n var _window, _window$event;\n\n var vertical = _this.props.vertical;\n\n if (!_this.mouseMoveTracker || !_this.mouseMoveTracker.isDragging()) {\n return;\n }\n\n if ((event === null || event === void 0 ? void 0 : event.buttons) === 0 || ((_window = window) === null || _window === void 0 ? void 0 : (_window$event = _window.event) === null || _window$event === void 0 ? void 0 : _window$event['buttons']) === 0) {\n _this.releaseMouseMoves();\n\n return;\n }\n\n _this.handleScroll(vertical ? deltaY : deltaX, event);\n };\n\n _this.handleClick = function (event) {\n var _this$handleRef$curre;\n\n if (_this.handleRef.current && (_this$handleRef$curre = _this.handleRef.current) !== null && _this$handleRef$curre !== void 0 && _this$handleRef$curre.contains(event.target)) {\n return;\n }\n\n var _this$props2 = _this.props,\n vertical = _this$props2.vertical,\n length = _this$props2.length,\n scrollLength = _this$props2.scrollLength;\n var barOffset = _this.state.barOffset;\n var offset = vertical ? event.pageY - barOffset.top : event.pageX - barOffset.left;\n var handleWidth = length / scrollLength * length;\n var delta = offset - handleWidth;\n var nextDelta = offset > _this.scrollOffset ? delta - _this.scrollOffset : offset - _this.scrollOffset;\n\n _this.handleScroll(nextDelta, event);\n };\n\n _this.state = {\n barOffset: {\n top: 0,\n left: 0\n },\n handlePressed: false\n };\n _this.handleRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.barRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n return _this;\n }\n\n var _proto = Scrollbar.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.initBarOffset();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.releaseMouseMoves();\n };\n\n _proto.onWheelScroll = function onWheelScroll(delta) {\n var _this$props3 = this.props,\n length = _this$props3.length,\n scrollLength = _this$props3.scrollLength;\n var nextDelta = delta / (scrollLength / length);\n this.updateScrollBarPosition(nextDelta);\n };\n\n _proto.getMouseMoveTracker = function getMouseMoveTracker() {\n return this.mouseMoveTracker || new dom_lib__WEBPACK_IMPORTED_MODULE_6__[\"DOMMouseMoveTracker\"](this.handleDragMove, this.handleDragEnd, document.body);\n };\n\n _proto.initBarOffset = function initBarOffset() {\n var _this2 = this;\n\n setTimeout(function () {\n _this2.barRef.current && _this2.setState({\n barOffset: Object(dom_lib__WEBPACK_IMPORTED_MODULE_6__[\"getOffset\"])(_this2.barRef.current)\n });\n }, 1);\n };\n\n _proto.handleScroll = function handleScroll(delta, event) {\n var _this$props$onScroll, _this$props5;\n\n var _this$props4 = this.props,\n length = _this$props4.length,\n scrollLength = _this$props4.scrollLength;\n var scrollDelta = delta * (scrollLength / length);\n this.updateScrollBarPosition(delta);\n (_this$props$onScroll = (_this$props5 = this.props).onScroll) === null || _this$props$onScroll === void 0 ? void 0 : _this$props$onScroll.call(_this$props5, scrollDelta, event);\n };\n\n _proto.resetScrollBarPosition = function resetScrollBarPosition(forceDelta) {\n if (forceDelta === void 0) {\n forceDelta = 0;\n }\n\n this.scrollOffset = 0;\n this.updateScrollBarPosition(0, forceDelta);\n };\n\n _proto.updateScrollBarPosition = function updateScrollBarPosition(delta, forceDelta) {\n var _this$props6 = this.props,\n vertical = _this$props6.vertical,\n length = _this$props6.length,\n scrollLength = _this$props6.scrollLength;\n var translateDOMPositionXY = this.context.translateDOMPositionXY;\n var max = scrollLength && length ? length - Math.max(length / scrollLength * length, _constants__WEBPACK_IMPORTED_MODULE_7__[\"SCROLLBAR_MIN_WIDTH\"] + 2) : 0;\n var styles = {};\n\n if (typeof forceDelta === 'undefined') {\n this.scrollOffset += delta;\n this.scrollOffset = Math.max(this.scrollOffset, 0);\n this.scrollOffset = Math.min(this.scrollOffset, max);\n } else {\n this.scrollOffset = forceDelta || 0;\n }\n\n if (vertical) {\n translateDOMPositionXY === null || translateDOMPositionXY === void 0 ? void 0 : translateDOMPositionXY(styles, 0, this.scrollOffset);\n } else {\n translateDOMPositionXY === null || translateDOMPositionXY === void 0 ? void 0 : translateDOMPositionXY(styles, this.scrollOffset, 0);\n }\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_6__[\"addStyle\"])(this.handleRef.current, styles);\n };\n\n _proto.releaseMouseMoves = function releaseMouseMoves() {\n var _this$mouseMoveTracke2, _this$mouseMoveTracke3;\n\n (_this$mouseMoveTracke2 = this.mouseMoveTracker) === null || _this$mouseMoveTracke2 === void 0 ? void 0 : (_this$mouseMoveTracke3 = _this$mouseMoveTracke2.releaseMouseMoves) === null || _this$mouseMoveTracke3 === void 0 ? void 0 : _this$mouseMoveTracke3.call(_this$mouseMoveTracke2);\n this.mouseMoveTracker = null;\n };\n\n _proto.render = function render() {\n var _classNames, _styles;\n\n var _this$props7 = this.props,\n vertical = _this$props7.vertical,\n length = _this$props7.length,\n scrollLength = _this$props7.scrollLength,\n classPrefix = _this$props7.classPrefix,\n className = _this$props7.className,\n tableId = _this$props7.tableId,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props7, [\"vertical\", \"length\", \"scrollLength\", \"classPrefix\", \"className\", \"tableId\"]);\n\n var handlePressed = this.state.handlePressed;\n var addPrefix = Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"prefix\"])(classPrefix);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[addPrefix('vertical')] = vertical, _classNames[addPrefix('horizontal')] = !vertical, _classNames[addPrefix('hide')] = scrollLength <= length, _classNames[addPrefix('pressed')] = handlePressed, _classNames));\n var width = length / scrollLength * 100;\n var styles = (_styles = {}, _styles[vertical ? 'height' : 'width'] = width + \"%\", _styles[vertical ? 'minHeight' : 'minWidth'] = _constants__WEBPACK_IMPORTED_MODULE_7__[\"SCROLLBAR_MIN_WIDTH\"], _styles);\n var unhandled = Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"getUnhandledProps\"])(propTypes, rest);\n var valuenow = this.scrollOffset / length * 100 + width;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: \"scrollbar\",\n \"aria-controls\": tableId,\n \"aria-valuemax\": \"100\",\n \"aria-valuemin\": \"0\",\n \"aria-valuenow\": valuenow,\n \"aria-orientation\": vertical ? 'vertical' : 'horizontal'\n }, unhandled, {\n ref: this.barRef,\n className: classes,\n onClick: this.handleClick\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.handleRef,\n className: addPrefix('handle'),\n style: styles,\n onMouseDown: this.handleMouseDown,\n role: \"button\",\n tabIndex: -1\n }));\n };\n\n return Scrollbar;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"PureComponent\"]);\n\nScrollbar.contextType = _TableContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"];\nScrollbar.propTypes = propTypes;\nScrollbar.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"defaultClassPrefix\"])('table-scrollbar'),\n scrollLength: 1,\n length: 1\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Scrollbar);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/Scrollbar.js?");
|
|
5745
5162
|
|
|
5746
5163
|
/***/ }),
|
|
5747
5164
|
|
|
@@ -5753,7 +5170,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab
|
|
|
5753
5170
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5754
5171
|
|
|
5755
5172
|
"use strict";
|
|
5756
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/isFunction */ \"./node_modules/rsuite-table/node_modules/lodash/isFunction.js\");\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/flatten */ \"./node_modules/rsuite-table/node_modules/lodash/flatten.js\");\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_flatten__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash/debounce */ \"./node_modules/rsuite-table/node_modules/lodash/debounce.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/isEqual */ \"./node_modules/rsuite-table/node_modules/lodash/isEqual.js\");\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash_eq__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash/eq */ \"./node_modules/rsuite-table/node_modules/lodash/eq.js\");\n/* harmony import */ var lodash_eq__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_eq__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash/omit */ \"./node_modules/rsuite-table/node_modules/lodash/omit.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/rsuite-table/node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var element_resize_event__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! element-resize-event */ \"./node_modules/element-resize-event/index.js\");\n/* harmony import */ var element_resize_event__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(element_resize_event__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! dom-lib/lib/transition/translateDOMPositionXY */ \"./node_modules/dom-lib/lib/transition/translateDOMPositionXY.js\");\n/* harmony import */ var dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var dom_lib__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n/* harmony import */ var _Row__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Row */ \"./node_modules/rsuite-table/es/Row.js\");\n/* harmony import */ var _CellGroup__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./CellGroup */ \"./node_modules/rsuite-table/es/CellGroup.js\");\n/* harmony import */ var _Scrollbar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Scrollbar */ \"./node_modules/rsuite-table/es/Scrollbar.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _ColumnGroup__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./ColumnGroup */ \"./node_modules/rsuite-table/es/ColumnGroup.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SORT_TYPE = {\n DESC: 'desc',\n ASC: 'asc'\n};\n\nvar Table = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Table, _React$Component);\n\n Table.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n if (props.data !== state.cacheData || props.isTree !== state.isTree) {\n return {\n cacheData: props.data,\n isTree: props.isTree,\n data: props.isTree ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"flattenData\"])(props.data) : props.data\n };\n }\n\n return null;\n };\n\n function Table(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.translateDOMPositionXY = null;\n _this.scrollListener = null;\n _this.tableRef = void 0;\n _this.scrollbarYRef = void 0;\n _this.scrollbarXRef = void 0;\n _this.tableBodyRef = void 0;\n _this.affixHeaderWrapperRef = void 0;\n _this.mouseAreaRef = void 0;\n _this.headerWrapperRef = void 0;\n _this.tableHeaderRef = void 0;\n _this.wheelWrapperRef = void 0;\n _this.tableRows = {};\n _this.mounted = false;\n _this.disableEventsTimeoutId = null;\n _this.scrollY = 0;\n _this.scrollX = 0;\n _this.wheelHandler = void 0;\n _this.minScrollY = void 0;\n _this.minScrollX = void 0;\n _this.mouseArea = void 0;\n _this.touchX = void 0;\n _this.touchY = void 0;\n _this.wheelListener = void 0;\n _this.touchStartListener = void 0;\n _this.touchMoveListener = void 0;\n _this._cacheCells = null;\n _this._cacheChildrenSize = 0;\n _this._visibleRows = [];\n\n _this.listenWheel = function (deltaX, deltaY) {\n var _this$scrollbarXRef$c, _this$scrollbarXRef$c2, _this$scrollbarYRef$c, _this$scrollbarYRef$c2;\n\n _this.handleWheel(deltaX, deltaY);\n\n (_this$scrollbarXRef$c = _this.scrollbarXRef.current) === null || _this$scrollbarXRef$c === void 0 ? void 0 : (_this$scrollbarXRef$c2 = _this$scrollbarXRef$c.onWheelScroll) === null || _this$scrollbarXRef$c2 === void 0 ? void 0 : _this$scrollbarXRef$c2.call(_this$scrollbarXRef$c, deltaX);\n (_this$scrollbarYRef$c = _this.scrollbarYRef.current) === null || _this$scrollbarYRef$c === void 0 ? void 0 : (_this$scrollbarYRef$c2 = _this$scrollbarYRef$c.onWheelScroll) === null || _this$scrollbarYRef$c2 === void 0 ? void 0 : _this$scrollbarYRef$c2.call(_this$scrollbarYRef$c, deltaY);\n };\n\n _this.setOffsetByAffix = function () {\n var _this$headerWrapperRe, _this$tableRef;\n\n var _this$props = _this.props,\n affixHeader = _this$props.affixHeader,\n affixHorizontalScrollbar = _this$props.affixHorizontalScrollbar;\n var headerNode = (_this$headerWrapperRe = _this.headerWrapperRef) === null || _this$headerWrapperRe === void 0 ? void 0 : _this$headerWrapperRe.current;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader) && headerNode) {\n _this.setState(function () {\n return {\n headerOffset: Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getOffset\"])(headerNode)\n };\n });\n }\n\n var tableNode = (_this$tableRef = _this.tableRef) === null || _this$tableRef === void 0 ? void 0 : _this$tableRef.current;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar) && tableNode) {\n _this.setState(function () {\n return {\n tableOffset: Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getOffset\"])(tableNode)\n };\n });\n }\n };\n\n _this.handleWindowScroll = function () {\n var _this$props2 = _this.props,\n affixHeader = _this$props2.affixHeader,\n affixHorizontalScrollbar = _this$props2.affixHorizontalScrollbar;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader)) {\n _this.affixTableHeader();\n }\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar)) {\n _this.affixHorizontalScrollbar();\n }\n };\n\n _this.affixHorizontalScrollbar = function () {\n var _this$scrollbarXRef, _this$scrollbarXRef$c3, _this$scrollbarXRef$c4;\n\n var scrollY = window.scrollY || window.pageYOffset;\n var windowHeight = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(window);\n\n var height = _this.getTableHeight();\n\n var _this$state = _this.state,\n tableOffset = _this$state.tableOffset,\n fixedHorizontalScrollbar = _this$state.fixedHorizontalScrollbar;\n var affixHorizontalScrollbar = _this.props.affixHorizontalScrollbar;\n\n var headerHeight = _this.getTableHeaderHeight();\n\n var bottom = typeof affixHorizontalScrollbar === 'number' ? affixHorizontalScrollbar : 0;\n var fixedScrollbar = scrollY + windowHeight < height + (tableOffset.top + bottom) && scrollY + windowHeight - headerHeight > tableOffset.top + bottom;\n\n if ((_this$scrollbarXRef = _this.scrollbarXRef) !== null && _this$scrollbarXRef !== void 0 && (_this$scrollbarXRef$c3 = _this$scrollbarXRef.current) !== null && _this$scrollbarXRef$c3 !== void 0 && (_this$scrollbarXRef$c4 = _this$scrollbarXRef$c3.barRef) !== null && _this$scrollbarXRef$c4 !== void 0 && _this$scrollbarXRef$c4.current && fixedHorizontalScrollbar !== fixedScrollbar) {\n _this.setState({\n fixedHorizontalScrollbar: fixedScrollbar\n });\n }\n };\n\n _this.affixTableHeader = function () {\n var affixHeader = _this.props.affixHeader;\n var top = typeof affixHeader === 'number' ? affixHeader : 0;\n var _this$state2 = _this.state,\n headerOffset = _this$state2.headerOffset,\n contentHeight = _this$state2.contentHeight;\n var scrollY = window.scrollY || window.pageYOffset;\n var fixedHeader = scrollY - (headerOffset.top - top) >= 0 && scrollY < headerOffset.top - top + contentHeight;\n\n if (_this.affixHeaderWrapperRef.current) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(_this.affixHeaderWrapperRef.current, 'fixed', fixedHeader);\n }\n };\n\n _this.handleSortColumn = function (dataKey) {\n var _this$props$onSortCol, _this$props3;\n\n var sortType = _this.getSortType();\n\n if (_this.props.sortColumn === dataKey) {\n sortType = sortType === SORT_TYPE.ASC ? SORT_TYPE.DESC : SORT_TYPE.ASC;\n\n _this.setState({\n sortType: sortType\n });\n }\n\n (_this$props$onSortCol = (_this$props3 = _this.props).onSortColumn) === null || _this$props$onSortCol === void 0 ? void 0 : _this$props$onSortCol.call(_this$props3, dataKey, sortType);\n };\n\n _this.handleColumnResizeEnd = function (columnWidth, _cursorDelta, dataKey, index) {\n var _this$setState;\n\n _this._cacheCells = null;\n\n _this.setState((_this$setState = {\n isColumnResizing: false\n }, _this$setState[dataKey + \"_\" + index + \"_width\"] = columnWidth, _this$setState));\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(_this.mouseAreaRef.current, {\n display: 'none'\n });\n };\n\n _this.handleColumnResizeStart = function (width, left, fixed) {\n _this.setState({\n isColumnResizing: true\n });\n\n _this.handleColumnResizeMove(width, left, fixed);\n };\n\n _this.handleColumnResizeMove = function (width, left, fixed) {\n var _addStyle;\n\n var mouseAreaLeft = width + left;\n var x = mouseAreaLeft;\n var dir = 'left';\n\n if (_this.isRTL()) {\n mouseAreaLeft += _this.minScrollX + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n dir = 'right';\n }\n\n if (!fixed) {\n x = mouseAreaLeft + (_this.isRTL() ? -_this.scrollX : _this.scrollX);\n }\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(_this.mouseAreaRef.current, (_addStyle = {\n display: 'block'\n }, _addStyle[dir] = x + \"px\", _addStyle));\n };\n\n _this.handleTreeToggle = function (rowKey, _rowIndex, rowData) {\n var _this$props$onExpandC, _this$props4;\n\n var expandedRowKeys = _this.getExpandedRowKeys();\n\n var open = false;\n var nextExpandedRowKeys = [];\n\n for (var i = 0; i < expandedRowKeys.length; i++) {\n var _key = expandedRowKeys[i];\n\n if (_key === rowKey) {\n open = true;\n } else {\n nextExpandedRowKeys.push(_key);\n }\n }\n\n if (!open) {\n nextExpandedRowKeys.push(rowKey);\n }\n\n _this.setState({\n expandedRowKeys: nextExpandedRowKeys\n });\n\n (_this$props$onExpandC = (_this$props4 = _this.props).onExpandChange) === null || _this$props$onExpandC === void 0 ? void 0 : _this$props$onExpandC.call(_this$props4, !open, rowData);\n };\n\n _this.handleScrollX = function (delta) {\n _this.handleWheel(delta, 0);\n };\n\n _this.handleScrollY = function (delta) {\n _this.handleWheel(0, delta);\n };\n\n _this.handleWheel = function (deltaX, deltaY) {\n var _this$props5 = _this.props,\n onScroll = _this$props5.onScroll,\n virtualized = _this$props5.virtualized;\n var _this$state3 = _this.state,\n contentWidth = _this$state3.contentWidth,\n width = _this$state3.width;\n\n if (!_this.tableRef.current) {\n return;\n }\n\n var nextScrollX = contentWidth <= width ? 0 : _this.scrollX - deltaX;\n var nextScrollY = _this.scrollY - deltaY;\n _this.scrollY = Math.min(0, nextScrollY < _this.minScrollY ? _this.minScrollY : nextScrollY);\n _this.scrollX = Math.min(0, nextScrollX < _this.minScrollX ? _this.minScrollX : nextScrollX);\n\n _this.updatePosition();\n\n onScroll === null || onScroll === void 0 ? void 0 : onScroll(_this.scrollX, _this.scrollY);\n\n if (virtualized) {\n _this.setState({\n isScrolling: true,\n scrollY: _this.scrollY\n });\n\n if (_this.disableEventsTimeoutId) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"cancelAnimationTimeout\"])(_this.disableEventsTimeoutId);\n }\n\n _this.disableEventsTimeoutId = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"requestAnimationTimeout\"])(_this.debounceScrollEndedCallback, 150);\n }\n };\n\n _this.debounceScrollEndedCallback = function () {\n _this.disableEventsTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n });\n };\n\n _this.handleTouchStart = function (event) {\n var _this$props$onTouchSt, _this$props6;\n\n if (event.touches) {\n var _event$touches$ = event.touches[0],\n pageX = _event$touches$.pageX,\n pageY = _event$touches$.pageY;\n _this.touchX = pageX;\n _this.touchY = pageY;\n }\n\n (_this$props$onTouchSt = (_this$props6 = _this.props).onTouchStart) === null || _this$props$onTouchSt === void 0 ? void 0 : _this$props$onTouchSt.call(_this$props6, event);\n };\n\n _this.handleTouchMove = function (event) {\n var _this$props$onTouchMo, _this$props7;\n\n var autoHeight = _this.props.autoHeight;\n\n if (event.touches) {\n var _event$preventDefault, _this$scrollbarXRef$c5, _this$scrollbarXRef$c6, _this$scrollbarYRef$c3, _this$scrollbarYRef$c4;\n\n var _event$touches$2 = event.touches[0],\n pageX = _event$touches$2.pageX,\n pageY = _event$touches$2.pageY;\n var deltaX = _this.touchX - pageX;\n var deltaY = autoHeight ? 0 : _this.touchY - pageY;\n\n if (!_this.shouldHandleWheelY(deltaY) && !_this.shouldHandleWheelX(deltaX)) {\n return;\n }\n\n (_event$preventDefault = event.preventDefault) === null || _event$preventDefault === void 0 ? void 0 : _event$preventDefault.call(event);\n\n _this.handleWheel(deltaX, deltaY);\n\n (_this$scrollbarXRef$c5 = _this.scrollbarXRef.current) === null || _this$scrollbarXRef$c5 === void 0 ? void 0 : (_this$scrollbarXRef$c6 = _this$scrollbarXRef$c5.onWheelScroll) === null || _this$scrollbarXRef$c6 === void 0 ? void 0 : _this$scrollbarXRef$c6.call(_this$scrollbarXRef$c5, deltaX);\n (_this$scrollbarYRef$c3 = _this.scrollbarYRef.current) === null || _this$scrollbarYRef$c3 === void 0 ? void 0 : (_this$scrollbarYRef$c4 = _this$scrollbarYRef$c3.onWheelScroll) === null || _this$scrollbarYRef$c4 === void 0 ? void 0 : _this$scrollbarYRef$c4.call(_this$scrollbarYRef$c3, deltaY);\n _this.touchX = pageX;\n _this.touchY = pageY;\n }\n\n (_this$props$onTouchMo = (_this$props7 = _this.props).onTouchMove) === null || _this$props$onTouchMo === void 0 ? void 0 : _this$props$onTouchMo.call(_this$props7, event);\n };\n\n _this.handleBodyScroll = function (event) {\n if (event.target !== _this.tableBodyRef.current) {\n return;\n }\n\n var left = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollLeft\"])(event.target);\n var top = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollTop\"])(event.target);\n\n if (top === 0 && left === 0) {\n return;\n }\n\n _this.listenWheel(left, top);\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollLeft\"])(event.target, 0);\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollTop\"])(event.target, 0);\n };\n\n _this.shouldHandleWheelX = function (delta) {\n var _this$props8 = _this.props,\n disabledScroll = _this$props8.disabledScroll,\n loading = _this$props8.loading;\n\n if (delta === 0 || disabledScroll || loading) {\n return false;\n }\n\n return true;\n };\n\n _this.shouldHandleWheelY = function (delta) {\n var _this$props9 = _this.props,\n disabledScroll = _this$props9.disabledScroll,\n loading = _this$props9.loading;\n\n if (delta === 0 || disabledScroll || loading) {\n return false;\n }\n\n return delta >= 0 && _this.scrollY > _this.minScrollY || delta < 0 && _this.scrollY < 0;\n };\n\n _this.addPrefix = function (name) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"prefix\"])(_this.props.classPrefix)(name);\n };\n\n _this.calculateTableWidth = function () {\n var _this$tableRef2;\n\n var table = (_this$tableRef2 = _this.tableRef) === null || _this$tableRef2 === void 0 ? void 0 : _this$tableRef2.current;\n var width = _this.state.width;\n\n if (table) {\n var nextWidth = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getWidth\"])(table);\n\n if (width !== nextWidth) {\n var _this$scrollbarXRef2, _this$scrollbarXRef2$;\n\n _this.scrollX = 0;\n (_this$scrollbarXRef2 = _this.scrollbarXRef) === null || _this$scrollbarXRef2 === void 0 ? void 0 : (_this$scrollbarXRef2$ = _this$scrollbarXRef2.current) === null || _this$scrollbarXRef2$ === void 0 ? void 0 : _this$scrollbarXRef2$.resetScrollBarPosition();\n }\n\n _this._cacheCells = null;\n\n _this.setState({\n width: nextWidth\n });\n }\n\n _this.setOffsetByAffix();\n };\n\n _this.scrollTop = function (top) {\n var _this$scrollbarYRef, _this$scrollbarYRef$c5, _this$scrollbarYRef$c6;\n\n if (top === void 0) {\n top = 0;\n }\n\n var _this$getControlledSc = _this.getControlledScrollTopValue(top),\n scrollY = _this$getControlledSc[0],\n handleScrollY = _this$getControlledSc[1];\n\n _this.scrollY = scrollY;\n (_this$scrollbarYRef = _this.scrollbarYRef) === null || _this$scrollbarYRef === void 0 ? void 0 : (_this$scrollbarYRef$c5 = _this$scrollbarYRef.current) === null || _this$scrollbarYRef$c5 === void 0 ? void 0 : (_this$scrollbarYRef$c6 = _this$scrollbarYRef$c5.resetScrollBarPosition) === null || _this$scrollbarYRef$c6 === void 0 ? void 0 : _this$scrollbarYRef$c6.call(_this$scrollbarYRef$c5, handleScrollY);\n\n _this.updatePosition();\n /**\n * 当开启 virtualized,调用 scrollTop 后会出现白屏现象,\n * 原因是直接操作 DOM 的坐标,但是组件没有重新渲染,需要调用 forceUpdate 重新进入 render。\n * Fix: rsuite#1044\n */\n\n\n if (_this.props.virtualized && _this.state.contentHeight > _this.props.height) {\n _this.forceUpdate();\n }\n };\n\n _this.scrollLeft = function (left) {\n var _this$scrollbarXRef3, _this$scrollbarXRef3$, _this$scrollbarXRef3$2;\n\n if (left === void 0) {\n left = 0;\n }\n\n var _this$getControlledSc2 = _this.getControlledScrollLeftValue(left),\n scrollX = _this$getControlledSc2[0],\n handleScrollX = _this$getControlledSc2[1];\n\n _this.scrollX = scrollX;\n (_this$scrollbarXRef3 = _this.scrollbarXRef) === null || _this$scrollbarXRef3 === void 0 ? void 0 : (_this$scrollbarXRef3$ = _this$scrollbarXRef3.current) === null || _this$scrollbarXRef3$ === void 0 ? void 0 : (_this$scrollbarXRef3$2 = _this$scrollbarXRef3$.resetScrollBarPosition) === null || _this$scrollbarXRef3$2 === void 0 ? void 0 : _this$scrollbarXRef3$2.call(_this$scrollbarXRef3$, handleScrollX);\n\n _this.updatePosition();\n };\n\n _this.scrollTo = function (coord) {\n var _ref = coord || {},\n x = _ref.x,\n y = _ref.y;\n\n if (typeof x === 'number') {\n _this.scrollLeft(x);\n }\n\n if (typeof y === 'number') {\n _this.scrollTop(y);\n }\n };\n\n _this.bindTableRowsRef = function (index, rowData) {\n return function (ref) {\n if (ref) {\n _this.tableRows[index] = [ref, rowData];\n }\n };\n };\n\n _this.bindRowClick = function (rowData) {\n return function (event) {\n var _this$props$onRowClic, _this$props10;\n\n (_this$props$onRowClic = (_this$props10 = _this.props).onRowClick) === null || _this$props$onRowClic === void 0 ? void 0 : _this$props$onRowClic.call(_this$props10, rowData, event);\n };\n };\n\n _this.bindRowContextMenu = function (rowData) {\n return function (event) {\n var _this$props$onRowCont, _this$props11;\n\n (_this$props$onRowCont = (_this$props11 = _this.props).onRowContextMenu) === null || _this$props$onRowCont === void 0 ? void 0 : _this$props$onRowCont.call(_this$props11, rowData, event);\n };\n };\n\n var _width = props.width,\n data = props.data,\n _rowKey = props.rowKey,\n defaultExpandAllRows = props.defaultExpandAllRows,\n renderRowExpanded = props.renderRowExpanded,\n defaultExpandedRowKeys = props.defaultExpandedRowKeys,\n _props$children = props.children,\n children = _props$children === void 0 ? [] : _props$children,\n isTree = props.isTree,\n defaultSortType = props.defaultSortType;\n\n var _expandedRowKeys = defaultExpandAllRows ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"findRowKeys\"])(data, _rowKey, lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(renderRowExpanded)) : defaultExpandedRowKeys || [];\n\n var shouldFixedColumn = Array.from(lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children)).some(function (child) {\n return child && child.props && child.props.fixed;\n });\n\n if (isTree && !_rowKey) {\n throw new Error('The `rowKey` is required when set isTree');\n }\n\n _this.state = {\n isTree: isTree,\n expandedRowKeys: _expandedRowKeys,\n shouldFixedColumn: shouldFixedColumn,\n cacheData: data,\n data: isTree ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"flattenData\"])(data) : data,\n width: _width || 0,\n columnWidth: 0,\n dataKey: 0,\n contentHeight: 0,\n contentWidth: 0,\n tableRowsMaxHeight: [],\n sortType: defaultSortType,\n scrollY: 0,\n isScrolling: false,\n fixedHeader: false\n };\n _this.scrollY = 0;\n _this.scrollX = 0;\n _this.wheelHandler = new dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"WheelHandler\"](_this.listenWheel, _this.shouldHandleWheelX, _this.shouldHandleWheelY, false);\n _this._cacheChildrenSize = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children).length;\n _this.translateDOMPositionXY = Object(dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__[\"getTranslateDOMPositionXY\"])({\n enable3DTransform: props.translate3d\n });\n _this.tableRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarYRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarXRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableBodyRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.affixHeaderWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.mouseAreaRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.headerWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.wheelWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableHeaderRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n return _this;\n }\n\n var _proto = Table.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props13, _this$props13$bodyRef;\n\n this.calculateTableWidth();\n this.calculateTableContextHeight();\n this.calculateRowMaxHeight();\n this.setOffsetByAffix();\n this.initPosition();\n element_resize_event__WEBPACK_IMPORTED_MODULE_13___default()(this.tableRef.current, lodash_debounce__WEBPACK_IMPORTED_MODULE_8___default()(this.calculateTableWidth, 400));\n var options = {\n passive: false\n };\n var tableBody = this.tableBodyRef.current;\n\n if (tableBody) {\n this.wheelListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'wheel', this.wheelHandler.onWheel, options);\n this.touchStartListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'touchstart', this.handleTouchStart, options);\n this.touchMoveListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'touchmove', this.handleTouchMove, options);\n }\n\n var _this$props12 = this.props,\n affixHeader = _this$props12.affixHeader,\n affixHorizontalScrollbar = _this$props12.affixHorizontalScrollbar;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader) || Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar)) {\n this.scrollListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(window, 'scroll', this.handleWindowScroll);\n }\n\n (_this$props13 = this.props) === null || _this$props13 === void 0 ? void 0 : (_this$props13$bodyRef = _this$props13.bodyRef) === null || _this$props13$bodyRef === void 0 ? void 0 : _this$props13$bodyRef.call(_this$props13, this.wheelWrapperRef.current);\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {\n var _cacheChildrenSize = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(nextProps.children || []).length;\n /**\n * 单元格列的信息在初始化后会被缓存,在某些属性被更新以后,需要清除缓存。\n */\n\n if (_cacheChildrenSize !== this._cacheChildrenSize) {\n this._cacheChildrenSize = _cacheChildrenSize;\n this._cacheCells = null;\n } else if (this.props.children !== nextProps.children || this.props.sortColumn !== nextProps.sortColumn || this.props.sortType !== nextProps.sortType) {\n this._cacheCells = null;\n }\n\n return !lodash_eq__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps) || !lodash_isEqual__WEBPACK_IMPORTED_MODULE_9___default()(this.state, nextState);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n var rowHeight = prevProps.rowHeight,\n data = prevProps.data,\n height = prevProps.height;\n\n if (data !== this.props.data) {\n var _this$props$onDataUpd, _this$props14;\n\n this.calculateRowMaxHeight();\n (_this$props$onDataUpd = (_this$props14 = this.props).onDataUpdated) === null || _this$props$onDataUpd === void 0 ? void 0 : _this$props$onDataUpd.call(_this$props14, this.props.data, this.scrollTo);\n var maxHeight = this.props.data.length * (typeof rowHeight === 'function' ? rowHeight(null) : rowHeight); // 当开启允许更新滚动条,或者滚动条位置大于表格的最大高度,则初始滚动条位置\n\n if (this.props.shouldUpdateScroll || Math.abs(this.scrollY) > maxHeight) {\n this.scrollTo({\n x: 0,\n y: 0\n });\n }\n } else {\n this.updatePosition();\n }\n\n if ( // 当 Table 的 data 发生变化,需要重新计算高度\n data !== this.props.data || // 当 Table 的 height 属性发生变化,需要重新计算 Table 高度\n height !== this.props.height || // 当 Table 内容区的高度发生变化需要重新计算\n prevState.contentHeight !== this.state.contentHeight || // 当 expandedRowKeys 发生变化,需要重新计算 Table 高度,如果重算会导致滚动条不显示。\n prevState.expandedRowKeys !== this.state.expandedRowKeys || prevProps.expandedRowKeys !== this.props.expandedRowKeys) {\n this.calculateTableContextHeight(prevProps);\n }\n\n this.calculateTableContentWidth(prevProps);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var _this$wheelListener, _this$touchStartListe, _this$touchMoveListen, _this$scrollListener;\n\n this.wheelHandler = null;\n\n if (this.tableRef.current) {\n Object(element_resize_event__WEBPACK_IMPORTED_MODULE_13__[\"unbind\"])(this.tableRef.current);\n }\n\n (_this$wheelListener = this.wheelListener) === null || _this$wheelListener === void 0 ? void 0 : _this$wheelListener.off();\n (_this$touchStartListe = this.touchStartListener) === null || _this$touchStartListe === void 0 ? void 0 : _this$touchStartListe.off();\n (_this$touchMoveListen = this.touchMoveListener) === null || _this$touchMoveListen === void 0 ? void 0 : _this$touchMoveListen.off();\n (_this$scrollListener = this.scrollListener) === null || _this$scrollListener === void 0 ? void 0 : _this$scrollListener.off();\n };\n\n _proto.getExpandedRowKeys = function getExpandedRowKeys() {\n var expandedRowKeys = this.props.expandedRowKeys;\n return typeof expandedRowKeys === 'undefined' ? this.state.expandedRowKeys : expandedRowKeys;\n };\n\n _proto.getSortType = function getSortType() {\n var sortType = this.props.sortType;\n return typeof sortType === 'undefined' ? this.state.sortType : sortType;\n };\n\n _proto.getScrollCellGroups = function getScrollCellGroups() {\n var _this$tableRef$curren;\n\n return (_this$tableRef$curren = this.tableRef.current) === null || _this$tableRef$curren === void 0 ? void 0 : _this$tableRef$curren.querySelectorAll(\".\" + this.addPrefix('cell-group-scroll'));\n };\n\n _proto.getFixedLeftCellGroups = function getFixedLeftCellGroups() {\n var _this$tableRef$curren2;\n\n return (_this$tableRef$curren2 = this.tableRef.current) === null || _this$tableRef$curren2 === void 0 ? void 0 : _this$tableRef$curren2.querySelectorAll(\".\" + this.addPrefix('cell-group-fixed-left'));\n };\n\n _proto.getFixedRightCellGroups = function getFixedRightCellGroups() {\n var _this$tableRef$curren3;\n\n return (_this$tableRef$curren3 = this.tableRef.current) === null || _this$tableRef$curren3 === void 0 ? void 0 : _this$tableRef$curren3.querySelectorAll(\".\" + this.addPrefix('cell-group-fixed-right'));\n };\n\n _proto.isRTL = function isRTL() {\n return this.props.rtl || Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isRTL\"])();\n };\n\n _proto.getRowHeight = function getRowHeight(rowData) {\n if (rowData === void 0) {\n rowData = {};\n }\n\n var rowHeight = this.props.rowHeight;\n return typeof rowHeight === 'function' ? rowHeight(rowData) : rowHeight;\n }\n /**\n * 获取表头高度\n */\n ;\n\n _proto.getTableHeaderHeight = function getTableHeaderHeight() {\n var _this$props15 = this.props,\n headerHeight = _this$props15.headerHeight,\n showHeader = _this$props15.showHeader;\n return showHeader ? headerHeight : 0;\n }\n /**\n * 获取 Table 需要渲染的高度\n */\n ;\n\n _proto.getTableHeight = function getTableHeight() {\n var contentHeight = this.state.contentHeight;\n var _this$props16 = this.props,\n minHeight = _this$props16.minHeight,\n height = _this$props16.height,\n autoHeight = _this$props16.autoHeight,\n data = _this$props16.data;\n var headerHeight = this.getTableHeaderHeight();\n\n if (data.length === 0 && autoHeight) {\n return height;\n }\n\n return autoHeight ? Math.max(headerHeight + contentHeight, minHeight) : height;\n }\n /**\n * 获取 columns ReactElement 数组\n * - 处理 children 中存在 <Column> 数组的情况\n * - 过滤 children 中的空项\n */\n ;\n\n _proto.getTableColumns = function getTableColumns() {\n var children = this.props.children;\n\n if (!Array.isArray(children)) {\n return children;\n }\n\n var flattenColumns = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children).map(function (column) {\n if ((column === null || column === void 0 ? void 0 : column.type) === _ColumnGroup__WEBPACK_IMPORTED_MODULE_22__[\"default\"]) {\n var _column$props = column === null || column === void 0 ? void 0 : column.props,\n header = _column$props.header,\n childColumns = _column$props.children,\n align = _column$props.align,\n fixed = _column$props.fixed,\n verticalAlign = _column$props.verticalAlign;\n\n return childColumns.map(function (childColumn, index) {\n // 把 ColumnGroup 设置的属性覆盖到 Column\n var groupCellProps = {\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 /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](childColumn, groupCellProps);\n });\n }\n\n return column;\n }); // 把 Columns 中的数组,展平为一维数组,计算 lastColumn 与 firstColumn。\n\n return lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(flattenColumns).filter(function (col) {\n return col;\n });\n };\n\n _proto.getCellDescriptor = function getCellDescriptor() {\n var _this2 = this;\n\n if (this._cacheCells) {\n return this._cacheCells;\n }\n\n var hasCustomTreeCol = false;\n var left = 0; // Cell left margin\n\n var headerCells = []; // Table header cell\n\n var bodyCells = []; // Table body cell\n\n var children = this.props.children;\n\n if (!children) {\n this._cacheCells = {\n headerCells: headerCells,\n bodyCells: bodyCells,\n hasCustomTreeCol: hasCustomTreeCol,\n allColumnsWidth: left\n };\n return this._cacheCells;\n }\n\n var columns = this.getTableColumns();\n var tableWidth = this.state.width;\n var _this$props17 = this.props,\n sortColumn = _this$props17.sortColumn,\n rowHeight = _this$props17.rowHeight,\n showHeader = _this$props17.showHeader;\n\n var _getTotalByColumns = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"getTotalByColumns\"])(columns),\n totalFlexGrow = _getTotalByColumns.totalFlexGrow,\n totalWidth = _getTotalByColumns.totalWidth;\n\n var headerHeight = this.getTableHeaderHeight();\n react__WEBPACK_IMPORTED_MODULE_3__[\"Children\"].forEach(columns, function (column, index) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"isValidElement\"](column)) {\n var columnChildren = column.props.children;\n var _column$props2 = column.props,\n width = _column$props2.width,\n resizable = _column$props2.resizable,\n flexGrow = _column$props2.flexGrow,\n minWidth = _column$props2.minWidth,\n onResize = _column$props2.onResize,\n treeCol = _column$props2.treeCol;\n\n if (treeCol) {\n hasCustomTreeCol = true;\n }\n\n if (resizable && flexGrow) {\n console.warn(\"Cannot set 'resizable' and 'flexGrow' together in <Column>, column index: \" + index);\n }\n\n if (columnChildren.length !== 2) {\n throw new Error(\"Component <HeaderCell> and <Cell> is required, column index: \" + index + \" \");\n }\n\n var nextWidth = _this2.state[columnChildren[1].props.dataKey + \"_\" + index + \"_width\"] || width || 0;\n\n if (tableWidth && flexGrow && totalFlexGrow) {\n nextWidth = Math.max((tableWidth - totalWidth) / totalFlexGrow * flexGrow, minWidth || 60);\n }\n\n var cellProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, lodash_omit__WEBPACK_IMPORTED_MODULE_11___default()(column.props, ['children']), {\n 'aria-colindex': index + 1,\n left: left,\n headerHeight: headerHeight,\n key: index,\n width: nextWidth,\n height: rowHeight,\n firstColumn: index === 0,\n lastColumn: index === columns.length - 1\n });\n\n if (showHeader && headerHeight) {\n var headerCellProps = {\n // index 用于拖拽列宽时候(Resizable column),定义的序号\n index: index,\n dataKey: columnChildren[1].props.dataKey,\n isHeaderCell: true,\n sortable: column.props.sortable,\n onSortColumn: _this2.handleSortColumn,\n sortType: _this2.getSortType(),\n sortColumn: sortColumn,\n flexGrow: flexGrow\n };\n\n if (resizable) {\n lodash_merge__WEBPACK_IMPORTED_MODULE_12___default()(headerCellProps, {\n onResize: onResize,\n onColumnResizeEnd: _this2.handleColumnResizeEnd,\n onColumnResizeStart: _this2.handleColumnResizeStart,\n onColumnResizeMove: _this2.handleColumnResizeMove\n });\n }\n\n headerCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](columnChildren[0], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, cellProps, headerCellProps)));\n }\n\n bodyCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](columnChildren[1], cellProps));\n left += nextWidth;\n }\n });\n return this._cacheCells = {\n headerCells: headerCells,\n bodyCells: bodyCells,\n allColumnsWidth: left,\n hasCustomTreeCol: hasCustomTreeCol\n };\n };\n\n _proto.initPosition = function initPosition() {\n var _this3 = this;\n\n if (this.isRTL()) {\n setTimeout(function () {\n var _this3$scrollbarXRef, _this3$scrollbarXRef$, _this3$scrollbarXRef$2;\n\n var _this3$state = _this3.state,\n contentWidth = _this3$state.contentWidth,\n width = _this3$state.width;\n _this3.scrollX = width - contentWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n\n _this3.updatePosition();\n\n (_this3$scrollbarXRef = _this3.scrollbarXRef) === null || _this3$scrollbarXRef === void 0 ? void 0 : (_this3$scrollbarXRef$ = _this3$scrollbarXRef.current) === null || _this3$scrollbarXRef$ === void 0 ? void 0 : (_this3$scrollbarXRef$2 = _this3$scrollbarXRef$.resetScrollBarPosition) === null || _this3$scrollbarXRef$2 === void 0 ? void 0 : _this3$scrollbarXRef$2.call(_this3$scrollbarXRef$, -_this3.scrollX);\n }, 0);\n }\n };\n\n _proto.updatePosition = function updatePosition() {\n var _this$tableHeaderRef;\n\n /**\n * 当存在锁定列情况处理\n */\n if (this.state.shouldFixedColumn) {\n this.updatePositionByFixedCell();\n } else {\n var _this$wheelWrapperRef, _this$headerWrapperRe2, _this$affixHeaderWrap, _affixHeaderElement$h;\n\n var wheelStyle = {};\n var headerStyle = {};\n this.translateDOMPositionXY(wheelStyle, this.scrollX, this.scrollY);\n this.translateDOMPositionXY(headerStyle, this.scrollX, 0);\n var wheelElement = (_this$wheelWrapperRef = this.wheelWrapperRef) === null || _this$wheelWrapperRef === void 0 ? void 0 : _this$wheelWrapperRef.current;\n var headerElement = (_this$headerWrapperRe2 = this.headerWrapperRef) === null || _this$headerWrapperRe2 === void 0 ? void 0 : _this$headerWrapperRe2.current;\n var affixHeaderElement = (_this$affixHeaderWrap = this.affixHeaderWrapperRef) === null || _this$affixHeaderWrap === void 0 ? void 0 : _this$affixHeaderWrap.current;\n wheelElement && Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(wheelElement, wheelStyle);\n headerElement && Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(headerElement, headerStyle);\n\n if (affixHeaderElement !== null && affixHeaderElement !== void 0 && (_affixHeaderElement$h = affixHeaderElement.hasChildNodes) !== null && _affixHeaderElement$h !== void 0 && _affixHeaderElement$h.call(affixHeaderElement)) {\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(affixHeaderElement.firstChild, headerStyle);\n }\n }\n\n if ((_this$tableHeaderRef = this.tableHeaderRef) !== null && _this$tableHeaderRef !== void 0 && _this$tableHeaderRef.current) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(this.tableHeaderRef.current, this.addPrefix('cell-group-shadow'), this.scrollY < 0);\n }\n };\n\n _proto.updatePositionByFixedCell = function updatePositionByFixedCell() {\n var _this$wheelWrapperRef2;\n\n var wheelGroupStyle = {};\n var wheelStyle = {};\n var scrollGroups = this.getScrollCellGroups();\n var fixedLeftGroups = this.getFixedLeftCellGroups();\n var fixedRightGroups = this.getFixedRightCellGroups();\n var _this$state4 = this.state,\n contentWidth = _this$state4.contentWidth,\n width = _this$state4.width;\n this.translateDOMPositionXY(wheelGroupStyle, this.scrollX, 0);\n this.translateDOMPositionXY(wheelStyle, 0, this.scrollY);\n var scrollArrayGroups = Array.from(scrollGroups);\n\n for (var i = 0; i < scrollArrayGroups.length; i++) {\n var group = scrollArrayGroups[i];\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(group, wheelGroupStyle);\n }\n\n if ((_this$wheelWrapperRef2 = this.wheelWrapperRef) !== null && _this$wheelWrapperRef2 !== void 0 && _this$wheelWrapperRef2.current) {\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(this.wheelWrapperRef.current, wheelStyle);\n }\n\n var leftShadowClassName = this.addPrefix('cell-group-left-shadow');\n var rightShadowClassName = this.addPrefix('cell-group-right-shadow');\n var showLeftShadow = this.scrollX < 0;\n var showRightShadow = width - contentWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"] !== this.scrollX;\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(fixedLeftGroups, leftShadowClassName, showLeftShadow);\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(fixedRightGroups, rightShadowClassName, showRightShadow);\n };\n\n _proto.shouldRenderExpandedRow = function shouldRenderExpandedRow(rowData) {\n var _this$props18 = this.props,\n rowKey = _this$props18.rowKey,\n renderRowExpanded = _this$props18.renderRowExpanded,\n isTree = _this$props18.isTree;\n var expandedRowKeys = this.getExpandedRowKeys() || [];\n return lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(renderRowExpanded) && !isTree && expandedRowKeys.some(function (key) {\n return key === rowData[rowKey];\n });\n };\n\n _proto.calculateRowMaxHeight = function calculateRowMaxHeight() {\n var wordWrap = this.props.wordWrap;\n\n if (wordWrap) {\n var tableRowsMaxHeight = [];\n var tableRows = Object.values(this.tableRows);\n\n for (var i = 0; i < tableRows.length; i++) {\n var _tableRows$i = tableRows[i],\n row = _tableRows$i[0];\n\n if (row) {\n var cells = row.querySelectorAll(\".\" + this.addPrefix('cell-wrap')) || [];\n var cellArray = Array.from(cells);\n var maxHeight = 0;\n\n for (var j = 0; j < cellArray.length; j++) {\n var cell = cellArray[j];\n var h = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(cell);\n maxHeight = Math.max(maxHeight, h);\n }\n\n tableRowsMaxHeight.push(maxHeight);\n }\n }\n\n this.setState({\n tableRowsMaxHeight: tableRowsMaxHeight\n });\n }\n };\n\n _proto.calculateTableContentWidth = function calculateTableContentWidth(prevProps) {\n var _this$tableRef3;\n\n var table = (_this$tableRef3 = this.tableRef) === null || _this$tableRef3 === void 0 ? void 0 : _this$tableRef3.current;\n var row = table.querySelector(\".\" + this.addPrefix('row') + \":not(.virtualized)\");\n var contentWidth = row ? Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getWidth\"])(row) : 0;\n this.setState({\n contentWidth: contentWidth\n }); // 这里 -SCROLLBAR_WIDTH 是为了让滚动条不挡住内容部分\n\n this.minScrollX = -(contentWidth - this.state.width) - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n /**\n * 1.判断 Table 列数是否发生变化\n * 2.判断 Table 内容区域是否宽度有变化\n *\n * 满足 1 和 2 则更新横向滚动条位置\n */\n\n if (lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(this.props.children).length !== lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(prevProps.children).length && this.state.contentWidth !== contentWidth) {\n this.scrollLeft(0);\n }\n };\n\n _proto.calculateTableContextHeight = function calculateTableContextHeight(prevProps) {\n var table = this.tableRef.current;\n var rows = table.querySelectorAll(\".\" + this.addPrefix('row')) || [];\n var _this$props19 = this.props,\n height = _this$props19.height,\n autoHeight = _this$props19.autoHeight,\n rowHeight = _this$props19.rowHeight,\n affixHeader = _this$props19.affixHeader;\n var headerHeight = this.getTableHeaderHeight();\n var contentHeight = rows.length ? Array.from(rows).map(function (row) {\n return Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(row) || rowHeight;\n }).reduce(function (x, y) {\n return x + y;\n }) : 0; // 当设置 affixHeader 属性后要减掉两个 header 的高度\n\n var nextContentHeight = contentHeight - (affixHeader ? headerHeight * 2 : headerHeight);\n\n if (nextContentHeight !== this.state.contentHeight) {\n this.setState({\n contentHeight: nextContentHeight\n });\n }\n\n if (prevProps && ( // 当 data 更新,或者表格高度更新,则更新滚动条\n prevProps.height !== height || prevProps.data !== this.props.data) && this.scrollY !== 0) {\n this.scrollTop(Math.abs(this.scrollY));\n this.updatePosition();\n }\n\n if (!autoHeight) {\n // 这里 -SCROLLBAR_WIDTH 是为了让滚动条不挡住内容部分\n this.minScrollY = -(contentHeight - height) - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n } // 如果内容区域的高度小于表格的高度,则重置 Y 坐标滚动条\n\n\n if (contentHeight < height) {\n this.scrollTop(0);\n } // 如果 scrollTop 的值大于可以滚动的范围 ,则重置 Y 坐标滚动条\n // 当 Table 为 virtualized 时, wheel 事件触发每次都会进入该逻辑, 避免在滚动到底部后滚动条重置, +SCROLLBAR_WIDTH\n\n\n if (Math.abs(this.scrollY) + height - headerHeight > nextContentHeight + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]) {\n this.scrollTop(this.scrollY);\n }\n };\n\n _proto.getControlledScrollTopValue = function getControlledScrollTopValue(value) {\n if (this.props.autoHeight) {\n return [0, 0];\n }\n\n var contentHeight = this.state.contentHeight;\n var headerHeight = this.getTableHeaderHeight();\n var height = this.getTableHeight(); // 滚动值的最大范围判断\n\n value = Math.min(value, Math.max(0, contentHeight - (height - headerHeight))); // value 值是表格理论滚动位置的一个值,通过 value 计算出 scrollY 坐标值与滚动条位置的值\n\n return [-value, value / contentHeight * (height - headerHeight)];\n };\n\n _proto.getControlledScrollLeftValue = function getControlledScrollLeftValue(value) {\n var _this$state5 = this.state,\n contentWidth = _this$state5.contentWidth,\n width = _this$state5.width; // 滚动值的最大范围判断\n\n value = Math.min(value, Math.max(0, contentWidth - width));\n return [-value, value / contentWidth * width];\n }\n /**\n * public method\n */\n ;\n\n _proto.renderRowData = function renderRowData(bodyCells, rowData, props, shouldRenderExpandedRow) {\n var _this$props20 = this.props,\n renderTreeToggle = _this$props20.renderTreeToggle,\n rowKey = _this$props20.rowKey,\n wordWrap = _this$props20.wordWrap,\n isTree = _this$props20.isTree;\n var hasChildren = isTree && rowData.children && Array.isArray(rowData.children);\n var nextRowKey = typeof rowData[rowKey] !== 'undefined' ? rowData[rowKey] : props.key;\n\n var rowProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, props, {\n key: nextRowKey,\n 'aria-rowindex': props.key + 2,\n rowRef: this.bindTableRowsRef(props.key, rowData),\n onClick: this.bindRowClick(rowData),\n onContextMenu: this.bindRowContextMenu(rowData)\n });\n\n var expandedRowKeys = this.getExpandedRowKeys() || [];\n var expanded = expandedRowKeys.some(function (key) {\n return key === rowData[rowKey];\n });\n var cells = [];\n\n for (var i = 0; i < bodyCells.length; i++) {\n var cell = bodyCells[i];\n cells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](cell, {\n hasChildren: hasChildren,\n rowData: rowData,\n wordWrap: wordWrap,\n renderTreeToggle: renderTreeToggle,\n height: props.height,\n rowIndex: props.key,\n depth: props.depth,\n onTreeToggle: this.handleTreeToggle,\n rowKey: nextRowKey,\n expanded: expanded\n }));\n }\n\n return this.renderRow(rowProps, cells, shouldRenderExpandedRow, rowData);\n };\n\n _proto.renderRow = function renderRow(props, cells, shouldRenderExpandedRow, rowData) {\n var rowClassName = this.props.rowClassName;\n var _this$state6 = this.state,\n shouldFixedColumn = _this$state6.shouldFixedColumn,\n width = _this$state6.width,\n contentWidth = _this$state6.contentWidth;\n\n var depth = props.depth,\n restRowProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"depth\"]);\n\n if (typeof rowClassName === 'function') {\n restRowProps.className = rowClassName(rowData);\n } else {\n restRowProps.className = rowClassName;\n }\n\n var rowStyles = {};\n var rowRight = 0;\n\n if (this.isRTL() && contentWidth > width) {\n rowRight = width - contentWidth;\n rowStyles.right = rowRight;\n } // IF there are fixed columns, add a fixed group\n\n\n if (shouldFixedColumn && contentWidth > width) {\n var fixedLeftCells = [];\n var fixedRightCells = [];\n var scrollCells = [];\n var fixedLeftCellGroupWidth = 0;\n var fixedRightCellGroupWidth = 0;\n\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n var _cell$props = cell.props,\n fixed = _cell$props.fixed,\n _width2 = _cell$props.width;\n var isFixedStart = fixed === 'left' || fixed === true;\n var isFixedEnd = fixed === 'right';\n\n if (this.isRTL()) {\n isFixedStart = fixed === 'right';\n isFixedEnd = fixed === 'left' || fixed === true;\n }\n\n if (isFixedStart) {\n fixedLeftCells.push(cell);\n fixedLeftCellGroupWidth += _width2;\n } else if (isFixedEnd) {\n fixedRightCells.push(cell);\n fixedRightCellGroupWidth += _width2;\n } else {\n scrollCells.push(cell);\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, restRowProps, {\n \"data-depth\": depth,\n style: rowStyles\n }), fixedLeftCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n fixed: \"left\",\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedLeftCellGroupWidth,\n style: this.isRTL() ? {\n right: width - fixedLeftCellGroupWidth - rowRight\n } : null\n }, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"resetLeftForCells\"])(fixedLeftCells))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(scrollCells)), fixedRightCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n fixed: \"right\",\n style: this.isRTL() ? {\n right: 0 - rowRight\n } : {\n left: width - fixedRightCellGroupWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]\n },\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedRightCellGroupWidth + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]\n }, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"resetLeftForCells\"])(fixedRightCells, _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]))) : null, shouldRenderExpandedRow && this.renderRowExpanded(rowData));\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, restRowProps, {\n \"data-depth\": depth,\n style: rowStyles\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(cells)), shouldRenderExpandedRow && this.renderRowExpanded(rowData));\n };\n\n _proto.renderRowExpanded = function renderRowExpanded(rowData) {\n var _this$props21 = this.props,\n renderRowExpanded = _this$props21.renderRowExpanded,\n rowExpandedHeight = _this$props21.rowExpandedHeight;\n var styles = {\n height: rowExpandedHeight\n };\n\n if (typeof renderRowExpanded === 'function') {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('row-expanded'),\n style: styles\n }, renderRowExpanded(rowData));\n }\n\n return null;\n };\n\n _proto.renderMouseArea = function renderMouseArea() {\n var headerHeight = this.getTableHeaderHeight();\n var styles = {\n height: this.getTableHeight()\n };\n var spanStyles = {\n height: headerHeight - 1\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.mouseAreaRef,\n className: this.addPrefix('mouse-area'),\n style: styles\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n style: spanStyles\n }));\n };\n\n _proto.renderTableHeader = function renderTableHeader(headerCells, rowWidth) {\n var affixHeader = this.props.affixHeader;\n var tableWidth = this.state.width;\n var top = typeof affixHeader === 'number' ? affixHeader : 0;\n var headerHeight = this.getTableHeaderHeight();\n var rowProps = {\n 'aria-rowindex': 1,\n rowRef: this.tableHeaderRef,\n width: rowWidth,\n height: this.getRowHeight(),\n headerHeight: headerHeight,\n isHeaderRow: true,\n top: 0\n };\n var fixedStyle = {\n position: 'fixed',\n overflow: 'hidden',\n height: this.getTableHeaderHeight(),\n width: tableWidth,\n top: top\n }; // Affix header\n\n var header = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_5___default()(this.addPrefix('affix-header')),\n style: fixedStyle,\n ref: this.affixHeaderWrapperRef\n }, this.renderRow(rowProps, headerCells));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_3__[\"Fragment\"], null, (affixHeader === 0 || affixHeader) && header, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n role: \"rowgroup\",\n className: this.addPrefix('header-row-wrapper'),\n ref: this.headerWrapperRef\n }, this.renderRow(rowProps, headerCells)));\n };\n\n _proto.renderTableBody = function renderTableBody(bodyCells, rowWidth) {\n var _this$props22 = this.props,\n rowExpandedHeight = _this$props22.rowExpandedHeight,\n renderRowExpanded = _this$props22.renderRowExpanded,\n isTree = _this$props22.isTree,\n rowKey = _this$props22.rowKey,\n wordWrap = _this$props22.wordWrap,\n virtualized = _this$props22.virtualized,\n rowHeight = _this$props22.rowHeight;\n var headerHeight = this.getTableHeaderHeight();\n var _this$state7 = this.state,\n tableRowsMaxHeight = _this$state7.tableRowsMaxHeight,\n isScrolling = _this$state7.isScrolling,\n data = _this$state7.data;\n var height = this.getTableHeight();\n var bodyHeight = height - headerHeight;\n var bodyStyles = {\n top: headerHeight,\n height: bodyHeight\n };\n var contentHeight = 0;\n var topHideHeight = 0;\n var bottomHideHeight = 0;\n this._visibleRows = [];\n\n if (data) {\n var top = 0; // Row position\n\n var minTop = Math.abs(this.scrollY);\n var maxTop = minTop + height + rowExpandedHeight;\n var isCustomRowHeight = typeof rowHeight === 'function';\n var isUncertainHeight = !!(renderRowExpanded || isCustomRowHeight || isTree);\n /**\n 如果开启了 virtualized 同时 Table 中的的行高是可变的,\n 则需要循环遍历 data, 获取每一行的高度。\n */\n\n if (isUncertainHeight && virtualized || !virtualized) {\n for (var index = 0; index < data.length; index++) {\n var rowData = data[index];\n var maxHeight = tableRowsMaxHeight[index];\n var shouldRenderExpandedRow = this.shouldRenderExpandedRow(rowData);\n var nextRowHeight = 0;\n var depth = 0;\n\n if (typeof rowHeight === 'function') {\n nextRowHeight = rowHeight(rowData);\n } else {\n nextRowHeight = maxHeight ? Math.max(maxHeight + _constants__WEBPACK_IMPORTED_MODULE_20__[\"CELL_PADDING_HEIGHT\"], rowHeight) : rowHeight;\n\n if (shouldRenderExpandedRow) {\n nextRowHeight += rowExpandedHeight;\n }\n }\n\n if (isTree) {\n var parents = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"findAllParents\"])(rowData, rowKey);\n var expandedRowKeys = this.getExpandedRowKeys();\n depth = parents.length; // 如果是 Tree Table, 判断当前的行是否展开/折叠,如果是折叠则不显示该行。\n\n if (!Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"shouldShowRowByExpanded\"])(expandedRowKeys, parents)) {\n continue;\n }\n }\n\n contentHeight += nextRowHeight;\n var rowProps = {\n key: index,\n top: top,\n width: rowWidth,\n depth: depth,\n height: nextRowHeight\n };\n top += nextRowHeight;\n\n if (virtualized && !wordWrap) {\n if (top + nextRowHeight < minTop) {\n topHideHeight += nextRowHeight;\n continue;\n } else if (top > maxTop) {\n bottomHideHeight += nextRowHeight;\n continue;\n }\n }\n\n this._visibleRows.push(this.renderRowData(bodyCells, rowData, rowProps, shouldRenderExpandedRow));\n }\n } else {\n /**\n 如果 Table 的行高是固定的,则直接通过行高与行数进行计算,\n 减少遍历所有 data 带来的性能消耗\n */\n var _nextRowHeight = this.getRowHeight();\n\n var startIndex = Math.max(Math.floor(minTop / _nextRowHeight), 0);\n var endIndex = Math.min(startIndex + Math.ceil(bodyHeight / _nextRowHeight), data.length);\n contentHeight = data.length * _nextRowHeight;\n topHideHeight = startIndex * _nextRowHeight;\n bottomHideHeight = (data.length - endIndex) * _nextRowHeight;\n\n for (var _index = startIndex; _index < endIndex; _index++) {\n var _rowData = data[_index];\n var _rowProps = {\n key: _index,\n top: _index * _nextRowHeight,\n width: rowWidth,\n height: _nextRowHeight\n };\n\n this._visibleRows.push(this.renderRowData(bodyCells, _rowData, _rowProps, false));\n }\n }\n }\n\n var wheelStyles = {\n position: 'absolute',\n height: contentHeight,\n minHeight: height,\n pointerEvents: isScrolling ? 'none' : undefined\n };\n var topRowStyles = {\n height: topHideHeight\n };\n var bottomRowStyles = {\n height: bottomHideHeight\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.tableBodyRef,\n role: \"rowgroup\",\n className: this.addPrefix('body-row-wrapper'),\n style: bodyStyles,\n onScroll: this.handleBodyScroll\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n style: wheelStyles,\n className: this.addPrefix('body-wheel-area'),\n ref: this.wheelWrapperRef\n }, topHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n style: topRowStyles,\n className: \"virtualized\"\n }) : null, this._visibleRows, bottomHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n style: bottomRowStyles,\n className: \"virtualized\"\n }) : null), this.renderInfo(), this.renderScrollbar(), this.renderLoading());\n };\n\n _proto.renderInfo = function renderInfo() {\n var _this$props23 = this.props,\n locale = _this$props23.locale,\n renderEmpty = _this$props23.renderEmpty,\n loading = _this$props23.loading;\n\n if (this._visibleRows.length || loading) {\n return null;\n }\n\n var emptyMessage = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('body-info')\n }, locale.emptyMessage);\n return renderEmpty ? renderEmpty(emptyMessage) : emptyMessage;\n };\n\n _proto.renderScrollbar = function renderScrollbar() {\n var _this$props24 = this.props,\n disabledScroll = _this$props24.disabledScroll,\n affixHorizontalScrollbar = _this$props24.affixHorizontalScrollbar,\n id = _this$props24.id;\n var _this$state8 = this.state,\n contentWidth = _this$state8.contentWidth,\n contentHeight = _this$state8.contentHeight,\n width = _this$state8.width,\n fixedHorizontalScrollbar = _this$state8.fixedHorizontalScrollbar;\n var bottom = typeof affixHorizontalScrollbar === 'number' ? affixHorizontalScrollbar : 0;\n var headerHeight = this.getTableHeaderHeight();\n var height = this.getTableHeight();\n\n if (disabledScroll) {\n return null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Scrollbar__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n tableId: id,\n className: classnames__WEBPACK_IMPORTED_MODULE_5___default()({\n fixed: fixedHorizontalScrollbar\n }),\n style: {\n width: width,\n bottom: fixedHorizontalScrollbar ? bottom : undefined\n },\n length: this.state.width,\n onScroll: this.handleScrollX,\n scrollLength: contentWidth,\n ref: this.scrollbarXRef\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Scrollbar__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n vertical: true,\n tableId: id,\n length: height - headerHeight,\n scrollLength: contentHeight,\n onScroll: this.handleScrollY,\n ref: this.scrollbarYRef\n }));\n }\n /**\n * show loading\n */\n ;\n\n _proto.renderLoading = function renderLoading() {\n var _this$props25 = this.props,\n locale = _this$props25.locale,\n loading = _this$props25.loading,\n loadAnimation = _this$props25.loadAnimation,\n renderLoading = _this$props25.renderLoading;\n\n if (!loadAnimation && !loading) {\n return null;\n }\n\n var loadingElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader-wrapper')\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader')\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"i\", {\n className: this.addPrefix('loader-icon')\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n className: this.addPrefix('loader-text')\n }, locale.loading)));\n return renderLoading ? renderLoading(loadingElement) : loadingElement;\n };\n\n _proto.render = function render() {\n var _classNames;\n\n var _this$props26 = this.props,\n children = _this$props26.children,\n className = _this$props26.className,\n data = _this$props26.data,\n _this$props26$width = _this$props26.width,\n width = _this$props26$width === void 0 ? 0 : _this$props26$width,\n style = _this$props26.style,\n isTree = _this$props26.isTree,\n hover = _this$props26.hover,\n bordered = _this$props26.bordered,\n cellBordered = _this$props26.cellBordered,\n wordWrap = _this$props26.wordWrap,\n classPrefix = _this$props26.classPrefix,\n loading = _this$props26.loading,\n showHeader = _this$props26.showHeader,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_this$props26, [\"children\", \"className\", \"data\", \"width\", \"style\", \"isTree\", \"hover\", \"bordered\", \"cellBordered\", \"wordWrap\", \"classPrefix\", \"loading\", \"showHeader\"]);\n\n var isColumnResizing = this.state.isColumnResizing;\n\n var _this$getCellDescript = this.getCellDescriptor(),\n headerCells = _this$getCellDescript.headerCells,\n bodyCells = _this$getCellDescript.bodyCells,\n allColumnsWidth = _this$getCellDescript.allColumnsWidth,\n hasCustomTreeCol = _this$getCellDescript.hasCustomTreeCol;\n\n var rowWidth = allColumnsWidth > width ? allColumnsWidth : width;\n var clesses = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[this.addPrefix('word-wrap')] = wordWrap, _classNames[this.addPrefix('treetable')] = isTree, _classNames[this.addPrefix('bordered')] = bordered, _classNames[this.addPrefix('cell-bordered')] = cellBordered, _classNames[this.addPrefix('column-resizing')] = isColumnResizing, _classNames[this.addPrefix('hover')] = hover, _classNames[this.addPrefix('loading')] = loading, _classNames));\n\n var styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n width: width || 'auto',\n height: this.getTableHeight()\n }, style);\n\n var unhandled = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"getUnhandledProps\"])(Table, rest);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_TableContext__WEBPACK_IMPORTED_MODULE_19__[\"default\"].Provider, {\n value: {\n translateDOMPositionXY: this.translateDOMPositionXY,\n rtl: this.isRTL(),\n isTree: isTree,\n hasCustomTreeCol: hasCustomTreeCol\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n role: isTree ? 'treegrid' : 'grid' // The aria-rowcount is specified on the element with the table.\n // Its value is an integer equal to the total number of rows available, including header rows.\n ,\n \"aria-rowcount\": data.length + 1,\n \"aria-colcount\": this._cacheChildrenSize\n }, unhandled, {\n className: clesses,\n style: styles,\n ref: this.tableRef\n }), showHeader && this.renderTableHeader(headerCells, rowWidth), children && this.renderTableBody(bodyCells, rowWidth), showHeader && this.renderMouseArea()));\n };\n\n return Table;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"Component\"]);\n\nTable.propTypes = {\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?");
|
|
5173
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/rsuite-table/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/isFunction */ \"./node_modules/rsuite-table/node_modules/lodash/isFunction.js\");\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/flatten */ \"./node_modules/rsuite-table/node_modules/lodash/flatten.js\");\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_flatten__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash/debounce */ \"./node_modules/rsuite-table/node_modules/lodash/debounce.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/isEqual */ \"./node_modules/rsuite-table/node_modules/lodash/isEqual.js\");\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash_eq__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash/eq */ \"./node_modules/rsuite-table/node_modules/lodash/eq.js\");\n/* harmony import */ var lodash_eq__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_eq__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash/omit */ \"./node_modules/rsuite-table/node_modules/lodash/omit.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/rsuite-table/node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var element_resize_event__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! element-resize-event */ \"./node_modules/element-resize-event/index.js\");\n/* harmony import */ var element_resize_event__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(element_resize_event__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! dom-lib/lib/transition/translateDOMPositionXY */ \"./node_modules/dom-lib/lib/transition/translateDOMPositionXY.js\");\n/* harmony import */ var dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var dom_lib__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n/* harmony import */ var _Row__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Row */ \"./node_modules/rsuite-table/es/Row.js\");\n/* harmony import */ var _CellGroup__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./CellGroup */ \"./node_modules/rsuite-table/es/CellGroup.js\");\n/* harmony import */ var _Scrollbar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Scrollbar */ \"./node_modules/rsuite-table/es/Scrollbar.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n/* harmony import */ var _ColumnGroup__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./ColumnGroup */ \"./node_modules/rsuite-table/es/ColumnGroup.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SORT_TYPE = {\n DESC: 'desc',\n ASC: 'asc'\n};\nvar propTypes = {\n autoHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n affixHeader: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number]),\n affixHorizontalScrollbar: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number]),\n bordered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n bodyRef: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n classPrefix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any,\n cellBordered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n data: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object),\n defaultExpandAllRows: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n defaultExpandedRowKeys: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number])),\n defaultSortType: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n disabledScroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n expandedRowKeys: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number])),\n hover: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n height: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n headerHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n locale: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n loading: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n loadAnimation: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n minHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n rowKey: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number]),\n rowHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func]),\n renderTreeToggle: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n renderRowExpanded: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n rowExpandedHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n renderEmpty: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n renderLoading: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n rowClassName: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n rtl: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n sortColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n sortType: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n showHeader: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n shouldUpdateScroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n translate3d: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n wordWrap: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n width: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n virtualized: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n isTree: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n onRowClick: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onRowContextMenu: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onScroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onSortColumn: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onExpandChange: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onTouchStart: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onTouchMove: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n onDataUpdated: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func\n};\n\nvar Table = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Table, _React$Component);\n\n Table.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n if (props.data !== state.cacheData || props.isTree !== state.isTree) {\n return {\n cacheData: props.data,\n isTree: props.isTree,\n data: props.isTree ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"flattenData\"])(props.data) : props.data\n };\n }\n\n return null;\n };\n\n function Table(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.translateDOMPositionXY = null;\n _this.scrollListener = null;\n _this.tableRef = void 0;\n _this.scrollbarYRef = void 0;\n _this.scrollbarXRef = void 0;\n _this.tableBodyRef = void 0;\n _this.affixHeaderWrapperRef = void 0;\n _this.mouseAreaRef = void 0;\n _this.headerWrapperRef = void 0;\n _this.tableHeaderRef = void 0;\n _this.wheelWrapperRef = void 0;\n _this.tableRows = {};\n _this.mounted = false;\n _this.disableEventsTimeoutId = null;\n _this.scrollY = 0;\n _this.scrollX = 0;\n _this.wheelHandler = void 0;\n _this.minScrollY = void 0;\n _this.minScrollX = void 0;\n _this.mouseArea = void 0;\n _this.touchX = void 0;\n _this.touchY = void 0;\n _this.wheelListener = void 0;\n _this.touchStartListener = void 0;\n _this.touchMoveListener = void 0;\n _this._cacheCells = null;\n _this._cacheChildrenSize = 0;\n _this._visibleRows = [];\n\n _this.listenWheel = function (deltaX, deltaY) {\n var _this$scrollbarXRef$c, _this$scrollbarXRef$c2, _this$scrollbarYRef$c, _this$scrollbarYRef$c2;\n\n _this.handleWheel(deltaX, deltaY);\n\n (_this$scrollbarXRef$c = _this.scrollbarXRef.current) === null || _this$scrollbarXRef$c === void 0 ? void 0 : (_this$scrollbarXRef$c2 = _this$scrollbarXRef$c.onWheelScroll) === null || _this$scrollbarXRef$c2 === void 0 ? void 0 : _this$scrollbarXRef$c2.call(_this$scrollbarXRef$c, deltaX);\n (_this$scrollbarYRef$c = _this.scrollbarYRef.current) === null || _this$scrollbarYRef$c === void 0 ? void 0 : (_this$scrollbarYRef$c2 = _this$scrollbarYRef$c.onWheelScroll) === null || _this$scrollbarYRef$c2 === void 0 ? void 0 : _this$scrollbarYRef$c2.call(_this$scrollbarYRef$c, deltaY);\n };\n\n _this.setOffsetByAffix = function () {\n var _this$headerWrapperRe, _this$tableRef;\n\n var _this$props = _this.props,\n affixHeader = _this$props.affixHeader,\n affixHorizontalScrollbar = _this$props.affixHorizontalScrollbar;\n var headerNode = (_this$headerWrapperRe = _this.headerWrapperRef) === null || _this$headerWrapperRe === void 0 ? void 0 : _this$headerWrapperRe.current;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader) && headerNode) {\n _this.setState(function () {\n return {\n headerOffset: Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getOffset\"])(headerNode)\n };\n });\n }\n\n var tableNode = (_this$tableRef = _this.tableRef) === null || _this$tableRef === void 0 ? void 0 : _this$tableRef.current;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar) && tableNode) {\n _this.setState(function () {\n return {\n tableOffset: Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getOffset\"])(tableNode)\n };\n });\n }\n };\n\n _this.handleWindowScroll = function () {\n var _this$props2 = _this.props,\n affixHeader = _this$props2.affixHeader,\n affixHorizontalScrollbar = _this$props2.affixHorizontalScrollbar;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader)) {\n _this.affixTableHeader();\n }\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar)) {\n _this.affixHorizontalScrollbar();\n }\n };\n\n _this.affixHorizontalScrollbar = function () {\n var _this$scrollbarXRef, _this$scrollbarXRef$c3, _this$scrollbarXRef$c4;\n\n var scrollY = window.scrollY || window.pageYOffset;\n var windowHeight = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(window);\n\n var height = _this.getTableHeight();\n\n var _this$state = _this.state,\n tableOffset = _this$state.tableOffset,\n fixedHorizontalScrollbar = _this$state.fixedHorizontalScrollbar;\n var affixHorizontalScrollbar = _this.props.affixHorizontalScrollbar;\n\n var headerHeight = _this.getTableHeaderHeight();\n\n var bottom = typeof affixHorizontalScrollbar === 'number' ? affixHorizontalScrollbar : 0;\n var fixedScrollbar = scrollY + windowHeight < height + (tableOffset.top + bottom) && scrollY + windowHeight - headerHeight > tableOffset.top + bottom;\n\n if ((_this$scrollbarXRef = _this.scrollbarXRef) !== null && _this$scrollbarXRef !== void 0 && (_this$scrollbarXRef$c3 = _this$scrollbarXRef.current) !== null && _this$scrollbarXRef$c3 !== void 0 && (_this$scrollbarXRef$c4 = _this$scrollbarXRef$c3.barRef) !== null && _this$scrollbarXRef$c4 !== void 0 && _this$scrollbarXRef$c4.current && fixedHorizontalScrollbar !== fixedScrollbar) {\n _this.setState({\n fixedHorizontalScrollbar: fixedScrollbar\n });\n }\n };\n\n _this.affixTableHeader = function () {\n var affixHeader = _this.props.affixHeader;\n var top = typeof affixHeader === 'number' ? affixHeader : 0;\n var _this$state2 = _this.state,\n headerOffset = _this$state2.headerOffset,\n contentHeight = _this$state2.contentHeight;\n var scrollY = window.scrollY || window.pageYOffset;\n var fixedHeader = scrollY - (headerOffset.top - top) >= 0 && scrollY < headerOffset.top - top + contentHeight;\n\n if (_this.affixHeaderWrapperRef.current) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(_this.affixHeaderWrapperRef.current, 'fixed', fixedHeader);\n }\n };\n\n _this.handleSortColumn = function (dataKey) {\n var _this$props$onSortCol, _this$props3;\n\n var sortType = _this.getSortType();\n\n if (_this.props.sortColumn === dataKey) {\n sortType = sortType === SORT_TYPE.ASC ? SORT_TYPE.DESC : SORT_TYPE.ASC;\n\n _this.setState({\n sortType: sortType\n });\n }\n\n (_this$props$onSortCol = (_this$props3 = _this.props).onSortColumn) === null || _this$props$onSortCol === void 0 ? void 0 : _this$props$onSortCol.call(_this$props3, dataKey, sortType);\n };\n\n _this.handleColumnResizeEnd = function (columnWidth, _cursorDelta, dataKey, index) {\n var _this$setState;\n\n _this._cacheCells = null;\n\n _this.setState((_this$setState = {\n isColumnResizing: false\n }, _this$setState[dataKey + \"_\" + index + \"_width\"] = columnWidth, _this$setState));\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(_this.mouseAreaRef.current, {\n display: 'none'\n });\n };\n\n _this.handleColumnResizeStart = function (width, left, fixed) {\n _this.setState({\n isColumnResizing: true\n });\n\n _this.handleColumnResizeMove(width, left, fixed);\n };\n\n _this.handleColumnResizeMove = function (width, left, fixed) {\n var _addStyle;\n\n var mouseAreaLeft = width + left;\n var x = mouseAreaLeft;\n var dir = 'left';\n\n if (_this.isRTL()) {\n mouseAreaLeft += _this.minScrollX + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n dir = 'right';\n }\n\n if (!fixed) {\n x = mouseAreaLeft + (_this.isRTL() ? -_this.scrollX : _this.scrollX);\n }\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(_this.mouseAreaRef.current, (_addStyle = {\n display: 'block'\n }, _addStyle[dir] = x + \"px\", _addStyle));\n };\n\n _this.handleTreeToggle = function (rowKey, _rowIndex, rowData) {\n var _this$props$onExpandC, _this$props4;\n\n var expandedRowKeys = _this.getExpandedRowKeys();\n\n var open = false;\n var nextExpandedRowKeys = [];\n\n for (var i = 0; i < expandedRowKeys.length; i++) {\n var _key = expandedRowKeys[i];\n\n if (_key === rowKey) {\n open = true;\n } else {\n nextExpandedRowKeys.push(_key);\n }\n }\n\n if (!open) {\n nextExpandedRowKeys.push(rowKey);\n }\n\n _this.setState({\n expandedRowKeys: nextExpandedRowKeys\n });\n\n (_this$props$onExpandC = (_this$props4 = _this.props).onExpandChange) === null || _this$props$onExpandC === void 0 ? void 0 : _this$props$onExpandC.call(_this$props4, !open, rowData);\n };\n\n _this.handleScrollX = function (delta) {\n _this.handleWheel(delta, 0);\n };\n\n _this.handleScrollY = function (delta) {\n _this.handleWheel(0, delta);\n };\n\n _this.handleWheel = function (deltaX, deltaY) {\n var _this$props5 = _this.props,\n onScroll = _this$props5.onScroll,\n virtualized = _this$props5.virtualized;\n var _this$state3 = _this.state,\n contentWidth = _this$state3.contentWidth,\n width = _this$state3.width;\n\n if (!_this.tableRef.current) {\n return;\n }\n\n var nextScrollX = contentWidth <= width ? 0 : _this.scrollX - deltaX;\n var nextScrollY = _this.scrollY - deltaY;\n _this.scrollY = Math.min(0, nextScrollY < _this.minScrollY ? _this.minScrollY : nextScrollY);\n _this.scrollX = Math.min(0, nextScrollX < _this.minScrollX ? _this.minScrollX : nextScrollX);\n\n _this.updatePosition();\n\n onScroll === null || onScroll === void 0 ? void 0 : onScroll(_this.scrollX, _this.scrollY);\n\n if (virtualized) {\n _this.setState({\n isScrolling: true,\n scrollY: _this.scrollY\n });\n\n if (_this.disableEventsTimeoutId) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"cancelAnimationTimeout\"])(_this.disableEventsTimeoutId);\n }\n\n _this.disableEventsTimeoutId = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"requestAnimationTimeout\"])(_this.debounceScrollEndedCallback, 150);\n }\n };\n\n _this.debounceScrollEndedCallback = function () {\n _this.disableEventsTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n });\n };\n\n _this.handleTouchStart = function (event) {\n var _this$props$onTouchSt, _this$props6;\n\n if (event.touches) {\n var _event$touches$ = event.touches[0],\n pageX = _event$touches$.pageX,\n pageY = _event$touches$.pageY;\n _this.touchX = pageX;\n _this.touchY = pageY;\n }\n\n (_this$props$onTouchSt = (_this$props6 = _this.props).onTouchStart) === null || _this$props$onTouchSt === void 0 ? void 0 : _this$props$onTouchSt.call(_this$props6, event);\n };\n\n _this.handleTouchMove = function (event) {\n var _this$props$onTouchMo, _this$props7;\n\n var autoHeight = _this.props.autoHeight;\n\n if (event.touches) {\n var _event$preventDefault, _this$scrollbarXRef$c5, _this$scrollbarXRef$c6, _this$scrollbarYRef$c3, _this$scrollbarYRef$c4;\n\n var _event$touches$2 = event.touches[0],\n pageX = _event$touches$2.pageX,\n pageY = _event$touches$2.pageY;\n var deltaX = _this.touchX - pageX;\n var deltaY = autoHeight ? 0 : _this.touchY - pageY;\n\n if (!_this.shouldHandleWheelY(deltaY) && !_this.shouldHandleWheelX(deltaX)) {\n return;\n }\n\n (_event$preventDefault = event.preventDefault) === null || _event$preventDefault === void 0 ? void 0 : _event$preventDefault.call(event);\n\n _this.handleWheel(deltaX, deltaY);\n\n (_this$scrollbarXRef$c5 = _this.scrollbarXRef.current) === null || _this$scrollbarXRef$c5 === void 0 ? void 0 : (_this$scrollbarXRef$c6 = _this$scrollbarXRef$c5.onWheelScroll) === null || _this$scrollbarXRef$c6 === void 0 ? void 0 : _this$scrollbarXRef$c6.call(_this$scrollbarXRef$c5, deltaX);\n (_this$scrollbarYRef$c3 = _this.scrollbarYRef.current) === null || _this$scrollbarYRef$c3 === void 0 ? void 0 : (_this$scrollbarYRef$c4 = _this$scrollbarYRef$c3.onWheelScroll) === null || _this$scrollbarYRef$c4 === void 0 ? void 0 : _this$scrollbarYRef$c4.call(_this$scrollbarYRef$c3, deltaY);\n _this.touchX = pageX;\n _this.touchY = pageY;\n }\n\n (_this$props$onTouchMo = (_this$props7 = _this.props).onTouchMove) === null || _this$props$onTouchMo === void 0 ? void 0 : _this$props$onTouchMo.call(_this$props7, event);\n };\n\n _this.handleBodyScroll = function (event) {\n if (event.target !== _this.tableBodyRef.current) {\n return;\n }\n\n var left = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollLeft\"])(event.target);\n var top = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollTop\"])(event.target);\n\n if (top === 0 && left === 0) {\n return;\n }\n\n _this.listenWheel(left, top);\n\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollLeft\"])(event.target, 0);\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"scrollTop\"])(event.target, 0);\n };\n\n _this.shouldHandleWheelX = function (delta) {\n var _this$props8 = _this.props,\n disabledScroll = _this$props8.disabledScroll,\n loading = _this$props8.loading;\n\n if (delta === 0 || disabledScroll || loading) {\n return false;\n }\n\n return true;\n };\n\n _this.shouldHandleWheelY = function (delta) {\n var _this$props9 = _this.props,\n disabledScroll = _this$props9.disabledScroll,\n loading = _this$props9.loading;\n\n if (delta === 0 || disabledScroll || loading) {\n return false;\n }\n\n return delta >= 0 && _this.scrollY > _this.minScrollY || delta < 0 && _this.scrollY < 0;\n };\n\n _this.addPrefix = function (name) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"prefix\"])(_this.props.classPrefix)(name);\n };\n\n _this.calculateTableWidth = function () {\n var _this$tableRef2;\n\n var table = (_this$tableRef2 = _this.tableRef) === null || _this$tableRef2 === void 0 ? void 0 : _this$tableRef2.current;\n var width = _this.state.width;\n\n if (table) {\n var nextWidth = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getWidth\"])(table);\n\n if (width !== nextWidth) {\n var _this$scrollbarXRef2, _this$scrollbarXRef2$;\n\n _this.scrollX = 0;\n (_this$scrollbarXRef2 = _this.scrollbarXRef) === null || _this$scrollbarXRef2 === void 0 ? void 0 : (_this$scrollbarXRef2$ = _this$scrollbarXRef2.current) === null || _this$scrollbarXRef2$ === void 0 ? void 0 : _this$scrollbarXRef2$.resetScrollBarPosition();\n }\n\n _this._cacheCells = null;\n\n _this.setState({\n width: nextWidth\n });\n }\n\n _this.setOffsetByAffix();\n };\n\n _this.scrollTop = function (top) {\n var _this$scrollbarYRef, _this$scrollbarYRef$c5, _this$scrollbarYRef$c6;\n\n if (top === void 0) {\n top = 0;\n }\n\n var _this$getControlledSc = _this.getControlledScrollTopValue(top),\n scrollY = _this$getControlledSc[0],\n handleScrollY = _this$getControlledSc[1];\n\n _this.scrollY = scrollY;\n (_this$scrollbarYRef = _this.scrollbarYRef) === null || _this$scrollbarYRef === void 0 ? void 0 : (_this$scrollbarYRef$c5 = _this$scrollbarYRef.current) === null || _this$scrollbarYRef$c5 === void 0 ? void 0 : (_this$scrollbarYRef$c6 = _this$scrollbarYRef$c5.resetScrollBarPosition) === null || _this$scrollbarYRef$c6 === void 0 ? void 0 : _this$scrollbarYRef$c6.call(_this$scrollbarYRef$c5, handleScrollY);\n\n _this.updatePosition();\n /**\n * 当开启 virtualized,调用 scrollTop 后会出现白屏现象,\n * 原因是直接操作 DOM 的坐标,但是组件没有重新渲染,需要调用 forceUpdate 重新进入 render。\n * Fix: rsuite#1044\n */\n\n\n if (_this.props.virtualized && _this.state.contentHeight > _this.props.height) {\n _this.forceUpdate();\n }\n };\n\n _this.scrollLeft = function (left) {\n var _this$scrollbarXRef3, _this$scrollbarXRef3$, _this$scrollbarXRef3$2;\n\n if (left === void 0) {\n left = 0;\n }\n\n var _this$getControlledSc2 = _this.getControlledScrollLeftValue(left),\n scrollX = _this$getControlledSc2[0],\n handleScrollX = _this$getControlledSc2[1];\n\n _this.scrollX = scrollX;\n (_this$scrollbarXRef3 = _this.scrollbarXRef) === null || _this$scrollbarXRef3 === void 0 ? void 0 : (_this$scrollbarXRef3$ = _this$scrollbarXRef3.current) === null || _this$scrollbarXRef3$ === void 0 ? void 0 : (_this$scrollbarXRef3$2 = _this$scrollbarXRef3$.resetScrollBarPosition) === null || _this$scrollbarXRef3$2 === void 0 ? void 0 : _this$scrollbarXRef3$2.call(_this$scrollbarXRef3$, handleScrollX);\n\n _this.updatePosition();\n };\n\n _this.scrollTo = function (coord) {\n var _ref = coord || {},\n x = _ref.x,\n y = _ref.y;\n\n if (typeof x === 'number') {\n _this.scrollLeft(x);\n }\n\n if (typeof y === 'number') {\n _this.scrollTop(y);\n }\n };\n\n _this.bindTableRowsRef = function (index, rowData) {\n return function (ref) {\n if (ref) {\n _this.tableRows[index] = [ref, rowData];\n }\n };\n };\n\n _this.bindRowClick = function (rowData) {\n return function (event) {\n var _this$props$onRowClic, _this$props10;\n\n (_this$props$onRowClic = (_this$props10 = _this.props).onRowClick) === null || _this$props$onRowClic === void 0 ? void 0 : _this$props$onRowClic.call(_this$props10, rowData, event);\n };\n };\n\n _this.bindRowContextMenu = function (rowData) {\n return function (event) {\n var _this$props$onRowCont, _this$props11;\n\n (_this$props$onRowCont = (_this$props11 = _this.props).onRowContextMenu) === null || _this$props$onRowCont === void 0 ? void 0 : _this$props$onRowCont.call(_this$props11, rowData, event);\n };\n };\n\n var _width = props.width,\n data = props.data,\n _rowKey = props.rowKey,\n defaultExpandAllRows = props.defaultExpandAllRows,\n renderRowExpanded = props.renderRowExpanded,\n defaultExpandedRowKeys = props.defaultExpandedRowKeys,\n _props$children = props.children,\n children = _props$children === void 0 ? [] : _props$children,\n isTree = props.isTree,\n defaultSortType = props.defaultSortType;\n\n var _expandedRowKeys = defaultExpandAllRows ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"findRowKeys\"])(data, _rowKey, lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(renderRowExpanded)) : defaultExpandedRowKeys || [];\n\n var shouldFixedColumn = Array.from(lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children)).some(function (child) {\n return child && child.props && child.props.fixed;\n });\n\n if (isTree && !_rowKey) {\n throw new Error('The `rowKey` is required when set isTree');\n }\n\n _this.state = {\n isTree: isTree,\n expandedRowKeys: _expandedRowKeys,\n shouldFixedColumn: shouldFixedColumn,\n cacheData: data,\n data: isTree ? Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"flattenData\"])(data) : data,\n width: _width || 0,\n columnWidth: 0,\n dataKey: 0,\n contentHeight: 0,\n contentWidth: 0,\n tableRowsMaxHeight: [],\n sortType: defaultSortType,\n scrollY: 0,\n isScrolling: false,\n fixedHeader: false\n };\n _this.scrollY = 0;\n _this.scrollX = 0;\n _this.wheelHandler = new dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"WheelHandler\"](_this.listenWheel, _this.shouldHandleWheelX, _this.shouldHandleWheelY, false);\n _this._cacheChildrenSize = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children).length;\n _this.translateDOMPositionXY = Object(dom_lib_lib_transition_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_14__[\"getTranslateDOMPositionXY\"])({\n enable3DTransform: props.translate3d\n });\n _this.tableRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarYRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.scrollbarXRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableBodyRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.affixHeaderWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.mouseAreaRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.headerWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.wheelWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n _this.tableHeaderRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createRef\"]();\n return _this;\n }\n\n var _proto = Table.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props13, _this$props13$bodyRef;\n\n this.calculateTableWidth();\n this.calculateTableContextHeight();\n this.calculateRowMaxHeight();\n this.setOffsetByAffix();\n this.initPosition();\n element_resize_event__WEBPACK_IMPORTED_MODULE_13___default()(this.tableRef.current, lodash_debounce__WEBPACK_IMPORTED_MODULE_8___default()(this.calculateTableWidth, 400));\n var options = {\n passive: false\n };\n var tableBody = this.tableBodyRef.current;\n\n if (tableBody) {\n this.wheelListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'wheel', this.wheelHandler.onWheel, options);\n this.touchStartListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'touchstart', this.handleTouchStart, options);\n this.touchMoveListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(tableBody, 'touchmove', this.handleTouchMove, options);\n }\n\n var _this$props12 = this.props,\n affixHeader = _this$props12.affixHeader,\n affixHorizontalScrollbar = _this$props12.affixHorizontalScrollbar;\n\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHeader) || Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isNumberOrTrue\"])(affixHorizontalScrollbar)) {\n this.scrollListener = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"on\"])(window, 'scroll', this.handleWindowScroll);\n }\n\n (_this$props13 = this.props) === null || _this$props13 === void 0 ? void 0 : (_this$props13$bodyRef = _this$props13.bodyRef) === null || _this$props13$bodyRef === void 0 ? void 0 : _this$props13$bodyRef.call(_this$props13, this.wheelWrapperRef.current);\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {\n var _cacheChildrenSize = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(nextProps.children || []).length;\n /**\n * 单元格列的信息在初始化后会被缓存,在某些属性被更新以后,需要清除缓存。\n */\n\n if (_cacheChildrenSize !== this._cacheChildrenSize) {\n this._cacheChildrenSize = _cacheChildrenSize;\n this._cacheCells = null;\n } else if (this.props.children !== nextProps.children || this.props.sortColumn !== nextProps.sortColumn || this.props.sortType !== nextProps.sortType) {\n this._cacheCells = null;\n }\n\n return !lodash_eq__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps) || !lodash_isEqual__WEBPACK_IMPORTED_MODULE_9___default()(this.state, nextState);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n var rowHeight = prevProps.rowHeight,\n data = prevProps.data,\n height = prevProps.height;\n\n if (data !== this.props.data) {\n var _this$props$onDataUpd, _this$props14;\n\n this.calculateRowMaxHeight();\n (_this$props$onDataUpd = (_this$props14 = this.props).onDataUpdated) === null || _this$props$onDataUpd === void 0 ? void 0 : _this$props$onDataUpd.call(_this$props14, this.props.data, this.scrollTo);\n var maxHeight = this.props.data.length * (typeof rowHeight === 'function' ? rowHeight(null) : rowHeight); // 当开启允许更新滚动条,或者滚动条位置大于表格的最大高度,则初始滚动条位置\n\n if (this.props.shouldUpdateScroll || Math.abs(this.scrollY) > maxHeight) {\n this.scrollTo({\n x: 0,\n y: 0\n });\n }\n } else {\n this.updatePosition();\n }\n\n if ( // 当 Table 的 data 发生变化,需要重新计算高度\n data !== this.props.data || // 当 Table 的 height 属性发生变化,需要重新计算 Table 高度\n height !== this.props.height || // 当 Table 内容区的高度发生变化需要重新计算\n prevState.contentHeight !== this.state.contentHeight || // 当 expandedRowKeys 发生变化,需要重新计算 Table 高度,如果重算会导致滚动条不显示。\n prevState.expandedRowKeys !== this.state.expandedRowKeys || prevProps.expandedRowKeys !== this.props.expandedRowKeys) {\n this.calculateTableContextHeight(prevProps);\n }\n\n this.calculateTableContentWidth(prevProps);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var _this$wheelListener, _this$touchStartListe, _this$touchMoveListen, _this$scrollListener;\n\n this.wheelHandler = null;\n\n if (this.tableRef.current) {\n Object(element_resize_event__WEBPACK_IMPORTED_MODULE_13__[\"unbind\"])(this.tableRef.current);\n }\n\n (_this$wheelListener = this.wheelListener) === null || _this$wheelListener === void 0 ? void 0 : _this$wheelListener.off();\n (_this$touchStartListe = this.touchStartListener) === null || _this$touchStartListe === void 0 ? void 0 : _this$touchStartListe.off();\n (_this$touchMoveListen = this.touchMoveListener) === null || _this$touchMoveListen === void 0 ? void 0 : _this$touchMoveListen.off();\n (_this$scrollListener = this.scrollListener) === null || _this$scrollListener === void 0 ? void 0 : _this$scrollListener.off();\n };\n\n _proto.getExpandedRowKeys = function getExpandedRowKeys() {\n var expandedRowKeys = this.props.expandedRowKeys;\n return typeof expandedRowKeys === 'undefined' ? this.state.expandedRowKeys : expandedRowKeys;\n };\n\n _proto.getSortType = function getSortType() {\n var sortType = this.props.sortType;\n return typeof sortType === 'undefined' ? this.state.sortType : sortType;\n };\n\n _proto.getScrollCellGroups = function getScrollCellGroups() {\n var _this$tableRef$curren;\n\n return (_this$tableRef$curren = this.tableRef.current) === null || _this$tableRef$curren === void 0 ? void 0 : _this$tableRef$curren.querySelectorAll(\".\" + this.addPrefix('cell-group-scroll'));\n };\n\n _proto.getFixedLeftCellGroups = function getFixedLeftCellGroups() {\n var _this$tableRef$curren2;\n\n return (_this$tableRef$curren2 = this.tableRef.current) === null || _this$tableRef$curren2 === void 0 ? void 0 : _this$tableRef$curren2.querySelectorAll(\".\" + this.addPrefix('cell-group-fixed-left'));\n };\n\n _proto.getFixedRightCellGroups = function getFixedRightCellGroups() {\n var _this$tableRef$curren3;\n\n return (_this$tableRef$curren3 = this.tableRef.current) === null || _this$tableRef$curren3 === void 0 ? void 0 : _this$tableRef$curren3.querySelectorAll(\".\" + this.addPrefix('cell-group-fixed-right'));\n };\n\n _proto.isRTL = function isRTL() {\n return this.props.rtl || Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"isRTL\"])();\n };\n\n _proto.getRowHeight = function getRowHeight(rowData) {\n if (rowData === void 0) {\n rowData = {};\n }\n\n var rowHeight = this.props.rowHeight;\n return typeof rowHeight === 'function' ? rowHeight(rowData) : rowHeight;\n }\n /**\n * 获取表头高度\n */\n ;\n\n _proto.getTableHeaderHeight = function getTableHeaderHeight() {\n var _this$props15 = this.props,\n headerHeight = _this$props15.headerHeight,\n showHeader = _this$props15.showHeader;\n return showHeader ? headerHeight : 0;\n }\n /**\n * 获取 Table 需要渲染的高度\n */\n ;\n\n _proto.getTableHeight = function getTableHeight() {\n var contentHeight = this.state.contentHeight;\n var _this$props16 = this.props,\n minHeight = _this$props16.minHeight,\n height = _this$props16.height,\n autoHeight = _this$props16.autoHeight,\n data = _this$props16.data;\n var headerHeight = this.getTableHeaderHeight();\n\n if (data.length === 0 && autoHeight) {\n return height;\n }\n\n return autoHeight ? Math.max(headerHeight + contentHeight, minHeight) : height;\n }\n /**\n * 获取 columns ReactElement 数组\n * - 处理 children 中存在 <Column> 数组的情况\n * - 过滤 children 中的空项\n */\n ;\n\n _proto.getTableColumns = function getTableColumns() {\n var children = this.props.children;\n\n if (!Array.isArray(children)) {\n return children;\n }\n\n var flattenColumns = lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(children).map(function (column) {\n if ((column === null || column === void 0 ? void 0 : column.type) === _ColumnGroup__WEBPACK_IMPORTED_MODULE_22__[\"default\"]) {\n var _column$props = column === null || column === void 0 ? void 0 : column.props,\n header = _column$props.header,\n childColumns = _column$props.children,\n align = _column$props.align,\n fixed = _column$props.fixed,\n verticalAlign = _column$props.verticalAlign;\n\n return childColumns.map(function (childColumn, index) {\n // 把 ColumnGroup 设置的属性覆盖到 Column\n var groupCellProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, childColumn === null || childColumn === void 0 ? void 0 : childColumn.props, {\n align: align,\n fixed: fixed,\n verticalAlign: verticalAlign\n });\n /**\n * 为分组中的第一列设置属性:\n * groupCount: 分组子项个数\n * groupHeader: 分组标题\n * resizable: 设置为不可自定义列宽\n */\n\n\n if (index === 0) {\n groupCellProps.groupCount = childColumns.length;\n groupCellProps.groupHeader = header;\n groupCellProps.resizable = false;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](childColumn, groupCellProps);\n });\n }\n\n return column;\n }); // 把 Columns 中的数组,展平为一维数组,计算 lastColumn 与 firstColumn。\n\n return lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(flattenColumns).filter(function (col) {\n return col;\n });\n };\n\n _proto.getCellDescriptor = function getCellDescriptor() {\n var _this2 = this;\n\n if (this._cacheCells) {\n return this._cacheCells;\n }\n\n var hasCustomTreeCol = false;\n var left = 0; // Cell left margin\n\n var headerCells = []; // Table header cell\n\n var bodyCells = []; // Table body cell\n\n var children = this.props.children;\n\n if (!children) {\n this._cacheCells = {\n headerCells: headerCells,\n bodyCells: bodyCells,\n hasCustomTreeCol: hasCustomTreeCol,\n allColumnsWidth: left\n };\n return this._cacheCells;\n }\n\n var columns = this.getTableColumns();\n var tableWidth = this.state.width;\n var _this$props17 = this.props,\n sortColumn = _this$props17.sortColumn,\n rowHeight = _this$props17.rowHeight,\n showHeader = _this$props17.showHeader;\n\n var _getTotalByColumns = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"getTotalByColumns\"])(columns),\n totalFlexGrow = _getTotalByColumns.totalFlexGrow,\n totalWidth = _getTotalByColumns.totalWidth;\n\n var headerHeight = this.getTableHeaderHeight();\n react__WEBPACK_IMPORTED_MODULE_3__[\"Children\"].forEach(columns, function (column, index) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"isValidElement\"](column)) {\n var columnChildren = column.props.children;\n var _column$props2 = column.props,\n width = _column$props2.width,\n resizable = _column$props2.resizable,\n flexGrow = _column$props2.flexGrow,\n minWidth = _column$props2.minWidth,\n onResize = _column$props2.onResize,\n treeCol = _column$props2.treeCol;\n\n if (treeCol) {\n hasCustomTreeCol = true;\n }\n\n if (resizable && flexGrow) {\n console.warn(\"Cannot set 'resizable' and 'flexGrow' together in <Column>, column index: \" + index);\n }\n\n if (columnChildren.length !== 2) {\n throw new Error(\"Component <HeaderCell> and <Cell> is required, column index: \" + index + \" \");\n }\n\n var nextWidth = _this2.state[columnChildren[1].props.dataKey + \"_\" + index + \"_width\"] || width || 0;\n\n if (tableWidth && flexGrow && totalFlexGrow) {\n nextWidth = Math.max((tableWidth - totalWidth) / totalFlexGrow * flexGrow, minWidth || 60);\n }\n\n var cellProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, lodash_omit__WEBPACK_IMPORTED_MODULE_11___default()(column.props, ['children']), {\n 'aria-colindex': index + 1,\n left: left,\n headerHeight: headerHeight,\n key: index,\n width: nextWidth,\n height: rowHeight,\n firstColumn: index === 0,\n lastColumn: index === columns.length - 1\n });\n\n if (showHeader && headerHeight) {\n var headerCellProps = {\n // index 用于拖拽列宽时候(Resizable column),定义的序号\n index: index,\n dataKey: columnChildren[1].props.dataKey,\n isHeaderCell: true,\n sortable: column.props.sortable,\n onSortColumn: _this2.handleSortColumn,\n sortType: _this2.getSortType(),\n sortColumn: sortColumn,\n flexGrow: flexGrow\n };\n\n if (resizable) {\n lodash_merge__WEBPACK_IMPORTED_MODULE_12___default()(headerCellProps, {\n onResize: onResize,\n onColumnResizeEnd: _this2.handleColumnResizeEnd,\n onColumnResizeStart: _this2.handleColumnResizeStart,\n onColumnResizeMove: _this2.handleColumnResizeMove\n });\n }\n\n headerCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](columnChildren[0], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, cellProps, headerCellProps)));\n }\n\n bodyCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](columnChildren[1], cellProps));\n left += nextWidth;\n }\n });\n return this._cacheCells = {\n headerCells: headerCells,\n bodyCells: bodyCells,\n allColumnsWidth: left,\n hasCustomTreeCol: hasCustomTreeCol\n };\n };\n\n _proto.initPosition = function initPosition() {\n var _this3 = this;\n\n if (this.isRTL()) {\n setTimeout(function () {\n var _this3$scrollbarXRef, _this3$scrollbarXRef$, _this3$scrollbarXRef$2;\n\n var _this3$state = _this3.state,\n contentWidth = _this3$state.contentWidth,\n width = _this3$state.width;\n _this3.scrollX = width - contentWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n\n _this3.updatePosition();\n\n (_this3$scrollbarXRef = _this3.scrollbarXRef) === null || _this3$scrollbarXRef === void 0 ? void 0 : (_this3$scrollbarXRef$ = _this3$scrollbarXRef.current) === null || _this3$scrollbarXRef$ === void 0 ? void 0 : (_this3$scrollbarXRef$2 = _this3$scrollbarXRef$.resetScrollBarPosition) === null || _this3$scrollbarXRef$2 === void 0 ? void 0 : _this3$scrollbarXRef$2.call(_this3$scrollbarXRef$, -_this3.scrollX);\n }, 0);\n }\n };\n\n _proto.updatePosition = function updatePosition() {\n var _this$tableHeaderRef;\n\n /**\n * 当存在锁定列情况处理\n */\n if (this.state.shouldFixedColumn) {\n this.updatePositionByFixedCell();\n } else {\n var _this$wheelWrapperRef, _this$headerWrapperRe2, _this$affixHeaderWrap, _affixHeaderElement$h;\n\n var wheelStyle = {};\n var headerStyle = {};\n this.translateDOMPositionXY(wheelStyle, this.scrollX, this.scrollY);\n this.translateDOMPositionXY(headerStyle, this.scrollX, 0);\n var wheelElement = (_this$wheelWrapperRef = this.wheelWrapperRef) === null || _this$wheelWrapperRef === void 0 ? void 0 : _this$wheelWrapperRef.current;\n var headerElement = (_this$headerWrapperRe2 = this.headerWrapperRef) === null || _this$headerWrapperRe2 === void 0 ? void 0 : _this$headerWrapperRe2.current;\n var affixHeaderElement = (_this$affixHeaderWrap = this.affixHeaderWrapperRef) === null || _this$affixHeaderWrap === void 0 ? void 0 : _this$affixHeaderWrap.current;\n wheelElement && Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(wheelElement, wheelStyle);\n headerElement && Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(headerElement, headerStyle);\n\n if (affixHeaderElement !== null && affixHeaderElement !== void 0 && (_affixHeaderElement$h = affixHeaderElement.hasChildNodes) !== null && _affixHeaderElement$h !== void 0 && _affixHeaderElement$h.call(affixHeaderElement)) {\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(affixHeaderElement.firstChild, headerStyle);\n }\n }\n\n if ((_this$tableHeaderRef = this.tableHeaderRef) !== null && _this$tableHeaderRef !== void 0 && _this$tableHeaderRef.current) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(this.tableHeaderRef.current, this.addPrefix('cell-group-shadow'), this.scrollY < 0);\n }\n };\n\n _proto.updatePositionByFixedCell = function updatePositionByFixedCell() {\n var _this$wheelWrapperRef2;\n\n var wheelGroupStyle = {};\n var wheelStyle = {};\n var scrollGroups = this.getScrollCellGroups();\n var fixedLeftGroups = this.getFixedLeftCellGroups();\n var fixedRightGroups = this.getFixedRightCellGroups();\n var _this$state4 = this.state,\n contentWidth = _this$state4.contentWidth,\n width = _this$state4.width;\n this.translateDOMPositionXY(wheelGroupStyle, this.scrollX, 0);\n this.translateDOMPositionXY(wheelStyle, 0, this.scrollY);\n var scrollArrayGroups = Array.from(scrollGroups);\n\n for (var i = 0; i < scrollArrayGroups.length; i++) {\n var group = scrollArrayGroups[i];\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(group, wheelGroupStyle);\n }\n\n if ((_this$wheelWrapperRef2 = this.wheelWrapperRef) !== null && _this$wheelWrapperRef2 !== void 0 && _this$wheelWrapperRef2.current) {\n Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"addStyle\"])(this.wheelWrapperRef.current, wheelStyle);\n }\n\n var leftShadowClassName = this.addPrefix('cell-group-left-shadow');\n var rightShadowClassName = this.addPrefix('cell-group-right-shadow');\n var showLeftShadow = this.scrollX < 0;\n var showRightShadow = width - contentWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"] !== this.scrollX;\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(fixedLeftGroups, leftShadowClassName, showLeftShadow);\n Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"toggleClass\"])(fixedRightGroups, rightShadowClassName, showRightShadow);\n };\n\n _proto.shouldRenderExpandedRow = function shouldRenderExpandedRow(rowData) {\n var _this$props18 = this.props,\n rowKey = _this$props18.rowKey,\n renderRowExpanded = _this$props18.renderRowExpanded,\n isTree = _this$props18.isTree;\n var expandedRowKeys = this.getExpandedRowKeys() || [];\n return lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(renderRowExpanded) && !isTree && expandedRowKeys.some(function (key) {\n return key === rowData[rowKey];\n });\n };\n\n _proto.calculateRowMaxHeight = function calculateRowMaxHeight() {\n var wordWrap = this.props.wordWrap;\n\n if (wordWrap) {\n var tableRowsMaxHeight = [];\n var tableRows = Object.values(this.tableRows);\n\n for (var i = 0; i < tableRows.length; i++) {\n var _tableRows$i = tableRows[i],\n row = _tableRows$i[0];\n\n if (row) {\n var cells = row.querySelectorAll(\".\" + this.addPrefix('cell-wrap')) || [];\n var cellArray = Array.from(cells);\n var maxHeight = 0;\n\n for (var j = 0; j < cellArray.length; j++) {\n var cell = cellArray[j];\n var h = Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(cell);\n maxHeight = Math.max(maxHeight, h);\n }\n\n tableRowsMaxHeight.push(maxHeight);\n }\n }\n\n this.setState({\n tableRowsMaxHeight: tableRowsMaxHeight\n });\n }\n };\n\n _proto.calculateTableContentWidth = function calculateTableContentWidth(prevProps) {\n var _this$tableRef3;\n\n var table = (_this$tableRef3 = this.tableRef) === null || _this$tableRef3 === void 0 ? void 0 : _this$tableRef3.current;\n var row = table.querySelector(\".\" + this.addPrefix('row') + \":not(.virtualized)\");\n var contentWidth = row ? Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getWidth\"])(row) : 0;\n this.setState({\n contentWidth: contentWidth\n }); // 这里 -SCROLLBAR_WIDTH 是为了让滚动条不挡住内容部分\n\n this.minScrollX = -(contentWidth - this.state.width) - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n /**\n * 1.判断 Table 列数是否发生变化\n * 2.判断 Table 内容区域是否宽度有变化\n *\n * 满足 1 和 2 则更新横向滚动条位置\n */\n\n if (lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(this.props.children).length !== lodash_flatten__WEBPACK_IMPORTED_MODULE_7___default()(prevProps.children).length && this.state.contentWidth !== contentWidth) {\n this.scrollLeft(0);\n }\n };\n\n _proto.calculateTableContextHeight = function calculateTableContextHeight(prevProps) {\n var table = this.tableRef.current;\n var rows = table.querySelectorAll(\".\" + this.addPrefix('row')) || [];\n var _this$props19 = this.props,\n height = _this$props19.height,\n autoHeight = _this$props19.autoHeight,\n rowHeight = _this$props19.rowHeight,\n affixHeader = _this$props19.affixHeader;\n var headerHeight = this.getTableHeaderHeight();\n var contentHeight = rows.length ? Array.from(rows).map(function (row) {\n return Object(dom_lib__WEBPACK_IMPORTED_MODULE_15__[\"getHeight\"])(row) || rowHeight;\n }).reduce(function (x, y) {\n return x + y;\n }) : 0; // 当设置 affixHeader 属性后要减掉两个 header 的高度\n\n var nextContentHeight = contentHeight - (affixHeader ? headerHeight * 2 : headerHeight);\n\n if (nextContentHeight !== this.state.contentHeight) {\n this.setState({\n contentHeight: nextContentHeight\n });\n }\n\n if (prevProps && ( // 当 data 更新,或者表格高度更新,则更新滚动条\n prevProps.height !== height || prevProps.data !== this.props.data) && this.scrollY !== 0) {\n this.scrollTop(Math.abs(this.scrollY));\n this.updatePosition();\n }\n\n if (!autoHeight) {\n // 这里 -SCROLLBAR_WIDTH 是为了让滚动条不挡住内容部分\n this.minScrollY = -(contentHeight - height) - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"];\n } // 如果内容区域的高度小于表格的高度,则重置 Y 坐标滚动条\n\n\n if (contentHeight < height) {\n this.scrollTop(0);\n } // 如果 scrollTop 的值大于可以滚动的范围 ,则重置 Y 坐标滚动条\n // 当 Table 为 virtualized 时, wheel 事件触发每次都会进入该逻辑, 避免在滚动到底部后滚动条重置, +SCROLLBAR_WIDTH\n\n\n if (Math.abs(this.scrollY) + height - headerHeight > nextContentHeight + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]) {\n this.scrollTop(this.scrollY);\n }\n };\n\n _proto.getControlledScrollTopValue = function getControlledScrollTopValue(value) {\n if (this.props.autoHeight) {\n return [0, 0];\n }\n\n var contentHeight = this.state.contentHeight;\n var headerHeight = this.getTableHeaderHeight();\n var height = this.getTableHeight(); // 滚动值的最大范围判断\n\n value = Math.min(value, Math.max(0, contentHeight - (height - headerHeight))); // value 值是表格理论滚动位置的一个值,通过 value 计算出 scrollY 坐标值与滚动条位置的值\n\n return [-value, value / contentHeight * (height - headerHeight)];\n };\n\n _proto.getControlledScrollLeftValue = function getControlledScrollLeftValue(value) {\n var _this$state5 = this.state,\n contentWidth = _this$state5.contentWidth,\n width = _this$state5.width; // 滚动值的最大范围判断\n\n value = Math.min(value, Math.max(0, contentWidth - width));\n return [-value, value / contentWidth * width];\n }\n /**\n * public method\n */\n ;\n\n _proto.renderRowData = function renderRowData(bodyCells, rowData, props, shouldRenderExpandedRow) {\n var _this$props20 = this.props,\n renderTreeToggle = _this$props20.renderTreeToggle,\n rowKey = _this$props20.rowKey,\n wordWrap = _this$props20.wordWrap,\n isTree = _this$props20.isTree;\n var hasChildren = isTree && rowData.children && Array.isArray(rowData.children);\n var nextRowKey = typeof rowData[rowKey] !== 'undefined' ? rowData[rowKey] : props.key;\n\n var rowProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, props, {\n key: nextRowKey,\n 'aria-rowindex': props.key + 2,\n rowRef: this.bindTableRowsRef(props.key, rowData),\n onClick: this.bindRowClick(rowData),\n onContextMenu: this.bindRowContextMenu(rowData)\n });\n\n var expandedRowKeys = this.getExpandedRowKeys() || [];\n var expanded = expandedRowKeys.some(function (key) {\n return key === rowData[rowKey];\n });\n var cells = [];\n\n for (var i = 0; i < bodyCells.length; i++) {\n var cell = bodyCells[i];\n cells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](cell, {\n hasChildren: hasChildren,\n rowData: rowData,\n wordWrap: wordWrap,\n renderTreeToggle: renderTreeToggle,\n height: props.height,\n rowIndex: props.key,\n depth: props.depth,\n onTreeToggle: this.handleTreeToggle,\n rowKey: nextRowKey,\n expanded: expanded\n }));\n }\n\n return this.renderRow(rowProps, cells, shouldRenderExpandedRow, rowData);\n };\n\n _proto.renderRow = function renderRow(props, cells, shouldRenderExpandedRow, rowData) {\n var rowClassName = this.props.rowClassName;\n var _this$state6 = this.state,\n shouldFixedColumn = _this$state6.shouldFixedColumn,\n width = _this$state6.width,\n contentWidth = _this$state6.contentWidth;\n\n var depth = props.depth,\n restRowProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"depth\"]);\n\n if (typeof rowClassName === 'function') {\n restRowProps.className = rowClassName(rowData);\n } else {\n restRowProps.className = rowClassName;\n }\n\n var rowStyles = {};\n var rowRight = 0;\n\n if (this.isRTL() && contentWidth > width) {\n rowRight = width - contentWidth;\n rowStyles.right = rowRight;\n } // IF there are fixed columns, add a fixed group\n\n\n if (shouldFixedColumn && contentWidth > width) {\n var fixedLeftCells = [];\n var fixedRightCells = [];\n var scrollCells = [];\n var fixedLeftCellGroupWidth = 0;\n var fixedRightCellGroupWidth = 0;\n\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n var _cell$props = cell.props,\n fixed = _cell$props.fixed,\n _width2 = _cell$props.width;\n var isFixedStart = fixed === 'left' || fixed === true;\n var isFixedEnd = fixed === 'right';\n\n if (this.isRTL()) {\n isFixedStart = fixed === 'right';\n isFixedEnd = fixed === 'left' || fixed === true;\n }\n\n if (isFixedStart) {\n fixedLeftCells.push(cell);\n fixedLeftCellGroupWidth += _width2;\n } else if (isFixedEnd) {\n fixedRightCells.push(cell);\n fixedRightCellGroupWidth += _width2;\n } else {\n scrollCells.push(cell);\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, restRowProps, {\n \"data-depth\": depth,\n style: rowStyles\n }), fixedLeftCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n fixed: \"left\",\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedLeftCellGroupWidth,\n style: this.isRTL() ? {\n right: width - fixedLeftCellGroupWidth - rowRight\n } : null\n }, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"resetLeftForCells\"])(fixedLeftCells))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(scrollCells)), fixedRightCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n fixed: \"right\",\n style: this.isRTL() ? {\n right: 0 - rowRight\n } : {\n left: width - fixedRightCellGroupWidth - _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]\n },\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedRightCellGroupWidth + _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]\n }, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"resetLeftForCells\"])(fixedRightCells, _constants__WEBPACK_IMPORTED_MODULE_20__[\"SCROLLBAR_WIDTH\"]))) : null, shouldRenderExpandedRow && this.renderRowExpanded(rowData));\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, restRowProps, {\n \"data-depth\": depth,\n style: rowStyles\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_CellGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"], null, Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"mergeCells\"])(cells)), shouldRenderExpandedRow && this.renderRowExpanded(rowData));\n };\n\n _proto.renderRowExpanded = function renderRowExpanded(rowData) {\n var _this$props21 = this.props,\n renderRowExpanded = _this$props21.renderRowExpanded,\n rowExpandedHeight = _this$props21.rowExpandedHeight;\n var styles = {\n height: rowExpandedHeight\n };\n\n if (typeof renderRowExpanded === 'function') {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('row-expanded'),\n style: styles\n }, renderRowExpanded(rowData));\n }\n\n return null;\n };\n\n _proto.renderMouseArea = function renderMouseArea() {\n var headerHeight = this.getTableHeaderHeight();\n var styles = {\n height: this.getTableHeight()\n };\n var spanStyles = {\n height: headerHeight - 1\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.mouseAreaRef,\n className: this.addPrefix('mouse-area'),\n style: styles\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n style: spanStyles\n }));\n };\n\n _proto.renderTableHeader = function renderTableHeader(headerCells, rowWidth) {\n var affixHeader = this.props.affixHeader;\n var tableWidth = this.state.width;\n var top = typeof affixHeader === 'number' ? affixHeader : 0;\n var headerHeight = this.getTableHeaderHeight();\n var rowProps = {\n 'aria-rowindex': 1,\n rowRef: this.tableHeaderRef,\n width: rowWidth,\n height: this.getRowHeight(),\n headerHeight: headerHeight,\n isHeaderRow: true,\n top: 0\n };\n var fixedStyle = {\n position: 'fixed',\n overflow: 'hidden',\n height: this.getTableHeaderHeight(),\n width: tableWidth,\n top: top\n }; // Affix header\n\n var header = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_5___default()(this.addPrefix('affix-header')),\n style: fixedStyle,\n ref: this.affixHeaderWrapperRef\n }, this.renderRow(rowProps, headerCells));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_3__[\"Fragment\"], null, (affixHeader === 0 || affixHeader) && header, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n role: \"rowgroup\",\n className: this.addPrefix('header-row-wrapper'),\n ref: this.headerWrapperRef\n }, this.renderRow(rowProps, headerCells)));\n };\n\n _proto.renderTableBody = function renderTableBody(bodyCells, rowWidth) {\n var _this$props22 = this.props,\n rowExpandedHeight = _this$props22.rowExpandedHeight,\n renderRowExpanded = _this$props22.renderRowExpanded,\n isTree = _this$props22.isTree,\n rowKey = _this$props22.rowKey,\n wordWrap = _this$props22.wordWrap,\n virtualized = _this$props22.virtualized,\n rowHeight = _this$props22.rowHeight;\n var headerHeight = this.getTableHeaderHeight();\n var _this$state7 = this.state,\n tableRowsMaxHeight = _this$state7.tableRowsMaxHeight,\n isScrolling = _this$state7.isScrolling,\n data = _this$state7.data;\n var height = this.getTableHeight();\n var bodyHeight = height - headerHeight;\n var bodyStyles = {\n top: headerHeight,\n height: bodyHeight\n };\n var contentHeight = 0;\n var topHideHeight = 0;\n var bottomHideHeight = 0;\n this._visibleRows = [];\n\n if (data) {\n var top = 0; // Row position\n\n var minTop = Math.abs(this.scrollY);\n var maxTop = minTop + height + rowExpandedHeight;\n var isCustomRowHeight = typeof rowHeight === 'function';\n var isUncertainHeight = !!(renderRowExpanded || isCustomRowHeight || isTree);\n /**\n 如果开启了 virtualized 同时 Table 中的的行高是可变的,\n 则需要循环遍历 data, 获取每一行的高度。\n */\n\n if (isUncertainHeight && virtualized || !virtualized) {\n for (var index = 0; index < data.length; index++) {\n var rowData = data[index];\n var maxHeight = tableRowsMaxHeight[index];\n var shouldRenderExpandedRow = this.shouldRenderExpandedRow(rowData);\n var nextRowHeight = 0;\n var depth = 0;\n\n if (typeof rowHeight === 'function') {\n nextRowHeight = rowHeight(rowData);\n } else {\n nextRowHeight = maxHeight ? Math.max(maxHeight + _constants__WEBPACK_IMPORTED_MODULE_20__[\"CELL_PADDING_HEIGHT\"], rowHeight) : rowHeight;\n\n if (shouldRenderExpandedRow) {\n nextRowHeight += rowExpandedHeight;\n }\n }\n\n if (isTree) {\n var parents = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"findAllParents\"])(rowData, rowKey);\n var expandedRowKeys = this.getExpandedRowKeys();\n depth = parents.length; // 如果是 Tree Table, 判断当前的行是否展开/折叠,如果是折叠则不显示该行。\n\n if (!Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"shouldShowRowByExpanded\"])(expandedRowKeys, parents)) {\n continue;\n }\n }\n\n contentHeight += nextRowHeight;\n var rowProps = {\n key: index,\n top: top,\n width: rowWidth,\n depth: depth,\n height: nextRowHeight\n };\n top += nextRowHeight;\n\n if (virtualized && !wordWrap) {\n if (top + nextRowHeight < minTop) {\n topHideHeight += nextRowHeight;\n continue;\n } else if (top > maxTop) {\n bottomHideHeight += nextRowHeight;\n continue;\n }\n }\n\n this._visibleRows.push(this.renderRowData(bodyCells, rowData, rowProps, shouldRenderExpandedRow));\n }\n } else {\n /**\n 如果 Table 的行高是固定的,则直接通过行高与行数进行计算,\n 减少遍历所有 data 带来的性能消耗\n */\n var _nextRowHeight = this.getRowHeight();\n\n var startIndex = Math.max(Math.floor(minTop / _nextRowHeight), 0);\n var endIndex = Math.min(startIndex + Math.ceil(bodyHeight / _nextRowHeight), data.length);\n contentHeight = data.length * _nextRowHeight;\n topHideHeight = startIndex * _nextRowHeight;\n bottomHideHeight = (data.length - endIndex) * _nextRowHeight;\n\n for (var _index = startIndex; _index < endIndex; _index++) {\n var _rowData = data[_index];\n var _rowProps = {\n key: _index,\n top: _index * _nextRowHeight,\n width: rowWidth,\n height: _nextRowHeight\n };\n\n this._visibleRows.push(this.renderRowData(bodyCells, _rowData, _rowProps, false));\n }\n }\n }\n\n var wheelStyles = {\n position: 'absolute',\n height: contentHeight,\n minHeight: height,\n pointerEvents: isScrolling ? 'none' : undefined\n };\n var topRowStyles = {\n height: topHideHeight\n };\n var bottomRowStyles = {\n height: bottomHideHeight\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n ref: this.tableBodyRef,\n role: \"rowgroup\",\n className: this.addPrefix('body-row-wrapper'),\n style: bodyStyles,\n onScroll: this.handleBodyScroll\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n style: wheelStyles,\n className: this.addPrefix('body-wheel-area'),\n ref: this.wheelWrapperRef\n }, topHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n style: topRowStyles,\n className: \"virtualized\"\n }) : null, this._visibleRows, bottomHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Row__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n style: bottomRowStyles,\n className: \"virtualized\"\n }) : null), this.renderInfo(), this.renderScrollbar(), this.renderLoading());\n };\n\n _proto.renderInfo = function renderInfo() {\n var _this$props23 = this.props,\n locale = _this$props23.locale,\n renderEmpty = _this$props23.renderEmpty,\n loading = _this$props23.loading;\n\n if (this._visibleRows.length || loading) {\n return null;\n }\n\n var emptyMessage = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('body-info')\n }, locale.emptyMessage);\n return renderEmpty ? renderEmpty(emptyMessage) : emptyMessage;\n };\n\n _proto.renderScrollbar = function renderScrollbar() {\n var _this$props24 = this.props,\n disabledScroll = _this$props24.disabledScroll,\n affixHorizontalScrollbar = _this$props24.affixHorizontalScrollbar,\n id = _this$props24.id;\n var _this$state8 = this.state,\n contentWidth = _this$state8.contentWidth,\n contentHeight = _this$state8.contentHeight,\n width = _this$state8.width,\n fixedHorizontalScrollbar = _this$state8.fixedHorizontalScrollbar;\n var bottom = typeof affixHorizontalScrollbar === 'number' ? affixHorizontalScrollbar : 0;\n var headerHeight = this.getTableHeaderHeight();\n var height = this.getTableHeight();\n\n if (disabledScroll) {\n return null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Scrollbar__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n tableId: id,\n className: classnames__WEBPACK_IMPORTED_MODULE_5___default()({\n fixed: fixedHorizontalScrollbar\n }),\n style: {\n width: width,\n bottom: fixedHorizontalScrollbar ? bottom : undefined\n },\n length: this.state.width,\n onScroll: this.handleScrollX,\n scrollLength: contentWidth,\n ref: this.scrollbarXRef\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Scrollbar__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n vertical: true,\n tableId: id,\n length: height - headerHeight,\n scrollLength: contentHeight,\n onScroll: this.handleScrollY,\n ref: this.scrollbarYRef\n }));\n }\n /**\n * show loading\n */\n ;\n\n _proto.renderLoading = function renderLoading() {\n var _this$props25 = this.props,\n locale = _this$props25.locale,\n loading = _this$props25.loading,\n loadAnimation = _this$props25.loadAnimation,\n renderLoading = _this$props25.renderLoading;\n\n if (!loadAnimation && !loading) {\n return null;\n }\n\n var loadingElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader-wrapper')\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: this.addPrefix('loader')\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"i\", {\n className: this.addPrefix('loader-icon')\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n className: this.addPrefix('loader-text')\n }, locale.loading)));\n return renderLoading ? renderLoading(loadingElement) : loadingElement;\n };\n\n _proto.render = function render() {\n var _classNames;\n\n var _this$props26 = this.props,\n children = _this$props26.children,\n className = _this$props26.className,\n data = _this$props26.data,\n _this$props26$width = _this$props26.width,\n width = _this$props26$width === void 0 ? 0 : _this$props26$width,\n style = _this$props26.style,\n isTree = _this$props26.isTree,\n hover = _this$props26.hover,\n bordered = _this$props26.bordered,\n cellBordered = _this$props26.cellBordered,\n wordWrap = _this$props26.wordWrap,\n classPrefix = _this$props26.classPrefix,\n loading = _this$props26.loading,\n showHeader = _this$props26.showHeader,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_this$props26, [\"children\", \"className\", \"data\", \"width\", \"style\", \"isTree\", \"hover\", \"bordered\", \"cellBordered\", \"wordWrap\", \"classPrefix\", \"loading\", \"showHeader\"]);\n\n var isColumnResizing = this.state.isColumnResizing;\n\n var _this$getCellDescript = this.getCellDescriptor(),\n headerCells = _this$getCellDescript.headerCells,\n bodyCells = _this$getCellDescript.bodyCells,\n allColumnsWidth = _this$getCellDescript.allColumnsWidth,\n hasCustomTreeCol = _this$getCellDescript.hasCustomTreeCol;\n\n var rowWidth = allColumnsWidth > width ? allColumnsWidth : width;\n var clesses = classnames__WEBPACK_IMPORTED_MODULE_5___default()(classPrefix, className, (_classNames = {}, _classNames[this.addPrefix('word-wrap')] = wordWrap, _classNames[this.addPrefix('treetable')] = isTree, _classNames[this.addPrefix('bordered')] = bordered, _classNames[this.addPrefix('cell-bordered')] = cellBordered, _classNames[this.addPrefix('column-resizing')] = isColumnResizing, _classNames[this.addPrefix('hover')] = hover, _classNames[this.addPrefix('loading')] = loading, _classNames));\n\n var styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n width: width || 'auto',\n height: this.getTableHeight()\n }, style);\n\n var unhandled = Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"getUnhandledProps\"])(propTypes, rest);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_TableContext__WEBPACK_IMPORTED_MODULE_19__[\"default\"].Provider, {\n value: {\n translateDOMPositionXY: this.translateDOMPositionXY,\n rtl: this.isRTL(),\n isTree: isTree,\n hasCustomTreeCol: hasCustomTreeCol\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n role: isTree ? 'treegrid' : 'grid' // The aria-rowcount is specified on the element with the table.\n // Its value is an integer equal to the total number of rows available, including header rows.\n ,\n \"aria-rowcount\": data.length + 1,\n \"aria-colcount\": this._cacheChildrenSize\n }, unhandled, {\n className: clesses,\n style: styles,\n ref: this.tableRef\n }), showHeader && this.renderTableHeader(headerCells, rowWidth), children && this.renderTableBody(bodyCells, rowWidth), showHeader && this.renderMouseArea()));\n };\n\n return Table;\n}(react__WEBPACK_IMPORTED_MODULE_3__[\"Component\"]);\n\nTable.propTypes = propTypes;\nTable.defaultProps = {\n classPrefix: Object(_utils__WEBPACK_IMPORTED_MODULE_21__[\"defaultClassPrefix\"])('table'),\n data: [],\n defaultSortType: SORT_TYPE.DESC,\n height: 200,\n rowHeight: 46,\n headerHeight: 40,\n minHeight: 0,\n rowExpandedHeight: 100,\n hover: true,\n showHeader: true,\n rowKey: 'key',\n translate3d: true,\n shouldUpdateScroll: true,\n locale: {\n emptyMessage: 'No data found',\n loading: 'Loading...'\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Table);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/Table.js?");
|
|
5757
5174
|
|
|
5758
5175
|
/***/ }),
|
|
5759
5176
|
|
|
@@ -5861,7 +5278,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
5861
5278
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5862
5279
|
|
|
5863
5280
|
"use strict";
|
|
5864
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Returns an object consisting of props beyond the scope of the Component.\n * Useful for getting and spreading unknown props from the user.\n * @param {
|
|
5281
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Returns an object consisting of props beyond the scope of the Component.\n * Useful for getting and spreading unknown props from the user.\n * @param {object} propTypes\n * @param {object} props A ReactElement props object\n * @returns {{}} A shallow copy of the prop object\n */\nvar getUnhandledProps = function getUnhandledProps(propTypes, props) {\n var propTypeKeys = Object.keys(propTypes);\n return Object.keys(props).reduce(function (acc, prop) {\n if (prop === 'childKey') {\n return acc;\n }\n\n if (propTypeKeys.length > 0 && propTypeKeys.indexOf(prop) === -1) {\n acc[prop] = props[prop];\n }\n\n return acc;\n }, {});\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getUnhandledProps);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/getUnhandledProps.js?");
|
|
5865
5282
|
|
|
5866
5283
|
/***/ }),
|
|
5867
5284
|
|
|
@@ -5869,11 +5286,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Returns an object con
|
|
|
5869
5286
|
/*!*****************************************************!*\
|
|
5870
5287
|
!*** ./node_modules/rsuite-table/es/utils/index.js ***!
|
|
5871
5288
|
\*****************************************************/
|
|
5872
|
-
/*! exports provided: globalKey,
|
|
5289
|
+
/*! exports provided: globalKey, defaultClassPrefix, prefix, getClassNamePrefix, isNullOrUndefined, getUnhandledProps, getTotalByColumns, mergeCells, toggleClass, toggle, flattenData, translateDOMPositionXY, isRTL, findRowKeys, findAllParents, shouldShowRowByExpanded, resetLeftForCells, isNumberOrTrue, cancelAnimationTimeout, requestAnimationTimeout */
|
|
5873
5290
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5874
5291
|
|
|
5875
5292
|
"use strict";
|
|
5876
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _prefix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./prefix */ \"./node_modules/rsuite-table/es/utils/prefix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"globalKey\", function() { return _prefix__WEBPACK_IMPORTED_MODULE_0__[\"globalKey\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"
|
|
5293
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _prefix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./prefix */ \"./node_modules/rsuite-table/es/utils/prefix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"globalKey\", function() { return _prefix__WEBPACK_IMPORTED_MODULE_0__[\"globalKey\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"defaultClassPrefix\", function() { return _prefix__WEBPACK_IMPORTED_MODULE_0__[\"defaultClassPrefix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"prefix\", function() { return _prefix__WEBPACK_IMPORTED_MODULE_0__[\"prefix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getClassNamePrefix\", function() { return _prefix__WEBPACK_IMPORTED_MODULE_0__[\"getClassNamePrefix\"]; });\n\n/* harmony import */ var _isNullOrUndefined__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isNullOrUndefined */ \"./node_modules/rsuite-table/es/utils/isNullOrUndefined.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isNullOrUndefined\", function() { return _isNullOrUndefined__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _getUnhandledProps__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getUnhandledProps */ \"./node_modules/rsuite-table/es/utils/getUnhandledProps.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getUnhandledProps\", function() { return _getUnhandledProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _getTotalByColumns__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getTotalByColumns */ \"./node_modules/rsuite-table/es/utils/getTotalByColumns.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getTotalByColumns\", function() { return _getTotalByColumns__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _mergeCells__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mergeCells */ \"./node_modules/rsuite-table/es/utils/mergeCells.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mergeCells\", function() { return _mergeCells__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _toggleClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./toggleClass */ \"./node_modules/rsuite-table/es/utils/toggleClass.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toggleClass\", function() { return _toggleClass__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _toggle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./toggle */ \"./node_modules/rsuite-table/es/utils/toggle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toggle\", function() { return _toggle__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _flattenData__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./flattenData */ \"./node_modules/rsuite-table/es/utils/flattenData.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flattenData\", function() { return _flattenData__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./translateDOMPositionXY */ \"./node_modules/rsuite-table/es/utils/translateDOMPositionXY.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"translateDOMPositionXY\", function() { return _translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _isRTL__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./isRTL */ \"./node_modules/rsuite-table/es/utils/isRTL.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isRTL\", function() { return _isRTL__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _findRowKeys__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./findRowKeys */ \"./node_modules/rsuite-table/es/utils/findRowKeys.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findRowKeys\", function() { return _findRowKeys__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _findAllParents__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./findAllParents */ \"./node_modules/rsuite-table/es/utils/findAllParents.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"findAllParents\", function() { return _findAllParents__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _shouldShowRowByExpanded__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./shouldShowRowByExpanded */ \"./node_modules/rsuite-table/es/utils/shouldShowRowByExpanded.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shouldShowRowByExpanded\", function() { return _shouldShowRowByExpanded__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _resetLeftForCells__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./resetLeftForCells */ \"./node_modules/rsuite-table/es/utils/resetLeftForCells.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"resetLeftForCells\", function() { return _resetLeftForCells__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _isNumberOrTrue__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./isNumberOrTrue */ \"./node_modules/rsuite-table/es/utils/isNumberOrTrue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isNumberOrTrue\", function() { return _isNumberOrTrue__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./requestAnimationTimeout */ \"./node_modules/rsuite-table/es/utils/requestAnimationTimeout.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cancelAnimationTimeout\", function() { return _requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_15__[\"cancelAnimationTimeout\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"requestAnimationTimeout\", function() { return _requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_15__[\"requestAnimationTimeout\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/index.js?");
|
|
5877
5294
|
|
|
5878
5295
|
/***/ }),
|
|
5879
5296
|
|
|
@@ -5921,7 +5338,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
5921
5338
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5922
5339
|
|
|
5923
5340
|
"use strict";
|
|
5924
|
-
eval("__webpack_require__.r(__webpack_exports__);\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/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isFunction */ \"./node_modules/rsuite-table/node_modules/lodash/isFunction.js\");\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/get */ \"./node_modules/rsuite-table/node_modules/lodash/get.js\");\n/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _ColumnGroup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ColumnGroup */ \"./node_modules/rsuite-table/es/ColumnGroup.js\");\n/* harmony import */ var
|
|
5341
|
+
eval("__webpack_require__.r(__webpack_exports__);\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/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isFunction */ \"./node_modules/rsuite-table/node_modules/lodash/isFunction.js\");\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/get */ \"./node_modules/rsuite-table/node_modules/lodash/get.js\");\n/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _ColumnGroup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ColumnGroup */ \"./node_modules/rsuite-table/es/ColumnGroup.js\");\n/* harmony import */ var _HeaderCell__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../HeaderCell */ \"./node_modules/rsuite-table/es/HeaderCell.js\");\n/* harmony import */ var _isNullOrUndefined__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isNullOrUndefined */ \"./node_modules/rsuite-table/es/utils/isNullOrUndefined.js\");\n\n\n\n\n\n\n\nfunction cloneCell(Cell, props) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"](Cell, props);\n}\n\nfunction mergeCells(cells) {\n var nextCells = [];\n\n for (var i = 0; i < cells.length; i += 1) {\n var _cells$i$props = cells[i].props,\n width = _cells$i$props.width,\n colSpan = _cells$i$props.colSpan,\n groupCount = _cells$i$props.groupCount,\n groupHeader = _cells$i$props.groupHeader,\n isHeaderCell = _cells$i$props.isHeaderCell,\n headerHeight = _cells$i$props.headerHeight,\n verticalAlign = _cells$i$props.verticalAlign;\n var groupChildren = [];\n /**\n * 为列头添加分组\n */\n\n if (groupCount && isHeaderCell) {\n var nextWidth = width;\n var left = 0;\n\n for (var j = 0; j < groupCount; j += 1) {\n var nextCell = cells[i + j];\n var _nextCell$props = nextCell.props,\n nextCellWidth = _nextCell$props.width,\n sortable = _nextCell$props.sortable,\n children = _nextCell$props.children,\n dataKey = _nextCell$props.dataKey,\n onSortColumn = _nextCell$props.onSortColumn,\n sortColumn = _nextCell$props.sortColumn,\n sortType = _nextCell$props.sortType;\n\n if (j !== 0) {\n nextWidth += nextCellWidth;\n left += cells[i + j - 1].props.width;\n cells[i + j] = cloneCell(nextCell, {\n removed: true\n });\n }\n\n groupChildren.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_HeaderCell__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n key: j,\n left: left,\n dataKey: dataKey,\n width: nextCellWidth,\n sortable: sortable,\n sortColumn: sortColumn,\n sortType: sortType,\n onSortColumn: onSortColumn\n }, children));\n }\n\n nextCells.push(cloneCell(cells[i], {\n width: nextWidth,\n children: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ColumnGroup__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n width: nextWidth,\n headerHeight: headerHeight,\n header: groupHeader,\n verticalAlign: verticalAlign\n }, groupChildren)\n }));\n continue;\n } else if (colSpan) {\n /**\n * 如果存在 colSpan 属性,就去找它的下一个 Cell,\n * 看看值是否是 isNullOrUndefined,,如果为空这可以合并这个单元格\n */\n var _nextWidth = width;\n\n for (var _j = 0; _j < colSpan; _j += 1) {\n var _nextCell = cells[i + _j];\n\n if (_nextCell) {\n var _nextCell$props2 = _nextCell.props,\n rowData = _nextCell$props2.rowData,\n rowIndex = _nextCell$props2.rowIndex,\n _children = _nextCell$props2.children,\n colSpanWidth = _nextCell$props2.width,\n _isHeaderCell = _nextCell$props2.isHeaderCell,\n _dataKey = _nextCell$props2.dataKey;\n var cellText = lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(_children) ? _children(rowData, rowIndex) : lodash_get__WEBPACK_IMPORTED_MODULE_2___default()(rowData, _dataKey);\n\n if (rowData && Object(_isNullOrUndefined__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(cellText) || _isHeaderCell && Object(_isNullOrUndefined__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_children)) {\n _nextWidth += colSpanWidth;\n cells[i + _j] = cloneCell(_nextCell, {\n removed: true\n });\n }\n }\n }\n\n nextCells.push(cloneCell(cells[i], {\n width: _nextWidth,\n 'aria-colspan': colSpan && _nextWidth > width ? colSpan : undefined\n }));\n continue;\n }\n\n nextCells.push(cells[i]);\n }\n\n return nextCells;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (mergeCells);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/mergeCells.js?");
|
|
5925
5342
|
|
|
5926
5343
|
/***/ }),
|
|
5927
5344
|
|
|
@@ -8326,7 +7743,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
|
|
|
8326
7743
|
/***/ (function(module, exports, __webpack_require__) {
|
|
8327
7744
|
|
|
8328
7745
|
"use strict";
|
|
8329
|
-
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 _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\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 _isNil2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _isFunction2 = _interopRequireDefault(__webpack_require__(/*! lodash/isFunction */ \"./node_modules/lodash/isFunction.js\"));\n\nvar _isNumber2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNumber */ \"./node_modules/lodash/isNumber.js\"));\n\nvar _isString2 = _interopRequireDefault(__webpack_require__(/*! lodash/isString */ \"./node_modules/lodash/isString.js\"));\n\nvar _isEmpty2 = _interopRequireDefault(__webpack_require__(/*! lodash/isEmpty */ \"./node_modules/lodash/isEmpty.js\"));\n\nvar _isUndefined2 = _interopRequireDefault(__webpack_require__(/*! lodash/isUndefined */ \"./node_modules/lodash/isUndefined.js\"));\n\nvar _isArray2 = _interopRequireDefault(__webpack_require__(/*! lodash/isArray */ \"./node_modules/lodash/isArray.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 _List = _interopRequireDefault(__webpack_require__(/*! react-virtualized/dist/commonjs/List */ \"./node_modules/react-virtualized/dist/commonjs/List/index.js\"));\n\nvar _AutoSizer = _interopRequireDefault(__webpack_require__(/*! react-virtualized/dist/commonjs/AutoSizer */ \"./node_modules/react-virtualized/dist/commonjs/AutoSizer/index.js\"));\n\nvar _CellMeasurer = __webpack_require__(/*! react-virtualized/dist/commonjs/CellMeasurer */ \"./node_modules/react-virtualized/dist/commonjs/CellMeasurer/index.js\");\n\nvar _reactLifecyclesCompat = __webpack_require__(/*! react-lifecycles-compat */ \"./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\n\nvar _shallowEqual = _interopRequireDefault(__webpack_require__(/*! ../utils/shallowEqual */ \"./src/utils/shallowEqual.ts\"));\n\nvar _CheckTreeNode = _interopRequireDefault(__webpack_require__(/*! ./CheckTreeNode */ \"./src/CheckTreePicker/CheckTreeNode.tsx\"));\n\nvar _constants = __webpack_require__(/*! ../constants */ \"./src/constants.ts\");\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _Picker = __webpack_require__(/*! ../Picker */ \"./src/Picker/index.ts\");\n\nvar _utils2 = __webpack_require__(/*! ./utils */ \"./src/CheckTreePicker/utils.ts\");\n\nvar _treeUtils = __webpack_require__(/*! ../utils/treeUtils */ \"./src/utils/treeUtils.ts\");\n\nvar _propTypes2 = __webpack_require__(/*! ../Picker/propTypes */ \"./src/Picker/propTypes.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/CheckTreePicker/CheckTreePicker.tsx\";\n// default value for virtualized\nvar defaultHeight = 360;\nvar defaultWidth = 200;\n\nvar CheckTreePicker =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(CheckTreePicker, _React$Component);\n\n function CheckTreePicker(_props) {\n var _this;\n\n _this = _React$Component.call(this, _props) || this;\n _this.menuRef = void 0;\n _this.treeViewRef = void 0;\n _this.positionRef = void 0;\n _this.listRef = void 0;\n _this.triggerRef = void 0;\n _this.toggleRef = void 0;\n\n _this.getValue = function (props) {\n if (props === void 0) {\n props = _this.props;\n }\n\n var _props2 = props,\n value = _props2.value,\n defaultValue = _props2.defaultValue,\n _props2$uncheckableIt = _props2.uncheckableItemValues,\n uncheckableItemValues = _props2$uncheckableIt === void 0 ? [] : _props2$uncheckableIt;\n\n if (value && value.length) {\n return value.filter(function (v) {\n return !uncheckableItemValues.includes(v);\n });\n }\n\n if (defaultValue && defaultValue.length > 0) {\n return defaultValue.filter(function (v) {\n return !uncheckableItemValues.includes(v);\n });\n }\n\n return [];\n };\n\n _this.getElementByDataKey = function (dataKey) {\n var ele = _this.nodeRefs[dataKey];\n\n if (ele instanceof Element) {\n return ele.querySelector(\".\" + _this.addTreePrefix('node-label'));\n }\n\n return null;\n };\n\n _this.getFocusableMenuItems = function () {\n var filterData = _this.state.filterData;\n var childrenKey = _this.props.childrenKey;\n var items = [];\n\n var loop = function loop(treeNodes) {\n treeNodes.forEach(function (node) {\n var nodeData = (0, _extends2.default)({}, node, {}, _this.nodes[node.refKey]);\n\n if (!(0, _utils2.getDisabledState)(_this.nodes, node, _this.props) && node.visible) {\n items.push(node);\n }\n\n if (node[childrenKey] && (0, _treeUtils.getExpandState)(nodeData, _this.props)) {\n loop(node[childrenKey]);\n }\n });\n };\n\n loop(filterData);\n return items;\n };\n\n _this.nodes = {};\n _this.activeNode = null;\n _this.cache = new _CellMeasurer.CellMeasurerCache({\n fixedWidth: true,\n minHeight: 20\n });\n _this.nodeRefs = {};\n\n _this.bindNodeRefs = function (refKey, ref) {\n _this.nodeRefs[refKey] = ref;\n };\n\n _this.getPositionInstance = function () {\n return _this.positionRef.current;\n };\n\n _this.getToggleInstance = function () {\n return _this.toggleRef.current;\n };\n\n _this.selectActiveItem = function (event) {\n var _this$getActiveItem = _this.getActiveItem(),\n nodeData = _this$getActiveItem.nodeData;\n\n _this.handleSelect(nodeData, event);\n };\n\n _this.focusNextItem = function () {\n var _node$focus;\n\n var _this$getItemsAndActi = _this.getItemsAndActiveIndex(),\n items = _this$getItemsAndActi.items,\n activeIndex = _this$getItemsAndActi.activeIndex;\n\n if (items.length === 0) {\n return;\n }\n\n var nextIndex = activeIndex === items.length - 1 ? 0 : activeIndex + 1;\n\n var node = _this.getElementByDataKey(items[nextIndex].refKey);\n\n node === null || node === void 0 ? void 0 : (_node$focus = node.focus) === null || _node$focus === void 0 ? void 0 : _node$focus.call(node);\n };\n\n _this.focusPreviousItem = function () {\n var _node$focus2;\n\n var _this$getItemsAndActi2 = _this.getItemsAndActiveIndex(),\n items = _this$getItemsAndActi2.items,\n activeIndex = _this$getItemsAndActi2.activeIndex;\n\n if (items.length === 0) {\n return;\n }\n\n var prevIndex = activeIndex === 0 ? items.length - 1 : activeIndex - 1;\n prevIndex = prevIndex >= 0 ? prevIndex : 0;\n\n var node = _this.getElementByDataKey(items[prevIndex].refKey);\n\n node === null || node === void 0 ? void 0 : (_node$focus2 = node.focus) === null || _node$focus2 === void 0 ? void 0 : _node$focus2.call(node);\n };\n\n _this.handleCloseDropdown = function () {\n var _this$triggerRef$curr, _this$triggerRef$curr2;\n\n (_this$triggerRef$curr = _this.triggerRef.current) === null || _this$triggerRef$curr === void 0 ? void 0 : (_this$triggerRef$curr2 = _this$triggerRef$curr.hide) === null || _this$triggerRef$curr2 === void 0 ? void 0 : _this$triggerRef$curr2.call(_this$triggerRef$curr);\n };\n\n _this.handleOpenDropdown = function () {\n var _this$triggerRef$curr3, _this$triggerRef$curr4;\n\n (_this$triggerRef$curr3 = _this.triggerRef.current) === null || _this$triggerRef$curr3 === void 0 ? void 0 : (_this$triggerRef$curr4 = _this$triggerRef$curr3.show) === null || _this$triggerRef$curr4 === void 0 ? void 0 : _this$triggerRef$curr4.call(_this$triggerRef$curr3);\n };\n\n _this.open = function () {\n var _this$handleOpenDropd, _this2;\n\n (_this$handleOpenDropd = (_this2 = _this).handleOpenDropdown) === null || _this$handleOpenDropd === void 0 ? void 0 : _this$handleOpenDropd.call(_this2);\n };\n\n _this.close = function () {\n var _this$handleCloseDrop, _this3;\n\n (_this$handleCloseDrop = (_this3 = _this).handleCloseDropdown) === null || _this$handleCloseDrop === void 0 ? void 0 : _this$handleCloseDrop.call(_this3);\n };\n\n _this.handleToggleDropdown = function () {\n var active = _this.state.active;\n\n if (active) {\n _this.handleCloseDropdown();\n\n return;\n }\n\n _this.handleOpenDropdown();\n };\n\n _this.everyChildChecked = function (nodes, node) {\n var list = [];\n Object.keys(nodes).forEach(function (refKey) {\n var _curNode$parentNode;\n\n var curNode = nodes[refKey];\n\n if (((_curNode$parentNode = curNode.parentNode) === null || _curNode$parentNode === void 0 ? void 0 : _curNode$parentNode.refKey) === node.refKey && !curNode.uncheckable) {\n list.push(curNode);\n }\n });\n return list.every(function (l) {\n return l.check;\n });\n };\n\n _this.addPrefix = function (name) {\n return (0, _utils.prefix)(_this.props.classPrefix)(name);\n };\n\n _this.addTreePrefix = function (name) {\n return (0, _utils.prefix)((0, _utils.defaultClassPrefix)('check-tree'))(name);\n };\n\n _this.handleSelect = function (activeNode, event) {\n var _this$props = _this.props,\n onChange = _this$props.onChange,\n onSelect = _this$props.onSelect,\n value = _this$props.value;\n\n var selectedValues = _this.toggleChecked(activeNode, !_this.nodes[activeNode.refKey].check);\n\n if (!(0, _isUndefined2.default)(value)) {\n _this.activeNode = activeNode;\n } else {\n _this.unserializeLists({\n check: selectedValues\n });\n\n _this.setState({\n activeNode: activeNode,\n selectedValues: selectedValues,\n hasValue: !!selectedValues.length\n });\n }\n\n onChange === null || onChange === void 0 ? void 0 : onChange(selectedValues, event);\n onSelect === null || onSelect === void 0 ? void 0 : onSelect(activeNode, selectedValues, event);\n };\n\n _this.handleToggle = function (node) {\n var _this$props2 = _this.props,\n valueKey = _this$props2.valueKey,\n childrenKey = _this$props2.childrenKey,\n onExpand = _this$props2.onExpand,\n expandItemValues = _this$props2.expandItemValues;\n\n var nextExpandItemValues = _this.toggleExpand(node, !node.expand);\n\n if ((0, _isUndefined2.default)(expandItemValues)) {\n _this.unserializeLists({\n expand: nextExpandItemValues\n });\n\n _this.setState({\n expandItemValues: nextExpandItemValues\n });\n }\n\n onExpand === null || onExpand === void 0 ? void 0 : onExpand(nextExpandItemValues, node, (0, _Picker.createConcatChildrenFunction)(node, node[valueKey], {\n valueKey: valueKey,\n childrenKey: childrenKey\n }));\n };\n\n _this.handleKeyDown = function (event) {\n (0, _Picker.onMenuKeyDown)(event, {\n down: _this.focusNextItem,\n up: _this.focusPreviousItem,\n enter: _this.selectActiveItem,\n del: _this.handleClean\n });\n };\n\n _this.handleToggleKeyDown = function (event) {\n var _this$state = _this.state,\n activeNode = _this$state.activeNode,\n active = _this$state.active; // enter\n\n if ((!activeNode || !active) && event.keyCode === 13) {\n _this.handleToggleDropdown();\n } // delete\n\n\n if (event.keyCode === 8) {\n _this.handleClean(event);\n }\n\n if (!_this.treeViewRef.current) {\n return;\n }\n\n if (event.target instanceof HTMLElement) {\n var className = event.target.className;\n\n if (className.includes(_this.addPrefix('toggle')) || className.includes(_this.addPrefix('toggle-custom')) || className.includes(_this.addPrefix('search-bar-input'))) {\n (0, _Picker.onMenuKeyDown)(event, {\n down: _this.focusNextItem\n });\n }\n }\n };\n\n _this.handleSearch = function (value, event) {\n var filterData = _this.state.filterData;\n var _this$props3 = _this.props,\n onSearch = _this$props3.onSearch,\n searchKeyword = _this$props3.searchKeyword;\n\n if ((0, _isUndefined2.default)(searchKeyword)) {\n _this.setState({\n filterData: _this.getFilterData(value, filterData),\n searchKeyword: value\n });\n }\n\n onSearch === null || onSearch === void 0 ? void 0 : onSearch(value, event);\n };\n\n _this.handleClean = function (evnet) {\n var _this$props$onChange, _this$props4;\n\n _this.setState({\n selectedValues: [],\n hasValue: false,\n activeNode: {}\n });\n\n _this.unserializeLists({\n check: []\n });\n\n (_this$props$onChange = (_this$props4 = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props4, [], evnet);\n };\n\n _this.handleOnOpen = function () {\n var _this$props$onOpen, _this$props5;\n\n var activeNode = _this.state.activeNode;\n\n if (activeNode) {\n var _node$focus3;\n\n var node = _this.getElementByDataKey(activeNode.refKey);\n\n node === null || node === void 0 ? void 0 : (_node$focus3 = node.focus) === null || _node$focus3 === void 0 ? void 0 : _node$focus3.call(node);\n }\n\n (_this$props$onOpen = (_this$props5 = _this.props).onOpen) === null || _this$props$onOpen === void 0 ? void 0 : _this$props$onOpen.call(_this$props5);\n\n _this.setState({\n active: true\n });\n };\n\n _this.handleOnClose = function () {\n var filterData = _this.state.filterData;\n var _this$props6 = _this.props,\n onClose = _this$props6.onClose,\n searchKeyword = _this$props6.searchKeyword;\n\n if ((0, _isUndefined2.default)(searchKeyword)) {\n _this.setState({\n filterData: _this.getFilterData('', filterData),\n searchKeyword: ''\n });\n }\n\n onClose === null || onClose === void 0 ? void 0 : onClose();\n\n _this.setState({\n active: false\n });\n };\n\n _this.measureRowRenderer = function (nodes) {\n return function (_ref) {\n var key = _ref.key,\n index = _ref.index,\n style = _ref.style,\n parent = _ref.parent;\n var node = nodes[index];\n return React.createElement(_CellMeasurer.CellMeasurer, {\n cache: _this.cache,\n columnIndex: 0,\n key: key,\n rowIndex: index,\n parent: parent,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1065\n },\n __self: this\n }, function () {\n return _this.renderVirtualNode(node, {\n key: key,\n style: style\n });\n });\n };\n };\n\n var _value = _props.value,\n data = _props.data,\n cascade = _props.cascade,\n _childrenKey = _props.childrenKey,\n _searchKeyword = _props.searchKeyword;\n _this.nodes = {};\n\n var nextValue = _this.getValue(_props);\n\n var _nextExpandItemValues = (0, _treeUtils.getExpandItemValues)(_props);\n\n var nextData = [].concat(data);\n\n _this.flattenNodes(nextData, _props);\n\n _this.unserializeLists({\n check: nextValue,\n expand: _nextExpandItemValues\n }, _props);\n\n _this.state = {\n data: data,\n value: _value,\n cascade: cascade,\n hasValue: _this.hasValue(nextValue),\n expandAll: (0, _treeUtils.getExpandAll)(_props),\n filterData: _this.getFilterData(_searchKeyword, nextData, _props),\n searchKeyword: _searchKeyword || '',\n selectedValues: nextValue,\n expandItemValues: _this.serializeList('expand'),\n uncheckableItemValues: _props.uncheckableItemValues,\n isSomeNodeHasChildren: (0, _utils2.isSomeNodeHasChildren)(data, _childrenKey)\n };\n _this.treeViewRef = React.createRef();\n _this.positionRef = React.createRef();\n _this.listRef = React.createRef();\n _this.triggerRef = React.createRef();\n _this.toggleRef = React.createRef(); // for test\n\n _this.menuRef = React.createRef();\n (0, _treeUtils.treeDeprecatedWarning)(_props, ['expandAll']);\n return _this;\n }\n\n CheckTreePicker.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var value = nextProps.value,\n data = nextProps.data,\n cascade = nextProps.cascade,\n expandAll = nextProps.expandAll,\n searchKeyword = nextProps.searchKeyword,\n uncheckableItemValues = nextProps.uncheckableItemValues,\n expandItemValues = nextProps.expandItemValues;\n var nextState = {};\n\n if ((0, _isArray2.default)(data) && (0, _isArray2.default)(prevState.data) && prevState.data !== data) {\n nextState.data = data;\n }\n\n if ((0, _treeUtils.compareArray)(value, prevState.value)) {\n nextState.value = value;\n }\n\n if ((0, _treeUtils.compareArray)(expandItemValues, prevState.expandItemValues)) {\n nextState.expandItemValues = expandItemValues;\n }\n\n if ((0, _treeUtils.compareArray)(uncheckableItemValues, prevState.uncheckableItemValues)) {\n nextState.uncheckableItemValues = uncheckableItemValues;\n }\n\n if (!(0, _isUndefined2.default)(searchKeyword) && searchKeyword !== prevState.searchKeyword) {\n nextState.searchKeyword = searchKeyword;\n }\n\n if (cascade !== prevState.cascade) {\n nextState.cascade = cascade;\n }\n\n if (expandAll !== prevState.expandAll) {\n nextState.expandAll = expandAll;\n }\n\n return Object.keys(nextState).length ? nextState : null;\n };\n\n var _proto = CheckTreePicker.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate(_prevProps, prevState) {\n this.updateDataChange(prevState);\n this.updateValueChange(prevState);\n this.updateExpandItemValuesChange(prevState);\n this.updateUncheckableItemValuesChange(prevState);\n this.updateCascadeChange(prevState);\n this.updateSearchKeywordChange(prevState);\n\n if (this.listRef.current) {\n this.listRef.current.forceUpdateGrid();\n }\n };\n\n _proto.updateDataChange = function updateDataChange(prevState) {\n var _this$state2 = this.state,\n searchKeyword = _this$state2.searchKeyword,\n expandItemValues = _this$state2.expandItemValues;\n var _this$props7 = this.props,\n _this$props7$data = _this$props7.data,\n data = _this$props7$data === void 0 ? [] : _this$props7$data,\n childrenKey = _this$props7.childrenKey;\n\n if (prevState.data !== data) {\n var nextData = [].concat(data);\n this.nodes = {};\n this.flattenNodes(nextData);\n this.unserializeLists({\n check: this.getValue(),\n expand: expandItemValues\n });\n this.setState({\n data: nextData,\n filterData: this.getFilterData(searchKeyword, nextData),\n isSomeNodeHasChildren: (0, _utils2.isSomeNodeHasChildren)(nextData, childrenKey),\n hasValue: this.hasValue(),\n expandItemValues: this.serializeList('expand')\n });\n }\n };\n\n _proto.updateValueChange = function updateValueChange(prevState) {\n var expandItemValues = this.state.expandItemValues;\n var value = this.props.value;\n\n if ((0, _treeUtils.compareArray)(value, prevState.value)) {\n this.unserializeLists({\n check: value,\n expand: expandItemValues\n });\n this.setState({\n selectedValues: value,\n hasValue: this.hasValue(value),\n activeNode: value.length ? this.activeNode : null\n });\n }\n };\n\n _proto.updateExpandItemValuesChange = function updateExpandItemValuesChange(prevState) {\n var expandItemValues = this.props.expandItemValues;\n\n if ((0, _treeUtils.compareArray)(expandItemValues, prevState.expandItemValues)) {\n this.unserializeLists({\n expand: expandItemValues\n });\n this.setState({\n expandItemValues: expandItemValues\n });\n }\n };\n\n _proto.updateUncheckableItemValuesChange = function updateUncheckableItemValuesChange(prevState) {\n var _this$state3 = this.state,\n data = _this$state3.data,\n selectedValues = _this$state3.selectedValues,\n expandItemValues = _this$state3.expandItemValues;\n var uncheckableItemValues = this.props.uncheckableItemValues;\n\n if ((0, _treeUtils.compareArray)(uncheckableItemValues, prevState.uncheckableItemValues)) {\n this.flattenNodes(data);\n this.unserializeLists({\n check: selectedValues,\n expand: expandItemValues\n });\n this.setState({\n hasValue: this.hasValue()\n });\n }\n };\n\n _proto.updateCascadeChange = function updateCascadeChange(prevState) {\n var _this$state4 = this.state,\n data = _this$state4.data,\n selectedValues = _this$state4.selectedValues,\n expandItemValues = _this$state4.expandItemValues;\n var cascade = this.props.cascade; // cascade 改变时,重新初始化\n\n if (cascade !== prevState.cascade && cascade) {\n this.flattenNodes(data);\n this.unserializeLists({\n check: selectedValues,\n expand: expandItemValues\n });\n this.setState({\n cascade: cascade\n });\n }\n };\n\n _proto.updateSearchKeywordChange = function updateSearchKeywordChange(prevState) {\n var filterData = this.state.filterData;\n var searchKeyword = this.props.searchKeyword;\n\n if (!(0, _isUndefined2.default)(searchKeyword) && prevState.searchKeyword !== searchKeyword) {\n this.setState({\n filterData: this.getFilterData(searchKeyword, filterData)\n });\n }\n };\n\n _proto.getNodeCheckState = function getNodeCheckState(node, cascade) {\n var childrenKey = this.props.childrenKey;\n\n if (!node[childrenKey] || !node[childrenKey].length || !cascade) {\n this.nodes[node.refKey].checkAll = false;\n return node.check ? _constants.CHECK_STATE.CHECK : _constants.CHECK_STATE.UNCHECK;\n }\n\n if ((0, _utils2.isEveryChildChecked)(node, this.nodes, this.props)) {\n this.nodes[node.refKey].checkAll = true;\n return _constants.CHECK_STATE.CHECK;\n }\n\n if ((0, _utils2.isSomeChildChecked)(node, this.nodes, this.props)) {\n this.nodes[node.refKey].checkAll = false;\n return _constants.CHECK_STATE.INDETERMINATE;\n }\n\n return _constants.CHECK_STATE.UNCHECK;\n };\n\n _proto.getFilterData = function getFilterData(searchKeyword, data, props) {\n if (searchKeyword === void 0) {\n searchKeyword = '';\n }\n\n if (props === void 0) {\n props = this.props;\n }\n\n var _props3 = props,\n labelKey = _props3.labelKey,\n childrenKey = _props3.childrenKey,\n searchBy = _props3.searchBy;\n\n var setVisible = function setVisible(nodes) {\n if (nodes === void 0) {\n nodes = [];\n }\n\n return nodes.forEach(function (item) {\n item.visible = searchBy ? searchBy(searchKeyword, item[labelKey], item) : (0, _Picker.shouldDisplay)(item[labelKey], searchKeyword);\n\n if ((0, _isArray2.default)(item[childrenKey])) {\n setVisible(item[childrenKey]);\n item[childrenKey].forEach(function (child) {\n if (child.visible) {\n item.visible = child.visible;\n }\n });\n }\n });\n };\n\n setVisible(data);\n return data;\n };\n\n _proto.getActiveElementOption = function getActiveElementOption(options, refKey) {\n var childrenKey = this.props.childrenKey;\n\n for (var i = 0; i < options.length; i += 1) {\n var _options$i$childrenKe;\n\n if (options[i].refKey === refKey) {\n return options[i];\n } else if ((_options$i$childrenKe = options[i][childrenKey]) === null || _options$i$childrenKe === void 0 ? void 0 : _options$i$childrenKe.length) {\n var active = this.getActiveElementOption(options[i][childrenKey], refKey);\n\n if (!(0, _isEmpty2.default)(active)) {\n return active;\n }\n }\n }\n\n return {};\n };\n\n _proto.getFlattenTreeData = function getFlattenTreeData(nodes) {\n var _this4 = this;\n\n var expandItemValues = this.state.expandItemValues;\n var _this$props8 = this.props,\n childrenKey = _this$props8.childrenKey,\n valueKey = _this$props8.valueKey;\n return (0, _treeUtils.flattenTree)(nodes, childrenKey, function (node) {\n var formatted = {};\n var curNode = _this4.nodes[node.refKey];\n var parentKeys = (0, _treeUtils.getNodeParents)(curNode, 'parentNode', valueKey);\n\n if (curNode) {\n formatted = (0, _extends2.default)({}, node, {\n check: curNode.check,\n expand: curNode.expand,\n uncheckable: curNode.uncheckable,\n layer: curNode.layer,\n parentNode: curNode.parentNode,\n showNode: (0, _treeUtils.shouldShowNodeByExpanded)(expandItemValues, parentKeys)\n });\n }\n\n return formatted;\n });\n };\n\n _proto.getItemsAndActiveIndex = function getItemsAndActiveIndex() {\n var items = this.getFocusableMenuItems();\n var activeIndex = -1;\n items.forEach(function (item, index) {\n if (document.activeElement !== null) {\n if (item.refKey === document.activeElement.getAttribute('data-key')) {\n activeIndex = index;\n }\n }\n });\n return {\n items: items,\n activeIndex: activeIndex\n };\n };\n\n _proto.getActiveItem = function getActiveItem() {\n var filterData = this.state.filterData;\n var activeItem = document.activeElement;\n\n if (activeItem !== null) {\n var _activeItem$dataset, _activeItem$dataset2, _this$nodes$nodeData$, _this$nodes$nodeData$2;\n\n var key = activeItem === null || activeItem === void 0 ? void 0 : (_activeItem$dataset = activeItem.dataset) === null || _activeItem$dataset === void 0 ? void 0 : _activeItem$dataset.key;\n var layer = activeItem === null || activeItem === void 0 ? void 0 : (_activeItem$dataset2 = activeItem.dataset) === null || _activeItem$dataset2 === void 0 ? void 0 : _activeItem$dataset2.layer;\n var nodeData = this.getActiveElementOption(filterData, key);\n nodeData.check = !((_this$nodes$nodeData$ = this.nodes[nodeData.refKey]) === null || _this$nodes$nodeData$ === void 0 ? void 0 : _this$nodes$nodeData$.check);\n nodeData.parentNode = (_this$nodes$nodeData$2 = this.nodes[nodeData.refKey]) === null || _this$nodes$nodeData$2 === void 0 ? void 0 : _this$nodes$nodeData$2.parentNode;\n return {\n nodeData: nodeData,\n layer: layer\n };\n }\n\n return {};\n }\n /**\n * 获取已选择的items,用于显示在placeholder\n */\n ;\n\n _proto.getSelectedItems = function getSelectedItems(selectedValues) {\n var _this5 = this;\n\n var valueKey = this.props.valueKey;\n var checkItems = [];\n Object.keys(this.nodes).map(function (refKey) {\n var node = _this5.nodes[refKey];\n\n if (selectedValues.some(function (value) {\n return (0, _shallowEqual.default)(node[valueKey], value);\n })) {\n checkItems.push(node);\n }\n });\n return checkItems;\n }\n /**\n * 判断传入的 value 是否存在于data 中\n * @param {*} values\n */\n ;\n\n _proto.hasValue = function hasValue(values) {\n var _this6 = this;\n\n if (values === void 0) {\n values = this.state.selectedValues;\n }\n\n var valueKey = this.props.valueKey;\n var selectedValues = Object.keys(this.nodes).map(function (refKey) {\n return _this6.nodes[refKey][valueKey];\n }).filter(function (item) {\n return values.some(function (v) {\n return (0, _shallowEqual.default)(v, item);\n });\n });\n return !!selectedValues.length;\n }\n /**\n * 拍平数组,将tree 转换为一维对象\n * @param {*} nodes tree data\n * @param {*} ref 当前层级\n */\n ;\n\n _proto.flattenNodes = function flattenNodes(nodes, props, ref, parentNode, layer) {\n var _this7 = this;\n\n if (ref === void 0) {\n ref = '0';\n }\n\n if (layer === void 0) {\n layer = 0;\n }\n\n var _ref2 = props || this.props,\n labelKey = _ref2.labelKey,\n valueKey = _ref2.valueKey,\n childrenKey = _ref2.childrenKey;\n\n if (!Array.isArray(nodes) || nodes.length === 0) {\n return;\n }\n\n nodes.forEach(function (node, index) {\n var _this7$nodes$refKey;\n\n var refKey = ref + \"-\" + index;\n node.refKey = refKey;\n _this7.nodes[refKey] = (_this7$nodes$refKey = {\n layer: layer\n }, _this7$nodes$refKey[labelKey] = node[labelKey], _this7$nodes$refKey[valueKey] = node[valueKey], _this7$nodes$refKey.expand = (0, _treeUtils.getExpandState)(node, props || _this7.props), _this7$nodes$refKey.uncheckable = (0, _utils2.getUncheckableState)(node, props || _this7.props), _this7$nodes$refKey.refKey = refKey, _this7$nodes$refKey);\n\n if (parentNode) {\n _this7.nodes[refKey].parentNode = parentNode;\n }\n\n _this7.flattenNodes(node[childrenKey], props, refKey, _this7.nodes[refKey], layer + 1);\n });\n }\n /**\n * 过滤选中的values中不包含 uncheckableItemValues 的那些值\n * @param {*} values\n */\n ;\n\n _proto.filterSelectedValues = function filterSelectedValues(values) {\n var _this$props$uncheckab = this.props.uncheckableItemValues,\n uncheckableItemValues = _this$props$uncheckab === void 0 ? [] : _this$props$uncheckab;\n return values.filter(function (value) {\n return !uncheckableItemValues.includes(value);\n });\n };\n\n _proto.serializeList = function serializeList(key, nodes) {\n if (nodes === void 0) {\n nodes = this.nodes;\n }\n\n var valueKey = this.props.valueKey;\n var list = [];\n Object.keys(nodes).forEach(function (refKey) {\n if (nodes[refKey][key]) {\n list.push(nodes[refKey][valueKey]);\n }\n });\n return list;\n };\n\n _proto.serializeListOnlyParent = function serializeListOnlyParent(key, nodes) {\n if (nodes === void 0) {\n nodes = this.nodes;\n }\n\n var valueKey = this.props.valueKey;\n var list = [];\n Object.keys(nodes).forEach(function (refKey) {\n var currentNode = nodes[refKey];\n\n if (currentNode.parentNode) {\n var _currentNode$parentNo;\n\n var parentNode = nodes[(_currentNode$parentNo = currentNode.parentNode) === null || _currentNode$parentNo === void 0 ? void 0 : _currentNode$parentNo.refKey];\n\n if (currentNode[key]) {\n if (!(parentNode === null || parentNode === void 0 ? void 0 : parentNode.checkAll)) {\n list.push(nodes[refKey][valueKey]);\n } else if (parentNode === null || parentNode === void 0 ? void 0 : parentNode.uncheckable) {\n list.push(nodes[refKey][valueKey]);\n }\n }\n } else {\n if (currentNode[key]) {\n list.push(nodes[refKey][valueKey]);\n }\n }\n });\n return list;\n };\n\n _proto.unserializeLists = function unserializeLists(lists, nextProps) {\n var _this8 = this;\n\n if (nextProps === void 0) {\n nextProps = this.props;\n }\n\n var _nextProps = nextProps,\n valueKey = _nextProps.valueKey,\n cascade = _nextProps.cascade,\n _nextProps$uncheckabl = _nextProps.uncheckableItemValues,\n uncheckableItemValues = _nextProps$uncheckabl === void 0 ? [] : _nextProps$uncheckabl;\n var expandAll = (0, _treeUtils.getExpandAll)(nextProps); // Reset values to false\n\n Object.keys(this.nodes).forEach(function (refKey) {\n Object.keys(lists).forEach(function (listKey) {\n if (listKey === 'check') {\n var node = _this8.nodes[refKey];\n\n if (cascade && 'parentNode' in node) {\n node[listKey] = node.parentNode[listKey];\n } else {\n node[listKey] = false;\n }\n\n lists[listKey].forEach(function (value) {\n if ((0, _shallowEqual.default)(_this8.nodes[refKey][valueKey], value) && !uncheckableItemValues.some(function (uncheckableValue) {\n return (0, _shallowEqual.default)(value, uncheckableValue);\n })) {\n _this8.nodes[refKey][listKey] = true;\n }\n });\n }\n\n if (listKey === 'expand') {\n _this8.nodes[refKey][listKey] = false;\n\n if (lists[listKey].length) {\n lists[listKey].forEach(function (value) {\n if ((0, _shallowEqual.default)(_this8.nodes[refKey][valueKey], value)) {\n _this8.nodes[refKey][listKey] = true;\n }\n });\n } else {\n _this8.nodes[refKey][listKey] = expandAll;\n }\n }\n });\n });\n };\n\n _proto.toggleChecked = function toggleChecked(node, isChecked) {\n var nodes = (0, _utils.clone)(this.nodes);\n this.toggleDownChecked(nodes, node, isChecked);\n node.parentNode && this.toggleUpChecked(nodes, node.parentNode, isChecked);\n var values = this.serializeListOnlyParent('check', nodes);\n return this.filterSelectedValues(values);\n };\n\n _proto.toggleUpChecked = function toggleUpChecked(nodes, node, checked) {\n var cascade = this.props.cascade;\n var currentNode = nodes[node.refKey];\n\n if (cascade) {\n if (!checked) {\n currentNode.check = checked;\n currentNode.checkAll = checked;\n } else {\n if (this.everyChildChecked(nodes, node)) {\n currentNode.check = true;\n currentNode.checkAll = true;\n } else {\n currentNode.check = false;\n currentNode.checkAll = false;\n }\n }\n\n if (node.parentNode) {\n this.toggleUpChecked(nodes, node.parentNode, checked);\n }\n }\n };\n\n _proto.toggleDownChecked = function toggleDownChecked(nodes, node, isChecked) {\n var _this9 = this;\n\n var _this$props9 = this.props,\n childrenKey = _this$props9.childrenKey,\n cascade = _this$props9.cascade;\n nodes[node.refKey].check = isChecked;\n\n if (!node[childrenKey] || !node[childrenKey].length || !cascade) {\n nodes[node.refKey].checkAll = false;\n } else {\n nodes[node.refKey].checkAll = isChecked;\n node[childrenKey].forEach(function (child) {\n _this9.toggleDownChecked(nodes, child, isChecked);\n });\n }\n };\n\n _proto.toggleNode = function toggleNode(key, node, toggleValue) {\n // 如果该节点处于 disabledChecbox,则忽略该值\n if (!node.uncheckable) {\n this.nodes[node.refKey][key] = toggleValue;\n }\n };\n\n _proto.toggleExpand = function toggleExpand(node, isExpand) {\n var valueKey = this.props.valueKey;\n var expandItemValues = new Set(this.serializeList('expand'));\n\n if (isExpand) {\n expandItemValues.add(node[valueKey]);\n } else {\n expandItemValues.delete(node[valueKey]);\n }\n\n return Array.from(expandItemValues);\n };\n\n _proto.renderDropdownMenu = function renderDropdownMenu() {\n var _this$props10 = this.props,\n _this$props10$height = _this$props10.height,\n height = _this$props10$height === void 0 ? defaultHeight : _this$props10$height,\n locale = _this$props10.locale,\n menuStyle = _this$props10.menuStyle,\n searchable = _this$props10.searchable,\n renderMenu = _this$props10.renderMenu,\n virtualized = _this$props10.virtualized,\n searchKeyword = _this$props10.searchKeyword,\n renderExtraFooter = _this$props10.renderExtraFooter,\n menuClassName = _this$props10.menuClassName,\n menuAutoWidth = _this$props10.menuAutoWidth;\n var keyword = !(0, _isUndefined2.default)(searchKeyword) ? searchKeyword : this.state.searchKeyword;\n var classes = (0, _classnames.default)(menuClassName, this.addPrefix('check-tree-menu'));\n var menu = this.renderCheckTree();\n var styles = virtualized ? (0, _extends2.default)({\n height: height\n }, menuStyle) : menuStyle;\n return React.createElement(_Picker.MenuWrapper, {\n autoWidth: menuAutoWidth,\n className: classes,\n style: styles,\n ref: this.menuRef,\n getToggleInstance: this.getToggleInstance,\n getPositionInstance: this.getPositionInstance,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 917\n },\n __self: this\n }, searchable ? React.createElement(_Picker.SearchBar, {\n placeholder: locale.searchPlaceholder,\n key: \"searchBar\",\n onChange: this.handleSearch,\n value: keyword,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 926\n },\n __self: this\n }) : null, renderMenu ? renderMenu(menu) : menu, renderExtraFooter === null || renderExtraFooter === void 0 ? void 0 : renderExtraFooter());\n };\n\n _proto.renderNode = function renderNode(node, layer) {\n var _this10 = this;\n\n var _this$state5 = this.state,\n activeNode = _this$state5.activeNode,\n searchKeyword = _this$state5.searchKeyword;\n var _this$props11 = this.props,\n valueKey = _this$props11.valueKey,\n labelKey = _this$props11.labelKey,\n childrenKey = _this$props11.childrenKey,\n renderTreeNode = _this$props11.renderTreeNode,\n renderTreeIcon = _this$props11.renderTreeIcon,\n cascade = _this$props11.cascade,\n locale = _this$props11.locale;\n var visible = node.visible,\n refKey = node.refKey; // 当处于搜索时,需要将所有节点都展开\n\n var expand = (0, _treeUtils.getExpandWhenSearching)(searchKeyword, node.expand);\n\n if (!visible) {\n return null;\n }\n\n var key = (0, _isString2.default)(node[valueKey]) || (0, _isNumber2.default)(node[valueKey]) ? node[valueKey] : refKey;\n var children = node[childrenKey]; // 当用户进行搜索时,hasChildren的判断要变成判断是否存在 visible 为 true 的子节点\n\n var visibleChildren = (0, _isUndefined2.default)(searchKeyword) || searchKeyword.length === 0 ? !!children : (0, _treeUtils.hasVisibleChildren)(node, childrenKey);\n var props = {\n value: node[valueKey],\n label: node[labelKey],\n layer: layer,\n expand: expand,\n rtl: locale.rtl,\n focus: activeNode ? (0, _shallowEqual.default)(activeNode[valueKey], node[valueKey]) : false,\n visible: node.visible,\n disabled: (0, _utils2.getDisabledState)(this.nodes, node, this.props),\n nodeData: node,\n checkState: this.getNodeCheckState(node, cascade),\n hasChildren: visibleChildren,\n uncheckable: node.uncheckable,\n allUncheckable: (0, _utils2.getSiblingNodeUncheckable)(node, this.nodes),\n onSelect: this.handleSelect,\n onTreeToggle: this.handleToggle,\n onRenderTreeNode: renderTreeNode,\n onRenderTreeIcon: renderTreeIcon\n };\n\n if (props.hasChildren) {\n var _classNames;\n\n layer += 1; // 是否展开树节点且子节点不为空\n\n var openClass = this.addTreePrefix('open');\n var childrenClass = (0, _classnames.default)(this.addTreePrefix('node-children'), (_classNames = {}, _classNames[openClass] = expand && visibleChildren, _classNames));\n var nodes = children || [];\n return React.createElement(\"div\", {\n className: childrenClass,\n key: key,\n ref: this.bindNodeRefs.bind(this, refKey),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 997\n },\n __self: this\n }, React.createElement(_CheckTreeNode.default, (0, _extends2.default)({}, props, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 998\n },\n __self: this\n })), React.createElement(\"div\", {\n className: this.addTreePrefix('children'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 999\n },\n __self: this\n }, nodes.map(function (child) {\n return _this10.renderNode(child, layer);\n })));\n }\n\n return React.createElement(_CheckTreeNode.default, (0, _extends2.default)({\n key: key,\n innerRef: this.bindNodeRefs.bind(this, refKey)\n }, props, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1006\n },\n __self: this\n }));\n };\n\n _proto.renderVirtualNode = function renderVirtualNode(node, options) {\n var _this$state6 = this.state,\n activeNode = _this$state6.activeNode,\n expandAll = _this$state6.expandAll,\n searchKeyword = _this$state6.searchKeyword;\n var _this$props12 = this.props,\n valueKey = _this$props12.valueKey,\n labelKey = _this$props12.labelKey,\n childrenKey = _this$props12.childrenKey,\n renderTreeNode = _this$props12.renderTreeNode,\n renderTreeIcon = _this$props12.renderTreeIcon,\n cascade = _this$props12.cascade,\n locale = _this$props12.locale;\n var key = options.key,\n style = options.style;\n var layer = node.layer,\n refKey = node.refKey,\n showNode = node.showNode;\n var expand = (0, _treeUtils.getExpandWhenSearching)(searchKeyword, node.expand);\n var children = node[childrenKey];\n var props = {\n value: node[valueKey],\n label: node[labelKey],\n layer: layer,\n expand: expand,\n rtl: locale.rtl,\n focus: activeNode ? (0, _shallowEqual.default)(activeNode[valueKey], node[valueKey]) : false,\n visible: node.visible,\n disabled: (0, _utils2.getDisabledState)(this.nodes, node, this.props),\n nodeData: node,\n children: children,\n expandAll: expandAll,\n checkState: this.getNodeCheckState(node, cascade),\n parentNode: node.parentNode,\n hasChildren: !!children,\n uncheckable: node.uncheckable,\n allUncheckable: (0, _utils2.getSiblingNodeUncheckable)(node, this.nodes),\n onSelect: this.handleSelect,\n onTreeToggle: this.handleToggle,\n onRenderTreeNode: renderTreeNode,\n onRenderTreeIcon: renderTreeIcon\n };\n return showNode && React.createElement(_CheckTreeNode.default, (0, _extends2.default)({\n style: style,\n key: key,\n innerRef: this.bindNodeRefs.bind(this, refKey)\n }, props, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1051\n },\n __self: this\n }));\n };\n\n _proto.renderCheckTree = function renderCheckTree() {\n var _classNames2,\n _this11 = this,\n _classNames3;\n\n var _this$state7 = this.state,\n filterData = _this$state7.filterData,\n isSomeNodeHasChildren = _this$state7.isSomeNodeHasChildren;\n var _this$props13 = this.props,\n inline = _this$props13.inline,\n style = _this$props13.style,\n height = _this$props13.height,\n className = _this$props13.className,\n onScroll = _this$props13.onScroll,\n locale = _this$props13.locale,\n virtualized = _this$props13.virtualized,\n searchable = _this$props13.searchable; // 树节点的层级\n\n var layer = 0;\n var classes = (0, _classnames.default)((0, _utils.defaultClassPrefix)('check-tree'), (_classNames2 = {}, _classNames2[className] = inline, _classNames2['without-children'] = !isSomeNodeHasChildren, _classNames2));\n var formattedNodes = [];\n\n if (!virtualized) {\n formattedNodes = (0, _utils2.getFormattedTree)(filterData, this.nodes, this.props).map(function (node) {\n return _this11.renderNode(node, layer);\n });\n\n if (!formattedNodes.some(function (v) {\n return v !== null;\n })) {\n return React.createElement(\"div\", {\n className: this.addPrefix('none'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1099\n },\n __self: this\n }, locale.noResultsText);\n }\n } else {\n formattedNodes = this.getFlattenTreeData(filterData).filter(function (n) {\n return n.showNode && n.visible;\n });\n\n if (!formattedNodes.length) {\n return React.createElement(\"div\", {\n className: this.addPrefix('none'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1104\n },\n __self: this\n }, locale.noResultsText);\n }\n } // 当未定义 height 且 设置了 virtualized 为 true,treeHeight 设置默认高度\n\n\n var treeHeight = (0, _isUndefined2.default)(height) && virtualized ? defaultHeight : height;\n var treeWidth = (0, _isUndefined2.default)(style === null || style === void 0 ? void 0 : style.width) ? defaultWidth : style.width;\n var styles = inline ? (0, _extends2.default)({\n height: treeHeight\n }, style) : {};\n var treeNodesClass = (0, _classnames.default)(this.addTreePrefix('nodes'), (_classNames3 = {}, _classNames3[this.addTreePrefix('all-uncheckable')] = (0, _utils2.getEveryFisrtLevelNodeUncheckable)(this.nodes), _classNames3));\n var listHeight = (0, _treeUtils.getVirtualLisHeight)(inline, searchable, treeHeight);\n return React.createElement(\"div\", {\n ref: this.treeViewRef,\n className: classes,\n style: styles,\n onScroll: onScroll,\n onKeyDown: this.handleKeyDown,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1118\n },\n __self: this\n }, React.createElement(\"div\", {\n className: treeNodesClass,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1125\n },\n __self: this\n }, virtualized ? React.createElement(_AutoSizer.default, {\n defaultHeight: listHeight,\n defaultWidth: treeWidth,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1127\n },\n __self: this\n }, function (_ref3) {\n var height = _ref3.height,\n width = _ref3.width;\n return React.createElement(_List.default, {\n ref: _this11.listRef,\n width: width || treeWidth,\n height: height || listHeight,\n rowHeight: 36,\n rowCount: formattedNodes.length,\n rowRenderer: _this11.measureRowRenderer(formattedNodes),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1129\n },\n __self: this\n });\n }) : formattedNodes));\n };\n\n _proto.render = function render() {\n var _this$props14 = this.props,\n cascade = _this$props14.cascade,\n style = _this$props14.style,\n locale = _this$props14.locale,\n inline = _this$props14.inline,\n disabled = _this$props14.disabled,\n valueKey = _this$props14.valueKey,\n labelKey = _this$props14.labelKey,\n cleanable = _this$props14.cleanable,\n countable = _this$props14.countable,\n placeholder = _this$props14.placeholder,\n toggleComponentClass = _this$props14.toggleComponentClass,\n onExited = _this$props14.onExited,\n onEntered = _this$props14.onEntered,\n onClean = _this$props14.onClean,\n renderValue = _this$props14.renderValue,\n positionRef = _this$props14.positionRef,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props14, [\"cascade\", \"style\", \"locale\", \"inline\", \"disabled\", \"valueKey\", \"labelKey\", \"cleanable\", \"countable\", \"placeholder\", \"toggleComponentClass\", \"onExited\", \"onEntered\", \"onClean\", \"renderValue\", \"positionRef\"]);\n var _this$state8 = this.state,\n hasValue = _this$state8.hasValue,\n selectedValues = _this$state8.selectedValues;\n var hasValidValue = hasValue || selectedValues.length > 0 && (0, _isFunction2.default)(renderValue);\n var selectedItems = this.getSelectedItems(selectedValues);\n var selectedElement = placeholder;\n /**\n * if value is invalid and renderValue is undefined, then using placeholder.\n * if value is valid and renderValue is't undefined, then using renderValue()\n */\n\n if (selectedValues.length) {\n if (hasValue) {\n selectedElement = React.createElement(_Picker.SelectedElement, {\n selectedItems: selectedItems,\n countable: countable,\n valueKey: valueKey,\n labelKey: labelKey,\n prefix: this.addPrefix,\n cascade: cascade,\n locale: locale,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1180\n },\n __self: this\n });\n }\n\n if ((0, _isFunction2.default)(renderValue)) {\n selectedElement = renderValue(selectedValues, selectedItems, selectedElement);\n\n if ((0, _isNil2.default)(selectedElement)) {\n hasValidValue = false;\n }\n }\n }\n\n var unhandled = (0, _utils.getUnhandledProps)(CheckTreePicker, rest);\n var classes = (0, _Picker.getToggleWrapperClassName)('check-tree', this.addPrefix, this.props, hasValidValue);\n\n if (inline) {\n return this.renderCheckTree();\n }\n\n return React.createElement(_Picker.PickerToggleTrigger, {\n pickerProps: this.props,\n ref: this.triggerRef,\n positionRef: (0, _utils.mergeRefs)(this.positionRef, positionRef),\n onEntered: (0, _utils.createChainedFunction)(this.handleOnOpen, onEntered),\n onExited: (0, _utils.createChainedFunction)(this.handleOnClose, onExited),\n speaker: this.renderDropdownMenu(),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1211\n },\n __self: this\n }, React.createElement(\"div\", {\n className: classes,\n style: style,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1219\n },\n __self: this\n }, React.createElement(_Picker.PickerToggle, (0, _extends2.default)({}, unhandled, {\n ref: this.toggleRef,\n onKeyDown: this.handleToggleKeyDown,\n onClean: (0, _utils.createChainedFunction)(this.handleClean, onClean),\n componentClass: toggleComponentClass,\n cleanable: cleanable && !disabled,\n hasValue: hasValidValue,\n active: this.state.active,\n \"aria-disabled\": disabled,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1220\n },\n __self: this\n }), selectedElement || locale.placeholder)));\n };\n\n return CheckTreePicker;\n}(React.Component);\n\nCheckTreePicker.propTypes = (0, _extends2.default)({}, _propTypes2.listPickerPropTypes, {\n height: _propTypes.default.number,\n inline: _propTypes.default.bool,\n cascade: _propTypes.default.bool,\n countable: _propTypes.default.bool,\n expandAll: _propTypes.default.bool,\n searchable: _propTypes.default.bool,\n virtualized: _propTypes.default.bool,\n searchKeyword: _propTypes.default.string,\n menuAutoWidth: _propTypes.default.bool,\n defaultExpandAll: _propTypes.default.bool,\n containerPadding: _propTypes.default.number,\n disabledItemValues: _propTypes.default.array,\n expandItemValues: _propTypes.default.array,\n defaultExpandItemValues: _propTypes.default.array,\n uncheckableItemValues: _propTypes.default.array,\n onSearch: _propTypes.default.func,\n onExpand: _propTypes.default.func,\n onSelect: _propTypes.default.func,\n onScroll: _propTypes.default.func,\n renderMenu: _propTypes.default.func,\n renderTreeNode: _propTypes.default.func,\n renderTreeIcon: _propTypes.default.func,\n searchBy: _propTypes.default.func\n});\nCheckTreePicker.defaultProps = (0, _extends2.default)({}, _propTypes2.listPickerDefaultProps, {\n cascade: true,\n countable: true,\n searchable: true,\n menuAutoWidth: true,\n defaultValue: [],\n uncheckableItemValues: [],\n locale: {\n placeholder: 'Select',\n searchPlaceholder: 'Search',\n noResultsText: 'No results found',\n checkAll: 'All'\n }\n});\n(0, _reactLifecyclesCompat.polyfill)(CheckTreePicker);\n\nvar _default = (0, _utils.defaultProps)({\n classPrefix: 'picker'\n})(CheckTreePicker);\n\nexports.default = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./src/CheckTreePicker/CheckTreePicker.tsx?");
|
|
7746
|
+
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 _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\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 _isNil2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _isFunction2 = _interopRequireDefault(__webpack_require__(/*! lodash/isFunction */ \"./node_modules/lodash/isFunction.js\"));\n\nvar _isNumber2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNumber */ \"./node_modules/lodash/isNumber.js\"));\n\nvar _isString2 = _interopRequireDefault(__webpack_require__(/*! lodash/isString */ \"./node_modules/lodash/isString.js\"));\n\nvar _isEmpty2 = _interopRequireDefault(__webpack_require__(/*! lodash/isEmpty */ \"./node_modules/lodash/isEmpty.js\"));\n\nvar _isUndefined2 = _interopRequireDefault(__webpack_require__(/*! lodash/isUndefined */ \"./node_modules/lodash/isUndefined.js\"));\n\nvar _isArray2 = _interopRequireDefault(__webpack_require__(/*! lodash/isArray */ \"./node_modules/lodash/isArray.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 _List = _interopRequireDefault(__webpack_require__(/*! react-virtualized/dist/commonjs/List */ \"./node_modules/react-virtualized/dist/commonjs/List/index.js\"));\n\nvar _AutoSizer = _interopRequireDefault(__webpack_require__(/*! react-virtualized/dist/commonjs/AutoSizer */ \"./node_modules/react-virtualized/dist/commonjs/AutoSizer/index.js\"));\n\nvar _CellMeasurer = __webpack_require__(/*! react-virtualized/dist/commonjs/CellMeasurer */ \"./node_modules/react-virtualized/dist/commonjs/CellMeasurer/index.js\");\n\nvar _reactLifecyclesCompat = __webpack_require__(/*! react-lifecycles-compat */ \"./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\n\nvar _shallowEqual = _interopRequireDefault(__webpack_require__(/*! ../utils/shallowEqual */ \"./src/utils/shallowEqual.ts\"));\n\nvar _CheckTreeNode = _interopRequireDefault(__webpack_require__(/*! ./CheckTreeNode */ \"./src/CheckTreePicker/CheckTreeNode.tsx\"));\n\nvar _constants = __webpack_require__(/*! ../constants */ \"./src/constants.ts\");\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _Picker = __webpack_require__(/*! ../Picker */ \"./src/Picker/index.ts\");\n\nvar _utils2 = __webpack_require__(/*! ./utils */ \"./src/CheckTreePicker/utils.ts\");\n\nvar _treeUtils = __webpack_require__(/*! ../utils/treeUtils */ \"./src/utils/treeUtils.ts\");\n\nvar _propTypes2 = __webpack_require__(/*! ../Picker/propTypes */ \"./src/Picker/propTypes.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/CheckTreePicker/CheckTreePicker.tsx\";\n// default value for virtualized\nvar defaultHeight = 360;\nvar defaultWidth = 200;\n\nvar CheckTreePicker =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(CheckTreePicker, _React$Component);\n\n function CheckTreePicker(_props) {\n var _this;\n\n _this = _React$Component.call(this, _props) || this;\n _this.menuRef = void 0;\n _this.treeViewRef = void 0;\n _this.positionRef = void 0;\n _this.listRef = void 0;\n _this.triggerRef = void 0;\n _this.toggleRef = void 0;\n\n _this.getValue = function (props) {\n if (props === void 0) {\n props = _this.props;\n }\n\n var _props2 = props,\n value = _props2.value,\n defaultValue = _props2.defaultValue,\n _props2$uncheckableIt = _props2.uncheckableItemValues,\n uncheckableItemValues = _props2$uncheckableIt === void 0 ? [] : _props2$uncheckableIt;\n\n if (value && value.length) {\n return value.filter(function (v) {\n return !uncheckableItemValues.includes(v);\n });\n }\n\n if (defaultValue && defaultValue.length > 0) {\n return defaultValue.filter(function (v) {\n return !uncheckableItemValues.includes(v);\n });\n }\n\n return [];\n };\n\n _this.getElementByDataKey = function (dataKey) {\n var ele = _this.nodeRefs[dataKey];\n\n if (ele instanceof Element) {\n return ele.querySelector(\".\" + _this.addTreePrefix('node-label'));\n }\n\n return null;\n };\n\n _this.getFocusableMenuItems = function () {\n var filterData = _this.state.filterData;\n var childrenKey = _this.props.childrenKey;\n var items = [];\n\n var loop = function loop(treeNodes) {\n treeNodes.forEach(function (node) {\n var nodeData = (0, _extends2.default)({}, node, {}, _this.nodes[node.refKey]);\n\n if (!(0, _utils2.getDisabledState)(_this.nodes, node, _this.props) && node.visible) {\n items.push(node);\n }\n\n if (node[childrenKey] && (0, _treeUtils.getExpandState)(nodeData, _this.props)) {\n loop(node[childrenKey]);\n }\n });\n };\n\n loop(filterData);\n return items;\n };\n\n _this.nodes = {};\n _this.activeNode = null;\n _this.cache = new _CellMeasurer.CellMeasurerCache({\n fixedWidth: true,\n minHeight: 20\n });\n _this.nodeRefs = {};\n\n _this.bindNodeRefs = function (refKey, ref) {\n _this.nodeRefs[refKey] = ref;\n };\n\n _this.getPositionInstance = function () {\n return _this.positionRef.current;\n };\n\n _this.getToggleInstance = function () {\n return _this.toggleRef.current;\n };\n\n _this.selectActiveItem = function (event) {\n var _this$getActiveItem = _this.getActiveItem(),\n nodeData = _this$getActiveItem.nodeData;\n\n _this.handleSelect(nodeData, event);\n };\n\n _this.focusNextItem = function () {\n var _node$focus;\n\n var _this$getItemsAndActi = _this.getItemsAndActiveIndex(),\n items = _this$getItemsAndActi.items,\n activeIndex = _this$getItemsAndActi.activeIndex;\n\n if (items.length === 0) {\n return;\n }\n\n var nextIndex = activeIndex === items.length - 1 ? 0 : activeIndex + 1;\n\n var node = _this.getElementByDataKey(items[nextIndex].refKey);\n\n node === null || node === void 0 ? void 0 : (_node$focus = node.focus) === null || _node$focus === void 0 ? void 0 : _node$focus.call(node);\n };\n\n _this.focusPreviousItem = function () {\n var _node$focus2;\n\n var _this$getItemsAndActi2 = _this.getItemsAndActiveIndex(),\n items = _this$getItemsAndActi2.items,\n activeIndex = _this$getItemsAndActi2.activeIndex;\n\n if (items.length === 0) {\n return;\n }\n\n var prevIndex = activeIndex === 0 ? items.length - 1 : activeIndex - 1;\n prevIndex = prevIndex >= 0 ? prevIndex : 0;\n\n var node = _this.getElementByDataKey(items[prevIndex].refKey);\n\n node === null || node === void 0 ? void 0 : (_node$focus2 = node.focus) === null || _node$focus2 === void 0 ? void 0 : _node$focus2.call(node);\n };\n\n _this.handleCloseDropdown = function () {\n var _this$triggerRef$curr, _this$triggerRef$curr2;\n\n (_this$triggerRef$curr = _this.triggerRef.current) === null || _this$triggerRef$curr === void 0 ? void 0 : (_this$triggerRef$curr2 = _this$triggerRef$curr.hide) === null || _this$triggerRef$curr2 === void 0 ? void 0 : _this$triggerRef$curr2.call(_this$triggerRef$curr);\n };\n\n _this.handleOpenDropdown = function () {\n var _this$triggerRef$curr3, _this$triggerRef$curr4;\n\n (_this$triggerRef$curr3 = _this.triggerRef.current) === null || _this$triggerRef$curr3 === void 0 ? void 0 : (_this$triggerRef$curr4 = _this$triggerRef$curr3.show) === null || _this$triggerRef$curr4 === void 0 ? void 0 : _this$triggerRef$curr4.call(_this$triggerRef$curr3);\n };\n\n _this.open = function () {\n var _this$handleOpenDropd, _this2;\n\n (_this$handleOpenDropd = (_this2 = _this).handleOpenDropdown) === null || _this$handleOpenDropd === void 0 ? void 0 : _this$handleOpenDropd.call(_this2);\n };\n\n _this.close = function () {\n var _this$handleCloseDrop, _this3;\n\n (_this$handleCloseDrop = (_this3 = _this).handleCloseDropdown) === null || _this$handleCloseDrop === void 0 ? void 0 : _this$handleCloseDrop.call(_this3);\n };\n\n _this.handleToggleDropdown = function () {\n var active = _this.state.active;\n\n if (active) {\n _this.handleCloseDropdown();\n\n return;\n }\n\n _this.handleOpenDropdown();\n };\n\n _this.everyChildChecked = function (nodes, node) {\n var list = [];\n Object.keys(nodes).forEach(function (refKey) {\n var _curNode$parentNode;\n\n var curNode = nodes[refKey];\n\n if (((_curNode$parentNode = curNode.parentNode) === null || _curNode$parentNode === void 0 ? void 0 : _curNode$parentNode.refKey) === node.refKey && !curNode.uncheckable) {\n list.push(curNode);\n }\n });\n return list.every(function (l) {\n return l.check;\n });\n };\n\n _this.addPrefix = function (name) {\n return (0, _utils.prefix)(_this.props.classPrefix)(name);\n };\n\n _this.addTreePrefix = function (name) {\n return (0, _utils.prefix)((0, _utils.defaultClassPrefix)('check-tree'))(name);\n };\n\n _this.handleSelect = function (activeNode, event) {\n var _this$props = _this.props,\n onChange = _this$props.onChange,\n onSelect = _this$props.onSelect,\n value = _this$props.value;\n\n var selectedValues = _this.toggleChecked(activeNode, !_this.nodes[activeNode.refKey].check);\n\n if (!(0, _isUndefined2.default)(value)) {\n _this.activeNode = activeNode;\n } else {\n _this.unserializeLists({\n check: selectedValues\n });\n\n _this.setState({\n activeNode: activeNode,\n selectedValues: selectedValues,\n hasValue: !!selectedValues.length\n });\n }\n\n onChange === null || onChange === void 0 ? void 0 : onChange(selectedValues, event);\n onSelect === null || onSelect === void 0 ? void 0 : onSelect(activeNode, selectedValues, event);\n };\n\n _this.handleToggle = function (node) {\n var _this$props2 = _this.props,\n valueKey = _this$props2.valueKey,\n childrenKey = _this$props2.childrenKey,\n onExpand = _this$props2.onExpand,\n expandItemValues = _this$props2.expandItemValues;\n\n var nextExpandItemValues = _this.toggleExpand(node, !node.expand);\n\n if ((0, _isUndefined2.default)(expandItemValues)) {\n _this.unserializeLists({\n expand: nextExpandItemValues\n });\n\n _this.setState({\n expandItemValues: nextExpandItemValues\n });\n }\n\n onExpand === null || onExpand === void 0 ? void 0 : onExpand(nextExpandItemValues, node, (0, _Picker.createConcatChildrenFunction)(node, node[valueKey], {\n valueKey: valueKey,\n childrenKey: childrenKey\n }));\n };\n\n _this.handleKeyDown = function (event) {\n (0, _Picker.onMenuKeyDown)(event, {\n down: _this.focusNextItem,\n up: _this.focusPreviousItem,\n enter: _this.selectActiveItem,\n del: _this.handleClean\n });\n };\n\n _this.handleToggleKeyDown = function (event) {\n var _this$state = _this.state,\n activeNode = _this$state.activeNode,\n active = _this$state.active; // enter\n\n if ((!activeNode || !active) && event.keyCode === 13) {\n _this.handleToggleDropdown();\n } // delete\n\n\n if (event.keyCode === 8) {\n _this.handleClean(event);\n }\n\n if (!_this.treeViewRef.current) {\n return;\n }\n\n if (event.target instanceof HTMLElement) {\n var className = event.target.className;\n\n if (className.includes(_this.addPrefix('toggle')) || className.includes(_this.addPrefix('toggle-custom')) || className.includes(_this.addPrefix('search-bar-input'))) {\n (0, _Picker.onMenuKeyDown)(event, {\n down: _this.focusNextItem\n });\n }\n }\n };\n\n _this.handleSearch = function (value, event) {\n var filterData = _this.state.filterData;\n var _this$props3 = _this.props,\n onSearch = _this$props3.onSearch,\n searchKeyword = _this$props3.searchKeyword;\n\n if ((0, _isUndefined2.default)(searchKeyword)) {\n _this.setState({\n filterData: _this.getFilterData(value, filterData),\n searchKeyword: value\n });\n }\n\n onSearch === null || onSearch === void 0 ? void 0 : onSearch(value, event);\n };\n\n _this.handleClean = function (evnet) {\n var _this$props$onChange, _this$props4;\n\n _this.setState({\n selectedValues: [],\n hasValue: false,\n activeNode: {}\n });\n\n _this.unserializeLists({\n check: []\n });\n\n (_this$props$onChange = (_this$props4 = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props4, [], evnet);\n };\n\n _this.handleOnOpen = function () {\n var _this$props$onOpen, _this$props5;\n\n var activeNode = _this.state.activeNode;\n\n if (activeNode) {\n var _node$focus3;\n\n var node = _this.getElementByDataKey(activeNode.refKey);\n\n node === null || node === void 0 ? void 0 : (_node$focus3 = node.focus) === null || _node$focus3 === void 0 ? void 0 : _node$focus3.call(node);\n }\n\n (_this$props$onOpen = (_this$props5 = _this.props).onOpen) === null || _this$props$onOpen === void 0 ? void 0 : _this$props$onOpen.call(_this$props5);\n\n _this.setState({\n active: true\n });\n };\n\n _this.handleOnClose = function () {\n var filterData = _this.state.filterData;\n var _this$props6 = _this.props,\n onClose = _this$props6.onClose,\n searchKeyword = _this$props6.searchKeyword;\n\n if ((0, _isUndefined2.default)(searchKeyword)) {\n _this.setState({\n filterData: _this.getFilterData('', filterData),\n searchKeyword: ''\n });\n }\n\n onClose === null || onClose === void 0 ? void 0 : onClose();\n\n _this.setState({\n active: false\n });\n };\n\n _this.measureRowRenderer = function (nodes) {\n return function (_ref) {\n var key = _ref.key,\n index = _ref.index,\n style = _ref.style,\n parent = _ref.parent;\n var node = nodes[index];\n return React.createElement(_CellMeasurer.CellMeasurer, {\n cache: _this.cache,\n columnIndex: 0,\n key: key,\n rowIndex: index,\n parent: parent,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1073\n },\n __self: this\n }, function () {\n return _this.renderVirtualNode(node, {\n key: key,\n style: style\n });\n });\n };\n };\n\n var _value = _props.value,\n data = _props.data,\n cascade = _props.cascade,\n _childrenKey = _props.childrenKey,\n _searchKeyword = _props.searchKeyword;\n _this.nodes = {};\n\n var nextValue = _this.getValue(_props);\n\n var _nextExpandItemValues = (0, _treeUtils.getExpandItemValues)(_props);\n\n var nextData = [].concat(data);\n\n _this.flattenNodes(nextData, _props);\n\n _this.unserializeLists({\n check: nextValue,\n expand: _nextExpandItemValues\n }, _props);\n\n _this.state = {\n data: data,\n value: _value,\n cascade: cascade,\n hasValue: _this.hasValue(nextValue),\n expandAll: (0, _treeUtils.getExpandAll)(_props),\n filterData: _this.getFilterData(_searchKeyword, nextData, _props),\n searchKeyword: _searchKeyword || '',\n selectedValues: nextValue,\n expandItemValues: _this.serializeList('expand'),\n uncheckableItemValues: _props.uncheckableItemValues,\n isSomeNodeHasChildren: (0, _utils2.isSomeNodeHasChildren)(data, _childrenKey)\n };\n _this.treeViewRef = React.createRef();\n _this.positionRef = React.createRef();\n _this.listRef = React.createRef();\n _this.triggerRef = React.createRef();\n _this.toggleRef = React.createRef(); // for test\n\n _this.menuRef = React.createRef();\n (0, _treeUtils.treeDeprecatedWarning)(_props, ['expandAll']);\n return _this;\n }\n\n CheckTreePicker.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var value = nextProps.value,\n data = nextProps.data,\n cascade = nextProps.cascade,\n expandAll = nextProps.expandAll,\n searchKeyword = nextProps.searchKeyword,\n uncheckableItemValues = nextProps.uncheckableItemValues,\n expandItemValues = nextProps.expandItemValues;\n var nextState = {};\n\n if ((0, _isArray2.default)(data) && (0, _isArray2.default)(prevState.data) && prevState.data !== data) {\n nextState.data = data;\n }\n\n if ((0, _treeUtils.compareArray)(value, prevState.value)) {\n nextState.value = value;\n }\n\n if ((0, _treeUtils.compareArray)(expandItemValues, prevState.expandItemValues) && (0, _isArray2.default)(expandItemValues)) {\n nextState.expandItemValues = expandItemValues;\n }\n\n if ((0, _treeUtils.compareArray)(uncheckableItemValues, prevState.uncheckableItemValues) && (0, _isArray2.default)(uncheckableItemValues)) {\n nextState.uncheckableItemValues = uncheckableItemValues;\n }\n\n if (!(0, _isUndefined2.default)(searchKeyword) && searchKeyword !== prevState.searchKeyword) {\n nextState.searchKeyword = searchKeyword;\n }\n\n if (cascade !== prevState.cascade) {\n nextState.cascade = cascade;\n }\n\n if (expandAll !== prevState.expandAll) {\n nextState.expandAll = expandAll;\n }\n\n return Object.keys(nextState).length ? nextState : null;\n };\n\n var _proto = CheckTreePicker.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate(_prevProps, prevState) {\n this.updateDataChange(prevState);\n this.updateValueChange(prevState);\n this.updateExpandItemValuesChange(prevState);\n this.updateUncheckableItemValuesChange(prevState);\n this.updateCascadeChange(prevState);\n this.updateSearchKeywordChange(prevState);\n\n if (this.listRef.current) {\n this.listRef.current.forceUpdateGrid();\n }\n };\n\n _proto.updateDataChange = function updateDataChange(prevState) {\n var _this$state2 = this.state,\n searchKeyword = _this$state2.searchKeyword,\n expandItemValues = _this$state2.expandItemValues;\n var _this$props7 = this.props,\n _this$props7$data = _this$props7.data,\n data = _this$props7$data === void 0 ? [] : _this$props7$data,\n childrenKey = _this$props7.childrenKey;\n\n if (prevState.data !== data) {\n var nextData = [].concat(data);\n this.nodes = {};\n this.flattenNodes(nextData);\n this.unserializeLists({\n check: this.getValue(),\n expand: expandItemValues\n });\n this.setState({\n data: nextData,\n filterData: this.getFilterData(searchKeyword, nextData),\n isSomeNodeHasChildren: (0, _utils2.isSomeNodeHasChildren)(nextData, childrenKey),\n hasValue: this.hasValue(),\n expandItemValues: this.serializeList('expand')\n });\n }\n };\n\n _proto.updateValueChange = function updateValueChange(prevState) {\n var expandItemValues = this.state.expandItemValues;\n var value = this.props.value;\n\n if ((0, _treeUtils.compareArray)(value, prevState.value)) {\n this.unserializeLists({\n check: value !== null && value !== void 0 ? value : [],\n expand: expandItemValues\n });\n this.setState({\n selectedValues: value,\n hasValue: this.hasValue(value),\n activeNode: value.length ? this.activeNode : null\n });\n }\n };\n\n _proto.updateExpandItemValuesChange = function updateExpandItemValuesChange(prevState) {\n var expandItemValues = this.props.expandItemValues;\n\n if ((0, _treeUtils.compareArray)(expandItemValues, prevState.expandItemValues) && (0, _isArray2.default)(expandItemValues)) {\n this.unserializeLists({\n expand: expandItemValues\n });\n this.setState({\n expandItemValues: expandItemValues\n });\n }\n };\n\n _proto.updateUncheckableItemValuesChange = function updateUncheckableItemValuesChange(prevState) {\n var _this$state3 = this.state,\n data = _this$state3.data,\n selectedValues = _this$state3.selectedValues,\n expandItemValues = _this$state3.expandItemValues;\n var uncheckableItemValues = this.props.uncheckableItemValues;\n\n if ((0, _treeUtils.compareArray)(uncheckableItemValues, prevState.uncheckableItemValues) && (0, _isArray2.default)(uncheckableItemValues)) {\n this.flattenNodes(data);\n this.unserializeLists({\n check: selectedValues,\n expand: expandItemValues\n });\n this.setState({\n hasValue: this.hasValue()\n });\n }\n };\n\n _proto.updateCascadeChange = function updateCascadeChange(prevState) {\n var _this$state4 = this.state,\n data = _this$state4.data,\n selectedValues = _this$state4.selectedValues,\n expandItemValues = _this$state4.expandItemValues;\n var cascade = this.props.cascade; // cascade 改变时,重新初始化\n\n if (cascade !== prevState.cascade && cascade) {\n this.flattenNodes(data);\n this.unserializeLists({\n check: selectedValues,\n expand: expandItemValues\n });\n this.setState({\n cascade: cascade\n });\n }\n };\n\n _proto.updateSearchKeywordChange = function updateSearchKeywordChange(prevState) {\n var filterData = this.state.filterData;\n var searchKeyword = this.props.searchKeyword;\n\n if (!(0, _isUndefined2.default)(searchKeyword) && prevState.searchKeyword !== searchKeyword) {\n this.setState({\n filterData: this.getFilterData(searchKeyword, filterData)\n });\n }\n };\n\n _proto.getNodeCheckState = function getNodeCheckState(node, cascade) {\n var childrenKey = this.props.childrenKey;\n\n if (!node[childrenKey] || !node[childrenKey].length || !cascade) {\n this.nodes[node.refKey].checkAll = false;\n return node.check ? _constants.CHECK_STATE.CHECK : _constants.CHECK_STATE.UNCHECK;\n }\n\n if ((0, _utils2.isEveryChildChecked)(node, this.nodes, this.props)) {\n this.nodes[node.refKey].checkAll = true;\n this.nodes[node.refKey].check = true;\n return _constants.CHECK_STATE.CHECK;\n }\n\n if ((0, _utils2.isSomeChildChecked)(node, this.nodes, this.props)) {\n this.nodes[node.refKey].checkAll = false;\n return _constants.CHECK_STATE.INDETERMINATE;\n }\n\n return _constants.CHECK_STATE.UNCHECK;\n };\n\n _proto.getFilterData = function getFilterData(searchKeyword, data, props) {\n if (searchKeyword === void 0) {\n searchKeyword = '';\n }\n\n if (props === void 0) {\n props = this.props;\n }\n\n var _props3 = props,\n labelKey = _props3.labelKey,\n childrenKey = _props3.childrenKey,\n searchBy = _props3.searchBy;\n\n var setVisible = function setVisible(nodes) {\n if (nodes === void 0) {\n nodes = [];\n }\n\n return nodes.forEach(function (item) {\n item.visible = searchBy ? searchBy(searchKeyword, item[labelKey], item) : (0, _Picker.shouldDisplay)(item[labelKey], searchKeyword);\n\n if ((0, _isArray2.default)(item[childrenKey])) {\n setVisible(item[childrenKey]);\n item[childrenKey].forEach(function (child) {\n if (child.visible) {\n item.visible = child.visible;\n }\n });\n }\n });\n };\n\n setVisible(data);\n return data;\n };\n\n _proto.getActiveElementOption = function getActiveElementOption(options, refKey) {\n var childrenKey = this.props.childrenKey;\n\n for (var i = 0; i < options.length; i += 1) {\n var _options$i$childrenKe;\n\n if (options[i].refKey === refKey) {\n return options[i];\n } else if ((_options$i$childrenKe = options[i][childrenKey]) === null || _options$i$childrenKe === void 0 ? void 0 : _options$i$childrenKe.length) {\n var active = this.getActiveElementOption(options[i][childrenKey], refKey);\n\n if (!(0, _isEmpty2.default)(active)) {\n return active;\n }\n }\n }\n\n return {};\n };\n\n _proto.getFlattenTreeData = function getFlattenTreeData(nodes) {\n var _this4 = this;\n\n var expandItemValues = this.state.expandItemValues;\n var _this$props8 = this.props,\n childrenKey = _this$props8.childrenKey,\n valueKey = _this$props8.valueKey;\n return (0, _treeUtils.flattenTree)(nodes, childrenKey, function (node) {\n var formatted = {};\n var curNode = _this4.nodes[node.refKey];\n var parentKeys = (0, _treeUtils.getNodeParents)(curNode, 'parentNode', valueKey);\n\n if (curNode) {\n formatted = (0, _extends2.default)({}, node, {\n check: curNode.check,\n expand: curNode.expand,\n uncheckable: curNode.uncheckable,\n layer: curNode.layer,\n parentNode: curNode.parentNode,\n showNode: (0, _treeUtils.shouldShowNodeByExpanded)(expandItemValues, parentKeys)\n });\n }\n\n return formatted;\n });\n };\n\n _proto.getItemsAndActiveIndex = function getItemsAndActiveIndex() {\n var items = this.getFocusableMenuItems();\n var activeIndex = -1;\n items.forEach(function (item, index) {\n if (document.activeElement !== null) {\n if (item.refKey === document.activeElement.getAttribute('data-key')) {\n activeIndex = index;\n }\n }\n });\n return {\n items: items,\n activeIndex: activeIndex\n };\n };\n\n _proto.getActiveItem = function getActiveItem() {\n var filterData = this.state.filterData;\n var activeItem = document.activeElement;\n\n if (activeItem !== null) {\n var _activeItem$dataset, _activeItem$dataset2, _this$nodes$nodeData$, _this$nodes$nodeData$2;\n\n var key = activeItem === null || activeItem === void 0 ? void 0 : (_activeItem$dataset = activeItem.dataset) === null || _activeItem$dataset === void 0 ? void 0 : _activeItem$dataset.key;\n var layer = activeItem === null || activeItem === void 0 ? void 0 : (_activeItem$dataset2 = activeItem.dataset) === null || _activeItem$dataset2 === void 0 ? void 0 : _activeItem$dataset2.layer;\n var nodeData = this.getActiveElementOption(filterData, key);\n nodeData.check = !((_this$nodes$nodeData$ = this.nodes[nodeData.refKey]) === null || _this$nodes$nodeData$ === void 0 ? void 0 : _this$nodes$nodeData$.check);\n nodeData.parentNode = (_this$nodes$nodeData$2 = this.nodes[nodeData.refKey]) === null || _this$nodes$nodeData$2 === void 0 ? void 0 : _this$nodes$nodeData$2.parentNode;\n return {\n nodeData: nodeData,\n layer: layer\n };\n }\n\n return {};\n }\n /**\n * 获取已选择的items,用于显示在placeholder\n */\n ;\n\n _proto.getSelectedItems = function getSelectedItems(selectedValues) {\n var _this5 = this;\n\n var valueKey = this.props.valueKey;\n var checkItems = [];\n Object.keys(this.nodes).map(function (refKey) {\n var node = _this5.nodes[refKey];\n\n if (selectedValues.some(function (value) {\n return (0, _shallowEqual.default)(node[valueKey], value);\n })) {\n checkItems.push(node);\n }\n });\n return checkItems;\n }\n /**\n * 判断传入的 value 是否存在于data 中\n * @param {*} values\n */\n ;\n\n _proto.hasValue = function hasValue(values) {\n var _this6 = this;\n\n if (values === void 0) {\n values = this.state.selectedValues;\n }\n\n var valueKey = this.props.valueKey;\n var selectedValues = Object.keys(this.nodes).map(function (refKey) {\n return _this6.nodes[refKey][valueKey];\n }).filter(function (item) {\n return values.some(function (v) {\n return (0, _shallowEqual.default)(v, item);\n });\n });\n return !!selectedValues.length;\n }\n /**\n * 拍平数组,将tree 转换为一维对象\n * @param {*} nodes tree data\n * @param {*} ref 当前层级\n */\n ;\n\n _proto.flattenNodes = function flattenNodes(nodes, props, ref, parentNode, layer) {\n var _this7 = this;\n\n if (ref === void 0) {\n ref = '0';\n }\n\n if (layer === void 0) {\n layer = 0;\n }\n\n var _ref2 = props || this.props,\n labelKey = _ref2.labelKey,\n valueKey = _ref2.valueKey,\n childrenKey = _ref2.childrenKey;\n\n if (!Array.isArray(nodes) || nodes.length === 0) {\n return;\n }\n\n nodes.forEach(function (node, index) {\n var _this7$nodes$refKey;\n\n var refKey = ref + \"-\" + index;\n node.refKey = refKey;\n _this7.nodes[refKey] = (_this7$nodes$refKey = {\n layer: layer\n }, _this7$nodes$refKey[labelKey] = node[labelKey], _this7$nodes$refKey[valueKey] = node[valueKey], _this7$nodes$refKey.expand = (0, _treeUtils.getExpandState)(node, props || _this7.props), _this7$nodes$refKey.uncheckable = (0, _utils2.getUncheckableState)(node, props || _this7.props), _this7$nodes$refKey.refKey = refKey, _this7$nodes$refKey);\n\n if (parentNode) {\n _this7.nodes[refKey].parentNode = parentNode;\n }\n\n _this7.flattenNodes(node[childrenKey], props, refKey, _this7.nodes[refKey], layer + 1);\n });\n }\n /**\n * 过滤选中的 values 中不包含 uncheckableItemValues 的那些值\n * @param {*} values\n */\n ;\n\n _proto.filterSelectedValues = function filterSelectedValues(values) {\n var _this$props$uncheckab = this.props.uncheckableItemValues,\n uncheckableItemValues = _this$props$uncheckab === void 0 ? [] : _this$props$uncheckab;\n return values.filter(function (value) {\n return !uncheckableItemValues.includes(value);\n });\n };\n\n _proto.serializeList = function serializeList(key, nodes) {\n if (nodes === void 0) {\n nodes = this.nodes;\n }\n\n var valueKey = this.props.valueKey;\n var list = [];\n Object.keys(nodes).forEach(function (refKey) {\n if (nodes[refKey][key]) {\n list.push(nodes[refKey][valueKey]);\n }\n });\n return list;\n };\n\n _proto.serializeListOnlyParent = function serializeListOnlyParent(key, nodes) {\n if (nodes === void 0) {\n nodes = this.nodes;\n }\n\n var valueKey = this.props.valueKey;\n var list = [];\n Object.keys(nodes).forEach(function (refKey) {\n var currentNode = nodes[refKey];\n\n if (currentNode.parentNode) {\n var _currentNode$parentNo;\n\n var parentNode = nodes[(_currentNode$parentNo = currentNode.parentNode) === null || _currentNode$parentNo === void 0 ? void 0 : _currentNode$parentNo.refKey];\n\n if (currentNode[key]) {\n if (!(parentNode === null || parentNode === void 0 ? void 0 : parentNode.checkAll)) {\n list.push(nodes[refKey][valueKey]);\n } else if (parentNode === null || parentNode === void 0 ? void 0 : parentNode.uncheckable) {\n list.push(nodes[refKey][valueKey]);\n }\n }\n } else {\n if (currentNode[key]) {\n list.push(nodes[refKey][valueKey]);\n }\n }\n });\n return list;\n };\n\n _proto.unserializeLists = function unserializeLists(lists, nextProps) {\n var _this8 = this;\n\n if (nextProps === void 0) {\n nextProps = this.props;\n }\n\n var _nextProps = nextProps,\n valueKey = _nextProps.valueKey,\n cascade = _nextProps.cascade,\n _nextProps$uncheckabl = _nextProps.uncheckableItemValues,\n uncheckableItemValues = _nextProps$uncheckabl === void 0 ? [] : _nextProps$uncheckabl;\n var expandAll = (0, _treeUtils.getExpandAll)(nextProps); // Reset values to false\n\n Object.keys(this.nodes).forEach(function (refKey) {\n Object.keys(lists).forEach(function (listKey) {\n if (listKey === 'check') {\n var node = _this8.nodes[refKey];\n\n if (cascade && 'parentNode' in node) {\n node[listKey] = node.parentNode[listKey];\n } else {\n node[listKey] = false;\n }\n\n lists[listKey].forEach(function (value) {\n if ((0, _shallowEqual.default)(_this8.nodes[refKey][valueKey], value) && !uncheckableItemValues.some(function (uncheckableValue) {\n return (0, _shallowEqual.default)(value, uncheckableValue);\n })) {\n _this8.nodes[refKey][listKey] = true;\n }\n });\n }\n\n if (listKey === 'expand') {\n _this8.nodes[refKey][listKey] = false;\n\n if (lists[listKey].length) {\n lists[listKey].forEach(function (value) {\n if ((0, _shallowEqual.default)(_this8.nodes[refKey][valueKey], value)) {\n _this8.nodes[refKey][listKey] = true;\n }\n });\n } else {\n _this8.nodes[refKey][listKey] = expandAll;\n }\n }\n });\n });\n };\n\n _proto.toggleChecked = function toggleChecked(node, isChecked) {\n var nodes = (0, _utils.clone)(this.nodes);\n this.toggleDownChecked(nodes, node, isChecked);\n node.parentNode && this.toggleUpChecked(nodes, node.parentNode, isChecked);\n var values = this.serializeListOnlyParent('check', nodes);\n return this.filterSelectedValues(values);\n };\n\n _proto.toggleUpChecked = function toggleUpChecked(nodes, node, checked) {\n var cascade = this.props.cascade;\n var currentNode = nodes[node.refKey];\n\n if (cascade) {\n if (!checked) {\n currentNode.check = checked;\n currentNode.checkAll = checked;\n } else {\n if (this.everyChildChecked(nodes, node)) {\n currentNode.check = true;\n currentNode.checkAll = true;\n } else {\n currentNode.check = false;\n currentNode.checkAll = false;\n }\n }\n\n if (node.parentNode) {\n this.toggleUpChecked(nodes, node.parentNode, checked);\n }\n }\n };\n\n _proto.toggleDownChecked = function toggleDownChecked(nodes, node, isChecked) {\n var _this9 = this;\n\n var _this$props9 = this.props,\n childrenKey = _this$props9.childrenKey,\n cascade = _this$props9.cascade;\n nodes[node.refKey].check = isChecked;\n\n if (!node[childrenKey] || !node[childrenKey].length || !cascade) {\n nodes[node.refKey].checkAll = false;\n } else {\n nodes[node.refKey].checkAll = isChecked;\n node[childrenKey].forEach(function (child) {\n _this9.toggleDownChecked(nodes, child, isChecked);\n });\n }\n };\n\n _proto.toggleNode = function toggleNode(key, node, toggleValue) {\n // 如果该节点处于 disabledCheckbox,则忽略该值\n if (!node.uncheckable) {\n this.nodes[node.refKey][key] = toggleValue;\n }\n };\n\n _proto.toggleExpand = function toggleExpand(node, isExpand) {\n var valueKey = this.props.valueKey;\n var expandItemValues = new Set(this.serializeList('expand'));\n\n if (isExpand) {\n expandItemValues.add(node[valueKey]);\n } else {\n expandItemValues.delete(node[valueKey]);\n }\n\n return Array.from(expandItemValues);\n };\n\n _proto.renderDropdownMenu = function renderDropdownMenu() {\n var _this$props10 = this.props,\n _this$props10$height = _this$props10.height,\n height = _this$props10$height === void 0 ? defaultHeight : _this$props10$height,\n locale = _this$props10.locale,\n menuStyle = _this$props10.menuStyle,\n searchable = _this$props10.searchable,\n renderMenu = _this$props10.renderMenu,\n virtualized = _this$props10.virtualized,\n searchKeyword = _this$props10.searchKeyword,\n renderExtraFooter = _this$props10.renderExtraFooter,\n menuClassName = _this$props10.menuClassName,\n menuAutoWidth = _this$props10.menuAutoWidth;\n var keyword = !(0, _isUndefined2.default)(searchKeyword) ? searchKeyword : this.state.searchKeyword;\n var classes = (0, _classnames.default)(menuClassName, this.addPrefix('check-tree-menu'));\n var menu = this.renderCheckTree();\n var styles = virtualized ? (0, _extends2.default)({\n height: height\n }, menuStyle) : menuStyle;\n return React.createElement(_Picker.MenuWrapper, {\n autoWidth: menuAutoWidth,\n className: classes,\n style: styles,\n ref: this.menuRef,\n getToggleInstance: this.getToggleInstance,\n getPositionInstance: this.getPositionInstance,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 925\n },\n __self: this\n }, searchable ? React.createElement(_Picker.SearchBar, {\n placeholder: locale.searchPlaceholder,\n key: \"searchBar\",\n onChange: this.handleSearch,\n value: keyword,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 934\n },\n __self: this\n }) : null, renderMenu ? renderMenu(menu) : menu, renderExtraFooter === null || renderExtraFooter === void 0 ? void 0 : renderExtraFooter());\n };\n\n _proto.renderNode = function renderNode(node, layer) {\n var _this10 = this;\n\n var _this$state5 = this.state,\n activeNode = _this$state5.activeNode,\n searchKeyword = _this$state5.searchKeyword;\n var _this$props11 = this.props,\n valueKey = _this$props11.valueKey,\n labelKey = _this$props11.labelKey,\n childrenKey = _this$props11.childrenKey,\n renderTreeNode = _this$props11.renderTreeNode,\n renderTreeIcon = _this$props11.renderTreeIcon,\n cascade = _this$props11.cascade,\n locale = _this$props11.locale;\n var visible = node.visible,\n refKey = node.refKey; // 当处于搜索时,需要将所有节点都展开\n\n var expand = (0, _treeUtils.getExpandWhenSearching)(searchKeyword, node.expand);\n\n if (!visible) {\n return null;\n }\n\n var key = (0, _isString2.default)(node[valueKey]) || (0, _isNumber2.default)(node[valueKey]) ? node[valueKey] : refKey;\n var children = node[childrenKey]; // 当用户进行搜索时,hasChildren的判断要变成判断是否存在 visible 为 true 的子节点\n\n var visibleChildren = (0, _isUndefined2.default)(searchKeyword) || searchKeyword.length === 0 ? !!children : (0, _treeUtils.hasVisibleChildren)(node, childrenKey);\n var props = {\n value: node[valueKey],\n label: node[labelKey],\n layer: layer,\n expand: expand,\n rtl: locale.rtl,\n focus: activeNode ? (0, _shallowEqual.default)(activeNode[valueKey], node[valueKey]) : false,\n visible: node.visible,\n disabled: (0, _utils2.getDisabledState)(this.nodes, node, this.props),\n nodeData: node,\n checkState: this.getNodeCheckState(node, cascade),\n hasChildren: visibleChildren,\n uncheckable: node.uncheckable,\n allUncheckable: (0, _utils2.getSiblingNodeUncheckable)(node, this.nodes),\n onSelect: this.handleSelect,\n onTreeToggle: this.handleToggle,\n onRenderTreeNode: renderTreeNode,\n onRenderTreeIcon: renderTreeIcon\n };\n\n if (props.hasChildren) {\n var _classNames;\n\n layer += 1; // 是否展开树节点且子节点不为空\n\n var openClass = this.addTreePrefix('open');\n var childrenClass = (0, _classnames.default)(this.addTreePrefix('node-children'), (_classNames = {}, _classNames[openClass] = expand && visibleChildren, _classNames));\n var nodes = children || [];\n return React.createElement(\"div\", {\n className: childrenClass,\n key: key,\n ref: this.bindNodeRefs.bind(this, refKey),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1005\n },\n __self: this\n }, React.createElement(_CheckTreeNode.default, (0, _extends2.default)({}, props, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1006\n },\n __self: this\n })), React.createElement(\"div\", {\n className: this.addTreePrefix('children'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1007\n },\n __self: this\n }, nodes.map(function (child) {\n return _this10.renderNode(child, layer);\n })));\n }\n\n return React.createElement(_CheckTreeNode.default, (0, _extends2.default)({\n key: key,\n innerRef: this.bindNodeRefs.bind(this, refKey)\n }, props, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1014\n },\n __self: this\n }));\n };\n\n _proto.renderVirtualNode = function renderVirtualNode(node, options) {\n var _this$state6 = this.state,\n activeNode = _this$state6.activeNode,\n expandAll = _this$state6.expandAll,\n searchKeyword = _this$state6.searchKeyword;\n var _this$props12 = this.props,\n valueKey = _this$props12.valueKey,\n labelKey = _this$props12.labelKey,\n childrenKey = _this$props12.childrenKey,\n renderTreeNode = _this$props12.renderTreeNode,\n renderTreeIcon = _this$props12.renderTreeIcon,\n cascade = _this$props12.cascade,\n locale = _this$props12.locale;\n var key = options.key,\n style = options.style;\n var layer = node.layer,\n refKey = node.refKey,\n showNode = node.showNode;\n var expand = (0, _treeUtils.getExpandWhenSearching)(searchKeyword, node.expand);\n var children = node[childrenKey];\n var props = {\n value: node[valueKey],\n label: node[labelKey],\n layer: layer,\n expand: expand,\n rtl: locale.rtl,\n focus: activeNode ? (0, _shallowEqual.default)(activeNode[valueKey], node[valueKey]) : false,\n visible: node.visible,\n disabled: (0, _utils2.getDisabledState)(this.nodes, node, this.props),\n nodeData: node,\n children: children,\n expandAll: expandAll,\n checkState: this.getNodeCheckState(node, cascade),\n parentNode: node.parentNode,\n hasChildren: !!children,\n uncheckable: node.uncheckable,\n allUncheckable: (0, _utils2.getSiblingNodeUncheckable)(node, this.nodes),\n onSelect: this.handleSelect,\n onTreeToggle: this.handleToggle,\n onRenderTreeNode: renderTreeNode,\n onRenderTreeIcon: renderTreeIcon\n };\n return showNode && React.createElement(_CheckTreeNode.default, (0, _extends2.default)({\n style: style,\n key: key,\n innerRef: this.bindNodeRefs.bind(this, refKey)\n }, props, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1059\n },\n __self: this\n }));\n };\n\n _proto.renderCheckTree = function renderCheckTree() {\n var _classNames2,\n _this11 = this,\n _classNames3;\n\n var _this$state7 = this.state,\n filterData = _this$state7.filterData,\n isSomeNodeHasChildren = _this$state7.isSomeNodeHasChildren;\n var _this$props13 = this.props,\n inline = _this$props13.inline,\n style = _this$props13.style,\n height = _this$props13.height,\n className = _this$props13.className,\n onScroll = _this$props13.onScroll,\n locale = _this$props13.locale,\n virtualized = _this$props13.virtualized,\n searchable = _this$props13.searchable; // 树节点的层级\n\n var layer = 0;\n var classes = (0, _classnames.default)((0, _utils.defaultClassPrefix)('check-tree'), (_classNames2 = {}, _classNames2[className] = inline, _classNames2['without-children'] = !isSomeNodeHasChildren, _classNames2));\n var formattedNodes = [];\n\n if (!virtualized) {\n formattedNodes = (0, _utils2.getFormattedTree)(filterData, this.nodes, this.props).map(function (node) {\n return _this11.renderNode(node, layer);\n });\n\n if (!formattedNodes.some(function (v) {\n return v !== null;\n })) {\n return React.createElement(\"div\", {\n className: this.addPrefix('none'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1107\n },\n __self: this\n }, locale.noResultsText);\n }\n } else {\n formattedNodes = this.getFlattenTreeData(filterData).filter(function (n) {\n return n.showNode && n.visible;\n });\n\n if (!formattedNodes.length) {\n return React.createElement(\"div\", {\n className: this.addPrefix('none'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1112\n },\n __self: this\n }, locale.noResultsText);\n }\n } // 当未定义 height 且 设置了 virtualized 为 true,treeHeight 设置默认高度\n\n\n var treeHeight = (0, _isUndefined2.default)(height) && virtualized ? defaultHeight : height;\n var treeWidth = (0, _isUndefined2.default)(style === null || style === void 0 ? void 0 : style.width) ? defaultWidth : style.width;\n var styles = inline ? (0, _extends2.default)({\n height: treeHeight\n }, style) : {};\n var treeNodesClass = (0, _classnames.default)(this.addTreePrefix('nodes'), (_classNames3 = {}, _classNames3[this.addTreePrefix('all-uncheckable')] = (0, _utils2.getEveryFisrtLevelNodeUncheckable)(this.nodes), _classNames3));\n var listHeight = (0, _treeUtils.getVirtualLisHeight)(inline, searchable, treeHeight);\n return React.createElement(\"div\", {\n ref: this.treeViewRef,\n className: classes,\n style: styles,\n onScroll: onScroll,\n onKeyDown: this.handleKeyDown,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1126\n },\n __self: this\n }, React.createElement(\"div\", {\n className: treeNodesClass,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1133\n },\n __self: this\n }, virtualized ? React.createElement(_AutoSizer.default, {\n defaultHeight: listHeight,\n defaultWidth: treeWidth,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1135\n },\n __self: this\n }, function (_ref3) {\n var height = _ref3.height,\n width = _ref3.width;\n return React.createElement(_List.default, {\n ref: _this11.listRef,\n width: width || treeWidth,\n height: height || listHeight,\n rowHeight: 36,\n rowCount: formattedNodes.length,\n rowRenderer: _this11.measureRowRenderer(formattedNodes),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1137\n },\n __self: this\n });\n }) : formattedNodes));\n };\n\n _proto.render = function render() {\n var _this$props14 = this.props,\n cascade = _this$props14.cascade,\n style = _this$props14.style,\n locale = _this$props14.locale,\n inline = _this$props14.inline,\n disabled = _this$props14.disabled,\n valueKey = _this$props14.valueKey,\n labelKey = _this$props14.labelKey,\n cleanable = _this$props14.cleanable,\n countable = _this$props14.countable,\n placeholder = _this$props14.placeholder,\n toggleComponentClass = _this$props14.toggleComponentClass,\n onExited = _this$props14.onExited,\n onEntered = _this$props14.onEntered,\n onClean = _this$props14.onClean,\n renderValue = _this$props14.renderValue,\n positionRef = _this$props14.positionRef,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props14, [\"cascade\", \"style\", \"locale\", \"inline\", \"disabled\", \"valueKey\", \"labelKey\", \"cleanable\", \"countable\", \"placeholder\", \"toggleComponentClass\", \"onExited\", \"onEntered\", \"onClean\", \"renderValue\", \"positionRef\"]);\n var _this$state8 = this.state,\n hasValue = _this$state8.hasValue,\n selectedValues = _this$state8.selectedValues;\n var hasValidValue = hasValue || selectedValues.length > 0 && (0, _isFunction2.default)(renderValue);\n var selectedItems = this.getSelectedItems(selectedValues);\n var selectedElement = placeholder;\n /**\n * if value is invalid and renderValue is undefined, then using placeholder.\n * if value is valid and renderValue is't undefined, then using renderValue()\n */\n\n if (selectedValues.length) {\n if (hasValue) {\n selectedElement = React.createElement(_Picker.SelectedElement, {\n selectedItems: selectedItems,\n countable: countable,\n valueKey: valueKey,\n labelKey: labelKey,\n prefix: this.addPrefix,\n cascade: cascade,\n locale: locale,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1188\n },\n __self: this\n });\n }\n\n if ((0, _isFunction2.default)(renderValue)) {\n selectedElement = renderValue(selectedValues, selectedItems, selectedElement);\n\n if ((0, _isNil2.default)(selectedElement)) {\n hasValidValue = false;\n }\n }\n }\n\n var unhandled = (0, _utils.getUnhandledProps)(CheckTreePicker, rest);\n var classes = (0, _Picker.getToggleWrapperClassName)('check-tree', this.addPrefix, this.props, hasValidValue);\n\n if (inline) {\n return this.renderCheckTree();\n }\n\n return React.createElement(_Picker.PickerToggleTrigger, {\n pickerProps: this.props,\n ref: this.triggerRef,\n positionRef: (0, _utils.mergeRefs)(this.positionRef, positionRef),\n onEntered: (0, _utils.createChainedFunction)(this.handleOnOpen, onEntered),\n onExited: (0, _utils.createChainedFunction)(this.handleOnClose, onExited),\n speaker: this.renderDropdownMenu(),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1219\n },\n __self: this\n }, React.createElement(\"div\", {\n className: classes,\n style: style,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1227\n },\n __self: this\n }, React.createElement(_Picker.PickerToggle, (0, _extends2.default)({}, unhandled, {\n ref: this.toggleRef,\n onKeyDown: this.handleToggleKeyDown,\n onClean: (0, _utils.createChainedFunction)(this.handleClean, onClean),\n componentClass: toggleComponentClass,\n cleanable: cleanable && !disabled,\n hasValue: hasValidValue,\n active: this.state.active,\n \"aria-disabled\": disabled,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 1228\n },\n __self: this\n }), selectedElement || locale.placeholder)));\n };\n\n return CheckTreePicker;\n}(React.Component);\n\nCheckTreePicker.propTypes = (0, _extends2.default)({}, _propTypes2.listPickerPropTypes, {\n height: _propTypes.default.number,\n inline: _propTypes.default.bool,\n cascade: _propTypes.default.bool,\n countable: _propTypes.default.bool,\n expandAll: _propTypes.default.bool,\n searchable: _propTypes.default.bool,\n virtualized: _propTypes.default.bool,\n searchKeyword: _propTypes.default.string,\n menuAutoWidth: _propTypes.default.bool,\n defaultExpandAll: _propTypes.default.bool,\n containerPadding: _propTypes.default.number,\n disabledItemValues: _propTypes.default.array,\n expandItemValues: _propTypes.default.array,\n defaultExpandItemValues: _propTypes.default.array,\n uncheckableItemValues: _propTypes.default.array,\n onSearch: _propTypes.default.func,\n onExpand: _propTypes.default.func,\n onSelect: _propTypes.default.func,\n onScroll: _propTypes.default.func,\n renderMenu: _propTypes.default.func,\n renderTreeNode: _propTypes.default.func,\n renderTreeIcon: _propTypes.default.func,\n searchBy: _propTypes.default.func\n});\nCheckTreePicker.defaultProps = (0, _extends2.default)({}, _propTypes2.listPickerDefaultProps, {\n cascade: true,\n countable: true,\n searchable: true,\n menuAutoWidth: true,\n defaultValue: [],\n uncheckableItemValues: [],\n locale: {\n placeholder: 'Select',\n searchPlaceholder: 'Search',\n noResultsText: 'No results found',\n checkAll: 'All'\n }\n});\n(0, _reactLifecyclesCompat.polyfill)(CheckTreePicker);\n\nvar _default = (0, _utils.defaultProps)({\n classPrefix: 'picker'\n})(CheckTreePicker);\n\nexports.default = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./src/CheckTreePicker/CheckTreePicker.tsx?");
|
|
8330
7747
|
|
|
8331
7748
|
/***/ }),
|
|
8332
7749
|
|
|
@@ -9586,7 +9003,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
|
|
|
9586
9003
|
/***/ (function(module, exports, __webpack_require__) {
|
|
9587
9004
|
|
|
9588
9005
|
"use strict";
|
|
9589
|
-
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.dropdownMenuPropTypes = void 0;\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\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 _isNumber2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNumber */ \"./node_modules/lodash/isNumber.js\"));\n\nvar _isString2 = _interopRequireDefault(__webpack_require__(/*! lodash/isString */ \"./node_modules/lodash/isString.js\"));\n\nvar _isNull2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNull */ \"./node_modules/lodash/isNull.js\"));\n\nvar _isUndefined2 = _interopRequireDefault(__webpack_require__(/*! lodash/isUndefined */ \"./node_modules/lodash/isUndefined.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 _shallowEqual = _interopRequireDefault(__webpack_require__(/*! ../utils/shallowEqual */ \"./src/utils/shallowEqual.ts\"));\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _Picker = __webpack_require__(/*! ../Picker */ \"./src/Picker/index.ts\");\n\nvar _utils2 = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./src/MultiCascader/utils.ts\"));\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/MultiCascader/DropdownMenu.tsx\";\nvar dropdownMenuPropTypes = {\n classPrefix: _propTypes.default.string,\n data: _propTypes.default.array,\n disabledItemValues: _propTypes.default.array,\n value: _propTypes.default.array,\n childrenKey: _propTypes.default.string,\n valueKey: _propTypes.default.string,\n labelKey: _propTypes.default.string,\n menuWidth: _propTypes.default.number,\n menuHeight: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n className: _propTypes.default.string,\n cascade: _propTypes.default.bool,\n cascadeItems: _propTypes.default.array,\n cascadePathItems: _propTypes.default.array,\n uncheckableItemValues: _propTypes.default.array,\n renderMenuItem: _propTypes.default.func,\n renderMenu: _propTypes.default.func,\n onSelect: _propTypes.default.func,\n onCheck: _propTypes.default.func\n};\nexports.dropdownMenuPropTypes = dropdownMenuPropTypes;\n\nvar DropdownMenu =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(DropdownMenu, _React$Component);\n\n function DropdownMenu(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.utils = {};\n _this.menus = [];\n\n _this.handleSelect = function (layer, node, event) {\n var _this$props = _this.props,\n onSelect = _this$props.onSelect,\n childrenKey = _this$props.childrenKey;\n var children = node[childrenKey];\n var isLeafNode = (0, _isUndefined2.default)(children) || (0, _isNull2.default)(children);\n var items = (children || []).map(function (item) {\n return (0, _extends2.default)({}, item, {\n parent: node\n });\n });\n\n var _this$getCascadeItems = _this.getCascadeItems(items, layer + 1, node, isLeafNode),\n cascadeItems = _this$getCascadeItems.cascadeItems,\n cascadePathItems = _this$getCascadeItems.cascadePathItems;\n\n onSelect === null || onSelect === void 0 ? void 0 : onSelect(node, cascadeItems, cascadePathItems, event);\n };\n\n _this.addPrefix = function (name) {\n return (0, _utils.prefix)(_this.props.classPrefix)(name);\n };\n\n _this.utils = (0, _utils2.default)(props);\n return _this;\n }\n\n var _proto = DropdownMenu.prototype;\n\n _proto.getCascadeItems = function getCascadeItems(items, layer, node, isLeafNode) {\n var _this$props2 = this.props,\n _this$props2$cascadeI = _this$props2.cascadeItems,\n cascadeItems = _this$props2$cascadeI === void 0 ? [] : _this$props2$cascadeI,\n cascadePathItems = _this$props2.cascadePathItems;\n var nextItems = [];\n var nextPathItems = [];\n\n for (var i = 0; i < cascadeItems.length && i < layer; i += 1) {\n nextItems.push(cascadeItems[i]);\n\n if (i < layer - 1 && cascadePathItems) {\n nextPathItems.push(cascadePathItems[i]);\n }\n }\n\n nextPathItems.push(node);\n\n if (!isLeafNode) {\n nextItems.push(items);\n }\n\n return {\n cascadeItems: nextItems,\n cascadePathItems: nextPathItems\n };\n };\n\n _proto.renderCascadeNode = function renderCascadeNode(node, index, layer, focus, uncheckable) {\n var _classNames;\n\n var _this$props3 = this.props,\n _this$props3$value = _this$props3.value,\n value = _this$props3$value === void 0 ? [] : _this$props3$value,\n valueKey = _this$props3.valueKey,\n labelKey = _this$props3.labelKey,\n childrenKey = _this$props3.childrenKey,\n disabledItemValues = _this$props3.disabledItemValues,\n renderMenuItem = _this$props3.renderMenuItem,\n onCheck = _this$props3.onCheck,\n cascade = _this$props3.cascade;\n var children = node[childrenKey];\n var itemValue = node[valueKey];\n var label = node[labelKey];\n var disabled = disabledItemValues.some(function (disabledValue) {\n return (0, _shallowEqual.default)(disabledValue, itemValue);\n }); // Use `value` in keys when If `value` is string or number\n\n var onlyKey = (0, _isString2.default)(itemValue) || (0, _isNumber2.default)(itemValue) ? itemValue : index;\n var active = value.some(function (v) {\n return v === itemValue;\n });\n\n if (cascade) {\n active = active || this.utils.isSomeParentChecked(node, value);\n }\n\n value.some(function (item) {\n return (0, _shallowEqual.default)(item, itemValue);\n });\n var classes = (0, _classnames.default)((_classNames = {}, _classNames[this.addPrefix('cascader-menu-has-children')] = children, _classNames));\n return React.createElement(_Picker.DropdownMenuCheckItem, {\n key: layer + \"-\" + onlyKey,\n disabled: disabled,\n active: active,\n focus: focus,\n value: node,\n className: classes,\n componentClass: \"li\",\n indeterminate: cascade && !active && this.utils.isSomeChildChecked(node, value),\n onSelectItem: this.handleSelect.bind(this, layer, node),\n onCheck: onCheck,\n checkable: !uncheckable,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 160\n },\n __self: this\n }, renderMenuItem ? renderMenuItem(label, node) : label, children ? React.createElement(\"span\", {\n className: this.addPrefix('cascader-menu-caret'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 174\n },\n __self: this\n }) : null);\n };\n\n _proto.renderCascade = function renderCascade() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n menuWidth = _this$props4.menuWidth,\n menuHeight = _this$props4.menuHeight,\n valueKey = _this$props4.valueKey,\n renderMenu = _this$props4.renderMenu,\n _this$props4$cascadeI = _this$props4.cascadeItems,\n cascadeItems = _this$props4$cascadeI === void 0 ? [] : _this$props4$cascadeI,\n cascadePathItems = _this$props4.cascadePathItems,\n uncheckableItemValues = _this$props4.uncheckableItemValues;\n var styles = {\n width: cascadeItems.length * menuWidth\n };\n var columnStyles = {\n height: menuHeight,\n width: menuWidth\n };\n var cascadeNodes = cascadeItems.map(function (children, layer) {\n var _classNames2;\n\n var uncheckableCount = 0;\n var onlyKey = layer + \"_\" + children.length;\n var menu = React.createElement(\"ul\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 201\n },\n __self: this\n }, children.map(function (item, index) {\n var uncheckable = uncheckableItemValues.some(function (uncheckableValue) {\n return (0, _shallowEqual.default)(uncheckableValue, item[valueKey]);\n });\n\n if (uncheckable) {\n uncheckableCount++;\n }\n\n return _this2.renderCascadeNode(item, index, layer, cascadePathItems[layer] && (0, _shallowEqual.default)(cascadePathItems[layer][valueKey], item[valueKey]), uncheckable);\n }));\n var parentNode = cascadePathItems[layer - 1];\n var columnClasses = (0, _classnames.default)(_this2.addPrefix('cascader-menu-column'), (_classNames2 = {}, _classNames2[_this2.addPrefix('cascader-menu-column-uncheckable')] = uncheckableCount === children.length, _classNames2));\n var node = React.createElement(\"div\", {\n key: onlyKey,\n className: columnClasses,\n ref: function ref(_ref) {\n return _this2.menus[layer] = _ref;\n },\n style: columnStyles,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 226\n },\n __self: this\n }, renderMenu ? renderMenu(children, menu, parentNode) : menu);\n return node;\n });\n return React.createElement(\"div\", {\n style: styles,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 237\n },\n __self: this\n }, cascadeNodes);\n };\n\n _proto.render = function render() {\n var _this$props5 = this.props,\n className = _this$props5.className,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props5, [\"className\"]);\n var classes = (0, _classnames.default)(this.addPrefix('cascader-menu-items'), className);\n var unhandled = (0, _utils.getUnhandledProps)(DropdownMenu, rest);\n return React.createElement(\"div\", (0, _extends2.default)({}, unhandled, {\n className: classes,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 246\n },\n __self: this\n }), this.renderCascade());\n };\n\n return DropdownMenu;\n}(React.Component);\n\nDropdownMenu.propTypes = dropdownMenuPropTypes;\nDropdownMenu.defaultProps = {\n data: [],\n disabledItemValues: [],\n uncheckableItemValues: [],\n cascadeItems: [],\n cascadePathItems: [],\n menuWidth: 156,\n menuHeight: 200,\n childrenKey: 'children',\n valueKey: 'value',\n labelKey: 'label'\n};\nvar _default = DropdownMenu;\nexports.default = _default;\n\n//# sourceURL=webpack://rsuite/./src/MultiCascader/DropdownMenu.tsx?");
|
|
9006
|
+
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.dropdownMenuPropTypes = void 0;\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\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 _isNumber2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNumber */ \"./node_modules/lodash/isNumber.js\"));\n\nvar _isString2 = _interopRequireDefault(__webpack_require__(/*! lodash/isString */ \"./node_modules/lodash/isString.js\"));\n\nvar _isNull2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNull */ \"./node_modules/lodash/isNull.js\"));\n\nvar _isUndefined2 = _interopRequireDefault(__webpack_require__(/*! lodash/isUndefined */ \"./node_modules/lodash/isUndefined.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 _shallowEqual = _interopRequireDefault(__webpack_require__(/*! ../utils/shallowEqual */ \"./src/utils/shallowEqual.ts\"));\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _Picker = __webpack_require__(/*! ../Picker */ \"./src/Picker/index.ts\");\n\nvar _utils2 = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./src/MultiCascader/utils.ts\"));\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/MultiCascader/DropdownMenu.tsx\";\nvar dropdownMenuPropTypes = {\n classPrefix: _propTypes.default.string,\n data: _propTypes.default.array,\n disabledItemValues: _propTypes.default.array,\n value: _propTypes.default.array,\n childrenKey: _propTypes.default.string,\n valueKey: _propTypes.default.string,\n labelKey: _propTypes.default.string,\n menuWidth: _propTypes.default.number,\n menuHeight: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n className: _propTypes.default.string,\n cascade: _propTypes.default.bool,\n cascadeItems: _propTypes.default.array,\n cascadePathItems: _propTypes.default.array,\n uncheckableItemValues: _propTypes.default.array,\n renderMenuItem: _propTypes.default.func,\n renderMenu: _propTypes.default.func,\n onSelect: _propTypes.default.func,\n onCheck: _propTypes.default.func\n};\nexports.dropdownMenuPropTypes = dropdownMenuPropTypes;\n\nvar DropdownMenu =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(DropdownMenu, _React$Component);\n\n function DropdownMenu(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.utils = {};\n _this.menus = [];\n\n _this.handleSelect = function (layer, node, event) {\n var _this$props = _this.props,\n onSelect = _this$props.onSelect,\n childrenKey = _this$props.childrenKey;\n var children = node[childrenKey];\n var isLeafNode = (0, _isUndefined2.default)(children) || (0, _isNull2.default)(children);\n var items = (children || []).map(function (item) {\n return (0, _extends2.default)({}, item, {\n parent: node\n });\n });\n\n var _this$getCascadeItems = _this.getCascadeItems(items, layer + 1, node, isLeafNode),\n cascadeItems = _this$getCascadeItems.cascadeItems,\n cascadePathItems = _this$getCascadeItems.cascadePathItems;\n\n onSelect === null || onSelect === void 0 ? void 0 : onSelect(node, cascadeItems, cascadePathItems, event);\n };\n\n _this.addPrefix = function (name) {\n return (0, _utils.prefix)(_this.props.classPrefix)(name);\n };\n\n _this.utils = (0, _utils2.default)(props);\n return _this;\n }\n\n var _proto = DropdownMenu.prototype;\n\n _proto.getCascadeItems = function getCascadeItems(items, layer, node, isLeafNode) {\n var _this$props2 = this.props,\n _this$props2$cascadeI = _this$props2.cascadeItems,\n cascadeItems = _this$props2$cascadeI === void 0 ? [] : _this$props2$cascadeI,\n cascadePathItems = _this$props2.cascadePathItems;\n var nextItems = [];\n var nextPathItems = [];\n\n for (var i = 0; i < cascadeItems.length && i < layer; i += 1) {\n nextItems.push(cascadeItems[i]);\n\n if (i < layer - 1 && cascadePathItems) {\n nextPathItems.push(cascadePathItems[i]);\n }\n }\n\n nextPathItems.push(node);\n\n if (!isLeafNode) {\n nextItems.push(items);\n }\n\n return {\n cascadeItems: nextItems,\n cascadePathItems: nextPathItems\n };\n };\n\n _proto.renderCascadeNode = function renderCascadeNode(node, index, layer, focus, uncheckable) {\n var _classNames;\n\n var _this$props3 = this.props,\n _this$props3$value = _this$props3.value,\n value = _this$props3$value === void 0 ? [] : _this$props3$value,\n valueKey = _this$props3.valueKey,\n labelKey = _this$props3.labelKey,\n childrenKey = _this$props3.childrenKey,\n disabledItemValues = _this$props3.disabledItemValues,\n renderMenuItem = _this$props3.renderMenuItem,\n onCheck = _this$props3.onCheck,\n cascade = _this$props3.cascade;\n var children = node[childrenKey];\n var itemValue = node[valueKey];\n var label = node[labelKey];\n var disabled = disabledItemValues.some(function (disabledValue) {\n return (0, _shallowEqual.default)(disabledValue, itemValue);\n }); // Use `value` in keys when If `value` is string or number\n\n var onlyKey = (0, _isString2.default)(itemValue) || (0, _isNumber2.default)(itemValue) ? itemValue : index;\n var active = value.some(function (v) {\n return v === itemValue;\n });\n\n if (cascade) {\n active = active || this.utils.isSomeParentChecked(node, value);\n }\n\n value.some(function (item) {\n return (0, _shallowEqual.default)(item, itemValue);\n });\n var classes = (0, _classnames.default)((_classNames = {}, _classNames[this.addPrefix('cascader-menu-has-children')] = children, _classNames));\n return React.createElement(_Picker.DropdownMenuCheckItem, {\n key: layer + \"-\" + onlyKey,\n disabled: disabled,\n active: active,\n focus: focus,\n value: node,\n className: classes,\n componentClass: \"li\",\n indeterminate: cascade && !active && this.utils.isSomeChildChecked(node, value),\n onSelectItem: this.handleSelect.bind(this, layer),\n onCheck: onCheck,\n checkable: !uncheckable,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 160\n },\n __self: this\n }, renderMenuItem ? renderMenuItem(label, node) : label, children ? React.createElement(\"span\", {\n className: this.addPrefix('cascader-menu-caret'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 174\n },\n __self: this\n }) : null);\n };\n\n _proto.renderCascade = function renderCascade() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n menuWidth = _this$props4.menuWidth,\n menuHeight = _this$props4.menuHeight,\n valueKey = _this$props4.valueKey,\n renderMenu = _this$props4.renderMenu,\n _this$props4$cascadeI = _this$props4.cascadeItems,\n cascadeItems = _this$props4$cascadeI === void 0 ? [] : _this$props4$cascadeI,\n cascadePathItems = _this$props4.cascadePathItems,\n uncheckableItemValues = _this$props4.uncheckableItemValues;\n var styles = {\n width: cascadeItems.length * menuWidth\n };\n var columnStyles = {\n height: menuHeight,\n width: menuWidth\n };\n var cascadeNodes = cascadeItems.map(function (children, layer) {\n var _classNames2;\n\n var uncheckableCount = 0;\n var onlyKey = layer + \"_\" + children.length;\n var menu = React.createElement(\"ul\", {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 201\n },\n __self: this\n }, children.map(function (item, index) {\n var uncheckable = uncheckableItemValues.some(function (uncheckableValue) {\n return (0, _shallowEqual.default)(uncheckableValue, item[valueKey]);\n });\n\n if (uncheckable) {\n uncheckableCount++;\n }\n\n return _this2.renderCascadeNode(item, index, layer, cascadePathItems[layer] && (0, _shallowEqual.default)(cascadePathItems[layer][valueKey], item[valueKey]), uncheckable);\n }));\n var parentNode = cascadePathItems[layer - 1];\n var columnClasses = (0, _classnames.default)(_this2.addPrefix('cascader-menu-column'), (_classNames2 = {}, _classNames2[_this2.addPrefix('cascader-menu-column-uncheckable')] = uncheckableCount === children.length, _classNames2));\n var node = React.createElement(\"div\", {\n key: onlyKey,\n className: columnClasses,\n ref: function ref(_ref) {\n return _this2.menus[layer] = _ref;\n },\n style: columnStyles,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 226\n },\n __self: this\n }, renderMenu ? renderMenu(children, menu, parentNode) : menu);\n return node;\n });\n return React.createElement(\"div\", {\n style: styles,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 237\n },\n __self: this\n }, cascadeNodes);\n };\n\n _proto.render = function render() {\n var _this$props5 = this.props,\n className = _this$props5.className,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props5, [\"className\"]);\n var classes = (0, _classnames.default)(this.addPrefix('cascader-menu-items'), className);\n var unhandled = (0, _utils.getUnhandledProps)(DropdownMenu, rest);\n return React.createElement(\"div\", (0, _extends2.default)({}, unhandled, {\n className: classes,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 246\n },\n __self: this\n }), this.renderCascade());\n };\n\n return DropdownMenu;\n}(React.Component);\n\nDropdownMenu.propTypes = dropdownMenuPropTypes;\nDropdownMenu.defaultProps = {\n data: [],\n disabledItemValues: [],\n uncheckableItemValues: [],\n cascadeItems: [],\n cascadePathItems: [],\n menuWidth: 156,\n menuHeight: 200,\n childrenKey: 'children',\n valueKey: 'value',\n labelKey: 'label'\n};\nvar _default = DropdownMenu;\nexports.default = _default;\n\n//# sourceURL=webpack://rsuite/./src/MultiCascader/DropdownMenu.tsx?");
|
|
9590
9007
|
|
|
9591
9008
|
/***/ }),
|
|
9592
9009
|
|
|
@@ -9598,7 +9015,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
|
|
|
9598
9015
|
/***/ (function(module, exports, __webpack_require__) {
|
|
9599
9016
|
|
|
9600
9017
|
"use strict";
|
|
9601
|
-
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 _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\n\nvar _extends3 = _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 _isNil2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _isFunction2 = _interopRequireDefault(__webpack_require__(/*! lodash/isFunction */ \"./node_modules/lodash/isFunction.js\"));\n\nvar _pick2 = _interopRequireDefault(__webpack_require__(/*! lodash/pick */ \"./node_modules/lodash/pick.js\"));\n\nvar _get2 = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\n\nvar _isUndefined2 = _interopRequireDefault(__webpack_require__(/*! lodash/isUndefined */ \"./node_modules/lodash/isUndefined.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 _shallowEqualArray = _interopRequireDefault(__webpack_require__(/*! ../utils/shallowEqualArray */ \"./src/utils/shallowEqualArray.ts\"));\n\nvar _reactLifecyclesCompat = __webpack_require__(/*! react-lifecycles-compat */ \"./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\n\nvar _DropdownMenu = _interopRequireWildcard(__webpack_require__(/*! ./DropdownMenu */ \"./src/MultiCascader/DropdownMenu.tsx\"));\n\nvar _Checkbox = _interopRequireDefault(__webpack_require__(/*! ../Checkbox */ \"./src/Checkbox/index.tsx\"));\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./src/MultiCascader/utils.ts\"));\n\nvar _treeUtils = __webpack_require__(/*! ../utils/treeUtils */ \"./src/utils/treeUtils.ts\");\n\nvar _utils2 = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _getSafeRegExpString = _interopRequireDefault(__webpack_require__(/*! ../utils/getSafeRegExpString */ \"./src/utils/getSafeRegExpString.ts\"));\n\nvar _Picker = __webpack_require__(/*! ../Picker */ \"./src/Picker/index.ts\");\n\nvar _propTypes2 = __webpack_require__(/*! ../Picker/propTypes */ \"./src/Picker/propTypes.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/MultiCascader/MultiCascader.tsx\";\n\nvar MultiCascader =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(MultiCascader, _React$Component);\n\n function MultiCascader(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.isControlled = null;\n _this.menuContainerRef = void 0;\n _this.positionRef = void 0;\n _this.triggerRef = void 0;\n\n _this.handleCheck = function (item, event, checked) {\n var _this$props = _this.props,\n valueKey = _this$props.valueKey,\n onChange = _this$props.onChange,\n cascade = _this$props.cascade,\n uncheckableItemValues = _this$props.uncheckableItemValues;\n var itemValue = item[valueKey];\n var value = [];\n\n if (cascade) {\n value = MultiCascader.utils.splitValue(item, checked, _this.getValue(), uncheckableItemValues).value;\n } else {\n value = _this.getValue();\n\n if (checked) {\n value.push(itemValue);\n } else {\n value = value.filter(function (n) {\n return n !== itemValue;\n });\n }\n }\n\n if (!_this.isControlled) {\n _this.setState({\n value: value\n });\n }\n\n onChange === null || onChange === void 0 ? void 0 : onChange(value, event);\n };\n\n _this.handleChangeForSearchItem = function (value, checked, event) {\n _this.handleCheck(value, event, checked);\n };\n\n _this.handleSelect = function (node, cascadeItems, activePaths, event) {\n var _this$props2 = _this.props,\n onSelect = _this$props2.onSelect,\n valueKey = _this$props2.valueKey,\n childrenKey = _this$props2.childrenKey;\n\n _this.setState({\n selectNode: node,\n items: cascadeItems,\n activePaths: activePaths\n }, function () {\n var _this$positionRef$cur, _this$positionRef$cur2;\n\n (_this$positionRef$cur = _this.positionRef.current) === null || _this$positionRef$cur === void 0 ? void 0 : (_this$positionRef$cur2 = _this$positionRef$cur.updatePosition) === null || _this$positionRef$cur2 === void 0 ? void 0 : _this$positionRef$cur2.call(_this$positionRef$cur);\n });\n\n onSelect === null || onSelect === void 0 ? void 0 : onSelect(node, activePaths, (0, _Picker.createConcatChildrenFunction)(node, node[valueKey], {\n valueKey: valueKey,\n childrenKey: childrenKey\n }), event);\n };\n\n _this.handleSearch = function (searchKeyword, event) {\n var _this$props$onSearch, _this$props3;\n\n _this.setState({\n searchKeyword: searchKeyword\n });\n\n (_this$props$onSearch = (_this$props3 = _this.props).onSearch) === null || _this$props$onSearch === void 0 ? void 0 : _this$props$onSearch.call(_this$props3, searchKeyword, event);\n };\n\n _this.handleCloseDropdown = function () {\n var _this$triggerRef$curr, _this$triggerRef$curr2;\n\n (_this$triggerRef$curr = _this.triggerRef.current) === null || _this$triggerRef$curr === void 0 ? void 0 : (_this$triggerRef$curr2 = _this$triggerRef$curr.hide) === null || _this$triggerRef$curr2 === void 0 ? void 0 : _this$triggerRef$curr2.call(_this$triggerRef$curr);\n };\n\n _this.handleOpenDropdown = function () {\n var _this$triggerRef$curr3, _this$triggerRef$curr4;\n\n (_this$triggerRef$curr3 = _this.triggerRef.current) === null || _this$triggerRef$curr3 === void 0 ? void 0 : (_this$triggerRef$curr4 = _this$triggerRef$curr3.show) === null || _this$triggerRef$curr4 === void 0 ? void 0 : _this$triggerRef$curr4.call(_this$triggerRef$curr3);\n };\n\n _this.open = function () {\n var _this$handleOpenDropd, _this2;\n\n (_this$handleOpenDropd = (_this2 = _this).handleOpenDropdown) === null || _this$handleOpenDropd === void 0 ? void 0 : _this$handleOpenDropd.call(_this2);\n };\n\n _this.close = function () {\n var _this$handleCloseDrop, _this3;\n\n (_this$handleCloseDrop = (_this3 = _this).handleCloseDropdown) === null || _this$handleCloseDrop === void 0 ? void 0 : _this$handleCloseDrop.call(_this3);\n };\n\n _this.handleClean = function (event) {\n var _this$props4 = _this.props,\n disabled = _this$props4.disabled,\n onChange = _this$props4.onChange,\n data = _this$props4.data;\n\n if (disabled) {\n return;\n }\n\n var nextState = {\n items: [data],\n selectNode: null,\n activePaths: []\n };\n\n if (!_this.isControlled) {\n nextState.value = [];\n }\n\n _this.setState(nextState);\n\n onChange === null || onChange === void 0 ? void 0 : onChange([], event);\n };\n\n _this.handleEntered = function () {\n var _this$props$onOpen, _this$props5;\n\n (_this$props$onOpen = (_this$props5 = _this.props).onOpen) === null || _this$props$onOpen === void 0 ? void 0 : _this$props$onOpen.call(_this$props5);\n\n _this.setState({\n active: true\n });\n };\n\n _this.handleExit = function () {\n var _this$props$onClose, _this$props6;\n\n (_this$props$onClose = (_this$props6 = _this.props).onClose) === null || _this$props$onClose === void 0 ? void 0 : _this$props$onClose.call(_this$props6);\n\n _this.setState({\n searchKeyword: '',\n active: false\n });\n };\n\n _this.addPrefix = function (name) {\n return (0, _utils2.prefix)(_this.props.classPrefix)(name);\n };\n\n _this.renderSearchRow = function (item, key) {\n var _extends2, _classNames;\n\n var _this$props7 = _this.props,\n labelKey = _this$props7.labelKey,\n valueKey = _this$props7.valueKey,\n cascade = _this$props7.cascade,\n _this$props7$disabled = _this$props7.disabledItemValues,\n disabledItemValues = _this$props7$disabled === void 0 ? [] : _this$props7$disabled;\n var searchKeyword = _this.state.searchKeyword;\n\n var values = _this.getValue();\n\n var nodes = (0, _treeUtils.getNodeParents)(item);\n var regx = new RegExp((0, _getSafeRegExpString.default)(searchKeyword), 'ig');\n var labelElements = [];\n var a = item[labelKey].split(regx);\n var b = item[labelKey].match(regx);\n\n for (var i = 0; i < a.length; i++) {\n labelElements.push(a[i]);\n\n if (b[i]) {\n labelElements.push(React.createElement(\"strong\", {\n key: i,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 337\n },\n __self: this\n }, b[i]));\n }\n }\n\n nodes.push((0, _extends3.default)({}, item, (_extends2 = {}, _extends2[labelKey] = labelElements, _extends2)));\n var active = values.some(function (value) {\n if (cascade) {\n return nodes.some(function (node) {\n return node[valueKey] === value;\n });\n }\n\n return item[valueKey] === value;\n });\n var disabled = disabledItemValues.some(function (value) {\n return nodes.some(function (node) {\n return node[valueKey] === value;\n });\n });\n var itemClasses = (0, _classnames.default)(_this.addPrefix('cascader-row'), (_classNames = {}, _classNames[_this.addPrefix('cascader-row-disabled')] = disabled, _classNames));\n return React.createElement(\"div\", {\n key: key,\n className: itemClasses,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 358\n },\n __self: this\n }, React.createElement(_Checkbox.default, {\n disabled: disabled,\n checked: active,\n value: item,\n indeterminate: cascade && !active && MultiCascader.utils.isSomeChildChecked(item, values),\n onChange: _this.handleChangeForSearchItem,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 359\n },\n __self: this\n }, React.createElement(\"span\", {\n className: _this.addPrefix('cascader-cols'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 366\n },\n __self: this\n }, nodes.map(function (node, index) {\n return React.createElement(\"span\", {\n key: \"col-\" + index,\n className: _this.addPrefix('cascader-col'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 368\n },\n __self: this\n }, node[labelKey]);\n }))));\n };\n\n var _data = props.data,\n _value = props.value,\n defaultValue = props.defaultValue;\n var initState = {\n data: _data,\n searchKeyword: '',\n prevValue: _value,\n value: defaultValue || [],\n selectNode: null,\n\n /**\n * 选中值的路径\n */\n activePaths: []\n };\n MultiCascader.utils = (0, _utils.default)(props);\n var flattenData = (0, _treeUtils.flattenTree)(_data, props.childrenKey);\n _this.isControlled = !(0, _isUndefined2.default)(_value);\n _this.state = (0, _extends3.default)({}, initState, {\n flattenData: flattenData,\n\n /**\n * 用于展示面板的数据列表,是一个二维的数组\n * 是通过 data 树结构转换成的二维的数组,其中只包含页面上展示的数据\n */\n items: [flattenData.filter(function (item) {\n return !item.parent;\n })]\n }, MultiCascader.getCascadeState(props, flattenData)); // for test\n\n _this.menuContainerRef = React.createRef();\n _this.positionRef = React.createRef();\n _this.triggerRef = React.createRef();\n return _this;\n }\n\n MultiCascader.getCascadeState = function getCascadeState(nextProps, flattenData, nextValue) {\n var data = nextProps.data,\n cascade = nextProps.cascade,\n value = nextProps.value,\n defaultValue = nextProps.defaultValue,\n uncheckableItemValues = nextProps.uncheckableItemValues;\n var cascadeValue = nextValue || value || defaultValue || [];\n\n if (cascade && data) {\n cascadeValue = MultiCascader.utils.transformValue(cascadeValue, flattenData, uncheckableItemValues);\n }\n\n return {\n value: cascadeValue\n };\n };\n\n MultiCascader.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var data = nextProps.data,\n valueKey = nextProps.valueKey,\n childrenKey = nextProps.childrenKey;\n var value = nextProps.value || prevState.value || [];\n var prevValue = prevState.prevValue,\n _prevState$selectNode = prevState.selectNode,\n selectNode = _prevState$selectNode === void 0 ? {} : _prevState$selectNode,\n items = prevState.items;\n var flattenData = prevState.flattenData;\n var isChangedData = data !== prevState.data;\n var isChangedValue = !(0, _shallowEqualArray.default)(prevValue, nextProps.value);\n\n if (isChangedData || isChangedValue) {\n if (isChangedData) {\n flattenData = (0, _treeUtils.flattenTree)(data, nextProps.childrenKey);\n }\n /**\n * 如果更新了 data,\n * 首先获取到被点击节点的值 `selectNode`, 然后再拿到新增后的 `newChildren`,\n */\n\n\n var nextSelectNode = flattenData.find(function (n) {\n return selectNode && n[valueKey] === selectNode[valueKey];\n });\n var newChildren = ((0, _get2.default)(nextSelectNode, childrenKey) || []).map(function (item) {\n item.parent = nextSelectNode;\n return item;\n });\n\n if (newChildren.length && items) {\n items[items.length - 1] = newChildren;\n }\n\n var nextState = (0, _extends3.default)({\n selectNode: nextSelectNode,\n flattenData: flattenData,\n data: data,\n items: MultiCascader.utils.getItems(nextSelectNode, flattenData)\n }, MultiCascader.getCascadeState(nextProps, flattenData, value));\n\n if (isChangedValue) {\n nextState.prevValue = nextProps.value;\n }\n\n return nextState;\n }\n\n return null;\n };\n\n var _proto = MultiCascader.prototype;\n\n _proto.getValue = function getValue() {\n return this.state.value || [];\n };\n\n _proto.getSearchResult = function getSearchResult() {\n var _this$props8 = this.props,\n labelKey = _this$props8.labelKey,\n valueKey = _this$props8.valueKey,\n _this$props8$unchecka = _this$props8.uncheckableItemValues,\n uncheckableItemValues = _this$props8$unchecka === void 0 ? [] : _this$props8$unchecka;\n var _this$state = this.state,\n searchKeyword = _this$state.searchKeyword,\n flattenData = _this$state.flattenData;\n var items = [];\n var result = flattenData.filter(function (item) {\n if (uncheckableItemValues.some(function (value) {\n return item[valueKey] === value;\n })) {\n return false;\n }\n\n if (item[labelKey].match(new RegExp((0, _getSafeRegExpString.default)(searchKeyword), 'i'))) {\n return true;\n }\n\n return false;\n });\n\n for (var i = 0; i < result.length; i++) {\n items.push(result[i]);\n\n if (i === 99) {\n return items;\n }\n }\n\n return items;\n };\n\n _proto.renderSearchResultPanel = function renderSearchResultPanel() {\n var locale = this.props.locale;\n var searchKeyword = this.state.searchKeyword;\n\n if (searchKeyword === '') {\n return null;\n }\n\n var items = this.getSearchResult();\n return React.createElement(\"div\", {\n className: this.addPrefix('cascader-search-panel'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 388\n },\n __self: this\n }, items.length ? items.map(this.renderSearchRow) : React.createElement(\"div\", {\n className: this.addPrefix('none'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 392\n },\n __self: this\n }, locale.noResultsText));\n };\n\n _proto.renderDropdownMenu = function renderDropdownMenu() {\n var _classNames2;\n\n var _this$state2 = this.state,\n items = _this$state2.items,\n activePaths = _this$state2.activePaths,\n searchKeyword = _this$state2.searchKeyword;\n var _this$props9 = this.props,\n renderMenu = _this$props9.renderMenu,\n renderExtraFooter = _this$props9.renderExtraFooter,\n menuClassName = _this$props9.menuClassName,\n menuStyle = _this$props9.menuStyle,\n classPrefix = _this$props9.classPrefix,\n searchable = _this$props9.searchable,\n locale = _this$props9.locale,\n inline = _this$props9.inline;\n var classes = (0, _classnames.default)(this.addPrefix('cascader-menu'), this.addPrefix('multi-cascader-menu'), menuClassName, (_classNames2 = {}, _classNames2[this.addPrefix('inline')] = inline, _classNames2));\n var menuProps = (0, _pick2.default)(this.props, Object.keys(_DropdownMenu.dropdownMenuPropTypes));\n return React.createElement(_Picker.MenuWrapper, {\n className: classes,\n style: menuStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 423\n },\n __self: this\n }, searchable && React.createElement(_Picker.SearchBar, {\n placeholder: locale.searchPlaceholder,\n onChange: this.handleSearch,\n value: searchKeyword,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 425\n },\n __self: this\n }), this.renderSearchResultPanel(), searchKeyword === '' && React.createElement(_DropdownMenu.default, (0, _extends3.default)({}, menuProps, {\n classPrefix: classPrefix,\n ref: this.menuContainerRef,\n cascadeItems: items,\n cascadePathItems: activePaths,\n value: this.getValue(),\n onSelect: this.handleSelect,\n onCheck: this.handleCheck,\n renderMenu: renderMenu,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 435\n },\n __self: this\n })), renderExtraFooter === null || renderExtraFooter === void 0 ? void 0 : renderExtraFooter());\n };\n\n _proto.render = function render() {\n var _this$props$value;\n\n var _this$props10 = this.props,\n valueKey = _this$props10.valueKey,\n labelKey = _this$props10.labelKey,\n childrenKey = _this$props10.childrenKey,\n placeholder = _this$props10.placeholder,\n renderValue = _this$props10.renderValue,\n disabled = _this$props10.disabled,\n cleanable = _this$props10.cleanable,\n locale = _this$props10.locale,\n toggleComponentClass = _this$props10.toggleComponentClass,\n style = _this$props10.style,\n onEnter = _this$props10.onEnter,\n onExited = _this$props10.onExited,\n onClean = _this$props10.onClean,\n countable = _this$props10.countable,\n cascade = _this$props10.cascade,\n inline = _this$props10.inline,\n positionRef = _this$props10.positionRef,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props10, [\"valueKey\", \"labelKey\", \"childrenKey\", \"placeholder\", \"renderValue\", \"disabled\", \"cleanable\", \"locale\", \"toggleComponentClass\", \"style\", \"onEnter\", \"onExited\", \"onClean\", \"countable\", \"cascade\", \"inline\", \"positionRef\"]);\n\n if (inline) {\n return this.renderDropdownMenu();\n }\n\n var flattenData = this.state.flattenData;\n var unhandled = (0, _utils2.getUnhandledProps)(MultiCascader, rest);\n var value = this.getValue();\n var selectedItems = flattenData.filter(function (item) {\n return value.some(function (v) {\n return v === item[valueKey];\n });\n }) || [];\n /**\n * 1.Have a value and the value is valid.\n * 2.Regardless of whether the value is valid, as long as renderValue is set, it is judged to have a value.\n */\n\n var hasValue = selectedItems.length > 0 || ((_this$props$value = this.props.value) === null || _this$props$value === void 0 ? void 0 : _this$props$value.length) > 0 && (0, _isFunction2.default)(renderValue);\n var selectedElement = placeholder;\n\n if (selectedItems.length > 0) {\n selectedElement = React.createElement(_Picker.SelectedElement, {\n selectedItems: selectedItems,\n countable: countable,\n valueKey: valueKey,\n labelKey: labelKey,\n childrenKey: childrenKey,\n prefix: this.addPrefix,\n cascade: cascade,\n locale: locale,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 496\n },\n __self: this\n });\n }\n\n if (hasValue && (0, _isFunction2.default)(renderValue)) {\n selectedElement = renderValue((value === null || value === void 0 ? void 0 : value.length) > 0 ? value : this.props.value, selectedItems, selectedElement);\n\n if ((0, _isNil2.default)(selectedElement)) {\n hasValue = false;\n }\n }\n\n var classes = (0, _Picker.getToggleWrapperClassName)('cascader', this.addPrefix, this.props, hasValue);\n return React.createElement(\"div\", {\n className: classes,\n style: style,\n tabIndex: -1,\n role: \"menu\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 523\n },\n __self: this\n }, React.createElement(_Picker.PickerToggleTrigger, {\n pickerProps: this.props,\n ref: this.triggerRef,\n positionRef: (0, _utils2.mergeRefs)(this.positionRef, positionRef),\n onEnter: (0, _utils2.createChainedFunction)(this.handleEntered, onEnter),\n onExited: (0, _utils2.createChainedFunction)(this.handleExit, onExited),\n speaker: this.renderDropdownMenu(),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 524\n },\n __self: this\n }, React.createElement(_Picker.PickerToggle, (0, _extends3.default)({}, unhandled, {\n componentClass: toggleComponentClass,\n onClean: (0, _utils2.createChainedFunction)(this.handleClean, onClean),\n cleanable: cleanable && !disabled,\n hasValue: hasValue,\n active: this.state.active,\n \"aria-disabled\": disabled,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 532\n },\n __self: this\n }), selectedElement || locale.placeholder)));\n };\n\n return MultiCascader;\n}(React.Component);\n\nMultiCascader.propTypes = (0, _extends3.default)({}, _propTypes2.listPickerPropTypes, {\n cascade: _propTypes.default.bool,\n inline: _propTypes.default.bool,\n countable: _propTypes.default.bool,\n menuWidth: _propTypes.default.number,\n menuHeight: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n uncheckableItemValues: _propTypes.default.array,\n searchable: _propTypes.default.bool,\n renderMenuItem: _propTypes.default.func,\n renderMenu: _propTypes.default.func,\n onSearch: _propTypes.default.func,\n onSelect: _propTypes.default.func\n});\nMultiCascader.defaultProps = (0, _extends3.default)({}, _propTypes2.listPickerDefaultProps, {\n searchable: true,\n countable: true,\n cascade: true,\n uncheckableItemValues: [],\n locale: {\n placeholder: 'Select',\n checkAll: 'All',\n searchPlaceholder: 'Search',\n noResultsText: 'No results found'\n }\n});\nMultiCascader.utils = {};\n(0, _reactLifecyclesCompat.polyfill)(MultiCascader);\n\nvar _default = (0, _utils2.defaultProps)({\n classPrefix: 'picker'\n})(MultiCascader);\n\nexports.default = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./src/MultiCascader/MultiCascader.tsx?");
|
|
9018
|
+
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 _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\n\nvar _extends3 = _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 _isNil2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _isFunction2 = _interopRequireDefault(__webpack_require__(/*! lodash/isFunction */ \"./node_modules/lodash/isFunction.js\"));\n\nvar _pick2 = _interopRequireDefault(__webpack_require__(/*! lodash/pick */ \"./node_modules/lodash/pick.js\"));\n\nvar _get2 = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\n\nvar _isUndefined2 = _interopRequireDefault(__webpack_require__(/*! lodash/isUndefined */ \"./node_modules/lodash/isUndefined.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 _shallowEqualArray = _interopRequireDefault(__webpack_require__(/*! ../utils/shallowEqualArray */ \"./src/utils/shallowEqualArray.ts\"));\n\nvar _reactLifecyclesCompat = __webpack_require__(/*! react-lifecycles-compat */ \"./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js\");\n\nvar _DropdownMenu = _interopRequireWildcard(__webpack_require__(/*! ./DropdownMenu */ \"./src/MultiCascader/DropdownMenu.tsx\"));\n\nvar _Checkbox = _interopRequireDefault(__webpack_require__(/*! ../Checkbox */ \"./src/Checkbox/index.tsx\"));\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./src/MultiCascader/utils.ts\"));\n\nvar _treeUtils = __webpack_require__(/*! ../utils/treeUtils */ \"./src/utils/treeUtils.ts\");\n\nvar _utils2 = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _getSafeRegExpString = _interopRequireDefault(__webpack_require__(/*! ../utils/getSafeRegExpString */ \"./src/utils/getSafeRegExpString.ts\"));\n\nvar _Picker = __webpack_require__(/*! ../Picker */ \"./src/Picker/index.ts\");\n\nvar _propTypes2 = __webpack_require__(/*! ../Picker/propTypes */ \"./src/Picker/propTypes.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/MultiCascader/MultiCascader.tsx\";\n\nvar MultiCascader =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(MultiCascader, _React$Component);\n\n function MultiCascader(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.isControlled = null;\n _this.menuContainerRef = void 0;\n _this.positionRef = void 0;\n _this.triggerRef = void 0;\n\n _this.handleCheck = function (item, event, checked) {\n var _this$props = _this.props,\n valueKey = _this$props.valueKey,\n cascade = _this$props.cascade,\n uncheckableItemValues = _this$props.uncheckableItemValues,\n onChange = _this$props.onChange,\n onCheck = _this$props.onCheck;\n var itemValue = item[valueKey];\n var value = [];\n\n if (cascade) {\n value = MultiCascader.utils.splitValue(item, checked, _this.getValue(), uncheckableItemValues).value;\n } else {\n value = _this.getValue();\n\n if (checked) {\n value.push(itemValue);\n } else {\n value = value.filter(function (n) {\n return n !== itemValue;\n });\n }\n }\n\n if (!_this.isControlled) {\n _this.setState({\n value: value\n });\n }\n\n onChange === null || onChange === void 0 ? void 0 : onChange(value, event);\n onCheck === null || onCheck === void 0 ? void 0 : onCheck(value, item, checked, event);\n };\n\n _this.handleChangeForSearchItem = function (value, checked, event) {\n _this.handleCheck(value, event, checked);\n };\n\n _this.handleSelect = function (node, cascadeItems, activePaths, event) {\n var _this$props2 = _this.props,\n onSelect = _this$props2.onSelect,\n valueKey = _this$props2.valueKey,\n childrenKey = _this$props2.childrenKey;\n\n _this.setState({\n selectNode: node,\n items: cascadeItems,\n activePaths: activePaths\n }, function () {\n var _this$positionRef$cur, _this$positionRef$cur2;\n\n (_this$positionRef$cur = _this.positionRef.current) === null || _this$positionRef$cur === void 0 ? void 0 : (_this$positionRef$cur2 = _this$positionRef$cur.updatePosition) === null || _this$positionRef$cur2 === void 0 ? void 0 : _this$positionRef$cur2.call(_this$positionRef$cur);\n });\n\n onSelect === null || onSelect === void 0 ? void 0 : onSelect(node, activePaths, (0, _Picker.createConcatChildrenFunction)(node, node[valueKey], {\n valueKey: valueKey,\n childrenKey: childrenKey\n }), event);\n };\n\n _this.handleSearch = function (searchKeyword, event) {\n var _this$props$onSearch, _this$props3;\n\n _this.setState({\n searchKeyword: searchKeyword\n });\n\n (_this$props$onSearch = (_this$props3 = _this.props).onSearch) === null || _this$props$onSearch === void 0 ? void 0 : _this$props$onSearch.call(_this$props3, searchKeyword, event);\n };\n\n _this.handleCloseDropdown = function () {\n var _this$triggerRef$curr, _this$triggerRef$curr2;\n\n (_this$triggerRef$curr = _this.triggerRef.current) === null || _this$triggerRef$curr === void 0 ? void 0 : (_this$triggerRef$curr2 = _this$triggerRef$curr.hide) === null || _this$triggerRef$curr2 === void 0 ? void 0 : _this$triggerRef$curr2.call(_this$triggerRef$curr);\n };\n\n _this.handleOpenDropdown = function () {\n var _this$triggerRef$curr3, _this$triggerRef$curr4;\n\n (_this$triggerRef$curr3 = _this.triggerRef.current) === null || _this$triggerRef$curr3 === void 0 ? void 0 : (_this$triggerRef$curr4 = _this$triggerRef$curr3.show) === null || _this$triggerRef$curr4 === void 0 ? void 0 : _this$triggerRef$curr4.call(_this$triggerRef$curr3);\n };\n\n _this.open = function () {\n var _this$handleOpenDropd, _this2;\n\n (_this$handleOpenDropd = (_this2 = _this).handleOpenDropdown) === null || _this$handleOpenDropd === void 0 ? void 0 : _this$handleOpenDropd.call(_this2);\n };\n\n _this.close = function () {\n var _this$handleCloseDrop, _this3;\n\n (_this$handleCloseDrop = (_this3 = _this).handleCloseDropdown) === null || _this$handleCloseDrop === void 0 ? void 0 : _this$handleCloseDrop.call(_this3);\n };\n\n _this.handleClean = function (event) {\n var _this$props4 = _this.props,\n disabled = _this$props4.disabled,\n onChange = _this$props4.onChange,\n data = _this$props4.data;\n\n if (disabled) {\n return;\n }\n\n var nextState = {\n items: [data],\n selectNode: null,\n activePaths: []\n };\n\n if (!_this.isControlled) {\n nextState.value = [];\n }\n\n _this.setState(nextState);\n\n onChange === null || onChange === void 0 ? void 0 : onChange([], event);\n };\n\n _this.handleEntered = function () {\n var _this$props$onOpen, _this$props5;\n\n (_this$props$onOpen = (_this$props5 = _this.props).onOpen) === null || _this$props$onOpen === void 0 ? void 0 : _this$props$onOpen.call(_this$props5);\n\n _this.setState({\n active: true\n });\n };\n\n _this.handleExit = function () {\n var _this$props$onClose, _this$props6;\n\n (_this$props$onClose = (_this$props6 = _this.props).onClose) === null || _this$props$onClose === void 0 ? void 0 : _this$props$onClose.call(_this$props6);\n\n _this.setState({\n searchKeyword: '',\n active: false\n });\n };\n\n _this.addPrefix = function (name) {\n return (0, _utils2.prefix)(_this.props.classPrefix)(name);\n };\n\n _this.renderSearchRow = function (item, key) {\n var _extends2, _classNames;\n\n var _this$props7 = _this.props,\n labelKey = _this$props7.labelKey,\n valueKey = _this$props7.valueKey,\n cascade = _this$props7.cascade,\n _this$props7$disabled = _this$props7.disabledItemValues,\n disabledItemValues = _this$props7$disabled === void 0 ? [] : _this$props7$disabled;\n var searchKeyword = _this.state.searchKeyword;\n\n var values = _this.getValue();\n\n var nodes = (0, _treeUtils.getNodeParents)(item);\n var regx = new RegExp((0, _getSafeRegExpString.default)(searchKeyword), 'ig');\n var labelElements = [];\n var a = item[labelKey].split(regx);\n var b = item[labelKey].match(regx);\n\n for (var i = 0; i < a.length; i++) {\n labelElements.push(a[i]);\n\n if (b[i]) {\n labelElements.push(React.createElement(\"strong\", {\n key: i,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 339\n },\n __self: this\n }, b[i]));\n }\n }\n\n nodes.push((0, _extends3.default)({}, item, (_extends2 = {}, _extends2[labelKey] = labelElements, _extends2)));\n var active = values.some(function (value) {\n if (cascade) {\n return nodes.some(function (node) {\n return node[valueKey] === value;\n });\n }\n\n return item[valueKey] === value;\n });\n var disabled = disabledItemValues.some(function (value) {\n return nodes.some(function (node) {\n return node[valueKey] === value;\n });\n });\n var itemClasses = (0, _classnames.default)(_this.addPrefix('cascader-row'), (_classNames = {}, _classNames[_this.addPrefix('cascader-row-disabled')] = disabled, _classNames));\n return React.createElement(\"div\", {\n key: key,\n className: itemClasses,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 360\n },\n __self: this\n }, React.createElement(_Checkbox.default, {\n disabled: disabled,\n checked: active,\n value: item,\n indeterminate: cascade && !active && MultiCascader.utils.isSomeChildChecked(item, values),\n onChange: _this.handleChangeForSearchItem,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 361\n },\n __self: this\n }, React.createElement(\"span\", {\n className: _this.addPrefix('cascader-cols'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 368\n },\n __self: this\n }, nodes.map(function (node, index) {\n return React.createElement(\"span\", {\n key: \"col-\" + index,\n className: _this.addPrefix('cascader-col'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 370\n },\n __self: this\n }, node[labelKey]);\n }))));\n };\n\n var _data = props.data,\n _value = props.value,\n defaultValue = props.defaultValue;\n var initState = {\n data: _data,\n searchKeyword: '',\n prevValue: _value,\n value: defaultValue || [],\n selectNode: null,\n\n /**\n * 选中值的路径\n */\n activePaths: []\n };\n MultiCascader.utils = (0, _utils.default)(props);\n var flattenData = (0, _treeUtils.flattenTree)(_data, props.childrenKey);\n _this.isControlled = !(0, _isUndefined2.default)(_value);\n _this.state = (0, _extends3.default)({}, initState, {\n flattenData: flattenData,\n\n /**\n * 用于展示面板的数据列表,是一个二维的数组\n * 是通过 data 树结构转换成的二维的数组,其中只包含页面上展示的数据\n */\n items: [flattenData.filter(function (item) {\n return !item.parent;\n })]\n }, MultiCascader.getCascadeState(props, flattenData)); // for test\n\n _this.menuContainerRef = React.createRef();\n _this.positionRef = React.createRef();\n _this.triggerRef = React.createRef();\n return _this;\n }\n\n MultiCascader.getCascadeState = function getCascadeState(nextProps, flattenData, nextValue) {\n var data = nextProps.data,\n cascade = nextProps.cascade,\n value = nextProps.value,\n defaultValue = nextProps.defaultValue,\n uncheckableItemValues = nextProps.uncheckableItemValues;\n var cascadeValue = nextValue || value || defaultValue || [];\n\n if (cascade && data) {\n cascadeValue = MultiCascader.utils.transformValue(cascadeValue, flattenData, uncheckableItemValues);\n }\n\n return {\n value: cascadeValue\n };\n };\n\n MultiCascader.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var data = nextProps.data,\n valueKey = nextProps.valueKey,\n childrenKey = nextProps.childrenKey;\n var value = nextProps.value || prevState.value || [];\n var prevValue = prevState.prevValue,\n _prevState$selectNode = prevState.selectNode,\n selectNode = _prevState$selectNode === void 0 ? {} : _prevState$selectNode,\n items = prevState.items;\n var flattenData = prevState.flattenData;\n var isChangedData = data !== prevState.data;\n var isChangedValue = !(0, _shallowEqualArray.default)(prevValue, nextProps.value);\n\n if (isChangedData || isChangedValue) {\n if (isChangedData) {\n flattenData = (0, _treeUtils.flattenTree)(data, nextProps.childrenKey);\n }\n /**\n * 如果更新了 data,\n * 首先获取到被点击节点的值 `selectNode`, 然后再拿到新增后的 `newChildren`,\n */\n\n\n var nextSelectNode = flattenData.find(function (n) {\n return selectNode && n[valueKey] === selectNode[valueKey];\n });\n var newChildren = ((0, _get2.default)(nextSelectNode, childrenKey) || []).map(function (item) {\n item.parent = nextSelectNode;\n return item;\n });\n\n if (newChildren.length && items) {\n items[items.length - 1] = newChildren;\n }\n\n var nextState = (0, _extends3.default)({\n selectNode: nextSelectNode,\n flattenData: flattenData,\n data: data,\n items: MultiCascader.utils.getItems(nextSelectNode, flattenData)\n }, MultiCascader.getCascadeState(nextProps, flattenData, value));\n\n if (isChangedValue) {\n nextState.prevValue = nextProps.value;\n }\n\n return nextState;\n }\n\n return null;\n };\n\n var _proto = MultiCascader.prototype;\n\n _proto.getValue = function getValue() {\n return this.state.value || [];\n };\n\n _proto.getSearchResult = function getSearchResult() {\n var _this$props8 = this.props,\n labelKey = _this$props8.labelKey,\n valueKey = _this$props8.valueKey,\n _this$props8$unchecka = _this$props8.uncheckableItemValues,\n uncheckableItemValues = _this$props8$unchecka === void 0 ? [] : _this$props8$unchecka;\n var _this$state = this.state,\n searchKeyword = _this$state.searchKeyword,\n flattenData = _this$state.flattenData;\n var items = [];\n var result = flattenData.filter(function (item) {\n if (uncheckableItemValues.some(function (value) {\n return item[valueKey] === value;\n })) {\n return false;\n }\n\n if (item[labelKey].match(new RegExp((0, _getSafeRegExpString.default)(searchKeyword), 'i'))) {\n return true;\n }\n\n return false;\n });\n\n for (var i = 0; i < result.length; i++) {\n items.push(result[i]);\n\n if (i === 99) {\n return items;\n }\n }\n\n return items;\n };\n\n _proto.renderSearchResultPanel = function renderSearchResultPanel() {\n var locale = this.props.locale;\n var searchKeyword = this.state.searchKeyword;\n\n if (searchKeyword === '') {\n return null;\n }\n\n var items = this.getSearchResult();\n return React.createElement(\"div\", {\n className: this.addPrefix('cascader-search-panel'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 390\n },\n __self: this\n }, items.length ? items.map(this.renderSearchRow) : React.createElement(\"div\", {\n className: this.addPrefix('none'),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 394\n },\n __self: this\n }, locale.noResultsText));\n };\n\n _proto.renderDropdownMenu = function renderDropdownMenu() {\n var _classNames2;\n\n var _this$state2 = this.state,\n items = _this$state2.items,\n activePaths = _this$state2.activePaths,\n searchKeyword = _this$state2.searchKeyword;\n var _this$props9 = this.props,\n renderMenu = _this$props9.renderMenu,\n renderExtraFooter = _this$props9.renderExtraFooter,\n menuClassName = _this$props9.menuClassName,\n menuStyle = _this$props9.menuStyle,\n classPrefix = _this$props9.classPrefix,\n searchable = _this$props9.searchable,\n locale = _this$props9.locale,\n inline = _this$props9.inline;\n var classes = (0, _classnames.default)(this.addPrefix('cascader-menu'), this.addPrefix('multi-cascader-menu'), menuClassName, (_classNames2 = {}, _classNames2[this.addPrefix('inline')] = inline, _classNames2));\n var menuProps = (0, _pick2.default)(this.props, Object.keys(_DropdownMenu.dropdownMenuPropTypes));\n return React.createElement(_Picker.MenuWrapper, {\n className: classes,\n style: menuStyle,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 425\n },\n __self: this\n }, searchable && React.createElement(_Picker.SearchBar, {\n placeholder: locale.searchPlaceholder,\n onChange: this.handleSearch,\n value: searchKeyword,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 427\n },\n __self: this\n }), this.renderSearchResultPanel(), searchKeyword === '' && React.createElement(_DropdownMenu.default, (0, _extends3.default)({}, menuProps, {\n classPrefix: classPrefix,\n ref: this.menuContainerRef,\n cascadeItems: items,\n cascadePathItems: activePaths,\n value: this.getValue(),\n onSelect: this.handleSelect,\n onCheck: this.handleCheck,\n renderMenu: renderMenu,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 437\n },\n __self: this\n })), renderExtraFooter === null || renderExtraFooter === void 0 ? void 0 : renderExtraFooter());\n };\n\n _proto.render = function render() {\n var _this$props$value;\n\n var _this$props10 = this.props,\n valueKey = _this$props10.valueKey,\n labelKey = _this$props10.labelKey,\n childrenKey = _this$props10.childrenKey,\n placeholder = _this$props10.placeholder,\n renderValue = _this$props10.renderValue,\n disabled = _this$props10.disabled,\n cleanable = _this$props10.cleanable,\n locale = _this$props10.locale,\n toggleComponentClass = _this$props10.toggleComponentClass,\n style = _this$props10.style,\n onEnter = _this$props10.onEnter,\n onExited = _this$props10.onExited,\n onClean = _this$props10.onClean,\n countable = _this$props10.countable,\n cascade = _this$props10.cascade,\n inline = _this$props10.inline,\n positionRef = _this$props10.positionRef,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props10, [\"valueKey\", \"labelKey\", \"childrenKey\", \"placeholder\", \"renderValue\", \"disabled\", \"cleanable\", \"locale\", \"toggleComponentClass\", \"style\", \"onEnter\", \"onExited\", \"onClean\", \"countable\", \"cascade\", \"inline\", \"positionRef\"]);\n\n if (inline) {\n return this.renderDropdownMenu();\n }\n\n var flattenData = this.state.flattenData;\n var unhandled = (0, _utils2.getUnhandledProps)(MultiCascader, rest);\n var value = this.getValue();\n var selectedItems = flattenData.filter(function (item) {\n return value.some(function (v) {\n return v === item[valueKey];\n });\n }) || [];\n /**\n * 1.Have a value and the value is valid.\n * 2.Regardless of whether the value is valid, as long as renderValue is set, it is judged to have a value.\n */\n\n var hasValue = selectedItems.length > 0 || ((_this$props$value = this.props.value) === null || _this$props$value === void 0 ? void 0 : _this$props$value.length) > 0 && (0, _isFunction2.default)(renderValue);\n var selectedElement = placeholder;\n\n if (selectedItems.length > 0) {\n selectedElement = React.createElement(_Picker.SelectedElement, {\n selectedItems: selectedItems,\n countable: countable,\n valueKey: valueKey,\n labelKey: labelKey,\n childrenKey: childrenKey,\n prefix: this.addPrefix,\n cascade: cascade,\n locale: locale,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 498\n },\n __self: this\n });\n }\n\n if (hasValue && (0, _isFunction2.default)(renderValue)) {\n selectedElement = renderValue((value === null || value === void 0 ? void 0 : value.length) > 0 ? value : this.props.value, selectedItems, selectedElement);\n\n if ((0, _isNil2.default)(selectedElement)) {\n hasValue = false;\n }\n }\n\n var classes = (0, _Picker.getToggleWrapperClassName)('cascader', this.addPrefix, this.props, hasValue);\n return React.createElement(\"div\", {\n className: classes,\n style: style,\n tabIndex: -1,\n role: \"menu\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 525\n },\n __self: this\n }, React.createElement(_Picker.PickerToggleTrigger, {\n pickerProps: this.props,\n ref: this.triggerRef,\n positionRef: (0, _utils2.mergeRefs)(this.positionRef, positionRef),\n onEnter: (0, _utils2.createChainedFunction)(this.handleEntered, onEnter),\n onExited: (0, _utils2.createChainedFunction)(this.handleExit, onExited),\n speaker: this.renderDropdownMenu(),\n __source: {\n fileName: _jsxFileName,\n lineNumber: 526\n },\n __self: this\n }, React.createElement(_Picker.PickerToggle, (0, _extends3.default)({}, unhandled, {\n componentClass: toggleComponentClass,\n onClean: (0, _utils2.createChainedFunction)(this.handleClean, onClean),\n cleanable: cleanable && !disabled,\n hasValue: hasValue,\n active: this.state.active,\n \"aria-disabled\": disabled,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 534\n },\n __self: this\n }), selectedElement || locale.placeholder)));\n };\n\n return MultiCascader;\n}(React.Component);\n\nMultiCascader.propTypes = (0, _extends3.default)({}, _propTypes2.listPickerPropTypes, {\n cascade: _propTypes.default.bool,\n inline: _propTypes.default.bool,\n countable: _propTypes.default.bool,\n menuWidth: _propTypes.default.number,\n menuHeight: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n uncheckableItemValues: _propTypes.default.array,\n searchable: _propTypes.default.bool,\n renderMenuItem: _propTypes.default.func,\n renderMenu: _propTypes.default.func,\n onSearch: _propTypes.default.func,\n onSelect: _propTypes.default.func,\n onCheck: _propTypes.default.func\n});\nMultiCascader.defaultProps = (0, _extends3.default)({}, _propTypes2.listPickerDefaultProps, {\n searchable: true,\n countable: true,\n cascade: true,\n uncheckableItemValues: [],\n locale: {\n placeholder: 'Select',\n checkAll: 'All',\n searchPlaceholder: 'Search',\n noResultsText: 'No results found'\n }\n});\nMultiCascader.utils = {};\n(0, _reactLifecyclesCompat.polyfill)(MultiCascader);\n\nvar _default = (0, _utils2.defaultProps)({\n classPrefix: 'picker'\n})(MultiCascader);\n\nexports.default = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./src/MultiCascader/MultiCascader.tsx?");
|
|
9602
9019
|
|
|
9603
9020
|
/***/ }),
|
|
9604
9021
|
|
|
@@ -9790,7 +9207,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
|
|
|
9790
9207
|
/***/ (function(module, exports, __webpack_require__) {
|
|
9791
9208
|
|
|
9792
9209
|
"use strict";
|
|
9793
|
-
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 _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 _get = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\n\nvar _pick = _interopRequireDefault(__webpack_require__(/*! lodash/pick */ \"./node_modules/lodash/pick.js\"));\n\nvar _isNil = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _domLib = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n\nvar _Overlay = _interopRequireDefault(__webpack_require__(/*! ./Overlay */ \"./src/Overlay/Overlay.tsx\"));\n\nvar _createChainedFunction = _interopRequireDefault(__webpack_require__(/*! ../utils/createChainedFunction */ \"./src/utils/createChainedFunction.ts\"));\n\nvar _isOneOf = _interopRequireDefault(__webpack_require__(/*! ../utils/isOneOf */ \"./src/utils/isOneOf.ts\"));\n\nvar _getDOMNode = _interopRequireDefault(__webpack_require__(/*! ../utils/getDOMNode */ \"./src/utils/getDOMNode.ts\"));\n\nvar _Portal = _interopRequireDefault(__webpack_require__(/*! ../Portal */ \"./src/Portal/index.tsx\"));\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/Overlay/OverlayTrigger.tsx\";\n\nfunction onMouseEventHandler(handler, event) {\n var target = event.currentTarget;\n var related = event.relatedTarget || (0, _get.default)(event, ['nativeEvent', 'toElement']);\n\n if ((!related || related !== target) && !(0, _domLib.contains)(target, related)) {\n handler(event);\n }\n}\n\nvar OverlayTrigger =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(OverlayTrigger, _React$Component);\n\n function OverlayTrigger(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.onMouseOverListener = void 0;\n _this.onMouseOutListener = void 0;\n _this.delayShowTimer = void 0;\n _this.delayHideTimer = void 0;\n _this.mouseEnteredToSpeaker = false;\n _this.mouseEnteredToTrigger = false;\n\n _this.getOverlayTarget = function () {\n return (0, _getDOMNode.default)((0, _assertThisInitialized2.default)(_this));\n };\n\n _this.handleSpeakerMouseEnter = function () {\n _this.mouseEnteredToSpeaker = true;\n };\n\n _this.handleSpeakerMouseLeave = function () {\n var trigger = _this.props.trigger;\n _this.mouseEnteredToSpeaker = false;\n\n if (!(0, _isOneOf.default)('click', trigger) && !(0, _isOneOf.default)('active', trigger)) {\n _this.hideWithCheck();\n }\n };\n\n _this.open = function (delay) {\n _this.show(delay);\n };\n\n _this.close = function (delay) {\n _this.hide(delay);\n };\n\n _this.show = function (delay) {\n if (delay) {\n return _this.delayShowTimer = setTimeout(function () {\n _this.delayShowTimer = null;\n\n _this.setState({\n isOverlayShown: true\n });\n }, delay);\n }\n\n _this.setState({\n isOverlayShown: true\n });\n };\n\n _this.hide = function (delay) {\n if (delay) {\n return _this.delayHideTimer = setTimeout(function () {\n _this.delayHideTimer = null;\n\n _this.setState({\n isOverlayShown: false\n });\n }, delay);\n }\n\n _this.setState({\n isOverlayShown: false\n });\n };\n\n _this.hideWithCheck = function (delay) {\n if (!_this.mouseEnteredToSpeaker && !_this.mouseEnteredToTrigger) {\n _this.hide(delay);\n }\n };\n\n _this.toggleHideAndShow = function () {\n var _this$props = _this.props,\n delayShow = _this$props.delayShow,\n delay = _this$props.delay,\n delayHide = _this$props.delayHide;\n\n if (_this.state.isOverlayShown) {\n _this.hideWithCheck((0, _isNil.default)(delayHide) ? delay : delayHide);\n } else {\n _this.show((0, _isNil.default)(delayShow) ? delay : delayShow);\n }\n };\n\n _this.handleDelayedShow = function () {\n var _this$props2 = _this.props,\n delayShow = _this$props2.delayShow,\n enterable = _this$props2.enterable;\n var delay = (0, _isNil.default)(delayShow) ? _this.props.delay : delayShow;\n\n if (!enterable) {\n return _this.show(delay);\n }\n\n _this.mouseEnteredToTrigger = true;\n\n if (!(0, _isNil.default)(_this.delayHideTimer)) {\n clearTimeout(_this.delayHideTimer);\n _this.delayHideTimer = null;\n return _this.show(delay);\n }\n\n if (_this.state.isOverlayShown) {\n return;\n }\n\n _this.show(delay);\n };\n\n _this.handleDelayedHide = function () {\n var _this$props3 = _this.props,\n delayHide = _this$props3.delayHide,\n enterable = _this$props3.enterable;\n var delay = (0, _isNil.default)(delayHide) ? _this.props.delay : delayHide;\n\n if (!enterable) {\n _this.hide(delay);\n }\n\n _this.mouseEnteredToTrigger = false;\n\n if (!(0, _isNil.default)(_this.delayShowTimer)) {\n clearTimeout(_this.delayShowTimer);\n _this.delayShowTimer = null;\n return;\n }\n\n if (!_this.state.isOverlayShown || !(0, _isNil.default)(_this.delayHideTimer)) {\n return;\n }\n\n if (!delay) {\n return _this.hideWithCheck();\n }\n\n _this.delayHideTimer = setTimeout(function () {\n if (_this.state.isOnSpeaker) {\n return;\n }\n\n clearTimeout(_this.delayHideTimer);\n _this.delayHideTimer = null;\n\n _this.hideWithCheck();\n }, delay);\n };\n\n if (props.trigger !== 'none') {\n _this.onMouseOverListener = function (e) {\n return onMouseEventHandler(_this.handleDelayedShow, e);\n };\n\n _this.onMouseOutListener = function (e) {\n return onMouseEventHandler(_this.handleDelayedHide, e);\n };\n }\n\n _this.state = {\n isOverlayShown: props.defaultOpen\n };\n return _this;\n }\n\n var _proto = OverlayTrigger.prototype;\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n clearTimeout(this.delayShowTimer);\n clearTimeout(this.delayHideTimer);\n };\n\n _proto.renderOverlay = function renderOverlay() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n open = _this$props4.open,\n speaker = _this$props4.speaker,\n trigger = _this$props4.trigger,\n onHide = _this$props4.onHide;\n var isOverlayShown = this.state.isOverlayShown;\n var overlayProps = (0, _extends2.default)({}, (0, _pick.default)(this.props, Object.keys(_Overlay.default.propTypes)), {\n show: typeof open === 'undefined' ? isOverlayShown : open,\n target: this.getOverlayTarget\n });\n\n if ((0, _isOneOf.default)('click', trigger)) {\n overlayProps.onHide = (0, _createChainedFunction.default)(this.hide, onHide);\n } else if ((0, _isOneOf.default)('active', trigger)) {\n overlayProps.onHide = (0, _createChainedFunction.default)(this.hide, onHide);\n }\n\n var speakerProps = {\n placement: overlayProps.placement\n };\n\n if (trigger !== 'none') {\n speakerProps.onMouseEnter = this.handleSpeakerMouseEnter;\n speakerProps.onMouseLeave = this.handleSpeakerMouseLeave;\n }\n\n if (typeof speaker === 'function') {\n return React.createElement(_Overlay.default, (0, _extends2.default)({}, overlayProps, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 215\n },\n __self: this\n }), function (props, ref) {\n return speaker((0, _extends2.default)({}, props, {\n onClose: _this2.hide\n }), ref);\n });\n }\n\n return React.createElement(_Overlay.default, (0, _extends2.default)({}, overlayProps, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 223\n },\n __self: this\n }), React.cloneElement(speaker, speakerProps));\n };\n\n _proto.render = function render() {\n var _this$props5 = this.props,\n children = _this$props5.children,\n speaker = _this$props5.speaker,\n onClick = _this$props5.onClick,\n trigger = _this$props5.trigger,\n onMouseOver = _this$props5.onMouseOver,\n onMouseOut = _this$props5.onMouseOut,\n onFocus = _this$props5.onFocus,\n onBlur = _this$props5.onBlur,\n disabled = _this$props5.disabled;\n var triggerComponent = React.Children.only(children);\n var triggerProps = triggerComponent.props;\n var props = {\n key: 'triggerComponent',\n onClick: (0, _createChainedFunction.default)(triggerProps.onClick, onClick),\n 'aria-describedby': (0, _get.default)(speaker, ['props', 'id'])\n };\n\n if (!disabled) {\n if ((0, _isOneOf.default)('click', trigger)) {\n props.onClick = (0, _createChainedFunction.default)(this.toggleHideAndShow, props.onClick);\n }\n\n if ((0, _isOneOf.default)('active', trigger)) {\n props.onClick = (0, _createChainedFunction.default)(this.handleDelayedShow, props.onClick);\n }\n\n if ((0, _isOneOf.default)('hover', trigger)) {\n props.onMouseOver = (0, _createChainedFunction.default)(this.onMouseOverListener, triggerProps.onMouseOver, onMouseOver);\n props.onMouseOut = (0, _createChainedFunction.default)(this.onMouseOutListener, triggerProps.onMouseOut, onMouseOut);\n }\n\n if ((0, _isOneOf.default)('focus', trigger)) {\n props.onFocus = (0, _createChainedFunction.default)(this.handleDelayedShow, triggerProps.onFocus, onFocus);\n props.onBlur = (0, _createChainedFunction.default)(this.handleDelayedHide, triggerProps.onBlur, onBlur);\n }\n }\n\n return [React.cloneElement(triggerComponent, props), React.createElement(_Portal.default, {\n key: \"portal\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 287\n },\n __self: this\n }, this.renderOverlay())];\n };\n\n return OverlayTrigger;\n}(React.Component);\n\nOverlayTrigger.defaultProps = {\n trigger: ['hover', 'focus'],\n delayHide: 200,\n placement: 'bottomStart',\n rootClose: true\n};\nvar _default = OverlayTrigger;\nexports.default = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./src/Overlay/OverlayTrigger.tsx?");
|
|
9210
|
+
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 _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 _get = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\n\nvar _pick = _interopRequireDefault(__webpack_require__(/*! lodash/pick */ \"./node_modules/lodash/pick.js\"));\n\nvar _isNil = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _domLib = __webpack_require__(/*! dom-lib */ \"./node_modules/dom-lib/es/index.js\");\n\nvar _Overlay = _interopRequireDefault(__webpack_require__(/*! ./Overlay */ \"./src/Overlay/Overlay.tsx\"));\n\nvar _createChainedFunction = _interopRequireDefault(__webpack_require__(/*! ../utils/createChainedFunction */ \"./src/utils/createChainedFunction.ts\"));\n\nvar _isOneOf = _interopRequireDefault(__webpack_require__(/*! ../utils/isOneOf */ \"./src/utils/isOneOf.ts\"));\n\nvar _getDOMNode = _interopRequireDefault(__webpack_require__(/*! ../utils/getDOMNode */ \"./src/utils/getDOMNode.ts\"));\n\nvar _Portal = _interopRequireDefault(__webpack_require__(/*! ../Portal */ \"./src/Portal/index.tsx\"));\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/Overlay/OverlayTrigger.tsx\";\n\nfunction onMouseEventHandler(handler, event) {\n var target = event.currentTarget;\n var related = event.relatedTarget || (0, _get.default)(event, ['nativeEvent', 'toElement']);\n\n if ((!related || related !== target) && !(0, _domLib.contains)(target, related)) {\n handler(event);\n }\n}\n\nvar OverlayTrigger =\n/*#__PURE__*/\nfunction (_React$Component) {\n (0, _inheritsLoose2.default)(OverlayTrigger, _React$Component);\n\n function OverlayTrigger(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.onMouseOverListener = void 0;\n _this.onMouseOutListener = void 0;\n _this.delayShowTimer = void 0;\n _this.delayHideTimer = void 0;\n _this.mouseEnteredToSpeaker = false;\n _this.mouseEnteredToTrigger = false;\n\n _this.getOverlayTarget = function () {\n return (0, _getDOMNode.default)((0, _assertThisInitialized2.default)(_this));\n };\n\n _this.handleSpeakerMouseEnter = function () {\n _this.mouseEnteredToSpeaker = true;\n };\n\n _this.handleSpeakerMouseLeave = function () {\n var trigger = _this.props.trigger;\n _this.mouseEnteredToSpeaker = false;\n\n if (!(0, _isOneOf.default)('click', trigger) && !(0, _isOneOf.default)('active', trigger) && !(0, _isOneOf.default)('contextMenu', trigger)) {\n _this.hideWithCheck();\n }\n };\n\n _this.open = function (delay) {\n _this.show(delay);\n };\n\n _this.close = function (delay) {\n _this.hide(delay);\n };\n\n _this.show = function (delay) {\n if (delay) {\n return _this.delayShowTimer = setTimeout(function () {\n _this.delayShowTimer = null;\n\n _this.setState({\n isOverlayShown: true\n });\n }, delay);\n }\n\n _this.setState({\n isOverlayShown: true\n });\n };\n\n _this.hide = function (delay) {\n if (delay) {\n return _this.delayHideTimer = setTimeout(function () {\n _this.delayHideTimer = null;\n\n _this.setState({\n isOverlayShown: false\n });\n }, delay);\n }\n\n _this.setState({\n isOverlayShown: false\n });\n };\n\n _this.hideWithCheck = function (delay) {\n if (!_this.mouseEnteredToSpeaker && !_this.mouseEnteredToTrigger) {\n _this.hide(delay);\n }\n };\n\n _this.toggleHideAndShow = function () {\n var _this$props = _this.props,\n delayShow = _this$props.delayShow,\n delay = _this$props.delay,\n delayHide = _this$props.delayHide;\n\n if (_this.state.isOverlayShown) {\n _this.hideWithCheck((0, _isNil.default)(delayHide) ? delay : delayHide);\n } else {\n _this.show((0, _isNil.default)(delayShow) ? delay : delayShow);\n }\n };\n\n _this.preventDefault = function (event) {\n event.preventDefault();\n };\n\n _this.handleDelayedShow = function () {\n var _this$props2 = _this.props,\n delayShow = _this$props2.delayShow,\n enterable = _this$props2.enterable;\n var delay = (0, _isNil.default)(delayShow) ? _this.props.delay : delayShow;\n\n if (!enterable) {\n return _this.show(delay);\n }\n\n _this.mouseEnteredToTrigger = true;\n\n if (!(0, _isNil.default)(_this.delayHideTimer)) {\n clearTimeout(_this.delayHideTimer);\n _this.delayHideTimer = null;\n return _this.show(delay);\n }\n\n if (_this.state.isOverlayShown) {\n return;\n }\n\n _this.show(delay);\n };\n\n _this.handleDelayedHide = function () {\n var _this$props3 = _this.props,\n delayHide = _this$props3.delayHide,\n enterable = _this$props3.enterable;\n var delay = (0, _isNil.default)(delayHide) ? _this.props.delay : delayHide;\n\n if (!enterable) {\n _this.hide(delay);\n }\n\n _this.mouseEnteredToTrigger = false;\n\n if (!(0, _isNil.default)(_this.delayShowTimer)) {\n clearTimeout(_this.delayShowTimer);\n _this.delayShowTimer = null;\n return;\n }\n\n if (!_this.state.isOverlayShown || !(0, _isNil.default)(_this.delayHideTimer)) {\n return;\n }\n\n if (!delay) {\n return _this.hideWithCheck();\n }\n\n _this.delayHideTimer = setTimeout(function () {\n if (_this.state.isOnSpeaker) {\n return;\n }\n\n clearTimeout(_this.delayHideTimer);\n _this.delayHideTimer = null;\n\n _this.hideWithCheck();\n }, delay);\n };\n\n if (props.trigger !== 'none') {\n _this.onMouseOverListener = function (e) {\n return onMouseEventHandler(_this.handleDelayedShow, e);\n };\n\n _this.onMouseOutListener = function (e) {\n return onMouseEventHandler(_this.handleDelayedHide, e);\n };\n }\n\n _this.state = {\n isOverlayShown: props.defaultOpen\n };\n return _this;\n }\n\n var _proto = OverlayTrigger.prototype;\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n clearTimeout(this.delayShowTimer);\n clearTimeout(this.delayHideTimer);\n };\n\n _proto.renderOverlay = function renderOverlay() {\n var _this2 = this;\n\n var _this$props4 = this.props,\n open = _this$props4.open,\n speaker = _this$props4.speaker,\n trigger = _this$props4.trigger,\n onHide = _this$props4.onHide;\n var isOverlayShown = this.state.isOverlayShown;\n var overlayProps = (0, _extends2.default)({}, (0, _pick.default)(this.props, Object.keys(_Overlay.default.propTypes)), {\n show: typeof open === 'undefined' ? isOverlayShown : open,\n target: this.getOverlayTarget\n });\n\n if ((0, _isOneOf.default)('click', trigger)) {\n overlayProps.onHide = (0, _createChainedFunction.default)(this.hide, onHide);\n } else if ((0, _isOneOf.default)('contextMenu', trigger)) {\n overlayProps.onHide = (0, _createChainedFunction.default)(this.hide, onHide);\n } else if ((0, _isOneOf.default)('active', trigger)) {\n overlayProps.onHide = (0, _createChainedFunction.default)(this.hide, onHide);\n }\n\n var speakerProps = {\n placement: overlayProps.placement\n };\n\n if (trigger !== 'none') {\n speakerProps.onMouseEnter = this.handleSpeakerMouseEnter;\n speakerProps.onMouseLeave = this.handleSpeakerMouseLeave;\n }\n\n if (typeof speaker === 'function') {\n return React.createElement(_Overlay.default, (0, _extends2.default)({}, overlayProps, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 226\n },\n __self: this\n }), function (props, ref) {\n return speaker((0, _extends2.default)({}, props, {\n onClose: _this2.hide\n }), ref);\n });\n }\n\n return React.createElement(_Overlay.default, (0, _extends2.default)({}, overlayProps, {\n __source: {\n fileName: _jsxFileName,\n lineNumber: 234\n },\n __self: this\n }), React.cloneElement(speaker, speakerProps));\n };\n\n _proto.render = function render() {\n var _this$props5 = this.props,\n children = _this$props5.children,\n speaker = _this$props5.speaker,\n onClick = _this$props5.onClick,\n onContextMenu = _this$props5.onContextMenu,\n trigger = _this$props5.trigger,\n onMouseOver = _this$props5.onMouseOver,\n onMouseOut = _this$props5.onMouseOut,\n onFocus = _this$props5.onFocus,\n onBlur = _this$props5.onBlur,\n disabled = _this$props5.disabled;\n var triggerComponent = React.Children.only(children);\n var triggerProps = triggerComponent.props;\n var props = {\n key: 'triggerComponent',\n onClick: (0, _createChainedFunction.default)(triggerProps.onClick, onClick),\n 'aria-describedby': (0, _get.default)(speaker, ['props', 'id'])\n };\n\n if (!disabled) {\n if ((0, _isOneOf.default)('click', trigger)) {\n props.onClick = (0, _createChainedFunction.default)(this.toggleHideAndShow, props.onClick);\n }\n\n if ((0, _isOneOf.default)('contextMenu', trigger)) {\n props.onContextMenu = (0, _createChainedFunction.default)(this.preventDefault, this.toggleHideAndShow, triggerProps.onContextMenu, onContextMenu);\n }\n\n if ((0, _isOneOf.default)('active', trigger)) {\n props.onClick = (0, _createChainedFunction.default)(this.handleDelayedShow, props.onClick);\n }\n\n if ((0, _isOneOf.default)('hover', trigger)) {\n props.onMouseOver = (0, _createChainedFunction.default)(this.onMouseOverListener, triggerProps.onMouseOver, onMouseOver);\n props.onMouseOut = (0, _createChainedFunction.default)(this.onMouseOutListener, triggerProps.onMouseOut, onMouseOut);\n }\n\n if ((0, _isOneOf.default)('focus', trigger)) {\n props.onFocus = (0, _createChainedFunction.default)(this.handleDelayedShow, triggerProps.onFocus, onFocus);\n props.onBlur = (0, _createChainedFunction.default)(this.handleDelayedHide, triggerProps.onBlur, onBlur);\n }\n }\n\n return [React.cloneElement(triggerComponent, props), React.createElement(_Portal.default, {\n key: \"portal\",\n __source: {\n fileName: _jsxFileName,\n lineNumber: 308\n },\n __self: this\n }, this.renderOverlay())];\n };\n\n return OverlayTrigger;\n}(React.Component);\n\nOverlayTrigger.defaultProps = {\n trigger: ['hover', 'focus'],\n delayHide: 200,\n placement: 'bottomStart',\n rootClose: true\n};\nvar _default = OverlayTrigger;\nexports.default = _default;\nmodule.exports = exports.default;\n\n//# sourceURL=webpack://rsuite/./src/Overlay/OverlayTrigger.tsx?");
|
|
9794
9211
|
|
|
9795
9212
|
/***/ }),
|
|
9796
9213
|
|
|
@@ -11410,7 +10827,7 @@ eval("\n\nvar _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/h
|
|
|
11410
10827
|
/***/ (function(module, exports, __webpack_require__) {
|
|
11411
10828
|
|
|
11412
10829
|
"use strict";
|
|
11413
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.shouldShowNodeByExpanded = shouldShowNodeByExpanded;\nexports.flattenTree = flattenTree;\nexports.getNodeParents = getNodeParents;\nexports.getVirtualLisHeight = getVirtualLisHeight;\nexports.hasVisibleChildren = hasVisibleChildren;\nexports.treeDeprecatedWarning = treeDeprecatedWarning;\nexports.compareArray = compareArray;\nexports.getExpandAll = getExpandAll;\nexports.getExpandItemValues = getExpandItemValues;\nexports.getExpandState = getExpandState;\nexports.getDragNodeKeys = getDragNodeKeys;\nexports.calDropNodePosition = calDropNodePosition;\nexports.removeDragNode = removeDragNode;\nexports.createUpdateTreeDataFunction = createUpdateTreeDataFunction;\nexports.findNodeOfTree = findNodeOfTree;\nexports.filterNodesOfTree = filterNodesOfTree;\nexports.getExpandWhenSearching = getExpandWhenSearching;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _isEmpty2 = _interopRequireDefault(__webpack_require__(/*! lodash/isEmpty */ \"./node_modules/lodash/isEmpty.js\"));\n\nvar _clone2 = _interopRequireDefault(__webpack_require__(/*! lodash/clone */ \"./node_modules/lodash/clone.js\"));\n\nvar _isNil2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _isUndefined2 = _interopRequireDefault(__webpack_require__(/*! lodash/isUndefined */ \"./node_modules/lodash/isUndefined.js\"));\n\nvar _isArray2 = _interopRequireDefault(__webpack_require__(/*! lodash/isArray */ \"./node_modules/lodash/isArray.js\"));\n\nvar _intersection2 = _interopRequireDefault(__webpack_require__(/*! lodash/intersection */ \"./node_modules/lodash/intersection.js\"));\n\nvar _shallowEqual = _interopRequireDefault(__webpack_require__(/*! ../utils/shallowEqual */ \"./src/utils/shallowEqual.ts\"));\n\nvar _shallowEqualArray = _interopRequireDefault(__webpack_require__(/*! ../utils/shallowEqualArray */ \"./src/utils/shallowEqualArray.ts\"));\n\nvar _constants = __webpack_require__(/*! ../constants */ \"./src/constants.ts\");\n\nvar SEARCH_BAR_HEIGHT = 48;\nvar MENU_PADDING = 12; // Tree Node 之间的 间隔\n\nvar TREE_NODE_GAP = 4;\n/**\n * 判断当前节点是否应该显示\n * @param {*} expandItemValues\n * @param {*} parentKeys\n */\n\nfunction shouldShowNodeByExpanded(expandItemValues, parentKeys) {\n if (expandItemValues === void 0) {\n expandItemValues = [];\n }\n\n if (parentKeys === void 0) {\n parentKeys = [];\n }\n\n var intersectionKeys = (0, _intersection2.default)(expandItemValues, parentKeys);\n\n if (intersectionKeys.length === parentKeys.length) {\n return true;\n }\n\n return false;\n}\n/**\n * 拍平树结构为数组\n * @param {*} tree\n * @param {*} childrenKey\n * @param {*} executor\n */\n\n\nfunction flattenTree(tree, childrenKey, executor) {\n if (childrenKey === void 0) {\n childrenKey = 'children';\n }\n\n var flattenData = [];\n\n var traverse = function traverse(data, parent) {\n if (!(0, _isArray2.default)(data)) {\n return;\n }\n\n data.forEach(function (item, index) {\n var node = typeof executor === 'function' ? executor(item, index) : item;\n node.parent = parent;\n flattenData.push((0, _extends2.default)({}, node));\n\n if (item[childrenKey]) {\n traverse(item[childrenKey], item);\n }\n });\n };\n\n traverse(tree, null);\n return flattenData;\n}\n/**\n * 获取树节点所有的祖先节点\n * @param {*} node\n */\n\n\nfunction getNodeParents(node, parentKey, valueKey) {\n if (parentKey === void 0) {\n parentKey = 'parent';\n }\n\n var parents = [];\n\n var traverse = function traverse(node) {\n if (node === null || node === void 0 ? void 0 : node[parentKey]) {\n traverse(node[parentKey]);\n\n if (valueKey) {\n parents.push(node[parentKey][valueKey]);\n } else {\n parents.push(node[parentKey]);\n }\n }\n };\n\n traverse(node);\n return parents;\n}\n/**\n * 获取 VirtualList 的高度\n * @param {*} inline\n * @param {*} height\n */\n\n\nfunction getVirtualLisHeight(inline, searchable, height) {\n if (height === void 0) {\n height = 0;\n }\n\n var searchBarHeight = searchable ? SEARCH_BAR_HEIGHT : 0;\n return inline ? height - MENU_PADDING * 2 : height - searchBarHeight - MENU_PADDING * 2;\n}\n/**\n * 判断节点是否存在可见的子节点。\n * @param node\n */\n\n\nfunction hasVisibleChildren(node, childrenKey) {\n if (!Array.isArray(node[childrenKey])) {\n return false;\n }\n\n return node[childrenKey].some(function (child) {\n return child.visible;\n });\n}\n/**\n * 废弃 prop warning\n * @param prop\n */\n\n\nfunction treeDeprecatedWarning(props, keys) {\n if (keys === void 0) {\n keys = [];\n }\n\n keys.forEach(function (key) {\n if (!(0, _isUndefined2.default)(props[key])) {\n console.warn(\"'Warning: \" + key + \" is deprecated and will be removed in a future release.'\");\n }\n });\n}\n/**\n * 浅比较两个数组是否不一样\n * @param a\n * @param b\n */\n\n\nfunction compareArray(a, b) {\n return (0, _isArray2.default)(a) && (0, _isArray2.default)(b) && !(0, _shallowEqualArray.default)(a, b);\n}\n/**\n * 获取 expandAll 的 value\n * @param props\n */\n\n\nfunction getExpandAll(props) {\n var expandAll = props.expandAll,\n defaultExpandAll = props.defaultExpandAll;\n return !(0, _isUndefined2.default)(expandAll) ? expandAll : defaultExpandAll;\n}\n/**\n * 获取 expandItemValues 的 value\n * @param props\n */\n\n\nfunction getExpandItemValues(props) {\n var expandItemValues = props.expandItemValues,\n defaultExpandItemValues = props.defaultExpandItemValues;\n\n if (!(0, _isUndefined2.default)(expandItemValues) && Array.isArray(expandItemValues)) {\n return expandItemValues;\n }\n\n if (!(0, _isUndefined2.default)(defaultExpandItemValues) && Array.isArray(defaultExpandItemValues)) {\n return defaultExpandItemValues;\n }\n\n return [];\n}\n/**\n * 获取节点展开状态\n * @param node\n * @param props\n */\n\n\nfunction getExpandState(node, props) {\n var _node$childrenKey;\n\n var valueKey = props.valueKey,\n childrenKey = props.childrenKey,\n expandItemValues = props.expandItemValues;\n var expandAll = getExpandAll(props);\n var expand = getExpandItemValues(props).some(function (value) {\n return (0, _shallowEqual.default)(node[valueKey], value);\n });\n\n if (!(0, _isUndefined2.default)(expandItemValues)) {\n return expand;\n } else if ((_node$childrenKey = node[childrenKey]) === null || _node$childrenKey === void 0 ? void 0 : _node$childrenKey.length) {\n if (!(0, _isNil2.default)(node.expand)) {\n return !!node.expand;\n } else if (expandAll) {\n return true;\n }\n\n return false;\n }\n\n return false;\n}\n/**\n * 获取拖拽节点及子节点的key\n * @param node\n * @param childrenKey\n * @param valueKey\n */\n\n\nfunction getDragNodeKeys(dragNode, childrenKey, valueKey) {\n var dragNodeKeys = [dragNode[valueKey]];\n\n var traverse = function traverse(data) {\n if ((data === null || data === void 0 ? void 0 : data.length) > 0) {\n data.forEach(function (node) {\n dragNodeKeys = dragNodeKeys.concat([node[valueKey]]);\n\n if (node[childrenKey]) {\n traverse(node[childrenKey]);\n }\n });\n }\n };\n\n traverse(dragNode[childrenKey]);\n return dragNodeKeys;\n}\n\nfunction calDropNodePosition(event, treeNodeElement) {\n var clientY = event.clientY;\n\n var _treeNodeElement$getB = treeNodeElement.getBoundingClientRect(),\n top = _treeNodeElement$getB.top,\n bottom = _treeNodeElement$getB.bottom;\n\n var gap = TREE_NODE_GAP; // 处于节点下方\n\n if (clientY >= bottom - gap && clientY <= bottom) {\n return _constants.TREE_NODE_DROP_POSITION.DRAG_OVER_BOTTOM;\n } // 处于节点上方\n\n\n if (clientY <= top + gap && clientY >= top) {\n return _constants.TREE_NODE_DROP_POSITION.DRAG_OVER_TOP;\n }\n\n if (clientY >= top + gap && clientY <= bottom - gap) {\n return _constants.TREE_NODE_DROP_POSITION.DRAG_OVER;\n }\n\n return -1;\n}\n\nfunction removeDragNode(data, params, _ref) {\n var valueKey = _ref.valueKey,\n childrenKey = _ref.childrenKey;\n var dragNode = params.dragNode;\n\n var traverse = function traverse(items, parent) {\n for (var _index = 0; _index < items.length; _index += 1) {\n var item = items[_index];\n\n if ((0, _shallowEqual.default)(item[valueKey], dragNode[valueKey])) {\n items.splice(_index, 1); // 当 children 为空,需要删除 children 属性,不显示角标\n\n if (items.length === 0 && parent) {\n delete parent.children;\n }\n\n break;\n }\n\n if (Array.isArray(item[childrenKey])) {\n traverse(item[childrenKey], item);\n }\n }\n };\n\n traverse(data);\n}\n/**\n * 移动节点valueKey,先删除 dragNode 原本所在的数据,再将 dragNode 移动到拖动的位置\n * @param data\n * @param params\n */\n\n\nfunction createUpdateTreeDataFunction(params, _ref2) {\n var valueKey = _ref2.valueKey,\n childrenKey = _ref2.childrenKey;\n return function (tree) {\n var data = [].concat(tree);\n var dragNode = params.dragNode,\n dropNode = params.dropNode,\n dropNodePosition = params.dropNodePosition;\n removeDragNode(data, params, {\n valueKey: valueKey,\n childrenKey: childrenKey\n });\n\n var updateTree = function updateTree(items) {\n for (var _index2 = 0; _index2 < items.length; _index2 += 1) {\n var item = items[_index2];\n\n if ((0, _shallowEqual.default)(item[valueKey], dropNode[valueKey])) {\n // 拖拽到 dropNode内,作为 dropNode 的子节点\n if (dropNodePosition === _constants.TREE_NODE_DROP_POSITION.DRAG_OVER) {\n item[childrenKey] = (0, _isNil2.default)(item[childrenKey]) ? [] : item[childrenKey];\n item[childrenKey].push(dragNode);\n break;\n } else if (dropNodePosition === _constants.TREE_NODE_DROP_POSITION.DRAG_OVER_TOP) {\n // 拖拽到 dropNode 的上面\n items.splice(_index2, 0, dragNode);\n break;\n } else if (dropNodePosition === _constants.TREE_NODE_DROP_POSITION.DRAG_OVER_BOTTOM) {\n // 拖拽到 dropNode 的下面\n items.splice(_index2 + 1, 0, dragNode);\n break;\n }\n }\n\n if (Array.isArray(item[childrenKey]) && item[childrenKey].length > 0) {\n updateTree(item[childrenKey]);\n }\n }\n };\n\n updateTree(data);\n return [].concat(data);\n };\n}\n\nfunction findNodeOfTree(data, check) {\n var findNode = function findNode(nodes) {\n if (nodes === void 0) {\n nodes = [];\n }\n\n for (var i = 0; i < nodes.length; i += 1) {\n var item = nodes[i];\n\n if ((0, _isArray2.default)(item.children)) {\n var _node = findNode(item.children);\n\n if (_node) {\n return _node;\n }\n }\n\n if (check(item)) {\n return item;\n }\n }\n\n return undefined;\n };\n\n return findNode(data);\n}\n\nfunction filterNodesOfTree(data, check) {\n var findNodes = function findNodes(nodes) {\n if (nodes === void 0) {\n nodes = [];\n }\n\n var nextNodes = [];\n\n for (var i = 0; i < nodes.length; i += 1) {\n if ((0, _isArray2.default)(nodes[i].children)) {\n var nextChildren = findNodes(nodes[i].children);\n\n if (nextChildren.length) {\n var item = (0, _clone2.default)(nodes[i]);\n item.children = nextChildren;\n nextNodes.push(item);\n continue;\n }\n }\n\n if (check(nodes[i])) {\n nextNodes.push(nodes[i]);\n }\n }\n\n return nextNodes;\n };\n\n return findNodes(data);\n}\n/**\n * 根据是否处于搜索状态来返回 expand 的值。如果处于搜索状态下,则展开所有的节点\n * @param searchKeyword\n * @param expand\n */\n\n\nfunction getExpandWhenSearching(searchKeyword, expand) {\n return !(0, _isEmpty2.default)(searchKeyword) ? true : expand;\n}\n\n//# sourceURL=webpack://rsuite/./src/utils/treeUtils.ts?");
|
|
10830
|
+
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.shouldShowNodeByExpanded = shouldShowNodeByExpanded;\nexports.flattenTree = flattenTree;\nexports.getNodeParents = getNodeParents;\nexports.getVirtualLisHeight = getVirtualLisHeight;\nexports.hasVisibleChildren = hasVisibleChildren;\nexports.treeDeprecatedWarning = treeDeprecatedWarning;\nexports.compareArray = compareArray;\nexports.getExpandAll = getExpandAll;\nexports.getExpandItemValues = getExpandItemValues;\nexports.getExpandState = getExpandState;\nexports.getDragNodeKeys = getDragNodeKeys;\nexports.calDropNodePosition = calDropNodePosition;\nexports.removeDragNode = removeDragNode;\nexports.createUpdateTreeDataFunction = createUpdateTreeDataFunction;\nexports.findNodeOfTree = findNodeOfTree;\nexports.filterNodesOfTree = filterNodesOfTree;\nexports.getExpandWhenSearching = getExpandWhenSearching;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _isEmpty2 = _interopRequireDefault(__webpack_require__(/*! lodash/isEmpty */ \"./node_modules/lodash/isEmpty.js\"));\n\nvar _clone2 = _interopRequireDefault(__webpack_require__(/*! lodash/clone */ \"./node_modules/lodash/clone.js\"));\n\nvar _isNil2 = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _isUndefined2 = _interopRequireDefault(__webpack_require__(/*! lodash/isUndefined */ \"./node_modules/lodash/isUndefined.js\"));\n\nvar _isArray2 = _interopRequireDefault(__webpack_require__(/*! lodash/isArray */ \"./node_modules/lodash/isArray.js\"));\n\nvar _intersection2 = _interopRequireDefault(__webpack_require__(/*! lodash/intersection */ \"./node_modules/lodash/intersection.js\"));\n\nvar _shallowEqual = _interopRequireDefault(__webpack_require__(/*! ../utils/shallowEqual */ \"./src/utils/shallowEqual.ts\"));\n\nvar _shallowEqualArray = _interopRequireDefault(__webpack_require__(/*! ../utils/shallowEqualArray */ \"./src/utils/shallowEqualArray.ts\"));\n\nvar _constants = __webpack_require__(/*! ../constants */ \"./src/constants.ts\");\n\nvar SEARCH_BAR_HEIGHT = 48;\nvar MENU_PADDING = 12; // Tree Node 之间的 间隔\n\nvar TREE_NODE_GAP = 4;\n/**\n * 判断当前节点是否应该显示\n * @param {*} expandItemValues\n * @param {*} parentKeys\n */\n\nfunction shouldShowNodeByExpanded(expandItemValues, parentKeys) {\n if (expandItemValues === void 0) {\n expandItemValues = [];\n }\n\n if (parentKeys === void 0) {\n parentKeys = [];\n }\n\n var intersectionKeys = (0, _intersection2.default)(expandItemValues, parentKeys);\n\n if (intersectionKeys.length === parentKeys.length) {\n return true;\n }\n\n return false;\n}\n/**\n * 拍平树结构为数组\n * @param {*} tree\n * @param {*} childrenKey\n * @param {*} executor\n */\n\n\nfunction flattenTree(tree, childrenKey, executor) {\n if (childrenKey === void 0) {\n childrenKey = 'children';\n }\n\n var flattenData = [];\n\n var traverse = function traverse(data, parent) {\n if (!(0, _isArray2.default)(data)) {\n return;\n }\n\n data.forEach(function (item, index) {\n var node = typeof executor === 'function' ? executor(item, index) : item;\n node.parent = parent;\n flattenData.push((0, _extends2.default)({}, node));\n\n if (item[childrenKey]) {\n traverse(item[childrenKey], item);\n }\n });\n };\n\n traverse(tree, null);\n return flattenData;\n}\n/**\n * 获取树节点所有的祖先节点\n * @param {*} node\n */\n\n\nfunction getNodeParents(node, parentKey, valueKey) {\n if (parentKey === void 0) {\n parentKey = 'parent';\n }\n\n var parents = [];\n\n var traverse = function traverse(node) {\n if (node === null || node === void 0 ? void 0 : node[parentKey]) {\n traverse(node[parentKey]);\n\n if (valueKey) {\n parents.push(node[parentKey][valueKey]);\n } else {\n parents.push(node[parentKey]);\n }\n }\n };\n\n traverse(node);\n return parents;\n}\n/**\n * 获取 VirtualList 的高度\n * @param {*} inline\n * @param {*} height\n */\n\n\nfunction getVirtualLisHeight(inline, searchable, height) {\n if (height === void 0) {\n height = 0;\n }\n\n var searchBarHeight = searchable ? SEARCH_BAR_HEIGHT : 0;\n return inline ? height - MENU_PADDING * 2 : height - searchBarHeight - MENU_PADDING * 2;\n}\n/**\n * 判断节点是否存在可见的子节点。\n * @param node\n */\n\n\nfunction hasVisibleChildren(node, childrenKey) {\n if (!Array.isArray(node[childrenKey])) {\n return false;\n }\n\n return node[childrenKey].some(function (child) {\n return child.visible;\n });\n}\n/**\n * 废弃 prop warning\n * @param prop\n */\n\n\nfunction treeDeprecatedWarning(props, keys) {\n if (keys === void 0) {\n keys = [];\n }\n\n keys.forEach(function (key) {\n if (!(0, _isUndefined2.default)(props[key])) {\n console.warn(\"'Warning: \" + key + \" is deprecated and will be removed in a future release.'\");\n }\n });\n}\n/**\n * 浅比较两个数组是否不一样\n * @param a\n * @param b\n */\n\n\nfunction compareArray(a, b) {\n if (!((0, _isArray2.default)(a) && (0, _isArray2.default)(b))) {\n return a !== b;\n }\n\n return !(0, _shallowEqualArray.default)(a, b);\n}\n/**\n * 获取 expandAll 的 value\n * @param props\n */\n\n\nfunction getExpandAll(props) {\n var expandAll = props.expandAll,\n defaultExpandAll = props.defaultExpandAll;\n return !(0, _isUndefined2.default)(expandAll) ? expandAll : defaultExpandAll;\n}\n/**\n * 获取 expandItemValues 的 value\n * @param props\n */\n\n\nfunction getExpandItemValues(props) {\n var expandItemValues = props.expandItemValues,\n defaultExpandItemValues = props.defaultExpandItemValues;\n\n if (!(0, _isUndefined2.default)(expandItemValues) && Array.isArray(expandItemValues)) {\n return expandItemValues;\n }\n\n if (!(0, _isUndefined2.default)(defaultExpandItemValues) && Array.isArray(defaultExpandItemValues)) {\n return defaultExpandItemValues;\n }\n\n return [];\n}\n/**\n * 获取节点展开状态\n * @param node\n * @param props\n */\n\n\nfunction getExpandState(node, props) {\n var _node$childrenKey;\n\n var valueKey = props.valueKey,\n childrenKey = props.childrenKey,\n expandItemValues = props.expandItemValues;\n var expandAll = getExpandAll(props);\n var expand = getExpandItemValues(props).some(function (value) {\n return (0, _shallowEqual.default)(node[valueKey], value);\n });\n\n if (!(0, _isUndefined2.default)(expandItemValues)) {\n return expand;\n } else if ((_node$childrenKey = node[childrenKey]) === null || _node$childrenKey === void 0 ? void 0 : _node$childrenKey.length) {\n if (!(0, _isNil2.default)(node.expand)) {\n return !!node.expand;\n } else if (expandAll) {\n return true;\n }\n\n return false;\n }\n\n return false;\n}\n/**\n * 获取拖拽节点及子节点的key\n * @param node\n * @param childrenKey\n * @param valueKey\n */\n\n\nfunction getDragNodeKeys(dragNode, childrenKey, valueKey) {\n var dragNodeKeys = [dragNode[valueKey]];\n\n var traverse = function traverse(data) {\n if ((data === null || data === void 0 ? void 0 : data.length) > 0) {\n data.forEach(function (node) {\n dragNodeKeys = dragNodeKeys.concat([node[valueKey]]);\n\n if (node[childrenKey]) {\n traverse(node[childrenKey]);\n }\n });\n }\n };\n\n traverse(dragNode[childrenKey]);\n return dragNodeKeys;\n}\n\nfunction calDropNodePosition(event, treeNodeElement) {\n var clientY = event.clientY;\n\n var _treeNodeElement$getB = treeNodeElement.getBoundingClientRect(),\n top = _treeNodeElement$getB.top,\n bottom = _treeNodeElement$getB.bottom;\n\n var gap = TREE_NODE_GAP; // 处于节点下方\n\n if (clientY >= bottom - gap && clientY <= bottom) {\n return _constants.TREE_NODE_DROP_POSITION.DRAG_OVER_BOTTOM;\n } // 处于节点上方\n\n\n if (clientY <= top + gap && clientY >= top) {\n return _constants.TREE_NODE_DROP_POSITION.DRAG_OVER_TOP;\n }\n\n if (clientY >= top + gap && clientY <= bottom - gap) {\n return _constants.TREE_NODE_DROP_POSITION.DRAG_OVER;\n }\n\n return -1;\n}\n\nfunction removeDragNode(data, params, _ref) {\n var valueKey = _ref.valueKey,\n childrenKey = _ref.childrenKey;\n var dragNode = params.dragNode;\n\n var traverse = function traverse(items, parent) {\n for (var _index = 0; _index < items.length; _index += 1) {\n var item = items[_index];\n\n if ((0, _shallowEqual.default)(item[valueKey], dragNode[valueKey])) {\n items.splice(_index, 1); // 当 children 为空,需要删除 children 属性,不显示角标\n\n if (items.length === 0 && parent) {\n delete parent.children;\n }\n\n break;\n }\n\n if (Array.isArray(item[childrenKey])) {\n traverse(item[childrenKey], item);\n }\n }\n };\n\n traverse(data);\n}\n/**\n * 移动节点valueKey,先删除 dragNode 原本所在的数据,再将 dragNode 移动到拖动的位置\n * @param data\n * @param params\n */\n\n\nfunction createUpdateTreeDataFunction(params, _ref2) {\n var valueKey = _ref2.valueKey,\n childrenKey = _ref2.childrenKey;\n return function (tree) {\n var data = [].concat(tree);\n var dragNode = params.dragNode,\n dropNode = params.dropNode,\n dropNodePosition = params.dropNodePosition;\n removeDragNode(data, params, {\n valueKey: valueKey,\n childrenKey: childrenKey\n });\n\n var updateTree = function updateTree(items) {\n for (var _index2 = 0; _index2 < items.length; _index2 += 1) {\n var item = items[_index2];\n\n if ((0, _shallowEqual.default)(item[valueKey], dropNode[valueKey])) {\n // 拖拽到 dropNode内,作为 dropNode 的子节点\n if (dropNodePosition === _constants.TREE_NODE_DROP_POSITION.DRAG_OVER) {\n item[childrenKey] = (0, _isNil2.default)(item[childrenKey]) ? [] : item[childrenKey];\n item[childrenKey].push(dragNode);\n break;\n } else if (dropNodePosition === _constants.TREE_NODE_DROP_POSITION.DRAG_OVER_TOP) {\n // 拖拽到 dropNode 的上面\n items.splice(_index2, 0, dragNode);\n break;\n } else if (dropNodePosition === _constants.TREE_NODE_DROP_POSITION.DRAG_OVER_BOTTOM) {\n // 拖拽到 dropNode 的下面\n items.splice(_index2 + 1, 0, dragNode);\n break;\n }\n }\n\n if (Array.isArray(item[childrenKey]) && item[childrenKey].length > 0) {\n updateTree(item[childrenKey]);\n }\n }\n };\n\n updateTree(data);\n return [].concat(data);\n };\n}\n\nfunction findNodeOfTree(data, check) {\n var findNode = function findNode(nodes) {\n if (nodes === void 0) {\n nodes = [];\n }\n\n for (var i = 0; i < nodes.length; i += 1) {\n var item = nodes[i];\n\n if ((0, _isArray2.default)(item.children)) {\n var _node = findNode(item.children);\n\n if (_node) {\n return _node;\n }\n }\n\n if (check(item)) {\n return item;\n }\n }\n\n return undefined;\n };\n\n return findNode(data);\n}\n\nfunction filterNodesOfTree(data, check) {\n var findNodes = function findNodes(nodes) {\n if (nodes === void 0) {\n nodes = [];\n }\n\n var nextNodes = [];\n\n for (var i = 0; i < nodes.length; i += 1) {\n if ((0, _isArray2.default)(nodes[i].children)) {\n var nextChildren = findNodes(nodes[i].children);\n\n if (nextChildren.length) {\n var item = (0, _clone2.default)(nodes[i]);\n item.children = nextChildren;\n nextNodes.push(item);\n continue;\n }\n }\n\n if (check(nodes[i])) {\n nextNodes.push(nodes[i]);\n }\n }\n\n return nextNodes;\n };\n\n return findNodes(data);\n}\n/**\n * 根据是否处于搜索状态来返回 expand 的值。如果处于搜索状态下,则展开所有的节点\n * @param searchKeyword\n * @param expand\n */\n\n\nfunction getExpandWhenSearching(searchKeyword, expand) {\n return !(0, _isEmpty2.default)(searchKeyword) ? true : expand;\n}\n\n//# sourceURL=webpack://rsuite/./src/utils/treeUtils.ts?");
|
|
11414
10831
|
|
|
11415
10832
|
/***/ }),
|
|
11416
10833
|
|