@ansible/ansible-ui-framework 2.4.2628 → 2.4.2629

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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
3
  "description": "A framework for building applications using PatternFly.",
4
- "version": "2.4.2628",
4
+ "version": "2.4.2629",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,31 +0,0 @@
1
- import { SelectOptionObject } from '@patternfly/react-core/deprecated';
2
- import { ChangeEvent, MouseEvent, ReactNode } from 'react';
3
- export type FormGroupTypeAheadSelectProps = {
4
- id?: string;
5
- label: string;
6
- labelHelp?: string | string[] | ReactNode;
7
- labelHelpTitle?: string;
8
- helperText?: string;
9
- helperTextInvalid?: string;
10
- additionalControls?: ReactNode;
11
- isReadOnly?: boolean;
12
- placeholderText?: string | ReactNode;
13
- options: {
14
- value: string | {
15
- name: string;
16
- };
17
- label: string;
18
- }[];
19
- onSelect?: (event: MouseEvent | ChangeEvent, value: string | SelectOptionObject, isPlaceholder?: boolean) => void;
20
- onHandleSelection: (value: string | SelectOptionObject | {
21
- name: string;
22
- }) => void;
23
- isSubmitting: boolean;
24
- value: Partial<{
25
- name: string;
26
- }>[];
27
- onHandleClear: (chip?: string) => void;
28
- isRequired?: boolean;
29
- isMulti?: boolean;
30
- };
31
- export declare function FormGroupTypeAheadSelect(props: FormGroupTypeAheadSelectProps): import("react/jsx-runtime").JSX.Element;