react-native-unit-components 1.8.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 +6 -4
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +1 -0
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNACHCreditComponent/index.js +21 -0
- package/lib/commonjs/components/UNACHCreditComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +6 -4
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +1 -0
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/index.js +21 -0
- package/lib/commonjs/components/UNACHDebitComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +21 -15
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/index.js +27 -0
- package/lib/commonjs/components/UNAccountComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +17 -11
- 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/UNActivityComponent/index.js +21 -0
- package/lib/commonjs/components/UNActivityComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +4 -2
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/commonjs/components/UNBookPaymentComponent/index.js +21 -0
- package/lib/commonjs/components/UNBookPaymentComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +29 -13
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.js → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js} +16 -11
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js.map +1 -0
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js +17 -0
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js.map +1 -0
- package/lib/commonjs/components/UNBottomSheetComponent/components/index.js +17 -0
- package/lib/commonjs/components/UNBottomSheetComponent/components/index.js.map +1 -0
- package/lib/commonjs/components/UNBottomSheetComponent/index.js +14 -0
- package/lib/commonjs/components/UNBottomSheetComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +34 -10
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js +9 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/index.js +27 -0
- package/lib/commonjs/components/UNCardComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js +4 -2
- package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
- package/lib/commonjs/components/UNCheckDepositComponent/index.js +21 -0
- package/lib/commonjs/components/UNCheckDepositComponent/index.js.map +1 -0
- 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 +19 -8
- 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 +49 -3
- package/lib/commonjs/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
- package/lib/commonjs/helpers/pushProvisioningService/hooks/useLaunchInitialize.js +33 -0
- package/lib/commonjs/helpers/pushProvisioningService/hooks/useLaunchInitialize.js.map +1 -0
- package/lib/commonjs/helpers/pushProvisioningService/types.js +41 -0
- package/lib/commonjs/helpers/pushProvisioningService/types.js.map +1 -0
- package/lib/commonjs/helpers/store/helpers.js +29 -0
- package/lib/commonjs/helpers/store/helpers.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 +30 -6
- package/lib/commonjs/networking/requests/UNWalletPayloadRequest.js.map +1 -1
- package/lib/commonjs/scripts/html/bodyScript.js +13 -1
- package/lib/commonjs/scripts/html/bodyScript.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/slices/pushProvisioningSlice.js +28 -0
- package/lib/commonjs/slices/pushProvisioningSlice.js.map +1 -0
- package/lib/commonjs/store/index.js +17 -0
- package/lib/commonjs/store/index.js.map +1 -0
- package/lib/commonjs/store/store.js +20 -0
- package/lib/commonjs/store/store.js.map +1 -0
- 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 +33 -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/types/shared/versioning.types.js +14 -0
- package/lib/commonjs/types/shared/versioning.types.js.map +1 -0
- package/lib/commonjs/unitSdkManager/UnitSdk.api.js +9 -14
- package/lib/commonjs/unitSdkManager/UnitSdk.api.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js +17 -0
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js.map +1 -0
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js +21 -22
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js +19 -0
- package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -0
- 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/utils/webVersioningStrategy.utils.js +58 -0
- package/lib/commonjs/utils/webVersioningStrategy.utils.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/commonjs/webComponent/html.js +4 -0
- package/lib/commonjs/webComponent/html.js.map +1 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +5 -3
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +1 -0
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
- package/lib/module/components/UNACHCreditComponent/index.js +2 -0
- package/lib/module/components/UNACHCreditComponent/index.js.map +1 -0
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +5 -3
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +1 -0
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
- package/lib/module/components/UNACHDebitComponent/index.js +2 -0
- package/lib/module/components/UNACHDebitComponent/index.js.map +1 -0
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js +19 -12
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js +2 -2
- package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
- package/lib/module/components/UNAccountComponent/index.js +2 -0
- package/lib/module/components/UNAccountComponent/index.js.map +1 -0
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js +16 -9
- 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/UNActivityComponent/index.js +2 -0
- package/lib/module/components/UNActivityComponent/index.js.map +1 -0
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +3 -1
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/module/components/UNBookPaymentComponent/index.js +2 -0
- package/lib/module/components/UNBookPaymentComponent/index.js.map +1 -0
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +29 -13
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.js → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js} +16 -11
- package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.js.map +1 -0
- package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js +2 -0
- package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.js.map +1 -0
- package/lib/module/components/UNBottomSheetComponent/components/index.js +2 -0
- package/lib/module/components/UNBottomSheetComponent/components/index.js.map +1 -0
- package/lib/module/components/UNBottomSheetComponent/index.js +2 -0
- package/lib/module/components/UNBottomSheetComponent/index.js.map +1 -0
- package/lib/module/components/UNCardComponent/UNCardComponent.js +34 -9
- package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js +6 -0
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
- package/lib/module/components/UNCardComponent/index.js +2 -0
- package/lib/module/components/UNCardComponent/index.js.map +1 -0
- package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js +3 -1
- package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
- package/lib/module/components/UNCheckDepositComponent/index.js +2 -0
- package/lib/module/components/UNCheckDepositComponent/index.js.map +1 -0
- 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 +9 -8
- 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 +50 -4
- package/lib/module/helpers/pushProvisioningService/hooks/useCardWallet.js.map +1 -1
- package/lib/module/helpers/pushProvisioningService/hooks/useLaunchInitialize.js +26 -0
- package/lib/module/helpers/pushProvisioningService/hooks/useLaunchInitialize.js.map +1 -0
- package/lib/module/helpers/pushProvisioningService/types.js +34 -0
- package/lib/module/helpers/pushProvisioningService/types.js.map +1 -0
- package/lib/module/helpers/store/helpers.js +20 -0
- package/lib/module/helpers/store/helpers.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 +29 -6
- package/lib/module/networking/requests/UNWalletPayloadRequest.js.map +1 -1
- package/lib/module/scripts/html/bodyScript.js +10 -0
- package/lib/module/scripts/html/bodyScript.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/slices/pushProvisioningSlice.js +19 -0
- package/lib/module/slices/pushProvisioningSlice.js.map +1 -0
- package/lib/module/store/index.js +2 -0
- package/lib/module/store/index.js.map +1 -0
- package/lib/module/store/store.js +12 -0
- package/lib/module/store/store.js.map +1 -0
- 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 +3 -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/types/shared/versioning.types.js +7 -0
- package/lib/module/types/shared/versioning.types.js.map +1 -0
- package/lib/module/unitSdkManager/UnitSdk.api.js +9 -12
- package/lib/module/unitSdkManager/UnitSdk.api.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdk.constants.js +10 -0
- package/lib/module/unitSdkManager/UnitSdk.constants.js.map +1 -0
- package/lib/module/unitSdkManager/UnitSdkManager.js +20 -19
- package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js +12 -0
- package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -0
- 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/utils/webVersioningStrategy.utils.js +48 -0
- package/lib/module/utils/webVersioningStrategy.utils.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/module/webComponent/html.js +5 -1
- package/lib/module/webComponent/html.js.map +1 -1
- package/lib/typescript/{components → src/components}/UNACHCreditComponent/UNACHCreditComponent.d.ts +3 -1
- package/lib/typescript/src/components/UNACHCreditComponent/index.d.ts +1 -0
- package/lib/typescript/{components → src/components}/UNACHDebitComponent/UNACHDebitComponent.d.ts +3 -1
- package/lib/typescript/src/components/UNACHDebitComponent/index.d.ts +1 -0
- package/lib/typescript/{components → src/components}/UNAccountComponent/UNAccountComponent.d.ts +3 -2
- package/lib/typescript/{components → src/components}/UNAccountComponent/UNAccountComponent.utils.d.ts +2 -2
- package/lib/typescript/src/components/UNAccountComponent/index.d.ts +1 -0
- package/lib/typescript/{components → src/components}/UNActivityComponent/UNActivityComponent.d.ts +5 -1
- package/lib/typescript/src/components/UNActivityComponent/index.d.ts +1 -0
- package/lib/typescript/{components → src/components}/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +2 -1
- package/lib/typescript/src/components/UNBookPaymentComponent/index.d.ts +1 -0
- package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.d.ts +2 -1
- package/lib/typescript/{components/UNBottomSheetComponent/components → src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem}/UNAddToWalletBottomSheetItem.d.ts +2 -2
- package/lib/typescript/src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.d.ts +1 -0
- package/lib/typescript/src/components/UNBottomSheetComponent/components/index.d.ts +1 -0
- package/lib/typescript/src/components/UNBottomSheetComponent/index.d.ts +1 -0
- package/lib/typescript/{components → src/components}/UNCardComponent/UNCardComponent.d.ts +4 -1
- package/lib/typescript/{components → src/components}/UNCardComponent/UNCardComponent.utils.d.ts +2 -0
- package/lib/typescript/src/components/UNCardComponent/index.d.ts +1 -0
- package/lib/typescript/{components → src/components}/UNCheckDepositComponent/UNCheckDepositComponent.d.ts +2 -1
- package/lib/typescript/src/components/UNCheckDepositComponent/index.d.ts +1 -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/src/components/index.d.ts +9 -0
- package/lib/typescript/src/helpers/pushProvisioningService/helpers.d.ts +4 -0
- package/lib/typescript/src/helpers/pushProvisioningService/hooks/useLaunchInitialize.d.ts +3 -0
- package/lib/typescript/src/helpers/pushProvisioningService/types.d.ts +49 -0
- package/lib/typescript/src/helpers/store/helpers.d.ts +3 -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/src/networking/requests/UNWalletPayloadRequest.d.ts +2 -0
- package/lib/typescript/{scripts → src/scripts}/html/bodyScript.d.ts +2 -0
- package/lib/typescript/src/slices/ConfigurationSlice.d.ts +10 -0
- package/lib/typescript/src/slices/SharedEventsSlice.d.ts +56 -0
- package/lib/typescript/src/slices/pushProvisioningSlice.d.ts +8 -0
- package/lib/typescript/src/store/index.d.ts +1 -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 +3 -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/types/shared/versioning.types.d.ts +22 -0
- package/lib/typescript/src/unitSdkManager/UnitSdk.api.d.ts +1 -0
- package/lib/typescript/src/unitSdkManager/UnitSdk.constants.d.ts +8 -0
- package/lib/typescript/{unitSdkManager → src/unitSdkManager}/UnitSdkManager.d.ts +11 -10
- package/lib/typescript/src/unitSdkManager/UnitSdkManager.utils.internal.d.ts +3 -0
- package/lib/typescript/src/utils/AppInfo.d.ts +4 -0
- package/lib/typescript/src/utils/SDKInfo.d.ts +1 -0
- package/lib/typescript/src/utils/webVersioningStrategy.utils.d.ts +5 -0
- package/lib/typescript/{webComponent → src/webComponent}/WebComponent.utils.d.ts +3 -0
- package/package.json +8 -6
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +7 -3
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.ts +1 -0
- package/src/components/UNACHCreditComponent/index.ts +1 -0
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +7 -3
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.ts +1 -0
- package/src/components/UNACHDebitComponent/index.ts +1 -0
- package/src/components/UNAccountComponent/UNAccountComponent.tsx +30 -14
- package/src/components/UNAccountComponent/UNAccountComponent.utils.ts +2 -2
- package/src/components/UNAccountComponent/index.ts +1 -0
- package/src/components/UNActivityComponent/UNActivityComponent.tsx +37 -17
- package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +4 -1
- package/src/components/UNActivityComponent/index.ts +1 -0
- package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +4 -1
- package/src/components/UNBookPaymentComponent/index.ts +1 -0
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +59 -32
- package/src/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.tsx → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.tsx} +18 -13
- package/src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem/index.ts +1 -0
- package/src/components/UNBottomSheetComponent/components/index.ts +1 -0
- package/src/components/UNBottomSheetComponent/index.ts +1 -0
- package/src/components/UNCardComponent/UNCardComponent.tsx +51 -14
- package/src/components/UNCardComponent/UNCardComponent.utils.ts +7 -0
- package/src/components/UNCardComponent/index.ts +1 -0
- package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.tsx +4 -1
- package/src/components/UNCheckDepositComponent/index.ts +1 -0
- 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 +9 -8
- package/src/flows/card/UNCardFlows.ts +10 -4
- package/src/helpers/pushProvisioningService/helpers.ts +31 -0
- package/src/helpers/pushProvisioningService/hooks/useCardWallet.ts +46 -7
- package/src/helpers/pushProvisioningService/hooks/useLaunchInitialize.ts +29 -0
- package/src/helpers/pushProvisioningService/types.ts +52 -0
- package/src/helpers/store/helpers.tsx +22 -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 +30 -7
- package/src/scripts/html/bodyScript.ts +13 -1
- package/src/slices/ConfigurationSlice.ts +31 -0
- package/src/slices/SharedEventsSlice.ts +93 -0
- package/src/slices/pushProvisioningSlice.ts +24 -0
- package/src/store/index.ts +1 -0
- package/src/store/store.ts +14 -0
- 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 +3 -0
- package/src/types/shared/multipleCards.types.ts +8 -0
- package/src/types/shared/onLoadResponse.types.ts +2 -12
- package/src/types/shared/versioning.types.ts +28 -0
- package/src/unitSdkManager/UnitSdk.api.ts +10 -10
- package/src/unitSdkManager/UnitSdk.constants.ts +11 -0
- package/src/unitSdkManager/UnitSdkManager.ts +21 -24
- package/src/unitSdkManager/UnitSdkManager.utils.internal.ts +13 -0
- package/src/utils/AppInfo.ts +40 -0
- package/src/utils/SDKInfo.ts +5 -0
- package/src/utils/webVersioningStrategy.utils.ts +52 -0
- package/src/webComponent/WebComponent.tsx +37 -34
- package/src/webComponent/WebComponent.utils.ts +17 -0
- package/src/webComponent/html.ts +16 -2
- package/android/src/main/java/com/unitreactnativecomponents/getapplicationid/UNAppInfoModule.kt +0 -35
- package/ios/UNAppInfo/UNAppInfo.swift +0 -23
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js.map +0 -1
- 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/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.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/index.d.ts +0 -8
- 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/networking/requests/UNWalletPayloadRequest.d.ts +0 -2
- 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/commonjs/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.styles.js → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.js} +0 -0
- /package/lib/commonjs/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.styles.js.map → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.js.map} +0 -0
- /package/lib/module/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.styles.js → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.js} +0 -0
- /package/lib/module/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.styles.js.map → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.js.map} +0 -0
- /package/lib/typescript/{assets → src/assets}/images/index.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNACHDebitComponent/UNACHDebitComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNActivityComponent/UNActivityComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBookPaymentComponent/UNBookPaymentComponent.utils.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.styles.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +0 -0
- /package/lib/typescript/{components/UNBottomSheetComponent/components → src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem}/UNAddToWalletBottomSheetItem.styles.d.ts +0 -0
- /package/lib/typescript/{components → src/components}/UNCheckDepositComponent/UNCheckDepositComponent.utils.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/startProvisioning.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/fontFaces.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/wallet.types.d.ts +0 -0
- /package/lib/typescript/{unitSdkManager → src/unitSdkManager}/unitUiManager/unitUiManager.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/src/components/UNBottomSheetComponent/components/{UNAddToWalletBottomSheetItem.styles.ts → UNAddToWalletBottomSheetItem/UNAddToWalletBottomSheetItem.styles.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_bodyScript","require","_webComponent","getCardParams","props","cardId","customerToken","pushProvisioningModule","hideActionsMenuButton","hideCardTitle","hideSensitiveDataButton","learnMoreUrl","exports","getCardScript","DISPATCH_REQUEST_REFRESH","injectOpenActionsMenuScript","currentWeb","injectJavaScript","WebComponentType","card","injectRequestCardActionScript","action","injectRefreshEventIfNeeded","requestRefreshEvent","dependencies","includes","valueOf","resourceId","JSON","stringify"],"sources":["UNCardComponent.utils.ts"],"sourcesContent":["import { DISPATCH_REQUEST_REFRESH } from './../../scripts/html/bodyScript';\nimport type WebView from 'react-native-webview';\nimport type { UNCardComponentProps } from './UNCardComponent';\nimport type { RequestRefreshEvent } from '../../messages/webMessages/unitMessages';\nimport type { UNCardMenuAction } from '../../types/shared';\nimport { WebComponentType } from '../../types/internal/webComponent.types';\n\nexport const getCardParams = (props: UNCardComponentProps) => {\n return `\n card-id=\"${props.cardId}\"\n customer-token=\"${props.customerToken}\"\n enable-mobile-wallet=\"${!!props.pushProvisioningModule}\"\n hide-actions-menu-button=\"${props.hideActionsMenuButton || false}\"\n hide-card-title=\"${props.hideCardTitle || false}\"\n hide-sensitive-data-button=\"${props.hideSensitiveDataButton || false}\"\n learn-more-url=\"${props.learnMoreUrl || ''}\"\n `;\n};\n\nexport const getCardScript = () => {\n return DISPATCH_REQUEST_REFRESH;\n};\n\nexport const injectOpenActionsMenuScript = (currentWeb: WebView | null) => {\n currentWeb?.injectJavaScript(`dispatchOpenActionsMenu('${WebComponentType.card}')`);\n};\n\nexport const injectRequestCardActionScript = (currentWeb: WebView | null, action: UNCardMenuAction) => {\n currentWeb?.injectJavaScript(`dispatchRequestCardAction('${action}')`);\n};\n\nexport const injectRefreshEventIfNeeded = (currentWeb: WebView | null, requestRefreshEvent: RequestRefreshEvent | null, cardId: string) => {\n if (requestRefreshEvent && requestRefreshEvent.dependencies.includes(WebComponentType.card.valueOf()) && requestRefreshEvent.resourceId == cardId) {\n currentWeb?.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAD,OAAA;AAEO,MAAME,aAAa,GAAIC,KAA2B,IAAK;EAC5D,OAAQ;AACV,eAAeA,KAAK,CAACC,MAAO;AAC5B,sBAAsBD,KAAK,CAACE,aAAc;AAC1C,4BAA4B,CAAC,CAACF,KAAK,CAACG,sBAAuB;AAC3D,gCAAgCH,KAAK,CAACI,qBAAqB,IAAI,KAAM;AACrE,uBAAuBJ,KAAK,CAACK,aAAa,IAAI,KAAM;AACpD,kCAAkCL,KAAK,CAACM,uBAAuB,IAAI,KAAM;AACzE,sBAAsBN,KAAK,CAACO,YAAY,IAAI,EAAG;AAC/C,GAAG;AACH,CAAC;AAACC,OAAA,CAAAT,aAAA,GAAAA,aAAA;AAEK,MAAMU,aAAa,GAAGA,CAAA,KAAM;EACjC,OAAOC,oCAAwB;AACjC,CAAC;AAACF,OAAA,CAAAC,aAAA,GAAAA,aAAA;AAEK,MAAME,2BAA2B,GAAIC,UAA0B,IAAK;EACzEA,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,gBAAgB,CAAE,4BAA2BC,8BAAgB,CAACC,IAAK,IAAG,CAAC;AACrF,CAAC;AAACP,OAAA,CAAAG,2BAAA,GAAAA,2BAAA;AAEK,MAAMK,6BAA6B,GAAGA,CAACJ,UAA0B,EAAEK,MAAwB,KAAK;EACrGL,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,gBAAgB,CAAE,8BAA6BI,MAAO,IAAG,CAAC;AACxE,CAAC;AAACT,OAAA,CAAAQ,6BAAA,GAAAA,6BAAA;AAEK,MAAME,0BAA0B,GAAGA,
|
|
1
|
+
{"version":3,"names":["_bodyScript","require","_webComponent","getCardParams","props","cardId","customerToken","pushProvisioningModule","hideActionsMenuButton","hideCardTitle","hideSensitiveDataButton","learnMoreUrl","exports","getCardScript","DISPATCH_REQUEST_REFRESH","injectOpenActionsMenuScript","currentWeb","injectJavaScript","WebComponentType","card","injectRequestCardActionScript","action","injectRequestHideSensitiveDataScript","injectRequestShowSensitiveDataScript","injectRefreshEventIfNeeded","requestRefreshEvent","dependencies","includes","valueOf","resourceId","JSON","stringify"],"sources":["UNCardComponent.utils.ts"],"sourcesContent":["import { DISPATCH_REQUEST_REFRESH } from './../../scripts/html/bodyScript';\nimport type WebView from 'react-native-webview';\nimport type { UNCardComponentProps } from './UNCardComponent';\nimport type { RequestRefreshEvent } from '../../messages/webMessages/unitMessages';\nimport type { UNCardMenuAction } from '../../types/shared';\nimport { WebComponentType } from '../../types/internal/webComponent.types';\n\nexport const getCardParams = (props: UNCardComponentProps) => {\n return `\n card-id=\"${props.cardId}\"\n customer-token=\"${props.customerToken}\"\n enable-mobile-wallet=\"${!!props.pushProvisioningModule}\"\n hide-actions-menu-button=\"${props.hideActionsMenuButton || false}\"\n hide-card-title=\"${props.hideCardTitle || false}\"\n hide-sensitive-data-button=\"${props.hideSensitiveDataButton || false}\"\n learn-more-url=\"${props.learnMoreUrl || ''}\"\n `;\n};\n\nexport const getCardScript = () => {\n return DISPATCH_REQUEST_REFRESH;\n};\n\nexport const injectOpenActionsMenuScript = (currentWeb: WebView | null) => {\n currentWeb?.injectJavaScript(`dispatchOpenActionsMenu('${WebComponentType.card}')`);\n};\n\nexport const injectRequestCardActionScript = (currentWeb: WebView | null, action: UNCardMenuAction) => {\n currentWeb?.injectJavaScript(`dispatchRequestCardAction('${action}')`);\n};\n\nexport const injectRequestHideSensitiveDataScript = (currentWeb: WebView | null) => {\n currentWeb?.injectJavaScript(`dispatchRequestHideSensitiveData('${WebComponentType.card}')`);\n};\n\nexport const injectRequestShowSensitiveDataScript = (currentWeb: WebView | null) => {\n currentWeb?.injectJavaScript(`dispatchRequestShowSensitiveData('${WebComponentType.card}')`);\n};\nexport const injectRefreshEventIfNeeded = (currentWeb: WebView | null, requestRefreshEvent: RequestRefreshEvent | null, cardId: string) => {\n if (requestRefreshEvent && requestRefreshEvent.dependencies.includes(WebComponentType.card.valueOf()) && requestRefreshEvent.resourceId == cardId) {\n currentWeb?.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAD,OAAA;AAEO,MAAME,aAAa,GAAIC,KAA2B,IAAK;EAC5D,OAAQ;AACV,eAAeA,KAAK,CAACC,MAAO;AAC5B,sBAAsBD,KAAK,CAACE,aAAc;AAC1C,4BAA4B,CAAC,CAACF,KAAK,CAACG,sBAAuB;AAC3D,gCAAgCH,KAAK,CAACI,qBAAqB,IAAI,KAAM;AACrE,uBAAuBJ,KAAK,CAACK,aAAa,IAAI,KAAM;AACpD,kCAAkCL,KAAK,CAACM,uBAAuB,IAAI,KAAM;AACzE,sB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AU,IAAIxB,MAAM,EAAE;IACjJW,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,gBAAgB,CAAE,yBAAwBa,IAAI,CAACC,SAAS,CAACN,mBAAmB,CAAE,IAAG,CAAC;EAChG;AACF,CAAC;AAACb,OAAA,CAAAY,0BAAA,GAAAA,0BAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "CardRef", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _UNCardComponent.CardRef;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "UNCardComponent", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _UNCardComponent.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "UNCardComponentProps", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _UNCardComponent.UNCardComponentProps;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var _UNCardComponent = _interopRequireWildcard(require("./UNCardComponent"));
|
|
25
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_UNCardComponent","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sources":["index.ts"],"sourcesContent":["export { default as UNCardComponent, UNCardComponentProps, CardRef } from './UNCardComponent';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA8F,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _WebComponent = require("../../webComponent/WebComponent");
|
|
@@ -13,6 +13,7 @@ var _UNCheckDepositComponent = require("./UNCheckDepositComponent.utils");
|
|
|
13
13
|
var _checkMessage = require("../../messages/webMessages/checkMessage");
|
|
14
14
|
var _onLoadMessage = require("../../messages/webMessages/onLoadMessage");
|
|
15
15
|
var _webComponent = require("../../types/internal/webComponent.types");
|
|
16
|
+
var _helpers = require("../../helpers/store/helpers");
|
|
16
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
19
|
const {
|
|
@@ -94,5 +95,6 @@ const UNCheckDepositComponent = props => {
|
|
|
94
95
|
}
|
|
95
96
|
}, renderBookPaymentWebView());
|
|
96
97
|
};
|
|
97
|
-
|
|
98
|
+
var _default = (0, _helpers.withReduxStore)(UNCheckDepositComponent);
|
|
99
|
+
exports.default = _default;
|
|
98
100
|
//# sourceMappingURL=UNCheckDepositComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_WebComponent","_pageMessage","_unitMessages","_UNCheckDepositComponent","_checkMessage","_onLoadMessage","_webComponent","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Camera","NativeModules","UNCheckDepositComponent","props","height","setHeight","useState","presentationMode","setPresentationMode","PresentationMode","Inherit","useEffect","requestCameraAccess","requestAccess","error","console","Platform","OS","handleUnitOnLoad","response","onLoad","RESPONSE_KEYS","errors","account","handleWebViewMessage","message","details","type","CheckMessage","CHECK_DEPOSIT_CREATED","onDepositCreated","CHECK_DEPOSIT_RESTART_REQUEST","onRestartRequest","UnitMessage","UNIT_ON_LOAD","PageMessage","PAGE_HEIGHT","currentHeight","Default","renderBookPaymentWebView","createElement","WebComponent","WebComponentType","checkDeposit","params","getCheckDepositParams","script","getCheckDepositScript","onMessage","theme","language","isScrollable","View","style","exports"],"sources":["UNCheckDepositComponent.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { View, NativeModules, Platform } from 'react-native';\nimport { WebComponent } from '../../webComponent/WebComponent';\nimport type { WebViewMessage } from '../../messages/webMessages';\nimport { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';\nimport { UnitMessage } from '../../messages/webMessages/unitMessages';\nimport { getCheckDepositParams, getCheckDepositScript } from './UNCheckDepositComponent.utils';\nimport { CheckMessage } from '../../messages/webMessages/checkMessage';\nimport type { UNCheckDepositData } from '../../types/shared/checkDeposit.types';\nimport type { UNAccountData, UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';\nimport { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';\nimport { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';\n\nconst { Camera } = NativeModules;\n\nexport interface UNCheckDepositComponentProps {\n accountId: string;\n fee: number;\n customerToken: string;\n theme?: string;\n language?: string;\n onLoad?: (response: UNOnLoadResponse<UNAccountData>) => void;\n onDepositCreated?: (checkData: UNCheckDepositData) => void\n onRestartRequest?: (checkData: UNCheckDepositData) => void\n}\n\
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_WebComponent","_pageMessage","_unitMessages","_UNCheckDepositComponent","_checkMessage","_onLoadMessage","_webComponent","_helpers","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Camera","NativeModules","UNCheckDepositComponent","props","height","setHeight","useState","presentationMode","setPresentationMode","PresentationMode","Inherit","useEffect","requestCameraAccess","requestAccess","error","console","Platform","OS","handleUnitOnLoad","response","onLoad","RESPONSE_KEYS","errors","account","handleWebViewMessage","message","details","type","CheckMessage","CHECK_DEPOSIT_CREATED","onDepositCreated","CHECK_DEPOSIT_RESTART_REQUEST","onRestartRequest","UnitMessage","UNIT_ON_LOAD","PageMessage","PAGE_HEIGHT","currentHeight","Default","renderBookPaymentWebView","createElement","WebComponent","WebComponentType","checkDeposit","params","getCheckDepositParams","script","getCheckDepositScript","onMessage","theme","language","isScrollable","View","style","_default","withReduxStore","exports"],"sources":["UNCheckDepositComponent.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { View, NativeModules, Platform } from 'react-native';\nimport { WebComponent } from '../../webComponent/WebComponent';\nimport type { WebViewMessage } from '../../messages/webMessages';\nimport { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';\nimport { UnitMessage } from '../../messages/webMessages/unitMessages';\nimport { getCheckDepositParams, getCheckDepositScript } from './UNCheckDepositComponent.utils';\nimport { CheckMessage } from '../../messages/webMessages/checkMessage';\nimport type { UNCheckDepositData } from '../../types/shared/checkDeposit.types';\nimport type { UNAccountData, UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';\nimport { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';\nimport { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';\nimport { withReduxStore } from '../../helpers/store/helpers';\n\nconst { Camera } = NativeModules;\n\nexport interface UNCheckDepositComponentProps {\n accountId: string;\n fee: number;\n customerToken: string;\n theme?: string;\n language?: string;\n onLoad?: (response: UNOnLoadResponse<UNAccountData>) => void;\n onDepositCreated?: (checkData: UNCheckDepositData) => void\n onRestartRequest?: (checkData: UNCheckDepositData) => void\n}\n\nconst UNCheckDepositComponent = (props: UNCheckDepositComponentProps) => {\n const [height, setHeight] = useState<number>(0);\n const [presentationMode, setPresentationMode] = useState<PresentationMode>(PresentationMode.Inherit);\n\n useEffect(() => {\n const requestCameraAccess = async () => {\n try {\n await Camera.requestAccess();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (error: any) {\n console.error(error);\n }\n };\n\n if (Platform.OS == 'ios') {\n requestCameraAccess();\n }\n }, []);\n\n const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {\n if (!props.onLoad) {\n return;\n }\n\n if (RESPONSE_KEYS.errors in response) {\n props.onLoad(response as UNError);\n return;\n }\n\n if (RESPONSE_KEYS.account in response) {\n // AccountOnLoadResponse;\n props.onLoad(response[RESPONSE_KEYS.account] as UNOnLoadResponseData<UNAccountData>);\n return;\n }\n\n console.error('On Load Error: unexpected response type');\n return;\n };\n\n const handleWebViewMessage = (message: WebViewMessage) => {\n if (!message || !message.details) return;\n\n switch (message.type) {\n case CheckMessage.CHECK_DEPOSIT_CREATED:\n props.onDepositCreated && props.onDepositCreated(message.details as UNCheckDepositData);\n break;\n case CheckMessage.CHECK_DEPOSIT_RESTART_REQUEST:\n props.onRestartRequest && props.onRestartRequest(message.details as UNCheckDepositData);\n break;\n case UnitMessage.UNIT_ON_LOAD:\n handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);\n break;\n case PageMessage.PAGE_HEIGHT: {\n const currentHeight = (message.details as HeightEvent).height;\n setHeight(currentHeight);\n if (presentationMode === PresentationMode.Inherit && currentHeight === 0) {\n setPresentationMode(PresentationMode.Default);\n }\n break;\n }\n }\n };\n\n const renderBookPaymentWebView = () => {\n return (\n <WebComponent\n type={WebComponentType.checkDeposit}\n presentationMode={presentationMode}\n params={getCheckDepositParams(props)}\n script={getCheckDepositScript()}\n onMessage={(message: WebViewMessage) => handleWebViewMessage(message)}\n theme={props.theme}\n language={props.language}\n isScrollable={true}\n />\n );\n };\n\n if (presentationMode === PresentationMode.Inherit) {\n return renderBookPaymentWebView();\n }\n\n return (\n <View style={{ height: height }}>\n {renderBookPaymentWebView()}\n </View>\n );\n};\n\nexport default withReduxStore<UNCheckDepositComponentProps>(UNCheckDepositComponent);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,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AAgB,CAACC,OAAO,EAAE;IACjD,OAAO6B,wBAAwB,EAAE;EACnC;EAEA,oBACEzE,MAAA,CAAAmB,OAAA,CAAAuD,aAAA,CAACvE,YAAA,CAAAmF,IAAI;IAACC,KAAK,EAAE;MAAEjD,MAAM,EAAEA;IAAO;EAAE,GAC7BmC,wBAAwB,EAAE,CACtB;AAEX,CAAC;AAAC,IAAAe,QAAA,GAEa,IAAAC,uBAAc,EAA+BrD,uBAAuB,CAAC;AAAAsD,OAAA,CAAAvE,OAAA,GAAAqE,QAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "UNCheckDepositComponent", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _UNCheckDepositComponent.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "UNCheckDepositComponentProps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _UNCheckDepositComponent.UNCheckDepositComponentProps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _UNCheckDepositComponent = _interopRequireWildcard(require("./UNCheckDepositComponent"));
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_UNCheckDepositComponent","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sources":["index.ts"],"sourcesContent":["export { default as UNCheckDepositComponent, UNCheckDepositComponentProps } from './UNCheckDepositComponent';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,wBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA6G,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _pageMessage = require("../../messages/webMessages/pageMessage");
|
|
10
|
+
var _WebComponent = require("../../webComponent/WebComponent");
|
|
11
|
+
var _webComponent = require("../../types/internal/webComponent.types");
|
|
12
|
+
var _helpers = require("../../helpers/store/helpers");
|
|
13
|
+
var _UNMultipleCardsComponent = require("./UNMultipleCardsComponent.utils");
|
|
14
|
+
var _unitMessages = require("../../messages/webMessages/unitMessages");
|
|
15
|
+
var _onLoadMessage = require("../../messages/webMessages/onLoadMessage");
|
|
16
|
+
var _multipleCardsMessage = require("../../messages/webMessages/multipleCardsMessage");
|
|
17
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
const DEFAULT_HEIGHT = _reactNative.Dimensions.get('window').height * 0.5;
|
|
20
|
+
const UNMultipleCardsComponent = props => {
|
|
21
|
+
const webRef = (0, _react.useRef)(null);
|
|
22
|
+
const [defaultHeight, setDefaultHeight] = (0, _react.useState)();
|
|
23
|
+
const cardClicked = card => {
|
|
24
|
+
if (props.onCardClicked) {
|
|
25
|
+
props.onCardClicked(card);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const handleUnitOnLoad = response => {
|
|
29
|
+
if (!props.onLoad) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (_onLoadMessage.RESPONSE_KEYS.errors in response) {
|
|
33
|
+
props.onLoad(response);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (_onLoadMessage.RESPONSE_KEYS.cards in response) {
|
|
37
|
+
// MultipleCardsOnLoadResponse;
|
|
38
|
+
props.onLoad(response[_onLoadMessage.RESPONSE_KEYS.cards]);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
console.error('On Load Error: unexpected response type');
|
|
42
|
+
return;
|
|
43
|
+
};
|
|
44
|
+
const handleWebViewMessage = message => {
|
|
45
|
+
if (!message || !message.details) return;
|
|
46
|
+
switch (message.type) {
|
|
47
|
+
case _unitMessages.UnitMessage.UNIT_ON_LOAD:
|
|
48
|
+
handleUnitOnLoad(message.details);
|
|
49
|
+
break;
|
|
50
|
+
case _pageMessage.PageMessage.PAGE_HEIGHT:
|
|
51
|
+
{
|
|
52
|
+
const currentHeight = message.details.height;
|
|
53
|
+
currentHeight === 0 && setDefaultHeight(DEFAULT_HEIGHT);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
case _multipleCardsMessage.MultipleCardsMessage.UNIT_MULTIPLE_CARDS_CARD_CLICKED:
|
|
57
|
+
{
|
|
58
|
+
cardClicked(message.details);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const renderMultipleCardsWebView = () => {
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_WebComponent.WebComponent, {
|
|
64
|
+
ref: webRef,
|
|
65
|
+
type: _webComponent.WebComponentType.multipleCards,
|
|
66
|
+
presentationMode: _webComponent.PresentationMode.Inherit,
|
|
67
|
+
params: (0, _UNMultipleCardsComponent.getMultipleCardsParams)(props),
|
|
68
|
+
script: (0, _UNMultipleCardsComponent.getMultipleCardsScript)(),
|
|
69
|
+
onMessage: message => handleWebViewMessage(message),
|
|
70
|
+
nestedScrollEnabled: true,
|
|
71
|
+
theme: props.theme,
|
|
72
|
+
language: props.language
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
if (!defaultHeight) {
|
|
76
|
+
return renderMultipleCardsWebView();
|
|
77
|
+
}
|
|
78
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
79
|
+
style: {
|
|
80
|
+
height: defaultHeight
|
|
81
|
+
}
|
|
82
|
+
}, renderMultipleCardsWebView());
|
|
83
|
+
};
|
|
84
|
+
var _default = (0, _helpers.withReduxStore)(UNMultipleCardsComponent);
|
|
85
|
+
exports.default = _default;
|
|
86
|
+
//# sourceMappingURL=UNMultipleCardsComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_pageMessage","_WebComponent","_webComponent","_helpers","_UNMultipleCardsComponent","_unitMessages","_onLoadMessage","_multipleCardsMessage","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","DEFAULT_HEIGHT","Dimensions","height","UNMultipleCardsComponent","props","webRef","useRef","defaultHeight","setDefaultHeight","useState","cardClicked","card","onCardClicked","handleUnitOnLoad","response","onLoad","RESPONSE_KEYS","errors","cards","console","error","handleWebViewMessage","message","details","type","UnitMessage","UNIT_ON_LOAD","PageMessage","PAGE_HEIGHT","currentHeight","MultipleCardsMessage","UNIT_MULTIPLE_CARDS_CARD_CLICKED","renderMultipleCardsWebView","createElement","WebComponent","ref","WebComponentType","multipleCards","presentationMode","PresentationMode","Inherit","params","getMultipleCardsParams","script","getMultipleCardsScript","onMessage","nestedScrollEnabled","theme","language","View","style","_default","withReduxStore","exports"],"sources":["UNMultipleCardsComponent.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\nimport { Dimensions, View } from 'react-native';\nimport type { WebViewMessage } from '../../messages/webMessages';\nimport { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';\nimport { WebComponent } from '../../webComponent/WebComponent';\n\nimport type WebView from 'react-native-webview';\n\nimport { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';\nimport { withReduxStore } from '../../helpers/store/helpers';\nimport { getMultipleCardsParams, getMultipleCardsScript } from './UNMultipleCardsComponent.utils';\nimport { UnitMessage } from '../../messages/webMessages/unitMessages';\nimport type { UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';\nimport { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';\nimport type {\n UNCardData,\n UNError,\n UNMultipleCardsComponentPaginationType,\n UNMultipleCardsOnLoadData,\n UNOnLoadResponse,\n UNOnLoadResponseData,\n} from '../../types/shared';\nimport { MultipleCardsCardClickedEvent, MultipleCardsMessage } from '../../messages/webMessages/multipleCardsMessage';\n\nconst DEFAULT_HEIGHT = Dimensions.get('window').height * 0.5;\n\nexport interface UNMultipleCardsComponentProps {\n // inputs\n customerToken: string;\n\n // ui\n paginationType?: UNMultipleCardsComponentPaginationType;\n cardsPerPage?: number;\n disableCardClick?: boolean;\n theme?: string;\n language?: string;\n queryFilter?: string;\n hideTitle?: boolean;\n\n // events\n onLoad?: (response: UNOnLoadResponse<UNMultipleCardsOnLoadData>) => void;\n onCardClicked?: (card: UNCardData) => void;\n}\n\nconst UNMultipleCardsComponent = (props: UNMultipleCardsComponentProps) => {\n const webRef = useRef<WebView>(null);\n const [defaultHeight, setDefaultHeight] = useState<number>();\n\n const cardClicked = (card: UNCardData) => {\n if (props.onCardClicked) {\n props.onCardClicked(card);\n }\n };\n\n const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {\n if (!props.onLoad) {\n return;\n }\n\n if (RESPONSE_KEYS.errors in response) {\n props.onLoad(response as UNError);\n return;\n }\n\n if (RESPONSE_KEYS.cards in response) {\n // MultipleCardsOnLoadResponse;\n props.onLoad(response[RESPONSE_KEYS.cards] as UNOnLoadResponseData<UNMultipleCardsOnLoadData>);\n return;\n }\n\n console.error('On Load Error: unexpected response type');\n return;\n };\n\n const handleWebViewMessage = (message: WebViewMessage) => {\n if (!message || !message.details) return;\n switch (message.type) {\n case UnitMessage.UNIT_ON_LOAD:\n handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);\n break;\n case PageMessage.PAGE_HEIGHT: {\n const currentHeight = (message.details as HeightEvent).height;\n currentHeight === 0 && setDefaultHeight(DEFAULT_HEIGHT);\n break;\n }\n case MultipleCardsMessage.UNIT_MULTIPLE_CARDS_CARD_CLICKED: {\n cardClicked(message.details as MultipleCardsCardClickedEvent);\n }\n }\n };\n\n const renderMultipleCardsWebView = () => {\n return (\n <WebComponent\n ref={webRef}\n type={WebComponentType.multipleCards}\n presentationMode={PresentationMode.Inherit}\n params={getMultipleCardsParams(props)}\n script={getMultipleCardsScript()}\n onMessage={(message: WebViewMessage) => handleWebViewMessage(message)}\n nestedScrollEnabled={true}\n theme={props.theme}\n language={props.language}\n />\n );\n };\n\n if (!defaultHeight) {\n return renderMultipleCardsWebView();\n }\n\n return (\n <View style={{ height: defaultHeight }}>\n {renderMultipleCardsWebView()}\n </View>\n );\n};\n\nexport default withReduxStore<UNMultipleCardsComponentProps>(UNMultipleCardsComponent);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAIA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,yBAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AAEA,IAAAQ,cAAA,GAAAR,OAAA;AASA,IAAAS,qBAAA,GAAAT,OAAA;AAAsH,SAAAU,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAZ,wBAAAgB,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAA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OAAOyB,0BAA0B,EAAE;EACrC;EAEA,oBACElE,MAAA,CAAAmB,OAAA,CAAAgD,aAAA,CAAChE,YAAA,CAAAgF,IAAI;IAACC,KAAK,EAAE;MAAEhD,MAAM,EAAEK;IAAc;EAAE,GACpCyB,0BAA0B,EAAE,CACxB;AAEX,CAAC;AAAC,IAAAmB,QAAA,GAEa,IAAAC,uBAAc,EAAgCjD,wBAAwB,CAAC;AAAAkD,OAAA,CAAApE,OAAA,GAAAkE,QAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getMultipleCardsScript = exports.getMultipleCardsParams = void 0;
|
|
7
|
+
var _multipleCardsMessage = require("../../messages/webMessages/multipleCardsMessage");
|
|
8
|
+
const getMultipleCardsParams = props => {
|
|
9
|
+
const paginationType = props.paginationType ? `pagination-type="${props.paginationType}"` : '';
|
|
10
|
+
const cardsPerPage = props.cardsPerPage ? `cards-per-page="${props.cardsPerPage}"` : '';
|
|
11
|
+
const queryFilter = props.queryFilter ? `query-filter="${props.queryFilter}"` : '';
|
|
12
|
+
return `
|
|
13
|
+
customer-token="${props.customerToken}"
|
|
14
|
+
${paginationType}
|
|
15
|
+
${cardsPerPage}
|
|
16
|
+
disable-card-click="${props.disableCardClick || false}"
|
|
17
|
+
${queryFilter}
|
|
18
|
+
hide-title="${props.hideTitle || false}"
|
|
19
|
+
style="height: 100%"
|
|
20
|
+
`;
|
|
21
|
+
};
|
|
22
|
+
exports.getMultipleCardsParams = getMultipleCardsParams;
|
|
23
|
+
const MULTIPLE_CARDS_LISTENERS = {
|
|
24
|
+
cardClicked: `
|
|
25
|
+
window.addEventListener("${_multipleCardsMessage.MultipleCardsMessage.UNIT_MULTIPLE_CARDS_CARD_CLICKED}", (e) => {
|
|
26
|
+
const response = e.detail
|
|
27
|
+
response.then((data) => {
|
|
28
|
+
postMessageToSDK({ type: "${_multipleCardsMessage.MultipleCardsMessage.UNIT_MULTIPLE_CARDS_CARD_CLICKED}", details: data.data })
|
|
29
|
+
}).catch((e) => {
|
|
30
|
+
console.log(e)
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
`
|
|
34
|
+
};
|
|
35
|
+
const getMultipleCardsScript = () => {
|
|
36
|
+
return `
|
|
37
|
+
${MULTIPLE_CARDS_LISTENERS.cardClicked}
|
|
38
|
+
`;
|
|
39
|
+
};
|
|
40
|
+
exports.getMultipleCardsScript = getMultipleCardsScript;
|
|
41
|
+
//# sourceMappingURL=UNMultipleCardsComponent.utils.js.map
|
package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_multipleCardsMessage","require","getMultipleCardsParams","props","paginationType","cardsPerPage","queryFilter","customerToken","disableCardClick","hideTitle","exports","MULTIPLE_CARDS_LISTENERS","cardClicked","MultipleCardsMessage","UNIT_MULTIPLE_CARDS_CARD_CLICKED","getMultipleCardsScript"],"sources":["UNMultipleCardsComponent.utils.ts"],"sourcesContent":["import type { UNMultipleCardsComponentProps } from './UNMultipleCardsComponent';\nimport { MultipleCardsMessage } from '../../messages/webMessages/multipleCardsMessage';\n\nexport const getMultipleCardsParams = (props: UNMultipleCardsComponentProps) => {\n const paginationType = props.paginationType ? `pagination-type=\"${props.paginationType}\"` : '';\n const cardsPerPage = props.cardsPerPage ? `cards-per-page=\"${props.cardsPerPage}\"` : '';\n const queryFilter = props.queryFilter ? `query-filter=\"${props.queryFilter}\"` : '';\n return `\n customer-token=\"${props.customerToken}\"\n ${paginationType}\n ${cardsPerPage}\n disable-card-click=\"${props.disableCardClick || false}\"\n ${queryFilter}\n hide-title=\"${props.hideTitle || false}\"\n style=\"height: 100%\"\n `;\n};\n\nconst MULTIPLE_CARDS_LISTENERS = {\n cardClicked: `\n window.addEventListener(\"${MultipleCardsMessage.UNIT_MULTIPLE_CARDS_CARD_CLICKED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${MultipleCardsMessage.UNIT_MULTIPLE_CARDS_CARD_CLICKED}\", details: data.data })\n }).catch((e) => {\n console.log(e)\n })\n });\n `,\n};\n\nexport const getMultipleCardsScript = () => {\n return `\n ${MULTIPLE_CARDS_LISTENERS.cardClicked}\n `;\n};\n"],"mappings":";;;;;;AACA,IAAAA,qBAAA,GAAAC,OAAA;AAEO,MAAMC,sBAAsB,GAAIC,KAAoC,IAAK;EAC9E,MAAMC,cAAc,GAAGD,KAAK,CAACC,cAAc,GAAI,oBAAmBD,KAAK,CAACC,cAAe,GAAE,GAAG,EAAE;EAC9F,MAAMC,YAAY,GAAGF,KAAK,CAACE,YAAY,GAAI,mBAAkBF,KAAK,CAACE,YAAa,GAAE,GAAG,EAAE;EACvF,MAAMC,WAAW,GAAGH,KAAK,CAACG,WAAW,GAAI,iBAAgBH,KAAK,CAACG,WAAY,GAAE,GAAG,EAAE;EAClF,OAAQ;AACV,oBAAoBH,KAAK,CAACI,aAAc;AACxC,IAAIH,cAAe;AACnB,IAAIC,YAAa;AACjB,wBAAwBF,KAAK,CAACK,gBAAgB,IAAI,KAAM;AACxD,IAAIF,WAAY;AAChB,gBAAgBH,KAAK,CAACM,SAAS,IAAI,KAAM;AACzC;AACA,GAAG;AACH,CAAC;AAACC,OAAA,CAAAR,sBAAA,GAAAA,sBAAA;AAEF,MAAMS,wBAAwB,GAAG;EAC/BC,WAAW,EAAG;AAChB,+BAA+BC,0CAAoB,CAACC,gCAAiC;AACrF;AACA;AACA,oCAAoCD,0CAAoB,CAACC,gCAAiC;AAC1F;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;EAC1C,OAAQ;AACV,OAAOJ,wBAAwB,CAACC,WAAY;AAC5C,GAAG;AACH,CAAC;AAACF,OAAA,CAAAK,sBAAA,GAAAA,sBAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "UNMultipleCardsComponent", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _UNMultipleCardsComponent.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "UNMultipleCardsComponentProps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _UNMultipleCardsComponent.UNMultipleCardsComponentProps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _UNMultipleCardsComponent = _interopRequireWildcard(require("./UNMultipleCardsComponent"));
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_UNMultipleCardsComponent","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sources":["index.ts"],"sourcesContent":["export {\n default as UNMultipleCardsComponent, UNMultipleCardsComponentProps,\n} from './UNMultipleCardsComponent';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,yBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEoC,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _UNCardComponent = require("./UNCardComponent
|
|
6
|
+
var _UNCardComponent = require("./UNCardComponent");
|
|
7
7
|
Object.keys(_UNCardComponent).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
9
|
if (key in exports && exports[key] === _UNCardComponent[key]) return;
|
|
@@ -14,7 +14,18 @@ Object.keys(_UNCardComponent).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
var
|
|
17
|
+
var _UNMultipleCardsComponent = require("./UNMultipleCardsComponent");
|
|
18
|
+
Object.keys(_UNMultipleCardsComponent).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _UNMultipleCardsComponent[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _UNMultipleCardsComponent[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _UNBottomSheetComponent = require("./UNBottomSheetComponent");
|
|
18
29
|
Object.keys(_UNBottomSheetComponent).forEach(function (key) {
|
|
19
30
|
if (key === "default" || key === "__esModule") return;
|
|
20
31
|
if (key in exports && exports[key] === _UNBottomSheetComponent[key]) return;
|
|
@@ -25,7 +36,7 @@ Object.keys(_UNBottomSheetComponent).forEach(function (key) {
|
|
|
25
36
|
}
|
|
26
37
|
});
|
|
27
38
|
});
|
|
28
|
-
var _UNBookPaymentComponent = require("./UNBookPaymentComponent
|
|
39
|
+
var _UNBookPaymentComponent = require("./UNBookPaymentComponent");
|
|
29
40
|
Object.keys(_UNBookPaymentComponent).forEach(function (key) {
|
|
30
41
|
if (key === "default" || key === "__esModule") return;
|
|
31
42
|
if (key in exports && exports[key] === _UNBookPaymentComponent[key]) return;
|
|
@@ -36,7 +47,7 @@ Object.keys(_UNBookPaymentComponent).forEach(function (key) {
|
|
|
36
47
|
}
|
|
37
48
|
});
|
|
38
49
|
});
|
|
39
|
-
var _UNActivityComponent = require("./UNActivityComponent
|
|
50
|
+
var _UNActivityComponent = require("./UNActivityComponent");
|
|
40
51
|
Object.keys(_UNActivityComponent).forEach(function (key) {
|
|
41
52
|
if (key === "default" || key === "__esModule") return;
|
|
42
53
|
if (key in exports && exports[key] === _UNActivityComponent[key]) return;
|
|
@@ -47,7 +58,7 @@ Object.keys(_UNActivityComponent).forEach(function (key) {
|
|
|
47
58
|
}
|
|
48
59
|
});
|
|
49
60
|
});
|
|
50
|
-
var _UNAccountComponent = require("./UNAccountComponent
|
|
61
|
+
var _UNAccountComponent = require("./UNAccountComponent");
|
|
51
62
|
Object.keys(_UNAccountComponent).forEach(function (key) {
|
|
52
63
|
if (key === "default" || key === "__esModule") return;
|
|
53
64
|
if (key in exports && exports[key] === _UNAccountComponent[key]) return;
|
|
@@ -58,7 +69,7 @@ Object.keys(_UNAccountComponent).forEach(function (key) {
|
|
|
58
69
|
}
|
|
59
70
|
});
|
|
60
71
|
});
|
|
61
|
-
var _UNCheckDepositComponent = require("./UNCheckDepositComponent
|
|
72
|
+
var _UNCheckDepositComponent = require("./UNCheckDepositComponent");
|
|
62
73
|
Object.keys(_UNCheckDepositComponent).forEach(function (key) {
|
|
63
74
|
if (key === "default" || key === "__esModule") return;
|
|
64
75
|
if (key in exports && exports[key] === _UNCheckDepositComponent[key]) return;
|
|
@@ -69,7 +80,7 @@ Object.keys(_UNCheckDepositComponent).forEach(function (key) {
|
|
|
69
80
|
}
|
|
70
81
|
});
|
|
71
82
|
});
|
|
72
|
-
var _UNACHDebitComponent = require("./UNACHDebitComponent
|
|
83
|
+
var _UNACHDebitComponent = require("./UNACHDebitComponent");
|
|
73
84
|
Object.keys(_UNACHDebitComponent).forEach(function (key) {
|
|
74
85
|
if (key === "default" || key === "__esModule") return;
|
|
75
86
|
if (key in exports && exports[key] === _UNACHDebitComponent[key]) return;
|
|
@@ -80,7 +91,7 @@ Object.keys(_UNACHDebitComponent).forEach(function (key) {
|
|
|
80
91
|
}
|
|
81
92
|
});
|
|
82
93
|
});
|
|
83
|
-
var _UNACHCreditComponent = require("./UNACHCreditComponent
|
|
94
|
+
var _UNACHCreditComponent = require("./UNACHCreditComponent");
|
|
84
95
|
Object.keys(_UNACHCreditComponent).forEach(function (key) {
|
|
85
96
|
if (key === "default" || key === "__esModule") return;
|
|
86
97
|
if (key in exports && exports[key] === _UNACHCreditComponent[key]) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_UNCardComponent","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_UNBottomSheetComponent","_UNBookPaymentComponent","_UNActivityComponent","_UNAccountComponent","_UNCheckDepositComponent","_UNACHDebitComponent","_UNACHCreditComponent"],"sources":["index.ts"],"sourcesContent":["export * from './UNCardComponent
|
|
1
|
+
{"version":3,"names":["_UNCardComponent","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_UNMultipleCardsComponent","_UNBottomSheetComponent","_UNBookPaymentComponent","_UNActivityComponent","_UNAccountComponent","_UNCheckDepositComponent","_UNACHDebitComponent","_UNACHCreditComponent"],"sources":["index.ts"],"sourcesContent":["export * from './UNCardComponent';\nexport * from './UNMultipleCardsComponent';\nexport * from './UNBottomSheetComponent';\nexport * from './UNBookPaymentComponent';\nexport * from './UNActivityComponent';\nexport * from './UNAccountComponent';\nexport * from './UNCheckDepositComponent';\nexport * from './UNACHDebitComponent';\nexport * from './UNACHCreditComponent';\n"],"mappings":";;;;;AAAA,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AG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAM,wBAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AACA,IAAAW,oBAAA,GAAAf,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAa,oBAAA,EAAAZ,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAW,oBAAA,CAAAX,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,oBAAA,CAAAX,GAAA;IAAA;EAAA;AAAA;AACA,IAAAY,qBAAA,GAAAhB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAc,qBAAA,EAAAb,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAY,qBAAA,CAAAZ,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAQ,qBAAA,CAAAZ,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -4,28 +4,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.UNCardFlows = void 0;
|
|
7
|
-
var _EventBus = _interopRequireDefault(require("../../helpers/EventBus"));
|
|
8
7
|
var _webComponent = require("../../types/internal/webComponent.types");
|
|
9
8
|
var _bottomSheet = require("../../types/internal/bottomSheet.types");
|
|
10
9
|
var _bottomSheetMessage = require("../../messages/nativeMessages/bottomSheetMessage");
|
|
11
|
-
|
|
10
|
+
var _reactRedux = require("react-redux");
|
|
11
|
+
var _SharedEventsSlice = require("../../slices/SharedEventsSlice");
|
|
12
12
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
13
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
14
14
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
15
|
class UNCardFlows {}
|
|
16
16
|
exports.UNCardFlows = UNCardFlows;
|
|
17
17
|
_defineProperty(UNCardFlows, "startPushProvisioning", async (cardId, customerToken) => {
|
|
18
|
+
const dispatch = (0, _reactRedux.useDispatch)(); //todo: can we use hook here?
|
|
18
19
|
try {
|
|
19
20
|
const addToWalletComponentData = {
|
|
20
21
|
type: _webComponent.WebComponentType.cardAction,
|
|
21
22
|
presentationMode: _webComponent.PresentationMode.CoverInjectedHeight,
|
|
22
23
|
params: `card-id=${cardId} customer-token=${customerToken} action=AddToWallet`
|
|
23
24
|
};
|
|
24
|
-
const
|
|
25
|
+
const data = {
|
|
25
26
|
type: _bottomSheet.BottomSheetRenderingType.WebComponent,
|
|
26
27
|
data: addToWalletComponentData
|
|
27
28
|
};
|
|
28
|
-
|
|
29
|
+
dispatch((0, _SharedEventsSlice.setEvent)({
|
|
30
|
+
key: _bottomSheetMessage.BottomSheetNativeMessage.START_FLOW,
|
|
31
|
+
data
|
|
32
|
+
}));
|
|
29
33
|
} catch (error) {
|
|
30
34
|
console.error(error);
|
|
31
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_webComponent","require","_bottomSheet","_bottomSheetMessage","_reactRedux","_SharedEventsSlice","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","UNCardFlows","exports","cardId","customerToken","dispatch","useDispatch","addToWalletComponentData","type","WebComponentType","cardAction","presentationMode","PresentationMode","CoverInjectedHeight","params","data","BottomSheetRenderingType","WebComponent","setEvent","BottomSheetNativeMessage","START_FLOW","error","console"],"sources":["UNCardFlows.ts"],"sourcesContent":["import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';\nimport {\n BottomSheetRenderingType,\n type WebComponentData,\n type WebComponentRendering,\n} from '../../types/internal/bottomSheet.types';\nimport { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';\nimport { useDispatch } from 'react-redux';\nimport { setEvent } from '../../slices/SharedEventsSlice';\n\nexport class UNCardFlows {\n public static startPushProvisioning = async (cardId: string, customerToken: string) => {\n const dispatch = useDispatch(); //todo: can we use hook here?\n try {\n const addToWalletComponentData: WebComponentData = {\n type: WebComponentType.cardAction,\n presentationMode: PresentationMode.CoverInjectedHeight,\n params: `card-id=${cardId} customer-token=${customerToken} action=AddToWallet`,\n };\n\n const data: WebComponentRendering = {\n type: BottomSheetRenderingType.WebComponent,\n data: addToWalletComponentData,\n };\n\n dispatch(setEvent({ key: BottomSheetNativeMessage.START_FLOW, data }));\n } catch (error) {\n console.error(error);\n }\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AAA0D,SAAAK,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,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 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.promiseRejectToUNVPErrorType = exports.isUNVPError = exports.isUNNativePromiseReject = void 0;
|
|
7
|
+
var _types = require("./types");
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9
|
+
|
|
10
|
+
const isUNVPError = error => {
|
|
11
|
+
return 'code' in error && 'description' in error && 'type' in error && isUNVPErrorType(error.type) && 'correlationId' in error;
|
|
12
|
+
};
|
|
13
|
+
exports.isUNVPError = isUNVPError;
|
|
14
|
+
const isUNVPErrorType = type => {
|
|
15
|
+
return Object.values(_types.UNVPErrorType).includes(type);
|
|
16
|
+
};
|
|
17
|
+
const isUNNativePromiseReject = error => {
|
|
18
|
+
return 'code' in error && 'message' in error;
|
|
19
|
+
};
|
|
20
|
+
exports.isUNNativePromiseReject = isUNNativePromiseReject;
|
|
21
|
+
const promiseRejectToUNVPErrorType = error => {
|
|
22
|
+
// validate the shape of a promise reject we get from iOS/Android native
|
|
23
|
+
if (!isUNNativePromiseReject(error)) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const parsedError = JSON.parse(error.message);
|
|
27
|
+
// validate the shape of an error we get from VDE SDK
|
|
28
|
+
if (!isUNVPError(parsedError)) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return parsedError.type;
|
|
32
|
+
};
|
|
33
|
+
exports.promiseRejectToUNVPErrorType = promiseRejectToUNVPErrorType;
|
|
34
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_types","require","isUNVPError","error","isUNVPErrorType","type","exports","Object","values","UNVPErrorType","includes","isUNNativePromiseReject","promiseRejectToUNVPErrorType","parsedError","JSON","parse","message"],"sources":["helpers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { UNNativePromiseReject, UNVPError, UNVPErrorType } from './types';\n\nexport const isUNVPError = (error: any): error is UNVPError => {\n return 'code' in error &&\n 'description' in error &&\n 'type' in error &&\n isUNVPErrorType(error.type) &&\n 'correlationId' in error;\n};\n\nconst isUNVPErrorType = (type: any): type is UNVPErrorType => {\n return Object.values(UNVPErrorType).includes(type);\n};\n\nexport const isUNNativePromiseReject = (error: any): error is UNNativePromiseReject => {\n return 'code' in error && 'message' in error;\n};\n\nexport const promiseRejectToUNVPErrorType = (error: any): UNVPErrorType | null => {\n // validate the shape of a promise reject we get from iOS/Android native\n if (!isUNNativePromiseReject(error)) {\n return null;\n }\n const parsedError = JSON.parse(error.message);\n // validate the shape of an error we get from VDE SDK\n if (!isUNVPError(parsedError)) {\n return null;\n }\n return parsedError.type;\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AADA;;AAGO,MAAMC,WAAW,GAAIC,KAAU,IAAyB;EAC7D,OAAO,MAAM,IAAIA,KAAK,IACpB,aAAa,IAAIA,KAAK,IACtB,MAAM,IAAIA,KAAK,IACfC,eAAe,CAACD,KAAK,CAACE,IAAI,CAAC,IAC3B,eAAe,IAAIF,KAAK;AAC5B,CAAC;AAACG,OAAA,CAAAJ,WAAA,GAAAA,WAAA;AAEF,MAAME,eAAe,GAAIC,IAAS,IAA4B;EAC5D,OAAOE,MAAM,CAACC,MAAM,CAACC,oBAAa,CAAC,CAACC,QAAQ,CAACL,IAAI,CAAC;AACpD,CAAC;AAEM,MAAMM,uBAAuB,GAAIR,KAAU,IAAqC;EACrF,OAAO,MAAM,IAAIA,KAAK,IAAI,SAAS,IAAIA,KAAK;AAC9C,CAAC;AAACG,OAAA,CAAAK,uBAAA,GAAAA,uBAAA;AAEK,MAAMC,4BAA4B,GAAIT,KAAU,IAA2B;EAChF;EACA,IAAI,CAACQ,uBAAuB,CAACR,KAAK,CAAC,EAAE;IACnC,OAAO,IAAI;EACb;EACA,MAAMU,WAAW,GAAGC,IAAI,CAACC,KAAK,CAACZ,KAAK,CAACa,OAAO,CAAC;EAC7C;EACA,IAAI,CAACd,WAAW,CAACW,WAAW,CAAC,EAAE;IAC7B,OAAO,IAAI;EACb;EACA,OAAOA,WAAW,CAACR,IAAI;AACzB,CAAC;AAACC,OAAA,CAAAM,4BAAA,GAAAA,4BAAA"}
|