react-native-unit-components 1.2.1 → 1.4.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 +0 -255
- package/ios/Camera/Camera.swift +22 -0
- package/ios/Camera/CameraExportModule.m +7 -0
- package/ios/UNAppInfo/UNAppInfo.swift +19 -0
- package/ios/UNAppInfo/UNAppInfoExportModule.m +7 -0
- package/ios/UnitReactNativeComponentsViewManager.swift +7 -7
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +24 -1
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +24 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +28 -3
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js +11 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +32 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +8 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +18 -1
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +7 -0
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +37 -3
- 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/UNCheckDepositComponent/UNCheckDepositComponent.js +97 -0
- package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -0
- package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.js +45 -0
- package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.js.map +1 -0
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/hooks/listenerToBus.js +4 -1
- package/lib/commonjs/hooks/listenerToBus.js.map +1 -1
- package/lib/commonjs/messages/webMessages/activityMessage.js +12 -0
- package/lib/commonjs/messages/webMessages/activityMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/cardMessage.js +1 -0
- package/lib/commonjs/messages/webMessages/cardMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/checkMessage.js +13 -0
- package/lib/commonjs/messages/webMessages/checkMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/index.js.map +1 -1
- package/lib/commonjs/messages/webMessages/onLoadMessage.js +17 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/unitMessages.js.map +1 -1
- package/lib/commonjs/scripts/html/bodyScript.js +42 -1
- package/lib/commonjs/scripts/html/bodyScript.js.map +1 -1
- package/lib/commonjs/sharedTypes/account.types.js +8 -1
- package/lib/commonjs/sharedTypes/account.types.js.map +1 -1
- package/lib/commonjs/sharedTypes/achCredit.types.js.map +1 -1
- package/lib/commonjs/sharedTypes/activity.types.js +6 -0
- package/lib/commonjs/sharedTypes/activity.types.js.map +1 -0
- package/lib/commonjs/sharedTypes/authorization.types.js +2 -0
- package/lib/commonjs/sharedTypes/authorization.types.js.map +1 -0
- package/lib/commonjs/sharedTypes/card.types.js +15 -0
- package/lib/commonjs/sharedTypes/card.types.js.map +1 -1
- package/lib/commonjs/sharedTypes/checkDeposit.types.js +22 -0
- package/lib/commonjs/sharedTypes/checkDeposit.types.js.map +1 -0
- package/lib/commonjs/sharedTypes/index.js +11 -0
- package/lib/commonjs/sharedTypes/index.js.map +1 -1
- package/lib/commonjs/sharedTypes/onLoadResponse.types.js +0 -4
- package/lib/commonjs/sharedTypes/onLoadResponse.types.js.map +1 -1
- package/lib/commonjs/sharedTypes/transactions.types.js +52 -0
- package/lib/commonjs/sharedTypes/transactions.types.js.map +1 -0
- package/lib/commonjs/webComponent/WebComponent.js +35 -2
- package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
- package/lib/commonjs/webComponent/html.js +14 -1
- package/lib/commonjs/webComponent/html.js.map +1 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +24 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +24 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js +30 -5
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js +8 -0
- package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js +33 -2
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js +6 -0
- package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +18 -1
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +7 -0
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.js +39 -5
- 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/UNCheckDepositComponent/UNCheckDepositComponent.js +88 -0
- package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -0
- package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.js +37 -0
- package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/hooks/listenerToBus.js +4 -1
- package/lib/module/hooks/listenerToBus.js.map +1 -1
- package/lib/module/messages/webMessages/activityMessage.js +5 -0
- package/lib/module/messages/webMessages/activityMessage.js.map +1 -0
- package/lib/module/messages/webMessages/cardMessage.js +1 -0
- package/lib/module/messages/webMessages/cardMessage.js.map +1 -1
- package/lib/module/messages/webMessages/checkMessage.js +6 -0
- package/lib/module/messages/webMessages/checkMessage.js.map +1 -0
- package/lib/module/messages/webMessages/index.js.map +1 -1
- package/lib/module/messages/webMessages/onLoadMessage.js +10 -0
- package/lib/module/messages/webMessages/onLoadMessage.js.map +1 -0
- package/lib/module/messages/webMessages/unitMessages.js.map +1 -1
- package/lib/module/scripts/html/bodyScript.js +37 -0
- package/lib/module/scripts/html/bodyScript.js.map +1 -1
- package/lib/module/sharedTypes/account.types.js +6 -0
- package/lib/module/sharedTypes/account.types.js.map +1 -1
- package/lib/module/sharedTypes/achCredit.types.js.map +1 -1
- package/lib/module/sharedTypes/activity.types.js +2 -0
- package/lib/module/sharedTypes/activity.types.js.map +1 -0
- package/lib/module/sharedTypes/authorization.types.js +2 -0
- package/lib/module/sharedTypes/authorization.types.js.map +1 -0
- package/lib/module/sharedTypes/card.types.js +13 -1
- package/lib/module/sharedTypes/card.types.js.map +1 -1
- package/lib/module/sharedTypes/checkDeposit.types.js +15 -0
- package/lib/module/sharedTypes/checkDeposit.types.js.map +1 -0
- package/lib/module/sharedTypes/index.js +2 -1
- package/lib/module/sharedTypes/index.js.map +1 -1
- package/lib/module/sharedTypes/onLoadResponse.types.js +1 -1
- package/lib/module/sharedTypes/onLoadResponse.types.js.map +1 -1
- package/lib/module/sharedTypes/transactions.types.js +44 -0
- package/lib/module/sharedTypes/transactions.types.js.map +1 -0
- package/lib/module/webComponent/WebComponent.js +34 -2
- package/lib/module/webComponent/WebComponent.js.map +1 -1
- package/lib/module/webComponent/html.js +15 -2
- package/lib/module/webComponent/html.js.map +1 -1
- package/lib/typescript/components/UNACHCreditComponent/UNACHCreditComponent.d.ts +2 -2
- package/lib/typescript/components/UNACHDebitComponent/UNACHDebitComponent.d.ts +2 -2
- package/lib/typescript/components/UNAccountComponent/UNAccountComponent.d.ts +11 -3
- package/lib/typescript/components/UNAccountComponent/UNAccountComponent.utils.d.ts +3 -0
- package/lib/typescript/components/UNActivityComponent/UNActivityComponent.d.ts +5 -2
- package/lib/typescript/components/UNActivityComponent/UNActivityComponent.utils.d.ts +1 -0
- package/lib/typescript/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +2 -2
- package/lib/typescript/components/UNCardComponent/UNCardComponent.d.ts +9 -3
- package/lib/typescript/components/UNCardComponent/UNCardComponent.utils.d.ts +3 -0
- package/lib/typescript/components/UNCheckDepositComponent/UNCheckDepositComponent.d.ts +12 -0
- package/lib/typescript/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.d.ts +3 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/messages/webMessages/activityMessage.d.ts +5 -0
- package/lib/typescript/messages/webMessages/cardMessage.d.ts +5 -1
- package/lib/typescript/messages/webMessages/checkMessage.d.ts +8 -0
- package/lib/typescript/messages/webMessages/index.d.ts +4 -2
- package/lib/typescript/messages/webMessages/onLoadMessage.d.ts +30 -0
- package/lib/typescript/messages/webMessages/unitMessages.d.ts +2 -2
- package/lib/typescript/scripts/html/bodyScript.d.ts +6 -0
- package/lib/typescript/sharedTypes/account.types.d.ts +18 -4
- package/lib/typescript/sharedTypes/achCredit.types.d.ts +6 -0
- package/lib/typescript/sharedTypes/activity.types.d.ts +7 -0
- package/lib/typescript/sharedTypes/authorization.types.d.ts +20 -0
- package/lib/typescript/sharedTypes/card.types.d.ts +12 -0
- package/lib/typescript/sharedTypes/checkDeposit.types.d.ts +46 -0
- package/lib/typescript/sharedTypes/index.d.ts +2 -1
- package/lib/typescript/sharedTypes/onLoadResponse.types.d.ts +12 -16
- package/lib/typescript/sharedTypes/transactions.types.d.ts +80 -0
- package/lib/typescript/webComponent/WebComponent.d.ts +1 -0
- package/package.json +3 -3
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +30 -3
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +30 -3
- package/src/components/UNAccountComponent/UNAccountComponent.tsx +52 -9
- package/src/components/UNAccountComponent/UNAccountComponent.utils.ts +11 -0
- package/src/components/UNActivityComponent/UNActivityComponent.tsx +45 -4
- package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +7 -0
- package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +24 -3
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +8 -1
- package/src/components/UNCardComponent/UNCardComponent.tsx +51 -7
- package/src/components/UNCardComponent/UNCardComponent.utils.ts +9 -0
- package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.tsx +112 -0
- package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.utils.ts +40 -0
- package/src/components/index.ts +1 -0
- package/src/hooks/listenerToBus.ts +4 -1
- package/src/messages/webMessages/activityMessage.ts +8 -0
- package/src/messages/webMessages/cardMessage.ts +6 -0
- package/src/messages/webMessages/checkMessage.ts +14 -0
- package/src/messages/webMessages/index.ts +6 -0
- package/src/messages/webMessages/onLoadMessage.ts +45 -0
- package/src/messages/webMessages/unitMessages.ts +2 -2
- package/src/scripts/html/bodyScript.ts +42 -1
- package/src/sharedTypes/account.types.ts +33 -19
- package/src/sharedTypes/achCredit.types.ts +7 -0
- package/src/sharedTypes/activity.types.ts +8 -0
- package/src/sharedTypes/authorization.types.ts +22 -0
- package/src/sharedTypes/card.types.ts +13 -0
- package/src/sharedTypes/checkDeposit.types.ts +50 -0
- package/src/sharedTypes/index.ts +2 -1
- package/src/sharedTypes/onLoadResponse.types.ts +15 -23
- package/src/sharedTypes/transactions.types.ts +84 -0
- package/src/webComponent/WebComponent.tsx +36 -2
- package/src/webComponent/html.ts +15 -2
- package/android/src/main/res/values/themes.xml +0 -16
- package/android/src/main/res/values-night/themes.xml +0 -16
|
@@ -1 +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 =
|
|
1
|
+
{"version":3,"names":["UNAccountStatus","UNCloseReason","UNFraudReason","UNAccountMenuAction"],"sources":["account.types.ts"],"sourcesContent":["import type { UNRelationship, UNTags } from './types';\n\nexport type UNAccountData = UNDepositAccount | UNBatchAccount | UNCreditAccount\n\nexport type UNCounterpartyAccountData = {\n id: string\n attributes: {\n name: string\n tags?: { [key: string]: string }\n }\n}\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\nexport enum UNAccountMenuAction {\n OpenAccountDetails = 'OpenAccountDetails',\n OpenAccountStatements = 'OpenAccountStatements',\n DownloadBankVerificationLetter = 'DownloadBankVerificationLetter',\n}\n"],"mappings":"IAYKA,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;AAuGzB,WAAYC,mBAAmB;AAI9B,WAJWA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,KAAnBA,mBAAmB"}
|
|
@@ -1 +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
|
+
{"version":3,"names":[],"sources":["achCredit.types.ts"],"sourcesContent":["import type { RESPONSE_KEYS } from '../messages/webMessages/onLoadMessage';\nimport type { UNAccountData, UNCounterpartyAccountData } from './account.types';\nimport type { UNAchCounterparty, UNCounterpartyVerificationMethod, UNPaymentStatus } from './payments.types';\nimport type { UNTags, UNRelationship } from './types';\n\nexport type UNACHOnLoadData = {\n [RESPONSE_KEYS.account]: UNAccountData,\n [RESPONSE_KEYS.counterpartyAccount]: [UNCounterpartyAccountData]\n}\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":""}
|
|
@@ -0,0 +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.authorization]: UNAuthorizationData,\n [RESPONSE_KEYS.transactions]: UNTransactionData,\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["authorization.types.ts"],"sourcesContent":["export type UNAuthorizationData = {\n type: string,\n id: string,\n attributes: UNAuthorizationDetails\n}\n\nexport type UNAuthorizationDetails = {\n cardNetwork: string,\n createdAt: Date,\n amount: string,\n merchant?: UNAuthorizationMerchant,\n cardLast4Digits: string,\n recurring : boolean,\n summary: string,\n}\n\nexport type UNAuthorizationMerchant = {\n name: string,\n type: string,\n category: string,\n location?: string,\n}\n"],"mappings":""}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
export
|
|
1
|
+
export let UNCardMenuAction;
|
|
2
|
+
(function (UNCardMenuAction) {
|
|
3
|
+
UNCardMenuAction["Freeze"] = "Freeze";
|
|
4
|
+
UNCardMenuAction["ManagePin"] = "ManagePin";
|
|
5
|
+
UNCardMenuAction["Replace"] = "Replace";
|
|
6
|
+
UNCardMenuAction["Report"] = "Report";
|
|
7
|
+
UNCardMenuAction["Close"] = "Close";
|
|
8
|
+
UNCardMenuAction["Activate"] = "Activate";
|
|
9
|
+
UNCardMenuAction["Unfreeze"] = "Unfreeze";
|
|
10
|
+
UNCardMenuAction["ChangePin"] = "ChangePin";
|
|
11
|
+
UNCardMenuAction["SetPin"] = "SetPin";
|
|
12
|
+
UNCardMenuAction["AddToWallet"] = "AddToWallet";
|
|
13
|
+
})(UNCardMenuAction || (UNCardMenuAction = {}));
|
|
2
14
|
//# sourceMappingURL=card.types.js.map
|
|
@@ -1 +1 @@
|
|
|
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
|
+
{"version":3,"names":["UNCardMenuAction"],"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\nexport enum UNCardMenuAction {\n Freeze = 'Freeze',\n ManagePin = 'ManagePin',\n Replace = 'Replace',\n Report = 'Report',\n Close = 'Close',\n Activate = 'Activate',\n Unfreeze = 'Unfreeze',\n ChangePin = 'ChangePin',\n SetPin = 'SetPin',\n AddToWallet = 'AddToWallet'\n}\n"],"mappings":"AA4DA,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export let UNCheckDepositStatus;
|
|
2
|
+
(function (UNCheckDepositStatus) {
|
|
3
|
+
UNCheckDepositStatus["AwaitingImages"] = "AwaitingImages";
|
|
4
|
+
UNCheckDepositStatus["AwaitingFrontImage"] = "AwaitingFrontImage";
|
|
5
|
+
UNCheckDepositStatus["AwaitingBackImage"] = "AwaitingBackImage";
|
|
6
|
+
UNCheckDepositStatus["PendingReview"] = "PendingReview";
|
|
7
|
+
UNCheckDepositStatus["AwaitingCustomerConfirmation"] = "AwaitingCustomerConfirmation";
|
|
8
|
+
UNCheckDepositStatus["Pending"] = "Pending";
|
|
9
|
+
UNCheckDepositStatus["Rejected"] = "Rejected";
|
|
10
|
+
UNCheckDepositStatus["Clearing"] = "Clearing";
|
|
11
|
+
UNCheckDepositStatus["Sent"] = "Sent";
|
|
12
|
+
UNCheckDepositStatus["Canceled"] = "Canceled";
|
|
13
|
+
UNCheckDepositStatus["Returned"] = "Returned";
|
|
14
|
+
})(UNCheckDepositStatus || (UNCheckDepositStatus = {}));
|
|
15
|
+
//# sourceMappingURL=checkDeposit.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UNCheckDepositStatus"],"sources":["checkDeposit.types.ts"],"sourcesContent":["import type { UNRelationship } from './types';\n\nexport type UNCheckDepositData = {\n\tid: string\n\ttype: string\n\tattributes: UNCheckDepositAttributes\n\trelationships: UNCheckDepositRelationships\n}\n\nexport type UNCheckDepositAttributes = {\n createdAt: Date\n status: keyof typeof UNCheckDepositStatus\n reason?: string\n description: string\n amount: Cents\n checkNumber?: string\n counterparty: UNCheckCounterparty\n settlementDate?: Date\n tags?: {[key: string]: string}\n}\n\nexport type UNCheckDepositRelationships = {\n account: UNRelationship\n customer?: UNRelationship\n customers?: UNRelationship\n org?: UNRelationship\n transaction?: UNRelationship\n}\n\nexport enum UNCheckDepositStatus {\n\tAwaitingImages = 'AwaitingImages',\n\tAwaitingFrontImage = 'AwaitingFrontImage',\n\tAwaitingBackImage = 'AwaitingBackImage',\n\tPendingReview = 'PendingReview',\n\tAwaitingCustomerConfirmation = 'AwaitingCustomerConfirmation',\n\tPending = 'Pending',\n\tRejected = 'Rejected',\n\tClearing = 'Clearing',\n\tSent = 'Sent',\n\tCanceled = 'Canceled',\n\tReturned = 'Returned',\n}\n\nexport type Cents = number\n\nexport type UNCheckCounterparty = {\n\tname: string\n\taccountNumber: string\n\troutingNumber: string\n}\n"],"mappings":"AA6BA,WAAYA,oBAAoB;AAY/B,WAZWA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,KAApBA,oBAAoB"}
|
|
@@ -3,5 +3,6 @@ export * from './card.types';
|
|
|
3
3
|
export * from './onLoadResponse.types';
|
|
4
4
|
export * from './achCredit.types';
|
|
5
5
|
export * from './payments.types';
|
|
6
|
-
export * from
|
|
6
|
+
export * from './account.types';
|
|
7
|
+
export * from './checkDeposit.types';
|
|
7
8
|
//# 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
|
|
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';\n"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,cAAc;AAC5B,cAAc,wBAAwB;AACtC,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
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":["export type UNOnLoadResponseData<T> = {\n data: T,\n}\n\nexport type UNError = {\n errors: UNErrorData[]\n}\n\nexport type UNErrorData = {\n status: string,\n title: string,\n detail?: string,\n details?: string,\n meta?: Record<string, string>\n}\n\nexport type UNOnLoadResponse<T> =\n | UNOnLoadResponseData<T>\n | UNError\n"],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export let UNDirection;
|
|
2
|
+
(function (UNDirection) {
|
|
3
|
+
UNDirection["Debit"] = "Debit";
|
|
4
|
+
UNDirection["Credit"] = "Credit";
|
|
5
|
+
})(UNDirection || (UNDirection = {}));
|
|
6
|
+
export let UNTransactionType;
|
|
7
|
+
(function (UNTransactionType) {
|
|
8
|
+
UNTransactionType["ATM"] = "atmTransaction";
|
|
9
|
+
UNTransactionType["Adjustment"] = "adjustmentTransaction";
|
|
10
|
+
UNTransactionType["BillPay"] = "billPayTransaction";
|
|
11
|
+
UNTransactionType["Book"] = "bookTransaction";
|
|
12
|
+
UNTransactionType["Card"] = "cardTransaction";
|
|
13
|
+
UNTransactionType["CardReversal"] = "cardReverTransactionTypessalTransaction";
|
|
14
|
+
UNTransactionType["Chargeback"] = "chargebackTransaction";
|
|
15
|
+
UNTransactionType["CheckDeposit"] = "checkDepositTransaction";
|
|
16
|
+
UNTransactionType["DishonoredACH"] = "dishonoredAchTransaction";
|
|
17
|
+
UNTransactionType["Dispute"] = "disputeTransaction";
|
|
18
|
+
UNTransactionType["DisputeSettlement"] = "disputeSettlementTransaction";
|
|
19
|
+
UNTransactionType["Fee"] = "feeTransaction";
|
|
20
|
+
UNTransactionType["InterchangeShare"] = "interchangeShareTransaction";
|
|
21
|
+
UNTransactionType["Interest"] = "interestTransaction";
|
|
22
|
+
UNTransactionType["InterestShare"] = "interestShareTransaction";
|
|
23
|
+
UNTransactionType["NegativeBalanceCoverage"] = "negativeBalanceCoverageTransaction";
|
|
24
|
+
UNTransactionType["OriginatedACH"] = "originatedAchTransaction";
|
|
25
|
+
UNTransactionType["PaymentAdvance"] = "paymentAdvanceTransaction";
|
|
26
|
+
UNTransactionType["PaymentCanceled"] = "paymentCanceledTransaction";
|
|
27
|
+
UNTransactionType["Purchase"] = "purchaseTransaction";
|
|
28
|
+
UNTransactionType["ReceivedACH"] = "receivedAchTransaction";
|
|
29
|
+
UNTransactionType["Release"] = "releaseTransaction";
|
|
30
|
+
UNTransactionType["RepaidPaymentAdvance"] = "repaidPaymentAdvanceTransaction";
|
|
31
|
+
UNTransactionType["ReturnedACH"] = "returnedAchTransaction";
|
|
32
|
+
UNTransactionType["ReturnedCheckDeposit"] = "returnedCheckDepositTransaction";
|
|
33
|
+
UNTransactionType["ReturnedReceivedACH"] = "returnedReceivedAchTransaction";
|
|
34
|
+
UNTransactionType["Reward"] = "rewardTransaction";
|
|
35
|
+
UNTransactionType["Settlement"] = "settlementTransaction";
|
|
36
|
+
UNTransactionType["SponsoredInterest"] = "sponsoredInterestTransaction";
|
|
37
|
+
UNTransactionType["Wire"] = "wireTransaction";
|
|
38
|
+
UNTransactionType["AccountLowBalanceClosure"] = "accountLowBalanceClosureTransaction";
|
|
39
|
+
UNTransactionType["CashDeposit"] = "cashDepositTransaction";
|
|
40
|
+
UNTransactionType["BankRepayment"] = "bankRepaymentTransaction";
|
|
41
|
+
UNTransactionType["CustomerRepayment"] = "CustomerRepaymentTransaction";
|
|
42
|
+
UNTransactionType["CustomerRepaymentReturned"] = "CustomerRepaymentReturnedTransaction";
|
|
43
|
+
})(UNTransactionType || (UNTransactionType = {}));
|
|
44
|
+
//# sourceMappingURL=transactions.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UNDirection","UNTransactionType"],"sources":["transactions.types.ts"],"sourcesContent":["export type UNTransactionData = {\n type: UNTransactionType,\n id: string,\n attributes: UNATransactionAttributes,\n relationships: UNTransactionRelationships\n}\n\nexport type UNATransactionAttributes = {\n createdAt: Date,\n amount: string,\n direction?: UNDirection,\n balance?: string,\n summary?: string,\n companyName?: string,\n counterpartyName?: string,\n counterpartyRoutingNumber?: string,\n reason?: string,\n}\n\nexport type UNTransactionRelationships = {\n customer?: {\n data: {\n type: string\n id: number\n }\n }\n customers?: {\n data: [\n {\n type: 'customer'\n id: string\n }\n ]\n }\n org?: {\n data: {\n type: string\n id: number\n }\n }\n}\n\nexport enum UNDirection {\n\tDebit = 'Debit',\n\tCredit = 'Credit',\n}\n\nexport enum UNTransactionType {\n\tATM = 'atmTransaction',\n\tAdjustment = 'adjustmentTransaction',\n\tBillPay = 'billPayTransaction',\n\tBook = 'bookTransaction',\n\tCard = 'cardTransaction',\n\tCardReversal = 'cardReverTransactionTypessalTransaction',\n\tChargeback = 'chargebackTransaction',\n\tCheckDeposit = 'checkDepositTransaction',\n\tDishonoredACH = 'dishonoredAchTransaction',\n\tDispute = 'disputeTransaction',\n\tDisputeSettlement = 'disputeSettlementTransaction',\n\tFee = 'feeTransaction',\n\tInterchangeShare = 'interchangeShareTransaction',\n\tInterest = 'interestTransaction',\n\tInterestShare = 'interestShareTransaction',\n\tNegativeBalanceCoverage = 'negativeBalanceCoverageTransaction',\n\tOriginatedACH = 'originatedAchTransaction',\n\tPaymentAdvance = 'paymentAdvanceTransaction',\n\tPaymentCanceled = 'paymentCanceledTransaction',\n\tPurchase = 'purchaseTransaction',\n\tReceivedACH = 'receivedAchTransaction',\n\tRelease = 'releaseTransaction',\n\tRepaidPaymentAdvance = 'repaidPaymentAdvanceTransaction',\n\tReturnedACH = 'returnedAchTransaction',\n\tReturnedCheckDeposit = 'returnedCheckDepositTransaction',\n\tReturnedReceivedACH = 'returnedReceivedAchTransaction',\n\tReward = 'rewardTransaction',\n\tSettlement = 'settlementTransaction',\n\tSponsoredInterest = 'sponsoredInterestTransaction',\n\tWire = 'wireTransaction',\n\tAccountLowBalanceClosure = 'accountLowBalanceClosureTransaction',\n\tCashDeposit = 'cashDepositTransaction',\n\tBankRepayment = 'bankRepaymentTransaction',\n\tCustomerRepayment = 'CustomerRepaymentTransaction',\n\tCustomerRepaymentReturned = 'CustomerRepaymentReturnedTransaction',\n}\n"],"mappings":"AA0CA,WAAYA,WAAW;AAGtB,WAHWA,WAAW;EAAXA,WAAW;EAAXA,WAAW;AAAA,GAAXA,WAAW,KAAXA,WAAW;AAKvB,WAAYC,iBAAiB;AAoC5B,WApCWA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;AAAA,GAAjBA,iBAAiB,KAAjBA,iBAAiB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import { NativeModules, Platform } from 'react-native';
|
|
3
4
|
import { WebView } from 'react-native-webview';
|
|
4
5
|
import EventBus from '../helpers/EventBus';
|
|
5
6
|
import html, { HTML_PLACEHOLDER } from './html';
|
|
@@ -10,6 +11,9 @@ import { fetchUnitScript, globalUnitScript } from '../unitSdkManager/UnitSdk.api
|
|
|
10
11
|
import { UnitSDK } from '../unitSdkManager/UnitSdkManager';
|
|
11
12
|
import { SDKMessage } from '../messages/nativeMessages/sdkMessage';
|
|
12
13
|
import { handleRequestDownload } from './WebComponent.utils';
|
|
14
|
+
const {
|
|
15
|
+
UNAppInfo
|
|
16
|
+
} = NativeModules;
|
|
13
17
|
export let WebComponentType;
|
|
14
18
|
(function (WebComponentType) {
|
|
15
19
|
WebComponentType["card"] = "unit-elements-card";
|
|
@@ -17,6 +21,7 @@ export let WebComponentType;
|
|
|
17
21
|
WebComponentType["activity"] = "unit-elements-activity";
|
|
18
22
|
WebComponentType["slot"] = "unit-elements-sdk-slot";
|
|
19
23
|
WebComponentType["account"] = "unit-elements-account";
|
|
24
|
+
WebComponentType["checkDeposit"] = "unit-elements-check-deposit";
|
|
20
25
|
WebComponentType["achDebitPayment"] = "unit-elements-ach-debit-payment";
|
|
21
26
|
WebComponentType["achCreditPayment"] = "unit-elements-ach-credit-payment";
|
|
22
27
|
})(WebComponentType || (WebComponentType = {}));
|
|
@@ -24,6 +29,7 @@ export const WebComponent = /*#__PURE__*/React.forwardRef(function WebComponent(
|
|
|
24
29
|
const [unitScript, setUnitScript] = useState(globalUnitScript);
|
|
25
30
|
const [sourceHtml, setSourceHtml] = useState(null);
|
|
26
31
|
const [componentCurrentTheme, setComponentCurrentTheme] = useState(props.theme ?? UnitSDK.getTheme());
|
|
32
|
+
const [baseName, setBaseName] = useState();
|
|
27
33
|
const width = props.width ?? '100%';
|
|
28
34
|
const updateUnitScript = data => {
|
|
29
35
|
setUnitScript(data.unitScript);
|
|
@@ -39,6 +45,24 @@ export const WebComponent = /*#__PURE__*/React.forwardRef(function WebComponent(
|
|
|
39
45
|
busEventKey: SDKMessage.IS_SDK_INITIALIZED,
|
|
40
46
|
action: updateInitializedParams
|
|
41
47
|
});
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
const getAppName = async () => {
|
|
50
|
+
// For iOS, we extend the app name from the HTML to display a prettier access request message.
|
|
51
|
+
// On Android, there is no request message sent from HTML.
|
|
52
|
+
try {
|
|
53
|
+
if (Platform.OS == 'ios') {
|
|
54
|
+
const name = await UNAppInfo.getBundleName();
|
|
55
|
+
setBaseName(name.replace(/ /g, '-'));
|
|
56
|
+
} else {
|
|
57
|
+
// android
|
|
58
|
+
setBaseName('unit');
|
|
59
|
+
}
|
|
60
|
+
} catch (error) {
|
|
61
|
+
console.error(error);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
getAppName();
|
|
65
|
+
}, []);
|
|
42
66
|
useEffect(() => {
|
|
43
67
|
if (!unitScript) {
|
|
44
68
|
fetchUnitScript();
|
|
@@ -71,8 +95,14 @@ export const WebComponent = /*#__PURE__*/React.forwardRef(function WebComponent(
|
|
|
71
95
|
}
|
|
72
96
|
return null;
|
|
73
97
|
};
|
|
98
|
+
if (!baseName) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
74
101
|
return /*#__PURE__*/React.createElement(WebView, {
|
|
75
102
|
ref: webRef,
|
|
103
|
+
originWhitelist: ['*'],
|
|
104
|
+
mediaPlaybackRequiresUserAction: false,
|
|
105
|
+
allowsInlineMediaPlayback: true,
|
|
76
106
|
cacheEnabled: false,
|
|
77
107
|
scrollEnabled: props.isScrollable,
|
|
78
108
|
nestedScrollEnabled: props.nestedScrollEnabled,
|
|
@@ -85,9 +115,11 @@ export const WebComponent = /*#__PURE__*/React.forwardRef(function WebComponent(
|
|
|
85
115
|
opacity: 0.99
|
|
86
116
|
},
|
|
87
117
|
source: {
|
|
88
|
-
html: sourceHtml
|
|
118
|
+
html: sourceHtml,
|
|
119
|
+
baseUrl: `https://${baseName}`
|
|
89
120
|
},
|
|
90
|
-
onMessage: onMessage
|
|
121
|
+
onMessage: onMessage,
|
|
122
|
+
androidHardwareAccelerationDisabled: true
|
|
91
123
|
});
|
|
92
124
|
});
|
|
93
125
|
//# sourceMappingURL=WebComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useState","WebView","EventBus","html","HTML_PLACEHOLDER","UnitMessage","useListenerToBus","getHtmlBody","fetchUnitScript","globalUnitScript","UnitSDK","SDKMessage","handleRequestDownload","WebComponentType","WebComponent","forwardRef","props","webRef","unitScript","setUnitScript","sourceHtml","setSourceHtml","componentCurrentTheme","setComponentCurrentTheme","theme","getTheme","width","updateUnitScript","data","updateInitializedParams","busEventKey","IS_SCRIPT_FETCHED","action","IS_SDK_INITIALIZED","componentParams","params","newHtml","replace","BODY","type","valueOf","presentationMode","SCRIPT_FROM_NATIVE","script","onMessage","e","message","JSON","parse","nativeEvent","UNIT_REQUEST_REFRESH","details","Instance","event","UNIT_REQUEST_DOWNLOAD","UNIT_REQUEST_CLOSE_FLOW","_onScroll","handleScroll","createElement","ref","cacheEnabled","scrollEnabled","isScrollable","nestedScrollEnabled","onScroll","overScrollMode","injectedJavaScript","style","flex","opacity","source"],"sources":["WebComponent.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useEffect, useState } from 'react';\nimport { WebView, WebViewMessageEvent } from 'react-native-webview';\nimport EventBus from '../helpers/EventBus';\nimport html, { HTML_PLACEHOLDER } from './html';\nimport { RequestRefreshEvent, UnitMessage, RequestDownloadEvent } from '../messages/webMessages/unitMessages';\nimport { useListenerToBus } from '../hooks/listenerToBus';\nimport { getHtmlBody, PresentationMode } from '../scripts/html/bodyHtml';\nimport { fetchUnitScript, globalUnitScript } from '../unitSdkManager/UnitSdk.api';\nimport { UnitSDK } from '../unitSdkManager/UnitSdkManager';\nimport type { WebViewMessage } from '../messages/webMessages';\nimport { SDKMessage, SdkScriptFetched } from '../messages/nativeMessages/sdkMessage';\nimport { handleRequestDownload } from './WebComponent.utils';\n\nexport interface WebComponentProps {\n type: WebComponentType;\n presentationMode?: PresentationMode,\n params?: string;\n theme?: string;\n onMessage?: (message: WebViewMessage) => void;\n script?: string;\n isScrollable?: boolean,\n nestedScrollEnabled?: boolean,\n handleScroll?: (event: any) => void,\n width?: number;\n}\n\nexport 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 achDebitPayment = 'unit-elements-ach-debit-payment',\n achCreditPayment = 'unit-elements-ach-credit-payment'\n}\n\nexport const WebComponent = React.forwardRef<WebView, WebComponentProps>(function WebComponent(props, webRef) {\n const [unitScript, setUnitScript] = useState<string | undefined>(globalUnitScript);\n const [sourceHtml, setSourceHtml] = useState<string | null>(null);\n const [componentCurrentTheme, setComponentCurrentTheme] = useState<string | undefined>(props.theme ?? UnitSDK.getTheme());\n const width = props.width ?? '100%';\n\n const updateUnitScript = (data: SdkScriptFetched) => {\n setUnitScript(data.unitScript);\n };\n\n const updateInitializedParams = () => {\n setComponentCurrentTheme(props.theme ?? UnitSDK.getTheme());\n };\n\n useListenerToBus({ busEventKey: SDKMessage.IS_SCRIPT_FETCHED, action: updateUnitScript });\n useListenerToBus({ busEventKey: SDKMessage.IS_SDK_INITIALIZED, action: updateInitializedParams });\n\n useEffect(() => {\n if (!unitScript) {\n fetchUnitScript();\n return;\n }\n\n const componentParams = (props.params || '') + (componentCurrentTheme ? ` theme=\"${componentCurrentTheme}\"` : '');\n let newHtml = html.replace(HTML_PLACEHOLDER.BODY, getHtmlBody(props.type.valueOf(), componentParams, props.presentationMode));\n newHtml = newHtml.replace(HTML_PLACEHOLDER.SCRIPT_FROM_NATIVE, props.script || '');\n setSourceHtml(newHtml);\n }, [props.params, unitScript, props.presentationMode, componentCurrentTheme, props.script]);\n\n const onMessage = (e: WebViewMessageEvent) => {\n const message = JSON.parse(e.nativeEvent.data) as WebViewMessage;\n switch (message.type) {\n case UnitMessage.UNIT_REQUEST_REFRESH:\n message.details &&\n EventBus.Instance.event(UnitMessage.UNIT_REQUEST_REFRESH, message.details as RequestRefreshEvent);\n break;\n case UnitMessage.UNIT_REQUEST_DOWNLOAD:\n message.details &&\n handleRequestDownload(message.details as RequestDownloadEvent, () => {\n EventBus.Instance.event(UnitMessage.UNIT_REQUEST_CLOSE_FLOW);\n });\n break;\n default:\n props.onMessage && props.onMessage(message);\n }\n };\n\n if (!sourceHtml) return null;\n\n const _onScroll = (event: any) => {\n if (props.handleScroll) {\n props.handleScroll(event);\n }\n\n return null;\n };\n\n return (\n <WebView\n ref={webRef}\n cacheEnabled={false}\n scrollEnabled={props.isScrollable}\n nestedScrollEnabled={props.nestedScrollEnabled}\n onScroll={_onScroll}\n overScrollMode=\"never\"\n injectedJavaScript={unitScript}\n style={{ width: width, flex: 1, opacity: 0.99}}\n source={{ html: sourceHtml }}\n onMessage={onMessage} />\n );\n});\n"],"mappings":"AAAA;AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,OAAO,QAA6B,sBAAsB;AACnE,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,IAAI,IAAIC,gBAAgB,QAAQ,QAAQ;AAC/C,SAA8BC,WAAW,QAA8B,sCAAsC;AAC7G,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,WAAW,QAA0B,0BA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CAACkD,uBAAuB,CAAC;QAC9D,CAAC,CAAC;QACJ;MACF;QACEvC,KAAK,CAAC4B,SAAS,IAAI5B,KAAK,CAAC4B,SAAS,CAACE,OAAO,CAAC;IAAC;EAElD,CAAC;EAED,IAAI,CAAC1B,UAAU,EAAE,OAAO,IAAI;EAE5B,MAAMoC,SAAS,GAAIH,KAAU,IAAK;IAChC,IAAIrC,KAAK,CAACyC,YAAY,EAAE;MACtBzC,KAAK,CAACyC,YAAY,CAACJ,KAAK,CAAC;IAC3B;IAEA,OAAO,IAAI;EACb,CAAC;EAED,oBACEvD,KAAA,CAAA4D,aAAA,CAACzD,OAAO;IACN0D,GAAG,EAAE1C,MAAO;IACZ2C,YAAY,EAAE,KAAM;IACpBC,aAAa,EAAE7C,KAAK,CAAC8C,YAAa;IAClCC,mBAAmB,EAAE/C,KAAK,CAAC+C,mBAAoB;IAC/CC,QAAQ,EAAER,SAAU;IACpBS,cAAc,EAAC,OAAO;IACtBC,kBAAkB,EAAEhD,UAAW;IAC/BiD,KAAK,EAAE;MAAEzC,KAAK,EAAEA,KAAK;MAAE0C,IAAI,EAAE,CAAC;MAAEC,OAAO,EAAE;IAAI,CAAE;IAC/CC,MAAM,EAAE;MAAEnE,IAAI,EAAEiB;IAAW,CAAE;IAC7BwB,SAAS,EAAEA;EAAU,EAAG;AAE9B,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","NativeModules","Platform","WebView","EventBus","html","HTML_PLACEHOLDER","UnitMessage","useListenerToBus","getHtmlBody","fetchUnitScript","globalUnitScript","UnitSDK","SDKMessage","handleRequestDownload","UNAppInfo","WebComponentType","WebComponent","forwardRef","props","webRef","unitScript","setUnitScript","sourceHtml","setSourceHtml","componentCurrentTheme","setComponentCurrentTheme","theme","getTheme","baseName","setBaseName","width","updateUnitScript","data","updateInitializedParams","busEventKey","IS_SCRIPT_FETCHED","action","IS_SDK_INITIALIZED","getAppName","OS","name","getBundleName","replace","error","console","componentParams","params","newHtml","BODY","type","valueOf","presentationMode","SCRIPT_FROM_NATIVE","script","onMessage","e","message","JSON","parse","nativeEvent","UNIT_REQUEST_REFRESH","details","Instance","event","UNIT_REQUEST_DOWNLOAD","UNIT_REQUEST_CLOSE_FLOW","_onScroll","handleScroll","createElement","ref","originWhitelist","mediaPlaybackRequiresUserAction","allowsInlineMediaPlayback","cacheEnabled","scrollEnabled","isScrollable","nestedScrollEnabled","onScroll","overScrollMode","injectedJavaScript","style","flex","opacity","source","baseUrl","androidHardwareAccelerationDisabled"],"sources":["WebComponent.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useEffect, useState } from 'react';\nimport { NativeModules, Platform } from 'react-native';\nimport { WebView, WebViewMessageEvent } from 'react-native-webview';\nimport EventBus from '../helpers/EventBus';\nimport html, { HTML_PLACEHOLDER } from './html';\nimport { RequestRefreshEvent, UnitMessage, RequestDownloadEvent } from '../messages/webMessages/unitMessages';\nimport { useListenerToBus } from '../hooks/listenerToBus';\nimport { getHtmlBody, PresentationMode } from '../scripts/html/bodyHtml';\nimport { fetchUnitScript, globalUnitScript } from '../unitSdkManager/UnitSdk.api';\nimport { UnitSDK } from '../unitSdkManager/UnitSdkManager';\nimport type { WebViewMessage } from '../messages/webMessages';\nimport { SDKMessage, SdkScriptFetched } from '../messages/nativeMessages/sdkMessage';\nimport { handleRequestDownload } from './WebComponent.utils';\n\nconst { UNAppInfo } = NativeModules;\n\nexport interface WebComponentProps {\n type: WebComponentType;\n presentationMode?: PresentationMode,\n params?: string;\n theme?: string;\n onMessage?: (message: WebViewMessage) => void;\n script?: string;\n isScrollable?: boolean,\n nestedScrollEnabled?: boolean,\n handleScroll?: (event: any) => void,\n width?: number;\n}\n\nexport 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}\n\nexport const WebComponent = React.forwardRef<WebView, WebComponentProps>(function WebComponent(props, webRef) {\n const [unitScript, setUnitScript] = useState<string | undefined>(globalUnitScript);\n const [sourceHtml, setSourceHtml] = useState<string | null>(null);\n const [componentCurrentTheme, setComponentCurrentTheme] = useState<string | undefined>(props.theme ?? UnitSDK.getTheme());\n const [baseName, setBaseName] = useState<string>();\n const width = props.width ?? '100%';\n\n const updateUnitScript = (data: SdkScriptFetched) => {\n setUnitScript(data.unitScript);\n };\n\n const updateInitializedParams = () => {\n setComponentCurrentTheme(props.theme ?? UnitSDK.getTheme());\n };\n\n useListenerToBus({ busEventKey: SDKMessage.IS_SCRIPT_FETCHED, action: updateUnitScript });\n useListenerToBus({ busEventKey: SDKMessage.IS_SDK_INITIALIZED, action: updateInitializedParams });\n\n useEffect(() => {\n\n const getAppName = async () => {\n // For iOS, we extend the app name from the HTML to display a prettier access request message.\n // On Android, there is no request message sent from HTML.\n try {\n if (Platform.OS == 'ios') {\n const name = await UNAppInfo.getBundleName();\n setBaseName(name.replace(/ /g, '-'));\n } else { // android\n setBaseName('unit');\n }\n } catch (error: any) {\n console.error(error);\n }\n };\n\n getAppName();\n }, []);\n\n useEffect(() => {\n if (!unitScript) {\n fetchUnitScript();\n return;\n }\n\n const componentParams = (props.params || '') + (componentCurrentTheme ? ` theme=\"${componentCurrentTheme}\"` : '');\n let newHtml = html.replace(HTML_PLACEHOLDER.BODY, getHtmlBody(props.type.valueOf(), componentParams, props.presentationMode));\n newHtml = newHtml.replace(HTML_PLACEHOLDER.SCRIPT_FROM_NATIVE, props.script || '');\n setSourceHtml(newHtml);\n }, [props.params, unitScript, props.presentationMode, componentCurrentTheme, props.script]);\n\n const onMessage = (e: WebViewMessageEvent) => {\n const message = JSON.parse(e.nativeEvent.data) as WebViewMessage;\n switch (message.type) {\n case UnitMessage.UNIT_REQUEST_REFRESH:\n message.details &&\n EventBus.Instance.event(UnitMessage.UNIT_REQUEST_REFRESH, message.details as RequestRefreshEvent);\n break;\n case UnitMessage.UNIT_REQUEST_DOWNLOAD:\n message.details &&\n handleRequestDownload(message.details as RequestDownloadEvent, () => {\n EventBus.Instance.event(UnitMessage.UNIT_REQUEST_CLOSE_FLOW);\n });\n break;\n default:\n props.onMessage && props.onMessage(message);\n }\n };\n\n if (!sourceHtml) return null;\n\n const _onScroll = (event: any) => {\n if (props.handleScroll) {\n props.handleScroll(event);\n }\n\n return null;\n };\n\n if (!baseName) {\n return null;\n }\n\n return (\n <WebView\n ref={webRef}\n originWhitelist={['*']}\n mediaPlaybackRequiresUserAction={false}\n allowsInlineMediaPlayback={true}\n cacheEnabled={false}\n scrollEnabled={props.isScrollable}\n nestedScrollEnabled={props.nestedScrollEnabled}\n onScroll={_onScroll}\n overScrollMode=\"never\"\n injectedJavaScript={unitScript}\n style={{ width: width, flex: 1, opacity: 0.99}}\n source={{ html: sourceHtml, baseUrl: `https://${baseName}` }}\n onMessage={onMessage}\n androidHardwareAccelerationDisabled\n />\n );\n});\n"],"mappings":"AAAA;AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AACtD,SAASC,OAAO,QAA6B,sBAAsB;AACnE,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,IAAI,IAAIC,gBAAgB,QAAQ,QAAQ;AAC/C,SAA8BC,WAAW,QAA8B,sCAAsC;AAC7G,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,WAAW,QAA0B,0BAA0B;AACxE,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,+BAA+B;AACjF,SAASC,OAAO,QAAQ,kCAAkC;AAE1D,SAASC,UAAU,QAA0B,uCAAuC;AACpF,SAASC,qBAAqB,QAAQ,sBAAsB;AAE5D,MAAM;EAAEC;AAAU,CAAC,GAAGd,aAAa;AAenC,WAAYe,gBAAgB;AAS3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AAE,CAAC;MAAEC,OAAO,EAAE;IAAI,CAAE;IAC/CC,MAAM,EAAE;MAAE/E,IAAI,EAAEkB,UAAU;MAAE8D,OAAO,EAAG,WAAUxD,QAAS;IAAE,CAAE;IAC7D0B,SAAS,EAAEA,SAAU;IACrB+B,mCAAmC;EAAA,EACnC;AAEN,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
|
-
import { DISPATCH_RENDERING_EVENT, LISTENERS, POST_MESSAGE_TO_SDK, POST_PAGE_HEIGHT } from '../scripts/html/bodyScript';
|
|
2
|
+
import { DISPATCH_RENDERING_EVENT, LISTENERS, POST_MESSAGE_TO_SDK, POST_PAGE_HEIGHT, DISPATCH_REQUEST_CARD_ACTION, DISPATCH_OPEN_ACTIONS_MENU, DISPATCH_REQUEST_ACCOUNT_ACTION, DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT } from '../scripts/html/bodyScript';
|
|
3
3
|
export const HTML_PLACEHOLDER = {
|
|
4
4
|
SCRIPT_UNIT: '<SCRIPT_UNIT>',
|
|
5
5
|
BODY: '<BODY_HTML_CODE>',
|
|
@@ -19,7 +19,7 @@ const htmlText = `
|
|
|
19
19
|
}
|
|
20
20
|
</script>
|
|
21
21
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
|
|
22
|
-
</
|
|
22
|
+
</head>
|
|
23
23
|
|
|
24
24
|
<body style="margin: 0;">
|
|
25
25
|
${HTML_PLACEHOLDER.BODY}
|
|
@@ -41,17 +41,30 @@ const htmlText = `
|
|
|
41
41
|
|
|
42
42
|
${LISTENERS.requestCloseFlow}
|
|
43
43
|
|
|
44
|
+
${LISTENERS.cardActivated}
|
|
45
|
+
|
|
44
46
|
${LISTENERS.cardStatusChange}
|
|
45
47
|
|
|
46
48
|
${LISTENERS.unitRequestExternalSdk}
|
|
47
49
|
|
|
48
50
|
${LISTENERS.unitAccountChanged}
|
|
49
51
|
|
|
52
|
+
${LISTENERS.unitActivityFiltersChanged}
|
|
53
|
+
|
|
50
54
|
${DISPATCH_RENDERING_EVENT}
|
|
51
55
|
|
|
56
|
+
${DISPATCH_OPEN_ACTIONS_MENU}
|
|
57
|
+
|
|
58
|
+
${DISPATCH_REQUEST_CARD_ACTION}
|
|
59
|
+
|
|
60
|
+
${DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT}
|
|
61
|
+
|
|
62
|
+
${DISPATCH_REQUEST_ACCOUNT_ACTION}
|
|
63
|
+
|
|
52
64
|
${HTML_PLACEHOLDER.SCRIPT_FROM_NATIVE}
|
|
53
65
|
</script>
|
|
54
66
|
</body>
|
|
67
|
+
</html>
|
|
55
68
|
`;
|
|
56
69
|
export default htmlText;
|
|
57
70
|
//# sourceMappingURL=html.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","DISPATCH_RENDERING_EVENT","LISTENERS","POST_MESSAGE_TO_SDK","POST_PAGE_HEIGHT","HTML_PLACEHOLDER","SCRIPT_UNIT","BODY","SCRIPT_FROM_NATIVE","htmlText","OS","isPageLoaded","onLoad","unitRequestDownload","requestRendering","requestOpenLink","requestCloseFlow","cardStatusChange","unitRequestExternalSdk","unitAccountChanged"],"sources":["html.ts"],"sourcesContent":["import { Platform } from 'react-native';\nimport { DISPATCH_RENDERING_EVENT, LISTENERS, POST_MESSAGE_TO_SDK, POST_PAGE_HEIGHT } from '../scripts/html/bodyScript';\n\nexport const HTML_PLACEHOLDER = {\n SCRIPT_UNIT: '<SCRIPT_UNIT>',\n BODY: '<BODY_HTML_CODE>',\n SCRIPT_FROM_NATIVE: '<SCRIPT_FROM_NATIVE>'\n};\n\nconst htmlText = `\n <!DOCTYPE html>\n <html lang=\"en\">\n\n <head lang=\"en\">\n <title>Unit Web SDK Demo</title>\n <script>\n window.UnitMobileSDK = true\n window.UnitMobileSDKConfig = {\n os: \"${Platform.OS}\",\n walletName: \"${Platform.OS === 'ios' ? 'Apple' : 'Google'}\",\n }\n </script>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=0\">\n </
|
|
1
|
+
{"version":3,"names":["Platform","DISPATCH_RENDERING_EVENT","LISTENERS","POST_MESSAGE_TO_SDK","POST_PAGE_HEIGHT","DISPATCH_REQUEST_CARD_ACTION","DISPATCH_OPEN_ACTIONS_MENU","DISPATCH_REQUEST_ACCOUNT_ACTION","DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT","HTML_PLACEHOLDER","SCRIPT_UNIT","BODY","SCRIPT_FROM_NATIVE","htmlText","OS","isPageLoaded","onLoad","unitRequestDownload","requestRendering","requestOpenLink","requestCloseFlow","cardActivated","cardStatusChange","unitRequestExternalSdk","unitAccountChanged","unitActivityFiltersChanged"],"sources":["html.ts"],"sourcesContent":["import { Platform } from 'react-native';\nimport { DISPATCH_RENDERING_EVENT, LISTENERS, POST_MESSAGE_TO_SDK, POST_PAGE_HEIGHT, DISPATCH_REQUEST_CARD_ACTION, DISPATCH_OPEN_ACTIONS_MENU, DISPATCH_REQUEST_ACCOUNT_ACTION, DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT } from '../scripts/html/bodyScript';\n\nexport const HTML_PLACEHOLDER = {\n SCRIPT_UNIT: '<SCRIPT_UNIT>',\n BODY: '<BODY_HTML_CODE>',\n SCRIPT_FROM_NATIVE: '<SCRIPT_FROM_NATIVE>'\n};\n\nconst htmlText = `\n <!DOCTYPE html>\n <html lang=\"en\">\n\n <head lang=\"en\">\n <title>Unit Web SDK Demo</title>\n <script>\n window.UnitMobileSDK = true\n window.UnitMobileSDKConfig = {\n os: \"${Platform.OS}\",\n walletName: \"${Platform.OS === 'ios' ? 'Apple' : 'Google'}\",\n }\n </script>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=0\">\n </head>\n\n <body style=\"margin: 0;\">\n ${HTML_PLACEHOLDER.BODY}\n\n <script>\n ${POST_MESSAGE_TO_SDK}\n\n ${POST_PAGE_HEIGHT}\n\n ${LISTENERS.isPageLoaded}\n\n ${LISTENERS.onLoad}\n\n ${LISTENERS.unitRequestDownload}\n\n ${LISTENERS.requestRendering}\n\n ${LISTENERS.requestOpenLink}\n\n ${LISTENERS.requestCloseFlow}\n\n ${LISTENERS.cardActivated}\n\n ${LISTENERS.cardStatusChange}\n\n ${LISTENERS.unitRequestExternalSdk}\n\n ${LISTENERS.unitAccountChanged}\n\n ${LISTENERS.unitActivityFiltersChanged}\n\n ${DISPATCH_RENDERING_EVENT}\n\n ${DISPATCH_OPEN_ACTIONS_MENU}\n\n ${DISPATCH_REQUEST_CARD_ACTION}\n\n ${DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT}\n\n ${DISPATCH_REQUEST_ACCOUNT_ACTION}\n\n ${HTML_PLACEHOLDER.SCRIPT_FROM_NATIVE}\n </script>\n </body>\n </html>\n`;\n\nexport default htmlText;\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,wBAAwB,EAAEC,SAAS,EAAEC,mBAAmB,EAAEC,gBAAgB,EAAEC,4BAA4B,EAAEC,0BAA0B,EAAEC,+BAA+B,EAAEC,sCAAsC,QAAQ,4BAA4B;AAE1P,OAAO,MAAMC,gBAAgB,GAAG;EAC9BC,WAAW,EAAE,eAAe;EAC5BC,IAAI,EAAE,kBAAkB;EACxBC,kBAAkB,EAAE;AACtB,CAAC;AAED,MAAMC,QAAQ,GAAI;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAab,QAAQ,CAACc,EAAG;AACzB,qBAAqBd,QAAQ,CAACc,EAAE,KAAK,KAAK,GAAG,OAAO,GAAG,QAAS;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,MAAML,gBAAgB,CAACE,IAAK;AAC5B;AACA;AACA,QAAQR,mBAAoB;AAC5B;AACA,QAAQC,gBAAiB;AACzB;AACA,QAAQF,SAAS,CAACa,YAAa;AAC/B;AACA,QAAQb,SAAS,CAACc,MAAO;AACzB;AACA,QAAQd,SAAS,CAACe,mBAAoB;AACtC;AACA,QAAQf,SAAS,CAACgB,gBAAiB;AACnC;AACA,QAAQhB,SAAS,CAACiB,eAAgB;AAClC;AACA,QAAQjB,SAAS,CAACkB,gBAAiB;AACnC;AACA,QAAQlB,SAAS,CAACmB,aAAc;AAChC;AACA,QAAQnB,SAAS,CAACoB,gBAAiB;AACnC;AACA,QAAQpB,SAAS,CAACqB,sBAAuB;AACzC;AACA,QAAQrB,SAAS,CAACsB,kBAAmB;AACrC;AACA,QAAQtB,SAAS,CAACuB,0BAA2B;AAC7C;AACA,QAAQxB,wBAAyB;AACjC;AACA,QAAQK,0BAA2B;AACnC;AACA,QAAQD,4BAA6B;AACrC;AACA,QAAQG,sCAAuC;AAC/C;AACA,QAAQD,+BAAgC;AACxC;AACA,QAAQE,gBAAgB,CAACG,kBAAmB;AAC5C;AACA;AACA;AACA,CAAC;AAED,eAAeC,QAAQ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UNOnLoadResponse, UNACHData, UNACHOnLoadData } from '../../sharedTypes';
|
|
2
2
|
export interface UNACHCreditComponentProps {
|
|
3
3
|
accountId: string;
|
|
4
4
|
customerToken: string;
|
|
@@ -6,6 +6,6 @@ export interface UNACHCreditComponentProps {
|
|
|
6
6
|
isAutoFocus?: boolean;
|
|
7
7
|
fee?: number;
|
|
8
8
|
onPaymentCreated?: (data: UNACHData) => void;
|
|
9
|
-
onLoad?: (response:
|
|
9
|
+
onLoad?: (response: UNOnLoadResponse<UNACHOnLoadData>) => void;
|
|
10
10
|
}
|
|
11
11
|
export declare const UNACHCreditComponent: (props: UNACHCreditComponentProps) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UNOnLoadResponse, UNACHData, UNACHOnLoadData } from '../../sharedTypes';
|
|
2
2
|
export interface UNACHDebitComponentProps {
|
|
3
3
|
accountId: string;
|
|
4
4
|
customerToken: string;
|
|
@@ -6,6 +6,6 @@ export interface UNACHDebitComponentProps {
|
|
|
6
6
|
isAutoFocus?: boolean;
|
|
7
7
|
fee?: number;
|
|
8
8
|
onPaymentCreated?: (data: UNACHData) => void;
|
|
9
|
-
onLoad?: (response:
|
|
9
|
+
onLoad?: (response: UNOnLoadResponse<UNACHOnLoadData>) => void;
|
|
10
10
|
}
|
|
11
11
|
export declare const UNACHDebitComponent: (props: UNACHDebitComponentProps) => JSX.Element;
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UNOnLoadResponse } from '../../sharedTypes';
|
|
2
3
|
import type { UNAccountData } from '../../sharedTypes/account.types';
|
|
4
|
+
import type { UNAccountMenuAction } from '../../sharedTypes';
|
|
3
5
|
export interface UNAccountComponentProps {
|
|
4
6
|
accountId?: string;
|
|
5
7
|
customerToken: string;
|
|
6
8
|
theme?: string;
|
|
7
|
-
|
|
9
|
+
hideActionsMenuButton?: boolean;
|
|
10
|
+
hideSelectionMenuButton?: boolean;
|
|
11
|
+
onLoad?: (response: UNOnLoadResponse<[UNAccountData]>) => void;
|
|
8
12
|
onAccountChanged?: (account: UNAccountData) => void;
|
|
9
13
|
}
|
|
14
|
+
export interface UNAccountRef {
|
|
15
|
+
openActionsMenu: () => void;
|
|
16
|
+
openAction: (action: UNAccountMenuAction) => void;
|
|
17
|
+
}
|
|
10
18
|
export declare enum AccountAction {
|
|
11
19
|
List = "account-list",
|
|
12
20
|
Menu = "account-menu"
|
|
13
21
|
}
|
|
14
|
-
export declare const UNAccountComponent:
|
|
22
|
+
export declare const UNAccountComponent: React.ForwardRefExoticComponent<UNAccountComponentProps & React.RefAttributes<UNAccountRef>>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { AccountAction, UNAccountComponentProps } from './UNAccountComponent';
|
|
2
2
|
import { RequestRefreshEvent, RequestRenderingEvent } from '../../messages/webMessages/unitMessages';
|
|
3
3
|
import type WebView from 'react-native-webview';
|
|
4
|
+
import type { UNAccountMenuAction } from 'src/sharedTypes';
|
|
4
5
|
export declare const getAccountParams: (props: UNAccountComponentProps) => string;
|
|
5
6
|
export declare const getAccountScript: () => string;
|
|
7
|
+
export declare const injectOpenActionsMenuScript: (currentWeb: WebView | null) => void;
|
|
8
|
+
export declare const injectRequestAccountActionScript: (currentWeb: WebView | null, action: UNAccountMenuAction) => void;
|
|
6
9
|
export declare const injectRefreshEventIfNeeded: (currentWeb: WebView | null, requestRefreshEvent: RequestRefreshEvent | null) => void;
|
|
7
10
|
export declare const getAccountActionType: (requestRendering: RequestRenderingEvent) => AccountAction;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UNOnLoadResponse } from '../../sharedTypes';
|
|
2
|
+
import type { UNActivityOnLoadData } from '../../sharedTypes/activity.types';
|
|
2
3
|
export interface UNActivityComponentProps {
|
|
3
4
|
accountId: string;
|
|
4
5
|
customerToken: string;
|
|
6
|
+
queryFilter?: string;
|
|
5
7
|
theme?: string;
|
|
6
|
-
|
|
8
|
+
hideFilterButton?: boolean;
|
|
9
|
+
onLoad?: (response: UNOnLoadResponse<UNActivityOnLoadData>) => void;
|
|
7
10
|
}
|
|
8
11
|
export declare const UNActivityComponent: (props: UNActivityComponentProps) => JSX.Element;
|
|
@@ -4,3 +4,4 @@ import type { UNActivityComponentProps } from './UNActivityComponent';
|
|
|
4
4
|
export declare const getActivityParams: (props: UNActivityComponentProps) => string;
|
|
5
5
|
export declare const getActivityScript: () => string;
|
|
6
6
|
export declare const injectRefreshEventIfNeeded: (currentWeb: WebView | null, requestRefreshEvent: RequestRefreshEvent | null) => void;
|
|
7
|
+
export declare const injectFiltersChanged: (currentWeb: WebView | null, query: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UNOnLoadResponse, UNBookPaymentData, UNAccountData } from '../../sharedTypes';
|
|
2
2
|
export interface UNBookPaymentComponentProps {
|
|
3
3
|
accountId: string;
|
|
4
4
|
customerToken: string;
|
|
@@ -7,6 +7,6 @@ export interface UNBookPaymentComponentProps {
|
|
|
7
7
|
counterPartyName: string;
|
|
8
8
|
theme?: string;
|
|
9
9
|
onPaymentCreated?: (data: UNBookPaymentData) => void;
|
|
10
|
-
onLoad?: (response:
|
|
10
|
+
onLoad?: (response: UNOnLoadResponse<UNAccountData>) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare const UNBookPaymentComponent: (props: UNBookPaymentComponentProps) => JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UNOnLoadResponse, UNCardData, UNCardMenuAction } from '../../sharedTypes';
|
|
2
3
|
import type { NativeModules } from 'react-native';
|
|
3
4
|
export interface UNCardComponentProps {
|
|
4
5
|
cardId: string;
|
|
@@ -7,8 +8,13 @@ export interface UNCardComponentProps {
|
|
|
7
8
|
hideActionsMenuButton?: boolean;
|
|
8
9
|
hideCardTitle?: boolean;
|
|
9
10
|
hideSensitiveDataButton?: boolean;
|
|
10
|
-
onLoad?: (response:
|
|
11
|
+
onLoad?: (response: UNOnLoadResponse<UNCardData>) => void;
|
|
11
12
|
onStatusChanged?: (card: UNCardData) => void;
|
|
13
|
+
onCardActivated?: (card: UNCardData) => void;
|
|
12
14
|
pushProvisioningModule?: typeof NativeModules;
|
|
13
15
|
}
|
|
14
|
-
export
|
|
16
|
+
export interface CardRef {
|
|
17
|
+
openActionsMenu: () => void;
|
|
18
|
+
openAction: (action: UNCardMenuAction) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const UNCardComponent: React.ForwardRefExoticComponent<UNCardComponentProps & React.RefAttributes<CardRef>>;
|
|
@@ -3,8 +3,11 @@ import type { UNCardComponentProps } from './UNCardComponent';
|
|
|
3
3
|
import type { NativeModules } from 'react-native';
|
|
4
4
|
import { UNWallet, UNWalletCode, UNWalletName } from '../../../src/sharedTypes/wallet.types';
|
|
5
5
|
import type { RequestRefreshEvent } from '../../messages/webMessages/unitMessages';
|
|
6
|
+
import type { UNCardMenuAction } from '../../sharedTypes';
|
|
6
7
|
export declare const getCardParams: (props: UNCardComponentProps) => string;
|
|
7
8
|
export declare const getCardScript: () => string;
|
|
9
|
+
export declare const injectOpenActionsMenuScript: (currentWeb: WebView | null) => void;
|
|
10
|
+
export declare const injectRequestCardActionScript: (currentWeb: WebView | null, action: UNCardMenuAction) => void;
|
|
8
11
|
export declare const injectRefreshEventIfNeeded: (currentWeb: WebView | null, requestRefreshEvent: RequestRefreshEvent | null, cardId: string) => void;
|
|
9
12
|
export declare const launchGetWallets: (customerToken: string, cardId: string, pushProvisioningModule: typeof NativeModules) => Promise<{
|
|
10
13
|
name: UNWalletName;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { UNCheckDepositData } from '../../sharedTypes/checkDeposit.types';
|
|
2
|
+
import type { UNAccountData, UNOnLoadResponse } from '../../sharedTypes';
|
|
3
|
+
export interface UNCheckDepositComponentProps {
|
|
4
|
+
accountId: string;
|
|
5
|
+
fee: number;
|
|
6
|
+
customerToken: string;
|
|
7
|
+
theme?: string;
|
|
8
|
+
onLoad?: (response: UNOnLoadResponse<UNAccountData>) => void;
|
|
9
|
+
onDepositCreated?: (checkData: UNCheckDepositData) => void;
|
|
10
|
+
onRestartRequest?: (checkData: UNCheckDepositData) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const UNCheckDepositComponent: (props: UNCheckDepositComponentProps) => JSX.Element;
|
|
@@ -3,5 +3,6 @@ export * from './UNBottomSheetComponent/UNBottomSheetComponent';
|
|
|
3
3
|
export * from './UNBookPaymentComponent/UNBookPaymentComponent';
|
|
4
4
|
export * from './UNActivityComponent/UNActivityComponent';
|
|
5
5
|
export * from './UNAccountComponent/UNAccountComponent';
|
|
6
|
+
export * from './UNCheckDepositComponent/UNCheckDepositComponent';
|
|
6
7
|
export * from './UNACHDebitComponent/UNACHDebitComponent';
|
|
7
8
|
export * from './UNACHCreditComponent/UNACHCreditComponent';
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { UNCardData } from '../../sharedTypes';
|
|
2
2
|
export declare enum CardMessage {
|
|
3
|
+
CARD_ACTIVATED = "unitCardActivated",
|
|
3
4
|
CARD_STATUS_CHANGED = "unitCardStatusChanged"
|
|
4
5
|
}
|
|
5
6
|
export interface CardStatusChangedEvent {
|
|
6
7
|
card: UNCardData;
|
|
7
8
|
}
|
|
8
|
-
export
|
|
9
|
+
export interface CardActivatedEvent {
|
|
10
|
+
card: UNCardData;
|
|
11
|
+
}
|
|
12
|
+
export type CardEvent = CardStatusChangedEvent | CardActivatedEvent;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UNCheckDepositData } from '../../sharedTypes/checkDeposit.types';
|
|
2
|
+
export declare enum CheckMessage {
|
|
3
|
+
CHECK_DEPOSIT_CREATED = "unitCheckDepositCreated",
|
|
4
|
+
CHECK_DEPOSIT_RESTART_REQUEST = "unitCheckDepositRestartRequest"
|
|
5
|
+
}
|
|
6
|
+
export type CheckDepositCreatedEvent = UNCheckDepositData;
|
|
7
|
+
export type CheckDepositRestartRequestEvent = UNCheckDepositData;
|
|
8
|
+
export type CheckEvent = CheckDepositCreatedEvent | CheckDepositRestartRequestEvent;
|
|
@@ -5,8 +5,10 @@ import type { PageEvent, PageMessage } from './pageMessage';
|
|
|
5
5
|
import type { PaymentMessage } from './paymentsMessage';
|
|
6
6
|
import type { UnitEvent, UnitMessage } from './unitMessages';
|
|
7
7
|
import type { AccountEvent, AccountMessage } from './accountMessage';
|
|
8
|
-
|
|
9
|
-
type
|
|
8
|
+
import type { CheckEvent, CheckMessage } from './checkMessage';
|
|
9
|
+
import type { ActivityEvent, ActivityMessage } from './activityMessage';
|
|
10
|
+
export type WebViewMessageType = PageMessage | CardMessage | UnitMessage | PaymentMessage | AccountMessage | CheckMessage | ActivityMessage;
|
|
11
|
+
type WebViewEvent = PageEvent | UnitEvent | CardEvent | BookPaymentEvent | PaymentMessage | ACHEvent | AccountEvent | CheckEvent | ActivityEvent;
|
|
10
12
|
export interface WebViewMessage {
|
|
11
13
|
type: WebViewMessageType;
|
|
12
14
|
details?: WebViewEvent;
|