@rhc-shared-components/packages-table 0.2.5 → 0.3.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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface VulnerabilitiesTableProps {
|
|
2
2
|
vulnerabilities: any[];
|
|
3
3
|
isLoading: boolean;
|
|
4
|
+
hideToggler?: boolean;
|
|
4
5
|
}
|
|
5
|
-
export declare const VulnerabilitiesTable: ({ vulnerabilities, isLoading }: VulnerabilitiesTableProps) => JSX.Element;
|
|
6
|
+
export declare const VulnerabilitiesTable: ({ vulnerabilities, isLoading, hideToggler }: VulnerabilitiesTableProps) => JSX.Element;
|
|
6
7
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ export declare const severitySortOrder: {
|
|
|
7
7
|
interface PackagesTableProps {
|
|
8
8
|
vulnerabilities: any[];
|
|
9
9
|
rpms: any[];
|
|
10
|
+
hideToggler?: boolean;
|
|
10
11
|
isLoading: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare const PackagesTable: ({ vulnerabilities, rpms, isLoading }: PackagesTableProps) => JSX.Element;
|
|
13
|
+
export declare const PackagesTable: ({ vulnerabilities, rpms, hideToggler, isLoading }: PackagesTableProps) => JSX.Element;
|
|
13
14
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1588,7 +1588,8 @@ function EcoSelect(_ref) {
|
|
|
1588
1588
|
onSelect: onSelect,
|
|
1589
1589
|
selections: selected,
|
|
1590
1590
|
isOpen: isOpen,
|
|
1591
|
-
placeholderText: placeholderText
|
|
1591
|
+
placeholderText: placeholderText,
|
|
1592
|
+
className: "pf-select-wrapper"
|
|
1592
1593
|
}, options.map(function (option) {
|
|
1593
1594
|
return React__default["default"].createElement(reactCore.SelectOption, {
|
|
1594
1595
|
key: option,
|
|
@@ -1626,7 +1627,8 @@ var ToggleGroup = function ToggleGroup(props) {
|
|
|
1626
1627
|
/* eslint-disable camelcase */
|
|
1627
1628
|
var VulnerabilitiesTable = function VulnerabilitiesTable(_ref) {
|
|
1628
1629
|
var vulnerabilities = _ref.vulnerabilities,
|
|
1629
|
-
isLoading = _ref.isLoading
|
|
1630
|
+
isLoading = _ref.isLoading,
|
|
1631
|
+
hideToggler = _ref.hideToggler;
|
|
1630
1632
|
|
|
1631
1633
|
var getImpact = function getImpact(_ref2) {
|
|
1632
1634
|
var severity = _ref2.severity;
|
|
@@ -1750,7 +1752,7 @@ var VulnerabilitiesTable = function VulnerabilitiesTable(_ref) {
|
|
|
1750
1752
|
key: 'vulnerabilities-table__filter-input',
|
|
1751
1753
|
onChange: onTextInputFilterChange,
|
|
1752
1754
|
placeholder: 'Filter vulnerabilities'
|
|
1753
|
-
}), React__default["default"].createElement(ToggleGroup, {
|
|
1755
|
+
}), !hideToggler ? React__default["default"].createElement(ToggleGroup, {
|
|
1754
1756
|
key: 'vulnerabilities-table__toggle-group',
|
|
1755
1757
|
onChange: onStatusFilterChange,
|
|
1756
1758
|
"aria-label": 'Vulnerability status filter',
|
|
@@ -1764,7 +1766,7 @@ var VulnerabilitiesTable = function VulnerabilitiesTable(_ref) {
|
|
|
1764
1766
|
id: 'unfixed',
|
|
1765
1767
|
text: 'Unfixed'
|
|
1766
1768
|
}]
|
|
1767
|
-
}), React__default["default"].createElement(EcoSelect, {
|
|
1769
|
+
}) : React__default["default"].createElement(React__default["default"].Fragment, null), React__default["default"].createElement(EcoSelect, {
|
|
1768
1770
|
key: 'vulnerabilities-table__select',
|
|
1769
1771
|
onChange: onImpactFilterChange,
|
|
1770
1772
|
"aria-label": 'Impact filter',
|
|
@@ -1801,6 +1803,7 @@ var PackagesTable = function PackagesTable(_ref) {
|
|
|
1801
1803
|
vulnerabilities = _ref$vulnerabilities === void 0 ? [] : _ref$vulnerabilities,
|
|
1802
1804
|
_ref$rpms = _ref.rpms,
|
|
1803
1805
|
rpms = _ref$rpms === void 0 ? [] : _ref$rpms,
|
|
1806
|
+
hideToggler = _ref.hideToggler,
|
|
1804
1807
|
_ref$isLoading = _ref.isLoading,
|
|
1805
1808
|
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
|
|
1806
1809
|
|
|
@@ -1868,7 +1871,8 @@ var PackagesTable = function PackagesTable(_ref) {
|
|
|
1868
1871
|
title: "Vulnerabilities (" + uniqueVulnerabilities.length + ")"
|
|
1869
1872
|
}, React__namespace.createElement(VulnerabilitiesTable, {
|
|
1870
1873
|
vulnerabilities: uniqueVulnerabilities,
|
|
1871
|
-
isLoading: isLoading
|
|
1874
|
+
isLoading: isLoading,
|
|
1875
|
+
hideToggler: hideToggler
|
|
1872
1876
|
})), excludedPackages.length > 0 && React__namespace.createElement(reactCore.Tab, {
|
|
1873
1877
|
eventKey: 1,
|
|
1874
1878
|
title: "Excluded Packages (" + excludedPackages.length + ")"
|
package/dist/index.modern.js
CHANGED
|
@@ -1516,7 +1516,8 @@ function EcoSelect({
|
|
|
1516
1516
|
onSelect: onSelect,
|
|
1517
1517
|
selections: selected,
|
|
1518
1518
|
isOpen: isOpen,
|
|
1519
|
-
placeholderText: placeholderText
|
|
1519
|
+
placeholderText: placeholderText,
|
|
1520
|
+
className: "pf-select-wrapper"
|
|
1520
1521
|
}, options.map(option => React__default.createElement(SelectOption, {
|
|
1521
1522
|
key: option,
|
|
1522
1523
|
value: option
|
|
@@ -1548,7 +1549,8 @@ const ToggleGroup = props => {
|
|
|
1548
1549
|
/* eslint-disable camelcase */
|
|
1549
1550
|
const VulnerabilitiesTable = ({
|
|
1550
1551
|
vulnerabilities,
|
|
1551
|
-
isLoading
|
|
1552
|
+
isLoading,
|
|
1553
|
+
hideToggler
|
|
1552
1554
|
}) => {
|
|
1553
1555
|
const getImpact = ({
|
|
1554
1556
|
severity
|
|
@@ -1670,7 +1672,7 @@ const VulnerabilitiesTable = ({
|
|
|
1670
1672
|
key: 'vulnerabilities-table__filter-input',
|
|
1671
1673
|
onChange: onTextInputFilterChange,
|
|
1672
1674
|
placeholder: 'Filter vulnerabilities'
|
|
1673
|
-
}), React__default.createElement(ToggleGroup, {
|
|
1675
|
+
}), !hideToggler ? React__default.createElement(ToggleGroup, {
|
|
1674
1676
|
key: 'vulnerabilities-table__toggle-group',
|
|
1675
1677
|
onChange: onStatusFilterChange,
|
|
1676
1678
|
"aria-label": 'Vulnerability status filter',
|
|
@@ -1684,7 +1686,7 @@ const VulnerabilitiesTable = ({
|
|
|
1684
1686
|
id: 'unfixed',
|
|
1685
1687
|
text: 'Unfixed'
|
|
1686
1688
|
}]
|
|
1687
|
-
}), React__default.createElement(EcoSelect, {
|
|
1689
|
+
}) : React__default.createElement(React__default.Fragment, null), React__default.createElement(EcoSelect, {
|
|
1688
1690
|
key: 'vulnerabilities-table__select',
|
|
1689
1691
|
onChange: onImpactFilterChange,
|
|
1690
1692
|
"aria-label": 'Impact filter',
|
|
@@ -1717,6 +1719,7 @@ const InsertCss = () => {
|
|
|
1717
1719
|
const PackagesTable = ({
|
|
1718
1720
|
vulnerabilities: _vulnerabilities = [],
|
|
1719
1721
|
rpms: _rpms = [],
|
|
1722
|
+
hideToggler,
|
|
1720
1723
|
isLoading: _isLoading = false
|
|
1721
1724
|
}) => {
|
|
1722
1725
|
const [excludedPackages, setExcludedPackages] = React.useState([]);
|
|
@@ -1765,7 +1768,8 @@ const PackagesTable = ({
|
|
|
1765
1768
|
title: `Vulnerabilities (${uniqueVulnerabilities.length})`
|
|
1766
1769
|
}, React.createElement(VulnerabilitiesTable, {
|
|
1767
1770
|
vulnerabilities: uniqueVulnerabilities,
|
|
1768
|
-
isLoading: _isLoading
|
|
1771
|
+
isLoading: _isLoading,
|
|
1772
|
+
hideToggler: hideToggler
|
|
1769
1773
|
})), excludedPackages.length > 0 && React.createElement(Tab, {
|
|
1770
1774
|
eventKey: 1,
|
|
1771
1775
|
title: `Excluded Packages (${excludedPackages.length})`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhc-shared-components/packages-table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
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": "47ece8b5d0992dfb2d3a17d7c8ae5c821ce264db"
|
|
81
81
|
}
|