react-native-unit-components 1.0.4 → 1.2.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/README.md +108 -8
- package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsPackage.kt +6 -1
- package/android/src/main/java/com/unitreactnativecomponents/getapplicationid/UNAppInfoModule.kt +35 -0
- package/lib/commonjs/assets/images/index.js +0 -2
- package/lib/commonjs/assets/images/index.js.map +1 -1
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +64 -0
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -0
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +31 -0
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +108 -0
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -0
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +58 -0
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +11 -29
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js +0 -11
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +14 -22
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +0 -8
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +2 -23
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js +3 -9
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +8 -59
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js +0 -3
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +0 -10
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js +8 -29
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.styles.js +0 -3
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.styles.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +13 -41
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js +3 -17
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/networking/common/UNNetworkConstants.js +0 -2
- package/lib/commonjs/components/UNCardComponent/networking/common/UNNetworkConstants.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/networking/requests/UNWalletPayloadRequest.js +2 -9
- package/lib/commonjs/components/UNCardComponent/networking/requests/UNWalletPayloadRequest.js.map +1 -1
- package/lib/commonjs/components/index.js +22 -10
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.js +5 -47
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.styles.js +0 -5
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.styles.js.map +1 -1
- package/lib/commonjs/helpers/EventBus.js +4 -17
- package/lib/commonjs/helpers/EventBus.js.map +1 -1
- package/lib/commonjs/hooks/listenerToBus.js +14 -14
- package/lib/commonjs/hooks/listenerToBus.js.map +1 -1
- package/lib/commonjs/hooks/useAppStateListener.js +1 -6
- package/lib/commonjs/hooks/useAppStateListener.js.map +1 -1
- package/lib/commonjs/index.js +0 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/messages/nativeMessages/cardMessage.js +1 -18
- package/lib/commonjs/messages/nativeMessages/cardMessage.js.map +1 -1
- package/lib/commonjs/messages/nativeMessages/sdkMessage.js +0 -1
- package/lib/commonjs/messages/nativeMessages/sdkMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/accountMessage.js +12 -0
- package/lib/commonjs/messages/webMessages/accountMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/achCreditMessage.js +6 -0
- package/lib/commonjs/messages/webMessages/achCreditMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/bookPaymentMessage.js +0 -7
- package/lib/commonjs/messages/webMessages/bookPaymentMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/cardMessage.js +0 -1
- package/lib/commonjs/messages/webMessages/cardMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/index.js.map +1 -1
- package/lib/commonjs/messages/webMessages/pageMessage.js +0 -1
- package/lib/commonjs/messages/webMessages/pageMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/paymentsMessage.js +12 -0
- package/lib/commonjs/messages/webMessages/paymentsMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/unitMessages.js +3 -1
- package/lib/commonjs/messages/webMessages/unitMessages.js.map +1 -1
- package/lib/commonjs/nativeComponent/UnitAddToWalletButton.js +0 -2
- package/lib/commonjs/nativeComponent/UnitAddToWalletButton.js.map +1 -1
- package/lib/commonjs/scripts/html/bodyHtml.js +0 -8
- package/lib/commonjs/scripts/html/bodyHtml.js.map +1 -1
- package/lib/commonjs/scripts/html/bodyScript.js +35 -6
- package/lib/commonjs/scripts/html/bodyScript.js.map +1 -1
- package/lib/commonjs/sharedTypes/account.types.js +31 -0
- package/lib/commonjs/sharedTypes/account.types.js.map +1 -0
- package/lib/commonjs/sharedTypes/achCredit.types.js +6 -0
- package/lib/commonjs/sharedTypes/achCredit.types.js.map +1 -0
- package/lib/commonjs/sharedTypes/bookPayment.types.js.map +1 -1
- package/lib/commonjs/sharedTypes/card.types.js.map +1 -1
- package/lib/commonjs/sharedTypes/index.js +33 -6
- package/lib/commonjs/sharedTypes/index.js.map +1 -1
- package/lib/commonjs/sharedTypes/onLoadResponse.types.js.map +1 -1
- package/lib/commonjs/sharedTypes/payments.types.js +12 -0
- package/lib/commonjs/sharedTypes/payments.types.js.map +1 -0
- package/lib/commonjs/sharedTypes/types.js.map +1 -1
- package/lib/commonjs/sharedTypes/wallet.types.js +13 -4
- package/lib/commonjs/sharedTypes/wallet.types.js.map +1 -1
- package/lib/commonjs/styles/variables.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdk.api.js +1 -15
- package/lib/commonjs/unitSdkManager/UnitSdk.api.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js +3 -20
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/commonjs/webComponent/WebComponent.js +7 -36
- package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
- package/lib/commonjs/webComponent/WebComponent.utils.js +0 -7
- package/lib/commonjs/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/commonjs/webComponent/html.js +9 -8
- package/lib/commonjs/webComponent/html.js.map +1 -1
- package/lib/module/assets/images/index.js.map +1 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +55 -0
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -0
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +23 -0
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -0
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +99 -0
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -0
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +48 -0
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -0
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js +11 -11
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js +13 -9
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +2 -11
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js +3 -3
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +8 -35
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js +9 -13
- package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.styles.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.js +13 -20
- package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js +3 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
- package/lib/module/components/UNCardComponent/networking/common/UNNetworkConstants.js.map +1 -1
- package/lib/module/components/UNCardComponent/networking/requests/UNWalletPayloadRequest.js +1 -2
- package/lib/module/components/UNCardComponent/networking/requests/UNWalletPayloadRequest.js.map +1 -1
- package/lib/module/components/index.js +2 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/helpers/BottomSheet/BottomSheet.js +5 -31
- package/lib/module/helpers/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/module/helpers/BottomSheet/BottomSheet.styles.js +2 -1
- package/lib/module/helpers/BottomSheet/BottomSheet.styles.js.map +1 -1
- package/lib/module/helpers/EventBus.js +4 -15
- package/lib/module/helpers/EventBus.js.map +1 -1
- package/lib/module/hooks/listenerToBus.js +14 -10
- package/lib/module/hooks/listenerToBus.js.map +1 -1
- package/lib/module/hooks/useAppStateListener.js +0 -2
- package/lib/module/hooks/useAppStateListener.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/messages/nativeMessages/cardMessage.js +0 -16
- package/lib/module/messages/nativeMessages/cardMessage.js.map +1 -1
- package/lib/module/messages/nativeMessages/sdkMessage.js +0 -1
- package/lib/module/messages/nativeMessages/sdkMessage.js.map +1 -1
- package/lib/module/messages/webMessages/accountMessage.js +5 -0
- package/lib/module/messages/webMessages/accountMessage.js.map +1 -0
- package/lib/module/messages/webMessages/achCreditMessage.js +2 -0
- package/lib/module/messages/webMessages/achCreditMessage.js.map +1 -0
- package/lib/module/messages/webMessages/bookPaymentMessage.js +1 -5
- package/lib/module/messages/webMessages/bookPaymentMessage.js.map +1 -1
- package/lib/module/messages/webMessages/cardMessage.js +0 -1
- package/lib/module/messages/webMessages/cardMessage.js.map +1 -1
- package/lib/module/messages/webMessages/index.js.map +1 -1
- package/lib/module/messages/webMessages/pageMessage.js +0 -1
- package/lib/module/messages/webMessages/pageMessage.js.map +1 -1
- package/lib/module/messages/webMessages/paymentsMessage.js +5 -0
- package/lib/module/messages/webMessages/paymentsMessage.js.map +1 -0
- package/lib/module/messages/webMessages/unitMessages.js +3 -1
- package/lib/module/messages/webMessages/unitMessages.js.map +1 -1
- package/lib/module/nativeComponent/UnitAddToWalletButton.js.map +1 -1
- package/lib/module/scripts/html/bodyHtml.js +0 -7
- package/lib/module/scripts/html/bodyHtml.js.map +1 -1
- package/lib/module/scripts/html/bodyScript.js +33 -1
- package/lib/module/scripts/html/bodyScript.js.map +1 -1
- package/lib/module/sharedTypes/account.types.js +23 -0
- package/lib/module/sharedTypes/account.types.js.map +1 -0
- package/lib/module/sharedTypes/achCredit.types.js +2 -0
- package/lib/module/sharedTypes/achCredit.types.js.map +1 -0
- package/lib/module/sharedTypes/bookPayment.types.js.map +1 -1
- package/lib/module/sharedTypes/card.types.js.map +1 -1
- package/lib/module/sharedTypes/index.js +3 -0
- package/lib/module/sharedTypes/index.js.map +1 -1
- package/lib/module/sharedTypes/onLoadResponse.types.js.map +1 -1
- package/lib/module/sharedTypes/payments.types.js +5 -0
- package/lib/module/sharedTypes/payments.types.js.map +1 -0
- package/lib/module/sharedTypes/types.js.map +1 -1
- package/lib/module/sharedTypes/wallet.types.js +11 -3
- package/lib/module/sharedTypes/wallet.types.js.map +1 -1
- package/lib/module/styles/variables.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdk.api.js +1 -6
- package/lib/module/unitSdkManager/UnitSdk.api.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.js +3 -12
- package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/module/webComponent/WebComponent.js +7 -18
- package/lib/module/webComponent/WebComponent.js.map +1 -1
- package/lib/module/webComponent/WebComponent.utils.js +0 -1
- package/lib/module/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/module/webComponent/html.js +9 -5
- package/lib/module/webComponent/html.js.map +1 -1
- package/lib/typescript/components/UNACHCreditComponent/UNACHCreditComponent.d.ts +11 -0
- package/lib/typescript/components/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts +3 -0
- package/lib/typescript/components/UNACHDebitComponent/UNACHDebitComponent.d.ts +11 -0
- package/lib/typescript/components/UNACHDebitComponent/UNACHDebitComponent.utils.d.ts +7 -0
- package/lib/typescript/components/UNAccountComponent/UNAccountComponent.d.ts +4 -2
- package/lib/typescript/components/UNActivityComponent/UNActivityComponent.d.ts +2 -2
- package/lib/typescript/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +2 -2
- package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts +1 -1
- package/lib/typescript/components/UNCardComponent/UNCardComponent.d.ts +5 -2
- package/lib/typescript/components/UNCardComponent/networking/requests/UNWalletPayloadRequest.d.ts +1 -1
- package/lib/typescript/components/index.d.ts +2 -0
- package/lib/typescript/helpers/EventBus.d.ts +1 -1
- package/lib/typescript/hooks/listenerToBus.d.ts +2 -2
- package/lib/typescript/messages/nativeMessages/cardMessage.d.ts +4 -13
- package/lib/typescript/messages/nativeMessages/index.d.ts +2 -2
- package/lib/typescript/messages/nativeMessages/sdkMessage.d.ts +1 -1
- package/lib/typescript/messages/webMessages/accountMessage.d.ts +8 -0
- package/lib/typescript/messages/webMessages/achCreditMessage.d.ts +5 -0
- package/lib/typescript/messages/webMessages/bookPaymentMessage.d.ts +1 -4
- package/lib/typescript/messages/webMessages/cardMessage.d.ts +1 -1
- package/lib/typescript/messages/webMessages/index.d.ts +6 -3
- package/lib/typescript/messages/webMessages/pageMessage.d.ts +1 -1
- package/lib/typescript/messages/webMessages/paymentsMessage.d.ts +3 -0
- package/lib/typescript/messages/webMessages/unitMessages.d.ts +21 -3
- package/lib/typescript/nativeComponent/UnitAddToWalletButton.d.ts +1 -1
- package/lib/typescript/scripts/html/bodyScript.d.ts +4 -0
- package/lib/typescript/sharedTypes/account.types.d.ts +114 -0
- package/lib/typescript/sharedTypes/achCredit.types.d.ts +31 -0
- package/lib/typescript/sharedTypes/bookPayment.types.d.ts +12 -13
- package/lib/typescript/sharedTypes/card.types.d.ts +18 -18
- package/lib/typescript/sharedTypes/index.d.ts +3 -0
- package/lib/typescript/sharedTypes/onLoadResponse.types.d.ts +3 -3
- package/lib/typescript/sharedTypes/payments.types.d.ts +12 -0
- package/lib/typescript/sharedTypes/types.d.ts +7 -7
- package/lib/typescript/sharedTypes/wallet.types.d.ts +11 -2
- package/lib/typescript/webComponent/WebComponent.d.ts +3 -1
- package/package.json +4 -2
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +73 -0
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.ts +26 -0
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +117 -0
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.ts +48 -0
- package/src/components/UNAccountComponent/UNAccountComponent.tsx +13 -7
- package/src/components/UNActivityComponent/UNActivityComponent.tsx +16 -7
- package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +6 -5
- package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.ts +3 -3
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +13 -5
- package/src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.tsx +9 -10
- package/src/components/UNCardComponent/UNCardComponent.tsx +18 -11
- package/src/components/UNCardComponent/UNCardComponent.utils.ts +3 -0
- package/src/components/UNCardComponent/networking/requests/UNWalletPayloadRequest.ts +1 -1
- package/src/components/index.ts +2 -0
- package/src/helpers/BottomSheet/BottomSheet.tsx +3 -7
- package/src/hooks/listenerToBus.ts +15 -10
- package/src/messages/nativeMessages/cardMessage.ts +5 -15
- package/src/messages/webMessages/accountMessage.ts +12 -0
- package/src/messages/webMessages/achCreditMessage.ts +8 -0
- package/src/messages/webMessages/bookPaymentMessage.ts +0 -4
- package/src/messages/webMessages/index.ts +10 -2
- package/src/messages/webMessages/paymentsMessage.ts +3 -0
- package/src/messages/webMessages/unitMessages.ts +27 -3
- package/src/scripts/html/bodyScript.ts +36 -2
- package/src/sharedTypes/account.types.ts +117 -0
- package/src/sharedTypes/achCredit.types.ts +32 -0
- package/src/sharedTypes/bookPayment.types.ts +11 -12
- package/src/sharedTypes/card.types.ts +18 -18
- package/src/sharedTypes/index.ts +3 -0
- package/src/sharedTypes/onLoadResponse.types.ts +5 -5
- package/src/sharedTypes/payments.types.ts +14 -0
- package/src/sharedTypes/types.ts +8 -8
- package/src/sharedTypes/wallet.types.ts +13 -3
- package/src/webComponent/WebComponent.tsx +5 -5
- package/src/webComponent/html.ts +9 -5
- package/ios/UnitReactNativeComponents.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
- package/ios/UnitReactNativeComponents.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/UnitReactNativeComponents.xcodeproj/project.xcworkspace/xcuserdata/alonshprung.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/UnitReactNativeComponents.xcodeproj/xcuserdata/alonshprung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AccountMessage"],"sources":["accountMessage.ts"],"sourcesContent":["import type { UNAccountData } from '../../sharedTypes';\n\nexport enum AccountMessage {\n UNIT_ACCOUNT_CHANGED = 'unitAccountChanged'\n}\n\nexport interface AccountChangedEvent {\n account: UNAccountData;\n}\n\nexport type AccountEvent =\n | AccountChangedEvent\n"],"mappings":"AAEA,WAAYA,cAAc;AAEzB,WAFWA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAdA,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["achCreditMessage.ts"],"sourcesContent":["import type { UNACHData } from '../../sharedTypes';\n\nexport interface PaymentCreatedEvent {\n data: UNACHData\n}\n\nexport type ACHEvent =\n| PaymentCreatedEvent\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["bookPaymentMessage.ts"],"sourcesContent":["import type { UNBookPaymentData } from '../../sharedTypes';\n\nexport interface PaymentCreatedEvent {\n data: UNBookPaymentData\n}\n\nexport type BookPaymentEvent =\n| PaymentCreatedEvent\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CardMessage"],"sources":["cardMessage.ts"],"sourcesContent":["import type { UNCardData } from '../../sharedTypes';\n\nexport enum CardMessage {\n CARD_STATUS_CHANGED = 'unitCardStatusChanged'\n}\n\nexport interface CardStatusChangedEvent {\n card: UNCardData;\n}\n\nexport type CardEvent =\n | CardStatusChangedEvent\n"],"mappings":"AAEA,WAAYA,
|
|
1
|
+
{"version":3,"names":["CardMessage"],"sources":["cardMessage.ts"],"sourcesContent":["import type { UNCardData } from '../../sharedTypes';\n\nexport enum CardMessage {\n CARD_STATUS_CHANGED = 'unitCardStatusChanged'\n}\n\nexport interface CardStatusChangedEvent {\n card: UNCardData;\n}\n\nexport type CardEvent =\n | CardStatusChangedEvent\n"],"mappings":"AAEA,WAAYA,WAAW;AAEtB,WAFWA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAXA,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import type { BookPaymentEvent
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import type { ACHEvent } from './achCreditMessage';\nimport type { BookPaymentEvent } from './bookPaymentMessage';\n\nimport type { CardEvent, CardMessage } from './cardMessage';\nimport type { PageEvent, PageMessage } from './pageMessage';\nimport type { PaymentMessage } from './paymentsMessage';\nimport type { UnitEvent, UnitMessage } from './unitMessages';\nimport type { AccountEvent, AccountMessage } from './accountMessage';\n\nexport type WebViewMessageType =\n | PageMessage\n | CardMessage\n | UnitMessage\n | PaymentMessage\n | AccountMessage\n\ntype WebViewEvent =\n | PageEvent\n | UnitEvent\n | CardEvent\n | BookPaymentEvent\n | PaymentMessage\n | ACHEvent\n | AccountEvent\n\nexport interface WebViewMessage {\n type: WebViewMessageType,\n details?: WebViewEvent\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PageMessage"],"sources":["pageMessage.ts"],"sourcesContent":["export enum PageMessage {\n PAGE_LOADED = 'pageLoaded',\n PAGE_HEIGHT = 'pageHeight',\n}\n\nexport interface HeightEvent {\n height: number;\n}\n\nexport type PageEvent =\n | HeightEvent\n"],"mappings":"AAAA,WAAYA,
|
|
1
|
+
{"version":3,"names":["PageMessage"],"sources":["pageMessage.ts"],"sourcesContent":["export enum PageMessage {\n PAGE_LOADED = 'pageLoaded',\n PAGE_HEIGHT = 'pageHeight',\n}\n\nexport interface HeightEvent {\n height: number;\n}\n\nexport type PageEvent =\n | HeightEvent\n"],"mappings":"AAAA,WAAYA,WAAW;AAGtB,WAHWA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAXA,WAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PaymentMessage"],"sources":["paymentsMessage.ts"],"sourcesContent":["export enum PaymentMessage {\n PAYMENT_CREATED = 'unitPaymentCreated'\n}\n"],"mappings":"AAAA,WAAYA,cAAc;AAEzB,WAFWA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAdA,cAAc"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export let UnitMessage;
|
|
2
|
-
|
|
3
2
|
(function (UnitMessage) {
|
|
4
3
|
UnitMessage["UNIT_REQUEST_RENDERING"] = "unitRequestRendering";
|
|
5
4
|
UnitMessage["UNIT_REQUEST_REFRESH"] = "unitRequestRefresh";
|
|
@@ -7,5 +6,8 @@ export let UnitMessage;
|
|
|
7
6
|
UnitMessage["UNIT_REQUEST_OPEN_LINK"] = "unitRequestOpenLink";
|
|
8
7
|
UnitMessage["UNIT_ON_LOAD"] = "unitOnLoad";
|
|
9
8
|
UnitMessage["UNIT_REQUEST_DOWNLOAD"] = "unitRequestDownload";
|
|
9
|
+
UnitMessage["UNIT_PLAID_TOKEN_CREATED"] = "unitPlaidLinkTokenCreated";
|
|
10
|
+
UnitMessage["UNIT_REQUEST_EXTERNAL_SDK"] = "unitRequestExternalSdk";
|
|
11
|
+
UnitMessage["UNIT_PLAID_RESPONSE"] = "unitPlaidResponse";
|
|
10
12
|
})(UnitMessage || (UnitMessage = {}));
|
|
11
13
|
//# sourceMappingURL=unitMessages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UnitMessage"],"sources":["unitMessages.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"names":["UnitMessage"],"sources":["unitMessages.ts"],"sourcesContent":["import type { UNResponseUnitOnLoadEvent } from '../../sharedTypes';\n\nexport enum UnitMessage {\n UNIT_REQUEST_RENDERING = 'unitRequestRendering',\n UNIT_REQUEST_REFRESH = 'unitRequestRefresh',\n UNIT_REQUEST_CLOSE_FLOW = 'unitRequestCloseFlow',\n UNIT_REQUEST_OPEN_LINK = 'unitRequestOpenLink',\n UNIT_ON_LOAD = 'unitOnLoad',\n UNIT_REQUEST_DOWNLOAD = 'unitRequestDownload',\n UNIT_PLAID_TOKEN_CREATED = 'unitPlaidLinkTokenCreated',\n UNIT_REQUEST_EXTERNAL_SDK = 'unitRequestExternalSdk',\n UNIT_PLAID_RESPONSE = 'unitPlaidResponse'\n\n}\nexport interface RequestRenderingEvent {\n data: RequestRenderingEventData\n}\n\nexport interface RequestRenderingEventData {\n actionType?: string,\n nativePlace: string,\n nativeComponent: string,\n}\n\nexport interface RequestRefreshEvent {\n refEvent: string;\n dependencies: string[];\n resourceId: string;\n}\n\nexport interface RequestOpenLinkEvent {\n href: string;\n target: string\n}\n\nexport interface RequestDownloadEvent {\n url: string\n accessToken: string\n fileType: string\n responseType: string\n fileName: string\n}\n\nexport interface PlaidTokenCreatedEvent {\n linkToken: PlaidLinkTokenData\n}\n\nexport interface PlaidLinkTokenData {\n type: string,\n attributes: PlaidLinkTokenAttributes\n}\n\ninterface PlaidLinkTokenAttributes {\n linkToken: string,\n expiration: string\n}\n\nexport interface RequestExternalSdkEvent {\n type: string\n}\n\nexport type UnitEvent =\n | RequestRenderingEvent\n | RequestRefreshEvent\n | RequestOpenLinkEvent\n | UNResponseUnitOnLoadEvent\n | RequestDownloadEvent\n | PlaidTokenCreatedEvent\n | RequestExternalSdkEvent\n"],"mappings":"AAEA,WAAYA,WAAW;AAWtB,WAXWA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAXA,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["requireNativeComponent","UnitAddToWalletButtonView"],"sources":["UnitAddToWalletButton.tsx"],"sourcesContent":["import {\n requireNativeComponent,\n} from 'react-native';\n\ntype UnitAddToWalletButtonViewProps = {\n style: object;\n onAddToWalletClicked: () => void;\n};\n\nconst UnitAddToWalletButtonView = requireNativeComponent<UnitAddToWalletButtonViewProps>('UnitAddToWalletButtonView');\n\nexport default UnitAddToWalletButtonView;\n"],"mappings":"AAAA,SACEA,
|
|
1
|
+
{"version":3,"names":["requireNativeComponent","UnitAddToWalletButtonView"],"sources":["UnitAddToWalletButton.tsx"],"sourcesContent":["import {\n requireNativeComponent,\n} from 'react-native';\n\ntype UnitAddToWalletButtonViewProps = {\n style: object;\n onAddToWalletClicked: () => void;\n};\n\nconst UnitAddToWalletButtonView = requireNativeComponent<UnitAddToWalletButtonViewProps>('UnitAddToWalletButtonView');\n\nexport default UnitAddToWalletButtonView;\n"],"mappings":"AAAA,SACEA,sBAAsB,QACjB,cAAc;AAOrB,MAAMC,yBAAyB,GAAGD,sBAAsB,CAAiC,2BAA2B,CAAC;AAErH,eAAeC,yBAAyB"}
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
export const webViewId = 'webViewContainer';
|
|
2
2
|
export let PresentationMode;
|
|
3
|
-
|
|
4
3
|
(function (PresentationMode) {
|
|
5
4
|
PresentationMode["CoverInjectedHeight"] = "coverInjectedHeight";
|
|
6
5
|
PresentationMode["Inherit"] = "inherit";
|
|
7
6
|
PresentationMode["Default"] = "deafult";
|
|
8
7
|
})(PresentationMode || (PresentationMode = {}));
|
|
9
|
-
|
|
10
8
|
export const getHtmlBody = (unitComponent, unitComponentProps, presentationMode) => {
|
|
11
9
|
const currentComponent = `<${unitComponent} ${unitComponentProps || ''} }> </${unitComponent}>`;
|
|
12
|
-
|
|
13
10
|
switch (presentationMode) {
|
|
14
11
|
case PresentationMode.CoverInjectedHeight:
|
|
15
12
|
return getCoverInjectedHeightBodyScript(currentComponent);
|
|
16
|
-
|
|
17
13
|
case PresentationMode.Inherit:
|
|
18
14
|
return getInheritParentSizeScript(currentComponent);
|
|
19
|
-
|
|
20
15
|
default:
|
|
21
16
|
return currentComponent;
|
|
22
17
|
}
|
|
23
18
|
};
|
|
24
|
-
|
|
25
19
|
const getCoverInjectedHeightBodyScript = currentUnitScript => {
|
|
26
20
|
return `
|
|
27
21
|
<div id=${webViewId}>
|
|
@@ -31,7 +25,6 @@ const getCoverInjectedHeightBodyScript = currentUnitScript => {
|
|
|
31
25
|
</div>
|
|
32
26
|
`;
|
|
33
27
|
};
|
|
34
|
-
|
|
35
28
|
const getInheritParentSizeScript = currentUnitScript => {
|
|
36
29
|
return `
|
|
37
30
|
<div style="height: 100vh">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["webViewId","PresentationMode","getHtmlBody","unitComponent","unitComponentProps","presentationMode","currentComponent","CoverInjectedHeight","getCoverInjectedHeightBodyScript","Inherit","getInheritParentSizeScript","currentUnitScript"],"sources":["bodyHtml.ts"],"sourcesContent":["export const webViewId = 'webViewContainer';\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\nexport const getHtmlBody = (unitComponent: string, unitComponentProps?: string, presentationMode?: PresentationMode) => {\n const currentComponent = `<${unitComponent} ${unitComponentProps || ''} }> </${unitComponent}>`;\n\n switch (presentationMode) {\n case PresentationMode.CoverInjectedHeight:\n return getCoverInjectedHeightBodyScript(currentComponent);\n case PresentationMode.Inherit:\n return getInheritParentSizeScript(currentComponent);\n default:\n return currentComponent;\n }\n};\n\nconst getCoverInjectedHeightBodyScript = (currentUnitScript: string) => {\n return `\n <div id=${webViewId}>\n <div style=\"height: 100%; display: block; padding: 1px;\">\n ${currentUnitScript}\n </div>\n </div>\n `;\n};\n\nconst getInheritParentSizeScript = (currentUnitScript: string) => {\n return `\n <div style=\"height: 100vh\">\n ${currentUnitScript}\n </div>\n `;\n};\n"],"mappings":"AAAA,OAAO,MAAMA,SAAS,GAAG,
|
|
1
|
+
{"version":3,"names":["webViewId","PresentationMode","getHtmlBody","unitComponent","unitComponentProps","presentationMode","currentComponent","CoverInjectedHeight","getCoverInjectedHeightBodyScript","Inherit","getInheritParentSizeScript","currentUnitScript"],"sources":["bodyHtml.ts"],"sourcesContent":["export const webViewId = 'webViewContainer';\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\nexport const getHtmlBody = (unitComponent: string, unitComponentProps?: string, presentationMode?: PresentationMode) => {\n const currentComponent = `<${unitComponent} ${unitComponentProps || ''} }> </${unitComponent}>`;\n\n switch (presentationMode) {\n case PresentationMode.CoverInjectedHeight:\n return getCoverInjectedHeightBodyScript(currentComponent);\n case PresentationMode.Inherit:\n return getInheritParentSizeScript(currentComponent);\n default:\n return currentComponent;\n }\n};\n\nconst getCoverInjectedHeightBodyScript = (currentUnitScript: string) => {\n return `\n <div id=${webViewId}>\n <div style=\"height: 100%; display: block; padding: 1px;\">\n ${currentUnitScript}\n </div>\n </div>\n `;\n};\n\nconst getInheritParentSizeScript = (currentUnitScript: string) => {\n return `\n <div style=\"height: 100vh\">\n ${currentUnitScript}\n </div>\n `;\n};\n"],"mappings":"AAAA,OAAO,MAAMA,SAAS,GAAG,kBAAkB;AAE3C,WAAYC,gBAAgB;AAY3B,WAZWA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;AAAA,GAAhBA,gBAAgB,KAAhBA,gBAAgB;AAc5B,OAAO,MAAMC,WAAW,GAAGA,CAACC,aAAqB,EAAEC,kBAA2B,EAAEC,gBAAmC,KAAK;EACtH,MAAMC,gBAAgB,GAAI,IAAGH,aAAc,IAAGC,kBAAkB,IAAI,EAAG,SAAQD,aAAc,GAAE;EAE/F,QAAQE,gBAAgB;IACtB,KAAKJ,gBAAgB,CAACM,mBAAmB;MACvC,OAAOC,gCAAgC,CAACF,gBAAgB,CAAC;IAC3D,KAAKL,gBAAgB,CAACQ,OAAO;MAC3B,OAAOC,0BAA0B,CAACJ,gBAAgB,CAAC;IACrD;MACE,OAAOA,gBAAgB;EAAC;AAE9B,CAAC;AAED,MAAME,gCAAgC,GAAIG,iBAAyB,IAAK;EACtE,OAAQ;AACV,cAAcX,SAAU;AACxB;AACA,UAAUW,iBAAkB;AAC5B;AACA;AACA,GAAG;AACH,CAAC;AAED,MAAMD,0BAA0B,GAAIC,iBAAyB,IAAK;EAChE,OAAQ;AACV;AACA,QAAQA,iBAAkB;AAC1B;AACA,GAAG;AACH,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
|
|
1
2
|
import { CardMessage } from '../../messages/webMessages/cardMessage';
|
|
2
3
|
import { PageMessage } from '../../messages/webMessages/pageMessage';
|
|
3
4
|
import { UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
5
|
+
import { AccountMessage } from '../../messages/webMessages/accountMessage';
|
|
4
6
|
export const POST_MESSAGE_TO_SDK = `
|
|
5
7
|
const postMessageToSDK = (message) => {
|
|
6
8
|
if ('ReactNativeWebView' in window) {
|
|
@@ -58,7 +60,31 @@ export const LISTENERS = {
|
|
|
58
60
|
window.addEventListener("${CardMessage.CARD_STATUS_CHANGED}", (e) => {
|
|
59
61
|
const response = e.detail
|
|
60
62
|
response.then((data) => {
|
|
61
|
-
postMessageToSDK({ type: "${CardMessage.CARD_STATUS_CHANGED}", details: { card:
|
|
63
|
+
postMessageToSDK({ type: "${CardMessage.CARD_STATUS_CHANGED}", details: { card: data.data }})
|
|
64
|
+
}).catch((e) => {
|
|
65
|
+
console.log(e)
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
`,
|
|
69
|
+
unitRequestExternalSdk: `
|
|
70
|
+
window.addEventListener("${UnitMessage.UNIT_REQUEST_EXTERNAL_SDK}", (e) => {
|
|
71
|
+
postMessageToSDK({ type: "${UnitMessage.UNIT_REQUEST_EXTERNAL_SDK}", details: e.detail })
|
|
72
|
+
});
|
|
73
|
+
`,
|
|
74
|
+
unitPaymentCreated: `
|
|
75
|
+
window.addEventListener("${PaymentMessage.PAYMENT_CREATED}", (e) => {
|
|
76
|
+
const response = e.detail
|
|
77
|
+
response.then((data) => {
|
|
78
|
+
postMessageToSDK({ type: "${PaymentMessage.PAYMENT_CREATED}", details: { data: data.data }})
|
|
79
|
+
}).catch((e) => {
|
|
80
|
+
console.log(e)
|
|
81
|
+
})
|
|
82
|
+
});`,
|
|
83
|
+
unitAccountChanged: `
|
|
84
|
+
window.addEventListener("${AccountMessage.UNIT_ACCOUNT_CHANGED}", (e) => {
|
|
85
|
+
const response = e.detail
|
|
86
|
+
response.then((data) => {
|
|
87
|
+
postMessageToSDK({ type: "${AccountMessage.UNIT_ACCOUNT_CHANGED}", details: { account: data.data }})
|
|
62
88
|
}).catch((e) => {
|
|
63
89
|
console.log(e)
|
|
64
90
|
})
|
|
@@ -77,4 +103,10 @@ export const DISPATCH_REQUEST_REFRESH = `
|
|
|
77
103
|
window.dispatchEvent(event)
|
|
78
104
|
}
|
|
79
105
|
`;
|
|
106
|
+
export const DISPATCH_PLAID_RESPONSE = `
|
|
107
|
+
const dispatchPlaidEvent = (details) => {
|
|
108
|
+
const event = new CustomEvent("${UnitMessage.UNIT_PLAID_RESPONSE}",{ detail: details })
|
|
109
|
+
window.dispatchEvent(event)
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
80
112
|
//# sourceMappingURL=bodyScript.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CardMessage","PageMessage","UnitMessage","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","cardStatusChange","CARD_STATUS_CHANGED","DISPATCH_RENDERING_EVENT","DISPATCH_REQUEST_REFRESH"],"sources":["bodyScript.ts"],"sourcesContent":["import { CardMessage } from '../../messages/webMessages/cardMessage';\nimport { PageMessage } from '../../messages/webMessages/pageMessage';\nimport { UnitMessage } from '../../messages/webMessages/unitMessages';\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 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:
|
|
1
|
+
{"version":3,"names":["PaymentMessage","CardMessage","PageMessage","UnitMessage","AccountMessage","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","cardStatusChange","CARD_STATUS_CHANGED","unitRequestExternalSdk","UNIT_REQUEST_EXTERNAL_SDK","unitPaymentCreated","PAYMENT_CREATED","unitAccountChanged","UNIT_ACCOUNT_CHANGED","DISPATCH_RENDERING_EVENT","DISPATCH_REQUEST_REFRESH","DISPATCH_PLAID_RESPONSE","UNIT_PLAID_RESPONSE"],"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';\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 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 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};\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_PLAID_RESPONSE = `\n const dispatchPlaidEvent = (details) => {\n const event = new CustomEvent(\"${UnitMessage.UNIT_PLAID_RESPONSE}\",{ detail: details })\n window.dispatchEvent(event)\n }\n`;\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,4CAA4C;AAC3E,SAASC,WAAW,QAAQ,wCAAwC;AACpE,SAASC,WAAW,QAAQ,wCAAwC;AACpE,SAASC,WAAW,QAAQ,yCAAyC;AACrE,SAASC,cAAc,QAAQ,2CAA2C;AAE1E,OAAO,MAAMC,mBAAmB,GAAI;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,gBAAgB,GAAI;AACjC;AACA;AACA;AACA,kCAAkCJ,WAAW,CAACK,WAAY;AAC1D;AACA;AACA,CAAC;AAED,OAAO,MAAMC,SAAS,GAAG;EACvBC,YAAY,EAAG;AACjB;AACA,kCAAkCP,WAAW,CAACQ,WAAY;AAC1D;AACA,GAAG;EACDC,gBAAgB,EAAG;AACrB,+BAA+BR,WAAW,CAACS,sBAAuB;AAClE,kCAAkCT,WAAW,CAACS,sBAAuB;AACrE;AACA,GAAG;EACDC,cAAc,EAAG;AACnB,+BAA+BV,WAAW,CAACW,oBAAqB;AAChE,kCAAkCX,WAAW,CAACW,oBAAqB;AACnE;AACA,GAAG;EACDC,MAAM,EAAG;AACX,+BAA+BZ,WAAW,CAACa,YAAa;AACxD;AACA,kCAAkCb,WAAW,CAACa,YAAa;AAC3D;AACA,GAAG;EACDC,gBAAgB,EAAG;AACrB,+BAA+Bd,WAAW,CAACe,uBAAwB;AACnE,kCAAkCf,WAAW,CAACe,uBAAwB;AACtE;AACA,GAAG;EACDC,eAAe,EAAG;AACpB,+BAA+BhB,WAAW,CAACiB,sBAAuB;AAClE,kCAAkCjB,WAAW,CAACiB,sBAAuB;AACrE;AACA,GAAG;EACDC,mBAAmB,EAAG;AACxB,+BAA+BlB,WAAW,CAACmB,qBAAsB;AACjE,kCAAkCnB,WAAW,CAACmB,qBAAsB;AACpE;AACA,GAAG;EACDC,gBAAgB,EAAG;AACrB,+BAA+BtB,WAAW,CAACuB,mBAAoB;AAC/D;AACA;AACA,oCAAoCvB,WAAW,CAACuB,mBAAoB;AACpE;AACA;AACA;AACA;AACA,GAAG;EACDC,sBAAsB,EAAG;AAC3B,6BAA6BtB,WAAW,CAACuB,yBAA0B;AACnE,gCAAgCvB,WAAW,CAACuB,yBAA0B;AACtE;AACA,CAAC;EACCC,kBAAkB,EAAE;AACtB,6BAA6B3B,cAAc,CAAC4B,eAAgB;AAC5D;AACA;AACA,oCAAoC5B,cAAc,CAAC4B,eAAgB;AACnE;AACA;AACA;AACA,MAAM;EAEJC,kBAAkB,EAAG;AACvB,+BAA+BzB,cAAc,CAAC0B,oBAAqB;AACnE;AACA;AACA,oCAAoC1B,cAAc,CAAC0B,oBAAqB;AACxE;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,wBAAwB,GAAI;AACzC;AACA,qCAAqC5B,WAAW,CAACS,sBAAuB;AACxE;AACA;AACA,CAAC;AAED,OAAO,MAAMoB,wBAAwB,GAAI;AACzC;AACA,qCAAqC7B,WAAW,CAACW,oBAAqB;AACtE;AACA;AACA,CAAC;AAED,OAAO,MAAMmB,uBAAuB,GAAI;AACxC;AACA,qCAAqC9B,WAAW,CAAC+B,mBAAoB;AACrE;AACA;AACA,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var UNAccountStatus;
|
|
2
|
+
(function (UNAccountStatus) {
|
|
3
|
+
UNAccountStatus["Open"] = "Open";
|
|
4
|
+
UNAccountStatus["Closed"] = "Closed";
|
|
5
|
+
UNAccountStatus["Frozen"] = "Frozen";
|
|
6
|
+
})(UNAccountStatus || (UNAccountStatus = {}));
|
|
7
|
+
export let UNCloseReason;
|
|
8
|
+
(function (UNCloseReason) {
|
|
9
|
+
UNCloseReason["Fraud"] = "Fraud";
|
|
10
|
+
UNCloseReason["ByCustomer"] = "ByCustomer";
|
|
11
|
+
})(UNCloseReason || (UNCloseReason = {}));
|
|
12
|
+
export let UNFraudReason;
|
|
13
|
+
(function (UNFraudReason) {
|
|
14
|
+
UNFraudReason["ACHActivity"] = "ACHActivity";
|
|
15
|
+
UNFraudReason["CardActivity"] = "CardActivity";
|
|
16
|
+
UNFraudReason["CheckActivity"] = "CheckActivity";
|
|
17
|
+
UNFraudReason["ApplicationHistory"] = "ApplicationHistory";
|
|
18
|
+
UNFraudReason["AccountActivity"] = "AccountActivity";
|
|
19
|
+
UNFraudReason["ClientIdentified"] = "ClientIdentified";
|
|
20
|
+
UNFraudReason["IdentityTheft"] = "IdentityTheft";
|
|
21
|
+
UNFraudReason["LinkedToFraudulentCustomer"] = "LinkedToFraudulentCustomer";
|
|
22
|
+
})(UNFraudReason || (UNFraudReason = {}));
|
|
23
|
+
//# sourceMappingURL=account.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UNAccountStatus","UNCloseReason","UNFraudReason"],"sources":["account.types.ts"],"sourcesContent":["import type { UNRelationship, UNTags } from './types';\n\nexport type UNAccountData = UNDepositAccount | UNBatchAccount | UNCreditAccount\n\nenum UNAccountStatus {\n Open = \"Open\",\n Closed = \"Closed\",\n Frozen = \"Frozen\",\n}\n\nexport enum UNCloseReason {\n Fraud = \"Fraud\",\n ByCustomer = \"ByCustomer\",\n}\n\nexport enum UNFraudReason {\n ACHActivity = \"ACHActivity\",\n CardActivity = \"CardActivity\",\n CheckActivity = \"CheckActivity\",\n ApplicationHistory = \"ApplicationHistory\",\n AccountActivity = \"AccountActivity\",\n ClientIdentified = \"ClientIdentified\",\n IdentityTheft = \"IdentityTheft\",\n LinkedToFraudulentCustomer = \"LinkedToFraudulentCustomer\",\n}\n\nexport type UNDepositAccount = {\n id: string\n type: \"depositAccount\"\n attributes: {\n createdAt: string\n updatedAt?: string\n name: string\n depositProduct: string\n routingNumber: string\n accountNumber: string\n maskedAccountNumber?: string\n secondaryAccountNumber?: {\n routingNumber: string\n accountNumber: string\n }\n balance: number\n hold: number\n reserve: number\n available: number\n overdraftLimit?: number\n currency: string\n tags: UNTags\n status: UNAccountStatus\n closeReason?: string\n fraudReason?: UNFraudReason\n closeReasonText?: string\n freezeReason?: string\n isOverdrawnWithinLimit?: boolean\n }\n relationships: {\n customer?: UNRelationship\n customers?: UNRelationship\n org: UNRelationship\n }\n // included?: Individual[]\n}\n\nexport type UNBatchAccount = {\n id: string\n type: \"batchAccount\"\n attributes: {\n createdAt: Date\n updatedAt?: Date\n name: string\n depositProduct: string\n routingNumber: string\n accountNumber: string\n maskedAccountNumber?: string\n balance: number\n hold: number\n reserve: number\n available: number\n currency: string\n status: \"Open\" | \"Closed\"\n closeReason?: string\n fraudReason?: UNFraudReason\n closeReasonText?: string\n freezeReason?: string\n tags?: {[key: string]: string}\n }\n relationships: {\n org: UNRelationship\n }\n}\n\nexport type UNCreditAccount = {\n id: string\n type: \"creditAccount\"\n attributes: {\n createdAt: Date\n updatedAt?: Date\n name: string\n creditTerms: string\n balance: number\n hold: number\n reserve: number\n available: number\n creditLimit: number\n currency: string\n tags: {[key: string]: string}\n status: UNAccountStatus\n closeReason?: UNCloseReason\n fraudReason?: UNFraudReason\n closeReasonText?: string\n freezeReason?: string\n }\n relationships: {\n customer: UNRelationship,\n org: UNRelationship\n }\n}\n"],"mappings":"IAIKA,eAAe;AAAA,WAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;AAAA,GAAfA,eAAe,KAAfA,eAAe;AAMpB,WAAYC,aAAa;AAGxB,WAHWA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAbA,aAAa;AAKzB,WAAYC,aAAa;AASxB,WATWA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAbA,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["achCredit.types.ts"],"sourcesContent":["import type { UNAchCounterparty, UNCounterpartyVerificationMethod, UNPaymentStatus } from './payments.types';\nimport type { UNTags, UNRelationship } from './types';\n\nexport type UNACHData = {\n type: 'achPayment',\n id: string,\n attributes: {\n createdAt: string | Date,\n status: UNPaymentStatus,\n settlementDate?: Date,\n reason: string,\n direction: 'Debit' | 'Credit',\n description: string,\n transactionSummaryOverride?: string,\n amount: string,\n tags: UNTags,\n addenda?: string\n\t\tcounterparty: UNAchCounterparty\n\t\texpectedCompletionDate?: Date\n\t\tcounterpartyVerificationMethod?:keyof typeof UNCounterpartyVerificationMethod\n\t\tsameDay?: boolean\n },\n relationships: {\n account: UNRelationship,\n customer?: UNRelationship,\n customers?: UNRelationship,\n counterpartyAccount: UNRelationship,\n counterpartyCustomer: UNRelationship,\n transaction: UNRelationship,\n recurringPayment: UNRelationship\n }\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["bookPayment.types.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"names":[],"sources":["bookPayment.types.ts"],"sourcesContent":["import type { UNPaymentStatus } from './payments.types';\nimport type { UNTags, UNRelationship } from './types';\n\nexport type UNBookPaymentData = {\n type: 'bookPayment',\n id: string,\n attributes: {\n createdAt: string | Date,\n status: UNPaymentStatus,\n reason: string,\n direction: 'Debit' | 'Credit',\n description: string,\n transactionSummaryOverride?: string,\n amount: string,\n tags: UNTags,\n },\n relationships: {\n account: UNRelationship,\n customer?: UNRelationship,\n customers?: UNRelationship,\n counterpartyAccount: UNRelationship,\n counterpartyCustomer: UNRelationship,\n transaction: UNRelationship,\n recurringPayment: UNRelationship\n }\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["card.types.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"names":[],"sources":["card.types.ts"],"sourcesContent":["import type { UNAddress, UNFullName, UNLimits, UNRelationship, UNTags } from './types';\n\nexport type UNCardData = UNIndividualDebitCard | UNBusinessDebitCard\n\ntype UNCardStatus = 'Active' | 'Inactive' | 'Stolen' | 'Lost' | 'Frozen' | 'ClosedByCustomer' | 'SuspectedFraud'\n\nexport type UNIndividualDebitCard = {\n id: string,\n type: 'individualDebitCard' | 'individualVirtualDebitCard',\n attributes: {\n createdAt: string,\n last4Digits: string,\n expirationDate: string,\n status: UNCardStatus,\n shippingAddress?: UNAddress, /* not exists in virtual card */\n updatedAt?: string,\n design?: string,\n additionalEmbossedText?: string,\n idempotencyKey?: string,\n tags?: UNTags,\n limits?: UNLimits,\n printOnlyBusinessName?: boolean\n },\n relationships: {\n account: UNRelationship,\n customer: UNRelationship\n }\n}\n\nexport type UNBusinessDebitCard = {\n id: string,\n type: 'businessDebitCard' | 'businessVirtualDebitCard',\n attributes: {\n fullName: UNFullName,\n dateOfBirth: string,\n address: UNAddress,\n shippingAddress?: UNAddress,\n phone: string,\n email: string,\n createdAt: string,\n last4Digits: string,\n expirationDate: string,\n status: UNCardStatus,\n updatedAt?: string,\n ssn?: string,\n passport?: string,\n nationality?: string,\n design?: string,\n additionalEmbossedText?: string,\n idempotencyKey?: string,\n tags?: Record<string, string>\n limits?: UNLimits,\n printOnlyBusinessName?: boolean\n },\n relationships: {\n account: UNRelationship,\n customer: UNRelationship\n }\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './bookPayment.types';\nexport * from './card.types';\nexport * from './onLoadResponse.types';\n"],"mappings":"AAAA,cAAc,
|
|
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\";\n"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,cAAc;AAC5B,cAAc,wBAAwB;AACtC,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["onLoadResponse.types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { UNCardData } from '../sharedTypes';\n\nexport type
|
|
1
|
+
{"version":3,"names":[],"sources":["onLoadResponse.types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { UNCardData } from '../sharedTypes';\n\nexport type UNSuccessResponseUnitOnLoad = {\n /*\n Object since the current response data types from 'Activities' and 'BookPayment' do not have documentation.\n When things are determined, we may update it\n */\n data: UNCardData | Object,\n included: [Object],\n errors: null\n}\n\nexport type UNErrorResponseUnitOnLoad = {\n errors: [\n {\n status: string,\n title: string,\n detail?: string,\n details?: string,\n meta?: Record<string, string>\n }\n ]\n}\nexport type UNResponseUnitOnLoadEvent =\n | UNSuccessResponseUnitOnLoad\n | UNErrorResponseUnitOnLoad\n"],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export let UNCounterpartyVerificationMethod;
|
|
2
|
+
(function (UNCounterpartyVerificationMethod) {
|
|
3
|
+
UNCounterpartyVerificationMethod["Plaid"] = "Plaid";
|
|
4
|
+
})(UNCounterpartyVerificationMethod || (UNCounterpartyVerificationMethod = {}));
|
|
5
|
+
//# sourceMappingURL=payments.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UNCounterpartyVerificationMethod"],"sources":["payments.types.ts"],"sourcesContent":["export type UNPaymentStatus = 'Sent' | 'Rejected'\n\nexport type UNAchCounterparty = {\n\tname: string\n\taccountNumber: string\n\troutingNumber: string\n\taccountType: UNAccountType\n}\n\ntype UNAccountType = 'Savings' | 'Checking'\n\nexport enum UNCounterpartyVerificationMethod {\n\tPlaid = 'Plaid',\n}\n"],"mappings":"AAWA,WAAYA,gCAAgC;AAE3C,WAFWA,gCAAgC;EAAhCA,gCAAgC;AAAA,GAAhCA,gCAAgC,KAAhCA,gCAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export type
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export type UNAddress = {\n street: string,\n street2?: string,\n city: string,\n state: string,\n postalCode: string,\n country: string\n}\n\nexport type UNLimits = {\n dailyWithdrawal?: string | number,\n dailyPurchase?: string | number,\n monthlyWithdrawal?: string | number,\n monthlyPurchase?: string | number,\n}\n\ntype UNData = {\n type: string,\n id: string\n}\n\nexport type UNRelationship = {\n data:\n | null\n | []\n | UNData\n | UNData[]\n}\n\nexport type UNFullName = {\n first: string,\n last: string\n}\n\nexport type UNTags = Record<string, string> // TODO: specify Tag type\n"],"mappings":""}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
export let UNWalletCode;
|
|
2
|
-
|
|
3
2
|
(function (UNWalletCode) {
|
|
4
3
|
UNWalletCode["Apple"] = "ApplePayPushProvision";
|
|
5
4
|
UNWalletCode["Google"] = "GooglePayPushProvision";
|
|
6
5
|
})(UNWalletCode || (UNWalletCode = {}));
|
|
7
|
-
|
|
8
6
|
export let UNWalletName;
|
|
9
|
-
|
|
10
7
|
(function (UNWalletName) {
|
|
11
8
|
UNWalletName["Apple"] = "APPLE";
|
|
12
9
|
UNWalletName["Google"] = "GOOGLE";
|
|
13
10
|
})(UNWalletName || (UNWalletName = {}));
|
|
11
|
+
export let UNCardAddToWalletStatus;
|
|
12
|
+
(function (UNCardAddToWalletStatus) {
|
|
13
|
+
UNCardAddToWalletStatus[UNCardAddToWalletStatus["pending"] = 0] = "pending";
|
|
14
|
+
UNCardAddToWalletStatus["readyToProvisioning"] = "ReadyToProvision";
|
|
15
|
+
UNCardAddToWalletStatus["addedToWallet"] = "AlreadyProvisioned";
|
|
16
|
+
UNCardAddToWalletStatus["iosProvisionedInCurrentDevice"] = "ProvisionedInCurrentDevice";
|
|
17
|
+
UNCardAddToWalletStatus["iosProvisionedInPairedDevice"] = "ProvisionedInPairedDevice";
|
|
18
|
+
UNCardAddToWalletStatus["androidNotInstalled"] = "NotInstalled";
|
|
19
|
+
UNCardAddToWalletStatus["androidWalletSetupNotCompleted"] = "WalletSetupNotCompleted";
|
|
20
|
+
UNCardAddToWalletStatus["androidWalletAppUpdateAvailable"] = "WalletAppUpdateAvailable";
|
|
21
|
+
})(UNCardAddToWalletStatus || (UNCardAddToWalletStatus = {}));
|
|
14
22
|
//# sourceMappingURL=wallet.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UNWalletCode","UNWalletName"],"sources":["wallet.types.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["UNWalletCode","UNWalletName","UNCardAddToWalletStatus"],"sources":["wallet.types.ts"],"sourcesContent":["export enum UNWalletCode {\n Apple = 'ApplePayPushProvision',\n Google = 'GooglePayPushProvision',\n}\n\nexport enum UNWalletName {\n Apple = 'APPLE',\n Google = 'GOOGLE',\n}\n\nexport interface UNWallet {\n name: string;\n code: string;\n status: UNCardAddToWalletStatus\n}\n\nexport enum UNCardAddToWalletStatus {\n pending,\n readyToProvisioning = 'ReadyToProvision',\n addedToWallet = 'AlreadyProvisioned',\n iosProvisionedInCurrentDevice = 'ProvisionedInCurrentDevice',\n iosProvisionedInPairedDevice = 'ProvisionedInPairedDevice',\n androidNotInstalled = 'NotInstalled',\n androidWalletSetupNotCompleted = 'WalletSetupNotCompleted',\n androidWalletAppUpdateAvailable = 'WalletAppUpdateAvailable'\n\n}\n"],"mappings":"AAAA,WAAYA,YAAY;AAGvB,WAHWA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAZA,YAAY;AAKxB,WAAYC,YAAY;AAGvB,WAHWA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAZA,YAAY;AAWxB,WAAYC,uBAAuB;AAUlC,WAVWA,uBAAuB;EAAvBA,uBAAuB,CAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAvBA,uBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VARIABLES","COLORS","WHITE","BLACK","BLUE","GREY","SILVER_FLAKE"],"sources":["variables.ts"],"sourcesContent":["export const VARIABLES = {\n COLORS: {\n WHITE: '#ffffff',\n BLACK: '#000000',\n BLUE: '#005fF0',\n GREY: '#bbbbbb',\n SILVER_FLAKE: '#D5DDE0'\n }\n};\n"],"mappings":"AAAA,OAAO,MAAMA,SAAS,GAAG;EACvBC,MAAM,EAAE;IACNC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"names":["VARIABLES","COLORS","WHITE","BLACK","BLUE","GREY","SILVER_FLAKE"],"sources":["variables.ts"],"sourcesContent":["export const VARIABLES = {\n COLORS: {\n WHITE: '#ffffff',\n BLACK: '#000000',\n BLUE: '#005fF0',\n GREY: '#bbbbbb',\n SILVER_FLAKE: '#D5DDE0'\n }\n};\n"],"mappings":"AAAA,OAAO,MAAMA,SAAS,GAAG;EACvBC,MAAM,EAAE;IACNC,KAAK,EAAE,SAAS;IAChBC,KAAK,EAAE,SAAS;IAChBC,IAAI,EAAE,SAAS;IACfC,IAAI,EAAE,SAAS;IACfC,YAAY,EAAE;EAChB;AACF,CAAC"}
|
|
@@ -2,23 +2,19 @@ import EventBus from '../helpers/EventBus';
|
|
|
2
2
|
import { SDKMessage } from '../messages/nativeMessages/sdkMessage';
|
|
3
3
|
import { UnitSDK, UNIT_SCRIPT_URL } from './UnitSdkManager';
|
|
4
4
|
let isLoadingScript = false;
|
|
5
|
-
/** globalUnitScript is exported ONLY to our project components **/
|
|
6
5
|
|
|
6
|
+
/** globalUnitScript is exported ONLY to our project components **/
|
|
7
7
|
export let globalUnitScript = '';
|
|
8
8
|
export const fetchUnitScript = async () => {
|
|
9
9
|
const env = UnitSDK.getEnv();
|
|
10
|
-
|
|
11
10
|
if (isLoadingScript || globalUnitScript || !env) {
|
|
12
11
|
// init function is called and success OR in progress
|
|
13
12
|
return null;
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
isLoadingScript = true;
|
|
17
|
-
|
|
18
15
|
try {
|
|
19
16
|
const unitScriptRes = await fetch(UNIT_SCRIPT_URL[env]);
|
|
20
17
|
const unitScript = await unitScriptRes.text();
|
|
21
|
-
|
|
22
18
|
if (unitScript) {
|
|
23
19
|
const scriptFetchData = {
|
|
24
20
|
unitScript
|
|
@@ -26,7 +22,6 @@ export const fetchUnitScript = async () => {
|
|
|
26
22
|
EventBus.Instance.event(SDKMessage.IS_SCRIPT_FETCHED, scriptFetchData);
|
|
27
23
|
globalUnitScript = unitScript;
|
|
28
24
|
}
|
|
29
|
-
|
|
30
25
|
return null;
|
|
31
26
|
} catch (e) {
|
|
32
27
|
console.log(e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EventBus","SDKMessage","UnitSDK","UNIT_SCRIPT_URL","isLoadingScript","globalUnitScript","fetchUnitScript","env","getEnv","unitScriptRes","fetch","unitScript","text","scriptFetchData","Instance","event","IS_SCRIPT_FETCHED","e","console","log"],"sources":["UnitSdk.api.ts"],"sourcesContent":["import EventBus from '../helpers/EventBus';\nimport { SDKMessage, SdkScriptFetched } from '../messages/nativeMessages/sdkMessage';\nimport { UnitSDK, UNIT_SCRIPT_URL } from './UnitSdkManager';\n\nlet isLoadingScript = false;\n\n/** globalUnitScript is exported ONLY to our project components **/\nexport let globalUnitScript = '';\n\nexport const fetchUnitScript = async () => {\n const env = UnitSDK.getEnv();\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(UNIT_SCRIPT_URL[env]);\n const unitScript = await unitScriptRes.text();\n if (unitScript) {\n const scriptFetchData: SdkScriptFetched = { unitScript };\n EventBus.Instance.event(SDKMessage.IS_SCRIPT_FETCHED, scriptFetchData);\n globalUnitScript = 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,OAAOA,
|
|
1
|
+
{"version":3,"names":["EventBus","SDKMessage","UnitSDK","UNIT_SCRIPT_URL","isLoadingScript","globalUnitScript","fetchUnitScript","env","getEnv","unitScriptRes","fetch","unitScript","text","scriptFetchData","Instance","event","IS_SCRIPT_FETCHED","e","console","log"],"sources":["UnitSdk.api.ts"],"sourcesContent":["import EventBus from '../helpers/EventBus';\nimport { SDKMessage, SdkScriptFetched } from '../messages/nativeMessages/sdkMessage';\nimport { UnitSDK, UNIT_SCRIPT_URL } from './UnitSdkManager';\n\nlet isLoadingScript = false;\n\n/** globalUnitScript is exported ONLY to our project components **/\nexport let globalUnitScript = '';\n\nexport const fetchUnitScript = async () => {\n const env = UnitSDK.getEnv();\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(UNIT_SCRIPT_URL[env]);\n const unitScript = await unitScriptRes.text();\n if (unitScript) {\n const scriptFetchData: SdkScriptFetched = { unitScript };\n EventBus.Instance.event(SDKMessage.IS_SCRIPT_FETCHED, scriptFetchData);\n globalUnitScript = 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,OAAOA,QAAQ,MAAM,qBAAqB;AAC1C,SAASC,UAAU,QAA0B,uCAAuC;AACpF,SAASC,OAAO,EAAEC,eAAe,QAAQ,kBAAkB;AAE3D,IAAIC,eAAe,GAAG,KAAK;;AAE3B;AACA,OAAO,IAAIC,gBAAgB,GAAG,EAAE;AAEhC,OAAO,MAAMC,eAAe,GAAG,MAAAA,CAAA,KAAY;EACzC,MAAMC,GAAG,GAAGL,OAAO,CAACM,MAAM,EAAE;EAC5B,IAAIJ,eAAe,IAAIC,gBAAgB,IAAI,CAACE,GAAG,EAAE;IAC/C;IACA,OAAO,IAAI;EACb;EACAH,eAAe,GAAG,IAAI;EACtB,IAAI;IACF,MAAMK,aAAa,GAAG,MAAMC,KAAK,CAACP,eAAe,CAACI,GAAG,CAAC,CAAC;IACvD,MAAMI,UAAU,GAAG,MAAMF,aAAa,CAACG,IAAI,EAAE;IAC7C,IAAID,UAAU,EAAE;MACd,MAAME,eAAiC,GAAG;QAAEF;MAAW,CAAC;MACxDX,QAAQ,CAACc,QAAQ,CAACC,KAAK,CAACd,UAAU,CAACe,iBAAiB,EAAEH,eAAe,CAAC;MACtER,gBAAgB,GAAGM,UAAU;IAC/B;IACA,OAAO,IAAI;EACb,CAAC,CAAC,OAAOM,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;IACd,OAAO,IAAI;EACb,CAAC,SAAS;IACRb,eAAe,GAAG,KAAK;EACzB;AACF,CAAC"}
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
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); }
|
|
3
4
|
import EventBus from '../helpers/EventBus';
|
|
4
5
|
import { SDKMessage } from '../messages/nativeMessages/sdkMessage';
|
|
5
6
|
import { fetchUnitScript } from './UnitSdk.api';
|
|
6
7
|
export let UNEnvironment;
|
|
7
|
-
|
|
8
8
|
(function (UNEnvironment) {
|
|
9
9
|
UNEnvironment["sandbox"] = "sandbox";
|
|
10
10
|
UNEnvironment["production"] = "production";
|
|
11
11
|
})(UNEnvironment || (UNEnvironment = {}));
|
|
12
|
-
|
|
13
12
|
export const UNIT_SCRIPT_URL = {
|
|
14
13
|
[UNEnvironment.sandbox]: 'https://ui.s.unit.sh/components.js',
|
|
15
14
|
[UNEnvironment.production]: 'https://ui.unit.co/components.js'
|
|
16
15
|
};
|
|
17
16
|
export class UnitSDK {}
|
|
18
|
-
|
|
19
17
|
_defineProperty(UnitSDK, "env", void 0);
|
|
20
|
-
|
|
21
18
|
_defineProperty(UnitSDK, "theme", void 0);
|
|
22
|
-
|
|
23
19
|
_defineProperty(UnitSDK, "signedNonce", void 0);
|
|
24
|
-
|
|
25
20
|
_defineProperty(UnitSDK, "init", async (env, theme) => {
|
|
26
21
|
try {
|
|
27
22
|
UnitSDK.env = env;
|
|
@@ -32,19 +27,15 @@ _defineProperty(UnitSDK, "init", async (env, theme) => {
|
|
|
32
27
|
console.log(e);
|
|
33
28
|
}
|
|
34
29
|
});
|
|
35
|
-
|
|
36
30
|
_defineProperty(UnitSDK, "setSignedNonce", signedNonce => {
|
|
37
31
|
UnitSDK.signedNonce = signedNonce;
|
|
38
32
|
});
|
|
39
|
-
|
|
40
33
|
_defineProperty(UnitSDK, "getEnv", () => {
|
|
41
34
|
return UnitSDK.env;
|
|
42
35
|
});
|
|
43
|
-
|
|
44
36
|
_defineProperty(UnitSDK, "getTheme", () => {
|
|
45
37
|
return UnitSDK.theme;
|
|
46
38
|
});
|
|
47
|
-
|
|
48
39
|
_defineProperty(UnitSDK, "getSignedNonce", () => {
|
|
49
40
|
return UnitSDK.signedNonce;
|
|
50
41
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EventBus","SDKMessage","fetchUnitScript","UNEnvironment","UNIT_SCRIPT_URL","sandbox","production","UnitSDK","env","theme","Instance","event","IS_SDK_INITIALIZED","e","console","log","signedNonce"],"sources":["UnitSdkManager.ts"],"sourcesContent":["import EventBus from '../helpers/EventBus';\nimport { SDKMessage } from '../messages/nativeMessages/sdkMessage';\nimport { fetchUnitScript } from './UnitSdk.api';\n\nexport enum UNEnvironment {\n sandbox = 'sandbox',\n production = 'production'\n}\n\nexport const UNIT_SCRIPT_URL = {\n [UNEnvironment.sandbox]: 'https://ui.s.unit.sh/components.js',\n [UNEnvironment.production]: 'https://ui.unit.co/components.js'\n};\nexport class UnitSDK {\n protected static env?: UNEnvironment;\n protected static theme?: string;\n protected static signedNonce?: string;\n\n public static init = async (env: UNEnvironment, theme?: string) => {\n try {\n this.env = env;\n this.theme = theme;\n await fetchUnitScript();\n EventBus.Instance.event(SDKMessage.IS_SDK_INITIALIZED, {});\n } catch (e) {\n console.log(e);\n }\n };\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 getTheme = () => {\n return this.theme;\n };\n\n public static getSignedNonce = () => {\n return this.signedNonce;\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["EventBus","SDKMessage","fetchUnitScript","UNEnvironment","UNIT_SCRIPT_URL","sandbox","production","UnitSDK","_defineProperty","env","theme","Instance","event","IS_SDK_INITIALIZED","e","console","log","signedNonce"],"sources":["UnitSdkManager.ts"],"sourcesContent":["import EventBus from '../helpers/EventBus';\nimport { SDKMessage } from '../messages/nativeMessages/sdkMessage';\nimport { fetchUnitScript } from './UnitSdk.api';\n\nexport enum UNEnvironment {\n sandbox = 'sandbox',\n production = 'production'\n}\n\nexport const UNIT_SCRIPT_URL = {\n [UNEnvironment.sandbox]: 'https://ui.s.unit.sh/components.js',\n [UNEnvironment.production]: 'https://ui.unit.co/components.js'\n};\nexport class UnitSDK {\n protected static env?: UNEnvironment;\n protected static theme?: string;\n protected static signedNonce?: string;\n\n public static init = async (env: UNEnvironment, theme?: string) => {\n try {\n this.env = env;\n this.theme = theme;\n await fetchUnitScript();\n EventBus.Instance.event(SDKMessage.IS_SDK_INITIALIZED, {});\n } catch (e) {\n console.log(e);\n }\n };\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 getTheme = () => {\n return this.theme;\n };\n\n public static getSignedNonce = () => {\n return this.signedNonce;\n };\n}\n"],"mappings":";;;AAAA,OAAOA,QAAQ,MAAM,qBAAqB;AAC1C,SAASC,UAAU,QAAQ,uCAAuC;AAClE,SAASC,eAAe,QAAQ,eAAe;AAE/C,WAAYC,aAAa;AAGxB,WAHWA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAbA,aAAa;AAKzB,OAAO,MAAMC,eAAe,GAAG;EAC7B,CAACD,aAAa,CAACE,OAAO,GAAG,oCAAoC;EAC7D,CAACF,aAAa,CAACG,UAAU,GAAG;AAC9B,CAAC;AACD,OAAO,MAAMC,OAAO,CAAC;AA+BpBC,eAAA,CA/BYD,OAAO;AAAAC,eAAA,CAAPD,OAAO;AAAAC,eAAA,CAAPD,OAAO;AAAAC,eAAA,CAAPD,OAAO,UAKG,OAAOE,GAAkB,EAAEC,KAAc,KAAK;EACjE,IAAI;IANKH,OAAO,CAOTE,GAAG,GAAGA,GAAG;IAPPF,OAAO,CAQTG,KAAK,GAAGA,KAAK;IAClB,MAAMR,eAAe,EAAE;IACvBF,QAAQ,CAACW,QAAQ,CAACC,KAAK,CAACX,UAAU,CAACY,kBAAkB,EAAE,CAAC,CAAC,CAAC;EAC5D,CAAC,CAAC,OAAOC,CAAC,EAAE;IACVC,OAAO,CAACC,GAAG,CAACF,CAAC,CAAC;EAChB;AACF,CAAC;AAAAN,eAAA,CAdUD,OAAO,oBAgBcU,WAAmB,IAAK;EAhB7CV,OAAO,CAiBXU,WAAW,GAAGA,WAAW;AAChC,CAAC;AAAAT,eAAA,CAlBUD,OAAO,YAoBK,MAAM;EAC3B,OArBSA,OAAO,CAqBJE,GAAG;AACjB,CAAC;AAAAD,eAAA,CAtBUD,OAAO,cAwBO,MAAM;EAC7B,OAzBSA,OAAO,CAyBJG,KAAK;AACnB,CAAC;AAAAF,eAAA,CA1BUD,OAAO,oBA4Ba,MAAM;EACnC,OA7BSA,OAAO,CA6BJU,WAAW;AACzB,CAAC"}
|