react-native-persona 1.2.5 → 1.2.9

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,34 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## [v1.2.9] - 2022-01-03
11
+
12
+ ### Changed
13
+ - Upgrade to iOS Inquiry SDK 1.1.23
14
+
15
+ ## [v1.2.8] - 2021-12-07
16
+
17
+ ### Changed
18
+
19
+ - Added iOS passthroughs for camera text color/size/font and footnote text size
20
+ - Added Android passthroughs for camera text color/size/font and footnote text size
21
+ - Added iOS/Android passthroughs for button text size
22
+ - Upgrade to iOS Inquiry SDK 1.1.22
23
+ - Upgrade to Android Inquiry SDK 1.1.17
24
+
25
+ ## [v1.2.7] - 2021-10-20
26
+
27
+ ### Changed
28
+
29
+ - Applied button text color and border radius theming to `buttonStyleSecondary`
30
+ - Upgrade to iOS Inquiry SDK 1.1.20
31
+
32
+ ## [v1.2.6] - 2021-09-20
33
+
34
+ ### Changed
35
+
36
+ - Added passthrough for title and body text sizes
37
+
10
38
  ## [v1.2.5] - 2021-09-10
11
39
 
12
40
  ### Changed
@@ -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.18'
25
+ s.dependency 'PersonaInquirySDK', '~> 1.1.23'
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.13'
82
+ implementation 'com.withpersona.sdk:inquiry:1.1.17'
83
83
  }
84
84
 
85
85
  def configureReactNativePom(def pom) {
@@ -162,9 +162,11 @@ 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
+ }
168
170
  }
169
171
 
170
172
  if let alignment = alignment(from: dictionary["titleTextAlignment"]) {
@@ -180,9 +182,11 @@ extension PersonaInquiry {
180
182
  theme.bodyTextColor = color
181
183
  }
182
184
 
183
- if let fontName = dictionary["bodyTextFont"],
184
- let font = UIFont(name: fontName, size: 17) {
185
- 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
+ }
186
190
  }
187
191
 
