Total Complexity | 0 |
Complexity/F | 0 |
Lines of Code | 36 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | import { fromJS } from 'immutable'; |
||
2 | |||
3 | import { |
||
4 | SET_SELECTION, |
||
5 | SELECT_ALL, |
||
6 | DESELECT_ALL, |
||
7 | SET_DATA, |
||
8 | SELECT_ROW, |
||
9 | DESELECT_ROW |
||
10 | } from '../../../constants/ActionTypes'; |
||
11 | |||
12 | import { |
||
13 | selectAll, |
||
14 | deselectAll, |
||
15 | removeSelections, |
||
16 | selectRow, |
||
17 | deselectRow, |
||
18 | setSelection |
||
19 | } from './../../actionHelpers/plugins/selection'; |
||
20 | |||
21 | import |
||
22 | handleActions |
||
23 | from './../../../util/handleActions'; |
||
24 | |||
25 | import { generateLastUpdate } from './../../../util/lastUpdate'; |
||
26 | |||
27 | const initialState = fromJS({ lastUpdate: generateLastUpdate() }); |
||
28 | |||
29 | export default handleActions({ |
||
30 | [SET_SELECTION]: setSelection, |
||
31 | [SELECT_ALL]: selectAll, |
||
32 | [DESELECT_ALL]: deselectAll, |
||
33 | [SET_DATA]: removeSelections, |
||
34 | [SELECT_ROW]: selectRow, |
||
35 | [DESELECT_ROW]: deselectRow |
||
36 | }, initialState); |
||
37 |