react-native-persona 1.2.2 → 1.2.6

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
@@ -1,142 +1,230 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
6
+ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
7
 
7
8
  ## Unreleased
8
9
 
10
+ ## [v1.2.6] - 2021-09-20
11
+
12
+ ### Changed
13
+
14
+ - Added passthrough for title and body text sizes
15
+
16
+ ## [v1.2.5] - 2021-09-10
17
+
18
+ ### Changed
19
+
20
+ - Update React peer dependency to allow React 17
21
+ - Added iOS passthrough for `titleTextAlignment` and `bodyTextAlignment`
22
+ - Upgrade to iOS Inquiry SDK 1.1.18
23
+ - Upgrade to Android Inquiry SDK 1.1.13
24
+ - Support Selfie config to skip the start/biometrics consent screen
25
+
26
+ ## [v1.2.4] - 2021-08-26
27
+
28
+ ### Changed
29
+
30
+ - Added passthrough to hide iOS button icons
31
+ - Added passthrough for iOS camera instructions text color and font
32
+ - Upgrade to iOS Inquiry SDK 1.1.17
33
+ - Upgrade to Android Inquiry SDK 1.1.12
34
+
35
+ ## [v1.2.3] - 2021-08-16
36
+
37
+ ### Changed
38
+
39
+ - Upgrade to iOS Inquiry SDK 1.1.15
40
+ - Upgrade to Android Inquiry SDK 1.1.10
41
+
9
42
  ## [v1.2.2] - 2021-07-20
43
+
10
44
  ### Changed
45
+
11
46
  - Added passthrough for custom selfie animations
12
47
  - Upgrade to Android Inquiry SDK 1.1.8
13
48
  - Upgrade to iOS Inquiry SDK 1.1.13
14
49
 
15
50
  ## [v1.2.1] - 2021-07-12
51
+
16
52
  ### Changed
53
+
17
54
  - Upgrade to Android Inquiry SDK 1.1.7
18
55
  - Upgrade to iOS Inquiry SDK 1.1.12
19
56
 
20
57
  ## [v1.2.0] - 2021-05-26
58
+
21
59
  ### Changed
60
+
22
61
  - Upgrade to Android Inquiry SDK 1.1.3
23
62
  - Upgrade to iOS Inquiry SDK 1.1.7
24
63
  - Increase the React Native dependency to `>=0.62.2`
25
64
 
26
65
  ## [v1.1.1] - 2021-03-13
66
+
27
67
  ### Changed
68
+
28
69
  - Upgrade to Android Inquiry SDK 1.1.1
29
70
  - Upgrade to iOS Inquiry SDK 1.1.1
30
71
  - Rename National ID to State ID
31
72
 
32
73
  ## [v1.1.0] - 2021-02-26
74
+
33
75
  ### Changed
76
+
34
77
  - Upgrade to Android Inquiry SDK 1.1.0
35
78
  - Upgrade to iOS Inquiry SDK 1.1.0
36
79
  - Decreased Android SDK size by removing bundled ML Kit library
37
80
  - Update translations for pt-BR
81
+
38
82
  ### Added
83
+
39
84
  - Prefill Phone verification with phone number from the Inquiry
40
85
  - Prefill Database verification with phone number, name, and address from the Inquiry
41
86
 
42
87
  ## [v1.0.10] - 2021-02-19
88
+
43
89
  ### Fixed
90
+
44
91
  - iOS
45
- - Fixed theme passthrough in bridge for:
46
- - buttonDisabledBackgroundColor
47
- - buttonTouchedBackgroundColor
48
- - cancelButtonBackgroundColor
49
- - progressColor
92
+ - Fixed theme passthrough in bridge for:
93
+ - buttonDisabledBackgroundColor
94
+ - buttonTouchedBackgroundColor
95
+ - cancelButtonBackgroundColor
96
+ - progressColor
50
97
 
51
98
  ## [v1.0.9] - 2021-02-16
99
+
52
100
  ### Fixed
