antd-management-fast-framework 1.2.8 → 1.2.12
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/es/customComponents/FunctionComponent/index.js +22 -9
- package/es/customComponents/HelpBox/index.d.ts +1 -0
- package/es/customComponents/HelpBox/index.js +34 -8
- package/es/framework/DataListView/Base/index.d.ts +2 -2
- package/es/framework/DataListView/Base/index.js +93 -76
- package/package.json +7 -7
|
@@ -997,24 +997,37 @@ function buildDescriptionGrid(_ref8) {
|
|
|
997
997
|
}), d);
|
|
998
998
|
});
|
|
999
999
|
|
|
1000
|
-
var
|
|
1001
|
-
|
|
1000
|
+
var _labelStyle$contentSt = _objectSpread(_objectSpread({}, {
|
|
1001
|
+
labelStyle: null,
|
|
1002
|
+
contentStyle: null
|
|
1002
1003
|
}), props || {}),
|
|
1003
|
-
|
|
1004
|
+
globalLabelStyle = _labelStyle$contentSt.labelStyle,
|
|
1005
|
+
globalContentStyle = _labelStyle$contentSt.contentStyle;
|
|
1004
1006
|
|
|
1005
1007
|
return /*#__PURE__*/_react["default"].createElement(_descriptions["default"], _extends({
|
|
1006
1008
|
key: key
|
|
1007
1009
|
}, props || {}), dataList.map(function (item) {
|
|
1008
|
-
var
|
|
1010
|
+
var _label$span$labelStyl = _objectSpread(_objectSpread({}, {
|
|
1011
|
+
label: '',
|
|
1012
|
+
span: 1,
|
|
1013
|
+
labelStyle: null,
|
|
1014
|
+
contentStyle: null,
|
|
1009
1015
|
emptyValue: ''
|
|
1010
1016
|
}), item),
|
|
1011
|
-
|
|
1017
|
+
itemKey = _label$span$labelStyl.key,
|
|
1018
|
+
label = _label$span$labelStyl.label,
|
|
1019
|
+
span = _label$span$labelStyl.span,
|
|
1020
|
+
labelStyle = _label$span$labelStyl.labelStyle,
|
|
1021
|
+
contentStyle = _label$span$labelStyl.contentStyle,
|
|
1022
|
+
emptyValue = _label$span$labelStyl.emptyValue;
|
|
1012
1023
|
|
|
1013
1024
|
return /*#__PURE__*/_react["default"].createElement(Description, {
|
|
1014
|
-
key:
|
|
1015
|
-
label:
|
|
1016
|
-
span:
|
|
1017
|
-
|
|
1025
|
+
key: itemKey,
|
|
1026
|
+
label: label,
|
|
1027
|
+
span: span || 1,
|
|
1028
|
+
labelStyle: _objectSpread(_objectSpread({}, globalLabelStyle || {}), labelStyle || {}),
|
|
1029
|
+
contentStyle: _objectSpread(_objectSpread({}, globalContentStyle || {}), contentStyle || {}) // style={{ ...itemStyle, ...(item.style || null) }}
|
|
1030
|
+
|
|
1018
1031
|
}, item.value || emptyValue, item.canCopy && (item.canCopy || null) != null ? /*#__PURE__*/_react["default"].createElement("a", {
|
|
1019
1032
|
style: {
|
|
1020
1033
|
marginLeft: '10px'
|
|
@@ -74,7 +74,8 @@ var HelpBox = /*#__PURE__*/function (_PureComponent) {
|
|
|
74
74
|
showDivider: true,
|
|
75
75
|
labelWidth: null,
|
|
76
76
|
list: [],
|
|
77
|
-
useBackground: false
|
|
77
|
+
useBackground: false,
|
|
78
|
+
hidden: false
|
|
78
79
|
}), this.props || {}),
|
|
79
80
|
titleValue = _title$showTitle$show.title,
|
|
80
81
|
showTitle = _title$showTitle$show.showTitle,
|
|
@@ -82,7 +83,12 @@ var HelpBox = /*#__PURE__*/function (_PureComponent) {
|
|
|
82
83
|
showNumber = _title$showTitle$show.showNumber,
|
|
83
84
|
labelWidthValue = _title$showTitle$show.labelWidth,
|
|
84
85
|
listData = _title$showTitle$show.list,
|
|
85
|
-
useBackground = _title$showTitle$show.useBackground
|
|
86
|
+
useBackground = _title$showTitle$show.useBackground,
|
|
87
|
+
hidden = _title$showTitle$show.hidden;
|
|
88
|
+
|
|
89
|
+
if (hidden) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
86
92
|
|
|
87
93
|
var title = titleValue || '帮助信息';
|
|
88
94
|
var list = [];
|
|
@@ -92,7 +98,12 @@ var HelpBox = /*#__PURE__*/function (_PureComponent) {
|
|
|
92
98
|
var d = _objectSpread(_objectSpread({}, {
|
|
93
99
|
key: '',
|
|
94
100
|
label: '',
|
|
95
|
-
text: ''
|
|
101
|
+
text: '',
|
|
102
|
+
span: 1,
|
|
103
|
+
labelStyle: null,
|
|
104
|
+
contentStyle: null,
|
|
105
|
+
canCopy: false,
|
|
106
|
+
copyData: null
|
|
96
107
|
}), o);
|
|
97
108
|
|
|
98
109
|
d.key = "help_box_item_".concat(index);
|
|
@@ -119,7 +130,7 @@ var HelpBox = /*#__PURE__*/function (_PureComponent) {
|
|
|
119
130
|
style: {
|
|
120
131
|
marginTop: '4px',
|
|
121
132
|
marginBottom: '4px',
|
|
122
|
-
color: '
|
|
133
|
+
color: '#999',
|
|
123
134
|
fontWeight: 'normal',
|
|
124
135
|
fontSize: '14px',
|
|
125
136
|
lineHeight: '22px',
|
|
@@ -127,10 +138,24 @@ var HelpBox = /*#__PURE__*/function (_PureComponent) {
|
|
|
127
138
|
}
|
|
128
139
|
}, title, "\uFF1A") : null, (0, _FunctionComponent.buildDescriptionGrid)({
|
|
129
140
|
list: list.map(function (o) {
|
|
141
|
+
var key = o.key,
|
|
142
|
+
no = o.no,
|
|
143
|
+
label = o.label,
|
|
144
|
+
text = o.text,
|
|
145
|
+
labelStyle = o.labelStyle,
|
|
146
|
+
contentStyle = o.contentStyle,
|
|
147
|
+
span = o.span,
|
|
148
|
+
canCopy = o.canCopy,
|
|
149
|
+
copyData = o.copyData;
|
|
130
150
|
return {
|
|
131
|
-
key:
|
|
132
|
-
label: (0, _tools.stringIsNullOrWhiteSpace)(
|
|
133
|
-
value:
|
|
151
|
+
key: key,
|
|
152
|
+
label: (0, _tools.stringIsNullOrWhiteSpace)(label) ? showNumber ? no : '•' : label,
|
|
153
|
+
value: text,
|
|
154
|
+
labelStyle: labelStyle || null,
|
|
155
|
+
contentStyle: contentStyle || null,
|
|
156
|
+
span: span,
|
|
157
|
+
canCopy: canCopy,
|
|
158
|
+
copyData: copyData
|
|
134
159
|
};
|
|
135
160
|
}),
|
|
136
161
|
props: {
|
|
@@ -160,7 +185,8 @@ HelpBox.defaultProps = {
|
|
|
160
185
|
showNumber: true,
|
|
161
186
|
labelWidth: null,
|
|
162
187
|
list: [],
|
|
163
|
-
useBackground: false
|
|
188
|
+
useBackground: false,
|
|
189
|
+
hidden: false
|
|
164
190
|
};
|
|
165
191
|
var _default = HelpBox;
|
|
166
192
|
exports["default"] = _default;
|
|
@@ -57,12 +57,12 @@ declare class ListBase extends AuthorizationWrapper {
|
|
|
57
57
|
buildSearchCard: () => JSX.Element | null;
|
|
58
58
|
renderForm: () => JSX.Element | null;
|
|
59
59
|
buildTableOtherConfig: () => {};
|
|
60
|
-
establishTableExpandableConfig: () =>
|
|
60
|
+
establishTableExpandableConfig: () => null;
|
|
61
61
|
restoreColumnsOtherConfigArray: () => void;
|
|
62
62
|
buildTableConfig: () => {
|
|
63
63
|
columns: any;
|
|
64
64
|
size: any;
|
|
65
|
-
expandable:
|
|
65
|
+
expandable: null;
|
|
66
66
|
};
|
|
67
67
|
setTableSize: (key: any) => void;
|
|
68
68
|
setColumnsMap: (e: any) => void;
|
|
@@ -836,7 +836,7 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
|
|
|
836
836
|
|
|
837
837
|
_this.establishTableExpandableConfig = function () {
|
|
838
838
|
// 可以配置额外的Table属性
|
|
839
|
-
return
|
|
839
|
+
return null;
|
|
840
840
|
};
|
|
841
841
|
|
|
842
842
|
_this.restoreColumnsOtherConfigArray = function () {
|
|
@@ -1407,91 +1407,108 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
|
|
|
1407
1407
|
standardTableCustomOption.scroll = tableScroll;
|
|
1408
1408
|
}
|
|
1409
1409
|
|
|
1410
|
-
var
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1410
|
+
var expandableConfig = null;
|
|
1411
|
+
|
|
1412
|
+
if ((expandable || null) != null) {
|
|
1413
|
+
var _checkNeedExpander$ro = _objectSpread(_objectSpread({}, {
|
|
1414
|
+
// 判断当前列表数据,如若列表所有数据都不需要显示展开按钮,则忽略其他配置
|
|
1415
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1416
|
+
checkNeedExpander: null,
|
|
1417
|
+
rowExpandable: false,
|
|
1418
|
+
expandPlaceholderIcon: /*#__PURE__*/_react["default"].createElement(_icons.BorderOuterOutlined, {
|
|
1419
|
+
style: {
|
|
1420
|
+
color: '#ccc'
|
|
1421
|
+
}
|
|
1422
|
+
}),
|
|
1423
|
+
expanderStyle: null,
|
|
1424
|
+
animalType: _constants.listViewConfig.expandAnimalType.none,
|
|
1425
|
+
expandIconRotate: true,
|
|
1426
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1427
|
+
expandIcon: function expandIcon(_ref4) {
|
|
1428
|
+
var expanded = _ref4.expanded,
|
|
1429
|
+
onExpand = _ref4.onExpand,
|
|
1430
|
+
record = _ref4.record;
|
|
1431
|
+
return /*#__PURE__*/_react["default"].createElement(_icons.RightCircleOutlined, null);
|
|
1432
|
+
},
|
|
1433
|
+
expandedRowRender: null
|
|
1434
|
+
}), expandable || null),
|
|
1435
|
+
checkNeedExpander = _checkNeedExpander$ro.checkNeedExpander,
|
|
1436
|
+
rowExpandable = _checkNeedExpander$ro.rowExpandable,
|
|
1437
|
+
expandPlaceholderIcon = _checkNeedExpander$ro.expandPlaceholderIcon,
|
|
1438
|
+
expanderStyle = _checkNeedExpander$ro.expanderStyle,
|
|
1439
|
+
expandAnimalType = _checkNeedExpander$ro.animalType,
|
|
1440
|
+
expandIconRotate = _checkNeedExpander$ro.expandIconRotate,
|
|
1441
|
+
expandIconCustom = _checkNeedExpander$ro.expandIcon,
|
|
1442
|
+
expandedRowRenderCustom = _checkNeedExpander$ro.expandedRowRender;
|
|
1443
|
+
|
|
1444
|
+
var checkNeedExpanderResult = true;
|
|
1445
|
+
|
|
1446
|
+
if ((0, _tools.isBoolean)(checkNeedExpander)) {
|
|
1447
|
+
checkNeedExpanderResult = checkNeedExpander;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
if ((0, _tools.isFunction)(checkNeedExpander)) {
|
|
1451
|
+
var r = checkNeedExpander(metaListData);
|
|
1452
|
+
|
|
1453
|
+
if ((0, _tools.isBoolean)(checkNeedExpander)) {
|
|
1454
|
+
checkNeedExpanderResult = r;
|
|
1453
1455
|
}
|
|
1456
|
+
}
|
|
1454
1457
|
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1458
|
+
expandableConfig = checkNeedExpanderResult ? {
|
|
1459
|
+
rowExpandable: rowExpandable,
|
|
1460
|
+
expandIcon: function expandIcon(_ref5) {
|
|
1461
|
+
var canExpand = _ref5.expandable,
|
|
1462
|
+
expanded = _ref5.expanded,
|
|
1463
|
+
onExpand = _ref5.onExpand,
|
|
1464
|
+
record = _ref5.record;
|
|
1465
|
+
|
|
1466
|
+
if (!canExpand && (expandPlaceholderIcon || null) != null) {
|
|
1467
|
+
return expandPlaceholderIcon || null;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
if (expandIconRotate) {
|
|
1471
|
+
return /*#__PURE__*/_react["default"].createElement(_RotateBox["default"], {
|
|
1472
|
+
rotate: expanded ? 90 : 0,
|
|
1473
|
+
duration: 200,
|
|
1474
|
+
onClick: function onClick(e) {
|
|
1475
|
+
return onExpand(record, e);
|
|
1476
|
+
}
|
|
1477
|
+
}, expandIconCustom({
|
|
1478
|
+
expanded: expanded,
|
|
1479
|
+
onExpand: onExpand,
|
|
1480
|
+
record: record
|
|
1481
|
+
}));
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
return expandIconCustom({
|
|
1463
1485
|
expanded: expanded,
|
|
1464
1486
|
onExpand: onExpand,
|
|
1465
1487
|
record: record
|
|
1466
|
-
})
|
|
1467
|
-
}
|
|
1488
|
+
});
|
|
1489
|
+
},
|
|
1490
|
+
expandedRowRender: (0, _tools.isFunction)(expandedRowRenderCustom) ? function (record, index, indent, expanded) {
|
|
1491
|
+
var child = expandedRowRenderCustom(record, index, indent, expanded);
|
|
1468
1492
|
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
},
|
|
1475
|
-
expandedRowRender: function expandedRowRender(record, index, indent, expanded) {
|
|
1476
|
-
var child = expandedRowRenderCustom(record, index, indent, expanded);
|
|
1493
|
+
if (expandAnimalType === _constants.listViewConfig.expandAnimalType.fade) {
|
|
1494
|
+
child = /*#__PURE__*/_react["default"].createElement(_FadeBox["default"], {
|
|
1495
|
+
show: expanded
|
|
1496
|
+
}, child);
|
|
1497
|
+
}
|
|
1477
1498
|
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1499
|
+
if (expandAnimalType === _constants.listViewConfig.expandAnimalType.queue) {
|
|
1500
|
+
child = /*#__PURE__*/_react["default"].createElement(_QueueBox["default"], {
|
|
1501
|
+
show: expanded
|
|
1502
|
+
}, child);
|
|
1503
|
+
}
|
|
1483
1504
|
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
show: expanded
|
|
1505
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
1506
|
+
style: expanderStyle || {}
|
|
1487
1507
|
}, child);
|
|
1488
|
-
}
|
|
1508
|
+
} : null
|
|
1509
|
+
} : {};
|
|
1510
|
+
}
|
|
1489
1511
|
|
|
1490
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
1491
|
-
style: expanderStyle || {}
|
|
1492
|
-
}, child);
|
|
1493
|
-
}
|
|
1494
|
-
} : {};
|
|
1495
1512
|
standardTableCustomOption.expandable = expandableConfig;
|
|
1496
1513
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
1497
1514
|
className: _index["default"].tableContainor
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-management-fast-framework",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"description": "antd-management-fast-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd-management-fast-framework"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@ant-design/icons": "^4.7.0",
|
|
32
|
-
"@ant-design/pro-layout": "^6.26.
|
|
32
|
+
"@ant-design/pro-layout": "^6.26.6",
|
|
33
33
|
"@antv/data-set": "^0.11.8",
|
|
34
34
|
"antd": "^4.16.13",
|
|
35
35
|
"array-move": "^4.0.0",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"@testing-library/react": "^12.1.2",
|
|
80
80
|
"@testing-library/react-hooks": "^7.0.2",
|
|
81
81
|
"@types/jest": "^27.0.2",
|
|
82
|
-
"@types/node": "^16.
|
|
83
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
82
|
+
"@types/node": "^16.11.1",
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "^5.1.0",
|
|
84
84
|
"@umijs/fabric": "^2.8.1",
|
|
85
85
|
"@umijs/test": "^3.5.20",
|
|
86
86
|
"@umijs/test-utils": "^3.5.20",
|
|
@@ -89,13 +89,13 @@
|
|
|
89
89
|
"babel-preset-env": "^1.7.0",
|
|
90
90
|
"body-parser": "^1.19.0",
|
|
91
91
|
"cross-env": "^7.0.3",
|
|
92
|
-
"eslint": "^8.0.
|
|
92
|
+
"eslint": "^8.0.1",
|
|
93
93
|
"eslint-config-airbnb": "^18.2.1",
|
|
94
94
|
"eslint-config-airbnb-typescript": "^14.0.1",
|
|
95
95
|
"eslint-config-prettier": "^8.3.0",
|
|
96
96
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
97
97
|
"eslint-plugin-import": "^2.25.2",
|
|
98
|
-
"eslint-plugin-jest": "^25.
|
|
98
|
+
"eslint-plugin-jest": "^25.2.2",
|
|
99
99
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
100
100
|
"eslint-plugin-prettier": "^4.0.0",
|
|
101
101
|
"eslint-plugin-react": "^7.26.1",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"react-test-renderer": "^17.0.2",
|
|
121
121
|
"rimraf": "^3.0.2",
|
|
122
122
|
"stylelint": "^13.13.1",
|
|
123
|
-
"stylelint-config-prettier": "^9.0.
|
|
123
|
+
"stylelint-config-prettier": "^9.0.3",
|
|
124
124
|
"stylelint-config-standard": "^22.0.0",
|
|
125
125
|
"test-umi-plugin": "^0.1.0",
|
|
126
126
|
"umi": "^3.5.20",
|