@zeniai/client-epic-state 4.19.90-beta2ND → 4.19.90-beta3ND

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.
@@ -2,14 +2,13 @@ import { of } from 'rxjs';
2
2
  import { filter, switchMap } from 'rxjs/operators';
3
3
  import { updateCashInCashOutCOABalancesRange } from '../cashInCashOut/cashInCashOutReducer';
4
4
  import { updateCashPositionCOABalancesRange } from '../cashPosition/cashPositionReducer';
5
- import { initialFinanceStatementState, updateCOABalancesRange, } from '../financeStatement/financeStatementReducer';
5
+ import { updateCOABalancesRange } from '../financeStatement/financeStatementReducer';
6
6
  import { updateNetBurnOrIncomeCOABalancesRange } from '../netBurnOrIncome/netBurnOrIncomeReducer';
7
7
  import { updateOpExCOABalancesRange } from '../opEx/opExReducer';
8
8
  import { updateRevenueCOABalancesRange } from '../revenue/revenueReducer';
9
9
  import { updateReportUIOptionCOABalancesRange } from './reportUIOptionsReducer';
10
10
  export const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => actions$.pipe(filter(updateReportUIOptionCOABalancesRange.match), switchMap((action) => {
11
- const thisPeriod = action.payload.selectedCOABalancesRange.thisPeriod;
12
- const orderBy = action.payload.selectedCOABalancesRange.orderBy;
11
+ const { thisPeriod, orderBy, numberOfPeriods: selectedNumberOfPeriods, } = action.payload.selectedCOABalancesRange;
13
12
  const highlightedNoOfPeriods = state$.value.reportUIOptionsState.isCompareModeOn === true ? 4 : 1;
14
13
  const highlightedCOABalancesRange = action.payload.highlightedCOABalancesRange == null && thisPeriod != null
15
14
  ? {
@@ -63,8 +62,8 @@ export const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => ac
63
62
  ? action.payload.highlightedCOABalancesRange.thisPeriod
64
63
  : thisPeriod,
65
64
  numberOfPeriods: state$.value.reportUIOptionsState.isCompareModeOn === true
66
- ? 4
67
- : initialFinanceStatementState.maxNumOfPeriodsToHighlight,
65
+ ? Math.max(4, selectedNumberOfPeriods)
66
+ : selectedNumberOfPeriods,
68
67
  orderBy,
69
68
  }));
70
69
  }));