@ansible/ansible-ui-framework 2.4.1170 → 2.4.1190
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/framework/PageActions/PageAction.d.ts +2 -0
- package/framework/PageActions/PageActionButton.d.ts +3 -2
- package/framework/PageForm/GenericForm.d.ts +1 -1
- package/framework/PageForm/Inputs/FormGroupTypeAheadMultiSelect.d.ts +1 -1
- package/framework/PageForm/Inputs/PageFormDataEditor.d.ts +1 -0
- package/framework/PageForm/Utils/PageFormSection.d.ts +2 -0
- package/framework/PageFramework.d.ts +1 -0
- package/framework/PageInputs/PageAsyncMultiSelect.d.ts +2 -7
- package/framework/PageInputs/PageAsyncSelectOptions.d.ts +7 -0
- package/framework/PageInputs/PageAsyncSingleSelect.d.ts +3 -9
- package/framework/PageInputs/PageMultiSelect.d.ts +1 -0
- package/framework/PageInputs/PageSingleSelect.d.ts +1 -0
- package/framework/PageNavigation/PageApp.d.ts +1 -0
- package/framework/PageSettings/PageSettings.d.ts +2 -0
- package/framework/PageSettings/PageSettingsProvider.d.ts +17 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarAsyncMultiSelectFilter.d.ts +4 -4
- package/framework/PageToolbar/PageToolbarFilters/ToolbarAsyncSingleSelectFilter.d.ts +4 -3
- package/framework/PageToolbar/PageToolbarFilters/ToolbarDateRangeFilter.d.ts +6 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarMultiSelectFilter.d.ts +1 -0
- package/framework/PageToolbar/PageToolbarFilters/ToolbarSingleSelectFilter.d.ts +1 -0
- package/framework/components/icons/ExpandIcon.d.ts +2 -0
- package/framework/index.d.ts +1 -2
- package/framework/publish/index.d.ts +141 -144
- package/index.js +12819 -13185
- package/index.umd.cjs +192 -196
- package/package.json +1 -1
- package/framework/PageActions/PageActionLink.d.ts +0 -9
- package/framework/PageMasthead/PageSettingsIcon.d.ts +0 -1
- package/framework/Settings.d.ts +0 -20
@@ -56,10 +56,12 @@ export interface IPageActionButtonMultiple<T extends object> extends IPageAction
|
|
56
56
|
export interface IPageActionLink extends IPageActionNoneCommon {
|
57
57
|
type: PageActionType.Link;
|
58
58
|
href: string;
|
59
|
+
variant?: ButtonVariant;
|
59
60
|
}
|
60
61
|
export interface IPageActionLinkSingle<T extends object> extends IPageActionSingleCommon<T> {
|
61
62
|
type: PageActionType.Link;
|
62
63
|
href: (item: T) => string;
|
64
|
+
variant?: ButtonVariant;
|
63
65
|
}
|
64
66
|
export interface IPageActionSwitch extends IPageActionNoneCommon {
|
65
67
|
type: PageActionType.Switch;
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { ComponentClass, FunctionComponent } from 'react';
|
2
|
-
import { IPageActionButton, IPageActionButtonMultiple, IPageActionButtonSingle } from './PageAction';
|
2
|
+
import { IPageActionButton, IPageActionButtonMultiple, IPageActionButtonSingle, IPageActionLink, IPageActionLinkSingle } from './PageAction';
|
3
3
|
export declare function PageActionButton<T extends object>(props: {
|
4
|
-
action: IPageActionButton | IPageActionButtonSingle<T> | IPageActionButtonMultiple<T>;
|
4
|
+
action: IPageActionButton | IPageActionButtonSingle<T> | IPageActionButtonMultiple<T> | IPageActionLink | IPageActionLinkSingle<T>;
|
5
5
|
isSecondary?: boolean;
|
6
6
|
wrapper?: ComponentClass | FunctionComponent;
|
7
7
|
iconOnly?: boolean;
|
8
8
|
selectedItem?: T;
|
9
9
|
selectedItems?: T[];
|
10
|
+
isLink?: boolean;
|
10
11
|
}): import("react/jsx-runtime").JSX.Element;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
import { DefaultValues } from 'react-hook-form';
|
3
|
-
import { ErrorAdapter } from './typesErrorAdapter';
|
4
3
|
import { PageFormSubmitHandler } from './PageForm';
|
4
|
+
import { ErrorAdapter } from './typesErrorAdapter';
|
5
5
|
export interface GenericFormProps<T extends object> {
|
6
6
|
children?: ReactNode;
|
7
7
|
onSubmit: PageFormSubmitHandler<T>;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ChangeEvent, MouseEvent, ReactNode } from 'react';
|
2
1
|
import { SelectOptionObject } from '@patternfly/react-core/deprecated';
|
2
|
+
import { ChangeEvent, MouseEvent, ReactNode } from 'react';
|
3
3
|
export type FormGroupTypeAheadMultiSelectProps = {
|
4
4
|
id?: string;
|
5
5
|
label: string;
|
@@ -7,6 +7,7 @@ export type PageFormDataEditorInputProps<TFieldValues extends FieldValues = Fiel
|
|
7
7
|
label: string;
|
8
8
|
labelHelp?: string | string[] | ReactNode;
|
9
9
|
labelHelpTitle?: string;
|
10
|
+
helperText?: string | undefined;
|
10
11
|
additionalControls?: ReactNode;
|
11
12
|
format: DataEditorLanguages | 'object';
|
12
13
|
disableCopy?: boolean;
|
@@ -1,12 +1,7 @@
|
|
1
|
+
import { PageAsyncSelectOptionsFn } from './PageAsyncSelectOptions';
|
1
2
|
import { PageMultiSelectProps } from './PageMultiSelect';
|
2
|
-
import { PageSelectOption } from './PageSelectOption';
|
3
|
-
export interface PageAsyncMultiSelectQueryResult<ValueT> {
|
4
|
-
total: number;
|
5
|
-
options: PageSelectOption<ValueT>[];
|
6
|
-
}
|
7
|
-
export type PageAsyncMultiSelectOptionsFn<ValueT> = (page: number, signal: AbortSignal) => Promise<PageAsyncMultiSelectQueryResult<ValueT>>;
|
8
3
|
export interface PageAsyncMultiSelectProps<ValueT> extends Omit<PageMultiSelectProps<ValueT>, 'options'> {
|
9
|
-
queryOptions:
|
4
|
+
queryOptions: PageAsyncSelectOptionsFn<ValueT>;
|
10
5
|
queryPlaceholder?: string;
|
11
6
|
queryErrorText?: string | ((error: Error) => string);
|
12
7
|
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { PageSelectOption } from './PageSelectOption';
|
2
|
+
export interface PageAsyncSelectQueryResult<ValueT> {
|
3
|
+
total: number;
|
4
|
+
options: PageSelectOption<ValueT>[];
|
5
|
+
}
|
6
|
+
export type PageAsyncSelectOptionsFn<ValueT> = (page: number, signal: AbortSignal) => Promise<PageAsyncSelectQueryResult<ValueT>>;
|
7
|
+
export type PageAsyncQueryErrorText = string | ((error: Error) => string);
|
@@ -1,14 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { PageAsyncQueryErrorText, PageAsyncSelectOptionsFn } from './PageAsyncSelectOptions';
|
2
2
|
import { PageSingleSelectProps } from './PageSingleSelect';
|
3
|
-
export interface PageAsyncSingleSelectQueryResult<ValueT> {
|
4
|
-
total: number;
|
5
|
-
options: PageSelectOption<ValueT>[];
|
6
|
-
}
|
7
|
-
export type PageAsyncSingleSelectOptionsFn<ValueT> = (page: number, signal: AbortSignal) => Promise<PageAsyncSingleSelectQueryResult<ValueT>>;
|
8
|
-
export type PageAsyncQueryErrorTextType = string | ((error: Error) => string);
|
9
3
|
export interface PageAsyncSingleSelectProps<ValueT> extends Omit<PageSingleSelectProps<ValueT>, 'options'> {
|
10
|
-
queryOptions:
|
4
|
+
queryOptions: PageAsyncSelectOptionsFn<ValueT>;
|
11
5
|
queryPlaceholder?: string;
|
12
|
-
queryErrorText?:
|
6
|
+
queryErrorText?: PageAsyncQueryErrorText;
|
13
7
|
}
|
14
8
|
export declare function PageAsyncSingleSelect<ValueT>(props: PageAsyncSingleSelectProps<ValueT>): import("react/jsx-runtime").JSX.Element;
|
@@ -13,5 +13,6 @@ export interface PageMultiSelectProps<ValueT> {
|
|
13
13
|
disableClearSelection?: boolean;
|
14
14
|
disableClearChips?: boolean;
|
15
15
|
maxChipSize?: string;
|
16
|
+
disableSortOptions?: boolean;
|
16
17
|
}
|
17
18
|
export declare function PageMultiSelect<ValueT>(props: PageMultiSelectProps<ValueT>): import("react/jsx-runtime").JSX.Element;
|
@@ -10,6 +10,7 @@ export interface PageSingleSelectProps<ValueT> {
|
|
10
10
|
footer?: ReactNode;
|
11
11
|
isRequired?: boolean;
|
12
12
|
isDisabled?: boolean;
|
13
|
+
disableSortOptions?: boolean;
|
13
14
|
}
|
14
15
|
export declare function PageSingleSelect<ValueT>(props: PageSingleSelectProps<ValueT>): import("react/jsx-runtime").JSX.Element;
|
15
16
|
export declare function PageSingleSelectList(props: {
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
export interface IPageSettings {
|
3
|
+
refreshInterval?: number;
|
4
|
+
theme?: 'system' | 'light' | 'dark';
|
5
|
+
activeTheme?: 'light' | 'dark';
|
6
|
+
tableLayout?: 'compact' | 'comfortable';
|
7
|
+
formColumns?: 'single' | 'multiple';
|
8
|
+
formLayout?: 'vertical' | 'horizontal';
|
9
|
+
dateFormat?: 'since' | 'date-time';
|
10
|
+
dataEditorFormat?: 'yaml' | 'json';
|
11
|
+
}
|
12
|
+
export declare const PageSettingsContext: import("react").Context<[IPageSettings, (settings: IPageSettings) => void]>;
|
13
|
+
export declare function usePageSettings(): IPageSettings;
|
14
|
+
export declare function PageSettingsProvider(props: {
|
15
|
+
children?: ReactNode;
|
16
|
+
defaultRefreshInterval: number;
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import {
|
2
|
-
import { PageAsyncQueryErrorTextType } from '../../PageInputs/PageAsyncSingleSelect';
|
1
|
+
import { PageAsyncQueryErrorText, PageAsyncSelectOptionsFn } from '../../PageInputs/PageAsyncSelectOptions';
|
3
2
|
import { ToolbarFilterType } from '../PageToolbarFilter';
|
4
3
|
import { ToolbarFilterCommon } from './ToolbarFilterCommon';
|
5
4
|
type ToolbarOpenMultiSelectBrowse = (onSelect: (values: string[]) => void, defaultSelections?: string[]) => void;
|
6
5
|
export interface IToolbarAsyncMultiSelectFilter extends ToolbarFilterCommon {
|
7
6
|
type: ToolbarFilterType.AsyncMultiSelect;
|
8
|
-
queryOptions:
|
7
|
+
queryOptions: PageAsyncSelectOptionsFn<string>;
|
9
8
|
queryPlaceholder?: string;
|
10
|
-
queryErrorText?:
|
9
|
+
queryErrorText?: PageAsyncQueryErrorText;
|
11
10
|
queryLabel?: (value: string) => Promise<string | undefined>;
|
12
11
|
openBrowse?: ToolbarOpenMultiSelectBrowse;
|
13
12
|
isRequired?: boolean;
|
13
|
+
disableSortOptions?: boolean;
|
14
14
|
}
|
15
15
|
export declare function multiSelectBrowseAdapter<T>(selectFn: (onItemsSelect: (itemValue: T[]) => void, itemDefaultSelections?: T[]) => void, keyFn: (item: T) => string, objectFn: (name: string) => object, customOnSelect?: (items: T[]) => void): ToolbarOpenMultiSelectBrowse;
|
16
16
|
export declare function AsyncQueryChip(props: {
|
@@ -1,15 +1,16 @@
|
|
1
|
+
import { PageAsyncQueryErrorText, PageAsyncSelectOptionsFn } from '../../PageInputs/PageAsyncSelectOptions';
|
1
2
|
import { ToolbarFilterType } from '../PageToolbarFilter';
|
2
|
-
import { PageAsyncQueryErrorTextType, PageAsyncSingleSelectOptionsFn } from './../../PageInputs/PageAsyncSingleSelect';
|
3
3
|
import { ToolbarFilterCommon } from './ToolbarFilterCommon';
|
4
4
|
type ToolbarOpenSingleSelectBrowse = (onSelect: (value: string) => void, defaultSelection?: string) => void;
|
5
5
|
export interface IToolbarAsyncSingleSelectFilter extends ToolbarFilterCommon {
|
6
6
|
type: ToolbarFilterType.AsyncSingleSelect;
|
7
|
-
queryOptions:
|
7
|
+
queryOptions: PageAsyncSelectOptionsFn<string>;
|
8
8
|
queryPlaceholder?: string;
|
9
|
-
queryErrorText?:
|
9
|
+
queryErrorText?: PageAsyncQueryErrorText;
|
10
10
|
openBrowse?: ToolbarOpenSingleSelectBrowse;
|
11
11
|
queryLabel?: (value: string) => Promise<string | undefined>;
|
12
12
|
isRequired?: boolean;
|
13
|
+
disableSortOptions?: boolean;
|
13
14
|
}
|
14
15
|
export declare function singleSelectBrowseAdapter<T>(selectFn: (onItemSelect: (itemValue: T) => void, itemDefaultSelection?: T) => void, keyFn: (item: T) => string, objectFn: (name: string) => object, customOnSelect?: (item: T) => void): ToolbarOpenSingleSelectBrowse;
|
15
16
|
export {};
|
@@ -13,6 +13,12 @@ interface IToolbarDateFilterOption {
|
|
13
13
|
value: string;
|
14
14
|
isCustom?: boolean;
|
15
15
|
}
|
16
|
+
export declare enum DateRangeFilterPresets {
|
17
|
+
LastHour = "lastHour",
|
18
|
+
Last24Hours = "last24hours",
|
19
|
+
LastWeek = "last7days",
|
20
|
+
LastMonth = "last30days"
|
21
|
+
}
|
16
22
|
export interface IToolbarDateRangeFilterProps {
|
17
23
|
id?: string;
|
18
24
|
label?: string;
|
package/framework/index.d.ts
CHANGED
@@ -39,7 +39,6 @@ export * from './PageHeader';
|
|
39
39
|
export * from './PageLayout';
|
40
40
|
export * from './PageMasthead/PageMasthead';
|
41
41
|
export * from './PageMasthead/PageNotificationsIcon';
|
42
|
-
export * from './PageMasthead/PageSettingsIcon';
|
43
42
|
export * from './PageMasthead/PageThemeSwitcher';
|
44
43
|
export * from './PageNavigation/PageApp';
|
45
44
|
export * from './PageNavigation/PageNavSidebar';
|
@@ -47,6 +46,7 @@ export * from './PageNavigation/PageNavigation';
|
|
47
46
|
export * from './PageNavigation/PageNavigationItem';
|
48
47
|
export * from './PageNavigation/useGetPageUrl';
|
49
48
|
export * from './PageNavigation/usePageNavigate';
|
49
|
+
export * from './PageSettings/PageSettingsProvider';
|
50
50
|
export * from './PageTable/PageTable';
|
51
51
|
export * from './PageTable/PageTableCards';
|
52
52
|
export * from './PageTable/PageTableColumn';
|
@@ -55,7 +55,6 @@ export * from './PageTabs/PageTabs';
|
|
55
55
|
export * from './PageToolbar/PageToolbar';
|
56
56
|
export * from './PageToolbar/PageToolbarFilter';
|
57
57
|
export * from './PageWizard';
|
58
|
-
export * from './Settings';
|
59
58
|
export * from './components/BulkSelector';
|
60
59
|
export * from './components/Collapse';
|
61
60
|
export * from './components/Help';
|