shakebug-react-native 2.2.4 → 2.2.5
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.5",
|
|
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, insets }) => {
|
|
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}`, insets: insets })
|
|
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}`, insets: insets })
|
|
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}`, insets: insets })
|
|
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}`, insets: insets })
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
}
|
|
@@ -13,7 +13,6 @@ 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 { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
17
16
|
|
|
18
17
|
console.ignoredYellowBox = ["Warning: Each", "Warning: Failed", "Non-serializable"];
|
|
19
18
|
|
|
@@ -23,9 +22,7 @@ LogBox.ignoreLogs([
|
|
|
23
22
|
|
|
24
23
|
const { CreateThumbnail } = NativeModules;
|
|
25
24
|
|
|
26
|
-
const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScreenTitle }) => {
|
|
27
|
-
|
|
28
|
-
const insets = useSafeAreaInsets();
|
|
25
|
+
const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScreenTitle, insets }) => {
|
|
29
26
|
|
|
30
27
|
const { setIsScreenShot, setIsRecordingStart } = useGlobalState()
|
|
31
28
|
|
|
@@ -170,9 +167,9 @@ const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScree
|
|
|
170
167
|
let videoUri = await response.uri || response.assets?.[0]?.uri;
|
|
171
168
|
if (response.assets?.[0]?.type.slice(0, 5).trim() == "video") {
|
|
172
169
|
if (mediaType == "img")
|
|
173
|
-
navigate("TrimVideoScreen", { video: `${videoUri}`, Type: "imgReplacedWithVideo", themeColor: ThemeColor, SDKScreenTitle: SDKScreenTitle, UpdateStatusBar: UpdateStatusBar, updateParent: updateParent })
|
|
170
|
+
navigate("TrimVideoScreen", { video: `${videoUri}`, Type: "imgReplacedWithVideo", themeColor: ThemeColor, SDKScreenTitle: SDKScreenTitle, UpdateStatusBar: UpdateStatusBar, updateParent: updateParent, insets: insets })
|
|
174
171
|
else
|
|
175
|
-
navigate("TrimVideoScreen", { video: `${videoUri}`, Type: "videoReplacedWithVideo", themeColor: ThemeColor, SDKScreenTitle: SDKScreenTitle, UpdateStatusBar: UpdateStatusBar, updateParent: updateParent })
|
|
172
|
+
navigate("TrimVideoScreen", { video: `${videoUri}`, Type: "videoReplacedWithVideo", themeColor: ThemeColor, SDKScreenTitle: SDKScreenTitle, UpdateStatusBar: UpdateStatusBar, updateParent: updateParent, insets: insets })
|
|
176
173
|
}
|
|
177
174
|
else {
|
|
178
175
|
setAPIMessage("Invalid selection, Please choose a valid video file")
|
|
@@ -287,7 +284,7 @@ const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScree
|
|
|
287
284
|
}
|
|
288
285
|
|
|
289
286
|
return (
|
|
290
|
-
<
|
|
287
|
+
<View style={{ width: "100%", height: "100%", backgroundColor: themeColor, paddingTop: insets.top, paddingBottom: insets.bottom }}>
|
|
291
288
|
<StatusBar backgroundColor={ThemeColor} hidden={false} />
|
|
292
289
|
<KeyboardAvoidingWrapper>
|
|
293
290
|
<>
|
|
@@ -469,7 +466,7 @@ const AddDetailsScreen = ({ media, updateParent, mediaType, themeColor, SDKScree
|
|
|
469
466
|
}}
|
|
470
467
|
/>
|
|
471
468
|
|
|
472
|
-
</
|
|
469
|
+
</View >
|
|
473
470
|
)
|
|
474
471
|
}
|
|
475
472
|
|
|
@@ -11,14 +11,11 @@ import { ActivityIndicator } from 'react-native';
|
|
|
11
11
|
import DeviceInfo from '../../DeviceInfo';
|
|
12
12
|
import { useGlobalState } from '../Componanats/GlobalStateContext.js';
|
|
13
13
|
import CustomeAlert from 'shakebug-react-native/src/Componanats/CustomAlert.js';
|
|
14
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
15
14
|
|
|
16
15
|
console.disableYellowBox = true;
|
|
17
16
|
console.ignoredYellowBox = ["Warning: Each", "Warning: Failed", "Possible"];
|
|
18
17
|
|
|
19
|
-
const FirstScreen = ({ img, themeColor, SDKScreenTitle }) => {
|
|
20
|
-
|
|
21
|
-
const insets = useSafeAreaInsets();
|
|
18
|
+
const FirstScreen = ({ img, themeColor, SDKScreenTitle, insets}) => {
|
|
22
19
|
|
|
23
20
|
const { setIsScreenShot, setIsRecordingStart } = useGlobalState()
|
|
24
21
|
|
|
@@ -127,7 +124,7 @@ const FirstScreen = ({ img, themeColor, SDKScreenTitle }) => {
|
|
|
127
124
|
let vedioUri = await response.uri || response.assets?.[0]?.uri;
|
|
128
125
|
if (response.assets?.[0]?.type.slice(0, 5).trim() == "video") {
|
|
129
126
|
setIsLoading(false)
|
|
130
|
-
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, insets: insets })
|
|
131
128
|
}
|
|
132
129
|
else {
|
|
133
130
|
setIsAlertText("Invalid selection, Please choose a valid video file")
|
|
@@ -348,7 +345,7 @@ const FirstScreen = ({ img, themeColor, SDKScreenTitle }) => {
|
|
|
348
345
|
const ImgUrl = await ref.current.capture()
|
|
349
346
|
if (ImgUrl != undefined || ImgUrl != null) {
|
|
350
347
|
global.IsBackground = 'true'
|
|
351
|
-
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}`, insets: insets })
|
|
352
349
|
}
|
|
353
350
|
|
|
354
351
|
}}
|
|
@@ -571,6 +568,8 @@ const FirstScreen = ({ img, themeColor, SDKScreenTitle }) => {
|
|
|
571
568
|
/>
|
|
572
569
|
|
|
573
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"}}/>
|
|
574
573
|
|
|
575
574
|
</SafeAreaView >
|
|
576
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 { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
23
|
+
import { SafeAreaProvider, useSafeAreaInsets } 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.5";
|
|
56
56
|
global.app_lunch_count = 0;
|
|
57
57
|
global.POPUP_LAUNCH_THRESHOLD = 3;
|
|
58
58
|
global.POPUP_COOLDOWN_DAYS = 2;
|
|
@@ -392,13 +392,15 @@ 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
|
+
|
|
395
397
|
DeviceInfo.isEmulator()
|
|
396
398
|
.then(res => {
|
|
397
399
|
global.isRealDevice = !res
|
|
398
400
|
})
|
|
399
401
|
|
|
400
402
|
return (
|
|
401
|
-
<ShakeFunction isRealDevice={global.isRealDevice} themeColor={ThemeColor} showTutorialScreen={showTutorialScreenFirstTime} SDKScreenTitle={[FirstScreenTitle, SecondScreenTitle]} allowToReportBugByShaking={allowToReportBugByShakingMobile} allowToReportBugByScreenCapture={allowToReportBugByScreenCapture} allowCrashReport={allowCrashReport} ShakebugLanguage={ShakebugLanguage}>
|
|
403
|
+
<ShakeFunction isRealDevice={global.isRealDevice} themeColor={ThemeColor} showTutorialScreen={showTutorialScreenFirstTime} SDKScreenTitle={[FirstScreenTitle, SecondScreenTitle]} allowToReportBugByShaking={allowToReportBugByShakingMobile} allowToReportBugByScreenCapture={allowToReportBugByScreenCapture} allowCrashReport={allowCrashReport} ShakebugLanguage={ShakebugLanguage} insets={insets}>
|
|
402
404
|
{children}
|
|
403
405
|
</ShakeFunction>
|
|
404
406
|
)
|
|
@@ -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, insets}) => {
|
|
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, insets: insets });
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
case 'onCancel': {
|