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 '../target.constant';
|
|
|
|
|
2018-04-30 10:59:32 +00:00
|
|
|
import * as TargetModifyStore from './modify';
|
2018-04-06 11:02:18 +00:00
|
|
|
|
|
|
|
export interface State {
|
2018-04-30 10:59:32 +00:00
|
|
|
modify: TargetModifyStore.State;
|
2018-04-06 11:02:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const REDUCERS = {
|
2018-04-30 10:59:32 +00:00
|
|
|
modify: TargetModifyStore.reducer,
|
2018-04-06 11:02:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const EFFECTS = [
|
2018-04-30 10:59:32 +00:00
|
|
|
TargetModifyStore.Effects,
|
2018-04-06 11:02:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
export const selectTargetState = createFeatureSelector<State>(MODULE.name);
|
|
|
|
|
2018-04-30 12:04:58 +00:00
|
|
|
export const ModifySelector = new StateSelector<TargetModifyStore.State>(createSelector(
|
2018-04-06 11:02:18 +00:00
|
|
|
selectTargetState,
|
2018-04-30 10:59:32 +00:00
|
|
|
(state: State) => state.modify
|
2018-04-06 11:02:18 +00:00
|
|
|
));
|