@zeniai/client-epic-state 4.12.62 → 4.12.64

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 (45) hide show
  1. package/lib/entity/tenant/clearAllEpic.d.ts +1 -1
  2. package/lib/entity/tenant/clearAllEpic.js +1 -1
  3. package/lib/entity/vendor/vendorType.d.ts +1 -2
  4. package/lib/epic.d.ts +2 -3
  5. package/lib/epic.js +2 -3
  6. package/lib/index.d.ts +8 -10
  7. package/lib/index.js +16 -21
  8. package/lib/reducer.d.ts +1 -1
  9. package/lib/reducer.js +1 -1
  10. package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorDetailPageViewEpic.d.ts +1 -2
  11. package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorDetailPageViewEpic.js +1 -6
  12. package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorEpic.d.ts +2 -3
  13. package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorEpic.js +2 -4
  14. package/lib/view/commonVendorView/vendorsTabVendorView/epics/resetVendorsTabVendorDetailLocalDataEpic.js +1 -1
  15. package/lib/view/commonVendorView/vendorsTabVendorView/epics/vendorsTabVendorDetailLocalDataHelpers.d.ts +1 -3
  16. package/lib/view/commonVendorView/vendorsTabVendorView/epics/vendorsTabVendorDetailLocalDataHelpers.js +3 -14
  17. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewPayload.d.ts +0 -5
  18. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewPayload.js +1 -35
  19. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -7
  20. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.js +3 -23
  21. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -16
  22. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +7 -24
  23. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.d.ts +0 -16
  24. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.js +0 -3
  25. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +1 -1
  26. package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListMock.d.ts +3 -3
  27. package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListMock.js +3 -17
  28. package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListSelectorMock.d.ts +1 -1
  29. package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListSelectorMock.js +1 -10
  30. package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/fetchVendorsFiling1099ListEpic.d.ts +5 -5
  31. package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/fetchVendorsFiling1099ListEpic.js +6 -6
  32. package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListPayload.d.ts +3 -3
  33. package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListReducer.d.ts +4 -8
  34. package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListReducer.js +5 -18
  35. package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListSelector.d.ts +6 -6
  36. package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListSelector.js +3 -8
  37. package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListState.d.ts +3 -3
  38. package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListState.js +1 -1
  39. package/lib/view/vendorTabView/fetchVendorTabViewEpic.d.ts +1 -1
  40. package/lib/view/vendorTabView/fetchVendorTabViewEpic.js +2 -2
  41. package/package.json +1 -1
  42. package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.d.ts +0 -8
  43. package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.js +0 -30
  44. /package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/json/vendorFiling1099ListSuccess.json +0 -0
  45. /package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListPayload.js +0 -0
@@ -1,11 +1,9 @@
1
- import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
2
- import { ZeniAPIStatus } from '../../../responsePayload';
1
+ import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
2
+ import { ZeniAPIStatus } from '../../responsePayload';
3
3
  import { VendorFiling1099ListResponse } from './vendorFiling1099ListPayload';
4
4
  import { VendorFiling1099ListState, VendorFiling1099ListViewSortKey } from './vendorFiling1099ListState';
5
5
  export declare const initialState: VendorFiling1099ListState;
6
- export declare const fetchVendorsFiling1099All: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride: boolean], {
7
- cacheOverride: boolean;
8
- }, string, never, never>, fetchVendorsFiling1099List: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[], {
6
+ export declare const fetchVendorsFiling1099List: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[], {
9
7
  view: undefined;
10
8
  }, string, never, never>, updateVendorsFiling1099List: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
11
9
  response: VendorFiling1099ListResponse;
@@ -13,11 +11,9 @@ export declare const fetchVendorsFiling1099All: import("@reduxjs/toolkit").Actio
13
11
  status: ZeniAPIStatus;
14
12
  }, string>, clearVendorsFiling1099List: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateFiling1099ScrollYOffset: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
15
13
  scrollYOffset: number;
16
- }, string>, updateFiling1099SortUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
14
+ }, string>, updateFiling1099SortUiState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
17
15
  sortOrder: SortOrder;
18
16
  sortKey: VendorFiling1099ListViewSortKey;
19
- }, string>, updateFiling1099SearchUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
20
- searchString: string;
21
17
  }, string>;
