bug fixed
This commit is contained in:
parent
68d9deda92
commit
87da322115
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -2369,12 +2369,12 @@
|
||||||
},
|
},
|
||||||
"@ucap/ng-protocol-umg": {
|
"@ucap/ng-protocol-umg": {
|
||||||
"version": "file:pack/ucap-ng-protocol-umg-0.0.2.tgz",
|
"version": "file:pack/ucap-ng-protocol-umg-0.0.2.tgz",
|
||||||
"integrity": "sha512-JnILmpoqUc8zQKZqbucBJ2H68y3Oy7HB4h/Ax6bq4Ctqxk6qaA2/Eda65WTS8L4EresYdVGW07AR4Z0p0XLIzg=="
|
"integrity": "sha512-JnILmpoqUc8zQKZqbucBJ2H68y3Oy7HB4h/Ax6bq4Ctqxk6qaA2/Eda65WTS8L4EresYdVGW07AR4Z0p0XLIzg==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"@ucap/ng-store-authentication": {
|
"@ucap/ng-store-authentication": {
|
||||||
"version": "file:pack/ucap-ng-store-authentication-0.0.6.tgz",
|
"version": "file:pack/ucap-ng-store-authentication-0.0.7.tgz",
|
||||||
"integrity": "sha512-qP3+rsni/z/JOTR/VPjH+09buvHphJc4IHMSS+HlAFvJPeLcWXWChANzpUG3tWNxEbrh8GhaOlzYkGyqBJTVLA==",
|
"integrity": "sha512-6IxxjFYpmN3xC2zIix9BfXbHHKpZeeS09SlT7RujMGt58CPyLnWkCFa/a4NILYQpUaXwQn+CmB1o8nhaZvwMNw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"@ucap/ng-store-chat": {
|
"@ucap/ng-store-chat": {
|
||||||
"version": "file:pack/ucap-ng-store-chat-0.0.4.tgz",
|
"version": "file:pack/ucap-ng-store-chat-0.0.4.tgz",
|
||||||
|
|
|
@ -165,7 +165,7 @@
|
||||||
"@ucap/ng-protocol-status": "file:pack/ucap-ng-protocol-status-0.0.2.tgz",
|
"@ucap/ng-protocol-status": "file:pack/ucap-ng-protocol-status-0.0.2.tgz",
|
||||||
"@ucap/ng-protocol-sync": "file:pack/ucap-ng-protocol-sync-0.0.2.tgz",
|
"@ucap/ng-protocol-sync": "file:pack/ucap-ng-protocol-sync-0.0.2.tgz",
|
||||||
"@ucap/ng-protocol-umg": "file:pack/ucap-ng-protocol-umg-0.0.2.tgz",
|
"@ucap/ng-protocol-umg": "file:pack/ucap-ng-protocol-umg-0.0.2.tgz",
|
||||||
"@ucap/ng-store-authentication": "file:pack/ucap-ng-store-authentication-0.0.6.tgz",
|
"@ucap/ng-store-authentication": "file:pack/ucap-ng-store-authentication-0.0.7.tgz",
|
||||||
"@ucap/ng-store-chat": "file:pack/ucap-ng-store-chat-0.0.4.tgz",
|
"@ucap/ng-store-chat": "file:pack/ucap-ng-store-chat-0.0.4.tgz",
|
||||||
"@ucap/ng-store-group": "file:pack/ucap-ng-store-group-0.0.5.tgz",
|
"@ucap/ng-store-group": "file:pack/ucap-ng-store-group-0.0.5.tgz",
|
||||||
"@ucap/ng-store-organization": "file:pack/ucap-ng-store-organization-0.0.3.tgz",
|
"@ucap/ng-store-organization": "file:pack/ucap-ng-store-organization-0.0.3.tgz",
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
"@ngrx/store": "@ngrx/store",
|
"@ngrx/store": "@ngrx/store",
|
||||||
"@ngrx/effects": "@ngrx/effects",
|
"@ngrx/effects": "@ngrx/effects",
|
||||||
"@ucap/core": "@ucap/core",
|
"@ucap/core": "@ucap/core",
|
||||||
|
"@ucap/api-public": "@ucap/api-public",
|
||||||
|
"@ucap/api-external": "@ucap/api-external",
|
||||||
"@ucap/pi": "@ucap/pi",
|
"@ucap/pi": "@ucap/pi",
|
||||||
"@ucap/protocol-authentication": "@ucap/protocol-authentication",
|
"@ucap/protocol-authentication": "@ucap/protocol-authentication",
|
||||||
"@ucap/protocol-option": "@ucap/protocol-option",
|
"@ucap/protocol-option": "@ucap/protocol-option",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@ucap/ng-store-authentication",
|
"name": "@ucap/ng-store-authentication",
|
||||||
"version": "0.0.6",
|
"version": "0.0.7",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "http://10.81.13.221:8081/nexus/repository/npm-ucap/"
|
"registry": "http://10.81.13.221:8081/nexus/repository/npm-ucap/"
|
||||||
},
|
},
|
||||||
|
@ -11,6 +11,8 @@
|
||||||
"@ngrx/entity": "^9.0.0",
|
"@ngrx/entity": "^9.0.0",
|
||||||
"@ngrx/store": "^9.0.0",
|
"@ngrx/store": "^9.0.0",
|
||||||
"@ucap/core": "~0.0.1",
|
"@ucap/core": "~0.0.1",
|
||||||
|
"@ucap/api-public": "~0.0.1",
|
||||||
|
"@ucap/api-external": "~0.0.1",
|
||||||
"@ucap/pi": "~0.0.1",
|
"@ucap/pi": "~0.0.1",
|
||||||
"@ucap/protocol-authentication": "~0.0.1",
|
"@ucap/protocol-authentication": "~0.0.1",
|
||||||
"@ucap/protocol-option": "~0.0.1",
|
"@ucap/protocol-option": "~0.0.1",
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
import { createAction, props } from '@ngrx/store';
|
||||||
|
|
||||||
|
import { VersionInfo2Response, VersionInfo2Request } from '@ucap/api-public';
|
||||||
|
import { UrlInfoRequest, UrlInfoResponse } from '@ucap/api-external';
|
||||||
|
|
||||||
|
export const versionInfo2 = createAction(
|
||||||
|
'[ucap::authentication::configuration] versionInfo2',
|
||||||
|
props<{ req: VersionInfo2Request }>()
|
||||||
|
);
|
||||||
|
|
||||||
|
export const versionInfo2Success = createAction(
|
||||||
|
'[ucap::authentication::configuration] versionInfo2 Success',
|
||||||
|
props<{ res: VersionInfo2Response }>()
|
||||||
|
);
|
||||||
|
|
||||||
|
export const versionInfo2Failure = createAction(
|
||||||
|
'[ucap::authentication::configuration] versionInfo2 Failure',
|
||||||
|
props<{ error: any }>()
|
||||||
|
);
|
||||||
|
|
||||||
|
export const urlInfo = createAction(
|
||||||
|
'[ucap::authentication::configuration] urlInfo',
|
||||||
|
props<{ req: UrlInfoRequest }>()
|
||||||
|
);
|
||||||
|
|
||||||
|
export const urlInfoSuccess = createAction(
|
||||||
|
'[ucap::authentication::configuration] urlInfo Success',
|
||||||
|
props<{ res: UrlInfoResponse }>()
|
||||||
|
);
|
||||||
|
|
||||||
|
export const urlInfoFailure = createAction(
|
||||||
|
'[ucap::authentication::configuration] urlInfo Failure',
|
||||||
|
props<{ error: any }>()
|
||||||
|
);
|
|
@ -0,0 +1,8 @@
|
||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
import { Actions } from '@ngrx/effects';
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class Effects {
|
||||||
|
constructor(private actions$: Actions) {}
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
import { createReducer, on } from '@ngrx/store';
|
||||||
|
import { initialState } from './state';
|
||||||
|
import { versionInfo2Success, urlInfoSuccess } from './actions';
|
||||||
|
|
||||||
|
export const reducer = createReducer(
|
||||||
|
initialState,
|
||||||
|
on(versionInfo2Success, (state, action) => {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
versionInfo2Response: {
|
||||||
|
...state.versionInfo2Response,
|
||||||
|
...action.res
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
on(urlInfoSuccess, (state, action) => {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
urlInfoResponse: {
|
||||||
|
...state.urlInfoResponse,
|
||||||
|
...action.res
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})
|
||||||
|
);
|
|
@ -0,0 +1,27 @@
|
||||||
|
import { Selector, createSelector } from '@ngrx/store';
|
||||||
|
|
||||||
|
import { VersionInfo2Response } from '@ucap/api-public';
|
||||||
|
import { UrlInfoResponse } from '@ucap/api-external';
|
||||||
|
|
||||||
|
export interface State {
|
||||||
|
versionInfo2Response: VersionInfo2Response | null;
|
||||||
|
urlInfoResponse: UrlInfoResponse | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const initialState: State = {
|
||||||
|
versionInfo2Response: null,
|
||||||
|
urlInfoResponse: null
|
||||||
|
};
|
||||||
|
|
||||||
|
export function selectors<S>(selector: Selector<any, State>) {
|
||||||
|
return {
|
||||||
|
versionInfo2Response: createSelector(
|
||||||
|
selector,
|
||||||
|
(state: State) => state.versionInfo2Response
|
||||||
|
),
|
||||||
|
urlInfoResponse: createSelector(
|
||||||
|
selector,
|
||||||
|
(state: State) => state.urlInfoResponse
|
||||||
|
)
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,11 +1,13 @@
|
||||||
import { Type } from '@angular/core';
|
import { Type } from '@angular/core';
|
||||||
|
|
||||||
import { Effects as CommonEffects } from './common/effects';
|
import { Effects as CommonEffects } from './common/effects';
|
||||||
|
import { Effects as ConfigurationEffects } from './configuration/effects';
|
||||||
import { Effects as LoginEffects } from './login/effects';
|
import { Effects as LoginEffects } from './login/effects';
|
||||||
import { Effects as AuthorizationEffects } from './authorization/effects';
|
import { Effects as AuthorizationEffects } from './authorization/effects';
|
||||||
|
|
||||||
export const effects: Type<any>[] = [
|
export const effects: Type<any>[] = [
|
||||||
CommonEffects,
|
CommonEffects,
|
||||||
|
ConfigurationEffects,
|
||||||
LoginEffects,
|
LoginEffects,
|
||||||
AuthorizationEffects
|
AuthorizationEffects
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
import { combineReducers, Action } from '@ngrx/store';
|
import { combineReducers, Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { reducer as CommonReducer } from './common/reducers';
|
import { reducer as CommonReducer } from './common/reducers';
|
||||||
|
import { reducer as ConfigurationReducer } from './configuration/reducers';
|
||||||
import { reducer as LoginReducer } from './login/reducers';
|
import { reducer as LoginReducer } from './login/reducers';
|
||||||
import { reducer as AuthorizationReducer } from './authorization/reducers';
|
import { reducer as AuthorizationReducer } from './authorization/reducers';
|
||||||
|
|
||||||
export function reducers(state: any | undefined, action: Action) {
|
export function reducers(state: any | undefined, action: Action) {
|
||||||
return combineReducers({
|
return combineReducers({
|
||||||
common: CommonReducer,
|
common: CommonReducer,
|
||||||
|
configuration: ConfigurationReducer,
|
||||||
login: LoginReducer,
|
login: LoginReducer,
|
||||||
authorization: AuthorizationReducer
|
authorization: AuthorizationReducer
|
||||||
})(state, action);
|
})(state, action);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { createFeatureSelector, createSelector } from '@ngrx/store';
|
import { createFeatureSelector, createSelector } from '@ngrx/store';
|
||||||
|
|
||||||
import * as CommonState from './common/state';
|
import * as CommonState from './common/state';
|
||||||
|
import * as ConfigurationState from './configuration/state';
|
||||||
import * as LoginState from './login/state';
|
import * as LoginState from './login/state';
|
||||||
import * as AuthorizationState from './authorization/state';
|
import * as AuthorizationState from './authorization/state';
|
||||||
|
|
||||||
|
@ -8,6 +9,7 @@ export const KEY_FEATURE = 'authentication';
|
||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
common: CommonState.State;
|
common: CommonState.State;
|
||||||
|
configuration: ConfigurationState.State;
|
||||||
login: LoginState.State;
|
login: LoginState.State;
|
||||||
authorization: AuthorizationState.State;
|
authorization: AuthorizationState.State;
|
||||||
}
|
}
|
||||||
|
@ -18,6 +20,10 @@ export const CommonSelector = CommonState.selectors(
|
||||||
createSelector(Selector, (state: State) => state.common)
|
createSelector(Selector, (state: State) => state.common)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const ConfigurationSelector = ConfigurationState.selectors(
|
||||||
|
createSelector(Selector, (state: State) => state.configuration)
|
||||||
|
);
|
||||||
|
|
||||||
export const LoginSelector = LoginState.selectors(
|
export const LoginSelector = LoginState.selectors(
|
||||||
createSelector(Selector, (state: State) => state.login)
|
createSelector(Selector, (state: State) => state.login)
|
||||||
);
|
);
|
||||||
|
|
|
@ -3,12 +3,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as CommonActions from './lib/store/common/actions';
|
import * as CommonActions from './lib/store/common/actions';
|
||||||
|
import * as ConfigurationActions from './lib/store/configuration/actions';
|
||||||
import * as LoginActions from './lib/store/login/actions';
|
import * as LoginActions from './lib/store/login/actions';
|
||||||
import * as AuthorizationActions from './lib/store/authorization/actions';
|
import * as AuthorizationActions from './lib/store/authorization/actions';
|
||||||
|
|
||||||
export * from './lib/config/module-config';
|
export * from './lib/config/module-config';
|
||||||
|
|
||||||
export { CommonActions, LoginActions, AuthorizationActions };
|
export {
|
||||||
|
CommonActions,
|
||||||
|
ConfigurationActions,
|
||||||
|
LoginActions,
|
||||||
|
AuthorizationActions
|
||||||
|
};
|
||||||
|
|
||||||
export * from './lib/store/state';
|
export * from './lib/store/state';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user