member_webapp/@overflow/member/store/index.ts

49 lines
1.5 KiB
TypeScript
Raw Normal View History

2018-04-06 06:59:49 +00:00
import {
createSelector,
createFeatureSelector,
} from '@ngrx/store';
import { MODULE } from '../member.constant';
2018-05-28 07:51:33 +00:00
import * as MemberEntityStore from './entity/member';
import * as MemberTOTPEntityStore from './entity/member-totp';
import * as MemberSigninContainerStore from './container/signin';
import * as MemberModifyContainerStore from './container/modify';
import * as MemberSignoutContainerStore from './container/signout';
2018-04-06 06:59:49 +00:00
export interface State {
2018-05-28 07:51:33 +00:00
member_signin_container: MemberSigninContainerStore.State;
member_modify_container: MemberModifyContainerStore.State;
member_signout_container: MemberSignoutContainerStore.State;
2018-04-06 06:59:49 +00:00
}
export const REDUCERS = {
2018-05-28 07:51:33 +00:00
member_signin_container: MemberSigninContainerStore.reducer,
member_modify_container: MemberModifyContainerStore.reducer,
member_signout_container: MemberSignoutContainerStore.reducer,
2018-04-06 06:59:49 +00:00
};
export const EFFECTS = [
2018-05-28 07:51:33 +00:00
MemberEntityStore.Effects,
MemberTOTPEntityStore.Effects,
2018-04-06 06:59:49 +00:00
];
2018-05-28 07:51:33 +00:00
export const selectState = createFeatureSelector<State>(MODULE.name);
2018-04-06 06:59:49 +00:00
2018-05-28 07:51:33 +00:00
export const MemberSigninContainerSelector = MemberSigninContainerStore.getSelectors(createSelector(
selectState,
(state: State) => state.member_signin_container
2018-04-06 06:59:49 +00:00
));
2018-04-19 12:35:11 +00:00
2018-05-28 07:51:33 +00:00
export const MemberModifyContainerSelector = MemberModifyContainerStore.getSelectors(createSelector(
selectState,
(state: State) => state.member_modify_container
2018-05-03 10:33:19 +00:00
));
2018-05-28 07:51:33 +00:00
export const MemberSignoutContainerSelector = MemberSignoutContainerStore.getSelectors(createSelector(
selectState,
(state: State) => state.member_signout_container
));