react-native-plaid-link-sdk 7.1.1 → 7.2.0

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.
@@ -21,6 +21,7 @@ buildscript {
21
21
  dependencies {
22
22
  classpath 'com.android.tools.build:gradle:3.6.2'
23
23
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
24
+ classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10'
24
25
  }
25
26
  }
26
27
 
@@ -65,7 +66,7 @@ repositories {
65
66
 
66
67
  dependencies {
67
68
  implementation "com.facebook.react:react-native:+"
68
- implementation "com.plaid.link:sdk-core:3.6.1"
69
+ implementation "com.plaid.link:sdk-core:3.6.2"
69
70
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
70
71
  implementation "com.jakewharton.rxrelay2:rxrelay:2.1.1"
71
72
  }
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
  distributionPath=wrapper/dists
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
6
- distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-all.zip
package/android/gradlew CHANGED
File without changes
@@ -4,7 +4,7 @@
4
4
  <application>
5
5
  <meta-data
6
6
  android:name="com.plaid.link.react_native"
7
- android:value="7.1.1" />
7
+ android:value="7.2.0" />
8
8
  </application>
9
9
 
10
10
  </manifest>
@@ -45,6 +45,7 @@ class PlaidModule internal constructor(reactContext: ReactApplicationContext) :
45
45
  private const val ENV = "environment"
46
46
  private const val LINK_CUSTOMIZATION_NAME = "linkCustomizationName"
47
47
  private const val TOKEN = "token"
48
+ private const val NO_LOADING_STATE = "noLoadingState"
48
49
  private const val USER_EMAIL = "userEmailAddress"
49
50
  private const val USER_NAME = "userLegalName"
50
51
  private const val USER_PHONE = "userPhoneNumber"
@@ -92,6 +93,10 @@ class PlaidModule internal constructor(reactContext: ReactApplicationContext) :
92
93
  .token(token)
93
94
  .logLevel(logLevel)
94
95
 
96
+ maybeGetBooleanField(obj, NO_LOADING_STATE)?.let {
97
+ builder.noLoadingState(it)
98
+ }
99
+
95
100
  if (extrasMap.isNotEmpty()) {
96
101
  builder.extraParams(extrasMap)
97
102
  }
@@ -277,6 +282,13 @@ class PlaidModule internal constructor(reactContext: ReactApplicationContext) :
277
282
  return null
278
283
  }
279
284
 
285
+ private fun maybeGetBooleanField(obj: JSONObject, fieldName: String): Boolean? {
286
+ if (obj.has(fieldName)) {
287
+ return obj.getBoolean(fieldName);
288
+ }
289
+ return null
290
+ }
291
+
280
292
  private fun maybePopulateExtrasMap(obj: JSONObject, extrasMap: MutableMap<String, String>) {
281
293
  if (obj.has(EXTRAS)) {
282
294
  val extrasArray = obj.getJSONArray(EXTRAS)
package/dist/PlaidLink.js CHANGED
@@ -86,6 +86,11 @@ export const useDeepLinkRedirector = () => {
86
86
  }, []);
87
87
  };
88
88
  export const PlaidLink = (props) => {
89
+ function onPress() {
90
+ var _a;
91
+ (_a = props.onPress) === null || _a === void 0 ? void 0 : _a.call(props);
92
+ openLink(props);
93
+ }
89
94
  useDeepLinkRedirector();
90
- return <TouchableOpacity onPress={() => openLink(props)}>{props.children}</TouchableOpacity>;
95
+ return <TouchableOpacity onPress={onPress}>{props.children}</TouchableOpacity>;
91
96
  };
package/dist/Types.d.ts CHANGED
@@ -5,6 +5,7 @@ interface CommonPlaidLinkOptions {
5
5
  }
6
6
  export declare type LinkTokenConfiguration = (CommonPlaidLinkOptions & {
7
7
  token: string;
8
+ noLoadingState: boolean;
8
9
  });
