@jobber/components-native 0.67.3-JOB-57717.2 → 0.67.3
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 +3 -3
- package/dist/src/InputDate/InputDate.js +1 -2
- package/dist/src/InputTime/InputTime.js +1 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/InputDate/InputDate.test.tsx +0 -8
- package/src/InputDate/InputDate.tsx +1 -2
- package/src/InputTime/InputTime.test.tsx +0 -8
- package/src/InputTime/InputTime.tsx +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.67.3
|
|
3
|
+
"version": "0.67.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@jobber/design": "^0.60.1",
|
|
40
|
-
"@jobber/hooks": "^2.9.
|
|
40
|
+
"@jobber/hooks": "^2.9.8",
|
|
41
41
|
"@react-native-clipboard/clipboard": "^1.11.2",
|
|
42
42
|
"@react-native-picker/picker": "^2.4.10",
|
|
43
43
|
"autolinker": "^4.0.0",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"react-native-safe-area-context": "^4.5.2",
|
|
85
85
|
"react-native-svg": ">=12.0.0"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "d589b2ab8c2f8e23a879f1fd3db475f035721749"
|
|
88
88
|
}
|
|
@@ -2,13 +2,10 @@ import React from "react";
|
|
|
2
2
|
import { fireEvent, render, waitFor } from "@testing-library/react-native";
|
|
3
3
|
import { Host } from "react-native-portalize";
|
|
4
4
|
import { FormProvider, useForm } from "react-hook-form";
|
|
5
|
-
import { Keyboard } from "react-native";
|
|
6
5
|
import { InputDate } from "./InputDate";
|
|
7
6
|
import { Button } from "../Button";
|
|
8
7
|
import * as atlantisContext from "../AtlantisContext/AtlantisContext";
|
|
9
8
|
|
|
10
|
-
const keyboardDismissSpy = jest.spyOn(Keyboard, "dismiss");
|
|
11
|
-
|
|
12
9
|
describe("InputDate", () => {
|
|
13
10
|
describe("Visuals", () => {
|
|
14
11
|
const placeholder = "Start time";
|
|
@@ -137,11 +134,6 @@ describe("InputDate", () => {
|
|
|
137
134
|
fireEvent.press(screen.getByLabelText("Confirm"));
|
|
138
135
|
expect(handleChange).toHaveBeenCalledWith(expect.any(Date));
|
|
139
136
|
});
|
|
140
|
-
|
|
141
|
-
it("should dismiss the keyboard when the date picker is opened", () => {
|
|
142
|
-
renderDatePicker();
|
|
143
|
-
expect(keyboardDismissSpy).toHaveBeenCalled();
|
|
144
|
-
});
|
|
145
137
|
});
|
|
146
138
|
const mockOnSubmit = jest.fn();
|
|
147
139
|
const saveButtonText = "Submit";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo, useState } from "react";
|
|
2
2
|
import DateTimePicker from "react-native-modal-datetime-picker";
|
|
3
|
-
import {
|
|
3
|
+
import { Platform } from "react-native";
|
|
4
4
|
import { FieldError, UseControllerProps } from "react-hook-form";
|
|
5
5
|
import { XOR } from "ts-xor";
|
|
6
6
|
import { Clearable } from "@jobber/hooks";
|
|
@@ -204,7 +204,6 @@ function InternalInputDate({
|
|
|
204
204
|
);
|
|
205
205
|
|
|
206
206
|
function showDatePicker() {
|
|
207
|
-
Keyboard.dismiss();
|
|
208
207
|
setShowPicker(true);
|
|
209
208
|
}
|
|
210
209
|
|
|
@@ -2,12 +2,10 @@ import React from "react";
|
|
|
2
2
|
import { fireEvent, render, waitFor } from "@testing-library/react-native";
|
|
3
3
|
import { Host } from "react-native-portalize";
|
|
4
4
|
import { FormProvider, useForm } from "react-hook-form";
|
|
5
|
-
import { Keyboard } from "react-native";
|
|
6
5
|
import { InputTime } from "./InputTime";
|
|
7
6
|
import * as atlantisContext from "../AtlantisContext/AtlantisContext";
|
|
8
7
|
import { Button } from "../Button";
|
|
9
8
|
|
|
10
|
-
const keyboardDismissSpy = jest.spyOn(Keyboard, "dismiss");
|
|
11
9
|
afterEach(() => {
|
|
12
10
|
jest.spyOn(atlantisContext, "useAtlantisContext").mockRestore();
|
|
13
11
|
});
|
|
@@ -104,7 +102,6 @@ describe("With emptyValueLabel", () => {
|
|
|
104
102
|
});
|
|
105
103
|
});
|
|
106
104
|
|
|
107
|
-
// eslint-disable-next-line max-statements
|
|
108
105
|
describe("Time picker", () => {
|
|
109
106
|
const placeholder = "Tap me";
|
|
110
107
|
const handleChange = jest.fn();
|
|
@@ -146,11 +143,6 @@ describe("Time picker", () => {
|
|
|
146
143
|
expect(handleChange).toHaveBeenCalledWith(expect.any(Date));
|
|
147
144
|
});
|
|
148
145
|
|
|
149
|
-
it("should dismiss the keyboard when the time picker is opened", () => {
|
|
150
|
-
renderTimePicker();
|
|
151
|
-
expect(keyboardDismissSpy).toHaveBeenCalled();
|
|
152
|
-
});
|
|
153
|
-
|
|
154
146
|
it("should be a time picker", () => {
|
|
155
147
|
const screen = renderTimePicker();
|
|
156
148
|
expect(screen.getByTestId("inputTime-Picker").props.mode).toBe("time");
|
|
@@ -2,7 +2,7 @@ import React, { useMemo, useState } from "react";
|
|
|
2
2
|
import { FieldError, UseControllerProps } from "react-hook-form";
|
|
3
3
|
import { XOR } from "ts-xor";
|
|
4
4
|
import DateTimePicker from "react-native-modal-datetime-picker";
|
|
5
|
-
import {
|
|
5
|
+
import { View } from "react-native";
|
|
6
6
|
import { Clearable } from "@jobber/hooks";
|
|
7
7
|
import { styles } from "./InputTime.style";
|
|
8
8
|
import { getTimeZoneOffsetInMinutes, roundUpToNearestMinutes } from "./utils";
|
|
@@ -182,7 +182,6 @@ function InternalInputTime({
|
|
|
182
182
|
);
|
|
183
183
|
|
|
184
184
|
function showDatePicker() {
|
|
185
|
-
Keyboard.dismiss();
|
|
186
185
|
setShowPicker(true);
|
|
187
186
|
}
|
|
188
187
|
|