@jobber/components-native 0.43.0 → 0.43.1-pre.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/consumerSetup.js +41 -0
- package/dist/src/Form/context/AtlantisFormContext.js +0 -1
- package/dist/src/Form/hooks/useScreenInformation.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/Form/context/AtlantisFormContext.d.ts +0 -1
- package/dist/types/src/Form/context/types.d.ts +0 -1
- package/package.json +10 -9
- package/src/Form/context/AtlantisFormContext.tsx +0 -1
- package/src/Form/context/types.ts +0 -1
- package/src/Form/hooks/useScreenInformation.ts +2 -2
package/consumerSetup.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Not used right now but something like this may be needed
|
|
2
|
+
// jest.mock("react-native-localize", () => {
|
|
3
|
+
// const mockRNLocalize = jest.requireActual("react-native-localize");
|
|
4
|
+
// return {
|
|
5
|
+
// ...mockRNLocalize,
|
|
6
|
+
// getTimeZone: () => "UTC",
|
|
7
|
+
// };
|
|
8
|
+
// });
|
|
9
|
+
|
|
10
|
+
require("react-native-reanimated/lib/reanimated2/jestUtils").setUpTests();
|
|
11
|
+
|
|
12
|
+
// jest.mock("react-native-reanimated", () => {
|
|
13
|
+
// const reanimated = require("react-native-reanimated/mock");
|
|
14
|
+
// const timing = () => ({ start: () => undefined });
|
|
15
|
+
// return {
|
|
16
|
+
// ...reanimated,
|
|
17
|
+
// default: {
|
|
18
|
+
// ...reanimated.default,
|
|
19
|
+
// timing,
|
|
20
|
+
// // The mock for `call` immediately calls the callback which is incorrect
|
|
21
|
+
// // So we override it with a no-op
|
|
22
|
+
// call: () => undefined,
|
|
23
|
+
// },
|
|
24
|
+
// timing,
|
|
25
|
+
// FadeIn: {
|
|
26
|
+
// duration: () => undefined,
|
|
27
|
+
// },
|
|
28
|
+
// };
|
|
29
|
+
// });
|
|
30
|
+
jest.mock("react-native/Libraries/Animated/NativeAnimatedHelper");
|
|
31
|
+
|
|
32
|
+
// jest.mock("react-native-uuid", () => {
|
|
33
|
+
// let count = 0;
|
|
34
|
+
// const finalSection = 426655440000;
|
|
35
|
+
|
|
36
|
+
// function fakeUUID() {
|
|
37
|
+
// count += 1;
|
|
38
|
+
// return `123e4567-e89b-12d3-a456-${finalSection + count}`;
|
|
39
|
+
// }
|
|
40
|
+
// return { v1: fakeUUID, v4: fakeUUID };
|
|
41
|
+
// });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useWindowDimensions } from "react-native";
|
|
2
2
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
3
3
|
import { KEYBOARD_TOP_PADDING_AUTO_SCROLL } from "../constants";
|
|
4
|
-
import {
|
|
4
|
+
import { useAtlantisContext } from "../../AtlantisContext";
|
|
5
5
|
export function useScreenInformation() {
|
|
6
|
-
const { headerHeight } =
|
|
6
|
+
const { headerHeight } = useAtlantisContext();
|
|
7
7
|
const windowHeight = useWindowDimensions().height;
|
|
8
8
|
const headerHeightWithPadding = headerHeight + KEYBOARD_TOP_PADDING_AUTO_SCROLL;
|
|
9
9
|
const insets = useSafeAreaInsets();
|