101
+
53
102
  - iOS
54
- - Fixed theme passthrough in bridge for buttonCornerRadius
103
+ - Fixed theme passthrough in bridge for buttonCornerRadius
55
104
 
56
105
  ## [v1.0.8] - 2021
106
+
57
107
  ### Added
108
+
58
109
  - Support PDF417 barcode capture
59
110
  - Support passport signature capture
111
+
60
112
  ### Changed
113
+
61
114
  - Upgrade iOS SDK to 1.0.7
62
115
 
63
116
  ## [v1.0.7] - 2021-01-28
117
+
64
118
  ### Fixed
119
+
65
120
  - Fixed invalid color filtering in persona-tool
121
+
66
122
  ### Changed
123
+
67
124
  - Upgrade Android SDK to 1.0.11
68
125
 
69
126
  ## [v1.0.6] - 2021-01-07
127
+
70
128
  ### Added
129
+
71
130
  - Return addressSubdivisionAbbr in Attributes
72
131
  - Added support of custom strings for completion and failure screens
132
+
73
133
  ### Changed
134
+
74
135
  - Android
75
- - Upgrade Android SDK to 1.0.9
76
- - Update default theme to Base.Persona.Inquiry.Theme.Light
136
+ - Upgrade Android SDK to 1.0.9
137
+ - Update default theme to Base.Persona.Inquiry.Theme.Light
77
138
  - iOS
78
- - Upgrade iOS SDK to 1.0.6
79
- - Removed the cancel button from completion screen.
139
+ - Upgrade iOS SDK to 1.0.6
140
+ - Removed the cancel button from completion screen.
80
141
 
81
142
  ## [v1.0.5] - 2020-12-31
143
+
82
144
  ### Fixed
145
+
83
146
  - Fixed empty birthdate on iOS
84
147
 
85
148
  ### Changed
149
+
86
150
  - Updated Android SDK to 1.0.8
87
151
 
88
152
  ## [v1.0.4] - 2020-12-08
153
+
89
154
  ### Changed
155
+
90
156
  - Now target iOS Native SDK 1.0.3 and Android Native SDK 1.0.4
91
157
  - Updated selfie verification experience to match web flow
92
158
  - Changed react ios dependency from 'React' to 'React-Core'
93
159
 
94
160
  ## [v1.0.3] - 2020-12-01
161
+
95
162
  ### Fixed
163
+
96
164
  - Fix validation check that rejected valid account id parameter
97
165
 
98
166
  ### Changed
167
+
99
168
  - Now target iOS Native SDK 1.0.3 and Android Native SDK 1.0.4
100
169
 
101
170
  ## [v1.0.2] - 2020-10-21
171
+
102
172
  ### Fixed
173
+
103
174
  - Workaround for failing to build for ios simulators on CocoaPods < 1.10
104
175
  - Fixed inquiryId parameter name in onFailed callback
105
176
  - Renamed FileProvider to avoid conflicts with other dependencies in React Native
106
177
 
107
178
  ## [v1.0.1] - 2020-10-13
179
+
108
180
  ### Fixed
181
+
109
182
  - Fixed crash when resuming inquiry with access token on Android.
110
183
 
111
184
  ## [v1.0.0] - 2020-09-24
185
+
112
186
  ### Fixed
187
+
113
188
  - Fixed default font sizes and font weights when using Android theming
114
189
 
115
190
  ### Changed
191
+
116
192
  - Now targets iOS Native SDK 1.0.0 and Android Native SDK 1.0.0
117
193
 
118
194
  ### Added
195
+
119
196
  - Support for Inquiry Fields when using the Template builder
120
197
  - Support for passing an access token for resuming an inquiry.
121
198
 
122
199
  ## [v0.12.5] - 2020-09-11
200
+
123
201
  ### Changed
202
+
124
203
  - Now targets iOS Native SDK 0.12.4
125
204
  - Now targets Android Native SDK 0.12.4
