react-native-unit-components 2.0.2 → 2.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/android/build.gradle +0 -4
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +31 -0
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +9 -3
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +31 -0
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +8 -2
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js +2 -0
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +3 -3
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +6 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +29 -8
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +7 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +38 -8
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js +2 -0
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNCreateCardComponent/UNCreateCardComponent.js +84 -0
- package/lib/commonjs/components/UNCreateCardComponent/UNCreateCardComponent.js.map +1 -0
- package/lib/commonjs/components/UNCreateCardComponent/UNCreateCardComponent.utils.js +19 -0
- package/lib/commonjs/components/UNCreateCardComponent/UNCreateCardComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNCreateCardComponent/index.js +21 -0
- package/lib/commonjs/components/UNCreateCardComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +39 -8
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +19 -3
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js +2 -0
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.js.map +1 -1
- package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js +0 -2
- package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js.map +1 -1
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.js +2 -2
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/commonjs/messages/webMessages/cardMessage.js +1 -0
- package/lib/commonjs/messages/webMessages/cardMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/multipleCardsMessage.js +1 -0
- package/lib/commonjs/messages/webMessages/multipleCardsMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/onLoadMessage.js +1 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/commonjs/scripts/html/bodyScript.js +82 -48
- package/lib/commonjs/scripts/html/bodyScript.js.map +1 -1
- package/lib/commonjs/slices/SharedEventsSlice.js.map +1 -1
- package/lib/commonjs/types/internal/bottomSheet.types.js +1 -0
- package/lib/commonjs/types/internal/bottomSheet.types.js.map +1 -1
- package/lib/commonjs/types/internal/webComponent.types.js +1 -0
- package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
- package/lib/commonjs/types/shared/account.types.js +6 -1
- package/lib/commonjs/types/shared/account.types.js.map +1 -1
- package/lib/commonjs/types/shared/createCard.types.js +21 -0
- package/lib/commonjs/types/shared/createCard.types.js.map +1 -0
- package/lib/commonjs/types/shared/customer.types.js +5 -5
- package/lib/commonjs/types/shared/customer.types.js.map +1 -1
- package/lib/commonjs/types/shared/index.js +11 -0
- package/lib/commonjs/types/shared/index.js.map +1 -1
- package/lib/commonjs/unitComponentsSdkManager/UnitComponentsSdk.constants.js +1 -1
- package/lib/commonjs/unitComponentsSdkManager/UnitComponentsSdkManager.js +1 -1
- package/lib/commonjs/webComponent/html.js +8 -0
- package/lib/commonjs/webComponent/html.js.map +1 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +32 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +8 -3
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +32 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +7 -2
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js +2 -0
- package/lib/module/components/UNAccountComponent/UNAccountComponent.utils.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js +2 -2
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +5 -0
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +30 -9
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +7 -1
- package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +39 -9
- package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js +2 -0
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
- package/lib/module/components/UNCreateCardComponent/UNCreateCardComponent.js +76 -0
- package/lib/module/components/UNCreateCardComponent/UNCreateCardComponent.js.map +1 -0
- package/lib/module/components/UNCreateCardComponent/UNCreateCardComponent.utils.js +12 -0
- package/lib/module/components/UNCreateCardComponent/UNCreateCardComponent.utils.js.map +1 -0
- package/lib/module/components/UNCreateCardComponent/index.js +2 -0
- package/lib/module/components/UNCreateCardComponent/index.js.map +1 -0
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +40 -9
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js +15 -2
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.js.map +1 -1
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js +3 -1
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.js.map +1 -1
- package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.js.map +1 -1
- package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js +0 -2
- package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/helpers/BottomSheet/BottomSheet.js +2 -2
- package/lib/module/helpers/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/module/messages/webMessages/cardMessage.js +1 -0
- package/lib/module/messages/webMessages/cardMessage.js.map +1 -1
- package/lib/module/messages/webMessages/multipleCardsMessage.js +1 -0
- package/lib/module/messages/webMessages/multipleCardsMessage.js.map +1 -1
- package/lib/module/messages/webMessages/onLoadMessage.js +1 -0
- package/lib/module/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/module/scripts/html/bodyScript.js +81 -47
- package/lib/module/scripts/html/bodyScript.js.map +1 -1
- package/lib/module/slices/SharedEventsSlice.js.map +1 -1
- package/lib/module/types/internal/bottomSheet.types.js +1 -0
- package/lib/module/types/internal/bottomSheet.types.js.map +1 -1
- package/lib/module/types/internal/webComponent.types.js +1 -0
- package/lib/module/types/internal/webComponent.types.js.map +1 -1
- package/lib/module/types/shared/account.types.js +5 -0
- package/lib/module/types/shared/account.types.js.map +1 -1
- package/lib/module/types/shared/createCard.types.js +14 -0
- package/lib/module/types/shared/createCard.types.js.map +1 -0
- package/lib/module/types/shared/customer.types.js +4 -4
- package/lib/module/types/shared/customer.types.js.map +1 -1
- package/lib/module/types/shared/index.js +1 -0
- package/lib/module/types/shared/index.js.map +1 -1
- package/lib/module/unitComponentsSdkManager/UnitComponentsSdk.constants.js +1 -1
- package/lib/module/unitComponentsSdkManager/UnitComponentsSdkManager.js +1 -1
- package/lib/module/webComponent/html.js +9 -1
- package/lib/module/webComponent/html.js.map +1 -1
- package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.d.ts +4 -2
- package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts +2 -0
- package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts +3 -2
- package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.d.ts +2 -0
- package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.d.ts +2 -1
- package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.utils.d.ts +1 -1
- package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.utils.d.ts +1 -1
- package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts +5 -0
- package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +2 -2
- package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts +2 -0
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/UNCreateCardComponent/UNCreateCardComponent.d.ts +16 -0
- package/lib/typescript/src/components/UNCreateCardComponent/UNCreateCardComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNCreateCardComponent/UNCreateCardComponent.utils.d.ts +3 -0
- package/lib/typescript/src/components/UNCreateCardComponent/UNCreateCardComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNCreateCardComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNCreateCardComponent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts +2 -0
- package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.d.ts +5 -0
- package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.d.ts +1 -0
- package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.d.ts +0 -1
- package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/cardMessage.d.ts +4 -2
- package/lib/typescript/src/messages/webMessages/cardMessage.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/multipleCardsMessage.d.ts +4 -2
- package/lib/typescript/src/messages/webMessages/multipleCardsMessage.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts +7 -3
- package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/unitComponentsMessages.d.ts +1 -0
- package/lib/typescript/src/messages/webMessages/unitComponentsMessages.d.ts.map +1 -1
- package/lib/typescript/src/scripts/html/bodyScript.d.ts +7 -2
- package/lib/typescript/src/scripts/html/bodyScript.d.ts.map +1 -1
- package/lib/typescript/src/slices/SharedEventsSlice.d.ts +11 -3
- package/lib/typescript/src/slices/SharedEventsSlice.d.ts.map +1 -1
- package/lib/typescript/src/store/store.d.ts +14 -2
- package/lib/typescript/src/store/store.d.ts.map +1 -1
- package/lib/typescript/src/types/internal/bottomSheet.types.d.ts +8 -2
- package/lib/typescript/src/types/internal/bottomSheet.types.d.ts.map +1 -1
- package/lib/typescript/src/types/internal/webComponent.types.d.ts +1 -0
- package/lib/typescript/src/types/internal/webComponent.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/account.types.d.ts +4 -0
- package/lib/typescript/src/types/shared/account.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/createCard.types.d.ts +166 -0
- package/lib/typescript/src/types/shared/createCard.types.d.ts.map +1 -0
- package/lib/typescript/src/types/shared/customer.types.d.ts +3 -3
- package/lib/typescript/src/types/shared/customer.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/index.d.ts +1 -0
- package/lib/typescript/src/types/shared/index.d.ts.map +1 -1
- package/lib/typescript/src/webComponent/html.d.ts.map +1 -1
- package/lib/typescript/tests/e2e/app-tests.d.ts +2 -0
- package/lib/typescript/tests/e2e/app-tests.d.ts.map +1 -0
- package/lib/typescript/tests/e2e/component-tests.d.ts +2 -0
- package/lib/typescript/tests/e2e/component-tests.d.ts.map +1 -0
- package/lib/typescript/tests/e2e/main.test.d.ts +2 -0
- package/lib/typescript/tests/e2e/main.test.d.ts.map +1 -0
- package/lib/typescript/tests/utils.d.ts +3 -0
- package/lib/typescript/tests/utils.d.ts.map +1 -0
- package/package.json +9 -4
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +36 -4
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.ts +10 -3
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +35 -4
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.ts +9 -2
- package/src/components/UNAccountComponent/UNAccountComponent.tsx +3 -2
- package/src/components/UNAccountComponent/UNAccountComponent.utils.ts +2 -1
- package/src/components/UNActivityComponent/UNActivityComponent.tsx +2 -2
- package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +1 -1
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.ts +6 -0
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.ts +32 -7
- package/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.tsx +8 -1
- package/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.tsx +54 -18
- package/src/components/UNCardComponent/UNCardComponent.tsx +2 -0
- package/src/components/UNCardComponent/UNCardComponent.utils.ts +4 -1
- package/src/components/UNCreateCardComponent/UNCreateCardComponent.tsx +94 -0
- package/src/components/UNCreateCardComponent/UNCreateCardComponent.utils.ts +14 -0
- package/src/components/UNCreateCardComponent/index.ts +1 -0
- package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +45 -9
- package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.ts +18 -2
- package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.tsx +1 -0
- package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.utils.ts +3 -1
- package/src/components/UNWirePaymentComponent/UNWirePaymentComponent.tsx +0 -1
- package/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.ts +0 -2
- package/src/components/index.ts +1 -0
- package/src/helpers/BottomSheet/BottomSheet.tsx +2 -2
- package/src/messages/webMessages/cardMessage.ts +6 -1
- package/src/messages/webMessages/multipleCardsMessage.ts +3 -1
- package/src/messages/webMessages/onLoadMessage.ts +9 -2
- package/src/messages/webMessages/unitComponentsMessages.ts +1 -0
- package/src/scripts/html/bodyScript.ts +84 -48
- package/src/slices/SharedEventsSlice.ts +15 -3
- package/src/types/internal/bottomSheet.types.ts +9 -1
- package/src/types/internal/webComponent.types.ts +1 -0
- package/src/types/shared/account.types.ts +5 -0
- package/src/types/shared/createCard.types.ts +187 -0
- package/src/types/shared/customer.types.ts +3 -3
- package/src/types/shared/index.ts +1 -0
- package/src/unitComponentsSdkManager/UnitComponentsSdk.constants.ts +1 -1
- package/src/unitComponentsSdkManager/UnitComponentsSdkManager.ts +1 -1
- package/src/webComponent/html.ts +11 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { UNACHCreditComponentProps } from './UNACHCreditComponent';
|
|
2
2
|
import type WebView from 'react-native-webview';
|
|
3
3
|
import type { LinkSuccess } from 'react-native-plaid-link-sdk';
|
|
4
|
-
import { DISPATCH_PLAID_RESPONSE, LISTENERS } from '../../scripts/html/bodyScript';
|
|
4
|
+
import { DISPATCH_COUNTERPARTY_DELETED, DISPATCH_PLAID_RESPONSE, LISTENERS } from '../../scripts/html/bodyScript';
|
|
5
|
+
import { UNCounterparty } from '../../types/shared';
|
|
5
6
|
|
|
6
7
|
export const getACHCreditParams = (props: UNACHCreditComponentProps) => {
|
|
7
8
|
const plaidAccountFiltersParam = props.plaidAccountFilters ? `plaid-account-filters="${props.plaidAccountFilters.join()}"` : '';
|
|
@@ -11,13 +12,15 @@ export const getACHCreditParams = (props: UNACHCreditComponentProps) => {
|
|
|
11
12
|
${accountIdParam}
|
|
12
13
|
with-plaid="${props.withPlaid ?? false}"
|
|
13
14
|
is-auto-focus="${props.isAutoFocus ?? false}"
|
|
14
|
-
${props.fee ? `fee="${props.fee}"` : ''}
|
|
15
15
|
style="height: 100%"
|
|
16
16
|
same-day="${props.sameDay ?? false}"
|
|
17
|
+
show-same-day-selection="${props.showSameDaySelection ?? false}"
|
|
17
18
|
${plaidAccountFiltersParam}
|
|
18
19
|
${plaidLinkCustomizationNameParam}
|
|
19
20
|
initial-stage-back-button="${props.initialStageBackButton ?? false}"
|
|
20
21
|
final-stage-done-button="${props.finalStageDoneButton ?? false}"
|
|
22
|
+
allow-counterparty-delete="${props.allowCounterpartyDelete ?? false}"
|
|
23
|
+
show-account-type-selector="${props.showAccountTypeSelector ?? false}"
|
|
21
24
|
`;
|
|
22
25
|
};
|
|
23
26
|
|
|
@@ -29,8 +32,8 @@ export const getACHCreditScript = (appPackageName?: string) => {
|
|
|
29
32
|
${LISTENERS.unitPaymentInitialStageBackButtonClicked}
|
|
30
33
|
${LISTENERS.unitPaymentFinalStageDoneButtonClicked}
|
|
31
34
|
${DISPATCH_PLAID_RESPONSE}
|
|
35
|
+
${DISPATCH_COUNTERPARTY_DELETED}
|
|
32
36
|
${LISTENERS.requestRefresh}
|
|
33
|
-
|
|
34
37
|
`;
|
|
35
38
|
};
|
|
36
39
|
|
|
@@ -38,3 +41,7 @@ export const injectUnitPlaidResponse = (currentWeb: WebView | null, success: Lin
|
|
|
38
41
|
const successObj = { data: { publicToken: success.publicToken, metadata: success.metadata } };
|
|
39
42
|
currentWeb?.injectJavaScript(`dispatchPlaidEvent(${JSON.stringify(successObj)})`);
|
|
40
43
|
};
|
|
44
|
+
|
|
45
|
+
export const injectRequestCounterpartyDeletedScript = (currentWeb: WebView | null, counterparty: UNCounterparty) => {
|
|
46
|
+
currentWeb?.injectJavaScript(`dispatchCounterpartyDeletedEvent('${counterparty}')`);
|
|
47
|
+
};
|
|
@@ -7,7 +7,8 @@ import type {
|
|
|
7
7
|
UNComponentsOnLoadResponseData,
|
|
8
8
|
UNACHOnLoadData,
|
|
9
9
|
UNACHPayment,
|
|
10
|
-
UNPlaidAccountFilter
|
|
10
|
+
UNPlaidAccountFilter,
|
|
11
|
+
UNCounterparty
|
|
11
12
|
} from '../../types/shared';
|
|
12
13
|
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
13
14
|
import { Platform } from 'react-native';
|
|
@@ -15,9 +16,10 @@ import {
|
|
|
15
16
|
PlaidLinkTokenData,
|
|
16
17
|
PlaidTokenCreatedEvent,
|
|
17
18
|
RequestExternalSdkEvent,
|
|
19
|
+
RequestRenderingEvent,
|
|
18
20
|
UnitComponentsMessage,
|
|
19
21
|
} from '../../messages/webMessages/unitComponentsMessages';
|
|
20
|
-
import { getACHDebitParams, getACHDebitScript, injectUnitPlaidResponse } from './UNACHDebitComponent.utils';
|
|
22
|
+
import { getACHDebitParams, getACHDebitScript, injectRequestCounterpartyDeletedScript, injectUnitPlaidResponse } from './UNACHDebitComponent.utils';
|
|
21
23
|
import { LinkSuccess, openLink } from 'react-native-plaid-link-sdk';
|
|
22
24
|
import type WebView from 'react-native-webview';
|
|
23
25
|
import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
|
|
@@ -29,25 +31,33 @@ import { withReduxStore } from '../../helpers/store/helpers';
|
|
|
29
31
|
import { PlaidMessage } from '../../messages/webMessages/plaidMessages';
|
|
30
32
|
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
31
33
|
import { ensureArray } from '../../utils/onLoadMessages.utils';
|
|
34
|
+
import { BottomSheetRenderingType, BottomSheetSlotData, SlotRendering } from '../../types/internal/bottomSheet.types';
|
|
35
|
+
import { BottomSheetNativeMessage } from '../../messages/nativeMessages/bottomSheetMessage';
|
|
36
|
+
import { useDispatch } from 'react-redux';
|
|
37
|
+
import { setEvent } from '../../slices/SharedEventsSlice';
|
|
38
|
+
import { useListenerToEvent } from '../../hooks/useListenerToEvent';
|
|
39
|
+
import { PayeeManagementMessage } from '../../messages/webMessages/payeeManagementMessage';
|
|
32
40
|
|
|
33
41
|
export interface UNACHDebitComponentProps {
|
|
34
42
|
accountId?: string;
|
|
35
43
|
theme?: string;
|
|
36
44
|
language?: string;
|
|
37
45
|
isAutoFocus?: boolean;
|
|
38
|
-
|
|
46
|
+
sameDay?: boolean;
|
|
47
|
+
showSameDaySelection?: boolean;
|
|
39
48
|
onPaymentCreated?: (data: UNACHPayment) => void;
|
|
40
49
|
onLoad?: (response: UNComponentsOnLoadResponse<UNACHOnLoadData>) => void;
|
|
41
50
|
onInitialStageBackButtonClicked?: () => void;
|
|
42
51
|
onFinalStageDoneButtonClicked?: () => void;
|
|
43
|
-
sameDay?: boolean;
|
|
44
52
|
plaidAccountFilters?: UNPlaidAccountFilter[];
|
|
45
53
|
plaidLinkCustomizationName?: string;
|
|
46
54
|
initialStageBackButton?: boolean;
|
|
47
55
|
finalStageDoneButton?: boolean;
|
|
56
|
+
allowCounterpartyDelete?: boolean;
|
|
48
57
|
}
|
|
49
58
|
|
|
50
59
|
const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
|
|
60
|
+
const dispatch = useDispatch();
|
|
51
61
|
const [height, setHeight] = useState<number>(0);
|
|
52
62
|
const [appPackageName, setAppPackageName] = useState<string>('');
|
|
53
63
|
const [linkToken, setLinkToken] = useState<string>('');
|
|
@@ -64,6 +74,12 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
|
|
|
64
74
|
setPackageNameForAndroid();
|
|
65
75
|
}, []);
|
|
66
76
|
|
|
77
|
+
const handleCounterpartyDeleted = (data: UNCounterparty) => {
|
|
78
|
+
injectRequestCounterpartyDeletedScript(webRef.current, data);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
useListenerToEvent({ busEventKey: PayeeManagementMessage.UNIT_COUNTERPARTY_DELETED, action: handleCounterpartyDeleted });
|
|
82
|
+
|
|
67
83
|
const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {
|
|
68
84
|
if (!props.onLoad) {
|
|
69
85
|
return;
|
|
@@ -111,6 +127,21 @@ const UNACHDebitComponent = (props: UNACHDebitComponentProps) => {
|
|
|
111
127
|
case UnitComponentsMessage.UNIT_ON_LOAD:
|
|
112
128
|
handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);
|
|
113
129
|
break;
|
|
130
|
+
case UnitComponentsMessage.UNIT_REQUEST_RENDERING: {
|
|
131
|
+
const slotData: BottomSheetSlotData = {
|
|
132
|
+
componentName: WebComponentType.achDebitPayment,
|
|
133
|
+
componentResourceId: props.accountId,
|
|
134
|
+
requestRenderingEvent: message.details as RequestRenderingEvent,
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const data = {
|
|
138
|
+
type: BottomSheetRenderingType.Slot,
|
|
139
|
+
data: slotData,
|
|
140
|
+
} as SlotRendering;
|
|
141
|
+
dispatch(setEvent({ key: BottomSheetNativeMessage.REQUEST_RENDERING, data }));
|
|
142
|
+
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
114
145
|
case PageMessage.PAGE_HEIGHT: {
|
|
115
146
|
const currentHeight = (message.details as HeightEvent).height;
|
|
116
147
|
setHeight(currentHeight);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { DISPATCH_PLAID_RESPONSE, LISTENERS } from './../../scripts/html/bodyScript';
|
|
1
|
+
import { DISPATCH_COUNTERPARTY_DELETED, DISPATCH_PLAID_RESPONSE, LISTENERS } from './../../scripts/html/bodyScript';
|
|
2
2
|
import type { UNACHDebitComponentProps } from './UNACHDebitComponent';
|
|
3
3
|
|
|
4
4
|
import type WebView from 'react-native-webview';
|
|
5
5
|
import type { LinkSuccess } from 'react-native-plaid-link-sdk';
|
|
6
|
+
import { UNCounterparty } from '../../types/shared';
|
|
6
7
|
|
|
7
8
|
export const getACHDebitParams = (props: UNACHDebitComponentProps) => {
|
|
8
9
|
const plaidAccountFiltersParam = props.plaidAccountFilters ? `plaid-account-filters="${props.plaidAccountFilters.join()}"` : '';
|
|
@@ -11,13 +12,14 @@ export const getACHDebitParams = (props: UNACHDebitComponentProps) => {
|
|
|
11
12
|
return `
|
|
12
13
|
${accountIdParam}
|
|
13
14
|
is-auto-focus="${props.isAutoFocus ?? false}"
|
|
14
|
-
${props.fee ? `fee="${props.fee}"` : ''}
|
|
15
15
|
style="height: 100%"
|
|
16
16
|
same-day="${props.sameDay ?? false}"
|
|
17
|
+
show-same-day-selection="${props.showSameDaySelection ?? false}"
|
|
17
18
|
${plaidAccountFiltersParam}
|
|
18
19
|
${plaidLinkCustomizationNameParam}
|
|
19
20
|
initial-stage-back-button="${props.initialStageBackButton ?? false}"
|
|
20
21
|
final-stage-done-button="${props.finalStageDoneButton ?? false}"
|
|
22
|
+
allow-counterparty-delete="${props.allowCounterpartyDelete ?? false}"
|
|
21
23
|
`;
|
|
22
24
|
};
|
|
23
25
|
|
|
@@ -29,6 +31,7 @@ export const getACHDebitScript = (androidPackageName?: string) => {
|
|
|
29
31
|
${LISTENERS.unitPaymentInitialStageBackButtonClicked}
|
|
30
32
|
${LISTENERS.unitPaymentFinalStageDoneButtonClicked}
|
|
31
33
|
${DISPATCH_PLAID_RESPONSE}
|
|
34
|
+
${DISPATCH_COUNTERPARTY_DELETED}
|
|
32
35
|
${LISTENERS.requestRefresh}
|
|
33
36
|
`;
|
|
34
37
|
};
|
|
@@ -37,3 +40,7 @@ export const injectUnitPlaidResponse = (currentWeb: WebView | null, success: Lin
|
|
|
37
40
|
const successObj = { data: { publicToken: success.publicToken, metadata: success.metadata } };
|
|
38
41
|
currentWeb?.injectJavaScript(`dispatchPlaidEvent(${JSON.stringify(successObj)})`);
|
|
39
42
|
};
|
|
43
|
+
|
|
44
|
+
export const injectRequestCounterpartyDeletedScript = (currentWeb: WebView | null, counterparty: UNCounterparty) => {
|
|
45
|
+
currentWeb?.injectJavaScript(`dispatchCounterpartyDeletedEvent('${counterparty}')`);
|
|
46
|
+
};
|
|
@@ -23,7 +23,8 @@ import type {
|
|
|
23
23
|
UNCreditAccount,
|
|
24
24
|
UNComponentsError,
|
|
25
25
|
UNComponentsOnLoadResponse,
|
|
26
|
-
UNComponentsOnLoadResponseData
|
|
26
|
+
UNComponentsOnLoadResponseData,
|
|
27
|
+
UNAccountStatusPosition
|
|
27
28
|
} from '../../types/shared';
|
|
28
29
|
import { AccountMessage } from '../../messages/webMessages/accountMessage';
|
|
29
30
|
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
@@ -51,6 +52,7 @@ export interface UNAccountComponentProps {
|
|
|
51
52
|
hideActionsMenuButton?: boolean;
|
|
52
53
|
hideSelectionMenuButton?: boolean;
|
|
53
54
|
hideAccountStatus?: boolean;
|
|
55
|
+
accountStatusPosition?: UNAccountStatusPosition;
|
|
54
56
|
hideAccountDetails?: boolean;
|
|
55
57
|
hideAccountButtons?: boolean;
|
|
56
58
|
hideAccountCtaBanner?: boolean;
|
|
@@ -160,7 +162,6 @@ const UNAccountComponent = React.forwardRef<UNAccountRef, UNAccountComponentProp
|
|
|
160
162
|
type: BottomSheetRenderingType.Slot,
|
|
161
163
|
data: slotData,
|
|
162
164
|
} as SlotRendering;
|
|
163
|
-
|
|
164
165
|
dispatch(setEvent({ key: BottomSheetNativeMessage.REQUEST_RENDERING, data }));
|
|
165
166
|
|
|
166
167
|
break;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UNAccountAction, UNAccountComponentProps } from './UNAccountComponent';
|
|
2
2
|
import { RequestRefreshEvent, RequestRenderingEvent } from '../../messages/webMessages/unitComponentsMessages';
|
|
3
3
|
import type WebView from 'react-native-webview';
|
|
4
|
-
import type
|
|
4
|
+
import { UNAccountStatusPosition, type UNAccountMenuAction } from '../../types/shared';
|
|
5
5
|
import { WebComponentType } from '../../types/internal/webComponent.types';
|
|
6
6
|
import { LISTENERS } from '../../scripts/html/bodyScript';
|
|
7
7
|
import { DISPATCH_REQUEST_REFRESH } from '../../scripts/html/bodyScript';
|
|
@@ -14,6 +14,7 @@ export const getAccountParams = (props: UNAccountComponentProps) => {
|
|
|
14
14
|
hide-actions-menu-button="${props.hideActionsMenuButton || false}"
|
|
15
15
|
hide-selection-menu-button="${props.hideSelectionMenuButton || false}"
|
|
16
16
|
hide-account-status="${props.hideAccountStatus || false}"
|
|
17
|
+
account-status-position="${props.accountStatusPosition || UNAccountStatusPosition.End}"
|
|
17
18
|
hide-account-details="${props.hideAccountDetails || false}"
|
|
18
19
|
hide-account-buttons="${props.hideAccountButtons || false}"
|
|
19
20
|
hide-account-cta-banner="${props.hideAccountCtaBanner || false}"
|
|
@@ -19,7 +19,7 @@ import { WebComponent } from '../../webComponent/WebComponent';
|
|
|
19
19
|
import {
|
|
20
20
|
getActivityParams,
|
|
21
21
|
getActivityScript,
|
|
22
|
-
|
|
22
|
+
injectActivityFiltersChanged,
|
|
23
23
|
injectRefreshEventIfNeeded,
|
|
24
24
|
} from './UNActivityComponent.utils';
|
|
25
25
|
import type WebView from 'react-native-webview';
|
|
@@ -81,7 +81,7 @@ const UNActivityComponent = React.forwardRef<UNActivityRef, UNActivityComponentP
|
|
|
81
81
|
}));
|
|
82
82
|
|
|
83
83
|
const dispatchActivityFiltersChanged = (query: string) => {
|
|
84
|
-
|
|
84
|
+
injectActivityFiltersChanged(webRef.current, query);
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
useListenerToEvent({ busEventKey: UnitComponentsMessage.UNIT_REQUEST_REFRESH, action: requestRefresh });
|
|
@@ -31,6 +31,6 @@ export const injectRefreshEventIfNeeded = (currentWeb: WebView | null, requestRe
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
export const
|
|
34
|
+
export const injectActivityFiltersChanged = (currentWeb: WebView | null, query: string) => {
|
|
35
35
|
currentWeb?.injectJavaScript(`dispatchActivityFilterChangedEvent('${query}')`);
|
|
36
36
|
};
|
|
@@ -18,3 +18,9 @@ export const fullScreenHeight =
|
|
|
18
18
|
: Dimensions.get('window').height;
|
|
19
19
|
|
|
20
20
|
export const overFullScreenHeight = Dimensions.get('window').height * BOTTOM_SHEET_OVER_FULLSCREEN_PERCENTAGE_SIZE;
|
|
21
|
+
|
|
22
|
+
export const TOP_PADDING = 48;
|
|
23
|
+
export const BOTTOM_PADDING = 24;
|
|
24
|
+
export const LEFT_PADDING = 24;
|
|
25
|
+
export const RIGHT_PADDING = 24;
|
|
26
|
+
export const VERTICAL_PADDING = TOP_PADDING + BOTTOM_PADDING; // For adjusting injected height
|
|
@@ -9,12 +9,13 @@ import {
|
|
|
9
9
|
BottomSheetNativeBookPaymentComponentType,
|
|
10
10
|
BottomSheetNativeCheckDepositComponentType,
|
|
11
11
|
BottomSheetNativeComponentType,
|
|
12
|
+
BottomSheetNativeCreateCardComponentType,
|
|
12
13
|
BottomSheetNativePlaceType,
|
|
13
14
|
BottomSheetNativeWirePaymentComponentType,
|
|
14
15
|
BottomSheetSlotData,
|
|
15
16
|
} from '../../types/internal/bottomSheet.types';
|
|
16
17
|
import { WebComponentType } from '../../types/internal/webComponent.types';
|
|
17
|
-
import { parseUNAccountFilters } from '../../types/shared';
|
|
18
|
+
import { parseUNAccountFilters, parseUNCreateCardTypes } from '../../types/shared';
|
|
18
19
|
|
|
19
20
|
export const getBottomSheetScript = () => {
|
|
20
21
|
return LISTENERS.requestRefresh;
|
|
@@ -88,13 +89,13 @@ const getACHCreditComponentDataFromEvent = (event: BottomSheetSlotData): BottomS
|
|
|
88
89
|
const accountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'account-id');
|
|
89
90
|
const theme = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'theme');
|
|
90
91
|
const language = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'language');
|
|
91
|
-
const fee = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'fee');
|
|
92
92
|
const initialStageBackButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'initial-stage-back-button');
|
|
93
93
|
const finalStageDoneButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'final-stage-done-button');
|
|
94
94
|
const withPlaid = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'with-plaid');
|
|
95
95
|
const plaidLinkCustomizationName = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'plaid-link-customization-name');
|
|
96
96
|
const isAutoFocus = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'is-auto-focus');
|
|
97
97
|
const sameDay = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'same-day');
|
|
98
|
+
const showSameDaySelection = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'show-same-day-selection');
|
|
98
99
|
const plaidAccountFiltersAsString = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'plaid-account-filters');
|
|
99
100
|
const plaidAccountFiltersArray = parseUNAccountFilters(plaidAccountFiltersAsString);
|
|
100
101
|
|
|
@@ -104,7 +105,6 @@ const getACHCreditComponentDataFromEvent = (event: BottomSheetSlotData): BottomS
|
|
|
104
105
|
accountId: accountId,
|
|
105
106
|
theme: theme,
|
|
106
107
|
language: language,
|
|
107
|
-
fee: fee ? parseInt(fee) : undefined,
|
|
108
108
|
initialStageBackButton: initialStageBackButton ? initialStageBackButton === 'true' : undefined,
|
|
109
109
|
finalStageDoneButton: finalStageDoneButton ? finalStageDoneButton === 'true' : undefined,
|
|
110
110
|
withPlaid: withPlaid ? withPlaid === 'true' : undefined,
|
|
@@ -112,6 +112,7 @@ const getACHCreditComponentDataFromEvent = (event: BottomSheetSlotData): BottomS
|
|
|
112
112
|
plaidLinkCustomizationName: plaidLinkCustomizationName,
|
|
113
113
|
isAutoFocus: isAutoFocus ? isAutoFocus === 'true' : undefined,
|
|
114
114
|
sameDay: sameDay ? sameDay === 'true' : undefined,
|
|
115
|
+
showSameDaySelection: showSameDaySelection ? showSameDaySelection === 'true' : undefined
|
|
115
116
|
},
|
|
116
117
|
};
|
|
117
118
|
};
|
|
@@ -120,12 +121,12 @@ const getACHDebitComponentDataFromEvent = (event: BottomSheetSlotData): BottomSh
|
|
|
120
121
|
const accountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'account-id');
|
|
121
122
|
const theme = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'theme');
|
|
122
123
|
const language = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'language');
|
|
123
|
-
const fee = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'fee');
|
|
124
124
|
const initialStageBackButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'initial-stage-back-button');
|
|
125
125
|
const finalStageDoneButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'final-stage-done-button');
|
|
126
126
|
const plaidLinkCustomizationName = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'plaid-link-customization-name');
|
|
127
127
|
const isAutoFocus = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'is-auto-focus');
|
|
128
128
|
const sameDay = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'same-day');
|
|
129
|
+
const showSameDaySelection = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'show-same-day-selection');
|
|
129
130
|
const plaidAccountFiltersAsString = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'plaid-account-filters');
|
|
130
131
|
const plaidAccountFiltersArray = parseUNAccountFilters(plaidAccountFiltersAsString);
|
|
131
132
|
|
|
@@ -135,13 +136,13 @@ const getACHDebitComponentDataFromEvent = (event: BottomSheetSlotData): BottomSh
|
|
|
135
136
|
accountId: accountId,
|
|
136
137
|
theme: theme,
|
|
137
138
|
language: language,
|
|
138
|
-
fee: fee ? parseInt(fee) : undefined,
|
|
139
139
|
initialStageBackButton: initialStageBackButton ? initialStageBackButton === 'true' : undefined,
|
|
140
140
|
finalStageDoneButton: finalStageDoneButton ? finalStageDoneButton === 'true' : undefined,
|
|
141
141
|
plaidAccountFilters: plaidAccountFiltersArray,
|
|
142
142
|
plaidLinkCustomizationName: plaidLinkCustomizationName,
|
|
143
143
|
isAutoFocus: isAutoFocus ? isAutoFocus === 'true' : undefined,
|
|
144
144
|
sameDay: sameDay ? sameDay === 'true' : undefined,
|
|
145
|
+
showSameDaySelection: showSameDaySelection ? showSameDaySelection === 'true' : undefined
|
|
145
146
|
},
|
|
146
147
|
};
|
|
147
148
|
};
|
|
@@ -201,7 +202,6 @@ const getWirePaymentComponentDataFromEvent = (event: BottomSheetSlotData): Botto
|
|
|
201
202
|
const accountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'account-id');
|
|
202
203
|
const theme = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'theme');
|
|
203
204
|
const language = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'language');
|
|
204
|
-
const fee = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'fee');
|
|
205
205
|
const isAutoFocus = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'is-auto-focus');
|
|
206
206
|
const initialStageBackButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'initial-stage-back-button');
|
|
207
207
|
const finalStageDoneButton = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'final-stage-done-button');
|
|
@@ -216,7 +216,6 @@ const getWirePaymentComponentDataFromEvent = (event: BottomSheetSlotData): Botto
|
|
|
216
216
|
accountId: accountId,
|
|
217
217
|
theme: theme,
|
|
218
218
|
language: language,
|
|
219
|
-
fee: fee ? parseInt(fee) : undefined,
|
|
220
219
|
isAutoFocus: isAutoFocus ? isAutoFocus === 'true' : undefined,
|
|
221
220
|
initialStageBackButton: initialStageBackButton ? initialStageBackButton === 'true' : undefined,
|
|
222
221
|
finalStageDoneButton: finalStageDoneButton ? finalStageDoneButton === 'true' : undefined,
|
|
@@ -224,6 +223,28 @@ const getWirePaymentComponentDataFromEvent = (event: BottomSheetSlotData): Botto
|
|
|
224
223
|
};
|
|
225
224
|
};
|
|
226
225
|
|
|
226
|
+
const getCreateCardComponentDataFromEvent = (event: BottomSheetSlotData): BottomSheetNativeCreateCardComponentType | null => {
|
|
227
|
+
const accountId = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'account-id');
|
|
228
|
+
const theme = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'theme');
|
|
229
|
+
const language = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'language');
|
|
230
|
+
const virtualCardFee = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'virtual-card-fee');
|
|
231
|
+
const physicalCardFee = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'physical-card-fee');
|
|
232
|
+
const cardTypesAsString = extractValueFromRequestRenderingEvent(event.requestRenderingEvent, 'card-types');
|
|
233
|
+
const cardTypes = parseUNCreateCardTypes(cardTypesAsString);
|
|
234
|
+
|
|
235
|
+
return {
|
|
236
|
+
type: BottomSheetNativeComponentType.CreateCardComponent,
|
|
237
|
+
props: {
|
|
238
|
+
accountId: accountId,
|
|
239
|
+
theme: theme,
|
|
240
|
+
language: language,
|
|
241
|
+
cardTypes: cardTypes,
|
|
242
|
+
physicalCardFee: physicalCardFee ? parseInt(physicalCardFee) : undefined,
|
|
243
|
+
virtualCardFee: virtualCardFee ? parseInt(virtualCardFee) : undefined,
|
|
244
|
+
},
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
|
|
227
248
|
export const getNativeComponentDataFromEvent = (event: BottomSheetSlotData) => {
|
|
228
249
|
let componentData = null;
|
|
229
250
|
let nativePlace = BottomSheetNativePlaceType.modal;
|
|
@@ -262,6 +283,10 @@ export const getNativeComponentDataFromEvent = (event: BottomSheetSlotData) => {
|
|
|
262
283
|
componentData = getWirePaymentComponentDataFromEvent(event);
|
|
263
284
|
break;
|
|
264
285
|
|
|
286
|
+
case WebComponentType.createCard:
|
|
287
|
+
componentData = getCreateCardComponentDataFromEvent(event);
|
|
288
|
+
break;
|
|
289
|
+
|
|
265
290
|
default:
|
|
266
291
|
break;
|
|
267
292
|
}
|
|
@@ -13,6 +13,7 @@ import UNCheckDepositComponent from '../../../UNCheckDepositComponent/UNCheckDep
|
|
|
13
13
|
import UNACHDebitComponent from '../../../UNACHDebitComponent/UNACHDebitComponent';
|
|
14
14
|
import UNBookPaymentComponent from '../../../UNBookPaymentComponent/UNBookPaymentComponent';
|
|
15
15
|
import UNWirePaymentComponent from '../../../UNWirePaymentComponent/UNWirePaymentComponent';
|
|
16
|
+
import UNCreateCardComponent from '../../../UNCreateCardComponent/UNCreateCardComponent';
|
|
16
17
|
import { PageMessage } from '../../../../messages/webMessages/pageMessage';
|
|
17
18
|
import { useListenerToEvent } from '../../../../hooks/useListenerToEvent';
|
|
18
19
|
import UNKeyboardAvoidingView from '../../../../helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView';
|
|
@@ -115,6 +116,12 @@ const UNBottomSheetNativeComponent = (props: UNBottomSheetNativeComponentProps)
|
|
|
115
116
|
{...props.nativeComponentData.component.props}
|
|
116
117
|
/>
|
|
117
118
|
);
|
|
119
|
+
case BottomSheetNativeComponentType.CreateCardComponent:
|
|
120
|
+
return (
|
|
121
|
+
<UNCreateCardComponent
|
|
122
|
+
{...props.nativeComponentData.component.props}
|
|
123
|
+
/>
|
|
124
|
+
);
|
|
118
125
|
}
|
|
119
126
|
};
|
|
120
127
|
|
|
@@ -127,7 +134,7 @@ const UNBottomSheetNativeComponent = (props: UNBottomSheetNativeComponentProps)
|
|
|
127
134
|
);
|
|
128
135
|
case BottomSheetNativePlaceType.overFullScreen:
|
|
129
136
|
return (
|
|
130
|
-
<UNKeyboardAvoidingView style={{ height }}>
|
|
137
|
+
<UNKeyboardAvoidingView style={{ height, padding, paddingTop, paddingBottom }}>
|
|
131
138
|
{renderNativeComponent()}
|
|
132
139
|
</UNKeyboardAvoidingView>
|
|
133
140
|
);
|
|
@@ -30,11 +30,13 @@ import {
|
|
|
30
30
|
} from '../../../../slices/BottomSheetSlice';
|
|
31
31
|
import { getAccountActionType } from '../../../UNAccountComponent/UNAccountComponent.utils';
|
|
32
32
|
import { UNAccountAction } from '../../../UNAccountComponent/UNAccountComponent';
|
|
33
|
-
import { fullScreenHeight, overFullScreenHeight, statusBarHeight } from '../../UNBottomSheetComponent.constants';
|
|
33
|
+
import { BOTTOM_PADDING, fullScreenHeight, LEFT_PADDING, overFullScreenHeight, RIGHT_PADDING, statusBarHeight, TOP_PADDING, VERTICAL_PADDING } from '../../UNBottomSheetComponent.constants';
|
|
34
34
|
import { BottomSheetNativeMessage } from '../../../../messages/nativeMessages/bottomSheetMessage';
|
|
35
35
|
import { OpenPlaidEvent, PlaidMessage } from '../../../../messages/webMessages/plaidMessages';
|
|
36
36
|
import { PayeeCounterpartyEvent, PayeeManagementMessage } from '../../../../messages/webMessages/payeeManagementMessage';
|
|
37
37
|
import UNKeyboardAvoidingView from '../../../../helpers/UNKeyboardAvoidingView/UNKeyboardAvoidingView';
|
|
38
|
+
import { MultipleCardsFiltersChangedEvent, MultipleCardsMessage } from '../../../../messages/webMessages/multipleCardsMessage';
|
|
39
|
+
import { View } from 'react-native';
|
|
38
40
|
|
|
39
41
|
export interface UNBottomSheetSlotComponentProps {
|
|
40
42
|
requestRenderingEvent: RequestRenderingEvent;
|
|
@@ -100,17 +102,35 @@ const UNBottomSheetSlotComponent = (props: UNBottomSheetSlotComponentProps) => {
|
|
|
100
102
|
case PageMessage.PAGE_HEIGHT: {
|
|
101
103
|
const height = (message.details as HeightEvent).height;
|
|
102
104
|
switch (nativePlace) {
|
|
103
|
-
case BottomSheetNativePlaceType.overFullScreen:
|
|
104
|
-
|
|
105
|
+
case BottomSheetNativePlaceType.overFullScreen: {
|
|
106
|
+
if (!props.requestRenderingEvent.data.isPaddingIncluded) {
|
|
107
|
+
injectHtmlFullScreenHeight(webRef.current, overFullScreenHeight - VERTICAL_PADDING);
|
|
108
|
+
} else {
|
|
109
|
+
injectHtmlFullScreenHeight(webRef.current, overFullScreenHeight);
|
|
110
|
+
}
|
|
105
111
|
break;
|
|
106
|
-
|
|
107
|
-
|
|
112
|
+
}
|
|
113
|
+
case BottomSheetNativePlaceType.modal: {
|
|
114
|
+
if (!props.requestRenderingEvent.data.isPaddingIncluded) {
|
|
115
|
+
injectHtmlFullScreenHeight(webRef.current, fullScreenHeight - statusBarHeight - VERTICAL_PADDING);
|
|
116
|
+
} else {
|
|
117
|
+
injectHtmlFullScreenHeight(webRef.current, fullScreenHeight - statusBarHeight);
|
|
118
|
+
}
|
|
108
119
|
break;
|
|
120
|
+
}
|
|
109
121
|
case BottomSheetNativePlaceType.menu: case BottomSheetNativePlaceType.contentHeight:
|
|
110
122
|
if (height < overFullScreenHeight) {
|
|
111
|
-
dispatch(setComponentHeight(
|
|
123
|
+
dispatch(setComponentHeight(
|
|
124
|
+
props.requestRenderingEvent.data.isPaddingIncluded ?
|
|
125
|
+
height :
|
|
126
|
+
height + VERTICAL_PADDING
|
|
127
|
+
));
|
|
112
128
|
} else {
|
|
113
|
-
dispatch(setComponentHeight(
|
|
129
|
+
dispatch(setComponentHeight(
|
|
130
|
+
props.requestRenderingEvent.data.isPaddingIncluded ?
|
|
131
|
+
overFullScreenHeight :
|
|
132
|
+
overFullScreenHeight + VERTICAL_PADDING
|
|
133
|
+
));
|
|
114
134
|
}
|
|
115
135
|
break;
|
|
116
136
|
}
|
|
@@ -161,6 +181,12 @@ const UNBottomSheetSlotComponent = (props: UNBottomSheetSlotComponentProps) => {
|
|
|
161
181
|
data: (message.details as ActivityFiltersChangedEvent),
|
|
162
182
|
}));
|
|
163
183
|
break;
|
|
184
|
+
case MultipleCardsMessage.UNIT_MULTIPLE_CARDS_FILTERS_CHANGED:
|
|
185
|
+
dispatch(setEvent({
|
|
186
|
+
key: MultipleCardsMessage.UNIT_MULTIPLE_CARDS_FILTERS_CHANGED,
|
|
187
|
+
data: (message.details as MultipleCardsFiltersChangedEvent),
|
|
188
|
+
}));
|
|
189
|
+
break;
|
|
164
190
|
case PayeeManagementMessage.UNIT_COUNTERPARTY_DELETED: {
|
|
165
191
|
dispatch(setEvent({
|
|
166
192
|
key: PayeeManagementMessage.UNIT_COUNTERPARTY_DELETED,
|
|
@@ -187,19 +213,29 @@ const UNBottomSheetSlotComponent = (props: UNBottomSheetSlotComponentProps) => {
|
|
|
187
213
|
dispatch(setShouldEnableBottomSheetScroll(false));
|
|
188
214
|
}
|
|
189
215
|
};
|
|
216
|
+
|
|
217
|
+
// If isPaddingIncluded is true, we don't need to add padding to the web component
|
|
218
|
+
const paddingStyle = !props.requestRenderingEvent.data.isPaddingIncluded ? {
|
|
219
|
+
paddingTop: TOP_PADDING,
|
|
220
|
+
paddingBottom: BOTTOM_PADDING,
|
|
221
|
+
paddingLeft: LEFT_PADDING,
|
|
222
|
+
paddingRight: RIGHT_PADDING,
|
|
223
|
+
} : {};
|
|
190
224
|
|
|
191
225
|
return (
|
|
192
|
-
<
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
226
|
+
<View style={paddingStyle}>
|
|
227
|
+
<UNKeyboardAvoidingView keyboardVerticalOffset={fullScreenHeight - overFullScreenHeight}>
|
|
228
|
+
<WebComponent
|
|
229
|
+
ref={webRef}
|
|
230
|
+
type={WebComponentType.slot}
|
|
231
|
+
presentationMode={PresentationMode.CoverInjectedHeight}
|
|
232
|
+
script={getBottomSheetScript()}
|
|
233
|
+
onMessage={_onWebMessage}
|
|
234
|
+
isScrollable={scrollState === ScrollState.onlyWebView || scrollState === ScrollState.onTop}
|
|
235
|
+
handleScroll={_onScrollWebView}
|
|
236
|
+
/>
|
|
237
|
+
</UNKeyboardAvoidingView>
|
|
238
|
+
</View>
|
|
203
239
|
);
|
|
204
240
|
};
|
|
205
241
|
|
|
@@ -45,6 +45,8 @@ export interface UNCardComponentProps {
|
|
|
45
45
|
hideActionsMenuButton?: boolean;
|
|
46
46
|
hideCardTitle?: boolean;
|
|
47
47
|
hideSensitiveDataButton?: boolean;
|
|
48
|
+
showCardTypeSubtitle?: boolean;
|
|
49
|
+
showCardHolderSubtitle?: boolean;
|
|
48
50
|
|
|
49
51
|
// events
|
|
50
52
|
onLoad?: (response: UNComponentsOnLoadResponse<UNCard>) => void;
|
|
@@ -18,6 +18,8 @@ export const getCardParams = (props: UNCardComponentProps) => {
|
|
|
18
18
|
learn-more-url="${props.learnMoreUrl || ''}"
|
|
19
19
|
${feeParam}
|
|
20
20
|
${menuItemsParam}
|
|
21
|
+
show-card-type-subtitle="${props.showCardTypeSubtitle || false}"
|
|
22
|
+
show-card-holder-subtitle="${props.showCardHolderSubtitle || false}"
|
|
21
23
|
`;
|
|
22
24
|
};
|
|
23
25
|
|
|
@@ -40,8 +42,9 @@ export const injectRequestHideSensitiveDataScript = (currentWeb: WebView | null)
|
|
|
40
42
|
export const injectRequestShowSensitiveDataScript = (currentWeb: WebView | null) => {
|
|
41
43
|
currentWeb?.injectJavaScript(`dispatchRequestShowSensitiveData('${WebComponentType.card}')`);
|
|
42
44
|
};
|
|
45
|
+
|
|
43
46
|
export const injectRefreshEventIfNeeded = (currentWeb: WebView | null, requestRefreshEvent: RequestRefreshEvent | null, cardId: string) => {
|
|
44
47
|
if (requestRefreshEvent && requestRefreshEvent.dependencies.includes(WebComponentType.card.valueOf()) && requestRefreshEvent.resourceId == cardId) {
|
|
45
48
|
currentWeb?.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);
|
|
46
49
|
}
|
|
47
|
-
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
3
|
+
import { WebComponent } from '../../webComponent/WebComponent';
|
|
4
|
+
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
5
|
+
import { withReduxStore } from '../../helpers/store/helpers';
|
|
6
|
+
import { getCreateCardParams } from './UNCreateCardComponent.utils';
|
|
7
|
+
import type { WebViewMessage } from '../../messages/webMessages';
|
|
8
|
+
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
9
|
+
import { UnitComponentsMessage } from '../../messages/webMessages/unitComponentsMessages';
|
|
10
|
+
import { UNCard, UNComponentsError, UNComponentsOnLoadResponse, UNComponentsOnLoadResponseData } from '../../types/shared';
|
|
11
|
+
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
12
|
+
import { UNCreateCardComponentResources, UNCreateCardType } from '../../types/shared/createCard.types';
|
|
13
|
+
import { CardCreatedEvent, CardMessage } from '../../messages/webMessages/cardMessage';
|
|
14
|
+
import { useDispatch } from 'react-redux';
|
|
15
|
+
import { setEvent } from '../../slices/SharedEventsSlice';
|
|
16
|
+
|
|
17
|
+
export interface UNCreateCardComponentProps {
|
|
18
|
+
// inputs
|
|
19
|
+
accountId?: string;
|
|
20
|
+
cardTypes: UNCreateCardType[];
|
|
21
|
+
virtualCardFee?: number;
|
|
22
|
+
physicalCardFee?: number;
|
|
23
|
+
|
|
24
|
+
// ui
|
|
25
|
+
theme?: string;
|
|
26
|
+
language?: string;
|
|
27
|
+
|
|
28
|
+
// callbacks
|
|
29
|
+
onLoad?: (response: UNComponentsOnLoadResponse<UNCreateCardComponentResources>) => void
|
|
30
|
+
onCardCreated?: (cardData: UNCard) => void
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const UNCreateCardComponent = (props: UNCreateCardComponentProps) => {
|
|
34
|
+
const dispatch = useDispatch();
|
|
35
|
+
const [height, setHeight] = useState<number>(0);
|
|
36
|
+
const [presentationMode, setPresentationMode] = useState<PresentationMode>(PresentationMode.Inherit);
|
|
37
|
+
|
|
38
|
+
const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {
|
|
39
|
+
if (!props.onLoad) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (RESPONSE_KEYS.errors in response) {
|
|
44
|
+
props.onLoad(response as UNComponentsError);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (RESPONSE_KEYS.createCardResult in response) {
|
|
48
|
+
const createCardResponse = response[RESPONSE_KEYS.createCardResult] as UNComponentsOnLoadResponseData<UNCreateCardComponentResources>;
|
|
49
|
+
props.onLoad(createCardResponse);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
console.error('On Load Error: unexpected response type.');
|
|
53
|
+
return;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const handleWebViewMessage = (message: WebViewMessage) => {
|
|
57
|
+
if (!message || !message.details) return;
|
|
58
|
+
|
|
59
|
+
switch (message.type) {
|
|
60
|
+
case UnitComponentsMessage.UNIT_ON_LOAD:
|
|
61
|
+
handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);
|
|
62
|
+
break;
|
|
63
|
+
case PageMessage.PAGE_HEIGHT: {
|
|
64
|
+
const currentHeight = (message.details as HeightEvent).height;
|
|
65
|
+
setHeight(currentHeight);
|
|
66
|
+
if (presentationMode === PresentationMode.Inherit && currentHeight === 0) {
|
|
67
|
+
setPresentationMode(PresentationMode.Default);
|
|
68
|
+
}
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
case CardMessage.CARD_CREATED:
|
|
72
|
+
dispatch(setEvent({
|
|
73
|
+
key: CardMessage.CARD_CREATED,
|
|
74
|
+
data: (message.details as CardCreatedEvent),
|
|
75
|
+
}));
|
|
76
|
+
props.onCardCreated && props.onCardCreated(message.details as UNCard);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const style = presentationMode === PresentationMode.Inherit ? { flex: 1 } : { height: height };
|
|
82
|
+
return <UNBaseView style={style} onLoadError={handleUnitOnLoad} fallback={<></>}>
|
|
83
|
+
<WebComponent
|
|
84
|
+
type={WebComponentType.createCard}
|
|
85
|
+
presentationMode={PresentationMode.Inherit}
|
|
86
|
+
params={getCreateCardParams(props)}
|
|
87
|
+
onMessage={(message: WebViewMessage) => handleWebViewMessage(message)}
|
|
88
|
+
theme={props.theme}
|
|
89
|
+
language={props.language}
|
|
90
|
+
/>
|
|
91
|
+
</UNBaseView>;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export default withReduxStore<UNCreateCardComponentProps>(UNCreateCardComponent);
|