react-hook-form-cloudscape 1.7.2 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/attribute-editor/attribute-editor.d.ts +2 -2
- package/components/autosuggest/autosuggest.d.ts +3 -3
- package/components/cards/cards.d.ts +2 -2
- package/components/checkbox/checkbox.d.ts +3 -3
- package/components/code-editor/code-editor.d.ts +3 -3
- package/components/date-picker/date-picker.d.ts +5 -5
- package/components/date-range-picker/date-range-picker.d.ts +2 -2
- package/components/file-upload/file-upload.d.ts +2 -2
- package/components/input/input.d.ts +3 -3
- package/components/multiselect/multiselect.d.ts +3 -3
- package/components/property-filter/property-filter.d.ts +3 -3
- package/components/radio-group/radio-group.d.ts +3 -3
- package/components/s3-resource-selector/s3-resource-selector.d.ts +2 -2
- package/components/select/select.d.ts +3 -3
- package/components/slider/slider.d.ts +3 -3
- package/components/tag-editor/tag-editor.d.ts +3 -3
- package/components/text-filter/text-filter.d.ts +3 -3
- package/components/textarea/textarea.d.ts +2 -2
- package/components/tiles/tiles.d.ts +3 -3
- package/components/time-input/time-input.d.ts +3 -3
- package/components/toggle/toggle.d.ts +3 -3
- package/package.json +5 -2
- package/react-hook-form-cloudscape.es.js +19 -2
- package/react-hook-form-cloudscape.es.js.map +1 -1
- package/react-hook-form-cloudscape.umd.js.map +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AttributeEditorProps, NonCancelableCustomEvent } from '@cloudscape-design/components';
|
|
2
2
|
import { ArrayPath, Control, FieldArray, FieldArrayPath, FieldValues, UseFieldArrayAppend, UseFieldArrayRemove } from 'react-hook-form';
|
|
3
|
-
export interface Definition<T> extends Omit<AttributeEditorProps.FieldDefinition<T>,
|
|
3
|
+
export interface Definition<T> extends Omit<AttributeEditorProps.FieldDefinition<T>, "errorText"> {
|
|
4
4
|
label: string;
|
|
5
5
|
errorName?: (item: T, index: number) => string;
|
|
6
6
|
}
|
|
7
|
-
export interface CAttributeEditorProps<T extends FieldValues> extends Omit<AttributeEditorProps<T>,
|
|
7
|
+
export interface CAttributeEditorProps<T extends FieldValues> extends Omit<AttributeEditorProps<T>, "items" | "onRemoveButtonClick" | "onAddButtonClick"> {
|
|
8
8
|
name: FieldArrayPath<T>;
|
|
9
9
|
control: Control<T>;
|
|
10
10
|
definition: Definition<T>[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { AutosuggestProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CAutosuggestProps<T extends FieldValues> extends Omit<AutosuggestProps, "value"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const CAutosuggest: <T extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CAutosuggestProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CardsProps } from '@cloudscape-design/components';
|
|
2
2
|
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
-
export interface ControlledCardsProps<T extends FieldValues> extends Omit<Required<Pick<CardsProps,
|
|
3
|
+
export interface ControlledCardsProps<T extends FieldValues> extends Omit<Required<Pick<CardsProps, "trackBy">> & Required<Pick<CardsProps, "selectionType">> & CardsProps, "value"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
shouldUnregister?: boolean;
|
|
7
7
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
8
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
8
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
9
9
|
}
|
|
10
10
|
export declare const CCards: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onSelectionChange, ...props }: ControlledCardsProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default CCards;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { CheckboxProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CCheckboxProps<T extends FieldValues> extends Omit<CheckboxProps, "checked"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CCheckbox: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onChange, ...props }: CCheckboxProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { CodeEditorProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CCodeEditorProps<T extends FieldValues> extends Omit<CodeEditorProps, "value"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CCodeEditor: <TFieldValues extends FieldValues>({ name, control, onChange, defaultValue, rules, shouldUnregister, ...props }: CCodeEditorProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { DatePickerProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CDatePickerProps<T extends FieldValues> extends Omit<DatePickerProps, "value"> {
|
|
4
4
|
name: FieldPath<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
|
-
onBlur?: DatePickerProps[
|
|
10
|
-
onChange?: DatePickerProps[
|
|
9
|
+
onBlur?: DatePickerProps["onBlur"];
|
|
10
|
+
onChange?: DatePickerProps["onChange"];
|
|
11
11
|
}
|
|
12
12
|
declare const CDatePicker: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CDatePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export default CDatePicker;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DateRangePickerProps } from '@cloudscape-design/components';
|
|
2
2
|
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
-
export interface CDateRangePickerProps<T extends FieldValues> extends Omit<DateRangePickerProps,
|
|
3
|
+
export interface CDateRangePickerProps<T extends FieldValues> extends Omit<DateRangePickerProps, "value"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CDateRangePicker: <TFieldValues extends FieldValues>({ name, control, onBlur, onChange, defaultValue, rules, shouldUnregister, ...props }: CDateRangePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FileUploadProps } from '@cloudscape-design/components';
|
|
2
2
|
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
3
|
-
export interface ControlledFileUploadProps<T extends FieldValues> extends Omit<FileUploadProps,
|
|
3
|
+
export interface ControlledFileUploadProps<T extends FieldValues> extends Omit<FileUploadProps, "value"> {
|
|
4
4
|
name: FieldPath<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const CFileUpload: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onChange, ...props }: ControlledFileUploadProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { InputProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CInputProps<T extends FieldValues> extends Omit<InputProps, "value"> {
|
|
4
4
|
name: FieldPath<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CInput: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { MultiselectProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface ControlledMultiselectProps<T extends FieldValues> extends Omit<MultiselectProps, "selectedOptions"> {
|
|
4
4
|
name: FieldPath<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
options?: MultiselectProps.Options;
|
|
7
7
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
8
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
8
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
9
9
|
shouldUnregister?: boolean;
|
|
10
10
|
}
|
|
11
11
|
declare const CMultiselect: <TFieldValues extends FieldValues>({ name, control, options, defaultValue, rules, onBlur, onChange, shouldUnregister, ...props }: ControlledMultiselectProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { PropertyFilterProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface ControlledPropertyFilterProps<T extends FieldValues> extends Omit<PropertyFilterProps, "query" | "onChange"> {
|
|
4
4
|
name: FieldPath<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const CPropertyFilter: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, ...props }: ControlledPropertyFilterProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { RadioGroupProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CRadioGroupProps<T extends FieldValues> extends Omit<RadioGroupProps, "value"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CRadioGroup: <TFieldValues extends FieldValues>({ name, control, onChange, rules, defaultValue, shouldUnregister, ...props }: CRadioGroupProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { S3ResourceSelectorProps } from '@cloudscape-design/components';
|
|
2
2
|
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
3
|
-
export interface ControlledS3ResourceSelectorProps<T extends FieldValues> extends Omit<S3ResourceSelectorProps,
|
|
3
|
+
export interface ControlledS3ResourceSelectorProps<T extends FieldValues> extends Omit<S3ResourceSelectorProps, "resource"> {
|
|
4
4
|
name: FieldPath<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const CS3ResourceSelector: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onChange, ...props }: ControlledS3ResourceSelectorProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { SelectProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CSelectProps<T extends FieldValues> extends Omit<SelectProps, "selectedOption"> {
|
|
4
4
|
name: FieldPath<T>;
|
|
5
5
|
control: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CSelect: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CSelectProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { NonCancelableCustomEvent, SliderProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CSliderProps<T extends FieldValues> extends Omit<SliderProps, "value" | "onChange"> {
|
|
4
4
|
name: FieldPath<T>;
|
|
5
5
|
control: Control<T>;
|
|
6
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
6
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
7
7
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
onChange?: (event: NonCancelableCustomEvent<SliderProps.ChangeDetail>) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { TagEditorProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CTagEditorProps<T extends FieldValues> extends Omit<TagEditorProps, "tags"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CTagEditor: <TFieldValues extends FieldValues>({ name, control, onChange, defaultValue, rules, shouldUnregister, ...props }: CTagEditorProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { TextFilterProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CTextFilterProps<T extends FieldValues> extends Omit<TextFilterProps, "filteringText"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CTextFilter: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onChange, ...props }: CTextFilterProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TextareaProps } from '@cloudscape-design/components';
|
|
2
2
|
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
-
export interface CTextareaProps<T extends FieldValues> extends Omit<TextareaProps,
|
|
3
|
+
export interface CTextareaProps<T extends FieldValues> extends Omit<TextareaProps, "value"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CTextarea: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CTextareaProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { TilesProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CTilesProps<T extends FieldValues> extends Omit<TilesProps, "value"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CTiles: <TFieldValues extends FieldValues>({ name, control, onChange, defaultValue, rules, shouldUnregister, ...props }: CTilesProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { TimeInputProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CTimeInputProps<T extends FieldValues> extends Omit<TimeInputProps, "value"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control?: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CTimeInput: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onBlur, onChange, ...props }: CTimeInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
2
1
|
import { ToggleProps } from '@cloudscape-design/components';
|
|
3
|
-
|
|
2
|
+
import { Control, FieldPath, FieldPathValue, FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
|
+
export interface CToggleProps<T extends FieldValues> extends Omit<ToggleProps, "checked"> {
|
|
4
4
|
name: Path<T>;
|
|
5
5
|
control: Control<T>;
|
|
6
6
|
defaultValue?: FieldPathValue<T, FieldPath<T>>;
|
|
7
|
-
rules?: Omit<RegisterOptions<T, FieldPath<T>>,
|
|
7
|
+
rules?: Omit<RegisterOptions<T, FieldPath<T>>, "valueAsNumber" | "valueAsDate" | "setValueAs" | "disabled">;
|
|
8
8
|
shouldUnregister?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare const CToggle: <TFieldValues extends FieldValues>({ name, control, defaultValue, rules, shouldUnregister, onChange, ...props }: CToggleProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-hook-form-cloudscape",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"description": "A React Hook Form wrapper designed for effortless integration of validations into Cloudscape forms and inputs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -33,7 +33,9 @@
|
|
|
33
33
|
"build": "npm run clean && npm run test:coverage && vite build",
|
|
34
34
|
"clean": "rm -rf dist/ index.d.ts index.js index.js.map components/ react-hook-form-cloudscape.es.js react-hook-form-cloudscape.es.js.map react-hook-form-cloudscape.umd.js react-hook-form-cloudscape.umd.js.map",
|
|
35
35
|
"dry-run": "npx semantic-release --dry-run > dry-run-output.txt",
|
|
36
|
-
"
|
|
36
|
+
"format": "prettier --write .",
|
|
37
|
+
"lint": "eslint .",
|
|
38
|
+
"lint:fix": "eslint . --fix",
|
|
37
39
|
"prepare": "husky",
|
|
38
40
|
"test": "vitest",
|
|
39
41
|
"test:coverage": "vitest run --coverage"
|
|
@@ -62,6 +64,7 @@
|
|
|
62
64
|
"@vitest/coverage-v8": "^3.1.2",
|
|
63
65
|
"eslint": "^9.27.0",
|
|
64
66
|
"eslint-config-prettier": "^10.1.5",
|
|
67
|
+
"eslint-plugin-import": "^2.31.0",
|
|
65
68
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
66
69
|
"eslint-plugin-package-json": "^0.31.0",
|
|
67
70
|
"eslint-plugin-react": "^7.37.5",
|
|
@@ -1054,7 +1054,15 @@ const zr = ({
|
|
|
1054
1054
|
control: f,
|
|
1055
1055
|
defaultValue: d,
|
|
1056
1056
|
name: u,
|
|
1057
|
-
render: ({ field: { onChange: n, value: a } }) => /* @__PURE__ */ h.jsx(
|
|
1057
|
+
render: ({ field: { onChange: n, value: a } }) => /* @__PURE__ */ h.jsx(
|
|
1058
|
+
Pr,
|
|
1059
|
+
{
|
|
1060
|
+
items: l.items,
|
|
1061
|
+
value: a,
|
|
1062
|
+
onChange: p.bind(null, n),
|
|
1063
|
+
...l
|
|
1064
|
+
}
|
|
1065
|
+
),
|
|
1058
1066
|
rules: c,
|
|
1059
1067
|
shouldUnregister: t
|
|
1060
1068
|
}
|
|
@@ -1382,7 +1390,16 @@ const zr = ({
|
|
|
1382
1390
|
control: f,
|
|
1383
1391
|
defaultValue: s,
|
|
1384
1392
|
name: u,
|
|
1385
|
-
render: ({ field: { ref: n, onChange: a, value: i = !1 } }) => /* @__PURE__ */ h.jsx(
|
|
1393
|
+
render: ({ field: { ref: n, onChange: a, value: i = !1 } }) => /* @__PURE__ */ h.jsx(
|
|
1394
|
+
Wr,
|
|
1395
|
+
{
|
|
1396
|
+
ref: n,
|
|
1397
|
+
checked: i,
|
|
1398
|
+
name: u,
|
|
1399
|
+
onChange: p.bind(null, a),
|
|
1400
|
+
...l
|
|
1401
|
+
}
|
|
1402
|
+
),
|
|
1386
1403
|
rules: c,
|
|
1387
1404
|
shouldUnregister: d
|
|
1388
1405
|
}
|