indicator-ui 1.0.42 → 1.0.44
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/dist/index.cjs +8 -8
- package/dist/index.js +3702 -3708
- package/dist/types/src/hooks/forms/lib/fieldsProps.d.ts +1 -1
- package/dist/types/src/hooks/forms/types/scheme.d.ts +5 -4
- package/dist/types/src/hooks/forms/useForm.d.ts +2 -2
- package/dist/types/src/hooks/useResettableTimeout.d.ts +7 -2
- package/dist/types/src/ui/formFields/FormPaginatedSelectField/hooks/useComponentProps.d.ts +1 -1
- package/package.json +1 -1
|
@@ -8,5 +8,5 @@ type PropsType<T, P extends FormPath<T>> = {
|
|
|
8
8
|
formErrors: FormError<T>;
|
|
9
9
|
highlightField: (path: P) => void;
|
|
10
10
|
};
|
|
11
|
-
export declare function getFieldPropsType<T, P extends FormPath<T>>(props: PropsType<T, P>): FieldPropsType<FormValue<T, P
|
|
11
|
+
export declare function getFieldPropsType<T, P extends FormPath<T>>(props: PropsType<T, P>): FieldPropsType<FormValue<T, P>, 'update'>;
|
|
12
12
|
export {};
|
|
@@ -152,10 +152,11 @@ export type FieldConfigType<T, F> = DefaultValueConfig<T, F> & BaseFieldValidato
|
|
|
152
152
|
export type FormSchemeType<T> = Nullable<Undefinable<T>> extends infer Form ? {
|
|
153
153
|
[K in ExtendFormPath<Form>]?: FieldConfigType<Form, ExtendFormValue<Form, K>>;
|
|
154
154
|
} : never;
|
|
155
|
-
export type
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
export type FieldChangeMode = 'change' | 'update';
|
|
156
|
+
export type FieldOnChange<V, M extends FieldChangeMode> = M extends 'change' ? (action?: V | null) => void : (action: SetStateAction<V | undefined | null>) => void;
|
|
157
|
+
export type FieldPropsType<V, M extends FieldChangeMode = 'change'> = {
|
|
158
|
+
value?: V | undefined | null;
|
|
159
|
+
onChange?: FieldOnChange<V, M>;
|
|
159
160
|
error?: FormErrorType;
|
|
160
161
|
onBlur?: (event?: FocusEvent) => void;
|
|
161
162
|
};
|
|
@@ -233,8 +233,8 @@ export declare function useForm<Form, T extends Nullable<Undefinable<Form>> = Nu
|
|
|
233
233
|
clearErrors: () => void;
|
|
234
234
|
clearField: (_path: FormPath<T> | FormPath<T>[]) => void;
|
|
235
235
|
register: {
|
|
236
|
-
(): FieldPropsType<FormValue<T, ""
|
|
237
|
-
<P extends FormPath<T>>(path: P, config?: FormSchemeType<T>[P]): FieldPropsType<FormValue<T, P
|
|
236
|
+
(): FieldPropsType<FormValue<T, "">, "update">;
|
|
237
|
+
<P extends FormPath<T>>(path: P, config?: FormSchemeType<T>[P]): FieldPropsType<FormValue<T, P>, "update">;
|
|
238
238
|
};
|
|
239
239
|
registerForm: (refsInstance?: FormInstance) => Pick<React.ComponentProps<"form">, "onSubmit" | "onReset" | "noValidate" | "ref"> & Pick<InstanceRefAttributes<React.ComponentRef<"form">>, "instanceRef">;
|
|
240
240
|
getValidForm: () => Promise<Form | null>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
1
|
+
type Callback = () => any;
|
|
2
|
+
type Timeout = number;
|
|
3
|
+
type Options = {
|
|
4
|
+
initExecute?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type PropsType = [fun: Callback, timeout: Timeout, opt?: Options];
|
|
7
|
+
export declare function useResettableTimeout(...args: PropsType): void;
|
|
3
8
|
export {};
|
|
@@ -5,7 +5,7 @@ import { useSearching } from './useSearching';
|
|
|
5
5
|
import { useOptionsManagement } from './useOptionsManagement';
|
|
6
6
|
import { useValueBuffer } from './useValueBuffer';
|
|
7
7
|
import { useWrapperServices } from './useWrapperServices';
|
|
8
|
-
type PropsType<D, M extends boolean> = Pick<ReturnType<typeof useModalServices>, 'isShow'> & Pick<ReturnType<typeof useSearching<D, M>>, 'searchString' | 'canSearch'> & Pick<ReturnType<typeof useOptionsManagement<D, M>>, 'options'> & Pick<ReturnType<typeof useWrapperServices>, 'blurWrapper'> & Pick<ReturnType<typeof useValueBuffer<D, M>>, 'bufValueOptions'> & Pick<FieldPropsType<ValueType<D, M>>, 'value' | 'onChange'
|
|
8
|
+
type PropsType<D, M extends boolean> = Pick<ReturnType<typeof useModalServices>, 'isShow'> & Pick<ReturnType<typeof useSearching<D, M>>, 'searchString' | 'canSearch'> & Pick<ReturnType<typeof useOptionsManagement<D, M>>, 'options'> & Pick<ReturnType<typeof useWrapperServices>, 'blurWrapper'> & Pick<ReturnType<typeof useValueBuffer<D, M>>, 'bufValueOptions'> & Pick<FieldPropsType<ValueType<D, M>>, 'value' | 'onChange'> & {
|
|
9
9
|
maxCount?: number;
|
|
10
10
|
multiple: M;
|
|
11
11
|
};
|