@jobber/components-native 0.87.1 → 0.88.1-JOB-139048-04134dd.0
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 +15 -16
- package/dist/src/Button/components/InternalButtonLoading/InternalButtonLoading.js +0 -1
- package/dist/src/ContentOverlay/ContentOverlay.js +2 -2
- package/dist/src/ContentOverlay/UNSAFE_WrappedModalize.js +27 -0
- package/dist/src/ContentOverlay/index.js +1 -0
- package/dist/src/utils/meta/meta.json +2 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/src/ContentOverlay/ContentOverlay.d.ts +1 -1
- package/dist/types/src/ContentOverlay/UNSAFE_WrappedModalize.d.ts +3 -0
- package/dist/types/src/ContentOverlay/index.d.ts +1 -0
- package/dist/types/src/InputText/InputText.d.ts +2 -2
- package/package.json +15 -16
- package/src/AtlantisContext/AtlantisContext.test.tsx +1 -1
- package/src/AutoLink/AutoLink.test.tsx +2 -4
- package/src/Button/components/InternalButtonLoading/InternalButtonLoading.tsx +0 -1
- package/src/Checkbox/CheckboxGroup.test.tsx +2 -6
- package/src/ContentOverlay/ContentOverlay.test.tsx +30 -23
- package/src/ContentOverlay/ContentOverlay.tsx +4 -3
- package/src/ContentOverlay/UNSAFE_WrappedModalize.tsx +45 -0
- package/src/ContentOverlay/hooks/useKeyboardVisibility.test.ts +1 -1
- package/src/ContentOverlay/hooks/useViewLayoutHeight.test.ts +1 -1
- package/src/ContentOverlay/index.ts +1 -0
- package/src/EmptyState/EmptyState.test.tsx +29 -42
- package/src/Form/components/FormMessage/FormMessage.test.tsx +40 -27
- package/src/Form/context/AtlantisFormContext.test.tsx +1 -1
- package/src/Form/hooks/useScrollToError/useScrollToError.test.tsx +2 -1
- package/src/FormatFile/FormatFile.test.tsx +6 -6
- package/src/Icon/__snapshots__/Icon.test.tsx.snap +7 -0
- package/src/InputFieldWrapper/components/Prefix/Prefix.test.tsx +5 -11
- package/src/InputText/InputText.tsx +2 -5
- package/src/ThumbnailList/ThumbnailList.test.tsx +5 -5
- package/src/utils/meta/meta.json +2 -1
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.1-JOB-139048-04134dd.0+04134dd81",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"deepmerge": "^4.2.2",
|
|
45
45
|
"lodash": "^4.17.21",
|
|
46
46
|
"react-hook-form": "^7.52.0",
|
|
47
|
-
"react-intl": "^
|
|
47
|
+
"react-intl": "^7.1.11",
|
|
48
48
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
49
49
|
"react-native-modalize": "^2.0.13",
|
|
50
50
|
"react-native-portalize": "^1.0.7",
|
|
@@ -53,28 +53,27 @@
|
|
|
53
53
|
"ts-xor": "^1.1.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@react-native-community/datetimepicker": "^
|
|
56
|
+
"@react-native-community/datetimepicker": "^8.4.5",
|
|
57
|
+
"@react-native/babel-preset": "^0.81.1",
|
|
57
58
|
"@storybook/addon-a11y": "^9.1.2",
|
|
58
59
|
"@storybook/react": "^9.1.2",
|
|
59
60
|
"@storybook/react-native-web-vite": "^9.1.2",
|
|
60
|
-
"@testing-library/
|
|
61
|
-
"@testing-library/react-native": "^12.0.1",
|
|
61
|
+
"@testing-library/react-native": "^13.3.3",
|
|
62
62
|
"@types/lodash.chunk": "^4.2.7",
|
|
63
63
|
"@types/lodash.debounce": "^4.0.7",
|
|
64
64
|
"@types/lodash.identity": "^3.0.7",
|
|
65
|
-
"@types/react": "^18.0.28",
|
|
66
65
|
"@types/react-native-uuid": "^1.4.0",
|
|
66
|
+
"@types/react-test-renderer": "19.1.0",
|
|
67
67
|
"date-fns": "^2.30.0",
|
|
68
68
|
"date-fns-tz": "^2.0.0",
|
|
69
|
-
"
|
|
70
|
-
"react-native": "^
|
|
71
|
-
"react-native-
|
|
72
|
-
"react-native-modal-datetime-picker": "^15.0.1",
|
|
69
|
+
"react-native": "^0.81.4",
|
|
70
|
+
"react-native-gesture-handler": "^2.28.0",
|
|
71
|
+
"react-native-modal-datetime-picker": "^18.0.0",
|
|
73
72
|
"react-native-reanimated": "^3.7.1",
|
|
74
73
|
"react-native-safe-area-context": "^5.4.0",
|
|
75
74
|
"react-native-svg": "^15.1.0",
|
|
76
75
|
"react-native-web": "^0.20.0",
|
|
77
|
-
"react-test-renderer": "
|
|
76
|
+
"react-test-renderer": "19.1.0",
|
|
78
77
|
"storybook": "^9.1.2"
|
|
79
78
|
},
|
|
80
79
|
"peerDependencies": {
|
|
@@ -83,10 +82,10 @@
|
|
|
83
82
|
"@react-native-community/datetimepicker": ">=6.7.0",
|
|
84
83
|
"date-fns": "^2.30.0",
|
|
85
84
|
"date-fns-tz": "^2.0.0",
|
|
86
|
-
"react": "^18.
|
|
87
|
-
"react-intl": "^6
|
|
88
|
-
"react-native": ">=0.
|
|
89
|
-
"react-native-gesture-handler": ">=2.
|
|
85
|
+
"react": "^18 || ^19.1.0",
|
|
86
|
+
"react-intl": "^6 || ^7",
|
|
87
|
+
"react-native": ">=0.79.5",
|
|
88
|
+
"react-native-gesture-handler": ">=2.22.0",
|
|
90
89
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
91
90
|
"react-native-modal-datetime-picker": " >=13.0.0",
|
|
92
91
|
"react-native-modalize": "^2.0.13",
|
|
@@ -95,5 +94,5 @@
|
|
|
95
94
|
"react-native-safe-area-context": "^5.4.0",
|
|
96
95
|
"react-native-svg": ">=12.0.0"
|
|
97
96
|
},
|
|
98
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "04134dd81a80801cb9749c94d92f80b0e1d7c7dc"
|
|
99
98
|
}
|
|
@@ -8,7 +8,6 @@ const offset = PixelRatio.roundToNearestPixel(imageWidth / PixelRatio.get());
|
|
|
8
8
|
const leftOffset = -1 * offset;
|
|
9
9
|
// looks like deprecation for FlatList in reanimated is cascading down to other exports
|
|
10
10
|
// This is not createAnimatedComponent(FlatList), we are fine
|
|
11
|
-
// eslint-disable-next-line import/no-deprecated
|
|
12
11
|
const AnimatedImage = Animated.createAnimatedComponent(ImageBackground);
|
|
13
12
|
function InternalButtonLoadingInternal({ variation, type, }) {
|
|
14
13
|
const translateX = useSharedValue(0);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState, } from "react";
|
|
2
|
-
import { Modalize } from "react-native-modalize";
|
|
3
2
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
3
|
import { AccessibilityInfo, Platform, View, findNodeHandle, useWindowDimensions, } from "react-native";
|
|
5
4
|
import { Portal } from "react-native-portalize";
|
|
6
5
|
import { useKeyboardVisibility } from "./hooks/useKeyboardVisibility";
|
|
7
6
|
import { useStyles } from "./ContentOverlay.style";
|
|
8
7
|
import { useViewLayoutHeight } from "./hooks/useViewLayoutHeight";
|
|
8
|
+
import { UNSAFE_WrappedModalize } from "./UNSAFE_WrappedModalize";
|
|
9
9
|
import { useIsScreenReaderEnabled } from "../hooks";
|
|
10
10
|
import { IconButton } from "../IconButton";
|
|
11
11
|
import { Heading } from "../Heading";
|
|
@@ -86,7 +86,7 @@ function ContentOverlayInternal({ children, title, accessibilityLabel, fullScree
|
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
return (React.createElement(React.Fragment, null,
|
|
89
|
-
headerHeightKnown && childrenHeightKnown && (React.createElement(
|
|
89
|
+
headerHeightKnown && childrenHeightKnown && (React.createElement(UNSAFE_WrappedModalize, { ref: callbackInternalRef, overlayStyle: styles.overlay, handleStyle: styles.handle, handlePosition: "inside", modalStyle: modalStyle, modalTopOffset: tokens["space-larger"], snapPoint: snapPoint, closeSnapPointStraightEnabled: false, withHandle: isDraggable, panGestureEnabled: isDraggable, adjustToContentHeight: adjustToContentHeight, disableScrollIfPossible: !adjustToContentHeight, onClose: onClose, onOpen: onOpen, keyboardAvoidingBehavior: keyboardAvoidingBehavior, avoidKeyboardLikeIOS: avoidKeyboardLikeIOS, childrenStyle: styles.childrenStyle, onBackButtonPress: onCloseController, closeOnOverlayTap: isCloseableOnOverlayTap, onOpened: () => {
|
|
90
90
|
if (overlayHeader.current) {
|
|
91
91
|
const reactTag = findNodeHandle(overlayHeader.current);
|
|
92
92
|
if (reactTag) {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { forwardRef, useImperativeHandle, useRef, useState, } from "react";
|
|
2
|
+
import { Modalize } from "react-native-modalize";
|
|
3
|
+
// DON'T USE THIS COMPONENT DIRECTLY.
|
|
4
|
+
// It is exposed only so that the deprecated ContentOverlay component can use this along with the
|
|
5
|
+
// newer one contained in this lib.
|
|
6
|
+
// This is a temporary solution for new architecture. JOB-137549 plans to replace modalize entirely.
|
|
7
|
+
export const UNSAFE_WrappedModalize = forwardRef((props, ref) => {
|
|
8
|
+
const innerRef = useRef(null);
|
|
9
|
+
const [openRenderId, setOpenRenderId] = useState(0);
|
|
10
|
+
useImperativeHandle(ref, () => ({
|
|
11
|
+
open(dest) {
|
|
12
|
+
setOpenRenderId(id => id + 1);
|
|
13
|
+
// Open on a fresh tick for additional safety
|
|
14
|
+
requestAnimationFrame(() => {
|
|
15
|
+
var _a;
|
|
16
|
+
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.open(dest);
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
close(dest) {
|
|
20
|
+
var _a;
|
|
21
|
+
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.close(dest);
|
|
22
|
+
},
|
|
23
|
+
}), []);
|
|
24
|
+
// Use a unique key to force a remount, ensuring we get fresh gesture handler nodes within modalize
|
|
25
|
+
return (React.createElement(Modalize, Object.assign({ key: `modalize-${openRenderId}`, ref: innerRef }, props)));
|
|
26
|
+
});
|
|
27
|
+
UNSAFE_WrappedModalize.displayName = "UNSAFE_WrappedModalize";
|