Merge branch 'master' into w2p-58789_Metadata-Registry-UI-Part-2

Conflicts:
	src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.ts
	src/app/+community-page/community-page.component.html
	src/app/app.reducer.ts
	src/app/core/auth/server-auth.service.ts
	src/app/core/core.module.ts
	src/app/core/data/item-data.service.spec.ts
	src/app/core/data/item-data.service.ts
	src/app/core/index/index.effects.ts
	src/app/core/index/index.reducer.spec.ts
	src/app/core/index/index.reducer.ts
	src/app/core/shared/operators.spec.ts
	src/app/core/shared/operators.ts
	src/app/header/header.component.spec.ts
This commit is contained in:
Kristof De Langhe
2019-01-24 13:18:20 +01:00
179 changed files with 7578 additions and 1989 deletions

View File

@@ -1,7 +1,5 @@
import { ActionReducerMap } from '@ngrx/store';
import { ActionReducerMap, createSelector, MemoizedSelector } from '@ngrx/store';
import * as fromRouter from '@ngrx/router-store';
import { headerReducer, HeaderState } from './header/header.reducer';
import { hostWindowReducer, HostWindowState } from './shared/host-window.reducer';
import { formReducer, FormState } from './shared/form/form.reducer';
import {
@@ -12,35 +10,53 @@ import {
filterReducer,
SearchFiltersState
} from './+search-page/search-filters/search-filter/search-filter.reducer';
import { notificationsReducer, NotificationsState } from './shared/notifications/notifications.reducers';
import {
notificationsReducer,
NotificationsState
} from './shared/notifications/notifications.reducers';
import { truncatableReducer, TruncatablesState } from './shared/truncatable/truncatable.reducer';
import {
metadataRegistryReducer,
MetadataRegistryState
} from './+admin/admin-registries/metadata-registry/metadata-registry.reducers';
import { hasValue } from './shared/empty.util';
import { cssVariablesReducer, CSSVariablesState } from './shared/sass-helper/sass-helper.reducer';
import { menusReducer, MenusState } from './shared/menu/menu.reducer';
export interface AppState {
router: fromRouter.RouterReducerState;
hostWindow: HostWindowState;
header: HeaderState;
forms: FormState;
metadataRegistry: MetadataRegistryState;
notifications: NotificationsState;
searchSidebar: SearchSidebarState;
searchFilter: SearchFiltersState;
truncatable: TruncatablesState;
cssVariables: CSSVariablesState;
menus: MenusState;
}
export const appReducers: ActionReducerMap<AppState> = {
router: fromRouter.routerReducer,
hostWindow: hostWindowReducer,
header: headerReducer,
forms: formReducer,
metadataRegistry: metadataRegistryReducer,
notifications: notificationsReducer,
searchSidebar: sidebarReducer,
searchFilter: filterReducer,
truncatable: truncatableReducer
truncatable: truncatableReducer,
cssVariables: cssVariablesReducer,
menus: menusReducer,
};
export const routerStateSelector = (state: AppState) => state.router;
export function keySelector<T>(key: string, selector): MemoizedSelector<AppState, T> {
return createSelector(selector, (state) => {
if (hasValue(state)) {
return state[key];
} else {
return undefined;
}
});
}