react-native-unit-components 2.0.2 → 2.1.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.map +1 -1
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +1 -0
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +1 -0
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
- package/lib/commonjs/components/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.utils.js +29 -2
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +3 -0
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +7 -0
- 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 +18 -3
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.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 +76 -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.map +1 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js +1 -0
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.utils.js.map +1 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js +1 -0
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.utils.js.map +1 -1
- package/lib/module/components/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.utils.js +30 -3
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js +3 -0
- package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.js +7 -0
- 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 +14 -2
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.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 +75 -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 +2 -1
- package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts +2 -1
- package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts.map +1 -1
- 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.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 +1 -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/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/scripts/html/bodyScript.d.ts +6 -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 +2 -1
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.utils.ts +1 -0
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +2 -1
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.utils.ts +1 -0
- 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.utils.ts +32 -1
- package/src/components/UNBottomSheetComponent/components/UNBottomSheetNativeComponent/UNBottomSheetNativeComponent.tsx +7 -0
- package/src/components/UNBottomSheetComponent/components/UNBottomSheetSlotComponent/UNBottomSheetSlotComponent.tsx +7 -0
- 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 +44 -9
- package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.utils.ts +17 -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/scripts/html/bodyScript.ts +77 -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
|
@@ -6,12 +6,14 @@ import { AccountMessage } from '../../messages/webMessages/accountMessage';
|
|
|
6
6
|
import { ActivityMessage } from '../../messages/webMessages/activityMessage';
|
|
7
7
|
import { PlaidMessage } from '../../messages/webMessages/plaidMessages';
|
|
8
8
|
import { PayeeManagementMessage } from '../../messages/webMessages/payeeManagementMessage';
|
|
9
|
+
import { MultipleCardsMessage } from '../../messages/webMessages/multipleCardsMessage';
|
|
10
|
+
import { WebComponentType } from '../../types/internal/webComponent.types';
|
|
9
11
|
|
|
10
12
|
export const POST_MESSAGE_TO_SDK = `
|
|
11
13
|
const postMessageToSDK = (message) => {
|
|
12
14
|
if ('ReactNativeWebView' in window) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const messageString = JSON.stringify(message)
|
|
16
|
+
window['ReactNativeWebView'].postMessage(messageString)
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
`;
|
|
@@ -44,7 +46,7 @@ export const LISTENERS = {
|
|
|
44
46
|
`,
|
|
45
47
|
onLoad: `
|
|
46
48
|
window.addEventListener("${UnitComponentsMessage.UNIT_ON_LOAD}", (e) => {
|
|
47
|
-
if (document.querySelector("
|
|
49
|
+
if (document.querySelector("${WebComponentType.account}") !== null) {
|
|
48
50
|
// 10 milliseconds delay to render AccountComponent correctly
|
|
49
51
|
setTimeout(() => {
|
|
50
52
|
postHeight()
|
|
@@ -53,16 +55,14 @@ export const LISTENERS = {
|
|
|
53
55
|
postHeight()
|
|
54
56
|
}
|
|
55
57
|
postMessageToSDK({ type: "${UnitComponentsMessage.UNIT_ON_LOAD}", details: e.detail })
|
|
56
|
-
|
|
57
58
|
});
|
|
58
59
|
`,
|
|
59
60
|
requestCloseFlow: `
|
|
60
61
|
window.addEventListener("${UnitComponentsMessage.UNIT_REQUEST_CLOSE_FLOW}", (e) => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
// Add a delay of 200 milliseconds to allow the SDK to finish processing prior events that require a Promise before closing the flow
|
|
63
|
+
setTimeout(() => {
|
|
64
|
+
postMessageToSDK({ type: "${UnitComponentsMessage.UNIT_REQUEST_CLOSE_FLOW}" });
|
|
65
|
+
}, 200);
|
|
66
66
|
});
|
|
67
67
|
`,
|
|
68
68
|
requestOpenLink: `
|
|
@@ -93,49 +93,58 @@ export const LISTENERS = {
|
|
|
93
93
|
}).catch((e) => {
|
|
94
94
|
console.log(e)
|
|
95
95
|
})
|
|
96
|
-
|
|
96
|
+
});
|
|
97
|
+
`,
|
|
98
|
+
cardCreated: `
|
|
99
|
+
window.addEventListener("${CardMessage.CARD_CREATED}", (e) => {
|
|
100
|
+
const response = e.detail
|
|
101
|
+
response.then((data) => {
|
|
102
|
+
postMessageToSDK({ type: "${CardMessage.CARD_CREATED}", details: JSON.stringify(data.data)})
|
|
103
|
+
}).catch((e) => {
|
|
104
|
+
console.log(e)
|
|
105
|
+
})
|
|
106
|
+
});
|
|
97
107
|
`,
|
|
98
108
|
unitRequestExternalSdk: `
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
window.addEventListener("${UnitComponentsMessage.UNIT_REQUEST_EXTERNAL_SDK}", (e) => {
|
|
110
|
+
postMessageToSDK({ type: "${UnitComponentsMessage.UNIT_REQUEST_EXTERNAL_SDK}", details: e.detail })
|
|
111
|
+
});
|
|
102
112
|
`,
|
|
103
|
-
|
|
104
113
|
unitRequestLeftToSpendDetails: `
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
114
|
+
window.addEventListener("${UnitComponentsMessage.UNIT_REQUEST_LEFT_TO_SPEND_DETAILS}", (e) => {
|
|
115
|
+
postMessageToSDK({ type: "${UnitComponentsMessage.UNIT_REQUEST_LEFT_TO_SPEND_DETAILS}", details: e.detail })
|
|
116
|
+
});
|
|
108
117
|
`,
|
|
109
118
|
unitPaymentCreated: `
|
|
110
|
-
|
|
111
|
-
|
|
119
|
+
window.addEventListener("${PaymentMessage.PAYMENT_CREATED}", (e) => {
|
|
120
|
+
const response = e.detail
|
|
112
121
|
response.then((data) => {
|
|
113
122
|
postMessageToSDK({ type: "${PaymentMessage.PAYMENT_CREATED}", details: { data: data.data }})
|
|
114
123
|
}).catch((e) => {
|
|
115
124
|
console.log(e)
|
|
116
125
|
})
|
|
117
|
-
|
|
126
|
+
});
|
|
118
127
|
`,
|
|
119
128
|
unitPaymentInitialStageBackButtonClicked: `
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
129
|
+
window.addEventListener("${PaymentMessage.INITIAL_STAGE_BACK_BUTTON_CLICKED}", (e) => {
|
|
130
|
+
postMessageToSDK({ type: "${PaymentMessage.INITIAL_STAGE_BACK_BUTTON_CLICKED}", details: { data: e.detail }})
|
|
131
|
+
});
|
|
123
132
|
`,
|
|
124
133
|
|
|
125
134
|
unitPaymentFinalStageDoneButtonClicked: `
|
|
126
|
-
window.addEventListener("
|
|
135
|
+
window.addEventListener("${PaymentMessage.FINAL_STAGE_DONE_BUTTON_CLICKED}", (e) => {
|
|
127
136
|
postMessageToSDK({ type: "${PaymentMessage.FINAL_STAGE_DONE_BUTTON_CLICKED}", details: { data: e.detail }})
|
|
128
137
|
});
|
|
129
138
|
`,
|
|
130
139
|
unitPlaidTokenCreated: `
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
140
|
+
window.addEventListener("${PlaidMessage.UNIT_PLAID_TOKEN_CREATED}", (e) => {
|
|
141
|
+
const response = e.detail
|
|
142
|
+
response.then((data) => {
|
|
143
|
+
postMessageToSDK({ type: "${PlaidMessage.UNIT_PLAID_TOKEN_CREATED}", details: { linkToken: data.data }})
|
|
144
|
+
}).catch((e) => {
|
|
145
|
+
console.log(e)
|
|
146
|
+
})
|
|
147
|
+
});
|
|
139
148
|
`,
|
|
140
149
|
unitAccountChanged: `
|
|
141
150
|
window.addEventListener("${AccountMessage.UNIT_ACCOUNT_CHANGED}", (e) => {
|
|
@@ -152,6 +161,11 @@ export const LISTENERS = {
|
|
|
152
161
|
postMessageToSDK({ type: "${ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED}", details: e.detail })
|
|
153
162
|
});
|
|
154
163
|
`,
|
|
164
|
+
unitMultipleCardsFiltersChanged: `
|
|
165
|
+
window.addEventListener("${MultipleCardsMessage.UNIT_MULTIPLE_CARDS_FILTERS_CHANGED}", (e) => {
|
|
166
|
+
postMessageToSDK({ type: "${MultipleCardsMessage.UNIT_MULTIPLE_CARDS_FILTERS_CHANGED}", details: e.detail })
|
|
167
|
+
});
|
|
168
|
+
`,
|
|
155
169
|
unitMultiFactorAuthFinished: `
|
|
156
170
|
window.addEventListener("${UnitComponentsMessage.UNIT_MULTI_FACTOR_AUTH_FINISHED}", async (e) => {
|
|
157
171
|
const response = await e.detail.response;
|
|
@@ -238,14 +252,14 @@ export const LISTENERS = {
|
|
|
238
252
|
`,
|
|
239
253
|
|
|
240
254
|
unitOpenPlaid: `
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
255
|
+
window.addEventListener("${PlaidMessage.UNIT_OPEN_PLAID}", async (e) => {
|
|
256
|
+
const response = event.detail;
|
|
257
|
+
response.then((data) => {
|
|
258
|
+
postMessageToSDK({ type: "${PlaidMessage.UNIT_OPEN_PLAID}", details: data.data })
|
|
259
|
+
}).catch((e) => {
|
|
260
|
+
console.log(e)
|
|
261
|
+
})
|
|
262
|
+
});
|
|
249
263
|
`
|
|
250
264
|
};
|
|
251
265
|
|
|
@@ -264,7 +278,7 @@ export const DISPATCH_EVENT_TO_CONTINUE = `
|
|
|
264
278
|
`;
|
|
265
279
|
|
|
266
280
|
export const DISPATCH_CARD_STATUS_CHANGED = `
|
|
267
|
-
const
|
|
281
|
+
const dispatchCardStatusChanged = (details) => {
|
|
268
282
|
const event = new CustomEvent("${CardMessage.CARD_STATUS_CHANGED}",{ detail: JSON.parse(details) })
|
|
269
283
|
window.dispatchEvent(event)
|
|
270
284
|
}
|
|
@@ -291,29 +305,44 @@ export const SET_ITEM_IN_WINDOW_UNIT_STORE = `
|
|
|
291
305
|
|
|
292
306
|
export const DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT = `
|
|
293
307
|
const dispatchActivityFilterChangedEvent = (details) => {
|
|
294
|
-
const event = new CustomEvent("
|
|
308
|
+
const event = new CustomEvent("${ActivityMessage.UNIT_ACTIVITY_FILTERS_CHANGED}",{ detail: details});
|
|
309
|
+
window.dispatchEvent(event);
|
|
310
|
+
}
|
|
311
|
+
`;
|
|
312
|
+
|
|
313
|
+
export const DISPATCH_MULTIPLE_CARDS_FILTER_CHANGED_EVENT = `
|
|
314
|
+
const dispatchMultipleCardsFilterChangedEvent = (details) => {
|
|
315
|
+
const event = new CustomEvent("${MultipleCardsMessage.UNIT_MULTIPLE_CARDS_FILTERS_CHANGED}",{ detail: details });
|
|
316
|
+
window.dispatchEvent(event);
|
|
317
|
+
}
|
|
318
|
+
`;
|
|
319
|
+
|
|
320
|
+
export const DISPATCH_CARD_CREATED_EVENT = `
|
|
321
|
+
const dispatchCardCreatedEvent = (details) => {
|
|
322
|
+
// Add fromSDK to avoid infinite loop
|
|
323
|
+
const event = new CustomEvent("${CardMessage.CARD_CREATED}",{ detail: { data: JSON.parse(details) ,fromSDK: true } });
|
|
295
324
|
window.dispatchEvent(event);
|
|
296
325
|
}
|
|
297
326
|
`;
|
|
298
327
|
|
|
299
328
|
export const DISPATCH_PLAID_RESPONSE = `
|
|
300
329
|
const dispatchPlaidEvent = (details) => {
|
|
301
|
-
|
|
302
|
-
|
|
330
|
+
const event = new CustomEvent("${PlaidMessage.UNIT_PLAID_RESPONSE}",{ detail: details })
|
|
331
|
+
window.dispatchEvent(event)
|
|
303
332
|
}
|
|
304
333
|
`;
|
|
305
334
|
|
|
306
335
|
export const DISPATCH_PLAID_EXIT = `
|
|
307
336
|
const dispatchPlaidExit = (details) => {
|
|
308
|
-
|
|
309
|
-
|
|
337
|
+
const event = new CustomEvent("${PlaidMessage.UNIT_PLAID_EXIT}",{ detail: details })
|
|
338
|
+
window.dispatchEvent(event)
|
|
310
339
|
}
|
|
311
340
|
`;
|
|
312
341
|
|
|
313
342
|
export const DISPATCH_OPEN_PLAID = `
|
|
314
343
|
const dispatchOpenPlaidEvent = (details) => {
|
|
315
|
-
|
|
316
|
-
|
|
344
|
+
const event = new CustomEvent("${PlaidMessage.UNIT_OPEN_PLAID}",{ detail: details })
|
|
345
|
+
window.dispatchEvent(event)
|
|
317
346
|
}
|
|
318
347
|
`;
|
|
319
348
|
|
|
@@ -6,11 +6,11 @@ import type { UNAccount, UNCard } from '../types/shared';
|
|
|
6
6
|
import type { ActivityFiltersChangedEvent } from '../messages/webMessages/activityMessage';
|
|
7
7
|
import type { MultiFactorAuthenticationFinishedEvent, RequestRefreshEvent } from '../messages/webMessages/unitComponentsMessages';
|
|
8
8
|
import type { BottomSheetNativeMessage } from '../messages/nativeMessages/bottomSheetMessage';
|
|
9
|
-
import type { CardMessage } from '../messages/webMessages/cardMessage';
|
|
9
|
+
import type { CardCreatedEvent, CardMessage } from '../messages/webMessages/cardMessage';
|
|
10
10
|
import type { AccountMessage } from '../messages/webMessages/accountMessage';
|
|
11
11
|
import type { ActivityMessage } from '../messages/webMessages/activityMessage';
|
|
12
12
|
import type { UnitComponentsMessage } from '../messages/webMessages/unitComponentsMessages';
|
|
13
|
-
import type { MultipleCardsMessage } from '../messages/webMessages/multipleCardsMessage';
|
|
13
|
+
import type { MultipleCardsFiltersChangedEvent, MultipleCardsMessage } from '../messages/webMessages/multipleCardsMessage';
|
|
14
14
|
import { BottomSheetRenderingMessage } from '../messages/nativeMessages/bottomSheetMessage';
|
|
15
15
|
import { PageMessage } from '../messages/webMessages/pageMessage';
|
|
16
16
|
import { OpenPlaidEvent, PlaidMessage } from '../messages/webMessages/plaidMessages';
|
|
@@ -44,6 +44,16 @@ type ActivityFiltersChangedEventState = {
|
|
|
44
44
|
data: ActivityFiltersChangedEvent
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
type MultipleCardsFiltersChangedEventState = {
|
|
48
|
+
key: MultipleCardsMessage.UNIT_MULTIPLE_CARDS_FILTERS_CHANGED
|
|
49
|
+
data: MultipleCardsFiltersChangedEvent
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type CardCreatedEventState = {
|
|
53
|
+
key: CardMessage.CARD_CREATED
|
|
54
|
+
data: CardCreatedEvent
|
|
55
|
+
}
|
|
56
|
+
|
|
47
57
|
type RequestCloseBottomSheetFlowEventState = {
|
|
48
58
|
key: UnitComponentsMessage.UNIT_REQUEST_CLOSE_FLOW,
|
|
49
59
|
data: EmptyObj
|
|
@@ -83,9 +93,11 @@ type PayeeCounterpartyDeletedEventState = {
|
|
|
83
93
|
type SharedEvent =
|
|
84
94
|
| CardStatusChangedEventState
|
|
85
95
|
| CardActivatedEventState
|
|
86
|
-
|
|
|
96
|
+
| CardCreatedEventState
|
|
87
97
|
| AccountChangedEventState
|
|
88
98
|
| ActivityFiltersChangedEventState
|
|
99
|
+
| MultipleCardsCardClickedEventState
|
|
100
|
+
| MultipleCardsFiltersChangedEventState
|
|
89
101
|
| RequestCloseBottomSheetFlowEventState
|
|
90
102
|
| RequestRenderingBottomSheetEventState
|
|
91
103
|
| RequestRefreshEventState
|
|
@@ -8,6 +8,7 @@ import { UNACHDebitComponentProps } from '../../components/UNACHDebitComponent';
|
|
|
8
8
|
import { UNCheckDepositComponentProps } from '../../components/UNCheckDepositComponent';
|
|
9
9
|
import { UNBookPaymentComponentProps } from '../../components/UNBookPaymentComponent';
|
|
10
10
|
import { UNWirePaymentComponentProps } from '../../components/UNWirePaymentComponent';
|
|
11
|
+
import { UNCreateCardComponentProps } from '../../components/UNCreateCardComponent';
|
|
11
12
|
|
|
12
13
|
export enum BottomSheetNativePlaceType {
|
|
13
14
|
overFullScreen = 'overFullScreen',
|
|
@@ -50,7 +51,8 @@ export enum BottomSheetNativeComponentType {
|
|
|
50
51
|
ACHDebitComponent = 'UNACHDebitComponent',
|
|
51
52
|
CheckDepositComponent = 'UNCheckDepositComponent',
|
|
52
53
|
BookPaymentComponent = 'UNBookPaymentComponent',
|
|
53
|
-
WirePaymentComponent = 'UNWirePaymentComponent'
|
|
54
|
+
WirePaymentComponent = 'UNWirePaymentComponent',
|
|
55
|
+
CreateCardComponent = 'UNCreateCardComponent'
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
export type BottomSheetNativeAddToWalletComponentType = {
|
|
@@ -83,12 +85,18 @@ export type BottomSheetNativeWirePaymentComponentType = {
|
|
|
83
85
|
props: UNWirePaymentComponentProps
|
|
84
86
|
}
|
|
85
87
|
|
|
88
|
+
export type BottomSheetNativeCreateCardComponentType = {
|
|
89
|
+
type: BottomSheetNativeComponentType.CreateCardComponent,
|
|
90
|
+
props: UNCreateCardComponentProps
|
|
91
|
+
}
|
|
92
|
+
|
|
86
93
|
export type BottomSheetNativeComponent = BottomSheetNativeAddToWalletComponentType
|
|
87
94
|
| BottomSheetNativeACHCreditComponentType
|
|
88
95
|
| BottomSheetNativeACHDebitComponentType
|
|
89
96
|
| BottomSheetNativeCheckDepositComponentType
|
|
90
97
|
| BottomSheetNativeBookPaymentComponentType
|
|
91
98
|
| BottomSheetNativeWirePaymentComponentType
|
|
99
|
+
| BottomSheetNativeCreateCardComponentType
|
|
92
100
|
|
|
93
101
|
export type BottomSheetSlotData = {
|
|
94
102
|
// The data that rendered by the web view
|
|
@@ -15,6 +15,7 @@ export enum WebComponentType {
|
|
|
15
15
|
wirePayment = 'unit-elements-wire-payment',
|
|
16
16
|
whiteLabelApp = 'unit-elements-white-label-app',
|
|
17
17
|
multiFactorAuthentication = 'unit-elements-multi-factor-authentication',
|
|
18
|
+
createCard = 'unit-elements-create-card',
|
|
18
19
|
cardMenu = 'unit-elements-card-menu'
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { UNAccountType } from './account.types';
|
|
2
|
+
import { UNCustomerType } from './customer.types';
|
|
3
|
+
import { UNAddress, UNBusinessContact, UNFullName, UNPhone } from './types';
|
|
4
|
+
|
|
5
|
+
export enum UNCreateCardType {
|
|
6
|
+
Virtual = 'virtual',
|
|
7
|
+
Physical = 'physical',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type UNCreateCardComponentResources = {
|
|
11
|
+
type: 'createCardComponentResources'
|
|
12
|
+
attributes: {
|
|
13
|
+
accounts: UNCreateCardComponentAccount[]
|
|
14
|
+
customer: UNCreateCardCustomer
|
|
15
|
+
possibleCardholders: UNCardholder[]
|
|
16
|
+
resourceDiscovery: UNResourceDiscovery
|
|
17
|
+
bin?: UNBin[]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type UNCreateCardCustomer = UNCreateCardComponentIndividualCustomer | UNCreateCardComponentBusinessCustomer
|
|
22
|
+
|
|
23
|
+
export type UNCreateCardComponentIndividualCustomer = {
|
|
24
|
+
type: UNCustomerType.IndividualCustomer
|
|
25
|
+
attributes: {
|
|
26
|
+
fullName: UNFullName
|
|
27
|
+
address: UNAddress
|
|
28
|
+
dateOfBirth: Date
|
|
29
|
+
email: string
|
|
30
|
+
phone: UNPhone
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type UNCreateCardComponentBusinessCustomer = {
|
|
35
|
+
type: UNCustomerType.BusinessCustomer
|
|
36
|
+
attributes: {
|
|
37
|
+
name: UNFullName
|
|
38
|
+
address: UNAddress
|
|
39
|
+
phone: UNPhone
|
|
40
|
+
contact: UNBusinessContact
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type UNCreateCardComponentAccount = UNCreateCardComponentDepositAccount | UNCreateCardComponentCreditAccount
|
|
45
|
+
|
|
46
|
+
export type UNCreateCardComponentDepositAccount = {
|
|
47
|
+
type: UNAccountType.DepositAccount
|
|
48
|
+
id: string
|
|
49
|
+
attributes: {
|
|
50
|
+
name: string
|
|
51
|
+
tags: { [key: string]: string }
|
|
52
|
+
routingNumber: string
|
|
53
|
+
accountNumber: string
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type UNCreateCardComponentCreditAccount = {
|
|
58
|
+
type: UNAccountType.CreditAccount
|
|
59
|
+
id: string
|
|
60
|
+
attributes: {
|
|
61
|
+
name: string
|
|
62
|
+
tags: { [key: string]: string }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type UNCardholderAttributes = {
|
|
67
|
+
fullName: UNFullName
|
|
68
|
+
address?: UNAddress
|
|
69
|
+
dateOfBirth?: Date
|
|
70
|
+
email?: string
|
|
71
|
+
phone?: UNPhone
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type UNCardholder = {
|
|
75
|
+
type: 'possibleCardholder'
|
|
76
|
+
attributes: UNCardholderAttributes
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface UNResourceDiscovery {
|
|
80
|
+
type: 'resourceDiscovery'
|
|
81
|
+
attributes: {
|
|
82
|
+
featureSettings?: UNFeatureSettings
|
|
83
|
+
accountManifest?: UNAccountManifest[]
|
|
84
|
+
legalLinks?: UNLegalLinks
|
|
85
|
+
brandName?: string
|
|
86
|
+
supportComponent?: UNSupportComponent
|
|
87
|
+
}
|
|
88
|
+
relationships: {
|
|
89
|
+
customer: {
|
|
90
|
+
data: {
|
|
91
|
+
type: 'customer'
|
|
92
|
+
id: string
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
accounts: {
|
|
96
|
+
data: UNRelationship[]
|
|
97
|
+
}
|
|
98
|
+
cards: {
|
|
99
|
+
data: UNRelationship[]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface UNFeatureSettings {
|
|
105
|
+
wirePayment?: {
|
|
106
|
+
enabled: boolean
|
|
107
|
+
}
|
|
108
|
+
achDebitPayment?: {
|
|
109
|
+
enabled: boolean
|
|
110
|
+
}
|
|
111
|
+
quickbooks?: {
|
|
112
|
+
enabled: boolean
|
|
113
|
+
}
|
|
114
|
+
sameDayAch?: {
|
|
115
|
+
enabled: boolean
|
|
116
|
+
}
|
|
117
|
+
appUsers?: {
|
|
118
|
+
enabled: boolean
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface UNAccountManifest {
|
|
123
|
+
type: 'depositAccountManifest'
|
|
124
|
+
attributes: {
|
|
125
|
+
accountId: string
|
|
126
|
+
bankName: string
|
|
127
|
+
maxNumberOfPhysicalCards?: number
|
|
128
|
+
maxNumberOfVirtualCards?: number
|
|
129
|
+
dailyCardWithdrawalLimit: number
|
|
130
|
+
dailyCardDepositLimit: number
|
|
131
|
+
dailyCardPurchaseLimit: number
|
|
132
|
+
outgoingWireFee: number
|
|
133
|
+
outgoingAchFee: number
|
|
134
|
+
sameDayAchFee: number
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface UNLegalLinks {
|
|
139
|
+
privacyPolicyUrl?: string
|
|
140
|
+
electronicDisclosuresUrl?: string
|
|
141
|
+
depositTermsUrl?: string
|
|
142
|
+
clientTermsUrl?: string
|
|
143
|
+
cardholderTermsUrl?: string
|
|
144
|
+
cashAdvancedTermsUrl?: string
|
|
145
|
+
debitCardDisclosureUrl?: string
|
|
146
|
+
additionalDisclosures?: UNAdditionalDisclosure[]
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export type UNAdditionalDisclosure = {
|
|
150
|
+
title: string
|
|
151
|
+
url: string
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export type UNSupportComponent = {
|
|
155
|
+
attributes: {
|
|
156
|
+
provider?: UNSupportType
|
|
157
|
+
widgetId?: string
|
|
158
|
+
widgetToken?: string
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export enum UNSupportType {
|
|
163
|
+
Zendesk = 'zendesk',
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
type UNRelationship = {
|
|
167
|
+
type: string
|
|
168
|
+
id: string
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export type UNBin = {
|
|
172
|
+
attributes: {
|
|
173
|
+
bin: string
|
|
174
|
+
institutionId: string
|
|
175
|
+
product: string
|
|
176
|
+
}
|
|
177
|
+
type: 'whiteLabelBinDto'
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function parseUNCreateCardTypes(input?: string | null): UNCreateCardType[] {
|
|
181
|
+
if (!input) return [];
|
|
182
|
+
|
|
183
|
+
return input
|
|
184
|
+
.split(',')
|
|
185
|
+
.map(s => s.trim())
|
|
186
|
+
.filter((s): s is UNCreateCardType => s in UNCreateCardType);
|
|
187
|
+
}
|
|
@@ -3,7 +3,7 @@ import { Permissible, UNAddress, UNBusinessContact, UNFullName, UNPhone } from '
|
|
|
3
3
|
export type UNCustomer = UNIndividualCustomer | UNBusinessCustomer
|
|
4
4
|
|
|
5
5
|
export type UNBusinessCustomer = {
|
|
6
|
-
type:
|
|
6
|
+
type: UNCustomerType.BusinessCustomer
|
|
7
7
|
id: string
|
|
8
8
|
attributes: {
|
|
9
9
|
createdAt: Date
|
|
@@ -41,7 +41,7 @@ export type UNBusinessCustomer = {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export type UNIndividualCustomer = {
|
|
44
|
-
type:
|
|
44
|
+
type: UNCustomerType.IndividualCustomer
|
|
45
45
|
id: string
|
|
46
46
|
attributes: {
|
|
47
47
|
createdAt: Date
|
|
@@ -84,7 +84,7 @@ export type UNIndividualCustomer = {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
export enum
|
|
87
|
+
export enum UNCustomerType {
|
|
88
88
|
IndividualCustomer = 'individualCustomer',
|
|
89
89
|
BusinessCustomer = 'businessCustomer',
|
|
90
90
|
}
|
|
@@ -4,7 +4,7 @@ import { UNComponentsSecuritySettings, UNComponentsSnapshotProtectionStrategy }
|
|
|
4
4
|
const WEB_SDK_RECOMMENDED_STRATEGY: UNComponentsWebVersioningStrategy = {
|
|
5
5
|
type: UNVersioningStrategyType.upToNextMinor,
|
|
6
6
|
major: 2,
|
|
7
|
-
minor:
|
|
7
|
+
minor: 4,
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
const DEFAULT_SECURITY_SETTINGS: UNComponentsSecuritySettings = {
|
|
@@ -25,7 +25,7 @@ export class UnitComponentsSDK {
|
|
|
25
25
|
protected static fonts?: UNFonts;
|
|
26
26
|
protected static signedNonce?: string;
|
|
27
27
|
protected static pushProvisionModule?: typeof NativeModules;
|
|
28
|
-
protected static sdkVersion = '2.0
|
|
28
|
+
protected static sdkVersion = '2.1.0';
|
|
29
29
|
|
|
30
30
|
public static init = async (
|
|
31
31
|
env: UNComponentsEnvironment,
|
package/src/webComponent/html.ts
CHANGED
|
@@ -12,7 +12,9 @@ import {
|
|
|
12
12
|
DISPATCH_REQUEST_HIDE_SENSITIVE_DATA,
|
|
13
13
|
SET_ITEM_IN_WINDOW_UNIT_STORE,
|
|
14
14
|
DISPATCH_EVENT_TO_CONTINUE,
|
|
15
|
-
DISPATCH_CARD_STATUS_CHANGED
|
|
15
|
+
DISPATCH_CARD_STATUS_CHANGED,
|
|
16
|
+
DISPATCH_MULTIPLE_CARDS_FILTER_CHANGED_EVENT,
|
|
17
|
+
DISPATCH_CARD_CREATED_EVENT
|
|
16
18
|
} from '../scripts/html/bodyScript';
|
|
17
19
|
|
|
18
20
|
export const HTML_PLACEHOLDER = {
|
|
@@ -74,6 +76,8 @@ const htmlText = `
|
|
|
74
76
|
|
|
75
77
|
${LISTENERS.cardStatusChange}
|
|
76
78
|
|
|
79
|
+
${LISTENERS.cardCreated}
|
|
80
|
+
|
|
77
81
|
${LISTENERS.unitCounterpartyDeleted}
|
|
78
82
|
|
|
79
83
|
${LISTENERS.unitRequestExternalSdk}
|
|
@@ -84,6 +88,8 @@ const htmlText = `
|
|
|
84
88
|
|
|
85
89
|
${LISTENERS.unitActivityFiltersChanged}
|
|
86
90
|
|
|
91
|
+
${LISTENERS.unitMultipleCardsFiltersChanged}
|
|
92
|
+
|
|
87
93
|
${LISTENERS.unitMultiFactorAuthFinished}
|
|
88
94
|
|
|
89
95
|
${LISTENERS.unitUnauthorizedToken}
|
|
@@ -104,6 +110,10 @@ const htmlText = `
|
|
|
104
110
|
|
|
105
111
|
${DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT}
|
|
106
112
|
|
|
113
|
+
${DISPATCH_MULTIPLE_CARDS_FILTER_CHANGED_EVENT}
|
|
114
|
+
|
|
115
|
+
${DISPATCH_CARD_CREATED_EVENT}
|
|
116
|
+
|
|
107
117
|
${DISPATCH_REQUEST_ACCOUNT_ACTION}
|
|
108
118
|
|
|
109
119
|
${SET_ITEM_IN_WINDOW_UNIT_STORE}
|