react-native-acoustic-connect-beta 18.0.12 → 18.0.13
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/Examples/SampleUI/src/RootNavigator.tsx +1 -1
- package/Examples/SampleUI/src/index.native.tsx +46 -31
- package/android/src/main/assets/ConnectAdvancedConfig.json +1 -1
- package/android/src/main/assets/TealeafAdvancedConfig.json +1 -1
- package/lib/commonjs/TLTRN.js +219 -0
- package/lib/commonjs/TLTRN.js.map +1 -0
- package/lib/commonjs/components/Connect.js +37 -30
- package/lib/commonjs/components/Connect.js.map +1 -1
- package/lib/commonjs/components/ConnectProfiler.js +45 -0
- package/lib/commonjs/components/ConnectProfiler.js.map +1 -0
- package/lib/commonjs/index.js +14 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/KeyboardListener.js +110 -0
- package/lib/commonjs/utils/KeyboardListener.js.map +1 -0
- package/lib/module/TLTRN.js +214 -0
- package/lib/module/TLTRN.js.map +1 -0
- package/lib/module/components/Connect.js +37 -30
- package/lib/module/components/Connect.js.map +1 -1
- package/lib/module/components/ConnectProfiler.js +40 -0
- package/lib/module/components/ConnectProfiler.js.map +1 -0
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/KeyboardListener.js +105 -0
- package/lib/module/utils/KeyboardListener.js.map +1 -0
- package/lib/typescript/src/TLTRN.d.ts +47 -0
- package/lib/typescript/src/TLTRN.d.ts.map +1 -0
- package/lib/typescript/src/components/Connect.d.ts +2 -1
- package/lib/typescript/src/components/Connect.d.ts.map +1 -1
- package/lib/typescript/src/components/ConnectProfiler.d.ts +23 -0
- package/lib/typescript/src/components/ConnectProfiler.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/{jslib/components/ConnectProfiler.js → lib/typescript/src/utils/KeyboardListener.d.ts} +9 -29
- package/lib/typescript/src/utils/KeyboardListener.d.ts.map +1 -0
- package/package.json +1 -2
- package/scripts/ConnectConfig.json +1 -1
- package/{jslib/TLTRN.js → src/TLTRN.ts} +54 -39
- package/src/components/Connect.tsx +102 -86
- package/src/components/ConnectProfiler.ts +43 -0
- package/src/index.ts +4 -2
- package/src/utils/KeyboardListener.ts +113 -0
- package/jslib/utils/KeyboardListener.js +0 -100
- package/lib/typescript/jslib/TLTRN.d.ts +0 -37
- package/lib/typescript/jslib/TLTRN.d.ts.map +0 -1
- package/lib/typescript/jslib/components/ConnectProfiler.d.ts +0 -10
- package/lib/typescript/jslib/components/ConnectProfiler.d.ts.map +0 -1
- package/lib/typescript/jslib/utils/KeyboardListener.d.ts +0 -10
- package/lib/typescript/jslib/utils/KeyboardListener.d.ts.map +0 -1
|
@@ -15,7 +15,7 @@ import ExampleList, { examples } from './ExampleList';
|
|
|
15
15
|
// Log all exported items from the module
|
|
16
16
|
import AcousticConnectRN from 'react-native-acoustic-connect-beta';
|
|
17
17
|
import * as AcousticConnectBeta from 'react-native-acoustic-connect-beta';
|
|
18
|
-
console.log('Exported items from react-native-acoustic-connect-beta:', AcousticConnectBeta);
|
|
18
|
+
console.log('RootNavigator.tsx:Exported items from react-native-acoustic-connect-beta:', AcousticConnectBeta);
|
|
19
19
|
|
|
20
20
|
const result = AcousticConnectRN.logCustomEvent('test', {test: 'test'}, 1);
|
|
21
21
|
console.log('result', result);
|
|
@@ -32,6 +32,12 @@ import DrawerItems from './DrawerItems';
|
|
|
32
32
|
import App from './RootNavigator';
|
|
33
33
|
import { deviceColorsSupported } from '../utils';
|
|
34
34
|
|
|
35
|
+
import * as AcousticConnectBeta from 'react-native-acoustic-connect-beta';
|
|
36
|
+
console.log('index.native.tsx:Exported items from react-native-acoustic-connect-beta:', AcousticConnectBeta);
|
|
37
|
+
import { NavigationContainerRef } from '@react-navigation/native';
|
|
38
|
+
import { useRef } from 'react';
|
|
39
|
+
|
|
40
|
+
|
|
35
41
|
const PERSISTENCE_KEY = 'NAVIGATION_STATE';
|
|
36
42
|
const PREFERENCES_KEY = 'APP_PREFERENCES';
|
|
37
43
|
|
|
@@ -58,6 +64,9 @@ const Drawer = createDrawerNavigator<{ Home: undefined }>();
|
|
|
58
64
|
export default function PaperExample() {
|
|
59
65
|
useKeepAwake();
|
|
60
66
|
|
|
67
|
+
// Add for Acoustic Connect SDK
|
|
68
|
+
const navigationRef = useRef<NavigationContainerRef>(null);
|
|
69
|
+
|
|
61
70
|
const [fontsLoaded] = useFonts({
|
|
62
71
|
Abel: require('../assets/fonts/Abel-Regular.ttf'),
|
|
63
72
|
});
|
|
@@ -232,37 +241,43 @@ export default function PaperExample() {
|
|
|
232
241
|
>
|
|
233
242
|
<PreferencesContext.Provider value={preferences}>
|
|
234
243
|
<React.Fragment>
|
|
235
|
-
<
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
{(
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
244
|
+
<AcousticConnectBeta.Connect
|
|
245
|
+
captureKeyboardEvents={true}
|
|
246
|
+
navigationRef={navigationRef} // Pass the ref to Connect
|
|
247
|
+
>
|
|
248
|
+
<NavigationContainer
|
|
249
|
+
ref={navigationRef} // Pass the same ref to NavigationContainer
|
|
250
|
+
theme={combinedTheme}
|
|
251
|
+
initialState={initialState}
|
|
252
|
+
onStateChange={(state) =>
|
|
253
|
+
AsyncStorage.setItem(PERSISTENCE_KEY, JSON.stringify(state))
|
|
254
|
+
}
|
|
255
|
+
>
|
|
256
|
+
<SafeAreaInsetsContext.Consumer>
|
|
257
|
+
{(insets) => {
|
|
258
|
+
const { left, right } = insets || { left: 0, right: 0 };
|
|
259
|
+
const collapsedDrawerWidth = 80 + Math.max(left, right);
|
|
260
|
+
return (
|
|
261
|
+
<Drawer.Navigator
|
|
262
|
+
screenOptions={{
|
|
263
|
+
drawerStyle: collapsed && {
|
|
264
|
+
width: collapsedDrawerWidth,
|
|
265
|
+
},
|
|
266
|
+
}}
|
|
267
|
+
drawerContent={() => <DrawerItems />}
|
|
268
|
+
>
|
|
269
|
+
<Drawer.Screen
|
|
270
|
+
name="Home"
|
|
271
|
+
component={App}
|
|
272
|
+
options={{ headerShown: false }}
|
|
273
|
+
/>
|
|
274
|
+
</Drawer.Navigator>
|
|
275
|
+
);
|
|
276
|
+
}}
|
|
277
|
+
</SafeAreaInsetsContext.Consumer>
|
|
278
|
+
<StatusBar style={!theme.isV3 || theme.dark ? 'light' : 'dark'} />
|
|
279
|
+
</NavigationContainer>
|
|
280
|
+
</AcousticConnectBeta.Connect>
|
|
266
281
|
</React.Fragment>
|
|
267
282
|
</PreferencesContext.Provider>
|
|
268
283
|
</PaperProvider>
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _MessageQueue = _interopRequireDefault(require("react-native/Libraries/BatchedBridge/MessageQueue.js"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _KeyboardListener = _interopRequireDefault(require("./utils/KeyboardListener"));
|
|
10
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/********************************************************************************************
|
|
13
|
+
* Copyright (C) 2025 Acoustic, L.P. All rights reserved.
|
|
14
|
+
*
|
|
15
|
+
* NOTICE: This file contains material that is confidential and proprietary to
|
|
16
|
+
* Acoustic, L.P. and/or other developers. No license is granted under any intellectual or
|
|
17
|
+
* industrial property rights of Acoustic, L.P. except as may be provided in an agreement with
|
|
18
|
+
* Acoustic, L.P. Any unauthorized copying or distribution of content from this file is
|
|
19
|
+
* prohibited.
|
|
20
|
+
********************************************************************************************/
|
|
21
|
+
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
global.ErrorUtils.setGlobalHandler((e, _isFatal) => {
|
|
26
|
+
_index.default.logExceptionEvent(JSON.stringify(e), JSON.stringify(e), true);
|
|
27
|
+
});
|
|
28
|
+
class TLTRN {
|
|
29
|
+
static currentScreen = "***initialCurrentScreen not set in ConnectLogger constructor***";
|
|
30
|
+
static lastJSBridgeMessageTime = 0;
|
|
31
|
+
static totalRenderTime = 0;
|
|
32
|
+
static messageRenderTime = 0;
|
|
33
|
+
static countMsgs = 0;
|
|
34
|
+
static messageConsole = 0;
|
|
35
|
+
static lastMessageConsole = 0;
|
|
36
|
+
static isLoggingData = 0;
|
|
37
|
+
static displayDebug = false;
|
|
38
|
+
static myTimer = {
|
|
39
|
+
handle: null,
|
|
40
|
+
started: 0,
|
|
41
|
+
time: 1000,
|
|
42
|
+
/**
|
|
43
|
+
* @type Class
|
|
44
|
+
*/
|
|
45
|
+
startTimer: function () {
|
|
46
|
+
this.started = 1;
|
|
47
|
+
this.handle = setInterval(TLTRN.checkTime, this.time);
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* @type Class
|
|
51
|
+
*/
|
|
52
|
+
stopTimer: function () {
|
|
53
|
+
if (this.handle) {
|
|
54
|
+
clearInterval(this.handle);
|
|
55
|
+
this.handle = null;
|
|
56
|
+
this.started = 0;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
static init = (initialCurrentScreen, showDebugConsoleMessages) => {
|
|
61
|
+
TLTRN.currentScreen = initialCurrentScreen === undefined
|
|
62
|
+
// @ts-ignore:
|
|
63
|
+
? currentScreenMsg : initialCurrentScreen;
|
|
64
|
+
_MessageQueue.default.spy(TLTRN.listenToBridge);
|
|
65
|
+
TLTRN.displayDebug = showDebugConsoleMessages === undefined ? false : showDebugConsoleMessages;
|
|
66
|
+
};
|
|
67
|
+
static interceptKeyboardEvents = enable => {
|
|
68
|
+
keyListener.interceptKeyboardEvents(enable);
|
|
69
|
+
};
|
|
70
|
+
static logScreenViewPageName = name => {
|
|
71
|
+
let result = false;
|
|
72
|
+
try {
|
|
73
|
+
result = _index.default.setCurrentScreenName(name || '');
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.log('LogScreenViewPageName error: ', error.message);
|
|
76
|
+
}
|
|
77
|
+
return result;
|
|
78
|
+
};
|
|
79
|
+
static logScreenViewContextLoad = (name, prevName) => {
|
|
80
|
+
let result = false;
|
|
81
|
+
try {
|
|
82
|
+
result = _index.default.logScreenViewContextLoad(name, prevName);
|
|
83
|
+
} catch (error) {
|
|
84
|
+
console.log('LogScreenViewContextLoad error: ', error.message);
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
};
|
|
88
|
+
static logScreenLayout = name => {
|
|
89
|
+
TLTRN.currentScreen = name || '';
|
|
90
|
+
let result = false;
|
|
91
|
+
try {
|
|
92
|
+
result = _index.default.logScreenLayout(TLTRN.currentScreen, 0);
|
|
93
|
+
} catch (error) {
|
|
94
|
+
console.log('LogScreenLayout error: ', error.message);
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
};
|
|
98
|
+
static logClickEvent = async event => {
|
|
99
|
+
let result = false;
|
|
100
|
+
if (!event.target || !event.target._nativeTag || typeof event.target._nativeTag === 'undefined') {
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
const events = event._dispatchInstances.filter(node => {
|
|
104
|
+
return node.memoizedProps && node.memoizedProps.id;
|
|
105
|
+
});
|
|
106
|
+
const id = events.length ? events[0].memoizedProps.id : '';
|
|
107
|
+
let target = event.target._nativeTag;
|
|
108
|
+
let controlId = event._targetInst.memoizedProps.id !== undefined ? event._targetInst.memoizedProps.id : id;
|
|
109
|
+
let ariaLabel = event._targetInst.memoizedProps.accessible !== undefined ? event._targetInst.memoizedProps.accessibilityLabel : '';
|
|
110
|
+
try {
|
|
111
|
+
if (_reactNative.Platform.OS === 'ios') {
|
|
112
|
+
result = _index.default.logClickEvent(target, controlId);
|
|
113
|
+
} else if (_reactNative.Platform.OS === 'android') {
|
|
114
|
+
result = _index.default.logClickEvent(target, controlId);
|
|
115
|
+
}
|
|
116
|
+
} catch (error) {
|
|
117
|
+
console.log('LogClickEvent error: ', error.message);
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
};
|
|
121
|
+
static logTextChangeEvent = async (target, controlId, text, _ariaLabel) => {
|
|
122
|
+
let result = false;
|
|
123
|
+
try {
|
|
124
|
+
if (_reactNative.Platform.OS === 'ios') {
|
|
125
|
+
result = _index.default.logTextChangeEvent(target, controlId, text);
|
|
126
|
+
} else if (_reactNative.Platform.OS === 'android') {
|
|
127
|
+
_index.default.logTextChangeEvent(target, controlId, text);
|
|
128
|
+
}
|
|
129
|
+
} catch (error) {
|
|
130
|
+
console.log('LogTextChangeEvent error: ', error.message);
|
|
131
|
+
}
|
|
132
|
+
return result;
|
|
133
|
+
};
|
|
134
|
+
static logCustomEvent = async (eventName, values, level) => {
|
|
135
|
+
let result = false;
|
|
136
|
+
try {
|
|
137
|
+
result = _index.default.logCustomEvent(eventName, values, level);
|
|
138
|
+
} catch (error) {
|
|
139
|
+
console.log('LogCustomEvent error: ', error.message);
|
|
140
|
+
}
|
|
141
|
+
return result;
|
|
142
|
+
};
|
|
143
|
+
static listenToBridge = message => {
|
|
144
|
+
if (TLTRN.displayDebug) {
|
|
145
|
+
console.log("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&:isLoggingData:" + TLTRN.isLoggingData);
|
|
146
|
+
}
|
|
147
|
+
if (TLTRN.isLoggingData == 1) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
var now = new Date().getTime();
|
|
151
|
+
if (TLTRN.lastJSBridgeMessageTime === 0) {
|
|
152
|
+
TLTRN.lastJSBridgeMessageTime = now;
|
|
153
|
+
}
|
|
154
|
+
if (TLTRN.messageConsole > 0) {
|
|
155
|
+
TLTRN.lastMessageConsole = TLTRN.messageConsole;
|
|
156
|
+
}
|
|
157
|
+
TLTRN.messageConsole = now;
|
|
158
|
+
TLTRN.countMsgs++;
|
|
159
|
+
if (TLTRN.myTimer.started === 0) {
|
|
160
|
+
TLTRN.myTimer.startTimer();
|
|
161
|
+
}
|
|
162
|
+
TLTRN.messageRenderTime = now - TLTRN.lastJSBridgeMessageTime;
|
|
163
|
+
TLTRN.totalRenderTime = TLTRN.totalRenderTime + TLTRN.messageRenderTime;
|
|
164
|
+
if (TLTRN.displayDebug) {
|
|
165
|
+
console.log("*after:countMsgs: " + TLTRN.countMsgs + ":tTotal:" + TLTRN.totalRenderTime + ":messageDuration:" + TLTRN.messageRenderTime);
|
|
166
|
+
}
|
|
167
|
+
TLTRN.lastJSBridgeMessageTime = now;
|
|
168
|
+
const from = message.type === 0 ? "N->JS" : "JS->N";
|
|
169
|
+
const data = from + " : " + message.module + "." + message.method + "(" + JSON.stringify(message.args) + ")";
|
|
170
|
+
if (TLTRN.displayDebug) {
|
|
171
|
+
if (message.module !== "UIManager") {
|
|
172
|
+
console.log("Message", message);
|
|
173
|
+
}
|
|
174
|
+
console.log("Message data:", data);
|
|
175
|
+
}
|
|
176
|
+
if (message.module === "ExceptionsManager") {
|
|
177
|
+
_index.default.logExceptionEvent(message.args[0], JSON.stringify(message.args[1]), true);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
static checkTime = () => {
|
|
181
|
+
var now = new Date().getTime();
|
|
182
|
+
if (TLTRN.displayDebug) {
|
|
183
|
+
console.log("======>Done compare total:" + TLTRN.totalRenderTime + " :lastMessageConsole:" + TLTRN.lastMessageConsole + ":now:" + now + ":diff:" + (now - TLTRN.lastMessageConsole) + ":" + (now - TLTRN.lastMessageConsole > 50));
|
|
184
|
+
}
|
|
185
|
+
if (TLTRN.lastMessageConsole == 0) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
if (now - TLTRN.lastMessageConsole > 20) {
|
|
189
|
+
if (TLTRN.displayDebug) {
|
|
190
|
+
console.log("======>Done capture:" + new Date().getTime());
|
|
191
|
+
}
|
|
192
|
+
TLTRN.messageConsole = 0;
|
|
193
|
+
TLTRN.lastMessageConsole = 0;
|
|
194
|
+
TLTRN.myTimer.stopTimer();
|
|
195
|
+
this.logTeal();
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
static logTeal = async () => {
|
|
199
|
+
try {
|
|
200
|
+
TLTRN.isLoggingData = 1;
|
|
201
|
+
var res = await _index.default.logScreenLayout(TLTRN.currentScreen, -1);
|
|
202
|
+
var dict = {
|
|
203
|
+
ReactLayoutTime: TLTRN.totalRenderTime
|
|
204
|
+
};
|
|
205
|
+
var result = await _index.default.logCustomEvent("ReactPlugin", dict, 1);
|
|
206
|
+
if (TLTRN.displayDebug) {
|
|
207
|
+
console.log("======>logTeal:" + TLTRN.currentScreen + ":" + res + ":time:" + TLTRN.totalRenderTime);
|
|
208
|
+
}
|
|
209
|
+
TLTRN.isLoggingData = 0;
|
|
210
|
+
TLTRN.lastJSBridgeMessageTime = 0;
|
|
211
|
+
TLTRN.totalRenderTime = 0;
|
|
212
|
+
} catch (e) {
|
|
213
|
+
console.error(e);
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
const keyListener = _KeyboardListener.default._instance(TLTRN);
|
|
218
|
+
var _default = exports.default = TLTRN;
|
|
219
|
+
//# sourceMappingURL=TLTRN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_MessageQueue","_interopRequireDefault","require","_reactNative","_KeyboardListener","_index","e","__esModule","default","global","ErrorUtils","setGlobalHandler","_isFatal","AcousticConnectRN","logExceptionEvent","JSON","stringify","TLTRN","currentScreen","lastJSBridgeMessageTime","totalRenderTime","messageRenderTime","countMsgs","messageConsole","lastMessageConsole","isLoggingData","displayDebug","myTimer","handle","started","time","startTimer","setInterval","checkTime","stopTimer","clearInterval","init","initialCurrentScreen","showDebugConsoleMessages","undefined","currentScreenMsg","MessageQueue","spy","listenToBridge","interceptKeyboardEvents","enable","keyListener","logScreenViewPageName","name","result","setCurrentScreenName","error","console","log","message","logScreenViewContextLoad","prevName","logScreenLayout","logClickEvent","event","target","_nativeTag","events","_dispatchInstances","filter","node","memoizedProps","id","length","controlId","_targetInst","ariaLabel","accessible","accessibilityLabel","Platform","OS","logTextChangeEvent","text","_ariaLabel","logCustomEvent","eventName","values","level","now","Date","getTime","from","type","data","module","method","args","logTeal","res","dict","ReactLayoutTime","KeyboardListener","_instance","_default","exports"],"sourceRoot":"../../src","sources":["TLTRN.ts"],"mappings":";;;;;;AAWA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAwC,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAdxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAMA;AACAG,MAAM,CAACC,UAAU,CAACC,gBAAgB,CAAC,CAACL,CAAM,EAAEM,QAAiB,KAAK;EAChEC,cAAiB,CAACC,iBAAiB,CAC/BC,IAAI,CAACC,SAAS,CAACV,CAAC,CAAC,EACjBS,IAAI,CAACC,SAAS,CAACV,CAAC,CAAC,EACjB,IACJ,CAAC;AACH,CAAC,CAAC;AAEF,MAAMW,KAAK,CAAC;EACV,OAAOC,aAAa,GAClB,iEAAiE;EACnE,OAAOC,uBAAuB,GAAG,CAAC;EAClC,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AM,GAAG,MAAMpC,cAAiB,CAACkE,cAAc,CAAC,aAAa,EAAEe,IAAI,EAAE,CAAC,CAAC;MAC3E,IAAI7E,KAAK,CAACS,YAAY,EAAE;QACtB0B,OAAO,CAACC,GAAG,CACT,iBAAiB,GACfpC,KAAK,CAACC,aAAa,GACnB,GAAG,GACH2E,GAAG,GACH,QAAQ,GACR5E,KAAK,CAACG,eACV,CAAC;MACH;MACAH,KAAK,CAACQ,aAAa,GAAG,CAAC;MACvBR,KAAK,CAACE,uBAAuB,GAAG,CAAC;MACjCF,KAAK,CAACG,eAAe,GAAG,CAAC;IAC3B,CAAC,CAAC,OAAOd,CAAC,EAAE;MACV8C,OAAO,CAACD,KAAK,CAAC7C,CAAC,CAAC;IAClB;EACF,CAAC;AACH;AACA,MAAMwC,WAAW,GAAGkD,yBAAgB,CAACC,SAAS,CAAChF,KAAK,CAAC;AAAC,IAAAiF,QAAA,GAAAC,OAAA,CAAA3F,OAAA,GAEvCS,KAAK","ignoreList":[]}
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _TLTRN = _interopRequireDefault(require("../TLTRN"));
|
|
9
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
11
13
|
/********************************************************************************************
|
|
12
14
|
* Copyright (C) 2025 Acoustic, L.P. All rights reserved.
|
|
@@ -18,57 +20,62 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
18
20
|
* prohibited.
|
|
19
21
|
********************************************************************************************/
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
// import TLTRN from '../TLTRN';
|
|
23
|
-
|
|
24
|
-
const Connect = ({
|
|
23
|
+
const Connect = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
25
24
|
children,
|
|
26
|
-
captureKeyboardEvents
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
captureKeyboardEvents,
|
|
26
|
+
navigationRef
|
|
27
|
+
}, ref) => {
|
|
28
|
+
const navigation = navigationRef || (0, _react.useRef)(null);
|
|
29
|
+
|
|
30
|
+
// Handle forwarded ref
|
|
31
|
+
(0, _react.useEffect)(() => {
|
|
32
|
+
if (ref && typeof ref === "object" && ref !== null) {
|
|
33
|
+
navigation.current = ref.current;
|
|
34
|
+
} else if (typeof ref === "function") {
|
|
35
|
+
ref(navigation.current);
|
|
36
|
+
}
|
|
37
|
+
}, [ref]);
|
|
29
38
|
const currentRoute = (0, _react.useRef)(undefined);
|
|
30
39
|
const initial = (0, _react.useRef)(false);
|
|
31
40
|
(0, _react.useEffect)(() => {
|
|
32
|
-
|
|
41
|
+
_TLTRN.default.interceptKeyboardEvents(captureKeyboardEvents);
|
|
33
42
|
}, [captureKeyboardEvents]);
|
|
34
43
|
(0, _react.useEffect)(() => {
|
|
35
|
-
if (!navigation || typeof navigation.current.addListener !== "function" || typeof navigation.current.getCurrentRoute !== "function") {
|
|
36
|
-
console.warn("Connect: The Connect component's
|
|
44
|
+
if (!navigation.current || typeof navigation.current.addListener !== "function" || typeof navigation.current.getCurrentRoute !== "function") {
|
|
45
|
+
console.warn("Connect: The Connect component's ref must be a NavigationContainer with a ref.");
|
|
37
46
|
return;
|
|
38
47
|
}
|
|
39
48
|
const unsubscribe = navigation.current.addListener("state", () => {
|
|
40
|
-
currentRoute.current = extractName(navigation)
|
|
49
|
+
currentRoute.current = extractName(navigation);
|
|
41
50
|
console.log("State change - ", currentRoute.current);
|
|
42
|
-
if (_reactNative.Platform.OS === "ios" && currentRoute
|
|
43
|
-
|
|
51
|
+
if (_reactNative.Platform.OS === "ios" && currentRoute.current) {
|
|
52
|
+
_TLTRN.default.logScreenViewPageName(currentRoute.current);
|
|
44
53
|
} else if (_reactNative.Platform.OS === "android") {
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
_TLTRN.default.logScreenViewPageName(currentRoute.current);
|
|
55
|
+
_TLTRN.default.logScreenLayout(currentRoute.current);
|
|
47
56
|
}
|
|
48
57
|
});
|
|
49
58
|
return unsubscribe;
|
|
50
59
|
}, [navigation]);
|
|
51
60
|
const onStartShouldSetResponderCapture = (0, _react.useCallback)(event => {
|
|
52
|
-
currentRoute.current = extractName(navigation)
|
|
53
|
-
if (currentRoute
|
|
54
|
-
|
|
61
|
+
currentRoute.current = extractName(navigation);
|
|
62
|
+
if (currentRoute.current) {
|
|
63
|
+
_TLTRN.default.logScreenViewPageName(currentRoute.current);
|
|
55
64
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return false; // Must be false; true means this component becomes the touch responder and events don't bubble
|
|
60
|
-
}, []);
|
|
65
|
+
_TLTRN.default.logClickEvent(event);
|
|
66
|
+
return false;
|
|
67
|
+
}, [navigation]);
|
|
61
68
|
const onLayout = (0, _react.useCallback)(event => {
|
|
62
69
|
if (initial.current) {
|
|
63
70
|
return false;
|
|
64
71
|
}
|
|
65
72
|
initial.current = true;
|
|
66
73
|
console.log("event - ", event.nativeEvent);
|
|
67
|
-
currentRoute.current = navigation.current
|
|
68
|
-
if (_reactNative.Platform.OS === "ios" && currentRoute
|
|
69
|
-
|
|
74
|
+
currentRoute.current = navigation.current?.getCurrentRoute()?.name;
|
|
75
|
+
if (_reactNative.Platform.OS === "ios" && currentRoute.current) {
|
|
76
|
+
_TLTRN.default.logScreenViewPageName(currentRoute.current);
|
|
70
77
|
} else if (_reactNative.Platform.OS === "android") {
|
|
71
|
-
|
|
78
|
+
_TLTRN.default.logScreenLayout(currentRoute.current);
|
|
72
79
|
}
|
|
73
80
|
return true;
|
|
74
81
|
}, [navigation]);
|
|
@@ -78,16 +85,16 @@ const Connect = ({
|
|
|
78
85
|
onStartShouldSetResponderCapture: onStartShouldSetResponderCapture,
|
|
79
86
|
children: children
|
|
80
87
|
});
|
|
81
|
-
};
|
|
88
|
+
});
|
|
82
89
|
function extractName(navigation) {
|
|
83
|
-
const routeParams = navigation.current
|
|
90
|
+
const routeParams = navigation.current?.getCurrentRoute()?.params;
|
|
84
91
|
if (routeParams) {
|
|
85
92
|
const {
|
|
86
93
|
name
|
|
87
94
|
} = routeParams;
|
|
88
95
|
return name || "";
|
|
89
96
|
}
|
|
90
|
-
return "";
|
|
97
|
+
return navigation.current?.getCurrentRoute()?.name || "";
|
|
91
98
|
}
|
|
92
99
|
var _default = exports.default = Connect;
|
|
93
100
|
const styles = _reactNative.StyleSheet.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_TLTRN","_interopRequireDefault","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Connect","forwardRef","children","captureKeyboardEvents","navigationRef","ref","navigation","useRef","useEffect","current","currentRoute","undefined","initial","TLTRN","interceptKeyboardEvents","addListener","getCurrentRoute","console","warn","unsubscribe","extractName","log","Platform","OS","logScreenViewPageName","logScreenLayout","onStartShouldSetResponderCapture","useCallback","event","logClickEvent","onLayout","nativeEvent","name","jsx","View","style","styles","connect_main","routeParams","params","_default","exports","Sty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O,CAAC;IACnD,CAAC,MAAM,IAAIa,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;MACpCV,cAAK,CAACY,eAAe,CAACf,YAAY,CAACD,OAAO,CAAC;IAC7C;IACA,OAAO,IAAI;EACb,CAAC,EACD,CAACH,UAAU,CACb,CAAC;EAED,oBACE,IAAA1B,WAAA,CAAAqD,GAAA,EAACxD,YAAA,CAAAyD,IAAI;IACHC,KAAK,EAAEC,MAAM,CAACC,YAAa;IAC3BP,QAAQ,EAAEA,QAAS;IACnBJ,gCAAgC,EAAEA,gCAAiC;IAAAxB,QAAA,EAElEA;EAAQ,CACL,CAAC;AAEX,CAAC,CAAC;AAEF,SAASkB,WAAWA,CAACd,UAAe,EAAU;EAC5C,MAAMgC,WAAW,GAAGhC,UAAU,CAACG,OAAO,EAAEO,eAAe,CAAC,CAAC,EAAEuB,MAAM;EACjE,IAAID,WAAW,EAAE;IACf,MAAM;MAAEN;IAAK,CAAC,GAAGM,WAAW;IAC5B,OAAON,IAAI,IAAI,EAAE;EACnB;EACA,OAAO1B,UAAU,CAACG,OAAO,EAAEO,eAAe,CAAC,CAAC,EAAEgB,IAAI,IAAI,EAAE;AAC1D;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAA1D,OAAA,GAEciB,OAAO;AAEtB,MAAMoC,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAC/BN,YAAY,EAAE;IACZO,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _TLTRN = _interopRequireDefault(require("../TLTRN"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/********************************************************************************************
|
|
11
|
+
* Copyright (C) 2025 Acoustic, L.P. All rights reserved.
|
|
12
|
+
*
|
|
13
|
+
* NOTICE: This file contains material that is confidential and proprietary to
|
|
14
|
+
* Acoustic, L.P. and/or other developers. No license is granted under any intellectual or
|
|
15
|
+
* industrial property rights of Acoustic, L.P. except as may be provided in an agreement with
|
|
16
|
+
* Acoustic, L.P. Any unauthorized copying or distribution of content from this file is
|
|
17
|
+
* prohibited.
|
|
18
|
+
********************************************************************************************/
|
|
19
|
+
|
|
20
|
+
class ConnectProfiler extends _react.Component {
|
|
21
|
+
startTime = 0;
|
|
22
|
+
endTime = 0;
|
|
23
|
+
constructor(props) {
|
|
24
|
+
super(props);
|
|
25
|
+
this.startTime = new Date().getTime();
|
|
26
|
+
}
|
|
27
|
+
componentDidMount() {
|
|
28
|
+
this.endTime = new Date().getTime();
|
|
29
|
+
const pageLoadTime = this.endTime - this.startTime;
|
|
30
|
+
const {
|
|
31
|
+
profileName
|
|
32
|
+
} = this.props;
|
|
33
|
+
if (profileName) {
|
|
34
|
+
_TLTRN.default.logCustomEvent("Load Time", {
|
|
35
|
+
profileName,
|
|
36
|
+
pageLoadTime
|
|
37
|
+
}, 1);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
return this.props.children;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
var _default = exports.default = ConnectProfiler;
|
|
45
|
+
//# sourceMappingURL=ConnectProfiler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_TLTRN","_interopRequireDefault","e","__esModule","default","ConnectProfiler","Component","startTime","endTime","constructor","props","Date","getTime","componentDidMount","pageLoadTime","profileName","TLTRN","logCustomEvent","render","children","_default","exports"],"sourceRoot":"../../../src","sources":["components/ConnectProfiler.ts"],"mappings":";;;;;;AAUA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA6B,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAX7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,MAAMG,eAAe,SAASC,gBAAS,CAAuB;EAC5DC,SAAS,GAAG,CAAC;EACbC,OAAO,GAAG,CAAC;EAEXC,WAAWA,CAACC,KAA2B,EAAE;IACvC,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACH,SAAS,GAAG,IAAII,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;EACvC;EAEAC,iBAAiBA,CAAA,EAAG;IAClB,IAAI,CAACL,OAAO,GAAG,IAAIG,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;IACnC,MAAME,YAAY,GAAG,IAAI,CAACN,OAAO,GAAG,IAAI,CAACD,SAAS;IAClD,MAAM;MAAEQ;IAAY,CAAC,GAAG,IAAI,CAACL,KAAK;IAElC,IAAIK,WAAW,EAAE;MACfC,cAAK,CAACC,cAAc,CAAC,WAAW,EAAE;QAAEF,WAAW;QAAED;MAAa,CAAC,EAAE,CAAC,CAAC;IACrE;EACF;EAEAI,MAAMA,CAAA,EAAG;IACP,OAAO,IAAI,CAACR,KAAK,CAACS,QAAQ;EAC5B;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAjB,OAAA,GAEcC,eAAe","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -9,9 +9,23 @@ Object.defineProperty(exports, "Connect", {
|
|
|
9
9
|
return _Connect.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "KeyboardListener", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _KeyboardListener.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "TLTRN", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _TLTRN.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
12
24
|
exports.default = void 0;
|
|
13
25
|
var _reactNativeNitroModules = require("react-native-nitro-modules");
|
|
14
26
|
var _Connect = _interopRequireDefault(require("./components/Connect"));
|
|
27
|
+
var _KeyboardListener = _interopRequireDefault(require("./utils/KeyboardListener"));
|
|
28
|
+
var _TLTRN = _interopRequireDefault(require("./TLTRN"));
|
|
15
29
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
30
|
/********************************************************************************************
|
|
17
31
|
* Copyright (C) 2025 Acoustic, L.P. All rights reserved.
|
|
@@ -26,9 +40,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
26
40
|
*
|
|
27
41
|
********************************************************************************************/
|
|
28
42
|
|
|
29
|
-
// Import Connect.tsx
|
|
30
|
-
|
|
31
43
|
const AcousticConnectRN = _reactNativeNitroModules.NitroModules.createHybridObject('AcousticConnectRN');
|
|
32
|
-
// Export Connect.tsx
|
|
33
44
|
var _default = exports.default = AcousticConnectRN;
|
|
34
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeNitroModules","require","_Connect","_interopRequireDefault","e","__esModule","default","AcousticConnectRN","NitroModules","createHybridObject","_default","exports"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_reactNativeNitroModules","require","_Connect","_interopRequireDefault","_KeyboardListener","_TLTRN","e","__esModule","default","AcousticConnectRN","NitroModules","createHybridObject","_default","exports"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAAA,wBAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,MAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA2B,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAjB3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,MAAMG,iBAAiB,GAAGC,qCAAY,CAACC,kBAAkB,CAAwB,mBAAmB,CAAC;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAGtFC,iBAAiB","ignoreList":[]}
|