@ansible/ansible-ui-framework 0.0.274 → 0.0.276
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/cjs/BulkActionDialog.js +1 -1
- package/cjs/BulkProgressDialog.js +1 -1
- package/cjs/PageAlertToaster.d.ts +1 -1
- package/cjs/PageDataList.d.ts +2 -2
- package/cjs/PageForm.d.ts +2 -2
- package/cjs/PagePagination.d.ts +1 -1
- package/cjs/PageTable.d.ts +3 -3
- package/cjs/PageTableCards.d.ts +1 -1
- package/cjs/PageTableList.d.ts +1 -1
- package/cjs/PageTableViewType.d.ts +1 -1
- package/cjs/PageToolbar.d.ts +4 -4
- package/cjs/TypedActions/TypedActions.d.ts +5 -5
- package/cjs/components/Details.d.ts +1 -1
- package/cjs/components/patternfly-colors.d.ts +1 -1
- package/cjs/components/useBreakPoint.d.ts +1 -1
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +2 -0
- package/cjs/useInMemoryView.d.ts +1 -1
- package/cjs/useSelectDialog.d.ts +1 -1
- package/cjs/useSelectMultipleDialog.d.ts +1 -1
- package/package.json +1 -1
package/cjs/BulkActionDialog.js
CHANGED
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AlertProps } from '@patternfly/react-core';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
export
|
|
3
|
+
export type AlertToasterProps = AlertProps;
|
|
4
4
|
export interface IPageAlertToaster {
|
|
5
5
|
addAlert: (alert: AlertToasterProps) => void;
|
|
6
6
|
removeAlert: (alert: AlertToasterProps) => void;
|
package/cjs/PageDataList.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
|
2
2
|
import { PageHeaderProps } from './PageHeader';
|
|
3
3
|
import { IToolbarFilter } from './PageToolbar';
|
|
4
4
|
import { ITypedAction } from './TypedActions';
|
|
5
|
-
export
|
|
5
|
+
export type DataListPageProps<T extends object> = PageHeaderProps & PageDataListProps<T> & {
|
|
6
6
|
error?: Error;
|
|
7
7
|
};
|
|
8
8
|
export declare function DataListPage<T extends object>(props: DataListPageProps<T>): JSX.Element;
|
|
9
|
-
export
|
|
9
|
+
export type PageDataListProps<T extends object> = {
|
|
10
10
|
keyFn: (item: T) => string | number;
|
|
11
11
|
itemCount?: number;
|
|
12
12
|
pageItems: T[] | undefined;
|
package/cjs/PageForm.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { CSSProperties, ReactNode } from 'react';
|
|
|
3
3
|
import { DeepPartial, ErrorOption, FieldPath, FieldValues, SubmitHandler, UseFormReturn } from 'react-hook-form';
|
|
4
4
|
import { PartialDeep } from 'type-fest';
|
|
5
5
|
import { PageHeaderProps } from './PageHeader';
|
|
6
|
-
export
|
|
6
|
+
export type FormPageProps<T extends object> = PageHeaderProps & {
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
defaultValues?: PartialDeep<T>;
|
|
9
9
|
onSubmit: SubmitHandler<PartialDeep<T>>;
|
|
@@ -136,7 +136,7 @@ export declare function PageForm<T extends object>(props: {
|
|
|
136
136
|
singleColumn?: boolean;
|
|
137
137
|
disableScrolling?: boolean;
|
|
138
138
|
}): JSX.Element;
|
|
139
|
-
export
|
|
139
|
+
export type FormPageSubmitHandler<T extends FieldValues> = (data: T, setError: (error: string) => void, setFieldError: (fieldName: FieldPath<T>, error: ErrorOption) => void) => Promise<unknown>;
|
|
140
140
|
export declare function PageFormSubmitButton(props: {
|
|
141
141
|
children: ReactNode;
|
|
142
142
|
style?: CSSProperties;
|
package/cjs/PagePagination.d.ts
CHANGED
package/cjs/PageTable.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { PageHeaderProps } from './PageHeader';
|
|
|
3
3
|
import { PageTableViewType } from './PageTableViewType';
|
|
4
4
|
import { IToolbarFilter } from './PageToolbar';
|
|
5
5
|
import { ITypedAction } from './TypedActions';
|
|
6
|
-
export
|
|
6
|
+
export type TablePageProps<T extends object> = PageHeaderProps & PageTableProps<T> & {
|
|
7
7
|
error?: Error;
|
|
8
8
|
};
|
|
9
9
|
export declare function TablePage<T extends object>(props: TablePageProps<T>): JSX.Element;
|
|
10
|
-
export
|
|
10
|
+
export type PageTableProps<T extends object> = {
|
|
11
11
|
keyFn: (item: T) => string | number;
|
|
12
12
|
itemCount?: number;
|
|
13
13
|
pageItems: T[] | undefined;
|
|
@@ -52,7 +52,7 @@ export declare type PageTableProps<T extends object> = {
|
|
|
52
52
|
defaultCardSubtitle?: ReactNode;
|
|
53
53
|
};
|
|
54
54
|
export declare function PageTable<T extends object>(props: PageTableProps<T>): JSX.Element;
|
|
55
|
-
|
|
55
|
+
type CellFn<T extends object> = (item: T) => ReactNode;
|
|
56
56
|
export interface ITableColumn<T extends object> {
|
|
57
57
|
id?: string;
|
|
58
58
|
header: string;
|
package/cjs/PageTableCards.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PageTableProps } from './PageTable';
|
|
3
|
-
export
|
|
3
|
+
export type PageTableCardsProps<T extends object> = PageTableProps<T>;
|
|
4
4
|
export declare function PageTableCards<T extends object>(props: PageTableCardsProps<T>): JSX.Element;
|
package/cjs/PageTableList.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ITableColumn, PageTableProps } from './PageTable';
|
|
3
3
|
import { ITypedAction } from './TypedActions';
|
|
4
|
-
export
|
|
4
|
+
export type PageTableListProps<T extends object> = PageTableProps<T>;
|
|
5
5
|
export declare function PageTableList<T extends object>(props: PageTableListProps<T>): JSX.Element;
|
|
6
6
|
export declare function useColumnsToDataList<T extends object>(tableColumns: ITableColumn<T>[], keyFn: (item: T) => string | number, isSelected?: (item: T) => boolean, selectItem?: (item: T) => void, unselectItem?: (item: T) => void, rowActions?: ITypedAction<T>[], defaultCardSubtitle?: ReactNode, showSelect?: boolean): (item: T) => ReactNode;
|
package/cjs/PageToolbar.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface IItemFilter<T extends object> {
|
|
|
10
10
|
}[];
|
|
11
11
|
filter: (item: T, values: string[]) => boolean;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type SetFilterValues<T extends object> = (filter: IItemFilter<T>, values: string[]) => void;
|
|
14
14
|
export declare function toolbarActionsHaveBulkActions<T extends object>(actions?: ITypedAction<T>[]): boolean;
|
|
15
15
|
export interface IToolbarStringFilter {
|
|
16
16
|
key: string;
|
|
@@ -30,9 +30,9 @@ export interface IToolbarSelectFilter {
|
|
|
30
30
|
query: string;
|
|
31
31
|
placeholder?: string;
|
|
32
32
|
}
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
33
|
+
export type IToolbarFilter = IToolbarStringFilter | IToolbarSelectFilter;
|
|
34
|
+
export type IFilterState = Record<string, string[] | undefined>;
|
|
35
|
+
export type PagetableToolbarProps<T extends object> = {
|
|
36
36
|
openColumnModal?: () => void;
|
|
37
37
|
keyFn: (item: T) => string | number;
|
|
38
38
|
itemCount?: number;
|
|
@@ -19,27 +19,27 @@ interface ITypedActionCommon {
|
|
|
19
19
|
tooltip?: string;
|
|
20
20
|
isDanger?: boolean;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type ITypedActionButton = ITypedActionCommon & {
|
|
23
23
|
type: TypedActionType.button;
|
|
24
24
|
variant?: ButtonVariant;
|
|
25
25
|
onClick: () => void;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type ITypedBulkAction<T extends object> = ITypedActionCommon & {
|
|
28
28
|
type: TypedActionType.bulk;
|
|
29
29
|
variant?: ButtonVariant;
|
|
30
30
|
onClick: (selectedItems: T[]) => void;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type ITypedSingleAction<T extends object> = ITypedActionCommon & {
|
|
33
33
|
type: TypedActionType.single;
|
|
34
34
|
variant?: ButtonVariant;
|
|
35
35
|
onClick: (item: T) => void;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type ITypedDropdownAction<T extends object> = ITypedActionCommon & {
|
|
38
38
|
type: TypedActionType.dropdown;
|
|
39
39
|
variant?: ButtonVariant;
|
|
40
40
|
options: ITypedAction<T>[];
|
|
41
41
|
};
|
|
42
|
-
export
|
|
42
|
+
export type ITypedAction<T extends object> = ITypedActionSeperator | ITypedActionButton | ITypedBulkAction<T> | ITypedSingleAction<T> | ITypedDropdownAction<T>;
|
|
43
43
|
export declare function TypedActionsDropdown<T extends object>(props: {
|
|
44
44
|
actions: ITypedAction<T>[];
|
|
45
45
|
label?: string;
|
|
@@ -24,7 +24,7 @@ export interface IDetailListItem {
|
|
|
24
24
|
helpTitle?: string;
|
|
25
25
|
help?: ReactNode;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type IDetail = IDetailText | IDetailList;
|
|
28
28
|
export declare function DetailsList(props: {
|
|
29
29
|
children?: ReactNode;
|
|
30
30
|
}): JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type WindowSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
2
2
|
export declare function useWindowSize(): WindowSize;
|
|
3
3
|
/** Returns true if the window size is equal to or larger than the indicated size. */
|
|
4
4
|
export declare function useBreakpoint(size: WindowSize): boolean;
|
package/cjs/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './components/Details';
|
|
|
11
11
|
export * from './components/Help';
|
|
12
12
|
export * from './components/icons/RunningIcon';
|
|
13
13
|
export * from './components/patternfly-colors';
|
|
14
|
+
export * from './components/Scrollable';
|
|
14
15
|
export * from './components/useBreakPoint';
|
|
15
16
|
export * from './PageAlertToaster';
|
|
16
17
|
export * from './PageBody';
|
|
@@ -22,6 +23,7 @@ export * from './PageHeader';
|
|
|
22
23
|
export * from './PageLayout';
|
|
23
24
|
export * from './PageTable';
|
|
24
25
|
export * from './PageTableCards';
|
|
26
|
+
export * from './PageTableDetails';
|
|
25
27
|
export * from './PageTabs';
|
|
26
28
|
export * from './PageToolbar';
|
|
27
29
|
export * from './Settings';
|
package/cjs/index.js
CHANGED
|
@@ -27,6 +27,7 @@ __exportStar(require("./components/Details"), exports);
|
|
|
27
27
|
__exportStar(require("./components/Help"), exports);
|
|
28
28
|
__exportStar(require("./components/icons/RunningIcon"), exports);
|
|
29
29
|
__exportStar(require("./components/patternfly-colors"), exports);
|
|
30
|
+
__exportStar(require("./components/Scrollable"), exports);
|
|
30
31
|
__exportStar(require("./components/useBreakPoint"), exports);
|
|
31
32
|
__exportStar(require("./PageAlertToaster"), exports);
|
|
32
33
|
__exportStar(require("./PageBody"), exports);
|
|
@@ -38,6 +39,7 @@ __exportStar(require("./PageHeader"), exports);
|
|
|
38
39
|
__exportStar(require("./PageLayout"), exports);
|
|
39
40
|
__exportStar(require("./PageTable"), exports);
|
|
40
41
|
__exportStar(require("./PageTableCards"), exports);
|
|
42
|
+
__exportStar(require("./PageTableDetails"), exports);
|
|
41
43
|
__exportStar(require("./PageTabs"), exports);
|
|
42
44
|
__exportStar(require("./PageToolbar"), exports);
|
|
43
45
|
__exportStar(require("./Settings"), exports);
|
package/cjs/useInMemoryView.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ITableColumn } from './PageTable';
|
|
|
2
2
|
import { IToolbarFilter } from './PageToolbar';
|
|
3
3
|
import { ISelected } from './useTableItems';
|
|
4
4
|
import { IView } from './useView';
|
|
5
|
-
export
|
|
5
|
+
export type IInMemoryView<T extends object> = IView & ISelected<T> & {
|
|
6
6
|
itemCount: number | undefined;
|
|
7
7
|
pageItems: T[] | undefined;
|
|
8
8
|
};
|
package/cjs/useSelectDialog.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ interface ISelectDialogOptions<T extends object> {
|
|
|
17
17
|
export declare function useSelectDialog<T extends {
|
|
18
18
|
id: number;
|
|
19
19
|
}>(options: ISelectDialogOptions<T>): (onSelect?: ((item: T) => void) | undefined, title?: string) => void;
|
|
20
|
-
export
|
|
20
|
+
export type SelectDialogProps<T extends object> = {
|
|
21
21
|
title: string;
|
|
22
22
|
open: boolean;
|
|
23
23
|
setOpen: (open: boolean) => void;
|
|
@@ -3,7 +3,7 @@ import { ITableColumn } from './PageTable';
|
|
|
3
3
|
import { IToolbarFilter } from './PageToolbar';
|
|
4
4
|
import { ISelected } from './useTableItems';
|
|
5
5
|
import { IView } from './useView';
|
|
6
|
-
export
|
|
6
|
+
export type SelectMultipleDialogProps<T extends object> = {
|
|
7
7
|
title: string;
|
|
8
8
|
view: IView & ISelected<T> & {
|
|
9
9
|
itemCount?: number;
|
package/package.json
CHANGED