2018-04-06 11:02:18 +00:00
|
|
|
import {
|
|
|
|
createSelector,
|
|
|
|
createFeatureSelector,
|
|
|
|
ActionReducerMap,
|
|
|
|
} from '@ngrx/store';
|
|
|
|
|
2018-05-24 06:44:13 +00:00
|
|
|
import { StateSelector } from '@overflow/core/ngrx/store';
|
2018-04-06 11:02:18 +00:00
|
|
|
|
|
|
|
import { MODULE } from '../probe.constant';
|
|
|
|
|
2018-05-25 09:18:06 +00:00
|
|
|
import * as ProbeStore from './entity/probe';
|
2018-04-06 11:02:18 +00:00
|
|
|
|
|
|
|
export interface State {
|
2018-05-24 10:50:43 +00:00
|
|
|
probes: ProbeStore.State;
|
2018-04-06 11:02:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const REDUCERS = {
|
2018-05-24 10:50:43 +00:00
|
|
|
probes: ProbeStore.reducer,
|
2018-04-06 11:02:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const EFFECTS = [
|
2018-05-24 10:50:43 +00:00
|
|
|
ProbeStore.Effects,
|
2018-04-06 11:02:18 +00:00
|
|
|
];
|
|
|
|
|
2018-05-25 11:59:18 +00:00
|
|
|
export const selectState = createFeatureSelector<State>(MODULE.name);
|
2018-04-06 11:02:18 +00:00
|
|
|
|
2018-05-25 11:59:18 +00:00
|
|
|
export const ProbeSelector = ProbeStore.getSelectors(createSelector(
|
|
|
|
selectState,
|
2018-05-24 10:50:43 +00:00
|
|
|
(state: State) => state.probes
|
2018-04-25 09:04:47 +00:00
|
|
|
));
|
2018-05-24 11:30:02 +00:00
|
|
|
|
2018-05-25 11:59:18 +00:00
|
|
|
|