@zeniai/client-epic-state 5.1.8-betaAS1 → 5.1.8-betaSS1

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.
Files changed (65) hide show
  1. package/lib/commonPayloadTypes/commonPayload.d.ts +4 -25
  2. package/lib/esm/index.js +3 -8
  3. package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -3
  4. package/lib/esm/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +4 -3
  5. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +12 -13
  6. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic.js +19 -3
  7. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +19 -9
  8. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +2 -2
  9. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.js +13 -2
  10. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +6 -2
  11. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -2
  12. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +6 -2
  13. package/lib/esm/view/expenseAutomationView/expenseAutomationViewReducer.js +20 -3
  14. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +48 -8
  15. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -4
  16. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +3 -7
  17. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +34 -33
  18. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +7 -2
  19. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +8 -55
  20. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +6 -5
  21. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +15 -39
  22. package/lib/index.d.ts +4 -10
  23. package/lib/index.js +30 -47
  24. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -3
  25. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +4 -3
  26. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +0 -6
  27. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +13 -14
  28. package/lib/view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic.js +19 -3
  29. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +19 -9
  30. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +2 -2
  31. package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.js +13 -2
  32. package/lib/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +6 -2
  33. package/lib/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -2
  34. package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +6 -2
  35. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +6 -2
  36. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +20 -3
  37. package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +9 -20
  38. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +17 -8
  39. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +48 -8
  40. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +5 -4
  41. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -4
  42. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -1
  43. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +3 -3
  44. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +2 -6
  45. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +1 -2
  46. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +33 -32
  47. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +7 -2
  48. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +1 -24
  49. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +9 -59
  50. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +5 -4
  51. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +15 -39
  52. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +1 -20
  53. package/package.json +1 -1
  54. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +0 -146
  55. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +0 -40
  56. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +0 -86
  57. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +0 -154
  58. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.d.ts +0 -4
  59. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +0 -150
  60. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.d.ts +0 -38
  61. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +0 -43
  62. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.d.ts +0 -27
  63. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +0 -96
  64. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.d.ts +0 -32
  65. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +0 -159
