From c9ab2cee2fbb651e57f9b283ef3d0713eba0f7ac Mon Sep 17 00:00:00 2001
From: Giuseppe Digilio <giuseppe.digilio@4science.it>
Date: Fri, 9 Feb 2018 12:26:36 +0100
Subject: [PATCH] Grouped shared services into a directory

---
 .../search-filter/search-filter.component.ts              | 2 +-
 .../search-filters/search-filter/search-filter.service.ts | 2 +-
 .../+search-page/search-service/search.service.spec.ts    | 2 +-
 src/app/+search-page/search-service/search.service.ts     | 2 +-
 src/app/app.component.spec.ts                             | 2 +-
 src/app/app.component.ts                                  | 2 +-
 src/app/core/core.module.ts                               | 8 ++++----
 src/app/pagenotfound/pagenotfound.component.ts            | 2 +-
 src/app/shared/{ => services}/api.service.ts              | 0
 src/app/shared/{ => services}/platform.service.spec.ts    | 0
 src/app/shared/{ => services}/platform.service.ts         | 0
 src/app/shared/{ => services}/route.service.spec.ts       | 0
 src/app/shared/{ => services}/route.service.ts            | 2 +-
 src/app/shared/{ => services}/server-response.service.ts  | 0
 src/app/shared/{ => services}/window.service.ts           | 0
 .../view-mode-switch/view-mode-switch.component.spec.ts   | 2 +-
 16 files changed, 13 insertions(+), 13 deletions(-)
 rename src/app/shared/{ => services}/api.service.ts (100%)
 rename src/app/shared/{ => services}/platform.service.spec.ts (100%)
 rename src/app/shared/{ => services}/platform.service.ts (100%)
 rename src/app/shared/{ => services}/route.service.spec.ts (100%)
 rename src/app/shared/{ => services}/route.service.ts (97%)
 rename src/app/shared/{ => services}/server-response.service.ts (100%)
 rename src/app/shared/{ => services}/window.service.ts (100%)

diff --git a/src/app/+search-page/search-filters/search-filter/search-filter.component.ts b/src/app/+search-page/search-filters/search-filter/search-filter.component.ts
index 08d72da984..c1f8e96c29 100644
--- a/src/app/+search-page/search-filters/search-filter/search-filter.component.ts
+++ b/src/app/+search-page/search-filters/search-filter/search-filter.component.ts
@@ -6,7 +6,7 @@ import { FacetValue } from '../../search-service/facet-value.model';
 import { SearchFilterService } from './search-filter.service';
 import { Observable } from 'rxjs/Observable';
 import { slide } from '../../../shared/animations/slide';
