react-native-visit-rn-sdk 0.5.5 → 2.0.1
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/build.gradle +6 -2
- package/lib/commonjs/Services.js.map +1 -1
- package/lib/commonjs/index.android.js +156 -95
- package/lib/commonjs/index.android.js.map +1 -1
- package/lib/commonjs/index.ios.js +39 -27
- package/lib/commonjs/index.ios.js.map +1 -1
- package/lib/module/Services.js.map +1 -1
- package/lib/module/index.android.js +157 -95
- package/lib/module/index.android.js.map +1 -1
- package/lib/module/index.ios.js +39 -27
- package/lib/module/index.ios.js.map +1 -1
- package/package.json +3 -3
- package/src/Services.js +1 -1
- package/src/index.android.js +180 -111
- package/src/index.ios.js +14 -1
package/src/index.ios.js
CHANGED
|
@@ -37,6 +37,7 @@ const escapeChars = {
|
|
|
37
37
|
|
|
38
38
|
const unescapeHTML = (str) =>
|
|
39
39
|
// modified from underscore.string and string.js
|
|
40
|
+
// eslint-disable-next-line no-useless-escape
|
|
40
41
|
str.replace(/\&([^;]+);/g, (entity, entityCode) => {
|
|
41
42
|
let match;
|
|
42
43
|
|
|
@@ -45,7 +46,7 @@ const unescapeHTML = (str) =>
|
|
|
45
46
|
} else if ((match = entityCode.match(/^#x([\da-fA-F]+)$/))) {
|
|
46
47
|
return String.fromCharCode(parseInt(match[1], 16));
|
|
47
48
|
} else if ((match = entityCode.match(/^#(\d+)$/))) {
|
|
48
|
-
return String.fromCharCode(
|
|
49
|
+
return String.fromCharCode(match[1]);
|
|
49
50
|
} else {
|
|
50
51
|
return entity;
|
|
51
52
|
}
|
|
@@ -104,6 +105,7 @@ const VisitRnSdkView = ({
|
|
|
104
105
|
}
|
|
105
106
|
} else if (res.data.message === 'success') {
|
|
106
107
|
const magicCode = res.data?.magicCode;
|
|
108
|
+
const responseReferenceId = res.data?.responseReferenceId;
|
|
107
109
|
let finalBaseUrl = '';
|
|
108
110
|
if (magicCode) {
|
|
109
111
|
if (environment.toUpperCase() === 'PROD') {
|
|
@@ -117,6 +119,14 @@ const VisitRnSdkView = ({
|
|
|
117
119
|
if (moduleName?.trim()) {
|
|
118
120
|
finalUrl += `&tab=${moduleName}`;
|
|
119
121
|
}
|
|
122
|
+
|
|
123
|
+
if (
|
|
124
|
+
typeof responseReferenceId === 'string' &&
|
|
125
|
+
responseReferenceId.trim().length > 0
|
|
126
|
+
) {
|
|
127
|
+
finalUrl += `&responseReferenceId=${responseReferenceId}`;
|
|
128
|
+
}
|
|
129
|
+
|
|
120
130
|
setSource(finalUrl);
|
|
121
131
|
}
|
|
122
132
|
} else {
|
|
@@ -219,6 +229,7 @@ const VisitRnSdkView = ({
|
|
|
219
229
|
type,
|
|
220
230
|
frequency,
|
|
221
231
|
timestamp,
|
|
232
|
+
// eslint-disable-next-line no-shadow
|
|
222
233
|
apiBaseUrl,
|
|
223
234
|
authtoken,
|
|
224
235
|
googleFitLastSync,
|
|
@@ -297,6 +308,7 @@ const VisitRnSdkView = ({
|
|
|
297
308
|
|
|
298
309
|
const { height, width } = Dimensions.get('screen');
|
|
299
310
|
return (
|
|
311
|
+
// eslint-disable-next-line react-native/no-inline-styles
|
|
300
312
|
<SafeAreaView style={{ flex: 1, backgroundColor: 'white', height, width }}>
|
|
301
313
|
{loading ? (
|
|
302
314
|
<LoadingIndicator />
|
|
@@ -347,6 +359,7 @@ const LoadingIndicator = () => {
|
|
|
347
359
|
<ActivityIndicator
|
|
348
360
|
color="#000"
|
|
349
361
|
size="small"
|
|
362
|
+
// eslint-disable-next-line react-native/no-inline-styles
|
|
350
363
|
style={{
|
|
351
364
|
flex: 1,
|
|
352
365
|
zIndex: 100,
|