react-native-persona 2.2.8 → 2.2.11
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/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,30 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
## [v2.2.11] - 2022-05-25
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Upgrade to Android Inquiry SDK 2.2.23
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Passed through Inquiry Fields that weren't getting sent to the server
|
|
19
|
+
|
|
20
|
+
## [v2.2.10] - 2022-05-17
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Upgrade to iOS Inquiry SDK 2.2.12
|
|
25
|
+
- Upgrade to Android Inquiry SDK 2.2.21
|
|
26
|
+
|
|
27
|
+
## [v2.2.9] - 2022-04-20
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Upgrade to iOS Inquiry SDK 2.2.11
|
|
32
|
+
- Upgrade to Android Inquiry SDK 2.2.16
|
|
33
|
+
|
|
10
34
|
## [v2.2.8] - 2022-04-06
|
|
11
35
|
|
|
12
36
|
### Changed
|
package/android/build.gradle
CHANGED
|
@@ -11,7 +11,7 @@ buildscript {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
dependencies {
|
|
14
|
-
classpath 'com.android.tools.build:gradle:3.6.
|
|
14
|
+
classpath 'com.android.tools.build:gradle:3.6.4'
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -66,5 +66,5 @@ dependencies {
|
|
|
66
66
|
//noinspection GradleDynamicVersion
|
|
67
67
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
68
68
|
|
|
69
|
-
implementation 'com.withpersona.sdk2:inquiry:2.2.
|
|
69
|
+
implementation 'com.withpersona.sdk2:inquiry:2.2.23'
|
|
70
70
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
|
|
4
4
|
zipStoreBase=GRADLE_USER_HOME
|
|
5
5
|
zipStorePath=wrapper/dists
|
|
@@ -3,7 +3,6 @@ package com.withpersona.sdk2.reactnative;
|
|
|
3
3
|
import android.app.Activity;
|
|
4
4
|
import android.content.Intent;
|
|
5
5
|
import androidx.annotation.Nullable;
|
|
6
|
-
import com.facebook.react.ReactActivityDelegate;
|
|
7
6
|
import com.facebook.react.bridge.ActivityEventListener;
|
|
8
7
|
import com.facebook.react.bridge.Arguments;
|
|
9
8
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
@@ -21,6 +20,7 @@ import com.withpersona.sdk2.inquiry.InquiryResponse;
|
|
|
21
20
|
import com.withpersona.sdk2.inquiry.InquiryTemplateBuilder;
|
|
22
21
|
import java.util.HashMap;
|
|
23
22
|
import java.util.Map;
|
|
23
|
+
import java.util.Objects;
|
|
24
24
|
import org.jetbrains.annotations.NotNull;
|
|
25
25
|
|
|
26
26
|
public class PersonaInquiryModule2 extends ReactContextBaseJavaModule
|
|
@@ -128,6 +128,7 @@ public class PersonaInquiryModule2 extends ReactContextBaseJavaModule
|
|
|
128
128
|
* the React Native bridge.
|
|
129
129
|
*/
|
|
130
130
|
@ReactMethod
|
|
131
|
+
@SuppressWarnings("unchecked")
|
|
131
132
|
public void startInquiry(
|
|
132
133
|
ReadableMap options
|
|
133
134
|
) {
|
|
@@ -174,24 +175,26 @@ public class PersonaInquiryModule2 extends ReactContextBaseJavaModule
|
|
|
174
175
|
}
|
|
175
176
|
|
|
176
177
|
ReadableMap fields = options.hasKey(FIELDS) ? options.getMap(FIELDS) : null;
|
|
178
|
+
|
|
177
179
|
if (fields != null) {
|
|
178
180
|
Fields.Builder fieldsBuilder = new Fields.Builder();
|
|
179
181
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
182
|
+
for (HashMap.Entry<String, Object> entry : fields.toHashMap().entrySet()) {
|
|
183
|
+
String key = entry.getKey();
|
|
184
|
+
Map<String, Object> wrappedValue = (Map<String, Object>) entry.getValue();
|
|
185
|
+
String type = (String) wrappedValue.get("type");
|
|
186
|
+
Object value = wrappedValue.get("value");
|
|
187
|
+
|
|
188
|
+
if (value == null) {
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (Objects.equals(type, "string")) {
|
|
193
|
+
fieldsBuilder.field(key, (String) value);
|
|
194
|
+
} else if (Objects.equals(type, "integer")) {
|
|
195
|
+
fieldsBuilder.field(key, ((Double) value).intValue());
|
|
196
|
+
} else if (Objects.equals(type, "boolean")) {
|
|
197
|
+
fieldsBuilder.field(key, (Boolean) value);
|
|
195
198
|
}
|
|
196
199
|
}
|
|
197
200
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-persona",
|
|
3
3
|
"title": "React Native Persona",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.11",
|
|
5
5
|
"description": "Launch a mobile native implementation of the Persona inquiry flow from React Native.",
|
|
6
6
|
"main": "lib/commonjs/index",
|
|
7
7
|
"module": "lib/module/index",
|
|
@@ -52,20 +52,20 @@
|
|
|
52
52
|
"react-native": "*"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@react-native-community/eslint-config": "^
|
|
55
|
+
"@react-native-community/eslint-config": "^3.0.0",
|
|
56
56
|
"@types/cli-table": "^0.3.0",
|
|
57
57
|
"@types/inquirer": "^6.5.0",
|
|
58
|
-
"@types/jest": "^
|
|
58
|
+
"@types/jest": "^27.0.0",
|
|
59
59
|
"@types/node": "^13.13.4",
|
|
60
60
|
"@types/object-path": "^0.11.0",
|
|
61
61
|
"@types/react-native": "^0.62.0",
|
|
62
62
|
"eslint": "^7.2.0",
|
|
63
|
-
"eslint-config-prettier": "^
|
|
63
|
+
"eslint-config-prettier": "^8.0.0",
|
|
64
64
|
"eslint-plugin-prettier": "^3.1.3",
|
|
65
65
|
"jest": "^26.6.3",
|
|
66
66
|
"pod-install": "^0.1.0",
|
|
67
67
|
"prettier": "^2.3.2",
|
|
68
|
-
"react": "16.
|
|
68
|
+
"react": "16.14.0",
|
|
69
69
|
"react-native": "^0.63.4",
|
|
70
70
|
"react-native-builder-bob": "^0.18.2",
|
|
71
71
|
"ts-jest": "^26.4.4",
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"chalk": "^4.0.0",
|
|
76
76
|
"cli-table": "^0.3.1",
|
|
77
|
-
"cosmiconfig": "^
|
|
77
|
+
"cosmiconfig": "^7.0.0",
|
|
78
78
|
"inquirer": "^7.1.0",
|
|
79
79
|
"minimist": "^1.2.5",
|
|
80
80
|
"object-path": "^0.11.8",
|
|
81
81
|
"pkg-up": "^3.1.0",
|
|
82
|
-
"xmlbuilder2": "^
|
|
82
|
+
"xmlbuilder2": "^3.0.0"
|
|
83
83
|
},
|
|
84
84
|
"jest": {
|
|
85
85
|
"preset": "react-native",
|