@patternfly/react-table 6.6.1-prerelease.6 → 6.6.2
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 +2 -40
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/Table/package.json +1 -1
- package/dist/dynamic/components/Table/utils/decorators/package.json +1 -1
- package/dist/dynamic/components/Table/utils/package.json +1 -1
- package/dist/dynamic/deprecated/components/Table/base/package.json +1 -1
- package/dist/dynamic/deprecated/components/Table/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/esm/components/Table/EditColumn.js +2 -2
- package/dist/esm/components/Table/EditColumn.js.map +1 -1
- package/dist/esm/components/Table/HeaderCellInfoWrapper.js +2 -2
- package/dist/esm/components/Table/HeaderCellInfoWrapper.js.map +1 -1
- package/dist/esm/components/Table/SortColumn.js +5 -5
- package/dist/esm/components/Table/SortColumn.js.map +1 -1
- package/dist/esm/components/Table/Tr.d.ts.map +1 -1
- package/dist/esm/components/Table/Tr.js +1 -2
- package/dist/esm/components/Table/Tr.js.map +1 -1
- package/dist/esm/demos/DashboardHeader.js +3 -3
- package/dist/esm/demos/DashboardHeader.js.map +1 -1
- package/dist/esm/deprecated/components/Table/Table.d.ts.map +1 -1
- package/dist/esm/deprecated/components/Table/Table.js +0 -1
- package/dist/esm/deprecated/components/Table/Table.js.map +1 -1
- package/dist/js/components/Table/EditColumn.js +2 -2
- package/dist/js/components/Table/EditColumn.js.map +1 -1
- package/dist/js/components/Table/HeaderCellInfoWrapper.js +2 -2
- package/dist/js/components/Table/HeaderCellInfoWrapper.js.map +1 -1
- package/dist/js/components/Table/SortColumn.js +5 -5
- package/dist/js/components/Table/SortColumn.js.map +1 -1
- package/dist/js/components/Table/Tr.d.ts.map +1 -1
- package/dist/js/components/Table/Tr.js +1 -2
- package/dist/js/components/Table/Tr.js.map +1 -1
- package/dist/js/demos/DashboardHeader.js +3 -3
- package/dist/js/demos/DashboardHeader.js.map +1 -1
- package/dist/js/deprecated/components/Table/Table.d.ts.map +1 -1
- package/dist/js/deprecated/components/Table/Table.js +0 -1
- package/dist/js/deprecated/components/Table/Table.js.map +1 -1
- package/dist/umd/assets/{output-DRG_VfPB.css → output-DWpq4Q2w.css} +5354 -5354
- package/dist/umd/react-table.min.js +2 -2
- package/package.json +6 -6
- package/src/components/Table/EditColumn.tsx +2 -2
- package/src/components/Table/HeaderCellInfoWrapper.tsx +3 -3
- package/src/components/Table/SortColumn.tsx +5 -5
- package/src/components/Table/Tr.tsx +1 -2
- package/src/components/Table/examples/Table.md +4 -4
- package/src/components/Table/examples/TableEditable.tsx +37 -35
- package/src/components/Table/examples/TableEmptyState.tsx +2 -7
- package/src/components/Table/examples/TableTree.tsx +3 -3
- package/src/demos/DashboardHeader.tsx +3 -3
- package/src/demos/Table.md +6 -5
- package/src/demos/examples/TableColumnManagement.tsx +6 -7
- package/src/demos/examples/TableColumnManagementWithDraggable.tsx +6 -7
- package/src/demos/examples/TableCompact.tsx +7 -8
- package/src/demos/examples/TableCompoundExpansion.tsx +2 -2
- package/src/demos/examples/TableEmptyStateDefault.tsx +2 -2
- package/src/demos/examples/TableExpandCollapseAll.tsx +6 -6
- package/src/demos/examples/TableFilterable.tsx +9 -10
- package/src/demos/examples/TableSortableResponsive.tsx +9 -10
- package/src/demos/examples/TableStaticBottomPagination.tsx +7 -8
- package/src/demos/examples/TableStickyHeader.tsx +6 -6
- package/src/deprecated/components/Table/Table.tsx +0 -1
- package/src/deprecated/components/Table/__tests__/Table.test.tsx +0 -19
- package/src/deprecated/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +326 -869
- package/src/deprecated/components/Table/examples/LegacyTableEmptyState.tsx +2 -2
- package/src/deprecated/components/Table/examples/LegacyTableTree.tsx +3 -3
- package/src/deprecated/components/Table/examples/Table.md +4 -3
- package/dist/esm/components/Table/utils/inert.d.ts +0 -6
- package/dist/esm/components/Table/utils/inert.d.ts.map +0 -1
- package/dist/esm/components/Table/utils/inert.js +0 -7
- package/dist/esm/components/Table/utils/inert.js.map +0 -1
- package/dist/js/components/Table/utils/inert.d.ts +0 -6
- package/dist/js/components/Table/utils/inert.d.ts.map +0 -1
- package/dist/js/components/Table/utils/inert.js +0 -10
- package/dist/js/components/Table/utils/inert.js.map +0 -1
- package/src/components/Table/utils/inert.ts +0 -7
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
OverflowMenuDropdownItem,
|
|
21
21
|
PaginationVariant,
|
|
22
22
|
Label,
|
|
23
|
-
LabelStatus,
|
|
24
23
|
Select,
|
|
25
24
|
OverflowMenu,
|
|
26
25
|
OverflowMenuContent,
|
|
@@ -30,9 +29,9 @@ import {
|
|
|
30
29
|
PageSectionVariants
|
|
31
30
|
} from '@patternfly/react-core';
|
|
32
31
|
import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
|
|
33
|
-
import
|
|
32
|
+
import CloneIcon from '@patternfly/react-icons/dist/esm/icons/clone-icon';
|
|
34
33
|
import EditIcon from '@patternfly/react-icons/dist/esm/icons/edit-icon';
|
|
35
|
-
import
|
|
34
|
+
import SyncIcon from '@patternfly/react-icons/dist/esm/icons/sync-icon';
|
|
36
35
|
import RhUiCodeIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-code-icon';
|
|
37
36
|
import RhMicronsSortDownLargeToSmallIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-sort-down-large-to-small-icon';
|
|
38
37
|
import RhUiBranchFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-branch-fill-icon';
|
|
@@ -121,13 +120,13 @@ export const TableSortableResponsive: React.FunctionComponent = () => {
|
|
|
121
120
|
const renderLabel = (labelText: string) => {
|
|
122
121
|
switch (labelText) {
|
|
123
122
|
case 'Running':
|
|
124
|
-
return <Label
|
|
123
|
+
return <Label color="green">{labelText}</Label>;
|
|
125
124
|
case 'Stopped':
|
|
126
|
-
return <Label
|
|
127
|
-
case 'Needs
|
|
128
|
-
return <Label
|
|
125
|
+
return <Label color="orange">{labelText}</Label>;
|
|
126
|
+
case 'Needs Maintenance':
|
|
127
|
+
return <Label color="blue">{labelText}</Label>;
|
|
129
128
|
case 'Down':
|
|
130
|
-
return <Label
|
|
129
|
+
return <Label color="red">{labelText}</Label>;
|
|
131
130
|
}
|
|
132
131
|
};
|
|
133
132
|
|
|
@@ -215,10 +214,10 @@ export const TableSortableResponsive: React.FunctionComponent = () => {
|
|
|
215
214
|
<Button aria-label="Edit" variant="plain" icon={<EditIcon />} />
|
|
216
215
|
</ToolbarItem>
|
|
217
216
|
<ToolbarItem>
|
|
218
|
-
<Button aria-label="Clone" variant="plain" icon={<
|
|
217
|
+
<Button aria-label="Clone" variant="plain" icon={<CloneIcon />} />
|
|
219
218
|
</ToolbarItem>
|
|
220
219
|
<ToolbarItem>
|
|
221
|
-
<Button aria-label="Sync" variant="plain" icon={<
|
|
220
|
+
<Button aria-label="Sync" variant="plain" icon={<SyncIcon />} />
|
|
222
221
|
</ToolbarItem>
|
|
223
222
|
</ToolbarGroup>
|
|
224
223
|
<ToolbarItem variant="pagination">{renderPagination('top', true)}</ToolbarItem>
|
|
@@ -10,13 +10,12 @@ import {
|
|
|
10
10
|
MenuToggle,
|
|
11
11
|
MenuToggleElement,
|
|
12
12
|
Label,
|
|
13
|
-
LabelStatus,
|
|
14
13
|
Select,
|
|
15
14
|
SelectOption,
|
|
16
15
|
PaginationVariant
|
|
17
16
|
} from '@patternfly/react-core';
|
|
18
17
|
import { Table, TableText, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
|
|
19
|
-
import
|
|
18
|
+
import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
|
|
20
19
|
import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
|
|
21
20
|
import { rows, columns } from '@patternfly/react-table/dist/esm/demos/sampleData';
|
|
22
21
|
|
|
@@ -68,25 +67,25 @@ export const TableStaticBottomPagination: React.FunctionComponent = () => {
|
|
|
68
67
|
case 'Running':
|
|
69
68
|
return (
|
|
70
69
|
<span>
|
|
71
|
-
<Label
|
|
70
|
+
<Label color="green">{labelText}</Label>
|
|
72
71
|
</span>
|
|
73
72
|
);
|
|
74
73
|
case 'Stopped':
|
|
75
74
|
return (
|
|
76
75
|
<span>
|
|
77
|
-
<Label
|
|
76
|
+
<Label color="orange">{labelText}</Label>
|
|
78
77
|
</span>
|
|
79
78
|
);
|
|
80
|
-
case 'Needs
|
|
79
|
+
case 'Needs Maintenance':
|
|
81
80
|
return (
|
|
82
81
|
<span>
|
|
83
|
-
<Label
|
|
82
|
+
<Label color="blue">{labelText}</Label>
|
|
84
83
|
</span>
|
|
85
84
|
);
|
|
86
85
|
case 'Down':
|
|
87
86
|
return (
|
|
88
87
|
<span>
|
|
89
|
-
<Label
|
|
88
|
+
<Label color="red">{labelText}</Label>
|
|
90
89
|
</span>
|
|
91
90
|
);
|
|
92
91
|
}
|
|
@@ -101,7 +100,7 @@ export const TableStaticBottomPagination: React.FunctionComponent = () => {
|
|
|
101
100
|
aria-label="Select Input"
|
|
102
101
|
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
|
103
102
|
<MenuToggle
|
|
104
|
-
icon={<
|
|
103
|
+
icon={<FilterIcon />}
|
|
105
104
|
ref={toggleRef}
|
|
106
105
|
onClick={() => setIsSelectOpen(!isSelectOpen)}
|
|
107
106
|
isExpanded={isSelectOpen}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Label,
|
|
1
|
+
import { Label, PageSection } from '@patternfly/react-core';
|
|
2
2
|
import { Table, Thead, Tr, Th, Tbody, Td, TableText } from '@patternfly/react-table';
|
|
3
3
|
import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
|
|
4
4
|
import { rows, columns } from '@patternfly/react-table/dist/esm/demos/sampleData';
|
|
@@ -7,13 +7,13 @@ export const TableStickyHeader: React.FunctionComponent = () => {
|
|
|
7
7
|
const renderLabel = (labelText: string) => {
|
|
8
8
|
switch (labelText) {
|
|
9
9
|
case 'Running':
|
|
10
|
-
return <Label
|
|
10
|
+
return <Label color="green">{labelText}</Label>;
|
|
11
11
|
case 'Stopped':
|
|
12
|
-
return <Label
|
|
13
|
-
case 'Needs
|
|
14
|
-
return <Label
|
|
12
|
+
return <Label color="orange">{labelText}</Label>;
|
|
13
|
+
case 'Needs Maintenance':
|
|
14
|
+
return <Label color="blue">{labelText}</Label>;
|
|
15
15
|
case 'Down':
|
|
16
|
-
return <Label
|
|
16
|
+
return <Label color="red">{labelText}</Label>;
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -253,7 +253,6 @@ class Table extends Component<TableProps, {}> {
|
|
|
253
253
|
actionsToggle,
|
|
254
254
|
onFavorite,
|
|
255
255
|
canSortFavorites,
|
|
256
|
-
variant,
|
|
257
256
|
// order of columns: Collapsible | Selectable | Favoritable
|
|
258
257
|
firstUserColumnIndex: [onCollapse, onSelect, onFavorite].filter((callback) => callback).length
|
|
259
258
|
});
|
|
@@ -279,25 +279,6 @@ describe('Table', () => {
|
|
|
279
279
|
expect(asFragment()).toMatchSnapshot();
|
|
280
280
|
});
|
|
281
281
|
|
|
282
|
-
test('Compact table with Radio select', () => {
|
|
283
|
-
const onSelect: OnSelect = () => undefined;
|
|
284
|
-
const { asFragment } = render(
|
|
285
|
-
<Table
|
|
286
|
-
aria-label="Compact table with radio"
|
|
287
|
-
variant={TableVariant.compact}
|
|
288
|
-
selectVariant={RowSelectVariant.radio}
|
|
289
|
-
onSelect={onSelect}
|
|
290
|
-
cells={columns}
|
|
291
|
-
rows={rows}
|
|
292
|
-
>
|
|
293
|
-
<TableHeader />
|
|
294
|
-
<TableBody />
|
|
295
|
-
</Table>
|
|
296
|
-
);
|
|
297
|
-
|
|
298
|
-
expect(asFragment()).toMatchSnapshot();
|
|
299
|
-
});
|
|
300
|
-
|
|
301
282
|
test('Control text table', () => {
|
|
302
283
|
const controlTextColumns: ICell[] = [
|
|
303
284
|
{ ...(columns[0] as object), transforms: [nowrap] },
|