@developer_tribe/react-native-comnyx 0.13.5 → 0.13.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/android/src/main/java/com/comnyx/src/messaging/notifications/NotificationsService.kt +5 -0
- package/lib/typescript/src/__tests__/acumulator.test.d.ts +2 -0
- package/lib/typescript/src/__tests__/acumulator.test.d.ts.map +1 -0
- package/package.json +13 -25
- package/src/__tests__/acumulator.test.ts +216 -0
- package/android/generated/RCTAppDependencyProvider.h +0 -25
- package/android/generated/RCTAppDependencyProvider.mm +0 -55
- package/android/generated/RCTModulesConformingToProtocolsProvider.h +0 -18
- package/android/generated/RCTModulesConformingToProtocolsProvider.mm +0 -33
- package/android/generated/RCTThirdPartyComponentsProvider.h +0 -16
- package/android/generated/RCTThirdPartyComponentsProvider.mm +0 -23
- package/android/generated/ReactAppDependencyProvider.podspec +0 -34
- package/android/generated/jni/CMakeLists.txt +0 -36
- package/android/generated/jni/RNComnyxSpec-generated.cpp +0 -22
- package/android/generated/jni/RNComnyxSpec.h +0 -24
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +0 -17
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +0 -19
package/android/src/main/java/com/comnyx/src/messaging/notifications/NotificationsService.kt
CHANGED
|
@@ -5,6 +5,7 @@ import android.app.NotificationManager
|
|
|
5
5
|
import android.app.PendingIntent
|
|
6
6
|
import android.content.Context
|
|
7
7
|
import android.content.Intent
|
|
8
|
+
import android.graphics.BitmapFactory
|
|
8
9
|
import android.graphics.Color
|
|
9
10
|
import android.os.Build
|
|
10
11
|
import android.util.Log
|
|
@@ -125,6 +126,10 @@ class NotificationsHelper(private val context: Context) {
|
|
|
125
126
|
val iconResourceId = context.resources.getIdentifier("com.google.firebase.messaging.default_notification_icon", "drawable", context.packageName)
|
|
126
127
|
if (iconResourceId != 0) {
|
|
127
128
|
builder.setSmallIcon(iconResourceId)
|
|
129
|
+
val largeIconBitmap = BitmapFactory.decodeResource(context.resources, iconResourceId)
|
|
130
|
+
if (largeIconBitmap != null) {
|
|
131
|
+
builder.setLargeIcon(largeIconBitmap)
|
|
132
|
+
}
|
|
128
133
|
Logger.v("Using Firebase default notification icon", TAG)
|
|
129
134
|
} else {
|
|
130
135
|
try {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acumulator.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/acumulator.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@developer_tribe/react-native-comnyx",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.7",
|
|
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": "./src/index.ts",
|
|
@@ -21,25 +21,13 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"src",
|
|
23
23
|
"lib",
|
|
24
|
-
"android",
|
|
24
|
+
"android/src",
|
|
25
|
+
"android/build.gradle",
|
|
26
|
+
"android/gradle.properties",
|
|
25
27
|
"ios",
|
|
26
28
|
"cpp",
|
|
27
29
|
"*.podspec",
|
|
28
|
-
"react-native.config.js"
|
|
29
|
-
"!node_modules",
|
|
30
|
-
"!example",
|
|
31
|
-
"!example820",
|
|
32
|
-
"!server-scripts",
|
|
33
|
-
"!ios/build",
|
|
34
|
-
"!android/build",
|
|
35
|
-
"!android/gradle",
|
|
36
|
-
"!android/gradlew",
|
|
37
|
-
"!android/gradlew.bat",
|
|
38
|
-
"!android/local.properties",
|
|
39
|
-
"!**/__tests__",
|
|
40
|
-
"!**/__fixtures__",
|
|
41
|
-
"!**/__mocks__",
|
|
42
|
-
"!**/.*"
|
|
30
|
+
"react-native.config.js"
|
|
43
31
|
],
|
|
44
32
|
"scripts": {
|
|
45
33
|
"test": "jest --config jest.config.ts",
|
|
@@ -85,18 +73,18 @@
|
|
|
85
73
|
"eslint-plugin-prettier": "^5.0.1",
|
|
86
74
|
"jest": "^29.7.0",
|
|
87
75
|
"prettier": "^3.0.3",
|
|
76
|
+
"react-hook-form": "^7.66.0",
|
|
77
|
+
"react-native": "^0.82.1",
|
|
88
78
|
"react-native-builder-bob": "^0.33.1",
|
|
79
|
+
"react-native-mmkv": "^4.0.0",
|
|
80
|
+
"react-native-nitro-modules": "^0.31.4",
|
|
81
|
+
"react-native-safe-area-context": "^5.5.2",
|
|
89
82
|
"release-it": "^17.10.0",
|
|
90
83
|
"ts-jest": "^29.4.5",
|
|
91
84
|
"ts-node": "^10.9.2",
|
|
92
85
|
"typescript": "5.1.6",
|
|
93
86
|
"use-sync-external-store": "^1.5.0",
|
|
94
|
-
"zustand": "^5.0.3"
|
|
95
|
-
"react-hook-form": "^7.66.0",
|
|
96
|
-
"react-native-mmkv": "^4.0.0",
|
|
97
|
-
"react-native-nitro-modules": "^0.31.4",
|
|
98
|
-
"react-native-safe-area-context": "^5.5.2",
|
|
99
|
-
"react-native": "^0.82.1"
|
|
87
|
+
"zustand": "^5.0.3"
|
|
100
88
|
},
|
|
101
89
|
"resolutions": {
|
|
102
90
|
"@types/react": "^18.2.44",
|
|
@@ -104,11 +92,11 @@
|
|
|
104
92
|
},
|
|
105
93
|
"peerDependencies": {
|
|
106
94
|
"react": ">=19.0.0",
|
|
95
|
+
"react-hook-form": ">=7.66.0",
|
|
107
96
|
"react-native": ">=0.81.0",
|
|
108
97
|
"react-native-mmkv": ">=4.0.0",
|
|
109
98
|
"react-native-nitro-modules": ">=0.31.4",
|
|
110
|
-
"react-native-safe-area-context": ">=5.5.2"
|
|
111
|
-
"react-hook-form": ">=7.66.0"
|
|
99
|
+
"react-native-safe-area-context": ">=5.5.2"
|
|
112
100
|
},
|
|
113
101
|
"jest": {
|
|
114
102
|
"preset": "react-native",
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
// Mock timer functions
|
|
2
|
+
import { Accumulator } from '../register/Accumulator';
|
|
3
|
+
|
|
4
|
+
jest.useFakeTimers();
|
|
5
|
+
|
|
6
|
+
describe('Accumulator', () => {
|
|
7
|
+
let accumulator: Accumulator;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
// Create a new accumulator instance before each test
|
|
11
|
+
accumulator = new Accumulator();
|
|
12
|
+
jest.clearAllMocks();
|
|
13
|
+
jest.clearAllTimers();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
describe('register', () => {
|
|
17
|
+
it('should register a listener and initialize data', () => {
|
|
18
|
+
const mockListener = jest.fn();
|
|
19
|
+
accumulator.register(mockListener);
|
|
20
|
+
|
|
21
|
+
expect(accumulator.get()).toEqual({
|
|
22
|
+
customParameters: [],
|
|
23
|
+
integrationParameters: {},
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
describe('add', () => {
|
|
29
|
+
it('should throw error if register was not called', () => {
|
|
30
|
+
expect(() => {
|
|
31
|
+
accumulator.add({ customParameters: [] });
|
|
32
|
+
}).toThrow('Register data is not set');
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('should merge custom parameters correctly', () => {
|
|
36
|
+
const mockListener = jest.fn();
|
|
37
|
+
accumulator.register(mockListener);
|
|
38
|
+
|
|
39
|
+
accumulator.add({
|
|
40
|
+
customParameters: [{ name: 'param1', value: 'value1' }],
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
accumulator.add({
|
|
44
|
+
customParameters: [{ name: 'param2', value: 'value2' }],
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
expect(accumulator.get()?.customParameters).toEqual([
|
|
48
|
+
{ name: 'param1', value: 'value1' },
|
|
49
|
+
{ name: 'param2', value: 'value2' },
|
|
50
|
+
]);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it('should override existing custom parameters with same name', () => {
|
|
54
|
+
const mockListener = jest.fn();
|
|
55
|
+
accumulator.register(mockListener);
|
|
56
|
+
|
|
57
|
+
accumulator.add({
|
|
58
|
+
customParameters: [{ name: 'param1', value: 'value1' }],
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
accumulator.add({
|
|
62
|
+
customParameters: [{ name: 'param1', value: 'newValue' }],
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
expect(accumulator.get()?.customParameters).toEqual([
|
|
66
|
+
{ name: 'param1', value: 'newValue' },
|
|
67
|
+
]);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('should merge integration parameters', () => {
|
|
71
|
+
const mockListener = jest.fn();
|
|
72
|
+
accumulator.register(mockListener);
|
|
73
|
+
|
|
74
|
+
accumulator.add({
|
|
75
|
+
integrationParameters: {
|
|
76
|
+
onesignal: {
|
|
77
|
+
external_id: 'id1',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
accumulator.add({
|
|
83
|
+
integrationParameters: {
|
|
84
|
+
onesignal: {
|
|
85
|
+
external_id: 'id2',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
expect(accumulator.get()?.integrationParameters).toEqual({
|
|
91
|
+
onesignal: {
|
|
92
|
+
external_id: 'id2',
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
describe('flush', () => {
|
|
99
|
+
it('should call listener with accumulated data and reset custom parameters', async () => {
|
|
100
|
+
const mockListener = jest.fn().mockResolvedValue(undefined);
|
|
101
|
+
accumulator.register(mockListener);
|
|
102
|
+
|
|
103
|
+
accumulator.add({
|
|
104
|
+
customParameters: [{ name: 'param1', value: 'value1' }],
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
await accumulator.flush();
|
|
108
|
+
|
|
109
|
+
expect(mockListener).toHaveBeenCalledWith({
|
|
110
|
+
customParameters: [{ name: 'param1', value: 'value1' }],
|
|
111
|
+
integrationParameters: {},
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
expect(accumulator.get()?.customParameters).toEqual([]);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it('should throw error if register was not called', async () => {
|
|
118
|
+
await expect(accumulator.flush()).rejects.toThrow(
|
|
119
|
+
'Register data is not set'
|
|
120
|
+
);
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
describe('debounce', () => {
|
|
125
|
+
it('should call listener after debounce time', () => {
|
|
126
|
+
const mockListener = jest.fn();
|
|
127
|
+
accumulator.register(mockListener);
|
|
128
|
+
|
|
129
|
+
accumulator.add({
|
|
130
|
+
customParameters: [{ name: 'param1', value: 'value1' }],
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
expect(mockListener).not.toHaveBeenCalled();
|
|
134
|
+
|
|
135
|
+
// Fast forward debounce time (3000ms)
|
|
136
|
+
jest.advanceTimersByTime(3000);
|
|
137
|
+
|
|
138
|
+
expect(mockListener).toHaveBeenCalledWith({
|
|
139
|
+
customParameters: [{ name: 'param1', value: 'value1' }],
|
|
140
|
+
integrationParameters: {},
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it('should reset timer on multiple calls', () => {
|
|
145
|
+
const mockListener = jest.fn();
|
|
146
|
+
accumulator.register(mockListener);
|
|
147
|
+
|
|
148
|
+
accumulator.add({
|
|
149
|
+
customParameters: [{ name: 'param1', value: 'value1' }],
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// Advance halfway through debounce time
|
|
153
|
+
jest.advanceTimersByTime(1500);
|
|
154
|
+
|
|
155
|
+
accumulator.add({
|
|
156
|
+
customParameters: [{ name: 'param2', value: 'value2' }],
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// Advance halfway through debounce time again
|
|
160
|
+
jest.advanceTimersByTime(1500);
|
|
161
|
+
|
|
162
|
+
// Listener should not have been called yet
|
|
163
|
+
expect(mockListener).not.toHaveBeenCalled();
|
|
164
|
+
|
|
165
|
+
// Complete the debounce time
|
|
166
|
+
jest.advanceTimersByTime(1500);
|
|
167
|
+
|
|
168
|
+
expect(mockListener).toHaveBeenCalledWith({
|
|
169
|
+
customParameters: [
|
|
170
|
+
{ name: 'param1', value: 'value1' },
|
|
171
|
+
{ name: 'param2', value: 'value2' },
|
|
172
|
+
],
|
|
173
|
+
integrationParameters: {},
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
describe('clear and empty', () => {
|
|
179
|
+
it('should clear all data', () => {
|
|
180
|
+
const mockListener = jest.fn();
|
|
181
|
+
accumulator.register(mockListener);
|
|
182
|
+
|
|
183
|
+
accumulator.add({
|
|
184
|
+
customParameters: [{ name: 'param1', value: 'value1' }],
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
accumulator.clear();
|
|
188
|
+
expect(accumulator.get()).toBeNull();
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
it('should empty data to an empty object', () => {
|
|
192
|
+
const mockListener = jest.fn();
|
|
193
|
+
accumulator.register(mockListener);
|
|
194
|
+
|
|
195
|
+
accumulator.add({
|
|
196
|
+
customParameters: [{ name: 'param1', value: 'value1' }],
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
accumulator.empty();
|
|
200
|
+
expect(accumulator.get()).toEqual({});
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
describe('isListenerCalledOnce', () => {
|
|
205
|
+
it('should return true after listener is called', async () => {
|
|
206
|
+
const mockListener = jest.fn().mockResolvedValue(undefined);
|
|
207
|
+
accumulator.register(mockListener);
|
|
208
|
+
|
|
209
|
+
expect(accumulator.isListenerCalledOnce()).toBeFalsy();
|
|
210
|
+
|
|
211
|
+
await accumulator.flush();
|
|
212
|
+
|
|
213
|
+
expect(accumulator.isListenerCalledOnce()).toBeTruthy();
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
|
|
11
|
-
#if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
|
|
12
|
-
#import <React-RCTAppDelegate/RCTDependencyProvider.h>
|
|
13
|
-
#elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
|
|
14
|
-
#import <React_RCTAppDelegate/RCTDependencyProvider.h>
|
|
15
|
-
#else
|
|
16
|
-
#import "RCTDependencyProvider.h"
|
|
17
|
-
#endif
|
|
18
|
-
|
|
19
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
20
|
-
|
|
21
|
-
@interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
|
|
22
|
-
|
|
23
|
-
@end
|
|
24
|
-
|
|
25
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import "RCTAppDependencyProvider.h"
|
|
9
|
-
#import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
|
|
10
|
-
#import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
|
|
11
|
-
|
|
12
|
-
@implementation RCTAppDependencyProvider {
|
|
13
|
-
NSArray<NSString *> * _URLRequestHandlerClassNames;
|
|
14
|
-
NSArray<NSString *> * _imageDataDecoderClassNames;
|
|
15
|
-
NSArray<NSString *> * _imageURLLoaderClassNames;
|
|
16
|
-
NSDictionary<NSString *,Class<RCTComponentViewProtocol>> * _thirdPartyFabricComponents;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
- (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
|
|
20
|
-
static dispatch_once_t requestUrlToken;
|
|
21
|
-
dispatch_once(&requestUrlToken, ^{
|
|
22
|
-
self->_URLRequestHandlerClassNames = RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
return _URLRequestHandlerClassNames;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
- (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
|
|
29
|
-
static dispatch_once_t dataDecoderToken;
|
|
30
|
-
dispatch_once(&dataDecoderToken, ^{
|
|
31
|
-
_imageDataDecoderClassNames = RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
return _imageDataDecoderClassNames;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
- (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
|
|
38
|
-
static dispatch_once_t urlLoaderToken;
|
|
39
|
-
dispatch_once(&urlLoaderToken, ^{
|
|
40
|
-
_imageURLLoaderClassNames = RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
return _imageURLLoaderClassNames;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
- (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
|
|
47
|
-
static dispatch_once_t nativeComponentsToken;
|
|
48
|
-
dispatch_once(&nativeComponentsToken, ^{
|
|
49
|
-
_thirdPartyFabricComponents = RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
return _thirdPartyFabricComponents;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
@interface RCTModulesConformingToProtocolsProvider: NSObject
|
|
11
|
-
|
|
12
|
-
+(NSArray<NSString *> *)imageURLLoaderClassNames;
|
|
13
|
-
|
|
14
|
-
+(NSArray<NSString *> *)imageDataDecoderClassNames;
|
|
15
|
-
|
|
16
|
-
+(NSArray<NSString *> *)URLRequestHandlerClassNames;
|
|
17
|
-
|
|
18
|
-
@end
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import "RCTModulesConformingToProtocolsProvider.h"
|
|
9
|
-
|
|
10
|
-
@implementation RCTModulesConformingToProtocolsProvider
|
|
11
|
-
|
|
12
|
-
+(NSArray<NSString *> *)imageURLLoaderClassNames
|
|
13
|
-
{
|
|
14
|
-
return @[
|
|
15
|
-
|
|
16
|
-
];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
+(NSArray<NSString *> *)imageDataDecoderClassNames
|
|
20
|
-
{
|
|
21
|
-
return @[
|
|
22
|
-
|
|
23
|
-
];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
+(NSArray<NSString *> *)URLRequestHandlerClassNames
|
|
27
|
-
{
|
|
28
|
-
return @[
|
|
29
|
-
|
|
30
|
-
];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
@protocol RCTComponentViewProtocol;
|
|
11
|
-
|
|
12
|
-
@interface RCTThirdPartyComponentsProvider: NSObject
|
|
13
|
-
|
|
14
|
-
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
|
|
15
|
-
|
|
16
|
-
@end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
|
|
11
|
-
#import "RCTThirdPartyComponentsProvider.h"
|
|
12
|
-
#import <React/RCTComponentViewProtocol.h>
|
|
13
|
-
|
|
14
|
-
@implementation RCTThirdPartyComponentsProvider
|
|
15
|
-
|
|
16
|
-
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
|
|
17
|
-
{
|
|
18
|
-
return @{
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@end
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
#
|
|
3
|
-
# This source code is licensed under the MIT license found in the
|
|
4
|
-
# LICENSE file in the root directory of this source tree.
|
|
5
|
-
|
|
6
|
-
version = "0.78.1"
|
|
7
|
-
source = { :git => 'https://github.com/facebook/react-native.git' }
|
|
8
|
-
if version == '1000.0.0'
|
|
9
|
-
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
10
|
-
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
11
|
-
else
|
|
12
|
-
source[:tag] = "v#{version}"
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
Pod::Spec.new do |s|
|
|
16
|
-
s.name = "ReactAppDependencyProvider"
|
|
17
|
-
s.version = version
|
|
18
|
-
s.summary = "The third party dependency provider for the app"
|
|
19
|
-
s.homepage = "https://reactnative.dev/"
|
|
20
|
-
s.documentation_url = "https://reactnative.dev/"
|
|
21
|
-
s.license = "MIT"
|
|
22
|
-
s.author = "Meta Platforms, Inc. and its affiliates"
|
|
23
|
-
s.platforms = min_supported_versions
|
|
24
|
-
s.source = source
|
|
25
|
-
s.source_files = "**/RCTAppDependencyProvider.{h,mm}"
|
|
26
|
-
|
|
27
|
-
# This guard prevent to install the dependencies when we run `pod install` in the old architecture.
|
|
28
|
-
s.pod_target_xcconfig = {
|
|
29
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
|
30
|
-
"DEFINES_MODULE" => "YES"
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
s.dependency "ReactCodegen"
|
|
34
|
-
end
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
#
|
|
3
|
-
# This source code is licensed under the MIT license found in the
|
|
4
|
-
# LICENSE file in the root directory of this source tree.
|
|
5
|
-
|
|
6
|
-
cmake_minimum_required(VERSION 3.13)
|
|
7
|
-
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
8
|
-
|
|
9
|
-
file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNComnyxSpec/*.cpp)
|
|
10
|
-
|
|
11
|
-
add_library(
|
|
12
|
-
react_codegen_RNComnyxSpec
|
|
13
|
-
OBJECT
|
|
14
|
-
${react_codegen_SRCS}
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
target_include_directories(react_codegen_RNComnyxSpec PUBLIC . react/renderer/components/RNComnyxSpec)
|
|
18
|
-
|
|
19
|
-
target_link_libraries(
|
|
20
|
-
react_codegen_RNComnyxSpec
|
|
21
|
-
fbjni
|
|
22
|
-
jsi
|
|
23
|
-
# We need to link different libraries based on whether we are building rncore or not, that's necessary
|
|
24
|
-
# because we want to break a circular dependency between react_codegen_rncore and reactnative
|
|
25
|
-
reactnative
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
target_compile_options(
|
|
29
|
-
react_codegen_RNComnyxSpec
|
|
30
|
-
PRIVATE
|
|
31
|
-
-DLOG_TAG=\"ReactNative\"
|
|
32
|
-
-fexceptions
|
|
33
|
-
-frtti
|
|
34
|
-
-std=c++20
|
|
35
|
-
-Wall
|
|
36
|
-
)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJniCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "RNComnyxSpec.h"
|
|
12
|
-
|
|
13
|
-
namespace facebook::react {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
std::shared_ptr<TurboModule> RNComnyxSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) {
|
|
18
|
-
|
|
19
|
-
return nullptr;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
} // namespace facebook::react
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJniH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include <ReactCommon/JavaTurboModule.h>
|
|
14
|
-
#include <ReactCommon/TurboModule.h>
|
|
15
|
-
#include <jsi/jsi.h>
|
|
16
|
-
|
|
17
|
-
namespace facebook::react {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
JSI_EXPORT
|
|
22
|
-
std::shared_ptr<TurboModule> RNComnyxSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms);
|
|
23
|
-
|
|
24
|
-
} // namespace facebook::react
|
package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#include "RNComnyxSpecJSI.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} // namespace facebook::react
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleH.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <ReactCommon/TurboModule.h>
|
|
13
|
-
#include <react/bridging/Bridging.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} // namespace facebook::react
|