9
10
  export declare type LinkPublicKeyConfiguration = (CommonPlaidLinkOptions & {
10
11
  token?: string;
@@ -372,6 +373,7 @@ export interface PlaidLinkProps {
372
373
  publicKeyConfig?: LinkPublicKeyConfiguration;
373
374
  onSuccess: LinkSuccessListener;
374
375
  onExit?: LinkExitListener;
376
+ onPress?(): any;
375
377
  }
376
378
  export declare type PlaidLinkComponentProps = (PlaidLinkProps & {
377
379
  children: React.ReactNode;
package/ios/RNLinksdk.m CHANGED
@@ -22,10 +22,11 @@ static NSString* const kRNLinkKitConfigAccountSubtypes = @"accountSubtypes";
22
22
  static NSString* const kRNLinkKitConfigCountryCodesKey = @"countryCodes";
23
23
  static NSString* const kRNLinkKitConfigLanguageKey = @"language";
24
24
  static NSString* const kRNLinkKitConfigInstitutionKey = @"institution";
25
+ static NSString* const kRNLinkKitConfigNoLoadingStateKey = @"noLoadingState";
25
26
  static NSString* const kRNLinkKitConfigLongtailAuthKey = @"longtailAuth";
26
27
  static NSString* const kRNLinkKitConfigApiVersionKey = @"apiVersion";
27
28
  static NSString* const kRNLinkKitConfigOAuthRedirectUriKeyPath = @"oauthConfiguration.redirectUri";
28
- static NSString* const kRNLinkKitConfigOAuthNonceKeyPath = @"ouathConfiguration.nonce";
29
+ static NSString* const kRNLinkKitConfigOAuthNonceKeyPath = @"oauthConfiguration.nonce";
29
30
 
30
31
  static NSString* const kRNLinkKitOnEventEvent = @"onEvent";
31
32
  static NSString* const kRNLinkKitEventErrorKey = @"error";
@@ -116,7 +117,7 @@ NSString* const kRNLinkKitPublicTokenPrefix = @"public-";
116
117
  RCT_EXPORT_MODULE();
117
118
 
118
119
  + (NSString*)sdkVersion {
119
- return @"7.1.1"; // SDK_VERSION
120
+ return @"7.2.0"; // SDK_VERSION
120
121
  }
121
122
 
122
123
  + (NSString*)objCBridgeVersion {
@@ -209,6 +210,8 @@ RCT_EXPORT_METHOD(create:(NSDictionary*)configuration) {
209
210
  onSuccessHandler:onSuccess];
210
211
  config.onEvent = onEvent;
211
212
  config.onExit = onExit;
213
+ config.noLoadingState = configuration[kRNLinkKitConfigNoLoadingStateKey];
214
+
212
215
  NSError *creationError = nil;
213
216
  self.linkHandler = [PLKPlaid createWithLinkTokenConfiguration:config
214
217
  error:&creationError];
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>SchemeUserState</key>
6
+ <dict>
7
+ <key>RNLinksdk.xcscheme_^#shared#^_</key>
8
+ <dict>
9
+ <key>orderHint</key>
10
+ <integer>0</integer>
11
+ </dict>
12
+ </dict>
13
+ <key>SuppressBuildableAutocreation</key>
14
+ <dict>
15
+ <key>58B511DA1A9E6C8500147676</key>
16
+ <dict>
17
+ <key>primary</key>
18
+ <true/>
19
+ </dict>
20
+ </dict>
21
+ </dict>
22
+ </plist>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-plaid-link-sdk",
3
- "version": "7.1.1",
3
+ "version": "7.2.0",
4
4
  "description": "React Native Plaid Link SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
16
16
  s.source_files = "ios/*.{h,m}"
17
17
 
18
18
  s.dependency 'React-Core'
19
- s.dependency 'Plaid', '~> 2.2.2'
19
+ s.dependency 'Plaid', '~> 2.3.1'
20
20
  end