@@ -1,9 +1,8 @@
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 { 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) => {
4
+ import { fetchInternationalVerificationForm, initializeIntlVerificationForm, updateInternationalVerificationForm, updateVerificationFormFailure, } from '../internationalWireVerificationReducer';
5
+ export const fetchIntlVerificationFormEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInternationalVerificationForm.match), switchMap((action) => {
7
6
  const query = {
8
7
  region: 'US',
9
8
  legal_type: 'BUSINESS',
@@ -12,14 +11,11 @@ export const fetchIntlVerificationFormEpic = (actions$, state$, zeniAPI) => acti
12
11
  .getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding-fields?query=${encodeURIComponent(JSON.stringify(query))}`)
13
12
  .pipe(mergeMap((response) => {
14
13
  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);
18
14
  return from([
19
15
  updateInternationalVerificationForm({
20
16
  internationalWireFormPayload: response.data.labels,
21
17
  }),
22
- updateVerificationFormLocalData(localData),
18
+ initializeIntlVerificationForm(action.payload.companyId, response.data.labels),
23
19
  ]);
24
20
  }
25
21
  else {
@@ -1,38 +1,39 @@
1
- import { empty, from } from 'rxjs';
1
+ import { from } from 'rxjs';
2
2
  import { filter, mergeMap } from 'rxjs/operators';
3
- import { getCurrentTenant } from '../../../../../entity/tenant/tenantSelector';
4
- import { fetchBillPaySetupViewSuccess } from '../../billPaySetupView/billPaySetupViewReducer';
5
- import { toVerificationFormLocalDataFromOnboardingDetails } from '../internationalWireOnboardingDetailsToLocalData';
6
3
  import { initializeIntlVerificationForm, updateVerificationFormLocalData, } from '../internationalWireVerificationReducer';
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) => {
4
+ export const initializeIntlVerificationFormEpic = (actions$, state$) => actions$.pipe(filter(initializeIntlVerificationForm.match), mergeMap((action) => {
5
+ const { companyId, internationalWireFormPayload } = action.payload;
6
+ const actions = [];
11
7
  const state = state$.value;
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();
8
+ const onboardingDataFromCompanyInfo = state.companyState.companiesById[companyId].companyBillPayInfo
9
+ .internationalWireOnboardingDetails;
10
+ const localData = {};
11
+ Object.keys(internationalWireFormPayload).forEach((formFieldKey) => {
12
+ const values = onboardingDataFromCompanyInfo != null
13
+ ? onboardingDataFromCompanyInfo[formFieldKey]?.values
14
+ : undefined;
15
+ if (values != null) {
16
+ localData[formFieldKey] =
17
+ internationalWireFormPayload[formFieldKey].type === 'enum'
18
+ ? internationalWireFormPayload[formFieldKey]
19
+ .is_multiple_values_allowed === false
20
+ ? typeof values[0] === 'object' && 'code' in values[0]
21
+ ? values[0].code
22
+ : ''
23
+ : values.map((value) => typeof value === 'object' && 'code' in value
24
+ ? value.code
25
+ : '')
26
+ : values[0];
30
27
  }
31
- }
32
- return from([
33
- updateVerificationFormLocalData({
34
- ...existingLocalData,
35
- ...localDataFromCompany,
36
- }),
37
- ]);
28
+ else {
29
+ localData[formFieldKey] =
30
+ internationalWireFormPayload[formFieldKey].type === 'enum' &&
31
+ internationalWireFormPayload[formFieldKey]
32
+ .is_multiple_values_allowed === true
33
+ ? []
34
+ : '';
35
+ }
36
+ });
37
+ actions.push(updateVerificationFormLocalData(localData));
38
+ return from(actions);
38
39
  }));
@@ -3,7 +3,6 @@ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
3
  import { updateInternationalWireOnboardingStatus } from '../../../../../entity/company/companyReducer';
4
4
  import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
5
5
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
6
- import { toIntlWireVerificationSubmitPayload } from '../internationalWireVerificationSubmitPayload';
7
6
  import { submitInternationalVerificationForm, updateVerificationFormSubmissionStatus, } from '../internationalWireVerificationReducer';
8
7
  export const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(submitInternationalVerificationForm.match), switchMap((action) => {
9
8
  const { internationalWireVerificationState } = state$.value;
@@ -11,7 +10,7 @@ export const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions
11
10
  const localData = internationalWireVerificationState.verificationFormLocalData;
12
11
  if (localData != null) {
13
12
  return zeniAPI
14
- .postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`, toIntlWireVerificationSubmitPayload(localData))
13
+ .postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`, toIntlWireVerificationPayload(localData))
15
14
  .pipe(mergeMap((response) => {
16
15
  const actions = [];
17
16
  if (isSuccessResponse(response) && response.data != null) {
@@ -55,3 +54,9 @@ export const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions
55
54
  return from([]);
56
55
  }
57
56
  }));
57
+ const toIntlWireVerificationPayload = (localData) => {
58
+ return {
59
+ is_applicant_declaration: true,
60
+ form_details: localData,
61
+ };
62
+ };
@@ -1,62 +1,15 @@
1
- import { InternationalWireVerificationReadonlyHideableFieldNames, InternationalWireVerificationFormFieldNames, } from './internationalWireVerificationFieldConstants';
2
- import { hasBusinessOwnershipValueInLocalData } from './internationalWireVerificationLocalDataHelpers';
3
- export const InternationalWireVerificationFormOrder = [
4
- InternationalWireVerificationFormFieldNames.certificateOfGoodStanding,
5
- InternationalWireVerificationFormFieldNames.businessOwnership,
6
- InternationalWireVerificationFormFieldNames.companyProofOfAddress,
7
- InternationalWireVerificationFormFieldNames.companyOfficerProofOfAddress,
8
- InternationalWireVerificationFormFieldNames.companyRegistrationDate,
9
- InternationalWireVerificationFormFieldNames.annualTurnover,
10
- InternationalWireVerificationFormFieldNames.expectedTransactionVolume,
11
- InternationalWireVerificationFormFieldNames.employeeCount,
12
- InternationalWireVerificationFormFieldNames.intendedUseOfAccount,
13
- InternationalWireVerificationFormFieldNames.transactionCountries,
14
- InternationalWireVerificationFormFieldNames.stakeHolder,
15
- InternationalWireVerificationFormFieldNames.controllingPerson,
16
- ];
17
- const toFieldValues = (fieldValues) => fieldValues?.map(({ code, description }) => ({ code, description })) ?? [];
18
- const toSubField = (subfield) => ({
19
- label: subfield.label,
20
- placeholder: subfield.field_hint_text ?? '',
21
- type: subfield.type,
22
- fieldValues: toFieldValues(subfield.field_values),
23
- isMultipleOptionsSupported: subfield.is_multiple_options_supported,
24
- options: subfield.options,
25
- });
26
1
  export const toDynamicFormField = (key, payload) => ({
27
2
  name: key,
28
3
  label: payload.label,
29
4
  placeholder: payload.field_hint_text ?? '',
30
5
  isMultipleValuesAllowed: payload.is_multiple_values_allowed ?? false,
31
6
  type: payload.type,
32
- fieldValues: toFieldValues(payload.field_values),
33
- isMultipleOptionsSupported: payload.is_multiple_options_supported,
34
- options: payload.options,
35
- requirements: payload.requirements,
36
- default: payload.default,
37
- subfields: payload.subfields != null
38
- ? Object.fromEntries(Object.entries(payload.subfields).map(([subfieldKey, subfield]) => [
39
- subfieldKey,
40
- toSubField(subfield),
41
- ]))
42
- : undefined,
7
+ fieldValues: payload.field_values != null && payload.field_values.length > 0
8
+ ? payload.field_values.map((fieldValue) => {
9
+ return {
10
+ code: fieldValue.code,
11
+ description: fieldValue.description,
12
+ };
13
+ })
14
+ : [],
43
15
  });
44
- const readonlyHideableVerificationFormFieldNames = new Set(InternationalWireVerificationReadonlyHideableFieldNames);
45
- export const filterVerificationFormFieldsForReadonlyView = (fields, localData, isReadonly) => {
46
- if (!isReadonly || hasBusinessOwnershipValueInLocalData(localData)) {
47
- return fields;
48
- }
49
- return fields.filter((field) => !readonlyHideableVerificationFormFieldNames.has(field.name));
50
- };
51
- export const sortVerificationFormFields = (fields) => {
52
- const orderIndex = new Map(InternationalWireVerificationFormOrder.map((name, index) => [name, index]));
53
- return fields.slice().sort((a, b) => {
54
- const aIndex = orderIndex.get(a.name) ?? InternationalWireVerificationFormOrder.length;
55
- const bIndex = orderIndex.get(b.name) ?? InternationalWireVerificationFormOrder.length;
56
- if (aIndex !== bIndex) {
57
- return aIndex - bIndex;
58
- }
59
- return a.name.localeCompare(b.name);
60
- });
61
- };
62
- export const toVerificationFormFields = (internationalWireFormPayload) => sortVerificationFormFields(Object.keys(internationalWireFormPayload).map((key) => toDynamicFormField(key, internationalWireFormPayload[key])));
@@ -1,10 +1,9 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
- import { toVerificationFormFields, } from './internationalWireVerificationPayload';
2
+ import { toDynamicFormField, } from './internationalWireVerificationPayload';
3
3
  export const initialState = {
4
4
  verificationFormFetchState: {
5
5
  fetchState: 'Not-Started',
6
6
  },
7
- verificationFormFieldLabels: {},
8
7
  verificationFormFields: [],
9
8
  verificationFormLocalData: {},
10
9
  verificationFormSubmitState: {
@@ -32,8 +31,11 @@ const internationalWireVerification = createSlice({
32
31
  },
33
32
  updateInternationalVerificationForm(draft, action) {
34
33
  const { internationalWireFormPayload } = action.payload;
35
- draft.verificationFormFieldLabels = internationalWireFormPayload;
36
- draft.verificationFormFields = toVerificationFormFields(internationalWireFormPayload);
34
+ const verificationFormFields = [];
35
+ Object.keys(internationalWireFormPayload).forEach((key) => {
36
+ verificationFormFields.push(toDynamicFormField(key, internationalWireFormPayload[key]));
37
+ });
38
+ draft.verificationFormFields = verificationFormFields;
37
39
  draft.verificationFormFetchState.fetchState = 'Completed';
38
40
  },
39
41
  updateVerificationFormFailure(draft, action) {
@@ -43,7 +45,6 @@ const internationalWireVerification = createSlice({
43
45
  },
44
46
  updateVerificationFormLocalData(draft, action) {
45
47
  draft.verificationFormLocalData = {
46
- ...draft.verificationFormLocalData,
47
48
  ...action.payload,
48
49
  };
49
50
  },
@@ -1,50 +1,26 @@
1
- import { getCompanyByCompanyId } from '../../../../entity/company/companySelector';
2
1
  import { getFilesByFileIds } from '../../../../entity/file/fileSelector';
3
- import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
4
2
  import { getFileDeleteStatusById, getFileUpdateNameStatusById, } from '../../../fileView/fileViewSelector';
5
- import { filterVerificationFormFieldsForReadonlyView } from './internationalWireVerificationPayload';
6
- const collectFileIdsFromLocalData = (localData) => {
7
- const fileIds = new Set();
8
- Object.values(localData).forEach((value) => {
9
- if (typeof value === 'string' && value.startsWith('file_')) {
10
- fileIds.add(value);
11
- return;
12
- }
13
- if (Array.isArray(value)) {
14
- value.forEach((item) => {
15
- if (typeof item === 'string' && item.startsWith('file_')) {
16
- fileIds.add(item);
17
- }
18
- });
19
- }
20
- });
21
- return Array.from(fileIds);
22
- };
23
3
  export const getIntlWireVerificationView = (state) => {
24
4
  const deleteFileStatusById = {};
25
5
  const updateFileStatusById = {};
26
- const { verificationFormFetchState, verificationFormFields, verificationFormLocalData, verificationFormSubmitState, } = state.internationalWireVerificationState;
27
- const fileIds = collectFileIdsFromLocalData(verificationFormLocalData);
28
- fileIds.forEach((fileId) => {
6
+ // field with type = file
7
+ const fileField = state.internationalWireVerificationState.verificationFormFields.find((field) => field.type === 'file');
8
+ let fileId;
9
+ if (fileField != null) {
10
+ fileId = state.internationalWireVerificationState.verificationFormLocalData[fileField.name];
11
+ }
12
+ if (fileId != null) {
29
13
  deleteFileStatusById[fileId] = getFileDeleteStatusById(state, fileId);
30
14
  updateFileStatusById[fileId] = getFileUpdateNameStatusById(state, fileId);
31
- });
32
- const userFiles = fileIds.length > 0 ? getFilesByFileIds(state.fileState, fileIds) : [];
33
- const fetchState = verificationFormFetchState.fetchState;
34
- const currentTenant = getCurrentTenant(state);
35
- const company = currentTenant?.companyId != null
36
- ? getCompanyByCompanyId(state.companyState, currentTenant.companyId)
37
- ?.company
38
- : undefined;
39
- const onboardingStatusCode = company?.companyBillPayInfo?.internationalWireOnboardingStatus?.code;
40
- const isReadonly = onboardingStatusCode != null &&
41
- onboardingStatusCode !== 'onboarding_status_not_started';
42
- const visibleVerificationFormFields = filterVerificationFormFieldsForReadonlyView(verificationFormFields, verificationFormLocalData, isReadonly);
15
+ }
16
+ let userFiles = [];
17
+ if (fileId != null) {
18
+ userFiles = getFilesByFileIds(state.fileState, [fileId]);
19
+ }
20
+ const fetchState = state.internationalWireVerificationState.verificationFormFetchState
21
+ .fetchState;
43
22
  return {
44
- verificationFormFetchState,
45
- verificationFormFields: visibleVerificationFormFields,
46
- verificationFormLocalData,
47
- verificationFormSubmitState,
23
+ ...state.internationalWireVerificationState,
48
24
  deleteFileStatusById,
49
25
  updateFileStatusById,
50
26
  userFiles,
package/lib/index.d.ts CHANGED
@@ -145,7 +145,7 @@ import { TransferTransaction, isTransferTransaction } from './entity/transaction
145
145
  import { MatchedTransaction } from './entity/transaction/stateTypes/reconciliationTransaction';
146
146
  import { ScheduleTransaction } from './entity/transaction/stateTypes/scheduleTransaction';
147
147
  import { RecommendationByLineId, RecommendationWithCOTByLineId, Transaction, TransactionID, TransactionWithCOT } from './entity/transaction/stateTypes/transaction';
148
- import { BillableStatus, JournalEntryTransactionLine, Line, LineType, LinkedTransactionLine, PlatformLineDetailType, ProductOrService, TransactionInfoLine, TransactionLineBase, TransactionWithAccountAndClassLine, TransactionWithProductOrServiceLine, toPlatformLineDetailType } from './entity/transaction/stateTypes/transactionLine';
148
+ import { BillableStatus, CategorizationStatusType, JournalEntryTransactionLine, Line, LineType, LinkedTransactionLine, PlatformLineDetailType, ProductOrService, TransactionInfoLine, TransactionLineBase, TransactionWithAccountAndClassLine, TransactionWithProductOrServiceLine, toCategorizationStatusType, toPlatformLineDetailType } from './entity/transaction/stateTypes/transactionLine';
149
149
  import { CustomerTransactionType, EmployeeTransactionType, OtherTransactionType, TransactionCategory, TransactionType, TransferTransactionType, VendorTransactionType, toTransactionCategory, toTransactionType, toTransactionTypeStrict } from './entity/transaction/stateTypes/transactionType';
150
150
  import { VendorTransaction, VendorTransactionWithCOT, VendorTransactionWithCustomer, VendorTransactionWithCustomerWithCOT, isVendorTransaction, isVendorTransactionWithCustomer } from './entity/transaction/stateTypes/vendorTransaction';
151
151
  import { getSupportedTransactionById } from './entity/transaction/transactionSelector';
@@ -442,10 +442,9 @@ import { BillDetailLocalData, EditBillDetail, EditBillDetailViewState, EditRecur
442
442
  import { CreateInternationalWireDetailsLocalData, DynamicFormField, SupportedAccountType } from './view/spendManagement/billPay/internationalWire/internationalWire';
443
443
  import { clearInternationalWire, createPaymentInstrument, createPaymentInstrumentUpdateStatus, deletePaymentInstrument, fetchInternationalWireDynamicForm, initializeDynamicForm, initializeInternationalWireLocalData, updateInternationalWireLocalStoreData } from './view/spendManagement/billPay/internationalWire/internationalWireReducer';
444
444
  import { InternationalWireSelectorView, getInternationalWireView } from './view/spendManagement/billPay/internationalWire/internationalWireSelector';
445
- import { InternationalWireVerificationFormOrder, sortVerificationFormFields } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload';
446
445
  import { fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer';
447
446
  import { InternationalWireVerificationView, getIntlWireVerificationView } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector';
448
- import { FieldValueType, InternationalWireVerificationState, VerificationFormField, VerificationFormFieldOption, VerificationFormLocalData, VerificationFormSubField } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState';
447
+ import { FieldValueType, InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState';
449
448
  import { fetchBillAttachment, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, fetchMagicLinkTenant, saveBankAccount, saveMagicLinkAddressInLocalStore, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData } from './view/spendManagement/billPay/magicLinkView/magicLinkViewReducer';
450
449
  import { MagicLinkView, getMagicLinkBankAccountView, getMagicLinkCurrentAddressState, getMagicLinkView } from './view/spendManagement/billPay/magicLinkView/magicLinkViewSelector';
451
450
  import { PreviousBillsSelectorView } from './view/spendManagement/billPay/previousBills/previousBillsSelector';
@@ -733,7 +732,7 @@ export { CustomerBase, Customer, defaultCustomerCurrency };
733
732
  export { CustomerTransaction, CustomerTransactionWithCOT, isCustomerTransaction };
734
733
  export { TransactionID, TransactionWithCOT, Transaction, RecommendationWithCOTByLineId, RecommendationByLineId, };
735
734
  export { TransactionIDPayload, toTransactionID, } from './entity/transaction/payloadTypes/transactionIDPayload';
736
- export { TransactionLineBase, LinkedTransactionLine, TransactionWithAccountAndClassLine, TransactionWithProductOrServiceLine, JournalEntryTransactionLine, TransactionInfoLine, Line, LineType, ProductOrService, toPlatformLineDetailType, PlatformLineDetailType, };
735
+ export { TransactionLineBase, LinkedTransactionLine, TransactionWithAccountAndClassLine, TransactionWithProductOrServiceLine, JournalEntryTransactionLine, TransactionInfoLine, Line, LineType, ProductOrService, toPlatformLineDetailType, PlatformLineDetailType, CategorizationStatusType, toCategorizationStatusType, };
737
736
  export { CustomerTransactionType, VendorTransactionType, EmployeeTransactionType, TransferTransactionType, OtherTransactionType, TransactionType, toTransactionType, toTransactionTypeStrict, toTransactionCategory, TransactionCategory, };
738
737
  export { VendorBase, Vendor, defaultVendorCurrency, updateVendors };
739
738
  export { VendorTransaction, VendorTransactionWithCOT, isVendorTransaction, VendorTransactionWithCustomer, VendorTransactionWithCustomerWithCOT, isVendorTransactionWithCustomer, };
@@ -907,12 +906,7 @@ export { getReferralListView, getInviteFormView, ReferralListSelectorView, Refer
907
906
  export { ALL_WEEK_DAYS, DayOfWeek, RecurringDatePickerOptions, RecurringFrequencyType, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toDayOfWeek, toRecurringFrequency, };
908
907
  export { fetchCockpitContext, fetchCompanyTaskManagerView, fetchTaskManagerMetrics, CompanyTaskManagerSelectorView, CompanyTaskManagerViewUIState, TaskManagerMetrics, getCompanyTaskManagerView, TaskWithCompanyDetail, createTaskFromTaskGroupTemplate, TaskGroupTemplate, };
909
908
  export { Country };
910
- export { InternationalWireVerificationState, VerificationFormField, VerificationFormFieldOption, VerificationFormLocalData, VerificationFormSubField, FieldValueType, InternationalWireVerificationFormOrder, sortVerificationFormFields, fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, InternationalWireVerificationView, };
911
- export { InternationalWireVerificationBooleanWithSubfieldsFieldNameList, InternationalWireVerificationBooleanWithSubfieldsFieldNames, InternationalWireVerificationControllingPersonFieldName, InternationalWireVerificationFormFieldNames, InternationalWireVerificationStakeHolderFieldName, InternationalWireVerificationSubfieldNames, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants';
912
- export { IntlWireVerificationLocalDataSuffix, toIntlWireVerificationFormDetails, toIntlWireVerificationSubmitPayload, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload';
913
- export { getStakeHolderOwnerIndicesFromLocalData, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers';
914
- export { toVerificationFormLocalDataFromOnboardingDetails, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData';
915
- export type { InternationalWireVerificationBooleanWithSubfieldsFieldName, InternationalWireVerificationFormFieldName, InternationalWireVerificationSubfieldName, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants';
909
+ export { InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData, FieldValueType, fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, InternationalWireVerificationView, };
916
910
  export { fetchExpressPayInitialDetails, updateExpressPayFormLocalData, submitExpressPay, resetExpressPayLocalData, ExpressPayFormLocalData, ExpressPayView, getExpressPayView, };
917
911
  export { acceptTreasuryTerms, fetchTreasurySetupView, clearTreasurySetupView, fetchTreasuryFunds, updatePortfolioAllocation, fetchPortfolioAllocation, updateFundAllocationLocalData, updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoRemindMeLaterClicked, updateTreasuryVideoViewed, FundAllocationOption, FundComposition, FundData, TreasurySetupView, getTreasurySetupViewDetails, getTreasuryFundsMaximumYield, };
918
912
  export { AiAccountantCustomer, AiAccountantCustomerState, AiAccountantEnrollment, AiAccountantEnrollmentStatus, AiAccountantJob, AiAccountantJobStatus, AiAccountantOperationType, getAllowedOperationsForStatus, toAiAccountantEnrollmentStatus, toAiAccountantJobStatus, toAiAccountantOperationType, } from './entity/aiAccountantCustomer/aiAccountantCustomerState';