@stripe/stripe-react-native 0.59.2 → 0.61.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.
- package/README.md +1 -1
- package/android/gradle.properties +2 -2
- package/android/src/main/java/com/reactnativestripesdk/FakeOnrampSdkModule.kt +2 -2
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetManager.kt +123 -89
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +12 -9
- package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +6 -5
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampMappers.kt +54 -0
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampSdkModule.kt +36 -39
- package/ios/Mappers.swift +66 -37
- package/ios/StripeSdkImpl.swift +14 -5
- package/ios/StripeSwiftInterop.h +1 -1
- package/jest/mock.js +1 -1
- package/lib/commonjs/components/AddToWalletButton.js +1 -1
- package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
- package/lib/commonjs/components/AddressSheet.js +1 -1
- package/lib/commonjs/components/AddressSheet.js.map +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
- package/lib/commonjs/components/CardField.js +1 -1
- package/lib/commonjs/components/CardField.js.map +1 -1
- package/lib/commonjs/components/CardForm.js +1 -1
- package/lib/commonjs/components/CardForm.js.map +1 -1
- package/lib/commonjs/components/PlatformPayButton.js +1 -1
- package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
- package/lib/commonjs/components/StripeContainer.js +1 -1
- package/lib/commonjs/components/StripeContainer.js.map +1 -1
- package/lib/commonjs/connect/Components.js +1 -1
- package/lib/commonjs/connect/Components.js.map +1 -1
- package/lib/commonjs/connect/ConnectComponentsProvider.js +1 -1
- package/lib/commonjs/connect/ConnectComponentsProvider.js.map +1 -1
- package/lib/commonjs/connect/EmbeddedComponent.js +1 -1
- package/lib/commonjs/connect/EmbeddedComponent.js.map +1 -1
- package/lib/commonjs/connect/ModalCloseButton.js +1 -1
- package/lib/commonjs/connect/ModalCloseButton.js.map +1 -1
- package/lib/commonjs/connect/NavigationBar.js +1 -1
- package/lib/commonjs/connect/NavigationBar.js.map +1 -1
- package/lib/commonjs/helpers.js +1 -1
- package/lib/commonjs/hooks/useOnramp.js.map +1 -1
- package/lib/commonjs/specs/NativeAddToWalletButton.js +1 -1
- package/lib/commonjs/specs/NativeAddressSheet.js +1 -1
- package/lib/commonjs/specs/NativeApplePayButton.js +1 -1
- package/lib/commonjs/specs/NativeAuBECSDebitForm.js +1 -1
- package/lib/commonjs/specs/NativeCardField.js +1 -1
- package/lib/commonjs/specs/NativeCardField.js.map +1 -1
- package/lib/commonjs/specs/NativeCardForm.js +1 -1
- package/lib/commonjs/specs/NativeCardForm.js.map +1 -1
- package/lib/commonjs/specs/NativeConnectAccountOnboardingView.js +1 -1
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +1 -1
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -1
- package/lib/commonjs/specs/NativeGooglePayButton.js +1 -1
- package/lib/commonjs/specs/NativeNavigationBar.js +1 -1
- package/lib/commonjs/specs/NativePaymentMethodMessagingElement.js +1 -1
- package/lib/commonjs/specs/NativeStripeContainer.js +1 -1
- package/lib/commonjs/types/EmbeddedPaymentElement.js +1 -1
- package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -1
- package/lib/commonjs/types/Onramp.js +1 -1
- package/lib/commonjs/types/Onramp.js.map +1 -1
- package/lib/module/components/AddToWalletButton.js +1 -1
- package/lib/module/components/AddToWalletButton.js.map +1 -1
- package/lib/module/components/AddressSheet.js +1 -1
- package/lib/module/components/AddressSheet.js.map +1 -1
- package/lib/module/components/AuBECSDebitForm.js +1 -1
- package/lib/module/components/AuBECSDebitForm.js.map +1 -1
- package/lib/module/components/CardField.js +1 -1
- package/lib/module/components/CardField.js.map +1 -1
- package/lib/module/components/CardForm.js +1 -1
- package/lib/module/components/CardForm.js.map +1 -1
- package/lib/module/components/PlatformPayButton.js +1 -1
- package/lib/module/components/PlatformPayButton.js.map +1 -1
- package/lib/module/components/StripeContainer.js +1 -1
- package/lib/module/components/StripeContainer.js.map +1 -1
- package/lib/module/connect/Components.js +1 -1
- package/lib/module/connect/Components.js.map +1 -1
- package/lib/module/connect/ConnectComponentsProvider.js +1 -1
- package/lib/module/connect/ConnectComponentsProvider.js.map +1 -1
- package/lib/module/connect/EmbeddedComponent.js +1 -1
- package/lib/module/connect/EmbeddedComponent.js.map +1 -1
- package/lib/module/connect/ModalCloseButton.js +1 -1
- package/lib/module/connect/ModalCloseButton.js.map +1 -1
- package/lib/module/connect/NavigationBar.js +1 -1
- package/lib/module/connect/NavigationBar.js.map +1 -1
- package/lib/module/helpers.js +1 -1
- package/lib/module/hooks/useOnramp.js.map +1 -1
- package/lib/module/specs/NativeAddToWalletButton.js +1 -1
- package/lib/module/specs/NativeAddressSheet.js +1 -1
- package/lib/module/specs/NativeApplePayButton.js +1 -1
- package/lib/module/specs/NativeAuBECSDebitForm.js +1 -1
- package/lib/module/specs/NativeCardField.js +1 -1
- package/lib/module/specs/NativeCardField.js.map +1 -1
- package/lib/module/specs/NativeCardForm.js +1 -1
- package/lib/module/specs/NativeCardForm.js.map +1 -1
- package/lib/module/specs/NativeConnectAccountOnboardingView.js +1 -1
- package/lib/module/specs/NativeEmbeddedPaymentElement.js +1 -1
- package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -1
- package/lib/module/specs/NativeGooglePayButton.js +1 -1
- package/lib/module/specs/NativeNavigationBar.js +1 -1
- package/lib/module/specs/NativePaymentMethodMessagingElement.js +1 -1
- package/lib/module/specs/NativeStripeContainer.js +1 -1
- package/lib/module/types/EmbeddedPaymentElement.js +1 -1
- package/lib/module/types/EmbeddedPaymentElement.js.map +1 -1
- package/lib/module/types/Onramp.js +1 -1
- package/lib/module/types/Onramp.js.map +1 -1
- package/lib/typescript/src/hooks/useOnramp.d.ts +1 -1
- package/lib/typescript/src/hooks/useOnramp.d.ts.map +1 -1
- package/lib/typescript/src/types/Onramp.d.ts +41 -10
- package/lib/typescript/src/types/Onramp.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +0 -5
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useOnramp.tsx +7 -3
- package/src/types/Onramp.ts +42 -9
- package/src/types/index.ts +0 -6
- package/stripe-react-native.podspec +1 -1
package/ios/Mappers.swift
CHANGED
|
@@ -2,7 +2,7 @@ import Contacts
|
|
|
2
2
|
import Stripe
|
|
3
3
|
@_spi(ConfirmationTokensPublicPreview) import StripePayments
|
|
4
4
|
#if canImport(StripeCryptoOnramp)
|
|
5
|
-
@_spi(
|
|
5
|
+
@_spi(CryptoOnrampAlpha) import StripeCryptoOnramp
|
|
6
6
|
@_spi(STP) import StripePaymentSheet
|
|
7
7
|
#else
|
|
8
8
|
import StripePaymentSheet
|
|
@@ -1230,68 +1230,97 @@ class Mappers {
|
|
|
1230
1230
|
)
|
|
1231
1231
|
}
|
|
1232
1232
|
|
|
1233
|
-
class func mapToKycAddress(_ params: [String:
|
|
1233
|
+
class func mapToKycAddress(_ params: [String: Any]) -> Address {
|
|
1234
1234
|
return Address(
|
|
1235
|
-
city: params["city"],
|
|
1236
|
-
country: params["country"],
|
|
1237
|
-
line1: params["line1"],
|
|
1238
|
-
line2: params["line2"],
|
|
1239
|
-
postalCode: params["postalCode"],
|
|
1240
|
-
state: params["state"]
|
|
1235
|
+
city: normalizedString(params["city"]),
|
|
1236
|
+
country: normalizedString(params["country"]),
|
|
1237
|
+
line1: normalizedString(params["line1"]),
|
|
1238
|
+
line2: normalizedString(params["line2"]),
|
|
1239
|
+
postalCode: normalizedString(params["postalCode"]),
|
|
1240
|
+
state: normalizedString(params["state"])
|
|
1241
1241
|
)
|
|
1242
1242
|
}
|
|
1243
1243
|
|
|
1244
|
-
class func mapToKycInfo(_ params: [String: Any
|
|
1245
|
-
|
|
1246
|
-
|
|
1244
|
+
class func mapToKycInfo(_ params: [String: Any]) throws -> KycInfo {
|
|
1245
|
+
let address = try mapOptionalKycAddress(params["address"])
|
|
1246
|
+
let dateOfBirth = try mapOptionalDateOfBirth(params["dateOfBirth"])
|
|
1247
|
+
|
|
1248
|
+
return KycInfo(
|
|
1249
|
+
firstName: normalizedString(params["firstName"]),
|
|
1250
|
+
lastName: normalizedString(params["lastName"]),
|
|
1251
|
+
idNumber: normalizedString(params["idNumber"]),
|
|
1252
|
+
address: address,
|
|
1253
|
+
dateOfBirth: dateOfBirth
|
|
1254
|
+
)
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
private class func mapOptionalKycAddress(_ value: Any?) throws -> Address? {
|
|
1258
|
+
guard let value else {
|
|
1259
|
+
return nil
|
|
1247
1260
|
}
|
|
1248
1261
|
|
|
1249
|
-
guard let
|
|
1250
|
-
throw KycInfoError.
|
|
1262
|
+
guard let addressParams = value as? [String: Any] else {
|
|
1263
|
+
throw KycInfoError.invalidField("address")
|
|
1251
1264
|
}
|
|
1252
1265
|
|
|
1253
|
-
|
|
1254
|
-
|
|
1266
|
+
return mapToKycAddress(addressParams)
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
private class func mapOptionalDateOfBirth(_ value: Any?) throws -> KycInfo.DateOfBirth? {
|
|
1270
|
+
guard let value else {
|
|
1271
|
+
return nil
|
|
1255
1272
|
}
|
|
1256
1273
|
|
|
1257
|
-
guard let dateOfBirthParams =
|
|
1258
|
-
throw KycInfoError.
|
|
1274
|
+
guard let dateOfBirthParams = value as? [String: Any] else {
|
|
1275
|
+
throw KycInfoError.invalidField("dateOfBirth")
|
|
1259
1276
|
}
|
|
1260
1277
|
|
|
1261
|
-
guard
|
|
1262
|
-
|
|
1278
|
+
guard
|
|
1279
|
+
let day = intValue(dateOfBirthParams["day"]),
|
|
1280
|
+
let month = intValue(dateOfBirthParams["month"]),
|
|
1281
|
+
let year = intValue(dateOfBirthParams["year"])
|
|
1282
|
+
else {
|
|
1283
|
+
throw KycInfoError.invalidField("dateOfBirth")
|
|
1263
1284
|
}
|
|
1264
1285
|
|
|
1265
|
-
|
|
1266
|
-
|
|
1286
|
+
return KycInfo.DateOfBirth(day: day, month: month, year: year)
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
private class func intValue(_ value: Any?) -> Int? {
|
|
1290
|
+
if let intValue = value as? Int {
|
|
1291
|
+
return intValue
|
|
1267
1292
|
}
|
|
1268
1293
|
|
|
1269
|
-
|
|
1270
|
-
|
|
1294
|
+
if let number = value as? NSNumber {
|
|
1295
|
+
return number.intValue
|
|
1271
1296
|
}
|
|
1272
1297
|
|
|
1273
|
-
|
|
1298
|
+
return nil
|
|
1299
|
+
}
|
|
1274
1300
|
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
} else {
|
|
1279
|
-
Address()
|
|
1301
|
+
private class func normalizedString(_ value: Any?) -> String? {
|
|
1302
|
+
guard let stringValue = value as? String else {
|
|
1303
|
+
return nil
|
|
1280
1304
|
}
|
|
1281
1305
|
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
lastName: lastName,
|
|
1285
|
-
idNumber: idNumber,
|
|
1286
|
-
address: address,
|
|
1287
|
-
dateOfBirth: dateOfBirth
|
|
1288
|
-
)
|
|
1306
|
+
let trimmed = stringValue.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
1307
|
+
return trimmed.isEmpty ? nil : trimmed
|
|
1289
1308
|
}
|
|
1290
1309
|
|
|
1291
1310
|
class func paymentMethodDisplayDataToMap(_ paymentMethodDisplayData: PaymentMethodDisplayData) -> [String: String] {
|
|
1311
|
+
let type = switch paymentMethodDisplayData.paymentMethodType {
|
|
1312
|
+
case .card:
|
|
1313
|
+
"Card"
|
|
1314
|
+
case .bankAccount:
|
|
1315
|
+
"BankAccount"
|
|
1316
|
+
case .applePay:
|
|
1317
|
+
"ApplePay"
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1292
1320
|
var result = [
|
|
1293
1321
|
"icon": "data:image/png;base64," + (paymentMethodDisplayData.icon.pngData()?.base64EncodedString(options: []) ?? ""),
|
|
1294
1322
|
"label": paymentMethodDisplayData.label,
|
|
1323
|
+
"type": type,
|
|
1295
1324
|
]
|
|
1296
1325
|
|
|
1297
1326
|
if let sublabel = paymentMethodDisplayData.sublabel {
|
|
@@ -1302,7 +1331,7 @@ class Mappers {
|
|
|
1302
1331
|
}
|
|
1303
1332
|
|
|
1304
1333
|
enum KycInfoError: Swift.Error {
|
|
1305
|
-
case
|
|
1334
|
+
case invalidField(String)
|
|
1306
1335
|
}
|
|
1307
1336
|
#endif
|
|
1308
1337
|
}
|
package/ios/StripeSdkImpl.swift
CHANGED
|
@@ -8,7 +8,7 @@ import StripeFinancialConnections
|
|
|
8
8
|
import StripePaymentsUI
|
|
9
9
|
import UIKit
|
|
10
10
|
#if canImport(StripeCryptoOnramp)
|
|
11
|
-
@_spi(
|
|
11
|
+
@_spi(CryptoOnrampAlpha) import StripeCryptoOnramp
|
|
12
12
|
|
|
13
13
|
@_spi(STP)
|
|
14
14
|
@_spi(EmbeddedPaymentElementPrivateBeta)
|
|
@@ -1347,6 +1347,13 @@ public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
|
|
|
1347
1347
|
try await coordinator.authenticateUserWithToken(linkAuthTokenClientSecret)
|
|
1348
1348
|
resolve([:]) // Return empty object on success
|
|
1349
1349
|
} catch {
|
|
1350
|
+
if let onrampError = error as? CryptoOnrampCoordinator.Error,
|
|
1351
|
+
case let .seamlessSignInTokenInvalid(reason) = onrampError {
|
|
1352
|
+
let errorResult = Errors.createError(ErrorType.Failed, reason ?? onrampError.localizedDescription)
|
|
1353
|
+
resolve(["error": errorResult["error"]!])
|
|
1354
|
+
return
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1350
1357
|
let errorResult = Errors.createError(ErrorType.Failed, error)
|
|
1351
1358
|
resolve(["error": errorResult["error"]!])
|
|
1352
1359
|
}
|
|
@@ -1391,7 +1398,7 @@ public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
|
|
|
1391
1398
|
return
|
|
1392
1399
|
}
|
|
1393
1400
|
|
|
1394
|
-
guard let kycInfoDictionary = info as? [String: Any
|
|
1401
|
+
guard let kycInfoDictionary = info as? [String: Any] else {
|
|
1395
1402
|
let errorResult = Errors.createError(ErrorType.Failed, "Unexpected format of KYC info dictionary. Expected String keys.")
|
|
1396
1403
|
resolve(["error": errorResult["error"]!])
|
|
1397
1404
|
return
|
|
@@ -1403,8 +1410,8 @@ public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
|
|
|
1403
1410
|
try await coordinator.attachKYCInfo(info: kycInfo)
|
|
1404
1411
|
resolve([:]) // Return empty object on success
|
|
1405
1412
|
} catch {
|
|
1406
|
-
if let
|
|
1407
|
-
let errorResult = Errors.createError(ErrorType.Unknown, "
|
|
1413
|
+
if let kycInfoError = error as? Mappers.KycInfoError, case let .invalidField(field) = kycInfoError {
|
|
1414
|
+
let errorResult = Errors.createError(ErrorType.Unknown, "Invalid format for field: \(field)")
|
|
1408
1415
|
resolve(["error": errorResult["error"]!])
|
|
1409
1416
|
} else {
|
|
1410
1417
|
let errorResult = Errors.createError(ErrorType.Failed, error)
|
|
@@ -1545,11 +1552,13 @@ public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
|
|
|
1545
1552
|
paymentMethodType = .card
|
|
1546
1553
|
case "BankAccount":
|
|
1547
1554
|
paymentMethodType = .bankAccount
|
|
1555
|
+
case "CardAndBankAccount":
|
|
1556
|
+
paymentMethodType = .cardAndBankAccount
|
|
1548
1557
|
case "PlatformPay":
|
|
1549
1558
|
guard let applePayParams = platformPayParams["applePay"] as? NSDictionary else {
|
|
1550
1559
|
resolve(Errors.createError(ErrorType.Failed, "You must provide the `applePay` parameter."))
|
|
1551
1560
|
return
|
|
1552
|
-
|
|
1561
|
+
}
|
|
1553
1562
|
|
|
1554
1563
|
let (error, paymentRequest) = ApplePayUtils.createPaymentRequest(merchantIdentifier: merchantIdentifier, params: applePayParams)
|
|
1555
1564
|
if let paymentRequest {
|
package/ios/StripeSwiftInterop.h
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
@protocol STPPaymentCardTextFieldDelegate;
|
|
12
12
|
@protocol STPCardFormViewDelegate;
|
|
13
13
|
|
|
14
|
-
typedef NS_ENUM(
|
|
14
|
+
typedef NS_ENUM(NSInteger, STPPaymentStatus);
|
|
15
15
|
|
|
16
16
|
// stripe_react_native-Swift.h also depends on these headers.
|
|
17
17
|
#import <React/RCTBridgeModule.h>
|
package/jest/mock.js
CHANGED
|
@@ -378,7 +378,7 @@ module.exports = {
|
|
|
378
378
|
};
|
|
379
379
|
|
|
380
380
|
// Mock NativeStripeSdkModule with getConstants for system info
|
|
381
|
-
jest.mock('
|
|
381
|
+
jest.mock('../src/specs/NativeStripeSdkModule', () => ({
|
|
382
382
|
default: {
|
|
383
383
|
getConstants: jest.fn(() => ({
|
|
384
384
|
API_VERSIONS: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddToWalletButton=AddToWalletButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddToWalletButton=_interopRequireDefault(require("../specs/NativeAddToWalletButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddToWalletButton=AddToWalletButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddToWalletButton=_interopRequireDefault(require("../specs/NativeAddToWalletButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AddToWalletButton.tsx";var _excluded=["onComplete"];function AddToWalletButton(_ref){var onComplete=_ref.onComplete,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAddToWalletButton.default,Object.assign({},props,{onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);}}));}
|
|
2
2
|
//# sourceMappingURL=AddToWalletButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddToWalletButton","_jsxRuntime","_jsxFileName","_excluded","AddToWalletButton","_ref","onComplete","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AddToWalletButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAcA,IAAAC,wBAAA,CAAAF,sBAAA,CAAAC,OAAA,sCAAuE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddToWalletButton","_jsxRuntime","_jsxFileName","_excluded","AddToWalletButton","_ref","onComplete","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AddToWalletButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAcA,IAAAC,wBAAA,CAAAF,sBAAA,CAAAC,OAAA,sCAAuE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,yFAAAC,SAAA,gBAgEhE,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAAkC,IAA/B,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAJ,IAAA,CAAAF,SAAA,EACtD,MACE,GAAAF,WAAA,CAAAS,GAAA,EAACV,wBAAA,CAAAS,OAAuB,CAAAE,MAAA,CAAAC,MAAA,IAClBL,KAAK,EACTM,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CACdC,KAEE,QACC,CAAAR,UAAU,CAACQ,KAAK,CAACC,WAAW,CAAC,EAAC,EACpC,CAAC,CAEN","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddressSheet=_interopRequireDefault(require("../specs/NativeAddressSheet"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddressSheet=_interopRequireDefault(require("../specs/NativeAddressSheet"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AddressSheet.tsx";var _excluded=["onSubmit","onError"];function AddressSheet(_ref){var onSubmit=_ref.onSubmit,onError=_ref.onError,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAddressSheet.default,Object.assign({},props,{onSubmitAction:function onSubmitAction(event){return onSubmit(event.nativeEvent.result);},onErrorAction:function onErrorAction(event){return onError(event.nativeEvent.error);}}));}
|
|
2
2
|
//# sourceMappingURL=AddressSheet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddressSheet","_jsxRuntime","_jsxFileName","_excluded","AddressSheet","_ref","onSubmit","onError","props","_objectWithoutProperties2","default","jsx","Object","assign","onSubmitAction","event","nativeEvent","result","onErrorAction","error"],"sourceRoot":"../../../src","sources":["components/AddressSheet.tsx"],"mappings":"8RAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAQA,IAAAC,mBAAA,CAAAF,sBAAA,CAAAC,OAAA,iCAA6D,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddressSheet","_jsxRuntime","_jsxFileName","_excluded","AddressSheet","_ref","onSubmit","onError","props","_objectWithoutProperties2","default","jsx","Object","assign","onSubmitAction","event","nativeEvent","result","onErrorAction","error"],"sourceRoot":"../../../src","sources":["components/AddressSheet.tsx"],"mappings":"8RAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAQA,IAAAC,mBAAA,CAAAF,sBAAA,CAAAC,OAAA,iCAA6D,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,oFAAAC,SAAA,wBA4DtD,QAAS,CAAAC,YAAYA,CAAAC,IAAA,CAAyC,IAAtC,CAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,OAAO,CAAAF,IAAA,CAAPE,OAAO,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAL,IAAA,CAAAF,SAAA,EACxD,MACE,GAAAF,WAAA,CAAAU,GAAA,EAACX,mBAAA,CAAAU,OAAkB,CAAAE,MAAA,CAAAC,MAAA,IACbL,KAAK,EACTM,cAAc,CAAE,QAAhB,CAAAA,cAAcA,CAAGC,KAAK,QAAK,CAAAT,QAAQ,CAACS,KAAK,CAACC,WAAW,CAACC,MAAM,CAAC,EAAC,CAC9DC,aAAa,CAAE,QAAf,CAAAA,aAAaA,CAAGH,KAAK,QAAK,CAAAR,OAAO,CAACQ,KAAK,CAACC,WAAW,CAACG,KAAK,CAAC,EAAC,EAC5D,CAAC,CAEN","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAuBECSDebitForm=_interopRequireDefault(require("../specs/NativeAuBECSDebitForm"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAuBECSDebitForm=_interopRequireDefault(require("../specs/NativeAuBECSDebitForm"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AuBECSDebitForm.tsx";var _excluded=["onComplete","companyName","formStyle"];function AuBECSDebitForm(_ref){var onComplete=_ref.onComplete,companyName=_ref.companyName,formStyle=_ref.formStyle,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAuBECSDebitForm.default,Object.assign({onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);},companyName:companyName,formStyle:Object.assign({},formStyle)},props));}
|
|
2
2
|
//# sourceMappingURL=AuBECSDebitForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAuBECSDebitForm","_jsxRuntime","_jsxFileName","_excluded","AuBECSDebitForm","_ref","onComplete","companyName","formStyle","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AuBECSDebitForm.tsx"],"mappings":"oSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAF,sBAAA,CAAAC,OAAA,oCAAmE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_NativeAuBECSDebitForm","_jsxRuntime","_jsxFileName","_excluded","AuBECSDebitForm","_ref","onComplete","companyName","formStyle","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AuBECSDebitForm.tsx"],"mappings":"oSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAF,sBAAA,CAAAC,OAAA,oCAAmE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,uFAAAC,SAAA,0CA6B5D,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAKrB,IAJR,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CACVC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CACXC,SAAS,CAAAH,IAAA,CAATG,SAAS,CACNC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAN,IAAA,CAAAF,SAAA,EAER,MACE,GAAAF,WAAA,CAAAW,GAAA,EAACZ,sBAAA,CAAAW,OAAqB,CAAAE,MAAA,CAAAC,MAAA,EACpBC,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CAAGC,KAAK,QAAK,CAAAV,UAAU,CAACU,KAAK,CAACC,WAAW,CAAC,EAAC,CAC3DV,WAAW,CAAEA,WAAY,CACzBC,SAAS,CAAAK,MAAA,CAAAC,MAAA,IAAON,SAAS,CAAG,EACxBC,KAAK,CACV,CAAC,CAEN","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _helpers=require("../helpers");var _NativeCardField=_interopRequireWildcard(require("../specs/NativeCardField"));var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onCardChange","onFocus","onBlur","cardStyle","placeholders","autofocus","postalCodeEnabled","disabled","dangerouslyGetFullCardDetails"];var _this=this,_jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _helpers=require("../helpers");var _NativeCardField=_interopRequireWildcard(require("../specs/NativeCardField"));var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onCardChange","onFocus","onBlur","cardStyle","placeholders","autofocus","postalCodeEnabled","disabled","dangerouslyGetFullCardDetails"];var _this=this,_jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/CardField.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var CardField=exports.CardField=(0,_react.forwardRef)(function(_ref,ref){var onCardChange=_ref.onCardChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,autofocus=_ref.autofocus,postalCodeEnabled=_ref.postalCodeEnabled,disabled=_ref.disabled,dangerouslyGetFullCardDetails=_ref.dangerouslyGetFullCardDetails,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onCardChangeHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent.card;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,validExpiryDate:card.validExpiryDate,validNumber:card.validNumber,validCVC:card.validCVC};if(card.hasOwnProperty('postalCode')){data.postalCode=card.postalCode||'';}if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onCardChange&&card.complete){console.warn(`[stripe-react-native] ⚠️ WARNING: You've enabled \`dangerouslyGetFullCardDetails\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`);}}onCardChange==null||onCardChange(data);},[onCardChange]);var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);onFocus==null||onFocus(focusedField);}else{onBlur==null||onBlur();}},[onFocus,onBlur]);var focus=function focus(){_NativeCardField.Commands.focus(inputRef.current);};var blur=function blur(){_NativeCardField.Commands.blur(inputRef.current);};var clear=function clear(){_NativeCardField.Commands.clear(inputRef.current);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur,clear:clear};});(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(_NativeCardField.default,Object.assign({ref:inputRef,onCardChange:onCardChangeHandler,onFocusChange:onFocusHandler,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode},autofocus:autofocus!=null?autofocus:false,postalCodeEnabled:postalCodeEnabled!=null?postalCodeEnabled:true,disabled:disabled!=null?disabled:false,dangerouslyGetFullCardDetails:dangerouslyGetFullCardDetails!=null?dangerouslyGetFullCardDetails:false},props));});
|
|
2
2
|
//# sourceMappingURL=CardField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_helpers","_NativeCardField","_jsxRuntime","_excluded","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CardField","exports","forwardRef","_ref","ref","onCardChange","onFocus","onBlur","cardStyle","placeholders","autofocus","postalCodeEnabled","disabled","dangerouslyGetFullCardDetails","props","_objectWithoutProperties2","inputRef","useRef","onCardChangeHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","postalCode","number","cvc","__DEV__","console","warn","onFocusHandler","focusedField","focusInput","current","focus","Commands","blur","clear","useImperativeHandle","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","onFocusChange","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"sourceRoot":"../../../src","sources":["components/CardField.tsx"],"mappings":"qRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAaA,IAAAC,QAAA,CAAAD,OAAA,eAMA,IAAAE,gBAAA,CAAAH,uBAAA,CAAAC,OAAA,8BAGkC,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,+IAAAC,KAAA,MAAAC,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_helpers","_NativeCardField","_jsxRuntime","_excluded","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CardField","exports","forwardRef","_ref","ref","onCardChange","onFocus","onBlur","cardStyle","placeholders","autofocus","postalCodeEnabled","disabled","dangerouslyGetFullCardDetails","props","_objectWithoutProperties2","inputRef","useRef","onCardChangeHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","postalCode","number","cvc","__DEV__","console","warn","onFocusHandler","focusedField","focusInput","current","focus","Commands","blur","clear","useImperativeHandle","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","onFocusChange","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"sourceRoot":"../../../src","sources":["components/CardField.tsx"],"mappings":"qRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAaA,IAAAC,QAAA,CAAAD,OAAA,eAMA,IAAAE,gBAAA,CAAAH,uBAAA,CAAAC,OAAA,8BAGkC,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,+IAAAC,KAAA,MAAAC,YAAA,sFAAAP,wBAAAQ,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAV,uBAAA,UAAAA,wBAAAQ,CAAA,CAA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A,iBAAiB,CAAI,IAAK,CAC7CC,QAAQ,CAAEA,QAAQ,OAARA,QAAQ,CAAI,KAAM,CAC5BC,6BAA6B,CAAEA,6BAA6B,OAA7BA,6BAA6B,CAAI,KAAM,EAClEC,KAAK,CACV,CAAC,CAEN,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardForm=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _NativeCardForm=_interopRequireWildcard(require("../specs/NativeCardForm"));var _helpers=require("../helpers");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onFormComplete","cardStyle","placeholders","defaultValues","autofocus","dangerouslyGetFullCardDetails","disabled"];var _this=this,_jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardForm=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _NativeCardForm=_interopRequireWildcard(require("../specs/NativeCardForm"));var _helpers=require("../helpers");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onFormComplete","cardStyle","placeholders","defaultValues","autofocus","dangerouslyGetFullCardDetails","disabled"];var _this=this,_jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/CardForm.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var CardForm=exports.CardForm=(0,_react.forwardRef)(function(_ref,ref){var onFormComplete=_ref.onFormComplete,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,defaultValues=_ref.defaultValues,autofocus=_ref.autofocus,dangerouslyGetFullCardDetails=_ref.dangerouslyGetFullCardDetails,disabled=_ref.disabled,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onFormCompleteHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent.card;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,country:card.country,postalCode:card.postalCode};if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onFormComplete&&card.complete){console.warn(`[stripe-react-native] ⚠️ WARNING: You've enabled \`dangerouslyGetFullCardDetails\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`);}}onFormComplete==null||onFormComplete(data);},[onFormComplete]);var focus=function focus(){_NativeCardForm.Commands.focus(inputRef.current);};var blur=function blur(){_NativeCardForm.Commands.blur(inputRef.current);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur};});var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);}},[]);(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(_NativeCardForm.default,Object.assign({ref:inputRef,onFormComplete:onFormCompleteHandler,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode},defaultValues:Object.assign({},defaultValues!=null?defaultValues:{}),onFocusChange:onFocusHandler,autofocus:autofocus!=null?autofocus:false,dangerouslyGetFullCardDetails:dangerouslyGetFullCardDetails!=null?dangerouslyGetFullCardDetails:false,disabled:disabled!=null?disabled:false,postalCodeEnabled:true},props));});
|
|
2
2
|
//# sourceMappingURL=CardForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_NativeCardForm","_helpers","_jsxRuntime","_excluded","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CardForm","exports","forwardRef","_ref","ref","onFormComplete","cardStyle","placeholders","defaultValues","autofocus","dangerouslyGetFullCardDetails","disabled","props","_objectWithoutProperties2","inputRef","useRef","onFormCompleteHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","number","cvc","__DEV__","console","warn","focus","Commands","current","blur","useImperativeHandle","onFocusHandler","focusedField","focusInput","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration","onFocusChange","postalCodeEnabled"],"sourceRoot":"../../../src","sources":["components/CardForm.tsx"],"mappings":"oRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAaA,IAAAC,eAAA,CAAAF,uBAAA,CAAAC,OAAA,6BACA,IAAAE,QAAA,CAAAF,OAAA,eAKoB,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,0HAAAC,KAAA,MAAAC,YAAA
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_NativeCardForm","_helpers","_jsxRuntime","_excluded","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CardForm","exports","forwardRef","_ref","ref","onFormComplete","cardStyle","placeholders","defaultValues","autofocus","dangerouslyGetFullCardDetails","disabled","props","_objectWithoutProperties2","inputRef","useRef","onFormCompleteHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","number","cvc","__DEV__","console","warn","focus","Commands","current","blur","useImperativeHandle","onFocusHandler","focusedField","focusInput","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration","onFocusChange","postalCodeEnabled"],"sourceRoot":"../../../src","sources":["components/CardForm.tsx"],"mappings":"oRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAaA,IAAAC,eAAA,CAAAF,uBAAA,CAAAC,OAAA,6BACA,IAAAE,QAAA,CAAAF,OAAA,eAKoB,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,0HAAAC,KAAA,MAAAC,YAAA,qFAAAP,wBAAAQ,CAAA,CAAAC,CAAA,wBAAAC,OA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AS,CAAE6C,WAAW,CACnCC,YAAY,CAAE9C,SAAS,cAATA,SAAS,CAAE8C,YAAY,CACrCC,WAAW,CAAE/C,SAAS,cAATA,SAAS,CAAE+C,WAAW,CACnCC,QAAQ,CAAEhD,SAAS,cAATA,SAAS,CAAEgD,QAAQ,CAC7BC,gBAAgB,CAAEjD,SAAS,cAATA,SAAS,CAAEiD,gBAAgB,CAC7CC,SAAS,CAAElD,SAAS,cAATA,SAAS,CAAEkD,SAAS,CAC/BC,cAAc,CAAEnD,SAAS,cAATA,SAAS,CAAEmD,cAAc,CACzCC,UAAU,CAAEpD,SAAS,cAATA,SAAS,CAAEoD,UACzB,CAAE,CACFnD,YAAY,CAAE,CACZsB,MAAM,CAAEtB,YAAY,cAAZA,YAAY,CAAEsB,MAAM,CAC5B8B,UAAU,CAAEpD,YAAY,cAAZA,YAAY,CAAEoD,UAAU,CACpC7B,GAAG,CAAEvB,YAAY,cAAZA,YAAY,CAAEuB,GAAG,CACtBF,UAAU,CAAErB,YAAY,cAAZA,YAAY,CAAEqB,UAC5B,CAAE,CACFpB,aAAa,CAAAX,MAAA,CAAAmD,MAAA,IACPxC,aAAa,OAAbA,aAAa,CAAI,CAAC,CAAC,CACvB,CACFoD,aAAa,CAAErB,cAAe,CAC9B9B,SAAS,CAAEA,SAAS,OAATA,SAAS,CAAI,KAAM,CAC9BC,6BAA6B,CAAEA,6BAA6B,OAA7BA,6BAA6B,CAAI,KAAM,CACtEC,QAAQ,CAAEA,QAAQ,OAARA,QAAQ,CAAI,KAAM,CAC5BkD,iBAAiB,OACbjD,KAAK,CACV,CAAC,CAEN,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PlatformPayButton=PlatformPayButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _PlatformPay=require("../types/PlatformPay");var _NativeApplePayButton=_interopRequireDefault(require("../specs/NativeApplePayButton"));var _NativeGooglePayButton=_interopRequireDefault(require("../specs/NativeGooglePayButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PlatformPayButton=PlatformPayButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _PlatformPay=require("../types/PlatformPay");var _NativeApplePayButton=_interopRequireDefault(require("../specs/NativeApplePayButton"));var _NativeGooglePayButton=_interopRequireDefault(require("../specs/NativeGooglePayButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/PlatformPayButton.tsx";var _excluded=["type","appearance","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","setOrderTracking","style"];function PlatformPayButton(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?_PlatformPay.ButtonType.Default:_ref$type,_ref$appearance=_ref.appearance,appearance=_ref$appearance===void 0?_PlatformPay.ButtonStyle.Automatic:_ref$appearance,onPress=_ref.onPress,disabled=_ref.disabled,borderRadius=_ref.borderRadius,onShippingMethodSelected=_ref.onShippingMethodSelected,onShippingContactSelected=_ref.onShippingContactSelected,onCouponCodeEntered=_ref.onCouponCodeEntered,setOrderTracking=_ref.setOrderTracking,style=_ref.style,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var shippingMethodCallback=onShippingMethodSelected?function(value){onShippingMethodSelected&&onShippingMethodSelected(value.nativeEvent);}:undefined;var shippingContactCallback=onShippingContactSelected?function(value){onShippingContactSelected(value.nativeEvent);}:undefined;var couponCodeCallback=onCouponCodeEntered?function(value){onCouponCodeEntered&&onCouponCodeEntered(value.nativeEvent);}:undefined;var orderTrackingCallback=setOrderTracking?function(){setOrderTracking(_NativeStripeSdkModule.default.configureOrderTracking);}:undefined;var callbackProps={onShippingMethodSelectedAction:shippingMethodCallback,onShippingContactSelectedAction:shippingContactCallback,onCouponCodeEnteredAction:couponCodeCallback,onOrderTrackingAction:orderTrackingCallback,hasShippingMethodCallback:!!onShippingMethodSelected,hasShippingContactCallback:!!onShippingContactSelected,hasCouponCodeCallback:!!onCouponCodeEntered,hasOrderTrackingCallback:!!setOrderTracking};return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{disabled:disabled,activeOpacity:disabled?0.3:1,onPress:onPress,style:[disabled?styles.disabled:styles.notDisabled,style],children:_reactNative.Platform.OS==='ios'?(0,_jsxRuntime.jsx)(_NativeApplePayButton.default,Object.assign({type:type,buttonStyle:appearance,buttonBorderRadius:borderRadius,disabled:disabled!=null?disabled:false,style:styles.nativeButtonStyle},callbackProps,props)):(0,_jsxRuntime.jsx)(_NativeGooglePayButton.default,Object.assign({type:type,appearance:appearance,borderRadius:borderRadius,style:styles.nativeButtonStyle},props))});}var styles=_reactNative.StyleSheet.create({disabled:{flex:0,opacity:0.4},notDisabled:{flex:0},nativeButtonStyle:{flex:1}});
|
|
2
2
|
//# sourceMappingURL=PlatformPayButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_NativeStripeSdkModule","_PlatformPay","_NativeApplePayButton","_NativeGooglePayButton","_jsxRuntime","_jsxFileName","_excluded","PlatformPayButton","_ref","_ref$type","type","ButtonType","Default","_ref$appearance","appearance","ButtonStyle","Automatic","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","setOrderTracking","style","props","_objectWithoutProperties2","default","shippingMethodCallback","value","nativeEvent","undefined","shippingContactCallback","couponCodeCallback","orderTrackingCallback","NativeStripeSdk","configureOrderTracking","callbackProps","onShippingMethodSelectedAction","onShippingContactSelectedAction","onCouponCodeEnteredAction","onOrderTrackingAction","hasShippingMethodCallback","hasShippingContactCallback","hasCouponCodeCallback","hasOrderTrackingCallback","jsx","TouchableOpacity","activeOpacity","styles","notDisabled","children","Platform","OS","Object","assign","buttonStyle","buttonBorderRadius","nativeButtonStyle","StyleSheet","create","flex","opacity"],"sourceRoot":"../../../src","sources":["components/PlatformPayButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,sBAAA,CAAAH,sBAAA,CAAAC,OAAA,oCACA,IAAAG,YAAA,CAAAH,OAAA,yBAMA,IAAAI,qBAAA,CAAAL,sBAAA,CAAAC,OAAA,mCACA,IAAAK,sBAAA,CAAAN,sBAAA,CAAAC,OAAA,oCAAmE,IAAAM,WAAA,CAAAN,OAAA,0BAAAO,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_NativeStripeSdkModule","_PlatformPay","_NativeApplePayButton","_NativeGooglePayButton","_jsxRuntime","_jsxFileName","_excluded","PlatformPayButton","_ref","_ref$type","type","ButtonType","Default","_ref$appearance","appearance","ButtonStyle","Automatic","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","setOrderTracking","style","props","_objectWithoutProperties2","default","shippingMethodCallback","value","nativeEvent","undefined","shippingContactCallback","couponCodeCallback","orderTrackingCallback","NativeStripeSdk","configureOrderTracking","callbackProps","onShippingMethodSelectedAction","onShippingContactSelectedAction","onCouponCodeEnteredAction","onOrderTrackingAction","hasShippingMethodCallback","hasShippingContactCallback","hasCouponCodeCallback","hasOrderTrackingCallback","jsx","TouchableOpacity","activeOpacity","styles","notDisabled","children","Platform","OS","Object","assign","buttonStyle","buttonBorderRadius","nativeButtonStyle","StyleSheet","create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,CACxB2C,kBAAkB,CAAEtC,YAAa,CACjCD,QAAQ,CAAEA,QAAQ,OAARA,QAAQ,CAAI,KAAM,CAC5BM,KAAK,CAAEyB,MAAM,CAACS,iBAAkB,EAC5BrB,aAAa,CACbZ,KAAK,CACV,CAAC,CAEF,GAAArB,WAAA,CAAA0C,GAAA,EAAC3C,sBAAA,CAAAwB,OAAqB,CAAA2B,MAAA,CAAAC,MAAA,EACpB7C,IAAI,CAAEA,IAAK,CACXI,UAAU,CAAEA,UAAW,CACvBK,YAAY,CAAEA,YAAa,CAC3BK,KAAK,CAAEyB,MAAM,CAACS,iBAAkB,EAC5BjC,KAAK,CACV,CACF,CACe,CAAC,CAEvB,CAEA,GAAM,CAAAwB,MAAM,CAAGU,uBAAU,CAACC,MAAM,CAAC,CAC/B1C,QAAQ,CAAE,CACR2C,IAAI,CAAE,CAAC,CACPC,OAAO,CAAE,GACX,CAAC,CACDZ,WAAW,CAAE,CACXW,IAAI,CAAE,CACR,CAAC,CACDH,iBAAiB,CAAE,CAAEG,IAAI,CAAE,CAAE,CAC/B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeContainer=StripeContainer;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeContainer=_interopRequireDefault(require("../specs/NativeStripeContainer"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeContainer=StripeContainer;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeContainer=_interopRequireDefault(require("../specs/NativeStripeContainer"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/StripeContainer.tsx";function StripeContainer(_ref){var keyboardShouldPersistTaps=_ref.keyboardShouldPersistTaps,children=_ref.children;return(0,_jsxRuntime.jsx)(_NativeStripeContainer.default,{keyboardShouldPersistTaps:keyboardShouldPersistTaps!=null?keyboardShouldPersistTaps:true,style:styles.container,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.container,accessible:false,children:children})});}var styles=_reactNative.StyleSheet.create({container:{flex:1}});
|
|
2
2
|
//# sourceMappingURL=StripeContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_NativeStripeContainer","_jsxRuntime","_jsxFileName","StripeContainer","_ref","keyboardShouldPersistTaps","children","jsx","default","style","styles","container","View","accessible","StyleSheet","create","flex"],"sourceRoot":"../../../src","sources":["components/StripeContainer.tsx"],"mappings":"oLAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,sBAAA,CAAAH,sBAAA,CAAAC,OAAA,oCAAmE,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_NativeStripeContainer","_jsxRuntime","_jsxFileName","StripeContainer","_ref","keyboardShouldPersistTaps","children","jsx","default","style","styles","container","View","accessible","StyleSheet","create","flex"],"sourceRoot":"../../../src","sources":["components/StripeContainer.tsx"],"mappings":"oLAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,sBAAA,CAAAH,sBAAA,CAAAC,OAAA,oCAAmE,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,YAAA,mFAkB5D,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAGrB,IAFR,CAAAC,yBAAyB,CAAAD,IAAA,CAAzBC,yBAAyB,CACzBC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAER,MACE,GAAAL,WAAA,CAAAM,GAAA,EAACP,sBAAA,CAAAQ,OAAqB,EACpBH,yBAAyB,CAAEA,yBAAyB,OAAzBA,yBAAyB,CAAI,IAAK,CAC7DI,KAAK,CAAEC,MAAM,CAACC,SAAU,CAAAL,QAAA,CAExB,GAAAL,WAAA,CAAAM,GAAA,EAACR,YAAA,CAAAa,IAAI,EAACH,KAAK,CAAEC,MAAM,CAACC,SAAU,CAACE,UAAU,CAAE,KAAM,CAAAP,QAAA,CAC9CA,QAAQ,CACL,CAAC,CACc,CAAC,CAE5B,CAEA,GAAM,CAAAI,MAAM,CAAGI,uBAAU,CAACC,MAAM,CAAC,CAC/BJ,SAAS,CAAE,CACTK,IAAI,CAAE,CACR,CACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ConnectAccountOnboarding=ConnectAccountOnboarding;exports.ConnectPaymentDetails=ConnectPaymentDetails;exports.ConnectPayments=ConnectPayments;exports.ConnectPayouts=ConnectPayouts;Object.defineProperty(exports,"NavigationBar",{enumerable:true,get:function get(){return _NavigationBar.NavigationBar;}});var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _EmbeddedComponent=require("./EmbeddedComponent");var _NavigationBar=require("./NavigationBar");var _NativeConnectAccountOnboardingView=_interopRequireDefault(require("../specs/NativeConnectAccountOnboardingView"));var _ConnectComponentsProvider=require("./ConnectComponentsProvider");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ConnectAccountOnboarding=ConnectAccountOnboarding;exports.ConnectPaymentDetails=ConnectPaymentDetails;exports.ConnectPayments=ConnectPayments;exports.ConnectPayouts=ConnectPayouts;Object.defineProperty(exports,"NavigationBar",{enumerable:true,get:function get(){return _NavigationBar.NavigationBar;}});var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _EmbeddedComponent=require("./EmbeddedComponent");var _NavigationBar=require("./NavigationBar");var _NativeConnectAccountOnboardingView=_interopRequireDefault(require("../specs/NativeConnectAccountOnboardingView"));var _ConnectComponentsProvider=require("./ConnectComponentsProvider");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/connect/Components.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}function ConnectAccountOnboarding(_ref){var title=_ref.title,onExit=_ref.onExit,onStepChange=_ref.onStepChange,recipientTermsOfServiceUrl=_ref.recipientTermsOfServiceUrl,fullTermsOfServiceUrl=_ref.fullTermsOfServiceUrl,privacyPolicyUrl=_ref.privacyPolicyUrl,collectionOptions=_ref.collectionOptions,onLoaderStart=_ref.onLoaderStart,onLoadError=_ref.onLoadError,onPageDidLoad=_ref.onPageDidLoad;var _useState=(0,_react.useState)(true),_useState2=(0,_slicedToArray2.default)(_useState,2),visible=_useState2[0],setVisible=_useState2[1];var _useState3=(0,_react.useState)(true),_useState4=(0,_slicedToArray2.default)(_useState3,2),loading=_useState4[0],setLoading=_useState4[1];var _useConnectComponents=(0,_ConnectComponentsProvider.useConnectComponents)(),appearance=_useConnectComponents.appearance;var backgroundColor=(0,_react.useMemo)(function(){var _appearance$variables;return(appearance==null||(_appearance$variables=appearance.variables)==null?void 0:_appearance$variables.colorBackground)||'#FFFFFF';},[appearance]);var loadingIndicatorColor=(0,_react.useMemo)(function(){var _appearance$variables2;return(appearance==null||(_appearance$variables2=appearance.variables)==null?void 0:_appearance$variables2.colorSecondaryText)||'#888888';},[appearance]);var componentProps=(0,_react.useMemo)(function(){return{setFullTermsOfServiceUrl:fullTermsOfServiceUrl,setRecipientTermsOfServiceUrl:recipientTermsOfServiceUrl,setPrivacyPolicyUrl:privacyPolicyUrl,setCollectionOptions:collectionOptions};},[fullTermsOfServiceUrl,recipientTermsOfServiceUrl,privacyPolicyUrl,collectionOptions]);var onExitCallback=(0,_react.useCallback)(function(){setVisible(false);setTimeout(onExit);},[onExit]);var callbacks=(0,_react.useMemo)(function(){return{onExit:onExitCallback,onStepChange:onStepChange,onCloseWebView:onExitCallback};},[onExitCallback,onStepChange]);var onLoaderStartCallback=(0,_react.useCallback)(function(event){setLoading(false);if(onLoaderStart){onLoaderStart(event);}},[onLoaderStart]);var _useWindowDimensions=(0,_reactNative.useWindowDimensions)(),width=_useWindowDimensions.width,height=_useWindowDimensions.height;var containerStyle=(0,_react.useMemo)(function(){return{width:width,height:height,position:'absolute'};},[width,height]);if(_reactNative.Platform.OS==='ios'){return(0,_jsxRuntime.jsxs)(_NativeConnectAccountOnboardingView.default,{visible:visible,title:title,backgroundColor:backgroundColor,onExitAction:onExitCallback,style:containerStyle,children:[loading?(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{size:"large",color:loadingIndicatorColor,style:styles.iosActivityIndicator}):null,(0,_jsxRuntime.jsx)(_EmbeddedComponent.EmbeddedComponent,{component:"account-onboarding",componentProps:componentProps,onLoaderStart:onLoaderStartCallback,onLoadError:onLoadError,onPageDidLoad:onPageDidLoad,callbacks:callbacks,style:styles.flex1})]});}return(0,_jsxRuntime.jsx)(_reactNative.Modal,{visible:visible,animationType:"slide",presentationStyle:"fullScreen",children:(0,_jsxRuntime.jsxs)(_reactNative.SafeAreaView,{style:styles.flex1,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[_reactNative.Platform.OS==='android'&&{paddingTop:_reactNative.StatusBar.currentHeight||0}],children:(0,_jsxRuntime.jsx)(_NavigationBar.NavigationBar,{title:title,onCloseButtonPress:onExitCallback,style:styles.navBar})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.onboardingWrapper,children:[loading?(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{size:"large",color:loadingIndicatorColor,style:styles.activityIndicator}):null,(0,_jsxRuntime.jsx)(_EmbeddedComponent.EmbeddedComponent,{component:"account-onboarding",componentProps:componentProps,onLoaderStart:onLoaderStartCallback,onLoadError:onLoadError,onPageDidLoad:onPageDidLoad,callbacks:callbacks,style:[styles.flex1,{backgroundColor:backgroundColor}]})]})]})});}function ConnectPayments(_ref2){var defaultFilters=_ref2.defaultFilters,onLoaderStart=_ref2.onLoaderStart,onLoadError=_ref2.onLoadError,onPageDidLoad=_ref2.onPageDidLoad,style=_ref2.style;var componentProps=(0,_react.useMemo)(function(){return{setDefaultFilters:defaultFilters};},[defaultFilters]);return(0,_jsxRuntime.jsx)(_EmbeddedComponent.EmbeddedComponent,{component:"payments",onLoaderStart:onLoaderStart,onLoadError:onLoadError,onPageDidLoad:onPageDidLoad,componentProps:componentProps,style:style});}function ConnectPayouts(_ref3){var onLoaderStart=_ref3.onLoaderStart,onLoadError=_ref3.onLoadError,onPageDidLoad=_ref3.onPageDidLoad,style=_ref3.style;return(0,_jsxRuntime.jsx)(_EmbeddedComponent.EmbeddedComponent,{component:"payouts",onLoaderStart:onLoaderStart,onLoadError:onLoadError,onPageDidLoad:onPageDidLoad,style:style});}function ConnectPaymentDetails(_ref4){var payment=_ref4.payment,onClose=_ref4.onClose,onLoaderStart=_ref4.onLoaderStart,onLoadError=_ref4.onLoadError,onPageDidLoad=_ref4.onPageDidLoad,style=_ref4.style;var componentProps=(0,_react.useMemo)(function(){return{setPayment:payment};},[payment]);var callbacks=(0,_react.useMemo)(function(){return{onClose:onClose};},[onClose]);return(0,_jsxRuntime.jsx)(_EmbeddedComponent.EmbeddedComponent,{component:"payment-details",componentProps:componentProps,callbacks:callbacks,onLoaderStart:onLoaderStart,onLoadError:onLoadError,onPageDidLoad:onPageDidLoad,style:style});}var styles=_reactNative.StyleSheet.create({navBar:{height:56},flex1:{flex:1},activityIndicator:{zIndex:1,position:'absolute',left:0,right:0,top:48},iosActivityIndicator:{zIndex:1,position:'absolute',left:0,right:0,top:160},onboardingWrapper:{position:'relative',flex:1}});
|
|
2
2
|
//# sourceMappingURL=Components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_EmbeddedComponent","_NavigationBar","_NativeConnectAccountOnboardingView","_interopRequireDefault","_ConnectComponentsProvider","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConnectAccountOnboarding","_ref","title","onExit","onStepChange","recipientTermsOfServiceUrl","fullTermsOfServiceUrl","privacyPolicyUrl","collectionOptions","onLoaderStart","onLoadError","onPageDidLoad","_useState","useState","_useState2","_slicedToArray2","visible","setVisible","_useState3","_useState4","loading","setLoading","_useConnectComponents","useConnectComponents","appearance","backgroundColor","useMemo","_appearance$variables","variables","colorBackground","loadingIndicatorColor","_appearance$variables2","colorSecondaryText","componentProps","setFullTermsOfServiceUrl","setRecipientTermsOfServiceUrl","setPrivacyPolicyUrl","setCollectionOptions","onExitCallback","useCallback","setTimeout","callbacks","onCloseWebView","onLoaderStartCallback","event","_useWindowDimensions","useWindowDimensions","width","height","containerStyle","position","Platform","OS","jsxs","onExitAction","style","children","jsx","ActivityIndicator","size","color","styles","iosActivityIndicator","EmbeddedComponent","component","flex1","Modal","animationType","presentationStyle","SafeAreaView","View","paddingTop","StatusBar","currentHeight","NavigationBar","onCloseButtonPress","navBar","onboardingWrapper","activityIndicator","ConnectPayments","_ref2","defaultFilters","setDefaultFilters","ConnectPayouts","_ref3","ConnectPaymentDetails","_ref4","payment","onClose","setPayment","StyleSheet","create","flex","zIndex","left","right","top"],"sourceRoot":"../../../src","sources":["connect/Components.tsx"],"mappings":"8hBAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAgBA,IAAAE,kBAAA,CAAAF,OAAA,wBACA,IAAAG,cAAA,CAAAH,OAAA,oBACA,IAAAI,mCAAA,CAAAC,sBAAA,CAAAL,OAAA,iDACA,IAAAM,0BAAA,CAAAN,OAAA,gCAAmE,IAAAO,WAAA,CAAAP,OAAA,0BAAAQ,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_EmbeddedComponent","_NavigationBar","_NativeConnectAccountOnboardingView","_interopRequireDefault","_ConnectComponentsProvider","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConnectAccountOnboarding","_ref","title","onExit","onStepChange","recipientTermsOfServiceUrl","fullTermsOfServiceUrl","privacyPolicyUrl","collectionOptions","onLoaderStart","onLoadError","onPageDidLoad","_useState","useState","_useState2","_slicedToArray2","visible","setVisible","_useState3","_useState4","loading","setLoading","_useConnectComponents","useConnectComponents","appearance","backgroundColor","useMemo","_appearance$variables","variables","colorBackground","loadingIndicatorColor","_appearance$variables2","colorSecondaryText","componentProps","setFullTermsOfServiceUrl","setRecipientTermsOfServiceUrl","setPrivacyPolicyUrl","setCollectionOptions","onExitCallback","useCallback","setTimeout","callbacks","onCloseWebView","onLoaderStartCallback","event","_useWindowDimensions","useWindowDimensions","width","height","containerStyle","position","Platform","OS","jsxs","onExitAction","style","children","jsx","ActivityIndicator","size","color","styles","iosActivityIndicator","EmbeddedComponent","component","flex1","Modal","animationType","presentationStyle","SafeAreaView","View","paddingTop","StatusBar","currentHeight","NavigationBar","onCloseButtonPress","navBar","onboardingWrapper","activityIndicator","ConnectPayments","_ref2","defaultFilters","setDefaultFilters","ConnectPayouts","_ref3","ConnectPaymentDetails","_ref4","payment","onClose","setPayment","StyleSheet","create","flex","zIndex","left","right","top"],"sourceRoot":"../../../src","sources":["connect/Components.tsx"],"mappings":"8hBAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAgBA,IAAAE,kBAAA,CAAAF,OAAA,wBACA,IAAAG,cAAA,CAAAH,OAAA,oBACA,IAAAI,mCAAA,CAAAC,sBAAA,CAAAL,OAAA,iDACA,IAAAM,0BAAA,CAAAN,OAAA,gCAAmE,IAAAO,WAAA,CAAAP,OAAA,0BAAAQ,YAAA,oFAAAT,wBAAAU,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAZ,uBAAA,UAAAA,wBAAAU,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,EAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,CAAAQ,CAAA,WAAAM,EAAA,IAAAd,CAAA,aAAAc,EAAA,KAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,EAAA,KAAAP,CAAA,EAAAD,CAAA,CAAAW,MAAA,CAAAC,cAAA,GAAAD,MAAA,C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CAAE,GACP,CAAC,CACDnB,iBAAiB,CAAE,CACjB3B,QAAQ,CAAE,UAAU,CACpB0C,IAAI,CAAE,CACR,CACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useConnectComponents=exports.loadConnectAndInitialize=exports.ConnectComponentsProvider=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _react=_interopRequireWildcard(require("react"));var _AnalyticsClient=require("./analytics/AnalyticsClient");var _functions=require("../functions");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useConnectComponents=exports.loadConnectAndInitialize=exports.ConnectComponentsProvider=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _react=_interopRequireWildcard(require("react"));var _AnalyticsClient=require("./analytics/AnalyticsClient");var _functions=require("../functions");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/connect/ConnectComponentsProvider.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var ConnectInstance=function(){function ConnectInstance(initParams){(0,_classCallCheck2.default)(this,ConnectInstance);this.initParams=initParams;}return(0,_createClass2.default)(ConnectInstance,[{key:"update",value:function update(options){var _this$onUpdate;(_this$onUpdate=this.onUpdate)==null||_this$onUpdate.call(this,options);}}]);}();var loadConnectAndInitialize=exports.loadConnectAndInitialize=function loadConnectAndInitialize(initParams){return new ConnectInstance(initParams);};var ConnectComponentsContext=_react.default.createContext(null);ConnectComponentsContext.displayName='ConnectComponents';var ConnectComponentsProvider=exports.ConnectComponentsProvider=function ConnectComponentsProvider(_ref){var children=_ref.children,connectInstance=_ref.connectInstance;if(!(connectInstance instanceof ConnectInstance)){throw new Error('connectInstance must be an instance of ConnectInstance created via loadConnectAndInitialize');}var _useState=(0,_react.useState)(connectInstance.initParams.appearance),_useState2=(0,_slicedToArray2.default)(_useState,2),appearance=_useState2[0],setAppearance=_useState2[1];var _useState3=(0,_react.useState)(connectInstance.initParams.locale),_useState4=(0,_slicedToArray2.default)(_useState3,2),locale=_useState4[0],setLocale=_useState4[1];var analyticsClient=(0,_react.useMemo)(function(){return new _AnalyticsClient.AnalyticsClient(_functions.Constants.SYSTEM_INFO);},[]);if(!connectInstance.onUpdate){connectInstance.onUpdate=function(options){if(options.appearance){setAppearance(options.appearance);}if(options.locale){setLocale(options.locale);}};}var value=(0,_react.useMemo)(function(){return{connectInstance:connectInstance,locale:locale,appearance:appearance,analyticsClient:analyticsClient};},[connectInstance,locale,appearance,analyticsClient]);return(0,_jsxRuntime.jsx)(ConnectComponentsContext.Provider,{value:value,children:children});};var useConnectComponents=exports.useConnectComponents=function useConnectComponents(){var context=_react.default.useContext(ConnectComponentsContext);if(!context){throw new Error(`Could not find a ConnectComponentsContext; You need to wrap your components in an <ConnectComponentsProvider> provider.`);}return context;};
|
|
2
2
|
//# sourceMappingURL=ConnectComponentsProvider.js.map
|