@developer_tribe/react-native-comnyx 0.10.8 → 0.10.10
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/android/src/main/AndroidManifestNew.xml +1 -1
- package/android/src/main/java/com/comnyx/src/messaging/firebase/FirebaseMessagingService.kt +1 -1
- package/android/src/main/java/com/comnyx/src/messaging/notifications/NotificationsService.kt +11 -22
- package/lib/commonjs/components/EmptyList.js +5 -1
- package/lib/commonjs/components/EmptyList.js.map +1 -1
- package/lib/commonjs/index.js +0 -7
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/index.js.map +1 -1
- package/lib/module/components/EmptyList.js +4 -1
- package/lib/module/components/EmptyList.js.map +1 -1
- package/lib/module/index.js +1 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/index.js.map +1 -1
- package/lib/typescript/src/components/EmptyList.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/notifications/index.d.ts +26 -30
- package/lib/typescript/src/notifications/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/EmptyList.tsx +6 -1
- package/src/index.ts +0 -9
- package/src/notifications/index.ts +26 -34
- package/lib/commonjs/hooks/usePermissionChange.js +0 -11
- package/lib/commonjs/hooks/usePermissionChange.js.map +0 -1
- package/lib/module/hooks/usePermissionChange.js +0 -7
- package/lib/module/hooks/usePermissionChange.js.map +0 -1
- package/lib/typescript/src/hooks/usePermissionChange.d.ts +0 -2
- package/lib/typescript/src/hooks/usePermissionChange.d.ts.map +0 -1
- package/src/hooks/usePermissionChange.ts +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
2
|
<application>
|
|
3
3
|
<service
|
|
4
|
-
android:name="com.comnyx.messaging.
|
|
4
|
+
android:name="com.comnyx.messaging.ComnyxFirebaseMessagingService"
|
|
5
5
|
android:priority="-1500"
|
|
6
6
|
android:exported="true">
|
|
7
7
|
<intent-filter>
|
|
@@ -6,7 +6,7 @@ import com.google.firebase.messaging.FirebaseMessagingService
|
|
|
6
6
|
import com.google.firebase.messaging.RemoteMessage
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
open class ComnyxFirebaseMessagingService : FirebaseMessagingService() {
|
|
10
10
|
|
|
11
11
|
private lateinit var notificationsHelper: NotificationsHelper
|
|
12
12
|
|
package/android/src/main/java/com/comnyx/src/messaging/notifications/NotificationsService.kt
CHANGED
|
@@ -123,30 +123,19 @@ class NotificationsHelper(private val context: Context) {
|
|
|
123
123
|
.setContentTitle(title)
|
|
124
124
|
.setContentText(message)
|
|
125
125
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
if (metaData != null && metaData.containsKey("com.google.firebase.messaging.default_notification_icon")) {
|
|
134
|
-
iconResourceId = metaData.getInt("com.google.firebase.messaging.default_notification_icon", 0)
|
|
135
|
-
Log.d(TAG, "Found Firebase notification icon metadata: $iconResourceId")
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (iconResourceId != 0) {
|
|
139
|
-
builder.setSmallIcon(iconResourceId)
|
|
140
|
-
Log.d(TAG, "Using Firebase default notification icon from manifest")
|
|
141
|
-
} else {
|
|
142
|
-
// Fallback to app icon
|
|
126
|
+
val iconResourceId = context.resources.getIdentifier("com.google.firebase.messaging.default_notification_icon", "drawable", context.packageName)
|
|
127
|
+
if (iconResourceId != 0) {
|
|
128
|
+
builder.setSmallIcon(iconResourceId)
|
|
129
|
+
Log.d(TAG, "Using Firebase default notification icon")
|
|
130
|
+
} else {
|
|
131
|
+
try {
|
|
132
|
+
val appInfo = context.packageManager.getApplicationInfo(context.packageName, 0)
|
|
143
133
|
builder.setSmallIcon(appInfo.icon)
|
|
144
|
-
Log.d(TAG, "Firebase default notification icon not found
|
|
134
|
+
Log.d(TAG, "Firebase default notification icon not found, using app icon as fallback")
|
|
135
|
+
} catch (e: Exception) {
|
|
136
|
+
builder.setSmallIcon(android.R.drawable.ic_dialog_info)
|
|
137
|
+
Log.d(TAG, "Using system default icon as final fallback")
|
|
145
138
|
}
|
|
146
|
-
} catch (e: Exception) {
|
|
147
|
-
// Ultimate fallback to Android system icon
|
|
148
|
-
builder.setSmallIcon(android.R.drawable.ic_dialog_info)
|
|
149
|
-
Log.d(TAG, "Error getting app info, using system default icon as final fallback: ${e.message}")
|
|
150
139
|
}
|
|
151
140
|
|
|
152
141
|
builder.setPriority(NotificationCompat.PRIORITY_DEFAULT)
|
|
@@ -8,14 +8,18 @@ var _reactNative = require("react-native");
|
|
|
8
8
|
var _useThemeColors = require("../hooks/useThemeColors.js");
|
|
9
9
|
var _AppText = require("./AppText.js");
|
|
10
10
|
var _ScaledSheet = require("./ScaledSheet.js");
|
|
11
|
+
var _ReactNativeVersion = require("react-native/Libraries/Core/ReactNativeVersion");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
|
|
12
15
|
const notificationIcon = require('../assets/message-notification-square.png');
|
|
13
16
|
function EmptyList() {
|
|
14
17
|
const themeColors = (0, _useThemeColors.useThemeColors)();
|
|
18
|
+
const versionControl = _ReactNativeVersion.version.minor <= 71;
|
|
15
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
16
20
|
style: [styles.container, {
|
|
17
21
|
backgroundColor: themeColors.background,
|
|
18
|
-
transform: [_reactNative.Platform.OS === 'ios' ? {
|
|
22
|
+
transform: [_reactNative.Platform.OS === 'ios' || versionControl ? {
|
|
19
23
|
scaleY: -1
|
|
20
24
|
} : {
|
|
21
25
|
rotate: '180deg'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_useThemeColors","_AppText","_ScaledSheet","_jsxRuntime","notificationIcon","EmptyList","themeColors","useThemeColors","jsxs","View","style","styles","container","backgroundColor","background","transform","Platform","OS","scaleY","rotate","children","jsx","Image","source","tintColor","text","AppText","localization","title","color","description","ScaledSheet","create","flex","alignItems","justifyContent","paddingHorizontal","paddingVertical","gap","fontSize","textAlign","fontWeight","width","height"],"sourceRoot":"../../../src","sources":["components/EmptyList.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_useThemeColors","_AppText","_ScaledSheet","_ReactNativeVersion","_jsxRuntime","notificationIcon","EmptyList","themeColors","useThemeColors","versionControl","rnVersion","minor","jsxs","View","style","styles","container","backgroundColor","background","transform","Platform","OS","scaleY","rotate","children","jsx","Image","source","tintColor","text","AppText","localization","title","color","description","ScaledSheet","create","flex","alignItems","justifyContent","paddingHorizontal","paddingVertical","gap","fontSize","textAlign","fontWeight","width","height"],"sourceRoot":"../../../src","sources":["components/EmptyList.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAEA,IAAAI,mBAAA,GAAAJ,OAAA;AAAsF,IAAAK,WAAA,GAAAL,OAAA;AADtF;;AAGA,MAAMM,gBAAgB,GAAGN,OAAO,CAAC,2CAA2C,CAAC;AAEtE,SAASO,SAASA,CAAA,EAAG;EAC1B,MAAMC,WAAW,GAAG,IAAAC,8BAAc,EAAC,CAAC;EACpC,MAAMC,cAAc,GAAGC,2BAAS,CAACC,KAAK,IAAI,EAAE;EAE5C,oBACE,IAAAP,WAAA,CAAAQ,IAAA,EAACd,YAAA,CAAAe,IAAI;IACHC,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MACEC,eA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ACjBC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE;EACd,CAAC;EACDxC,gBAAgB,EAAE;IAChByC,KAAK,EAAE,OAAO;IACdC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -33,16 +33,9 @@ Object.defineProperty(exports, "registerOneSignalForComnyx", {
|
|
|
33
33
|
return _collectData.registerOneSignalForComnyx;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
Object.defineProperty(exports, "usePermissionChange", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _usePermissionChange.useNotificationPermission;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
36
|
var _index = require("./register/index.js");
|
|
43
37
|
var _index2 = require("./support/index.js");
|
|
44
38
|
var _index3 = require("./notifications/index.js");
|
|
45
39
|
var _NativeComnyx = require("./NativeComnyx.js");
|
|
46
40
|
var _collectData = require("./register/collectData.js");
|
|
47
|
-
var _usePermissionChange = require("./hooks/usePermissionChange.js");
|
|
48
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_index","require","_index2","_index3","_NativeComnyx","_collectData"
|
|
1
|
+
{"version":3,"names":["_index","require","_index2","_index3","_NativeComnyx","_collectData"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAGA,IAAAG,aAAA,GAAAH,OAAA;AAGA,IAAAI,YAAA,GAAAJ,OAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_NativeComnyx","_initializeNotifications","comnyxEmitter","Platform","OS","NativeEventEmitter","NativeModules","Comnyx","ComnyxNotifications","exports","initialize","initializeNotifications","optIn","nativeComnyx","checkOptIn","linkToSettings","addEventListener","eventType","listener","addListener","event"],"sourceRoot":"../../../src","sources":["notifications/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,wBAAA,GAAAF,OAAA;AAKA,MAAMG,aAAa,GACjBC,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACrB,IAAIC,+BAAkB,CAAC,CAAC,CAAC;AAAA,EACzB,IAAIA,+BAAkB,CAACC,0BAAa,CAACC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_NativeComnyx","_initializeNotifications","comnyxEmitter","Platform","OS","NativeEventEmitter","NativeModules","Comnyx","ComnyxNotifications","exports","initialize","initializeNotifications","optIn","nativeComnyx","checkOptIn","linkToSettings","addEventListener","eventType","listener","addListener","event"],"sourceRoot":"../../../src","sources":["notifications/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,wBAAA,GAAAF,OAAA;AAKA,MAAMG,aAAa,GACjBC,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACrB,IAAIC,+BAAkB,CAAC,CAAC,CAAC;AAAA,EACzB,IAAIA,+BAAkB,CAACC,0BAAa,CAACC,MAAM,CAAC;AAkF3C,MAAMC,mBAA4C,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EAC1DE,UAAU,EAAEC,gDAAuB;EACnCC,KAAK,EAAEC,0BAAY,CAACD,KAAK;EACzBE,UAAU,EAAED,0BAAY,CAACC,UAAU;EACnCC,cAAc,EAAEF,0BAAY,CAACE,cAAc;EAC3CC,gBAAgB,EAAE,SAAAA,CAChBC,SAAY,EACZC,QAA4D,EACvC;IACrB,OAAOhB,aAAa,CAACiB,WAAW,CAACF,SAAS,EAAGG,KAAK,IAAK;MACrDF,QAAQ,CAACE,KAAK,CAAC;IACjB,CAAC,CAAC;EACJ;AACF,CAAC","ignoreList":[]}
|
|
@@ -4,14 +4,17 @@ import { View, Image, Platform } from 'react-native';
|
|
|
4
4
|
import { useThemeColors } from "../hooks/useThemeColors.js";
|
|
5
5
|
import { AppText } from "./AppText.js";
|
|
6
6
|
import { ScaledSheet } from "./ScaledSheet.js";
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
import { version as rnVersion } from 'react-native/Libraries/Core/ReactNativeVersion';
|
|
7
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
10
|
const notificationIcon = require('../assets/message-notification-square.png');
|
|
9
11
|
export function EmptyList() {
|
|
10
12
|
const themeColors = useThemeColors();
|
|
13
|
+
const versionControl = rnVersion.minor <= 71;
|
|
11
14
|
return /*#__PURE__*/_jsxs(View, {
|
|
12
15
|
style: [styles.container, {
|
|
13
16
|
backgroundColor: themeColors.background,
|
|
14
|
-
transform: [Platform.OS === 'ios' ? {
|
|
17
|
+
transform: [Platform.OS === 'ios' || versionControl ? {
|
|
15
18
|
scaleY: -1
|
|
16
19
|
} : {
|
|
17
20
|
rotate: '180deg'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Image","Platform","useThemeColors","AppText","ScaledSheet","jsx","_jsx","jsxs","_jsxs","notificationIcon","require","EmptyList","themeColors","style","styles","container","backgroundColor","background","transform","OS","scaleY","rotate","children","source","tintColor","text","localization","title","color","description","create","flex","alignItems","justifyContent","paddingHorizontal","paddingVertical","gap","fontSize","textAlign","fontWeight","width","height"],"sourceRoot":"../../../src","sources":["components/EmptyList.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,cAAc;AACpD,SAASC,cAAc,QAAQ,4BAAyB;AACxD,SAASC,OAAO,QAAQ,cAAW;AAEnC,SAASC,WAAW,QAAQ,kBAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;
|
|
1
|
+
{"version":3,"names":["View","Image","Platform","useThemeColors","AppText","ScaledSheet","version","rnVersion","jsx","_jsx","jsxs","_jsxs","notificationIcon","require","EmptyList","themeColors","versionControl","minor","style","styles","container","backgroundColor","background","transform","OS","scaleY","rotate","children","source","tintColor","text","localization","title","color","description","create","flex","alignItems","justifyContent","paddingHorizontal","paddingVertical","gap","fontSize","textAlign","fontWeight","width","height"],"sourceRoot":"../../../src","sources":["components/EmptyList.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,cAAc;AACpD,SAASC,cAAc,QAAQ,4BAAyB;AACxD,SAASC,OAAO,QAAQ,cAAW;AAEnC,SAASC,WAAW,QAAQ,kBAAe;AAC3C;AACA,SAASC,OAAO,IAAIC,SAAS,QAAQ,gDAAgD;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtF,MAAMC,gBAAgB,GAAGC,OAAO,CAAC,2CAA2C,CAAC;AAE7E,OAAO,SAASC,SAASA,CAAA,EAAG;EAC1B,MAAMC,WAAW,GAAGZ,cAAc,CAAC,CAAC;EACpC,MAAMa,cAAc,GAAGT,SAAS,CAACU,KAAK,IAAI,EAAE;EAE5C,oBACEN,KAAA,CAACX,IAAI;IACHkB,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MACEC,eAAe,EAAEN,WAAW,CAACO,UAAU;MACvCC,SAAS,EAAE,CACTrB,QAAQ,CAACsB,EAAE,KAAK,KAAK,IAAIR,cAAc,GACnC;QAAES,MAAM,EAAE,CAAC;MAAE,CAAC,GACd;QAAEC,MAAM,EAAE;MAAS,CAAC;IAE5B,CAAC,CACD;IAAAC,QAAA,gBAEFlB,IAAA,CAACR,KAAK;MACJ2B,MAAM,EAAEhB,gBAAiB;MACzBM,KAAK,EAAE,CAACC,MAAM,CAACP,gBAAgB,EAAE;QAAEiB,SAAS,EAAEd,WAAW,CAACe;MAAK,CAAC;IAAE,CACnE,CAAC,eACFrB,IAAA,CAACL,OAAO;MACN2B,YAAY,EAAE,kBAA6C;MAC3Db,KAAK,EAAE,CAACC,MAAM,CAACa,KAAK,EAAE;QAAEC,KAAK,EAAElB,WAAW,CAACe;MAAK,CAAC;IAAE,CACpD,CAAC,eACFrB,IAAA,CAACL,OAAO;MACN2B,YAAY,EAAE,wBAAmD;MACjEb,KAAK,EAAE,CAACC,MAAM,CAACe,WAAW,EAAE;QAAED,KAAK,EAAElB,WAAW,CAACe;MAAK,CAAC;IAAE,CAC1D,CAAC;EAAA,CACE,CAAC;AAEX;AAEA,MAAMX,MAAM,GAAGd,WAAW,CAAC8B,MAAM,CAAC;EAChCf,SAAS,EAAE;IACTgB,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,iBAAiB,EAAE,MAAM;IACzBC,eAAe,EAAE,OAAO;IACxBC,GAAG,EAAE;EACP,CAAC;EACDT,KAAK,EAAE;IACLU,QAAQ,EAAE,OAAO;IACjBC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE;EACd,CAAC;EACDV,WAAW,EAAE;IACXQ,QAAQ,EAAE,OAAO;IACjBC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE;EACd,CAAC;EACDhC,gBAAgB,EAAE;IAChBiC,KAAK,EAAE,OAAO;IACdC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -6,9 +6,7 @@ export { ComnyxNotifications } from "./notifications/index.js";
|
|
|
6
6
|
|
|
7
7
|
//types
|
|
8
8
|
export { NotificationPermissionStatus } from "./NativeComnyx.js";
|
|
9
|
+
|
|
9
10
|
//deprecated
|
|
10
11
|
export { registerOneSignalForComnyx } from "./register/collectData.js";
|
|
11
|
-
|
|
12
|
-
//hooks
|
|
13
|
-
export { useNotificationPermission as usePermissionChange } from "./hooks/usePermissionChange.js";
|
|
14
12
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Comnyx","ComnyxSupport","ComnyxNotifications","NotificationPermissionStatus","registerOneSignalForComnyx"
|
|
1
|
+
{"version":3,"names":["Comnyx","ComnyxSupport","ComnyxNotifications","NotificationPermissionStatus","registerOneSignalForComnyx"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,qBAAY;AACnC,SAASC,aAAa,QAAQ,oBAAW;AACzC,SAASC,mBAAmB,QAAQ,0BAAiB;;AAErD;AACA,SAASC,4BAA4B,QAAQ,mBAAgB;;AAE7D;AACA,SAASC,0BAA0B,QAAQ,2BAAwB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","NativeEventEmitter","NativeModules","nativeComnyx","initializeNotifications","comnyxEmitter","OS","Comnyx","ComnyxNotifications","initialize","optIn","checkOptIn","linkToSettings","addEventListener","eventType","listener","addListener","event"],"sourceRoot":"../../../src","sources":["notifications/index.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAkC,cAAc;AACjE,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAASC,aAAa,QAAQ,cAAc;AAC5C,SAASC,YAAY,QAAsC,oBAAiB;AAC5E,SACEC,uBAAuB,QAElB,8BAA2B;AAElC,MAAMC,aAAa,GACjBL,QAAQ,CAACM,EAAE,KAAK,SAAS,GACrB,IAAIL,kBAAkB,CAAC,CAAC,CAAC;AAAA,EACzB,IAAIA,kBAAkB,CAACC,aAAa,CAACK,MAAM,CAAC;
|
|
1
|
+
{"version":3,"names":["Platform","NativeEventEmitter","NativeModules","nativeComnyx","initializeNotifications","comnyxEmitter","OS","Comnyx","ComnyxNotifications","initialize","optIn","checkOptIn","linkToSettings","addEventListener","eventType","listener","addListener","event"],"sourceRoot":"../../../src","sources":["notifications/index.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAkC,cAAc;AACjE,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAASC,aAAa,QAAQ,cAAc;AAC5C,SAASC,YAAY,QAAsC,oBAAiB;AAC5E,SACEC,uBAAuB,QAElB,8BAA2B;AAElC,MAAMC,aAAa,GACjBL,QAAQ,CAACM,EAAE,KAAK,SAAS,GACrB,IAAIL,kBAAkB,CAAC,CAAC,CAAC;AAAA,EACzB,IAAIA,kBAAkB,CAACC,aAAa,CAACK,MAAM,CAAC;AAkFlD,OAAO,MAAMC,mBAA4C,GAAG;EAC1DC,UAAU,EAAEL,uBAAuB;EACnCM,KAAK,EAAEP,YAAY,CAACO,KAAK;EACzBC,UAAU,EAAER,YAAY,CAACQ,UAAU;EACnCC,cAAc,EAAET,YAAY,CAACS,cAAc;EAC3CC,gBAAgB,EAAE,SAAAA,CAChBC,SAAY,EACZC,QAA4D,EACvC;IACrB,OAAOV,aAAa,CAACW,WAAW,CAACF,SAAS,EAAGG,KAAK,IAAK;MACrDF,QAAQ,CAACE,KAAK,CAAC;IACjB,CAAC,CAAC;EACJ;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyList.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmptyList.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyList.tsx"],"names":[],"mappings":"AAUA,wBAAgB,SAAS,4CAgCxB"}
|
|
@@ -2,7 +2,5 @@ export { Comnyx } from './register';
|
|
|
2
2
|
export { ComnyxSupport } from './support';
|
|
3
3
|
export { ComnyxNotifications } from './notifications';
|
|
4
4
|
export { NotificationPermissionStatus } from './NativeComnyx';
|
|
5
|
-
export type { TokenInitEvent, TokenFailedEvent, NotificationReceivedEvent, NotificationClickedEvent, } from './notifications';
|
|
6
5
|
export { registerOneSignalForComnyx } from './register/collectData';
|
|
7
|
-
export { useNotificationPermission as usePermissionChange } from './hooks/usePermissionChange';
|
|
8
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAG9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -34,37 +34,33 @@ type IOSRawNotificationResponse = {
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
type AndroidRawNotificationResponse = {};
|
|
37
|
-
export type TokenInitEvent = {
|
|
38
|
-
type: string;
|
|
39
|
-
token: string;
|
|
40
|
-
};
|
|
41
|
-
export type TokenFailedEvent = {
|
|
42
|
-
type: string;
|
|
43
|
-
token: null;
|
|
44
|
-
};
|
|
45
|
-
export type NotificationReceivedEvent = {
|
|
46
|
-
title: string;
|
|
47
|
-
body: string;
|
|
48
|
-
subtitle: string;
|
|
49
|
-
badge: number;
|
|
50
|
-
sound: string;
|
|
51
|
-
data: unknown;
|
|
52
|
-
raw: IOSRawNotification | AndroidRawNotification;
|
|
53
|
-
};
|
|
54
|
-
export type NotificationClickedEvent = {
|
|
55
|
-
title: string;
|
|
56
|
-
body: string;
|
|
57
|
-
subtitle: string;
|
|
58
|
-
badge: number;
|
|
59
|
-
sound: string;
|
|
60
|
-
data: unknown;
|
|
61
|
-
raw: IOSRawNotificationResponse | AndroidRawNotificationResponse;
|
|
62
|
-
};
|
|
63
37
|
type ComnyxNotificationsEventResult = {
|
|
64
|
-
TOKEN_INIT:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
38
|
+
TOKEN_INIT: {
|
|
39
|
+
type: string;
|
|
40
|
+
token: string;
|
|
41
|
+
};
|
|
42
|
+
TOKEN_FAILED: {
|
|
43
|
+
type: string;
|
|
44
|
+
token: null;
|
|
45
|
+
};
|
|
46
|
+
NOTIFICATION_RECEIVED: {
|
|
47
|
+
title: string;
|
|
48
|
+
body: string;
|
|
49
|
+
subtitle: string;
|
|
50
|
+
badge: number;
|
|
51
|
+
sound: string;
|
|
52
|
+
data: unknown;
|
|
53
|
+
raw: IOSRawNotification | AndroidRawNotification;
|
|
54
|
+
};
|
|
55
|
+
NOTIFICATION_CLICKED: {
|
|
56
|
+
title: string;
|
|
57
|
+
body: string;
|
|
58
|
+
subtitle: string;
|
|
59
|
+
badge: number;
|
|
60
|
+
sound: string;
|
|
61
|
+
data: unknown;
|
|
62
|
+
raw: IOSRawNotificationResponse | AndroidRawNotificationResponse;
|
|
63
|
+
};
|
|
68
64
|
};
|
|
69
65
|
interface ComnyxNotificationsType {
|
|
70
66
|
initialize: (params?: InitializeNotificationsParams) => Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGlE,OAAO,EAAgB,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,2BAA2B,CAAC;AAOnC,KAAK,4BAA4B,GAC7B,YAAY,GACZ,cAAc,GACd,uBAAuB,GACvB,sBAAsB,CAAC;AAE3B,KAAK,kBAAkB,GAAG;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E,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,OAAO,CAAC;QACd,GAAG,EAAE,0BAA0B,GAAG,8BAA8B,CAAC;KAClE,CAAC;CACH,CAAC;AAEF,UAAU,uBAAuB;IAC/B,UAAU,EAAE,CAAC,MAAM,CAAC,EAAE,6BAA6B,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACzE,KAAK,EAAE,MAAM,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACnD,UAAU,EAAE,MAAM,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACxD,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,gBAAgB,CAAC,CAAC,SAAS,4BAA4B,EACrD,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,CAAC,KAAK,EAAE,8BAA8B,CAAC,CAAC,CAAC,KAAK,IAAI,GAC3D,mBAAmB,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,EAAE,uBAajC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@developer_tribe/react-native-comnyx",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.10",
|
|
4
4
|
"description": "React Native chat component with integrated support panel, enabling real-time customer communication and efficient agent workflow management.",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
@@ -3,11 +3,14 @@ import { useThemeColors } from '../hooks/useThemeColors';
|
|
|
3
3
|
import { AppText } from './AppText';
|
|
4
4
|
import type { LocalizationKeys } from '../types/LocalizationKeys';
|
|
5
5
|
import { ScaledSheet } from './ScaledSheet';
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import { version as rnVersion } from 'react-native/Libraries/Core/ReactNativeVersion';
|
|
6
8
|
|
|
7
9
|
const notificationIcon = require('../assets/message-notification-square.png');
|
|
8
10
|
|
|
9
11
|
export function EmptyList() {
|
|
10
12
|
const themeColors = useThemeColors();
|
|
13
|
+
const versionControl = rnVersion.minor <= 71;
|
|
11
14
|
|
|
12
15
|
return (
|
|
13
16
|
<View
|
|
@@ -16,7 +19,9 @@ export function EmptyList() {
|
|
|
16
19
|
{
|
|
17
20
|
backgroundColor: themeColors.background,
|
|
18
21
|
transform: [
|
|
19
|
-
Platform.OS === 'ios'
|
|
22
|
+
Platform.OS === 'ios' || versionControl
|
|
23
|
+
? { scaleY: -1 }
|
|
24
|
+
: { rotate: '180deg' },
|
|
20
25
|
],
|
|
21
26
|
},
|
|
22
27
|
]}
|
package/src/index.ts
CHANGED
|
@@ -4,15 +4,6 @@ export { ComnyxNotifications } from './notifications';
|
|
|
4
4
|
|
|
5
5
|
//types
|
|
6
6
|
export { NotificationPermissionStatus } from './NativeComnyx';
|
|
7
|
-
export type {
|
|
8
|
-
TokenInitEvent,
|
|
9
|
-
TokenFailedEvent,
|
|
10
|
-
NotificationReceivedEvent,
|
|
11
|
-
NotificationClickedEvent,
|
|
12
|
-
} from './notifications';
|
|
13
7
|
|
|
14
8
|
//deprecated
|
|
15
9
|
export { registerOneSignalForComnyx } from './register/collectData';
|
|
16
|
-
|
|
17
|
-
//hooks
|
|
18
|
-
export { useNotificationPermission as usePermissionChange } from './hooks/usePermissionChange';
|
|
@@ -52,41 +52,33 @@ type IOSRawNotificationResponse = {
|
|
|
52
52
|
};
|
|
53
53
|
type AndroidRawNotificationResponse = {};
|
|
54
54
|
|
|
55
|
-
export type TokenInitEvent = {
|
|
56
|
-
type: string;
|
|
57
|
-
token: string;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export type TokenFailedEvent = {
|
|
61
|
-
type: string;
|
|
62
|
-
token: null;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export type NotificationReceivedEvent = {
|
|
66
|
-
title: string;
|
|
67
|
-
body: string;
|
|
68
|
-
subtitle: string;
|
|
69
|
-
badge: number;
|
|
70
|
-
sound: string;
|
|
71
|
-
data: unknown;
|
|
72
|
-
raw: IOSRawNotification | AndroidRawNotification;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export type NotificationClickedEvent = {
|
|
76
|
-
title: string;
|
|
77
|
-
body: string;
|
|
78
|
-
subtitle: string;
|
|
79
|
-
badge: number;
|
|
80
|
-
sound: string;
|
|
81
|
-
data: unknown;
|
|
82
|
-
raw: IOSRawNotificationResponse | AndroidRawNotificationResponse;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
55
|
type ComnyxNotificationsEventResult = {
|
|
86
|
-
TOKEN_INIT:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
56
|
+
TOKEN_INIT: {
|
|
57
|
+
type: string;
|
|
58
|
+
token: string;
|
|
59
|
+
};
|
|
60
|
+
TOKEN_FAILED: {
|
|
61
|
+
type: string;
|
|
62
|
+
token: null;
|
|
63
|
+
};
|
|
64
|
+
NOTIFICATION_RECEIVED: {
|
|
65
|
+
title: string;
|
|
66
|
+
body: string;
|
|
67
|
+
subtitle: string;
|
|
68
|
+
badge: number;
|
|
69
|
+
sound: string;
|
|
70
|
+
data: unknown;
|
|
71
|
+
raw: IOSRawNotification | AndroidRawNotification;
|
|
72
|
+
};
|
|
73
|
+
NOTIFICATION_CLICKED: {
|
|
74
|
+
title: string;
|
|
75
|
+
body: string;
|
|
76
|
+
subtitle: string;
|
|
77
|
+
badge: number;
|
|
78
|
+
sound: string;
|
|
79
|
+
data: unknown;
|
|
80
|
+
raw: IOSRawNotificationResponse | AndroidRawNotificationResponse;
|
|
81
|
+
};
|
|
90
82
|
};
|
|
91
83
|
|
|
92
84
|
interface ComnyxNotificationsType {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useNotificationPermission = useNotificationPermission;
|
|
7
|
-
var _store = require("../store/store.js");
|
|
8
|
-
function useNotificationPermission() {
|
|
9
|
-
return (0, _store.useAppStore)(s => s.permissionGiven);
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=usePermissionChange.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_store","require","useNotificationPermission","useAppStore","s","permissionGiven"],"sourceRoot":"../../../src","sources":["hooks/usePermissionChange.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,SAASC,yBAAyBA,CAAA,EAAG;EAC1C,OAAO,IAAAC,kBAAW,EAAEC,CAAC,IAAKA,CAAC,CAACC,eAAe,CAAC;AAC9C","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useAppStore","useNotificationPermission","s","permissionGiven"],"sourceRoot":"../../../src","sources":["hooks/usePermissionChange.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,mBAAgB;AAE5C,OAAO,SAASC,yBAAyBA,CAAA,EAAG;EAC1C,OAAOD,WAAW,CAAEE,CAAC,IAAKA,CAAC,CAACC,eAAe,CAAC;AAC9C","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePermissionChange.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePermissionChange.ts"],"names":[],"mappings":"AAEA,wBAAgB,yBAAyB,YAExC"}
|