188
192
  if let alignment = alignment(from: dictionary["bodyTextAlignment"]) {
@@ -193,9 +197,11 @@ extension PersonaInquiry {
193
197
  theme.footnoteTextColor = color
194
198
  }
195
199
 
196
- if let fontName = dictionary["footnoteTextFont"],
197
- let font = UIFont(name: fontName, size: 14) {
198
- theme.footnoteTextFont = font
200
+ if let fontName = dictionary["footnoteTextFont"] {
201
+ let fontSize = int(from: dictionary["footnoteTextSize"]) ?? 14
202
+ if let font = UIFont(name: fontName, size: CGFloat(fontSize)) {
203
+ theme.footnoteTextFont = font
204
+ }
199
205
  }
200
206
 
201
207
  if let color = color(from: dictionary["formLabelTextColor"]) {
@@ -282,9 +288,11 @@ extension PersonaInquiry {
282
288
  theme.buttonCornerRadius = radius
283
289
  }
284
290
 
285
- if let fontName = dictionary["buttonFont"],
286
- let font = UIFont(name: fontName, size: 18) {
291
+ if let fontName = dictionary["buttonFont"] {
292
+ let fontSize = int(from: dictionary["buttonTextSize"]) ?? 18
293
+ if let font = UIFont(name: fontName, size: CGFloat(fontSize)) {
287
294
  theme.buttonFont = font
295
+ }
288
296
  }
289
297
 
290
298
  if let color = color(from: dictionary["selectedCellBackgroundColor"]) {
@@ -311,9 +319,33 @@ extension PersonaInquiry {
311
319
  theme.cameraInstructionsTextColor = color
312
320
  }
313
321
 
314
- if let fontName = dictionary["cameraInstructionsTextFont"],
315
- let font = UIFont(name: fontName, size: 20) {
316
- theme.cameraInstructionsTextFont = font
322
+ if let fontName = dictionary["cameraInstructionsTextFont"] {
323
+ let fontSize = int(from: dictionary["cameraInstructionsTextSize"]) ?? 20
324
+ if let font = UIFont(name: fontName, size: CGFloat(fontSize)) {
325
+ theme.cameraInstructionsTextFont = font
326
+ }
327
+ }
328
+
329
+ if let color = color(from: dictionary["cameraHintTextColor"]) {
330
+ theme.cameraHintTextColor = color
331
+ }
332
+
333
+ if let fontName = dictionary["cameraHintTextFont"] {
334
+ let fontSize = int(from: dictionary["cameraHintTextSize"]) ?? 16
335
+ if let font = UIFont(name: fontName, size: CGFloat(fontSize)) {
336
+ theme.cameraHintTextFont = font
337
+ }
338
+ }
339
+
340
+ if let color = color(from: dictionary["cameraGuideHintTextColor"]) {
341
+ theme.cameraGuideHintTextColor = color
342
+ }
343
+
344
+ if let fontName = dictionary["cameraGuideHintTextFont"] {
345
+ let fontSize = int(from: dictionary["cameraGuideHintTextSize"]) ?? 18
346
+ if let font = UIFont(name: fontName, size: CGFloat(fontSize)) {
347
+ theme.cameraGuideHintTextFont = font
348
+ }
317
349
  }
318
350
 
319
351
  if let successAssetName = dictionary["successAssetName"],
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.5",
4
+ "version": "1.2.9",
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": {
@@ -63,4 +63,4 @@
63
63
  "pkg-up": "^3.1.0",
64
64
  "xmlbuilder2": "^2.1.2"
65
65
  }
66
- }
66
+ }
@@ -16,10 +16,22 @@ var ANDROID_THEME_CONFIG_KEY;
16
16
  ANDROID_THEME_CONFIG_KEY["accentColor"] = "accentColor";
17
17
  ANDROID_THEME_CONFIG_KEY["titleTextColor"] = "titleTextColor";
18
18
  ANDROID_THEME_CONFIG_KEY["titleTextFont"] = "titleTextFont";
19
+ ANDROID_THEME_CONFIG_KEY["titleTextSize"] = "titleTextSize";
19
20
  ANDROID_THEME_CONFIG_KEY["bodyTextColor"] = "bodyTextColor";
20
21
  ANDROID_THEME_CONFIG_KEY["bodyTextFont"] = "bodyTextFont";
22
+ ANDROID_THEME_CONFIG_KEY["bodyTextSize"] = "bodyTextSize";
21
23
  ANDROID_THEME_CONFIG_KEY["footnoteTextColor"] = "footnoteTextColor";
22
24
  ANDROID_THEME_CONFIG_KEY["footnoteTextFont"] = "footnoteTextFont";
25
+ ANDROID_THEME_CONFIG_KEY["footnoteTextSize"] = "footnoteTextSize";
26
+ ANDROID_THEME_CONFIG_KEY["cameraInstructionsTextColor"] = "cameraInstructionsTextColor";
27
+ ANDROID_THEME_CONFIG_KEY["cameraInstructionsTextFont"] = "cameraInstructionsTextFont";
28
+ ANDROID_THEME_CONFIG_KEY["cameraInstructionsTextSize"] = "cameraInstructionsTextSize";
29
+ ANDROID_THEME_CONFIG_KEY["cameraHintTextColor"] = "cameraHintTextColor";
30
+ ANDROID_THEME_CONFIG_KEY["cameraHintTextFont"] = "cameraHintTextFont";
31
+ ANDROID_THEME_CONFIG_KEY["cameraHintTextSize"] = "cameraHintTextSize";
32
+ ANDROID_THEME_CONFIG_KEY["cameraGuideHintTextColor"] = "cameraGuideHintTextColor";
33
+ ANDROID_THEME_CONFIG_KEY["cameraGuideHintTextFont"] = "cameraGuideHintTextFont";
34
+ ANDROID_THEME_CONFIG_KEY["cameraGuideHintTextSize"] = "cameraGuideHintTextSize";
23
35
  // formLabelTextColor = "formLabelTextColor",
24
36
  // formLabelTextFont = "formLabelTextFont",
25
37
  ANDROID_THEME_CONFIG_KEY["textFieldTextColor"] = "textFieldTextColor";
@@ -34,6 +46,7 @@ var ANDROID_THEME_CONFIG_KEY;
34
46
  // buttonTextAlignment = "buttonTextAlignment",
35
47
  ANDROID_THEME_CONFIG_KEY["buttonCornerRadius"] = "buttonCornerRadius";
36
48
  ANDROID_THEME_CONFIG_KEY["buttonFont"] = "buttonFont";
49
+ ANDROID_THEME_CONFIG_KEY["buttonTextSize"] = "buttonTextSize";
37
50
  ANDROID_THEME_CONFIG_KEY["progressColor"] = "progressColor";
38
51
  ANDROID_THEME_CONFIG_KEY["successAsset"] = "successAsset";
39
52
  ANDROID_THEME_CONFIG_KEY["failAsset"] = "failAsset";
@@ -48,15 +61,19 @@ var IOS_THEME_CONFIG_KEY;
48
61
  IOS_THEME_CONFIG_KEY["primaryColor"] = "primaryColor";
49
62
  IOS_THEME_CONFIG_KEY["darkPrimaryColor"] = "darkPrimaryColor";
50
63
  IOS_THEME_CONFIG_KEY["accentColor"] = "accentColor";
64
+ IOS_THEME_CONFIG_KEY["progressColor"] = "progressColor";
51
65
  IOS_THEME_CONFIG_KEY["overlayBackgroundColor"] = "overlayBackgroundColor";
52
66
  IOS_THEME_CONFIG_KEY["titleTextColor"] = "titleTextColor";
53
67
  IOS_THEME_CONFIG_KEY["titleTextFont"] = "titleTextFont";
68
+ IOS_THEME_CONFIG_KEY["titleTextSize"] = "titleTextSize";
54
69
  IOS_THEME_CONFIG_KEY["titleTextAlignment"] = "titleTextAlignment";
55
70
  IOS_THEME_CONFIG_KEY["bodyTextColor"] = "bodyTextColor";
56
71
  IOS_THEME_CONFIG_KEY["bodyTextFont"] = "bodyTextFont";
72
+ IOS_THEME_CONFIG_KEY["bodyTextSize"] = "bodyTextSize";
57
73
  IOS_THEME_CONFIG_KEY["bodyTextAlignment"] = "bodyTextAlignment";
58
74
  IOS_THEME_CONFIG_KEY["footnoteTextColor"] = "footnoteTextColor";
59
75
  IOS_THEME_CONFIG_KEY["footnoteTextFont"] = "footnoteTextFont";
76
+ IOS_THEME_CONFIG_KEY["footnoteTextSize"] = "footnoteTextSize";
60
77
  IOS_THEME_CONFIG_KEY["formLabelTextColor"] = "formLabelTextColor";
61
78
  IOS_THEME_CONFIG_KEY["formLabelTextFont"] = "formLabelTextFont";
62
79
  IOS_THEME_CONFIG_KEY["textFieldTextColor"] = "textFieldTextColor";
@@ -64,24 +81,31 @@ var IOS_THEME_CONFIG_KEY;
64
81
  IOS_THEME_CONFIG_KEY["textFieldBorderColor"] = "textFieldBorderColor";
65
82
  IOS_THEME_CONFIG_KEY["pickerTextColor"] = "pickerTextColor";
66
83
  IOS_THEME_CONFIG_KEY["pickerTextFont"] = "pickerTextFont";
84
+ IOS_THEME_CONFIG_KEY["cameraInstructionsTextColor"] = "cameraInstructionsTextColor";
85
+ IOS_THEME_CONFIG_KEY["cameraInstructionsTextFont"] = "cameraInstructionsTextFont";
86
+ IOS_THEME_CONFIG_KEY["cameraInstructionsTextSize"] = "cameraInstructionsTextFont";
87
+ IOS_THEME_CONFIG_KEY["cameraHintTextColor"] = "cameraHintTextColor";
88
+ IOS_THEME_CONFIG_KEY["cameraHintTextFont"] = "cameraHintTextFont";
89
+ IOS_THEME_CONFIG_KEY["cameraHintTextSize"] = "cameraHintTextSize";
90
+ IOS_THEME_CONFIG_KEY["cameraGuideHintTextColor"] = "cameraGuideHintTextColor";
91
+ IOS_THEME_CONFIG_KEY["cameraGuideHintTextFont"] = "cameraGuideHintTextFont";
92
+ IOS_THEME_CONFIG_KEY["cameraGuideHintTextSize"] = "cameraGuideHintTextSize";
67
93
  IOS_THEME_CONFIG_KEY["buttonBackgroundColor"] = "buttonBackgroundColor";
68
94
  IOS_THEME_CONFIG_KEY["buttonDisabledBackgroundColor"] = "buttonDisabledBackgroundColor";
69
95
  IOS_THEME_CONFIG_KEY["buttonTouchedBackgroundColor"] = "buttonTouchedBackgroundColor";
70
96
  IOS_THEME_CONFIG_KEY["buttonImageTintColor"] = "buttonImageTintColor";
71
97
  IOS_THEME_CONFIG_KEY["buttonImageHidden"] = "buttonImageHidden";
72
- IOS_THEME_CONFIG_KEY["buttonTextColor"] = "buttonTextColor";
73
- IOS_THEME_CONFIG_KEY["buttonDisabledTextColor"] = "buttonDisabledTextColor";
74
- IOS_THEME_CONFIG_KEY["buttonTextAlignment"] = "buttonTextAlignment";
75
98
  IOS_THEME_CONFIG_KEY["buttonCornerRadius"] = "buttonCornerRadius";
99
+ IOS_THEME_CONFIG_KEY["buttonTextAlignment"] = "buttonTextAlignment";
100
+ IOS_THEME_CONFIG_KEY["buttonDisabledTextColor"] = "buttonDisabledTextColor";
101
+ IOS_THEME_CONFIG_KEY["buttonTextColor"] = "buttonTextColor";
76
102
  IOS_THEME_CONFIG_KEY["buttonFont"] = "buttonFont";
103
+ IOS_THEME_CONFIG_KEY["buttonTextSize"] = "buttonTextSize";
77
104
  IOS_THEME_CONFIG_KEY["selectedCellBackgroundColor"] = "selectedCellBackgroundColor";
78
105
  IOS_THEME_CONFIG_KEY["closeButtonTintColor"] = "closeButtonTintColor";
79
106
  IOS_THEME_CONFIG_KEY["cancelButtonBackgroundColor"] = "cancelButtonBackgroundColor";
80
- IOS_THEME_CONFIG_KEY["progressColor"] = "progressColor";
81
- IOS_THEME_CONFIG_KEY["cameraGuideCornersColor"] = "cameraGuideCornersColor";
82
107
  IOS_THEME_CONFIG_KEY["cameraButtonBackgroundColor"] = "cameraButtonBackgroundColor";
83
- IOS_THEME_CONFIG_KEY["cameraInstructionsTextColor"] = "cameraInstructionsTextColor";
84
- IOS_THEME_CONFIG_KEY["cameraInstructionsTextFont"] = "cameraInstructionsTextFont";
108
+ IOS_THEME_CONFIG_KEY["cameraGuideCornersColor"] = "cameraGuideCornersColor";
85
109
  IOS_THEME_CONFIG_KEY["successAssetName"] = "successAssetName";
86
110
  IOS_THEME_CONFIG_KEY["successAssetWidth"] = "successAssetWidth";
87
111
  IOS_THEME_CONFIG_KEY["successAssetHeight"] = "successAssetHeight";
@@ -13,12 +13,27 @@ export enum ANDROID_THEME_CONFIG_KEY {
13
13
 
14
14
  titleTextColor = "titleTextColor",
15
15
  titleTextFont = "titleTextFont",
16
+ titleTextSize = "titleTextSize",
16
17
 
17
18
  bodyTextColor = "bodyTextColor",
18
19
  bodyTextFont = "bodyTextFont",
20
+ bodyTextSize = "bodyTextSize",
19
21
 
20
22
  footnoteTextColor = "footnoteTextColor",
21
23
  footnoteTextFont = "footnoteTextFont",
24
+ footnoteTextSize = 'footnoteTextSize',
25
+
26
+ cameraInstructionsTextColor = "cameraInstructionsTextColor",
27
+ cameraInstructionsTextFont = "cameraInstructionsTextFont",
28
+ cameraInstructionsTextSize = "cameraInstructionsTextSize",
29
+
30
+ cameraHintTextColor = "cameraHintTextColor",
31
+ cameraHintTextFont = "cameraHintTextFont",
32
+ cameraHintTextSize = "cameraHintTextSize",
33
+
34
+ cameraGuideHintTextColor = "cameraGuideHintTextColor",
35
+ cameraGuideHintTextFont = "cameraGuideHintTextFont",
36
+ cameraGuideHintTextSize = "cameraGuideHintTextSize",
22
37
 
23
38
  // formLabelTextColor = "formLabelTextColor",
24
39
  // formLabelTextFont = "formLabelTextFont",
@@ -37,6 +52,7 @@ export enum ANDROID_THEME_CONFIG_KEY {
37
52
  // buttonTextAlignment = "buttonTextAlignment",
38
53
  buttonCornerRadius = "buttonCornerRadius",
39
54
  buttonFont = "buttonFont",
55
+ buttonTextSize = "buttonTextSize",
40
56
  progressColor = "progressColor",
41
57
  successAsset = "successAsset",
42
58
  failAsset = "failAsset",
@@ -51,15 +67,19 @@ export enum IOS_THEME_CONFIG_KEY {
51
67
  primaryColor = "primaryColor",
52
68
  darkPrimaryColor = "darkPrimaryColor",
53
69
  accentColor = "accentColor",
70
+ progressColor = "progressColor",
54
71
  overlayBackgroundColor = "overlayBackgroundColor",
55
72
  titleTextColor = "titleTextColor",
56
73
  titleTextFont = "titleTextFont",
74
+ titleTextSize = "titleTextSize",
57
75
  titleTextAlignment = "titleTextAlignment",
58
76
  bodyTextColor = "bodyTextColor",
59
77
  bodyTextFont = "bodyTextFont",
78
+ bodyTextSize = "bodyTextSize",
60
79
  bodyTextAlignment = "bodyTextAlignment",
61
80
  footnoteTextColor = "footnoteTextColor",
62
81
  footnoteTextFont = "footnoteTextFont",
82
+ footnoteTextSize = "footnoteTextSize",
63
83
  formLabelTextColor = "formLabelTextColor",
64
84
  formLabelTextFont = "formLabelTextFont",
65
85
  textFieldTextColor = "textFieldTextColor",
@@ -67,24 +87,31 @@ export enum IOS_THEME_CONFIG_KEY {
67
87
  textFieldBorderColor = "textFieldBorderColor",
68
88
  pickerTextColor = "pickerTextColor",
69
89
  pickerTextFont = "pickerTextFont",
90
+ cameraInstructionsTextColor = "cameraInstructionsTextColor",
91
+ cameraInstructionsTextFont = "cameraInstructionsTextFont",
92
+ cameraInstructionsTextSize = "cameraInstructionsTextFont",
93
+ cameraHintTextColor = "cameraHintTextColor",
94
+ cameraHintTextFont = "cameraHintTextFont",
95
+ cameraHintTextSize = "cameraHintTextSize",
96
+ cameraGuideHintTextColor = "cameraGuideHintTextColor",
97
+ cameraGuideHintTextFont = "cameraGuideHintTextFont",
98
+ cameraGuideHintTextSize = "cameraGuideHintTextSize",
70
99
  buttonBackgroundColor = "buttonBackgroundColor",
71
100
  buttonDisabledBackgroundColor = "buttonDisabledBackgroundColor",
72
101
  buttonTouchedBackgroundColor = "buttonTouchedBackgroundColor",
73
102
  buttonImageTintColor = "buttonImageTintColor",
74
103
  buttonImageHidden = "buttonImageHidden",
75
- buttonTextColor = "buttonTextColor",
76
- buttonDisabledTextColor = "buttonDisabledTextColor",
77
- buttonTextAlignment = "buttonTextAlignment",
78
104
  buttonCornerRadius = "buttonCornerRadius",
105
+ buttonTextAlignment = "buttonTextAlignment",
106
+ buttonDisabledTextColor = "buttonDisabledTextColor",
107
+ buttonTextColor = "buttonTextColor",
79
108
  buttonFont = "buttonFont",
109
+ buttonTextSize = "buttonTextSize",
80
110
  selectedCellBackgroundColor = "selectedCellBackgroundColor",
81
111
  closeButtonTintColor = "closeButtonTintColor",
82
112
  cancelButtonBackgroundColor = "cancelButtonBackgroundColor",
83
- progressColor = "progressColor",
84
- cameraGuideCornersColor = "cameraGuideCornersColor",
85
113
  cameraButtonBackgroundColor = "cameraButtonBackgroundColor",
86
- cameraInstructionsTextColor = "cameraInstructionsTextColor",
87
- cameraInstructionsTextFont = "cameraInstructionsTextFont",
114
+ cameraGuideCornersColor = "cameraGuideCornersColor",
88
115
  successAssetName = "successAssetName",
89
116
  successAssetWidth = "successAssetWidth",
90
117
  successAssetHeight = "successAssetHeight",