react-native-in-app-debugger 1.0.45 → 1.0.47

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/index.jsx CHANGED
@@ -57,7 +57,8 @@ export default ({
57
57
  version = v,
58
58
  maxNumOfApiToStore = 0,
59
59
  labels = [],
60
- interceptResponse
60
+ interceptResponse,
61
+ tabs = [],
61
62
  }) => {
62
63
  const [blacklists, setB] = useState([]);
63
64
 
@@ -116,6 +117,8 @@ export default ({
116
117
  setIsOpen,
117
118
  shouldShowDetails,
118
119
  } = useAnimation(badgeHeight);
120
+
121
+ const CustomTabComponent = tabs.find(t => tab === t.title)?.component;
119
122
  return (
120
123
  <Animated.View
121
124
  style={{
@@ -163,7 +166,7 @@ export default ({
163
166
  <View style={{ flexDirection: "row", padding: 5 }}>
164
167
  <View style={{ flex: 1, flexDirection: "row" }}>
165
168
  {!!variables &&
166
- ["api", "variables"].map((t) => {
169
+ ["api", "variables", ...tabs.map(t => t.title)].map((t) => {
167
170
  const isSelected = t === tab;
168
171
  return (
169
172
  <TouchableOpacity
@@ -200,6 +203,7 @@ export default ({
200
203
  {...restApiInterceptor}
201
204
  />
202
205
  )}
206
+ {!!CustomTabComponent && <CustomTabComponent />}
203
207
  </SafeAreaView>
204
208
  )}
205
209
  </Animated.View>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-in-app-debugger",
3
- "version": "1.0.45",
3
+ "version": "1.0.47",
4
4
  "description": "This library's main usage is to be used by Non-Technical testers during UAT, SIT or any testing phase.",
5
5
  "main": "index.jsx",
6
6
  "scripts": {
package/useAnimation.ts CHANGED
@@ -9,7 +9,7 @@ const touchThreshold = 10;
9
9
  export default (defaultBadgeHeight) => {
10
10
  const cachePosition = useRef({ x: 0, y: 50 });
11
11
  const position = useRef<any>(new Animated.ValueXY(cachePosition.current)).current;
12
- const borderRadius = useRef(new Animated.Value(defaultBorderRadius)).current;
12
+ // const borderRadius = useRef(new Animated.Value(defaultBorderRadius)).current;
13
13
  const badgeHeight = useRef(new Animated.Value(defaultBadgeHeight)).current;
14
14
  const badgeWidth = useRef(new Animated.Value(defaultBadgeWidth)).current;
15
15
  const { width, height } = useWindowDimensions();
@@ -59,7 +59,7 @@ export default (defaultBadgeHeight) => {
59
59
  useEffect(() => {
60
60
  setTimeout(() => setShouldShowDetails(isOpen), isOpen ? 200 : 0);
61
61
  Animated.spring(position, { toValue: isOpen ? { x: 0, y: 0 } : cachePosition.current, ...und }).start();
62
- Animated.spring(borderRadius, { toValue: isOpen ? 0 : defaultBorderRadius, ...und }).start();
62
+ // Animated.spring(borderRadius, { toValue: isOpen ? 0 : defaultBorderRadius, ...und }).start();
63
63
  Animated.spring(badgeHeight, { toValue: isOpen ? height : defaultBadgeHeight, ...und }).start();
64
64
  Animated.spring(badgeWidth, { toValue: isOpen ? width : defaultBadgeWidth, ...und }).start();
65
65
  }, [isOpen]);
@@ -72,7 +72,7 @@ export default (defaultBadgeHeight) => {
72
72
  translateY: position.y,
73
73
  isOpen,
74
74
  setIsOpen,
75
- borderRadius,
75
+ borderRadius: isOpen ? 0 : defaultBorderRadius,
76
76
  shouldShowDetails,
77
77
  };
78
78
  };