-import { RouteService } from '../../../shared/route.service';
+import { RouteService } from '../../../shared/services/route.service';
 import { first } from 'rxjs/operator/first';
 
 /**
diff --git a/src/app/+search-page/search-filters/search-filter/search-filter.service.ts b/src/app/+search-page/search-filters/search-filter/search-filter.service.ts
index f3efc19b86..81ed2ba324 100644
--- a/src/app/+search-page/search-filters/search-filter/search-filter.service.ts
+++ b/src/app/+search-page/search-filters/search-filter/search-filter.service.ts
@@ -13,7 +13,7 @@ import {
 import { hasValue, } from '../../../shared/empty.util';
 import { SearchFilterConfig } from '../../search-service/search-filter-config.model';
 import { SearchService } from '../../search-service/search.service';
-import { RouteService } from '../../../shared/route.service';
+import { RouteService } from '../../../shared/services/route.service';
 
 const filterStateSelector = (state: SearchFiltersState) => state.searchFilter;
 
diff --git a/src/app/+search-page/search-service/search.service.spec.ts b/src/app/+search-page/search-service/search.service.spec.ts
index 65af3231f9..6620c1234c 100644
--- a/src/app/+search-page/search-service/search.service.spec.ts
+++ b/src/app/+search-page/search-service/search.service.spec.ts
@@ -7,7 +7,7 @@ import { Component } from '@angular/core';
 import { SearchService } from './search.service';
 import { ItemDataService } from './../../core/data/item-data.service';
 import { ViewMode } from '../../+search-page/search-options.model';
-import { RouteService } from '../../shared/route.service';
+import { RouteService } from '../../shared/services/route.service';
 
 @Component({ template: '' })
 class DummyComponent { }
diff --git a/src/app/+search-page/search-service/search.service.ts b/src/app/+search-page/search-service/search.service.ts
index c70fe22ce0..216e171dd0 100644
--- a/src/app/+search-page/search-service/search.service.ts
+++ b/src/app/+search-page/search-service/search.service.ts
@@ -13,7 +13,7 @@ import { PageInfo } from '../../core/shared/page-info.model';
 import { hasValue, isNotEmpty } from '../../shared/empty.util';
 import { ItemSearchResult } from '../../shared/object-collection/shared/item-search-result.model';
 import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
-import { RouteService } from '../../shared/route.service';
+import { RouteService } from '../../shared/services/route.service';
 import { SearchOptions } from '../search-options.model';
 import { SearchResult } from '../search-result.model';
 import { FacetValue } from './facet-value.model';
diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts
index 5c77b34549..327da7d9f6 100644
--- a/src/app/app.component.spec.ts
+++ b/src/app/app.component.spec.ts
@@ -26,7 +26,7 @@ import { HostWindowResizeAction } from './shared/host-window.actions';
 import { MetadataService } from './core/metadata/metadata.service';
 
 import { GLOBAL_CONFIG, ENV_CONFIG } from '../config';
-import { NativeWindowRef, NativeWindowService } from './shared/window.service';
+import { NativeWindowRef, NativeWindowService } from './shared/services/window.service';
 
 import { MockTranslateLoader } from './shared/mocks/mock-translate-loader';
 import { MockMetadataService } from './shared/mocks/mock-metadata-service';
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 25bdde2d23..9098f7ca51 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -16,7 +16,7 @@ import { GLOBAL_CONFIG, GlobalConfig } from '../config';
 import { MetadataService } from './core/metadata/metadata.service';
 import { HostWindowResizeAction } from './shared/host-window.actions';
 import { HostWindowState } from './shared/host-window.reducer';
-import { NativeWindowRef, NativeWindowService } from './shared/window.service';
+import { NativeWindowRef, NativeWindowService } from './shared/services/window.service';
 
 @Component({
   selector: 'ds-app',
diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts
index 63f0165b06..638aa4c4a5 100644
--- a/src/app/core/core.module.ts
+++ b/src/app/core/core.module.ts
@@ -14,7 +14,7 @@ import { coreReducers } from './core.reducers';
 
 import { isNotEmpty } from '../shared/empty.util';
 
-import { ApiService } from '../shared/api.service';
+import { ApiService } from '../shared/services/api.service';
 import { CollectionDataService } from './data/collection-data.service';
 import { CommunityDataService } from './data/community-data.service';
 import { DSOResponseParsingService } from './data/dso-response-parsing.service';
@@ -28,12 +28,12 @@ import { RemoteDataBuildService } from './cache/builders/remote-data-build.servi
 import { RequestService } from './data/request.service';
 import { ResponseCacheService } from './cache/response-cache.service';
 import { RootResponseParsingService } from './data/root-response-parsing.service';
-import { ServerResponseService } from '../shared/server-response.service';
-import { NativeWindowFactory, NativeWindowService } from '../shared/window.service';
+import { ServerResponseService } from '../shared/services/server-response.service';
+import { NativeWindowFactory, NativeWindowService } from '../shared/services/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 { RouteService } from '../shared/services/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';
diff --git a/src/app/pagenotfound/pagenotfound.component.ts b/src/app/pagenotfound/pagenotfound.component.ts
index bd119a4de9..e7923b3466 100644
--- a/src/app/pagenotfound/pagenotfound.component.ts
+++ b/src/app/pagenotfound/pagenotfound.component.ts
@@ -1,4 +1,4 @@
-import { ServerResponseService } from '../shared/server-response.service';
+import { ServerResponseService } from '../shared/services/server-response.service';
 import { Component, ChangeDetectionStrategy } from '@angular/core';
 
 @Component({
diff --git a/src/app/shared/api.service.ts b/src/app/shared/services/api.service.ts
similarity index 100%
rename from src/app/shared/api.service.ts
rename to src/app/shared/services/api.service.ts
diff --git a/src/app/shared/platform.service.spec.ts b/src/app/shared/services/platform.service.spec.ts
similarity index 100%
rename from src/app/shared/platform.service.spec.ts
rename to src/app/shared/services/platform.service.spec.ts
diff --git a/src/app/shared/platform.service.ts b/src/app/shared/services/platform.service.ts
similarity index 100%
rename from src/app/shared/platform.service.ts
rename to src/app/shared/services/platform.service.ts
diff --git a/src/app/shared/route.service.spec.ts b/src/app/shared/services/route.service.spec.ts
similarity index 100%
rename from src/app/shared/route.service.spec.ts
rename to src/app/shared/services/route.service.spec.ts
diff --git a/src/app/shared/route.service.ts b/src/app/shared/services/route.service.ts
similarity index 97%
rename from src/app/shared/route.service.ts
rename to src/app/shared/services/route.service.ts
index f24fa0d00d..e7e701255e 100644
--- a/src/app/shared/route.service.ts
+++ b/src/app/shared/services/route.service.ts
@@ -1,7 +1,7 @@
 import { Injectable } from '@angular/core';
 import { Observable } from 'rxjs/Observable';
 import { ActivatedRoute, convertToParamMap, Params, } from '@angular/router';
-import { isNotEmpty } from './empty.util';
+import { isNotEmpty } from '../empty.util';
 
 @Injectable()
 export class RouteService {
diff --git a/src/app/shared/server-response.service.ts b/src/app/shared/services/server-response.service.ts
similarity index 100%
rename from src/app/shared/server-response.service.ts
rename to src/app/shared/services/server-response.service.ts
diff --git a/src/app/shared/window.service.ts b/src/app/shared/services/window.service.ts
similarity index 100%
rename from src/app/shared/window.service.ts
rename to src/app/shared/services/window.service.ts
diff --git a/src/app/shared/view-mode-switch/view-mode-switch.component.spec.ts b/src/app/shared/view-mode-switch/view-mode-switch.component.spec.ts
index 541b1ed4c3..61ab3de634 100644
--- a/src/app/shared/view-mode-switch/view-mode-switch.component.spec.ts
+++ b/src/app/shared/view-mode-switch/view-mode-switch.component.spec.ts
@@ -10,7 +10,7 @@ import { SearchService } from '../../+search-page/search-service/search.service'
 import { ItemDataService } from './../../core/data/item-data.service';
 import { ViewModeSwitchComponent } from './view-mode-switch.component';
 import { ViewMode } from '../../+search-page/search-options.model';
-import { RouteService } from '../route.service';
+import { RouteService } from '../services/route.service';
 
 @Component({ template: '' })
 class DummyComponent { }
-- 
GitLab