@patternfly/react-table 5.0.0-alpha.32 → 5.0.0-alpha.34
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 +18 -0
- package/components/Table/ActionsColumn.d.ts.map +1 -1
- package/components/Table/ActionsColumn.js +6 -7
- package/components/Table/ActionsColumn.js.map +1 -1
- package/dist/esm/components/Table/ActionsColumn.d.ts.map +1 -1
- package/dist/esm/components/Table/ActionsColumn.js +6 -7
- package/dist/esm/components/Table/ActionsColumn.js.map +1 -1
- package/dist/js/components/Table/ActionsColumn.d.ts.map +1 -1
- package/dist/js/components/Table/ActionsColumn.js +6 -7
- package/dist/js/components/Table/ActionsColumn.js.map +1 -1
- package/dist/umd/react-table.min.js +2 -2
- package/package.json +3 -3
- package/src/components/Table/ActionsColumn.tsx +7 -8
- package/src/components/TableComposable/examples/ComposableTableEmptyState.tsx +15 -8
- package/src/deprecated/components/Table/examples/LegacyTableEmptyState.tsx +15 -8
- package/src/docs/demos/Table.md +46 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-table",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.34",
|
|
4
4
|
"description": "This library provides a set of React table components for use with the PatternFly 4",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"subpaths": "node scripts/copySubpaths.js"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@patternfly/react-core": "^5.0.0-alpha.
|
|
42
|
+
"@patternfly/react-core": "^5.0.0-alpha.34",
|
|
43
43
|
"@patternfly/react-icons": "^5.0.0-alpha.4",
|
|
44
44
|
"@patternfly/react-styles": "^5.0.0-alpha.4",
|
|
45
45
|
"@patternfly/react-tokens": "^5.0.0-alpha.4",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"react": "^16.8 || ^17 || ^18",
|
|
55
55
|
"react-dom": "^16.8 || ^17 || ^18"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "9a3ab7a6248885619173e33a938ce22749be6c2b"
|
|
58
58
|
}
|
|
@@ -37,8 +37,7 @@ const ActionsColumnBase: React.FunctionComponent<ActionsColumnProps> = ({
|
|
|
37
37
|
actionsToggle,
|
|
38
38
|
popperProps = {
|
|
39
39
|
position: 'right',
|
|
40
|
-
direction: 'down'
|
|
41
|
-
popperMatchesTriggerWidth: false
|
|
40
|
+
direction: 'down'
|
|
42
41
|
},
|
|
43
42
|
...props
|
|
44
43
|
}: ActionsColumnProps) => {
|
|
@@ -65,12 +64,12 @@ const ActionsColumnBase: React.FunctionComponent<ActionsColumnProps> = ({
|
|
|
65
64
|
return (
|
|
66
65
|
<React.Fragment>
|
|
67
66
|
{items
|
|
68
|
-
.filter(item => item.isOutsideDropdown)
|
|
67
|
+
.filter((item) => item.isOutsideDropdown)
|
|
69
68
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
70
69
|
.map(({ title, itemKey, onClick, isOutsideDropdown, ...props }, key) =>
|
|
71
70
|
typeof title === 'string' ? (
|
|
72
71
|
<Button
|
|
73
|
-
onClick={event => onActionClick(event, onClick)}
|
|
72
|
+
onClick={(event) => onActionClick(event, onClick)}
|
|
74
73
|
{...(props as any)}
|
|
75
74
|
isDisabled={isDisabled}
|
|
76
75
|
key={itemKey || `outside_dropdown_${key}`}
|
|
@@ -85,8 +84,8 @@ const ActionsColumnBase: React.FunctionComponent<ActionsColumnProps> = ({
|
|
|
85
84
|
|
|
86
85
|
<Dropdown
|
|
87
86
|
isOpen={isOpen}
|
|
88
|
-
onOpenChange={isOpen => setIsOpen(isOpen)}
|
|
89
|
-
toggle={toggleRef =>
|
|
87
|
+
onOpenChange={(isOpen) => setIsOpen(isOpen)}
|
|
88
|
+
toggle={(toggleRef) =>
|
|
90
89
|
actionsToggle ? (
|
|
91
90
|
actionsToggle({ onToggle, isOpen, isDisabled, toggleRef })
|
|
92
91
|
) : (
|
|
@@ -108,13 +107,13 @@ const ActionsColumnBase: React.FunctionComponent<ActionsColumnProps> = ({
|
|
|
108
107
|
>
|
|
109
108
|
<DropdownList>
|
|
110
109
|
{items
|
|
111
|
-
.filter(item => !item.isOutsideDropdown)
|
|
110
|
+
.filter((item) => !item.isOutsideDropdown)
|
|
112
111
|
.map(({ title, itemKey, onClick, isSeparator, ...props }, key) =>
|
|
113
112
|
isSeparator ? (
|
|
114
113
|
<Divider key={itemKey || key} data-key={itemKey || key} />
|
|
115
114
|
) : (
|
|
116
115
|
<DropdownItem
|
|
117
|
-
onClick={event => {
|
|
116
|
+
onClick={(event) => {
|
|
118
117
|
onActionClick(event, onClick);
|
|
119
118
|
onToggle();
|
|
120
119
|
}}
|
|
@@ -5,9 +5,11 @@ import {
|
|
|
5
5
|
EmptyState,
|
|
6
6
|
EmptyStateVariant,
|
|
7
7
|
EmptyStateIcon,
|
|
8
|
-
Title,
|
|
9
8
|
EmptyStateBody,
|
|
10
|
-
Button
|
|
9
|
+
Button,
|
|
10
|
+
EmptyStateHeader,
|
|
11
|
+
EmptyStateFooter,
|
|
12
|
+
EmptyStateActions
|
|
11
13
|
} from '@patternfly/react-core';
|
|
12
14
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
13
15
|
|
|
@@ -29,13 +31,18 @@ export const ComposableTableEmptyState: React.FunctionComponent = () => (
|
|
|
29
31
|
<Tr>
|
|
30
32
|
<Td colSpan={8}>
|
|
31
33
|
<Bullseye>
|
|
32
|
-
<EmptyState variant={EmptyStateVariant.
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
No results found
|
|
36
|
-
|
|
34
|
+
<EmptyState variant={EmptyStateVariant.sm}>
|
|
35
|
+
<EmptyStateHeader
|
|
36
|
+
icon={<EmptyStateIcon icon={SearchIcon} />}
|
|
37
|
+
titleText="No results found"
|
|
38
|
+
headingLevel="h2"
|
|
39
|
+
/>
|
|
37
40
|
<EmptyStateBody>Clear all filters and try again.</EmptyStateBody>
|
|
38
|
-
<
|
|
41
|
+
<EmptyStateFooter>
|
|
42
|
+
<EmptyStateActions>
|
|
43
|
+
<Button variant="link">Clear all filters</Button>
|
|
44
|
+
</EmptyStateActions>
|
|
45
|
+
</EmptyStateFooter>
|
|
39
46
|
</EmptyState>
|
|
40
47
|
</Bullseye>
|
|
41
48
|
</Td>
|
|
@@ -5,9 +5,11 @@ import {
|
|
|
5
5
|
EmptyState,
|
|
6
6
|
EmptyStateVariant,
|
|
7
7
|
EmptyStateIcon,
|
|
8
|
-
Title,
|
|
9
8
|
EmptyStateBody,
|
|
10
|
-
Button
|
|
9
|
+
Button,
|
|
10
|
+
EmptyStateHeader,
|
|
11
|
+
EmptyStateFooter,
|
|
12
|
+
EmptyStateActions
|
|
11
13
|
} from '@patternfly/react-core';
|
|
12
14
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
13
15
|
|
|
@@ -24,13 +26,18 @@ export const LegacyTableEmptyState: React.FunctionComponent = () => {
|
|
|
24
26
|
props: { colSpan: 8 },
|
|
25
27
|
title: (
|
|
26
28
|
<Bullseye>
|
|
27
|
-
<EmptyState variant={EmptyStateVariant.
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
<EmptyState variant={EmptyStateVariant.sm}>
|
|
30
|
+
<EmptyStateHeader
|
|
31
|
+
titleText="No results found"
|
|
32
|
+
icon={<EmptyStateIcon icon={SearchIcon} />}
|
|
33
|
+
headingLevel="h2"
|
|
34
|
+
/>
|
|
32
35
|
<EmptyStateBody>Clear all filters and try again.</EmptyStateBody>
|
|
33
|
-
<
|
|
36
|
+
<EmptyStateFooter>
|
|
37
|
+
<EmptyStateActions>
|
|
38
|
+
<Button variant="link">Clear all filters</Button>
|
|
39
|
+
</EmptyStateActions>
|
|
40
|
+
</EmptyStateFooter>
|
|
34
41
|
</EmptyState>
|
|
35
42
|
</Bullseye>
|
|
36
43
|
)
|
package/src/docs/demos/Table.md
CHANGED
|
@@ -1108,9 +1108,11 @@ import {
|
|
|
1108
1108
|
SelectVariant,
|
|
1109
1109
|
SearchInput,
|
|
1110
1110
|
EmptyState,
|
|
1111
|
-
|
|
1111
|
+
EmptyStateActions,
|
|
1112
1112
|
EmptyStateBody,
|
|
1113
|
-
|
|
1113
|
+
EmptyStateIcon,
|
|
1114
|
+
EmptyStateHeader,
|
|
1115
|
+
EmptyStateFooter
|
|
1114
1116
|
} from '@patternfly/react-core';
|
|
1115
1117
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
1116
1118
|
import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
|
|
@@ -1405,23 +1407,26 @@ class FilterTableDemo extends React.Component {
|
|
|
1405
1407
|
title: (
|
|
1406
1408
|
<Bullseye>
|
|
1407
1409
|
<EmptyState>
|
|
1408
|
-
<
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1410
|
+
<EmptyStateHeader
|
|
1411
|
+
titleText="Clear all filters and try again."
|
|
1412
|
+
headingLevel="h5"
|
|
1413
|
+
icon={<EmptyStateIcon icon={SearchIcon} />}
|
|
1414
|
+
/>
|
|
1412
1415
|
<EmptyStateBody>
|
|
1413
1416
|
No results match this filter criteria. Remove all filters or clear all filters to show results.
|
|
1414
1417
|
</EmptyStateBody>
|
|
1415
|
-
<
|
|
1416
|
-
<
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1418
|
+
<EmptyStateFooter>
|
|
1419
|
+
<EmptyStateActions>
|
|
1420
|
+
<Button
|
|
1421
|
+
variant="link"
|
|
1422
|
+
onClick={() => {
|
|
1423
|
+
this.onDelete(null);
|
|
1424
|
+
}}
|
|
1425
|
+
>
|
|
1426
|
+
Clear all filters
|
|
1427
|
+
</Button>
|
|
1428
|
+
</EmptyStateActions>
|
|
1429
|
+
</EmptyStateFooter>
|
|
1425
1430
|
</EmptyState>
|
|
1426
1431
|
</Bullseye>
|
|
1427
1432
|
)
|
|
@@ -1666,7 +1671,7 @@ import {
|
|
|
1666
1671
|
EmptyState,
|
|
1667
1672
|
EmptyStateIcon,
|
|
1668
1673
|
EmptyStateBody,
|
|
1669
|
-
|
|
1674
|
+
EmptyStateActions,
|
|
1670
1675
|
PageSection,
|
|
1671
1676
|
Title
|
|
1672
1677
|
} from '@patternfly/react-core';
|
|
@@ -1692,16 +1697,19 @@ class EmptyStateDemo extends React.Component {
|
|
|
1692
1697
|
props: { colSpan: 8 },
|
|
1693
1698
|
title: (
|
|
1694
1699
|
<EmptyState>
|
|
1695
|
-
<
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1700
|
+
<EmptyStateHeader
|
|
1701
|
+
titleText="No results found"
|
|
1702
|
+
headingLevel="h2"
|
|
1703
|
+
icon={<EmptyStateIcon icon={SearchIcon} />}
|
|
1704
|
+
/>
|
|
1699
1705
|
<EmptyStateBody>No results match this filter criteria. Clear all filters and try again.</EmptyStateBody>
|
|
1700
|
-
<
|
|
1701
|
-
<
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1706
|
+
<EmptyStateFooter>
|
|
1707
|
+
<EmptyStateActions>
|
|
1708
|
+
<Button variant="link" onClick={() => {}}>
|
|
1709
|
+
Clear all filters
|
|
1710
|
+
</Button>
|
|
1711
|
+
</EmptyStateActions>
|
|
1712
|
+
</EmptyStateFooter>
|
|
1705
1713
|
</EmptyState>
|
|
1706
1714
|
)
|
|
1707
1715
|
}
|
|
@@ -1751,10 +1759,11 @@ class LoadingStateDemo extends React.Component {
|
|
|
1751
1759
|
title: (
|
|
1752
1760
|
<Bullseye>
|
|
1753
1761
|
<EmptyState>
|
|
1754
|
-
<
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1762
|
+
<EmptyStateHeader
|
|
1763
|
+
titleText="Loading"
|
|
1764
|
+
headingLevel="h2"
|
|
1765
|
+
icon={<EmptyStateIcon icon={Spinner} />}
|
|
1766
|
+
/>
|
|
1758
1767
|
</EmptyState>
|
|
1759
1768
|
</Bullseye>
|
|
1760
1769
|
)
|
|
@@ -1789,6 +1798,7 @@ import {
|
|
|
1789
1798
|
EmptyStateIcon,
|
|
1790
1799
|
EmptyStateBody,
|
|
1791
1800
|
EmptyStateVariant,
|
|
1801
|
+
EmptyStateHeader,
|
|
1792
1802
|
PageSection,
|
|
1793
1803
|
Title
|
|
1794
1804
|
} from '@patternfly/react-core';
|
|
@@ -1812,11 +1822,12 @@ class ErrorStateDemo extends React.Component {
|
|
|
1812
1822
|
{
|
|
1813
1823
|
props: { colSpan: 8 },
|
|
1814
1824
|
title: (
|
|
1815
|
-
<EmptyState variant={EmptyStateVariant.
|
|
1816
|
-
<
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1825
|
+
<EmptyState variant={EmptyStateVariant.sm}>
|
|
1826
|
+
<EmptyStateHeader
|
|
1827
|
+
titleText="Unable to connect"
|
|
1828
|
+
icon={<EmptyStateIcon icon={ExclamationCircleIcon} color={globalDangerColor200.value} />}
|
|
1829
|
+
headingLevel="h2"
|
|
1830
|
+
/>
|
|
1820
1831
|
<EmptyStateBody>
|
|
1821
1832
|
There was an error retrieving data. Check your connection and reload the page.
|
|
1822
1833
|
</EmptyStateBody>
|