react-native-unit-components 1.13.0 → 1.15.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 +96 -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 +4 -3
- 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/UNCardActionComponent/UNCardActionComponent.js +71 -0
- package/lib/commonjs/components/UNCardActionComponent/UNCardActionComponent.js.map +1 -0
- package/lib/commonjs/components/UNCardActionComponent/UNCardActionComponent.utils.js +22 -0
- package/lib/commonjs/components/UNCardActionComponent/UNCardActionComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNCardActionComponent/index.js +21 -0
- package/lib/commonjs/components/UNCardActionComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +26 -3
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js +2 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.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 +7 -1
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -1
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.js +79 -0
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.js.map +1 -0
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.js +32 -0
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/index.js +21 -0
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/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/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js +1 -1
- package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +24 -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 +7 -2
- 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 +33 -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/multiFactorAuthenticationMessage.js +11 -0
- package/lib/commonjs/messages/webMessages/multiFactorAuthenticationMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js +1 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/unitMessages.js +1 -0
- package/lib/commonjs/messages/webMessages/unitMessages.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/scripts/html/bodyScript.js +18 -5
- package/lib/commonjs/scripts/html/bodyScript.js.map +1 -1
- package/lib/commonjs/types/internal/webComponent.types.js +3 -0
- package/lib/commonjs/types/internal/webComponent.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/index.js +11 -0
- package/lib/commonjs/types/shared/index.js.map +1 -1
- package/lib/commonjs/types/shared/multiFactorAuthentication.types.js +2 -0
- package/lib/commonjs/types/shared/multiFactorAuthentication.types.js.map +1 -0
- package/lib/commonjs/types/shared/payeeManagement.types.js.map +1 -1
- package/lib/commonjs/types/shared/payments.types.js +1 -0
- 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/wirePayment.types.js +6 -0
- package/lib/commonjs/types/shared/wirePayment.types.js.map +1 -0
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js +7 -2
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js +25 -5
- 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/utils/onLoadMessages.utils.js +10 -0
- package/lib/commonjs/utils/onLoadMessages.utils.js.map +1 -0
- package/lib/commonjs/webComponent/WebComponent.js +11 -5
- package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
- package/lib/commonjs/webComponent/WebComponent.utils.js +5 -1
- package/lib/commonjs/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/commonjs/webComponent/html.js +2 -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 +4 -3
- 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/UNCardActionComponent/UNCardActionComponent.js +63 -0
- package/lib/module/components/UNCardActionComponent/UNCardActionComponent.js.map +1 -0
- package/lib/module/components/UNCardActionComponent/UNCardActionComponent.utils.js +14 -0
- package/lib/module/components/UNCardActionComponent/UNCardActionComponent.utils.js.map +1 -0
- package/lib/module/components/UNCardActionComponent/index.js +2 -0
- package/lib/module/components/UNCardActionComponent/index.js.map +1 -0
- package/lib/module/components/UNCardComponent/UNCardComponent.js +26 -3
- package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js +2 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.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 +7 -1
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -1
- package/lib/module/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.js +71 -0
- package/lib/module/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.js.map +1 -0
- package/lib/module/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.js +24 -0
- package/lib/module/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.js.map +1 -0
- package/lib/module/components/UNMultiFactorAuthenticationComponent/index.js +2 -0
- package/lib/module/components/UNMultiFactorAuthenticationComponent/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/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js +1 -1
- package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js.map +1 -1
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +24 -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 +7 -2
- 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 +3 -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/multiFactorAuthenticationMessage.js +5 -0
- package/lib/module/messages/webMessages/multiFactorAuthenticationMessage.js.map +1 -0
- package/lib/module/messages/webMessages/onLoadMessage.js +1 -0
- package/lib/module/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/module/messages/webMessages/unitMessages.js +1 -0
- package/lib/module/messages/webMessages/unitMessages.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/scripts/html/bodyScript.js +17 -4
- package/lib/module/scripts/html/bodyScript.js.map +1 -1
- package/lib/module/types/internal/webComponent.types.js +3 -0
- package/lib/module/types/internal/webComponent.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/index.js +1 -0
- package/lib/module/types/shared/index.js.map +1 -1
- package/lib/module/types/shared/multiFactorAuthentication.types.js +2 -0
- package/lib/module/types/shared/multiFactorAuthentication.types.js.map +1 -0
- package/lib/module/types/shared/payeeManagement.types.js.map +1 -1
- package/lib/module/types/shared/payments.types.js +1 -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/wirePayment.types.js +2 -0
- package/lib/module/types/shared/wirePayment.types.js.map +1 -0
- package/lib/module/unitSdkManager/UnitSdk.constants.js +7 -2
- package/lib/module/unitSdkManager/UnitSdk.constants.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.js +25 -5
- 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/utils/onLoadMessages.utils.js +4 -0
- package/lib/module/utils/onLoadMessages.utils.js.map +1 -0
- package/lib/module/webComponent/WebComponent.js +12 -6
- package/lib/module/webComponent/WebComponent.js.map +1 -1
- package/lib/module/webComponent/WebComponent.utils.js +3 -0
- package/lib/module/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/module/webComponent/html.js +3 -1
- 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/UNCardActionComponent/UNCardActionComponent.d.ts +14 -0
- package/lib/typescript/src/components/UNCardActionComponent/UNCardActionComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNCardActionComponent/UNCardActionComponent.utils.d.ts +4 -0
- package/lib/typescript/src/components/UNCardActionComponent/UNCardActionComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNCardActionComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNCardActionComponent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts +3 -1
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.utils.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.map +1 -1
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.d.ts +14 -0
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.d.ts +4 -0
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/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 +2 -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 +3 -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/index.d.ts +2 -1
- package/lib/typescript/src/messages/webMessages/index.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/multiFactorAuthenticationMessage.d.ts +4 -0
- package/lib/typescript/src/messages/webMessages/multiFactorAuthenticationMessage.d.ts.map +1 -0
- package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts +8 -4
- package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/unitMessages.d.ts +11 -1
- package/lib/typescript/src/messages/webMessages/unitMessages.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/scripts/html/bodyScript.d.ts +1 -0
- package/lib/typescript/src/scripts/html/bodyScript.d.ts.map +1 -1
- package/lib/typescript/src/slices/SharedEventsSlice.d.ts +2 -2
- package/lib/typescript/src/slices/SharedEventsSlice.d.ts.map +1 -1
- package/lib/typescript/src/store/store.d.ts +2 -2
- package/lib/typescript/src/types/internal/webComponent.types.d.ts +4 -1
- package/lib/typescript/src/types/internal/webComponent.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/achCredit.types.d.ts +1 -1
- package/lib/typescript/src/types/shared/achCredit.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/index.d.ts +1 -0
- package/lib/typescript/src/types/shared/index.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/multiFactorAuthentication.types.d.ts +15 -0
- package/lib/typescript/src/types/shared/multiFactorAuthentication.types.d.ts.map +1 -0
- package/lib/typescript/src/types/shared/payeeManagement.types.d.ts +32 -0
- package/lib/typescript/src/types/shared/payeeManagement.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/payments.types.d.ts +2 -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/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 +6 -2
- 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/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 +3 -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 +3 -3
- 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/UNCardActionComponent/UNCardActionComponent.tsx +81 -0
- package/src/components/UNCardActionComponent/UNCardActionComponent.utils.ts +16 -0
- package/src/components/UNCardActionComponent/index.ts +1 -0
- package/src/components/UNCardComponent/UNCardComponent.tsx +28 -4
- package/src/components/UNCardComponent/UNCardComponent.utils.ts +2 -1
- package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.tsx +7 -14
- package/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.tsx +16 -12
- package/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.tsx +86 -0
- package/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.ts +27 -0
- package/src/components/UNMultiFactorAuthenticationComponent/index.ts +1 -0
- package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +6 -14
- package/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.tsx +3 -3
- package/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.ts +1 -1
- package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.tsx +37 -12
- package/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.tsx +3 -3
- package/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.tsx +14 -11
- 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 +3 -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/index.ts +2 -0
- package/src/messages/webMessages/multiFactorAuthenticationMessage.ts +3 -0
- package/src/messages/webMessages/onLoadMessage.ts +9 -2
- package/src/messages/webMessages/unitMessages.ts +14 -2
- 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/scripts/html/bodyScript.ts +18 -4
- package/src/slices/SharedEventsSlice.ts +2 -2
- package/src/types/internal/webComponent.types.ts +3 -0
- package/src/types/shared/achCredit.types.ts +1 -1
- package/src/types/shared/env.types.ts +2 -1
- package/src/types/shared/index.ts +1 -0
- package/src/types/shared/multiFactorAuthentication.types.ts +17 -0
- package/src/types/shared/payeeManagement.types.ts +31 -0
- package/src/types/shared/payments.types.ts +1 -0
- package/src/types/shared/securitySettings.ts +8 -0
- package/src/types/shared/wirePayment.types.ts +43 -0
- package/src/unitSdkManager/UnitSdk.constants.ts +7 -1
- package/src/unitSdkManager/UnitSdkManager.ts +37 -7
- package/src/unitSdkManager/UnitSdkManager.utils.internal.ts +3 -0
- package/src/utils/onLoadMessages.utils.ts +3 -0
- package/src/webComponent/WebComponent.tsx +14 -6
- package/src/webComponent/WebComponent.utils.ts +6 -1
- package/src/webComponent/html.ts +4 -1
|
@@ -3,7 +3,7 @@ import { WebComponent } from '../../webComponent/WebComponent';
|
|
|
3
3
|
import type { WebViewMessage } from '../../messages/webMessages';
|
|
4
4
|
import type { UNOnLoadResponse, UNACHData, UNACHOnLoadData, UNError, UNOnLoadResponseData } from '../../types/shared';
|
|
5
5
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
6
|
-
import { Platform
|
|
6
|
+
import { Platform } from 'react-native';
|
|
7
7
|
import { getACHCreditParams, getACHCreditScript, injectUnitPlaidResponse } from './UNACHCreditComponent.utils';
|
|
8
8
|
import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
|
|
9
9
|
import type { ACHEvent } from '../../messages/webMessages/achCreditMessage';
|
|
@@ -21,6 +21,8 @@ import { PresentationMode, WebComponentType } from '../../types/internal/webComp
|
|
|
21
21
|
import { withReduxStore } from '../../helpers/store/helpers';
|
|
22
22
|
import { UNPlaidAccountFilter } from '../../types/shared';
|
|
23
23
|
import { PlaidMessage } from '../../messages/webMessages/plaidMessages';
|
|
24
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
25
|
+
import { ensureArray } from '../../utils/onLoadMessages.utils';
|
|
24
26
|
|
|
25
27
|
export interface UNACHCreditComponentProps {
|
|
26
28
|
accountId?: string;
|
|
@@ -69,10 +71,11 @@ const UNACHCreditComponent = (props: UNACHCreditComponentProps) => {
|
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
if (RESPONSE_KEYS.account in response && RESPONSE_KEYS.counterpartyAccount in response) {
|
|
74
|
+
const account = response[RESPONSE_KEYS.account].data;
|
|
72
75
|
// ACHOnLoadResponse;
|
|
73
76
|
const achOnload: UNOnLoadResponseData<UNACHOnLoadData> = {
|
|
74
77
|
data: {
|
|
75
|
-
[RESPONSE_KEYS.account]:
|
|
78
|
+
[RESPONSE_KEYS.account]: ensureArray(account),
|
|
76
79
|
[RESPONSE_KEYS.counterpartyAccount]: response[RESPONSE_KEYS.counterpartyAccount].data,
|
|
77
80
|
},
|
|
78
81
|
};
|
|
@@ -138,8 +141,10 @@ const UNACHCreditComponent = (props: UNACHCreditComponentProps) => {
|
|
|
138
141
|
}
|
|
139
142
|
};
|
|
140
143
|
|
|
141
|
-
const
|
|
142
|
-
|
|
144
|
+
const style = presentationMode === PresentationMode.Inherit ? { flex: 1 } : { height: height };
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<UNBaseView style={style} onLoadError={ handleUnitOnLoad }>
|
|
143
148
|
<WebComponent
|
|
144
149
|
ref={webRef}
|
|
145
150
|
type={WebComponentType.achCreditPayment}
|
|
@@ -147,21 +152,11 @@ const UNACHCreditComponent = (props: UNACHCreditComponentProps) => {
|
|
|
147
152
|
params={getACHCreditParams(props)}
|
|
148
153
|
script={getACHCreditScript(appPackageName)}
|
|
149
154
|
onMessage={(message: WebViewMessage) => handleWebViewMessage(message)}
|
|
150
|
-
isScrollable={
|
|
155
|
+
isScrollable={true}
|
|
151
156
|
theme={props.theme}
|
|
152
157
|
language={props.language}
|
|
153
158
|
/>
|
|
154
|
-
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
if (presentationMode === PresentationMode.Inherit) {
|
|
158
|
-
return renderACHCreditWebView();
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
return (
|
|
162
|
-
<View style={{ height: height }}>
|
|
163
|
-
{renderACHCreditWebView()}
|
|
164
|
-
</View>
|
|
159
|
+
</UNBaseView>
|
|
165
160
|
);
|
|
166
161
|
};
|
|
167
162
|
|
|
@@ -3,7 +3,7 @@ import { WebComponent } from '../../webComponent/WebComponent';
|
|
|
3
3
|
import type { WebViewMessage } from '../../messages/webMessages';
|
|
4
4
|
import type { UNOnLoadResponse, UNACHData, UNError, UNOnLoadResponseData, UNACHOnLoadData } from '../../types/shared';
|
|
5
5
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
6
|
-
import { Platform
|
|
6
|
+
import { Platform } from 'react-native';
|
|
7
7
|
import {
|
|
8
8
|
PlaidLinkTokenData,
|
|
9
9
|
PlaidTokenCreatedEvent,
|
|
@@ -22,6 +22,8 @@ import { PresentationMode, WebComponentType } from '../../types/internal/webComp
|
|
|
22
22
|
import { withReduxStore } from '../../helpers/store/helpers';
|
|
23
23
|
import { UNPlaidAccountFilter } from '../../types/shared';
|
|
24
24
|
import { PlaidMessage } from '../../messages/webMessages/plaidMessages';
|
|
25
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
26
|
+
import { ensureArray } from '../../utils/onLoadMessages.utils';
|
|
25
27
|
|
|
26
28
|
export interface UNACHDebitComponentProps {
|
|
27
29
|
accountId?: string;
|
|
@@ -69,10 +71,11 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
|
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
if (RESPONSE_KEYS.account in response && RESPONSE_KEYS.counterpartyAccount in response) {
|
|
74
|
+
const account = response[RESPONSE_KEYS.account].data;
|
|
72
75
|
// ACHOnLoadResponse;
|
|
73
76
|
const achOnload: UNOnLoadResponseData<UNACHOnLoadData> = {
|
|
74
77
|
data: {
|
|
75
|
-
[RESPONSE_KEYS.account]:
|
|
78
|
+
[RESPONSE_KEYS.account]: ensureArray(account),
|
|
76
79
|
[RESPONSE_KEYS.counterpartyAccount]: response[RESPONSE_KEYS.counterpartyAccount].data,
|
|
77
80
|
},
|
|
78
81
|
};
|
|
@@ -138,8 +141,10 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
|
|
|
138
141
|
}
|
|
139
142
|
};
|
|
140
143
|
|
|
141
|
-
const
|
|
142
|
-
|
|
144
|
+
const style = presentationMode === PresentationMode.Inherit ? { flex: 1 } : { height: height };
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<UNBaseView style={style} onLoadError={ handleUnitOnLoad }>
|
|
143
148
|
<WebComponent
|
|
144
149
|
ref={webRef}
|
|
145
150
|
type={WebComponentType.achDebitPayment}
|
|
@@ -147,22 +152,11 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
|
|
|
147
152
|
params={getACHDebitParams(props)}
|
|
148
153
|
script={getACHDebitScript(appPackageName)}
|
|
149
154
|
onMessage={(message: WebViewMessage) => handleWebViewMessage(message)}
|
|
150
|
-
isScrollable={
|
|
155
|
+
isScrollable={true}
|
|
151
156
|
theme={props.theme}
|
|
152
157
|
language={props.language}
|
|
153
158
|
/>
|
|
154
|
-
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
if (presentationMode === PresentationMode.Inherit) {
|
|
158
|
-
return renderACHDebitWebView();
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
return (
|
|
162
|
-
<View style={{ height: height }}>
|
|
163
|
-
{renderACHDebitWebView()}
|
|
164
|
-
</View>
|
|
165
|
-
|
|
159
|
+
</UNBaseView>
|
|
166
160
|
);
|
|
167
161
|
};
|
|
168
162
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useEffect, useImperativeHandle, useRef, useState } 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 {
|
|
@@ -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
|
|
@@ -165,7 +165,7 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
|
|
|
165
165
|
};
|
|
166
166
|
|
|
167
167
|
return (
|
|
168
|
-
<
|
|
168
|
+
<UNBaseView style={{ height, width: '100%' }} onLoadError={ handleUnitOnLoad }>
|
|
169
169
|
<WebComponent
|
|
170
170
|
ref={webRef}
|
|
171
171
|
type={WebComponentType.account}
|
|
@@ -177,7 +177,7 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
|
|
|
177
177
|
onMessage={message => handleMessage(message)}
|
|
178
178
|
isScrollable={false}
|
|
179
179
|
/>
|
|
180
|
-
</
|
|
180
|
+
</UNBaseView>
|
|
181
181
|
);
|
|
182
182
|
});
|
|
183
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);
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { UNCardMenuAction, UNError, UNOnLoadResponse } from '../../types/shared';
|
|
3
|
+
import { withReduxStore } from '../../helpers/store/helpers';
|
|
4
|
+
import type { WebViewMessage } from '../../messages/webMessages';
|
|
5
|
+
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
6
|
+
import { UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
7
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
8
|
+
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
9
|
+
import { WebComponent } from '../../webComponent/WebComponent';
|
|
10
|
+
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
11
|
+
import { getCardActionParams, getCardActionScript } from './UNCardActionComponent.utils';
|
|
12
|
+
import { Dimensions } from 'react-native';
|
|
13
|
+
|
|
14
|
+
export interface UNCardActionComponentProps {
|
|
15
|
+
// inputs
|
|
16
|
+
cardId: string;
|
|
17
|
+
customerToken: string;
|
|
18
|
+
action: UNCardMenuAction;
|
|
19
|
+
|
|
20
|
+
// ui
|
|
21
|
+
theme?: string;
|
|
22
|
+
language?: string;
|
|
23
|
+
|
|
24
|
+
// callbacks
|
|
25
|
+
onLoad?: (response: UNOnLoadResponse<undefined>) => void
|
|
26
|
+
onCloseFlow?: () => void
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const DEFAULT_HEIGHT = Dimensions.get('window').height * 0.5;
|
|
30
|
+
const UNCardActionComponent = (props: UNCardActionComponentProps) => {
|
|
31
|
+
const [defaultHeight, setDefaultHeight] = useState<number>();
|
|
32
|
+
|
|
33
|
+
const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {
|
|
34
|
+
if (!props.onLoad) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (RESPONSE_KEYS.errors in response) {
|
|
39
|
+
props.onLoad(response as UNError);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
props.onLoad({ data: undefined });
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const handleMessage = (message: WebViewMessage) => {
|
|
47
|
+
if (!message) return;
|
|
48
|
+
|
|
49
|
+
switch (message.type) {
|
|
50
|
+
case PageMessage.PAGE_HEIGHT: {
|
|
51
|
+
const currentHeight = (message.details as HeightEvent).height;
|
|
52
|
+
currentHeight === 0 && setDefaultHeight(DEFAULT_HEIGHT);
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
case UnitMessage.UNIT_ON_LOAD:
|
|
56
|
+
handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);
|
|
57
|
+
break;
|
|
58
|
+
case UnitMessage.UNIT_REQUEST_CLOSE_FLOW:
|
|
59
|
+
props.onCloseFlow && props.onCloseFlow();
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const style = defaultHeight ? { height: defaultHeight } : { flex: 1 };
|
|
65
|
+
return (
|
|
66
|
+
<UNBaseView style={style} onLoadError={ handleUnitOnLoad }>
|
|
67
|
+
<WebComponent
|
|
68
|
+
type={WebComponentType.cardAction}
|
|
69
|
+
presentationMode={PresentationMode.Inherit}
|
|
70
|
+
params={getCardActionParams(props)}
|
|
71
|
+
theme={props.theme}
|
|
72
|
+
language={props.language}
|
|
73
|
+
script={getCardActionScript()}
|
|
74
|
+
onMessage={message => handleMessage(message)}
|
|
75
|
+
isScrollable={true}
|
|
76
|
+
/>
|
|
77
|
+
</UNBaseView>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default withReduxStore<UNCardActionComponentProps>(UNCardActionComponent);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LISTENERS } from '../../scripts/html/bodyScript';
|
|
2
|
+
import { UNCardActionComponentProps } from './UNCardActionComponent';
|
|
3
|
+
|
|
4
|
+
export const getCardActionParams = (props: UNCardActionComponentProps) => {
|
|
5
|
+
return `
|
|
6
|
+
card-id="${props.cardId}"
|
|
7
|
+
customer-token="${props.customerToken}"
|
|
8
|
+
action="${props.action}"
|
|
9
|
+
`;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const getCardActionScript = () => {
|
|
13
|
+
return `
|
|
14
|
+
${LISTENERS.requestRefresh}
|
|
15
|
+
`;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as UNCardActionComponent, UNCardActionComponentProps } from './UNCardActionComponent';
|
|
@@ -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';
|
|
@@ -13,7 +12,7 @@ import {
|
|
|
13
12
|
injectRequestCardActionScript,
|
|
14
13
|
injectRequestShowSensitiveDataScript, injectRequestHideSensitiveDataScript,
|
|
15
14
|
} from './UNCardComponent.utils';
|
|
16
|
-
import
|
|
15
|
+
import { UNOnLoadResponse, UNCardData, UNError, UNCardMenuAction } from '../../types/shared';
|
|
17
16
|
import { CardMessage } from '../../messages/webMessages/cardMessage';
|
|
18
17
|
import { NativeModules } from 'react-native';
|
|
19
18
|
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
@@ -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
|
|
@@ -51,6 +51,8 @@ export interface UNCardComponentProps {
|
|
|
51
51
|
onLoad?: (response: UNOnLoadResponse<UNCardData>) => void;
|
|
52
52
|
onStatusChanged?: (card: UNCardData) => void;
|
|
53
53
|
onCardActivated?: (card: UNCardData) => void;
|
|
54
|
+
onAction?: (action: UNCardMenuAction) => void;
|
|
55
|
+
onActionsMenuClicked?: () => void;
|
|
54
56
|
pushProvisioningModule?: typeof NativeModules;
|
|
55
57
|
}
|
|
56
58
|
|
|
@@ -142,6 +144,8 @@ const UNCardComponent = React.forwardRef<CardRef, UNCardComponentProps>(function
|
|
|
142
144
|
} as SlotRendering;
|
|
143
145
|
|
|
144
146
|
dispatch(setEvent({ key: BottomSheetNativeMessage.REQUEST_RENDERING, data }));
|
|
147
|
+
|
|
148
|
+
sendActionCallbackIfNeeded(slotData.requestRenderingEvent);
|
|
145
149
|
break;
|
|
146
150
|
}
|
|
147
151
|
case PageMessage.PAGE_HEIGHT:
|
|
@@ -153,6 +157,26 @@ const UNCardComponent = React.forwardRef<CardRef, UNCardComponentProps>(function
|
|
|
153
157
|
}
|
|
154
158
|
};
|
|
155
159
|
|
|
160
|
+
const sendActionCallbackIfNeeded = (requestRenderingEvent: RequestRenderingEvent) => {
|
|
161
|
+
switch (requestRenderingEvent.data.nativeComponentName) {
|
|
162
|
+
case WebComponentType.cardMenu:
|
|
163
|
+
props.onActionsMenuClicked && props.onActionsMenuClicked();
|
|
164
|
+
break;
|
|
165
|
+
case WebComponentType.cardAction: {
|
|
166
|
+
// Find the relevant action from the native component
|
|
167
|
+
const actionMatch = requestRenderingEvent.data.nativeComponent.match(/action=([^\s]+)/);
|
|
168
|
+
if (actionMatch && props.onAction) {
|
|
169
|
+
const actionString = actionMatch[1] as string;
|
|
170
|
+
|
|
171
|
+
// Check if the actionString matches any value in the UNCardMenuAction enum
|
|
172
|
+
if (Object.values(UNCardMenuAction).includes(actionString as UNCardMenuAction)) {
|
|
173
|
+
props.onAction(actionString as UNCardMenuAction);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
|
|
156
180
|
useEffect(() => {
|
|
157
181
|
UnitSDK.setCustomerToken(props.customerToken);
|
|
158
182
|
}, [props.customerToken]);
|
|
@@ -169,7 +193,7 @@ const UNCardComponent = React.forwardRef<CardRef, UNCardComponentProps>(function
|
|
|
169
193
|
}, []);
|
|
170
194
|
|
|
171
195
|
return (
|
|
172
|
-
<
|
|
196
|
+
<UNBaseView style={{ height, width: '100%', minWidth: 235 }} onLoadError={ handleUnitOnLoad }>
|
|
173
197
|
<WebComponent
|
|
174
198
|
ref={webRef}
|
|
175
199
|
type={WebComponentType.card}
|
|
@@ -181,7 +205,7 @@ const UNCardComponent = React.forwardRef<CardRef, UNCardComponentProps>(function
|
|
|
181
205
|
onMessage={message => handleMessage(message)}
|
|
182
206
|
isScrollable={false}
|
|
183
207
|
/>
|
|
184
|
-
</
|
|
208
|
+
</UNBaseView>
|
|
185
209
|
);
|
|
186
210
|
|
|
187
211
|
});
|
|
@@ -4,13 +4,14 @@ import type { UNCardComponentProps } from './UNCardComponent';
|
|
|
4
4
|
import type { RequestRefreshEvent } from '../../messages/webMessages/unitMessages';
|
|
5
5
|
import type { UNCardMenuAction } from '../../types/shared';
|
|
6
6
|
import { WebComponentType } from '../../types/internal/webComponent.types';
|
|
7
|
+
import { UnitSDK } from '../../unitSdkManager/UnitSdkManager';
|
|
7
8
|
|
|
8
9
|
export const getCardParams = (props: UNCardComponentProps) => {
|
|
9
10
|
const menuItemsParam = props.menuItems ? `menu-items="${props.menuItems.join()}"` : '';
|
|
10
11
|
return `
|
|
11
12
|
card-id="${props.cardId}"
|
|
12
13
|
customer-token="${props.customerToken}"
|
|
13
|
-
enable-mobile-wallet="${!!props.pushProvisioningModule}"
|
|
14
|
+
enable-mobile-wallet="${!!(props.pushProvisioningModule || UnitSDK.getPushProvisionModule())}"
|
|
14
15
|
hide-actions-menu-button="${props.hideActionsMenuButton || false}"
|
|
15
16
|
hide-card-title="${props.hideCardTitle || false}"
|
|
16
17
|
hide-sensitive-data-button="${props.hideSensitiveDataButton || false}"
|
|
@@ -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
|
|
|
@@ -17,6 +17,8 @@ import { SafeAreaView } from 'react-native';
|
|
|
17
17
|
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
18
18
|
import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
|
|
19
19
|
import { FundAccountPaymentEvent } from '../../messages/webMessages/fundAccountPaymentMessage';
|
|
20
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
21
|
+
|
|
20
22
|
export interface UNFundAccountPaymentComponentProps {
|
|
21
23
|
// inputs
|
|
22
24
|
accountId?: string;
|
|
@@ -88,18 +90,20 @@ const UNFundAccountPaymentComponent = (props: UNFundAccountPaymentComponentProps
|
|
|
88
90
|
|
|
89
91
|
return (
|
|
90
92
|
<SafeAreaView style={{flex: 1, minHeight: 400}}>
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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>
|
|
103
107
|
</SafeAreaView>
|
|
104
108
|
);
|
|
105
109
|
};
|