@inngageregistry/inngage-react 3.3.0-alpha.4 → 3.3.0-alpha.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 +3 -2
- package/src/components/Inapp.tsx +2 -2
- package/src/notificationsListener.ts +22 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inngageregistry/inngage-react",
|
|
3
|
-
"version": "3.3.0-alpha.
|
|
3
|
+
"version": "3.3.0-alpha.6",
|
|
4
4
|
"description": "Inngage Plugin for React Native applications for marketing campaign optimization using Push Notification.",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -24,10 +24,11 @@
|
|
|
24
24
|
"@react-native-firebase/app": "^17.4.2",
|
|
25
25
|
"@react-native-firebase/messaging": "^17.4.2",
|
|
26
26
|
"react-native-device-info": "^10.6.0",
|
|
27
|
-
"react-native-
|
|
27
|
+
"react-native-gesture-handler": "^2.14.1",
|
|
28
28
|
"react-native-localize": "^2.2.6",
|
|
29
29
|
"react-native-permissions": "^3.8.0",
|
|
30
30
|
"react-native-push-notification": "^8.1.1",
|
|
31
|
+
"react-native-reanimated": "^3.6.2",
|
|
31
32
|
"react-native-reanimated-carousel": "^3.5.1"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
package/src/components/Inapp.tsx
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import DeviceInfo from "react-native-device-info";
|
|
16
16
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
17
17
|
import { showAlertLink, isEmpty } from "../utils";
|
|
18
|
-
import { linkInApp } from "../notificationsListener";
|
|
18
|
+
// import { linkInApp } from "../notificationsListener";
|
|
19
19
|
import { styleInapp, styleItem } from './styles';
|
|
20
20
|
|
|
21
21
|
import Carousel from 'react-native-reanimated-carousel';
|
|
@@ -131,7 +131,7 @@ export const Inapp = (props: InappProps) => {
|
|
|
131
131
|
return
|
|
132
132
|
}
|
|
133
133
|
console.log(title, body, url, type)
|
|
134
|
-
const openLinkByType = (type, url) => (type === 'deep' ? Linking.openURL(url) :
|
|
134
|
+
const openLinkByType = (type, url) => (type === 'deep' ? Linking.openURL(url) : null)
|
|
135
135
|
|
|
136
136
|
return Linking.canOpenURL(url).then((supported) => {
|
|
137
137
|
if (supported) {
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { Linking } from 'react-native'
|
|
2
|
-
import InAppBrowser from 'react-native-inappbrowser-reborn'
|
|
2
|
+
// import InAppBrowser from 'react-native-inappbrowser-reborn'
|
|
3
3
|
import messaging from '@react-native-firebase/messaging';
|
|
4
4
|
import { showAlert } from './utils'
|
|
5
5
|
import { notificationApi } from './services/inngage'
|
|
6
6
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
7
7
|
import PushNotification, { Importance } from 'react-native-push-notification'
|
|
8
8
|
|
|
9
|
-
export const linkInApp = (link: string) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
9
|
+
// export const linkInApp = (link: string) => {
|
|
10
|
+
// InAppBrowser.open(link, {
|
|
11
|
+
// dismissButtonStyle: 'cancel',
|
|
12
|
+
// preferredBarTintColor: 'gray',
|
|
13
|
+
// preferredControlTintColor: 'white',
|
|
14
|
+
// readerMode: false,
|
|
15
|
+
// showTitle: true,
|
|
16
|
+
// toolbarColor: '#6200EE',
|
|
17
|
+
// secondaryToolbarColor: 'black',
|
|
18
|
+
// enableUrlBarHiding: true,
|
|
19
|
+
// enableDefaultShare: true,
|
|
20
|
+
// forceCloseOnRedirection: false,
|
|
21
|
+
// animations: {
|
|
22
|
+
// startEnter: 'slide_in_right',
|
|
23
|
+
// startExit: 'slide_out_left',
|
|
24
|
+
// endEnter: 'slide_in_right',
|
|
25
|
+
// endExit: 'slide_out_left',
|
|
26
|
+
// },
|
|
27
|
+
// })
|
|
28
|
+
// }
|
|
29
29
|
|
|
30
30
|
const openLinkByType = (type: string, url: string) => {
|
|
31
31
|
const linkTypeHandlers: Record<string, () => void> = {
|
|
32
32
|
deep: () => Linking.openURL(url),
|
|
33
|
-
inapp: () => linkInApp(url),
|
|
33
|
+
// inapp: () => linkInApp(url),
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
const handler = linkTypeHandlers[type];
|