@zeniai/client-epic-state 4.12.48 → 4.12.49

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.
@@ -18,4 +18,5 @@ exports.vendorFiling1099ListSelectorMock = {
18
18
  searchString: '',
19
19
  },
20
20
  isVendor1099Populated: true,
21
+ vendorTypeList: [],
21
22
  };
@@ -5,5 +5,6 @@ import { RootState } from '../../reducer';
5
5
  import { updateVendorsFiling1099List, updateVendorFiling1099ListFailure, fetchVendorsFiling1099List } from './vendorFiling1099ListReducer';
6
6
  import { updateVendors } from '../../entity/vendor/vendorReducer';
7
7
  import { updateAddresses } from '../../entity/address/addressReducer';
8
- export declare type ActionType = ReturnType<typeof fetchVendorsFiling1099List> | ReturnType<typeof updateVendorFiling1099ListFailure> | ReturnType<typeof updateVendors> | ReturnType<typeof updateVendorsFiling1099List> | ReturnType<typeof updateAddresses>;
8
+ import { fetchVendorTypeList } from '../vendorTypeList/vendorTypeListReducer';
9
+ export declare type ActionType = ReturnType<typeof fetchVendorsFiling1099List> | ReturnType<typeof updateVendorFiling1099ListFailure> | ReturnType<typeof updateVendors> | ReturnType<typeof updateVendorsFiling1099List> | ReturnType<typeof fetchVendorTypeList> | ReturnType<typeof updateAddresses>;
9
10
  export declare const fetchVendorsFiling1099ListEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -8,6 +8,7 @@ const vendorFiling1099ListReducer_1 = require("./vendorFiling1099ListReducer");
8
8
  const vendorReducer_1 = require("../../entity/vendor/vendorReducer");
9
9
  const addressReducer_1 = require("../../entity/address/addressReducer");
10
10
  const commonVendorViewHelper_1 = require("../commonVendorView/commonVendorViewHelper");
11
+ const vendorTypeListReducer_1 = require("../vendorTypeList/vendorTypeListReducer");
11
12
  const fetchVendorsFiling1099ListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(vendorFiling1099ListReducer_1.fetchVendorsFiling1099List.match), (0, operators_1.switchMap)(() => {
12
13
  const apiUrl = `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/2.0/reports/vendor_1099`;
13
14
  return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.switchMap)((response) => {
@@ -17,6 +18,7 @@ const fetchVendorsFiling1099ListEpic = (actions$, _state$, zeniAPI) => actions$.
17
18
  actions.push(...updateAllVendorRelatedEntities((_a = response.data) === null || _a === void 0 ? void 0 : _a.report.vendors), (0, vendorFiling1099ListReducer_1.updateVendorsFiling1099List)({
18
19
  response,
19
20
  }));
21
+ actions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
20
22
  return actions;
21
23
  }
22
24
  else {
@@ -4,8 +4,10 @@ import { RootState } from '../../reducer';
4
4
  import { ZeniDate } from '../../zeniDayJS';
5
5
  import { VendorFiling1099ListViewSortKey, VendorFiling1099ViewUIState } from './vendorFiling1099ListState';
6
6
  import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
7
+ import { VendorType } from '../vendorTypeList/vendorTypeListPayload';
7
8
  export interface VendorFiling1099ListSelectorView extends SelectorView {
8
9
  vendors: Vendor[];
10
+ vendorTypeList: VendorType[];
9
11
  isVendor1099Populated: boolean;
10
12
  uiState: VendorFiling1099ViewUIState;
11
13
  searchString?: string;
@@ -8,7 +8,8 @@ const vendorSelector_1 = require("../../entity/vendor/vendorSelector");
8
8
  const orderBy_1 = __importDefault(require("lodash/orderBy"));
9
9
  const getVendorFiling1099List = (state) => {
10
10
  var _a;
11
- const { vendorFiling1099ListState, vendorState } = state;
11
+ const { vendorFiling1099ListState, vendorState, vendorTypeListState } = state;
12
+ const vendorTypeList = vendorTypeListState.vendorTypes;
12
13
  const targetIds = vendorFiling1099ListState.vendorIds;
13
14
  const loweredSearchText = vendorFiling1099ListState.uiState.searchString
14
15
  .trim()
@@ -21,6 +22,7 @@ const getVendorFiling1099List = (state) => {
21
22
  });
22
23
  return {
23
24
  vendors: vendorFiling1099ViewList,
25
+ vendorTypeList: vendorTypeList,
24
26
  isVendor1099Populated: (_a = vendorFiling1099ListState.isVendor1099Populated) !== null && _a !== void 0 ? _a : true,
25
27
  uiState: vendorFiling1099ListState.uiState,
26
28
  fetchState: vendorFiling1099ListState.fetchState,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.12.48",
3
+ "version": "4.12.49",
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
  "types": "lib/index.d.ts",