rsuite 5.27.0 → 5.28.0
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 +10 -0
- package/cjs/Picker/PickerToggleTrigger.js +1 -1
- package/cjs/locales/hu_HU.d.ts +117 -0
- package/cjs/locales/hu_HU.js +89 -0
- package/cjs/locales/index.d.ts +1 -0
- package/cjs/locales/index.js +5 -1
- package/dist/rsuite.js +3 -3
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/Picker/PickerToggleTrigger.js +1 -1
- package/esm/locales/hu_HU.d.ts +117 -0
- package/esm/locales/hu_HU.js +79 -0
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +1 -0
- package/locales/hu_HU/package.json +7 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# [5.28.0](https://github.com/rsuite/rsuite/compare/v5.27.0...v5.28.0) (2023-02-24)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **DateRangePicker:** fix lifecycle for Picker Toggle ([#3074](https://github.com/rsuite/rsuite/issues/3074)) ([f46717b](https://github.com/rsuite/rsuite/commit/f46717b4b464513d64b226faba9a6d8bacc52678))
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- **i18n:** added Hungarian locale (hu_HU) ([#3075](https://github.com/rsuite/rsuite/issues/3075)) ([4df03c2](https://github.com/rsuite/rsuite/commit/4df03c24660dc6b09417c562da0e1ffe68103bad))
|
|
10
|
+
|
|
1
11
|
# [5.27.0](https://github.com/rsuite/rsuite/compare/v5.26.1...v5.27.0) (2023-02-17)
|
|
2
12
|
|
|
3
13
|
### Bug Fixes
|
|
@@ -34,7 +34,7 @@ var PickerToggleTrigger = /*#__PURE__*/_react.default.forwardRef(function (props
|
|
|
34
34
|
var _useCustom = (0, _utils.useCustom)(),
|
|
35
35
|
rtl = _useCustom.rtl;
|
|
36
36
|
|
|
37
|
-
return /*#__PURE__*/_react.default.createElement(_OverlayTrigger.default, (0, _extends2.default)({},
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_OverlayTrigger.default, (0, _extends2.default)({}, pickerTriggerProps, rest, {
|
|
38
38
|
disabled: pickerTriggerProps.disabled || pickerTriggerProps.loading,
|
|
39
39
|
ref: ref,
|
|
40
40
|
trigger: trigger,
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
common: {
|
|
3
|
+
loading: string;
|
|
4
|
+
emptyMessage: string;
|
|
5
|
+
};
|
|
6
|
+
Plaintext: {
|
|
7
|
+
unfilled: string;
|
|
8
|
+
notSelected: string;
|
|
9
|
+
notUploaded: string;
|
|
10
|
+
};
|
|
11
|
+
Pagination: {
|
|
12
|
+
more: string;
|
|
13
|
+
prev: string;
|
|
14
|
+
next: string;
|
|
15
|
+
first: string;
|
|
16
|
+
last: string;
|
|
17
|
+
limit: string;
|
|
18
|
+
total: string;
|
|
19
|
+
skip: string;
|
|
20
|
+
};
|
|
21
|
+
Calendar: {
|
|
22
|
+
sunday: string;
|
|
23
|
+
monday: string;
|
|
24
|
+
tuesday: string;
|
|
25
|
+
wednesday: string;
|
|
26
|
+
thursday: string;
|
|
27
|
+
friday: string;
|
|
28
|
+
saturday: string;
|
|
29
|
+
ok: string;
|
|
30
|
+
today: string;
|
|
31
|
+
yesterday: string;
|
|
32
|
+
hours: string;
|
|
33
|
+
minutes: string;
|
|
34
|
+
seconds: string;
|
|
35
|
+
/**
|
|
36
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
37
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
38
|
+
**/
|
|
39
|
+
formattedMonthPattern: string;
|
|
40
|
+
formattedDayPattern: string;
|
|
41
|
+
dateLocale: any;
|
|
42
|
+
};
|
|
43
|
+
DatePicker: {
|
|
44
|
+
sunday: string;
|
|
45
|
+
monday: string;
|
|
46
|
+
tuesday: string;
|
|
47
|
+
wednesday: string;
|
|
48
|
+
thursday: string;
|
|
49
|
+
friday: string;
|
|
50
|
+
saturday: string;
|
|
51
|
+
ok: string;
|
|
52
|
+
today: string;
|
|
53
|
+
yesterday: string;
|
|
54
|
+
hours: string;
|
|
55
|
+
minutes: string;
|
|
56
|
+
seconds: string;
|
|
57
|
+
/**
|
|
58
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
59
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
60
|
+
**/
|
|
61
|
+
formattedMonthPattern: string;
|
|
62
|
+
formattedDayPattern: string;
|
|
63
|
+
dateLocale: any;
|
|
64
|
+
};
|
|
65
|
+
DateRangePicker: {
|
|
66
|
+
last7Days: string;
|
|
67
|
+
sunday: string;
|
|
68
|
+
monday: string;
|
|
69
|
+
tuesday: string;
|
|
70
|
+
wednesday: string;
|
|
71
|
+
thursday: string;
|
|
72
|
+
friday: string;
|
|
73
|
+
saturday: string;
|
|
74
|
+
ok: string;
|
|
75
|
+
today: string;
|
|
76
|
+
yesterday: string;
|
|
77
|
+
hours: string;
|
|
78
|
+
minutes: string;
|
|
79
|
+
seconds: string;
|
|
80
|
+
/**
|
|
81
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
82
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
83
|
+
**/
|
|
84
|
+
formattedMonthPattern: string;
|
|
85
|
+
formattedDayPattern: string;
|
|
86
|
+
dateLocale: any;
|
|
87
|
+
};
|
|
88
|
+
Picker: {
|
|
89
|
+
noResultsText: string;
|
|
90
|
+
placeholder: string;
|
|
91
|
+
searchPlaceholder: string;
|
|
92
|
+
checkAll: string;
|
|
93
|
+
};
|
|
94
|
+
InputPicker: {
|
|
95
|
+
newItem: string;
|
|
96
|
+
createOption: string;
|
|
97
|
+
};
|
|
98
|
+
Uploader: {
|
|
99
|
+
inited: string;
|
|
100
|
+
progress: string;
|
|
101
|
+
error: string;
|
|
102
|
+
complete: string;
|
|
103
|
+
emptyFile: string;
|
|
104
|
+
upload: string;
|
|
105
|
+
};
|
|
106
|
+
CloseButton: {
|
|
107
|
+
closeLabel: string;
|
|
108
|
+
};
|
|
109
|
+
Breadcrumb: {
|
|
110
|
+
expandText: string;
|
|
111
|
+
};
|
|
112
|
+
Toggle: {
|
|
113
|
+
on: string;
|
|
114
|
+
off: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
export default _default;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
|
|
10
|
+
var _hu = _interopRequireDefault(require("date-fns/locale/hu"));
|
|
11
|
+
|
|
12
|
+
var Calendar = {
|
|
13
|
+
sunday: 'V',
|
|
14
|
+
monday: 'H',
|
|
15
|
+
tuesday: 'K',
|
|
16
|
+
wednesday: 'Sze',
|
|
17
|
+
thursday: 'Cs',
|
|
18
|
+
friday: 'P',
|
|
19
|
+
saturday: 'Szo',
|
|
20
|
+
ok: 'Rendben',
|
|
21
|
+
today: 'Ma',
|
|
22
|
+
yesterday: 'Tegnap',
|
|
23
|
+
hours: 'Óra',
|
|
24
|
+
minutes: 'Perc',
|
|
25
|
+
seconds: 'Másodperc',
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
29
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
30
|
+
**/
|
|
31
|
+
formattedMonthPattern: 'yyyy MMM',
|
|
32
|
+
formattedDayPattern: 'yyyy MMM dd',
|
|
33
|
+
dateLocale: _hu.default
|
|
34
|
+
};
|
|
35
|
+
var _default = {
|
|
36
|
+
common: {
|
|
37
|
+
loading: 'Betöltés...',
|
|
38
|
+
emptyMessage: 'Nem található adat'
|
|
39
|
+
},
|
|
40
|
+
Plaintext: {
|
|
41
|
+
unfilled: 'Kitöltetlen',
|
|
42
|
+
notSelected: 'Nincs kiválasztva',
|
|
43
|
+
notUploaded: 'Nincs feltöltve'
|
|
44
|
+
},
|
|
45
|
+
Pagination: {
|
|
46
|
+
more: 'Több',
|
|
47
|
+
prev: 'Előző',
|
|
48
|
+
next: 'Következő',
|
|
49
|
+
first: 'Első',
|
|
50
|
+
last: 'Utolsó',
|
|
51
|
+
limit: '{0} / oldal',
|
|
52
|
+
total: 'Összes sor: {0}',
|
|
53
|
+
skip: 'Lapozz ide: {0}'
|
|
54
|
+
},
|
|
55
|
+
Calendar: Calendar,
|
|
56
|
+
DatePicker: (0, _extends2.default)({}, Calendar),
|
|
57
|
+
DateRangePicker: (0, _extends2.default)({}, Calendar, {
|
|
58
|
+
last7Days: 'Utolsó 7 nap'
|
|
59
|
+
}),
|
|
60
|
+
Picker: {
|
|
61
|
+
noResultsText: 'Nincs találat',
|
|
62
|
+
placeholder: 'Válassza ki',
|
|
63
|
+
searchPlaceholder: 'Keresés',
|
|
64
|
+
checkAll: 'Összes'
|
|
65
|
+
},
|
|
66
|
+
InputPicker: {
|
|
67
|
+
newItem: 'Új elem',
|
|
68
|
+
createOption: 'Opció létrehozása "{0}"'
|
|
69
|
+
},
|
|
70
|
+
Uploader: {
|
|
71
|
+
inited: 'Kezdés',
|
|
72
|
+
progress: 'Feltöltés',
|
|
73
|
+
error: 'Hiba',
|
|
74
|
+
complete: 'Befejezett',
|
|
75
|
+
emptyFile: 'Üres',
|
|
76
|
+
upload: 'Feltöltés'
|
|
77
|
+
},
|
|
78
|
+
CloseButton: {
|
|
79
|
+
closeLabel: 'Bezárás'
|
|
80
|
+
},
|
|
81
|
+
Breadcrumb: {
|
|
82
|
+
expandText: 'Útvonal megjelenítése'
|
|
83
|
+
},
|
|
84
|
+
Toggle: {
|
|
85
|
+
on: 'Be',
|
|
86
|
+
off: 'Ki'
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports.default = _default;
|
package/cjs/locales/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { default as enUS } from './en_US';
|
|
|
7
7
|
export { default as esAR } from './es_AR';
|
|
8
8
|
export { default as esES } from './es_ES';
|
|
9
9
|
export { default as fiFI } from './fi_FI';
|
|
10
|
+
export { default as huHU } from './hu_HU';
|
|
10
11
|
export { default as itIT } from './it_IT';
|
|
11
12
|
export { default as kkKZ } from './kk_KZ';
|
|
12
13
|
export { default as koKR } from './ko_KR';
|
package/cjs/locales/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
|
-
exports.frFR = exports.faIR = exports.zhTW = exports.zhCN = exports.trTR = exports.svSE = exports.ruRU = exports.ptBR = exports.nlNL = exports.koKR = exports.kkKZ = exports.itIT = exports.fiFI = exports.esES = exports.esAR = exports.enUS = exports.enGB = exports.deDE = exports.daDK = exports.arEG = void 0;
|
|
6
|
+
exports.frFR = exports.faIR = exports.zhTW = exports.zhCN = exports.trTR = exports.svSE = exports.ruRU = exports.ptBR = exports.nlNL = exports.koKR = exports.kkKZ = exports.itIT = exports.huHU = exports.fiFI = exports.esES = exports.esAR = exports.enUS = exports.enGB = exports.deDE = exports.daDK = exports.arEG = void 0;
|
|
7
7
|
|
|
8
8
|
var _ar_EG = _interopRequireDefault(require("./ar_EG"));
|
|
9
9
|
|
|
@@ -37,6 +37,10 @@ var _fi_FI = _interopRequireDefault(require("./fi_FI"));
|
|
|
37
37
|
|
|
38
38
|
exports.fiFI = _fi_FI.default;
|
|
39
39
|
|
|
40
|
+
var _hu_HU = _interopRequireDefault(require("./hu_HU"));
|
|
41
|
+
|
|
42
|
+
exports.huHU = _hu_HU.default;
|
|
43
|
+
|
|
40
44
|
var _it_IT = _interopRequireDefault(require("./it_IT"));
|
|
41
45
|
|
|
42
46
|
exports.itIT = _it_IT.default;
|
package/dist/rsuite.js
CHANGED
|
@@ -4008,7 +4008,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
|
|
|
4008
4008
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
4009
4009
|
|
|
4010
4010
|
"use strict";
|
|
4011
|
-
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.default = exports.pickTriggerPropKeys = exports.omitTriggerPropKeys = 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 _pick = _interopRequireDefault(__webpack_require__(/*! lodash/pick */ \"./node_modules/lodash/pick.js\"));\n\nvar _OverlayTrigger = _interopRequireDefault(__webpack_require__(/*! ../Overlay/OverlayTrigger */ \"./src/Overlay/OverlayTrigger.tsx\"));\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/Picker/PickerToggleTrigger.tsx\",\n _this = void 0;\n\nvar omitTriggerPropKeys = ['onEntered', 'onExited', 'onEnter', 'onEntering', 'onExit', 'onExiting', 'open', 'defaultOpen', 'onHide', 'container', 'containerPadding', 'preventOverflow'];\nexports.omitTriggerPropKeys = omitTriggerPropKeys;\nvar pickTriggerPropKeys = [].concat(omitTriggerPropKeys, ['disabled', 'plaintext', 'readOnly', 'loading']);\nexports.pickTriggerPropKeys = pickTriggerPropKeys;\n\nvar PickerToggleTrigger = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n var pickerProps = props.pickerProps,\n speaker = props.speaker,\n placement = props.placement,\n _props$trigger = props.trigger,\n trigger = _props$trigger === void 0 ? 'click' : _props$trigger,\n rest = (0, _objectWithoutPropertiesLoose2.default)(props, [\"pickerProps\", \"speaker\", \"placement\", \"trigger\"]);\n var pickerTriggerProps = (0, _pick.default)(pickerProps, pickTriggerPropKeys);\n\n var _useCustom = (0, _utils.useCustom)(),\n rtl = _useCustom.rtl;\n\n return /*#__PURE__*/_react.default.createElement(_OverlayTrigger.default, (0, _extends2.default)({},
|
|
4011
|
+
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.default = exports.pickTriggerPropKeys = exports.omitTriggerPropKeys = 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 _pick = _interopRequireDefault(__webpack_require__(/*! lodash/pick */ \"./node_modules/lodash/pick.js\"));\n\nvar _OverlayTrigger = _interopRequireDefault(__webpack_require__(/*! ../Overlay/OverlayTrigger */ \"./src/Overlay/OverlayTrigger.tsx\"));\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/Picker/PickerToggleTrigger.tsx\",\n _this = void 0;\n\nvar omitTriggerPropKeys = ['onEntered', 'onExited', 'onEnter', 'onEntering', 'onExit', 'onExiting', 'open', 'defaultOpen', 'onHide', 'container', 'containerPadding', 'preventOverflow'];\nexports.omitTriggerPropKeys = omitTriggerPropKeys;\nvar pickTriggerPropKeys = [].concat(omitTriggerPropKeys, ['disabled', 'plaintext', 'readOnly', 'loading']);\nexports.pickTriggerPropKeys = pickTriggerPropKeys;\n\nvar PickerToggleTrigger = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n var pickerProps = props.pickerProps,\n speaker = props.speaker,\n placement = props.placement,\n _props$trigger = props.trigger,\n trigger = _props$trigger === void 0 ? 'click' : _props$trigger,\n rest = (0, _objectWithoutPropertiesLoose2.default)(props, [\"pickerProps\", \"speaker\", \"placement\", \"trigger\"]);\n var pickerTriggerProps = (0, _pick.default)(pickerProps, pickTriggerPropKeys);\n\n var _useCustom = (0, _utils.useCustom)(),\n rtl = _useCustom.rtl;\n\n return /*#__PURE__*/_react.default.createElement(_OverlayTrigger.default, (0, _extends2.default)({}, pickerTriggerProps, rest, {\n disabled: pickerTriggerProps.disabled || pickerTriggerProps.loading,\n ref: ref,\n trigger: trigger,\n placement: (0, _utils.placementPolyfill)(placement, rtl),\n speaker: speaker,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 7\n }\n }));\n});\n\nPickerToggleTrigger.displayName = 'PickerToggleTrigger';\nvar _default = PickerToggleTrigger;\nexports.default = _default;\n\n//# sourceURL=webpack://rsuite/./src/Picker/PickerToggleTrigger.tsx?");
|
|
4012
4012
|
|
|
4013
4013
|
/***/ }),
|
|
4014
4014
|
|
|
@@ -9654,7 +9654,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab
|
|
|
9654
9654
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
9655
9655
|
|
|
9656
9656
|
"use strict";
|
|
9657
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var dom_lib_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! dom-lib/translateDOMPositionXY */ \"./node_modules/dom-lib/esm/translateDOMPositionXY.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isFunction */ \"./node_modules/lodash/isFunction.js\");\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/flatten */ \"./node_modules/lodash/flatten.js\");\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_flatten__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/debounce */ \"./node_modules/lodash/debounce.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _Row__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Row */ \"./node_modules/rsuite-table/es/Row.js\");\n/* harmony import */ var _CellGroup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CellGroup */ \"./node_modules/rsuite-table/es/CellGroup.js\");\n/* harmony import */ var _Scrollbar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Scrollbar */ \"./node_modules/rsuite-table/es/Scrollbar.js\");\n/* harmony import */ var _MouseArea__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MouseArea */ \"./node_modules/rsuite-table/es/MouseArea.js\");\n/* harmony import */ var _Loader__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Loader */ \"./node_modules/rsuite-table/es/Loader.js\");\n/* harmony import */ var _EmptyMessage__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./EmptyMessage */ \"./node_modules/rsuite-table/es/EmptyMessage.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n\n\nvar _excluded = [\"affixHeader\", \"children\", \"classPrefix\", \"className\", \"data\", \"defaultSortType\", \"width\", \"expandedRowKeys\", \"defaultExpandAllRows\", \"defaultExpandedRowKeys\", \"style\", \"id\", \"isTree\", \"hover\", \"bordered\", \"cellBordered\", \"wordWrap\", \"loading\", \"locale\", \"showHeader\", \"sortColumn\", \"rowHeight\", \"sortType\", \"headerHeight\", \"minHeight\", \"height\", \"autoHeight\", \"fillHeight\", \"rtl\", \"translate3d\", \"rowKey\", \"virtualized\", \"rowClassName\", \"rowExpandedHeight\", \"disabledScroll\", \"affixHorizontalScrollbar\", \"loadAnimation\", \"shouldUpdateScroll\", \"renderRow\", \"renderRowExpanded\", \"renderLoading\", \"renderEmpty\", \"onSortColumn\", \"onScroll\", \"renderTreeToggle\", \"onRowClick\", \"onRowContextMenu\", \"onExpandChange\", \"onTouchStart\", \"onTouchMove\", \"onTouchEnd\"],\n _excluded2 = [\"depth\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Filter those expanded nodes.\n * @param data\n * @param expandedRowKeys\n * @param rowKey\n * @returns\n */\nvar filterTreeData = function filterTreeData(data, expandedRowKeys, rowKey) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_15__.flattenData)(data).filter(function (rowData) {\n if (rowKey) {\n var parents = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.findAllParents)(rowData, rowKey);\n\n var _expanded = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.shouldShowRowByExpanded)(expandedRowKeys, parents);\n\n rowData[_constants__WEBPACK_IMPORTED_MODULE_14__.EXPANDED_KEY] = _expanded;\n rowData[_constants__WEBPACK_IMPORTED_MODULE_14__.TREE_DEPTH] = parents.length;\n return _expanded;\n }\n });\n};\n\nvar DATA_PLACEHOLDER = [];\nvar Table = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {\n var affixHeader = props.affixHeader,\n children = props.children,\n _props$classPrefix = props.classPrefix,\n classPrefix = _props$classPrefix === void 0 ? 'rs-table' : _props$classPrefix,\n className = props.className,\n _props$data = props.data,\n dataProp = _props$data === void 0 ? DATA_PLACEHOLDER : _props$data,\n _props$defaultSortTyp = props.defaultSortType,\n defaultSortType = _props$defaultSortTyp === void 0 ? _constants__WEBPACK_IMPORTED_MODULE_14__.SORT_TYPE.DESC : _props$defaultSortTyp,\n widthProp = props.width,\n expandedRowKeysProp = props.expandedRowKeys,\n defaultExpandAllRows = props.defaultExpandAllRows,\n defaultExpandedRowKeys = props.defaultExpandedRowKeys,\n style = props.style,\n id = props.id,\n isTree = props.isTree,\n _props$hover = props.hover,\n hover = _props$hover === void 0 ? true : _props$hover,\n bordered = props.bordered,\n cellBordered = props.cellBordered,\n wordWrap = props.wordWrap,\n loading = props.loading,\n _props$locale = props.locale,\n locale = _props$locale === void 0 ? {\n emptyMessage: 'No data found',\n loading: 'Loading...'\n } : _props$locale,\n _props$showHeader = props.showHeader,\n showHeader = _props$showHeader === void 0 ? true : _props$showHeader,\n sortColumn = props.sortColumn,\n _props$rowHeight = props.rowHeight,\n rowHeight = _props$rowHeight === void 0 ? 46 : _props$rowHeight,\n sortTypeProp = props.sortType,\n _props$headerHeight = props.headerHeight,\n headerHeightProp = _props$headerHeight === void 0 ? 40 : _props$headerHeight,\n _props$minHeight = props.minHeight,\n minHeight = _props$minHeight === void 0 ? 0 : _props$minHeight,\n _props$height = props.height,\n height = _props$height === void 0 ? 200 : _props$height,\n autoHeight = props.autoHeight,\n fillHeight = props.fillHeight,\n rtlProp = props.rtl,\n _props$translate3d = props.translate3d,\n translate3d = _props$translate3d === void 0 ? true : _props$translate3d,\n rowKey = props.rowKey,\n virtualized = props.virtualized,\n rowClassName = props.rowClassName,\n _props$rowExpandedHei = props.rowExpandedHeight,\n rowExpandedHeight = _props$rowExpandedHei === void 0 ? 100 : _props$rowExpandedHei,\n disabledScroll = props.disabledScroll,\n affixHorizontalScrollbar = props.affixHorizontalScrollbar,\n loadAnimation = props.loadAnimation,\n _props$shouldUpdateSc = props.shouldUpdateScroll,\n shouldUpdateScroll = _props$shouldUpdateSc === void 0 ? true : _props$shouldUpdateSc,\n renderRowProp = props.renderRow,\n renderRowExpandedProp = props.renderRowExpanded,\n renderLoading = props.renderLoading,\n renderEmpty = props.renderEmpty,\n onSortColumn = props.onSortColumn,\n onScroll = props.onScroll,\n renderTreeToggle = props.renderTreeToggle,\n onRowClick = props.onRowClick,\n onRowContextMenu = props.onRowContextMenu,\n onExpandChange = props.onExpandChange,\n onTouchStart = props.onTouchStart,\n onTouchMove = props.onTouchMove,\n onTouchEnd = props.onTouchEnd,\n rest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__.default)(props, _excluded);\n\n var _useClassNames = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useClassNames)(classPrefix, typeof classPrefix !== 'undefined'),\n withClassPrefix = _useClassNames.withClassPrefix,\n mergeCls = _useClassNames.merge,\n prefix = _useClassNames.prefix; // Use `forceUpdate` to force the component to re-render after manipulating the DOM.\n\n\n var _useReducer = (0,react__WEBPACK_IMPORTED_MODULE_2__.useReducer)(function (x) {\n return x + 1;\n }, 0),\n forceUpdate = _useReducer[1];\n\n var _useControlled = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useControlled)(expandedRowKeysProp, defaultExpandAllRows ? (0,_utils__WEBPACK_IMPORTED_MODULE_15__.findRowKeys)(dataProp, rowKey, lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(renderRowExpandedProp)) : defaultExpandedRowKeys || []),\n expandedRowKeys = _useControlled[0],\n setExpandedRowKeys = _useControlled[1];\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(function () {\n return isTree ? filterTreeData(dataProp, expandedRowKeys, rowKey) : dataProp;\n }),\n data = _useState[0],\n setData = _useState[1];\n\n if (isTree) {\n if (!rowKey) {\n throw new Error('The `rowKey` is required when set isTree');\n } else if (data.length > 0) {\n if (!data[0].hasOwnProperty(rowKey)) {\n throw new Error('The `rowKey` is not found in data');\n }\n }\n }\n\n var _useTableRows = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useTableRows)({\n data: dataProp,\n expandedRowKeys: expandedRowKeys,\n wordWrap: wordWrap,\n prefix: prefix\n }),\n tableRowsMaxHeight = _useTableRows.tableRowsMaxHeight,\n bindTableRowsRef = _useTableRows.bindTableRowsRef;\n\n var headerHeight = showHeader ? headerHeightProp : 0;\n var rtl = rtlProp || (0,_utils__WEBPACK_IMPORTED_MODULE_15__.isRTL)();\n\n var getRowHeight = function getRowHeight(rowData) {\n if (rowData === void 0) {\n rowData = {};\n }\n\n return typeof rowHeight === 'function' ? rowHeight(rowData) : rowHeight;\n };\n\n var translateDOMPositionXY = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)((0,dom_lib_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_3__.getTranslateDOMPositionXY)({\n forceUseTransform: true,\n enable3DTransform: translate3d\n })); // Check for the existence of fixed columns in all column properties.\n\n var shouldFixedColumn = Array.from(lodash_flatten__WEBPACK_IMPORTED_MODULE_5___default()(children)).some(function (child) {\n var _child$props;\n\n return child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.fixed;\n }); // Check all column properties for the existence of rowSpan.\n\n var shouldRowSpanColumn = Array.from(lodash_flatten__WEBPACK_IMPORTED_MODULE_5___default()(children)).some(function (child) {\n var _child$props2;\n\n return child === null || child === void 0 ? void 0 : (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.rowSpan;\n });\n var visibleRows = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)([]);\n var mouseAreaRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var tableRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var tableHeaderRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var affixHeaderWrapperRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var headerWrapperRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var tableBodyRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var wheelWrapperRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var scrollbarXRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var scrollbarYRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n\n var handleTableResizeChange = function handleTableResizeChange(_prevSize, event) {\n forceUpdate();\n /**\n * Reset the position of the scroll bar after the table size changes.\n */\n\n if (typeof shouldUpdateScroll === 'function') {\n onScrollTo(shouldUpdateScroll(event));\n } else if (shouldUpdateScroll) {\n var vertical = event === 'bodyHeightChanged';\n vertical ? onScrollTop(0) : onScrollLeft(0);\n }\n };\n\n var _useTableDimension = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useTableDimension)({\n data: dataProp,\n width: widthProp,\n rowHeight: rowHeight,\n tableRef: tableRef,\n headerWrapperRef: headerWrapperRef,\n prefix: prefix,\n affixHeader: affixHeader,\n affixHorizontalScrollbar: affixHorizontalScrollbar,\n headerHeight: headerHeight,\n height: height,\n minHeight: minHeight,\n autoHeight: autoHeight,\n fillHeight: fillHeight,\n children: children,\n expandedRowKeys: expandedRowKeys,\n showHeader: showHeader,\n onTableScroll: lodash_debounce__WEBPACK_IMPORTED_MODULE_6___default()(function (coords) {\n return onScrollTo(coords);\n }, 100),\n onTableResizeChange: handleTableResizeChange\n }),\n contentHeight = _useTableDimension.contentHeight,\n contentWidth = _useTableDimension.contentWidth,\n minScrollY = _useTableDimension.minScrollY,\n minScrollX = _useTableDimension.minScrollX,\n scrollY = _useTableDimension.scrollY,\n scrollX = _useTableDimension.scrollX,\n tableWidth = _useTableDimension.tableWidth,\n tableOffset = _useTableDimension.tableOffset,\n headerOffset = _useTableDimension.headerOffset,\n setScrollY = _useTableDimension.setScrollY,\n setScrollX = _useTableDimension.setScrollX,\n getTableHeight = _useTableDimension.getTableHeight;\n\n (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useAffix)({\n getTableHeight: getTableHeight,\n contentHeight: contentHeight,\n affixHorizontalScrollbar: affixHorizontalScrollbar,\n affixHeader: affixHeader,\n tableOffset: tableOffset,\n headerOffset: headerOffset,\n headerHeight: headerHeight,\n scrollbarXRef: scrollbarXRef,\n affixHeaderWrapperRef: affixHeaderWrapperRef\n });\n\n var _usePosition = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.usePosition)({\n data: dataProp,\n height: height,\n tableWidth: tableWidth,\n tableRef: tableRef,\n prefix: prefix,\n translateDOMPositionXY: translateDOMPositionXY,\n wheelWrapperRef: wheelWrapperRef,\n headerWrapperRef: headerWrapperRef,\n affixHeaderWrapperRef: affixHeaderWrapperRef,\n tableHeaderRef: tableHeaderRef,\n scrollX: scrollX,\n scrollY: scrollY,\n contentWidth: contentWidth,\n shouldFixedColumn: shouldFixedColumn\n }),\n forceUpdatePosition = _usePosition.forceUpdatePosition;\n\n var _useScrollListener = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useScrollListener)({\n rtl: rtl,\n data: dataProp,\n height: height,\n virtualized: virtualized,\n getTableHeight: getTableHeight,\n contentHeight: contentHeight,\n headerHeight: headerHeight,\n autoHeight: autoHeight,\n tableBodyRef: tableBodyRef,\n scrollbarXRef: scrollbarXRef,\n scrollbarYRef: scrollbarYRef,\n disabledScroll: disabledScroll,\n loading: loading,\n tableRef: tableRef,\n contentWidth: contentWidth,\n tableWidth: tableWidth,\n scrollY: scrollY,\n minScrollY: minScrollY,\n minScrollX: minScrollX,\n scrollX: scrollX,\n setScrollX: setScrollX,\n setScrollY: setScrollY,\n forceUpdatePosition: forceUpdatePosition,\n onScroll: onScroll,\n onTouchStart: onTouchStart,\n onTouchMove: onTouchMove,\n onTouchEnd: onTouchEnd\n }),\n isScrolling = _useScrollListener.isScrolling,\n onScrollHorizontal = _useScrollListener.onScrollHorizontal,\n onScrollVertical = _useScrollListener.onScrollVertical,\n onScrollBody = _useScrollListener.onScrollBody,\n onScrollTop = _useScrollListener.onScrollTop,\n onScrollLeft = _useScrollListener.onScrollLeft,\n onScrollTo = _useScrollListener.onScrollTo;\n\n var _useCellDescriptor = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useCellDescriptor)({\n children: children,\n rtl: rtl,\n mouseAreaRef: mouseAreaRef,\n tableRef: tableRef,\n minScrollX: minScrollX,\n scrollX: scrollX,\n tableWidth: tableWidth,\n headerHeight: headerHeight,\n showHeader: showHeader,\n sortType: sortTypeProp,\n defaultSortType: defaultSortType,\n sortColumn: sortColumn,\n prefix: prefix,\n onSortColumn: onSortColumn,\n // Force table update after column width change, so scrollbar re-renders.\n onHeaderCellResize: forceUpdate,\n rowHeight: rowHeight\n }),\n headerCells = _useCellDescriptor.headerCells,\n bodyCells = _useCellDescriptor.bodyCells,\n allColumnsWidth = _useCellDescriptor.allColumnsWidth,\n hasCustomTreeCol = _useCellDescriptor.hasCustomTreeCol;\n\n var colCounts = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)((headerCells === null || headerCells === void 0 ? void 0 : headerCells.length) || 0);\n (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useUpdateEffect)(function () {\n setData(isTree ? filterTreeData(dataProp, expandedRowKeys, rowKey) : dataProp);\n }, [dataProp, expandedRowKeys, rowKey, isTree]);\n (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useUpdateEffect)(function () {\n if ((headerCells === null || headerCells === void 0 ? void 0 : headerCells.length) !== colCounts.current) {\n onScrollLeft(0);\n colCounts.current = (headerCells === null || headerCells === void 0 ? void 0 : headerCells.length) || 0;\n }\n }, [children]);\n (0,react__WEBPACK_IMPORTED_MODULE_2__.useImperativeHandle)(ref, function () {\n return {\n get root() {\n return tableRef.current;\n },\n\n get body() {\n return wheelWrapperRef.current;\n },\n\n scrollTop: onScrollTop,\n scrollLeft: onScrollLeft\n };\n });\n var rowWidth = allColumnsWidth > tableWidth.current ? allColumnsWidth : tableWidth.current; // Whether to show vertical scroll bar\n\n var hasVerticalScrollbar = !autoHeight && contentHeight.current > getTableHeight() - headerHeight; // Whether to show the horizontal scroll bar\n\n var hasHorizontalScrollbar = contentWidth.current > tableWidth.current;\n var classes = mergeCls(className, withClassPrefix({\n bordered: bordered,\n hover: hover && !shouldRowSpanColumn,\n loading: loading,\n treetable: isTree,\n 'word-wrap': wordWrap,\n 'cell-bordered': cellBordered\n }));\n\n var styles = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n width: widthProp || 'auto',\n height: getTableHeight()\n }, style);\n\n var renderRowExpanded = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (rowData) {\n var styles = {\n height: rowExpandedHeight\n };\n\n if (typeof renderRowExpandedProp === 'function') {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n className: prefix('row-expanded'),\n style: styles\n }, renderRowExpandedProp(rowData));\n }\n\n return null;\n }, [prefix, renderRowExpandedProp, rowExpandedHeight]);\n\n var renderRow = function renderRow(props, cells, shouldRenderExpandedRow, rowData) {\n var depth = props.depth,\n restRowProps = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__.default)(props, _excluded2);\n\n if (typeof rowClassName === 'function') {\n restRowProps.className = rowClassName(rowData);\n } else {\n restRowProps.className = rowClassName;\n }\n\n var rowStyles = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, props === null || props === void 0 ? void 0 : props.style);\n\n var rowRight = 0;\n\n if (rtl && contentWidth.current > tableWidth.current) {\n rowRight = tableWidth.current - contentWidth.current;\n rowStyles.right = rowRight;\n }\n\n var rowNode = null; // IF there are fixed columns, add a fixed group\n\n if (shouldFixedColumn && contentWidth.current > tableWidth.current) {\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 width = _cell$props.width;\n var isFixedStart = fixed === 'left' || fixed === true;\n var isFixedEnd = fixed === 'right';\n\n if (rtl) {\n isFixedStart = fixed === 'right';\n isFixedEnd = fixed === 'left' || fixed === true;\n }\n\n if (isFixedStart) {\n fixedLeftCells.push(cell);\n fixedLeftCellGroupWidth += width;\n } else if (isFixedEnd) {\n fixedRightCells.push(cell);\n fixedRightCellGroupWidth += width;\n } else {\n scrollCells.push(cell);\n }\n }\n\n if (hasVerticalScrollbar && fixedRightCellGroupWidth) {\n fixedRightCellGroupWidth += _constants__WEBPACK_IMPORTED_MODULE_14__.SCROLLBAR_WIDTH;\n }\n\n rowNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, fixedLeftCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_CellGroup__WEBPACK_IMPORTED_MODULE_8__.default, {\n fixed: \"left\",\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedLeftCellGroupWidth,\n style: rtl ? {\n right: tableWidth.current - fixedLeftCellGroupWidth - rowRight\n } : undefined\n }, (0,_utils__WEBPACK_IMPORTED_MODULE_15__.mergeCells)((0,_utils__WEBPACK_IMPORTED_MODULE_15__.resetLeftForCells)(fixedLeftCells))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_CellGroup__WEBPACK_IMPORTED_MODULE_8__.default, null, (0,_utils__WEBPACK_IMPORTED_MODULE_15__.mergeCells)(scrollCells)), fixedRightCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_CellGroup__WEBPACK_IMPORTED_MODULE_8__.default, {\n fixed: \"right\",\n style: rtl ? {\n right: 0 - rowRight\n } : {\n left: tableWidth.current - fixedRightCellGroupWidth\n },\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedRightCellGroupWidth\n }, (0,_utils__WEBPACK_IMPORTED_MODULE_15__.mergeCells)((0,_utils__WEBPACK_IMPORTED_MODULE_15__.resetLeftForCells)(fixedRightCells, hasVerticalScrollbar ? _constants__WEBPACK_IMPORTED_MODULE_14__.SCROLLBAR_WIDTH : 0))) : null, shouldRenderExpandedRow && renderRowExpanded(rowData));\n } else {\n rowNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_CellGroup__WEBPACK_IMPORTED_MODULE_8__.default, null, (0,_utils__WEBPACK_IMPORTED_MODULE_15__.mergeCells)(cells)), shouldRenderExpandedRow && renderRowExpanded(rowData));\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Row__WEBPACK_IMPORTED_MODULE_7__.default, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, restRowProps, {\n \"data-depth\": depth,\n style: rowStyles\n }), renderRowProp ? renderRowProp(rowNode, rowData) : rowNode);\n };\n\n var renderTableHeader = function renderTableHeader(headerCells, rowWidth) {\n var top = typeof affixHeader === 'number' ? affixHeader : 0;\n var rowProps = {\n 'aria-rowindex': 1,\n rowRef: tableHeaderRef,\n width: rowWidth,\n height: getRowHeight(),\n headerHeight: headerHeight,\n isHeaderRow: true,\n top: 0\n };\n var fixedStyle = {\n position: 'fixed',\n overflow: 'hidden',\n height: headerHeight,\n width: tableWidth.current,\n top: top\n }; // Affix header\n\n var header = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n className: prefix('affix-header'),\n style: fixedStyle,\n ref: affixHeaderWrapperRef\n }, renderRow(rowProps, headerCells));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, (affixHeader === 0 || affixHeader) && header, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n role: \"rowgroup\",\n className: prefix('header-row-wrapper'),\n ref: headerWrapperRef\n }, renderRow(rowProps, headerCells)));\n };\n\n var shouldRenderExpandedRow = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (rowData) {\n if (lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(renderRowExpandedProp) && !isTree && rowKey && expandedRowKeys.some(function (key) {\n return key === rowData[rowKey];\n })) {\n return true;\n }\n\n return false;\n }, [expandedRowKeys, isTree, renderRowExpandedProp, rowKey]);\n var bindRowClick = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (rowData) {\n return function (event) {\n onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(rowData, event);\n };\n }, [onRowClick]);\n var bindRowContextMenu = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (rowData) {\n return function (event) {\n onRowContextMenu === null || onRowContextMenu === void 0 ? void 0 : onRowContextMenu(rowData, event);\n };\n }, [onRowContextMenu]);\n var handleTreeToggle = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (treeRowKey, _rowIndex, rowData) {\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 === treeRowKey) {\n open = true;\n } else {\n nextExpandedRowKeys.push(key);\n }\n }\n\n if (!open) {\n nextExpandedRowKeys.push(treeRowKey);\n }\n\n setExpandedRowKeys(nextExpandedRowKeys);\n onExpandChange === null || onExpandChange === void 0 ? void 0 : onExpandChange(!open, rowData);\n }, [expandedRowKeys, onExpandChange, setExpandedRowKeys]);\n /**\n * Records the status of merged rows.\n * { cellKey: [count,index]}\n */\n\n var rowSpanState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)({});\n\n var renderRowData = function renderRowData(bodyCells, rowData, props, shouldRenderExpandedRow) {\n var hasChildren = isTree && rowData.children && Array.isArray(rowData.children);\n var nextRowKey = rowKey && typeof rowData[rowKey] !== 'undefined' ? rowData[rowKey] : props.key;\n\n var rowProps = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, props, {\n key: nextRowKey,\n 'aria-rowindex': props.key + 2,\n rowRef: bindTableRowsRef(props.key, rowData),\n onClick: bindRowClick(rowData),\n onContextMenu: bindRowContextMenu(rowData)\n });\n\n var expanded = expandedRowKeys.some(function (key) {\n return rowKey && key === rowData[rowKey];\n });\n var cells = [];\n\n for (var i = 0; i < bodyCells.length; i++) {\n var _cell$props2, _cell$props2$rowSpan, _rowSpanState$current, _cell$props3, _rowSpanState$current2;\n\n var cell = bodyCells[i];\n var rowSpan = (_cell$props2 = cell.props) === null || _cell$props2 === void 0 ? void 0 : (_cell$props2$rowSpan = _cell$props2.rowSpan) === null || _cell$props2$rowSpan === void 0 ? void 0 : _cell$props2$rowSpan.call(_cell$props2, rowData);\n\n var _rowHeight = rowSpan ? rowSpan * (props.height || 46) : props.height;\n\n var _cellKey = cell.props.dataKey || i; // Record the cell state of the merged row\n\n\n if (((_rowSpanState$current = rowSpanState.current[_cellKey]) === null || _rowSpanState$current === void 0 ? void 0 : _rowSpanState$current[1]) > 0) {\n rowSpanState.current[_cellKey][1] -= 1; // Restart counting when merged to the last cell.\n\n if (rowSpanState.current[_cellKey][1] === 0) {\n rowSpanState.current[_cellKey][0] = 0;\n }\n }\n\n if (rowSpan) {\n // The state of the initial merged cell\n rowSpanState.current[_cellKey] = [rowSpan, rowSpan];\n rowProps.rowSpan = rowSpan;\n rowProps.style = {\n overflow: 'inherit'\n };\n } // Cells marked as deleted when checking for merged cell.\n\n\n var removedCell = (_cell$props3 = cell.props) !== null && _cell$props3 !== void 0 && _cell$props3.rowSpan && !rowSpan && ((_rowSpanState$current2 = rowSpanState.current[_cellKey]) === null || _rowSpanState$current2 === void 0 ? void 0 : _rowSpanState$current2[0]) !== 0 ? true : false;\n cells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(cell, {\n hasChildren: hasChildren,\n rowData: rowData,\n wordWrap: wordWrap,\n height: _rowHeight,\n rowIndex: props.key,\n depth: props.depth,\n renderTreeToggle: renderTreeToggle,\n onTreeToggle: handleTreeToggle,\n rowKey: nextRowKey,\n expanded: expanded,\n rowSpan: rowSpan,\n removed: removedCell\n }));\n }\n\n return renderRow(rowProps, cells, shouldRenderExpandedRow, rowData);\n };\n\n var renderScrollbar = function renderScrollbar() {\n var height = getTableHeight();\n\n if (disabledScroll) {\n return null;\n }\n\n var scrollbars = [];\n\n if (hasHorizontalScrollbar) {\n scrollbars.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Scrollbar__WEBPACK_IMPORTED_MODULE_9__.default, {\n key: \"scrollbar\",\n tableId: id,\n style: {\n width: tableWidth.current\n },\n length: tableWidth.current,\n onScroll: onScrollHorizontal,\n scrollLength: contentWidth.current,\n ref: scrollbarXRef\n }));\n }\n\n if (hasVerticalScrollbar) {\n scrollbars.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Scrollbar__WEBPACK_IMPORTED_MODULE_9__.default, {\n vertical: true,\n key: \"vertical-scrollbar\",\n tableId: id,\n length: height - headerHeight,\n onScroll: onScrollVertical,\n scrollLength: contentHeight.current,\n ref: scrollbarYRef\n }));\n }\n\n return scrollbars;\n };\n\n var renderTableBody = function renderTableBody(bodyCells, rowWidth) {\n var _visibleRows$current;\n\n var height = 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 visibleRows.current = [];\n\n if (data) {\n var top = 0; // Row position\n\n var minTop = Math.abs(scrollY.current);\n var maxTop = minTop + height + rowExpandedHeight;\n var isCustomRowHeight = typeof rowHeight === 'function';\n var isUncertainHeight = !!renderRowExpandedProp || isCustomRowHeight || wordWrap; // If virtualized is enabled and the row height in the Table is variable,\n // you need to loop through the data to get the height of each row.\n\n if (isUncertainHeight && virtualized || !virtualized) {\n // Avoid white screens on the top and bottom of the table when touching and scrolling on the mobile terminal.\n // So supplement the display data row.\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_15__.isSupportTouchEvent)()) {\n var coveredHeight = height * 3;\n minTop = Math.max(minTop - coveredHeight, 0);\n maxTop = maxTop + coveredHeight;\n }\n\n for (var index = 0; index < data.length; index++) {\n var _rowData = data[index];\n var maxHeight = tableRowsMaxHeight[index];\n var shouldRender = shouldRenderExpandedRow(_rowData);\n var nextRowHeight = 0;\n\n if (typeof rowHeight === 'function') {\n nextRowHeight = rowHeight(_rowData);\n } else {\n nextRowHeight = maxHeight ? Math.max(maxHeight + _constants__WEBPACK_IMPORTED_MODULE_14__.CELL_PADDING_HEIGHT, rowHeight) : rowHeight;\n\n if (shouldRender) {\n nextRowHeight += rowExpandedHeight;\n }\n }\n\n contentHeight += nextRowHeight;\n var rowProps = {\n key: index,\n top: top,\n width: rowWidth,\n depth: _rowData[_constants__WEBPACK_IMPORTED_MODULE_14__.TREE_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 visibleRows.current.push(renderRowData(bodyCells, _rowData, rowProps, shouldRender));\n }\n } else {\n /** virtualized */\n // If the row height of the Table is fixed, it is directly calculated by the row height and the number of rows,\n // thereby reducing the performance cost of traversing all data.\n var _nextRowHeight = getRowHeight();\n\n var startIndex = Math.max(Math.floor(minTop / _nextRowHeight), 0);\n var endIndex = Math.min(startIndex + Math.ceil(bodyHeight / _nextRowHeight) + 5, data.length); // Avoid white screens on the top and bottom of the table when touching and scrolling on the mobile terminal.\n // So supplement the display data row.\n\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_15__.isSupportTouchEvent)()) {\n var coveredCount = Math.floor(height / _nextRowHeight * 3);\n startIndex = Math.max(startIndex - coveredCount, 0);\n endIndex = Math.min(endIndex + coveredCount, data.length);\n }\n\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 _rowData2 = data[_index];\n var _rowProps = {\n key: _index,\n depth: _rowData2[_constants__WEBPACK_IMPORTED_MODULE_14__.TREE_DEPTH],\n top: _index * _nextRowHeight,\n width: rowWidth,\n height: _nextRowHeight\n };\n visibleRows.current.push(renderRowData(bodyCells, _rowData2, _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_2___default().createElement(\"div\", {\n ref: tableBodyRef,\n role: \"rowgroup\",\n className: prefix('body-row-wrapper'),\n style: bodyStyles,\n onScroll: onScrollBody\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n style: wheelStyles,\n className: prefix('body-wheel-area'),\n ref: wheelWrapperRef\n }, topHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Row__WEBPACK_IMPORTED_MODULE_7__.default, {\n style: topRowStyles,\n className: \"virtualized\"\n }) : null, visibleRows.current, bottomHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Row__WEBPACK_IMPORTED_MODULE_7__.default, {\n style: bottomRowStyles,\n className: \"virtualized\"\n }) : null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_EmptyMessage__WEBPACK_IMPORTED_MODULE_12__.default, {\n locale: locale,\n renderEmpty: renderEmpty,\n addPrefix: prefix,\n loading: !!((_visibleRows$current = visibleRows.current) !== null && _visibleRows$current !== void 0 && _visibleRows$current.length) || loading\n }), renderScrollbar(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Loader__WEBPACK_IMPORTED_MODULE_11__.default, {\n locale: locale,\n loadAnimation: loadAnimation,\n loading: loading,\n addPrefix: prefix,\n renderLoading: renderLoading\n }));\n };\n\n var contextValue = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(function () {\n return {\n classPrefix: classPrefix,\n translateDOMPositionXY: translateDOMPositionXY.current,\n rtl: rtl,\n isTree: isTree,\n hasCustomTreeCol: hasCustomTreeCol\n };\n }, [classPrefix, hasCustomTreeCol, isTree, rtl]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_TableContext__WEBPACK_IMPORTED_MODULE_13__.default.Provider, {\n value: contextValue\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.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\": colCounts.current,\n \"aria-busy\": loading\n }, rest, {\n className: classes,\n style: styles,\n ref: tableRef\n }), showHeader && renderTableHeader(headerCells, rowWidth), children && renderTableBody(bodyCells, rowWidth), showHeader && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_MouseArea__WEBPACK_IMPORTED_MODULE_10__.default, {\n ref: mouseAreaRef,\n addPrefix: prefix,\n headerHeight: headerHeight,\n height: getTableHeight()\n })));\n});\nTable.displayName = 'Table';\nTable.propTypes = {\n autoHeight: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n fillHeight: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n affixHeader: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number)]),\n affixHorizontalScrollbar: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number)]),\n bordered: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string),\n classPrefix: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().any),\n cellBordered: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n data: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().array),\n defaultExpandAllRows: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n defaultExpandedRowKeys: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().array),\n defaultSortType: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().any),\n disabledScroll: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n expandedRowKeys: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().array),\n hover: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n height: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number),\n headerHeight: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number),\n locale: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().object),\n loading: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n loadAnimation: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n minHeight: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number),\n rowKey: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number)]),\n rowHeight: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func)]),\n renderTreeToggle: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n renderRowExpanded: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n renderRow: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n rowExpandedHeight: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number),\n renderEmpty: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n renderLoading: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n rowClassName: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string)]),\n rtl: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n style: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().object),\n sortColumn: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string),\n sortType: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().any),\n showHeader: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n shouldUpdateScroll: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool)]),\n translate3d: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n wordWrap: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().any),\n width: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number),\n virtualized: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n isTree: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n onRowClick: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onRowContextMenu: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onScroll: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onSortColumn: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onExpandChange: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onTouchStart: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onTouchMove: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onTouchEnd: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func)\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Table);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/Table.js?");
|
|
9657
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var dom_lib_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! dom-lib/translateDOMPositionXY */ \"./node_modules/dom-lib/esm/translateDOMPositionXY.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isFunction */ \"./node_modules/lodash/isFunction.js\");\n/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/flatten */ \"./node_modules/lodash/flatten.js\");\n/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_flatten__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/debounce */ \"./node_modules/lodash/debounce.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _Row__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Row */ \"./node_modules/rsuite-table/es/Row.js\");\n/* harmony import */ var _CellGroup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CellGroup */ \"./node_modules/rsuite-table/es/CellGroup.js\");\n/* harmony import */ var _Scrollbar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Scrollbar */ \"./node_modules/rsuite-table/es/Scrollbar.js\");\n/* harmony import */ var _MouseArea__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MouseArea */ \"./node_modules/rsuite-table/es/MouseArea.js\");\n/* harmony import */ var _Loader__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Loader */ \"./node_modules/rsuite-table/es/Loader.js\");\n/* harmony import */ var _EmptyMessage__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./EmptyMessage */ \"./node_modules/rsuite-table/es/EmptyMessage.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/rsuite-table/es/TableContext.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./utils */ \"./node_modules/rsuite-table/es/utils/index.js\");\n\n\nvar _excluded = [\"affixHeader\", \"children\", \"classPrefix\", \"className\", \"data\", \"defaultSortType\", \"width\", \"expandedRowKeys\", \"defaultExpandAllRows\", \"defaultExpandedRowKeys\", \"style\", \"id\", \"isTree\", \"hover\", \"bordered\", \"cellBordered\", \"wordWrap\", \"loading\", \"locale\", \"showHeader\", \"sortColumn\", \"rowHeight\", \"sortType\", \"headerHeight\", \"minHeight\", \"height\", \"autoHeight\", \"fillHeight\", \"rtl\", \"translate3d\", \"rowKey\", \"virtualized\", \"rowClassName\", \"rowExpandedHeight\", \"disabledScroll\", \"affixHorizontalScrollbar\", \"loadAnimation\", \"shouldUpdateScroll\", \"renderRow\", \"renderRowExpanded\", \"renderLoading\", \"renderEmpty\", \"onSortColumn\", \"onScroll\", \"renderTreeToggle\", \"onRowClick\", \"onRowContextMenu\", \"onExpandChange\", \"onTouchStart\", \"onTouchMove\", \"onTouchEnd\"],\n _excluded2 = [\"depth\", \"rowIndex\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Filter those expanded nodes.\n * @param data\n * @param expandedRowKeys\n * @param rowKey\n * @returns\n */\nvar filterTreeData = function filterTreeData(data, expandedRowKeys, rowKey) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_15__.flattenData)(data).filter(function (rowData) {\n if (rowKey) {\n var parents = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.findAllParents)(rowData, rowKey);\n\n var _expanded = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.shouldShowRowByExpanded)(expandedRowKeys, parents);\n\n rowData[_constants__WEBPACK_IMPORTED_MODULE_14__.EXPANDED_KEY] = _expanded;\n rowData[_constants__WEBPACK_IMPORTED_MODULE_14__.TREE_DEPTH] = parents.length;\n return _expanded;\n }\n });\n};\n\nvar DATA_PLACEHOLDER = [];\nvar Table = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {\n var affixHeader = props.affixHeader,\n children = props.children,\n _props$classPrefix = props.classPrefix,\n classPrefix = _props$classPrefix === void 0 ? 'rs-table' : _props$classPrefix,\n className = props.className,\n _props$data = props.data,\n dataProp = _props$data === void 0 ? DATA_PLACEHOLDER : _props$data,\n _props$defaultSortTyp = props.defaultSortType,\n defaultSortType = _props$defaultSortTyp === void 0 ? _constants__WEBPACK_IMPORTED_MODULE_14__.SORT_TYPE.DESC : _props$defaultSortTyp,\n widthProp = props.width,\n expandedRowKeysProp = props.expandedRowKeys,\n defaultExpandAllRows = props.defaultExpandAllRows,\n defaultExpandedRowKeys = props.defaultExpandedRowKeys,\n style = props.style,\n id = props.id,\n isTree = props.isTree,\n _props$hover = props.hover,\n hover = _props$hover === void 0 ? true : _props$hover,\n bordered = props.bordered,\n cellBordered = props.cellBordered,\n wordWrap = props.wordWrap,\n loading = props.loading,\n _props$locale = props.locale,\n locale = _props$locale === void 0 ? {\n emptyMessage: 'No data found',\n loading: 'Loading...'\n } : _props$locale,\n _props$showHeader = props.showHeader,\n showHeader = _props$showHeader === void 0 ? true : _props$showHeader,\n sortColumn = props.sortColumn,\n _props$rowHeight = props.rowHeight,\n rowHeight = _props$rowHeight === void 0 ? 46 : _props$rowHeight,\n sortTypeProp = props.sortType,\n _props$headerHeight = props.headerHeight,\n headerHeightProp = _props$headerHeight === void 0 ? 40 : _props$headerHeight,\n _props$minHeight = props.minHeight,\n minHeight = _props$minHeight === void 0 ? 0 : _props$minHeight,\n _props$height = props.height,\n height = _props$height === void 0 ? 200 : _props$height,\n autoHeight = props.autoHeight,\n fillHeight = props.fillHeight,\n rtlProp = props.rtl,\n _props$translate3d = props.translate3d,\n translate3d = _props$translate3d === void 0 ? true : _props$translate3d,\n rowKey = props.rowKey,\n virtualized = props.virtualized,\n rowClassName = props.rowClassName,\n _props$rowExpandedHei = props.rowExpandedHeight,\n rowExpandedHeight = _props$rowExpandedHei === void 0 ? 100 : _props$rowExpandedHei,\n disabledScroll = props.disabledScroll,\n affixHorizontalScrollbar = props.affixHorizontalScrollbar,\n loadAnimation = props.loadAnimation,\n _props$shouldUpdateSc = props.shouldUpdateScroll,\n shouldUpdateScroll = _props$shouldUpdateSc === void 0 ? true : _props$shouldUpdateSc,\n renderRowProp = props.renderRow,\n renderRowExpandedProp = props.renderRowExpanded,\n renderLoading = props.renderLoading,\n renderEmpty = props.renderEmpty,\n onSortColumn = props.onSortColumn,\n onScroll = props.onScroll,\n renderTreeToggle = props.renderTreeToggle,\n onRowClick = props.onRowClick,\n onRowContextMenu = props.onRowContextMenu,\n onExpandChange = props.onExpandChange,\n onTouchStart = props.onTouchStart,\n onTouchMove = props.onTouchMove,\n onTouchEnd = props.onTouchEnd,\n rest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__.default)(props, _excluded);\n\n var _useClassNames = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useClassNames)(classPrefix, typeof classPrefix !== 'undefined'),\n withClassPrefix = _useClassNames.withClassPrefix,\n mergeCls = _useClassNames.merge,\n prefix = _useClassNames.prefix; // Use `forceUpdate` to force the component to re-render after manipulating the DOM.\n\n\n var _useReducer = (0,react__WEBPACK_IMPORTED_MODULE_2__.useReducer)(function (x) {\n return x + 1;\n }, 0),\n forceUpdate = _useReducer[1];\n\n var _useControlled = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useControlled)(expandedRowKeysProp, defaultExpandAllRows ? (0,_utils__WEBPACK_IMPORTED_MODULE_15__.findRowKeys)(dataProp, rowKey, lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(renderRowExpandedProp)) : defaultExpandedRowKeys || []),\n expandedRowKeys = _useControlled[0],\n setExpandedRowKeys = _useControlled[1];\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(function () {\n return isTree ? filterTreeData(dataProp, expandedRowKeys, rowKey) : dataProp;\n }),\n data = _useState[0],\n setData = _useState[1];\n\n if (isTree) {\n if (!rowKey) {\n throw new Error('The `rowKey` is required when set isTree');\n } else if (data.length > 0) {\n if (!data[0].hasOwnProperty(rowKey)) {\n throw new Error('The `rowKey` is not found in data');\n }\n }\n }\n\n var _useTableRows = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useTableRows)({\n data: dataProp,\n expandedRowKeys: expandedRowKeys,\n wordWrap: wordWrap,\n prefix: prefix\n }),\n tableRowsMaxHeight = _useTableRows.tableRowsMaxHeight,\n bindTableRowsRef = _useTableRows.bindTableRowsRef;\n\n var headerHeight = showHeader ? headerHeightProp : 0;\n var rtl = rtlProp || (0,_utils__WEBPACK_IMPORTED_MODULE_15__.isRTL)();\n\n var getRowHeight = function getRowHeight(rowData) {\n if (rowData === void 0) {\n rowData = {};\n }\n\n return typeof rowHeight === 'function' ? rowHeight(rowData) : rowHeight;\n };\n\n var translateDOMPositionXY = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)((0,dom_lib_translateDOMPositionXY__WEBPACK_IMPORTED_MODULE_3__.getTranslateDOMPositionXY)({\n forceUseTransform: true,\n enable3DTransform: translate3d\n })); // Check for the existence of fixed columns in all column properties.\n\n var shouldFixedColumn = Array.from(lodash_flatten__WEBPACK_IMPORTED_MODULE_5___default()(children)).some(function (child) {\n var _child$props;\n\n return child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.fixed;\n }); // Check all column properties for the existence of rowSpan.\n\n var shouldRowSpanColumn = Array.from(lodash_flatten__WEBPACK_IMPORTED_MODULE_5___default()(children)).some(function (child) {\n var _child$props2;\n\n return child === null || child === void 0 ? void 0 : (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.rowSpan;\n });\n var visibleRows = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)([]);\n var mouseAreaRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var tableRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var tableHeaderRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var affixHeaderWrapperRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var headerWrapperRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var tableBodyRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var wheelWrapperRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var scrollbarXRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n var scrollbarYRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n\n var handleTableResizeChange = function handleTableResizeChange(_prevSize, event) {\n forceUpdate();\n /**\n * Reset the position of the scroll bar after the table size changes.\n */\n\n if (typeof shouldUpdateScroll === 'function') {\n onScrollTo(shouldUpdateScroll(event));\n } else if (shouldUpdateScroll) {\n var vertical = event === 'bodyHeightChanged';\n vertical ? onScrollTop(0) : onScrollLeft(0);\n }\n };\n\n var _useTableDimension = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useTableDimension)({\n data: dataProp,\n width: widthProp,\n rowHeight: rowHeight,\n tableRef: tableRef,\n headerWrapperRef: headerWrapperRef,\n prefix: prefix,\n affixHeader: affixHeader,\n affixHorizontalScrollbar: affixHorizontalScrollbar,\n headerHeight: headerHeight,\n height: height,\n minHeight: minHeight,\n autoHeight: autoHeight,\n fillHeight: fillHeight,\n children: children,\n expandedRowKeys: expandedRowKeys,\n showHeader: showHeader,\n onTableScroll: lodash_debounce__WEBPACK_IMPORTED_MODULE_6___default()(function (coords) {\n return onScrollTo(coords);\n }, 100),\n onTableResizeChange: handleTableResizeChange\n }),\n contentHeight = _useTableDimension.contentHeight,\n contentWidth = _useTableDimension.contentWidth,\n minScrollY = _useTableDimension.minScrollY,\n minScrollX = _useTableDimension.minScrollX,\n scrollY = _useTableDimension.scrollY,\n scrollX = _useTableDimension.scrollX,\n tableWidth = _useTableDimension.tableWidth,\n tableOffset = _useTableDimension.tableOffset,\n headerOffset = _useTableDimension.headerOffset,\n setScrollY = _useTableDimension.setScrollY,\n setScrollX = _useTableDimension.setScrollX,\n getTableHeight = _useTableDimension.getTableHeight;\n\n (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useAffix)({\n getTableHeight: getTableHeight,\n contentHeight: contentHeight,\n affixHorizontalScrollbar: affixHorizontalScrollbar,\n affixHeader: affixHeader,\n tableOffset: tableOffset,\n headerOffset: headerOffset,\n headerHeight: headerHeight,\n scrollbarXRef: scrollbarXRef,\n affixHeaderWrapperRef: affixHeaderWrapperRef\n });\n\n var _usePosition = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.usePosition)({\n data: dataProp,\n height: height,\n tableWidth: tableWidth,\n tableRef: tableRef,\n prefix: prefix,\n translateDOMPositionXY: translateDOMPositionXY,\n wheelWrapperRef: wheelWrapperRef,\n headerWrapperRef: headerWrapperRef,\n affixHeaderWrapperRef: affixHeaderWrapperRef,\n tableHeaderRef: tableHeaderRef,\n scrollX: scrollX,\n scrollY: scrollY,\n contentWidth: contentWidth,\n shouldFixedColumn: shouldFixedColumn\n }),\n forceUpdatePosition = _usePosition.forceUpdatePosition;\n\n var _useScrollListener = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useScrollListener)({\n rtl: rtl,\n data: dataProp,\n height: height,\n virtualized: virtualized,\n getTableHeight: getTableHeight,\n contentHeight: contentHeight,\n headerHeight: headerHeight,\n autoHeight: autoHeight,\n tableBodyRef: tableBodyRef,\n scrollbarXRef: scrollbarXRef,\n scrollbarYRef: scrollbarYRef,\n disabledScroll: disabledScroll,\n loading: loading,\n tableRef: tableRef,\n contentWidth: contentWidth,\n tableWidth: tableWidth,\n scrollY: scrollY,\n minScrollY: minScrollY,\n minScrollX: minScrollX,\n scrollX: scrollX,\n setScrollX: setScrollX,\n setScrollY: setScrollY,\n forceUpdatePosition: forceUpdatePosition,\n onScroll: onScroll,\n onTouchStart: onTouchStart,\n onTouchMove: onTouchMove,\n onTouchEnd: onTouchEnd\n }),\n isScrolling = _useScrollListener.isScrolling,\n onScrollHorizontal = _useScrollListener.onScrollHorizontal,\n onScrollVertical = _useScrollListener.onScrollVertical,\n onScrollBody = _useScrollListener.onScrollBody,\n onScrollTop = _useScrollListener.onScrollTop,\n onScrollLeft = _useScrollListener.onScrollLeft,\n onScrollTo = _useScrollListener.onScrollTo;\n\n var _useCellDescriptor = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useCellDescriptor)({\n children: children,\n rtl: rtl,\n mouseAreaRef: mouseAreaRef,\n tableRef: tableRef,\n minScrollX: minScrollX,\n scrollX: scrollX,\n tableWidth: tableWidth,\n headerHeight: headerHeight,\n showHeader: showHeader,\n sortType: sortTypeProp,\n defaultSortType: defaultSortType,\n sortColumn: sortColumn,\n prefix: prefix,\n onSortColumn: onSortColumn,\n // Force table update after column width change, so scrollbar re-renders.\n onHeaderCellResize: forceUpdate,\n rowHeight: rowHeight\n }),\n headerCells = _useCellDescriptor.headerCells,\n bodyCells = _useCellDescriptor.bodyCells,\n allColumnsWidth = _useCellDescriptor.allColumnsWidth,\n hasCustomTreeCol = _useCellDescriptor.hasCustomTreeCol;\n\n var colCounts = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)((headerCells === null || headerCells === void 0 ? void 0 : headerCells.length) || 0);\n (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useUpdateEffect)(function () {\n setData(isTree ? filterTreeData(dataProp, expandedRowKeys, rowKey) : dataProp);\n }, [dataProp, expandedRowKeys, rowKey, isTree]);\n (0,_utils__WEBPACK_IMPORTED_MODULE_15__.useUpdateEffect)(function () {\n if ((headerCells === null || headerCells === void 0 ? void 0 : headerCells.length) !== colCounts.current) {\n onScrollLeft(0);\n colCounts.current = (headerCells === null || headerCells === void 0 ? void 0 : headerCells.length) || 0;\n }\n }, [children]);\n (0,react__WEBPACK_IMPORTED_MODULE_2__.useImperativeHandle)(ref, function () {\n return {\n get root() {\n return tableRef.current;\n },\n\n get body() {\n return wheelWrapperRef.current;\n },\n\n scrollTop: onScrollTop,\n scrollLeft: onScrollLeft\n };\n });\n var rowWidth = allColumnsWidth > tableWidth.current ? allColumnsWidth : tableWidth.current; // Whether to show vertical scroll bar\n\n var hasVerticalScrollbar = !autoHeight && contentHeight.current > getTableHeight() - headerHeight; // Whether to show the horizontal scroll bar\n\n var hasHorizontalScrollbar = contentWidth.current > tableWidth.current;\n var classes = mergeCls(className, withClassPrefix({\n bordered: bordered,\n hover: hover && !shouldRowSpanColumn,\n loading: loading,\n treetable: isTree,\n 'word-wrap': wordWrap,\n 'cell-bordered': cellBordered\n }));\n\n var styles = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n width: widthProp || 'auto',\n height: getTableHeight()\n }, style);\n\n var renderRowExpanded = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (rowData) {\n var styles = {\n height: rowExpandedHeight\n };\n\n if (typeof renderRowExpandedProp === 'function') {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n className: prefix('row-expanded'),\n style: styles\n }, renderRowExpandedProp(rowData));\n }\n\n return null;\n }, [prefix, renderRowExpandedProp, rowExpandedHeight]);\n\n var renderRow = function renderRow(props, cells, shouldRenderExpandedRow, rowData) {\n var depth = props.depth,\n rowIndex = props.rowIndex,\n restRowProps = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__.default)(props, _excluded2);\n\n if (typeof rowClassName === 'function') {\n restRowProps.className = rowClassName(rowData, rowIndex);\n } else {\n restRowProps.className = rowClassName;\n }\n\n var rowStyles = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, props === null || props === void 0 ? void 0 : props.style);\n\n var rowRight = 0;\n\n if (rtl && contentWidth.current > tableWidth.current) {\n rowRight = tableWidth.current - contentWidth.current;\n rowStyles.right = rowRight;\n }\n\n var rowNode = null; // IF there are fixed columns, add a fixed group\n\n if (shouldFixedColumn && contentWidth.current > tableWidth.current) {\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 width = _cell$props.width;\n var isFixedStart = fixed === 'left' || fixed === true;\n var isFixedEnd = fixed === 'right';\n\n if (rtl) {\n isFixedStart = fixed === 'right';\n isFixedEnd = fixed === 'left' || fixed === true;\n }\n\n if (isFixedStart) {\n fixedLeftCells.push(cell);\n fixedLeftCellGroupWidth += width;\n } else if (isFixedEnd) {\n fixedRightCells.push(cell);\n fixedRightCellGroupWidth += width;\n } else {\n scrollCells.push(cell);\n }\n }\n\n if (hasVerticalScrollbar && fixedRightCellGroupWidth) {\n fixedRightCellGroupWidth += _constants__WEBPACK_IMPORTED_MODULE_14__.SCROLLBAR_WIDTH;\n }\n\n rowNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, fixedLeftCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_CellGroup__WEBPACK_IMPORTED_MODULE_8__.default, {\n fixed: \"left\",\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedLeftCellGroupWidth,\n style: rtl ? {\n right: tableWidth.current - fixedLeftCellGroupWidth - rowRight\n } : undefined\n }, (0,_utils__WEBPACK_IMPORTED_MODULE_15__.mergeCells)((0,_utils__WEBPACK_IMPORTED_MODULE_15__.resetLeftForCells)(fixedLeftCells))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_CellGroup__WEBPACK_IMPORTED_MODULE_8__.default, null, (0,_utils__WEBPACK_IMPORTED_MODULE_15__.mergeCells)(scrollCells)), fixedRightCellGroupWidth ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_CellGroup__WEBPACK_IMPORTED_MODULE_8__.default, {\n fixed: \"right\",\n style: rtl ? {\n right: 0 - rowRight\n } : {\n left: tableWidth.current - fixedRightCellGroupWidth\n },\n height: props.isHeaderRow ? props.headerHeight : props.height,\n width: fixedRightCellGroupWidth\n }, (0,_utils__WEBPACK_IMPORTED_MODULE_15__.mergeCells)((0,_utils__WEBPACK_IMPORTED_MODULE_15__.resetLeftForCells)(fixedRightCells, hasVerticalScrollbar ? _constants__WEBPACK_IMPORTED_MODULE_14__.SCROLLBAR_WIDTH : 0))) : null, shouldRenderExpandedRow && renderRowExpanded(rowData));\n } else {\n rowNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_CellGroup__WEBPACK_IMPORTED_MODULE_8__.default, null, (0,_utils__WEBPACK_IMPORTED_MODULE_15__.mergeCells)(cells)), shouldRenderExpandedRow && renderRowExpanded(rowData));\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Row__WEBPACK_IMPORTED_MODULE_7__.default, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, restRowProps, {\n \"data-depth\": depth,\n style: rowStyles\n }), renderRowProp ? renderRowProp(rowNode, rowData) : rowNode);\n };\n\n var renderTableHeader = function renderTableHeader(headerCells, rowWidth) {\n var top = typeof affixHeader === 'number' ? affixHeader : 0;\n var rowProps = {\n 'aria-rowindex': 1,\n rowRef: tableHeaderRef,\n width: rowWidth,\n height: getRowHeight(),\n headerHeight: headerHeight,\n isHeaderRow: true,\n top: 0,\n rowIndex: -1\n };\n var fixedStyle = {\n position: 'fixed',\n overflow: 'hidden',\n height: headerHeight,\n width: tableWidth.current,\n top: top\n }; // Affix header\n\n var header = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n className: prefix('affix-header'),\n style: fixedStyle,\n ref: affixHeaderWrapperRef\n }, renderRow(rowProps, headerCells));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, (affixHeader === 0 || affixHeader) && header, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n role: \"rowgroup\",\n className: prefix('header-row-wrapper'),\n ref: headerWrapperRef\n }, renderRow(rowProps, headerCells)));\n };\n\n var shouldRenderExpandedRow = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (rowData) {\n if (lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(renderRowExpandedProp) && !isTree && rowKey && expandedRowKeys.some(function (key) {\n return key === rowData[rowKey];\n })) {\n return true;\n }\n\n return false;\n }, [expandedRowKeys, isTree, renderRowExpandedProp, rowKey]);\n var bindRowClick = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (rowData) {\n return function (event) {\n onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(rowData, event);\n };\n }, [onRowClick]);\n var bindRowContextMenu = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (rowData) {\n return function (event) {\n onRowContextMenu === null || onRowContextMenu === void 0 ? void 0 : onRowContextMenu(rowData, event);\n };\n }, [onRowContextMenu]);\n var handleTreeToggle = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (treeRowKey, _rowIndex, rowData) {\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 === treeRowKey) {\n open = true;\n } else {\n nextExpandedRowKeys.push(key);\n }\n }\n\n if (!open) {\n nextExpandedRowKeys.push(treeRowKey);\n }\n\n setExpandedRowKeys(nextExpandedRowKeys);\n onExpandChange === null || onExpandChange === void 0 ? void 0 : onExpandChange(!open, rowData);\n }, [expandedRowKeys, onExpandChange, setExpandedRowKeys]);\n /**\n * Records the status of merged rows.\n * { cellKey: [count,index]}\n */\n\n var rowSpanState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)({});\n\n var renderRowData = function renderRowData(bodyCells, rowData, props, shouldRenderExpandedRow) {\n var hasChildren = isTree && rowData.children && Array.isArray(rowData.children);\n var nextRowKey = rowKey && typeof rowData[rowKey] !== 'undefined' ? rowData[rowKey] : props.key;\n\n var rowProps = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, props, {\n key: nextRowKey,\n 'aria-rowindex': props.key + 2,\n rowRef: bindTableRowsRef(props.key, rowData),\n onClick: bindRowClick(rowData),\n onContextMenu: bindRowContextMenu(rowData)\n });\n\n var expanded = expandedRowKeys.some(function (key) {\n return rowKey && key === rowData[rowKey];\n });\n var cells = [];\n\n for (var i = 0; i < bodyCells.length; i++) {\n var _cell$props2, _cell$props2$rowSpan, _rowSpanState$current, _cell$props3, _rowSpanState$current2;\n\n var cell = bodyCells[i];\n var rowSpan = (_cell$props2 = cell.props) === null || _cell$props2 === void 0 ? void 0 : (_cell$props2$rowSpan = _cell$props2.rowSpan) === null || _cell$props2$rowSpan === void 0 ? void 0 : _cell$props2$rowSpan.call(_cell$props2, rowData);\n\n var _rowHeight = rowSpan ? rowSpan * (props.height || 46) : props.height;\n\n var _cellKey = cell.props.dataKey || i; // Record the cell state of the merged row\n\n\n if (((_rowSpanState$current = rowSpanState.current[_cellKey]) === null || _rowSpanState$current === void 0 ? void 0 : _rowSpanState$current[1]) > 0) {\n rowSpanState.current[_cellKey][1] -= 1; // Restart counting when merged to the last cell.\n\n if (rowSpanState.current[_cellKey][1] === 0) {\n rowSpanState.current[_cellKey][0] = 0;\n }\n }\n\n if (rowSpan) {\n // The state of the initial merged cell\n rowSpanState.current[_cellKey] = [rowSpan, rowSpan];\n rowProps.rowSpan = rowSpan;\n rowProps.style = {\n overflow: 'inherit'\n };\n } // Cells marked as deleted when checking for merged cell.\n\n\n var removedCell = (_cell$props3 = cell.props) !== null && _cell$props3 !== void 0 && _cell$props3.rowSpan && !rowSpan && ((_rowSpanState$current2 = rowSpanState.current[_cellKey]) === null || _rowSpanState$current2 === void 0 ? void 0 : _rowSpanState$current2[0]) !== 0 ? true : false;\n cells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(cell, {\n hasChildren: hasChildren,\n rowData: rowData,\n rowIndex: props.rowIndex,\n wordWrap: wordWrap,\n height: _rowHeight,\n depth: props.depth,\n renderTreeToggle: renderTreeToggle,\n onTreeToggle: handleTreeToggle,\n rowKey: nextRowKey,\n expanded: expanded,\n rowSpan: rowSpan,\n removed: removedCell\n }));\n }\n\n return renderRow(rowProps, cells, shouldRenderExpandedRow, rowData);\n };\n\n var renderScrollbar = function renderScrollbar() {\n var height = getTableHeight();\n\n if (disabledScroll) {\n return null;\n }\n\n var scrollbars = [];\n\n if (hasHorizontalScrollbar) {\n scrollbars.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Scrollbar__WEBPACK_IMPORTED_MODULE_9__.default, {\n key: \"scrollbar\",\n tableId: id,\n style: {\n width: tableWidth.current\n },\n length: tableWidth.current,\n onScroll: onScrollHorizontal,\n scrollLength: contentWidth.current,\n ref: scrollbarXRef\n }));\n }\n\n if (hasVerticalScrollbar) {\n scrollbars.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Scrollbar__WEBPACK_IMPORTED_MODULE_9__.default, {\n vertical: true,\n key: \"vertical-scrollbar\",\n tableId: id,\n length: height - headerHeight,\n onScroll: onScrollVertical,\n scrollLength: contentHeight.current,\n ref: scrollbarYRef\n }));\n }\n\n return scrollbars;\n };\n\n var renderTableBody = function renderTableBody(bodyCells, rowWidth) {\n var _visibleRows$current;\n\n var height = 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 visibleRows.current = [];\n\n if (data) {\n var top = 0; // Row position\n\n var minTop = Math.abs(scrollY.current);\n var maxTop = minTop + height + rowExpandedHeight;\n var isCustomRowHeight = typeof rowHeight === 'function';\n var isUncertainHeight = !!renderRowExpandedProp || isCustomRowHeight || wordWrap; // If virtualized is enabled and the row height in the Table is variable,\n // you need to loop through the data to get the height of each row.\n\n if (isUncertainHeight && virtualized || !virtualized) {\n // Avoid white screens on the top and bottom of the table when touching and scrolling on the mobile terminal.\n // So supplement the display data row.\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_15__.isSupportTouchEvent)()) {\n var coveredHeight = height * 3;\n minTop = Math.max(minTop - coveredHeight, 0);\n maxTop = maxTop + coveredHeight;\n }\n\n for (var index = 0; index < data.length; index++) {\n var _rowData = data[index];\n var maxHeight = tableRowsMaxHeight[index];\n var shouldRender = shouldRenderExpandedRow(_rowData);\n var nextRowHeight = 0;\n\n if (typeof rowHeight === 'function') {\n nextRowHeight = rowHeight(_rowData);\n } else {\n nextRowHeight = maxHeight ? Math.max(maxHeight + _constants__WEBPACK_IMPORTED_MODULE_14__.CELL_PADDING_HEIGHT, rowHeight) : rowHeight;\n\n if (shouldRender) {\n nextRowHeight += rowExpandedHeight;\n }\n }\n\n contentHeight += nextRowHeight;\n var rowProps = {\n key: index,\n top: top,\n rowIndex: index,\n width: rowWidth,\n depth: _rowData[_constants__WEBPACK_IMPORTED_MODULE_14__.TREE_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 visibleRows.current.push(renderRowData(bodyCells, _rowData, rowProps, shouldRender));\n }\n } else {\n /** virtualized */\n // If the row height of the Table is fixed, it is directly calculated by the row height and the number of rows,\n // thereby reducing the performance cost of traversing all data.\n var _nextRowHeight = getRowHeight();\n\n var startIndex = Math.max(Math.floor(minTop / _nextRowHeight), 0);\n var endIndex = Math.min(startIndex + Math.ceil(bodyHeight / _nextRowHeight) + 5, data.length); // Avoid white screens on the top and bottom of the table when touching and scrolling on the mobile terminal.\n // So supplement the display data row.\n\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_15__.isSupportTouchEvent)()) {\n var coveredCount = Math.floor(height / _nextRowHeight * 3);\n startIndex = Math.max(startIndex - coveredCount, 0);\n endIndex = Math.min(endIndex + coveredCount, data.length);\n }\n\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 _rowData2 = data[_index];\n var _rowProps = {\n key: _index,\n rowIndex: _index,\n depth: _rowData2[_constants__WEBPACK_IMPORTED_MODULE_14__.TREE_DEPTH],\n top: _index * _nextRowHeight,\n width: rowWidth,\n height: _nextRowHeight\n };\n visibleRows.current.push(renderRowData(bodyCells, _rowData2, _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_2___default().createElement(\"div\", {\n ref: tableBodyRef,\n role: \"rowgroup\",\n className: prefix('body-row-wrapper'),\n style: bodyStyles,\n onScroll: onScrollBody\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n style: wheelStyles,\n className: prefix('body-wheel-area'),\n ref: wheelWrapperRef\n }, topHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Row__WEBPACK_IMPORTED_MODULE_7__.default, {\n style: topRowStyles,\n className: \"virtualized\"\n }) : null, visibleRows.current, bottomHideHeight ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Row__WEBPACK_IMPORTED_MODULE_7__.default, {\n style: bottomRowStyles,\n className: \"virtualized\"\n }) : null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_EmptyMessage__WEBPACK_IMPORTED_MODULE_12__.default, {\n locale: locale,\n renderEmpty: renderEmpty,\n addPrefix: prefix,\n loading: !!((_visibleRows$current = visibleRows.current) !== null && _visibleRows$current !== void 0 && _visibleRows$current.length) || loading\n }), renderScrollbar(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_Loader__WEBPACK_IMPORTED_MODULE_11__.default, {\n locale: locale,\n loadAnimation: loadAnimation,\n loading: loading,\n addPrefix: prefix,\n renderLoading: renderLoading\n }));\n };\n\n var contextValue = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(function () {\n return {\n classPrefix: classPrefix,\n translateDOMPositionXY: translateDOMPositionXY.current,\n rtl: rtl,\n isTree: isTree,\n hasCustomTreeCol: hasCustomTreeCol\n };\n }, [classPrefix, hasCustomTreeCol, isTree, rtl]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_TableContext__WEBPACK_IMPORTED_MODULE_13__.default.Provider, {\n value: contextValue\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.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\": colCounts.current,\n \"aria-busy\": loading\n }, rest, {\n className: classes,\n style: styles,\n ref: tableRef\n }), showHeader && renderTableHeader(headerCells, rowWidth), children && renderTableBody(bodyCells, rowWidth), showHeader && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_MouseArea__WEBPACK_IMPORTED_MODULE_10__.default, {\n ref: mouseAreaRef,\n addPrefix: prefix,\n headerHeight: headerHeight,\n height: getTableHeight()\n })));\n});\nTable.displayName = 'Table';\nTable.propTypes = {\n autoHeight: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n fillHeight: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n affixHeader: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number)]),\n affixHorizontalScrollbar: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number)]),\n bordered: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string),\n classPrefix: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().any),\n cellBordered: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n data: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().array),\n defaultExpandAllRows: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n defaultExpandedRowKeys: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().array),\n defaultSortType: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().any),\n disabledScroll: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n expandedRowKeys: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().array),\n hover: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n height: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number),\n headerHeight: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number),\n locale: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().object),\n loading: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n loadAnimation: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n minHeight: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number),\n rowKey: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number)]),\n rowHeight: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func)]),\n renderTreeToggle: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n renderRowExpanded: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n renderRow: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n rowExpandedHeight: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number),\n renderEmpty: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n renderLoading: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n rowClassName: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string)]),\n rtl: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n style: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().object),\n sortColumn: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string),\n sortType: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().any),\n showHeader: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n shouldUpdateScroll: prop_types__WEBPACK_IMPORTED_MODULE_16___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_16___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool)]),\n translate3d: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n wordWrap: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().any),\n width: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number),\n virtualized: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n isTree: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().bool),\n onRowClick: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onRowContextMenu: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onScroll: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onSortColumn: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onExpandChange: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onTouchStart: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onTouchMove: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func),\n onTouchEnd: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func)\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Table);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/Table.js?");
|
|
9658
9658
|
|
|
9659
9659
|
/***/ }),
|
|
9660
9660
|
|
|
@@ -9929,7 +9929,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
9929
9929
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
9930
9930
|
|
|
9931
9931
|
"use strict";
|
|
9932
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dom-lib/addStyle */ \"./node_modules/dom-lib/esm/addStyle.js\");\n/* harmony import */ var dom_lib_addClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! dom-lib/addClass */ \"./node_modules/dom-lib/esm/addClass.js\");\n/* harmony import */ var dom_lib_removeClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dom-lib/removeClass */ \"./node_modules/dom-lib/esm/removeClass.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/omit */ \"./node_modules/lodash/omit.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _useControlled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useControlled */ \"./node_modules/rsuite-table/es/utils/useControlled.js\");\n/* harmony import */ var _getTableColumns__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./getTableColumns */ \"./node_modules/rsuite-table/es/utils/getTableColumns.js\");\n/* harmony import */ var _getTotalByColumns__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./getTotalByColumns */ \"./node_modules/rsuite-table/es/utils/getTotalByColumns.js\");\n/* harmony import */ var _getColumnProps__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./getColumnProps */ \"./node_modules/rsuite-table/es/utils/getColumnProps.js\");\n/* harmony import */ var _useUpdateEffect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./useUpdateEffect */ \"./node_modules/rsuite-table/es/utils/useUpdateEffect.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Attach rendering-related attributes to all cells of the form and cache them.\n * @param props\n * @returns\n */\nvar useCellDescriptor = function useCellDescriptor(props) {\n var children = props.children,\n rtl = props.rtl,\n mouseAreaRef = props.mouseAreaRef,\n tableRef = props.tableRef,\n minScrollX = props.minScrollX,\n scrollX = props.scrollX,\n tableWidth = props.tableWidth,\n headerHeight = props.headerHeight,\n showHeader = props.showHeader,\n sortTypeProp = props.sortType,\n defaultSortType = props.defaultSortType,\n sortColumn = props.sortColumn,\n rowHeight = props.rowHeight,\n onSortColumn = props.onSortColumn,\n onHeaderCellResize = props.onHeaderCellResize,\n prefix = props.prefix;\n\n var _useControlled = (0,_useControlled__WEBPACK_IMPORTED_MODULE_8__.default)(sortTypeProp, defaultSortType),\n sortType = _useControlled[0],\n setSortType = _useControlled[1];\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(),\n cacheData = _useState[0],\n setCacheData = _useState[1];\n\n var clearCache = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\n setCacheData(null);\n }, []);\n var setColumnResizing = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (resizing) {\n if (!tableRef.current) {\n return;\n }\n\n if (resizing) {\n (0,dom_lib_addClass__WEBPACK_IMPORTED_MODULE_3__.default)(tableRef.current, prefix('column-resizing'));\n } else {\n (0,dom_lib_removeClass__WEBPACK_IMPORTED_MODULE_4__.default)(tableRef.current, prefix('column-resizing'));\n }\n }, [prefix, tableRef]);\n var columnWidths = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)({});\n (0,_useUpdateEffect__WEBPACK_IMPORTED_MODULE_12__.default)(function () {\n clearCache();\n }, [children, sortColumn, sortType, tableWidth.current, scrollX.current, minScrollX.current]);\n (0,_useUpdateEffect__WEBPACK_IMPORTED_MODULE_12__.default)(function () {\n columnWidths.current = {};\n }, [children]);\n var handleColumnResizeEnd = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (columnWidth, _cursorDelta, dataKey, index) {\n columnWidths.current[dataKey + \"_\" + index + \"_width\"] = columnWidth;\n setColumnResizing(false);\n\n if (mouseAreaRef.current) {\n (0,dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__.default)(mouseAreaRef.current, {\n display: 'none'\n });\n }\n\n clearCache();\n onHeaderCellResize === null || onHeaderCellResize === void 0 ? void 0 : onHeaderCellResize(columnWidth, dataKey);\n }, [clearCache, mouseAreaRef, onHeaderCellResize, setColumnResizing]);\n var handleColumnResizeMove = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (width, left, fixed) {\n var mouseAreaLeft = width + left;\n var x = mouseAreaLeft;\n var dir = 'left';\n\n if (rtl) {\n mouseAreaLeft += minScrollX.current + _constants__WEBPACK_IMPORTED_MODULE_7__.SCROLLBAR_WIDTH;\n dir = 'right';\n }\n\n if (!fixed) {\n x = mouseAreaLeft + (rtl ? -scrollX.current : scrollX.current);\n }\n\n if (mouseAreaRef.current) {\n var _addStyle;\n\n (0,dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__.default)(mouseAreaRef.current, (_addStyle = {\n display: 'block'\n }, _addStyle[dir] = x + \"px\", _addStyle));\n }\n }, [minScrollX, mouseAreaRef, rtl, scrollX]);\n var handleColumnResizeStart = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (width, left, fixed) {\n setColumnResizing(true);\n handleColumnResizeMove(width, left, fixed);\n }, [handleColumnResizeMove, setColumnResizing]);\n var handleSortColumn = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (dataKey) {\n var nextSortType = sortType;\n\n if (sortColumn === dataKey) {\n nextSortType = sortType === _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.ASC ? _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.DESC : _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.ASC;\n setSortType(nextSortType);\n }\n\n onSortColumn === null || onSortColumn === void 0 ? void 0 : onSortColumn(dataKey, nextSortType);\n }, [onSortColumn, setSortType, sortColumn, sortType]);\n\n if (cacheData) {\n return cacheData;\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 if (!children) {\n var _cacheCell = {\n columns: [],\n headerCells: headerCells,\n bodyCells: bodyCells,\n hasCustomTreeCol: hasCustomTreeCol,\n allColumnsWidth: left\n };\n setCacheData(_cacheCell);\n return _cacheCell;\n }\n\n var columns = (0,_getTableColumns__WEBPACK_IMPORTED_MODULE_9__.default)(children);\n var count = columns.length;\n\n var _getTotalByColumns = (0,_getTotalByColumns__WEBPACK_IMPORTED_MODULE_10__.default)(columns),\n totalFlexGrow = _getTotalByColumns.totalFlexGrow,\n totalWidth = _getTotalByColumns.totalWidth;\n\n react__WEBPACK_IMPORTED_MODULE_1___default().Children.forEach(columns, function (column, index) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().isValidElement(column)) {\n var _columnWidths$current;\n\n var columnChildren = column.props.children;\n var columnProps = (0,_getColumnProps__WEBPACK_IMPORTED_MODULE_11__.default)(column);\n var _width = columnProps.width,\n resizable = columnProps.resizable,\n flexGrow = columnProps.flexGrow,\n minWidth = columnProps.minWidth,\n onResize = columnProps.onResize,\n treeCol = columnProps.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 headerCell = columnChildren[0];\n var cell = columnChildren[1];\n var cellWidth = ((_columnWidths$current = columnWidths.current) === null || _columnWidths$current === void 0 ? void 0 : _columnWidths$current[cell.props.dataKey + \"_\" + index + \"_width\"]) || _width || 0;\n\n if (tableWidth.current && flexGrow && totalFlexGrow) {\n cellWidth = Math.max((tableWidth.current - totalWidth) / totalFlexGrow * flexGrow, minWidth || 60);\n }\n\n var cellProps = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, lodash_omit__WEBPACK_IMPORTED_MODULE_5___default()(columnProps, ['children']), {\n 'aria-colindex': index + 1,\n left: left,\n headerHeight: headerHeight,\n key: index,\n width: cellWidth,\n height: typeof rowHeight === 'function' ? rowHeight() : rowHeight,\n firstColumn: index === 0,\n lastColumn: index === count - 1\n });\n\n if (showHeader && headerHeight) {\n var headerCellProps = {\n // Resizable column\n // `index` is used to define the serial number when dragging the column width\n index: index,\n dataKey: cell.props.dataKey,\n isHeaderCell: true,\n minWidth: columnProps.minWidth,\n sortable: columnProps.sortable,\n onSortColumn: handleSortColumn,\n sortType: sortType,\n sortColumn: sortColumn,\n flexGrow: flexGrow\n };\n\n if (resizable) {\n lodash_merge__WEBPACK_IMPORTED_MODULE_6___default()(headerCellProps, {\n onResize: onResize,\n onColumnResizeEnd: handleColumnResizeEnd,\n onColumnResizeStart: handleColumnResizeStart,\n onColumnResizeMove: handleColumnResizeMove\n });\n }\n\n headerCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(headerCell, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, cellProps, headerCellProps)));\n }\n\n bodyCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(cell, cellProps));\n left += cellWidth;\n }\n });\n var cacheCell = {\n columns: columns,\n headerCells: headerCells,\n bodyCells: bodyCells,\n allColumnsWidth: left,\n hasCustomTreeCol: hasCustomTreeCol\n };\n setCacheData(cacheCell);\n return cacheCell;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (useCellDescriptor);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/useCellDescriptor.js?");
|
|
9932
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dom-lib/addStyle */ \"./node_modules/dom-lib/esm/addStyle.js\");\n/* harmony import */ var dom_lib_addClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! dom-lib/addClass */ \"./node_modules/dom-lib/esm/addClass.js\");\n/* harmony import */ var dom_lib_removeClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dom-lib/removeClass */ \"./node_modules/dom-lib/esm/removeClass.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/omit */ \"./node_modules/lodash/omit.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _useControlled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useControlled */ \"./node_modules/rsuite-table/es/utils/useControlled.js\");\n/* harmony import */ var _getTableColumns__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./getTableColumns */ \"./node_modules/rsuite-table/es/utils/getTableColumns.js\");\n/* harmony import */ var _getTotalByColumns__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./getTotalByColumns */ \"./node_modules/rsuite-table/es/utils/getTotalByColumns.js\");\n/* harmony import */ var _getColumnProps__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./getColumnProps */ \"./node_modules/rsuite-table/es/utils/getColumnProps.js\");\n/* harmony import */ var _useUpdateEffect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./useUpdateEffect */ \"./node_modules/rsuite-table/es/utils/useUpdateEffect.js\");\n/* harmony import */ var _flushSync__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./flushSync */ \"./node_modules/rsuite-table/es/utils/flushSync.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Attach rendering-related attributes to all cells of the form and cache them.\n * @param props\n * @returns\n */\nvar useCellDescriptor = function useCellDescriptor(props) {\n var children = props.children,\n rtl = props.rtl,\n mouseAreaRef = props.mouseAreaRef,\n tableRef = props.tableRef,\n minScrollX = props.minScrollX,\n scrollX = props.scrollX,\n tableWidth = props.tableWidth,\n headerHeight = props.headerHeight,\n showHeader = props.showHeader,\n sortTypeProp = props.sortType,\n defaultSortType = props.defaultSortType,\n sortColumn = props.sortColumn,\n rowHeight = props.rowHeight,\n onSortColumn = props.onSortColumn,\n onHeaderCellResize = props.onHeaderCellResize,\n prefix = props.prefix;\n\n var _useControlled = (0,_useControlled__WEBPACK_IMPORTED_MODULE_8__.default)(sortTypeProp, defaultSortType),\n sortType = _useControlled[0],\n setSortType = _useControlled[1];\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(),\n cacheData = _useState[0],\n setCacheData = _useState[1];\n\n var clearCache = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\n setCacheData(null);\n }, []);\n var setColumnResizing = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (resizing) {\n if (!tableRef.current) {\n return;\n }\n\n if (resizing) {\n (0,dom_lib_addClass__WEBPACK_IMPORTED_MODULE_3__.default)(tableRef.current, prefix('column-resizing'));\n } else {\n (0,dom_lib_removeClass__WEBPACK_IMPORTED_MODULE_4__.default)(tableRef.current, prefix('column-resizing'));\n }\n }, [prefix, tableRef]);\n var columnWidths = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)({});\n (0,_useUpdateEffect__WEBPACK_IMPORTED_MODULE_12__.default)(function () {\n clearCache();\n }, [children, sortColumn, sortType, tableWidth.current, scrollX.current, minScrollX.current]);\n (0,_useUpdateEffect__WEBPACK_IMPORTED_MODULE_12__.default)(function () {\n columnWidths.current = {};\n }, [children]);\n var handleColumnResizeEnd = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (columnWidth, _cursorDelta, dataKey, index) {\n columnWidths.current[dataKey + \"_\" + index + \"_width\"] = columnWidth;\n setColumnResizing(false);\n\n if (mouseAreaRef.current) {\n (0,dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__.default)(mouseAreaRef.current, {\n display: 'none'\n });\n } // fix: https://github.com/rsuite/rsuite-table/issues/398\n\n\n (0,_flushSync__WEBPACK_IMPORTED_MODULE_13__.default)(function () {\n return clearCache();\n });\n onHeaderCellResize === null || onHeaderCellResize === void 0 ? void 0 : onHeaderCellResize(columnWidth, dataKey);\n }, [clearCache, mouseAreaRef, onHeaderCellResize, setColumnResizing]);\n var handleColumnResizeMove = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (width, left, fixed) {\n var mouseAreaLeft = width + left;\n var x = mouseAreaLeft;\n var dir = 'left';\n\n if (rtl) {\n mouseAreaLeft += minScrollX.current + _constants__WEBPACK_IMPORTED_MODULE_7__.SCROLLBAR_WIDTH;\n dir = 'right';\n }\n\n if (!fixed) {\n x = mouseAreaLeft + (rtl ? -scrollX.current : scrollX.current);\n }\n\n if (mouseAreaRef.current) {\n var _addStyle;\n\n (0,dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__.default)(mouseAreaRef.current, (_addStyle = {\n display: 'block'\n }, _addStyle[dir] = x + \"px\", _addStyle));\n }\n }, [minScrollX, mouseAreaRef, rtl, scrollX]);\n var handleColumnResizeStart = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (width, left, fixed) {\n setColumnResizing(true);\n handleColumnResizeMove(width, left, fixed);\n }, [handleColumnResizeMove, setColumnResizing]);\n var handleSortColumn = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (dataKey) {\n var nextSortType = sortType;\n\n if (sortColumn === dataKey) {\n nextSortType = sortType === _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.ASC ? _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.DESC : _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.ASC;\n setSortType(nextSortType);\n }\n\n onSortColumn === null || onSortColumn === void 0 ? void 0 : onSortColumn(dataKey, nextSortType);\n }, [onSortColumn, setSortType, sortColumn, sortType]);\n\n if (cacheData) {\n return cacheData;\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 if (!children) {\n var _cacheCell = {\n columns: [],\n headerCells: headerCells,\n bodyCells: bodyCells,\n hasCustomTreeCol: hasCustomTreeCol,\n allColumnsWidth: left\n };\n setCacheData(_cacheCell);\n return _cacheCell;\n }\n\n var columns = (0,_getTableColumns__WEBPACK_IMPORTED_MODULE_9__.default)(children);\n var count = columns.length;\n\n var _getTotalByColumns = (0,_getTotalByColumns__WEBPACK_IMPORTED_MODULE_10__.default)(columns),\n totalFlexGrow = _getTotalByColumns.totalFlexGrow,\n totalWidth = _getTotalByColumns.totalWidth;\n\n react__WEBPACK_IMPORTED_MODULE_1___default().Children.forEach(columns, function (column, index) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().isValidElement(column)) {\n var _columnWidths$current;\n\n var columnChildren = column.props.children;\n var columnProps = (0,_getColumnProps__WEBPACK_IMPORTED_MODULE_11__.default)(column);\n var _width = columnProps.width,\n resizable = columnProps.resizable,\n flexGrow = columnProps.flexGrow,\n minWidth = columnProps.minWidth,\n onResize = columnProps.onResize,\n treeCol = columnProps.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 headerCell = columnChildren[0];\n var cell = columnChildren[1];\n var cellWidth = ((_columnWidths$current = columnWidths.current) === null || _columnWidths$current === void 0 ? void 0 : _columnWidths$current[cell.props.dataKey + \"_\" + index + \"_width\"]) || _width || 0;\n\n if (tableWidth.current && flexGrow && totalFlexGrow) {\n cellWidth = Math.max((tableWidth.current - totalWidth) / totalFlexGrow * flexGrow, minWidth || 60);\n }\n\n var cellProps = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, lodash_omit__WEBPACK_IMPORTED_MODULE_5___default()(columnProps, ['children']), {\n 'aria-colindex': index + 1,\n left: left,\n headerHeight: headerHeight,\n key: index,\n width: cellWidth,\n height: typeof rowHeight === 'function' ? rowHeight() : rowHeight,\n firstColumn: index === 0,\n lastColumn: index === count - 1\n });\n\n if (showHeader && headerHeight) {\n var headerCellProps = {\n // Resizable column\n // `index` is used to define the serial number when dragging the column width\n index: index,\n dataKey: cell.props.dataKey,\n isHeaderCell: true,\n minWidth: columnProps.minWidth,\n sortable: columnProps.sortable,\n onSortColumn: handleSortColumn,\n sortType: sortType,\n sortColumn: sortColumn,\n flexGrow: flexGrow\n };\n\n if (resizable) {\n lodash_merge__WEBPACK_IMPORTED_MODULE_6___default()(headerCellProps, {\n onResize: onResize,\n onColumnResizeEnd: handleColumnResizeEnd,\n onColumnResizeStart: handleColumnResizeStart,\n onColumnResizeMove: handleColumnResizeMove\n });\n }\n\n headerCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(headerCell, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, cellProps, headerCellProps)));\n }\n\n bodyCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(cell, cellProps));\n left += cellWidth;\n }\n });\n var cacheCell = {\n columns: columns,\n headerCells: headerCells,\n bodyCells: bodyCells,\n allColumnsWidth: left,\n hasCustomTreeCol: hasCustomTreeCol\n };\n setCacheData(cacheCell);\n return cacheCell;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (useCellDescriptor);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/useCellDescriptor.js?");
|
|
9933
9933
|
|
|
9934
9934
|
/***/ }),
|
|
9935
9935
|
|