react-native-unit-components 1.9.1 → 1.10.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/UnitReactNativeComponentsPackage.kt +9 -12
- package/android/src/main/java/com/unitreactnativecomponents/appInfo/UNAppInfoModule.kt +59 -0
- package/android/src/main/java/com/unitreactnativecomponents/extensions/ContextExtensions.kt +35 -0
- package/ios/Extensions/Bundle+Extensions.swift +23 -0
- package/ios/UNAppInfo/IOSAppInfo.swift +47 -0
- package/ios/UNAppInfo/UNAppInfoExportModule.m +5 -2
- package/ios/UnitReactNativeComponents.xcodeproj/project.pbxproj +34 -0
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +2 -2
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +2 -2
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +11 -7
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +13 -9
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +4 -0
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +22 -8
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js +7 -2
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +11 -8
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +86 -0
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -0
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +41 -0
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNMultipleCardsComponent/index.js +21 -0
- package/lib/commonjs/components/UNMultipleCardsComponent/index.js.map +1 -0
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/flows/card/UNCardFlows.js +8 -4
- package/lib/commonjs/flows/card/UNCardFlows.js.map +1 -1
- package/lib/commonjs/helpers/pushProvisioningService/helpers.js +34 -0
- package/lib/commonjs/helpers/pushProvisioningService/helpers.js.map +1 -0
- package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js +32 -2
- package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
- package/lib/commonjs/helpers/pushProvisioningService/types.js +41 -0
- package/lib/commonjs/helpers/pushProvisioningService/types.js.map +1 -0
- package/lib/commonjs/hooks/useListenerToEvent.js +26 -0
- package/lib/commonjs/hooks/useListenerToEvent.js.map +1 -0
- package/lib/commonjs/messages/webMessages/index.js.map +1 -1
- package/lib/commonjs/messages/webMessages/multipleCardsMessage.js +12 -0
- package/lib/commonjs/messages/webMessages/multipleCardsMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js +2 -1
- package/lib/commonjs/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js +27 -3
- package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js.map +1 -1
- package/lib/commonjs/slices/ConfigurationSlice.js +36 -0
- package/lib/commonjs/slices/ConfigurationSlice.js.map +1 -0
- package/lib/commonjs/slices/SharedEventsSlice.js +28 -0
- package/lib/commonjs/slices/SharedEventsSlice.js.map +1 -0
- package/lib/commonjs/store/store.js +5 -1
- package/lib/commonjs/store/store.js.map +1 -1
- package/lib/commonjs/types/internal/errorHelpers.js +20 -0
- package/lib/commonjs/types/internal/errorHelpers.js.map +1 -0
- package/lib/commonjs/types/internal/webComponent.types.js +1 -0
- package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
- package/lib/commonjs/types/shared/activity.types.js +7 -0
- package/lib/commonjs/types/shared/activity.types.js.map +1 -1
- package/lib/commonjs/types/shared/error.types.js +29 -0
- package/lib/commonjs/types/shared/error.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/multipleCards.types.js +13 -0
- package/lib/commonjs/types/shared/multipleCards.types.js.map +1 -0
- package/lib/commonjs/types/shared/onLoadResponse.types.js +4 -0
- package/lib/commonjs/types/shared/onLoadResponse.types.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdk.api.js +6 -13
- package/lib/commonjs/unitSdkManager/UnitSdk.api.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js +8 -18
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/commonjs/utils/AppInfo.js +49 -0
- package/lib/commonjs/utils/AppInfo.js.map +1 -0
- package/lib/commonjs/utils/SDKInfo.js +13 -0
- package/lib/commonjs/utils/SDKInfo.js.map +1 -0
- package/lib/commonjs/webComponent/WebComponent.js +30 -32
- package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
- package/lib/commonjs/webComponent/WebComponent.utils.js +19 -1
- package/lib/commonjs/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +2 -2
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +2 -2
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js +11 -6
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js +13 -8
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js +4 -0
- package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +22 -8
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js +7 -2
- package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.js +12 -8
- package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +77 -0
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -0
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +33 -0
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -0
- package/lib/module/components/UNMultipleCardsComponent/index.js +2 -0
- package/lib/module/components/UNMultipleCardsComponent/index.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/flows/card/UNCardFlows.js +8 -3
- package/lib/module/flows/card/UNCardFlows.js.map +1 -1
- package/lib/module/helpers/pushProvisioningService/helpers.js +24 -0
- package/lib/module/helpers/pushProvisioningService/helpers.js.map +1 -0
- package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js +35 -5
- package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
- package/lib/module/helpers/pushProvisioningService/types.js +34 -0
- package/lib/module/helpers/pushProvisioningService/types.js.map +1 -0
- package/lib/module/hooks/useListenerToEvent.js +19 -0
- package/lib/module/hooks/useListenerToEvent.js.map +1 -0
- package/lib/module/messages/webMessages/index.js.map +1 -1
- package/lib/module/messages/webMessages/multipleCardsMessage.js +5 -0
- package/lib/module/messages/webMessages/multipleCardsMessage.js.map +1 -0
- package/lib/module/messages/webMessages/onLoadMessage.js +2 -1
- package/lib/module/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/module/networking/requests/UNWalletPayloadRequest.js +27 -3
- package/lib/module/networking/requests/UNWalletPayloadRequest.js.map +1 -1
- package/lib/module/slices/ConfigurationSlice.js +25 -0
- package/lib/module/slices/ConfigurationSlice.js.map +1 -0
- package/lib/module/slices/SharedEventsSlice.js +19 -0
- package/lib/module/slices/SharedEventsSlice.js.map +1 -0
- package/lib/module/store/store.js +5 -1
- package/lib/module/store/store.js.map +1 -1
- package/lib/module/types/internal/errorHelpers.js +12 -0
- package/lib/module/types/internal/errorHelpers.js.map +1 -0
- package/lib/module/types/internal/webComponent.types.js +1 -0
- package/lib/module/types/internal/webComponent.types.js.map +1 -1
- package/lib/module/types/shared/activity.types.js +5 -1
- package/lib/module/types/shared/activity.types.js.map +1 -1
- package/lib/module/types/shared/error.types.js +22 -0
- package/lib/module/types/shared/error.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/multipleCards.types.js +6 -0
- package/lib/module/types/shared/multipleCards.types.js.map +1 -0
- package/lib/module/types/shared/onLoadResponse.types.js +1 -1
- package/lib/module/types/shared/onLoadResponse.types.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdk.api.js +5 -10
- package/lib/module/unitSdkManager/UnitSdk.api.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdk.constants.js +1 -1
- package/lib/module/unitSdkManager/UnitSdk.constants.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.js +8 -17
- package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/module/utils/AppInfo.js +39 -0
- package/lib/module/utils/AppInfo.js.map +1 -0
- package/lib/module/utils/SDKInfo.js +5 -0
- package/lib/module/utils/SDKInfo.js.map +1 -0
- package/lib/module/webComponent/WebComponent.js +33 -34
- package/lib/module/webComponent/WebComponent.js.map +1 -1
- package/lib/module/webComponent/WebComponent.utils.js +15 -0
- package/lib/module/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/typescript/{components → src/components}/UNActivityComponent/UNActivityComponent.d.ts +3 -0
- package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts +15 -0
- package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.d.ts +3 -0
- package/lib/typescript/src/components/UNMultipleCardsComponent/index.d.ts +1 -0
- package/lib/typescript/{components → src/components}/index.d.ts +1 -0
- package/lib/typescript/src/helpers/pushProvisioningService/helpers.d.ts +4 -0
- package/lib/typescript/src/helpers/pushProvisioningService/types.d.ts +49 -0
- package/lib/typescript/src/hooks/useListenerToEvent.d.ts +9 -0
- package/lib/typescript/{messages → src/messages}/webMessages/index.d.ts +3 -2
- package/lib/typescript/src/messages/webMessages/multipleCardsMessage.d.ts +6 -0
- package/lib/typescript/{messages → src/messages}/webMessages/onLoadMessage.d.ts +7 -3
- package/lib/typescript/{networking → src/networking}/requests/UNWalletPayloadRequest.d.ts +1 -1
- package/lib/typescript/src/slices/ConfigurationSlice.d.ts +10 -0
- package/lib/typescript/src/slices/SharedEventsSlice.d.ts +56 -0
- package/lib/typescript/src/store/store.d.ts +76 -0
- package/lib/typescript/src/types/internal/errorHelpers.d.ts +4 -0
- package/lib/typescript/{types → src/types}/internal/webComponent.types.d.ts +1 -0
- package/lib/typescript/{types → src/types}/shared/activity.types.d.ts +5 -1
- package/lib/typescript/src/types/shared/error.types.d.ts +36 -0
- package/lib/typescript/{types → src/types}/shared/index.d.ts +2 -0
- package/lib/typescript/src/types/shared/multipleCards.types.d.ts +6 -0
- package/lib/typescript/src/types/shared/onLoadResponse.types.d.ts +5 -0
- package/lib/typescript/src/unitSdkManager/UnitSdk.api.d.ts +1 -0
- package/lib/typescript/{unitSdkManager → src/unitSdkManager}/UnitSdkManager.d.ts +4 -8
- package/lib/typescript/src/utils/AppInfo.d.ts +4 -0
- package/lib/typescript/src/utils/SDKInfo.d.ts +1 -0
- package/lib/typescript/{webComponent → src/webComponent}/WebComponent.utils.d.ts +3 -0
- package/package.json +3 -3
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +2 -2
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +2 -2
- package/src/components/UNAccountComponent/UNAccountComponent.tsx +25 -12
- package/src/components/UNActivityComponent/UNActivityComponent.tsx +33 -16
- package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +4 -1
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +42 -16
- package/src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.tsx +7 -2
- package/src/components/UNCardComponent/UNCardComponent.tsx +11 -10
- package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +119 -0
- package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.ts +36 -0
- package/src/components/UNMultipleCardsComponent/index.ts +3 -0
- package/src/components/index.ts +1 -0
- package/src/flows/card/UNCardFlows.ts +10 -4
- package/src/helpers/pushProvisioningService/helpers.ts +31 -0
- package/src/helpers/pushProvisioningService/hooks/useCardWallet.ts +35 -6
- package/src/helpers/pushProvisioningService/types.ts +52 -0
- package/src/hooks/useListenerToEvent.ts +32 -0
- package/src/messages/webMessages/index.ts +3 -0
- package/src/messages/webMessages/multipleCardsMessage.ts +9 -0
- package/src/messages/webMessages/onLoadMessage.ts +14 -3
- package/src/networking/requests/UNWalletPayloadRequest.ts +25 -4
- package/src/slices/ConfigurationSlice.ts +31 -0
- package/src/slices/SharedEventsSlice.ts +93 -0
- package/src/store/store.ts +6 -2
- package/src/types/internal/errorHelpers.ts +22 -0
- package/src/types/internal/webComponent.types.ts +1 -1
- package/src/types/shared/activity.types.ts +6 -1
- package/src/types/shared/error.types.ts +38 -0
- package/src/types/shared/index.ts +2 -0
- package/src/types/shared/multipleCards.types.ts +8 -0
- package/src/types/shared/onLoadResponse.types.ts +2 -12
- package/src/unitSdkManager/UnitSdk.api.ts +5 -8
- package/src/unitSdkManager/UnitSdk.constants.ts +1 -1
- package/src/unitSdkManager/UnitSdkManager.ts +8 -20
- package/src/utils/AppInfo.ts +40 -0
- package/src/utils/SDKInfo.ts +5 -0
- package/src/webComponent/WebComponent.tsx +37 -34
- package/src/webComponent/WebComponent.utils.ts +17 -0
- package/android/src/main/java/com/unitreactnativecomponents/getapplicationid/UNAppInfoModule.kt +0 -35
- package/ios/UNAppInfo/UNAppInfo.swift +0 -23
- package/lib/commonjs/components/utils/nativeModulesInfo.js +0 -20
- package/lib/commonjs/components/utils/nativeModulesInfo.js.map +0 -1
- package/lib/commonjs/helpers/EventBus.js +0 -58
- package/lib/commonjs/helpers/EventBus.js.map +0 -1
- package/lib/commonjs/hooks/listenerToBus.js +0 -34
- package/lib/commonjs/hooks/listenerToBus.js.map +0 -1
- package/lib/module/components/utils/nativeModulesInfo.js +0 -13
- package/lib/module/components/utils/nativeModulesInfo.js.map +0 -1
- package/lib/module/helpers/EventBus.js +0 -51
- package/lib/module/helpers/EventBus.js.map +0 -1
- package/lib/module/hooks/listenerToBus.js +0 -25
- package/lib/module/hooks/listenerToBus.js.map +0 -1
- package/lib/typescript/components/utils/nativeModulesInfo.d.ts +0 -1
- package/lib/typescript/helpers/EventBus.d.ts +0 -13
- package/lib/typescript/hooks/listenerToBus.d.ts +0 -7
- package/lib/typescript/store/store.d.ts +0 -6
- package/lib/typescript/types/shared/onLoadResponse.types.d.ts +0 -14
- package/lib/typescript/unitSdkManager/UnitSdk.api.d.ts +0 -3
- package/src/components/utils/nativeModulesInfo.ts +0 -11
- package/src/helpers/EventBus.ts +0 -58
- package/src/hooks/listenerToBus.ts +0 -31
- /package/lib/typescript/{assets → src/assets}/images/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNACHCreditComponent/UNACHCreditComponent.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNACHCreditComponent/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNACHDebitComponent/UNACHDebitComponent.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNACHDebitComponent/UNACHDebitComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNACHDebitComponent/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNAccountComponent/UNAccountComponent.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNAccountComponent/UNAccountComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNAccountComponent/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNActivityComponent/UNActivityComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNActivityComponent/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBookPaymentComponent/UNBookPaymentComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBookPaymentComponent/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.styles.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/components/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNCardComponent/UNCardComponent.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNCardComponent/UNCardComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNCardComponent/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNCheckDepositComponent/UNCheckDepositComponent.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNCheckDepositComponent/UNCheckDepositComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNCheckDepositComponent/index.d.ts +0 -0
- /package/lib/typescript/{flows → src/flows}/UNFlows.d.ts +0 -0
- /package/lib/typescript/{flows → src/flows}/card/UNCardFlows.d.ts +0 -0
- /package/lib/typescript/{helpers → src/helpers}/BottomSheet/BottomSheet.d.ts +0 -0
- /package/lib/typescript/{helpers → src/helpers}/BottomSheet/BottomSheet.styles.d.ts +0 -0
- /package/lib/typescript/{helpers → src/helpers}/pushProvisioningService/hooks/useCardWallet.d.ts +0 -0
- /package/lib/typescript/{helpers → src/helpers}/pushProvisioningService/hooks/useLaunchInitialize.d.ts +0 -0
- /package/lib/typescript/{helpers → src/helpers}/pushProvisioningService/startProvisioning.d.ts +0 -0
- /package/lib/typescript/{helpers → src/helpers}/store/helpers.d.ts +0 -0
- /package/lib/typescript/{hooks → src/hooks}/useAppStateListener.d.ts +0 -0
- /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
- /package/lib/typescript/{messages → src/messages}/nativeMessages/bottomSheetMessage.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/nativeMessages/cardMessage.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/nativeMessages/index.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/nativeMessages/sdkMessage.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/webMessages/accountMessage.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/webMessages/achCreditMessage.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/webMessages/activityMessage.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/webMessages/bookPaymentMessage.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/webMessages/cardMessage.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/webMessages/checkMessage.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/webMessages/pageMessage.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/webMessages/paymentsMessage.d.ts +0 -0
- /package/lib/typescript/{messages → src/messages}/webMessages/unitMessages.d.ts +0 -0
- /package/lib/typescript/{nativeComponent → src/nativeComponent}/UnitAddToWalletButton.d.ts +0 -0
- /package/lib/typescript/{networking → src/networking}/common/UNNetworkConstants.d.ts +0 -0
- /package/lib/typescript/{scripts → src/scripts}/html/bodyHtml.d.ts +0 -0
- /package/lib/typescript/{scripts → src/scripts}/html/bodyScript.d.ts +0 -0
- /package/lib/typescript/{scripts → src/scripts}/html/fontFaces.d.ts +0 -0
- /package/lib/typescript/{slices → src/slices}/pushProvisioningSlice.d.ts +0 -0
- /package/lib/typescript/{store → src/store}/index.d.ts +0 -0
- /package/lib/typescript/{styles → src/styles}/fonts.d.ts +0 -0
- /package/lib/typescript/{styles → src/styles}/variables.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/internal/bottomSheet.types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/account.types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/achCredit.types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/authorization.types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/bookPayment.types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/card.types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/checkDeposit.types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/fonts.types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/payments.types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/transactions.types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/versioning.types.d.ts +0 -0
- /package/lib/typescript/{types → src/types}/shared/wallet.types.d.ts +0 -0
- /package/lib/typescript/{unitSdkManager → src/unitSdkManager}/UnitSdk.constants.d.ts +0 -0
- /package/lib/typescript/{unitSdkManager → src/unitSdkManager}/UnitSdkManager.utils.internal.d.ts +0 -0
- /package/lib/typescript/{unitSdkManager → src/unitSdkManager}/unitUiManager/unitUiManager.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/webVersioningStrategy.utils.d.ts +0 -0
- /package/lib/typescript/{webComponent → src/webComponent}/WebComponent.d.ts +0 -0
- /package/lib/typescript/{webComponent → src/webComponent}/html.d.ts +0 -0
package/lib/typescript/{components → src/components}/UNActivityComponent/UNActivityComponent.d.ts
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UNOnLoadResponse } from '../../types/shared';
|
|
2
2
|
import type { UNActivityOnLoadData } from '../../types/shared/activity.types';
|
|
3
|
+
import type { UNActivityComponentPaginationType } from '../../types/shared';
|
|
3
4
|
export interface UNActivityComponentProps {
|
|
4
5
|
customerToken: string;
|
|
5
6
|
accountId?: string;
|
|
@@ -7,6 +8,8 @@ export interface UNActivityComponentProps {
|
|
|
7
8
|
theme?: string;
|
|
8
9
|
language?: string;
|
|
9
10
|
hideFilterButton?: boolean;
|
|
11
|
+
paginationType?: UNActivityComponentPaginationType;
|
|
12
|
+
transactionsPerPage?: number;
|
|
10
13
|
onLoad?: (response: UNOnLoadResponse<UNActivityOnLoadData>) => void;
|
|
11
14
|
}
|
|
12
15
|
declare const _default: (props: UNActivityComponentProps) => JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { UNCardData, UNMultipleCardsComponentPaginationType, UNMultipleCardsOnLoadData, UNOnLoadResponse } from '../../types/shared';
|
|
2
|
+
export interface UNMultipleCardsComponentProps {
|
|
3
|
+
customerToken: string;
|
|
4
|
+
paginationType?: UNMultipleCardsComponentPaginationType;
|
|
5
|
+
cardsPerPage?: number;
|
|
6
|
+
disableCardClick?: boolean;
|
|
7
|
+
theme?: string;
|
|
8
|
+
language?: string;
|
|
9
|
+
queryFilter?: string;
|
|
10
|
+
hideTitle?: boolean;
|
|
11
|
+
onLoad?: (response: UNOnLoadResponse<UNMultipleCardsOnLoadData>) => void;
|
|
12
|
+
onCardClicked?: (card: UNCardData) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: (props: UNMultipleCardsComponentProps) => JSX.Element;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as UNMultipleCardsComponent, UNMultipleCardsComponentProps, } from './UNMultipleCardsComponent';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { UNNativePromiseReject, UNVPError, UNVPErrorType } from './types';
|
|
2
|
+
export declare const isUNVPError: (error: any) => error is UNVPError;
|
|
3
|
+
export declare const isUNNativePromiseReject: (error: any) => error is UNNativePromiseReject;
|
|
4
|
+
export declare const promiseRejectToUNVPErrorType: (error: any) => UNVPErrorType | null;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare enum UNVPErrorType {
|
|
2
|
+
EmptyAppId = "EmptyAppId",
|
|
3
|
+
DeviceAuthenticationFailed = "DeviceAuthenticationFailed",
|
|
4
|
+
DeviceRootDetection = "DeviceRootDetection",
|
|
5
|
+
HookDetection = "HookDetection",
|
|
6
|
+
PlayIntegrityCheckFailed = "PlayIntegrityCheckFailed",
|
|
7
|
+
EmptyEncryptedPayload = "EmptyEncryptedPayload",
|
|
8
|
+
NoWallets = "NoWallets",
|
|
9
|
+
InvalidCardId = "InvalidCardId",
|
|
10
|
+
ProvisioningNotAllowed = "ProvisioningNotAllowed",
|
|
11
|
+
CancelledByUser = "CancelledByUser",
|
|
12
|
+
GoogleWalletCreationFailed = "GoogleWalletCreationFailed",
|
|
13
|
+
UnknownErrorOccurred = "UnknownErrorOccurred",
|
|
14
|
+
WalletProvisioningInconclusive = "WalletProvisioningInconclusive",
|
|
15
|
+
WalletProvisioningError = "WalletProvisioningError",
|
|
16
|
+
NetworkFailure = "NetworkFailure",
|
|
17
|
+
SessionExpired = "SessionExpired",
|
|
18
|
+
InvalidInfo = "InvalidInfo",
|
|
19
|
+
PayloadDecryptionFailed = "PayloadDecryptionFailed",
|
|
20
|
+
ApiError = "ApiError",
|
|
21
|
+
InvalidNonce = "InvalidNonce",
|
|
22
|
+
SDKLockout = "SDKLockout",
|
|
23
|
+
NoBrowserFound = "NoBrowserFound",
|
|
24
|
+
TLCMFeatureNotSupported = "TLCMFeatureNotSupported",
|
|
25
|
+
TLCMUnsupportedWallet = "TLCMUnsupportedWallet",
|
|
26
|
+
TLCMDetailsNotFoundInPaySdk = "TLCMDetailsNotFoundInPaySdk",
|
|
27
|
+
TLCMTokenStatusExists = "TLCMTokenStatusExists",
|
|
28
|
+
TLCMInvalidOperationInput = "TLCMInvalidOperationInput",
|
|
29
|
+
TLCMInvalidRequest = "TLCMInvalidRequest",
|
|
30
|
+
TLCMUpdateStatusNotAllowed = "TLCMUpdateStatusNotAllowed",
|
|
31
|
+
TLCMTokenNotFound = "TLCMTokenNotFound"
|
|
32
|
+
}
|
|
33
|
+
export interface UNVPError {
|
|
34
|
+
code: string;
|
|
35
|
+
description: string;
|
|
36
|
+
type: UNVPErrorType;
|
|
37
|
+
correlationId: string;
|
|
38
|
+
}
|
|
39
|
+
export type UNNativePromiseReject = {
|
|
40
|
+
code: string;
|
|
41
|
+
message: string;
|
|
42
|
+
};
|
|
43
|
+
export interface UNMobileWalletPayload {
|
|
44
|
+
data: {
|
|
45
|
+
attributes: {
|
|
46
|
+
payload: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NativeMessageType } from '../messages/nativeMessages';
|
|
2
|
+
import type { WebViewMessageType } from '../messages/webMessages';
|
|
3
|
+
export type BusEventKey = NativeMessageType | WebViewMessageType;
|
|
4
|
+
type EventListener = {
|
|
5
|
+
busEventKey: BusEventKey;
|
|
6
|
+
action: (data: any) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const useListenerToEvent: (listener: EventListener) => void;
|
|
9
|
+
export {};
|
|
@@ -7,8 +7,9 @@ import type { UnitEvent, UnitMessage } from './unitMessages';
|
|
|
7
7
|
import type { AccountEvent, AccountMessage } from './accountMessage';
|
|
8
8
|
import type { CheckEvent, CheckMessage } from './checkMessage';
|
|
9
9
|
import type { ActivityEvent, ActivityMessage } from './activityMessage';
|
|
10
|
-
|
|
11
|
-
type
|
|
10
|
+
import type { MultipleCardsEvent, MultipleCardsMessage } from './multipleCardsMessage';
|
|
11
|
+
export type WebViewMessageType = PageMessage | CardMessage | MultipleCardsMessage | UnitMessage | PaymentMessage | AccountMessage | CheckMessage | ActivityMessage;
|
|
12
|
+
type WebViewEvent = PageEvent | UnitEvent | CardEvent | MultipleCardsEvent | BookPaymentEvent | PaymentMessage | ACHEvent | AccountEvent | CheckEvent | ActivityEvent;
|
|
12
13
|
export interface WebViewMessage {
|
|
13
14
|
type: WebViewMessageType;
|
|
14
15
|
details?: WebViewEvent;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { UNCardData } from '../../types/shared';
|
|
2
|
+
export declare enum MultipleCardsMessage {
|
|
3
|
+
UNIT_MULTIPLE_CARDS_CARD_CLICKED = "unitMultipleCardsCardClicked"
|
|
4
|
+
}
|
|
5
|
+
export type MultipleCardsCardClickedEvent = UNCardData;
|
|
6
|
+
export type MultipleCardsEvent = MultipleCardsCardClickedEvent;
|
|
@@ -4,11 +4,15 @@ import type { UNTransactionData } from '../../types/shared/transactions.types';
|
|
|
4
4
|
export declare enum RESPONSE_KEYS {
|
|
5
5
|
errors = "errors",
|
|
6
6
|
card = "cardResult",
|
|
7
|
+
cards = "cardsResult",
|
|
7
8
|
account = "accountResult",
|
|
8
9
|
counterpartyAccount = "counterpartyResult",
|
|
9
10
|
transactions = "transactionsResult",
|
|
10
|
-
|
|
11
|
+
authorizations = "authorizationsResult"
|
|
11
12
|
}
|
|
13
|
+
export type CardsOnLoadResponse = {
|
|
14
|
+
[RESPONSE_KEYS.cards]: UNOnLoadResponseData<[UNCardData]>;
|
|
15
|
+
};
|
|
12
16
|
export type CardOnLoadResponse = {
|
|
13
17
|
[RESPONSE_KEYS.card]: UNOnLoadResponseData<UNCardData>;
|
|
14
18
|
};
|
|
@@ -23,8 +27,8 @@ export type ACHOnLoadResponse = {
|
|
|
23
27
|
[RESPONSE_KEYS.counterpartyAccount]: UNOnLoadResponseData<[UNCounterpartyAccountData]>;
|
|
24
28
|
};
|
|
25
29
|
export type ActivityOnLoadResponse = {
|
|
26
|
-
[RESPONSE_KEYS.
|
|
30
|
+
[RESPONSE_KEYS.authorizations]: UNOnLoadResponseData<UNAuthorizationData>;
|
|
27
31
|
[RESPONSE_KEYS.transactions]: UNOnLoadResponseData<UNTransactionData>;
|
|
28
32
|
};
|
|
29
|
-
export type UnitOnLoadResponseSuccessData = CardOnLoadResponse | ACHOnLoadResponse | AccountsOnLoadResponse | AccountOnLoadResponse | ActivityOnLoadResponse;
|
|
33
|
+
export type UnitOnLoadResponseSuccessData = CardOnLoadResponse | CardsOnLoadResponse | ACHOnLoadResponse | AccountsOnLoadResponse | AccountOnLoadResponse | ActivityOnLoadResponse;
|
|
30
34
|
export type UnitOnLoadResponseEvent = UNError | UnitOnLoadResponseSuccessData;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { UNEnvironment } from '../../unitSdkManager/UnitSdkManager';
|
|
2
|
-
export declare const getMobileWalletPayload: (customerToken: string, cardId: string, env: UNEnvironment, signedNonce: string) => Promise<
|
|
2
|
+
export declare const getMobileWalletPayload: (customerToken: string, cardId: string, env: UNEnvironment, signedNonce: string) => Promise<string | undefined>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RootState } from '../store';
|
|
2
|
+
export interface ConfigurationState {
|
|
3
|
+
unitScript?: string;
|
|
4
|
+
theme?: string;
|
|
5
|
+
language?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const setUnitScript: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "Configuration/setUnitScript">, setLanguage: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "Configuration/setLanguage">, setTheme: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "Configuration/setTheme">;
|
|
8
|
+
export declare const selectConfiguration: (state: RootState) => ConfigurationState;
|
|
9
|
+
declare const _default: import("redux").Reducer<ConfigurationState, import("redux").AnyAction>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { RootState } from '../store';
|
|
2
|
+
import type { SlotRendering, WebComponentRendering } from '../types/internal/bottomSheet.types';
|
|
3
|
+
import type { UNAccountData, UNCardData } from '../types/shared';
|
|
4
|
+
import type { ActivityFiltersChangedEvent } from '../messages/webMessages/activityMessage';
|
|
5
|
+
import type { RequestRefreshEvent } from '../messages/webMessages/unitMessages';
|
|
6
|
+
import type { BottomSheetNativeMessage } from '../messages/nativeMessages/bottomSheetMessage';
|
|
7
|
+
import type { CardMessage } from '../messages/webMessages/cardMessage';
|
|
8
|
+
import type { AccountMessage } from '../messages/webMessages/accountMessage';
|
|
9
|
+
import type { ActivityMessage } from '../messages/webMessages/activityMessage';
|
|
10
|
+
import type { UnitMessage } from '../messages/webMessages/unitMessages';
|
|
11
|
+
import type { MultipleCardsMessage } from '../messages/webMessages/multipleCardsMessage';
|
|
12
|
+
type EmptyObj = Record<PropertyKey, never>;
|
|
13
|
+
type SlotRenderingEventState = {
|
|
14
|
+
key: BottomSheetNativeMessage.START_FLOW;
|
|
15
|
+
data: SlotRendering;
|
|
16
|
+
};
|
|
17
|
+
type MultipleCardsCardClickedEventState = {
|
|
18
|
+
key: MultipleCardsMessage.UNIT_MULTIPLE_CARDS_CARD_CLICKED;
|
|
19
|
+
data: UNCardData;
|
|
20
|
+
};
|
|
21
|
+
type CardStatusChangedEventState = {
|
|
22
|
+
key: CardMessage.CARD_STATUS_CHANGED;
|
|
23
|
+
data: UNCardData;
|
|
24
|
+
};
|
|
25
|
+
type CardActivatedEventState = {
|
|
26
|
+
key: CardMessage.CARD_ACTIVATED;
|
|
27
|
+
data: UNCardData;
|
|
28
|
+
};
|
|
29
|
+
type AccountChangedEventState = {
|
|
30
|
+
key: AccountMessage.UNIT_ACCOUNT_CHANGED;
|
|
31
|
+
data: UNAccountData;
|
|
32
|
+
};
|
|
33
|
+
type ActivityFiltersChangedEventState = {
|
|
34
|
+
key: ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED;
|
|
35
|
+
data: ActivityFiltersChangedEvent;
|
|
36
|
+
};
|
|
37
|
+
type RequestCloseFlowEventState = {
|
|
38
|
+
key: UnitMessage.UNIT_REQUEST_CLOSE_FLOW;
|
|
39
|
+
data: EmptyObj;
|
|
40
|
+
};
|
|
41
|
+
type WebComponentRenderingEventState = {
|
|
42
|
+
key: BottomSheetNativeMessage.START_FLOW;
|
|
43
|
+
data: WebComponentRendering;
|
|
44
|
+
};
|
|
45
|
+
type RequestRefreshEventState = {
|
|
46
|
+
key: UnitMessage.UNIT_REQUEST_REFRESH;
|
|
47
|
+
data: RequestRefreshEvent;
|
|
48
|
+
};
|
|
49
|
+
type SharedEvent = SlotRenderingEventState | CardStatusChangedEventState | CardActivatedEventState | MultipleCardsCardClickedEventState | AccountChangedEventState | ActivityFiltersChangedEventState | RequestCloseFlowEventState | WebComponentRenderingEventState | RequestRefreshEventState;
|
|
50
|
+
type SharedEventsState = {
|
|
51
|
+
event?: SharedEvent;
|
|
52
|
+
};
|
|
53
|
+
export declare const setEvent: import("@reduxjs/toolkit").ActionCreatorWithPayload<SharedEvent, "SharedEvents/setEvent">;
|
|
54
|
+
export declare const selectSharedEvents: (state: RootState) => SharedEventsState;
|
|
55
|
+
declare const _default: import("redux").Reducer<SharedEventsState, import("redux").AnyAction>;
|
|
56
|
+
export default _default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<{
|
|
2
|
+
wallet: import("../slices/pushProvisioningSlice").PushProvisioningState;
|
|
3
|
+
configuration: import("../slices/ConfigurationSlice").ConfigurationState;
|
|
4
|
+
sharedEvents: {
|
|
5
|
+
event?: ({
|
|
6
|
+
key: import("../messages/nativeMessages/bottomSheetMessage").BottomSheetNativeMessage;
|
|
7
|
+
data: import("../types/internal/bottomSheet.types").SlotRendering;
|
|
8
|
+
} | {
|
|
9
|
+
key: import("../messages/webMessages/cardMessage").CardMessage.CARD_STATUS_CHANGED;
|
|
10
|
+
data: import("..").UNCardData;
|
|
11
|
+
} | {
|
|
12
|
+
key: import("../messages/webMessages/cardMessage").CardMessage.CARD_ACTIVATED;
|
|
13
|
+
data: import("..").UNCardData;
|
|
14
|
+
} | {
|
|
15
|
+
key: import("../messages/webMessages/multipleCardsMessage").MultipleCardsMessage;
|
|
16
|
+
data: import("..").UNCardData;
|
|
17
|
+
} | {
|
|
18
|
+
key: import("../messages/webMessages/accountMessage").AccountMessage;
|
|
19
|
+
data: import("..").UNAccountData;
|
|
20
|
+
} | {
|
|
21
|
+
key: import("../messages/webMessages/activityMessage").ActivityMessage;
|
|
22
|
+
data: string;
|
|
23
|
+
} | {
|
|
24
|
+
key: import("../messages/webMessages/unitMessages").UnitMessage.UNIT_REQUEST_CLOSE_FLOW;
|
|
25
|
+
data: {
|
|
26
|
+
[x: string]: never;
|
|
27
|
+
[x: number]: never;
|
|
28
|
+
[x: symbol]: never;
|
|
29
|
+
};
|
|
30
|
+
} | {
|
|
31
|
+
key: import("../messages/nativeMessages/bottomSheetMessage").BottomSheetNativeMessage;
|
|
32
|
+
data: import("../types/internal/bottomSheet.types").WebComponentRendering;
|
|
33
|
+
} | {
|
|
34
|
+
key: import("../messages/webMessages/unitMessages").UnitMessage.UNIT_REQUEST_REFRESH;
|
|
35
|
+
data: import("../messages/webMessages/unitMessages").RequestRefreshEvent;
|
|
36
|
+
}) | undefined;
|
|
37
|
+
};
|
|
38
|
+
}, import("redux").AnyAction, [import("@reduxjs/toolkit").ThunkMiddleware<{
|
|
39
|
+
wallet: import("../slices/pushProvisioningSlice").PushProvisioningState;
|
|
40
|
+
configuration: import("../slices/ConfigurationSlice").ConfigurationState;
|
|
41
|
+
sharedEvents: {
|
|
42
|
+
event?: ({
|
|
43
|
+
key: import("../messages/nativeMessages/bottomSheetMessage").BottomSheetNativeMessage;
|
|
44
|
+
data: import("../types/internal/bottomSheet.types").SlotRendering;
|
|
45
|
+
} | {
|
|
46
|
+
key: import("../messages/webMessages/cardMessage").CardMessage.CARD_STATUS_CHANGED;
|
|
47
|
+
data: import("..").UNCardData;
|
|
48
|
+
} | {
|
|
49
|
+
key: import("../messages/webMessages/cardMessage").CardMessage.CARD_ACTIVATED;
|
|
50
|
+
data: import("..").UNCardData;
|
|
51
|
+
} | {
|
|
52
|
+
key: import("../messages/webMessages/multipleCardsMessage").MultipleCardsMessage;
|
|
53
|
+
data: import("..").UNCardData;
|
|
54
|
+
} | {
|
|
55
|
+
key: import("../messages/webMessages/accountMessage").AccountMessage;
|
|
56
|
+
data: import("..").UNAccountData;
|
|
57
|
+
} | {
|
|
58
|
+
key: import("../messages/webMessages/activityMessage").ActivityMessage;
|
|
59
|
+
data: string;
|
|
60
|
+
} | {
|
|
61
|
+
key: import("../messages/webMessages/unitMessages").UnitMessage.UNIT_REQUEST_CLOSE_FLOW;
|
|
62
|
+
data: {
|
|
63
|
+
[x: string]: never;
|
|
64
|
+
[x: number]: never;
|
|
65
|
+
[x: symbol]: never;
|
|
66
|
+
};
|
|
67
|
+
} | {
|
|
68
|
+
key: import("../messages/nativeMessages/bottomSheetMessage").BottomSheetNativeMessage;
|
|
69
|
+
data: import("../types/internal/bottomSheet.types").WebComponentRendering;
|
|
70
|
+
} | {
|
|
71
|
+
key: import("../messages/webMessages/unitMessages").UnitMessage.UNIT_REQUEST_REFRESH;
|
|
72
|
+
data: import("../messages/webMessages/unitMessages").RequestRefreshEvent;
|
|
73
|
+
}) | undefined;
|
|
74
|
+
};
|
|
75
|
+
}, import("redux").AnyAction, undefined>]>;
|
|
76
|
+
export type RootState = ReturnType<typeof store.getState>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';
|
|
2
2
|
import type { UNAuthorizationData } from './authorization.types';
|
|
3
3
|
import type { UNTransactionData } from './transactions.types';
|
|
4
|
+
export declare const enum UNActivityComponentPaginationType {
|
|
5
|
+
infiniteScroll = "infiniteScroll",
|
|
6
|
+
pagination = "pagination"
|
|
7
|
+
}
|
|
4
8
|
export type UNActivityOnLoadData = {
|
|
5
|
-
[RESPONSE_KEYS.
|
|
9
|
+
[RESPONSE_KEYS.authorizations]: UNAuthorizationData;
|
|
6
10
|
[RESPONSE_KEYS.transactions]: UNTransactionData;
|
|
7
11
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type UNError = {
|
|
2
|
+
errors: UNErrorData[];
|
|
3
|
+
};
|
|
4
|
+
export type UNErrorData = {
|
|
5
|
+
status?: string;
|
|
6
|
+
title: string;
|
|
7
|
+
detail?: string;
|
|
8
|
+
details?: string;
|
|
9
|
+
meta?: UNErrorMeta;
|
|
10
|
+
code?: UNErrorCodes;
|
|
11
|
+
error?: Error;
|
|
12
|
+
};
|
|
13
|
+
interface UNErrorMeta {
|
|
14
|
+
meta: Record<string, string>;
|
|
15
|
+
}
|
|
16
|
+
export declare enum UNErrorCodes {
|
|
17
|
+
FEATURE_DISABLED = "feature_disabled",
|
|
18
|
+
INVALID_VALUE = "invalid_value",
|
|
19
|
+
LIMITS_EXCEEDED = "limits_exceeded",
|
|
20
|
+
NOT_FOUND = "not_found",
|
|
21
|
+
ACCOUNT_CUSTOMER_MISMATCH = "account_customer_mismatch",
|
|
22
|
+
NOT_SUPPORTED_FOR_ACCOUNT_STATUS = "not_supported_for_account_status",
|
|
23
|
+
NOT_SUPPORTED_FOR_ACCOUNT_TYPE = "not_supported_for_account_type",
|
|
24
|
+
NOT_SUPPORTED_FOR_CARD = "not_supported_for_card",
|
|
25
|
+
NOT_SUPPORTED_FOR_CARD_STATUS = "not_supported_for_card_status",
|
|
26
|
+
NOT_SUPPORTED_FOR_CARD_TYPE = "not_supported_for_card_type",
|
|
27
|
+
INVALID_NONCE = "invalid_nonce",
|
|
28
|
+
NOT_SUPPORTED_FOR_PAYMENT_TYPE = "not_supported_for_payment_type",
|
|
29
|
+
PAYMENT_INVALID = "payment_invalid",
|
|
30
|
+
UNAUTHORIZED = "unauthorized",
|
|
31
|
+
FORBIDDEN = "forbidden",
|
|
32
|
+
ALREADY_EXISTS = "already_exists",
|
|
33
|
+
CUSTOMER_NAME_UNDELIVERABLE = "customer_name_undeliverable",
|
|
34
|
+
CUSTOMER_ADDRESS_UNDELIVERABLE = "customer_address_undeliverable"
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fetchUnitScript: () => Promise<null>;
|
|
@@ -11,8 +11,6 @@ export declare class UnitSDK {
|
|
|
11
11
|
protected static env?: UNEnvironment;
|
|
12
12
|
protected static webVersioningStrategy: UNWebVersioningStrategy;
|
|
13
13
|
protected static customerToken?: string;
|
|
14
|
-
protected static theme?: string;
|
|
15
|
-
protected static language?: string;
|
|
16
14
|
protected static fonts?: UNFonts;
|
|
17
15
|
protected static signedNonce?: string;
|
|
18
16
|
protected static pushProvisionModule?: typeof NativeModules;
|
|
@@ -20,17 +18,15 @@ export declare class UnitSDK {
|
|
|
20
18
|
static setPushProvisioningModule: (pushProvisionModule: typeof NativeModules) => void;
|
|
21
19
|
static getPushProvisionModule: () => import("react-native").NativeModulesStatic | undefined;
|
|
22
20
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
* @deprecated - Unit SDK is managing the signedNonce, no need to provide it
|
|
22
|
+
*/
|
|
25
23
|
static setSignedNonce: (signedNonce: string) => void;
|
|
26
24
|
static getEnv: () => UNEnvironment | undefined;
|
|
27
25
|
static getWebVersioningStrategy: () => UNWebVersioningStrategy;
|
|
28
|
-
static getTheme: () => string | undefined;
|
|
29
|
-
static getLanguage: () => string | undefined;
|
|
30
26
|
static getFonts: () => UNFonts | undefined;
|
|
31
27
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
* @deprecated - Unit SDK is managing the signedNonce, no need to provide it
|
|
29
|
+
*/
|
|
34
30
|
static getSignedNonce: () => string | undefined;
|
|
35
31
|
static setCustomerToken: (customerToken: string) => void;
|
|
36
32
|
static getCustomerToken: () => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getSDKVersion: () => string;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import type { RequestDownloadEvent } from '../messages/webMessages/unitMessages';
|
|
2
|
+
export declare const getInfoParams: () => Promise<{
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
}>;
|
|
2
5
|
export declare const handleRequestDownload: (details: RequestDownloadEvent, onReadyToShare: () => void) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-unit-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Unit React Native components",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"react": "17.0.2",
|
|
64
64
|
"react-native": "0.68.2",
|
|
65
65
|
"react-native-builder-bob": "^0.18.3",
|
|
66
|
-
"react-native-webview": "
|
|
66
|
+
"react-native-webview": "^13.6.2",
|
|
67
67
|
"typescript": "^4.5.2"
|
|
68
68
|
},
|
|
69
69
|
"resolutions": {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@reduxjs/toolkit": "^1.9.5",
|
|
80
80
|
"axios": "^1.3.3",
|
|
81
81
|
"react-native-plaid-link-sdk": "^9.0.1",
|
|
82
|
-
"react-native-webview": "
|
|
82
|
+
"react-native-webview": "^13.6.2",
|
|
83
83
|
"react-redux": "^8.1.2"
|
|
84
84
|
},
|
|
85
85
|
"jest": {
|
|
@@ -11,7 +11,7 @@ import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessag
|
|
|
11
11
|
import { PlaidLinkTokenData, PlaidTokenCreatedEvent, RequestExternalSdkEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
12
12
|
import { LinkSuccess, openLink } from 'react-native-plaid-link-sdk';
|
|
13
13
|
import type WebView from 'react-native-webview';
|
|
14
|
-
import
|
|
14
|
+
import * as AppInfo from '../../utils/AppInfo';
|
|
15
15
|
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
16
16
|
import { withReduxStore } from '../../helpers/store/helpers';
|
|
17
17
|
|
|
@@ -38,7 +38,7 @@ const UNACHCreditComponent = (props: UNACHCreditComponentProps) => {
|
|
|
38
38
|
useEffect(() => {
|
|
39
39
|
const setPackageNameForAndroid = async () => {
|
|
40
40
|
if (Platform.OS === 'android') {
|
|
41
|
-
const packageName = await
|
|
41
|
+
const packageName = await AppInfo.getAppIdentifier();
|
|
42
42
|
setAppPackageName(packageName);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
@@ -12,7 +12,7 @@ import type WebView from 'react-native-webview';
|
|
|
12
12
|
import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
|
|
13
13
|
import type { ACHEvent } from '../../messages/webMessages/achCreditMessage';
|
|
14
14
|
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
15
|
-
import
|
|
15
|
+
import * as AppInfo from '../../utils/AppInfo';
|
|
16
16
|
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
17
17
|
import { withReduxStore } from '../../helpers/store/helpers';
|
|
18
18
|
|
|
@@ -38,7 +38,7 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
|
|
|
38
38
|
useEffect(() => {
|
|
39
39
|
const setPackageNameForAndroid = async () => {
|
|
40
40
|
if (Platform.OS === 'android') {
|
|
41
|
-
const packageName = await
|
|
41
|
+
const packageName = await AppInfo.getAppIdentifier();
|
|
42
42
|
setAppPackageName(packageName);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
@@ -3,20 +3,31 @@ import { View } from 'react-native';
|
|
|
3
3
|
import type WebView from 'react-native-webview';
|
|
4
4
|
import { HeightEvent, PageMessage } from '../..//messages/webMessages/pageMessage';
|
|
5
5
|
import { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
6
|
-
import EventBus from '../../helpers/EventBus';
|
|
7
6
|
import { WebComponent } from '../../webComponent/WebComponent';
|
|
8
7
|
import type { WebViewMessage } from '../../messages/webMessages';
|
|
9
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
getAccountParams,
|
|
10
|
+
getAccountScript,
|
|
11
|
+
injectOpenActionsMenuScript,
|
|
12
|
+
injectRefreshEventIfNeeded,
|
|
13
|
+
injectRequestAccountActionScript,
|
|
14
|
+
} from './UNAccountComponent.utils';
|
|
10
15
|
import type { UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';
|
|
11
|
-
import { useListenerToBus } from '../../hooks/listenerToBus';
|
|
12
16
|
import type { UNAccountData } from '../../types/shared/account.types';
|
|
13
17
|
import { AccountMessage } from '../../messages/webMessages/accountMessage';
|
|
14
18
|
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
15
19
|
import type { UNAccountMenuAction } from '../../types/shared';
|
|
16
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
BottomSheetRenderingType,
|
|
22
|
+
SlotRendering,
|
|
23
|
+
type BottomSheetSlotData,
|
|
24
|
+
} from '../../types/internal/bottomSheet.types';
|
|
17
25
|
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
18
26
|
import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
|
|
19
27
|
import { withReduxStoreAndRefForwarding } from '../../helpers/store/helpers';
|
|
28
|
+
import { useDispatch } from 'react-redux';
|
|
29
|
+
import { setEvent } from '../../slices/SharedEventsSlice';
|
|
30
|
+
import { useListenerToEvent } from '../../hooks/useListenerToEvent';
|
|
20
31
|
|
|
21
32
|
export interface UNAccountComponentProps {
|
|
22
33
|
// inputs
|
|
@@ -45,6 +56,8 @@ export enum UNAccountAction {
|
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProps>(function UNAccountComponent(props, accountRef) {
|
|
59
|
+
|
|
60
|
+
const dispatch = useDispatch();
|
|
48
61
|
const [height, setHeight] = useState(0);
|
|
49
62
|
|
|
50
63
|
const [requestRefreshEvent, setRequestRefreshEvent] = useState<RequestRefreshEvent | null>(null);
|
|
@@ -78,9 +91,8 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
|
|
|
78
91
|
console.error('On Load Error: unexpected response type.');
|
|
79
92
|
return;
|
|
80
93
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
useListenerToBus({ busEventKey: AccountMessage.UNIT_ACCOUNT_CHANGED, action: handleAccountChanged });
|
|
94
|
+
useListenerToEvent({ busEventKey: UnitMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
|
|
95
|
+
useListenerToEvent({ busEventKey: AccountMessage.UNIT_ACCOUNT_CHANGED, action: handleAccountChanged });
|
|
84
96
|
|
|
85
97
|
useEffect(() => {
|
|
86
98
|
injectRefreshEventIfNeeded(webRef.current, requestRefreshEvent);
|
|
@@ -92,7 +104,7 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
|
|
|
92
104
|
},
|
|
93
105
|
openAction(action: UNAccountMenuAction) {
|
|
94
106
|
injectRequestAccountActionScript(webRef.current, action);
|
|
95
|
-
}
|
|
107
|
+
},
|
|
96
108
|
}));
|
|
97
109
|
|
|
98
110
|
const handleMessage = (message: WebViewMessage) => {
|
|
@@ -104,15 +116,16 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
|
|
|
104
116
|
const slotData: BottomSheetSlotData = {
|
|
105
117
|
componentName: WebComponentType.account,
|
|
106
118
|
componentResourceId: props.accountId,
|
|
107
|
-
requestRenderingEvent: message.details as RequestRenderingEvent
|
|
119
|
+
requestRenderingEvent: message.details as RequestRenderingEvent,
|
|
108
120
|
};
|
|
109
121
|
|
|
110
|
-
const
|
|
122
|
+
const data = {
|
|
111
123
|
type: BottomSheetRenderingType.Slot,
|
|
112
|
-
data: slotData
|
|
124
|
+
data: slotData,
|
|
113
125
|
} as SlotRendering;
|
|
114
126
|
|
|
115
|
-
|
|
127
|
+
dispatch(setEvent({ key: BottomSheetNativeMessage.START_FLOW, data }));
|
|
128
|
+
|
|
116
129
|
break;
|
|
117
130
|
}
|
|
118
131
|
case PageMessage.PAGE_HEIGHT:
|