@qn-pandora/pandora-component 5.0.2 → 5.1.1

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.
Files changed (105) hide show
  1. package/es/components/AutoComplete/index.js +2 -2
  2. package/es/components/AutoComplete/style.css +110 -22
  3. package/es/components/Breadcrumb/style.css +13 -3
  4. package/es/components/Button/style.css +215 -109
  5. package/es/components/Card/RowExtra/style.css +6 -0
  6. package/es/components/Card/style.css +50 -55
  7. package/es/components/CheckTransformList/style.css +327 -103
  8. package/es/components/Checkbox/style.css +5 -0
  9. package/es/components/CheckboxList/style.css +5 -0
  10. package/es/components/Collapse/style.css +34 -2
  11. package/es/components/DateTimePicker/Base/style.css +446 -56
  12. package/es/components/DateTimePicker/DisplayInput/style.css +218 -40
  13. package/es/components/DateTimePicker/index.js +1 -1
  14. package/es/components/DateTimePicker/style.css +77 -46
  15. package/es/components/Descriptions/style.css +77 -46
  16. package/es/components/Drawer/index.d.ts +6 -6
  17. package/es/components/Drawer/index.js +4 -4
  18. package/es/components/Drawer/style.css +244 -169
  19. package/es/components/Drawer/style.less +8 -0
  20. package/es/components/FileResumable/style.css +12 -42
  21. package/es/components/Input/index.d.ts +1 -1
  22. package/es/components/Input/style.css +218 -40
  23. package/es/components/Menu/style.css +16 -7
  24. package/es/components/Modal/style.css +10 -7
  25. package/es/components/NameLimiter/index.js +1 -1
  26. package/es/components/NameLimiter/style.css +83 -55
  27. package/es/components/OptionList/InlineOptionList/style.css +21 -8
  28. package/es/components/OptionList/OptionItem/style.css +83 -55
  29. package/es/components/OptionList/PopoverOptionList/index.js +1 -1
  30. package/es/components/OptionList/PopoverOptionList/style.css +77 -46
  31. package/es/components/OptionList/style.css +181 -109
  32. package/es/components/RadioGroup/style.css +27 -16
  33. package/es/components/RangeInput/style.css +581 -64
  34. package/es/components/RemarkName/style.css +83 -55
  35. package/es/components/Selector/style.css +110 -22
  36. package/es/components/Spin/style.css +8 -6
  37. package/es/components/Steps/style.css +43 -5
  38. package/es/components/Table/ColumnSetting/style.css +2 -5
  39. package/es/components/Table/ColumnSetting/style.less +2 -3
  40. package/es/components/Table/index.d.ts +12 -9
  41. package/es/components/Table/index.js +73 -84
  42. package/es/components/Table/style.css +99 -61
  43. package/es/components/Tabs/style.css +117 -68
  44. package/es/components/TopologyChart/index.d.ts +7 -0
  45. package/es/components/TopologyChart/index.js +19 -0
  46. package/es/components/TopologyChart/style.css +14 -0
  47. package/es/components/TopologyChart/style.less +14 -0
  48. package/es/components/TreeSelector/style.css +21 -9
  49. package/es/index.css +4134 -3054
  50. package/es/index.d.ts +1 -0
  51. package/es/index.js +1 -0
  52. package/es/index.less +16 -15
  53. package/lib/components/AutoComplete/index.js +2 -2
  54. package/lib/components/AutoComplete/style.css +110 -22
  55. package/lib/components/Breadcrumb/style.css +13 -3
  56. package/lib/components/Button/style.css +215 -109
  57. package/lib/components/Card/RowExtra/style.css +6 -0
  58. package/lib/components/Card/style.css +50 -55
  59. package/lib/components/CheckTransformList/style.css +327 -103
  60. package/lib/components/Checkbox/style.css +5 -0
  61. package/lib/components/CheckboxList/style.css +5 -0
  62. package/lib/components/Collapse/style.css +34 -2
  63. package/lib/components/DateTimePicker/Base/style.css +446 -56
  64. package/lib/components/DateTimePicker/DisplayInput/style.css +218 -40
  65. package/lib/components/DateTimePicker/index.js +1 -1
  66. package/lib/components/DateTimePicker/style.css +77 -46
  67. package/lib/components/Descriptions/style.css +77 -46
  68. package/lib/components/Drawer/index.d.ts +6 -6
  69. package/lib/components/Drawer/index.js +4 -4
  70. package/lib/components/Drawer/style.css +244 -169
  71. package/lib/components/Drawer/style.less +8 -0
  72. package/lib/components/FileResumable/style.css +12 -42
  73. package/lib/components/Input/index.d.ts +1 -1
  74. package/lib/components/Input/style.css +218 -40
  75. package/lib/components/Menu/style.css +16 -7
  76. package/lib/components/Modal/style.css +10 -7
  77. package/lib/components/NameLimiter/index.js +1 -1
  78. package/lib/components/NameLimiter/style.css +83 -55
  79. package/lib/components/OptionList/InlineOptionList/style.css +21 -8
  80. package/lib/components/OptionList/OptionItem/style.css +83 -55
  81. package/lib/components/OptionList/PopoverOptionList/index.js +1 -1
  82. package/lib/components/OptionList/PopoverOptionList/style.css +77 -46
  83. package/lib/components/OptionList/style.css +181 -109
  84. package/lib/components/RadioGroup/style.css +27 -16
  85. package/lib/components/RangeInput/style.css +581 -64
  86. package/lib/components/RemarkName/style.css +83 -55
  87. package/lib/components/Selector/style.css +110 -22
  88. package/lib/components/Spin/style.css +8 -6
  89. package/lib/components/Steps/style.css +43 -5
  90. package/lib/components/Table/ColumnSetting/style.css +2 -5
  91. package/lib/components/Table/ColumnSetting/style.less +2 -3
  92. package/lib/components/Table/index.d.ts +12 -9
  93. package/lib/components/Table/index.js +73 -84
  94. package/lib/components/Table/style.css +99 -61
  95. package/lib/components/Tabs/style.css +117 -68
  96. package/lib/components/TopologyChart/index.d.ts +7 -0
  97. package/lib/components/TopologyChart/index.js +28 -0
  98. package/lib/components/TopologyChart/style.css +14 -0
  99. package/lib/components/TopologyChart/style.less +14 -0
  100. package/lib/components/TreeSelector/style.css +21 -9
  101. package/lib/index.css +10899 -9819
  102. package/lib/index.d.ts +1 -0
  103. package/lib/index.js +6 -1
  104. package/lib/index.less +23 -22
  105. package/package.json +7 -6
