@stripe/stripe-react-native 0.61.0 → 0.63.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/android/gradle.properties +2 -2
- package/android/src/main/java/com/reactnativestripesdk/EventEmitterCompat.kt +4 -0
- package/android/src/main/java/com/reactnativestripesdk/FakeOnrampSdkModule.kt +6 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetManager.kt +200 -198
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +3 -1
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.kt +17 -16
- package/android/src/oldarch/java/com/reactnativestripesdk/NativeOnrampSdkModuleSpec.java +8 -11
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampMappers.kt +4 -0
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampSdkModule.kt +16 -1
- package/android/src/test/java/com/reactnativestripesdk/mappers/OnrampMappersTest.kt +3 -0
- package/ios/Mappers.swift +15 -2
- package/ios/StripeOnrampSdk.h +3 -4
- 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/events.js +1 -1
- package/lib/commonjs/events.js.map +1 -1
- package/lib/commonjs/helpers.js +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/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/events.js +1 -1
- package/lib/module/events.js.map +1 -1
- package/lib/module/helpers.js +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/typescript/src/connect/connectTypes.d.ts +76 -0
- package/lib/typescript/src/connect/connectTypes.d.ts.map +1 -1
- package/lib/typescript/src/events.d.ts +5 -3
- package/lib/typescript/src/events.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts +2 -2
- package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/connect/connectTypes.ts +88 -0
- package/src/events.ts +10 -13
- package/src/specs/NativeOnrampSdkModule.ts +2 -2
- package/stripe-react-native.podspec +1 -1
package/ios/Mappers.swift
CHANGED
|
@@ -1178,6 +1178,8 @@ class Mappers {
|
|
|
1178
1178
|
let lightPrimaryHex = lightColors?["primary"] as? String
|
|
1179
1179
|
let darkSelectedBorderHex = darkColors?["borderSelected"] as? String
|
|
1180
1180
|
let lightSelectedBorderHex = lightColors?["borderSelected"] as? String
|
|
1181
|
+
let darkContentOnPrimaryHex = darkColors?["contentOnPrimary"] as? String
|
|
1182
|
+
let lightContentOnPrimaryHex = lightColors?["contentOnPrimary"] as? String
|
|
1181
1183
|
|
|
1182
1184
|
let darkPrimary = darkPrimaryHex.flatMap { UIColor(hexString: $0) }
|
|
1183
1185
|
let lightPrimary = lightPrimaryHex.flatMap { UIColor(hexString: $0) }
|
|
@@ -1185,6 +1187,9 @@ class Mappers {
|
|
|
1185
1187
|
let darkSelectedBorder = darkSelectedBorderHex.flatMap { UIColor(hexString: $0) }
|
|
1186
1188
|
let lightSelectedBorder = lightSelectedBorderHex.flatMap { UIColor(hexString: $0) }
|
|
1187
1189
|
|
|
1190
|
+
let darkContentOnPrimary = darkContentOnPrimaryHex.flatMap { UIColor(hexString: $0) }
|
|
1191
|
+
let lightContentOnPrimary = lightContentOnPrimaryHex.flatMap { UIColor(hexString: $0) }
|
|
1192
|
+
|
|
1188
1193
|
let primary: UIColor? = if let darkPrimary, let lightPrimary {
|
|
1189
1194
|
UIColor { trait in
|
|
1190
1195
|
trait.userInterfaceStyle == .dark ? darkPrimary : lightPrimary
|
|
@@ -1201,8 +1206,16 @@ class Mappers {
|
|
|
1201
1206
|
darkSelectedBorder ?? lightSelectedBorder
|
|
1202
1207
|
}
|
|
1203
1208
|
|
|
1204
|
-
let
|
|
1205
|
-
|
|
1209
|
+
let contentOnPrimary: UIColor? = if let darkContentOnPrimary, let lightContentOnPrimary {
|
|
1210
|
+
UIColor { trait in
|
|
1211
|
+
trait.userInterfaceStyle == .dark ? darkContentOnPrimary : lightContentOnPrimary
|
|
1212
|
+
}
|
|
1213
|
+
} else {
|
|
1214
|
+
darkContentOnPrimary ?? lightContentOnPrimary
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
let colors: LinkAppearance.Colors? = if primary != nil || selectedBorder != nil || contentOnPrimary != nil {
|
|
1218
|
+
.init(primary: primary, contentOnPrimary: contentOnPrimary, selectedBorder: selectedBorder)
|
|
1206
1219
|
} else {
|
|
1207
1220
|
nil
|
|
1208
1221
|
}
|
package/ios/StripeOnrampSdk.h
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
2
2
|
#import <rnstripe/rnstripe.h>
|
|
3
|
-
#else
|
|
4
|
-
#import <React/RCTBridgeModule.h>
|
|
5
|
-
#import "StripeSdkEventEmitterCompat.h"
|
|
6
3
|
#endif
|
|
7
4
|
|
|
5
|
+
#import "StripeSdkEventEmitterCompat.h"
|
|
6
|
+
|
|
8
7
|
NS_ASSUME_NONNULL_BEGIN
|
|
9
8
|
|
|
10
9
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
11
|
-
@interface StripeOnrampSdk :
|
|
10
|
+
@interface StripeOnrampSdk : StripeSdkEventEmitterCompat <NativeOnrampSdkModuleSpec>
|
|
12
11
|
#else
|
|
13
12
|
@interface StripeOnrampSdk : StripeSdkEventEmitterCompat <RCTBridgeModule>
|
|
14
13
|
#endif
|
|
@@ -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/toluo/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,oFAAAC,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/toluo/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,+EAAAC,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/toluo/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,kFAAAC,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/toluo/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,iFAAAP,wBAAAQ,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAV,uBAAA,UAAAA,wBAAAQ,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,CAAAE,wBAAA,CAAAnB,CAAA,CAAAc,EAAA,KAAAP,CAAA,CAAAK,GAAA,EAAAL,CAAA,CAAAM,GAAA,EAAAP,CAAA,CAAAE,CAAA,CAAAM,EAAA,CAAAP,CAAA,EAAAC,CAAA,CAAAM,EAAA,EAAAd,CAA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D,SAAS,cAATA,SAAS,CAAEsD,SAAS,CAC/BC,cAAc,CAAEvD,SAAS,cAATA,SAAS,CAAEuD,cAAc,CACzCC,UAAU,CAAExD,SAAS,cAATA,SAAS,CAAEwD,UACzB,CAAE,CACFvD,YAAY,CAAE,CACZwB,MAAM,CAAExB,YAAY,cAAZA,YAAY,CAAEwB,MAAM,CAC5BgC,UAAU,CAAExD,YAAY,cAAZA,YAAY,CAAEwD,UAAU,CACpC/B,GAAG,CAAEzB,YAAY,cAAZA,YAAY,CAAEyB,GAAG,CACtBF,UAAU,CAAEvB,YAAY,cAAZA,YAAY,CAAEuB,UAC5B,CAAE,CACFtB,SAAS,CAAEA,SAAS,OAATA,SAAS,CAAI,KAAM,CAC9BC,iBAAiB,CAAEA,iBAAiB,OAAjBA,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/toluo/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,gFAAAP,wBAAAQ,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAV,uBAAA,UAAAA,wBAAAQ,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,CAAAE,wBAAA,CAAAnB,CAAA,CAAAc,EAAA,KAAAP,CAAA,CAAAK,GAAA,EAAAL,CAAA,CAAAM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AC,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/toluo/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","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,oFAAAC,SAAA,mKA4E5D,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAYvB,KAAAC,SAAA,CAAAD,IAAA,CAXRE,IAAI,CAAJA,IAAI,CAAAD,SAAA,UAAGE,uBAAU,CAACC,OAAO,CAAAH,SAAA,CAAAI,eAAA,CAAAL,IAAA,CACzBM,UAAU,CAAVA,UAAU,CAAAD,eAAA,UAAGE,wBAAW,CAACC,SAAS,CAAAH,eAAA,CAClCI,OAAO,CAAAT,IAAA,CAAPS,OAAO,CACPC,QAAQ,CAAAV,IAAA,CAARU,QAAQ,CACRC,YAAY,CAAAX,IA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el/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/toluo/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,8EAkB5D,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/toluo/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,+EAAAT,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,K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AAK,CAAEA,KAAM,CACd,CAAC,CAEN,CAEA,GAAM,CAAAM,MAAM,CAAG6B,uBAAU,CAACC,MAAM,CAAC,CAC/Bf,MAAM,CAAE,CACN5B,MAAM,CAAE,EACV,CAAC,CACDiB,KAAK,CAAE,CACL2B,IAAI,CAAE,CACR,CAAC,CACDd,iBAAiB,CAAE,CACjBe,MAAM,CAAE,CAAC,CACT3C,QAAQ,CAAE,UAAU,CACpB4C,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,GAAG,CAAE,EACP,CAAC,CACDlC,oBAAoB,CAAE,CACpB+B,MAAM,CAAE,CAAC,CACT3C,QAAQ,CAAE,UAAU,CACpB4C,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,GAAG,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/toluo/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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_AnalyticsClient","_functions","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConnectInstance","initParams","_classCallCheck2","_createClass2","key","value","update","options","_this$onUpdate","onUpdate","loadConnectAndInitialize","exports","ConnectComponentsContext","React","createContext","displayName","ConnectComponentsProvider","_ref","children","connectInstance","Error","_useState","useState","appearance","_useState2","_slicedToArray2","setAppearance","_useState3","locale","_useState4","setLocale","analyticsClient","useMemo","AnalyticsClient","Constants","SYSTEM_INFO","jsx","Provider","useConnectComponents","context","useContext"],"sourceRoot":"../../../src","sources":["connect/ConnectComponentsProvider.tsx"],"mappings":"qgBAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAOA,IAAAC,gBAAA,CAAAD,OAAA,gCACA,IAAAE,UAAA,CAAAF,OAAA,iBAAyC,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,KAAA,MAAAC,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_AnalyticsClient","_functions","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConnectInstance","initParams","_classCallCheck2","_createClass2","key","value","update","options","_this$onUpdate","onUpdate","loadConnectAndInitialize","exports","ConnectComponentsContext","React","createContext","displayName","ConnectComponentsProvider","_ref","children","connectInstance","Error","_useState","useState","appearance","_useState2","_slicedToArray2","setAppearance","_useState3","locale","_useState4","setLocale","analyticsClient","useMemo","AnalyticsClient","Constants","SYSTEM_INFO","jsx","Provider","useConnectComponents","context","useContext"],"sourceRoot":"../../../src","sources":["connect/ConnectComponentsProvider.tsx"],"mappings":"qgBAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAOA,IAAAC,gBAAA,CAAAD,OAAA,gCACA,IAAAE,UAAA,CAAAF,OAAA,iBAAyC,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,KAAA,MAAAC,YAAA,8FAAAN,wBAAAO,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAT,uBAAA,UAAAA,wBAAAO,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,E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AACxB,wBAAwB,CAACyB,QAAQ,EAAChC,KAAK,CAAEA,KAAM,CAAAa,QAAA,CAC7CA,QAAQ,CACwB,CAAC,CAExC,CAAC,CAEM,GAAM,CAAAoB,oBAAoB,CAAA3B,OAAA,CAAA2B,oBAAA,CAAG,QAAvB,CAAAA,oBAAoBA,CAAA,CAAmC,CAClE,GAAM,CAAAC,OAAO,CAAG1B,cAAK,CAAC2B,UAAU,CAAC5B,wBAAwB,CAAC,CAC1D,GAAI,CAAC2B,OAAO,CAAE,CACZ,KAAM,IAAI,CAAAnB,KAAK,CACb,yHACF,CAAC,CACH,CACA,MAAO,CAAAmB,OAAO,CAChB,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.EmbeddedComponent=EmbeddedComponent;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _package=_interopRequireDefault(require("../../../package.json"));var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _events=require("../events");var _ConnectComponentsProvider=require("./ConnectComponentsProvider");var _ComponentAnalyticsClient=require("./analytics/ComponentAnalyticsClient");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.EmbeddedComponent=EmbeddedComponent;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _package=_interopRequireDefault(require("../../../package.json"));var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _events=require("../events");var _ConnectComponentsProvider=require("./ConnectComponentsProvider");var _ComponentAnalyticsClient=require("./analytics/ComponentAnalyticsClient");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/toluo/stripe/stripe-react-native/src/connect/EmbeddedComponent.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 DEVELOPMENT_MODE=false;var DEVELOPMENT_URL=_reactNative.Platform.OS==='android'?'http://10.0.2.2:3001':'http://localhost:3001';var PRODUCTION_URL='https://connect-js.stripe.com';var BASE_URL=DEVELOPMENT_MODE?DEVELOPMENT_URL:PRODUCTION_URL;var sdkVersion=_package.default.version;var POLLING_INTERVAL_MS=500;var URL_DEDUPLICATION_TIMEOUT_MS=1000;var DEEP_LINK_GRACE_PERIOD_MS=500;if(!/^\d+\.\d+\.\d+$/.test(sdkVersion)){throw new Error(`Invalid SDK version: ${sdkVersion}. Must be in format X.Y.Z`);}var platformPrefix=_reactNative.Platform.select({ios:'iPhone',android:'Android',default:'Mobile'});var userAgent=[platformPrefix,`Stripe ReactNative SDK ${_reactNative.Platform.OS}/${_reactNative.Platform.Version}`,`stripe-react_native/${sdkVersion}`].join(' - ');var ALLOWED_STRIPE_HOSTS=['connect-js.stripe.com','connect.stripe.com','verify.stripe.com'].concat((0,_toConsumableArray2.default)(DEVELOPMENT_MODE?['10.0.2.2:3001','localhost:3001']:[]));function EmbeddedComponent(props){var _appearance$variables;var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),dynamicWebview=_useState2[0],setDynamicWebview=_useState2[1];var pendingAuthWebViewPromises=(0,_react.useRef)(new Map());var pendingFinancialConnectionsPromise=(0,_react.useRef)(null);var recentlyHandledUrls=(0,_react.useRef)(new Set());var loadWebViewComponent=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){if(dynamicWebview)return;setDynamicWebview({WebView:null});try{var mod=yield import('react-native-webview');setDynamicWebview({WebView:mod.WebView});}catch(err){console.error('Failed to import react-native-webview:',err);}}),[dynamicWebview]);(0,_react.useEffect)(function(){loadWebViewComponent();},[loadWebViewComponent]);var appState=(0,_react.useRef)(_reactNative.AppState.currentState);(0,_react.useEffect)(function(){if(_reactNative.Platform.OS!=='android')return;var pollInterval=setInterval((0,_asyncToGenerator2.default)(function*(){if(pendingAuthWebViewPromises.current.size===0){return;}try{var pendingUrls=yield _NativeStripeSdkModule.default.pollAndClearPendingStripeConnectUrls();if(pendingUrls&&pendingUrls.length>0){pendingUrls.forEach(function(url){if(url.startsWith('stripe-connect://')){if(recentlyHandledUrls.current.has(url)){return;}recentlyHandledUrls.current.add(url);setTimeout(function(){recentlyHandledUrls.current.delete(url);},URL_DEDUPLICATION_TIMEOUT_MS);var firstEntry=pendingAuthWebViewPromises.current.entries().next().value;if(firstEntry){var _firstEntry=(0,_slicedToArray2.default)(firstEntry,2),id=_firstEntry[0],promiseData=_firstEntry[1];if(promiseData.timeoutId){clearTimeout(promiseData.timeoutId);}pendingAuthWebViewPromises.current.delete(id);promiseData.callback(id,url);_NativeStripeSdkModule.default.authWebViewDeepLinkHandled(id).catch(function(){});}}});}}catch(_error){}}),POLLING_INTERVAL_MS);return function(){clearInterval(pollInterval);};},[]);(0,_react.useEffect)(function(){var subscription=_reactNative.AppState.addEventListener('change',function(nextAppState){if(appState.current.match(/inactive|background/)&&nextAppState==='active'){if(pendingAuthWebViewPromises.current.size>0){pendingAuthWebViewPromises.current.forEach(function(promiseData,id){if(!promiseData.timeoutId){var timeoutId=setTimeout(function(){var stillPending=pendingAuthWebViewPromises.current.get(id);if(stillPending){pendingAuthWebViewPromises.current.delete(id);stillPending.callback(id,null);}},DEEP_LINK_GRACE_PERIOD_MS);promiseData.timeoutId=timeoutId;}});}}appState.current=nextAppState;});return function(){var _pendingFinancialConn;var promises=pendingAuthWebViewPromises.current;promises.forEach(function(promiseData,_id){if(promiseData.timeoutId){clearTimeout(promiseData.timeoutId);}});promises.clear();(_pendingFinancialConn=pendingFinancialConnectionsPromise.current)==null||_pendingFinancialConn.cleanup();subscription.remove();};},[]);var _useConnectComponents=(0,_ConnectComponentsProvider.useConnectComponents)(),connectInstance=_useConnectComponents.connectInstance,appearance=_useConnectComponents.appearance,locale=_useConnectComponents.locale,analyticsClient=_useConnectComponents.analyticsClient;var _ref3=connectInstance.initParams,fonts=_ref3.fonts,publishableKey=_ref3.publishableKey,fetchClientSecret=_ref3.fetchClientSecret,overrides=_ref3.overrides;var component=props.component,componentProps=props.componentProps,onLoadError=props.onLoadError,onLoaderStart=props.onLoaderStart,onPageDidLoad=props.onPageDidLoad,callbacks=props.callbacks,style=props.style;var componentAnalytics=(0,_react.useMemo)(function(){return new _ComponentAnalyticsClient.ComponentAnalyticsClient(analyticsClient,{publishableKey:publishableKey,platformId:overrides==null?void 0:overrides.platformId,merchantId:overrides==null?void 0:overrides.merchantId,livemode:typeof(overrides==null?void 0:overrides.livemode)==='boolean'?overrides.livemode:publishableKey==null?void 0:publishableKey.startsWith('pk_live_'),component:component});},[analyticsClient,publishableKey,overrides,component]);var hashParams={component:component,publicKey:publishableKey,merchantIdOverride:overrides==null?void 0:overrides.merchantId,platformIdOverride:overrides==null?void 0:overrides.platformId,apiKeyOverride:overrides==null?void 0:overrides.apiKey,livemodeOverride:overrides==null?void 0:overrides.livemode};var hash=Object.entries(hashParams).filter(function(_ref4){var _ref5=(0,_slicedToArray2.default)(_ref4,2),_=_ref5[0],value=_ref5[1];return value!=null;}).map(function(_ref6){var _ref7=(0,_slicedToArray2.default)(_ref6,2),key=_ref7[0],value=_ref7[1];return`${encodeURIComponent(key)}=${encodeURIComponent(value)}`;}).join('&');var connectURL=`${BASE_URL}/v1.0/react_native_webview.html#${hash}`;var source=(0,_react.useMemo)(function(){return{uri:connectURL};},[connectURL]);var ref=(0,_react.useRef)(null);var hasTriedSourceReload=(0,_react.useRef)(false);var _useState3=(0,_react.useState)(appearance),_useState4=(0,_slicedToArray2.default)(_useState3,2),prevAppearance=_useState4[0],setPrevAppearance=_useState4[1];var _useState5=(0,_react.useState)(locale),_useState6=(0,_slicedToArray2.default)(_useState5,2),prevLocale=_useState6[0],setPrevLocale=_useState6[1];if(prevAppearance!==appearance||prevLocale!==locale){var _ref$current;setPrevAppearance(appearance);setPrevLocale(locale);var patchedAppearance=withDefaultFontFamily(appearance);(_ref$current=ref.current)==null||_ref$current.injectJavaScript(`
|
|
2
2
|
(function() {
|
|
3
3
|
window.updateConnectInstance(${JSON.stringify({appearance:patchedAppearance,locale:locale})});
|
|
4
4
|
true;
|