@ansible/ansible-ui-framework 2.4.266 → 2.4.268

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,20 @@
1
- import { FormGroupSelectProps } from './FormGroupSelect';
2
- export type PageFormSelectProps = {
3
- name: string;
4
- } & Omit<FormGroupSelectProps, 'onSelect' | 'value'>;
5
- export declare function PageFormSelect(props: PageFormSelectProps): import("react/jsx-runtime").JSX.Element;
1
+ import { ReactNode } from 'react';
2
+ import { FieldPath, FieldPathValue, FieldValues, Validate } from 'react-hook-form';
3
+ import { IFormGroupSelectOption } from './FormGroupSelectOption';
4
+ export type PageFormSelectProps<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TSelection = unknown> = {
5
+ id?: string;
6
+ name: TFieldName;
7
+ label?: string;
8
+ labelHelpTitle?: string;
9
+ labelHelp?: ReactNode;
10
+ additionalControls?: ReactNode;
11
+ placeholderText?: string;
12
+ options: IFormGroupSelectOption<TSelection>[];
13
+ footer?: ReactNode;
14
+ helperText?: string;
15
+ isDisabled?: boolean;
16
+ isReadOnly?: boolean;
17
+ isRequired?: boolean;
18
+ validate?: Validate<FieldPathValue<TFieldValues, TFieldName>, TFieldValues> | Record<string, Validate<FieldPathValue<TFieldValues, TFieldName>, TFieldValues>>;
19
+ };
20
+ export declare function PageFormSelect<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TSelection = unknown>(props: PageFormSelectProps<TFieldValues, TFieldName, TSelection>): import("react/jsx-runtime").JSX.Element;
@@ -1 +1,5 @@
1
+ /// <reference types="react" />
1
2
  export declare function useIsMounted(): boolean;
3
+ export declare function useIsMountedRef(): import("react").MutableRefObject<{
4
+ isMounted: boolean;
5
+ }>;
@@ -31,11 +31,9 @@ export * from './PageForm/Inputs/FormGroupTextInput';
31
31
  export * from './PageForm/Inputs/PageFormCheckbox';
32
32
  export * from './PageForm/Inputs/PageFormDataEditor';
33
33
  export * from './PageForm/Inputs/PageFormSelect';
34
- export * from './PageForm/Inputs/PageFormSelectOption';
35
34
  export * from './PageForm/Inputs/PageFormSwitch';
36
35
  export * from './PageForm/Inputs/PageFormTextArea';
37
36
  export * from './PageForm/Inputs/PageFormTextInput';
38
- export * from './PageForm/Inputs/PageFormTextSelect';
39
37
  export * from './PageForm/PageForm';
40
38
  export * from './PageFramework';
41
39
  export * from './PageHeader';
@@ -9,8 +9,12 @@ export interface IView {
9
9
  sortDirection: 'asc' | 'desc';
10
10
  setSortDirection: (sortDirection: 'asc' | 'desc') => void;
11
11
  filters: Record<string, string[]>;
12
- defaultFilters?: Record<string, string[]>;
13
12
  setFilters: Dispatch<SetStateAction<Record<string, string[]>>>;
14
13
  clearAllFilters: () => void;
15
14
  }
16
- export declare function useView(view?: Partial<IView> | undefined, disableQueryString?: boolean): IView;
15
+ export declare function useView(options: {
16
+ defaultValues?: Partial<Pick<IView, 'filters' | 'sort' | 'sortDirection'>> | undefined;
17
+ disableQueryString?: boolean;
18
+ ignoreQueryStringKeys?: string[];
19
+ filterQueryStringKeys?: string[];
20
+ }): IView;