@@ -1,7 +1,6 @@
1
1
  .pandora-sdk-table-column-setting-popover {
2
2
  padding: 10px;
3
3
  width: 100%;
4
- width: 600px;
5
4
  max-height: 300px;
6
5
  overflow-y: auto;
7
6
  }
@@ -29,9 +28,6 @@
29
28
  flex-wrap: wrap;
30
29
  }
31
30
  .pandora-sdk-table-column-setting-content > div {
32
- -webkit-box-flex: 0;
33
- -ms-flex: 0 0 33.33%;
34
- flex: 0 0 33.33%;
35
31
  -webkit-box-sizing: border-box;
36
32
  box-sizing: border-box;
37
33
  position: relative;
@@ -48,7 +44,8 @@
48
44
  cursor: move;
49
45
  }
50
46
  .pandora-sdk-table-column-setting-content > div .pandora-sdk-table-column-setting-checkbox-container .pandora-sdk-table-column-setting-checkbox {
51
- width: 120px;
47
+ width: 100%;
48
+ min-width: 120px;
52
49
  overflow: hidden;
53
50
  }
54
51
  .pandora-sdk-table-column-setting-content > div .pandora-sdk-table-column-setting-checkbox-container .pandora-sdk-table-column-setting-checkbox > span:nth-child(2) {
@@ -3,7 +3,6 @@
3
3
  .@{sdk-prefix}-table-column-setting-popover {
4
4
  padding: 10px;
5
5
  width: 100%;
6
- width: 600px;
7
6
  .@{sdk-prefix}-table-column-setting-header {
8
7
  border-bottom: 1px solid @border-color-base;
9
8
  display: flex;
@@ -29,7 +28,6 @@
29
28
  }
30
29
 
31
30
  .@{sdk-prefix}-table-column-setting-content > div {
32
- flex: 0 0 33.33%;
33
31
  box-sizing: border-box;
34
32
  position: relative;
35
33
  overflow: hidden;
@@ -41,7 +39,8 @@
41
39
  cursor: move;
42
40
  }
43
41
  .@{sdk-prefix}-table-column-setting-checkbox {
44
- width: 120px;
42
+ width: 100%;
43
+ min-width: 120px;
45
44
  overflow: hidden;
46
45
  }
47
46
  .@{sdk-prefix}-table-column-setting-checkbox > span:nth-child(2) {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { TableProps, ColumnType, ColumnGroupType } from 'antd/es/table';
3
- import { TableRowSelection } from 'antd/es/table/interface';
3
+ import type { TableRowSelection, RowSelectMethod } from 'antd/es/table/interface';
4
4
  import { IOption } from './ColumnSetting';
5
5
  /**
6
6
  * 表格提供自定义多选, 通过 rowSelection对象的selectedRowKeys和onChange来控制多选的状态
@@ -85,8 +85,6 @@ declare class Table<T = any> extends React.Component<ITableProps<T>, any> {
85
85
  columns: IKeyValues[];
86
86
  sortConfig: {
87
87
  sortKeys: string[];
88
- fixedRightKeys: string[];
89
- fixedLeftKeys: string[];
90
88
  };
91
89
  settingFields: ISaveFieldItem[];
92
90
  UNSAFE_componentWillReceiveProps(nextProps: ITableProps<T>): void;
@@ -104,11 +102,14 @@ declare class Table<T = any> extends React.Component<ITableProps<T>, any> {
104
102
  };
105
103
  get resizable(): false | ({
106
104
  x?: string | number | true | undefined;
107
- y?: string | number | undefined;
105
+ y?: string | number | undefined; /**
106
+ * 禁用当前操作
107
+ */
108
108
  } & {
109
109
  scrollToFirstRowOnChange?: boolean | undefined;
110
110
  }) | undefined;
111
111
  get sortable(): boolean;
112
+ get showSetting(): boolean;
112
113
  updateSettingConfig(columns: Array<IColumnType<T>>): void;
113
114
  initSettingConfig(): void;
114
115
  updateSettingFields(columns: Array<IColumnType<T>>, settingFields: ISaveFieldItem[]): void;
@@ -117,18 +118,20 @@ declare class Table<T = any> extends React.Component<ITableProps<T>, any> {
117
118
  transfromColumns(columns: IKeyValues[], needEmptyColumn?: boolean): IKeyValues<any>[];
118
119
  getColumns(): IKeyValues<any>[];
119
120
  getRowKey(row: any, index: number): any;
120
- getSortCoulmns(columns: IKeyValues[]): IKeyValues<any>[];
121
+ sortCoulmns(columns: IKeyValues[]): IKeyValues<any>[];
121
122
  setIndeterminate(indeterminate: boolean): void;
122
123
  setCheckAll(checkAll: boolean): void;
123
124
  setHiddenColumn(hiddenColumn?: string[]): void;
124
125
  setColumns(columns: IKeyValues[]): void;
125
126
  setSortKeys(columns: string[]): void;
126
127
  setSettingFields(columns: ISaveFieldItem[]): void;
127
- setFixedRightKeys(columns: string[]): void;
128
- setFixedLeftKeys(columns: string[]): void;
129
128
  setCheckboxStatus(selectedRowsOfCurrentPage?: T[], dataSource?: T[]): void;
130
- handleSelectionChange(selectedRowKeys: React.Key[], selectedRowsOfCurrentPage: any[]): void;
131
- onRowSelectionChange(selectedRowKeys: React.Key[], selectedRowsOfCurrentPage: any[]): void;
129
+ handleSelectionChange(selectedRowKeys: React.Key[], selectedRowsOfCurrentPage: any[], info: {
130
+ type: RowSelectMethod;
131
+ }): void;
132
+ onRowSelectionChange(selectedRowKeys: React.Key[], selectedRowsOfCurrentPage: any[], info: {
133
+ type: RowSelectMethod;
134
+ }): void;
132
135
  handleCheckAllChange(e: any): void;
133
136
  handleBatchOptionClick(option: IOptionItem): void;
134
137
  getRowClassName(record: any, index: number, indent: number): string;
@@ -95,9 +95,7 @@ var Table = /** @class */ (function (_super) {
95
95
  _this.hiddenColumn = _this.props.hiddenColumns;
96
96
  _this.columns = [];
97
97
  _this.sortConfig = {
98
- sortKeys: [],
99
- fixedRightKeys: [],
100
- fixedLeftKeys: []
98
+ sortKeys: []
101
99
  };
102
100
  _this.settingFields = [];
103
101
  return _this;
@@ -127,7 +125,7 @@ var Table = /** @class */ (function (_super) {
127
125
  if (rowSelection && rowSelection.onChange) {
128
126
  rowSelection.onChange(union(selectedRowKeysOfCurrentPage_1, selectedRowKeys_1), selectedRows && rowKey
129
127
  ? unionBy(selectedRowsOfCurrentPage, selectedRows, rowKey)
130
- : selectedRowsOfCurrentPage);
128
+ : selectedRowsOfCurrentPage, { type: 'single' });
131
129
  }
132
130
  }
133
131
  if (!isEqual(nextProps.hiddenColumns, this.props.hiddenColumns)) {
@@ -214,15 +212,14 @@ var Table = /** @class */ (function (_super) {
214
212
  var options = [];
215
213
  var _a = this.props.columns, columns = _a === void 0 ? [] : _a;
216
214
  columns.forEach(function (col) {
217
- if (col.key &&
218
- col.key.toString().length > 0 &&
219
- col.configurable !== false) {
215
+ if (col.key && col.key.toString().length > 0) {
220
216
  options.push({
221
217
  label: col.colTitle || col.title,
222
218
  value: col.key.toString()
223
219
  });
224
220
  }
225
221
  });
222
+ // sortKeys 来保证数据的准确性
226
223
  return this.sortConfig.sortKeys
227
224
  .map(function (key) { return options.find(function (option) { return option.value === key; }); })
228
225
  .filter(function (f) { return !!f; });
@@ -238,7 +235,8 @@ var Table = /** @class */ (function (_super) {
238
235
  var resetKeys = [];
239
236
  columns.forEach(function (col) {
240
237
  if (col.key) {
241
- if (col.configurable === false) {
238
+ // 不可配置,或者列固定的列,(在这里统称不可配置的列)
239
+ if (col.configurable === false || col.fixed) {
242
240
  unconfigableKeys.push(col.key.toString());
243
241
  }
244
242
  else {
@@ -275,6 +273,19 @@ var Table = /** @class */ (function (_super) {
275
273
  enumerable: false,
276
274
  configurable: true
277
275
  });
276
+ Object.defineProperty(Table.prototype, "showSetting", {
277
+ get: function () {
278
+ // showColumnSetting 需要同 draggable 配合使用, 如果设置不显示列设置按钮, 则不需要显示,其他时候只有 draggable = sort 或者 draggable === true时才显示,
279
+ var _a = this.props, showColumnSetting = _a.showColumnSetting, draggable = _a.draggable;
280
+ if (showColumnSetting === false)
281
+ return false;
282
+ if (draggable === ETableSettingType.SORT || draggable === true)
283
+ return true;
284
+ return false;
285
+ },
286
+ enumerable: false,
287
+ configurable: true
288
+ });
278
289
  Table.prototype.updateSettingConfig = function (columns) {
279
290
  this.updateSettingFields(columns, this.settingFields);
280
291
  };
@@ -282,10 +293,15 @@ var Table = /** @class */ (function (_super) {
282
293
  var saveSettingKey = this.props.saveSettingKey;
283
294
  var settingFields = [];
284
295
  if (saveSettingKey) {
285
- var settingStr = localStorage.getItem(saveSettingKey);
286
- var settingConfig = !!settingStr && JSON.parse(settingStr);
287
- if (isArray(settingConfig)) {
288
- settingFields = settingConfig;
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");
289
305
  }
290
306
  }
291
307
  this.updateSettingFields(this.props.columns, settingFields);
@@ -293,12 +309,9 @@ var Table = /** @class */ (function (_super) {
293
309
  Table.prototype.updateSettingFields = function (columns, settingFields) {
294
310
  var _a = this.props.hiddenColumns, hiddenColumns = _a === void 0 ? [] : _a;
295
311
  var sortableColumns = [];
296
- var leftColumns = [];
297
- var rightColumns = [];
298
312
  var hideKeys = [];
299
313
  // 已配置的列和实际的对不上
300
314
  // 可能新增或者删除列的情况
301
- var newSettingFields = [];
302
315
  // 已配置列
303
316
  // 旧类型数据为对象类型,未配置
304
317
  settingFields.map(function (field) {
@@ -307,14 +320,8 @@ var Table = /** @class */ (function (_super) {
307
320
  if (field.hide) {
308
321
  hideKeys.push(field.field);
309
322
  }
310
- if (!find.fixed) {
311
- sortableColumns.push(field);
312
- }
313
- else if (find.fixed === 'left' || find.fixed === true) {
314
- leftColumns.push(field);
315
- }
316
323
  else {
317
- rightColumns.push(field);
324
+ sortableColumns.push(field);
318
325
  }
319
326
  }
320
327
  });
@@ -323,32 +330,18 @@ var Table = /** @class */ (function (_super) {
323
330
  .filter(function (f) { return !settingFields.find(function (field) { return field.field === f.dataIndex; }); })
324
331
  .map(function (column) {
325
332
  if (column.dataIndex) {
326
- if (!column.fixed) {
333
+ // 不是列固定,并且可配置,才可以展示拖拽
334
+ if (!(column.fixed || column.configurable === false)) {
327
335
  sortableColumns.push({
328
336
  field: column.dataIndex.toString(),
329
337
  fixed: column.fixed
330
338
  });
331
339
  }
332
- else if (column.fixed === 'left' || column.fixed === true) {
333
- leftColumns.push({
334
- field: column.dataIndex.toString(),
335
- fixed: column.fixed
336
- });
337
- }
338
- else {
339
- rightColumns.push({
340
- field: column.dataIndex.toString(),
341
- fixed: column.fixed
342
- });
343
- }
344
340
  }
345
341
  });
346
- this.setFixedLeftKeys(leftColumns.map(function (t) { return t.field; }));
347
- this.setFixedRightKeys(rightColumns.map(function (t) { return t.field; }));
348
342
  this.setSortKeys(sortableColumns.map(function (t) { return t.field; }));
349
343
  this.setHiddenColumn(__spread(new Set(__spread(hiddenColumns, hideKeys))));
350
- newSettingFields = __spread(leftColumns, sortableColumns, rightColumns);
351
- this.setSettingFields(newSettingFields);
344
+ this.setSettingFields(sortableColumns);
352
345
  };
353
346
  // 隐藏key
354
347
  Table.prototype.handleHideColumnsChange = function (keys) {
@@ -369,21 +362,28 @@ var Table = /** @class */ (function (_super) {
369
362
  (_b = (_a = this.props).onHiddenColumnsChange) === null || _b === void 0 ? void 0 : _b.call(_a, keys);
370
363
  };
371
364
  Table.prototype.getSortedColumns = function () {
372
- var _this = this;
373
365
  var hiddenColumn = this.hiddenColumn || [];
374
- var selectedCols = __spread((this.columns || []).filter(function (item) {
375
- if (item.configurable === false || !includes(hiddenColumn, item.key)) {
376
- return true;
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);
377
383
  }
378
- return false;
379
- }));
380
- var fixedRightColumn = this.columns.filter(function (column) {
381
- return includes(_this.sortConfig.fixedRightKeys, column.key);
382
- });
383
- var fixedLeftColumn = this.columns.filter(function (column) {
384
- return includes(_this.sortConfig.fixedLeftKeys, column.key);
385
384
  });
386
- return __spread(fixedLeftColumn, this.getSortCoulmns(selectedCols), fixedRightColumn);
385
+ // 顺序应该是: 左固定列、不可配置列、排序列、右固定列
386
+ return __spread(fixedLeftColumn, unconfigurableCols, (this.sortable ? this.sortCoulmns(selectedCols) : selectedCols), fixedRightColumn);
387
387
  };
388
388
  // 如果支持拖拽,在屏幕宽度大于table总的列宽的时候,添加一个空白列,宽度auto.
389
389
  // 空白列添加到右固定列的前面
@@ -406,12 +406,14 @@ var Table = /** @class */ (function (_super) {
406
406
  return cols;
407
407
  };
408
408
  Table.prototype.getColumns = function () {
409
- var _a = this.props, showColumnSetting = _a.showColumnSetting, columnSettingOverlayClass = _a.columnSettingOverlayClass, needEmptyColumn = _a.needEmptyColumn;
410
- if (!showColumnSetting) {
409
+ var _a = this.props, columnSettingOverlayClass = _a.columnSettingOverlayClass, needEmptyColumn = _a.needEmptyColumn;
410
+ // 如果不显示列设置按钮,直接返回columns
411
+ if (!this.showSetting) {
411
412
  return this.transfromColumns(this.columns, needEmptyColumn);
412
413
  }
413
414
  // 获取到列设置的options
414
415
  var columnsSettingOptions = this.columnsSettingOptions;
416
+ // 列排序或者列隐藏
415
417
  var allCols = this.getSortedColumns();
416
418
  this.transfromColumns(allCols, needEmptyColumn);
417
419
  var length = allCols.length;
@@ -436,7 +438,7 @@ var Table = /** @class */ (function (_super) {
436
438
  }
437
439
  return rowKey ? row[rowKey] : index;
438
440
  };
439
- Table.prototype.getSortCoulmns = function (columns) {
441
+ Table.prototype.sortCoulmns = function (columns) {
440
442
  return this.sortConfig.sortKeys
441
443
  .map(function (key) { return columns.find(function (column) { return column.dataIndex === key; }); })
442
444
  .filter(function (f) { return !!f; });
@@ -470,12 +472,6 @@ var Table = /** @class */ (function (_super) {
470
472
  Table.prototype.setSettingFields = function (columns) {
471
473
  this.settingFields = columns;
472
474
  };
473
- Table.prototype.setFixedRightKeys = function (columns) {
474
- this.sortConfig = __assign(__assign({}, this.sortConfig), { fixedRightKeys: columns });
475
- };
476
- Table.prototype.setFixedLeftKeys = function (columns) {
477
- this.sortConfig = __assign(__assign({}, this.sortConfig), { fixedLeftKeys: columns });
478
- };
479
475
  // 设置全选checkout的状态
480
476
  Table.prototype.setCheckboxStatus = function (selectedRowsOfCurrentPage, dataSource) {
481
477
  if (selectedRowsOfCurrentPage === void 0) { selectedRowsOfCurrentPage = []; }
@@ -485,24 +481,24 @@ var Table = /** @class */ (function (_super) {
485
481
  this.setCheckAll(!!selectedRowsOfCurrentPage.length &&
486
482
  selectedRowsOfCurrentPage.length === size(dataSource));
487
483
  };
488
- Table.prototype.handleSelectionChange = function (selectedRowKeys, selectedRowsOfCurrentPage) {
484
+ Table.prototype.handleSelectionChange = function (selectedRowKeys, selectedRowsOfCurrentPage, info) {
489
485
  var dataSource = this.props.dataSource;
490
486
  // 更新CheckBox状态
491
487
  this.setCheckboxStatus(selectedRowsOfCurrentPage, dataSource);
492
488
  // 更新外部组件rowSelection状态
493
- this.onRowSelectionChange(selectedRowKeys, selectedRowsOfCurrentPage);
489
+ this.onRowSelectionChange(selectedRowKeys, selectedRowsOfCurrentPage, info);
494
490
  };
495
- Table.prototype.onRowSelectionChange = function (selectedRowKeys, selectedRowsOfCurrentPage) {
491
+ Table.prototype.onRowSelectionChange = function (selectedRowKeys, selectedRowsOfCurrentPage, info) {
496
492
  var _a = this.props, rowSelection = _a.rowSelection, selectedRows = _a.selectedRows, rowKey = _a.rowKey, dataSource = _a.dataSource;
497
493
  if (rowSelection && rowSelection.onChange) {
498
494
  if (selectedRows && rowKey) {
499
495
  var a = differenceBy(dataSource, selectedRowsOfCurrentPage, rowKey);
500
496
  var b = differenceBy(selectedRows, a, rowKey);
501
497
  var rows = unionBy(b, selectedRowsOfCurrentPage, rowKey);
502
- rowSelection.onChange(selectedRowKeys, rows);
498
+ rowSelection.onChange(selectedRowKeys, rows, info);
503
499
  }
504
500
  else {
505
- rowSelection.onChange(selectedRowKeys, selectedRowsOfCurrentPage);
501
+ rowSelection.onChange(selectedRowKeys, selectedRowsOfCurrentPage, info);
506
502
  }
507
503
  }
508
504
  };
@@ -515,7 +511,9 @@ var Table = /** @class */ (function (_super) {
515
511
  : xor(selectedRowKeys, this.keysOfCurrentPage);
516
512
  this.setCheckAll(e.target.checked);
517
513
  this.setIndeterminate(false);
518
- this.onRowSelectionChange(selectedRowKeys, currentRows);
514
+ this.onRowSelectionChange(selectedRowKeys, currentRows, {
515
+ type: selectedRowKeys.length > 0 ? 'all' : 'none'
516
+ });
519
517
  };
520
518
  Table.prototype.handleBatchOptionClick = function (option) {
521
519
  if (option.onClick) {
@@ -613,7 +611,7 @@ var Table = /** @class */ (function (_super) {
613
611
  };
614
612
  Table.prototype.componentDidMount = function () {
615
613
  var _a;
616
- if (this.sortable || this.resizable) {
614
+ if (this.showSetting) {
617
615
  this.initSettingConfig();
618
616
  }
619
617
  this.setColumns(this.resizable && ((_a = this.settingFields) === null || _a === void 0 ? void 0 : _a.length)
@@ -726,6 +724,11 @@ var Table = /** @class */ (function (_super) {
726
724
  __metadata("design:type", Object),
727
725
  __metadata("design:paramtypes", [])
728
726
  ], Table.prototype, "sortable", null);
727
+ __decorate([
728
+ computed,
729
+ __metadata("design:type", Object),
730
+ __metadata("design:paramtypes", [])
731
+ ], Table.prototype, "showSetting", null);
729
732
  __decorate([
730
733
  bind,
731
734
  action,
@@ -782,7 +785,7 @@ var Table = /** @class */ (function (_super) {
782
785
  __metadata("design:type", Function),
783
786
  __metadata("design:paramtypes", [Array]),
784
787
  __metadata("design:returntype", void 0)
785
- ], Table.prototype, "getSortCoulmns", null);
788
+ ], Table.prototype, "sortCoulmns", null);
786
789
  __decorate([
787
790
  bind,
788
791
  action,
@@ -825,20 +828,6 @@ var Table = /** @class */ (function (_super) {
825
828
  __metadata("design:paramtypes", [Array]),
826
829
  __metadata("design:returntype", void 0)
827
830
  ], Table.prototype, "setSettingFields", null);
828
- __decorate([
829
- bind,
830
- action,
831
- __metadata("design:type", Function),
832
- __metadata("design:paramtypes", [Array]),
833
- __metadata("design:returntype", void 0)
834
- ], Table.prototype, "setFixedRightKeys", null);
835
- __decorate([
836
- bind,
837
- action,
838
- __metadata("design:type", Function),
839
- __metadata("design:paramtypes", [Array]),
840
- __metadata("design:returntype", void 0)
841
- ], Table.prototype, "setFixedLeftKeys", null);
842
831
  __decorate([
843
832
  bind,
844
833
  __metadata("design:type", Function),
@@ -848,13 +837,13 @@ var Table = /** @class */ (function (_super) {
848
837
  __decorate([
849
838
  bind,
850
839
  __metadata("design:type", Function),
851
- __metadata("design:paramtypes", [Array, Array]),
840
+ __metadata("design:paramtypes", [Array, Array, Object]),
852
841
  __metadata("design:returntype", void 0)
853
842
  ], Table.prototype, "handleSelectionChange", null);
854
843
  __decorate([
855
844
  bind,
856
845
  __metadata("design:type", Function),
857
- __metadata("design:paramtypes", [Array, Array]),
846
+ __metadata("design:paramtypes", [Array, Array, Object]),
858
847
  __metadata("design:returntype", void 0)
859
848
  ], Table.prototype, "onRowSelectionChange", null);
860
849
  __decorate([