@qn-pandora/pandora-component 5.1.1 → 5.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -36
- package/es/components/AutoComplete/style.css +17 -17
- package/es/components/AutoComplete/style.less +8 -8
- package/es/components/Breadcrumb/style.less +9 -9
- package/es/components/Button/style.css +69 -69
- package/es/components/Button/style.less +51 -51
- package/es/components/Card/RowExtra/style.less +8 -8
- package/es/components/Card/SearchInput/style.less +8 -8
- package/es/components/Card/style.css +11 -11
- package/es/components/Card/style.less +11 -11
- package/es/components/CheckTransformList/style.css +19 -19
- package/es/components/CheckTransformList/style.less +35 -35
- package/es/components/Checkbox/index.js +9 -1
- package/es/components/Checkbox/style.less +5 -5
- package/es/components/CheckboxList/style.css +5 -5
- package/es/components/CheckboxList/style.less +11 -11
- package/es/components/Collapse/style.css +1 -1
- package/es/components/Collapse/style.less +58 -58
- package/es/components/CollapsiblePanel/style.less +63 -63
- package/es/components/DateTimePicker/Base/index.d.ts +3 -0
- package/es/components/DateTimePicker/Base/index.js +51 -6
- package/es/components/DateTimePicker/Base/style.css +67 -61
- package/es/components/DateTimePicker/Base/style.less +167 -160
- package/es/components/DateTimePicker/BaseMobile/Absolute/style.less +35 -35
- package/es/components/DateTimePicker/BaseMobile/style.less +32 -32
- package/es/components/DateTimePicker/Collapse/Panel/style.less +26 -26
- package/es/components/DateTimePicker/DisplayInput/index.js +3 -1
- package/es/components/DateTimePicker/DisplayInput/style.css +14 -14
- package/es/components/DateTimePicker/DisplayInput/style.less +9 -9
- package/es/components/DateTimePicker/constants.d.ts +9 -3
- package/es/components/DateTimePicker/constants.js +1 -0
- package/es/components/DateTimePicker/style.less +19 -19
- package/es/components/DateTimePicker/time.d.ts +1 -0
- package/es/components/DateTimePicker/time.js +1 -0
- package/es/components/DateTimePicker/transform.js +4 -2
- package/es/components/Descriptions/style.less +16 -16
- package/es/components/Drawer/CloseIcon/style.less +8 -8
- package/es/components/Drawer/index.d.ts +1 -1
- package/es/components/Drawer/style.less +69 -69
- package/es/components/FileResumable/index.js +2 -3
- package/es/components/FileResumable/style.css +8 -8
- package/es/components/FileResumable/style.less +94 -94
- package/es/components/FlameGraph/customTooltip.d.ts +22 -0
- package/es/components/FlameGraph/customTooltip.js +91 -0
- package/es/components/FlameGraph/index.d.ts +16 -0
- package/es/components/FlameGraph/index.js +96 -0
- package/es/components/FlameGraph/style.css +8 -0
- package/es/components/FlameGraph/style.less +14 -0
- package/es/components/Input/style.css +14 -14
- package/es/components/Input/style.less +12 -12
- package/es/components/KeyValuePair/style.less +25 -25
- package/es/components/Menu/Option.d.ts +1 -1
- package/es/components/Menu/Option.js +12 -4
- package/es/components/Menu/style.css +23 -23
- package/es/components/Menu/style.less +18 -18
- package/es/components/Modal/style.css +1 -1
- package/es/components/Modal/style.less +30 -30
- package/es/components/NameExplainTooltip/style.css +1 -1
- package/es/components/NameExplainTooltip/style.less +10 -10
- package/es/components/NameLimiter/style.less +19 -19
- package/es/components/OptionList/InlineOptionList/style.css +1 -1
- package/es/components/OptionList/InlineOptionList/style.less +16 -16
- package/es/components/OptionList/OptionItem/style.css +2 -2
- package/es/components/OptionList/OptionItem/style.less +25 -25
- package/es/components/OptionList/PopoverOptionList/style.css +3 -3
- package/es/components/OptionList/PopoverOptionList/style.less +30 -30
- package/es/components/OptionList/style.css +6 -6
- package/es/components/OptionList/style.less +3 -3
- package/es/components/RadioGroup/style.css +32 -32
- package/es/components/RadioGroup/style.less +41 -41
- package/es/components/RangeInput/style.css +29 -29
- package/es/components/RangeInput/style.less +37 -37
- package/es/components/RemarkName/style.less +2 -2
- package/es/components/Selector/style.css +17 -17
- package/es/components/Selector/style.less +99 -99
- package/es/components/Spin/style.css +2 -2
- package/es/components/Spin/style.less +26 -26
- package/es/components/Steps/ControlButton/style.less +5 -5
- package/es/components/Steps/style.css +16 -16
- package/es/components/Steps/style.less +48 -48
- package/es/components/Table/ColumnSetting/index.d.ts +1 -0
- package/es/components/Table/ColumnSetting/index.js +19 -14
- package/es/components/Table/ColumnSetting/style.less +50 -50
- package/es/components/Table/ColumnTag/style.css +4 -4
- package/es/components/Table/ColumnTag/style.less +40 -40
- package/es/components/Table/EmptyText.d.ts +7 -0
- package/es/components/Table/EmptyText.js +22 -0
- package/es/components/Table/ResizableTitle/style.less +25 -25
- package/es/components/Table/index.d.ts +11 -83
- package/es/components/Table/index.js +113 -286
- package/es/components/Table/style.css +54 -44
- package/es/components/Table/style.less +364 -345
- package/es/components/Table/type.d.ts +63 -0
- package/es/components/Table/type.js +5 -0
- package/es/components/Table/util.d.ts +58 -0
- package/es/components/Table/util.js +218 -0
- package/es/components/Tabs/style.css +10 -10
- package/es/components/Tabs/style.less +33 -33
- package/es/components/TagList/Tag/style.css +5 -5
- package/es/components/TagList/Tag/style.less +72 -72
- package/es/components/TagList/TagSwitch/style.css +1 -1
- package/es/components/TagList/TagSwitch/style.less +28 -28
- package/es/components/TagList/style.css +6 -6
- package/es/components/TagList/style.less +28 -28
- package/es/components/Timeline/TimelineItem/style.css +1 -1
- package/es/components/Timeline/TimelineItem/style.less +49 -49
- package/es/components/Timeline/style.less +23 -23
- package/es/components/TopologyChart/style.less +14 -14
- package/es/components/Transfer/List/style.less +19 -19
- package/es/components/Transfer/ListBody/style.less +18 -18
- package/es/components/Transfer/style.less +14 -14
- package/es/components/TreeSelector/style.css +21 -21
- package/es/components/TreeSelector/style.less +56 -56
- package/es/constants/language/datetime/en.js +4 -2
- package/es/constants/language/datetime/type.d.ts +4 -2
- package/es/constants/language/datetime/zh.js +4 -2
- package/es/index.css +6268 -6244
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/index.less +56 -55
- package/es/style/mixin.less +45 -45
- package/es/style/theme.less +416 -416
- package/lib/components/AutoComplete/style.css +17 -17
- package/lib/components/AutoComplete/style.less +8 -8
- package/lib/components/Breadcrumb/style.less +9 -9
- package/lib/components/Button/style.css +69 -69
- package/lib/components/Button/style.less +51 -51
- package/lib/components/Card/RowExtra/style.less +8 -8
- package/lib/components/Card/SearchInput/style.less +8 -8
- package/lib/components/Card/style.css +11 -11
- package/lib/components/Card/style.less +11 -11
- package/lib/components/CheckTransformList/style.css +19 -19
- package/lib/components/CheckTransformList/style.less +35 -35
- package/lib/components/Checkbox/index.js +9 -1
- package/lib/components/Checkbox/style.less +5 -5
- package/lib/components/CheckboxList/style.css +5 -5
- package/lib/components/CheckboxList/style.less +11 -11
- package/lib/components/Collapse/style.css +1 -1
- package/lib/components/Collapse/style.less +58 -58
- package/lib/components/CollapsiblePanel/style.less +63 -63
- package/lib/components/DateTimePicker/Base/index.d.ts +3 -0
- package/lib/components/DateTimePicker/Base/index.js +51 -6
- package/lib/components/DateTimePicker/Base/style.css +67 -61
- package/lib/components/DateTimePicker/Base/style.less +167 -160
- package/lib/components/DateTimePicker/BaseMobile/Absolute/style.less +35 -35
- package/lib/components/DateTimePicker/BaseMobile/style.less +32 -32
- package/lib/components/DateTimePicker/Collapse/Panel/style.less +26 -26
- package/lib/components/DateTimePicker/DisplayInput/index.js +3 -1
- package/lib/components/DateTimePicker/DisplayInput/style.css +14 -14
- package/lib/components/DateTimePicker/DisplayInput/style.less +9 -9
- package/lib/components/DateTimePicker/constants.d.ts +9 -3
- package/lib/components/DateTimePicker/constants.js +1 -0
- package/lib/components/DateTimePicker/style.less +19 -19
- package/lib/components/DateTimePicker/time.d.ts +1 -0
- package/lib/components/DateTimePicker/time.js +1 -0
- package/lib/components/DateTimePicker/transform.js +4 -2
- package/lib/components/Descriptions/style.less +16 -16
- package/lib/components/Drawer/CloseIcon/style.less +8 -8
- package/lib/components/Drawer/index.d.ts +1 -1
- package/lib/components/Drawer/style.less +69 -69
- package/lib/components/FileResumable/index.js +2 -3
- package/lib/components/FileResumable/style.css +8 -8
- package/lib/components/FileResumable/style.less +94 -94
- package/lib/components/FlameGraph/customTooltip.d.ts +22 -0
- package/lib/components/FlameGraph/customTooltip.js +114 -0
- package/lib/components/FlameGraph/index.d.ts +16 -0
- package/lib/components/FlameGraph/index.js +117 -0
- package/lib/components/FlameGraph/style.css +8 -0
- package/lib/components/FlameGraph/style.less +14 -0
- package/lib/components/Input/style.css +14 -14
- package/lib/components/Input/style.less +12 -12
- package/lib/components/KeyValuePair/style.less +25 -25
- package/lib/components/Menu/Option.d.ts +1 -1
- package/lib/components/Menu/Option.js +17 -25
- package/lib/components/Menu/style.css +23 -23
- package/lib/components/Menu/style.less +18 -18
- package/lib/components/Modal/style.css +1 -1
- package/lib/components/Modal/style.less +30 -30
- package/lib/components/NameExplainTooltip/style.css +1 -1
- package/lib/components/NameExplainTooltip/style.less +10 -10
- package/lib/components/NameLimiter/style.less +19 -19
- package/lib/components/OptionList/InlineOptionList/style.css +1 -1
- package/lib/components/OptionList/InlineOptionList/style.less +16 -16
- package/lib/components/OptionList/OptionItem/style.css +2 -2
- package/lib/components/OptionList/OptionItem/style.less +25 -25
- package/lib/components/OptionList/PopoverOptionList/style.css +3 -3
- package/lib/components/OptionList/PopoverOptionList/style.less +30 -30
- package/lib/components/OptionList/style.css +6 -6
- package/lib/components/OptionList/style.less +3 -3
- package/lib/components/RadioGroup/style.css +32 -32
- package/lib/components/RadioGroup/style.less +41 -41
- package/lib/components/RangeInput/style.css +29 -29
- package/lib/components/RangeInput/style.less +37 -37
- package/lib/components/RemarkName/style.less +2 -2
- package/lib/components/Selector/style.css +17 -17
- package/lib/components/Selector/style.less +99 -99
- package/lib/components/Spin/style.css +2 -2
- package/lib/components/Spin/style.less +26 -26
- package/lib/components/Steps/ControlButton/style.less +5 -5
- package/lib/components/Steps/style.css +16 -16
- package/lib/components/Steps/style.less +48 -48
- package/lib/components/Table/ColumnSetting/index.d.ts +1 -0
- package/lib/components/Table/ColumnSetting/index.js +19 -14
- package/lib/components/Table/ColumnSetting/style.less +50 -50
- package/lib/components/Table/ColumnTag/style.css +4 -4
- package/lib/components/Table/ColumnTag/style.less +40 -40
- package/lib/components/Table/EmptyText.d.ts +7 -0
- package/lib/components/Table/EmptyText.js +27 -0
- package/lib/components/Table/ResizableTitle/style.less +25 -25
- package/lib/components/Table/index.d.ts +11 -83
- package/lib/components/Table/index.js +117 -288
- package/lib/components/Table/style.css +54 -44
- package/lib/components/Table/style.less +364 -345
- package/lib/components/Table/type.d.ts +63 -0
- package/lib/components/Table/type.js +8 -0
- package/lib/components/Table/util.d.ts +58 -0
- package/lib/components/Table/util.js +227 -0
- package/lib/components/Tabs/style.css +10 -10
- package/lib/components/Tabs/style.less +33 -33
- package/lib/components/TagList/Tag/style.css +5 -5
- package/lib/components/TagList/Tag/style.less +72 -72
- package/lib/components/TagList/TagSwitch/style.css +1 -1
- package/lib/components/TagList/TagSwitch/style.less +28 -28
- package/lib/components/TagList/style.css +6 -6
- package/lib/components/TagList/style.less +28 -28
- package/lib/components/Timeline/TimelineItem/style.css +1 -1
- package/lib/components/Timeline/TimelineItem/style.less +49 -49
- package/lib/components/Timeline/style.less +23 -23
- package/lib/components/TopologyChart/style.less +14 -14
- package/lib/components/Transfer/List/style.less +19 -19
- package/lib/components/Transfer/ListBody/style.less +18 -18
- package/lib/components/Transfer/style.less +14 -14
- package/lib/components/TreeSelector/style.css +21 -21
- package/lib/components/TreeSelector/style.less +56 -56
- package/lib/constants/language/datetime/en.js +4 -2
- package/lib/constants/language/datetime/type.d.ts +4 -2
- package/lib/constants/language/datetime/zh.js +4 -2
- package/lib/index.css +4726 -4702
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/index.less +56 -55
- package/lib/style/mixin.less +45 -45
- package/lib/style/theme.less +416 -416
- package/package.json +7 -4
@@ -66,11 +66,10 @@ import * as React from 'react';
|
|
66
66
|
import classnames from 'classnames';
|
67
67
|
import { observer } from 'mobx-react';
|
68
68
|
import { observable, action, computed } from 'mobx';
|
69
|
-
import { size, xor, union, unionBy, differenceBy, get, isEqual, includes, isNumber,
|
69
|
+
import { size, xor, union, unionBy, differenceBy, get, isEqual, includes, isNumber, isUndefined } from 'lodash';
|
70
70
|
import { Table as AntTable, Checkbox } from 'antd';
|
71
71
|
import { ConfigContext } from 'antd/es/config-provider';
|
72
72
|
import { toaster as toasterStore } from '@qn-pandora/app-sdk';
|
73
|
-
import { EmptyIcon } from '@qn-pandora/pandora-component-icons';
|
74
73
|
import bind from '../../utils/bind';
|
75
74
|
import { formatString } from '../../utils/language';
|
76
75
|
import { SDK_PREFIX } from '../../constants/style';
|
@@ -78,11 +77,15 @@ import { TableLocale } from '../../constants/language/table/type';
|
|
78
77
|
import { ColumnTag } from './ColumnTag/ColumnTag';
|
79
78
|
import ColumnSetting from './ColumnSetting';
|
80
79
|
import ResizableTitle from './ResizableTitle';
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
80
|
+
import EmptyText from './EmptyText';
|
81
|
+
import { addEmptyColumn, getSortAndHiddenKeys, getSortedCoulmns, getColumnKeys, getResizeColumns, getLocalSettings } from './util';
|
82
|
+
import { ETableSettingType } from './type';
|
83
|
+
export * from './type';
|
84
|
+
/**
|
85
|
+
* 表格提供自定义多选, 通过 rowSelection对象的selectedRowKeys和onChange来控制多选的状态
|
86
|
+
* 需要注意的是, 当在外部进行增删改或者外部需要控制选择状态时, 例如删除之后清空全选状态, 需要受控
|
87
|
+
* 传入selectedRowKeys值。
|
88
|
+
*/
|
86
89
|
/**
|
87
90
|
* pandora2.0风格的表格
|
88
91
|
*/
|
@@ -111,30 +114,34 @@ var Table = /** @class */ (function (_super) {
|
|
111
114
|
(lastRowSelection &&
|
112
115
|
!isEqual(lastRowSelection.selectedRowKeys, rowSelection.selectedRowKeys)))) {
|
113
116
|
var selectedRowKeys_1 = rowSelection.selectedRowKeys || [];
|
114
|
-
var
|
115
|
-
var selectedRowKeysOfCurrentPage_1 =
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
117
|
+
var _a = nextProps.dataSource, dataSource = _a === void 0 ? [] : _a;
|
118
|
+
var selectedRowKeysOfCurrentPage_1 = [];
|
119
|
+
var selectedRowsOfCurrentPage_1 = [];
|
120
|
+
dataSource.forEach(function (item, index) {
|
121
|
+
var rowKey = _this.getRowKey(item, index);
|
122
|
+
if (selectedRowKeys_1.includes(rowKey)) {
|
123
|
+
selectedRowKeysOfCurrentPage_1.push(rowKey);
|
124
|
+
selectedRowsOfCurrentPage_1.push(item);
|
125
|
+
}
|
120
126
|
});
|
121
127
|
// 数据源变化时重新设置多选框是否为全选状态或部分选中状态
|
122
|
-
this.setCheckboxStatus(
|
128
|
+
this.setCheckboxStatus(selectedRowsOfCurrentPage_1, size(nextProps.dataSource));
|
123
129
|
// 更新外部组件rowSelection状态
|
124
130
|
// this.onRowSelectionChange(selectedRowKeys, selectedRowsOfCurrentPage)
|
125
131
|
if (rowSelection && rowSelection.onChange) {
|
126
132
|
rowSelection.onChange(union(selectedRowKeysOfCurrentPage_1, selectedRowKeys_1), selectedRows && rowKey
|
127
|
-
? unionBy(
|
128
|
-
:
|
133
|
+
? unionBy(selectedRowsOfCurrentPage_1, selectedRows, rowKey)
|
134
|
+
: selectedRowsOfCurrentPage_1, { type: 'single' });
|
129
135
|
}
|
130
136
|
}
|
137
|
+
// 更新隐藏的key
|
131
138
|
if (!isEqual(nextProps.hiddenColumns, this.props.hiddenColumns)) {
|
132
139
|
this.setHiddenColumn(nextProps.hiddenColumns);
|
133
140
|
}
|
134
141
|
if (nextProps.columns !== this.props.columns) {
|
135
142
|
if ((nextProps.scroll && nextProps.draggable === true) ||
|
136
143
|
nextProps.draggable === ETableSettingType.RESIZE) {
|
137
|
-
this.
|
144
|
+
this.updateSettingFields(nextProps.columns, this.settingFields, nextProps.hiddenColumns || []);
|
138
145
|
this.setColumns(this.getResizeColumns(nextProps.columns));
|
139
146
|
}
|
140
147
|
else {
|
@@ -149,8 +156,7 @@ var Table = /** @class */ (function (_super) {
|
|
149
156
|
};
|
150
157
|
Object.defineProperty(Table.prototype, "selectedRowKeys", {
|
151
158
|
get: function () {
|
152
|
-
|
153
|
-
return (rowSelection && rowSelection.selectedRowKeys) || [];
|
159
|
+
return get(this.props.rowSelection, 'selectedRowKeys', []);
|
154
160
|
},
|
155
161
|
enumerable: false,
|
156
162
|
configurable: true
|
@@ -186,161 +192,79 @@ var Table = /** @class */ (function (_super) {
|
|
186
192
|
enumerable: false,
|
187
193
|
configurable: true
|
188
194
|
});
|
189
|
-
Object.defineProperty(Table.prototype, "emptyTextComp", {
|
190
|
-
get: function () {
|
191
|
-
var emptyText = this.props.emptyText;
|
192
|
-
if (!emptyText) {
|
193
|
-
return (React.createElement("div", { className: SDK_PREFIX + "-table-empty" },
|
194
|
-
React.createElement("div", { className: SDK_PREFIX + "-table-empty-icon" },
|
195
|
-
React.createElement(EmptyIcon, null)),
|
196
|
-
React.createElement("div", { className: SDK_PREFIX + "-table-empty-text" }, formatString(TableLocale.empty, this.context.locale))));
|
197
|
-
}
|
198
|
-
if (typeof emptyText === 'string' || typeof emptyText === 'number') {
|
199
|
-
return (React.createElement("div", { className: SDK_PREFIX + "-table-empty" },
|
200
|
-
React.createElement("div", { className: SDK_PREFIX + "-table-empty-icon" },
|
201
|
-
React.createElement(EmptyIcon, null)),
|
202
|
-
React.createElement("div", { className: SDK_PREFIX + "-table-empty-text" }, emptyText)));
|
203
|
-
}
|
204
|
-
return emptyText;
|
205
|
-
},
|
206
|
-
enumerable: false,
|
207
|
-
configurable: true
|
208
|
-
});
|
209
195
|
Object.defineProperty(Table.prototype, "columnsSettingOptions", {
|
210
196
|
// 列设置 options
|
211
197
|
get: function () {
|
212
198
|
var options = [];
|
213
199
|
var _a = this.props.columns, columns = _a === void 0 ? [] : _a;
|
214
|
-
|
215
|
-
|
200
|
+
// sortKeys 来保证数据的准确性
|
201
|
+
this.sortConfig.sortKeys.forEach(function (key) {
|
202
|
+
var target = columns.find(function (col) { var _a; return ((_a = col.key) === null || _a === void 0 ? void 0 : _a.toString()) === key; });
|
203
|
+
if (target && target.key) {
|
216
204
|
options.push({
|
217
|
-
label:
|
218
|
-
value:
|
205
|
+
label: target.colTitle || target.title,
|
206
|
+
value: target.key.toString()
|
219
207
|
});
|
220
208
|
}
|
221
209
|
});
|
222
|
-
|
223
|
-
return this.sortConfig.sortKeys
|
224
|
-
.map(function (key) { return options.find(function (option) { return option.value === key; }); })
|
225
|
-
.filter(function (f) { return !!f; });
|
210
|
+
return options;
|
226
211
|
},
|
227
212
|
enumerable: false,
|
228
213
|
configurable: true
|
229
214
|
});
|
230
215
|
Object.defineProperty(Table.prototype, "columnKeys", {
|
231
216
|
get: function () {
|
232
|
-
|
233
|
-
var allKeys = [];
|
234
|
-
var unconfigableKeys = [];
|
235
|
-
var resetKeys = [];
|
236
|
-
columns.forEach(function (col) {
|
237
|
-
if (col.key) {
|
238
|
-
// 不可配置,或者列固定的列,(在这里统称不可配置的列)
|
239
|
-
if (col.configurable === false || col.fixed) {
|
240
|
-
unconfigableKeys.push(col.key.toString());
|
241
|
-
}
|
242
|
-
else {
|
243
|
-
resetKeys.push(col.key.toString());
|
244
|
-
}
|
245
|
-
allKeys.push(col.key.toString());
|
246
|
-
}
|
247
|
-
});
|
248
|
-
return {
|
249
|
-
allKeys: allKeys,
|
250
|
-
unconfigableKeys: unconfigableKeys,
|
251
|
-
resetKeys: resetKeys
|
252
|
-
};
|
217
|
+
return getColumnKeys(this.props.columns || []);
|
253
218
|
},
|
254
219
|
enumerable: false,
|
255
220
|
configurable: true
|
256
221
|
});
|
257
222
|
Object.defineProperty(Table.prototype, "resizable", {
|
258
223
|
get: function () {
|
259
|
-
var _a,
|
260
|
-
return ((
|
261
|
-
|
262
|
-
this.props.scroll);
|
224
|
+
var _a = this.props, draggable = _a.draggable, scroll = _a.scroll;
|
225
|
+
return !!((draggable === true || draggable === ETableSettingType.RESIZE) &&
|
226
|
+
scroll);
|
263
227
|
},
|
264
228
|
enumerable: false,
|
265
229
|
configurable: true
|
266
230
|
});
|
267
231
|
Object.defineProperty(Table.prototype, "sortable", {
|
268
232
|
get: function () {
|
269
|
-
var
|
270
|
-
return
|
271
|
-
((_b = this.props) === null || _b === void 0 ? void 0 : _b.draggable) === ETableSettingType.SORT);
|
233
|
+
var draggable = this.props.draggable;
|
234
|
+
return draggable === true || draggable === ETableSettingType.SORT;
|
272
235
|
},
|
273
236
|
enumerable: false,
|
274
237
|
configurable: true
|
275
238
|
});
|
276
239
|
Object.defineProperty(Table.prototype, "showSetting", {
|
240
|
+
// 是否支持列设置按钮
|
277
241
|
get: function () {
|
278
|
-
// showColumnSetting 需要同 draggable
|
242
|
+
// showColumnSetting 需要同 draggable 配合使用
|
243
|
+
// 1、showColumnSetting = false, 不显示
|
244
|
+
// 2、draggable = sort 或者 draggable === true时才显示
|
245
|
+
// 3、draggable === resize 且 showColumnSetting = true时才显示(resize模式下必须显示设置showColumnSetting=true,才会显示列设置按钮)
|
279
246
|
var _a = this.props, showColumnSetting = _a.showColumnSetting, draggable = _a.draggable;
|
280
247
|
if (showColumnSetting === false)
|
281
248
|
return false;
|
282
249
|
if (draggable === ETableSettingType.SORT || draggable === true)
|
283
250
|
return true;
|
251
|
+
if (draggable === ETableSettingType.RESIZE && showColumnSetting === true) {
|
252
|
+
return true;
|
253
|
+
}
|
284
254
|
return false;
|
285
255
|
},
|
286
256
|
enumerable: false,
|
287
257
|
configurable: true
|
288
258
|
});
|
289
|
-
Table.prototype.updateSettingConfig = function (columns) {
|
290
|
-
this.updateSettingFields(columns, this.settingFields);
|
291
|
-
};
|
292
259
|
Table.prototype.initSettingConfig = function () {
|
293
|
-
var
|
294
|
-
var settingFields =
|
295
|
-
|
296
|
-
try {
|
297
|
-
var settingStr = localStorage.getItem(saveSettingKey);
|
298
|
-
var settingConfig = !!settingStr && JSON.parse(settingStr);
|
299
|
-
if (isArray(settingConfig)) {
|
300
|
-
settingFields = settingConfig;
|
301
|
-
}
|
302
|
-
}
|
303
|
-
catch (error) {
|
304
|
-
throw new Error("parse " + saveSettingKey + " error: " + error + ", please check the data format");
|
305
|
-
}
|
306
|
-
}
|
307
|
-
this.updateSettingFields(this.props.columns, settingFields);
|
260
|
+
var _a = this.props, saveSettingKey = _a.saveSettingKey, columns = _a.columns, _b = _a.hiddenColumns, hiddenColumns = _b === void 0 ? [] : _b;
|
261
|
+
var settingFields = getLocalSettings(saveSettingKey);
|
262
|
+
this.updateSettingFields(columns, settingFields, hiddenColumns);
|
308
263
|
};
|
309
|
-
Table.prototype.updateSettingFields = function (columns, settingFields) {
|
310
|
-
var _a =
|
311
|
-
var sortableColumns = [];
|
312
|
-
var hideKeys = [];
|
313
|
-
// 已配置的列和实际的对不上
|
314
|
-
// 可能新增或者删除列的情况
|
315
|
-
// 已配置列
|
316
|
-
// 旧类型数据为对象类型,未配置
|
317
|
-
settingFields.map(function (field) {
|
318
|
-
var find = columns.find(function (column) { var _a; return ((_a = column) === null || _a === void 0 ? void 0 : _a.dataIndex) === field.field; });
|
319
|
-
if (find) {
|
320
|
-
if (field.hide) {
|
321
|
-
hideKeys.push(field.field);
|
322
|
-
}
|
323
|
-
else {
|
324
|
-
sortableColumns.push(field);
|
325
|
-
}
|
326
|
-
}
|
327
|
-
});
|
328
|
-
// 未配置过的列
|
329
|
-
columns
|
330
|
-
.filter(function (f) { return !settingFields.find(function (field) { return field.field === f.dataIndex; }); })
|
331
|
-
.map(function (column) {
|
332
|
-
if (column.dataIndex) {
|
333
|
-
// 不是列固定,并且可配置,才可以展示拖拽
|
334
|
-
if (!(column.fixed || column.configurable === false)) {
|
335
|
-
sortableColumns.push({
|
336
|
-
field: column.dataIndex.toString(),
|
337
|
-
fixed: column.fixed
|
338
|
-
});
|
339
|
-
}
|
340
|
-
}
|
341
|
-
});
|
264
|
+
Table.prototype.updateSettingFields = function (columns, settingFields, hiddenColumns) {
|
265
|
+
var _a = getSortAndHiddenKeys(columns, settingFields, hiddenColumns), sortableColumns = _a.sortableColumns, resultHiddenColumns = _a.hiddenColumns;
|
342
266
|
this.setSortKeys(sortableColumns.map(function (t) { return t.field; }));
|
343
|
-
this.setHiddenColumn(
|
267
|
+
this.setHiddenColumn(resultHiddenColumns);
|
344
268
|
this.setSettingFields(sortableColumns);
|
345
269
|
};
|
346
270
|
// 隐藏key
|
@@ -352,75 +276,46 @@ var Table = /** @class */ (function (_super) {
|
|
352
276
|
return toasterStore.warning(formatString(TableLocale.hide_column_tooltip, this.context.locale));
|
353
277
|
}
|
354
278
|
var newSettingFields = this.settingFields.map(function (field) {
|
355
|
-
|
356
|
-
return __assign(__assign({}, field), { hide: true });
|
357
|
-
}
|
358
|
-
return __assign(__assign({}, field), { hide: false });
|
279
|
+
return __assign(__assign({}, field), { hide: includes(keys, field.field) });
|
359
280
|
});
|
360
281
|
this.setHiddenColumn(keys);
|
361
282
|
this.setSettingFields(newSettingFields);
|
362
283
|
(_b = (_a = this.props).onHiddenColumnsChange) === null || _b === void 0 ? void 0 : _b.call(_a, keys);
|
363
284
|
};
|
364
|
-
Table.prototype.getSortedColumns = function () {
|
365
|
-
var hiddenColumn = this.hiddenColumn || [];
|
366
|
-
var fixedRightColumn = [];
|
367
|
-
var fixedLeftColumn = [];
|
368
|
-
var selectedCols = [];
|
369
|
-
var unconfigurableCols = [];
|
370
|
-
var source = this.columns || [];
|
371
|
-
source.forEach(function (column) {
|
372
|
-
if (column.fixed === 'left' || column.fixed === true) {
|
373
|
-
fixedLeftColumn.push(column);
|
374
|
-
}
|
375
|
-
else if (column.fixed === 'right') {
|
376
|
-
fixedRightColumn.push(column);
|
377
|
-
}
|
378
|
-
else if (column.configurable === false) {
|
379
|
-
unconfigurableCols.push(column);
|
380
|
-
}
|
381
|
-
else if (!includes(hiddenColumn, column.key)) {
|
382
|
-
selectedCols.push(column);
|
383
|
-
}
|
384
|
-
});
|
385
|
-
// 顺序应该是: 左固定列、不可配置列、排序列、右固定列
|
386
|
-
return __spread(fixedLeftColumn, unconfigurableCols, (this.sortable ? this.sortCoulmns(selectedCols) : selectedCols), fixedRightColumn);
|
387
|
-
};
|
388
|
-
// 如果支持拖拽,在屏幕宽度大于table总的列宽的时候,添加一个空白列,宽度auto.
|
389
|
-
// 空白列添加到右固定列的前面
|
390
|
-
Table.prototype.transfromColumns = function (columns, needEmptyColumn) {
|
391
|
-
if (!this.resizable || needEmptyColumn === false)
|
392
|
-
return columns;
|
393
|
-
var cols = __spread(columns);
|
394
|
-
var firstFixedRightIndex = cols.findIndex(function (item) { return get(item, 'fixed') === 'right'; });
|
395
|
-
var column = {
|
396
|
-
title: '',
|
397
|
-
dataIndex: '__empty__',
|
398
|
-
key: '__empty__'
|
399
|
-
};
|
400
|
-
if (firstFixedRightIndex === -1) {
|
401
|
-
cols.push(column);
|
402
|
-
}
|
403
|
-
else {
|
404
|
-
cols.splice(firstFixedRightIndex, 0, column);
|
405
|
-
}
|
406
|
-
return cols;
|
407
|
-
};
|
408
285
|
Table.prototype.getColumns = function () {
|
286
|
+
// 注意: 如果没有传columns, 可能渲染的是table 的children ,无需在处理columns
|
287
|
+
/**
|
288
|
+
* <Table>
|
289
|
+
* <Table.Column title="name" dataIndex="name"></Table.Column>
|
290
|
+
* <Table.Column title="age" dataIndex="name"></Table.Column>
|
291
|
+
* </Table>
|
292
|
+
*/
|
293
|
+
if (isUndefined(this.columns))
|
294
|
+
return this.columns;
|
409
295
|
var _a = this.props, columnSettingOverlayClass = _a.columnSettingOverlayClass, needEmptyColumn = _a.needEmptyColumn;
|
410
|
-
//
|
296
|
+
// 显示列设置按钮,默认就会开启列隐藏功能
|
297
|
+
// 1、看是否支持排序, 排序 + 列隐藏, 排序用 sort 函数就行(sort 函数具有列隐藏的能力)
|
298
|
+
// 2、看是否 resize, resize + 列隐藏 可能需要添加空白列 addEmptyColumn
|
299
|
+
var allCols = __spread(this.columns);
|
411
300
|
if (!this.showSetting) {
|
412
|
-
|
301
|
+
// 如果不显示列设置按钮, 那么排序功能不支持
|
302
|
+
if (this.resizable) {
|
303
|
+
allCols = addEmptyColumn(allCols, this.hiddenColumn, this.resizable && needEmptyColumn);
|
304
|
+
}
|
305
|
+
return allCols;
|
306
|
+
}
|
307
|
+
if (this.sortable) {
|
308
|
+
allCols = getSortedCoulmns(allCols, this.sortConfig.sortKeys || [], this.hiddenColumn || []);
|
413
309
|
}
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
this.transfromColumns(allCols, needEmptyColumn);
|
310
|
+
if (this.resizable) {
|
311
|
+
allCols = addEmptyColumn(allCols, this.hiddenColumn, this.resizable && needEmptyColumn);
|
312
|
+
}
|
313
|
+
// 需要添加设置按钮
|
419
314
|
var length = allCols.length;
|
420
315
|
if (length > 0) {
|
421
316
|
var title = (React.createElement("span", { className: SDK_PREFIX + "-last-column-title" },
|
422
317
|
React.createElement("span", { className: SDK_PREFIX + "-last-column-setting" },
|
423
|
-
React.createElement(ColumnSetting, { options: columnsSettingOptions, hiddenKeys: this.hiddenColumn, onHiddenKeysChange: this.handleHideColumnsChange, onMove: this.setSortKeys, overlayClass: columnSettingOverlayClass }))));
|
318
|
+
React.createElement(ColumnSetting, { options: this.columnsSettingOptions, hiddenKeys: this.hiddenColumn, onHiddenKeysChange: this.handleHideColumnsChange, onMove: this.setSortKeys, overlayClass: columnSettingOverlayClass, sortable: this.sortable }))));
|
424
319
|
allCols.push({
|
425
320
|
title: title,
|
426
321
|
dataIndex: '__setting__',
|
@@ -434,14 +329,9 @@ var Table = /** @class */ (function (_super) {
|
|
434
329
|
Table.prototype.getRowKey = function (row, index) {
|
435
330
|
var rowKey = this.props.rowKey;
|
436
331
|
if (typeof rowKey === 'function') {
|
437
|
-
return rowKey(row, index);
|
332
|
+
return rowKey(row, index).toString();
|
438
333
|
}
|
439
|
-
return rowKey ? row
|
440
|
-
};
|
441
|
-
Table.prototype.sortCoulmns = function (columns) {
|
442
|
-
return this.sortConfig.sortKeys
|
443
|
-
.map(function (key) { return columns.find(function (column) { return column.dataIndex === key; }); })
|
444
|
-
.filter(function (f) { return !!f; });
|
334
|
+
return rowKey && typeof rowKey == 'string' ? get(row, rowKey) : index;
|
445
335
|
};
|
446
336
|
Table.prototype.setIndeterminate = function (indeterminate) {
|
447
337
|
this.indeterminate = indeterminate;
|
@@ -473,18 +363,17 @@ var Table = /** @class */ (function (_super) {
|
|
473
363
|
this.settingFields = columns;
|
474
364
|
};
|
475
365
|
// 设置全选checkout的状态
|
476
|
-
Table.prototype.setCheckboxStatus = function (selectedRowsOfCurrentPage,
|
366
|
+
Table.prototype.setCheckboxStatus = function (selectedRowsOfCurrentPage, dataSourceLength) {
|
477
367
|
if (selectedRowsOfCurrentPage === void 0) { selectedRowsOfCurrentPage = []; }
|
478
|
-
if (dataSource === void 0) { dataSource = []; }
|
479
368
|
this.setIndeterminate(!!selectedRowsOfCurrentPage.length &&
|
480
|
-
selectedRowsOfCurrentPage.length <
|
369
|
+
selectedRowsOfCurrentPage.length < dataSourceLength);
|
481
370
|
this.setCheckAll(!!selectedRowsOfCurrentPage.length &&
|
482
|
-
selectedRowsOfCurrentPage.length ===
|
371
|
+
selectedRowsOfCurrentPage.length === dataSourceLength);
|
483
372
|
};
|
484
373
|
Table.prototype.handleSelectionChange = function (selectedRowKeys, selectedRowsOfCurrentPage, info) {
|
485
374
|
var dataSource = this.props.dataSource;
|
486
375
|
// 更新CheckBox状态
|
487
|
-
this.setCheckboxStatus(selectedRowsOfCurrentPage, dataSource);
|
376
|
+
this.setCheckboxStatus(selectedRowsOfCurrentPage, size(dataSource));
|
488
377
|
// 更新外部组件rowSelection状态
|
489
378
|
this.onRowSelectionChange(selectedRowKeys, selectedRowsOfCurrentPage, info);
|
490
379
|
};
|
@@ -516,9 +405,8 @@ var Table = /** @class */ (function (_super) {
|
|
516
405
|
});
|
517
406
|
};
|
518
407
|
Table.prototype.handleBatchOptionClick = function (option) {
|
519
|
-
|
520
|
-
|
521
|
-
}
|
408
|
+
var _a;
|
409
|
+
(_a = option.onClick) === null || _a === void 0 ? void 0 : _a.call(option, this.selectedRowKeys);
|
522
410
|
};
|
523
411
|
Table.prototype.getRowClassName = function (record, index, indent) {
|
524
412
|
var rowClassName = this.props.rowClassName;
|
@@ -543,87 +431,56 @@ var Table = /** @class */ (function (_super) {
|
|
543
431
|
return noneSelected || disabled;
|
544
432
|
};
|
545
433
|
Table.prototype.handleResize = function (col, size, oldColumn) {
|
546
|
-
console.log('handleResize', col, size);
|
547
434
|
var newColumns = __spread(oldColumn);
|
435
|
+
var sizeMap = {};
|
548
436
|
newColumns.forEach(function (item) {
|
437
|
+
// 更新宽度
|
549
438
|
if (get(item, 'dataIndex') === col.dataIndex) {
|
550
439
|
item.width = size.width;
|
551
440
|
}
|
441
|
+
// 更新sizeMap
|
442
|
+
if (item.dataIndex && isNumber(item.width) && !isNaN(item.width)) {
|
443
|
+
sizeMap[item.dataIndex] = item.width;
|
444
|
+
}
|
552
445
|
});
|
553
|
-
var sizeMap = {};
|
554
446
|
var setttingFields = this.settingFields;
|
555
|
-
|
556
|
-
if (
|
557
|
-
|
558
|
-
!isNaN(element.width)) {
|
559
|
-
sizeMap[element.dataIndex] = element.width;
|
447
|
+
setttingFields.forEach(function (field) {
|
448
|
+
if (sizeMap[field.field]) {
|
449
|
+
field.width = sizeMap[field.field];
|
560
450
|
}
|
561
451
|
});
|
562
452
|
if (this.props.onSettingChange) {
|
563
|
-
setttingFields.forEach(function (field) {
|
564
|
-
if (sizeMap[field.field]) {
|
565
|
-
field.width = sizeMap[field.field];
|
566
|
-
}
|
567
|
-
});
|
568
453
|
this.props.onSettingChange(setttingFields);
|
569
454
|
}
|
570
455
|
else if (this.resizable && this.props.saveSettingKey) {
|
571
|
-
setttingFields.forEach(function (field) {
|
572
|
-
if (sizeMap[field.field]) {
|
573
|
-
field.width = sizeMap[field.field];
|
574
|
-
}
|
575
|
-
});
|
576
456
|
this.setSettingFields(setttingFields);
|
577
457
|
}
|
578
458
|
this.setColumns(newColumns);
|
579
459
|
};
|
580
460
|
Table.prototype.getResizeColumns = function (columns) {
|
581
|
-
|
582
|
-
var fields = this.settingFields;
|
583
|
-
if ((fields === null || fields === void 0 ? void 0 : fields.length) && isArray(fields)) {
|
584
|
-
columns = columns === null || columns === void 0 ? void 0 : columns.map(function (col) {
|
585
|
-
var _a;
|
586
|
-
var dataIndex = get(col, 'dataIndex');
|
587
|
-
var width = (_a = fields === null || fields === void 0 ? void 0 : fields.find(function (f) { return f.field === dataIndex; })) === null || _a === void 0 ? void 0 : _a.width;
|
588
|
-
return isNumber(width) ? __assign(__assign({}, col), { width: width }) : col;
|
589
|
-
});
|
590
|
-
}
|
591
|
-
var transformColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (it, index) {
|
592
|
-
if (get(it, 'resizable') && _this.resizable) {
|
593
|
-
return __assign(__assign({}, it), { ellipsis: {
|
594
|
-
showTitle: true
|
595
|
-
}, onHeaderCell: function (col) {
|
596
|
-
var _a;
|
597
|
-
return ({
|
598
|
-
width: col.width,
|
599
|
-
// !传入newColumn,而不传入column是因为需要拿到有onHeaderCell的值,外面collumn的变化内部监听不到
|
600
|
-
onResize: function (_, _a) {
|
601
|
-
var size = _a.size;
|
602
|
-
_this.handleResize(col, size, transformColumns);
|
603
|
-
},
|
604
|
-
isLastColumn: index === ((_a = (columns || [])) === null || _a === void 0 ? void 0 : _a.length) - 1
|
605
|
-
});
|
606
|
-
} });
|
607
|
-
}
|
608
|
-
return it;
|
609
|
-
});
|
610
|
-
return transformColumns;
|
461
|
+
return getResizeColumns(columns || [], this.settingFields, this.resizable, this.handleResize);
|
611
462
|
};
|
612
463
|
Table.prototype.componentDidMount = function () {
|
613
464
|
var _a;
|
465
|
+
var _b = this.props, columns = _b.columns, saveSettingKey = _b.saveSettingKey, _c = _b.hiddenColumns, hiddenColumns = _c === void 0 ? [] : _c;
|
466
|
+
var settingFields = getLocalSettings(saveSettingKey);
|
614
467
|
if (this.showSetting) {
|
615
|
-
this.
|
468
|
+
this.updateSettingFields(columns, settingFields, hiddenColumns);
|
469
|
+
}
|
470
|
+
else {
|
471
|
+
this.setSettingFields(settingFields);
|
616
472
|
}
|
617
|
-
this.
|
618
|
-
? this.getResizeColumns(
|
619
|
-
:
|
473
|
+
var transformColumns = this.resizable && ((_a = this.settingFields) === null || _a === void 0 ? void 0 : _a.length)
|
474
|
+
? this.getResizeColumns(columns)
|
475
|
+
: columns;
|
476
|
+
this.setColumns(transformColumns);
|
620
477
|
};
|
621
478
|
Table.prototype.render = function () {
|
622
479
|
var _a, _b;
|
623
480
|
var _this = this;
|
624
481
|
var _c = this.props, className = _c.className, batchOptions = _c.batchOptions, scroll = _c.scroll, locale = _c.locale, emptyText = _c.emptyText, columns = _c.columns, components = _c.components, draggable = _c.draggable, restProps = __rest(_c, ["className", "batchOptions", "scroll", "locale", "emptyText", "columns", "components", "draggable"]);
|
625
482
|
return (React.createElement("div", null,
|
626
|
-
React.createElement(AntTable, __assign({ scroll: scroll, locale: __assign({ emptyText: this.
|
483
|
+
React.createElement(AntTable, __assign({ scroll: scroll, locale: __assign({ emptyText: (React.createElement(EmptyText, { locale: this.context.locale, emptyText: emptyText })) }, locale), columns: this.getColumns() }, restProps, { className: classnames(SDK_PREFIX + "-table-wrapper", (_a = {}, _a[SDK_PREFIX + "-table-scrollX"] = get(scroll, 'x'), _a), (_b = {}, _b[SDK_PREFIX + "-table-scrollY"] = get(scroll, 'y'), _b), className),
|
627
484
|
// 涉及到权限
|
628
485
|
// getCheckboxProps只能放到tableBatchWrapper里,因为selectedRowKeys在那个组件计算
|
629
486
|
rowSelection: batchOptions && this.props.rowSelection
|
@@ -669,7 +526,7 @@ var Table = /** @class */ (function (_super) {
|
|
669
526
|
], Table.prototype, "hiddenColumn", void 0);
|
670
527
|
__decorate([
|
671
528
|
observable.ref,
|
672
|
-
__metadata("design:type",
|
529
|
+
__metadata("design:type", Object)
|
673
530
|
], Table.prototype, "columns", void 0);
|
674
531
|
__decorate([
|
675
532
|
observable.ref,
|
@@ -681,7 +538,7 @@ var Table = /** @class */ (function (_super) {
|
|
681
538
|
], Table.prototype, "settingFields", void 0);
|
682
539
|
__decorate([
|
683
540
|
computed,
|
684
|
-
__metadata("design:type",
|
541
|
+
__metadata("design:type", Array),
|
685
542
|
__metadata("design:paramtypes", [])
|
686
543
|
], Table.prototype, "selectedRowKeys", null);
|
687
544
|
__decorate([
|
@@ -699,11 +556,6 @@ var Table = /** @class */ (function (_super) {
|
|
699
556
|
__metadata("design:type", Object),
|
700
557
|
__metadata("design:paramtypes", [])
|
701
558
|
], Table.prototype, "keysOfCurrentPage", null);
|
702
|
-
__decorate([
|
703
|
-
computed,
|
704
|
-
__metadata("design:type", Object),
|
705
|
-
__metadata("design:paramtypes", [])
|
706
|
-
], Table.prototype, "emptyTextComp", null);
|
707
559
|
__decorate([
|
708
560
|
computed,
|
709
561
|
__metadata("design:type", Object),
|
@@ -729,13 +581,6 @@ var Table = /** @class */ (function (_super) {
|
|
729
581
|
__metadata("design:type", Object),
|
730
582
|
__metadata("design:paramtypes", [])
|
731
583
|
], Table.prototype, "showSetting", null);
|
732
|
-
__decorate([
|
733
|
-
bind,
|
734
|
-
action,
|
735
|
-
__metadata("design:type", Function),
|
736
|
-
__metadata("design:paramtypes", [Array]),
|
737
|
-
__metadata("design:returntype", void 0)
|
738
|
-
], Table.prototype, "updateSettingConfig", null);
|
739
584
|
__decorate([
|
740
585
|
bind,
|
741
586
|
action,
|
@@ -747,7 +592,7 @@ var Table = /** @class */ (function (_super) {
|
|
747
592
|
bind,
|
748
593
|
action,
|
749
594
|
__metadata("design:type", Function),
|
750
|
-
__metadata("design:paramtypes", [Array, Array]),
|
595
|
+
__metadata("design:paramtypes", [Array, Array, Array]),
|
751
596
|
__metadata("design:returntype", void 0)
|
752
597
|
], Table.prototype, "updateSettingFields", null);
|
753
598
|
__decorate([
|
@@ -756,18 +601,6 @@ var Table = /** @class */ (function (_super) {
|
|
756
601
|
__metadata("design:paramtypes", [Array]),
|
757
602
|
__metadata("design:returntype", void 0)
|
758
603
|
], Table.prototype, "handleHideColumnsChange", null);
|
759
|
-
__decorate([
|
760
|
-
bind,
|
761
|
-
__metadata("design:type", Function),
|
762
|
-
__metadata("design:paramtypes", []),
|
763
|
-
__metadata("design:returntype", void 0)
|
764
|
-
], Table.prototype, "getSortedColumns", null);
|
765
|
-
__decorate([
|
766
|
-
bind,
|
767
|
-
__metadata("design:type", Function),
|
768
|
-
__metadata("design:paramtypes", [Array, Boolean]),
|
769
|
-
__metadata("design:returntype", void 0)
|
770
|
-
], Table.prototype, "transfromColumns", null);
|
771
604
|
__decorate([
|
772
605
|
bind,
|
773
606
|
__metadata("design:type", Function),
|
@@ -780,12 +613,6 @@ var Table = /** @class */ (function (_super) {
|
|
780
613
|
__metadata("design:paramtypes", [Object, Number]),
|
781
614
|
__metadata("design:returntype", void 0)
|
782
615
|
], Table.prototype, "getRowKey", null);
|
783
|
-
__decorate([
|
784
|
-
bind,
|
785
|
-
__metadata("design:type", Function),
|
786
|
-
__metadata("design:paramtypes", [Array]),
|
787
|
-
__metadata("design:returntype", void 0)
|
788
|
-
], Table.prototype, "sortCoulmns", null);
|
789
616
|
__decorate([
|
790
617
|
bind,
|
791
618
|
action,
|
@@ -811,7 +638,7 @@ var Table = /** @class */ (function (_super) {
|
|
811
638
|
bind,
|
812
639
|
action,
|
813
640
|
__metadata("design:type", Function),
|
814
|
-
__metadata("design:paramtypes", [
|
641
|
+
__metadata("design:paramtypes", [Object]),
|
815
642
|
__metadata("design:returntype", void 0)
|
816
643
|
], Table.prototype, "setColumns", null);
|
817
644
|
__decorate([
|
@@ -831,7 +658,7 @@ var Table = /** @class */ (function (_super) {
|
|
831
658
|
__decorate([
|
832
659
|
bind,
|
833
660
|
__metadata("design:type", Function),
|
834
|
-
__metadata("design:paramtypes", [Array,
|
661
|
+
__metadata("design:paramtypes", [Array, Number]),
|
835
662
|
__metadata("design:returntype", void 0)
|
836
663
|
], Table.prototype, "setCheckboxStatus", null);
|
837
664
|
__decorate([
|