2019-01-18 18:03:45 +01:00
|
|
|
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
|
|
|
|
import { CookieService } from 'ngx-cookie-service';
|
|
|
|
import { AuthGuard } from './auth-guard.service';
|
|
|
|
import { AuthService } from './services/auth/auth.service';
|
|
|
|
import { CultureService } from './services/culture/culture-service';
|
|
|
|
import { DashboardService } from './services/dashboard/dashboard.service';
|
|
|
|
import { DatasetProfileService } from './services/dataset-profile/dataset-profile.service';
|
|
|
|
import { DatasetWizardService } from './services/dataset-wizard/dataset-wizard.service';
|
2019-01-21 12:14:20 +01:00
|
|
|
import { DatasetExternalAutocompleteService } from './services/dataset/dataset-external-autocomplete.service';
|
2019-01-18 18:03:45 +01:00
|
|
|
import { DatasetService } from './services/dataset/dataset.service';
|
|
|
|
import { DmpInvitationService } from './services/dmp/dmp-invitation.service';
|
|
|
|
import { DmpProfileService } from './services/dmp/dmp-profile.service';
|
|
|
|
import { DmpService } from './services/dmp/dmp.service';
|
|
|
|
import { ExternalDataRepositoryService } from './services/external-sources/data-repository/extternal-data-repository.service';
|
|
|
|
import { ExternalDatasetService } from './services/external-sources/dataset/external-dataset.service';
|
|
|
|
import { ExternalSourcesConfigurationService } from './services/external-sources/external-sources-configuration.service';
|
|
|
|
import { ExternalSourcesService } from './services/external-sources/external-sources.service';
|
|
|
|
import { ExternalRegistryService } from './services/external-sources/registry/external-registry.service';
|
|
|
|
import { ExternalResearcherService } from './services/external-sources/researcher/external-researcher.service';
|
|
|
|
import { ExternalServiceService } from './services/external-sources/service/external-service.service';
|
|
|
|
import { BaseHttpService } from './services/http/base-http.service';
|
|
|
|
import { LoggingService } from './services/logging/logging-service';
|
|
|
|
import { UiNotificationService } from './services/notification/ui-notification-service';
|
|
|
|
import { ProgressIndicationService } from './services/progress-indication/progress-indication-service';
|
2019-08-01 09:54:40 +02:00
|
|
|
import { GrantFileUploadService } from './services/grant/grant-file-upload.service';
|
|
|
|
import { GrantService } from './services/grant/grant.service';
|
2019-08-20 17:32:42 +02:00
|
|
|
import { ProjectService } from './services/project/project.service';
|
2019-01-18 18:03:45 +01:00
|
|
|
import { SearchBarService } from './services/search-bar/search-bar.service';
|
|
|
|
import { TimezoneService } from './services/timezone/timezone-service';
|
|
|
|
import { UserService } from './services/user/user.service';
|
|
|
|
import { CollectionUtils } from './services/utilities/collection-utils.service';
|
|
|
|
import { TypeUtils } from './services/utilities/type-utils.service';
|
2019-03-01 16:15:25 +01:00
|
|
|
import { QuickWizardService } from './services/quick-wizard/quick-wizard.service';
|
2019-05-10 10:33:48 +02:00
|
|
|
import { OrganisationService } from './services/organisation/organisation.service';
|
2019-07-12 16:12:16 +02:00
|
|
|
import { EmailConfirmationService } from './services/email-confirmation/email-confirmation.service';
|
2019-08-20 17:32:42 +02:00
|
|
|
import { FunderService } from './services/funder/funder.service';
|
2019-08-23 09:04:20 +02:00
|
|
|
import { ContactSupportService } from './services/contact-support/contact-support.service';
|
2019-01-18 18:03:45 +01:00
|
|
|
//
|
|
|
|
//
|
|
|
|
// This is shared module that provides all the services. Its imported only once on the AppModule.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
})
|
|
|
|
export class CoreServiceModule {
|
|
|
|
constructor(@Optional() @SkipSelf() parentModule: CoreServiceModule) {
|
|
|
|
if (parentModule) {
|
|
|
|
throw new Error(
|
|
|
|
'CoreModule is already loaded. Import it in the AppModule only');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
static forRoot(): ModuleWithProviders {
|
|
|
|
return {
|
|
|
|
ngModule: CoreServiceModule,
|
|
|
|
providers: [
|
|
|
|
AuthService,
|
|
|
|
CookieService,
|
|
|
|
BaseHttpService,
|
|
|
|
AuthGuard,
|
|
|
|
CultureService,
|
|
|
|
TimezoneService,
|
|
|
|
TypeUtils,
|
|
|
|
CollectionUtils,
|
|
|
|
UiNotificationService,
|
|
|
|
ProgressIndicationService,
|
|
|
|
LoggingService,
|
|
|
|
SearchBarService,
|
|
|
|
DashboardService,
|
2019-08-01 09:54:40 +02:00
|
|
|
GrantService,
|
2019-08-20 17:32:42 +02:00
|
|
|
ProjectService,
|
|
|
|
FunderService,
|
2019-08-01 09:54:40 +02:00
|
|
|
GrantFileUploadService,
|
2019-01-18 18:03:45 +01:00
|
|
|
DmpService,
|
|
|
|
DmpProfileService,
|
|
|
|
ExternalSourcesService,
|
|
|
|
ExternalSourcesConfigurationService,
|
|
|
|
DatasetService,
|
|
|
|
DatasetWizardService,
|
|
|
|
ExternalDatasetService,
|
|
|
|
ExternalDataRepositoryService,
|
|
|
|
ExternalRegistryService,
|
|
|
|
ExternalResearcherService,
|
|
|
|
ExternalServiceService,
|
|
|
|
DatasetProfileService,
|
|
|
|
UserService,
|
2019-01-21 12:14:20 +01:00
|
|
|
DmpInvitationService,
|
2019-03-01 16:15:25 +01:00
|
|
|
DatasetExternalAutocompleteService,
|
2019-03-05 11:20:10 +01:00
|
|
|
QuickWizardService,
|
2019-07-12 16:12:16 +02:00
|
|
|
OrganisationService,
|
2019-08-23 09:04:20 +02:00
|
|
|
EmailConfirmationService,
|
|
|
|
ContactSupportService
|
2019-01-18 18:03:45 +01:00
|
|
|
],
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|