@rhc-shared-components/packages-table 0.1.1 → 0.2.4
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/dist/index.js +6 -8
- package/dist/index.modern.js +6 -8
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1312,7 +1312,6 @@ function FilterableTable(_ref) {
|
|
|
1312
1312
|
var sortedRows = sortFn ? lodash.sortBy(filteredItems, sortFn) : sortField ? lodash.sortBy(filteredItems, function (item) {
|
|
1313
1313
|
return item[sortField];
|
|
1314
1314
|
}) : filteredItems;
|
|
1315
|
-
setPage(1);
|
|
1316
1315
|
setSortTableBy({
|
|
1317
1316
|
index: index,
|
|
1318
1317
|
direction: direction
|
|
@@ -1364,6 +1363,7 @@ function FilterableTable(_ref) {
|
|
|
1364
1363
|
*/
|
|
1365
1364
|
|
|
1366
1365
|
var onFilterChange = function onFilterChange(selected, index) {
|
|
1366
|
+
handleItemsPropChangeCallback();
|
|
1367
1367
|
setTableFilters(function (prevState) {
|
|
1368
1368
|
prevState[index] = selected;
|
|
1369
1369
|
return [].concat(prevState);
|
|
@@ -1447,14 +1447,14 @@ function FilterableTable(_ref) {
|
|
|
1447
1447
|
key: "pkg-table-row-" + rowIdx + "-col-" + colIdx
|
|
1448
1448
|
}, (_renderRow = renderRow(row)) == null ? void 0 : _renderRow[colIdx]);
|
|
1449
1449
|
}));
|
|
1450
|
-
}) : React__default["default"].createElement(Td, {
|
|
1450
|
+
}) : React__default["default"].createElement(Tr, null, React__default["default"].createElement(Td, {
|
|
1451
1451
|
colSpan: columns.length
|
|
1452
1452
|
}, React__default["default"].createElement(reactCore.EmptyState, null, React__default["default"].createElement(reactCore.EmptyStateIcon, {
|
|
1453
1453
|
icon: SearchIcon
|
|
1454
1454
|
}), React__default["default"].createElement(reactCore.Title, {
|
|
1455
1455
|
headingLevel: 'h5',
|
|
1456
1456
|
size: 'lg'
|
|
1457
|
-
}, "No results found")))))), renderPagination('bottom'));
|
|
1457
|
+
}, "No results found"))))))), renderPagination('bottom'));
|
|
1458
1458
|
}
|
|
1459
1459
|
|
|
1460
1460
|
var FilterInput = function FilterInput(_ref) {
|
|
@@ -1573,10 +1573,8 @@ function EcoSelect(_ref) {
|
|
|
1573
1573
|
var result = selected.includes(selection) ? selected.filter(function (item) {
|
|
1574
1574
|
return item !== selection;
|
|
1575
1575
|
}) : [selection].concat(selected);
|
|
1576
|
-
setSelected(
|
|
1577
|
-
|
|
1578
|
-
return result;
|
|
1579
|
-
});
|
|
1576
|
+
setSelected(result);
|
|
1577
|
+
onChange && onChange(result, event);
|
|
1580
1578
|
};
|
|
1581
1579
|
|
|
1582
1580
|
var id = lodash.uniqueId('select-');
|
|
@@ -1871,7 +1869,7 @@ var PackagesTable = function PackagesTable(_ref) {
|
|
|
1871
1869
|
}, React__namespace.createElement(VulnerabilitiesTable, {
|
|
1872
1870
|
vulnerabilities: uniqueVulnerabilities,
|
|
1873
1871
|
isLoading: isLoading
|
|
1874
|
-
})), excludedPackages.length
|
|
1872
|
+
})), excludedPackages.length > 0 && React__namespace.createElement(reactCore.Tab, {
|
|
1875
1873
|
eventKey: 1,
|
|
1876
1874
|
title: "Excluded Packages (" + excludedPackages.length + ")"
|
|
1877
1875
|
}, React__namespace.createElement("p", {
|
package/dist/index.modern.js
CHANGED
|
@@ -1267,7 +1267,6 @@ function FilterableTable({
|
|
|
1267
1267
|
const sortField = columns == null ? void 0 : (_columns$index = columns[index]) == null ? void 0 : _columns$index.sortField;
|
|
1268
1268
|
const sortFn = columns == null ? void 0 : (_columns$index2 = columns[index]) == null ? void 0 : _columns$index2.sortFn;
|
|
1269
1269
|
const sortedRows = sortFn ? sortBy(filteredItems, sortFn) : sortField ? sortBy(filteredItems, item => item[sortField]) : filteredItems;
|
|
1270
|
-
setPage(1);
|
|
1271
1270
|
setSortTableBy({
|
|
1272
1271
|
index,
|
|
1273
1272
|
direction
|
|
@@ -1313,6 +1312,7 @@ function FilterableTable({
|
|
|
1313
1312
|
*/
|
|
1314
1313
|
|
|
1315
1314
|
const onFilterChange = (selected, index) => {
|
|
1315
|
+
handleItemsPropChangeCallback();
|
|
1316
1316
|
setTableFilters(prevState => {
|
|
1317
1317
|
prevState[index] = selected;
|
|
1318
1318
|
return [...prevState];
|
|
@@ -1388,14 +1388,14 @@ function FilterableTable({
|
|
|
1388
1388
|
return React__default.createElement(Td, {
|
|
1389
1389
|
key: `pkg-table-row-${rowIdx}-col-${colIdx}`
|
|
1390
1390
|
}, (_renderRow = renderRow(row)) == null ? void 0 : _renderRow[colIdx]);
|
|
1391
|
-
}))) : React__default.createElement(Td, {
|
|
1391
|
+
}))) : React__default.createElement(Tr, null, React__default.createElement(Td, {
|
|
1392
1392
|
colSpan: columns.length
|
|
1393
1393
|
}, React__default.createElement(EmptyState, null, React__default.createElement(EmptyStateIcon, {
|
|
1394
1394
|
icon: SearchIcon
|
|
1395
1395
|
}), React__default.createElement(Title, {
|
|
1396
1396
|
headingLevel: 'h5',
|
|
1397
1397
|
size: 'lg'
|
|
1398
|
-
}, "No results found")))))), renderPagination('bottom'));
|
|
1398
|
+
}, "No results found"))))))), renderPagination('bottom'));
|
|
1399
1399
|
}
|
|
1400
1400
|
|
|
1401
1401
|
const FilterInput = ({
|
|
@@ -1501,10 +1501,8 @@ function EcoSelect({
|
|
|
1501
1501
|
|
|
1502
1502
|
const onSelect = (event, selection) => {
|
|
1503
1503
|
const result = selected.includes(selection) ? selected.filter(item => item !== selection) : [selection, ...selected];
|
|
1504
|
-
setSelected(
|
|
1505
|
-
|
|
1506
|
-
return result;
|
|
1507
|
-
});
|
|
1504
|
+
setSelected(result);
|
|
1505
|
+
onChange && onChange(result, event);
|
|
1508
1506
|
};
|
|
1509
1507
|
|
|
1510
1508
|
const id = uniqueId('select-');
|
|
@@ -1768,7 +1766,7 @@ const PackagesTable = ({
|
|
|
1768
1766
|
}, React.createElement(VulnerabilitiesTable, {
|
|
1769
1767
|
vulnerabilities: uniqueVulnerabilities,
|
|
1770
1768
|
isLoading: _isLoading
|
|
1771
|
-
})), excludedPackages.length
|
|
1769
|
+
})), excludedPackages.length > 0 && React.createElement(Tab, {
|
|
1772
1770
|
eventKey: 1,
|
|
1773
1771
|
title: `Excluded Packages (${excludedPackages.length})`
|
|
1774
1772
|
}, React.createElement("p", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhc-shared-components/packages-table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "project description",
|
|
5
5
|
"author": "redhatofficial",
|
|
6
6
|
"license": "MIT",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "ac41ad2aacd69501d4aac8572f96bffd173a34d4"
|
|
81
81
|
}
|