@zeniai/client-epic-state 5.0.90-betaAS4 → 5.0.90-betaAS5
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/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +7 -3
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +33 -7
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +15 -1
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +3 -0
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +8 -7
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +3 -3
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +6 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +2 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +32 -6
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +15 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +3 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +8 -7
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { from, of } from 'rxjs';
|
|
2
2
|
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { toVerificationFormLocalDataFromOnboardingDetails } from '../internationalWireOnboardingDetailsToLocalData';
|
|
5
|
+
import { fetchInternationalVerificationForm, updateInternationalVerificationForm, updateVerificationFormFailure, updateVerificationFormLocalData, } from '../internationalWireVerificationReducer';
|
|
6
|
+
export const fetchIntlVerificationFormEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchInternationalVerificationForm.match), switchMap((action) => {
|
|
6
7
|
const query = {
|
|
7
8
|
region: 'US',
|
|
8
9
|
legal_type: 'BUSINESS',
|
|
@@ -11,11 +12,14 @@ export const fetchIntlVerificationFormEpic = (actions$, _state$, zeniAPI) => act
|
|
|
11
12
|
.getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding-fields?query=${encodeURIComponent(JSON.stringify(query))}`)
|
|
12
13
|
.pipe(mergeMap((response) => {
|
|
13
14
|
if (isSuccessResponse(response) && response.data != null) {
|
|
15
|
+
const onboardingDataFromCompanyInfo = state$.value.companyState.companiesById[action.payload.companyId]
|
|
16
|
+
?.companyBillPayInfo?.internationalWireOnboardingDetails;
|
|
17
|
+
const localData = toVerificationFormLocalDataFromOnboardingDetails(onboardingDataFromCompanyInfo, response.data.labels);
|
|
14
18
|
return from([
|
|
15
19
|
updateInternationalVerificationForm({
|
|
16
20
|
internationalWireFormPayload: response.data.labels,
|
|
17
21
|
}),
|
|
18
|
-
|
|
22
|
+
updateVerificationFormLocalData(localData),
|
|
19
23
|
]);
|
|
20
24
|
}
|
|
21
25
|
else {
|
|
@@ -1,12 +1,38 @@
|
|
|
1
|
-
import { from } from 'rxjs';
|
|
1
|
+
import { empty, from } from 'rxjs';
|
|
2
2
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { getCurrentTenant } from '../../../../../entity/tenant/tenantSelector';
|
|
4
|
+
import { fetchBillPaySetupViewSuccess } from '../../billPaySetupView/billPaySetupViewReducer';
|
|
3
5
|
import { toVerificationFormLocalDataFromOnboardingDetails } from '../internationalWireOnboardingDetailsToLocalData';
|
|
4
6
|
import { initializeIntlVerificationForm, updateVerificationFormLocalData, } from '../internationalWireVerificationReducer';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
const hasSavedPersonSubfieldData = (localData) => Object.keys(localData).some((key) => /^stake_holder_\d+_/.test(key) ||
|
|
8
|
+
(key.startsWith('controlling_person_') && key !== 'controlling_person'));
|
|
9
|
+
export const initializeIntlVerificationFormEpic = (actions$, state$) => actions$.pipe(filter((action) => initializeIntlVerificationForm.match(action) ||
|
|
10
|
+
fetchBillPaySetupViewSuccess.match(action)), mergeMap((action) => {
|
|
7
11
|
const state = state$.value;
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
const formFieldLabels = state.internationalWireVerificationState.verificationFormFieldLabels;
|
|
13
|
+
if (Object.keys(formFieldLabels).length === 0) {
|
|
14
|
+
return empty();
|
|
15
|
+
}
|
|
16
|
+
const companyId = initializeIntlVerificationForm.match(action) ?
|
|
17
|
+
action.payload.companyId
|
|
18
|
+
: getCurrentTenant(state)?.companyId;
|
|
19
|
+
if (companyId == null) {
|
|
20
|
+
return empty();
|
|
21
|
+
}
|
|
22
|
+
const onboardingDataFromCompanyInfo = state.companyState.companiesById[companyId]?.companyBillPayInfo
|
|
23
|
+
?.internationalWireOnboardingDetails;
|
|
24
|
+
const localDataFromCompany = toVerificationFormLocalDataFromOnboardingDetails(onboardingDataFromCompanyInfo, formFieldLabels);
|
|
25
|
+
const existingLocalData = state.internationalWireVerificationState.verificationFormLocalData;
|
|
26
|
+
if (fetchBillPaySetupViewSuccess.match(action)) {
|
|
27
|
+
if (!hasSavedPersonSubfieldData(localDataFromCompany) ||
|
|
28
|
+
hasSavedPersonSubfieldData(existingLocalData)) {
|
|
29
|
+
return empty();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return from([
|
|
33
|
+
updateVerificationFormLocalData({
|
|
34
|
+
...existingLocalData,
|
|
35
|
+
...localDataFromCompany,
|
|
36
|
+
}),
|
|
37
|
+
]);
|
|
12
38
|
}));
|
|
@@ -4,7 +4,21 @@ export const isIntlWireFileOptionLike = (value) => typeof value === 'object' &&
|
|
|
4
4
|
value != null &&
|
|
5
5
|
'file_id' in value &&
|
|
6
6
|
typeof value.file_id === 'string';
|
|
7
|
-
export const isIntlWirePersonLike = (value) =>
|
|
7
|
+
export const isIntlWirePersonLike = (value) => {
|
|
8
|
+
if (typeof value !== 'object' || value == null || Array.isArray(value)) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
const person = value;
|
|
12
|
+
return (person.name != null ||
|
|
13
|
+
person.email != null ||
|
|
14
|
+
person.nationality != null ||
|
|
15
|
+
person.company_role != null ||
|
|
16
|
+
person.ssn != null ||
|
|
17
|
+
person.date_of_birth != null ||
|
|
18
|
+
person.ownership_percentage != null ||
|
|
19
|
+
person.proof_of_identity != null ||
|
|
20
|
+
person.proof_of_address != null);
|
|
21
|
+
};
|
|
8
22
|
export const toIntlWireFileOptionArray = (items) => items.filter(isIntlWireFileOptionLike);
|
|
9
23
|
export const appendIntlWireFileOptionsToLocalData = (localData, baseKey, fileOptions) => {
|
|
10
24
|
const [front, back] = fileOptions;
|
|
@@ -4,6 +4,7 @@ export const initialState = {
|
|
|
4
4
|
verificationFormFetchState: {
|
|
5
5
|
fetchState: 'Not-Started',
|
|
6
6
|
},
|
|
7
|
+
verificationFormFieldLabels: {},
|
|
7
8
|
verificationFormFields: [],
|
|
8
9
|
verificationFormLocalData: {},
|
|
9
10
|
verificationFormSubmitState: {
|
|
@@ -31,6 +32,7 @@ const internationalWireVerification = createSlice({
|
|
|
31
32
|
},
|
|
32
33
|
updateInternationalVerificationForm(draft, action) {
|
|
33
34
|
const { internationalWireFormPayload } = action.payload;
|
|
35
|
+
draft.verificationFormFieldLabels = internationalWireFormPayload;
|
|
34
36
|
draft.verificationFormFields = toVerificationFormFields(internationalWireFormPayload);
|
|
35
37
|
draft.verificationFormFetchState.fetchState = 'Completed';
|
|
36
38
|
},
|
|
@@ -41,6 +43,7 @@ const internationalWireVerification = createSlice({
|
|
|
41
43
|
},
|
|
42
44
|
updateVerificationFormLocalData(draft, action) {
|
|
43
45
|
draft.verificationFormLocalData = {
|
|
46
|
+
...draft.verificationFormLocalData,
|
|
44
47
|
...action.payload,
|
|
45
48
|
};
|
|
46
49
|
},
|
|
@@ -20,18 +20,19 @@ const collectFileIdsFromLocalData = (localData) => {
|
|
|
20
20
|
export const getIntlWireVerificationView = (state) => {
|
|
21
21
|
const deleteFileStatusById = {};
|
|
22
22
|
const updateFileStatusById = {};
|
|
23
|
-
const
|
|
23
|
+
const { verificationFormFetchState, verificationFormFields, verificationFormLocalData, verificationFormSubmitState, } = state.internationalWireVerificationState;
|
|
24
|
+
const fileIds = collectFileIdsFromLocalData(verificationFormLocalData);
|
|
24
25
|
fileIds.forEach((fileId) => {
|
|
25
26
|
deleteFileStatusById[fileId] = getFileDeleteStatusById(state, fileId);
|
|
26
27
|
updateFileStatusById[fileId] = getFileUpdateNameStatusById(state, fileId);
|
|
27
28
|
});
|
|
28
|
-
const userFiles = fileIds.length > 0
|
|
29
|
-
|
|
30
|
-
: [];
|
|
31
|
-
const fetchState = state.internationalWireVerificationState.verificationFormFetchState
|
|
32
|
-
.fetchState;
|
|
29
|
+
const userFiles = fileIds.length > 0 ? getFilesByFileIds(state.fileState, fileIds) : [];
|
|
30
|
+
const fetchState = verificationFormFetchState.fetchState;
|
|
33
31
|
return {
|
|
34
|
-
|
|
32
|
+
verificationFormFetchState,
|
|
33
|
+
verificationFormFields,
|
|
34
|
+
verificationFormLocalData,
|
|
35
|
+
verificationFormSubmitState,
|
|
35
36
|
deleteFileStatusById,
|
|
36
37
|
updateFileStatusById,
|
|
37
38
|
userFiles,
|
|
@@ -2,6 +2,6 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { RootState } from '../../../../../reducer';
|
|
4
4
|
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
5
|
-
import { fetchInternationalVerificationForm,
|
|
6
|
-
export type ActionType = ReturnType<typeof fetchInternationalVerificationForm> | ReturnType<typeof updateInternationalVerificationForm> | ReturnType<typeof updateVerificationFormFailure> | ReturnType<typeof
|
|
7
|
-
export declare const fetchIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType>,
|
|
5
|
+
import { fetchInternationalVerificationForm, updateInternationalVerificationForm, updateVerificationFormFailure, updateVerificationFormLocalData } from '../internationalWireVerificationReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof fetchInternationalVerificationForm> | ReturnType<typeof updateInternationalVerificationForm> | ReturnType<typeof updateVerificationFormFailure> | ReturnType<typeof updateVerificationFormLocalData>;
|
|
7
|
+
export declare const fetchIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -4,8 +4,9 @@ exports.fetchIntlVerificationFormEpic = void 0;
|
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../../../responsePayload");
|
|
7
|
+
const internationalWireOnboardingDetailsToLocalData_1 = require("../internationalWireOnboardingDetailsToLocalData");
|
|
7
8
|
const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
|
|
8
|
-
const fetchIntlVerificationFormEpic = (actions$,
|
|
9
|
+
const fetchIntlVerificationFormEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(internationalWireVerificationReducer_1.fetchInternationalVerificationForm.match), (0, operators_1.switchMap)((action) => {
|
|
9
10
|
const query = {
|
|
10
11
|
region: 'US',
|
|
11
12
|
legal_type: 'BUSINESS',
|
|
@@ -14,11 +15,14 @@ const fetchIntlVerificationFormEpic = (actions$, _state$, zeniAPI) => actions$.p
|
|
|
14
15
|
.getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding-fields?query=${encodeURIComponent(JSON.stringify(query))}`)
|
|
15
16
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
16
17
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
18
|
+
const onboardingDataFromCompanyInfo = state$.value.companyState.companiesById[action.payload.companyId]
|
|
19
|
+
?.companyBillPayInfo?.internationalWireOnboardingDetails;
|
|
20
|
+
const localData = (0, internationalWireOnboardingDetailsToLocalData_1.toVerificationFormLocalDataFromOnboardingDetails)(onboardingDataFromCompanyInfo, response.data.labels);
|
|
17
21
|
return (0, rxjs_1.from)([
|
|
18
22
|
(0, internationalWireVerificationReducer_1.updateInternationalVerificationForm)({
|
|
19
23
|
internationalWireFormPayload: response.data.labels,
|
|
20
24
|
}),
|
|
21
|
-
(0, internationalWireVerificationReducer_1.
|
|
25
|
+
(0, internationalWireVerificationReducer_1.updateVerificationFormLocalData)(localData),
|
|
22
26
|
]);
|
|
23
27
|
}
|
|
24
28
|
else {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { RootState } from '../../../../../reducer';
|
|
4
|
+
import { fetchBillPaySetupViewSuccess } from '../../billPaySetupView/billPaySetupViewReducer';
|
|
4
5
|
import { initializeIntlVerificationForm, updateVerificationFormLocalData } from '../internationalWireVerificationReducer';
|
|
5
6
|
export type ActionType = ReturnType<typeof updateVerificationFormLocalData> | ReturnType<typeof initializeIntlVerificationForm>;
|
|
6
|
-
export declare const initializeIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType
|
|
7
|
+
export declare const initializeIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType | ReturnType<typeof fetchBillPaySetupViewSuccess>>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -3,14 +3,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.initializeIntlVerificationFormEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
7
|
+
const billPaySetupViewReducer_1 = require("../../billPaySetupView/billPaySetupViewReducer");
|
|
6
8
|
const internationalWireOnboardingDetailsToLocalData_1 = require("../internationalWireOnboardingDetailsToLocalData");
|
|
7
9
|
const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
+
const hasSavedPersonSubfieldData = (localData) => Object.keys(localData).some((key) => /^stake_holder_\d+_/.test(key) ||
|
|
11
|
+
(key.startsWith('controlling_person_') && key !== 'controlling_person'));
|
|
12
|
+
const initializeIntlVerificationFormEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)((action) => internationalWireVerificationReducer_1.initializeIntlVerificationForm.match(action) ||
|
|
13
|
+
billPaySetupViewReducer_1.fetchBillPaySetupViewSuccess.match(action)), (0, operators_1.mergeMap)((action) => {
|
|
10
14
|
const state = state$.value;
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const formFieldLabels = state.internationalWireVerificationState.verificationFormFieldLabels;
|
|
16
|
+
if (Object.keys(formFieldLabels).length === 0) {
|
|
17
|
+
return (0, rxjs_1.empty)();
|
|
18
|
+
}
|
|
19
|
+
const companyId = internationalWireVerificationReducer_1.initializeIntlVerificationForm.match(action) ?
|
|
20
|
+
action.payload.companyId
|
|
21
|
+
: (0, tenantSelector_1.getCurrentTenant)(state)?.companyId;
|
|
22
|
+
if (companyId == null) {
|
|
23
|
+
return (0, rxjs_1.empty)();
|
|
24
|
+
}
|
|
25
|
+
const onboardingDataFromCompanyInfo = state.companyState.companiesById[companyId]?.companyBillPayInfo
|
|
26
|
+
?.internationalWireOnboardingDetails;
|
|
27
|
+
const localDataFromCompany = (0, internationalWireOnboardingDetailsToLocalData_1.toVerificationFormLocalDataFromOnboardingDetails)(onboardingDataFromCompanyInfo, formFieldLabels);
|
|
28
|
+
const existingLocalData = state.internationalWireVerificationState.verificationFormLocalData;
|
|
29
|
+
if (billPaySetupViewReducer_1.fetchBillPaySetupViewSuccess.match(action)) {
|
|
30
|
+
if (!hasSavedPersonSubfieldData(localDataFromCompany) ||
|
|
31
|
+
hasSavedPersonSubfieldData(existingLocalData)) {
|
|
32
|
+
return (0, rxjs_1.empty)();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return (0, rxjs_1.from)([
|
|
36
|
+
(0, internationalWireVerificationReducer_1.updateVerificationFormLocalData)({
|
|
37
|
+
...existingLocalData,
|
|
38
|
+
...localDataFromCompany,
|
|
39
|
+
}),
|
|
40
|
+
]);
|
|
15
41
|
}));
|
|
16
42
|
exports.initializeIntlVerificationFormEpic = initializeIntlVerificationFormEpic;
|
|
@@ -8,7 +8,21 @@ const isIntlWireFileOptionLike = (value) => typeof value === 'object' &&
|
|
|
8
8
|
'file_id' in value &&
|
|
9
9
|
typeof value.file_id === 'string';
|
|
10
10
|
exports.isIntlWireFileOptionLike = isIntlWireFileOptionLike;
|
|
11
|
-
const isIntlWirePersonLike = (value) =>
|
|
11
|
+
const isIntlWirePersonLike = (value) => {
|
|
12
|
+
if (typeof value !== 'object' || value == null || Array.isArray(value)) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
const person = value;
|
|
16
|
+
return (person.name != null ||
|
|
17
|
+
person.email != null ||
|
|
18
|
+
person.nationality != null ||
|
|
19
|
+
person.company_role != null ||
|
|
20
|
+
person.ssn != null ||
|
|
21
|
+
person.date_of_birth != null ||
|
|
22
|
+
person.ownership_percentage != null ||
|
|
23
|
+
person.proof_of_identity != null ||
|
|
24
|
+
person.proof_of_address != null);
|
|
25
|
+
};
|
|
12
26
|
exports.isIntlWirePersonLike = isIntlWirePersonLike;
|
|
13
27
|
const toIntlWireFileOptionArray = (items) => items.filter(exports.isIntlWireFileOptionLike);
|
|
14
28
|
exports.toIntlWireFileOptionArray = toIntlWireFileOptionArray;
|
|
@@ -8,6 +8,7 @@ exports.initialState = {
|
|
|
8
8
|
verificationFormFetchState: {
|
|
9
9
|
fetchState: 'Not-Started',
|
|
10
10
|
},
|
|
11
|
+
verificationFormFieldLabels: {},
|
|
11
12
|
verificationFormFields: [],
|
|
12
13
|
verificationFormLocalData: {},
|
|
13
14
|
verificationFormSubmitState: {
|
|
@@ -35,6 +36,7 @@ const internationalWireVerification = (0, toolkit_1.createSlice)({
|
|
|
35
36
|
},
|
|
36
37
|
updateInternationalVerificationForm(draft, action) {
|
|
37
38
|
const { internationalWireFormPayload } = action.payload;
|
|
39
|
+
draft.verificationFormFieldLabels = internationalWireFormPayload;
|
|
38
40
|
draft.verificationFormFields = (0, internationalWireVerificationPayload_1.toVerificationFormFields)(internationalWireFormPayload);
|
|
39
41
|
draft.verificationFormFetchState.fetchState = 'Completed';
|
|
40
42
|
},
|
|
@@ -45,6 +47,7 @@ const internationalWireVerification = (0, toolkit_1.createSlice)({
|
|
|
45
47
|
},
|
|
46
48
|
updateVerificationFormLocalData(draft, action) {
|
|
47
49
|
draft.verificationFormLocalData = {
|
|
50
|
+
...draft.verificationFormLocalData,
|
|
48
51
|
...action.payload,
|
|
49
52
|
};
|
|
50
53
|
},
|
|
@@ -23,18 +23,19 @@ const collectFileIdsFromLocalData = (localData) => {
|
|
|
23
23
|
const getIntlWireVerificationView = (state) => {
|
|
24
24
|
const deleteFileStatusById = {};
|
|
25
25
|
const updateFileStatusById = {};
|
|
26
|
-
const
|
|
26
|
+
const { verificationFormFetchState, verificationFormFields, verificationFormLocalData, verificationFormSubmitState, } = state.internationalWireVerificationState;
|
|
27
|
+
const fileIds = collectFileIdsFromLocalData(verificationFormLocalData);
|
|
27
28
|
fileIds.forEach((fileId) => {
|
|
28
29
|
deleteFileStatusById[fileId] = (0, fileViewSelector_1.getFileDeleteStatusById)(state, fileId);
|
|
29
30
|
updateFileStatusById[fileId] = (0, fileViewSelector_1.getFileUpdateNameStatusById)(state, fileId);
|
|
30
31
|
});
|
|
31
|
-
const userFiles = fileIds.length > 0
|
|
32
|
-
|
|
33
|
-
: [];
|
|
34
|
-
const fetchState = state.internationalWireVerificationState.verificationFormFetchState
|
|
35
|
-
.fetchState;
|
|
32
|
+
const userFiles = fileIds.length > 0 ? (0, fileSelector_1.getFilesByFileIds)(state.fileState, fileIds) : [];
|
|
33
|
+
const fetchState = verificationFormFetchState.fetchState;
|
|
36
34
|
return {
|
|
37
|
-
|
|
35
|
+
verificationFormFetchState,
|
|
36
|
+
verificationFormFields,
|
|
37
|
+
verificationFormLocalData,
|
|
38
|
+
verificationFormSubmitState,
|
|
38
39
|
deleteFileStatusById,
|
|
39
40
|
updateFileStatusById,
|
|
40
41
|
userFiles,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { FetchStateAndError } from '../../../../commonStateTypes/common';
|
|
2
|
+
import { FieldPayload } from './internationalWireVerificationPayload';
|
|
2
3
|
export interface InternationalWireVerificationState {
|
|
3
4
|
verificationFormFetchState: FetchStateAndError;
|
|
5
|
+
verificationFormFieldLabels: Record<string, FieldPayload>;
|
|
4
6
|
verificationFormFields: VerificationFormField[];
|
|
5
7
|
verificationFormLocalData: VerificationFormLocalData;
|
|
6
8
|
verificationFormSubmitState: FetchStateAndError;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.90-
|
|
3
|
+
"version": "5.0.90-betaAS5",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|