@developer_tribe/react-native-comnyx 0.12.3 → 0.12.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/ios/Comnyx.swift +7 -7
- package/lib/commonjs/hooks/{useIsRegistered.js → useIsComnyxRegistered.js} +4 -5
- package/lib/commonjs/hooks/useIsComnyxRegistered.js.map +1 -0
- package/lib/commonjs/index.js +3 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/hooks/{useIsRegistered.js → useIsComnyxRegistered.js} +3 -3
- package/lib/module/hooks/useIsComnyxRegistered.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/src/hooks/{useIsRegistered.d.ts → useIsComnyxRegistered.d.ts} +2 -2
- package/lib/typescript/src/hooks/useIsComnyxRegistered.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/hooks/{useIsRegistered.ts → useIsComnyxRegistered.ts} +2 -2
- package/src/index.ts +1 -1
- package/src/version.ts +1 -1
- package/ios/PushService.swift +0 -7
- package/lib/commonjs/hooks/useIsRegistered.js.map +0 -1
- package/lib/module/hooks/useIsRegistered.js.map +0 -1
- package/lib/typescript/src/hooks/useIsRegistered.d.ts.map +0 -1
package/ios/Comnyx.swift
CHANGED
|
@@ -63,10 +63,10 @@ class Comnyx: RCTEventEmitter {
|
|
|
63
63
|
"threadIdentifier": response.notification.request.content.threadIdentifier
|
|
64
64
|
]
|
|
65
65
|
]
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
]
|
|
68
68
|
]
|
|
69
|
-
self.sendEvent(withName: "NOTIFICATION_CLICKED", body:
|
|
69
|
+
self.sendEvent(withName: "NOTIFICATION_CLICKED", body: responseData)
|
|
70
70
|
})
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -135,7 +135,7 @@ class Comnyx: RCTEventEmitter {
|
|
|
135
135
|
@objc
|
|
136
136
|
func initialize(_ resolve: @escaping RCTPromiseResolveBlock, reject reject: @escaping RCTPromiseRejectBlock) {
|
|
137
137
|
self.comnyxMessaging!.initialize(onInitialized: { initialized in
|
|
138
|
-
|
|
138
|
+
|
|
139
139
|
var countryCode = "US"
|
|
140
140
|
var language = "en"
|
|
141
141
|
if #available(iOS 16, *) {
|
|
@@ -146,7 +146,7 @@ class Comnyx: RCTEventEmitter {
|
|
|
146
146
|
language = Locale.current.languageCode ?? "en"
|
|
147
147
|
}
|
|
148
148
|
let timezone = TimeZone.current.identifier
|
|
149
|
-
|
|
149
|
+
|
|
150
150
|
resolve([
|
|
151
151
|
"success": initialized,
|
|
152
152
|
"country": countryCode,
|
|
@@ -191,15 +191,15 @@ class Comnyx: RCTEventEmitter {
|
|
|
191
191
|
static func registerDeviceToken(_ deviceToken: Data) {
|
|
192
192
|
let token = deviceToken.map { String(format: "%02.2hhx", $0) }.joined()
|
|
193
193
|
print("Device Token: \(token)")
|
|
194
|
-
|
|
194
|
+
|
|
195
195
|
// Post notification for RCT modules to handle
|
|
196
196
|
NotificationCenter.default.post(
|
|
197
197
|
name: NSNotification.Name("RCTRemoteNotificationRegistered"),
|
|
198
198
|
object: self,
|
|
199
199
|
userInfo: ["deviceToken": token]
|
|
200
|
-
)
|
|
200
|
+
)
|
|
201
201
|
}
|
|
202
|
-
|
|
202
|
+
|
|
203
203
|
@objc
|
|
204
204
|
static func registerDeviceTokenFailed(_ error: Error) {
|
|
205
205
|
print("Device Token Failed: \(error)")
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.useIsComnyxRegistered = useIsComnyxRegistered;
|
|
7
7
|
var _store = require("../store/store.js");
|
|
8
8
|
/**
|
|
9
9
|
* @returns {boolean} True if the user is attempted to register, false otherwise.
|
|
10
10
|
* This will not indicate that user is logged in it only shows the user registered and ready to add custom data.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
function useIsComnyxRegistered() {
|
|
13
13
|
return (0, _store.useAppStore)(state => state.registered);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=useIsRegistered.js.map
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=useIsComnyxRegistered.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_store","require","useIsComnyxRegistered","useAppStore","state","registered"],"sourceRoot":"../../../src","sources":["hooks/useIsComnyxRegistered.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACO,SAASC,qBAAqBA,CAAA,EAAG;EACtC,OAAO,IAAAC,kBAAW,EAAEC,KAAK,IAAKA,KAAK,CAACC,UAAU,CAAC;AACjD","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -33,10 +33,10 @@ Object.defineProperty(exports, "registerOneSignalForComnyx", {
|
|
|
33
33
|
return _collectData.registerOneSignalForComnyx;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
Object.defineProperty(exports, "
|
|
36
|
+
Object.defineProperty(exports, "useIsComnyxRegistered", {
|
|
37
37
|
enumerable: true,
|
|
38
38
|
get: function () {
|
|
39
|
-
return
|
|
39
|
+
return _useIsComnyxRegistered.useIsComnyxRegistered;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
var _index = require("./register/index.js");
|
|
@@ -44,5 +44,5 @@ var _index2 = require("./support/index.js");
|
|
|
44
44
|
var _index3 = require("./notifications/index.js");
|
|
45
45
|
var _NativeComnyx = require("./NativeComnyx.js");
|
|
46
46
|
var _collectData = require("./register/collectData.js");
|
|
47
|
-
var
|
|
47
|
+
var _useIsComnyxRegistered = require("./hooks/useIsComnyxRegistered.js");
|
|
48
48
|
//# 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","_useIsComnyxRegistered"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AAGA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAL,OAAA","ignoreList":[]}
|
package/lib/commonjs/version.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useAppStore } from "../store/store.js";
|
|
|
6
6
|
* @returns {boolean} True if the user is attempted to register, false otherwise.
|
|
7
7
|
* This will not indicate that user is logged in it only shows the user registered and ready to add custom data.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export function useIsComnyxRegistered() {
|
|
10
10
|
return useAppStore(state => state.registered);
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=useIsComnyxRegistered.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useAppStore","useIsComnyxRegistered","state","registered"],"sourceRoot":"../../../src","sources":["hooks/useIsComnyxRegistered.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,mBAAgB;;AAE5C;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAA,EAAG;EACtC,OAAOD,WAAW,CAAEE,KAAK,IAAKA,KAAK,CAACC,UAAU,CAAC;AACjD","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -8,5 +8,5 @@ export { NotificationPermissionStatus } from "./NativeComnyx.js";
|
|
|
8
8
|
|
|
9
9
|
//deprecated
|
|
10
10
|
export { registerOneSignalForComnyx } from "./register/collectData.js";
|
|
11
|
-
export {
|
|
11
|
+
export { useIsComnyxRegistered } from "./hooks/useIsComnyxRegistered.js";
|
|
12
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","useIsComnyxRegistered"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AACA,SAASA,MAAM,QAAQ,qBAAY;AACnC,SAASC,aAAa,QAAQ,oBAAW;AACzC,SAASC,mBAAmB,QAAQ,0BAAiB;AACrD;AACA,SAASC,4BAA4B,QAAQ,mBAAgB;;AAE7D;AACA,SAASC,0BAA0B,QAAQ,2BAAwB;AACnE,SAASC,qBAAqB,QAAQ,kCAA+B","ignoreList":[]}
|
package/lib/module/version.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* @returns {boolean} True if the user is attempted to register, false otherwise.
|
|
3
3
|
* This will not indicate that user is logged in it only shows the user registered and ready to add custom data.
|
|
4
4
|
*/
|
|
5
|
-
export declare
|
|
6
|
-
//# sourceMappingURL=
|
|
5
|
+
export declare function useIsComnyxRegistered(): boolean;
|
|
6
|
+
//# sourceMappingURL=useIsComnyxRegistered.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsComnyxRegistered.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useIsComnyxRegistered.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,qBAAqB,YAEpC"}
|
|
@@ -4,5 +4,5 @@ export { ComnyxSupport } from './support';
|
|
|
4
4
|
export { ComnyxNotifications } from './notifications';
|
|
5
5
|
export { NotificationPermissionStatus } from './NativeComnyx';
|
|
6
6
|
export { registerOneSignalForComnyx } from './register/collectData';
|
|
7
|
-
export {
|
|
7
|
+
export { useIsComnyxRegistered } from './hooks/useIsComnyxRegistered';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAG9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAG9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.12.
|
|
1
|
+
export declare const VERSION = "0.12.5";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@developer_tribe/react-native-comnyx",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.5",
|
|
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",
|
|
@@ -4,6 +4,6 @@ import { useAppStore } from '../store/store';
|
|
|
4
4
|
* @returns {boolean} True if the user is attempted to register, false otherwise.
|
|
5
5
|
* This will not indicate that user is logged in it only shows the user registered and ready to add custom data.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export function useIsComnyxRegistered() {
|
|
8
8
|
return useAppStore((state) => state.registered);
|
|
9
|
-
}
|
|
9
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -7,4 +7,4 @@ export { NotificationPermissionStatus } from './NativeComnyx';
|
|
|
7
7
|
|
|
8
8
|
//deprecated
|
|
9
9
|
export { registerOneSignalForComnyx } from './register/collectData';
|
|
10
|
-
export {
|
|
10
|
+
export { useIsComnyxRegistered } from './hooks/useIsComnyxRegistered';
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated. Do not edit manually.
|
|
2
|
-
export const VERSION = '0.12.
|
|
2
|
+
export const VERSION = '0.12.5';
|
package/ios/PushService.swift
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_store","require","useIsRegistered","useAppStore","state","registered","exports"],"sourceRoot":"../../../src","sources":["hooks/useIsRegistered.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACO,MAAMC,eAAe,GAAGA,CAAA,KAAM;EACnC,OAAO,IAAAC,kBAAW,EAAEC,KAAK,IAAKA,KAAK,CAACC,UAAU,CAAC;AACjD,CAAC;AAACC,OAAA,CAAAJ,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useAppStore","useIsRegistered","state","registered"],"sourceRoot":"../../../src","sources":["hooks/useIsRegistered.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,mBAAgB;;AAE5C;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAAM;EACnC,OAAOD,WAAW,CAAEE,KAAK,IAAKA,KAAK,CAACC,UAAU,CAAC;AACjD,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIsRegistered.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useIsRegistered.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,eAAe,eAE3B,CAAC"}
|