@ansible/ansible-ui-framework 0.0.0
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/LICENSE.md +168 -0
- package/README.md +5 -0
- package/assets/editor.worker-CKha-MBL.js +11 -0
- package/assets/json.worker-BXgpME0S.js +42 -0
- package/assets/yaml.worker-DhJ2nZ1S.js +466 -0
- package/framework/PageActions/PageAction.d.ts +100 -0
- package/framework/PageActions/PageActionButton.d.ts +10 -0
- package/framework/PageActions/PageActionDropdown.d.ts +20 -0
- package/framework/PageActions/PageActionLink.d.ts +9 -0
- package/framework/PageActions/PageActionSwitch.d.ts +8 -0
- package/framework/PageActions/PageActionUtils.d.ts +3 -0
- package/framework/PageActions/PageActions.d.ts +16 -0
- package/framework/PageActions/PageActionsPinned.d.ts +21 -0
- package/framework/PageAlertToaster.d.ts +14 -0
- package/framework/PageBody.d.ts +6 -0
- package/framework/PageCarousel/PageCarousel.d.ts +10 -0
- package/framework/PageCarousel/PageCarouselCardPage.d.ts +9 -0
- package/framework/PageCarousel/PageCarouselNav.d.ts +5 -0
- package/framework/PageCells/BytesCell.d.ts +4 -0
- package/framework/PageCells/CopyCell.d.ts +4 -0
- package/framework/PageCells/DateTimeCell.d.ts +8 -0
- package/framework/PageCells/ElapsedTimeCell.d.ts +4 -0
- package/framework/PageCells/LabelsCell.d.ts +18 -0
- package/framework/PageCells/TextCell.d.ts +15 -0
- package/framework/PageDashboard/PageChartContainer.d.ts +10 -0
- package/framework/PageDashboard/PageChartLegend.d.ts +12 -0
- package/framework/PageDashboard/PageDashboard.d.ts +7 -0
- package/framework/PageDashboard/PageDashboardCard.d.ts +28 -0
- package/framework/PageDashboard/PageDashboardCarousel.d.ts +14 -0
- package/framework/PageDashboard/PageDashboardChart.d.ts +30 -0
- package/framework/PageDashboard/PageDashboardCount.d.ts +7 -0
- package/framework/PageDashboard/PageDashboardCountBar.cy.d.ts +1 -0
- package/framework/PageDashboard/PageDashboardCountBar.d.ts +14 -0
- package/framework/PageDashboard/PageDashboardGettingStarted.d.ts +11 -0
- package/framework/PageDashboard/PageDonutChart.d.ts +15 -0
- package/framework/PageDashboard/PageScatterChart.d.ts +10 -0
- package/framework/PageDashboard/usePageChartColors.d.ts +16 -0
- package/framework/PageDetails/PageDetail.d.ts +8 -0
- package/framework/PageDetails/PageDetailCodeEditor.d.ts +8 -0
- package/framework/PageDetails/PageDetails.d.ts +9 -0
- package/framework/PageDetails/PageDetailsFromColumns.d.ts +7 -0
- package/framework/PageDialogs/BulkActionDialog.cy.d.ts +1 -0
- package/framework/PageDialogs/BulkActionDialog.d.ts +17 -0
- package/framework/PageDialogs/BulkConfirmationDialog.d.ts +21 -0
- package/framework/PageDialogs/MultiSelectDialog.d.ts +24 -0
- package/framework/PageDialogs/PageDialog.cy.d.ts +1 -0
- package/framework/PageDialogs/PageDialog.d.ts +14 -0
- package/framework/PageDialogs/SingleSelectDialog.d.ts +20 -0
- package/framework/PageDialogs/useSelectDialog.d.ts +33 -0
- package/framework/PageEmptyStates/PageNotFound.d.ts +3 -0
- package/framework/PageEmptyStates/PageNotImplemented.d.ts +1 -0
- package/framework/PageForm/ErrorAlert.cy.d.ts +1 -0
- package/framework/PageForm/ErrorAlert.d.ts +9 -0
- package/framework/PageForm/GenericForm.d.ts +14 -0
- package/framework/PageForm/Inputs/FormGroupDateTimePicker.d.ts +12 -0
- package/framework/PageForm/Inputs/FormGroupTypeAheadMultiSelect.d.ts +29 -0
- package/framework/PageForm/Inputs/PageFormAsyncMultiSelect.cy.d.ts +1 -0
- package/framework/PageForm/Inputs/PageFormAsyncMultiSelect.d.ts +9 -0
- package/framework/PageForm/Inputs/PageFormAsyncSelect.d.ts +49 -0
- package/framework/PageForm/Inputs/PageFormAsyncSingleSelect.cy.d.ts +1 -0
- package/framework/PageForm/Inputs/PageFormAsyncSingleSelect.d.ts +9 -0
- package/framework/PageForm/Inputs/PageFormCheckbox.d.ts +11 -0
- package/framework/PageForm/Inputs/PageFormCreatableSelect.d.ts +20 -0
- package/framework/PageForm/Inputs/PageFormDataEditor.cy.d.ts +1 -0
- package/framework/PageForm/Inputs/PageFormDataEditor.d.ts +36 -0
- package/framework/PageForm/Inputs/PageFormDateTimePicker.d.ts +12 -0
- package/framework/PageForm/Inputs/PageFormFileUpload.d.ts +7 -0
- package/framework/PageForm/Inputs/PageFormGroup.d.ts +14 -0
- package/framework/PageForm/Inputs/PageFormMarkdown.d.ts +19 -0
- package/framework/PageForm/Inputs/PageFormMarkdownEditor.cy.d.ts +1 -0
- package/framework/PageForm/Inputs/PageFormMultiInput.d.ts +23 -0
- package/framework/PageForm/Inputs/PageFormMultiSelect.d.ts +9 -0
- package/framework/PageForm/Inputs/PageFormSecret.cy.d.ts +1 -0
- package/framework/PageForm/Inputs/PageFormSecret.d.ts +14 -0
- package/framework/PageForm/Inputs/PageFormSelect.d.ts +21 -0
- package/framework/PageForm/Inputs/PageFormSingleSelect.d.ts +9 -0
- package/framework/PageForm/Inputs/PageFormSlider.d.ts +9 -0
- package/framework/PageForm/Inputs/PageFormSwitch.d.ts +18 -0
- package/framework/PageForm/Inputs/PageFormTextArea.d.ts +3 -0
- package/framework/PageForm/Inputs/PageFormTextInput.d.ts +29 -0
- package/framework/PageForm/Inputs/validation-hooks.d.ts +4 -0
- package/framework/PageForm/PageForm.d.ts +37 -0
- package/framework/PageForm/PageFormButtons.d.ts +9 -0
- package/framework/PageForm/PageFormExpandableSection.cy.d.ts +1 -0
- package/framework/PageForm/PageFormExpandableSection.d.ts +7 -0
- package/framework/PageForm/Utils/PageFormHidden.d.ts +6 -0
- package/framework/PageForm/Utils/PageFormSection.d.ts +7 -0
- package/framework/PageForm/Utils/PageFormSetError.d.ts +5 -0
- package/framework/PageForm/Utils/PageFormSetValue.d.ts +5 -0
- package/framework/PageForm/Utils/PageFormWatch.d.ts +6 -0
- package/framework/PageForm/genericErrorAdapter.cy.d.ts +1 -0
- package/framework/PageForm/genericErrorAdapter.d.ts +2 -0
- package/framework/PageForm/typesErrorAdapter.d.ts +12 -0
- package/framework/PageFramework.d.ts +5 -0
- package/framework/PageHeader.d.ts +23 -0
- package/framework/PageInputs/PageAsyncMultiSelect.cy.d.ts +1 -0
- package/framework/PageInputs/PageAsyncMultiSelect.d.ts +13 -0
- package/framework/PageInputs/PageAsyncSingleSelect.cy.d.ts +1 -0
- package/framework/PageInputs/PageAsyncSingleSelect.d.ts +14 -0
- package/framework/PageInputs/PageMultiSelect.cy.d.ts +1 -0
- package/framework/PageInputs/PageMultiSelect.d.ts +17 -0
- package/framework/PageInputs/PageSelectOption.d.ts +9 -0
- package/framework/PageInputs/PageSingleSelect.cy.d.ts +1 -0
- package/framework/PageInputs/PageSingleSelect.d.ts +29 -0
- package/framework/PageLayout.d.ts +4 -0
- package/framework/PageMasonry.d.ts +6 -0
- package/framework/PageMasthead/PageMasthead.d.ts +6 -0
- package/framework/PageMasthead/PageMastheadDropdown.d.ts +7 -0
- package/framework/PageMasthead/PageNotificationsIcon.d.ts +1 -0
- package/framework/PageMasthead/PageSettingsIcon.d.ts +1 -0
- package/framework/PageMasthead/PageThemeSwitcher.d.ts +1 -0
- package/framework/PageNavigation/PageApp.d.ts +9 -0
- package/framework/PageNavigation/PageNavSidebar.d.ts +12 -0
- package/framework/PageNavigation/PageNavigation.d.ts +5 -0
- package/framework/PageNavigation/PageNavigationItem.d.ts +25 -0
- package/framework/PageNavigation/PageNavigationRoutesProvider.d.ts +9 -0
- package/framework/PageNavigation/useGetPageUrl.d.ts +4 -0
- package/framework/PageNavigation/usePageNavigate.d.ts +4 -0
- package/framework/PageNotifications/PageNotificationsProvider.cy.d.ts +1 -0
- package/framework/PageNotifications/PageNotificationsProvider.d.ts +27 -0
- package/framework/PageTable/PageLoadingTable.d.ts +1 -0
- package/framework/PageTable/PagePagination.d.ts +13 -0
- package/framework/PageTable/PageTable.d.ts +65 -0
- package/framework/PageTable/PageTableCard.d.ts +39 -0
- package/framework/PageTable/PageTableCards.d.ts +3 -0
- package/framework/PageTable/PageTableColumn.d.ts +310 -0
- package/framework/PageTable/PageTableList.d.ts +7 -0
- package/framework/PageTable/useTableItems.d.ts +74 -0
- package/framework/PageTabs/PageBreadcrumbs.d.ts +11 -0
- package/framework/PageTabs/PageRoutedTabs.d.ts +20 -0
- package/framework/PageTabs/PageTabs.d.ts +11 -0
- package/framework/PageToolbar/PageTableViewType.d.ts +6 -0
- package/framework/PageToolbar/PageToolbar.d.ts +47 -0
- package/framework/PageToolbar/PageToolbarFilter.d.ts +25 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarAsyncMultiSelectFilter.d.ts +20 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarAsyncSelectFilterBuilder.d.ts +23 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarAsyncSingleSelectFilter.d.ts +15 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarDateRangeFilter.d.ts +33 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarFilterCommon.d.ts +7 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarFilters.cy.d.ts +1 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarMultiSelectFilter.d.ts +8 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarSingleSelectFilter.d.ts +9 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarTextFilter.d.ts +24 -0
- package/framework/PageToolbar/PageToolbarSort.d.ts +16 -0
- package/framework/PageToolbar/PageToolbarToggleGroup.d.ts +10 -0
- package/framework/PageToolbar/PageToolbarView.d.ts +10 -0
- package/framework/PageWizard/PageWizard.cy.d.ts +1 -0
- package/framework/PageWizard/PageWizard.d.ts +12 -0
- package/framework/PageWizard/PageWizardBody.cy.d.ts +1 -0
- package/framework/PageWizard/PageWizardBody.d.ts +2 -0
- package/framework/PageWizard/PageWizardFooter.cy.d.ts +1 -0
- package/framework/PageWizard/PageWizardFooter.d.ts +5 -0
- package/framework/PageWizard/PageWizardHeader.d.ts +5 -0
- package/framework/PageWizard/PageWizardNavigation.d.ts +1 -0
- package/framework/PageWizard/PageWizardProvider.d.ts +10 -0
- package/framework/PageWizard/PageWizardToggle.d.ts +1 -0
- package/framework/PageWizard/index.d.ts +3 -0
- package/framework/PageWizard/types.d.ts +32 -0
- package/framework/Settings.d.ts +20 -0
- package/framework/components/BulkSelector.d.ts +11 -0
- package/framework/components/Collapse.d.ts +6 -0
- package/framework/components/DataEditor.d.ts +12 -0
- package/framework/components/DetailInfo.d.ts +4 -0
- package/framework/components/Dotted.d.ts +4 -0
- package/framework/components/DropZone.d.ts +7 -0
- package/framework/components/DropdownControlled.d.ts +4 -0
- package/framework/components/EmptyStateCustom.d.ts +11 -0
- package/framework/components/EmptyStateError.d.ts +4 -0
- package/framework/components/EmptyStateFilter.d.ts +6 -0
- package/framework/components/EmptyStateNoData.d.ts +7 -0
- package/framework/components/EmptyStateUnauthorized.d.ts +6 -0
- package/framework/components/ErrorBoundary.d.ts +15 -0
- package/framework/components/Help.d.ts +6 -0
- package/framework/components/IconButton.d.ts +2 -0
- package/framework/components/IconWrapper.d.ts +9 -0
- package/framework/components/LoadingPage.d.ts +4 -0
- package/framework/components/LoadingState.d.ts +1 -0
- package/framework/components/Masonry.d.ts +6 -0
- package/framework/components/PageGrid.d.ts +6 -0
- package/framework/components/ReorderItems.d.ts +20 -0
- package/framework/components/Scrollable.d.ts +9 -0
- package/framework/components/StandardPopover.d.ts +9 -0
- package/framework/components/icons/ExpandIcon.d.ts +4 -0
- package/framework/components/icons/RunningIcon.d.ts +2 -0
- package/framework/components/pfcolors.d.ts +32 -0
- package/framework/components/useBreakPoint.d.ts +4 -0
- package/framework/components/useIsMounted.d.ts +5 -0
- package/framework/components/useManageColumns.d.ts +5 -0
- package/framework/components/useManagedItems.d.ts +28 -0
- package/framework/components/useOpen.d.ts +4 -0
- package/framework/components/useSearchParams.d.ts +1 -0
- package/framework/components/useWindowLocation.d.ts +5 -0
- package/framework/hooks/useClipboard.d.ts +8 -0
- package/framework/hooks/useID.d.ts +11 -0
- package/framework/index.d.ts +70 -0
- package/framework/publish/assets/editor.worker-CKha-MBL.d.ts +0 -0
- package/framework/publish/assets/json.worker-BXgpME0S.d.ts +3 -0
- package/framework/publish/assets/yaml.worker-DhJ2nZ1S.d.ts +3 -0
- package/framework/publish/index.d.ts +318 -0
- package/framework/publish/index.umd.d.cts +1 -0
- package/framework/useFrameworkTranslations.d.ts +42 -0
- package/framework/useInMemoryView.d.ts +17 -0
- package/framework/useView.d.ts +36 -0
- package/framework/utils/codeEditorUtils.d.ts +1 -0
- package/framework/utils/compare.d.ts +3 -0
- package/framework/utils/dateTimeHelpers.d.ts +2 -0
- package/framework/utils/download-file.d.ts +2 -0
- package/framework/utils/formatDateString.d.ts +1 -0
- package/framework/utils/random-string.d.ts +3 -0
- package/framework/utils/strings.d.ts +2 -0
- package/framework/vite.config.d.ts +2 -0
- package/index.js +50018 -0
- package/index.umd.cjs +600 -0
- package/package.json +40 -0
- package/style.css +1 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { ButtonVariant } from '@patternfly/react-core';
|
|
2
|
+
import { ComponentClass } from 'react';
|
|
3
|
+
export declare const enum PageActionType {
|
|
4
|
+
Button = 0,
|
|
5
|
+
Link = 1,
|
|
6
|
+
Switch = 2,
|
|
7
|
+
Dropdown = 3,
|
|
8
|
+
Seperator = 4
|
|
9
|
+
}
|
|
10
|
+
export declare const enum PageActionSelection {
|
|
11
|
+
None = 0,
|
|
12
|
+
Single = 1,
|
|
13
|
+
Multiple = 2
|
|
14
|
+
}
|
|
15
|
+
export type IPageAction<T extends object> = IPageActionButton | IPageActionButtonSingle<T> | IPageActionButtonMultiple<T> | IPageActionLink | IPageActionLinkSingle<T> | IPageActionSwitch | IPageActionSwitchSingle<T> | IPageActionDropdown<T> | IPageActionDropdownSingle<T> | IPageActionDropdownMultiple<T> | IPageActionSeperator;
|
|
16
|
+
interface IPageActionCommon {
|
|
17
|
+
icon?: ComponentClass;
|
|
18
|
+
label: string;
|
|
19
|
+
tooltip?: string;
|
|
20
|
+
isDanger?: boolean;
|
|
21
|
+
ouiaId?: string;
|
|
22
|
+
isPinned?: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface IPageActionNoneCommon extends IPageActionCommon {
|
|
25
|
+
selection: PageActionSelection.None;
|
|
26
|
+
isHidden?: () => boolean;
|
|
27
|
+
isDisabled?: string | (() => string | undefined);
|
|
28
|
+
}
|
|
29
|
+
interface IPageActionSingleCommon<T extends object> extends IPageActionCommon {
|
|
30
|
+
selection: PageActionSelection.Single;
|
|
31
|
+
isHidden?: (item: T) => boolean;
|
|
32
|
+
isDisabled?: string | ((item: T) => string | undefined);
|
|
33
|
+
}
|
|
34
|
+
interface IPageActionMultipleCommon<T extends object> extends IPageActionCommon {
|
|
35
|
+
selection: PageActionSelection.Multiple;
|
|
36
|
+
isDisabled?: string | ((items: T[]) => string | undefined);
|
|
37
|
+
}
|
|
38
|
+
export interface IPageActionButton extends IPageActionNoneCommon {
|
|
39
|
+
type: PageActionType.Button;
|
|
40
|
+
selection: PageActionSelection.None;
|
|
41
|
+
variant?: ButtonVariant;
|
|
42
|
+
onClick: () => unknown;
|
|
43
|
+
}
|
|
44
|
+
export interface IPageActionButtonSingle<T extends object> extends IPageActionSingleCommon<T> {
|
|
45
|
+
type: PageActionType.Button;
|
|
46
|
+
selection: PageActionSelection.Single;
|
|
47
|
+
variant?: ButtonVariant;
|
|
48
|
+
onClick: (item: T) => unknown;
|
|
49
|
+
}
|
|
50
|
+
export interface IPageActionButtonMultiple<T extends object> extends IPageActionMultipleCommon<T> {
|
|
51
|
+
type: PageActionType.Button;
|
|
52
|
+
selection: PageActionSelection.Multiple;
|
|
53
|
+
variant?: ButtonVariant;
|
|
54
|
+
onClick: (items: T[]) => unknown;
|
|
55
|
+
}
|
|
56
|
+
export interface IPageActionLink extends IPageActionNoneCommon {
|
|
57
|
+
type: PageActionType.Link;
|
|
58
|
+
href: string;
|
|
59
|
+
}
|
|
60
|
+
export interface IPageActionLinkSingle<T extends object> extends IPageActionSingleCommon<T> {
|
|
61
|
+
type: PageActionType.Link;
|
|
62
|
+
href: (item: T) => string;
|
|
63
|
+
}
|
|
64
|
+
export interface IPageActionSwitch extends IPageActionNoneCommon {
|
|
65
|
+
type: PageActionType.Switch;
|
|
66
|
+
onToggle: (enable: boolean) => unknown;
|
|
67
|
+
isSwitchOn: () => boolean;
|
|
68
|
+
showPinnedLabel?: boolean;
|
|
69
|
+
labelOff?: string;
|
|
70
|
+
isReversed?: boolean;
|
|
71
|
+
ariaLabel: (isEnabled: boolean) => string;
|
|
72
|
+
}
|
|
73
|
+
export interface IPageActionSwitchSingle<T extends object> extends IPageActionSingleCommon<T> {
|
|
74
|
+
type: PageActionType.Switch;
|
|
75
|
+
onToggle: (item: T, enable: boolean) => unknown;
|
|
76
|
+
isSwitchOn: (item: T) => boolean;
|
|
77
|
+
showPinnedLabel?: boolean;
|
|
78
|
+
labelOff?: string;
|
|
79
|
+
isReversed?: boolean;
|
|
80
|
+
ariaLabel: (isEnabled: boolean) => string;
|
|
81
|
+
}
|
|
82
|
+
export interface IPageActionDropdown<T extends object> extends IPageActionNoneCommon {
|
|
83
|
+
type: PageActionType.Dropdown;
|
|
84
|
+
actions: IPageAction<T>[];
|
|
85
|
+
variant?: ButtonVariant;
|
|
86
|
+
}
|
|
87
|
+
export interface IPageActionDropdownSingle<T extends object> extends IPageActionSingleCommon<T> {
|
|
88
|
+
type: PageActionType.Dropdown;
|
|
89
|
+
actions: IPageAction<T>[];
|
|
90
|
+
variant?: ButtonVariant;
|
|
91
|
+
}
|
|
92
|
+
export interface IPageActionDropdownMultiple<T extends object> extends IPageActionMultipleCommon<T> {
|
|
93
|
+
type: PageActionType.Dropdown;
|
|
94
|
+
actions: IPageAction<T>[];
|
|
95
|
+
variant?: ButtonVariant;
|
|
96
|
+
}
|
|
97
|
+
export interface IPageActionSeperator {
|
|
98
|
+
type: PageActionType.Seperator;
|
|
99
|
+
}
|
|
100
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentClass, FunctionComponent } from 'react';
|
|
2
|
+
import { IPageActionButton, IPageActionButtonMultiple, IPageActionButtonSingle } from './PageAction';
|
|
3
|
+
export declare function PageActionButton<T extends object>(props: {
|
|
4
|
+
action: IPageActionButton | IPageActionButtonSingle<T> | IPageActionButtonMultiple<T>;
|
|
5
|
+
isSecondary?: boolean;
|
|
6
|
+
wrapper?: ComponentClass | FunctionComponent;
|
|
7
|
+
iconOnly?: boolean;
|
|
8
|
+
selectedItem?: T;
|
|
9
|
+
selectedItems?: T[];
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ButtonVariant } from '@patternfly/react-core';
|
|
2
|
+
import { DropdownPosition } from '@patternfly/react-core/deprecated';
|
|
3
|
+
import { ComponentClass, FunctionComponent } from 'react';
|
|
4
|
+
import { IPageAction } from './PageAction';
|
|
5
|
+
interface PageActionDropdownProps<T extends object> {
|
|
6
|
+
actions: IPageAction<T>[];
|
|
7
|
+
icon?: ComponentClass | FunctionComponent;
|
|
8
|
+
iconOnly?: boolean;
|
|
9
|
+
isDisabled?: string | undefined;
|
|
10
|
+
label?: string;
|
|
11
|
+
onOpen?: (label: string, open: boolean) => void;
|
|
12
|
+
position?: DropdownPosition;
|
|
13
|
+
selectedItem?: T;
|
|
14
|
+
selectedItems?: T[];
|
|
15
|
+
tooltip?: string;
|
|
16
|
+
variant?: ButtonVariant;
|
|
17
|
+
}
|
|
18
|
+
export declare function PageActionDropdown<T extends object>(props: PageActionDropdownProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function filterActionSeperators<T extends object>(actions: IPageAction<T>[]): IPageAction<T>[];
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentClass, FunctionComponent } from 'react';
|
|
2
|
+
import { IPageActionLink, IPageActionLinkSingle } from './PageAction';
|
|
3
|
+
export declare function PageActionLink<T extends object>(props: {
|
|
4
|
+
action: IPageActionLink | IPageActionLinkSingle<T>;
|
|
5
|
+
wrapper?: ComponentClass | FunctionComponent;
|
|
6
|
+
iconOnly?: boolean;
|
|
7
|
+
selectedItem?: T;
|
|
8
|
+
selectedItems?: T[];
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentClass, FunctionComponent } from 'react';
|
|
2
|
+
import { IPageActionSwitch, IPageActionSwitchSingle } from './PageAction';
|
|
3
|
+
export declare function PageActionSwitch<T extends object>(props: {
|
|
4
|
+
action: IPageActionSwitch | IPageActionSwitchSingle<T>;
|
|
5
|
+
wrapper?: ComponentClass | FunctionComponent;
|
|
6
|
+
selectedItem?: T;
|
|
7
|
+
iconOnly?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IPageAction } from './PageAction';
|
|
2
|
+
export declare function isPageActionHidden<T extends object>(action: IPageAction<T>, selectedItem: T | undefined): boolean;
|
|
3
|
+
export declare function usePageActionDisabled<T extends object>(): (action: IPageAction<T>, selectedItem: T | undefined, selectedItems?: T[] | undefined) => string | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DropdownPosition } from '@patternfly/react-core/deprecated';
|
|
2
|
+
import { ComponentClass, FunctionComponent } from 'react';
|
|
3
|
+
import { WindowSize } from '../components/useBreakPoint';
|
|
4
|
+
import { IPageAction } from './PageAction';
|
|
5
|
+
interface PageActionProps<T extends object> {
|
|
6
|
+
actions: IPageAction<T>[];
|
|
7
|
+
selectedItem?: T;
|
|
8
|
+
selectedItems?: T[];
|
|
9
|
+
wrapper?: ComponentClass | FunctionComponent;
|
|
10
|
+
collapse?: WindowSize | 'always' | 'never';
|
|
11
|
+
position?: DropdownPosition;
|
|
12
|
+
iconOnly?: boolean;
|
|
13
|
+
onOpen?: (open: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function PageActions<T extends object>(props: PageActionProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentClass, FunctionComponent } from 'react';
|
|
2
|
+
import { IPageAction } from './PageAction';
|
|
3
|
+
interface PageActionsPinnedProps<T extends object> {
|
|
4
|
+
actions: IPageAction<T>[];
|
|
5
|
+
selectedItem?: T;
|
|
6
|
+
selectedItems?: T[];
|
|
7
|
+
wrapper?: ComponentClass | FunctionComponent;
|
|
8
|
+
iconOnly?: boolean;
|
|
9
|
+
onOpen?: (label: string, open: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function PageActionsPinned<T extends object>(props: PageActionsPinnedProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
interface PageActionPinnedProps<T extends object> {
|
|
13
|
+
action: IPageAction<T>;
|
|
14
|
+
selectedItem?: T;
|
|
15
|
+
selectedItems?: T[];
|
|
16
|
+
wrapper?: ComponentClass | FunctionComponent;
|
|
17
|
+
iconOnly?: boolean;
|
|
18
|
+
onOpen?: (label: string, open: boolean) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function PageActionPinned<T extends object>(props: PageActionPinnedProps<T>): JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AlertProps } from '@patternfly/react-core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface IPageAlertToaster {
|
|
4
|
+
addAlert: (alert: AlertProps) => void;
|
|
5
|
+
removeAlert: (alert: AlertProps) => void;
|
|
6
|
+
replaceAlert: (oldAlert: AlertProps, newAlert: AlertProps) => void;
|
|
7
|
+
removeAlerts: (filter?: (alert: AlertProps) => boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const PageAlertToasterContext: import("react").Context<IPageAlertToaster>;
|
|
10
|
+
export declare function usePageAlertToaster(): IPageAlertToaster;
|
|
11
|
+
export declare function PageAlertToasterProvider(props: {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function errorToAlertProps(err: unknown): AlertProps;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare const CardSpan: number;
|
|
3
|
+
export declare function useCarouselContext(): {
|
|
4
|
+
width: number;
|
|
5
|
+
visibleCards: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function PageCarousel(props: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
carouselId: string;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type PageCarouselCardPageProps = {
|
|
3
|
+
carouselId: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
visibleCardsPerPage: number;
|
|
6
|
+
pageIndex: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function PageCarouselCardPage(props: PageCarouselCardPageProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function DateCell(props: {
|
|
2
|
+
value: number | string;
|
|
3
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function DateTimeCell(props: {
|
|
5
|
+
value: string | number | undefined | null;
|
|
6
|
+
author?: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type LabelWithLink = {
|
|
2
|
+
name: string;
|
|
3
|
+
link: string;
|
|
4
|
+
};
|
|
5
|
+
type LabelsWithLinksProps = {
|
|
6
|
+
labels?: never;
|
|
7
|
+
labelsWithLinks: LabelWithLink[];
|
|
8
|
+
numLabels?: number;
|
|
9
|
+
wrapLabels?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type LabelsProps = {
|
|
12
|
+
labels: string[];
|
|
13
|
+
labelsWithLinks?: never;
|
|
14
|
+
numLabels?: number;
|
|
15
|
+
wrapLabels?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function LabelsCell(props: LabelsProps | LabelsWithLinksProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PFColor } from '../components/pfcolors';
|
|
3
|
+
export interface TextCellProps {
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
iconSize?: 'sm' | 'md' | 'lg';
|
|
6
|
+
iconAlign?: 'left' | 'right';
|
|
7
|
+
text?: string | null;
|
|
8
|
+
to?: string;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
color?: PFColor;
|
|
11
|
+
iconColor?: PFColor;
|
|
12
|
+
maxWidth?: number;
|
|
13
|
+
disableLinks?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function TextCell(props: TextCellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface PageContainerSize {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function PageChartContainer(props: {
|
|
7
|
+
children: (size: PageContainerSize) => ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
height?: number;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function PageChartLegend(props: {
|
|
2
|
+
id: string;
|
|
3
|
+
legend: {
|
|
4
|
+
label: string;
|
|
5
|
+
count?: number;
|
|
6
|
+
color: string;
|
|
7
|
+
link?: string;
|
|
8
|
+
}[];
|
|
9
|
+
horizontal?: boolean;
|
|
10
|
+
showLegendCount?: boolean;
|
|
11
|
+
allowZero?: boolean;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export type PageDashboardCardWidth = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
3
|
+
export type PageDashboardCardHeight = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
4
|
+
export declare function PageDashboardCard(props: {
|
|
5
|
+
id?: string;
|
|
6
|
+
supertitle?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
linkText?: string;
|
|
11
|
+
to?: string;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
footerActionButton?: {
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
title: string;
|
|
16
|
+
onClick: () => void;
|
|
17
|
+
};
|
|
18
|
+
width?: PageDashboardCardWidth;
|
|
19
|
+
height?: PageDashboardCardHeight;
|
|
20
|
+
maxHeight?: PageDashboardCardHeight;
|
|
21
|
+
style?: CSSProperties;
|
|
22
|
+
help?: string;
|
|
23
|
+
helpTitle?: string;
|
|
24
|
+
helpDocLink?: string;
|
|
25
|
+
headerControls?: ReactNode;
|
|
26
|
+
isCompact?: boolean;
|
|
27
|
+
canCollapse?: boolean;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PageDashboardCardWidth } from './PageDashboardCard';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export declare function PageDashboardCarousel(props: {
|
|
4
|
+
title: string;
|
|
5
|
+
linkText?: string;
|
|
6
|
+
to?: string;
|
|
7
|
+
width?: PageDashboardCardWidth;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
footerActionButton?: {
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
title: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
};
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import './PageDashboardChart.css';
|
|
2
|
+
export declare function PageDashboardChart(props: {
|
|
3
|
+
id?: string;
|
|
4
|
+
groups: {
|
|
5
|
+
label?: string;
|
|
6
|
+
color: string;
|
|
7
|
+
values: {
|
|
8
|
+
label: string;
|
|
9
|
+
value: number;
|
|
10
|
+
}[];
|
|
11
|
+
link?: string;
|
|
12
|
+
}[];
|
|
13
|
+
onlyIntegerTicks?: boolean;
|
|
14
|
+
minDomain?: number | {
|
|
15
|
+
x?: number;
|
|
16
|
+
y?: number;
|
|
17
|
+
};
|
|
18
|
+
yLabel?: string;
|
|
19
|
+
xLabel?: string;
|
|
20
|
+
allowZero?: boolean;
|
|
21
|
+
variant?: 'stackedAreaChart' | 'lineChart';
|
|
22
|
+
padding?: {
|
|
23
|
+
top?: number;
|
|
24
|
+
bottom?: number;
|
|
25
|
+
left?: number;
|
|
26
|
+
right: number;
|
|
27
|
+
};
|
|
28
|
+
showLegendCount?: boolean;
|
|
29
|
+
height?: number;
|
|
30
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type PageDashboardCountBarProps = {
|
|
2
|
+
counts: {
|
|
3
|
+
title: string;
|
|
4
|
+
total?: number;
|
|
5
|
+
to: string;
|
|
6
|
+
counts?: {
|
|
7
|
+
label: string;
|
|
8
|
+
count: number;
|
|
9
|
+
color: string;
|
|
10
|
+
link?: string;
|
|
11
|
+
}[];
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
export declare function PageDashboardCountBar(props: PageDashboardCountBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface PageDashboardGettingStartedStep {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
to: string;
|
|
6
|
+
isComplete: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function PageDashboardGettingStarted(props: {
|
|
9
|
+
steps: PageDashboardGettingStartedStep[];
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ChartDonutProps } from '@patternfly/react-charts';
|
|
2
|
+
export declare function PageDonutChart(props: Omit<ChartDonutProps, 'width' | 'height'> & {
|
|
3
|
+
total: number;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function PageDashboardDonutCard(props: {
|
|
6
|
+
title: string;
|
|
7
|
+
linkText?: string;
|
|
8
|
+
to: string;
|
|
9
|
+
items: {
|
|
10
|
+
count: number;
|
|
11
|
+
label: string;
|
|
12
|
+
color: string;
|
|
13
|
+
}[];
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function usePageChartColors(): {
|
|
2
|
+
successfulColor: string;
|
|
3
|
+
failedColor: string;
|
|
4
|
+
errorColor: string;
|
|
5
|
+
warningColor: string;
|
|
6
|
+
canceledColor: string;
|
|
7
|
+
blueColor: string;
|
|
8
|
+
yellowColor: string;
|
|
9
|
+
purpleColor: string;
|
|
10
|
+
orangeColor: string;
|
|
11
|
+
redColor: string;
|
|
12
|
+
cyanColor: string;
|
|
13
|
+
greenColor: string;
|
|
14
|
+
greyColor: string;
|
|
15
|
+
chartColors: string[];
|
|
16
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare function PageDetailCodeEditor(props: {
|
|
3
|
+
label?: string;
|
|
4
|
+
value: string;
|
|
5
|
+
helpText?: string | ReactNode;
|
|
6
|
+
showCopyToClipboard?: boolean;
|
|
7
|
+
toggleLanguage?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare function PageDetails(props: {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
disablePadding?: boolean;
|
|
5
|
+
numberOfColumns?: 'multiple' | 'single';
|
|
6
|
+
labelOrientation?: 'horizontal' | 'vertical';
|
|
7
|
+
alertPrompts?: string[];
|
|
8
|
+
isCompact?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ITableColumn } from '../PageTable/PageTableColumn';
|
|
3
|
+
export declare function PageDetailsFromColumns<T extends object>(props: {
|
|
4
|
+
item: T | undefined;
|
|
5
|
+
columns: ITableColumn<T>[];
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ErrorAdapter } from '../PageForm/typesErrorAdapter';
|
|
3
|
+
import { ITableColumn } from '../PageTable/PageTableColumn';
|
|
4
|
+
export interface BulkActionDialogProps<T extends object> {
|
|
5
|
+
title: string;
|
|
6
|
+
items: T[];
|
|
7
|
+
keyFn: (item: T) => string | number;
|
|
8
|
+
actionColumns: ITableColumn<T>[];
|
|
9
|
+
actionFn: (item: T, signal: AbortSignal) => Promise<unknown>;
|
|
10
|
+
onComplete?: (successfulItems: T[]) => void;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
processingText?: string;
|
|
13
|
+
isDanger?: boolean;
|
|
14
|
+
errorAdapter?: ErrorAdapter;
|
|
15
|
+
}
|
|
16
|
+
export declare function BulkActionDialog<T extends object>(props: BulkActionDialogProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function useBulkActionDialog<T extends object>(defaultErrorAdapter?: ErrorAdapter): import("react").Dispatch<import("react").SetStateAction<BulkActionDialogProps<T> | undefined>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ErrorAdapter } from '../PageForm/typesErrorAdapter';
|
|
2
|
+
import { ITableColumn } from '../PageTable/PageTableColumn';
|
|
3
|
+
import { BulkActionDialogProps } from './BulkActionDialog';
|
|
4
|
+
export interface BulkConfirmationDialog<T extends object> {
|
|
5
|
+
title: string;
|
|
6
|
+
prompt?: string;
|
|
7
|
+
alertPrompts?: string[];
|
|
8
|
+
items: T[];
|
|
9
|
+
isItemNonActionable?: (item: T) => string | undefined;
|
|
10
|
+
keyFn: (item: T) => string | number;
|
|
11
|
+
confirmationColumns: ITableColumn<T>[];
|
|
12
|
+
onConfirm: () => void;
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
confirmText: string;
|
|
15
|
+
actionButtonText: string;
|
|
16
|
+
isDanger?: boolean;
|
|
17
|
+
errorAdapter?: ErrorAdapter;
|
|
18
|
+
}
|
|
19
|
+
declare function BulkConfirmationDialog<T extends object>(props: BulkConfirmationDialog<T>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function useBulkConfirmation<T extends object>(errorAdapter?: ErrorAdapter): (options: Omit<BulkConfirmationDialog<T>, 'onConfirm' | 'onClose'> & Omit<BulkActionDialogProps<T>, 'onClose'>) => void;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ITableColumn } from '../PageTable/PageTableColumn';
|
|
2
|
+
import { ISelected } from '../PageTable/useTableItems';
|
|
3
|
+
import { IToolbarFilter } from '../PageToolbar/PageToolbarFilter';
|
|
4
|
+
import { IView } from '../useView';
|
|
5
|
+
export type MultiSelectDialogProps<T extends object> = {
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
view: IView & ISelected<T> & {
|
|
9
|
+
itemCount?: number;
|
|
10
|
+
pageItems: T[] | undefined;
|
|
11
|
+
};
|
|
12
|
+
tableColumns: ITableColumn<T>[];
|
|
13
|
+
toolbarFilters: IToolbarFilter[];
|
|
14
|
+
onSelect: (items: T[]) => void;
|
|
15
|
+
confirmText?: string;
|
|
16
|
+
cancelText?: string;
|
|
17
|
+
emptyStateTitle?: string;
|
|
18
|
+
errorStateTitle?: string;
|
|
19
|
+
defaultSort?: string;
|
|
20
|
+
maxSelections?: number;
|
|
21
|
+
allowZeroSelections?: boolean;
|
|
22
|
+
onClose?: () => void;
|
|
23
|
+
};
|
|
24
|
+
export declare function MultiSelectDialog<T extends object>(props: MultiSelectDialogProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare function PageDialogProvider(props: {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function usePageDialogs(): {
|
|
6
|
+
dialogs: ReactNode[];
|
|
7
|
+
clearDialogs: () => void;
|
|
8
|
+
pushDialog: (_dialog: ReactNode) => void;
|
|
9
|
+
popDialog: () => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function usePageDialog(): [
|
|
12
|
+
dialog: ReactNode | undefined,
|
|
13
|
+
setDialog: (dialog: ReactNode | undefined) => void
|
|
14
|
+
];
|