react-native-kalapa-ekyc 1.2.0 → 1.2.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/README.md CHANGED
@@ -4,6 +4,8 @@ Complete guide for integrating Kalapa eKYC functionality into your React Native
4
4
  ---
5
5
  ## Changelog
6
6
 
7
+ ### 1.2.1
8
+ - **successColor / failureColor**: Now can be configured via sdkConfig
7
9
  ### 1.2.0
8
10
  - **Documentation**: Complete overhaul of KalapaResult class documentation
9
11
  - **Documentation**: Added comprehensive property documentation for all root-level fields
@@ -149,6 +151,8 @@ let configInfo = {
149
151
  main_text_color: <MAIN_TEXT_COLOR>,
150
152
  btn_text_color: <BTN_TEXT_COLOR>,
151
153
  background_color: <BG_COLOR>,
154
+ success_color: <SUCCESS_COLOR>,
155
+ failure_color: <FAILURE_COLOR>,
152
156
  language: <LANGUAGE>,
153
157
  liveness_version: <LIVENESS_VERSION>,
154
158
  face_data: <FACE_DATA>,
@@ -167,6 +171,8 @@ let configInfo = {
167
171
  | `MAIN_COLOR` | String | Hex color code for buttons and functional texts |
168
172
  | `MAIN_TEXT_COLOR` | String | Hex color code for main text elements |
169
173
  | `BTN_TEXT_COLOR` | String | Hex color code for text inside filled buttons |
174
+ | `SUCCESS_COLOR` | String | Hex color code for text and view that indicated for success state |
175
+ | `FAILURE_COLOR` | String | Hex color code for text and view that indicated for failure state |
170
176
  | `LIVENESS_VERSION` | Integer | Liveness detection version:<br/>• `3` - Requires 3 random actions (turn left/right/up/down, tilt left/right)<br/>• `2` - Move face towards camera<br/>• `1` - No action required |
171
177
  | `LANGUAGE` | String | UI language: `"vi"` (Vietnamese) or `"en"` (English) |
172
178
  | `FACE_DATA` | String | Base64 face data. If valid, skips liveness step and uses this for comparison with NFC portrait or document portrait |
@@ -56,5 +56,5 @@ dependencies {
56
56
  //noinspection GradleDynamicVersion
57
57
  implementation "com.facebook.react:react-native:+" // From node_modules
58
58
  //kalapasdk
59
- implementation 'vn.kalapa:ekyc:2.10.9'
59
+ implementation 'vn.kalapa:ekyc:2.11.0'
60
60
  }
@@ -51,6 +51,8 @@ public class KalapaEkycModule extends ReactContextBaseJavaModule {
51
51
 
52
52
  String domain = data.getString("domain");
53
53
  String mainColor = data.getString("main_color") != null ? data.getString("main_color") : "#1F69E6";
54
+ String successColor = data.getString("success_color") != null ? data.getString("success_color") : "#388E3C";
55
+ String failureColor = data.getString("failure_color") != null ? data.getString("failure_color") : "#F44336";
54
56
  String background = data.getString("background_color") != null ? data.getString("background_color") : "#FFFFFF";
55
57
  String mainTextColor = data.getString("main_text_color") != null ? data.getString("main_text_color") : "#000000";
56
58
  String btnTextColor = data.getString("btn_text_color") != null ? data.getString("btn_text_color") : "#FFFFFF";
@@ -68,6 +70,8 @@ public class KalapaEkycModule extends ReactContextBaseJavaModule {
68
70
  .withBaseURL(domain)
69
71
  .withMainColor(mainColor)
70
72
  .withBackgroundColor(background)
73
+ .withSuccessColor(successColor)
74
+ .withFailureColor(failureColor)
71
75
  .withMainTextColor(mainTextColor)
72
76
  .withBtnTextColor(btnTextColor)
73
77
  .withLanguage(language)
package/ios/KalapaEkyc.m CHANGED
@@ -14,7 +14,7 @@ RCT_EXPORT_METHOD(start:(NSString *)session
14
14
  {
15
15
  dispatch_async(dispatch_get_main_queue(), ^{
16
16
  if (@available(iOS 13, *)) {
17
- NSString *domain = data[@"domain"] ?: @"https://ekyc-api.kalapa.vn";
17
+ NSString *domain = data[@"domain"] ?: @"https://ekyc-sdk.kalapa.vn";
18
18
  NSString *language = data[@"language"] ?: @"vi";
19
19
 
20
20
  NSString *mainColor = data[@"main_color"] ?: @"3270EA";
@@ -22,18 +22,28 @@ RCT_EXPORT_METHOD(start:(NSString *)session
22
22
  NSString *mainTextColor = data[@"main_text_color"] ?: @"000000";
23
23
  NSString *btnTextColor = data[@"btn_text_color"] ?: @"ffffff";
24
24
  NSInteger livenessVersion = [data[@"liveness_version"] integerValue] ?: 0;
25
+ NSString *successColor = data[@"success_color"] ?: @"6200EA";
26
+ NSString *failureColor = data[@"failure_color"] ?: @"00BCD4";
25
27
 
26
28
  NSString *faceData = data[@"face_data"];
27
29
  NSString *mrz = data[@"mrz"];
28
30
  NSString *sessionID = data[@"session_id"];
29
31
  id val = data[@"allow_mrz_rescan_on_nfc_mismatch"];
30
32
  BOOL allowMRZRescanOnNfcMismatch = [val isKindOfClass:NSNumber.class] ? [val boolValue] : NO;
33
+
34
+ KLPThemeColor *themeColor = [[[KLPThemeColor Builder]
35
+ withSuccessColor:successColor]
36
+ withFailureColor:failureColor];
37
+
38
+ KLPTheme *theme = [[KLPTheme Builder]
39
+ withColor:themeColor];
31
40
 
32
- KLPAppearance *klpAppearance = [[[[[[KLPAppearance Builder]
33
- withLanguage:language]
34
- withMainColor:mainColor]
35
- withBackgroundColor:backgroundColor]
36
- withMainTextColor:mainTextColor]
41
+ KLPAppearance *klpAppearance = [[[[[[[KLPAppearance Builder]
42
+ withLanguage:language]
43
+ withMainColor:mainColor]
44
+ withBackgroundColor:backgroundColor]
45
+ withMainTextColor:mainTextColor]
46
+ withTheme:theme]
37
47
  withBtnTextColor:btnTextColor];
38
48
 
39
49
  KLPConfig *klpConfig = [self configureKLPWithSession:session
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-kalapa-ekyc",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "React Native SDK for Kalapa eKYC integration",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",