@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
@@ -48,6 +48,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
48
48
|
__setModuleDefault(result, mod);
|
49
49
|
return result;
|
50
50
|
};
|
51
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
52
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
53
|
+
};
|
51
54
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
52
55
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
53
56
|
};
|
@@ -86,7 +89,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
86
89
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
87
90
|
};
|
88
91
|
Object.defineProperty(exports, "__esModule", { value: true });
|
89
|
-
exports.ETableSettingType = void 0;
|
90
92
|
var React = __importStar(require("react"));
|
91
93
|
var classnames_1 = __importDefault(require("classnames"));
|
92
94
|
var mobx_react_1 = require("mobx-react");
|
@@ -95,7 +97,6 @@ var lodash_1 = require("lodash");
|
|
95
97
|
var antd_1 = require("antd");
|
96
98
|
var config_provider_1 = require("antd/es/config-provider");
|
97
99
|
var app_sdk_1 = require("@qn-pandora/app-sdk");
|
98
|
-
var pandora_component_icons_1 = require("@qn-pandora/pandora-component-icons");
|
99
100
|
var bind_1 = __importDefault(require("../../utils/bind"));
|
100
101
|
var language_1 = require("../../utils/language");
|
101
102
|
var style_1 = require("../../constants/style");
|
@@ -103,11 +104,15 @@ var type_1 = require("../../constants/language/table/type");
|
|
103
104
|
var ColumnTag_1 = require("./ColumnTag/ColumnTag");
|
104
105
|
var ColumnSetting_1 = __importDefault(require("./ColumnSetting"));
|
105
106
|
var ResizableTitle_1 = __importDefault(require("./ResizableTitle"));
|
106
|
-
var
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
107
|
+
var EmptyText_1 = __importDefault(require("./EmptyText"));
|
108
|
+
var util_1 = require("./util");
|
109
|
+
var type_2 = require("./type");
|
110
|
+
__exportStar(require("./type"), exports);
|
111
|
+
/**
|
112
|
+
* 表格提供自定义多选, 通过 rowSelection对象的selectedRowKeys和onChange来控制多选的状态
|
113
|
+
* 需要注意的是, 当在外部进行增删改或者外部需要控制选择状态时, 例如删除之后清空全选状态, 需要受控
|
114
|
+
* 传入selectedRowKeys值。
|
115
|
+
*/
|
111
116
|
/**
|
112
117
|
* pandora2.0风格的表格
|
113
118
|
*/
|
@@ -136,30 +141,34 @@ var Table = /** @class */ (function (_super) {
|
|
136
141
|
(lastRowSelection &&
|
137
142
|
!lodash_1.isEqual(lastRowSelection.selectedRowKeys, rowSelection.selectedRowKeys)))) {
|
138
143
|
var selectedRowKeys_1 = rowSelection.selectedRowKeys || [];
|
139
|
-
var
|
140
|
-
var selectedRowKeysOfCurrentPage_1 =
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
144
|
+
var _a = nextProps.dataSource, dataSource = _a === void 0 ? [] : _a;
|
145
|
+
var selectedRowKeysOfCurrentPage_1 = [];
|
146
|
+
var selectedRowsOfCurrentPage_1 = [];
|
147
|
+
dataSource.forEach(function (item, index) {
|
148
|
+
var rowKey = _this.getRowKey(item, index);
|
149
|
+
if (selectedRowKeys_1.includes(rowKey)) {
|
150
|
+
selectedRowKeysOfCurrentPage_1.push(rowKey);
|
151
|
+
selectedRowsOfCurrentPage_1.push(item);
|
152
|
+
}
|
145
153
|
});
|
146
154
|
// 数据源变化时重新设置多选框是否为全选状态或部分选中状态
|
147
|
-
this.setCheckboxStatus(
|
155
|
+
this.setCheckboxStatus(selectedRowsOfCurrentPage_1, lodash_1.size(nextProps.dataSource));
|
148
156
|
// 更新外部组件rowSelection状态
|
149
157
|
// this.onRowSelectionChange(selectedRowKeys, selectedRowsOfCurrentPage)
|
150
158
|
if (rowSelection && rowSelection.onChange) {
|
151
159
|
rowSelection.onChange(lodash_1.union(selectedRowKeysOfCurrentPage_1, selectedRowKeys_1), selectedRows && rowKey
|
152
|
-
? lodash_1.unionBy(
|
153
|
-
:
|
160
|
+
? lodash_1.unionBy(selectedRowsOfCurrentPage_1, selectedRows, rowKey)
|
161
|
+
: selectedRowsOfCurrentPage_1, { type: 'single' });
|
154
162
|
}
|
155
163
|
}
|
164
|
+
// 更新隐藏的key
|
156
165
|
if (!lodash_1.isEqual(nextProps.hiddenColumns, this.props.hiddenColumns)) {
|
157
166
|
this.setHiddenColumn(nextProps.hiddenColumns);
|
158
167
|
}
|
159
168
|
if (nextProps.columns !== this.props.columns) {
|
160
169
|
if ((nextProps.scroll && nextProps.draggable === true) ||
|
161
|
-
nextProps.draggable === ETableSettingType.RESIZE) {
|
162
|
-
this.
|
170
|
+
nextProps.draggable === type_2.ETableSettingType.RESIZE) {
|
171
|
+
this.updateSettingFields(nextProps.columns, this.settingFields, nextProps.hiddenColumns || []);
|
163
172
|
this.setColumns(this.getResizeColumns(nextProps.columns));
|
164
173
|
}
|
165
174
|
else {
|
@@ -174,8 +183,7 @@ var Table = /** @class */ (function (_super) {
|
|
174
183
|
};
|
175
184
|
Object.defineProperty(Table.prototype, "selectedRowKeys", {
|
176
185
|
get: function () {
|
177
|
-
|
178
|
-
return (rowSelection && rowSelection.selectedRowKeys) || [];
|
186
|
+
return lodash_1.get(this.props.rowSelection, 'selectedRowKeys', []);
|
179
187
|
},
|
180
188
|
enumerable: false,
|
181
189
|
configurable: true
|
@@ -211,161 +219,79 @@ var Table = /** @class */ (function (_super) {
|
|
211
219
|
enumerable: false,
|
212
220
|
configurable: true
|
213
221
|
});
|
214
|
-
Object.defineProperty(Table.prototype, "emptyTextComp", {
|
215
|
-
get: function () {
|
216
|
-
var emptyText = this.props.emptyText;
|
217
|
-
if (!emptyText) {
|
218
|
-
return (React.createElement("div", { className: style_1.SDK_PREFIX + "-table-empty" },
|
219
|
-
React.createElement("div", { className: style_1.SDK_PREFIX + "-table-empty-icon" },
|
220
|
-
React.createElement(pandora_component_icons_1.EmptyIcon, null)),
|
221
|
-
React.createElement("div", { className: style_1.SDK_PREFIX + "-table-empty-text" }, language_1.formatString(type_1.TableLocale.empty, this.context.locale))));
|
222
|
-
}
|
223
|
-
if (typeof emptyText === 'string' || typeof emptyText === 'number') {
|
224
|
-
return (React.createElement("div", { className: style_1.SDK_PREFIX + "-table-empty" },
|
225
|
-
React.createElement("div", { className: style_1.SDK_PREFIX + "-table-empty-icon" },
|
226
|
-
React.createElement(pandora_component_icons_1.EmptyIcon, null)),
|
227
|
-
React.createElement("div", { className: style_1.SDK_PREFIX + "-table-empty-text" }, emptyText)));
|
228
|
-
}
|
229
|
-
return emptyText;
|
230
|
-
},
|
231
|
-
enumerable: false,
|
232
|
-
configurable: true
|
233
|
-
});
|
234
222
|
Object.defineProperty(Table.prototype, "columnsSettingOptions", {
|
235
223
|
// 列设置 options
|
236
224
|
get: function () {
|
237
225
|
var options = [];
|
238
226
|
var _a = this.props.columns, columns = _a === void 0 ? [] : _a;
|
239
|
-
|
240
|
-
|
227
|
+
// sortKeys 来保证数据的准确性
|
228
|
+
this.sortConfig.sortKeys.forEach(function (key) {
|
229
|
+
var target = columns.find(function (col) { var _a; return ((_a = col.key) === null || _a === void 0 ? void 0 : _a.toString()) === key; });
|
230
|
+
if (target && target.key) {
|
241
231
|
options.push({
|
242
|
-
label:
|
243
|
-
value:
|
232
|
+
label: target.colTitle || target.title,
|
233
|
+
value: target.key.toString()
|
244
234
|
});
|
245
235
|
}
|
246
236
|
});
|
247
|
-
|
248
|
-
return this.sortConfig.sortKeys
|
249
|
-
.map(function (key) { return options.find(function (option) { return option.value === key; }); })
|
250
|
-
.filter(function (f) { return !!f; });
|
237
|
+
return options;
|
251
238
|
},
|
252
239
|
enumerable: false,
|
253
240
|
configurable: true
|
254
241
|
});
|
255
242
|
Object.defineProperty(Table.prototype, "columnKeys", {
|
256
243
|
get: function () {
|
257
|
-
|
258
|
-
var allKeys = [];
|
259
|
-
var unconfigableKeys = [];
|
260
|
-
var resetKeys = [];
|
261
|
-
columns.forEach(function (col) {
|
262
|
-
if (col.key) {
|
263
|
-
// 不可配置,或者列固定的列,(在这里统称不可配置的列)
|
264
|
-
if (col.configurable === false || col.fixed) {
|
265
|
-
unconfigableKeys.push(col.key.toString());
|
266
|
-
}
|
267
|
-
else {
|
268
|
-
resetKeys.push(col.key.toString());
|
269
|
-
}
|
270
|
-
allKeys.push(col.key.toString());
|
271
|
-
}
|
272
|
-
});
|
273
|
-
return {
|
274
|
-
allKeys: allKeys,
|
275
|
-
unconfigableKeys: unconfigableKeys,
|
276
|
-
resetKeys: resetKeys
|
277
|
-
};
|
244
|
+
return util_1.getColumnKeys(this.props.columns || []);
|
278
245
|
},
|
279
246
|
enumerable: false,
|
280
247
|
configurable: true
|
281
248
|
});
|
282
249
|
Object.defineProperty(Table.prototype, "resizable", {
|
283
250
|
get: function () {
|
284
|
-
var _a,
|
285
|
-
return ((
|
286
|
-
|
287
|
-
this.props.scroll);
|
251
|
+
var _a = this.props, draggable = _a.draggable, scroll = _a.scroll;
|
252
|
+
return !!((draggable === true || draggable === type_2.ETableSettingType.RESIZE) &&
|
253
|
+
scroll);
|
288
254
|
},
|
289
255
|
enumerable: false,
|
290
256
|
configurable: true
|
291
257
|
});
|
292
258
|
Object.defineProperty(Table.prototype, "sortable", {
|
293
259
|
get: function () {
|
294
|
-
var
|
295
|
-
return
|
296
|
-
((_b = this.props) === null || _b === void 0 ? void 0 : _b.draggable) === ETableSettingType.SORT);
|
260
|
+
var draggable = this.props.draggable;
|
261
|
+
return draggable === true || draggable === type_2.ETableSettingType.SORT;
|
297
262
|
},
|
298
263
|
enumerable: false,
|
299
264
|
configurable: true
|
300
265
|
});
|
301
266
|
Object.defineProperty(Table.prototype, "showSetting", {
|
267
|
+
// 是否支持列设置按钮
|
302
268
|
get: function () {
|
303
|
-
// showColumnSetting 需要同 draggable
|
269
|
+
// showColumnSetting 需要同 draggable 配合使用
|
270
|
+
// 1、showColumnSetting = false, 不显示
|
271
|
+
// 2、draggable = sort 或者 draggable === true时才显示
|
272
|
+
// 3、draggable === resize 且 showColumnSetting = true时才显示(resize模式下必须显示设置showColumnSetting=true,才会显示列设置按钮)
|
304
273
|
var _a = this.props, showColumnSetting = _a.showColumnSetting, draggable = _a.draggable;
|
305
274
|
if (showColumnSetting === false)
|
306
275
|
return false;
|
307
|
-
if (draggable === ETableSettingType.SORT || draggable === true)
|
276
|
+
if (draggable === type_2.ETableSettingType.SORT || draggable === true)
|
308
277
|
return true;
|
278
|
+
if (draggable === type_2.ETableSettingType.RESIZE && showColumnSetting === true) {
|
279
|
+
return true;
|
280
|
+
}
|
309
281
|
return false;
|
310
282
|
},
|
311
283
|
enumerable: false,
|
312
284
|
configurable: true
|
313
285
|
});
|
314
|
-
Table.prototype.updateSettingConfig = function (columns) {
|
315
|
-
this.updateSettingFields(columns, this.settingFields);
|
316
|
-
};
|
317
286
|
Table.prototype.initSettingConfig = function () {
|
318
|
-
var
|
319
|
-
var settingFields =
|
320
|
-
|
321
|
-
try {
|
322
|
-
var settingStr = localStorage.getItem(saveSettingKey);
|
323
|
-
var settingConfig = !!settingStr && JSON.parse(settingStr);
|
324
|
-
if (lodash_1.isArray(settingConfig)) {
|
325
|
-
settingFields = settingConfig;
|
326
|
-
}
|
327
|
-
}
|
328
|
-
catch (error) {
|
329
|
-
throw new Error("parse " + saveSettingKey + " error: " + error + ", please check the data format");
|
330
|
-
}
|
331
|
-
}
|
332
|
-
this.updateSettingFields(this.props.columns, settingFields);
|
287
|
+
var _a = this.props, saveSettingKey = _a.saveSettingKey, columns = _a.columns, _b = _a.hiddenColumns, hiddenColumns = _b === void 0 ? [] : _b;
|
288
|
+
var settingFields = util_1.getLocalSettings(saveSettingKey);
|
289
|
+
this.updateSettingFields(columns, settingFields, hiddenColumns);
|
333
290
|
};
|
334
|
-
Table.prototype.updateSettingFields = function (columns, settingFields) {
|
335
|
-
var _a =
|
336
|
-
var sortableColumns = [];
|
337
|
-
var hideKeys = [];
|
338
|
-
// 已配置的列和实际的对不上
|
339
|
-
// 可能新增或者删除列的情况
|
340
|
-
// 已配置列
|
341
|
-
// 旧类型数据为对象类型,未配置
|
342
|
-
settingFields.map(function (field) {
|
343
|
-
var find = columns.find(function (column) { var _a; return ((_a = column) === null || _a === void 0 ? void 0 : _a.dataIndex) === field.field; });
|
344
|
-
if (find) {
|
345
|
-
if (field.hide) {
|
346
|
-
hideKeys.push(field.field);
|
347
|
-
}
|
348
|
-
else {
|
349
|
-
sortableColumns.push(field);
|
350
|
-
}
|
351
|
-
}
|
352
|
-
});
|
353
|
-
// 未配置过的列
|
354
|
-
columns
|
355
|
-
.filter(function (f) { return !settingFields.find(function (field) { return field.field === f.dataIndex; }); })
|
356
|
-
.map(function (column) {
|
357
|
-
if (column.dataIndex) {
|
358
|
-
// 不是列固定,并且可配置,才可以展示拖拽
|
359
|
-
if (!(column.fixed || column.configurable === false)) {
|
360
|
-
sortableColumns.push({
|
361
|
-
field: column.dataIndex.toString(),
|
362
|
-
fixed: column.fixed
|
363
|
-
});
|
364
|
-
}
|
365
|
-
}
|
366
|
-
});
|
291
|
+
Table.prototype.updateSettingFields = function (columns, settingFields, hiddenColumns) {
|
292
|
+
var _a = util_1.getSortAndHiddenKeys(columns, settingFields, hiddenColumns), sortableColumns = _a.sortableColumns, resultHiddenColumns = _a.hiddenColumns;
|
367
293
|
this.setSortKeys(sortableColumns.map(function (t) { return t.field; }));
|
368
|
-
this.setHiddenColumn(
|
294
|
+
this.setHiddenColumn(resultHiddenColumns);
|
369
295
|
this.setSettingFields(sortableColumns);
|
370
296
|
};
|
371
297
|
// 隐藏key
|
@@ -377,75 +303,46 @@ var Table = /** @class */ (function (_super) {
|
|
377
303
|
return app_sdk_1.toaster.warning(language_1.formatString(type_1.TableLocale.hide_column_tooltip, this.context.locale));
|
378
304
|
}
|
379
305
|
var newSettingFields = this.settingFields.map(function (field) {
|
380
|
-
|
381
|
-
return __assign(__assign({}, field), { hide: true });
|
382
|
-
}
|
383
|
-
return __assign(__assign({}, field), { hide: false });
|
306
|
+
return __assign(__assign({}, field), { hide: lodash_1.includes(keys, field.field) });
|
384
307
|
});
|
385
308
|
this.setHiddenColumn(keys);
|
386
309
|
this.setSettingFields(newSettingFields);
|
387
310
|
(_b = (_a = this.props).onHiddenColumnsChange) === null || _b === void 0 ? void 0 : _b.call(_a, keys);
|
388
311
|
};
|
389
|
-
Table.prototype.getSortedColumns = function () {
|
390
|
-
var hiddenColumn = this.hiddenColumn || [];
|
391
|
-
var fixedRightColumn = [];
|
392
|
-
var fixedLeftColumn = [];
|
393
|
-
var selectedCols = [];
|
394
|
-
var unconfigurableCols = [];
|
395
|
-
var source = this.columns || [];
|
396
|
-
source.forEach(function (column) {
|
397
|
-
if (column.fixed === 'left' || column.fixed === true) {
|
398
|
-
fixedLeftColumn.push(column);
|
399
|
-
}
|
400
|
-
else if (column.fixed === 'right') {
|
401
|
-
fixedRightColumn.push(column);
|
402
|
-
}
|
403
|
-
else if (column.configurable === false) {
|
404
|
-
unconfigurableCols.push(column);
|
405
|
-
}
|
406
|
-
else if (!lodash_1.includes(hiddenColumn, column.key)) {
|
407
|
-
selectedCols.push(column);
|
408
|
-
}
|
409
|
-
});
|
410
|
-
// 顺序应该是: 左固定列、不可配置列、排序列、右固定列
|
411
|
-
return __spread(fixedLeftColumn, unconfigurableCols, (this.sortable ? this.sortCoulmns(selectedCols) : selectedCols), fixedRightColumn);
|
412
|
-
};
|
413
|
-
// 如果支持拖拽,在屏幕宽度大于table总的列宽的时候,添加一个空白列,宽度auto.
|
414
|
-
// 空白列添加到右固定列的前面
|
415
|
-
Table.prototype.transfromColumns = function (columns, needEmptyColumn) {
|
416
|
-
if (!this.resizable || needEmptyColumn === false)
|
417
|
-
return columns;
|
418
|
-
var cols = __spread(columns);
|
419
|
-
var firstFixedRightIndex = cols.findIndex(function (item) { return lodash_1.get(item, 'fixed') === 'right'; });
|
420
|
-
var column = {
|
421
|
-
title: '',
|
422
|
-
dataIndex: '__empty__',
|
423
|
-
key: '__empty__'
|
424
|
-
};
|
425
|
-
if (firstFixedRightIndex === -1) {
|
426
|
-
cols.push(column);
|
427
|
-
}
|
428
|
-
else {
|
429
|
-
cols.splice(firstFixedRightIndex, 0, column);
|
430
|
-
}
|
431
|
-
return cols;
|
432
|
-
};
|
433
312
|
Table.prototype.getColumns = function () {
|
313
|
+
// 注意: 如果没有传columns, 可能渲染的是table 的children ,无需在处理columns
|
314
|
+
/**
|
315
|
+
* <Table>
|
316
|
+
* <Table.Column title="name" dataIndex="name"></Table.Column>
|
317
|
+
* <Table.Column title="age" dataIndex="name"></Table.Column>
|
318
|
+
* </Table>
|
319
|
+
*/
|
320
|
+
if (lodash_1.isUndefined(this.columns))
|
321
|
+
return this.columns;
|
434
322
|
var _a = this.props, columnSettingOverlayClass = _a.columnSettingOverlayClass, needEmptyColumn = _a.needEmptyColumn;
|
435
|
-
//
|
323
|
+
// 显示列设置按钮,默认就会开启列隐藏功能
|
324
|
+
// 1、看是否支持排序, 排序 + 列隐藏, 排序用 sort 函数就行(sort 函数具有列隐藏的能力)
|
325
|
+
// 2、看是否 resize, resize + 列隐藏 可能需要添加空白列 addEmptyColumn
|
326
|
+
var allCols = __spread(this.columns);
|
436
327
|
if (!this.showSetting) {
|
437
|
-
|
328
|
+
// 如果不显示列设置按钮, 那么排序功能不支持
|
329
|
+
if (this.resizable) {
|
330
|
+
allCols = util_1.addEmptyColumn(allCols, this.hiddenColumn, this.resizable && needEmptyColumn);
|
331
|
+
}
|
332
|
+
return allCols;
|
333
|
+
}
|
334
|
+
if (this.sortable) {
|
335
|
+
allCols = util_1.getSortedCoulmns(allCols, this.sortConfig.sortKeys || [], this.hiddenColumn || []);
|
438
336
|
}
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
this.transfromColumns(allCols, needEmptyColumn);
|
337
|
+
if (this.resizable) {
|
338
|
+
allCols = util_1.addEmptyColumn(allCols, this.hiddenColumn, this.resizable && needEmptyColumn);
|
339
|
+
}
|
340
|
+
// 需要添加设置按钮
|
444
341
|
var length = allCols.length;
|
445
342
|
if (length > 0) {
|
446
343
|
var title = (React.createElement("span", { className: style_1.SDK_PREFIX + "-last-column-title" },
|
447
344
|
React.createElement("span", { className: style_1.SDK_PREFIX + "-last-column-setting" },
|
448
|
-
React.createElement(ColumnSetting_1.default, { options: columnsSettingOptions, hiddenKeys: this.hiddenColumn, onHiddenKeysChange: this.handleHideColumnsChange, onMove: this.setSortKeys, overlayClass: columnSettingOverlayClass }))));
|
345
|
+
React.createElement(ColumnSetting_1.default, { options: this.columnsSettingOptions, hiddenKeys: this.hiddenColumn, onHiddenKeysChange: this.handleHideColumnsChange, onMove: this.setSortKeys, overlayClass: columnSettingOverlayClass, sortable: this.sortable }))));
|
449
346
|
allCols.push({
|
450
347
|
title: title,
|
451
348
|
dataIndex: '__setting__',
|
@@ -459,14 +356,9 @@ var Table = /** @class */ (function (_super) {
|
|
459
356
|
Table.prototype.getRowKey = function (row, index) {
|
460
357
|
var rowKey = this.props.rowKey;
|
461
358
|
if (typeof rowKey === 'function') {
|
462
|
-
return rowKey(row, index);
|
359
|
+
return rowKey(row, index).toString();
|
463
360
|
}
|
464
|
-
return rowKey ? row
|
465
|
-
};
|
466
|
-
Table.prototype.sortCoulmns = function (columns) {
|
467
|
-
return this.sortConfig.sortKeys
|
468
|
-
.map(function (key) { return columns.find(function (column) { return column.dataIndex === key; }); })
|
469
|
-
.filter(function (f) { return !!f; });
|
361
|
+
return rowKey && typeof rowKey == 'string' ? lodash_1.get(row, rowKey) : index;
|
470
362
|
};
|
471
363
|
Table.prototype.setIndeterminate = function (indeterminate) {
|
472
364
|
this.indeterminate = indeterminate;
|
@@ -498,18 +390,17 @@ var Table = /** @class */ (function (_super) {
|
|
498
390
|
this.settingFields = columns;
|
499
391
|
};
|
500
392
|
// 设置全选checkout的状态
|
501
|
-
Table.prototype.setCheckboxStatus = function (selectedRowsOfCurrentPage,
|
393
|
+
Table.prototype.setCheckboxStatus = function (selectedRowsOfCurrentPage, dataSourceLength) {
|
502
394
|
if (selectedRowsOfCurrentPage === void 0) { selectedRowsOfCurrentPage = []; }
|
503
|
-
if (dataSource === void 0) { dataSource = []; }
|
504
395
|
this.setIndeterminate(!!selectedRowsOfCurrentPage.length &&
|
505
|
-
selectedRowsOfCurrentPage.length <
|
396
|
+
selectedRowsOfCurrentPage.length < dataSourceLength);
|
506
397
|
this.setCheckAll(!!selectedRowsOfCurrentPage.length &&
|
507
|
-
selectedRowsOfCurrentPage.length ===
|
398
|
+
selectedRowsOfCurrentPage.length === dataSourceLength);
|
508
399
|
};
|
509
400
|
Table.prototype.handleSelectionChange = function (selectedRowKeys, selectedRowsOfCurrentPage, info) {
|
510
401
|
var dataSource = this.props.dataSource;
|
511
402
|
// 更新CheckBox状态
|
512
|
-
this.setCheckboxStatus(selectedRowsOfCurrentPage, dataSource);
|
403
|
+
this.setCheckboxStatus(selectedRowsOfCurrentPage, lodash_1.size(dataSource));
|
513
404
|
// 更新外部组件rowSelection状态
|
514
405
|
this.onRowSelectionChange(selectedRowKeys, selectedRowsOfCurrentPage, info);
|
515
406
|
};
|
@@ -541,9 +432,8 @@ var Table = /** @class */ (function (_super) {
|
|
541
432
|
});
|
542
433
|
};
|
543
434
|
Table.prototype.handleBatchOptionClick = function (option) {
|
544
|
-
|
545
|
-
|
546
|
-
}
|
435
|
+
var _a;
|
436
|
+
(_a = option.onClick) === null || _a === void 0 ? void 0 : _a.call(option, this.selectedRowKeys);
|
547
437
|
};
|
548
438
|
Table.prototype.getRowClassName = function (record, index, indent) {
|
549
439
|
var rowClassName = this.props.rowClassName;
|
@@ -568,87 +458,56 @@ var Table = /** @class */ (function (_super) {
|
|
568
458
|
return noneSelected || disabled;
|
569
459
|
};
|
570
460
|
Table.prototype.handleResize = function (col, size, oldColumn) {
|
571
|
-
console.log('handleResize', col, size);
|
572
461
|
var newColumns = __spread(oldColumn);
|
462
|
+
var sizeMap = {};
|
573
463
|
newColumns.forEach(function (item) {
|
464
|
+
// 更新宽度
|
574
465
|
if (lodash_1.get(item, 'dataIndex') === col.dataIndex) {
|
575
466
|
item.width = size.width;
|
576
467
|
}
|
468
|
+
// 更新sizeMap
|
469
|
+
if (item.dataIndex && lodash_1.isNumber(item.width) && !isNaN(item.width)) {
|
470
|
+
sizeMap[item.dataIndex] = item.width;
|
471
|
+
}
|
577
472
|
});
|
578
|
-
var sizeMap = {};
|
579
473
|
var setttingFields = this.settingFields;
|
580
|
-
|
581
|
-
if (
|
582
|
-
|
583
|
-
!isNaN(element.width)) {
|
584
|
-
sizeMap[element.dataIndex] = element.width;
|
474
|
+
setttingFields.forEach(function (field) {
|
475
|
+
if (sizeMap[field.field]) {
|
476
|
+
field.width = sizeMap[field.field];
|
585
477
|
}
|
586
478
|
});
|
587
479
|
if (this.props.onSettingChange) {
|
588
|
-
setttingFields.forEach(function (field) {
|
589
|
-
if (sizeMap[field.field]) {
|
590
|
-
field.width = sizeMap[field.field];
|
591
|
-
}
|
592
|
-
});
|
593
480
|
this.props.onSettingChange(setttingFields);
|
594
481
|
}
|
595
482
|
else if (this.resizable && this.props.saveSettingKey) {
|
596
|
-
setttingFields.forEach(function (field) {
|
597
|
-
if (sizeMap[field.field]) {
|
598
|
-
field.width = sizeMap[field.field];
|
599
|
-
}
|
600
|
-
});
|
601
483
|
this.setSettingFields(setttingFields);
|
602
484
|
}
|
603
485
|
this.setColumns(newColumns);
|
604
486
|
};
|
605
487
|
Table.prototype.getResizeColumns = function (columns) {
|
606
|
-
|
607
|
-
var fields = this.settingFields;
|
608
|
-
if ((fields === null || fields === void 0 ? void 0 : fields.length) && lodash_1.isArray(fields)) {
|
609
|
-
columns = columns === null || columns === void 0 ? void 0 : columns.map(function (col) {
|
610
|
-
var _a;
|
611
|
-
var dataIndex = lodash_1.get(col, 'dataIndex');
|
612
|
-
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;
|
613
|
-
return lodash_1.isNumber(width) ? __assign(__assign({}, col), { width: width }) : col;
|
614
|
-
});
|
615
|
-
}
|
616
|
-
var transformColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (it, index) {
|
617
|
-
if (lodash_1.get(it, 'resizable') && _this.resizable) {
|
618
|
-
return __assign(__assign({}, it), { ellipsis: {
|
619
|
-
showTitle: true
|
620
|
-
}, onHeaderCell: function (col) {
|
621
|
-
var _a;
|
622
|
-
return ({
|
623
|
-
width: col.width,
|
624
|
-
// !传入newColumn,而不传入column是因为需要拿到有onHeaderCell的值,外面collumn的变化内部监听不到
|
625
|
-
onResize: function (_, _a) {
|
626
|
-
var size = _a.size;
|
627
|
-
_this.handleResize(col, size, transformColumns);
|
628
|
-
},
|
629
|
-
isLastColumn: index === ((_a = (columns || [])) === null || _a === void 0 ? void 0 : _a.length) - 1
|
630
|
-
});
|
631
|
-
} });
|
632
|
-
}
|
633
|
-
return it;
|
634
|
-
});
|
635
|
-
return transformColumns;
|
488
|
+
return util_1.getResizeColumns(columns || [], this.settingFields, this.resizable, this.handleResize);
|
636
489
|
};
|
637
490
|
Table.prototype.componentDidMount = function () {
|
638
491
|
var _a;
|
492
|
+
var _b = this.props, columns = _b.columns, saveSettingKey = _b.saveSettingKey, _c = _b.hiddenColumns, hiddenColumns = _c === void 0 ? [] : _c;
|
493
|
+
var settingFields = util_1.getLocalSettings(saveSettingKey);
|
639
494
|
if (this.showSetting) {
|
640
|
-
this.
|
495
|
+
this.updateSettingFields(columns, settingFields, hiddenColumns);
|
496
|
+
}
|
497
|
+
else {
|
498
|
+
this.setSettingFields(settingFields);
|
641
499
|
}
|
642
|
-
this.
|
643
|
-
? this.getResizeColumns(
|
644
|
-
:
|
500
|
+
var transformColumns = this.resizable && ((_a = this.settingFields) === null || _a === void 0 ? void 0 : _a.length)
|
501
|
+
? this.getResizeColumns(columns)
|
502
|
+
: columns;
|
503
|
+
this.setColumns(transformColumns);
|
645
504
|
};
|
646
505
|
Table.prototype.render = function () {
|
647
506
|
var _a, _b;
|
648
507
|
var _this = this;
|
649
508
|
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"]);
|
650
509
|
return (React.createElement("div", null,
|
651
|
-
React.createElement(antd_1.Table, __assign({ scroll: scroll, locale: __assign({ emptyText: this.
|
510
|
+
React.createElement(antd_1.Table, __assign({ scroll: scroll, locale: __assign({ emptyText: (React.createElement(EmptyText_1.default, { locale: this.context.locale, emptyText: emptyText })) }, locale), columns: this.getColumns() }, restProps, { className: classnames_1.default(style_1.SDK_PREFIX + "-table-wrapper", (_a = {}, _a[style_1.SDK_PREFIX + "-table-scrollX"] = lodash_1.get(scroll, 'x'), _a), (_b = {}, _b[style_1.SDK_PREFIX + "-table-scrollY"] = lodash_1.get(scroll, 'y'), _b), className),
|
652
511
|
// 涉及到权限
|
653
512
|
// getCheckboxProps只能放到tableBatchWrapper里,因为selectedRowKeys在那个组件计算
|
654
513
|
rowSelection: batchOptions && this.props.rowSelection
|
@@ -694,7 +553,7 @@ var Table = /** @class */ (function (_super) {
|
|
694
553
|
], Table.prototype, "hiddenColumn", void 0);
|
695
554
|
__decorate([
|
696
555
|
mobx_1.observable.ref,
|
697
|
-
__metadata("design:type",
|
556
|
+
__metadata("design:type", Object)
|
698
557
|
], Table.prototype, "columns", void 0);
|
699
558
|
__decorate([
|
700
559
|
mobx_1.observable.ref,
|
@@ -706,7 +565,7 @@ var Table = /** @class */ (function (_super) {
|
|
706
565
|
], Table.prototype, "settingFields", void 0);
|
707
566
|
__decorate([
|
708
567
|
mobx_1.computed,
|
709
|
-
__metadata("design:type",
|
568
|
+
__metadata("design:type", Array),
|
710
569
|
__metadata("design:paramtypes", [])
|
711
570
|
], Table.prototype, "selectedRowKeys", null);
|
712
571
|
__decorate([
|
@@ -724,11 +583,6 @@ var Table = /** @class */ (function (_super) {
|
|
724
583
|
__metadata("design:type", Object),
|
725
584
|
__metadata("design:paramtypes", [])
|
726
585
|
], Table.prototype, "keysOfCurrentPage", null);
|
727
|
-
__decorate([
|
728
|
-
mobx_1.computed,
|
729
|
-
__metadata("design:type", Object),
|
730
|
-
__metadata("design:paramtypes", [])
|
731
|
-
], Table.prototype, "emptyTextComp", null);
|
732
586
|
__decorate([
|
733
587
|
mobx_1.computed,
|
734
588
|
__metadata("design:type", Object),
|
@@ -754,13 +608,6 @@ var Table = /** @class */ (function (_super) {
|
|
754
608
|
__metadata("design:type", Object),
|
755
609
|
__metadata("design:paramtypes", [])
|
756
610
|
], Table.prototype, "showSetting", null);
|
757
|
-
__decorate([
|
758
|
-
bind_1.default,
|
759
|
-
mobx_1.action,
|
760
|
-
__metadata("design:type", Function),
|
761
|
-
__metadata("design:paramtypes", [Array]),
|
762
|
-
__metadata("design:returntype", void 0)
|
763
|
-
], Table.prototype, "updateSettingConfig", null);
|
764
611
|
__decorate([
|
765
612
|
bind_1.default,
|
766
613
|
mobx_1.action,
|
@@ -772,7 +619,7 @@ var Table = /** @class */ (function (_super) {
|
|
772
619
|
bind_1.default,
|
773
620
|
mobx_1.action,
|
774
621
|
__metadata("design:type", Function),
|
775
|
-
__metadata("design:paramtypes", [Array, Array]),
|
622
|
+
__metadata("design:paramtypes", [Array, Array, Array]),
|
776
623
|
__metadata("design:returntype", void 0)
|
777
624
|
], Table.prototype, "updateSettingFields", null);
|
778
625
|
__decorate([
|
@@ -781,18 +628,6 @@ var Table = /** @class */ (function (_super) {
|
|
781
628
|
__metadata("design:paramtypes", [Array]),
|
782
629
|
__metadata("design:returntype", void 0)
|
783
630
|
], Table.prototype, "handleHideColumnsChange", null);
|
784
|
-
__decorate([
|
785
|
-
bind_1.default,
|
786
|
-
__metadata("design:type", Function),
|
787
|
-
__metadata("design:paramtypes", []),
|
788
|
-
__metadata("design:returntype", void 0)
|
789
|
-
], Table.prototype, "getSortedColumns", null);
|
790
|
-
__decorate([
|
791
|
-
bind_1.default,
|
792
|
-
__metadata("design:type", Function),
|
793
|
-
__metadata("design:paramtypes", [Array, Boolean]),
|
794
|
-
__metadata("design:returntype", void 0)
|
795
|
-
], Table.prototype, "transfromColumns", null);
|
796
631
|
__decorate([
|
797
632
|
bind_1.default,
|
798
633
|
__metadata("design:type", Function),
|
@@ -805,12 +640,6 @@ var Table = /** @class */ (function (_super) {
|
|
805
640
|
__metadata("design:paramtypes", [Object, Number]),
|
806
641
|
__metadata("design:returntype", void 0)
|
807
642
|
], Table.prototype, "getRowKey", null);
|
808
|
-
__decorate([
|
809
|
-
bind_1.default,
|
810
|
-
__metadata("design:type", Function),
|
811
|
-
__metadata("design:paramtypes", [Array]),
|
812
|
-
__metadata("design:returntype", void 0)
|
813
|
-
], Table.prototype, "sortCoulmns", null);
|
814
643
|
__decorate([
|
815
644
|
bind_1.default,
|
816
645
|
mobx_1.action,
|
@@ -836,7 +665,7 @@ var Table = /** @class */ (function (_super) {
|
|
836
665
|
bind_1.default,
|
837
666
|
mobx_1.action,
|
838
667
|
__metadata("design:type", Function),
|
839
|
-
__metadata("design:paramtypes", [
|
668
|
+
__metadata("design:paramtypes", [Object]),
|
840
669
|
__metadata("design:returntype", void 0)
|
841
670
|
], Table.prototype, "setColumns", null);
|
842
671
|
__decorate([
|
@@ -856,7 +685,7 @@ var Table = /** @class */ (function (_super) {
|
|
856
685
|
__decorate([
|
857
686
|
bind_1.default,
|
858
687
|
__metadata("design:type", Function),
|
859
|
-
__metadata("design:paramtypes", [Array,
|
688
|
+
__metadata("design:paramtypes", [Array, Number]),
|
860
689
|
__metadata("design:returntype", void 0)
|
861
690
|
], Table.prototype, "setCheckboxStatus", null);
|
862
691
|
__decorate([
|