This commit is contained in:
crusader 2018-05-31 22:30:37 +09:00
parent 15aae744bc
commit 1ba83a802d
11 changed files with 0 additions and 162 deletions

View File

@ -9,7 +9,6 @@ import { AuthContainerSelector } from '@overflow/shared/auth/store';
import { DomainMember } from '@overflow/commons-typescript/model/domain';
import { NoAuthProbeService } from '../service/noauth-probe.service';
import { NoAuthProbeConnectingSelector } from '../store';
import { NoAuthProbeSubscriber, NoAuthProbeNotify } from '../subscriber/noauth-probe.subscriber';
@Component({

View File

@ -1,24 +0,0 @@
import { NgModule } from '@angular/core';
import { StoreModule } from '@ngrx/store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import {
StoreRouterConnectingModule,
RouterStateSerializer,
} from '@ngrx/router-store';
import { EffectsModule } from '@ngrx/effects';
import { combineReducers, ActionReducer, ActionReducerMap, MetaReducer } from '@ngrx/store';
import {
REDUCERS,
EFFECTS,
} from './store';
import { MODULE } from './noauth-probe.constant';
@NgModule({
imports: [
StoreModule.forFeature(MODULE.name, REDUCERS),
EffectsModule.forFeature(EFFECTS),
],
})
export class NoAuthProbeStoreModule { }

View File

@ -3,7 +3,6 @@ import { CommonModule } from '@angular/common';
import { UIModule } from '@overflow/shared/ui/ui.module';
import { NoAuthProbeStoreModule } from './noauth-probe-store.module';
import { NoAuthProbeRPCModule } from './noauth-probe-rpc.module';
import { NoAuthProbeLoggerModule } from './noauth-probe-logger.module';
import { COMPONENTS } from './component';
@ -13,7 +12,6 @@ import { SERVICES } from './service';
@NgModule({
imports: [
CommonModule,
NoAuthProbeStoreModule,
NoAuthProbeRPCModule,
NoAuthProbeLoggerModule,
UIModule,

View File

@ -1,4 +0,0 @@
export * from './noauth-probe-connecting.action';
export * from './noauth-probe-connecting.effect';
export * from './noauth-probe-connecting.reducer';
export * from './noauth-probe-connecting.state';

View File

@ -1,26 +0,0 @@
import { Action } from '@ngrx/store';
import { RPCClientError } from '@loafer/ng-rpc';
import { NoAuthProbe } from '@overflow/commons-typescript/model/noauth';
export enum ActionType {
OnConnect = '[noauth-probe.connecting] OnConnect',
OnDisconnect = '[noauth-probe.connecting] OnDisconnect',
}
export class OnConnect implements Action {
readonly type = ActionType.OnConnect;
constructor(public payload: NoAuthProbe) {}
}
export class OnDisconnect implements Action {
readonly type = ActionType.OnDisconnect;
constructor(public payload: NoAuthProbe) {}
}
export type Actions =
| OnConnect
| OnDisconnect
;

View File

@ -1,15 +0,0 @@
import { TestBed, inject } from '@angular/core/testing';
import { Effects } from './noauth-probe-connecting.effect';
describe('noauth-probe-connecting.Effects', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [Effects]
});
});
it('should be created', inject([Effects], (effects: Effects) => {
expect(effects).toBeTruthy();
}));
});

View File

@ -1,23 +0,0 @@
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { Effect, Actions, ofType } from '@ngrx/effects';
import { Action } from '@ngrx/store';
import { RPCClientError } from '@loafer/ng-rpc';
import { NoAuthProbeService } from '../../service/noauth-probe.service';
import {
ActionType,
} from './noauth-probe-connecting.action';
@Injectable()
export class Effects {
constructor(
private actions$: Actions,
private noAuthProbeService: NoAuthProbeService,
private router: Router
) { }
}

View File

@ -1,21 +0,0 @@
import { ActionType, Actions } from './noauth-probe-connecting.action';
import {
State,
initialState,
noAuthProbeConnectingAdapter,
} from './noauth-probe-connecting.state';
export function reducer(state = initialState, action: Actions): State {
switch (action.type) {
case ActionType.OnConnect: {
return noAuthProbeConnectingAdapter.upsertOne(action.payload, state);
}
case ActionType.OnDisconnect: {
return noAuthProbeConnectingAdapter.upsertOne(action.payload, state);
}
default: {
return state;
}
}
}

View File

@ -1,17 +0,0 @@
import { RPCClientError } from '@loafer/ng-rpc';
import { NoAuthProbe } from '@overflow/commons-typescript/model/noauth';
import { Selector, createSelector } from '@ngrx/store';
import { createEntityAdapter, EntityState } from '@loafer/ng-entity';
export const noAuthProbeConnectingAdapter = createEntityAdapter<NoAuthProbe, RPCClientError>();
export interface State extends EntityState<NoAuthProbe, RPCClientError> {
}
export const initialState: State = noAuthProbeConnectingAdapter.getInitialState({
});
export function getSelectors(selector: Selector<any, State>) {
return {
...noAuthProbeConnectingAdapter.getSelectors(selector),
};
}

View File

@ -1,27 +0,0 @@
import {
createSelector,
createFeatureSelector,
} from '@ngrx/store';
import { MODULE } from '../noauth-probe.constant';
import * as NoAuthProbeConnectingStore from './connecting';
export interface State {
connecting: NoAuthProbeConnectingStore.State;
}
export const REDUCERS = {
connecting: NoAuthProbeConnectingStore.reducer,
};
export const EFFECTS = [
NoAuthProbeConnectingStore.Effects,
];
export const selectState = createFeatureSelector<State>(MODULE.name);
export const NoAuthProbeConnectingSelector = NoAuthProbeConnectingStore.getSelectors(createSelector(
selectState,
(state: State) => state.connecting
));

View File

@ -7,8 +7,6 @@ import { LoggerService } from '@loafer/ng-logger';
import { NoAuthProbe } from '@overflow/commons-typescript/model/noauth';
import * as NoAuthProbeConnectingStore from '../store/connecting';
export interface NoAuthProbeNotify {
method: string;
params: NoAuthProbe;