@patternfly/react-core 5.0.0-alpha.32 → 5.0.0-alpha.33
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 +12 -0
- package/components/EmptyState/EmptyState.d.ts +6 -6
- package/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/components/EmptyState/EmptyState.js +4 -4
- package/components/EmptyState/EmptyState.js.map +1 -1
- package/components/EmptyState/EmptyStateActions.d.ts +9 -0
- package/components/EmptyState/EmptyStateActions.d.ts.map +1 -0
- package/components/EmptyState/EmptyStateActions.js +10 -0
- package/components/EmptyState/EmptyStateActions.js.map +1 -0
- package/components/EmptyState/EmptyStateBody.d.ts +2 -2
- package/components/EmptyState/EmptyStateBody.d.ts.map +1 -1
- package/components/EmptyState/EmptyStateBody.js +1 -1
- package/components/EmptyState/EmptyStateBody.js.map +1 -1
- package/components/EmptyState/EmptyStateFooter.d.ts +9 -0
- package/components/EmptyState/EmptyStateFooter.d.ts.map +1 -0
- package/components/EmptyState/EmptyStateFooter.js +10 -0
- package/components/EmptyState/EmptyStateFooter.js.map +1 -0
- package/components/EmptyState/EmptyStateHeader.d.ts +18 -0
- package/components/EmptyState/EmptyStateHeader.d.ts.map +1 -0
- package/components/EmptyState/EmptyStateHeader.js +14 -0
- package/components/EmptyState/EmptyStateHeader.js.map +1 -0
- package/components/EmptyState/EmptyStateIcon.d.ts +3 -9
- package/components/EmptyState/EmptyStateIcon.d.ts.map +1 -1
- package/components/EmptyState/EmptyStateIcon.js +6 -4
- package/components/EmptyState/EmptyStateIcon.js.map +1 -1
- package/components/EmptyState/index.d.ts +4 -3
- package/components/EmptyState/index.d.ts.map +1 -1
- package/components/EmptyState/index.js +4 -3
- package/components/EmptyState/index.js.map +1 -1
- package/dist/esm/components/EmptyState/EmptyState.d.ts +6 -6
- package/dist/esm/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/esm/components/EmptyState/EmptyState.js +4 -4
- package/dist/esm/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/esm/components/EmptyState/EmptyStateActions.d.ts +9 -0
- package/dist/esm/components/EmptyState/EmptyStateActions.d.ts.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateActions.js +10 -0
- package/dist/esm/components/EmptyState/EmptyStateActions.js.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateBody.d.ts +2 -2
- package/dist/esm/components/EmptyState/EmptyStateBody.d.ts.map +1 -1
- package/dist/esm/components/EmptyState/EmptyStateBody.js +1 -1
- package/dist/esm/components/EmptyState/EmptyStateBody.js.map +1 -1
- package/dist/esm/components/EmptyState/EmptyStateFooter.d.ts +9 -0
- package/dist/esm/components/EmptyState/EmptyStateFooter.d.ts.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateFooter.js +10 -0
- package/dist/esm/components/EmptyState/EmptyStateFooter.js.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateHeader.d.ts +18 -0
- package/dist/esm/components/EmptyState/EmptyStateHeader.d.ts.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateHeader.js +14 -0
- package/dist/esm/components/EmptyState/EmptyStateHeader.js.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateIcon.d.ts +3 -9
- package/dist/esm/components/EmptyState/EmptyStateIcon.d.ts.map +1 -1
- package/dist/esm/components/EmptyState/EmptyStateIcon.js +6 -4
- package/dist/esm/components/EmptyState/EmptyStateIcon.js.map +1 -1
- package/dist/esm/components/EmptyState/index.d.ts +4 -3
- package/dist/esm/components/EmptyState/index.d.ts.map +1 -1
- package/dist/esm/components/EmptyState/index.js +4 -3
- package/dist/esm/components/EmptyState/index.js.map +1 -1
- package/dist/js/components/EmptyState/EmptyState.d.ts +6 -6
- package/dist/js/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/js/components/EmptyState/EmptyState.js +4 -4
- package/dist/js/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/js/components/EmptyState/EmptyStateActions.d.ts +9 -0
- package/dist/js/components/EmptyState/EmptyStateActions.d.ts.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateActions.js +14 -0
- package/dist/js/components/EmptyState/EmptyStateActions.js.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateBody.d.ts +2 -2
- package/dist/js/components/EmptyState/EmptyStateBody.d.ts.map +1 -1
- package/dist/js/components/EmptyState/EmptyStateBody.js +1 -1
- package/dist/js/components/EmptyState/EmptyStateBody.js.map +1 -1
- package/dist/js/components/EmptyState/EmptyStateFooter.d.ts +9 -0
- package/dist/js/components/EmptyState/EmptyStateFooter.d.ts.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateFooter.js +14 -0
- package/dist/js/components/EmptyState/EmptyStateFooter.js.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateHeader.d.ts +18 -0
- package/dist/js/components/EmptyState/EmptyStateHeader.d.ts.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateHeader.js +18 -0
- package/dist/js/components/EmptyState/EmptyStateHeader.js.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateIcon.d.ts +3 -9
- package/dist/js/components/EmptyState/EmptyStateIcon.d.ts.map +1 -1
- package/dist/js/components/EmptyState/EmptyStateIcon.js +6 -4
- package/dist/js/components/EmptyState/EmptyStateIcon.js.map +1 -1
- package/dist/js/components/EmptyState/index.d.ts +4 -3
- package/dist/js/components/EmptyState/index.d.ts.map +1 -1
- package/dist/js/components/EmptyState/index.js +4 -3
- package/dist/js/components/EmptyState/index.js.map +1 -1
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +2 -2
- package/src/components/DualListSelector/examples/DualListSelectorComposable.tsx +32 -30
- package/src/components/DualListSelector/examples/DualListSelectorComposableTree.tsx +38 -34
- package/src/components/EmptyState/EmptyState.tsx +9 -9
- package/src/components/EmptyState/EmptyStateActions.tsx +21 -0
- package/src/components/EmptyState/EmptyStateBody.tsx +3 -3
- package/src/components/EmptyState/EmptyStateFooter.tsx +21 -0
- package/src/components/EmptyState/EmptyStateHeader.tsx +42 -0
- package/src/components/EmptyState/EmptyStateIcon.tsx +15 -18
- package/src/components/EmptyState/__tests__/EmptyState.test.tsx +53 -60
- package/src/components/EmptyState/__tests__/Generated/{EmptyStatePrimary.test.tsx → EmptyStateActions.test.tsx} +3 -3
- package/src/components/EmptyState/__tests__/Generated/EmptyStateIcon.test.tsx +3 -6
- package/src/components/EmptyState/__tests__/Generated/__snapshots__/{EmptyStateSecondaryActions.test.tsx.snap → EmptyStateActions.test.tsx.snap} +2 -2
- package/src/components/EmptyState/__tests__/Generated/__snapshots__/EmptyStateIcon.test.tsx.snap +41 -22
- package/src/components/EmptyState/__tests__/__snapshots__/EmptyState.test.tsx.snap +115 -56
- package/src/components/EmptyState/examples/EmptyState.md +7 -3
- package/src/components/EmptyState/examples/EmptyStateBasic.tsx +20 -18
- package/src/components/EmptyState/examples/EmptyStateCustomIconColor.tsx +17 -0
- package/src/components/EmptyState/examples/EmptyStateExtraLarge.tsx +20 -18
- package/src/components/EmptyState/examples/EmptyStateExtraSmall.tsx +16 -15
- package/src/components/EmptyState/examples/EmptyStateLarge.tsx +21 -19
- package/src/components/EmptyState/examples/EmptyStateNoMatchFound.tsx +15 -8
- package/src/components/EmptyState/examples/EmptyStateSmall.tsx +21 -19
- package/src/components/EmptyState/examples/EmptyStateSpinner.tsx +2 -5
- package/src/components/EmptyState/index.ts +4 -3
- package/src/components/NotificationDrawer/examples/NotificationDrawerGroups.tsx +15 -11
- package/src/components/NotificationDrawer/examples/NotificationDrawerLightweight.tsx +14 -10
- package/src/components/Wizard/examples/Wizard.md +1 -1
- package/src/components/Wizard/examples/WizardFinished.tsx +18 -14
- package/src/components/Wizard/examples/WizardValidateOnButtonPress.tsx +20 -16
- package/src/demos/Card/Card.md +13 -8
- package/src/demos/Filters/FilterDemos.md +4 -2
- package/src/demos/Filters/examples/FilterAttributeSearch.tsx +20 -20
- package/src/demos/Filters/examples/FilterFaceted.tsx +19 -19
- package/src/demos/Filters/examples/FilterMixedSelectGroup.tsx +19 -19
- package/src/demos/Filters/examples/FilterSameSelectGroup.tsx +19 -19
- package/src/demos/Filters/examples/FilterSearchInput.tsx +18 -18
- package/src/demos/NotificationDrawer/NotificationDrawer.md +52 -39
- package/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx +19 -17
- package/src/next/components/Wizard/examples/WizardValidateOnButtonPress.tsx +19 -15
- package/src/next/components/Wizard/examples/WizardWithSubmitProgress.tsx +18 -14
- package/components/EmptyState/EmptyStatePrimary.d.ts +0 -9
- package/components/EmptyState/EmptyStatePrimary.d.ts.map +0 -1
- package/components/EmptyState/EmptyStatePrimary.js +0 -9
- package/components/EmptyState/EmptyStatePrimary.js.map +0 -1
- package/components/EmptyState/EmptyStateSecondaryActions.d.ts +0 -9
- package/components/EmptyState/EmptyStateSecondaryActions.d.ts.map +0 -1
- package/components/EmptyState/EmptyStateSecondaryActions.js +0 -9
- package/components/EmptyState/EmptyStateSecondaryActions.js.map +0 -1
- package/dist/esm/components/EmptyState/EmptyStatePrimary.d.ts +0 -9
- package/dist/esm/components/EmptyState/EmptyStatePrimary.d.ts.map +0 -1
- package/dist/esm/components/EmptyState/EmptyStatePrimary.js +0 -9
- package/dist/esm/components/EmptyState/EmptyStatePrimary.js.map +0 -1
- package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.d.ts +0 -9
- package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.d.ts.map +0 -1
- package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.js +0 -9
- package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.js.map +0 -1
- package/dist/js/components/EmptyState/EmptyStatePrimary.d.ts +0 -9
- package/dist/js/components/EmptyState/EmptyStatePrimary.d.ts.map +0 -1
- package/dist/js/components/EmptyState/EmptyStatePrimary.js +0 -13
- package/dist/js/components/EmptyState/EmptyStatePrimary.js.map +0 -1
- package/dist/js/components/EmptyState/EmptyStateSecondaryActions.d.ts +0 -9
- package/dist/js/components/EmptyState/EmptyStateSecondaryActions.d.ts.map +0 -1
- package/dist/js/components/EmptyState/EmptyStateSecondaryActions.js +0 -13
- package/dist/js/components/EmptyState/EmptyStateSecondaryActions.js.map +0 -1
- package/src/components/EmptyState/EmptyStatePrimary.tsx +0 -20
- package/src/components/EmptyState/EmptyStateSecondaryActions.tsx +0 -18
- package/src/components/EmptyState/__tests__/Generated/EmptyStateSecondaryActions.test.tsx +0 -13
- package/src/components/EmptyState/__tests__/Generated/__snapshots__/EmptyStatePrimary.test.tsx.snap +0 -13
|
@@ -12,16 +12,17 @@ import {
|
|
|
12
12
|
Popper,
|
|
13
13
|
Pagination,
|
|
14
14
|
EmptyState,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
EmptyStateHeader,
|
|
16
|
+
EmptyStateFooter,
|
|
17
17
|
EmptyStateBody,
|
|
18
|
-
EmptyStatePrimary,
|
|
19
18
|
Button,
|
|
20
19
|
Bullseye,
|
|
21
20
|
Badge,
|
|
22
21
|
ToolbarFilter,
|
|
23
22
|
ToolbarToggleGroup,
|
|
24
|
-
MenuGroup
|
|
23
|
+
MenuGroup,
|
|
24
|
+
EmptyStateIcon,
|
|
25
|
+
EmptyStateActions
|
|
25
26
|
} from '@patternfly/react-core';
|
|
26
27
|
import { TableComposable, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
|
|
27
28
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
@@ -444,22 +445,21 @@ export const FilterFaceted: React.FunctionComponent = () => {
|
|
|
444
445
|
|
|
445
446
|
const emptyState = (
|
|
446
447
|
<EmptyState>
|
|
447
|
-
<EmptyStateIcon icon={SearchIcon} />
|
|
448
|
-
<Title size="lg" headingLevel="h4">
|
|
449
|
-
No results found
|
|
450
|
-
</Title>
|
|
448
|
+
<EmptyStateHeader headingLevel="h4" titleText="No results found" icon={<EmptyStateIcon icon={SearchIcon} />} />
|
|
451
449
|
<EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
|
|
452
|
-
<
|
|
453
|
-
<
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
450
|
+
<EmptyStateFooter>
|
|
451
|
+
<EmptyStateActions>
|
|
452
|
+
<Button
|
|
453
|
+
variant="link"
|
|
454
|
+
onClick={() => {
|
|
455
|
+
setStatusSelections([]);
|
|
456
|
+
setLocationSelections([]);
|
|
457
|
+
}}
|
|
458
|
+
>
|
|
459
|
+
Clear all filters
|
|
460
|
+
</Button>
|
|
461
|
+
</EmptyStateActions>
|
|
462
|
+
</EmptyStateFooter>
|
|
463
463
|
</EmptyState>
|
|
464
464
|
);
|
|
465
465
|
|
|
@@ -12,15 +12,16 @@ import {
|
|
|
12
12
|
Popper,
|
|
13
13
|
Pagination,
|
|
14
14
|
EmptyState,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
EmptyStateHeader,
|
|
16
|
+
EmptyStateFooter,
|
|
17
17
|
EmptyStateBody,
|
|
18
|
-
EmptyStatePrimary,
|
|
19
18
|
Button,
|
|
20
19
|
Bullseye,
|
|
21
20
|
Badge,
|
|
22
21
|
ToolbarFilter,
|
|
23
|
-
ToolbarToggleGroup
|
|
22
|
+
ToolbarToggleGroup,
|
|
23
|
+
EmptyStateIcon,
|
|
24
|
+
EmptyStateActions
|
|
24
25
|
} from '@patternfly/react-core';
|
|
25
26
|
import { TableComposable, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
|
|
26
27
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
@@ -494,22 +495,21 @@ export const FilterMixedSelectGroup: React.FunctionComponent = () => {
|
|
|
494
495
|
|
|
495
496
|
const emptyState = (
|
|
496
497
|
<EmptyState>
|
|
497
|
-
<EmptyStateIcon icon={SearchIcon} />
|
|
498
|
-
<Title size="lg" headingLevel="h4">
|
|
499
|
-
No results found
|
|
500
|
-
</Title>
|
|
498
|
+
<EmptyStateHeader headingLevel="h4" titleText="No results found" icon={<EmptyStateIcon icon={SearchIcon} />} />
|
|
501
499
|
<EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
|
|
502
|
-
<
|
|
503
|
-
<
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
500
|
+
<EmptyStateFooter>
|
|
501
|
+
<EmptyStateActions>
|
|
502
|
+
<Button
|
|
503
|
+
variant="link"
|
|
504
|
+
onClick={() => {
|
|
505
|
+
setStatusSelection('');
|
|
506
|
+
setLocationSelections([]);
|
|
507
|
+
}}
|
|
508
|
+
>
|
|
509
|
+
Clear all filters
|
|
510
|
+
</Button>
|
|
511
|
+
</EmptyStateActions>
|
|
512
|
+
</EmptyStateFooter>
|
|
513
513
|
</EmptyState>
|
|
514
514
|
);
|
|
515
515
|
|
|
@@ -12,13 +12,14 @@ import {
|
|
|
12
12
|
Popper,
|
|
13
13
|
Pagination,
|
|
14
14
|
EmptyState,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
EmptyStateHeader,
|
|
16
|
+
EmptyStateFooter,
|
|
17
17
|
EmptyStateBody,
|
|
18
|
-
EmptyStatePrimary,
|
|
19
18
|
Button,
|
|
20
19
|
Bullseye,
|
|
21
|
-
ToolbarToggleGroup
|
|
20
|
+
ToolbarToggleGroup,
|
|
21
|
+
EmptyStateIcon,
|
|
22
|
+
EmptyStateActions
|
|
22
23
|
} from '@patternfly/react-core';
|
|
23
24
|
import { TableComposable, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
|
|
24
25
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
@@ -467,22 +468,21 @@ export const FilterSameSelectGroup: React.FunctionComponent = () => {
|
|
|
467
468
|
|
|
468
469
|
const emptyState = (
|
|
469
470
|
<EmptyState>
|
|
470
|
-
<EmptyStateIcon icon={SearchIcon} />
|
|
471
|
-
<Title size="lg" headingLevel="h4">
|
|
472
|
-
No results found
|
|
473
|
-
</Title>
|
|
471
|
+
<EmptyStateHeader headingLevel="h4" titleText="No results found" icon={<EmptyStateIcon icon={SearchIcon} />} />
|
|
474
472
|
<EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
|
|
475
|
-
<
|
|
476
|
-
<
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
473
|
+
<EmptyStateFooter>
|
|
474
|
+
<EmptyStateActions>
|
|
475
|
+
<Button
|
|
476
|
+
variant="link"
|
|
477
|
+
onClick={() => {
|
|
478
|
+
setStatusSelection('All statuses');
|
|
479
|
+
setLocationSelection('All locations');
|
|
480
|
+
}}
|
|
481
|
+
>
|
|
482
|
+
Clear all filters
|
|
483
|
+
</Button>
|
|
484
|
+
</EmptyStateActions>
|
|
485
|
+
</EmptyStateFooter>
|
|
486
486
|
</EmptyState>
|
|
487
487
|
);
|
|
488
488
|
|
|
@@ -13,12 +13,13 @@ import {
|
|
|
13
13
|
Popper,
|
|
14
14
|
Pagination,
|
|
15
15
|
EmptyState,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
EmptyStateHeader,
|
|
17
|
+
EmptyStateFooter,
|
|
18
18
|
EmptyStateBody,
|
|
19
|
-
EmptyStatePrimary,
|
|
20
19
|
Button,
|
|
21
|
-
Bullseye
|
|
20
|
+
Bullseye,
|
|
21
|
+
EmptyStateIcon,
|
|
22
|
+
EmptyStateActions
|
|
22
23
|
} from '@patternfly/react-core';
|
|
23
24
|
import { TableComposable, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
|
|
24
25
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
@@ -276,21 +277,20 @@ export const FilterSearchInput: React.FunctionComponent = () => {
|
|
|
276
277
|
|
|
277
278
|
const emptyState = (
|
|
278
279
|
<EmptyState>
|
|
279
|
-
<EmptyStateIcon icon={SearchIcon} />
|
|
280
|
-
<Title size="lg" headingLevel="h4">
|
|
281
|
-
No results found
|
|
282
|
-
</Title>
|
|
280
|
+
<EmptyStateHeader headingLevel="h4" titleText="No results found" icon={<EmptyStateIcon icon={SearchIcon} />} />
|
|
283
281
|
<EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
|
|
284
|
-
<
|
|
285
|
-
<
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
282
|
+
<EmptyStateFooter>
|
|
283
|
+
<EmptyStateActions>
|
|
284
|
+
<Button
|
|
285
|
+
variant="link"
|
|
286
|
+
onClick={() => {
|
|
287
|
+
setSearchValue('');
|
|
288
|
+
}}
|
|
289
|
+
>
|
|
290
|
+
Clear all filters
|
|
291
|
+
</Button>
|
|
292
|
+
</EmptyStateActions>
|
|
293
|
+
</EmptyStateFooter>
|
|
294
294
|
</EmptyState>
|
|
295
295
|
);
|
|
296
296
|
|
|
@@ -38,9 +38,11 @@ import {
|
|
|
38
38
|
DropdownItem,
|
|
39
39
|
DropdownSeparator,
|
|
40
40
|
EmptyState,
|
|
41
|
+
EmptyStateActions,
|
|
41
42
|
EmptyStateBody,
|
|
42
43
|
EmptyStateIcon,
|
|
43
|
-
|
|
44
|
+
EmptyStateHeader,
|
|
45
|
+
EmptyStateFooter,
|
|
44
46
|
EmptyStateVariant,
|
|
45
47
|
KebabToggle,
|
|
46
48
|
Nav,
|
|
@@ -104,7 +106,7 @@ class BasicNotificationDrawer extends React.Component {
|
|
|
104
106
|
});
|
|
105
107
|
};
|
|
106
108
|
|
|
107
|
-
this.onDropdownSelect = event => {
|
|
109
|
+
this.onDropdownSelect = (event) => {
|
|
108
110
|
this.setState({
|
|
109
111
|
isDropdownOpen: !this.state.isDropdownOpen
|
|
110
112
|
});
|
|
@@ -116,20 +118,20 @@ class BasicNotificationDrawer extends React.Component {
|
|
|
116
118
|
});
|
|
117
119
|
};
|
|
118
120
|
|
|
119
|
-
this.onKebabDropdownSelect = event => {
|
|
121
|
+
this.onKebabDropdownSelect = (event) => {
|
|
120
122
|
this.setState({
|
|
121
123
|
isKebabDropdownOpen: !this.state.isKebabDropdownOpen
|
|
122
124
|
});
|
|
123
125
|
};
|
|
124
126
|
|
|
125
|
-
this.onNavSelect = result => {
|
|
127
|
+
this.onNavSelect = (result) => {
|
|
126
128
|
this.setState({
|
|
127
129
|
activeItem: result.itemId
|
|
128
130
|
});
|
|
129
131
|
};
|
|
130
132
|
|
|
131
133
|
this.onCloseNotificationDrawer = () => {
|
|
132
|
-
this.setState(prevState => {
|
|
134
|
+
this.setState((prevState) => {
|
|
133
135
|
return {
|
|
134
136
|
isDrawerExpanded: !prevState.isDrawerExpanded
|
|
135
137
|
};
|
|
@@ -142,14 +144,14 @@ class BasicNotificationDrawer extends React.Component {
|
|
|
142
144
|
});
|
|
143
145
|
};
|
|
144
146
|
|
|
145
|
-
this.onSelect = event => {
|
|
147
|
+
this.onSelect = (event) => {
|
|
146
148
|
this.setState({
|
|
147
149
|
isActionsMenuOpen: null
|
|
148
150
|
});
|
|
149
151
|
};
|
|
150
152
|
|
|
151
|
-
this.onListItemClick = id => {
|
|
152
|
-
this.setState(prevState => {
|
|
153
|
+
this.onListItemClick = (id) => {
|
|
154
|
+
this.setState((prevState) => {
|
|
153
155
|
if (!prevState.isUnreadMap) return;
|
|
154
156
|
prevState.isUnreadMap[id] = false;
|
|
155
157
|
return {
|
|
@@ -172,7 +174,7 @@ class BasicNotificationDrawer extends React.Component {
|
|
|
172
174
|
});
|
|
173
175
|
};
|
|
174
176
|
|
|
175
|
-
this.showNotifications = showNotifications => {
|
|
177
|
+
this.showNotifications = (showNotifications) => {
|
|
176
178
|
this.setState({
|
|
177
179
|
isUnreadMap: null,
|
|
178
180
|
showNotifications: showNotifications
|
|
@@ -503,16 +505,19 @@ class BasicNotificationDrawer extends React.Component {
|
|
|
503
505
|
)}
|
|
504
506
|
{!showNotifications && (
|
|
505
507
|
<EmptyState variant={EmptyStateVariant.full}>
|
|
506
|
-
<
|
|
507
|
-
|
|
508
|
-
No
|
|
509
|
-
|
|
508
|
+
<EmptyStateHeader
|
|
509
|
+
headingLevel="h2"
|
|
510
|
+
titleText="No results found"
|
|
511
|
+
icon={<EmptyStateIcon icon={SearchIcon} />}
|
|
512
|
+
/>
|
|
510
513
|
<EmptyStateBody>
|
|
511
514
|
There are currently no alerts. There may be silenced critical alerts however.
|
|
512
515
|
</EmptyStateBody>
|
|
513
|
-
<
|
|
514
|
-
<
|
|
515
|
-
|
|
516
|
+
<EmptyStateFooter>
|
|
517
|
+
<EmptyStateActions>
|
|
518
|
+
<Button variant="link">Action</Button>
|
|
519
|
+
</EmptyStateActions>
|
|
520
|
+
</EmptyStateFooter>
|
|
516
521
|
</EmptyState>
|
|
517
522
|
)}
|
|
518
523
|
</NotificationDrawerBody>
|
|
@@ -572,9 +577,11 @@ import {
|
|
|
572
577
|
DropdownItem,
|
|
573
578
|
DropdownSeparator,
|
|
574
579
|
EmptyState,
|
|
580
|
+
EmptyStateActions,
|
|
575
581
|
EmptyStateBody,
|
|
576
582
|
EmptyStateIcon,
|
|
577
|
-
|
|
583
|
+
EmptyStateHeader,
|
|
584
|
+
EmptyStateFooter,
|
|
578
585
|
EmptyStateVariant,
|
|
579
586
|
KebabToggle,
|
|
580
587
|
Nav,
|
|
@@ -650,7 +657,7 @@ class GroupedNotificationDrawer extends React.Component {
|
|
|
650
657
|
});
|
|
651
658
|
};
|
|
652
659
|
|
|
653
|
-
this.onDropdownSelect = event => {
|
|
660
|
+
this.onDropdownSelect = (event) => {
|
|
654
661
|
this.setState({
|
|
655
662
|
isDropdownOpen: !this.state.isDropdownOpen
|
|
656
663
|
});
|
|
@@ -662,20 +669,20 @@ class GroupedNotificationDrawer extends React.Component {
|
|
|
662
669
|
});
|
|
663
670
|
};
|
|
664
671
|
|
|
665
|
-
this.onKebabDropdownSelect = event => {
|
|
672
|
+
this.onKebabDropdownSelect = (event) => {
|
|
666
673
|
this.setState({
|
|
667
674
|
isKebabDropdownOpen: !this.state.isKebabDropdownOpen
|
|
668
675
|
});
|
|
669
676
|
};
|
|
670
677
|
|
|
671
|
-
this.onNavSelect = result => {
|
|
678
|
+
this.onNavSelect = (result) => {
|
|
672
679
|
this.setState({
|
|
673
680
|
activeItem: result.itemId
|
|
674
681
|
});
|
|
675
682
|
};
|
|
676
683
|
|
|
677
684
|
this.onCloseNotificationDrawer = () => {
|
|
678
|
-
this.setState(prevState => {
|
|
685
|
+
this.setState((prevState) => {
|
|
679
686
|
return {
|
|
680
687
|
isDrawerExpanded: !prevState.isDrawerExpanded
|
|
681
688
|
};
|
|
@@ -688,14 +695,14 @@ class GroupedNotificationDrawer extends React.Component {
|
|
|
688
695
|
});
|
|
689
696
|
};
|
|
690
697
|
|
|
691
|
-
this.onSelect = event => {
|
|
698
|
+
this.onSelect = (event) => {
|
|
692
699
|
this.setState({
|
|
693
700
|
isActionsMenuOpen: null
|
|
694
701
|
});
|
|
695
702
|
};
|
|
696
703
|
|
|
697
704
|
this.onListItemClick = (groupId, id) => {
|
|
698
|
-
this.setState(prevState => {
|
|
705
|
+
this.setState((prevState) => {
|
|
699
706
|
if (!prevState.isUnreadMap || !prevState.isUnreadMap[groupId]) return;
|
|
700
707
|
console.log(prevState.isUnreadMap);
|
|
701
708
|
prevState.isUnreadMap[groupId][id] = false;
|
|
@@ -710,7 +717,7 @@ class GroupedNotificationDrawer extends React.Component {
|
|
|
710
717
|
return isUnreadMap && isUnreadMap[groupId] && isUnreadMap[groupId][id];
|
|
711
718
|
};
|
|
712
719
|
|
|
713
|
-
this.getNumberUnread = groupId => {
|
|
720
|
+
this.getNumberUnread = (groupId) => {
|
|
714
721
|
const { isUnreadMap } = this.state;
|
|
715
722
|
if (isUnreadMap === null) return 0;
|
|
716
723
|
|
|
@@ -737,7 +744,7 @@ class GroupedNotificationDrawer extends React.Component {
|
|
|
737
744
|
});
|
|
738
745
|
};
|
|
739
746
|
|
|
740
|
-
this.showNotifications = showNotifications => {
|
|
747
|
+
this.showNotifications = (showNotifications) => {
|
|
741
748
|
this.setState({
|
|
742
749
|
isUnreadMap: null,
|
|
743
750
|
showNotifications: showNotifications
|
|
@@ -1232,17 +1239,20 @@ class GroupedNotificationDrawer extends React.Component {
|
|
|
1232
1239
|
>
|
|
1233
1240
|
<NotificationDrawerList isHidden={!thirdDrawerGroupExpanded}>
|
|
1234
1241
|
<EmptyState variant={EmptyStateVariant.full}>
|
|
1235
|
-
<
|
|
1236
|
-
|
|
1237
|
-
No alerts found
|
|
1238
|
-
|
|
1242
|
+
<EmptyStateHeader
|
|
1243
|
+
headingLevel="h2"
|
|
1244
|
+
titleText="No alerts found"
|
|
1245
|
+
icon={<EmptyStateIcon icon={SearchIcon} />}
|
|
1246
|
+
/>
|
|
1239
1247
|
<EmptyStateBody>
|
|
1240
1248
|
There are currently no critical alerts firing. There may be firing alerts of other severities or
|
|
1241
1249
|
silenced critical alerts however.
|
|
1242
1250
|
</EmptyStateBody>
|
|
1243
|
-
<
|
|
1244
|
-
<
|
|
1245
|
-
|
|
1251
|
+
<EmptyStateFooter>
|
|
1252
|
+
<EmptyStateActions>
|
|
1253
|
+
<Button variant="link">Action</Button>
|
|
1254
|
+
</EmptyStateActions>
|
|
1255
|
+
</EmptyStateFooter>
|
|
1246
1256
|
</EmptyState>
|
|
1247
1257
|
</NotificationDrawerList>
|
|
1248
1258
|
</NotificationDrawerGroup>
|
|
@@ -1250,16 +1260,19 @@ class GroupedNotificationDrawer extends React.Component {
|
|
|
1250
1260
|
)}
|
|
1251
1261
|
{!showNotifications && (
|
|
1252
1262
|
<EmptyState variant={EmptyStateVariant.full}>
|
|
1253
|
-
<
|
|
1254
|
-
|
|
1255
|
-
No alerts found
|
|
1256
|
-
|
|
1263
|
+
<EmptyStateHeader
|
|
1264
|
+
headingLevel="h2"
|
|
1265
|
+
titleText="No alerts found"
|
|
1266
|
+
icon={<EmptyStateIcon icon={SearchIcon} />}
|
|
1267
|
+
/>
|
|
1257
1268
|
<EmptyStateBody>
|
|
1258
1269
|
There are currently no alerts. There may be silenced critical alerts however.
|
|
1259
1270
|
</EmptyStateBody>
|
|
1260
|
-
<
|
|
1261
|
-
<
|
|
1262
|
-
|
|
1271
|
+
<EmptyStateFooter>
|
|
1272
|
+
<EmptyStateActions>
|
|
1273
|
+
<Button variant="link">Action</Button>
|
|
1274
|
+
</EmptyStateActions>
|
|
1275
|
+
</EmptyStateFooter>
|
|
1263
1276
|
</EmptyState>
|
|
1264
1277
|
)}
|
|
1265
1278
|
</NotificationDrawerBody>
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
DropdownItem,
|
|
6
6
|
EmptyState,
|
|
7
7
|
EmptyStateBody,
|
|
8
|
+
EmptyStateHeader,
|
|
8
9
|
EmptyStateIcon,
|
|
9
10
|
KebabToggle,
|
|
10
11
|
NotificationBadge,
|
|
@@ -20,7 +21,6 @@ import {
|
|
|
20
21
|
PageSectionVariants,
|
|
21
22
|
TextContent,
|
|
22
23
|
Text,
|
|
23
|
-
Title,
|
|
24
24
|
DropdownPosition,
|
|
25
25
|
EmptyStateVariant,
|
|
26
26
|
NumberInput,
|
|
@@ -69,13 +69,13 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
|
|
|
69
69
|
const key = getUniqueId();
|
|
70
70
|
const timestamp = getTimeCreated();
|
|
71
71
|
|
|
72
|
-
setNotifications(prevNotifications => [
|
|
72
|
+
setNotifications((prevNotifications) => [
|
|
73
73
|
{ title, srTitle, variant, key, timestamp, description, isNotificationRead: false },
|
|
74
74
|
...prevNotifications
|
|
75
75
|
]);
|
|
76
76
|
|
|
77
77
|
if (!isDrawerExpanded) {
|
|
78
|
-
setAlerts(prevAlerts => [
|
|
78
|
+
setAlerts((prevAlerts) => [
|
|
79
79
|
<Alert
|
|
80
80
|
variant={variant}
|
|
81
81
|
title={title}
|
|
@@ -96,7 +96,7 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
|
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
const removeNotification = (key: React.Key) => {
|
|
99
|
-
setNotifications(prevNotifications => prevNotifications.filter(notification => notification.key !== key));
|
|
99
|
+
setNotifications((prevNotifications) => prevNotifications.filter((notification) => notification.key !== key));
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
const removeAllNotifications = () => {
|
|
@@ -104,28 +104,29 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
|
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
const isNotificationRead = (key: React.Key) =>
|
|
107
|
-
notifications.find(notification => notification.key === key)?.isNotificationRead;
|
|
107
|
+
notifications.find((notification) => notification.key === key)?.isNotificationRead;
|
|
108
108
|
|
|
109
109
|
const markNotificationRead = (key: React.Key) => {
|
|
110
|
-
setNotifications(prevNotifications =>
|
|
111
|
-
prevNotifications.map(notification =>
|
|
110
|
+
setNotifications((prevNotifications) =>
|
|
111
|
+
prevNotifications.map((notification) =>
|
|
112
112
|
notification.key === key ? { ...notification, isNotificationRead: true } : notification
|
|
113
113
|
)
|
|
114
114
|
);
|
|
115
115
|
};
|
|
116
116
|
|
|
117
117
|
const markAllNotificationsRead = () => {
|
|
118
|
-
setNotifications(prevNotifications =>
|
|
119
|
-
prevNotifications.map(notification => ({ ...notification, isNotificationRead: true }))
|
|
118
|
+
setNotifications((prevNotifications) =>
|
|
119
|
+
prevNotifications.map((notification) => ({ ...notification, isNotificationRead: true }))
|
|
120
120
|
);
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
const getUnreadNotificationsNumber = () =>
|
|
124
|
-
notifications.filter(notification => notification.isNotificationRead === false).length;
|
|
124
|
+
notifications.filter((notification) => notification.isNotificationRead === false).length;
|
|
125
125
|
|
|
126
126
|
const containsUnreadAlertNotification = () =>
|
|
127
|
-
notifications.filter(
|
|
128
|
-
.
|
|
127
|
+
notifications.filter(
|
|
128
|
+
(notification) => notification.isNotificationRead === false && notification.variant === 'danger'
|
|
129
|
+
).length > 0;
|
|
129
130
|
|
|
130
131
|
const getNotificationBadgeVariant = () => {
|
|
131
132
|
if (getUnreadNotificationsNumber() === 0) {
|
|
@@ -176,7 +177,7 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
|
|
|
176
177
|
};
|
|
177
178
|
|
|
178
179
|
const removeAlert = (key: React.Key) => {
|
|
179
|
-
setAlerts(prevAlerts => prevAlerts.filter(alert => alert.props.id !== key.toString()));
|
|
180
|
+
setAlerts((prevAlerts) => prevAlerts.filter((alert) => alert.props.id !== key.toString()));
|
|
180
181
|
};
|
|
181
182
|
|
|
182
183
|
const removeAllAlerts = () => {
|
|
@@ -281,10 +282,11 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
|
|
|
281
282
|
)}
|
|
282
283
|
{notifications.length === 0 && (
|
|
283
284
|
<EmptyState variant={EmptyStateVariant.full}>
|
|
284
|
-
<
|
|
285
|
-
|
|
286
|
-
No notifications found
|
|
287
|
-
|
|
285
|
+
<EmptyStateHeader
|
|
286
|
+
headingLevel="h2"
|
|
287
|
+
titleText="No notifications found"
|
|
288
|
+
icon={<EmptyStateIcon icon={SearchIcon} />}
|
|
289
|
+
/>
|
|
288
290
|
<EmptyStateBody>There are currently no notifications.</EmptyStateBody>
|
|
289
291
|
</EmptyState>
|
|
290
292
|
)}
|
|
@@ -4,11 +4,12 @@ import {
|
|
|
4
4
|
Button,
|
|
5
5
|
Alert,
|
|
6
6
|
EmptyState,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
EmptyStateHeader,
|
|
8
|
+
EmptyStateFooter,
|
|
9
9
|
EmptyStateBody,
|
|
10
|
+
EmptyStateActions,
|
|
11
|
+
EmptyStateIcon,
|
|
10
12
|
Progress,
|
|
11
|
-
EmptyStateSecondaryActions,
|
|
12
13
|
Form,
|
|
13
14
|
FormGroup,
|
|
14
15
|
TextInput
|
|
@@ -25,7 +26,7 @@ const ValidationProgress: React.FunctionComponent<ValidationProgressProps> = ({
|
|
|
25
26
|
|
|
26
27
|
const tick = React.useCallback(() => {
|
|
27
28
|
if (percentValidated < 100) {
|
|
28
|
-
setPercentValidated(prevValue => prevValue + 20);
|
|
29
|
+
setPercentValidated((prevValue) => prevValue + 20);
|
|
29
30
|
}
|
|
30
31
|
}, [percentValidated]);
|
|
31
32
|
|
|
@@ -39,11 +40,12 @@ const ValidationProgress: React.FunctionComponent<ValidationProgressProps> = ({
|
|
|
39
40
|
|
|
40
41
|
return (
|
|
41
42
|
<div className="pf-l-bullseye">
|
|
42
|
-
<EmptyState variant="
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
{percentValidated === 100 ? 'Validation complete' : 'Validating credentials'}
|
|
46
|
-
|
|
43
|
+
<EmptyState variant="lg">
|
|
44
|
+
<EmptyStateHeader
|
|
45
|
+
headingLevel="h4"
|
|
46
|
+
titleText={percentValidated === 100 ? 'Validation complete' : 'Validating credentials'}
|
|
47
|
+
icon={<EmptyStateIcon icon={CogsIcon} />}
|
|
48
|
+
/>
|
|
47
49
|
<EmptyStateBody>
|
|
48
50
|
<Progress value={percentValidated} measureLocation="outside" aria-label="Wizard validation progress" />
|
|
49
51
|
</EmptyStateBody>
|
|
@@ -51,11 +53,13 @@ const ValidationProgress: React.FunctionComponent<ValidationProgressProps> = ({
|
|
|
51
53
|
Description can be used to further elaborate on the validation step, or give the user a better idea of how
|
|
52
54
|
long the process will take.
|
|
53
55
|
</EmptyStateBody>
|
|
54
|
-
<
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
<EmptyStateFooter>
|
|
57
|
+
<EmptyStateActions>
|
|
58
|
+
<Button isDisabled={percentValidated !== 100} onClick={onClose}>
|
|
59
|
+
Log to console
|
|
60
|
+
</Button>
|
|
61
|
+
</EmptyStateActions>
|
|
62
|
+
</EmptyStateFooter>
|
|
59
63
|
</EmptyState>
|
|
60
64
|
</div>
|
|
61
65
|
);
|
|
@@ -173,7 +177,7 @@ export const WizardValidateOnButtonPress: React.FunctionComponent = () => {
|
|
|
173
177
|
)}
|
|
174
178
|
<SampleForm
|
|
175
179
|
value={ageValue}
|
|
176
|
-
setValue={value => setAgeValue(value)}
|
|
180
|
+
setValue={(value) => setAgeValue(value)}
|
|
177
181
|
isValid={!hasErrorOnSubmit || isFirstStepValid}
|
|
178
182
|
setIsValid={setIsFirstStepValid}
|
|
179
183
|
/>
|