shakebug-react-native 2.2.5 → 2.2.7
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shakebug-react-native",
|
|
3
3
|
"title": "shakebug-react-native",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.7",
|
|
5
5
|
"description": "Shakebug allows users to report the bug from your mobile phone for your application. Here users just need to shake their mobile and all the data regarding bugs & crashes can be seen by developers through their log in panel easily",
|
|
6
6
|
"main": "src/index.tsx",
|
|
7
7
|
"scripts": {
|
|
@@ -16,7 +16,7 @@ import { useGlobalState } from 'shakebug-react-native/src/Componanats/GlobalStat
|
|
|
16
16
|
|
|
17
17
|
LogBox.ignoreAllLogs()
|
|
18
18
|
|
|
19
|
-
const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitle, allowToReportBugByShaking, allowToReportBugByScreenCapture, allowCrashReport
|
|
19
|
+
const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitle, allowToReportBugByShaking, allowToReportBugByScreenCapture, allowCrashReport }) => {
|
|
20
20
|
|
|
21
21
|
const { ShakebugSDKScreenShotDetector, ShakebugSDKSharedPreferencesModule, ShakebugSDKCustomScreenCapture} = NativeModules;
|
|
22
22
|
|
|
@@ -198,7 +198,7 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
198
198
|
clearInterval(intervalId);
|
|
199
199
|
setIsLoading(false)
|
|
200
200
|
global.isRecording = false;
|
|
201
|
-
navigate("AddDetailsScreen", { media: res.result.outputURL, mediaType: 'Recordvideo', themeColor: themeColor, SDKScreenTitle: `${SDKScreenTitle}
|
|
201
|
+
navigate("AddDetailsScreen", { media: res.result.outputURL, mediaType: 'Recordvideo', themeColor: themeColor, SDKScreenTitle: `${SDKScreenTitle}` })
|
|
202
202
|
})
|
|
203
203
|
.catch(e => {
|
|
204
204
|
log.warn("e", e)
|
|
@@ -307,7 +307,7 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
307
307
|
subscription.unsubscribe();
|
|
308
308
|
global.IsBackground = false
|
|
309
309
|
global.isShakebugSDKOpen = true
|
|
310
|
-
navigate("FirstScreen", { img: `${ImgUrl}`, themeColor: `${themeColor}`, SDKScreenTitle: `${SDKScreenTitle}
|
|
310
|
+
navigate("FirstScreen", { img: `${ImgUrl}`, themeColor: `${themeColor}`, SDKScreenTitle: `${SDKScreenTitle}` })
|
|
311
311
|
}
|
|
312
312
|
else {
|
|
313
313
|
setIsScreenShot(false)
|
|
@@ -335,7 +335,7 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
335
335
|
if (ImgUrl != undefined || ImgUrl != null) {
|
|
336
336
|
subscription.unsubscribe();
|
|
337
337
|
global.isShakebugSDKOpen = true
|
|
338
|
-
navigate("FirstScreen", { img: `${ImgUrl}`, themeColor: `${themeColor}`, SDKScreenTitle: `${SDKScreenTitle}
|
|
338
|
+
navigate("FirstScreen", { img: `${ImgUrl}`, themeColor: `${themeColor}`, SDKScreenTitle: `${SDKScreenTitle}` })
|
|
339
339
|
}
|
|
340
340
|
else {
|
|
341
341
|
setIsScreenShot(false)
|
|
@@ -381,7 +381,7 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
381
381
|
global.isScreenShotDetected = true;
|
|
382
382
|
setTriggred(false)
|
|
383
383
|
global.isShakebugSDKOpen = true
|
|
384
|
-
navigate("FirstScreen", { img: `${ImgUrl}`, themeColor: `${themeColor}`, SDKScreenTitle: `${SDKScreenTitle}
|
|
384
|
+
navigate("FirstScreen", { img: `${ImgUrl}`, themeColor: `${themeColor}`, SDKScreenTitle: `${SDKScreenTitle}` })
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { View, Text, TouchableOpacity, Image, TextInput,
|
|
1
|
+
import { View, Text, TouchableOpacity, Image, TextInput, PanResponder, Alert, StyleSheet, Keyboard, LogBox, Platform, StatusBar, NativeModules, BackHandler, DeviceEventEmitter, Dimensions, SafeAreaView } from 'react-native'
|
|
2
2
|
import React, { useState, useRef, useEffect } from 'react'
|
|
3
3
|
import { launchImageLibrary } from '../../ImageOrVedioPicker/src/index';
|
|
4
4
|
import { AddIssueApi } from '../APIs/AddIssue';
|
|
@@ -13,6 +13,7 @@ import KeyboardAvoidingWrapper from '../Componanats/KeyboardAvoidingWrapper';
|
|
|
13
13
|
import { useGlobalState } from 'shakebug-react-native/src/Componanats/GlobalStateContext';
|
|
14
14
|
import CustomeAlert from 'shakebug-react-native/src/Componanats/CustomAlert';
|
|
15
15
|
import NetInfo from 'shakebug-react-native/NetInfo/src';
|
|
16
|
+
import DeviceInfo from '../../DeviceInfo';
|
|
16
17
|
|
|
17
18
|
console.ignoredYellowBox = ["Warning: Each", "Warning: Failed", "Non-serializable"];
|
|
18
19
|
|
|
@@ -22,7 +23,7 @@ LogBox.ignoreLogs([
|
|
|
22
23
|
|
|
23
24
|
const { CreateThumbnail } = NativeModules;
|
|
24
25
|
|
|
25
|
-
const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScreenTitle
|
|
26
|
+
const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScreenTitle }) => {
|
|
26
27
|
|
|
27
28
|
const { setIsScreenShot, setIsRecordingStart } = useGlobalState()
|
|
28
29
|
|
|
@@ -167,9 +168,9 @@ const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScree
|
|
|
167
168
|
let videoUri = await response.uri || response.assets?.[0]?.uri;
|
|
168
169
|
if (response.assets?.[0]?.type.slice(0, 5).trim() == "video") {
|
|
169
170
|
if (mediaType == "img")
|
|
170
|
-
navigate("TrimVideoScreen", { video: `${videoUri}`, Type: "imgReplacedWithVideo", themeColor: ThemeColor, SDKScreenTitle: SDKScreenTitle, UpdateStatusBar: UpdateStatusBar, updateParent: updateParent
|
|
171
|
+
navigate("TrimVideoScreen", { video: `${videoUri}`, Type: "imgReplacedWithVideo", themeColor: ThemeColor, SDKScreenTitle: SDKScreenTitle, UpdateStatusBar: UpdateStatusBar, updateParent: updateParent })
|
|
171
172
|
else
|
|
172
|
-
navigate("TrimVideoScreen", { video: `${videoUri}`, Type: "videoReplacedWithVideo", themeColor: ThemeColor, SDKScreenTitle: SDKScreenTitle, UpdateStatusBar: UpdateStatusBar, updateParent: updateParent
|
|
173
|
+
navigate("TrimVideoScreen", { video: `${videoUri}`, Type: "videoReplacedWithVideo", themeColor: ThemeColor, SDKScreenTitle: SDKScreenTitle, UpdateStatusBar: UpdateStatusBar, updateParent: updateParent })
|
|
173
174
|
}
|
|
174
175
|
else {
|
|
175
176
|
setAPIMessage("Invalid selection, Please choose a valid video file")
|
|
@@ -284,7 +285,7 @@ const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScree
|
|
|
284
285
|
}
|
|
285
286
|
|
|
286
287
|
return (
|
|
287
|
-
<
|
|
288
|
+
<SafeAreaView style={{ width: "100%", height: "100%", backgroundColor: themeColor, paddingTop: Platform.OS == 'android' ? DeviceInfo?.getSystemVersion() > 14 && StatusBar.currentHeight : 0 , paddingBottom: Platform.OS == 'android' ? DeviceInfo?.getSystemVersion() > 14 && StatusBar.currentHeight : 0}}>
|
|
288
289
|
<StatusBar backgroundColor={ThemeColor} hidden={false} />
|
|
289
290
|
<KeyboardAvoidingWrapper>
|
|
290
291
|
<>
|
|
@@ -466,7 +467,7 @@ const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScree
|
|
|
466
467
|
}}
|
|
467
468
|
/>
|
|
468
469
|
|
|
469
|
-
</
|
|
470
|
+
</SafeAreaView>
|
|
470
471
|
)
|
|
471
472
|
}
|
|
472
473
|
|
|
@@ -15,7 +15,7 @@ import CustomeAlert from 'shakebug-react-native/src/Componanats/CustomAlert.js';
|
|
|
15
15
|
console.disableYellowBox = true;
|
|
16
16
|
console.ignoredYellowBox = ["Warning: Each", "Warning: Failed", "Possible"];
|
|
17
17
|
|
|
18
|
-
const FirstScreen = ({ img, themeColor, SDKScreenTitle
|
|
18
|
+
const FirstScreen = ({ img, themeColor, SDKScreenTitle }) => {
|
|
19
19
|
|
|
20
20
|
const { setIsScreenShot, setIsRecordingStart } = useGlobalState()
|
|
21
21
|
|
|
@@ -124,7 +124,7 @@ const FirstScreen = ({ img, themeColor, SDKScreenTitle, insets}) => {
|
|
|
124
124
|
let vedioUri = await response.uri || response.assets?.[0]?.uri;
|
|
125
125
|
if (response.assets?.[0]?.type.slice(0, 5).trim() == "video") {
|
|
126
126
|
setIsLoading(false)
|
|
127
|
-
navigate("TrimVideoScreen", { video: `${vedioUri}`, Type: "video", themeColor: `${ThemeColor}`, SDKScreenTitle: `${SDKScreenTitle}`, UpdateStatusBar: UpdateStatusBar, updateParent: updateImage
|
|
127
|
+
navigate("TrimVideoScreen", { video: `${vedioUri}`, Type: "video", themeColor: `${ThemeColor}`, SDKScreenTitle: `${SDKScreenTitle}`, UpdateStatusBar: UpdateStatusBar, updateParent: updateImage })
|
|
128
128
|
}
|
|
129
129
|
else {
|
|
130
130
|
setIsAlertText("Invalid selection, Please choose a valid video file")
|
|
@@ -309,7 +309,7 @@ const FirstScreen = ({ img, themeColor, SDKScreenTitle, insets}) => {
|
|
|
309
309
|
// backgroundColor: "#181818"
|
|
310
310
|
|
|
311
311
|
return (
|
|
312
|
-
<SafeAreaView style={{ width: "100%", height: '100%', backgroundColor: themeColor, paddingTop:
|
|
312
|
+
<SafeAreaView style={{ width: "100%", height: '100%', backgroundColor: themeColor, paddingTop: Platform.OS == 'android' ? DeviceInfo?.getSystemVersion() > 14 && StatusBar.currentHeight : 0 , paddingBottom: Platform.OS == 'android' ? DeviceInfo?.getSystemVersion() > 14 && StatusBar.currentHeight : 0}}>
|
|
313
313
|
<StatusBar backgroundColor={ThemeColor} />
|
|
314
314
|
|
|
315
315
|
<View style={{ width: "100%", height: "100%", backgroundColor: "#e4fdfd" }}>
|
|
@@ -345,7 +345,7 @@ const FirstScreen = ({ img, themeColor, SDKScreenTitle, insets}) => {
|
|
|
345
345
|
const ImgUrl = await ref.current.capture()
|
|
346
346
|
if (ImgUrl != undefined || ImgUrl != null) {
|
|
347
347
|
global.IsBackground = 'true'
|
|
348
|
-
navigate("AddDetailsScreen", { media: `${ImgUrl}`, updateParent: updateImage, mediaType: 'img', themeColor: ThemeColor, SDKScreenTitle: `${SDKScreenTitle}
|
|
348
|
+
navigate("AddDetailsScreen", { media: `${ImgUrl}`, updateParent: updateImage, mediaType: 'img', themeColor: ThemeColor, SDKScreenTitle: `${SDKScreenTitle}` })
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
}}
|
|
@@ -568,10 +568,8 @@ const FirstScreen = ({ img, themeColor, SDKScreenTitle, insets}) => {
|
|
|
568
568
|
/>
|
|
569
569
|
|
|
570
570
|
{isLoading && <ActivityIndicator size={'large'} color={themeColor} collapsable={true} style={{ position: 'absolute', top: 0, bottom: 0, left: 0, right: 0, elevation: 2 }} />}
|
|
571
|
-
|
|
572
|
-
<View style={{height: insets?.bottom, marginTop: 5, backgroundColor: "#e4fdfd"}}/>
|
|
573
571
|
|
|
574
|
-
</SafeAreaView
|
|
572
|
+
</SafeAreaView>
|
|
575
573
|
)
|
|
576
574
|
}
|
|
577
575
|
|
package/src/Screens/Shakebug.js
CHANGED
|
@@ -20,7 +20,7 @@ import { Localization } from '../Componanats/localization';
|
|
|
20
20
|
import { GlobalStateProvider, useGlobalState } from '../Componanats/GlobalStateContext';
|
|
21
21
|
import CustomeAlert from 'shakebug-react-native/src/Componanats/CustomAlert';
|
|
22
22
|
import ReviewModal from 'shakebug-react-native/src/Componanats/ReviewModal';
|
|
23
|
-
import {
|
|
23
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
24
24
|
|
|
25
25
|
console.ignoredYellowBox = ["Warning: Each", "Warning: Failed"];
|
|
26
26
|
|
|
@@ -52,7 +52,7 @@ global.isScreeenShotTaken = false;
|
|
|
52
52
|
global.restrictedViews = [];
|
|
53
53
|
global.currentScreen = ""
|
|
54
54
|
global.isShakebugSDKOpen = false;
|
|
55
|
-
global.sdk_version = "2.2.
|
|
55
|
+
global.sdk_version = "2.2.7";
|
|
56
56
|
global.app_lunch_count = 0;
|
|
57
57
|
global.POPUP_LAUNCH_THRESHOLD = 3;
|
|
58
58
|
global.POPUP_COOLDOWN_DAYS = 2;
|
|
@@ -392,15 +392,13 @@ function Shakebug({ children, Android_appkey, iOS_appkey, showTutorialScreenFirs
|
|
|
392
392
|
// For shakeFunctionscreen with childern as props
|
|
393
393
|
const ShakeScreen = () => {
|
|
394
394
|
|
|
395
|
-
const insets = useSafeAreaInsets();
|
|
396
|
-
|
|
397
395
|
DeviceInfo.isEmulator()
|
|
398
396
|
.then(res => {
|
|
399
397
|
global.isRealDevice = !res
|
|
400
398
|
})
|
|
401
399
|
|
|
402
400
|
return (
|
|
403
|
-
<ShakeFunction isRealDevice={global.isRealDevice} themeColor={ThemeColor} showTutorialScreen={showTutorialScreenFirstTime} SDKScreenTitle={[FirstScreenTitle, SecondScreenTitle]} allowToReportBugByShaking={allowToReportBugByShakingMobile} allowToReportBugByScreenCapture={allowToReportBugByScreenCapture} allowCrashReport={allowCrashReport} ShakebugLanguage={ShakebugLanguage}
|
|
401
|
+
<ShakeFunction isRealDevice={global.isRealDevice} themeColor={ThemeColor} showTutorialScreen={showTutorialScreenFirstTime} SDKScreenTitle={[FirstScreenTitle, SecondScreenTitle]} allowToReportBugByShaking={allowToReportBugByShakingMobile} allowToReportBugByScreenCapture={allowToReportBugByScreenCapture} allowCrashReport={allowCrashReport} ShakebugLanguage={ShakebugLanguage}>
|
|
404
402
|
{children}
|
|
405
403
|
</ShakeFunction>
|
|
406
404
|
)
|
|
@@ -453,7 +451,6 @@ function Shakebug({ children, Android_appkey, iOS_appkey, showTutorialScreenFirs
|
|
|
453
451
|
};
|
|
454
452
|
|
|
455
453
|
return (
|
|
456
|
-
<SafeAreaProvider>
|
|
457
454
|
<View
|
|
458
455
|
style={{
|
|
459
456
|
width: '100%',
|
|
@@ -478,7 +475,6 @@ function Shakebug({ children, Android_appkey, iOS_appkey, showTutorialScreenFirs
|
|
|
478
475
|
|
|
479
476
|
<ReviewModal color={ThemeColor} visible={showModal} onClose={() => { setShowModal(false) }} />
|
|
480
477
|
</View>
|
|
481
|
-
</SafeAreaProvider>
|
|
482
478
|
)
|
|
483
479
|
}
|
|
484
480
|
|
|
@@ -8,7 +8,7 @@ console.ignoredYellowBox = ["Warning: Each", "Warning: Failed"];
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
const TrimVideoScreen = ({ video, themeColor, SDKScreenTitle, Type, UpdateStatusBar, updateParent
|
|
11
|
+
const TrimVideoScreen = ({ video, themeColor, SDKScreenTitle, Type, UpdateStatusBar, updateParent }) => {
|
|
12
12
|
|
|
13
13
|
const { goToScreenAtIndex, navigate, goBack } = useNavigation();
|
|
14
14
|
|
|
@@ -53,7 +53,7 @@ const TrimVideoScreen = ({ video, themeColor, SDKScreenTitle, Type, UpdateStatus
|
|
|
53
53
|
case 'onFinishTrimming': {
|
|
54
54
|
global.IsBackground = 'true'
|
|
55
55
|
UpdateStatusBar()
|
|
56
|
-
navigate("AddDetailsScreen", { media: `${event.outputPath}`, mediaType: 'video', themeColor: themeColor, SDKScreenTitle: SDKScreenTitle, updateParent: updateParent
|
|
56
|
+
navigate("AddDetailsScreen", { media: `${event.outputPath}`, mediaType: 'video', themeColor: themeColor, SDKScreenTitle: SDKScreenTitle, updateParent: updateParent });
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
case 'onCancel': {
|