126
- - Includes threading fix for selfie auto-capture
205
+ - Includes threading fix for selfie auto-capture
127
206
 
128
207
  ## [v0.12.4] - 2020-09-09
208
+
129
209
  ### Fixed
210
+
130
211
  - Include `.js` files in the published application.
131
212
 
132
213
  ## [v0.12.3] - 2020-09-09
214
+
133
215
  ### Added
134
- - Improved theme support for Android and iOS. iOS now supports more themeable keys from the underlying native SDK. Android styles resource generation now supports more themeable keys. All of this is still available through `persona-tool`.
216
+
217
+ - Improved theme support for Android and iOS. iOS now supports more themeable keys from the underlying native SDK.
218
+ Android styles resource generation now supports more themeable keys. All of this is still available
219
+ through `persona-tool`.
135
220
 
136
221
  ### Fixed
222
+
137
223
  - Pass the Android `onError` event through to React Native `onError` event
138
224
 
139
225
  ## [v0.12.2] - 2020-09-04
226
+
140
227
  ### Changed
228
+
141
229
  - Now targets iOS Native SDK 0.12.3
142
230
  - Now targets Android Native SDK 0.12.3
@@ -22,7 +22,7 @@ Pod::Spec.new do |s|
22
22
  s.requires_arc = true
23
23
 
24
24
  s.dependency 'React-Core'
25
- s.dependency 'PersonaInquirySDK', '~> 1.1.13'
25
+ s.dependency 'PersonaInquirySDK', '~> 1.1.18'
26
26
 
27
27
  s.static_framework = true
28
28
  end
@@ -79,7 +79,7 @@ dependencies {
79
79
  implementation 'com.facebook.react:react-native:+' // From node_modules
80
80
 
81
81
  // NOTE: After updating, please update the `sdkVersions.android` in example/package.json
82
- implementation 'com.withpersona.sdk:inquiry:1.1.8'
82
+ implementation 'com.withpersona.sdk:inquiry:1.1.13'
83
83
  }
84
84
 
