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 * as ListStore from './list';
|
|
|
|
import { MODULE } from '../crawler-input.constant';
|
|
|
|
|
|
|
|
export interface State {
|
|
|
|
list: ListStore.State;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const REDUCERS = {
|
|
|
|
list: ListStore.reducer,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const EFFECTS = [
|
|
|
|
ListStore.Effects,
|
|
|
|
];
|
|
|
|
|
|
|
|
export const selectState = createFeatureSelector<State>(MODULE.name);
|
|
|
|
|
|
|
|
export const ReadCrawlerInputItemSelector = new StateSelector<ListStore.State>(createSelector(
|
|
|
|
selectState,
|
|
|
|
(state: State) => state.list
|
|
|
|
));
|