@ucloud-fe/react-components 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/main.min.js +8 -8
- package/lib/components/AutoComplete/AutoComplete.d.ts +1 -1
- package/lib/components/AutoComplete/AutoComplete.js +3 -1
- package/lib/components/Message/method.js +36 -17
- package/lib/components/Steps/Step.js +13 -5
- package/lib/components/Steps/StepIcon.js +3 -1
- package/lib/components/Steps/Steps.js +75 -15
- package/lib/components/Steps/style/index.js +69 -30
- package/lib/components/Table/ColumnConfigButton.js +1 -0
- package/lib/components/Table/Table.js +29 -19
- package/lib/components/Table/style/index.js +19 -18
- package/lib/libs/rc-table/ColGroup.js +6 -2
- package/lib/libs/rc-table/utils.d.ts +1 -0
- package/lib/libs/rc-table/utils.js +5 -1
- package/package.json +1 -1
|
@@ -235,6 +235,7 @@ var ColumnConfigButton = /*#__PURE__*/function (_PureComponent2) {
|
|
|
235
235
|
modalProps = _this$props3.modalProps,
|
|
236
236
|
rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
237
237
|
return /*#__PURE__*/_react.default.createElement(_style.ColumnConfigWrap, rest, /*#__PURE__*/_react.default.createElement(_style.ColumnConfigButtonWrap, {
|
|
238
|
+
shape: "square",
|
|
238
239
|
icon: /*#__PURE__*/_react.default.createElement(_SvgIcon.default, {
|
|
239
240
|
type: "cog",
|
|
240
241
|
size: "14px"
|
|
@@ -472,7 +472,8 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
472
472
|
return /*#__PURE__*/_react.default.createElement(_style.FilterIcon, {
|
|
473
473
|
key: "icon",
|
|
474
474
|
type: "filter",
|
|
475
|
-
active: active
|
|
475
|
+
active: active,
|
|
476
|
+
disabled: rest.disabled
|
|
476
477
|
});
|
|
477
478
|
}.bind(this),
|
|
478
479
|
multiple: multiple
|
|
@@ -1006,7 +1007,8 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1006
1007
|
"data-row-key": rowKey,
|
|
1007
1008
|
onMouseEnter: _this2.setDraggable,
|
|
1008
1009
|
onMouseLeave: _this2.unsetDraggable,
|
|
1009
|
-
className: _style.draggerCls
|
|
1010
|
+
className: _style.draggerCls,
|
|
1011
|
+
"data-testid": "draggable"
|
|
1010
1012
|
}, /*#__PURE__*/_react.default.createElement(_SvgIcon.default, {
|
|
1011
1013
|
type: "dragger",
|
|
1012
1014
|
size: "16px"
|
|
@@ -1138,8 +1140,16 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1138
1140
|
}.bind(this);
|
|
1139
1141
|
|
|
1140
1142
|
_this2.onDragEnd = function (source) {
|
|
1143
|
+
var _this29 = this;
|
|
1144
|
+
|
|
1141
1145
|
(0, _newArrowCheck2.default)(this, _this3);
|
|
1142
1146
|
|
|
1147
|
+
_this2.getTableDom().querySelectorAll('.uc-fe-table-row').forEach(function (row) {
|
|
1148
|
+
(0, _newArrowCheck2.default)(this, _this29);
|
|
1149
|
+
row.classList.remove(_style.dragOverDownCls);
|
|
1150
|
+
row.classList.remove(_style.dragOverUpCls);
|
|
1151
|
+
}.bind(this));
|
|
1152
|
+
|
|
1143
1153
|
_this2.initDrag(source);
|
|
1144
1154
|
}.bind(this);
|
|
1145
1155
|
|
|
@@ -1191,7 +1201,7 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1191
1201
|
}.bind(this);
|
|
1192
1202
|
|
|
1193
1203
|
_this2.renderSearchInfo = function (option) {
|
|
1194
|
-
var
|
|
1204
|
+
var _this30 = this;
|
|
1195
1205
|
|
|
1196
1206
|
(0, _newArrowCheck2.default)(this, _this3);
|
|
1197
1207
|
var filters = option.filters,
|
|
@@ -1201,15 +1211,15 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1201
1211
|
var first = true;
|
|
1202
1212
|
|
|
1203
1213
|
var renderLabel = function renderLabel(_ref5) {
|
|
1204
|
-
var
|
|
1214
|
+
var _this31 = this;
|
|
1205
1215
|
|
|
1206
|
-
(0, _newArrowCheck2.default)(this,
|
|
1216
|
+
(0, _newArrowCheck2.default)(this, _this30);
|
|
1207
1217
|
var value = _ref5.value,
|
|
1208
1218
|
_ref5$column$filter = _ref5.column.filter,
|
|
1209
1219
|
multiple = _ref5$column$filter.multiple,
|
|
1210
1220
|
options = _ref5$column$filter.options;
|
|
1211
1221
|
options = options.map(function (option) {
|
|
1212
|
-
(0, _newArrowCheck2.default)(this,
|
|
1222
|
+
(0, _newArrowCheck2.default)(this, _this31);
|
|
1213
1223
|
return !(0, _isObject2.default)(option) ? {
|
|
1214
1224
|
value: option,
|
|
1215
1225
|
label: option
|
|
@@ -1218,23 +1228,23 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1218
1228
|
|
|
1219
1229
|
if (multiple) {
|
|
1220
1230
|
var label = (0, _map2.default)(value, function (v) {
|
|
1221
|
-
var
|
|
1231
|
+
var _this32 = this;
|
|
1222
1232
|
|
|
1223
|
-
(0, _newArrowCheck2.default)(this,
|
|
1233
|
+
(0, _newArrowCheck2.default)(this, _this31);
|
|
1224
1234
|
var option = (0, _find2.default)(options, function (option) {
|
|
1225
|
-
(0, _newArrowCheck2.default)(this,
|
|
1235
|
+
(0, _newArrowCheck2.default)(this, _this32);
|
|
1226
1236
|
return v === option.value;
|
|
1227
1237
|
}.bind(this));
|
|
1228
1238
|
return option && option.label;
|
|
1229
1239
|
}.bind(this));
|
|
1230
1240
|
var _first = true;
|
|
1231
1241
|
return (0, _map2.default)(label, function (_label) {
|
|
1232
|
-
(0, _newArrowCheck2.default)(this,
|
|
1242
|
+
(0, _newArrowCheck2.default)(this, _this31);
|
|
1233
1243
|
return _first ? [_first = false, _label] : [' | ', _label];
|
|
1234
1244
|
}.bind(this));
|
|
1235
1245
|
} else {
|
|
1236
1246
|
var _option = (0, _find2.default)(options, function (option) {
|
|
1237
|
-
(0, _newArrowCheck2.default)(this,
|
|
1247
|
+
(0, _newArrowCheck2.default)(this, _this31);
|
|
1238
1248
|
return value === option.value;
|
|
1239
1249
|
}.bind(this));
|
|
1240
1250
|
|
|
@@ -1250,7 +1260,7 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1250
1260
|
closable: false,
|
|
1251
1261
|
className: "".concat(_style.prefixCls, "-filter-notice")
|
|
1252
1262
|
}, searchValue && /*#__PURE__*/_react.default.createElement("span", null, locale.search, locale.colon, searchValue, locale.semicolon), !(0, _isEmpty2.default)(filters) && /*#__PURE__*/_react.default.createElement("span", null, locale.filter, locale.colon, (0, _map2.default)(filters, function (filterInfo) {
|
|
1253
|
-
(0, _newArrowCheck2.default)(this,
|
|
1263
|
+
(0, _newArrowCheck2.default)(this, _this30);
|
|
1254
1264
|
return first ? [first = false, renderLabel(filterInfo)] : [', ', renderLabel(filterInfo)];
|
|
1255
1265
|
}.bind(this)), locale.semicolon), /*#__PURE__*/_react.default.createElement("span", null, locale.searchResult, locale.colon, total, locale.items, locale.semicolon), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
1256
1266
|
className: "".concat(_style.prefixCls, "-reset-link"),
|
|
@@ -1403,7 +1413,7 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1403
1413
|
(0, _createClass2.default)(Table, [{
|
|
1404
1414
|
key: "render",
|
|
1405
1415
|
value: function render() {
|
|
1406
|
-
var
|
|
1416
|
+
var _this33 = this;
|
|
1407
1417
|
|
|
1408
1418
|
/* eslint-disable no-unused-vars */
|
|
1409
1419
|
var _this$props = this.props,
|
|
@@ -1466,7 +1476,7 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1466
1476
|
|
|
1467
1477
|
var columns = this.getColumns(dataSource, finalFilters);
|
|
1468
1478
|
var defaultExpandAllRowsProps = !defaultExpandAllRows ? null : function () {
|
|
1469
|
-
(0, _newArrowCheck2.default)(this,
|
|
1479
|
+
(0, _newArrowCheck2.default)(this, _this33);
|
|
1470
1480
|
var _this$state$changedUn = this.state.changedUnExpandedRowKeys,
|
|
1471
1481
|
changedUnExpandedRowKeys = _this$state$changedUn === void 0 ? {} : _this$state$changedUn;
|
|
1472
1482
|
var expandedRowKeys = this.getExpandedRowKeys(dataSource, changedUnExpandedRowKeys);
|
|
@@ -1528,7 +1538,7 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1528
1538
|
expandedRowRender: expandedRowRender,
|
|
1529
1539
|
expandIconColumnIndex: expandIconColumnIndex === undefined ? columns[0] && columns[0].key === 'table_row_selection' ? 1 : 0 : expandIconColumnIndex,
|
|
1530
1540
|
title: function () {
|
|
1531
|
-
(0, _newArrowCheck2.default)(this,
|
|
1541
|
+
(0, _newArrowCheck2.default)(this, _this33);
|
|
1532
1542
|
return this.renderTitle({
|
|
1533
1543
|
filters: finalFilters,
|
|
1534
1544
|
searchValue: searchValue,
|
|
@@ -1537,7 +1547,7 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1537
1547
|
});
|
|
1538
1548
|
}.bind(this),
|
|
1539
1549
|
footer: function () {
|
|
1540
|
-
(0, _newArrowCheck2.default)(this,
|
|
1550
|
+
(0, _newArrowCheck2.default)(this, _this33);
|
|
1541
1551
|
return this.renderFooter({
|
|
1542
1552
|
dataSource: _d,
|
|
1543
1553
|
emptyContent: emptyContent,
|
|
@@ -1553,7 +1563,7 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1553
1563
|
}, pagination, {
|
|
1554
1564
|
className: "".concat(_style.prefixCls, "-pagination"),
|
|
1555
1565
|
onChange: function (current, pageSize) {
|
|
1556
|
-
(0, _newArrowCheck2.default)(this,
|
|
1566
|
+
(0, _newArrowCheck2.default)(this, _this33);
|
|
1557
1567
|
this.setState({
|
|
1558
1568
|
pagination: {
|
|
1559
1569
|
current: current,
|
|
@@ -1563,7 +1573,7 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1563
1573
|
pagination.onChange && pagination.onChange(current, pageSize);
|
|
1564
1574
|
}.bind(this),
|
|
1565
1575
|
onPageSizeChange: function (current, pageSize) {
|
|
1566
|
-
(0, _newArrowCheck2.default)(this,
|
|
1576
|
+
(0, _newArrowCheck2.default)(this, _this33);
|
|
1567
1577
|
this.setState({
|
|
1568
1578
|
pagination: {
|
|
1569
1579
|
current: current,
|
|
@@ -1573,7 +1583,7 @@ var Table = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
1573
1583
|
pagination.onPageSizeChange && pagination.onPageSizeChange(current, pageSize);
|
|
1574
1584
|
}.bind(this),
|
|
1575
1585
|
onAdvise: function (current, pageSize) {
|
|
1576
|
-
(0, _newArrowCheck2.default)(this,
|
|
1586
|
+
(0, _newArrowCheck2.default)(this, _this33);
|
|
1577
1587
|
this.setState({
|
|
1578
1588
|
pagination: {
|
|
1579
1589
|
current: current,
|