@jobber/components-native 0.91.3 → 0.91.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/dist/package.json +2 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/src/Form/context/types.d.ts +2 -2
- package/dist/types/src/Form/hooks/useInternalForm.d.ts +2 -2
- package/dist/types/src/Menu/types.d.ts +1 -1
- package/package.json +2 -2
- package/src/Form/context/types.ts +2 -2
- package/src/Form/hooks/useInternalForm.ts +2 -2
- package/src/Menu/types.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
2
|
import type { DeepPartial, FieldValues, UseFormReturn } from "react-hook-form";
|
|
3
3
|
export interface UseConfirmBeforeBackProps {
|
|
4
4
|
alwaysPreventBack: boolean;
|
|
@@ -16,7 +16,7 @@ interface LocalCacheOptions {
|
|
|
16
16
|
readonly id?: string | string[];
|
|
17
17
|
}
|
|
18
18
|
export interface AtlantisFormContextProps {
|
|
19
|
-
useConfirmBeforeBack: (props: UseConfirmBeforeBackProps) =>
|
|
19
|
+
useConfirmBeforeBack: (props: UseConfirmBeforeBackProps) => RefObject<() => void>;
|
|
20
20
|
useInternalFormLocalCache: <TData extends FieldValues>(formMethods: UseFormReturn<TData>, cacheKey?: string, options?: LocalCacheOptions) => {
|
|
21
21
|
setLocalCache: (data: DeepPartial<TData>) => void;
|
|
22
22
|
removeLocalCache: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DeepPartial, FieldValues, UseFormHandleSubmit, UseFormReturn } from "react-hook-form";
|
|
2
|
-
import type {
|
|
2
|
+
import type { RefObject } from "react";
|
|
3
3
|
import type { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
4
4
|
import type { InternalFormProps } from "../types";
|
|
5
5
|
type UseInternalFormProps<T extends FieldValues, SubmitResponseType> = Pick<InternalFormProps<T, SubmitResponseType>, "mode" | "reValidateMode" | "initialValues" | "formRef" | "localCacheKey" | "localCacheExclude" | "localCacheId" | "UNSAFE_allowDiscardLocalCacheWhenOffline"> & {
|
|
@@ -12,7 +12,7 @@ interface UseInternalForm<T extends FieldValues> {
|
|
|
12
12
|
readonly handleSubmit: UseFormHandleSubmit<T>;
|
|
13
13
|
readonly isSubmitting: boolean;
|
|
14
14
|
readonly isDirty: boolean;
|
|
15
|
-
readonly removeListenerRef:
|
|
15
|
+
readonly removeListenerRef: RefObject<() => void>;
|
|
16
16
|
readonly setLocalCache: (data: DeepPartial<T>) => void;
|
|
17
17
|
}
|
|
18
18
|
export declare function useInternalForm<T extends FieldValues, SubmitResponseType>({ mode, reValidateMode, initialValues, formRef, localCacheKey, localCacheId, scrollViewRef, saveButtonHeight, messageBannerHeight, UNSAFE_allowDiscardLocalCacheWhenOffline, }: UseInternalFormProps<T, SubmitResponseType>): UseInternalForm<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IconColorNames, IconNames } from "@jobber/design";
|
|
2
1
|
import type { ReactElement } from "react";
|
|
2
|
+
import type { IconColorNames, IconNames } from "@jobber/design";
|
|
3
3
|
import type { TextAlign } from "../Typography";
|
|
4
4
|
export interface MenuOptionProps {
|
|
5
5
|
readonly label: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.91.
|
|
3
|
+
"version": "0.91.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"react-native-safe-area-context": "^5.4.0",
|
|
95
95
|
"react-native-svg": ">=12.0.0"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "953deb18e2cf5a920ab5e23295e15aefd3865c0f"
|
|
98
98
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
2
|
import type { DeepPartial, FieldValues, UseFormReturn } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
export interface UseConfirmBeforeBackProps {
|
|
@@ -21,7 +21,7 @@ interface LocalCacheOptions {
|
|
|
21
21
|
export interface AtlantisFormContextProps {
|
|
22
22
|
useConfirmBeforeBack: (
|
|
23
23
|
props: UseConfirmBeforeBackProps,
|
|
24
|
-
) =>
|
|
24
|
+
) => RefObject<() => void>;
|
|
25
25
|
useInternalFormLocalCache: <TData extends FieldValues>(
|
|
26
26
|
formMethods: UseFormReturn<TData>,
|
|
27
27
|
cacheKey?: string,
|
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
UseFormReturn,
|
|
6
6
|
} from "react-hook-form";
|
|
7
7
|
import { useForm } from "react-hook-form";
|
|
8
|
-
import type {
|
|
8
|
+
import type { RefObject } from "react";
|
|
9
9
|
import type { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
10
10
|
import { useAtlantisContext } from "../../AtlantisContext";
|
|
11
11
|
import { useAtlantisFormContext } from "../context/AtlantisFormContext";
|
|
@@ -32,7 +32,7 @@ interface UseInternalForm<T extends FieldValues> {
|
|
|
32
32
|
readonly handleSubmit: UseFormHandleSubmit<T>;
|
|
33
33
|
readonly isSubmitting: boolean;
|
|
34
34
|
readonly isDirty: boolean;
|
|
35
|
-
readonly removeListenerRef:
|
|
35
|
+
readonly removeListenerRef: RefObject<() => void>;
|
|
36
36
|
readonly setLocalCache: (data: DeepPartial<T>) => void;
|
|
37
37
|
}
|
|
38
38
|
|
package/src/Menu/types.ts
CHANGED