@ansible/ansible-ui-framework 2.4.2628 → 2.4.2630

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ export interface SelectOptionObject {
3
+ toString(): string;
4
+ compareTo?(selectOption: unknown): boolean;
5
+ }
6
+ export type FormGroupSingleSelectTypeAheadProps = {
7
+ id?: string;
8
+ label: string;
9
+ labelHelp?: string | string[] | React.ReactNode;
10
+ labelHelpTitle?: string;
11
+ helperText?: string;
12
+ helperTextInvalid?: string;
13
+ additionalControls?: React.ReactNode;
14
+ isReadOnly?: boolean;
15
+ placeholderText?: string;
16
+ options: {
17
+ value: string;
18
+ label: string;
19
+ }[];
20
+ onHandleSelection: (value: {
21
+ name: string;
22
+ }) => void;
23
+ isSubmitting: boolean;
24
+ value: string | string[] | Partial<{
25
+ name: string;
26
+ }> | null;
27
+ onHandleClear: () => void;
28
+ isRequired?: boolean;
29
+ };
30
+ export declare function FormGroupSingleSelectTypeAhead(props: FormGroupSingleSelectTypeAheadProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ export interface SelectOptionObject {
3
+ toString(): string;
4
+ compareTo?(selectOption: unknown): boolean;
5
+ }
6
+ export type FormGroupTypeAheadMultiSelectProps = {
7
+ id?: string;
8
+ label: string;
9
+ labelHelp?: string | string[] | React.ReactNode;
10
+ labelHelpTitle?: string;
11
+ helperText?: string;
12
+ helperTextInvalid?: string;
13
+ additionalControls?: React.ReactNode;
14
+ isReadOnly?: boolean;
15
+ placeholderText?: string | React.ReactNode;
16
+ options: {
17
+ value: string | {
18
+ name: string;
19
+ };
20
+ label: string;
21
+ }[];
22
+ onHandleSelection: (value: {
23
+ name: string;
24
+ }) => void;
25
+ isSubmitting: boolean;
26
+ value: Partial<{
27
+ name: string;
28
+ }>[];
29
+ onHandleClear: (chip?: string) => void;
30
+ isRequired?: boolean;
31
+ };
32
+ export declare function FormGroupTypeAheadMultiSelect(props: FormGroupTypeAheadMultiSelectProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,14 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
2
  import { FieldPath, FieldValues } from 'react-hook-form';
3
+ export type Variant = 'single' | 'typeahead' | 'typeaheadmulti';
4
+ export interface SelectOptionObject {
5
+ toString(): string;
6
+ compareTo?(selectOption: unknown): boolean;
7
+ }
3
8
  export interface PageFormAsyncSelectProps<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, SelectionType = unknown> {
4
9
  id?: string;
5
10
  name: TFieldName;
6
- variant?: 'single' | 'typeahead' | 'typeaheadMulti';
11
+ variant?: Variant;
7
12
  label: string;
8
13
  labelHelpTitle?: string;
9
14
  labelHelp?: string | string[] | ReactNode;
@@ -34,7 +39,7 @@ export interface AsyncSelectProps<SelectionType> {
34
39
  values: SelectionType[];
35
40
  }>;
36
41
  placeholder: string;
37
- variant?: 'single' | 'typeahead' | 'typeaheadMulti';
42
+ variant?: Variant;
38
43
  loadingPlaceholder: string;
39
44
  labeledBy?: string;
40
45
  isReadOnly?: boolean;
@@ -9,9 +9,7 @@ export type PageFormCreatableSelectProps<TFieldValues extends FieldValues = Fiel
9
9
  additionalControls?: ReactElement;
10
10
  placeholderText?: string;
11
11
  options: {
12
- value: string | {
13
- name: string;
14
- };
12
+ value: string;
15
13
  label: string;
16
14
  }[];
17
15
  isReadOnly?: boolean;
@@ -1,6 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { FieldPath, FieldPathValue, FieldValues, Validate } from 'react-hook-form';
3
3
  import { PageSelectOption } from '../../PageInputs/PageSelectOption';
4
+ export interface SelectOptionObject {
5
+ toString(): string;
6
+ compareTo?(selectOption: unknown): boolean;
7
+ }
4
8
  export type PageFormSelectProps<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TSelection = unknown> = {
5
9
  id?: string;
6
10
  name: TFieldName;