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":["PaymentMessage","CardMessage","PageMessage","UnitMessage","AccountMessage","ActivityMessage","POST_MESSAGE_TO_SDK","POST_PAGE_HEIGHT","PAGE_HEIGHT","LISTENERS","isPageLoaded","PAGE_LOADED","requestRendering","UNIT_REQUEST_RENDERING","requestRefresh","UNIT_REQUEST_REFRESH","onLoad","UNIT_ON_LOAD","requestCloseFlow","UNIT_REQUEST_CLOSE_FLOW","requestOpenLink","UNIT_REQUEST_OPEN_LINK","unitRequestDownload","UNIT_REQUEST_DOWNLOAD","cardActivated","CARD_ACTIVATED","cardStatusChange","CARD_STATUS_CHANGED","unitRequestExternalSdk","UNIT_REQUEST_EXTERNAL_SDK","unitPaymentCreated","PAYMENT_CREATED","unitPlaidTokenCreated","UNIT_PLAID_TOKEN_CREATED","unitAccountChanged","UNIT_ACCOUNT_CHANGED","unitActivityFiltersChanged","UNIT_ACTIVITY_FILTERS_CHANGED","DISPATCH_RENDERING_EVENT","DISPATCH_REQUEST_REFRESH","DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT","DISPATCH_PLAID_RESPONSE","UNIT_PLAID_RESPONSE","DISPATCH_OPEN_ACTIONS_MENU","DISPATCH_REQUEST_CARD_ACTION","DISPATCH_REQUEST_ACCOUNT_ACTION"],"sources":["bodyScript.ts"],"sourcesContent":["import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';\nimport { CardMessage } from '../../messages/webMessages/cardMessage';\nimport { PageMessage } from '../../messages/webMessages/pageMessage';\nimport { UnitMessage } from '../../messages/webMessages/unitMessages';\nimport { AccountMessage } from '../../messages/webMessages/accountMessage';\nimport { ActivityMessage } from '../../messages/webMessages/activityMessage';\n\nexport const POST_MESSAGE_TO_SDK = `\n const postMessageToSDK = (message) => {\n if ('ReactNativeWebView' in window) {\n const messageString = JSON.stringify(message)\n window['ReactNativeWebView'].postMessage(messageString)\n }\n }\n`;\n\nexport const POST_PAGE_HEIGHT = `\n const postHeight = () => {\n setTimeout(() => {\n const height = window.document.documentElement.getBoundingClientRect().height\n postMessageToSDK({ type: \"${PageMessage.PAGE_HEIGHT}\", details: { height } })\n })\n }\n`;\n\nexport const LISTENERS = {\n isPageLoaded: `\n window.addEventListener('DOMContentLoaded', e => {\n postMessageToSDK({ type: \"${PageMessage.PAGE_LOADED}\" })\n });\n `,\n requestRendering: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_RENDERING}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_RENDERING}\", details: { data: e.detail }})\n });\n `,\n requestRefresh: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_REFRESH}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_REFRESH}\", details: e.detail })\n });\n `,\n onLoad: `\n window.addEventListener(\"${UnitMessage.UNIT_ON_LOAD}\", (e) => {\n postHeight()\n postMessageToSDK({ type: \"${UnitMessage.UNIT_ON_LOAD}\", details: e.detail })\n });\n `,\n requestCloseFlow: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_CLOSE_FLOW}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_CLOSE_FLOW}\" })\n });\n `,\n requestOpenLink: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_OPEN_LINK}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_OPEN_LINK}\", details: e.detail })\n });\n `,\n unitRequestDownload: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_DOWNLOAD}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_DOWNLOAD}\", details: e.detail })\n });\n `,\n cardActivated: `\n window.addEventListener(\"${CardMessage.CARD_ACTIVATED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${CardMessage.CARD_ACTIVATED}\", details: { card: data.data }})\n }).catch((e) => {\n console.log(e)\n })\n });\n `,\n cardStatusChange: `\n window.addEventListener(\"${CardMessage.CARD_STATUS_CHANGED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${CardMessage.CARD_STATUS_CHANGED}\", details: { card: data.data }})\n }).catch((e) => {\n console.log(e)\n })\n });\n `,\n unitRequestExternalSdk: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_EXTERNAL_SDK}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_EXTERNAL_SDK}\", details: e.detail })\n });\n `,\n unitPaymentCreated: `\n window.addEventListener(\"${PaymentMessage.PAYMENT_CREATED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${PaymentMessage.PAYMENT_CREATED}\", details: { data: data.data }})\n }).catch((e) => {\n console.log(e)\n })\n });\n `,\n unitPlaidTokenCreated: `\n window.addEventListener(\"${UnitMessage.UNIT_PLAID_TOKEN_CREATED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_PLAID_TOKEN_CREATED}\", details: { linkToken: data.data }})\n }).catch((e) => {\n console.log(e)\n })\n });\n `,\n unitAccountChanged: `\n window.addEventListener(\"${AccountMessage.UNIT_ACCOUNT_CHANGED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${AccountMessage.UNIT_ACCOUNT_CHANGED}\", details: { account: data.data }})\n }).catch((e) => {\n console.log(e)\n })\n });\n `,\n unitActivityFiltersChanged: `\n window.addEventListener(\"${ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED}\", (e) => {\n postMessageToSDK({ type: \"${ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED}\", details: e.detail })\n });\n `\n};\n\nexport const DISPATCH_RENDERING_EVENT = `\n const dispatchRenderingEvent = (details) => {\n const event = new CustomEvent(\"${UnitMessage.UNIT_REQUEST_RENDERING}\",{ detail: JSON.parse(details) })\n window.dispatchEvent(event)\n }\n`;\n\nexport const DISPATCH_REQUEST_REFRESH = `\n const dispatchRefreshEvent = (details) => {\n const event = new CustomEvent(\"${UnitMessage.UNIT_REQUEST_REFRESH}\",{ detail: JSON.parse(details) })\n window.dispatchEvent(event)\n }\n`;\n\nexport const DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT = `\n const dispatchActivityFilterChangedEvent = (details) => {\n const event = new CustomEvent(\"${ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED}\",{ detail: details });\n window.dispatchEvent(event);\n }\n`;\n\nexport const DISPATCH_PLAID_RESPONSE = `\n const dispatchPlaidEvent = (details) => {\n const event = new CustomEvent(\"${UnitMessage.UNIT_PLAID_RESPONSE}\",{ detail: details })\n window.dispatchEvent(event)\n }\n`;\n\nexport const DISPATCH_OPEN_ACTIONS_MENU = `\n const dispatchOpenActionsMenu = (componentName) => {\n document.querySelector(componentName).dispatchEvent(new CustomEvent(\"unitRequestOpenActionsMenu\"))\n }\n`;\n\nexport const DISPATCH_REQUEST_CARD_ACTION = `\n const dispatchRequestCardAction = (action) => {\n document.querySelector(\"unit-elements-card\").dispatchEvent(new CustomEvent(\"unitRequestCardAction\", {detail: {action: action}}))\n }\n`;\n\nexport const DISPATCH_REQUEST_ACCOUNT_ACTION = `\n const dispatchRequestAccountAction = (action) => {\n document.querySelector(\"unit-elements-account\").dispatchEvent(new CustomEvent(\"unitRequestAccountAction\", {detail: {action: action}}))\n }\n`;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"names":["PaymentMessage","CardMessage","PageMessage","UnitMessage","AccountMessage","ActivityMessage","POST_MESSAGE_TO_SDK","POST_PAGE_HEIGHT","PAGE_HEIGHT","LISTENERS","isPageLoaded","PAGE_LOADED","requestRendering","UNIT_REQUEST_RENDERING","requestRefresh","UNIT_REQUEST_REFRESH","onLoad","UNIT_ON_LOAD","requestCloseFlow","UNIT_REQUEST_CLOSE_FLOW","requestOpenLink","UNIT_REQUEST_OPEN_LINK","unitRequestDownload","UNIT_REQUEST_DOWNLOAD","cardActivated","CARD_ACTIVATED","cardStatusChange","CARD_STATUS_CHANGED","unitRequestExternalSdk","UNIT_REQUEST_EXTERNAL_SDK","unitPaymentCreated","PAYMENT_CREATED","unitPlaidTokenCreated","UNIT_PLAID_TOKEN_CREATED","unitAccountChanged","UNIT_ACCOUNT_CHANGED","unitActivityFiltersChanged","UNIT_ACTIVITY_FILTERS_CHANGED","DISPATCH_RENDERING_EVENT","DISPATCH_REQUEST_REFRESH","DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT","DISPATCH_PLAID_RESPONSE","UNIT_PLAID_RESPONSE","DISPATCH_OPEN_ACTIONS_MENU","DISPATCH_REQUEST_CARD_ACTION","DISPATCH_REQUEST_HIDE_SENSITIVE_DATA","DISPATCH_REQUEST_SHOW_SENSITIVE_DATA","DISPATCH_REQUEST_ACCOUNT_ACTION"],"sources":["bodyScript.ts"],"sourcesContent":["import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';\nimport { CardMessage } from '../../messages/webMessages/cardMessage';\nimport { PageMessage } from '../../messages/webMessages/pageMessage';\nimport { UnitMessage } from '../../messages/webMessages/unitMessages';\nimport { AccountMessage } from '../../messages/webMessages/accountMessage';\nimport { ActivityMessage } from '../../messages/webMessages/activityMessage';\n\nexport const POST_MESSAGE_TO_SDK = `\n const postMessageToSDK = (message) => {\n if ('ReactNativeWebView' in window) {\n const messageString = JSON.stringify(message)\n window['ReactNativeWebView'].postMessage(messageString)\n }\n }\n`;\n\nexport const POST_PAGE_HEIGHT = `\n const postHeight = () => {\n setTimeout(() => {\n const height = window.document.documentElement.getBoundingClientRect().height\n postMessageToSDK({ type: \"${PageMessage.PAGE_HEIGHT}\", details: { height } })\n })\n }\n`;\n\nexport const LISTENERS = {\n isPageLoaded: `\n window.addEventListener('DOMContentLoaded', e => {\n postMessageToSDK({ type: \"${PageMessage.PAGE_LOADED}\" })\n });\n `,\n requestRendering: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_RENDERING}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_RENDERING}\", details: { data: e.detail }})\n });\n `,\n requestRefresh: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_REFRESH}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_REFRESH}\", details: e.detail })\n });\n `,\n onLoad: `\n window.addEventListener(\"${UnitMessage.UNIT_ON_LOAD}\", (e) => {\n postHeight()\n postMessageToSDK({ type: \"${UnitMessage.UNIT_ON_LOAD}\", details: e.detail })\n });\n `,\n requestCloseFlow: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_CLOSE_FLOW}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_CLOSE_FLOW}\" })\n });\n `,\n requestOpenLink: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_OPEN_LINK}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_OPEN_LINK}\", details: e.detail })\n });\n `,\n unitRequestDownload: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_DOWNLOAD}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_DOWNLOAD}\", details: e.detail })\n });\n `,\n cardActivated: `\n window.addEventListener(\"${CardMessage.CARD_ACTIVATED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${CardMessage.CARD_ACTIVATED}\", details: { card: data.data }})\n }).catch((e) => {\n console.log(e)\n })\n });\n `,\n cardStatusChange: `\n window.addEventListener(\"${CardMessage.CARD_STATUS_CHANGED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${CardMessage.CARD_STATUS_CHANGED}\", details: { card: data.data }})\n }).catch((e) => {\n console.log(e)\n })\n });\n `,\n unitRequestExternalSdk: `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_EXTERNAL_SDK}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_EXTERNAL_SDK}\", details: e.detail })\n });\n `,\n unitPaymentCreated: `\n window.addEventListener(\"${PaymentMessage.PAYMENT_CREATED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${PaymentMessage.PAYMENT_CREATED}\", details: { data: data.data }})\n }).catch((e) => {\n console.log(e)\n })\n });\n `,\n unitPlaidTokenCreated: `\n window.addEventListener(\"${UnitMessage.UNIT_PLAID_TOKEN_CREATED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_PLAID_TOKEN_CREATED}\", details: { linkToken: data.data }})\n }).catch((e) => {\n console.log(e)\n })\n });\n `,\n unitAccountChanged: `\n window.addEventListener(\"${AccountMessage.UNIT_ACCOUNT_CHANGED}\", (e) => {\n const response = e.detail\n response.then((data) => {\n postMessageToSDK({ type: \"${AccountMessage.UNIT_ACCOUNT_CHANGED}\", details: { account: data.data }})\n }).catch((e) => {\n console.log(e)\n })\n });\n `,\n unitActivityFiltersChanged: `\n window.addEventListener(\"${ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED}\", (e) => {\n postMessageToSDK({ type: \"${ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED}\", details: e.detail })\n });\n `,\n};\n\nexport const DISPATCH_RENDERING_EVENT = `\n const dispatchRenderingEvent = (details) => {\n const event = new CustomEvent(\"${UnitMessage.UNIT_REQUEST_RENDERING}\",{ detail: JSON.parse(details) })\n window.dispatchEvent(event)\n }\n`;\n\nexport const DISPATCH_REQUEST_REFRESH = `\n const dispatchRefreshEvent = (details) => {\n const event = new CustomEvent(\"${UnitMessage.UNIT_REQUEST_REFRESH}\",{ detail: JSON.parse(details) })\n window.dispatchEvent(event)\n }\n`;\n\nexport const DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT = `\n const dispatchActivityFilterChangedEvent = (details) => {\n const event = new CustomEvent(\"${ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED}\",{ detail: details });\n window.dispatchEvent(event);\n }\n`;\n\nexport const DISPATCH_PLAID_RESPONSE = `\n const dispatchPlaidEvent = (details) => {\n const event = new CustomEvent(\"${UnitMessage.UNIT_PLAID_RESPONSE}\",{ detail: details })\n window.dispatchEvent(event)\n }\n`;\n\nexport const DISPATCH_OPEN_ACTIONS_MENU = `\n const dispatchOpenActionsMenu = (componentName) => {\n document.querySelector(componentName).dispatchEvent(new CustomEvent(\"unitRequestOpenActionsMenu\"))\n }\n`;\n\nexport const DISPATCH_REQUEST_CARD_ACTION = `\n const dispatchRequestCardAction = (action) => {\n document.querySelector(\"unit-elements-card\").dispatchEvent(new CustomEvent(\"unitRequestCardAction\", {detail: {action: action}}))\n }\n`;\n\nexport const DISPATCH_REQUEST_HIDE_SENSITIVE_DATA = `\n const dispatchRequestHideSensitiveData = (componentName) => {\n document.querySelector(componentName).dispatchEvent(new CustomEvent(\"unitRequestHideSensitiveData\"))\n }\n`;\n\nexport const DISPATCH_REQUEST_SHOW_SENSITIVE_DATA = `\n const dispatchRequestShowSensitiveData = (componentName) => {\n document.querySelector(componentName).dispatchEvent(new CustomEvent(\"unitRequestShowSensitiveData\"))\n }\n`;\n\nexport const DISPATCH_REQUEST_ACCOUNT_ACTION = `\n const dispatchRequestAccountAction = (action) => {\n document.querySelector(\"unit-elements-account\").dispatchEvent(new CustomEvent(\"unitRequestAccountAction\", {detail: {action: action}}))\n }\n`;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
const initialState = {};
|
|
3
|
+
const ConfigurationSlice = createSlice({
|
|
4
|
+
name: 'Configuration',
|
|
5
|
+
initialState: initialState,
|
|
6
|
+
reducers: {
|
|
7
|
+
setUnitScript(state, action) {
|
|
8
|
+
state.unitScript = action.payload;
|
|
9
|
+
},
|
|
10
|
+
setTheme(state, action) {
|
|
11
|
+
state.theme = action.payload;
|
|
12
|
+
},
|
|
13
|
+
setLanguage(state, action) {
|
|
14
|
+
state.language = action.payload;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export const {
|
|
19
|
+
setUnitScript,
|
|
20
|
+
setLanguage,
|
|
21
|
+
setTheme
|
|
22
|
+
} = ConfigurationSlice.actions;
|
|
23
|
+
export const selectConfiguration = state => state.configuration;
|
|
24
|
+
export default ConfigurationSlice.reducer;
|
|
25
|
+
//# sourceMappingURL=ConfigurationSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createSlice","initialState","ConfigurationSlice","name","reducers","setUnitScript","state","action","unitScript","payload","setTheme","theme","setLanguage","language","actions","selectConfiguration","configuration","reducer"],"sources":["ConfigurationSlice.ts"],"sourcesContent":["import { createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport type { RootState } from '../store';\n\nexport interface ConfigurationState {\n unitScript?: string;\n theme?: string;\n language?: string;\n}\n\nconst initialState: ConfigurationState = {};\n\nconst ConfigurationSlice = createSlice({\n name: 'Configuration',\n initialState: initialState,\n reducers: {\n setUnitScript(state, action: PayloadAction<string | undefined>) {\n state.unitScript = action.payload;\n },\n setTheme(state, action: PayloadAction<string | undefined>) {\n state.theme = action.payload;\n },\n setLanguage(state, action: PayloadAction<string | undefined>) {\n state.language = action.payload;\n },\n },\n\n});\n\nexport const { setUnitScript, setLanguage, setTheme } = ConfigurationSlice.actions;\nexport const selectConfiguration = (state: RootState) => state.configuration;\nexport default ConfigurationSlice.reducer;\n"],"mappings":"AAAA,SAASA,WAAW,QAAuB,kBAAkB;AAS7D,MAAMC,YAAgC,GAAG,CAAC,CAAC;AAE3C,MAAMC,kBAAkB,GAAGF,WAAW,CAAC;EACrCG,IAAI,EAAE,eAAe;EACrBF,YAAY,EAAEA,YAAY;EAC1BG,QAAQ,EAAE;IACRC,aAAaA,CAACC,KAAK,EAAEC,MAAyC,EAAE;MAC9DD,KAAK,CAACE,UAAU,GAAGD,MAAM,CAACE,OAAO;IACnC,CAAC;IACDC,QAAQA,CAACJ,KAAK,EAAEC,MAAyC,EAAE;MACzDD,KAAK,CAACK,KAAK,GAAGJ,MAAM,CAACE,OAAO;IAC9B,CAAC;IACDG,WAAWA,CAACN,KAAK,EAAEC,MAAyC,EAAE;MAC5DD,KAAK,CAACO,QAAQ,GAAGN,MAAM,CAACE,OAAO;IACjC;EACF;AAEF,CAAC,CAAC;AAEF,OAAO,MAAM;EAAEJ,aAAa;EAAEO,WAAW;EAAEF;AAAS,CAAC,GAAGR,kBAAkB,CAACY,OAAO;AAClF,OAAO,MAAMC,mBAAmB,GAAIT,KAAgB,IAAKA,KAAK,CAACU,aAAa;AAC5E,eAAed,kBAAkB,CAACe,OAAO"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
|
|
3
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
4
|
+
const initialState = {};
|
|
5
|
+
const SharedEventsSlice = createSlice({
|
|
6
|
+
name: 'SharedEvents',
|
|
7
|
+
initialState: initialState,
|
|
8
|
+
reducers: {
|
|
9
|
+
setEvent(state, action) {
|
|
10
|
+
state.event = action.payload;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export const {
|
|
15
|
+
setEvent
|
|
16
|
+
} = SharedEventsSlice.actions;
|
|
17
|
+
export const selectSharedEvents = state => state.sharedEvents;
|
|
18
|
+
export default SharedEventsSlice.reducer;
|
|
19
|
+
//# sourceMappingURL=SharedEventsSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createSlice","initialState","SharedEventsSlice","name","reducers","setEvent","state","action","event","payload","actions","selectSharedEvents","sharedEvents","reducer"],"sources":["SharedEventsSlice.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport type { RootState } from '../store';\nimport type { SlotRendering, WebComponentRendering } from '../types/internal/bottomSheet.types';\nimport type { UNAccountData, UNCardData } from '../types/shared';\nimport type { ActivityFiltersChangedEvent } from '../messages/webMessages/activityMessage';\nimport type { RequestRefreshEvent } from '../messages/webMessages/unitMessages';\nimport type { BottomSheetNativeMessage } from '../messages/nativeMessages/bottomSheetMessage';\nimport type { CardMessage } from '../messages/webMessages/cardMessage';\nimport type { AccountMessage } from '../messages/webMessages/accountMessage';\nimport type { ActivityMessage } from '../messages/webMessages/activityMessage';\nimport type { UnitMessage } from '../messages/webMessages/unitMessages';\nimport type { MultipleCardsMessage } from '../messages/webMessages/multipleCardsMessage';\n\ntype EmptyObj = Record<PropertyKey, never>;\n\ntype SlotRenderingEventState = {\n key: BottomSheetNativeMessage.START_FLOW,\n data: SlotRendering\n}\ntype MultipleCardsCardClickedEventState = {\n key: MultipleCardsMessage.UNIT_MULTIPLE_CARDS_CARD_CLICKED,\n data: UNCardData\n}\n\ntype CardStatusChangedEventState = {\n key: CardMessage.CARD_STATUS_CHANGED,\n data: UNCardData\n}\n\ntype CardActivatedEventState = {\n key: CardMessage.CARD_ACTIVATED,\n data: UNCardData\n}\n\ntype AccountChangedEventState = {\n key: AccountMessage.UNIT_ACCOUNT_CHANGED,\n data: UNAccountData\n}\n\ntype ActivityFiltersChangedEventState = {\n key: ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED\n data: ActivityFiltersChangedEvent\n}\n\ntype RequestCloseFlowEventState = {\n key: UnitMessage.UNIT_REQUEST_CLOSE_FLOW,\n data: EmptyObj\n}\n\ntype WebComponentRenderingEventState = {\n key: BottomSheetNativeMessage.START_FLOW,\n data: WebComponentRendering\n}\n\ntype RequestRefreshEventState = {\n key: UnitMessage.UNIT_REQUEST_REFRESH,\n data: RequestRefreshEvent\n}\n\n//currently left state suffixes to avoid the duplication of the event names\ntype SharedEvent =\n SlotRenderingEventState\n | CardStatusChangedEventState\n | CardActivatedEventState\n | MultipleCardsCardClickedEventState\n | AccountChangedEventState\n | ActivityFiltersChangedEventState\n | RequestCloseFlowEventState\n | WebComponentRenderingEventState\n | RequestRefreshEventState\n\ntype SharedEventsState = {\n event?: SharedEvent\n}\n\nconst initialState: SharedEventsState = {};\n\nconst SharedEventsSlice = createSlice({\n name: 'SharedEvents',\n initialState: initialState,\n reducers: {\n setEvent(state, action: PayloadAction<SharedEvent>) {\n state.event = action.payload;\n },\n },\n\n});\n\nexport const { setEvent } = SharedEventsSlice.actions;\nexport const selectSharedEvents = (state: RootState) => state.sharedEvents;\nexport default SharedEventsSlice.reducer;\n"],"mappings":"AAAA;;AAEA,SAASA,WAAW,QAAuB,kBAAkB;AA2E7D,MAAMC,YAA+B,GAAG,CAAC,CAAC;AAE1C,MAAMC,iBAAiB,GAAGF,WAAW,CAAC;EACpCG,IAAI,EAAE,cAAc;EACpBF,YAAY,EAAEA,YAAY;EAC1BG,QAAQ,EAAE;IACRC,QAAQA,CAACC,KAAK,EAAEC,MAAkC,EAAE;MAClDD,KAAK,CAACE,KAAK,GAAGD,MAAM,CAACE,OAAO;IAC9B;EACF;AAEF,CAAC,CAAC;AAEF,OAAO,MAAM;EAAEJ;AAAS,CAAC,GAAGH,iBAAiB,CAACQ,OAAO;AACrD,OAAO,MAAMC,kBAAkB,GAAIL,KAAgB,IAAKA,KAAK,CAACM,YAAY;AAC1E,eAAeV,iBAAiB,CAACW,OAAO"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
const initialState = {
|
|
3
|
+
signedNonce: null
|
|
4
|
+
};
|
|
5
|
+
const pushProvisioningSlice = createSlice({
|
|
6
|
+
name: 'wallet',
|
|
7
|
+
initialState: initialState,
|
|
8
|
+
reducers: {
|
|
9
|
+
setSignedNonce(state, action) {
|
|
10
|
+
state.signedNonce = action.payload;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export const {
|
|
15
|
+
setSignedNonce
|
|
16
|
+
} = pushProvisioningSlice.actions;
|
|
17
|
+
export const selectWallet = state => state.wallet;
|
|
18
|
+
export default pushProvisioningSlice.reducer;
|
|
19
|
+
//# sourceMappingURL=pushProvisioningSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createSlice","initialState","signedNonce","pushProvisioningSlice","name","reducers","setSignedNonce","state","action","payload","actions","selectWallet","wallet","reducer"],"sources":["pushProvisioningSlice.ts"],"sourcesContent":["import { createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport type { RootState } from '../store';\n\nexport interface PushProvisioningState {\n signedNonce: string | null\n}\n\nconst initialState: PushProvisioningState = {\n signedNonce: null\n};\n\nconst pushProvisioningSlice = createSlice({\n name: 'wallet',\n initialState: initialState,\n reducers: {\n setSignedNonce(state, action: PayloadAction<string | null>) {\n state.signedNonce = action.payload;\n }\n }\n});\n\nexport const { setSignedNonce } = pushProvisioningSlice.actions;\nexport const selectWallet = (state: RootState) => state.wallet;\nexport default pushProvisioningSlice.reducer;\n"],"mappings":"AAAA,SAASA,WAAW,QAAuB,kBAAkB;AAO7D,MAAMC,YAAmC,GAAG;EAC1CC,WAAW,EAAE;AACf,CAAC;AAED,MAAMC,qBAAqB,GAAGH,WAAW,CAAC;EACxCI,IAAI,EAAE,QAAQ;EACdH,YAAY,EAAEA,YAAY;EAC1BI,QAAQ,EAAE;IACRC,cAAcA,CAACC,KAAK,EAAEC,MAAoC,EAAE;MAC1DD,KAAK,CAACL,WAAW,GAAGM,MAAM,CAACC,OAAO;IACpC;EACF;AACF,CAAC,CAAC;AAEF,OAAO,MAAM;EAAEH;AAAe,CAAC,GAAGH,qBAAqB,CAACO,OAAO;AAC/D,OAAO,MAAMC,YAAY,GAAIJ,KAAgB,IAAKA,KAAK,CAACK,MAAM;AAC9D,eAAeT,qBAAqB,CAACU,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './store';\n"],"mappings":"AAAA,cAAc,SAAS"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { configureStore } from '@reduxjs/toolkit';
|
|
2
|
+
import wallet from '../slices/pushProvisioningSlice';
|
|
3
|
+
import configuration from '../slices/ConfigurationSlice';
|
|
4
|
+
import sharedEvents from '../slices/SharedEventsSlice';
|
|
5
|
+
export const store = configureStore({
|
|
6
|
+
reducer: {
|
|
7
|
+
wallet,
|
|
8
|
+
configuration,
|
|
9
|
+
sharedEvents
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["configureStore","wallet","configuration","sharedEvents","store","reducer"],"sources":["store.ts"],"sourcesContent":["import { configureStore } from '@reduxjs/toolkit';\nimport wallet from '../slices/pushProvisioningSlice';\nimport configuration from '../slices/ConfigurationSlice';\nimport sharedEvents from '../slices/SharedEventsSlice';\n\nexport const store = configureStore({\n reducer: {\n wallet,\n configuration,\n sharedEvents,\n },\n});\n\nexport type RootState = ReturnType<typeof store.getState>;\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,kBAAkB;AACjD,OAAOC,MAAM,MAAM,iCAAiC;AACpD,OAAOC,aAAa,MAAM,8BAA8B;AACxD,OAAOC,YAAY,MAAM,6BAA6B;AAEtD,OAAO,MAAMC,KAAK,GAAGJ,cAAc,CAAC;EAClCK,OAAO,EAAE;IACPJ,MAAM;IACNC,aAAa;IACbC;EACF;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
|
|
3
|
+
const isUNErrorData = obj => {
|
|
4
|
+
return typeof obj === 'object' && 'title' in obj;
|
|
5
|
+
};
|
|
6
|
+
export const isUNErrorDataArray = arr => {
|
|
7
|
+
return Array.isArray(arr) && arr.every(item => isUNErrorData(item));
|
|
8
|
+
};
|
|
9
|
+
export const isUNError = error => {
|
|
10
|
+
return 'errors' in error && isUNErrorDataArray(error.errors);
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=errorHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isUNErrorData","obj","isUNErrorDataArray","arr","Array","isArray","every","item","isUNError","error","errors"],"sources":["errorHelpers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { UNErrorData } from '../shared/error.types';\nimport type { UNError } from '../shared';\n\nconst isUNErrorData = (obj: any): obj is UNErrorData => {\n return (\n typeof obj === 'object' &&\n 'title' in obj\n );\n};\n\nexport const isUNErrorDataArray = (arr: any): arr is UNErrorData[] => {\n return (\n Array.isArray(arr) &&\n arr.every((item) => isUNErrorData(item))\n );\n};\n\nexport const isUNError = (error: any): error is UNError => {\n return 'errors' in error && isUNErrorDataArray(error.errors);\n};\n"],"mappings":"AAAA;;AAKA,MAAMA,aAAa,GAAIC,GAAQ,IAAyB;EACtD,OACE,OAAOA,GAAG,KAAK,QAAQ,IACvB,OAAO,IAAIA,GAAG;AAElB,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAIC,GAAQ,IAA2B;EACpE,OACEC,KAAK,CAACC,OAAO,CAACF,GAAG,CAAC,IAClBA,GAAG,CAACG,KAAK,CAAEC,IAAI,IAAKP,aAAa,CAACO,IAAI,CAAC,CAAC;AAE5C,CAAC;AAED,OAAO,MAAMC,SAAS,GAAIC,KAAU,IAAuB;EACzD,OAAO,QAAQ,IAAIA,KAAK,IAAIP,kBAAkB,CAACO,KAAK,CAACC,MAAM,CAAC;AAC9D,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export let WebComponentType;
|
|
2
2
|
(function (WebComponentType) {
|
|
3
3
|
WebComponentType["card"] = "unit-elements-card";
|
|
4
|
+
WebComponentType["multipleCards"] = "unit-elements-multiple-cards";
|
|
4
5
|
WebComponentType["bookPayment"] = "unit-elements-book-payment";
|
|
5
6
|
WebComponentType["activity"] = "unit-elements-activity";
|
|
6
7
|
WebComponentType["slot"] = "unit-elements-sdk-slot";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WebComponentType","PresentationMode"],"sources":["webComponent.types.ts"],"sourcesContent":["export enum WebComponentType {\n card = 'unit-elements-card',\n bookPayment = 'unit-elements-book-payment',\n activity = 'unit-elements-activity',\n slot = 'unit-elements-sdk-slot',\n account = 'unit-elements-account',\n checkDeposit = 'unit-elements-check-deposit',\n achDebitPayment = 'unit-elements-ach-debit-payment',\n achCreditPayment = 'unit-elements-ach-credit-payment',\n
|
|
1
|
+
{"version":3,"names":["WebComponentType","PresentationMode"],"sources":["webComponent.types.ts"],"sourcesContent":["export enum WebComponentType {\n card = 'unit-elements-card',\n multipleCards = 'unit-elements-multiple-cards',\n bookPayment = 'unit-elements-book-payment',\n activity = 'unit-elements-activity',\n slot = 'unit-elements-sdk-slot',\n account = 'unit-elements-account',\n checkDeposit = 'unit-elements-check-deposit',\n achDebitPayment = 'unit-elements-ach-debit-payment',\n achCreditPayment = 'unit-elements-ach-credit-payment',\n cardAction = 'unit-elements-card-action',\n}\n\nexport enum PresentationMode {\n /*\n CoverInjectedHeight - give id (<webViewId> param) to enable style injection to the root. Then cover the injected height.\n\n Inherit - inherit the parent size by style of 100 view height\n\n Default - return the unit component script\n */\n\n CoverInjectedHeight = 'coverInjectedHeight',\n Inherit = 'inherit',\n Default = 'deafult'\n}\n"],"mappings":"AAAA,WAAYA,gBAAgB;AAW3B,WAXWA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAhBA,gBAAgB;AAa5B,WAAYC,gBAAgB;AAY3B,WAZWA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAhBA,gBAAgB"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export let UNActivityComponentPaginationType;
|
|
2
|
+
(function (UNActivityComponentPaginationType) {
|
|
3
|
+
UNActivityComponentPaginationType["infiniteScroll"] = "infiniteScroll";
|
|
4
|
+
UNActivityComponentPaginationType["pagination"] = "pagination";
|
|
5
|
+
})(UNActivityComponentPaginationType || (UNActivityComponentPaginationType = {}));
|
|
2
6
|
//# sourceMappingURL=activity.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["activity.types.ts"],"sourcesContent":["import type { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';\nimport type { UNAuthorizationData } from './authorization.types';\nimport type { UNTransactionData } from './transactions.types';\n\nexport type UNActivityOnLoadData = {\n [RESPONSE_KEYS.
|
|
1
|
+
{"version":3,"names":["UNActivityComponentPaginationType"],"sources":["activity.types.ts"],"sourcesContent":["import type { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';\nimport type { UNAuthorizationData } from './authorization.types';\nimport type { UNTransactionData } from './transactions.types';\n\nexport const enum UNActivityComponentPaginationType {\n infiniteScroll = 'infiniteScroll',\n pagination = 'pagination'\n}\n\nexport type UNActivityOnLoadData = {\n [RESPONSE_KEYS.authorizations]: UNAuthorizationData,\n [RESPONSE_KEYS.transactions]: UNTransactionData,\n}\n"],"mappings":"AAIA,WAAkBA,iCAAiC;AAGlD,WAHiBA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;AAAA,GAAjCA,iCAAiC,KAAjCA,iCAAiC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export let UNErrorCodes;
|
|
2
|
+
(function (UNErrorCodes) {
|
|
3
|
+
UNErrorCodes["FEATURE_DISABLED"] = "feature_disabled";
|
|
4
|
+
UNErrorCodes["INVALID_VALUE"] = "invalid_value";
|
|
5
|
+
UNErrorCodes["LIMITS_EXCEEDED"] = "limits_exceeded";
|
|
6
|
+
UNErrorCodes["NOT_FOUND"] = "not_found";
|
|
7
|
+
UNErrorCodes["ACCOUNT_CUSTOMER_MISMATCH"] = "account_customer_mismatch";
|
|
8
|
+
UNErrorCodes["NOT_SUPPORTED_FOR_ACCOUNT_STATUS"] = "not_supported_for_account_status";
|
|
9
|
+
UNErrorCodes["NOT_SUPPORTED_FOR_ACCOUNT_TYPE"] = "not_supported_for_account_type";
|
|
10
|
+
UNErrorCodes["NOT_SUPPORTED_FOR_CARD"] = "not_supported_for_card";
|
|
11
|
+
UNErrorCodes["NOT_SUPPORTED_FOR_CARD_STATUS"] = "not_supported_for_card_status";
|
|
12
|
+
UNErrorCodes["NOT_SUPPORTED_FOR_CARD_TYPE"] = "not_supported_for_card_type";
|
|
13
|
+
UNErrorCodes["INVALID_NONCE"] = "invalid_nonce";
|
|
14
|
+
UNErrorCodes["NOT_SUPPORTED_FOR_PAYMENT_TYPE"] = "not_supported_for_payment_type";
|
|
15
|
+
UNErrorCodes["PAYMENT_INVALID"] = "payment_invalid";
|
|
16
|
+
UNErrorCodes["UNAUTHORIZED"] = "unauthorized";
|
|
17
|
+
UNErrorCodes["FORBIDDEN"] = "forbidden";
|
|
18
|
+
UNErrorCodes["ALREADY_EXISTS"] = "already_exists";
|
|
19
|
+
UNErrorCodes["CUSTOMER_NAME_UNDELIVERABLE"] = "customer_name_undeliverable";
|
|
20
|
+
UNErrorCodes["CUSTOMER_ADDRESS_UNDELIVERABLE"] = "customer_address_undeliverable";
|
|
21
|
+
})(UNErrorCodes || (UNErrorCodes = {}));
|
|
22
|
+
//# sourceMappingURL=error.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UNErrorCodes"],"sources":["error.types.ts"],"sourcesContent":["export type UNError = {\n errors: UNErrorData[]\n}\n\nexport type UNErrorData = {\n status?: string,\n title: string,\n detail?: string,\n details?: string,\n meta?: UNErrorMeta\n code?: UNErrorCodes,\n error?: Error\n}\n\ninterface UNErrorMeta {\n meta: Record<string, string>,\n}\n\nexport enum UNErrorCodes {\n FEATURE_DISABLED = 'feature_disabled',\n INVALID_VALUE = 'invalid_value',\n LIMITS_EXCEEDED = 'limits_exceeded',\n NOT_FOUND = 'not_found',\n ACCOUNT_CUSTOMER_MISMATCH = 'account_customer_mismatch',\n NOT_SUPPORTED_FOR_ACCOUNT_STATUS = 'not_supported_for_account_status',\n NOT_SUPPORTED_FOR_ACCOUNT_TYPE = 'not_supported_for_account_type',\n NOT_SUPPORTED_FOR_CARD = 'not_supported_for_card',\n NOT_SUPPORTED_FOR_CARD_STATUS = 'not_supported_for_card_status',\n NOT_SUPPORTED_FOR_CARD_TYPE = 'not_supported_for_card_type',\n INVALID_NONCE = 'invalid_nonce',\n NOT_SUPPORTED_FOR_PAYMENT_TYPE = 'not_supported_for_payment_type',\n PAYMENT_INVALID = 'payment_invalid',\n UNAUTHORIZED = 'unauthorized',\n FORBIDDEN = 'forbidden',\n ALREADY_EXISTS = 'already_exists',\n CUSTOMER_NAME_UNDELIVERABLE = 'customer_name_undeliverable',\n CUSTOMER_ADDRESS_UNDELIVERABLE = 'customer_address_undeliverable',\n}\n"],"mappings":"AAkBA,WAAYA,YAAY;AAmBvB,WAnBWA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAZA,YAAY"}
|
|
@@ -7,4 +7,7 @@ export * from './account.types';
|
|
|
7
7
|
export * from './checkDeposit.types';
|
|
8
8
|
export * from './activity.types';
|
|
9
9
|
export * from './fonts.types';
|
|
10
|
+
export * from './error.types';
|
|
11
|
+
export * from './versioning.types';
|
|
12
|
+
export * from './multipleCards.types';
|
|
10
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './bookPayment.types';\nexport * from './card.types';\nexport * from './onLoadResponse.types';\nexport * from './achCredit.types';\nexport * from './payments.types';\nexport * from './account.types';\nexport * from './checkDeposit.types';\nexport * from './activity.types';\nexport * from './fonts.types';\n"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,cAAc;AAC5B,cAAc,wBAAwB;AACtC,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,kBAAkB;AAChC,cAAc,eAAe"}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './bookPayment.types';\nexport * from './card.types';\nexport * from './onLoadResponse.types';\nexport * from './achCredit.types';\nexport * from './payments.types';\nexport * from './account.types';\nexport * from './checkDeposit.types';\nexport * from './activity.types';\nexport * from './fonts.types';\nexport * from './error.types';\nexport * from './versioning.types';\nexport * from './multipleCards.types';\n"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,cAAc;AAC5B,cAAc,wBAAwB;AACtC,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,kBAAkB;AAChC,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,oBAAoB;AAClC,cAAc,uBAAuB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export let UNMultipleCardsComponentPaginationType;
|
|
2
|
+
(function (UNMultipleCardsComponentPaginationType) {
|
|
3
|
+
UNMultipleCardsComponentPaginationType["infiniteScroll"] = "infiniteScroll";
|
|
4
|
+
UNMultipleCardsComponentPaginationType["pagination"] = "pagination";
|
|
5
|
+
})(UNMultipleCardsComponentPaginationType || (UNMultipleCardsComponentPaginationType = {}));
|
|
6
|
+
//# sourceMappingURL=multipleCards.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UNMultipleCardsComponentPaginationType"],"sources":["multipleCards.types.ts"],"sourcesContent":["import type { UNCardData } from './card.types';\n\nexport const enum UNMultipleCardsComponentPaginationType {\n infiniteScroll = 'infiniteScroll',\n pagination = 'pagination'\n}\n\nexport type UNMultipleCardsOnLoadData = UNCardData[];\n"],"mappings":"AAEA,WAAkBA,sCAAsC;AAGvD,WAHiBA,sCAAsC;EAAtCA,sCAAsC;EAAtCA,sCAAsC;AAAA,GAAtCA,sCAAsC,KAAtCA,sCAAsC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=onLoadResponse.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["onLoadResponse.types.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":[],"sources":["onLoadResponse.types.ts"],"sourcesContent":["import type { UNError } from './error.types';\n\nexport type UNOnLoadResponseData<T> = {\n data: T,\n}\n\nexport type UNOnLoadResponse<T> =\n | UNOnLoadResponseData<T>\n | UNError\n"],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export let UNVersioningStrategyType;
|
|
2
|
+
(function (UNVersioningStrategyType) {
|
|
3
|
+
UNVersioningStrategyType["exact"] = "exact";
|
|
4
|
+
UNVersioningStrategyType["upToNextMinor"] = "upToNextMinor";
|
|
5
|
+
UNVersioningStrategyType["upToNextMajor"] = "upToNextMajor";
|
|
6
|
+
})(UNVersioningStrategyType || (UNVersioningStrategyType = {}));
|
|
7
|
+
//# sourceMappingURL=versioning.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UNVersioningStrategyType"],"sources":["versioning.types.ts"],"sourcesContent":["export enum UNVersioningStrategyType {\n exact = 'exact',\n upToNextMinor = 'upToNextMinor',\n upToNextMajor = 'upToNextMajor'\n}\n\ntype UNExactWebVersioningStrategy = {\n type: UNVersioningStrategyType.exact;\n major: number;\n minor: number;\n patch: number;\n}\n\ntype UNUpToNextMinorWebVersioningStrategy = {\n type: UNVersioningStrategyType.upToNextMinor;\n major: number;\n minor: number;\n}\n\ntype UNUpToNextMajorWebVersioningStrategy = {\n type: UNVersioningStrategyType.upToNextMajor;\n major: number;\n}\n\nexport type UNWebVersioningStrategy =\n UNExactWebVersioningStrategy\n | UNUpToNextMinorWebVersioningStrategy\n | UNUpToNextMajorWebVersioningStrategy;\n"],"mappings":"AAAA,WAAYA,wBAAwB;AAInC,WAJWA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAxBA,wBAAwB"}
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { UnitSDK } from './UnitSdkManager';
|
|
2
|
+
import { getUnitScriptUrl } from './UnitSdkManager.utils.internal';
|
|
3
|
+
import { store } from '../store/store';
|
|
4
|
+
import { setUnitScript, selectConfiguration } from '../slices/ConfigurationSlice';
|
|
4
5
|
let isLoadingScript = false;
|
|
5
|
-
|
|
6
|
-
/** globalUnitScript is exported ONLY to our project components **/
|
|
7
|
-
export let globalUnitScript = '';
|
|
8
6
|
export const fetchUnitScript = async () => {
|
|
7
|
+
const configurationState = selectConfiguration(store.getState());
|
|
8
|
+
const globalUnitScript = configurationState.unitScript;
|
|
9
9
|
const env = UnitSDK.getEnv();
|
|
10
|
+
const webVersioningStrategy = UnitSDK.getWebVersioningStrategy();
|
|
10
11
|
if (isLoadingScript || globalUnitScript || !env) {
|
|
11
12
|
// init function is called and success OR in progress
|
|
12
13
|
return null;
|
|
13
14
|
}
|
|
14
15
|
isLoadingScript = true;
|
|
15
16
|
try {
|
|
16
|
-
const unitScriptRes = await fetch(
|
|
17
|
+
const unitScriptRes = await fetch(getUnitScriptUrl(env, webVersioningStrategy));
|
|
17
18
|
const unitScript = await unitScriptRes.text();
|
|
18
19
|
if (unitScript) {
|
|
19
|
-
|
|
20
|
-
unitScript
|
|
21
|
-
};
|
|
22
|
-
EventBus.Instance.event(SDKMessage.IS_SCRIPT_FETCHED, scriptFetchData);
|
|
23
|
-
globalUnitScript = unitScript;
|
|
20
|
+
store.dispatch(setUnitScript(unitScript));
|
|
24
21
|
}
|
|
25
22
|
return null;
|
|
26
23
|
} catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["UnitSDK","getUnitScriptUrl","store","setUnitScript","selectConfiguration","isLoadingScript","fetchUnitScript","configurationState","getState","globalUnitScript","unitScript","env","getEnv","webVersioningStrategy","getWebVersioningStrategy","unitScriptRes","fetch","text","dispatch","e","console","log"],"sources":["UnitSdk.api.ts"],"sourcesContent":["import { UnitSDK } from './UnitSdkManager';\n\nimport { getUnitScriptUrl } from './UnitSdkManager.utils.internal';\nimport { store } from '../store/store';\nimport { setUnitScript, selectConfiguration } from '../slices/ConfigurationSlice';\n\nlet isLoadingScript = false;\n\nexport const fetchUnitScript = async () => {\n const configurationState = selectConfiguration(store.getState());\n const globalUnitScript = configurationState.unitScript;\n const env = UnitSDK.getEnv();\n const webVersioningStrategy = UnitSDK.getWebVersioningStrategy();\n if (isLoadingScript || globalUnitScript || !env) {\n // init function is called and success OR in progress\n return null;\n }\n isLoadingScript = true;\n try {\n const unitScriptRes = await fetch(getUnitScriptUrl(env, webVersioningStrategy));\n const unitScript = await unitScriptRes.text();\n if (unitScript) {\n store.dispatch(setUnitScript(unitScript));\n }\n return null;\n } catch (e) {\n console.log(e);\n return null;\n } finally {\n isLoadingScript = false;\n }\n};\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,kBAAkB;AAE1C,SAASC,gBAAgB,QAAQ,iCAAiC;AAClE,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,aAAa,EAAEC,mBAAmB,QAAQ,8BAA8B;AAEjF,IAAIC,eAAe,GAAG,KAAK;AAE3B,OAAO,MAAMC,eAAe,GAAG,MAAAA,CAAA,KAAY;EACzC,MAAMC,kBAAkB,GAAGH,mBAAmB,CAACF,KAAK,CAACM,QAAQ,EAAE,CAAC;EAChE,MAAMC,gBAAgB,GAAGF,kBAAkB,CAACG,UAAU;EACtD,MAAMC,GAAG,GAAGX,OAAO,CAACY,MAAM,EAAE;EAC5B,MAAMC,qBAAqB,GAAGb,OAAO,CAACc,wBAAwB,EAAE;EAChE,IAAIT,eAAe,IAAII,gBAAgB,IAAI,CAACE,GAAG,EAAE;IAC/C;IACA,OAAO,IAAI;EACb;EACAN,eAAe,GAAG,IAAI;EACtB,IAAI;IACF,MAAMU,aAAa,GAAG,MAAMC,KAAK,CAACf,gBAAgB,CAACU,GAAG,EAAEE,qBAAqB,CAAC,CAAC;IAC/E,MAAMH,UAAU,GAAG,MAAMK,aAAa,CAACE,IAAI,EAAE;IAC7C,IAAIP,UAAU,EAAE;MACdR,KAAK,CAACgB,QAAQ,CAACf,aAAa,CAACO,UAAU,CAAC,CAAC;IAC3C;IACA,OAAO,IAAI;EACb,CAAC,CAAC,OAAOS,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;IACd,OAAO,IAAI;EACb,CAAC,SAAS;IACRd,eAAe,GAAG,KAAK;EACzB;AACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UNVersioningStrategyType } from '../types/shared';
|
|
2
|
+
const WEB_SDK_RECOMMENDED_STRATEGY = {
|
|
3
|
+
type: UNVersioningStrategyType.upToNextMinor,
|
|
4
|
+
major: 1,
|
|
5
|
+
minor: 3
|
|
6
|
+
};
|
|
7
|
+
export const UNSDKConstants = {
|
|
8
|
+
webSDKRecommendedStrategy: WEB_SDK_RECOMMENDED_STRATEGY
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=UnitSdk.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UNVersioningStrategyType","WEB_SDK_RECOMMENDED_STRATEGY","type","upToNextMinor","major","minor","UNSDKConstants","webSDKRecommendedStrategy"],"sources":["UnitSdk.constants.ts"],"sourcesContent":["import { UNVersioningStrategyType, UNWebVersioningStrategy } from '../types/shared';\n\nconst WEB_SDK_RECOMMENDED_STRATEGY: UNWebVersioningStrategy = {\n type: UNVersioningStrategyType.upToNextMinor,\n major: 1,\n minor: 3,\n};\n\nexport const UNSDKConstants = {\n webSDKRecommendedStrategy: WEB_SDK_RECOMMENDED_STRATEGY,\n};\n"],"mappings":"AAAA,SAASA,wBAAwB,QAAiC,iBAAiB;AAEnF,MAAMC,4BAAqD,GAAG;EAC5DC,IAAI,EAAEF,wBAAwB,CAACG,aAAa;EAC5CC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAE;AACT,CAAC;AAED,OAAO,MAAMC,cAAc,GAAG;EAC5BC,yBAAyB,EAAEN;AAC7B,CAAC"}
|
|
@@ -1,38 +1,36 @@
|
|
|
1
1
|
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; }
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
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); }
|
|
4
|
-
import EventBus from '../helpers/EventBus';
|
|
5
|
-
import { SDKMessage } from '../messages/nativeMessages/sdkMessage';
|
|
6
4
|
import { fetchUnitScript } from './UnitSdk.api';
|
|
7
5
|
import { UnitUiManager } from './unitUiManager/unitUiManager';
|
|
6
|
+
import { warnClientIfNeeded } from '../utils/webVersioningStrategy.utils';
|
|
7
|
+
import { UNSDKConstants } from './UnitSdk.constants';
|
|
8
|
+
import { setTheme, setLanguage } from '../slices/ConfigurationSlice';
|
|
9
|
+
import { store } from '../store/store';
|
|
8
10
|
export let UNEnvironment;
|
|
9
11
|
(function (UNEnvironment) {
|
|
10
12
|
UNEnvironment["sandbox"] = "sandbox";
|
|
11
13
|
UNEnvironment["production"] = "production";
|
|
12
14
|
})(UNEnvironment || (UNEnvironment = {}));
|
|
13
|
-
const UNIT_WEB_VERSION = '1';
|
|
14
|
-
export const UNIT_SCRIPT_URL = {
|
|
15
|
-
[UNEnvironment.sandbox]: `https://ui.s.unit.sh/release/${UNIT_WEB_VERSION}/components.js`,
|
|
16
|
-
[UNEnvironment.production]: `https://ui.unit.co/release/${UNIT_WEB_VERSION}/components.js`
|
|
17
|
-
};
|
|
18
15
|
export class UnitSDK {}
|
|
16
|
+
_defineProperty(UnitSDK, "ui", void 0);
|
|
19
17
|
_defineProperty(UnitSDK, "env", void 0);
|
|
18
|
+
_defineProperty(UnitSDK, "webVersioningStrategy", void 0);
|
|
20
19
|
_defineProperty(UnitSDK, "customerToken", void 0);
|
|
21
|
-
_defineProperty(UnitSDK, "theme", void 0);
|
|
22
|
-
_defineProperty(UnitSDK, "language", void 0);
|
|
23
20
|
_defineProperty(UnitSDK, "fonts", void 0);
|
|
24
21
|
_defineProperty(UnitSDK, "signedNonce", void 0);
|
|
25
22
|
_defineProperty(UnitSDK, "pushProvisionModule", void 0);
|
|
26
|
-
_defineProperty(UnitSDK, "
|
|
27
|
-
|
|
23
|
+
_defineProperty(UnitSDK, "init", async function (env, theme, language, fonts) {
|
|
24
|
+
let webVersioningStrategy = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : UNSDKConstants.webSDKRecommendedStrategy;
|
|
28
25
|
try {
|
|
29
26
|
UnitSDK.env = env;
|
|
30
|
-
UnitSDK.
|
|
31
|
-
UnitSDK.language = language;
|
|
27
|
+
UnitSDK.webVersioningStrategy = webVersioningStrategy;
|
|
32
28
|
UnitSDK.fonts = fonts;
|
|
29
|
+
store.dispatch(setTheme(theme));
|
|
30
|
+
store.dispatch(setLanguage(language));
|
|
33
31
|
UnitSDK.ui = new UnitUiManager();
|
|
32
|
+
warnClientIfNeeded(UnitSDK.webVersioningStrategy);
|
|
34
33
|
await fetchUnitScript();
|
|
35
|
-
EventBus.Instance.event(SDKMessage.IS_SDK_INITIALIZED, {});
|
|
36
34
|
} catch (e) {
|
|
37
35
|
console.log(e);
|
|
38
36
|
}
|
|
@@ -43,21 +41,24 @@ _defineProperty(UnitSDK, "setPushProvisioningModule", pushProvisionModule => {
|
|
|
43
41
|
_defineProperty(UnitSDK, "getPushProvisionModule", () => {
|
|
44
42
|
return UnitSDK.pushProvisionModule;
|
|
45
43
|
});
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated - Unit SDK is managing the signedNonce, no need to provide it
|
|
46
|
+
*/
|
|
46
47
|
_defineProperty(UnitSDK, "setSignedNonce", signedNonce => {
|
|
47
48
|
UnitSDK.signedNonce = signedNonce;
|
|
48
49
|
});
|
|
49
50
|
_defineProperty(UnitSDK, "getEnv", () => {
|
|
50
51
|
return UnitSDK.env;
|
|
51
52
|
});
|
|
52
|
-
_defineProperty(UnitSDK, "
|
|
53
|
-
return UnitSDK.
|
|
54
|
-
});
|
|
55
|
-
_defineProperty(UnitSDK, "getLanguage", () => {
|
|
56
|
-
return UnitSDK.language;
|
|
53
|
+
_defineProperty(UnitSDK, "getWebVersioningStrategy", () => {
|
|
54
|
+
return UnitSDK.webVersioningStrategy;
|
|
57
55
|
});
|
|
58
56
|
_defineProperty(UnitSDK, "getFonts", () => {
|
|
59
57
|
return UnitSDK.fonts;
|
|
60
58
|
});
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated - Unit SDK is managing the signedNonce, no need to provide it
|
|
61
|
+
*/
|
|
61
62
|
_defineProperty(UnitSDK, "getSignedNonce", () => {
|
|
62
63
|
return UnitSDK.signedNonce;
|
|
63
64
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["fetchUnitScript","UnitUiManager","warnClientIfNeeded","UNSDKConstants","setTheme","setLanguage","store","UNEnvironment","UnitSDK","_defineProperty","env","theme","language","fonts","webVersioningStrategy","arguments","length","undefined","webSDKRecommendedStrategy","dispatch","ui","e","console","log","pushProvisionModule","signedNonce","customerToken"],"sources":["UnitSdkManager.ts"],"sourcesContent":["import type { NativeModules } from 'react-native';\nimport { fetchUnitScript } from './UnitSdk.api';\nimport { UnitUiManager } from './unitUiManager/unitUiManager';\nimport type { UNFonts } from '../types/shared/fonts.types';\nimport { warnClientIfNeeded } from '../utils/webVersioningStrategy.utils';\nimport { UNSDKConstants } from './UnitSdk.constants';\nimport type { UNWebVersioningStrategy } from '../types/shared';\nimport { setTheme, setLanguage } from '../slices/ConfigurationSlice';\nimport { store } from '../store/store';\n\nexport enum UNEnvironment {\n sandbox = 'sandbox',\n production = 'production'\n}\n\nexport class UnitSDK {\n public static ui: UnitUiManager;\n protected static env?: UNEnvironment;\n protected static webVersioningStrategy: UNWebVersioningStrategy;\n protected static customerToken?: string;\n protected static fonts?: UNFonts;\n protected static signedNonce?: string;\n protected static pushProvisionModule?: typeof NativeModules;\n\n public static init = async (env: UNEnvironment, theme?: string, language?: string, fonts?: UNFonts, webVersioningStrategy: UNWebVersioningStrategy = UNSDKConstants.webSDKRecommendedStrategy) => {\n try {\n this.env = env;\n this.webVersioningStrategy = webVersioningStrategy;\n this.fonts = fonts;\n store.dispatch(setTheme(theme));\n store.dispatch(setLanguage(language));\n this.ui = new UnitUiManager();\n warnClientIfNeeded(this.webVersioningStrategy);\n await fetchUnitScript();\n } catch (e) {\n console.log(e);\n }\n };\n\n public static setPushProvisioningModule = (pushProvisionModule: typeof NativeModules) => {\n this.pushProvisionModule = pushProvisionModule;\n };\n\n public static getPushProvisionModule = () => {\n return this.pushProvisionModule;\n };\n\n /**\n * @deprecated - Unit SDK is managing the signedNonce, no need to provide it\n */\n public static setSignedNonce = (signedNonce: string) => {\n this.signedNonce = signedNonce;\n };\n\n public static getEnv = () => {\n return this.env;\n };\n\n public static getWebVersioningStrategy = () => {\n return this.webVersioningStrategy;\n };\n\n public static getFonts = () => {\n return this.fonts;\n };\n\n /**\n * @deprecated - Unit SDK is managing the signedNonce, no need to provide it\n */\n public static getSignedNonce = () => {\n return this.signedNonce;\n };\n\n public static setCustomerToken = (customerToken: string) => {\n this.customerToken = customerToken;\n };\n\n public static getCustomerToken = () => {\n return this.customerToken;\n };\n\n}\n"],"mappings":";;;AACA,SAASA,eAAe,QAAQ,eAAe;AAC/C,SAASC,aAAa,QAAQ,+BAA+B;AAE7D,SAASC,kBAAkB,QAAQ,sCAAsC;AACzE,SAASC,cAAc,QAAQ,qBAAqB;AAEpD,SAASC,QAAQ,EAAEC,WAAW,QAAQ,8BAA8B;AACpE,SAASC,KAAK,QAAQ,gBAAgB;AAEtC,WAAYC,aAAa;AAGxB,WAHWA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAbA,aAAa;AAKzB,OAAO,MAAMC,OAAO,CAAC;AAkEpBC,eAAA,CAlEYD,OAAO;AAAAC,eAAA,CAAPD,OAAO;AAAAC,eAAA,CAAPD,OAAO;AAAAC,eAAA,CAAPD,OAAO;AAAAC,eAAA,CAAPD,OAAO;AAAAC,eAAA,CAAPD,OAAO;AAAAC,eAAA,CAAPD,OAAO;AAAAC,eAAA,CAAPD,OAAO,UASG,gBAAOE,GAAkB,EAAEC,KAAc,EAAEC,QAAiB,EAAEC,KAAe,EAAgG;EAAA,IAA9FC,qBAA8C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGZ,cAAc,CAACe,yBAAyB;EAC3L,IAAI;IAVKV,OAAO,CAWTE,GAAG,GAAGA,GAAG;IAXPF,OAAO,CAYTM,qBAAqB,GAAGA,qBAAqB;IAZ3CN,OAAO,CAaTK,KAAK,GAAGA,KAAK;IAClBP,KAAK,CAACa,QAAQ,CAACf,QAAQ,CAACO,KAAK,CAAC,CAAC;IAC/BL,KAAK,CAACa,QAAQ,CAACd,WAAW,CAACO,QAAQ,CAAC,CAAC;IAf9BJ,OAAO,CAgBTY,EAAE,GAAG,IAAInB,aAAa,EAAE;IAC7BC,kBAAkB,CAjBXM,OAAO,CAiBUM,qBAAqB,CAAC;IAC9C,MAAMd,eAAe,EAAE;EACzB,CAAC,CAAC,OAAOqB,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;EAChB;AACF,CAAC;AAAAZ,eAAA,CAtBUD,OAAO,+BAwByBgB,mBAAyC,IAAK;EAxB9EhB,OAAO,CAyBXgB,mBAAmB,GAAGA,mBAAmB;AAChD,CAAC;AAAAf,eAAA,CA1BUD,OAAO,4BA4BqB,MAAM;EAC3C,OA7BSA,OAAO,CA6BJgB,mBAAmB;AACjC,CAAC;AAED;AACF;AACA;AAFEf,eAAA,CAhCWD,OAAO,oBAmCciB,WAAmB,IAAK;EAnC7CjB,OAAO,CAoCXiB,WAAW,GAAGA,WAAW;AAChC,CAAC;AAAAhB,eAAA,CArCUD,OAAO,YAuCK,MAAM;EAC3B,OAxCSA,OAAO,CAwCJE,GAAG;AACjB,CAAC;AAAAD,eAAA,CAzCUD,OAAO,8BA2CuB,MAAM;EAC7C,OA5CSA,OAAO,CA4CJM,qBAAqB;AACnC,CAAC;AAAAL,eAAA,CA7CUD,OAAO,cA+CO,MAAM;EAC7B,OAhDSA,OAAO,CAgDJK,KAAK;AACnB,CAAC;AAED;AACF;AACA;AAFEJ,eAAA,CAnDWD,OAAO,oBAsDa,MAAM;EACnC,OAvDSA,OAAO,CAuDJiB,WAAW;AACzB,CAAC;AAAAhB,eAAA,CAxDUD,OAAO,sBA0DgBkB,aAAqB,IAAK;EA1DjDlB,OAAO,CA2DXkB,aAAa,GAAGA,aAAa;AACpC,CAAC;AAAAjB,eAAA,CA5DUD,OAAO,sBA8De,MAAM;EACrC,OA/DSA,OAAO,CA+DJkB,aAAa;AAC3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getWebSdkVersionString } from '../utils/webVersioningStrategy.utils';
|
|
2
|
+
import { UNEnvironment } from './UnitSdkManager';
|
|
3
|
+
export const getUnitScriptUrl = (env, webVersioningStrategy) => {
|
|
4
|
+
const webSdkVersionString = getWebSdkVersionString(webVersioningStrategy);
|
|
5
|
+
switch (env) {
|
|
6
|
+
case UNEnvironment.sandbox:
|
|
7
|
+
return `https://ui.s.unit.sh/release/${webSdkVersionString}/components.js`;
|
|
8
|
+
case UNEnvironment.production:
|
|
9
|
+
return `https://ui.unit.co/release/${webSdkVersionString}/components.js`;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=UnitSdkManager.utils.internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getWebSdkVersionString","UNEnvironment","getUnitScriptUrl","env","webVersioningStrategy","webSdkVersionString","sandbox","production"],"sources":["UnitSdkManager.utils.internal.ts"],"sourcesContent":["import type { UNWebVersioningStrategy } from '../types/shared';\nimport { getWebSdkVersionString } from '../utils/webVersioningStrategy.utils';\nimport { UNEnvironment } from './UnitSdkManager';\n\nexport const getUnitScriptUrl = (env: UNEnvironment, webVersioningStrategy: UNWebVersioningStrategy) => {\n const webSdkVersionString = getWebSdkVersionString(webVersioningStrategy);\n switch (env) {\n case UNEnvironment.sandbox:\n return `https://ui.s.unit.sh/release/${webSdkVersionString}/components.js`;\n case UNEnvironment.production:\n return `https://ui.unit.co/release/${webSdkVersionString}/components.js`;\n }\n};\n"],"mappings":"AACA,SAASA,sBAAsB,QAAQ,sCAAsC;AAC7E,SAASC,aAAa,QAAQ,kBAAkB;AAEhD,OAAO,MAAMC,gBAAgB,GAAGA,CAACC,GAAkB,EAAEC,qBAA8C,KAAK;EACtG,MAAMC,mBAAmB,GAAGL,sBAAsB,CAACI,qBAAqB,CAAC;EACzE,QAAQD,GAAG;IACT,KAAKF,aAAa,CAACK,OAAO;MACxB,OAAQ,gCAA+BD,mBAAoB,gBAAe;IAC5E,KAAKJ,aAAa,CAACM,UAAU;MAC3B,OAAQ,8BAA6BF,mBAAoB,gBAAe;EAAC;AAE/E,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { NativeModules, Platform } from 'react-native';
|
|
2
|
+
const {
|
|
3
|
+
AndroidAppInfo,
|
|
4
|
+
IOSAppInfo
|
|
5
|
+
} = NativeModules;
|
|
6
|
+
const appInfoModule = Platform.OS === 'android' ? AndroidAppInfo : IOSAppInfo;
|
|
7
|
+
export const getAppName = async () => {
|
|
8
|
+
try {
|
|
9
|
+
const response = await appInfoModule.getAppName();
|
|
10
|
+
return response;
|
|
11
|
+
} catch (error) {
|
|
12
|
+
console.error(error);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export const getVersion = async () => {
|
|
16
|
+
try {
|
|
17
|
+
const response = await appInfoModule.getVersion();
|
|
18
|
+
return response;
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.error(error);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export const getBuildNumber = async () => {
|
|
24
|
+
try {
|
|
25
|
+
const response = await appInfoModule.getBuildNumber();
|
|
26
|
+
return response;
|
|
27
|
+
} catch (error) {
|
|
28
|
+
console.error(error);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export const getAppIdentifier = async () => {
|
|
32
|
+
try {
|
|
33
|
+
const response = await appInfoModule.getAppIdentifier();
|
|
34
|
+
return response;
|
|
35
|
+
} catch (error) {
|
|
36
|
+
console.error(error);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=AppInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","AndroidAppInfo","IOSAppInfo","appInfoModule","OS","getAppName","response","error","console","getVersion","getBuildNumber","getAppIdentifier"],"sources":["AppInfo.ts"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nconst { AndroidAppInfo, IOSAppInfo } = NativeModules;\n\nconst appInfoModule = Platform.OS === 'android' ? AndroidAppInfo : IOSAppInfo;\n\nexport const getAppName = async () => {\n try {\n const response = await appInfoModule.getAppName();\n return response;\n } catch (error) {\n console.error(error);\n }\n};\n\nexport const getVersion = async () => {\n try {\n const response = await appInfoModule.getVersion();\n return response;\n } catch (error) {\n console.error(error);\n }\n};\n\nexport const getBuildNumber = async () => {\n try {\n const response = await appInfoModule.getBuildNumber();\n return response;\n } catch (error) {\n console.error(error);\n }\n};\n\nexport const getAppIdentifier = async () => {\n try {\n const response = await appInfoModule.getAppIdentifier();\n return response;\n } catch (error) {\n console.error(error);\n }\n};\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AACtD,MAAM;EAAEC,cAAc;EAAEC;AAAW,CAAC,GAAGH,aAAa;AAEpD,MAAMI,aAAa,GAAGH,QAAQ,CAACI,EAAE,KAAK,SAAS,GAAGH,cAAc,GAAGC,UAAU;AAE7E,OAAO,MAAMG,UAAU,GAAG,MAAAA,CAAA,KAAY;EACpC,IAAI;IACF,MAAMC,QAAQ,GAAG,MAAMH,aAAa,CAACE,UAAU,EAAE;IACjD,OAAOC,QAAQ;EACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;IACdC,OAAO,CAACD,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAED,OAAO,MAAME,UAAU,GAAG,MAAAA,CAAA,KAAY;EACpC,IAAI;IACF,MAAMH,QAAQ,GAAG,MAAMH,aAAa,CAACM,UAAU,EAAE;IACjD,OAAOH,QAAQ;EACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;IACdC,OAAO,CAACD,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAED,OAAO,MAAMG,cAAc,GAAG,MAAAA,CAAA,KAAY;EACxC,IAAI;IACF,MAAMJ,QAAQ,GAAG,MAAMH,aAAa,CAACO,cAAc,EAAE;IACrD,OAAOJ,QAAQ;EACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;IACdC,OAAO,CAACD,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAED,OAAO,MAAMI,gBAAgB,GAAG,MAAAA,CAAA,KAAY;EAC1C,IAAI;IACF,MAAML,QAAQ,GAAG,MAAMH,aAAa,CAACQ,gBAAgB,EAAE;IACvD,OAAOL,QAAQ;EACjB,CAAC,CAAC,OAAOC,KAAK,EAAE;IACdC,OAAO,CAACD,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Package","getSDKVersion","version"],"sources":["SDKInfo.ts"],"sourcesContent":["import Package from '../../package.json';\n\nexport const getSDKVersion = () => {\n return Package.version;\n};\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,oBAAoB;AAExC,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAM;EACjC,OAAOD,OAAO,CAACE,OAAO;AACxB,CAAC"}
|