85
85
  def configureReactNativePom(def pom) {
@@ -162,9 +162,15 @@ extension PersonaInquiry {
162
162
  theme.titleTextColor = color
163
163
  }
164
164
 
165
- if let fontName = dictionary["titleTextFont"],
166
- let font = UIFont(name: fontName, size: 28) {
167
- theme.titleTextFont = font
165
+ if let fontName = dictionary["titleTextFont"] {
166
+ let fontSize = int(from: dictionary["titleTextSize"]) ?? 28
167
+ if let font = UIFont(name: fontName, size: CGFloat(fontSize)) {
168
+ theme.titleTextFont = font
169
+ }
170
+ }
171
+
172
+ if let alignment = alignment(from: dictionary["titleTextAlignment"]) {
173
+ theme.titleTextAlignment = alignment
168
174
  }
169
175
 
170
176
  if let fontName = dictionary["cardTitleTextFont"],
@@ -176,9 +182,15 @@ extension PersonaInquiry {
176
182
  theme.bodyTextColor = color
177
183
  }
178
184
 
179
- if let fontName = dictionary["bodyTextFont"],
180
- let font = UIFont(name: fontName, size: 17) {
181
- theme.bodyTextFont = font
185
+ if let fontName = dictionary["bodyTextFont"] {
186
+ let fontSize = int(from: dictionary["bodyTextSize"]) ?? 17
187
+ if let font = UIFont(name: fontName, size: CGFloat(fontSize)) {
188
+ theme.bodyTextFont = font
189
+ }
190
+ }
191
+
192
+ if let alignment = alignment(from: dictionary["bodyTextAlignment"]) {
193
+ theme.bodyTextAlignment = alignment
182
194
  }
183
195
 
184
196
  if let color = color(from: dictionary["footnoteTextColor"]) {
@@ -251,6 +263,10 @@ extension PersonaInquiry {
251
263
  if let color = color(from: dictionary["buttonImageTintColor"]) {
252
264
  theme.buttonImageTintColor = color
253
265
  }
266
+
267
+ if let buttonImageHidden = dictionary["buttonImageHidden"] {
268
+ theme.buttonImageHidden = (buttonImageHidden == "true")
269
+ }
254
270
 
255
271
  if let color = color(from: dictionary["buttonTextColor"]) {
256
272
  theme.buttonTextColor = color
@@ -260,25 +276,8 @@ extension PersonaInquiry {
260
276
  theme.buttonDisabledTextColor = color
261
277
  }
262
278
 
263
- if let alignment = dictionary["buttonTextAlignment"] {
264
- var buttonTextAlignment: NSTextAlignment {
265
- switch alignment {
266
- case "left":
267
- return NSTextAlignment.left
268
- case "center":
269
- return NSTextAlignment.center
270
- case "right":
271
- return NSTextAlignment.right
272
- case "justified":
273
- return NSTextAlignment.justified
274
- case "natural":
275
- return NSTextAlignment.natural
276
- default:
277
- // Default to left on invalid input
278
- return NSTextAlignment.left
279
- }
280
- }
281
- theme.buttonTextAlignment = buttonTextAlignment
279
+ if let alignment = alignment(from: dictionary["buttonTextAlignment"]) {
280
+ theme.buttonTextAlignment = alignment
282
281
  }
283
282
 
284
283
  if let radiusString = dictionary["buttonCornerRadius"],
@@ -311,6 +310,15 @@ extension PersonaInquiry {
311
310
  if let color = color(from: dictionary["cameraButtonBackgroundColor"]) {
312
311
  theme.cameraButtonBackgroundColor = color
313
312
  }
313
+
314
+ if let color = color(from: dictionary["cameraInstructionsTextColor"]) {
315
+ theme.cameraInstructionsTextColor = color
316
+ }
317
+
318
+ if let fontName = dictionary["cameraInstructionsTextFont"],
319
+ let font = UIFont(name: fontName, size: 20) {
320
+ theme.cameraInstructionsTextFont = font
321
+ }
314
322
 
315
323
  if let successAssetName = dictionary["successAssetName"],
316
324
  let successAssetWidth = int(from: dictionary["successAssetWidth"]),
@@ -462,6 +470,29 @@ extension PersonaInquiry {
462
470
  return Int(string)
463
471
  }
464
472
 
473
+ /// Returns an NSTextAlignment from a string
474
+ private func alignment(from string: String?) -> NSTextAlignment? {
475
+ guard let string = string else { return nil }
476
+ var textAlignment: NSTextAlignment? {
477
+ switch string {
478
+ case "left":
479
+ return NSTextAlignment.left
480
+ case "center":
481
+ return NSTextAlignment.center
482
+ case "right":
483
+ return NSTextAlignment.right
484
+ case "justified":
485
+ return NSTextAlignment.justified
486
+ case "natural":
487
+ return NSTextAlignment.natural
488
+ default:
489
+ // return nil to default to InquiryTheme value
490
+ return nil
491
+ }
492
+ }
493
+ return textAlignment
494
+ }
495
+
465
496
  /// Converts an Attributes object to a dictionary
466
497
  private func attributesToDictionary(attributes: Persona.Attributes?) -> Dictionary<String, Any?> {
467
498
  var dictionary = [String: Any?]()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-persona",
3
3
  "title": "React Native Persona",
4
- "version": "1.2.2",
4
+ "version": "1.2.6",
5
5
  "description": "Launch a mobile native implementation of the Persona inquiry flow from React Native.",
6
6
  "main": "src/index.js",
7
7
  "bin": {
@@ -48,7 +48,7 @@
48
48
  "@types/react-native": "^0.62.0",
49
49
  "jest": "^26.6.3",
50
50
  "prettier": "^2.2.1",
51
- "react": "^16.9.0",
51
+ "react": ">=16.9.0",
52
52
  "react-native": ">=0.62.2",
53
53
  "ts-jest": "^26.4.4",
54
54
  "typescript": "^3.8.3"