@ansible/ansible-ui-framework 2.4.2585 → 2.4.2587
Sign up to get free protection for your applications and to get access to all the features.
- package/PageTable/PageTable.d.ts +29 -11
- package/PageTable/PageTableEmptyState.d.ts +7 -0
- package/components/ButtonLink.d.ts +5 -0
- package/index.js +1210 -1187
- package/index.umd.cjs +25 -24
- package/package.json +1 -1
- package/publish/index.d.ts +6 -6
- package/style.css +1 -1
package/PageTable/PageTable.d.ts
CHANGED
@@ -4,7 +4,7 @@ import { IPageAction } from '../PageActions/PageAction';
|
|
4
4
|
import { PageTableViewType } from '../PageToolbar/PageTableViewType';
|
5
5
|
import { IFilterState, IToolbarFilter } from '../PageToolbar/PageToolbarFilter';
|
6
6
|
import { ITableColumn } from './PageTableColumn';
|
7
|
-
export type
|
7
|
+
export type PageTableCommonProps<T extends object> = {
|
8
8
|
id?: string;
|
9
9
|
keyFn: (item: T) => string | number;
|
10
10
|
itemCount?: number;
|
@@ -38,15 +38,7 @@ export type PageTableProps<T extends object> = {
|
|
38
38
|
onSelect?: (item: T) => void;
|
39
39
|
errorStateTitle: string;
|
40
40
|
error?: Error;
|
41
|
-
|
42
|
-
emptyStateDescription?: string | null;
|
43
|
-
emptyStateIcon?: React.ComponentClass;
|
44
|
-
emptyStateNoDataIcon?: React.ComponentClass;
|
45
|
-
emptyStateActions?: IPageAction<T>[];
|
46
|
-
emptyStateButtonIcon?: React.ReactNode;
|
47
|
-
emptyStateButtonText?: string | null;
|
48
|
-
emptyStateButtonClick?: () => void;
|
49
|
-
emptyStateVariant?: 'default' | 'light' | 'dark' | 'darker';
|
41
|
+
emptyState?: ReactNode;
|
50
42
|
showSelect?: boolean;
|
51
43
|
disableTableView?: boolean;
|
52
44
|
disableListView?: boolean;
|
@@ -65,4 +57,30 @@ export type PageTableProps<T extends object> = {
|
|
65
57
|
limitFiltersToOneOrOperation?: boolean;
|
66
58
|
defaultExpandedRows?: boolean;
|
67
59
|
};
|
68
|
-
export
|
60
|
+
export type PageTableProps<T extends object> = WithEmptyState<T> | WithoutEmptyState<T>;
|
61
|
+
interface WithEmptyState<T extends object> extends PageTableCommonProps<T> {
|
62
|
+
emptyState: ReactNode;
|
63
|
+
emptyStateTitle?: never;
|
64
|
+
emptyStateDescription?: never;
|
65
|
+
emptyStateIcon?: never;
|
66
|
+
emptyStateNoDataIcon?: never;
|
67
|
+
emptyStateActions?: never;
|
68
|
+
emptyStateButtonIcon?: never;
|
69
|
+
emptyStateButtonText?: never;
|
70
|
+
emptyStateButtonClick?: never;
|
71
|
+
emptyStateVariant?: never;
|
72
|
+
}
|
73
|
+
interface WithoutEmptyState<T extends object> extends PageTableCommonProps<T> {
|
74
|
+
emptyState?: never;
|
75
|
+
emptyStateTitle?: string;
|
76
|
+
emptyStateDescription?: string | null;
|
77
|
+
emptyStateIcon?: React.ComponentClass;
|
78
|
+
emptyStateNoDataIcon?: React.ComponentClass;
|
79
|
+
emptyStateActions?: IPageAction<T>[];
|
80
|
+
emptyStateButtonIcon?: React.ReactNode;
|
81
|
+
emptyStateButtonText?: string | null;
|
82
|
+
emptyStateButtonClick?: () => void;
|
83
|
+
emptyStateVariant?: 'default' | 'light' | 'dark' | 'darker';
|
84
|
+
}
|
85
|
+
export declare function PageTable<T extends object>(props: PageTableProps<T>): string | number | true | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element;
|
86
|
+
export {};
|