@jobber/components-native 0.113.5 → 0.113.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.113.5",
3
+ "version": "0.113.6",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -67,13 +67,13 @@
67
67
  "react-intl": "^7.1.11",
68
68
  "react-native-keyboard-controller": "^1.20.7",
69
69
  "react-native-toast-message": "^2.1.6",
70
- "react-native-uuid": "^1.4.9",
70
+ "react-native-uuid": "^2.0.4",
71
71
  "ts-xor": "^1.1.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@babel/runtime": "^7.29.2",
75
75
  "@gorhom/bottom-sheet": "^5.2.8",
76
- "@jobber/design": "0.111.0",
76
+ "@jobber/design": "0.112.0",
77
77
  "@jobber/hooks": "2.21.1",
78
78
  "@react-native-community/datetimepicker": "^8.4.5",
79
79
  "@react-native/babel-preset": "^0.82.1",
@@ -86,7 +86,6 @@
86
86
  "@types/lodash.debounce": "^4.0.7",
87
87
  "@types/lodash.identity": "^3.0.7",
88
88
  "@types/node": "^22.19.17",
89
- "@types/react-native-uuid": "^1.4.0",
90
89
  "@types/react-test-renderer": "19.1.0",
91
90
  "date-fns": "^2.30.0",
92
91
  "date-fns-tz": "^2.0.0",
@@ -124,5 +123,5 @@
124
123
  "react-native-screens": ">=4.18.0",
125
124
  "react-native-svg": ">=12.0.0"
126
125
  },
127
- "gitHead": "a39de5621289f06a4d21d021130ff191937cd851"
126
+ "gitHead": "e730613f3ba3851d31e78cbae08a8b832a1605d5"
128
127
  }
@@ -1,9 +1,9 @@
1
1
  import { useState } from "react";
2
- import { v1 } from "react-native-uuid";
2
+ import uuid from "react-native-uuid";
3
3
 
4
4
  export function useTokenGenerator(): [() => string, RegExp] {
5
5
  let counter = 0;
6
- const [identifier] = useState(v1());
6
+ const [identifier] = useState(uuid.v1());
7
7
 
8
8
  return [
9
9
  () => `@__ELEMENT-${identifier}-${counter++}__@`,
@@ -2,7 +2,7 @@ import type { ReactNode } from "react";
2
2
  import React, { useEffect, useRef } from "react";
3
3
  import type { ViewStyle } from "react-native";
4
4
  import { View } from "react-native";
5
- import { v4 } from "react-native-uuid";
5
+ import uuid from "react-native-uuid";
6
6
  import { useErrorMessageContext } from "./context";
7
7
  import { useStyles } from "./ErrorMessageWrapper.style";
8
8
  import { Icon } from "../Icon";
@@ -39,7 +39,7 @@ export function ErrorMessageWrapper({
39
39
  const register = errorMessageContext?.register;
40
40
  const unregister = errorMessageContext?.unregister;
41
41
  const a11yMessageRef = useRef<View>(null);
42
- const { current: uuid } = useRef(v4());
42
+ const { current: id } = useRef(uuid.v4());
43
43
 
44
44
  const hasErrorMessage = Boolean(message);
45
45
 
@@ -51,13 +51,13 @@ export function ErrorMessageWrapper({
51
51
  };
52
52
  useEffect(() => {
53
53
  if (register) {
54
- register({ id: uuid, ref: a11yMessageRef, hasErrorMessage });
54
+ register({ id, ref: a11yMessageRef, hasErrorMessage });
55
55
  }
56
56
 
57
57
  if (unregister) {
58
- return () => unregister(uuid);
58
+ return () => unregister(id);
59
59
  }
60
- }, [uuid, hasErrorMessage, register, unregister]);
60
+ }, [id, hasErrorMessage, register, unregister]);
61
61
 
62
62
  return (
63
63
  <View style={[styles.wrapper]}>
@@ -1,4 +1,4 @@
1
- import { v4 } from "react-native-uuid";
1
+ import uuid from "react-native-uuid";
2
2
  import type { File, FileUpload } from "../../types";
3
3
  import { StatusCode } from "../../types";
4
4
 
@@ -13,7 +13,7 @@ export const FILE_UPLOAD_MOCK_FILE = ({
13
13
  batchCount: 1,
14
14
  batchId: "FILES",
15
15
  },
16
- uuid: v4(),
16
+ uuid: uuid.v4(),
17
17
  key: "path/test.txt",
18
18
  name: "test.txt",
19
19
  size: 1,
@@ -38,7 +38,7 @@ export const FILE_UPLOAD_MOCK_IMAGE = ({
38
38
  batchCount: 1,
39
39
  batchId: "IMAGES",
40
40
  },
41
- uuid: v4(),
41
+ uuid: uuid.v4(),
42
42
  key: "path/test.png",
43
43
  name: "test.png",
44
44
  size: size || 1,
@@ -61,7 +61,7 @@ export const FILE_UPLOAD_MOCK_PDF = ({
61
61
  batchCount: 1,
62
62
  batchId: "FILES",
63
63
  },
64
- uuid: v4(),
64
+ uuid: uuid.v4(),
65
65
  key: "path/test.pdf",
66
66
  name: "test.pdf",
67
67
  size: 1,
@@ -8,7 +8,7 @@ import {
8
8
  View,
9
9
  useColorScheme,
10
10
  } from "react-native";
11
- import { v4 } from "react-native-uuid";
11
+ import uuid from "react-native-uuid";
12
12
  import { InputAccessoriesContext } from "./InputAccessoriesContext";
13
13
  import { useStyles } from "./InputAccessoriesProvider.style";
14
14
 
@@ -17,7 +17,7 @@ export function InputAccessoriesProvider({
17
17
  }: {
18
18
  readonly children: ReactNode;
19
19
  }) {
20
- const inputAccessoryID = useRef(v4()).current;
20
+ const inputAccessoryID = useRef(uuid.v4()).current;
21
21
  const {
22
22
  focusedInput,
23
23
  setFocusedInput,
@@ -1,4 +1,4 @@
1
- import { v1 } from "react-native-uuid";
1
+ import uuid from "react-native-uuid";
2
2
  import type {
3
3
  FieldError,
4
4
  RegisterOptions,
@@ -54,7 +54,7 @@ export function useFormController<T>({
54
54
  }
55
55
 
56
56
  function useControlName(name?: string): UseControllerReturn["field"]["name"] {
57
- const [identifier] = useState(v1());
57
+ const [identifier] = useState(uuid.v1());
58
58
  const prefix = `generatedName--${identifier}`;
59
59
 
60
60
  return `${name || prefix}` as const;