react-native-unit-components 1.12.0 → 1.14.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/src/main/java/com/unitreactnativecomponents/UnitAddToWalletButtonViewManager.kt +1 -0
- package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsPackage.kt +9 -1
- package/android/src/main/java/com/unitreactnativecomponents/extensions/ContextExtensions.kt +2 -0
- package/android/src/main/java/com/unitreactnativecomponents/secureView/UNSecureViewManager.kt +19 -0
- package/android/src/main/java/com/unitreactnativecomponents/security/UNSecurityHelper.kt +37 -0
- package/android/src/main/java/com/unitreactnativecomponents/unSnapshotProtectionManager/UNSnapshotProtectionManager.kt +42 -0
- package/ios/UNSecurity/UNSecurityHelper.swift +90 -0
- package/ios/UNSecurity/UNSecurityHelperExportModule.m +7 -0
- package/ios/UNSharedServicesProvider/UNAppStateService.swift +38 -0
- package/ios/UNSharedServicesProvider/UNGlobalSnapshotProtectionService.swift +93 -0
- package/ios/UNSharedServicesProvider/UNPresentationService.swift +37 -0
- package/ios/UNSharedServicesProvider/UNSharedServicesProviderManager.swift +45 -0
- package/ios/UNSnapshotProtectionManager/UNSnapshotProtectionManager.swift +20 -0
- package/ios/UNSnapshotProtectionManager/UNSnapshotProtectionManagerExportModule.m +5 -0
- package/ios/UnitReactNativeComponents.xcodeproj/project.pbxproj +16 -0
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +22 -21
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +22 -21
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +8 -4
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +19 -20
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +24 -21
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +4 -3
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js +18 -19
- package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js +88 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js +30 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/index.js +21 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +19 -20
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
- package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js +4 -3
- package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js.map +1 -1
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +7 -2
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
- package/lib/commonjs/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js +4 -3
- package/lib/commonjs/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js.map +1 -1
- package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +8 -3
- package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -1
- package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.js +91 -0
- package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.js.map +1 -0
- package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js +29 -0
- package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNWirePaymentComponent/index.js +21 -0
- package/lib/commonjs/components/UNWirePaymentComponent/index.js.map +1 -0
- package/lib/commonjs/components/index.js +22 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.js +2 -1
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/commonjs/hooks/useIsJailbrokeDevice.js +22 -0
- package/lib/commonjs/hooks/useIsJailbrokeDevice.js.map +1 -0
- package/lib/commonjs/hooks/useSnapshotProtection.js +31 -0
- package/lib/commonjs/hooks/useSnapshotProtection.js.map +1 -0
- package/lib/commonjs/messages/webMessages/fundAccountPaymentMessage.js +6 -0
- package/lib/commonjs/messages/webMessages/fundAccountPaymentMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js +2 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +6 -1
- package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -1
- package/lib/commonjs/nativeComponents/UNBaseView/UNBaseView.js +39 -0
- package/lib/commonjs/nativeComponents/UNBaseView/UNBaseView.js.map +1 -0
- package/lib/commonjs/nativeComponents/UNBaseView/index.js +14 -0
- package/lib/commonjs/nativeComponents/UNBaseView/index.js.map +1 -0
- package/lib/commonjs/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js +26 -0
- package/lib/commonjs/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js.map +1 -0
- package/lib/commonjs/nativeModulesHelpers/UNSecurityHelper.js +39 -0
- package/lib/commonjs/nativeModulesHelpers/UNSecurityHelper.js.map +1 -0
- package/lib/commonjs/networking/common/UNNetworkConstants.js +2 -1
- package/lib/commonjs/networking/common/UNNetworkConstants.js.map +1 -1
- package/lib/commonjs/types/internal/webComponent.types.js +2 -0
- package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
- package/lib/commonjs/types/shared/checkDeposit.types.js.map +1 -1
- package/lib/commonjs/types/shared/env.types.js +1 -0
- package/lib/commonjs/types/shared/env.types.js.map +1 -1
- package/lib/commonjs/types/shared/fundAccountPayment.types.js +6 -0
- package/lib/commonjs/types/shared/fundAccountPayment.types.js.map +1 -0
- package/lib/commonjs/types/shared/index.js +22 -0
- package/lib/commonjs/types/shared/index.js.map +1 -1
- package/lib/commonjs/types/shared/payments.types.js +18 -1
- package/lib/commonjs/types/shared/payments.types.js.map +1 -1
- package/lib/commonjs/types/shared/securitySettings.js +12 -0
- package/lib/commonjs/types/shared/securitySettings.js.map +1 -0
- package/lib/commonjs/types/shared/types.js +10 -0
- package/lib/commonjs/types/shared/types.js.map +1 -1
- package/lib/commonjs/types/shared/wirePayment.types.js +6 -0
- package/lib/commonjs/types/shared/wirePayment.types.js.map +1 -0
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js +6 -1
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js +25 -4
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js +2 -0
- package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -1
- package/lib/commonjs/unitSdkManager/unitHelpersManager/UnitHelpersManager.js +18 -0
- package/lib/commonjs/unitSdkManager/unitHelpersManager/UnitHelpersManager.js.map +1 -1
- package/lib/commonjs/utils/onLoadMessages.utils.js +10 -0
- package/lib/commonjs/utils/onLoadMessages.utils.js.map +1 -0
- package/lib/commonjs/webComponent/WebComponent.js +4 -3
- package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
- package/lib/commonjs/webComponent/WebComponent.utils.js +2 -2
- package/lib/commonjs/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/commonjs/webComponent/html.js +1 -0
- package/lib/commonjs/webComponent/html.js.map +1 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +23 -22
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +23 -22
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js +9 -5
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js +20 -21
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +24 -21
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.js +4 -3
- package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js +19 -20
- package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js +79 -0
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -0
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js +22 -0
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js.map +1 -0
- package/lib/module/components/UNFundAccountPaymentComponent/index.js +2 -0
- package/lib/module/components/UNFundAccountPaymentComponent/index.js.map +1 -0
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +20 -21
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
- package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js +4 -3
- package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js.map +1 -1
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +7 -2
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
- package/lib/module/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js +4 -3
- package/lib/module/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js.map +1 -1
- package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +8 -3
- package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -1
- package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.js +83 -0
- package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.js.map +1 -0
- package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js +21 -0
- package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js.map +1 -0
- package/lib/module/components/UNWirePaymentComponent/index.js +2 -0
- package/lib/module/components/UNWirePaymentComponent/index.js.map +1 -0
- package/lib/module/components/index.js +2 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/helpers/BottomSheet/BottomSheet.js +2 -1
- package/lib/module/helpers/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/module/hooks/useIsJailbrokeDevice.js +14 -0
- package/lib/module/hooks/useIsJailbrokeDevice.js.map +1 -0
- package/lib/module/hooks/useSnapshotProtection.js +23 -0
- package/lib/module/hooks/useSnapshotProtection.js.map +1 -0
- package/lib/module/messages/webMessages/fundAccountPaymentMessage.js +2 -0
- package/lib/module/messages/webMessages/fundAccountPaymentMessage.js.map +1 -0
- package/lib/module/messages/webMessages/onLoadMessage.js +2 -0
- package/lib/module/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +6 -1
- package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -1
- package/lib/module/nativeComponents/UNBaseView/UNBaseView.js +31 -0
- package/lib/module/nativeComponents/UNBaseView/UNBaseView.js.map +1 -0
- package/lib/module/nativeComponents/UNBaseView/index.js +2 -0
- package/lib/module/nativeComponents/UNBaseView/index.js.map +1 -0
- package/lib/module/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js +20 -0
- package/lib/module/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js.map +1 -0
- package/lib/module/nativeModulesHelpers/UNSecurityHelper.js +33 -0
- package/lib/module/nativeModulesHelpers/UNSecurityHelper.js.map +1 -0
- package/lib/module/networking/common/UNNetworkConstants.js +2 -1
- package/lib/module/networking/common/UNNetworkConstants.js.map +1 -1
- package/lib/module/types/internal/webComponent.types.js +2 -0
- package/lib/module/types/internal/webComponent.types.js.map +1 -1
- package/lib/module/types/shared/checkDeposit.types.js.map +1 -1
- package/lib/module/types/shared/env.types.js +1 -0
- package/lib/module/types/shared/env.types.js.map +1 -1
- package/lib/module/types/shared/fundAccountPayment.types.js +2 -0
- package/lib/module/types/shared/fundAccountPayment.types.js.map +1 -0
- package/lib/module/types/shared/index.js +2 -0
- package/lib/module/types/shared/index.js.map +1 -1
- package/lib/module/types/shared/payments.types.js +17 -0
- package/lib/module/types/shared/payments.types.js.map +1 -1
- package/lib/module/types/shared/securitySettings.js +6 -0
- package/lib/module/types/shared/securitySettings.js.map +1 -0
- package/lib/module/types/shared/types.js +6 -0
- package/lib/module/types/shared/types.js.map +1 -1
- package/lib/module/types/shared/wirePayment.types.js +2 -0
- package/lib/module/types/shared/wirePayment.types.js.map +1 -0
- package/lib/module/unitSdkManager/UnitSdk.constants.js +6 -1
- package/lib/module/unitSdkManager/UnitSdk.constants.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.js +25 -4
- package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js +2 -0
- package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -1
- package/lib/module/unitSdkManager/unitHelpersManager/UnitHelpersManager.js +18 -0
- package/lib/module/unitSdkManager/unitHelpersManager/UnitHelpersManager.js.map +1 -1
- package/lib/module/utils/onLoadMessages.utils.js +4 -0
- package/lib/module/utils/onLoadMessages.utils.js.map +1 -0
- package/lib/module/webComponent/WebComponent.js +4 -3
- package/lib/module/webComponent/WebComponent.js.map +1 -1
- package/lib/module/webComponent/WebComponent.utils.js +2 -2
- package/lib/module/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/module/webComponent/html.js +1 -0
- package/lib/module/webComponent/html.js.map +1 -1
- package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +1 -1
- package/lib/typescript/src/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNCheckDepositComponent/UNCheckDepositComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.d.ts +19 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.d.ts +4 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.d.ts +20 -0
- package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.d.ts +4 -0
- package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNWirePaymentComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNWirePaymentComponent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +2 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/helpers/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useIsJailbrokeDevice.d.ts +2 -0
- package/lib/typescript/src/hooks/useIsJailbrokeDevice.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSnapshotProtection.d.ts +2 -0
- package/lib/typescript/src/hooks/useSnapshotProtection.d.ts.map +1 -0
- package/lib/typescript/src/messages/webMessages/fundAccountPaymentMessage.d.ts +6 -0
- package/lib/typescript/src/messages/webMessages/fundAccountPaymentMessage.d.ts.map +1 -0
- package/lib/typescript/src/messages/webMessages/index.d.ts +2 -1
- package/lib/typescript/src/messages/webMessages/index.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts +10 -3
- package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts.map +1 -1
- package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.d.ts.map +1 -1
- package/lib/typescript/src/nativeComponents/UNBaseView/UNBaseView.d.ts +11 -0
- package/lib/typescript/src/nativeComponents/UNBaseView/UNBaseView.d.ts.map +1 -0
- package/lib/typescript/src/nativeComponents/UNBaseView/index.d.ts +2 -0
- package/lib/typescript/src/nativeComponents/UNBaseView/index.d.ts.map +1 -0
- package/lib/typescript/src/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.d.ts +6 -0
- package/lib/typescript/src/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.d.ts.map +1 -0
- package/lib/typescript/src/nativeModulesHelpers/UNSecurityHelper.d.ts +12 -0
- package/lib/typescript/src/nativeModulesHelpers/UNSecurityHelper.d.ts.map +1 -0
- package/lib/typescript/src/networking/common/UNNetworkConstants.d.ts +1 -0
- package/lib/typescript/src/networking/common/UNNetworkConstants.d.ts.map +1 -1
- package/lib/typescript/src/types/internal/webComponent.types.d.ts +2 -0
- package/lib/typescript/src/types/internal/webComponent.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/achCredit.types.d.ts +3 -3
- package/lib/typescript/src/types/shared/achCredit.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/bookPayment.types.d.ts +2 -2
- package/lib/typescript/src/types/shared/bookPayment.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/checkDeposit.types.d.ts +1 -1
- package/lib/typescript/src/types/shared/checkDeposit.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/env.types.d.ts +2 -1
- package/lib/typescript/src/types/shared/env.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/fundAccountPayment.types.d.ts +38 -0
- package/lib/typescript/src/types/shared/fundAccountPayment.types.d.ts.map +1 -0
- package/lib/typescript/src/types/shared/index.d.ts +2 -0
- package/lib/typescript/src/types/shared/index.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/payments.types.d.ts +29 -1
- package/lib/typescript/src/types/shared/payments.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/securitySettings.d.ts +8 -0
- package/lib/typescript/src/types/shared/securitySettings.d.ts.map +1 -0
- package/lib/typescript/src/types/shared/types.d.ts +7 -4
- package/lib/typescript/src/types/shared/types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/wirePayment.types.d.ts +42 -0
- package/lib/typescript/src/types/shared/wirePayment.types.d.ts.map +1 -0
- package/lib/typescript/src/unitSdkManager/UnitSdk.constants.d.ts +2 -0
- package/lib/typescript/src/unitSdkManager/UnitSdk.constants.d.ts.map +1 -1
- package/lib/typescript/src/unitSdkManager/UnitSdkManager.d.ts +7 -1
- package/lib/typescript/src/unitSdkManager/UnitSdkManager.d.ts.map +1 -1
- package/lib/typescript/src/unitSdkManager/UnitSdkManager.utils.internal.d.ts.map +1 -1
- package/lib/typescript/src/unitSdkManager/unitHelpersManager/UnitHelpersManager.d.ts +2 -0
- package/lib/typescript/src/unitSdkManager/unitHelpersManager/UnitHelpersManager.d.ts.map +1 -1
- package/lib/typescript/src/utils/onLoadMessages.utils.d.ts +2 -0
- package/lib/typescript/src/utils/onLoadMessages.utils.d.ts.map +1 -0
- package/lib/typescript/src/webComponent/WebComponent.d.ts.map +1 -1
- package/lib/typescript/src/webComponent/WebComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/webComponent/html.d.ts.map +1 -1
- package/package.json +1 -1
- package/react-native-unit-components.podspec +1 -1
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +11 -16
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +11 -17
- package/src/components/UNAccountComponent/UNAccountComponent.tsx +9 -5
- package/src/components/UNActivityComponent/UNActivityComponent.tsx +7 -14
- package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +14 -17
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +0 -1
- package/src/components/UNCardComponent/UNCardComponent.tsx +3 -3
- package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.tsx +7 -14
- package/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.tsx +111 -0
- package/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.ts +24 -0
- package/src/components/UNFundAccountPaymentComponent/index.ts +1 -0
- package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +6 -14
- package/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.tsx +3 -3
- package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.tsx +14 -11
- package/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.tsx +3 -3
- package/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.tsx +15 -12
- package/src/components/UNWirePaymentComponent/UNWirePaymentComponent.tsx +109 -0
- package/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.ts +23 -0
- package/src/components/UNWirePaymentComponent/index.ts +1 -0
- package/src/components/index.ts +2 -0
- package/src/helpers/BottomSheet/BottomSheet.tsx +3 -4
- package/src/hooks/useIsJailbrokeDevice.ts +17 -0
- package/src/hooks/useSnapshotProtection.ts +25 -0
- package/src/messages/webMessages/fundAccountPaymentMessage.ts +8 -0
- package/src/messages/webMessages/index.ts +2 -0
- package/src/messages/webMessages/onLoadMessage.ts +13 -2
- package/src/messages/webMessages/unitMessages.ts +1 -1
- package/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.tsx +12 -11
- package/src/nativeComponents/UNBaseView/UNBaseView.tsx +50 -0
- package/src/nativeComponents/UNBaseView/index.ts +1 -0
- package/src/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.ts +21 -0
- package/src/nativeModulesHelpers/UNSecurityHelper.ts +35 -0
- package/src/networking/common/UNNetworkConstants.ts +2 -1
- package/src/types/internal/webComponent.types.ts +2 -0
- package/src/types/shared/achCredit.types.ts +3 -3
- package/src/types/shared/bookPayment.types.ts +2 -2
- package/src/types/shared/checkDeposit.types.ts +1 -2
- package/src/types/shared/env.types.ts +2 -1
- package/src/types/shared/fundAccountPayment.types.ts +38 -0
- package/src/types/shared/index.ts +2 -0
- package/src/types/shared/payments.types.ts +33 -1
- package/src/types/shared/securitySettings.ts +8 -0
- package/src/types/shared/types.ts +9 -4
- package/src/types/shared/wirePayment.types.ts +43 -0
- package/src/unitSdkManager/UnitSdk.constants.ts +6 -0
- package/src/unitSdkManager/UnitSdkManager.ts +37 -4
- package/src/unitSdkManager/UnitSdkManager.utils.internal.ts +3 -0
- package/src/unitSdkManager/unitHelpersManager/UnitHelpersManager.ts +20 -0
- package/src/utils/onLoadMessages.utils.ts +3 -0
- package/src/webComponent/WebComponent.tsx +4 -3
- package/src/webComponent/WebComponent.utils.ts +2 -2
- package/src/webComponent/html.ts +1 -0
- package/lib/commonjs/utils/SDKInfo.js +0 -13
- package/lib/commonjs/utils/SDKInfo.js.map +0 -1
- package/lib/module/utils/SDKInfo.js +0 -5
- package/lib/module/utils/SDKInfo.js.map +0 -1
- package/lib/typescript/src/utils/SDKInfo.d.ts +0 -2
- package/lib/typescript/src/utils/SDKInfo.d.ts.map +0 -1
- package/src/utils/SDKInfo.ts +0 -5
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React, { useImperativeHandle, useRef, useState } from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
1
|
+
import React, { useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
3
2
|
import type WebView from 'react-native-webview';
|
|
4
3
|
import { HeightEvent, PageMessage } from '../..//messages/webMessages/pageMessage';
|
|
5
4
|
import {
|
|
@@ -34,6 +33,7 @@ import { useDispatch } from 'react-redux';
|
|
|
34
33
|
import { setEvent } from '../../slices/SharedEventsSlice';
|
|
35
34
|
import { useListenerToEvent } from '../../hooks/useListenerToEvent';
|
|
36
35
|
import { UNAccountMenuItem, UNCreditAccount } from '../../types/shared';
|
|
36
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
37
37
|
|
|
38
38
|
export interface UNAccountComponentProps {
|
|
39
39
|
// inputs
|
|
@@ -71,7 +71,11 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
|
|
|
71
71
|
const [height, setHeight] = useState(0);
|
|
72
72
|
const webRef = useRef<WebView>(null);
|
|
73
73
|
// currentAccountId is used to store the current account id for the "imperative" refresh event.
|
|
74
|
-
const accountIdRef = useRef<string | undefined>(
|
|
74
|
+
const accountIdRef = useRef<string | undefined>(undefined);
|
|
75
|
+
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
accountIdRef.current = props.accountId;
|
|
78
|
+
}, [props.accountId]);
|
|
75
79
|
|
|
76
80
|
const handleAccountChanged = (account: UNAccountData) => {
|
|
77
81
|
accountIdRef.current = account.id;
|
|
@@ -161,7 +165,7 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
|
|
|
161
165
|
};
|
|
162
166
|
|
|
163
167
|
return (
|
|
164
|
-
<
|
|
168
|
+
<UNBaseView style={{ height, width: '100%' }} onLoadError={ handleUnitOnLoad }>
|
|
165
169
|
<WebComponent
|
|
166
170
|
ref={webRef}
|
|
167
171
|
type={WebComponentType.account}
|
|
@@ -173,7 +177,7 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
|
|
|
173
177
|
onMessage={message => handleMessage(message)}
|
|
174
178
|
isScrollable={false}
|
|
175
179
|
/>
|
|
176
|
-
</
|
|
180
|
+
</UNBaseView>
|
|
177
181
|
);
|
|
178
182
|
});
|
|
179
183
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useImperativeHandle, useRef, useState } from 'react';
|
|
2
|
-
import { Dimensions
|
|
2
|
+
import { Dimensions } from 'react-native';
|
|
3
3
|
import {
|
|
4
4
|
RequestRefreshEvent,
|
|
5
5
|
RequestRenderingEvent,
|
|
@@ -31,6 +31,7 @@ import { setEvent } from '../../slices/SharedEventsSlice';
|
|
|
31
31
|
import { useDispatch } from 'react-redux';
|
|
32
32
|
import { useListenerToEvent } from '../../hooks/useListenerToEvent';
|
|
33
33
|
import type { UNActivityComponentPaginationType } from '../../types/shared';
|
|
34
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
34
35
|
|
|
35
36
|
const DEFAULT_HEIGHT = Dimensions.get('window').height * 0.5;
|
|
36
37
|
|
|
@@ -140,8 +141,10 @@ const UNActivityComponent = React.forwardRef<UNActivityRef, UNActivityComponentP
|
|
|
140
141
|
}
|
|
141
142
|
};
|
|
142
143
|
|
|
143
|
-
const
|
|
144
|
-
|
|
144
|
+
const style = defaultHeight ? { height: defaultHeight } : { flex: 1 };
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<UNBaseView style={style} onLoadError={ handleUnitOnLoad }>
|
|
145
148
|
<WebComponent
|
|
146
149
|
ref={webRef}
|
|
147
150
|
type={WebComponentType.activity}
|
|
@@ -153,17 +156,7 @@ const UNActivityComponent = React.forwardRef<UNActivityRef, UNActivityComponentP
|
|
|
153
156
|
language={props.language}
|
|
154
157
|
script={getActivityScript()}
|
|
155
158
|
/>
|
|
156
|
-
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
if (!defaultHeight) {
|
|
160
|
-
return renderActivityWebView();
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
return (
|
|
164
|
-
<View style={{ height: defaultHeight }}>
|
|
165
|
-
{renderActivityWebView()}
|
|
166
|
-
</View>
|
|
159
|
+
</UNBaseView>
|
|
167
160
|
);
|
|
168
161
|
});
|
|
169
162
|
|
|
@@ -10,13 +10,14 @@ import type {
|
|
|
10
10
|
UNOnLoadResponseData,
|
|
11
11
|
} from '../../types/shared';
|
|
12
12
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
13
|
-
import { View } from 'react-native';
|
|
14
13
|
import { UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
15
14
|
import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
|
|
16
15
|
import type { BookPaymentEvent } from '../../messages/webMessages/bookPaymentMessage';
|
|
17
16
|
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
18
17
|
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
19
18
|
import { withReduxStore } from '../../helpers/store/helpers';
|
|
19
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
20
|
+
import { ensureArray } from '../../utils/onLoadMessages.utils';
|
|
20
21
|
|
|
21
22
|
export interface UNBookPaymentComponentProps {
|
|
22
23
|
//inputs
|
|
@@ -35,7 +36,7 @@ export interface UNBookPaymentComponentProps {
|
|
|
35
36
|
|
|
36
37
|
// events
|
|
37
38
|
onPaymentCreated?: (data: UNBookPaymentData) => void;
|
|
38
|
-
onLoad?: (response: UNOnLoadResponse<UNAccountData>) => void;
|
|
39
|
+
onLoad?: (response: UNOnLoadResponse<[UNAccountData]>) => void;
|
|
39
40
|
onInitialStageBackButtonClicked?: () => void;
|
|
40
41
|
onFinalStageDoneButtonClicked?: () => void;
|
|
41
42
|
}
|
|
@@ -55,8 +56,12 @@ const UNBookPaymentComponent = (props: UNBookPaymentComponentProps) => {
|
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
if (RESPONSE_KEYS.account in response) {
|
|
59
|
+
const account = response[RESPONSE_KEYS.account].data;
|
|
58
60
|
// AccountOnLoadResponse;
|
|
59
|
-
|
|
61
|
+
const paymentOnload: UNOnLoadResponseData<[UNAccountData]> = {
|
|
62
|
+
data: ensureArray(account),
|
|
63
|
+
};
|
|
64
|
+
props.onLoad(paymentOnload);
|
|
60
65
|
return;
|
|
61
66
|
}
|
|
62
67
|
|
|
@@ -93,29 +98,21 @@ const UNBookPaymentComponent = (props: UNBookPaymentComponentProps) => {
|
|
|
93
98
|
}
|
|
94
99
|
};
|
|
95
100
|
|
|
96
|
-
const
|
|
97
|
-
|
|
101
|
+
const style = presentationMode === PresentationMode.Inherit ? { flex: 1 } : { height: height };
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<UNBaseView style={style} onLoadError={ handleUnitOnLoad }>
|
|
98
105
|
<WebComponent
|
|
99
106
|
type={WebComponentType.bookPayment}
|
|
100
107
|
presentationMode={presentationMode}
|
|
101
108
|
params={getBookPaymentParams(props)}
|
|
102
109
|
script={getBookPaymentScript()}
|
|
103
110
|
onMessage={(message: WebViewMessage) => handleWebViewMessage(message)}
|
|
104
|
-
isScrollable={
|
|
111
|
+
isScrollable={true}
|
|
105
112
|
theme={props.theme}
|
|
106
113
|
language={props.language}
|
|
107
114
|
/>
|
|
108
|
-
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
if (presentationMode === PresentationMode.Inherit) {
|
|
112
|
-
return renderBookPaymentWebView();
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return (
|
|
116
|
-
<View style={{ height: height }}>
|
|
117
|
-
{renderBookPaymentWebView()}
|
|
118
|
-
</View>
|
|
115
|
+
</UNBaseView>
|
|
119
116
|
);
|
|
120
117
|
};
|
|
121
118
|
|
|
@@ -39,7 +39,6 @@ import { WebComponentType } from '../../types/internal/webComponent.types';
|
|
|
39
39
|
import { getNativeComponentDataFromEvent } from './UNBottomSheetComponent.utils';
|
|
40
40
|
|
|
41
41
|
const UNBottomSheetComponent = () => {
|
|
42
|
-
|
|
43
42
|
const dispatch = useDispatch();
|
|
44
43
|
|
|
45
44
|
const isBottomSheetActive = useSelector((state: RootState) => state.bottomSheet.isBottomSheetActive);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useImperativeHandle, useRef, useState, useEffect } from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
2
|
import type WebView from 'react-native-webview';
|
|
4
3
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
5
4
|
import { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
@@ -32,6 +31,7 @@ import { withReduxStoreAndRefForwarding } from '../../helpers/store/helpers';
|
|
|
32
31
|
import { useListenerToEvent } from '../../hooks/useListenerToEvent';
|
|
33
32
|
import { setEvent } from '../../slices/SharedEventsSlice';
|
|
34
33
|
import { UNCardMenuItem } from '../../types/shared';
|
|
34
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
35
35
|
|
|
36
36
|
export interface UNCardComponentProps {
|
|
37
37
|
// inputs
|
|
@@ -169,7 +169,7 @@ const UNCardComponent = React.forwardRef<CardRef, UNCardComponentProps>(function
|
|
|
169
169
|
}, []);
|
|
170
170
|
|
|
171
171
|
return (
|
|
172
|
-
<
|
|
172
|
+
<UNBaseView style={{ height, width: '100%', minWidth: 235 }} onLoadError={ handleUnitOnLoad }>
|
|
173
173
|
<WebComponent
|
|
174
174
|
ref={webRef}
|
|
175
175
|
type={WebComponentType.card}
|
|
@@ -181,7 +181,7 @@ const UNCardComponent = React.forwardRef<CardRef, UNCardComponentProps>(function
|
|
|
181
181
|
onMessage={message => handleMessage(message)}
|
|
182
182
|
isScrollable={false}
|
|
183
183
|
/>
|
|
184
|
-
</
|
|
184
|
+
</UNBaseView>
|
|
185
185
|
);
|
|
186
186
|
|
|
187
187
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { NativeModules, Platform } from 'react-native';
|
|
3
3
|
import { WebComponent } from '../../webComponent/WebComponent';
|
|
4
4
|
import type { WebViewMessage } from '../../messages/webMessages';
|
|
5
5
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
@@ -12,6 +12,7 @@ import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessag
|
|
|
12
12
|
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
13
13
|
import { withReduxStore } from '../../helpers/store/helpers';
|
|
14
14
|
import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
|
|
15
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
15
16
|
|
|
16
17
|
const { Camera } = NativeModules;
|
|
17
18
|
|
|
@@ -101,8 +102,10 @@ const UNCheckDepositComponent = (props: UNCheckDepositComponentProps) => {
|
|
|
101
102
|
}
|
|
102
103
|
};
|
|
103
104
|
|
|
104
|
-
const
|
|
105
|
-
|
|
105
|
+
const style = presentationMode === PresentationMode.Inherit ? { flex: 1 } : { height: height };
|
|
106
|
+
|
|
107
|
+
return (
|
|
108
|
+
<UNBaseView style={style} onLoadError={ handleUnitOnLoad }>
|
|
106
109
|
<WebComponent
|
|
107
110
|
type={WebComponentType.checkDeposit}
|
|
108
111
|
presentationMode={presentationMode}
|
|
@@ -113,17 +116,7 @@ const UNCheckDepositComponent = (props: UNCheckDepositComponentProps) => {
|
|
|
113
116
|
language={props.language}
|
|
114
117
|
isScrollable={true}
|
|
115
118
|
/>
|
|
116
|
-
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
if (presentationMode === PresentationMode.Inherit) {
|
|
120
|
-
return renderBookPaymentWebView();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return (
|
|
124
|
-
<View style={{ height: height }}>
|
|
125
|
-
{renderBookPaymentWebView()}
|
|
126
|
-
</View>
|
|
119
|
+
</UNBaseView>
|
|
127
120
|
);
|
|
128
121
|
};
|
|
129
122
|
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* eslint-disable no-case-declarations */
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
|
+
import type WebView from 'react-native-webview';
|
|
4
|
+
import {
|
|
5
|
+
UnitMessage,
|
|
6
|
+
} from '../../messages/webMessages/unitMessages';
|
|
7
|
+
import { WebComponent } from '../../webComponent/WebComponent';
|
|
8
|
+
import type { WebViewMessage } from '../../messages/webMessages';
|
|
9
|
+
import {
|
|
10
|
+
getFundAccountPaymentParams,
|
|
11
|
+
getFundAccountPaymentScript,
|
|
12
|
+
} from './UNFundAccountPaymentComponent.utils';
|
|
13
|
+
import type { UNFundAccountPaymentData, UNFundAccountPaymentOnLoadData, UNAstraExternalCardData, UNCardData, UNError, UNOnLoadResponse } from '../../types/shared';
|
|
14
|
+
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
15
|
+
import { withReduxStore } from '../../helpers/store/helpers';
|
|
16
|
+
import { SafeAreaView } from 'react-native';
|
|
17
|
+
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
18
|
+
import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
|
|
19
|
+
import { FundAccountPaymentEvent } from '../../messages/webMessages/fundAccountPaymentMessage';
|
|
20
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
21
|
+
|
|
22
|
+
export interface UNFundAccountPaymentComponentProps {
|
|
23
|
+
// inputs
|
|
24
|
+
accountId?: string;
|
|
25
|
+
customerToken: string;
|
|
26
|
+
fee?: number;
|
|
27
|
+
isAutoFocus?: boolean;
|
|
28
|
+
|
|
29
|
+
// ui
|
|
30
|
+
theme?: string;
|
|
31
|
+
language?: string;
|
|
32
|
+
|
|
33
|
+
initialStageBackButton?: boolean;
|
|
34
|
+
finalStageDoneButton?: boolean;
|
|
35
|
+
|
|
36
|
+
// events
|
|
37
|
+
onLoad?: (response: UNOnLoadResponse<UNFundAccountPaymentOnLoadData>) => void;
|
|
38
|
+
onPaymentCreated?: (data: UNFundAccountPaymentData) => void;
|
|
39
|
+
onInitialStageBackButtonClicked?: () => void;
|
|
40
|
+
onFinalStageDoneButtonClicked?: () => void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const UNFundAccountPaymentComponent = (props: UNFundAccountPaymentComponentProps) => {
|
|
44
|
+
const webRef = useRef<WebView>(null);
|
|
45
|
+
|
|
46
|
+
const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {
|
|
47
|
+
if (!props.onLoad) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (RESPONSE_KEYS.errors in response) {
|
|
52
|
+
props.onLoad(response as UNError);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (RESPONSE_KEYS.astraExternalCard in response) {
|
|
57
|
+
// AstraOnLoadResponse
|
|
58
|
+
props.onLoad(response[RESPONSE_KEYS.astraExternalCard] as UNOnLoadResponse<[UNAstraExternalCardData]>);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (RESPONSE_KEYS.accountCards in response) {
|
|
63
|
+
props.onLoad(response[RESPONSE_KEYS.accountCards] as UNOnLoadResponse<[UNCardData]>);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
console.error('On Load Error: unexpected response type');
|
|
68
|
+
return;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const handleMessage = (message: WebViewMessage) => {
|
|
72
|
+
switch (message.type) {
|
|
73
|
+
case UnitMessage.UNIT_ON_LOAD:
|
|
74
|
+
handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);
|
|
75
|
+
break;
|
|
76
|
+
case PaymentMessage.PAYMENT_CREATED:
|
|
77
|
+
const fundAccountPayment = message.details as FundAccountPaymentEvent;
|
|
78
|
+
props.onPaymentCreated && props.onPaymentCreated(fundAccountPayment.data as UNFundAccountPaymentData);
|
|
79
|
+
break;
|
|
80
|
+
case PaymentMessage.INITIAL_STAGE_BACK_BUTTON_CLICKED: {
|
|
81
|
+
props.onInitialStageBackButtonClicked && props.onInitialStageBackButtonClicked();
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
case PaymentMessage.FINAL_STAGE_DONE_BUTTON_CLICKED: {
|
|
85
|
+
props.onFinalStageDoneButtonClicked && props.onFinalStageDoneButtonClicked();
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<SafeAreaView style={{flex: 1, minHeight: 400}}>
|
|
93
|
+
<UNBaseView style={{flex: 1}} onLoadError={ handleUnitOnLoad }>
|
|
94
|
+
<WebComponent
|
|
95
|
+
ref={webRef}
|
|
96
|
+
type={WebComponentType.fundAccountPayment}
|
|
97
|
+
presentationMode={PresentationMode.Inherit}
|
|
98
|
+
params={getFundAccountPaymentParams(props)}
|
|
99
|
+
script={getFundAccountPaymentScript()}
|
|
100
|
+
theme={props.theme}
|
|
101
|
+
language={props.language}
|
|
102
|
+
onMessage={message => handleMessage(message)}
|
|
103
|
+
isScrollable={true}
|
|
104
|
+
nestedScrollEnabled={true}
|
|
105
|
+
/>
|
|
106
|
+
</UNBaseView>
|
|
107
|
+
</SafeAreaView>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export default withReduxStore<UNFundAccountPaymentComponentProps>(UNFundAccountPaymentComponent);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UNFundAccountPaymentComponentProps } from './UNFundAccountPaymentComponent';
|
|
2
|
+
import { LISTENERS } from '../../scripts/html/bodyScript';
|
|
3
|
+
|
|
4
|
+
export const getFundAccountPaymentParams = (props: UNFundAccountPaymentComponentProps) => {
|
|
5
|
+
const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : '';
|
|
6
|
+
const feeParam = props.fee ? `fee="${props.fee}"` : '';
|
|
7
|
+
return `
|
|
8
|
+
customer-token="${props.customerToken}"
|
|
9
|
+
${accountIdParam}
|
|
10
|
+
${feeParam}
|
|
11
|
+
is-auto-focus="${props.isAutoFocus ?? false}"
|
|
12
|
+
initial-stage-back-button="${props.initialStageBackButton ?? false}"
|
|
13
|
+
final-stage-done-button="${props.finalStageDoneButton ?? false}"
|
|
14
|
+
style="height: 100%"
|
|
15
|
+
`;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const getFundAccountPaymentScript = () => {
|
|
19
|
+
return `
|
|
20
|
+
${LISTENERS.unitPaymentCreated}
|
|
21
|
+
${LISTENERS.unitPaymentInitialStageBackButtonClicked}
|
|
22
|
+
${LISTENERS.unitPaymentFinalStageDoneButtonClicked}
|
|
23
|
+
`;
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as UNFundAccountPaymentComponent, UNFundAccountPaymentComponentProps } from './UNFundAccountPaymentComponent';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef, useState } from 'react';
|
|
2
|
-
import { Dimensions
|
|
2
|
+
import { Dimensions } from 'react-native';
|
|
3
3
|
import type { WebViewMessage } from '../../messages/webMessages';
|
|
4
4
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
5
5
|
import { WebComponent } from '../../webComponent/WebComponent';
|
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
UNOnLoadResponseData,
|
|
22
22
|
} from '../../types/shared';
|
|
23
23
|
import { MultipleCardsCardClickedEvent, MultipleCardsMessage } from '../../messages/webMessages/multipleCardsMessage';
|
|
24
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
24
25
|
|
|
25
26
|
const DEFAULT_HEIGHT = Dimensions.get('window').height * 0.5;
|
|
26
27
|
|
|
@@ -90,8 +91,9 @@ const UNMultipleCardsComponent = (props: UNMultipleCardsComponentProps) => {
|
|
|
90
91
|
}
|
|
91
92
|
};
|
|
92
93
|
|
|
93
|
-
const
|
|
94
|
-
|
|
94
|
+
const style = defaultHeight ? { height: defaultHeight } : { flex: 1};
|
|
95
|
+
return (
|
|
96
|
+
<UNBaseView style={style} onLoadError={ handleUnitOnLoad }>
|
|
95
97
|
<WebComponent
|
|
96
98
|
ref={webRef}
|
|
97
99
|
type={WebComponentType.multipleCards}
|
|
@@ -103,17 +105,7 @@ const UNMultipleCardsComponent = (props: UNMultipleCardsComponentProps) => {
|
|
|
103
105
|
theme={props.theme}
|
|
104
106
|
language={props.language}
|
|
105
107
|
/>
|
|
106
|
-
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
if (!defaultHeight) {
|
|
110
|
-
return renderMultipleCardsWebView();
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return (
|
|
114
|
-
<View style={{ height: defaultHeight }}>
|
|
115
|
-
{renderMultipleCardsWebView()}
|
|
116
|
-
</View>
|
|
108
|
+
</UNBaseView>
|
|
117
109
|
);
|
|
118
110
|
};
|
|
119
111
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
2
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
4
3
|
import { UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
5
4
|
import { WebComponent } from '../../webComponent/WebComponent';
|
|
@@ -12,6 +11,7 @@ import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessag
|
|
|
12
11
|
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
13
12
|
import { withReduxStore } from '../../helpers/store/helpers';
|
|
14
13
|
import { UNRepaymentData } from '../../types/shared/repayment.types';
|
|
14
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
15
15
|
|
|
16
16
|
export interface UNNextRepaymentComponentProps {
|
|
17
17
|
// inputs
|
|
@@ -63,7 +63,7 @@ const UNNextRepaymentComponent = (props: UNNextRepaymentComponentProps) => {
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
|
-
<
|
|
66
|
+
<UNBaseView style={{ height, width: '100%' }} onLoadError={ handleUnitOnLoad }>
|
|
67
67
|
<WebComponent
|
|
68
68
|
type={WebComponentType.nextRepayment}
|
|
69
69
|
presentationMode={PresentationMode.Default}
|
|
@@ -73,7 +73,7 @@ const UNNextRepaymentComponent = (props: UNNextRepaymentComponentProps) => {
|
|
|
73
73
|
onMessage={message => handleMessage(message)}
|
|
74
74
|
isScrollable={false}
|
|
75
75
|
/>
|
|
76
|
-
</
|
|
76
|
+
</UNBaseView>
|
|
77
77
|
);
|
|
78
78
|
};
|
|
79
79
|
|
|
@@ -19,6 +19,7 @@ import { useListenerToEvent } from '../../hooks/useListenerToEvent';
|
|
|
19
19
|
import { LinkSuccess, openLink } from 'react-native-plaid-link-sdk';
|
|
20
20
|
import { OpenPlaidEvent, PlaidMessage } from '../../messages/webMessages/plaidMessages';
|
|
21
21
|
import { PayeeConnectedAccountEvent, PayeeCounterpartyEvent, PayeeManagementMessage, PayeeMicroDepositeConnectionEvent } from '../../messages/webMessages/payeeManagementMessage';
|
|
22
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
22
23
|
|
|
23
24
|
export interface UNPayeeManagementComponentProps {
|
|
24
25
|
// inputs
|
|
@@ -136,17 +137,19 @@ const UNPayeeManagementComponent = (props: UNPayeeManagementComponentProps) => {
|
|
|
136
137
|
};
|
|
137
138
|
|
|
138
139
|
return (
|
|
139
|
-
<
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
140
|
+
<UNBaseView style={{ height: '100%' }}>
|
|
141
|
+
<WebComponent
|
|
142
|
+
ref={webRef}
|
|
143
|
+
type={WebComponentType.payeeManagement}
|
|
144
|
+
presentationMode={PresentationMode.Inherit}
|
|
145
|
+
params={getPayeeParams(props)}
|
|
146
|
+
script={getPayeeManagementScript()}
|
|
147
|
+
theme={props.theme}
|
|
148
|
+
nestedScrollEnabled={true}
|
|
149
|
+
language={props.language}
|
|
150
|
+
onMessage={message => handleMessage(message)}
|
|
151
|
+
/>
|
|
152
|
+
</UNBaseView>
|
|
150
153
|
);
|
|
151
154
|
};
|
|
152
155
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
2
|
import { WebComponent } from '../../webComponent/WebComponent';
|
|
4
3
|
import { UNAccountData, UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';
|
|
5
4
|
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
@@ -9,6 +8,7 @@ import { withReduxStore } from '../../helpers/store/helpers';
|
|
|
9
8
|
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
10
9
|
import { UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
11
10
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
11
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
12
12
|
|
|
13
13
|
export interface UNProgramDetailsComponentProps {
|
|
14
14
|
// inputs
|
|
@@ -61,7 +61,7 @@ const UNProgramDetailsComponent = (props: UNProgramDetailsComponentProps) => {
|
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
return (
|
|
64
|
-
<
|
|
64
|
+
<UNBaseView style={{ height, width: '100%' }} onLoadError={ handleUnitOnLoad }>
|
|
65
65
|
<WebComponent
|
|
66
66
|
type={WebComponentType.programDetails}
|
|
67
67
|
presentationMode={PresentationMode.Default}
|
|
@@ -70,7 +70,7 @@ const UNProgramDetailsComponent = (props: UNProgramDetailsComponentProps) => {
|
|
|
70
70
|
language={props.language}
|
|
71
71
|
onMessage={handleMessage}
|
|
72
72
|
/>
|
|
73
|
-
</
|
|
73
|
+
</UNBaseView>
|
|
74
74
|
);
|
|
75
75
|
};
|
|
76
76
|
|
|
@@ -24,6 +24,7 @@ import { PageMessage } from '../../messages/webMessages/pageMessage';
|
|
|
24
24
|
import UNStoreManagerHelper from '../../nativeModulesHelpers/UNStoreManagerHelper/UNStoreManagerHelper';
|
|
25
25
|
import { ActivityMessage } from '../../messages/webMessages/activityMessage';
|
|
26
26
|
import { setItemInWindowUnitStore } from '../../utils/windowUnitStore';
|
|
27
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
27
28
|
|
|
28
29
|
export interface UNWhiteLabelAppComponentProps {
|
|
29
30
|
// inputs
|
|
@@ -79,7 +80,7 @@ const UNWhiteLabelAppComponent = (props: UNWhiteLabelAppComponentProps) => {
|
|
|
79
80
|
try {
|
|
80
81
|
const token = await UNStoreManagerHelper.getValue(UserDataKeys.unitCustomerToken);
|
|
81
82
|
if (token) {
|
|
82
|
-
setItemInWindowUnitStore(webRef.current, UserDataKeys.unitCustomerToken, token
|
|
83
|
+
setItemInWindowUnitStore(webRef.current, UserDataKeys.unitCustomerToken, token);
|
|
83
84
|
}
|
|
84
85
|
} catch (e) {
|
|
85
86
|
console.log(e);
|
|
@@ -102,17 +103,19 @@ const UNWhiteLabelAppComponent = (props: UNWhiteLabelAppComponentProps) => {
|
|
|
102
103
|
|
|
103
104
|
const renderWebView = () => {
|
|
104
105
|
return (
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
106
|
+
<UNBaseView style={{ flex: 1 }}>
|
|
107
|
+
<WebComponent
|
|
108
|
+
ref={webRef}
|
|
109
|
+
type={WebComponentType.whiteLabelApp}
|
|
110
|
+
presentationMode={PresentationMode.Inherit}
|
|
111
|
+
params={getWhiteLabelAppParams(props)}
|
|
112
|
+
onMessage={handleWebViewMessage}
|
|
113
|
+
isScrollable={true}
|
|
114
|
+
theme={props.theme}
|
|
115
|
+
language={props.language}
|
|
116
|
+
script={getWhiteLabelAppScript()}
|
|
117
|
+
/>
|
|
118
|
+
</UNBaseView>
|
|
116
119
|
);
|
|
117
120
|
};
|
|
118
121
|
|