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

73 lines
2.7 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 MemberSignupContainerStore from './container/signup';
import * as MemberSigninContainerStore from './container/signin';
import * as MemberModifyPasswordContainerStore from './container/modify-password';
import * as MemberResetPasswordContainerStore from './container/reset-password';
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_signup_container: MemberSignupContainerStore.State;
member_signin_container: MemberSigninContainerStore.State;
member_modify_password_container: MemberModifyPasswordContainerStore.State;
member_reset_password_container: MemberResetPasswordContainerStore.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_signup_container: MemberSignupContainerStore.reducer,
member_signin_container: MemberSigninContainerStore.reducer,
member_modify_password_container: MemberModifyPasswordContainerStore.reducer,
member_reset_password_container: MemberResetPasswordContainerStore.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 MemberSignupContainerSelector = MemberSignupContainerStore.getSelectors(createSelector(
selectState,
(state: State) => state.member_signup_container
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 MemberModifyPasswordContainerSelector = MemberModifyPasswordContainerStore.getSelectors(createSelector(
selectState,
(state: State) => state.member_modify_password_container
2018-04-19 12:35:11 +00:00
));
2018-04-30 12:04:58 +00:00
2018-05-28 07:51:33 +00:00
export const MemberResetPasswordContainerSelector = MemberResetPasswordContainerStore.getSelectors(createSelector(
selectState,
(state: State) => state.member_reset_password_container
2018-04-30 12:04:58 +00:00
));
2018-05-03 10:33:19 +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
));