mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00

# Conflicts: # src/app/app.reducer.ts # src/app/core/core.module.ts # src/app/shared/shared.module.ts
143 lines
5.0 KiB
TypeScript
143 lines
5.0 KiB
TypeScript
import {
|
|
NgModule,
|
|
Optional,
|
|
SkipSelf,
|
|
ModuleWithProviders
|
|
} from '@angular/core';
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
import { StoreModule } from '@ngrx/store';
|
|
import { EffectsModule } from '@ngrx/effects';
|
|
import { DynamicFormLayoutService, DynamicFormService, DynamicFormValidationService } from '@ng-dynamic-forms/core';
|
|
|
|
import { coreEffects } from './core.effects';
|
|
import { coreReducers } from './core.reducers';
|
|
|
|
import { isNotEmpty } from '../shared/empty.util';
|
|
|
|
import { ApiService } from '../shared/api.service';
|
|
import { CollectionDataService } from './data/collection-data.service';
|
|
import { CommunityDataService } from './data/community-data.service';
|
|
import { DebugResponseParsingService } from './data/debug-response-parsing.service';
|
|
import { DSOResponseParsingService } from './data/dso-response-parsing.service';
|
|
import { SearchResponseParsingService } from './data/search-response-parsing.service';
|
|
import { DSpaceRESTv2Service } from './dspace-rest-v2/dspace-rest-v2.service';
|
|
import { FormBuilderService } from '../shared/form/builder/form-builder.service';
|
|
import { FormService } from '../shared/form/form.service';
|
|
import { HostWindowService } from '../shared/host-window.service';
|
|
import { ItemDataService } from './data/item-data.service';
|
|
import { MetadataService } from './metadata/metadata.service';
|
|
import { ObjectCacheService } from './cache/object-cache.service';
|
|
import { PaginationComponentOptions } from '../shared/pagination/pagination-component-options.model';
|
|
import { RemoteDataBuildService } from './cache/builders/remote-data-build.service';
|
|
import { RequestService } from './data/request.service';
|
|
import { ResponseCacheService } from './cache/response-cache.service';
|
|
import { EndpointMapResponseParsingService } from './data/endpoint-map-response-parsing.service';
|
|
import { ServerResponseService } from '../shared/server-response.service';
|
|
import { NativeWindowFactory, NativeWindowService } from '../shared/window.service';
|
|
import { BrowseService } from './browse/browse.service';
|
|
import { BrowseResponseParsingService } from './data/browse-response-parsing.service';
|
|
import { ConfigResponseParsingService } from './data/config-response-parsing.service';
|
|
import { RouteService } from '../shared/route.service';
|
|
import { SubmissionDefinitionsConfigService } from './config/submission-definitions-config.service';
|
|
import { SubmissionFormsConfigService } from './config/submission-forms-config.service';
|
|
import { SubmissionSectionsConfigService } from './config/submission-sections-config.service';
|
|
import { AuthorityService } from './integration/authority.service';
|
|
import { IntegrationResponseParsingService } from './integration/integration-response-parsing.service';
|
|
import { UUIDService } from './shared/uuid.service';
|
|
import { HALEndpointService } from './shared/hal-endpoint.service';
|
|
import { FacetValueResponseParsingService } from './data/facet-value-response-parsing.service';
|
|
import { FacetValueMapResponseParsingService } from './data/facet-value-map-response-parsing.service';
|
|
import { FacetConfigResponseParsingService } from './data/facet-config-response-parsing.service';
|
|
import { NotificationsService } from '../shared/notifications/notifications.service';
|
|
import { UploaderService } from '../shared/uploader/uploader.service';
|
|
|
|
const IMPORTS = [
|
|
CommonModule,
|
|
StoreModule.forFeature('core', coreReducers, {}),
|
|
EffectsModule.forFeature(coreEffects)
|
|
];
|
|
|
|
const DECLARATIONS = [
|
|
|
|
];
|
|
|
|
const EXPORTS = [
|
|
|
|
];
|
|
|
|
const PROVIDERS = [
|
|
ApiService,
|
|
CommunityDataService,
|
|
CollectionDataService,
|
|
DSOResponseParsingService,
|
|
DSpaceRESTv2Service,
|
|
DynamicFormLayoutService,
|
|
DynamicFormService,
|
|
DynamicFormValidationService,
|
|
FormBuilderService,
|
|
FormService,
|
|
HALEndpointService,
|
|
HostWindowService,
|
|
ItemDataService,
|
|
MetadataService,
|
|
ObjectCacheService,
|
|
PaginationComponentOptions,
|
|
RemoteDataBuildService,
|
|
RequestService,
|
|
ResponseCacheService,
|
|
EndpointMapResponseParsingService,
|
|
FacetValueResponseParsingService,
|
|
FacetValueMapResponseParsingService,
|
|
FacetConfigResponseParsingService,
|
|
DebugResponseParsingService,
|
|
SearchResponseParsingService,
|
|
ServerResponseService,
|
|
BrowseResponseParsingService,
|
|
BrowseService,
|
|
ConfigResponseParsingService,
|
|
RouteService,
|
|
SubmissionDefinitionsConfigService,
|
|
SubmissionFormsConfigService,
|
|
SubmissionSectionsConfigService,
|
|
AuthorityService,
|
|
IntegrationResponseParsingService,
|
|
UploaderService,
|
|
UUIDService,
|
|
NotificationsService,
|
|
{ provide: NativeWindowService, useFactory: NativeWindowFactory }
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [
|
|
...IMPORTS
|
|
],
|
|
declarations: [
|
|
...DECLARATIONS
|
|
],
|
|
exports: [
|
|
...EXPORTS
|
|
],
|
|
providers: [
|
|
...PROVIDERS
|
|
]
|
|
})
|
|
export class CoreModule {
|
|
|
|
static forRoot(): ModuleWithProviders {
|
|
return {
|
|
ngModule: CoreModule,
|
|
providers: [
|
|
...PROVIDERS
|
|
]
|
|
};
|
|
}
|
|
|
|
constructor( @Optional() @SkipSelf() parentModule: CoreModule) {
|
|
if (isNotEmpty(parentModule)) {
|
|
throw new Error('CoreModule is already loaded. Import it in the AppModule only');
|
|
}
|
|
}
|
|
|
|
}
|