22
18
  declare const _default: import("@reduxjs/toolkit").Reducer<VendorFiling1099ListState, import("@reduxjs/toolkit").AnyAction>;
23
19
  export default _default;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.updateFiling1099SearchUIState = exports.updateFiling1099SortUIState = exports.updateFiling1099ScrollYOffset = exports.clearVendorsFiling1099List = exports.updateVendorFiling1099ListFailure = exports.updateVendorsFiling1099List = exports.fetchVendorsFiling1099List = exports.fetchVendorsFiling1099All = exports.initialState = void 0;
4
+ exports.updateFiling1099SortUiState = exports.updateFiling1099ScrollYOffset = exports.clearVendorsFiling1099List = exports.updateVendorFiling1099ListFailure = exports.updateVendorsFiling1099List = exports.fetchVendorsFiling1099List = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
- const zeniDayJS_1 = require("../../../zeniDayJS");
6
+ const zeniDayJS_1 = require("../../zeniDayJS");
7
7
  exports.initialState = {
8
8
  fetchState: 'Not-Started',
9
9
  error: undefined,
@@ -25,21 +25,11 @@ const vendorFiling1099List = (0, toolkit_1.createSlice)({
25
25
  name: 'vendorFiling1099List',
26
26
  initialState: exports.initialState,
27
27
  reducers: {
28
- fetchVendorsFiling1099All: {
29
- prepare(cacheOverride) {
30
- return {
31
- payload: { cacheOverride },
32
- };
33
- },
34
- reducer() {
35
- // Do nothing
36
- },
37
- },
38
28
  fetchVendorsFiling1099List: {
39
29
  reducer(draft) {
40
30
  draft.fetchState = 'In-Progress';
41
31
  // Note: Need to reset scroll position whenever a new fetch happens, except when fetching through scroll
42
- draft.uiState = exports.initialState.uiState;
32
+ draft.uiState.scrollYOffset = 0;
43
33
  draft.error = undefined;
44
34
  },
45
35
  prepare() {
@@ -48,12 +38,9 @@ const vendorFiling1099List = (0, toolkit_1.createSlice)({
48
38
  };
49
39
  },
50
40
  },
51
- updateFiling1099SortUIState(draft, action) {
41
+ updateFiling1099SortUiState(draft, action) {
52
42
  draft.uiState = Object.assign(Object.assign({}, draft.uiState), { sortKey: action.payload.sortKey, sortOrder: action.payload.sortOrder });
53
43
  },
54
- updateFiling1099SearchUIState(draft, action) {
55
- draft.uiState = Object.assign(Object.assign({}, draft.uiState), { searchString: action.payload.searchString });
56
- },
57
44
  updateVendorsFiling1099List(draft, action) {
58
45
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
59
46
  const { response } = action.payload;
@@ -80,5 +67,5 @@ const vendorFiling1099List = (0, toolkit_1.createSlice)({
80
67
  },
81
68
  },
82
69
  });
83
- _a = vendorFiling1099List.actions, exports.fetchVendorsFiling1099All = _a.fetchVendorsFiling1099All, exports.fetchVendorsFiling1099List = _a.fetchVendorsFiling1099List, exports.updateVendorsFiling1099List = _a.updateVendorsFiling1099List, exports.updateVendorFiling1099ListFailure = _a.updateVendorFiling1099ListFailure, exports.clearVendorsFiling1099List = _a.clearVendorsFiling1099List, exports.updateFiling1099ScrollYOffset = _a.updateFiling1099ScrollYOffset, exports.updateFiling1099SortUIState = _a.updateFiling1099SortUIState, exports.updateFiling1099SearchUIState = _a.updateFiling1099SearchUIState;
70
+ _a = vendorFiling1099List.actions, exports.fetchVendorsFiling1099List = _a.fetchVendorsFiling1099List, exports.updateVendorsFiling1099List = _a.updateVendorsFiling1099List, exports.updateVendorFiling1099ListFailure = _a.updateVendorFiling1099ListFailure, exports.clearVendorsFiling1099List = _a.clearVendorsFiling1099List, exports.updateFiling1099ScrollYOffset = _a.updateFiling1099ScrollYOffset, exports.updateFiling1099SortUiState = _a.updateFiling1099SortUiState;
84
71
  exports.default = vendorFiling1099List.reducer;
@@ -1,10 +1,10 @@
1
- import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
2
- import { Vendor } from '../../../entity/vendor/vendorState';
3
- import { RootState } from '../../../reducer';
4
- import { ZeniDate } from '../../../zeniDayJS';
1
+ import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
2
+ import { Vendor } from '../../entity/vendor/vendorState';
3
+ import { RootState } from '../../reducer';
4
+ import { ZeniDate } from '../../zeniDayJS';
5
5
  import { VendorFiling1099ListViewSortKey, VendorFiling1099ViewUIState } from './vendorFiling1099ListState';
6
- import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
7
- import { VendorType } from '../../vendorTypeList/vendorTypeListPayload';
6
+ import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
7
+ import { VendorType } from '../vendorTypeList/vendorTypeListPayload';
8
8
  export interface VendorFiling1099ListSelectorView extends SelectorView {
9
9
  vendors: Vendor[];
10
10
  vendorTypeList: VendorType[];
@@ -4,18 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.sortedVendorFiling1099View = exports.getVendorFiling1099List = void 0;
7
- const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
7
+ const vendorSelector_1 = require("../../entity/vendor/vendorSelector");
8
8
  const orderBy_1 = __importDefault(require("lodash/orderBy"));
9
- const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
10
9
  const getVendorFiling1099List = (state) => {
11
10
  var _a;
12
11
  const { vendorFiling1099ListState, vendorState, vendorTypeListState } = state;
13
- const targetIds = vendorFiling1099ListState.vendorIds;
14
- const fetchStatus = (0, reduceFetchState_1.reduceFetchState)([
15
- vendorFiling1099ListState,
16
- vendorTypeListState,
17
- ]);
18
12
  const vendorTypeList = vendorTypeListState.vendorTypes;
13
+ const targetIds = vendorFiling1099ListState.vendorIds;
19
14
  const loweredSearchText = vendorFiling1099ListState.uiState.searchString
20
15
  .trim()
21
16
  .toLowerCase();
@@ -30,7 +25,7 @@ const getVendorFiling1099List = (state) => {
30
25
  vendorTypeList: vendorTypeList,
31
26
  isVendor1099Populated: (_a = vendorFiling1099ListState.isVendor1099Populated) !== null && _a !== void 0 ? _a : true,
32
27
  uiState: vendorFiling1099ListState.uiState,
33
- fetchState: fetchStatus.fetchState,
28
+ fetchState: vendorFiling1099ListState.fetchState,
34
29
  lastRefreshSuccessTime: vendorFiling1099ListState.lastRefreshSuccessTime,
35
30
  error: vendorFiling1099ListState.error,
36
31
  version: 0,
@@ -1,6 +1,6 @@
1
- import { FetchedState, FetchState, ID } from '../../../commonStateTypes/common';
2
- import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
3
- import { ZeniDate } from '../../../zeniDayJS';
1
+ import { FetchedState, FetchState, ID } from '../../commonStateTypes/common';
2
+ import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
3
+ import { ZeniDate } from '../../zeniDayJS';
4
4
  export interface VendorFiling1099ViewUIState {
5
5
  sortKey: VendorFiling1099ListViewSortKey;
6
6
  sortOrder: SortOrder;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
3
+ const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
4
4
  const VENDOR_FILING_1099_LIST_VIEW_SORT_KEYS = [
5
5
  'vendor_name',
6
6
  'tax_classification',
@@ -5,6 +5,6 @@ import { fetchVendorTabView } from './vendorTabViewReducer';
5
5
  import { fetchAccruedScheduleList, fetchScheduleList } from '../scheduleView/scheduleListView/scheduleListReducer';
6
6
  import { fetchOpExByVendor } from '../opExByVendor/opExByVendorReducer';
7
7
  import { fetchVendorsList } from '../vendorList/vendorListReducer';
8
- import { fetchVendorsFiling1099List } from '../vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer';
8
+ import { fetchVendorsFiling1099List } from '../vendorFiling1099List/vendorFiling1099ListReducer';
9
9
  export declare type ActionType = ReturnType<typeof fetchVendorTabView> | ReturnType<typeof fetchOpExByVendor> | ReturnType<typeof fetchVendorsList> | ReturnType<typeof fetchAccruedScheduleList> | ReturnType<typeof fetchScheduleList> | ReturnType<typeof fetchVendorsFiling1099List>;
10
10
  export declare const fetchVendorTabViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -7,12 +7,12 @@ const vendorTabViewReducer_1 = require("./vendorTabViewReducer");
7
7
  const scheduleListReducer_1 = require("../scheduleView/scheduleListView/scheduleListReducer");
8
8
  const opExByVendorReducer_1 = require("../opExByVendor/opExByVendorReducer");
9
9
  const vendorListReducer_1 = require("../vendorList/vendorListReducer");
10
- const vendorFiling1099ListReducer_1 = require("../vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer");
10
+ const vendorFiling1099ListReducer_1 = require("../vendorFiling1099List/vendorFiling1099ListReducer");
11
11
  const scheduleListSelector_1 = require("../scheduleView/scheduleListView/scheduleListSelector");
12
12
  const scheduleListHelper_1 = require("../scheduleView/scheduleListView/scheduleListHelper");
13
13
  const opExByVendorSelector_1 = require("../opExByVendor/opExByVendorSelector");
14
14
  const vendorListSelector_1 = require("../vendorList/vendorListSelector");
15
- const vendorFiling1099ListSelector_1 = require("../vendorFiling1099/vendorFiling1099List/vendorFiling1099ListSelector");
15
+ const vendorFiling1099ListSelector_1 = require("../vendorFiling1099List/vendorFiling1099ListSelector");
16
16
  const fetchVendorTabViewEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(vendorTabViewReducer_1.fetchVendorTabView.match), (0, operators_1.switchMap)((action) => {
17
17
  const { shouldFetchAccruedExpenses, shouldFetchFixedAssets, shouldFetchOpexByVendor, shouldFetchPrepaidExpenses, shouldFetchVendorsList, shouldFetchFiling1099Vendor, } = action.payload;
18
18
  const state = state$.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.12.62",
3
+ "version": "4.12.64",
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",
@@ -1,8 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { RootState } from '../../../reducer';
4
- import { fetchVendorsFiling1099List } from './vendorFiling1099ListReducer';
5
- import { fetchVendorTypeList } from '../../vendorTypeList/vendorTypeListReducer';
6
- import { initializeAccountMappingView } from '../../accountMappingView/accountMappingReducer';
7
- export declare type ActionType = ReturnType<typeof fetchVendorsFiling1099List> | ReturnType<typeof fetchVendorTypeList> | ReturnType<typeof initializeAccountMappingView>;
8
- export declare const fetchVendorsFiling1099AllEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchVendorsFiling1099AllEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const vendorFiling1099ListReducer_1 = require("./vendorFiling1099ListReducer");
7
- const vendorTypeListReducer_1 = require("../../vendorTypeList/vendorTypeListReducer");
8
- const accountMappingReducer_1 = require("../../accountMappingView/accountMappingReducer");
9
- const fetchVendorsFiling1099AllEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(vendorFiling1099ListReducer_1.fetchVendorsFiling1099All.match), (0, operators_1.switchMap)((action) => {
10
- const state = state$.value;
11
- const vendorActions = [];
12
- if (action.payload.cacheOverride === true) {
13
- if (state.vendorTypeListState.hasValidState() === false &&
14
- state.vendorTypeListState.fetchState !== 'In-Progress') {
15
- vendorActions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
16
- }
17
- vendorActions.push((0, accountMappingReducer_1.initializeAccountMappingView)());
18
- vendorActions.push((0, vendorFiling1099ListReducer_1.fetchVendorsFiling1099List)());
19
- }
20
- else {
21
- if (state.vendorTypeListState.hasValidState() === false &&
22
- state.vendorTypeListState.fetchState !== 'In-Progress') {
23
- vendorActions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
24
- }
25
- vendorActions.push((0, accountMappingReducer_1.initializeAccountMappingView)());
26
- vendorActions.push((0, vendorFiling1099ListReducer_1.fetchVendorsFiling1099List)());
27
- }
28
- return (0, rxjs_1.concat)((0, rxjs_1.from)(vendorActions));
29
- }));
30
- exports.fetchVendorsFiling1099AllEpic = fetchVendorsFiling1099AllEpic;