@ansible/ansible-ui-framework 2.4.288 → 2.4.290

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ import { PageSelectOption } from './PageSelectOption';
3
+ export declare function PageMultiSelect<ValueT>(props: {
4
+ id?: string;
5
+ icon?: ReactNode;
6
+ placeholder: ReactNode;
7
+ values: ValueT[] | undefined | null;
8
+ onSelect: (setter: (currentValues: ValueT[] | undefined) => ValueT[] | undefined) => void;
9
+ options: PageSelectOption<ValueT>[];
10
+ variant?: 'chips' | 'count';
11
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,9 @@
1
- export interface PageSelectOption<T> {
1
+ interface IPageSelectOption<ValueT> {
2
+ key?: string | number;
3
+ value: ValueT;
2
4
  label: string;
3
5
  description?: string;
4
- value: T;
5
6
  }
7
+ export type PageSelectOption<ValueT = unknown> = string | number | IPageSelectOption<ValueT>;
8
+ export declare function getPageSelectOptions<ValueT>(options: PageSelectOption<ValueT>[]): IPageSelectOption<ValueT>[];
9
+ export {};
@@ -1,10 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { PageSelectOption } from './PageSelectOption';
3
- export declare function PageSingleSelect<T>(props: {
3
+ export declare function PageSingleSelect<ValueT>(props: {
4
4
  id?: string;
5
5
  icon?: ReactNode;
6
- placeholder?: string;
7
- value: T;
8
- onSelect: (value: T) => void;
9
- options: PageSelectOption<T>[];
6
+ placeholder: string;
7
+ value: ValueT;
8
+ onSelect: (value: ValueT) => void;
9
+ options: PageSelectOption<ValueT>[];
10
10
  }): import("react/jsx-runtime").JSX.Element;
@@ -16,7 +16,7 @@ interface IToolbarDateFilterOption {
16
16
  export interface IToolbarDateRangeFilterProps {
17
17
  id?: string;
18
18
  label?: string;
19
- placeholder?: string;
19
+ placeholder: string;
20
20
  values: string[];
21
21
  setValues: (values: string[]) => void;
22
22
  options: IToolbarDateFilterOption[];