@ansible/ansible-ui-framework 2.4.262 → 2.4.265
Sign up to get free protection for your applications and to get access to all the features.
- package/framework/PageForm/Inputs/FormGroupSelect.d.ts +5 -3
- package/framework/PageInputs/PageSingleSelect.d.ts +9 -0
- package/framework/PageTable/PageToolbar/PageToolbar.d.ts +2 -2
- package/framework/PageTable/PageToolbar/PageToolbarFilter.d.ts +12 -6
- package/framework/PageTable/PageToolbar/PageToolbarFilterTypes/ToolbarDateFilter.d.ts +0 -4
- package/framework/PageTable/PageToolbar/PageToolbarFilterTypes/ToolbarDateRangeFilter.d.ts +33 -0
- package/framework/PageTable/PageToolbar/PageToolbarFilterTypes/ToolbarFilters.cy.d.ts +1 -0
- package/framework/PageTable/PageToolbar/PageToolbarFilterTypes/ToolbarSelectFilter.d.ts +22 -8
- package/framework/PageTable/PageToolbar/PageToolbarFilterTypes/ToolbarTextFilter.d.ts +7 -3
- package/index.js +24852 -23074
- package/index.umd.cjs +274 -271
- package/package.json +1 -1
- package/style.css +1 -1
@@ -1,8 +1,10 @@
|
|
1
1
|
import { SelectProps } from '@patternfly/react-core';
|
2
|
-
import
|
2
|
+
import { ReactNode } from 'react';
|
3
3
|
import { PageFormGroupProps } from './PageFormGroup';
|
4
|
-
export type FormGroupSelectProps = Pick<SelectProps, 'footer' | 'isCreatable' | 'isGrouped' | 'onSelect' | 'placeholderText' | '
|
4
|
+
export type FormGroupSelectProps = Pick<SelectProps, 'footer' | 'isCreatable' | 'isGrouped' | 'onSelect' | 'placeholderText' | 'isDisabled'> & PageFormGroupProps & {
|
5
|
+
value?: string;
|
5
6
|
isReadOnly?: boolean;
|
6
|
-
placeholderText: string |
|
7
|
+
placeholderText: string | ReactNode;
|
8
|
+
selectedIcon?: ReactNode;
|
7
9
|
};
|
8
10
|
export declare function FormGroupSelect(props: FormGroupSelectProps): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
export declare function PageSingleSelect(props: {
|
3
|
+
id?: string;
|
4
|
+
children: ReactNode;
|
5
|
+
value: string;
|
6
|
+
onChange: (value: string) => void;
|
7
|
+
placeholder?: string;
|
8
|
+
icon?: ReactNode;
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
@@ -4,7 +4,7 @@ import { PageTableViewType } from './PageTableViewType';
|
|
4
4
|
import './PageToolbar.css';
|
5
5
|
import { IToolbarFilter } from './PageToolbarFilter';
|
6
6
|
import { PageTableSortOption } from './PageToolbarSort';
|
7
|
-
export type
|
7
|
+
export type PageTableToolbarProps<T extends object> = {
|
8
8
|
openColumnModal?: () => void;
|
9
9
|
keyFn: (item: T) => string | number;
|
10
10
|
itemCount?: number;
|
@@ -39,4 +39,4 @@ export type PagetableToolbarProps<T extends object> = {
|
|
39
39
|
bottomBorder?: boolean;
|
40
40
|
sortOptions?: PageTableSortOption[];
|
41
41
|
};
|
42
|
-
export declare function PageTableToolbar<T extends object>(props:
|
42
|
+
export declare function PageTableToolbar<T extends object>(props: PageTableToolbarProps<T>): import("react/jsx-runtime").JSX.Element;
|
@@ -1,12 +1,18 @@
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
import { IToolbarDateRangeFilter } from './PageToolbarFilterTypes/ToolbarDateRangeFilter';
|
3
|
+
import { IToolbarMultiSelectFilter, IToolbarSingleSelectFilter } from './PageToolbarFilterTypes/ToolbarSelectFilter';
|
2
4
|
import { IToolbarTextFilter } from './PageToolbarFilterTypes/ToolbarTextFilter';
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
5
|
+
export declare enum ToolbarFilterType {
|
6
|
+
Text = "text",
|
7
|
+
SingleSelect = "singleselect",
|
8
|
+
MultiSelect = "multiselect",
|
9
|
+
DateRange = "daterange"
|
10
|
+
}
|
11
|
+
export type IToolbarFilter = IToolbarTextFilter | IToolbarSingleSelectFilter | IToolbarMultiSelectFilter | IToolbarDateRangeFilter;
|
12
|
+
export type IFilterState = Record<string, string[]>;
|
7
13
|
export type PageToolbarFiltersProps = {
|
8
14
|
toolbarFilters?: IToolbarFilter[];
|
9
|
-
|
10
|
-
|
15
|
+
filterState: IFilterState;
|
16
|
+
setFilterState?: Dispatch<SetStateAction<IFilterState>>;
|
11
17
|
};
|
12
18
|
export declare function PageToolbarFilters(props: PageToolbarFiltersProps): import("react/jsx-runtime").JSX.Element;
|
@@ -1,8 +1,4 @@
|
|
1
1
|
import { SelectOptionObject } from '@patternfly/react-core';
|
2
|
-
import { ToolbarFilterCommon } from './ToolbarFilterCommon';
|
3
|
-
export interface IToolbarDateFilter extends ToolbarFilterCommon {
|
4
|
-
type: 'date';
|
5
|
-
}
|
6
2
|
type AttributeType = string | string[] | SelectOptionObject | SelectOptionObject[] | boolean;
|
7
3
|
export declare function ToolbarDateFilter(props: {
|
8
4
|
endDate: string;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { ToolbarFilterType } from '../PageToolbarFilter';
|
2
|
+
import { ToolbarFilterCommon } from './ToolbarFilterCommon';
|
3
|
+
export interface IToolbarDateRangeFilter extends ToolbarFilterCommon {
|
4
|
+
type: ToolbarFilterType.DateRange;
|
5
|
+
options: IToolbarDateFilterOption[];
|
6
|
+
isRequired?: boolean;
|
7
|
+
defaultValue?: string;
|
8
|
+
isPinned?: true;
|
9
|
+
}
|
10
|
+
interface IToolbarDateFilterOption {
|
11
|
+
label: string;
|
12
|
+
description?: string;
|
13
|
+
value: string;
|
14
|
+
isCustom?: boolean;
|
15
|
+
}
|
16
|
+
export interface IToolbarDateRangeFilterProps {
|
17
|
+
id?: string;
|
18
|
+
label?: string;
|
19
|
+
placeholder?: string;
|
20
|
+
values: string[];
|
21
|
+
setValues: (values: string[]) => void;
|
22
|
+
options: IToolbarDateFilterOption[];
|
23
|
+
isRequired?: boolean;
|
24
|
+
defaultValue?: string;
|
25
|
+
}
|
26
|
+
export declare function ToolbarDateRangeFilter(props: IToolbarDateRangeFilterProps): import("react/jsx-runtime").JSX.Element;
|
27
|
+
export declare function DateRange(props: {
|
28
|
+
to?: string;
|
29
|
+
setTo: (value?: string) => void;
|
30
|
+
from?: string;
|
31
|
+
setFrom: (value?: string) => void;
|
32
|
+
}): import("react/jsx-runtime").JSX.Element;
|
33
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,18 +1,28 @@
|
|
1
1
|
import { SelectVariant } from '@patternfly/react-core';
|
2
|
+
import { ToolbarFilterType } from '../PageToolbarFilter';
|
2
3
|
import { ToolbarFilterCommon } from './ToolbarFilterCommon';
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
import './ToolbarSelectFilter.css';
|
5
|
+
export interface IToolbarSingleSelectFilter extends ToolbarFilterCommon {
|
6
|
+
type: ToolbarFilterType.SingleSelect;
|
7
|
+
options: IToolbarFilterOption[];
|
8
|
+
isRequired?: boolean;
|
9
|
+
defaultValue?: string;
|
10
|
+
hasSearch?: boolean;
|
11
|
+
onSearchTextChange?: (searchText: string) => void;
|
7
12
|
}
|
8
|
-
export interface
|
9
|
-
type:
|
10
|
-
options:
|
13
|
+
export interface IToolbarMultiSelectFilter extends ToolbarFilterCommon {
|
14
|
+
type: ToolbarFilterType.MultiSelect;
|
15
|
+
options: IToolbarFilterOption[];
|
11
16
|
hasSearch?: boolean;
|
12
17
|
onSearchTextChange?: (searchText: string) => void;
|
13
|
-
|
18
|
+
}
|
19
|
+
export interface IToolbarFilterOption {
|
20
|
+
label: string;
|
21
|
+
description?: string;
|
22
|
+
value: string;
|
14
23
|
}
|
15
24
|
export declare function ToolbarSelectFilter(props: {
|
25
|
+
id?: string;
|
16
26
|
addFilter: (value: string) => void;
|
17
27
|
removeFilter: (value: string) => void;
|
18
28
|
options: {
|
@@ -24,4 +34,8 @@ export declare function ToolbarSelectFilter(props: {
|
|
24
34
|
hasSearch?: boolean;
|
25
35
|
variant?: SelectVariant;
|
26
36
|
onSearchTextChange?: (text: string) => void;
|
37
|
+
label?: string;
|
38
|
+
hasClear?: boolean;
|
39
|
+
isRequired?: boolean;
|
40
|
+
defaultValue?: string;
|
27
41
|
}): import("react/jsx-runtime").JSX.Element;
|
@@ -1,9 +1,13 @@
|
|
1
|
+
import { ToolbarFilterType } from '../PageToolbarFilter';
|
1
2
|
import { ToolbarFilterCommon } from './ToolbarFilterCommon';
|
2
3
|
export interface IToolbarTextFilter extends ToolbarFilterCommon {
|
3
|
-
type:
|
4
|
+
type: ToolbarFilterType.Text;
|
4
5
|
comparison: 'contains' | 'startsWith' | 'endsWith' | 'equals';
|
5
6
|
}
|
6
|
-
export
|
7
|
+
export interface IToolbarTextFilterProps {
|
7
8
|
id?: string;
|
8
9
|
addFilter: (value: string) => void;
|
9
|
-
|
10
|
+
placeholder?: string;
|
11
|
+
comparison: 'contains' | 'startsWith' | 'endsWith' | 'equals';
|
12
|
+
}
|
13
|
+
export declare function ToolbarTextFilter(props: IToolbarTextFilterProps): import("react/jsx-runtime").JSX.Element;
|