react-native-unit-components 1.6.1 → 1.7.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/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +6 -6
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +6 -6
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +12 -6
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js +3 -3
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +12 -6
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +2 -2
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +6 -6
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +159 -74
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +28 -8
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js +49 -37
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +20 -50
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js +4 -53
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js +6 -6
- package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
- package/lib/commonjs/flows/UNFlows.js +19 -0
- package/lib/commonjs/flows/UNFlows.js.map +1 -0
- package/lib/commonjs/flows/card/UNCardFlows.js +33 -0
- package/lib/commonjs/flows/card/UNCardFlows.js.map +1 -0
- package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js +70 -0
- package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -0
- package/lib/commonjs/helpers/pushProvisioningService/startProvisioning.js +22 -0
- package/lib/commonjs/helpers/pushProvisioningService/startProvisioning.js.map +1 -0
- package/lib/commonjs/index.js +4 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/messages/nativeMessages/bottomSheetMessage.js +17 -0
- package/lib/commonjs/messages/nativeMessages/bottomSheetMessage.js.map +1 -0
- package/lib/commonjs/messages/nativeMessages/cardMessage.js +2 -8
- package/lib/commonjs/messages/nativeMessages/cardMessage.js.map +1 -1
- package/lib/commonjs/messages/nativeMessages/index.js.map +1 -1
- package/lib/commonjs/messages/webMessages/accountMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/achCreditMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/bookPaymentMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/cardMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/checkMessage.js.map +1 -1
- 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/{components/UNCardComponent/networking → networking}/common/UNNetworkConstants.js +1 -1
- package/lib/commonjs/networking/common/UNNetworkConstants.js.map +1 -0
- package/lib/commonjs/{components/UNCardComponent/networking → networking}/requests/UNWalletPayloadRequest.js +3 -1
- package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js.map +1 -0
- package/lib/commonjs/scripts/html/bodyHtml.js +4 -10
- package/lib/commonjs/scripts/html/bodyHtml.js.map +1 -1
- package/lib/commonjs/types/internal/bottomSheet.types.js +14 -0
- package/lib/commonjs/types/internal/bottomSheet.types.js.map +1 -0
- package/lib/commonjs/types/internal/webComponent.types.js +27 -0
- package/lib/commonjs/types/internal/webComponent.types.js.map +1 -0
- package/lib/commonjs/types/shared/achCredit.types.js.map +1 -0
- package/lib/commonjs/types/shared/activity.types.js.map +1 -0
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js +20 -2
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/commonjs/unitSdkManager/unitUiManager/unitUiManager.js +21 -0
- package/lib/commonjs/unitSdkManager/unitUiManager/unitUiManager.js.map +1 -0
- package/lib/commonjs/webComponent/WebComponent.js +5 -16
- package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
- package/lib/commonjs/webComponent/html.js +3 -1
- package/lib/commonjs/webComponent/html.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 +10 -4
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js +10 -4
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +2 -2
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +159 -74
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +23 -6
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js +51 -39
- package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.js +20 -51
- package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js +1 -48
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
- package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js +2 -2
- package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
- package/lib/module/flows/UNFlows.js +12 -0
- package/lib/module/flows/UNFlows.js.map +1 -0
- package/lib/module/flows/card/UNCardFlows.js +25 -0
- package/lib/module/flows/card/UNCardFlows.js.map +1 -0
- package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js +63 -0
- package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -0
- package/lib/module/helpers/pushProvisioningService/startProvisioning.js +15 -0
- package/lib/module/helpers/pushProvisioningService/startProvisioning.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/messages/nativeMessages/bottomSheetMessage.js +9 -0
- package/lib/module/messages/nativeMessages/bottomSheetMessage.js.map +1 -0
- package/lib/module/messages/nativeMessages/cardMessage.js +1 -6
- package/lib/module/messages/nativeMessages/cardMessage.js.map +1 -1
- package/lib/module/messages/nativeMessages/index.js.map +1 -1
- package/lib/module/messages/webMessages/accountMessage.js.map +1 -1
- package/lib/module/messages/webMessages/achCreditMessage.js.map +1 -1
- package/lib/module/messages/webMessages/bookPaymentMessage.js.map +1 -1
- package/lib/module/messages/webMessages/cardMessage.js.map +1 -1
- package/lib/module/messages/webMessages/checkMessage.js.map +1 -1
- 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/{components/UNCardComponent/networking → networking}/common/UNNetworkConstants.js +1 -1
- package/lib/module/networking/common/UNNetworkConstants.js.map +1 -0
- package/lib/module/{components/UNCardComponent/networking → networking}/requests/UNWalletPayloadRequest.js +4 -1
- package/lib/module/networking/requests/UNWalletPayloadRequest.js.map +1 -0
- package/lib/module/scripts/html/bodyHtml.js +1 -6
- package/lib/module/scripts/html/bodyHtml.js.map +1 -1
- package/lib/module/types/internal/bottomSheet.types.js +7 -0
- package/lib/module/types/internal/bottomSheet.types.js.map +1 -0
- package/lib/module/types/internal/webComponent.types.js +19 -0
- package/lib/module/types/internal/webComponent.types.js.map +1 -0
- package/lib/module/types/shared/achCredit.types.js.map +1 -0
- package/lib/module/types/shared/activity.types.js.map +1 -0
- package/lib/module/unitSdkManager/UnitSdkManager.js +20 -2
- package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/module/unitSdkManager/unitUiManager/unitUiManager.js +14 -0
- package/lib/module/unitSdkManager/unitUiManager/unitUiManager.js.map +1 -0
- package/lib/module/webComponent/WebComponent.js +4 -14
- package/lib/module/webComponent/WebComponent.js.map +1 -1
- package/lib/module/webComponent/html.js +3 -1
- package/lib/module/webComponent/html.js.map +1 -1
- package/lib/typescript/components/UNACHCreditComponent/UNACHCreditComponent.d.ts +1 -1
- package/lib/typescript/components/UNACHDebitComponent/UNACHDebitComponent.d.ts +1 -1
- package/lib/typescript/components/UNAccountComponent/UNAccountComponent.d.ts +3 -3
- package/lib/typescript/components/UNAccountComponent/UNAccountComponent.utils.d.ts +1 -1
- package/lib/typescript/components/UNActivityComponent/UNActivityComponent.d.ts +2 -2
- package/lib/typescript/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +1 -1
- package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts +0 -7
- package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +5 -1
- package/lib/typescript/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.d.ts +6 -2
- package/lib/typescript/components/UNCardComponent/UNCardComponent.d.ts +1 -1
- package/lib/typescript/components/UNCardComponent/UNCardComponent.utils.d.ts +1 -9
- package/lib/typescript/components/UNCheckDepositComponent/UNCheckDepositComponent.d.ts +2 -2
- package/lib/typescript/flows/UNFlows.d.ts +4 -0
- package/lib/typescript/flows/card/UNCardFlows.d.ts +3 -0
- package/lib/typescript/helpers/pushProvisioningService/hooks/useCardWallet.d.ts +7 -0
- package/lib/typescript/helpers/pushProvisioningService/startProvisioning.d.ts +2 -0
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/messages/nativeMessages/bottomSheetMessage.d.ts +9 -0
- package/lib/typescript/messages/nativeMessages/cardMessage.d.ts +0 -16
- package/lib/typescript/messages/nativeMessages/index.d.ts +3 -3
- package/lib/typescript/messages/webMessages/accountMessage.d.ts +1 -1
- package/lib/typescript/messages/webMessages/achCreditMessage.d.ts +1 -1
- package/lib/typescript/messages/webMessages/bookPaymentMessage.d.ts +1 -1
- package/lib/typescript/messages/webMessages/cardMessage.d.ts +1 -1
- package/lib/typescript/messages/webMessages/checkMessage.d.ts +1 -1
- package/lib/typescript/messages/webMessages/onLoadMessage.d.ts +3 -3
- package/lib/typescript/messages/webMessages/unitMessages.d.ts +2 -1
- package/lib/typescript/{components/UNCardComponent/networking → networking}/requests/UNWalletPayloadRequest.d.ts +1 -1
- package/lib/typescript/scripts/html/bodyHtml.d.ts +1 -5
- package/lib/typescript/types/internal/bottomSheet.types.d.ts +35 -0
- package/lib/typescript/types/internal/webComponent.types.d.ts +16 -0
- package/lib/typescript/{sharedTypes → types/shared}/achCredit.types.d.ts +1 -1
- package/lib/typescript/{sharedTypes → types/shared}/activity.types.d.ts +1 -1
- package/lib/typescript/unitSdkManager/UnitSdkManager.d.ts +9 -0
- package/lib/typescript/unitSdkManager/unitUiManager/unitUiManager.d.ts +6 -0
- package/lib/typescript/webComponent/WebComponent.d.ts +2 -11
- package/lib/typescript/webComponent/html.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +3 -3
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +3 -3
- package/src/components/UNAccountComponent/UNAccountComponent.tsx +15 -8
- package/src/components/UNAccountComponent/UNAccountComponent.utils.ts +2 -2
- package/src/components/UNActivityComponent/UNActivityComponent.tsx +14 -7
- package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +1 -1
- package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +3 -3
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +151 -76
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.ts +24 -6
- package/src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.tsx +72 -41
- package/src/components/UNCardComponent/UNCardComponent.tsx +24 -54
- package/src/components/UNCardComponent/UNCardComponent.utils.ts +2 -49
- package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.tsx +4 -4
- package/src/flows/UNFlows.ts +13 -0
- package/src/flows/card/UNCardFlows.ts +25 -0
- package/src/helpers/pushProvisioningService/hooks/useCardWallet.ts +67 -0
- package/src/helpers/pushProvisioningService/startProvisioning.ts +20 -0
- package/src/index.tsx +1 -1
- package/src/messages/nativeMessages/bottomSheetMessage.ts +15 -0
- package/src/messages/nativeMessages/cardMessage.ts +1 -24
- package/src/messages/nativeMessages/index.ts +3 -3
- package/src/messages/webMessages/accountMessage.ts +1 -1
- package/src/messages/webMessages/achCreditMessage.ts +1 -1
- package/src/messages/webMessages/bookPaymentMessage.ts +1 -1
- package/src/messages/webMessages/cardMessage.ts +1 -1
- package/src/messages/webMessages/checkMessage.ts +1 -1
- package/src/messages/webMessages/onLoadMessage.ts +3 -3
- package/src/messages/webMessages/unitMessages.ts +3 -2
- package/src/{components/UNCardComponent/networking → networking}/common/UNNetworkConstants.ts +1 -1
- package/src/{components/UNCardComponent/networking → networking}/requests/UNWalletPayloadRequest.ts +3 -1
- package/src/scripts/html/bodyHtml.ts +2 -14
- package/src/types/internal/bottomSheet.types.ts +43 -0
- package/src/types/internal/webComponent.types.ts +26 -0
- package/src/{sharedTypes → types/shared}/achCredit.types.ts +1 -1
- package/src/{sharedTypes → types/shared}/activity.types.ts +1 -1
- package/src/unitSdkManager/UnitSdkManager.ts +28 -2
- package/src/unitSdkManager/unitUiManager/unitUiManager.ts +13 -0
- package/src/webComponent/WebComponent.tsx +7 -15
- package/src/webComponent/html.ts +3 -1
- package/lib/commonjs/components/UNCardComponent/networking/common/UNNetworkConstants.js.map +0 -1
- package/lib/commonjs/components/UNCardComponent/networking/requests/UNWalletPayloadRequest.js.map +0 -1
- package/lib/commonjs/sharedTypes/achCredit.types.js.map +0 -1
- package/lib/commonjs/sharedTypes/activity.types.js.map +0 -1
- package/lib/module/components/UNCardComponent/networking/common/UNNetworkConstants.js.map +0 -1
- package/lib/module/components/UNCardComponent/networking/requests/UNWalletPayloadRequest.js.map +0 -1
- package/lib/module/sharedTypes/achCredit.types.js.map +0 -1
- package/lib/module/sharedTypes/activity.types.js.map +0 -1
- /package/lib/commonjs/{sharedTypes → types/shared}/account.types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/account.types.js.map +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/achCredit.types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/activity.types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/authorization.types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/authorization.types.js.map +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/bookPayment.types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/bookPayment.types.js.map +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/card.types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/card.types.js.map +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/checkDeposit.types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/checkDeposit.types.js.map +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/index.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/index.js.map +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/onLoadResponse.types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/onLoadResponse.types.js.map +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/payments.types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/payments.types.js.map +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/transactions.types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/transactions.types.js.map +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/types.js.map +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/wallet.types.js +0 -0
- /package/lib/commonjs/{sharedTypes → types/shared}/wallet.types.js.map +0 -0
- /package/lib/module/{sharedTypes → types/shared}/account.types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/account.types.js.map +0 -0
- /package/lib/module/{sharedTypes → types/shared}/achCredit.types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/activity.types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/authorization.types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/authorization.types.js.map +0 -0
- /package/lib/module/{sharedTypes → types/shared}/bookPayment.types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/bookPayment.types.js.map +0 -0
- /package/lib/module/{sharedTypes → types/shared}/card.types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/card.types.js.map +0 -0
- /package/lib/module/{sharedTypes → types/shared}/checkDeposit.types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/checkDeposit.types.js.map +0 -0
- /package/lib/module/{sharedTypes → types/shared}/index.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/index.js.map +0 -0
- /package/lib/module/{sharedTypes → types/shared}/onLoadResponse.types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/onLoadResponse.types.js.map +0 -0
- /package/lib/module/{sharedTypes → types/shared}/payments.types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/payments.types.js.map +0 -0
- /package/lib/module/{sharedTypes → types/shared}/transactions.types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/transactions.types.js.map +0 -0
- /package/lib/module/{sharedTypes → types/shared}/types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/types.js.map +0 -0
- /package/lib/module/{sharedTypes → types/shared}/wallet.types.js +0 -0
- /package/lib/module/{sharedTypes → types/shared}/wallet.types.js.map +0 -0
- /package/lib/typescript/{components/UNCardComponent/networking → networking}/common/UNNetworkConstants.d.ts +0 -0
- /package/lib/typescript/{sharedTypes → types/shared}/account.types.d.ts +0 -0
- /package/lib/typescript/{sharedTypes → types/shared}/authorization.types.d.ts +0 -0
- /package/lib/typescript/{sharedTypes → types/shared}/bookPayment.types.d.ts +0 -0
- /package/lib/typescript/{sharedTypes → types/shared}/card.types.d.ts +0 -0
- /package/lib/typescript/{sharedTypes → types/shared}/checkDeposit.types.d.ts +0 -0
- /package/lib/typescript/{sharedTypes → types/shared}/index.d.ts +0 -0
- /package/lib/typescript/{sharedTypes → types/shared}/onLoadResponse.types.d.ts +0 -0
- /package/lib/typescript/{sharedTypes → types/shared}/payments.types.d.ts +0 -0
- /package/lib/typescript/{sharedTypes → types/shared}/transactions.types.d.ts +0 -0
- /package/lib/typescript/{sharedTypes → types/shared}/types.d.ts +0 -0
- /package/lib/typescript/{sharedTypes → types/shared}/wallet.types.d.ts +0 -0
- /package/src/{sharedTypes → types/shared}/account.types.ts +0 -0
- /package/src/{sharedTypes → types/shared}/authorization.types.ts +0 -0
- /package/src/{sharedTypes → types/shared}/bookPayment.types.ts +0 -0
- /package/src/{sharedTypes → types/shared}/card.types.ts +0 -0
- /package/src/{sharedTypes → types/shared}/checkDeposit.types.ts +0 -0
- /package/src/{sharedTypes → types/shared}/index.ts +0 -0
- /package/src/{sharedTypes → types/shared}/onLoadResponse.types.ts +0 -0
- /package/src/{sharedTypes → types/shared}/payments.types.ts +0 -0
- /package/src/{sharedTypes → types/shared}/transactions.types.ts +0 -0
- /package/src/{sharedTypes → types/shared}/types.ts +0 -0
- /package/src/{sharedTypes → types/shared}/wallet.types.ts +0 -0
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import { WebComponentType } from '../../webComponent/WebComponent';
|
|
2
|
-
import { RequestRenderingEvent } from '../../messages/webMessages/unitMessages';
|
|
3
1
|
export declare enum ScrollState {
|
|
4
2
|
onTop = "onTop",
|
|
5
3
|
unScrollable = "unScrollable",
|
|
6
4
|
onlyWebView = "webViewScroll",
|
|
7
5
|
onlyBottomSheet = "onlyBottomSheet"
|
|
8
6
|
}
|
|
9
|
-
export type BottomSheetSlotData = {
|
|
10
|
-
componentName?: WebComponentType;
|
|
11
|
-
componentResourceId?: string;
|
|
12
|
-
requestRenderingEvent: RequestRenderingEvent;
|
|
13
|
-
};
|
|
14
7
|
export declare const UNBottomSheetComponent: () => JSX.Element;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type WebView from 'react-native-webview';
|
|
2
2
|
import type { RequestRenderingEvent } from '../../messages/webMessages/unitMessages';
|
|
3
|
+
import type { BottomSheetSlotData, WebComponentData } from '../../types/internal/bottomSheet.types';
|
|
3
4
|
export declare const getBottomSheetScript: () => string;
|
|
4
5
|
export declare const renderingBottomSheetRequest: (currentWebView: WebView, renderingRequest: RequestRenderingEvent) => void;
|
|
5
6
|
export declare const resetHtml: (currentWebView: WebView) => void;
|
|
6
|
-
export declare const
|
|
7
|
+
export declare const injectHtmlFullScreenHeight: (currentWebView: WebView | null, bottomSheetHeight: number) => void;
|
|
8
|
+
export declare const isAddToWalletFromRequestRendering: (data: BottomSheetSlotData) => boolean;
|
|
9
|
+
export declare const isAddToWalletByComponentParams: (data: WebComponentData) => boolean;
|
|
10
|
+
export declare const extractCardIdFromComponentParams: (data: WebComponentData) => string | null;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type RequestRenderingEvent } from '../../../messages/webMessages/unitMessages';
|
|
2
|
+
import { BottomSheetRenderingType, WebComponentData } from '../../../types/internal/bottomSheet.types';
|
|
2
3
|
export interface UNAddToWalletBottomSheetItemProps {
|
|
4
|
+
renderingType: BottomSheetRenderingType;
|
|
3
5
|
renderingRequest?: RequestRenderingEvent;
|
|
4
|
-
|
|
6
|
+
webComponentData?: WebComponentData;
|
|
7
|
+
cardId: string;
|
|
8
|
+
fullScreenHeight: number;
|
|
5
9
|
}
|
|
6
10
|
export declare const UNAddToWalletBottomSheetItem: (props: UNAddToWalletBottomSheetItemProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { UNOnLoadResponse, UNCardData, UNCardMenuAction } from '../../
|
|
2
|
+
import type { UNOnLoadResponse, UNCardData, UNCardMenuAction } from '../../types/shared';
|
|
3
3
|
import type { NativeModules } from 'react-native';
|
|
4
4
|
export interface UNCardComponentProps {
|
|
5
5
|
cardId: string;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import type WebView from 'react-native-webview';
|
|
2
2
|
import type { UNCardComponentProps } from './UNCardComponent';
|
|
3
|
-
import type { NativeModules } from 'react-native';
|
|
4
|
-
import { UNWallet, UNWalletCode, UNWalletName } from '../../../src/sharedTypes/wallet.types';
|
|
5
3
|
import type { RequestRefreshEvent } from '../../messages/webMessages/unitMessages';
|
|
6
|
-
import type { UNCardMenuAction } from '../../
|
|
4
|
+
import type { UNCardMenuAction } from '../../types/shared';
|
|
7
5
|
export declare const getCardParams: (props: UNCardComponentProps) => string;
|
|
8
6
|
export declare const getCardScript: () => string;
|
|
9
7
|
export declare const injectOpenActionsMenuScript: (currentWeb: WebView | null) => void;
|
|
10
8
|
export declare const injectRequestCardActionScript: (currentWeb: WebView | null, action: UNCardMenuAction) => void;
|
|
11
9
|
export declare const injectRefreshEventIfNeeded: (currentWeb: WebView | null, requestRefreshEvent: RequestRefreshEvent | null, cardId: string) => void;
|
|
12
|
-
export declare const launchGetWallets: (customerToken: string, cardId: string, pushProvisioningModule: typeof NativeModules) => Promise<{
|
|
13
|
-
name: UNWalletName;
|
|
14
|
-
code: UNWalletCode;
|
|
15
|
-
status: any;
|
|
16
|
-
} | null | undefined>;
|
|
17
|
-
export declare const launchStartCardProvisioning: (pushProvisioningModule: typeof NativeModules, wallet: UNWallet | null) => Promise<any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UNCheckDepositData } from '../../
|
|
2
|
-
import type { UNAccountData, UNOnLoadResponse } from '../../
|
|
1
|
+
import type { UNCheckDepositData } from '../../types/shared/checkDeposit.types';
|
|
2
|
+
import type { UNAccountData, UNOnLoadResponse } from '../../types/shared';
|
|
3
3
|
export interface UNCheckDepositComponentProps {
|
|
4
4
|
accountId: string;
|
|
5
5
|
fee: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NativeComponentRendering, WebComponentRendering, SlotRendering } from '../../types/internal/bottomSheet.types';
|
|
2
|
+
export declare enum BottomSheetNativeMessage {
|
|
3
|
+
START_FLOW = "startBottomSheetFlow"
|
|
4
|
+
}
|
|
5
|
+
export declare enum CardAddToWalletErrors {
|
|
6
|
+
closedNativeWalletScreen = "VP_ERROR_302"
|
|
7
|
+
}
|
|
8
|
+
export type StartBottomSheetFlowMessage = SlotRendering | WebComponentRendering | NativeComponentRendering;
|
|
9
|
+
export type BottomSheetNativeEvent = StartBottomSheetFlowMessage;
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
import type { UNCardAddToWalletStatus } from '../../sharedTypes/wallet.types';
|
|
2
|
-
export declare enum CardNativeMessage {
|
|
3
|
-
CARD_GET_ADD_TO_WALLET_STATUS = "cardGetAddToWalletStatus",
|
|
4
|
-
CARD_UPDATE_ADD_TO_WALLET_STATUS = "cardUpdateAddToWalletStatus",
|
|
5
|
-
CARD_START_PUSH_PROVISIONING = "cardStartPushProvisioning"
|
|
6
|
-
}
|
|
7
1
|
export declare enum CardAddToWalletErrors {
|
|
8
2
|
closedNativeWalletScreen = "VP_ERROR_302"
|
|
9
3
|
}
|
|
10
|
-
export interface UNCardAddToWalletStatusEvent {
|
|
11
|
-
status: UNCardAddToWalletStatus;
|
|
12
|
-
}
|
|
13
|
-
export interface CardGetAddToWalletStatusEvent {
|
|
14
|
-
cardId: string;
|
|
15
|
-
}
|
|
16
|
-
export interface CardStartPushProvisioningEvent {
|
|
17
|
-
cardId: string;
|
|
18
|
-
}
|
|
19
|
-
export type CardNativeEvent = UNCardAddToWalletStatusEvent | CardGetAddToWalletStatusEvent | CardStartPushProvisioningEvent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BottomSheetNativeEvent, BottomSheetNativeMessage } from './bottomSheetMessage';
|
|
2
2
|
import type { SDKEvent, SDKMessage } from './sdkMessage';
|
|
3
|
-
export type NativeMessageType = SDKMessage |
|
|
4
|
-
export type NativeEvent =
|
|
3
|
+
export type NativeMessageType = SDKMessage | BottomSheetNativeMessage;
|
|
4
|
+
export type NativeEvent = SDKEvent | BottomSheetNativeEvent;
|
|
5
5
|
export interface NativeMessage {
|
|
6
6
|
type: NativeMessageType;
|
|
7
7
|
details?: NativeEvent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UNCheckDepositData } from '../../
|
|
1
|
+
import type { UNCheckDepositData } from '../../types/shared/checkDeposit.types';
|
|
2
2
|
export declare enum CheckMessage {
|
|
3
3
|
CHECK_DEPOSIT_CREATED = "unitCheckDepositCreated",
|
|
4
4
|
CHECK_DEPOSIT_RESTART_REQUEST = "unitCheckDepositRestartRequest"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { UNAccountData, UNCounterpartyAccountData, UNCardData, UNError, UNOnLoadResponseData } from '../../
|
|
2
|
-
import type { UNAuthorizationData } from '../../
|
|
3
|
-
import type { UNTransactionData } from '../../
|
|
1
|
+
import type { UNAccountData, UNCounterpartyAccountData, UNCardData, UNError, UNOnLoadResponseData } from '../../types/shared';
|
|
2
|
+
import type { UNAuthorizationData } from '../../types/shared/authorization.types';
|
|
3
|
+
import type { UNTransactionData } from '../../types/shared/transactions.types';
|
|
4
4
|
export declare enum RESPONSE_KEYS {
|
|
5
5
|
errors = "errors",
|
|
6
6
|
card = "cardResult",
|
|
@@ -8,7 +8,8 @@ export declare enum UnitMessage {
|
|
|
8
8
|
UNIT_REQUEST_DOWNLOAD = "unitRequestDownload",
|
|
9
9
|
UNIT_PLAID_TOKEN_CREATED = "unitPlaidLinkTokenCreated",
|
|
10
10
|
UNIT_REQUEST_EXTERNAL_SDK = "unitRequestExternalSdk",
|
|
11
|
-
UNIT_PLAID_RESPONSE = "unitPlaidResponse"
|
|
11
|
+
UNIT_PLAID_RESPONSE = "unitPlaidResponse",
|
|
12
|
+
PAGE_HEIGHT = "PAGE_HEIGHT"
|
|
12
13
|
}
|
|
13
14
|
export interface RequestRenderingEvent {
|
|
14
15
|
data: RequestRenderingEventData;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { UNEnvironment } from '
|
|
1
|
+
import { UNEnvironment } from '../../unitSdkManager/UnitSdkManager';
|
|
2
2
|
export declare const getMobileWalletPayload: (customerToken: string, cardId: string, env: UNEnvironment) => Promise<any>;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
+
import { PresentationMode } from '../../types/internal/webComponent.types';
|
|
1
2
|
export declare const webViewId = "webViewContainer";
|
|
2
|
-
export declare enum PresentationMode {
|
|
3
|
-
CoverInjectedHeight = "coverInjectedHeight",
|
|
4
|
-
Inherit = "inherit",
|
|
5
|
-
Default = "deafult"
|
|
6
|
-
}
|
|
7
3
|
export declare const getHtmlBody: (unitComponent: string, unitComponentProps?: string, presentationMode?: PresentationMode) => string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { RequestRenderingEvent } from '../../messages/webMessages/unitMessages';
|
|
2
|
+
import type { PresentationMode, WebComponentType } from './webComponent.types';
|
|
3
|
+
export declare enum BottomSheetRenderingType {
|
|
4
|
+
Slot = 0,
|
|
5
|
+
WebComponent = 1,
|
|
6
|
+
NativeComponent = 2
|
|
7
|
+
}
|
|
8
|
+
export type BottomSheetSlotData = {
|
|
9
|
+
componentName?: WebComponentType;
|
|
10
|
+
componentResourceId?: string;
|
|
11
|
+
requestRenderingEvent: RequestRenderingEvent;
|
|
12
|
+
};
|
|
13
|
+
export type WebComponentData = {
|
|
14
|
+
type: WebComponentType;
|
|
15
|
+
presentationMode?: PresentationMode;
|
|
16
|
+
params?: string;
|
|
17
|
+
theme?: string;
|
|
18
|
+
language?: string;
|
|
19
|
+
windowParams?: string;
|
|
20
|
+
};
|
|
21
|
+
export type NativeComponentData = {
|
|
22
|
+
component: React.ReactNode;
|
|
23
|
+
};
|
|
24
|
+
export interface SlotRendering {
|
|
25
|
+
type: BottomSheetRenderingType.Slot;
|
|
26
|
+
data: BottomSheetSlotData;
|
|
27
|
+
}
|
|
28
|
+
export interface WebComponentRendering {
|
|
29
|
+
type: BottomSheetRenderingType.WebComponent;
|
|
30
|
+
data: WebComponentData;
|
|
31
|
+
}
|
|
32
|
+
export interface NativeComponentRendering {
|
|
33
|
+
type: BottomSheetRenderingType.NativeComponent;
|
|
34
|
+
data: NativeComponentData;
|
|
35
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum WebComponentType {
|
|
2
|
+
card = "unit-elements-card",
|
|
3
|
+
bookPayment = "unit-elements-book-payment",
|
|
4
|
+
activity = "unit-elements-activity",
|
|
5
|
+
slot = "unit-elements-sdk-slot",
|
|
6
|
+
account = "unit-elements-account",
|
|
7
|
+
checkDeposit = "unit-elements-check-deposit",
|
|
8
|
+
achDebitPayment = "unit-elements-ach-debit-payment",
|
|
9
|
+
achCreditPayment = "unit-elements-ach-credit-payment",
|
|
10
|
+
cardAction = "unit-elements-card-action"
|
|
11
|
+
}
|
|
12
|
+
export declare enum PresentationMode {
|
|
13
|
+
CoverInjectedHeight = "coverInjectedHeight",
|
|
14
|
+
Inherit = "inherit",
|
|
15
|
+
Default = "deafult"
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RESPONSE_KEYS } from '
|
|
1
|
+
import type { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';
|
|
2
2
|
import type { UNAccountData, UNCounterpartyAccountData } from './account.types';
|
|
3
3
|
import type { UNAchCounterparty, UNCounterpartyVerificationMethod, UNPaymentStatus } from './payments.types';
|
|
4
4
|
import type { UNTags, UNRelationship } from './types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RESPONSE_KEYS } from '
|
|
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
4
|
export type UNActivityOnLoadData = {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { NativeModules } from 'react-native';
|
|
2
|
+
import { UnitUiManager } from './unitUiManager/unitUiManager';
|
|
1
3
|
export declare enum UNEnvironment {
|
|
2
4
|
sandbox = "sandbox",
|
|
3
5
|
production = "production"
|
|
@@ -8,13 +10,20 @@ export declare const UNIT_SCRIPT_URL: {
|
|
|
8
10
|
};
|
|
9
11
|
export declare class UnitSDK {
|
|
10
12
|
protected static env?: UNEnvironment;
|
|
13
|
+
protected static customerToken?: string;
|
|
11
14
|
protected static theme?: string;
|
|
12
15
|
protected static language?: string;
|
|
13
16
|
protected static signedNonce?: string;
|
|
17
|
+
protected static pushProvisionModule?: typeof NativeModules;
|
|
18
|
+
static ui: UnitUiManager;
|
|
14
19
|
static init: (env: UNEnvironment, theme?: string, language?: string) => Promise<void>;
|
|
20
|
+
static setPushProvisioningModule: (pushProvisionModule: typeof NativeModules) => void;
|
|
21
|
+
static getPushProvisionModule: () => import("react-native").NativeModulesStatic | undefined;
|
|
15
22
|
static setSignedNonce: (signedNonce: string) => void;
|
|
16
23
|
static getEnv: () => UNEnvironment | undefined;
|
|
17
24
|
static getTheme: () => string | undefined;
|
|
18
25
|
static getLanguage: () => string | undefined;
|
|
19
26
|
static getSignedNonce: () => string | undefined;
|
|
27
|
+
static setCustomerToken: (customerToken: string) => void;
|
|
28
|
+
static getCustomerToken: () => string | undefined;
|
|
20
29
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WebView } from 'react-native-webview';
|
|
3
|
-
import { PresentationMode } from '../scripts/html/bodyHtml';
|
|
4
3
|
import type { WebViewMessage } from '../messages/webMessages';
|
|
4
|
+
import type { PresentationMode, WebComponentType } from '../types/internal/webComponent.types';
|
|
5
5
|
export interface WebComponentProps {
|
|
6
6
|
type: WebComponentType;
|
|
7
7
|
presentationMode?: PresentationMode;
|
|
@@ -14,15 +14,6 @@ export interface WebComponentProps {
|
|
|
14
14
|
nestedScrollEnabled?: boolean;
|
|
15
15
|
handleScroll?: (event: any) => void;
|
|
16
16
|
width?: number;
|
|
17
|
-
|
|
18
|
-
export declare enum WebComponentType {
|
|
19
|
-
card = "unit-elements-card",
|
|
20
|
-
bookPayment = "unit-elements-book-payment",
|
|
21
|
-
activity = "unit-elements-activity",
|
|
22
|
-
slot = "unit-elements-sdk-slot",
|
|
23
|
-
account = "unit-elements-account",
|
|
24
|
-
checkDeposit = "unit-elements-check-deposit",
|
|
25
|
-
achDebitPayment = "unit-elements-ach-debit-payment",
|
|
26
|
-
achCreditPayment = "unit-elements-ach-credit-payment"
|
|
17
|
+
windowParams?: string;
|
|
27
18
|
}
|
|
28
19
|
export declare const WebComponent: React.ForwardRefExoticComponent<WebComponentProps & React.RefAttributes<WebView<{}>>>;
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
-
import { WebComponent
|
|
3
|
-
import { PresentationMode } from '../../scripts/html/bodyHtml';
|
|
2
|
+
import { WebComponent } from '../../webComponent/WebComponent';
|
|
4
3
|
import type { WebViewMessage } from '../../messages/webMessages';
|
|
5
|
-
import type { UNOnLoadResponse, UNACHData, UNACHOnLoadData, UNError, UNOnLoadResponseData } from '../../
|
|
4
|
+
import type { UNOnLoadResponse, UNACHData, UNACHOnLoadData, UNError, UNOnLoadResponseData } from '../../types/shared';
|
|
6
5
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
7
6
|
import { Platform, View } from 'react-native';
|
|
8
7
|
import { getACHCreditParams, getACHCreditScript, injectUnitPlaidResponse } from './UNACHCreditComponent.utils';
|
|
@@ -13,6 +12,7 @@ import { PlaidLinkTokenData, PlaidTokenCreatedEvent, RequestExternalSdkEvent, Un
|
|
|
13
12
|
import { LinkSuccess, openLink } from 'react-native-plaid-link-sdk';
|
|
14
13
|
import type WebView from 'react-native-webview';
|
|
15
14
|
import { getAndroidPackageName } from '../utils/nativeModulesInfo';
|
|
15
|
+
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
16
16
|
|
|
17
17
|
export interface UNACHCreditComponentProps {
|
|
18
18
|
accountId: string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { WebComponent
|
|
3
|
-
import { PresentationMode } from '../../scripts/html/bodyHtml';
|
|
2
|
+
import { WebComponent } from '../../webComponent/WebComponent';
|
|
4
3
|
import type { WebViewMessage } from '../../messages/webMessages';
|
|
5
|
-
import type { UNOnLoadResponse, UNACHData, UNError, UNOnLoadResponseData, UNACHOnLoadData } from '../../
|
|
4
|
+
import type { UNOnLoadResponse, UNACHData, UNError, UNOnLoadResponseData, UNACHOnLoadData } from '../../types/shared';
|
|
6
5
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
7
6
|
import { Platform, View } from 'react-native';
|
|
8
7
|
import { PlaidLinkTokenData, PlaidTokenCreatedEvent, RequestExternalSdkEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
@@ -14,6 +13,7 @@ import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
|
|
|
14
13
|
import type { ACHEvent } from '../../messages/webMessages/achCreditMessage';
|
|
15
14
|
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
16
15
|
import { getAndroidPackageName } from '../utils/nativeModulesInfo';
|
|
16
|
+
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
17
17
|
|
|
18
18
|
export interface UNACHDebitComponentProps {
|
|
19
19
|
accountId: string;
|
|
@@ -4,17 +4,18 @@ 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
6
|
import EventBus from '../../helpers/EventBus';
|
|
7
|
-
import { WebComponent
|
|
7
|
+
import { WebComponent } from '../../webComponent/WebComponent';
|
|
8
8
|
import type { WebViewMessage } from '../../messages/webMessages';
|
|
9
9
|
import { getAccountParams, getAccountScript, injectOpenActionsMenuScript, injectRefreshEventIfNeeded, injectRequestAccountActionScript } from './UNAccountComponent.utils';
|
|
10
|
-
import {
|
|
11
|
-
import type { BottomSheetSlotData } from '../UNBottomSheetComponent/UNBottomSheetComponent';
|
|
12
|
-
import type { UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../sharedTypes';
|
|
10
|
+
import type { UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';
|
|
13
11
|
import { useListenerToBus } from '../../hooks/listenerToBus';
|
|
14
|
-
import type { UNAccountData } from '../../
|
|
12
|
+
import type { UNAccountData } from '../../types/shared/account.types';
|
|
15
13
|
import { AccountMessage } from '../../messages/webMessages/accountMessage';
|
|
16
14
|
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
17
|
-
import type { UNAccountMenuAction } from '../../
|
|
15
|
+
import type { UNAccountMenuAction } from '../../types/shared';
|
|
16
|
+
import { BottomSheetRenderingType, SlotRendering, type BottomSheetSlotData } from '../../types/internal/bottomSheet.types';
|
|
17
|
+
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
18
|
+
import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
|
|
18
19
|
|
|
19
20
|
export interface UNAccountComponentProps {
|
|
20
21
|
// inputs
|
|
@@ -100,12 +101,18 @@ export const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountCompon
|
|
|
100
101
|
handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);
|
|
101
102
|
break;
|
|
102
103
|
case UnitMessage.UNIT_REQUEST_RENDERING: {
|
|
103
|
-
const
|
|
104
|
+
const slotData: BottomSheetSlotData = {
|
|
104
105
|
componentName: WebComponentType.account,
|
|
105
106
|
componentResourceId: props.accountId,
|
|
106
107
|
requestRenderingEvent: message.details as RequestRenderingEvent
|
|
107
108
|
};
|
|
108
|
-
|
|
109
|
+
|
|
110
|
+
const event = {
|
|
111
|
+
type: BottomSheetRenderingType.Slot,
|
|
112
|
+
data: slotData
|
|
113
|
+
} as SlotRendering;
|
|
114
|
+
|
|
115
|
+
EventBus.Instance.event(BottomSheetNativeMessage.START_FLOW, event);
|
|
109
116
|
break;
|
|
110
117
|
}
|
|
111
118
|
case PageMessage.PAGE_HEIGHT:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AccountAction, UNAccountComponentProps } from './UNAccountComponent';
|
|
2
2
|
import { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
3
3
|
import type WebView from 'react-native-webview';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import type { UNAccountMenuAction } from 'src/types/shared';
|
|
5
|
+
import { WebComponentType } from '../../types/internal/webComponent.types';
|
|
6
6
|
|
|
7
7
|
export const getAccountParams = (props: UNAccountComponentProps) => {
|
|
8
8
|
const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : '';
|
|
@@ -4,16 +4,17 @@ import { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../m
|
|
|
4
4
|
import { useListenerToBus } from '../../hooks/listenerToBus';
|
|
5
5
|
import type { WebViewMessage } from '../../messages/webMessages';
|
|
6
6
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import { WebComponent, WebComponentType } from '../../webComponent/WebComponent';
|
|
7
|
+
import type { UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';
|
|
8
|
+
import { WebComponent } from '../../webComponent/WebComponent';
|
|
10
9
|
import { getActivityParams, getActivityScript, injectFiltersChanged, injectRefreshEventIfNeeded } from './UNActivityComponent.utils';
|
|
11
10
|
import type WebView from 'react-native-webview';
|
|
12
|
-
import type { BottomSheetSlotData } from '../UNBottomSheetComponent/UNBottomSheetComponent';
|
|
13
11
|
import EventBus from '../../helpers/EventBus';
|
|
14
|
-
import type { UNActivityOnLoadData } from '../../
|
|
12
|
+
import type { UNActivityOnLoadData } from '../../types/shared/activity.types';
|
|
15
13
|
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
16
14
|
import { ActivityMessage } from '../../messages/webMessages/activityMessage';
|
|
15
|
+
import { BottomSheetRenderingType, type BottomSheetSlotData, type SlotRendering } from '../../types/internal/bottomSheet.types';
|
|
16
|
+
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
17
|
+
import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
|
|
17
18
|
|
|
18
19
|
const DEFAULT_HEIGHT = Dimensions.get('window').height * 0.5;
|
|
19
20
|
export interface UNActivityComponentProps {
|
|
@@ -75,12 +76,18 @@ export const UNActivityComponent = (props: UNActivityComponentProps) => {
|
|
|
75
76
|
const handleWebViewMessage = (message: WebViewMessage) => {
|
|
76
77
|
switch (message.type) {
|
|
77
78
|
case UnitMessage.UNIT_REQUEST_RENDERING: {
|
|
78
|
-
const
|
|
79
|
+
const slotData: BottomSheetSlotData = {
|
|
79
80
|
componentName: WebComponentType.activity,
|
|
80
81
|
componentResourceId: props.accountId,
|
|
81
82
|
requestRenderingEvent: message.details as RequestRenderingEvent
|
|
82
83
|
};
|
|
83
|
-
|
|
84
|
+
|
|
85
|
+
const event = {
|
|
86
|
+
type: BottomSheetRenderingType.Slot,
|
|
87
|
+
data: slotData
|
|
88
|
+
} as SlotRendering;
|
|
89
|
+
|
|
90
|
+
EventBus.Instance.event(BottomSheetNativeMessage.START_FLOW, event);
|
|
84
91
|
break;
|
|
85
92
|
}
|
|
86
93
|
case UnitMessage.UNIT_ON_LOAD:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { WebComponentType } from './../../webComponent/WebComponent';
|
|
2
1
|
import type { RequestRefreshEvent } from './../../messages/webMessages/unitMessages';
|
|
3
2
|
import type { WebView } from 'react-native-webview';
|
|
4
3
|
import { DISPATCH_REQUEST_REFRESH } from './../../scripts/html/bodyScript';
|
|
5
4
|
import type { UNActivityComponentProps } from './UNActivityComponent';
|
|
5
|
+
import { WebComponentType } from '../../types/internal/webComponent.types';
|
|
6
6
|
|
|
7
7
|
export const getActivityParams = (props: UNActivityComponentProps) => {
|
|
8
8
|
const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : '';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { WebComponent
|
|
3
|
-
import { PresentationMode } from '../../scripts/html/bodyHtml';
|
|
2
|
+
import { WebComponent } from '../../webComponent/WebComponent';
|
|
4
3
|
import { getBookPaymentParams, getBookPaymentScript } from './UNBookPaymentComponent.utils';
|
|
5
4
|
import type { WebViewMessage } from '../../messages/webMessages';
|
|
6
|
-
import type { UNOnLoadResponse, UNBookPaymentData, UNError, UNAccountData, UNOnLoadResponseData } from '../../
|
|
5
|
+
import type { UNOnLoadResponse, UNBookPaymentData, UNError, UNAccountData, UNOnLoadResponseData } from '../../types/shared';
|
|
7
6
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
8
7
|
import { View } from 'react-native';
|
|
9
8
|
import { UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
10
9
|
import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
|
|
11
10
|
import type { BookPaymentEvent } from '../../messages/webMessages/bookPaymentMessage';
|
|
12
11
|
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
12
|
+
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
13
13
|
|
|
14
14
|
export interface UNBookPaymentComponentProps {
|
|
15
15
|
//inputs
|