mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-10777] Move services from Core in Content the right place (#8242)
Clean core services and directive
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AppExtensionService, ExtensionRef } from '@alfresco/adf-extensions';
|
||||
import { AuthenticationService, BpmProductVersionModel, DiscoveryApiService, RepositoryInfo } from '@alfresco/adf-core';
|
||||
import { AuthenticationService, BpmProductVersionModel, RepositoryInfo } from '@alfresco/adf-core';
|
||||
import { DiscoveryApiService } from '@alfresco/adf-content-services';
|
||||
import pkg from '../../../../../package.json';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@@ -34,32 +35,32 @@ export class AboutComponent implements OnInit {
|
||||
bpmVersion: BpmProductVersionModel = null;
|
||||
|
||||
constructor(
|
||||
private authService: AuthenticationService,
|
||||
private appExtensions: AppExtensionService,
|
||||
private discovery: DiscoveryApiService
|
||||
private authenticationService: AuthenticationService,
|
||||
private appExtensionService: AppExtensionService,
|
||||
private discoveryApiService: DiscoveryApiService
|
||||
) {
|
||||
this.pkg = pkg;
|
||||
this.extensions$ = this.appExtensions.references$;
|
||||
this.extensions$ = this.appExtensionService.references$;
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.authService.isEcmLoggedIn()) {
|
||||
if (this.authenticationService.isEcmLoggedIn()) {
|
||||
this.setECMInfo();
|
||||
}
|
||||
|
||||
if (this.authService.isBpmLoggedIn()) {
|
||||
if (this.authenticationService.isBpmLoggedIn()) {
|
||||
this.setBPMInfo();
|
||||
}
|
||||
}
|
||||
|
||||
setECMInfo() {
|
||||
this.discovery.getEcmProductInfo().subscribe((repository) => {
|
||||
this.discoveryApiService.getEcmProductInfo().subscribe((repository) => {
|
||||
this.repository = repository as RepositoryInfo;
|
||||
});
|
||||
}
|
||||
|
||||
setBPMInfo() {
|
||||
this.discovery.getBpmProductInfo().subscribe((bpmVersion) => {
|
||||
this.discoveryApiService.getBpmProductInfo().subscribe((bpmVersion) => {
|
||||
this.bpmVersion = bpmVersion;
|
||||
});
|
||||
}
|
||||
|
@@ -15,7 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AuthenticationService, BpmUserModel, BpmUserService, EcmUserModel, IdentityUserModel, IdentityUserService, PeopleContentService, UserInfoMode } from '@alfresco/adf-core';
|
||||
import { EcmUserModel, PeopleContentService } from '@alfresco/adf-content-services';
|
||||
import { BpmUserModel, PeopleProcessService } from '@alfresco/adf-process-services';
|
||||
import { AuthenticationService, IdentityUserModel, IdentityUserService, UserInfoMode } from '@alfresco/adf-core';
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { MenuPositionX, MenuPositionY } from '@angular/material/menu';
|
||||
import { Observable, of } from 'rxjs';
|
||||
@@ -42,7 +44,7 @@ export class UserInfoComponent implements OnInit {
|
||||
userInfoMode = UserInfoMode;
|
||||
|
||||
constructor(private peopleContentService: PeopleContentService,
|
||||
private bpmUserService: BpmUserService,
|
||||
private peopleProcessService: PeopleProcessService,
|
||||
private identityUserService: IdentityUserService,
|
||||
private authService: AuthenticationService) {
|
||||
}
|
||||
@@ -86,7 +88,7 @@ export class UserInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
private loadBpmUserInfo() {
|
||||
this.bpmUser$ = this.bpmUserService.getCurrentUserInfo();
|
||||
this.bpmUser$ = this.peopleProcessService.getCurrentUserInfo();
|
||||
}
|
||||
|
||||
private loadIdentityUserInfo() {
|
||||
|
@@ -26,7 +26,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { NodeEntry, Node } from '@alfresco/js-api';
|
||||
import { BehaviorSubject, Subject } from 'rxjs';
|
||||
import { NodesApiService } from '@alfresco/adf-core';
|
||||
import { NodesApiService } from '@alfresco/adf-content-services';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
|
@@ -17,14 +17,16 @@
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ActivatedRoute, Router, PRIMARY_OUTLET } from '@angular/router';
|
||||
import {
|
||||
NotificationService
|
||||
} from '@alfresco/adf-core';
|
||||
import {
|
||||
ContentService,
|
||||
AllowableOperationsEnum,
|
||||
PermissionsEnum,
|
||||
NodesApiService,
|
||||
FileUploadErrorEvent,
|
||||
NotificationService
|
||||
} from '@alfresco/adf-core';
|
||||
FileUploadErrorEvent
|
||||
} from '@alfresco/adf-content-services';
|
||||
import { PreviewService } from '../../services/preview.service';
|
||||
|
||||
@Component({
|
||||
|
@@ -45,11 +45,8 @@ import {
|
||||
AuthenticationService,
|
||||
AppConfigService,
|
||||
AppConfigValues,
|
||||
ContentService,
|
||||
FolderCreatedEvent,
|
||||
LogService,
|
||||
NotificationService,
|
||||
UploadService,
|
||||
DataRow,
|
||||
UserPreferencesService,
|
||||
PaginationComponent,
|
||||
@@ -57,12 +54,13 @@ import {
|
||||
DisplayMode,
|
||||
ShowHeaderMode,
|
||||
InfinitePaginationComponent,
|
||||
FormRenderingService,
|
||||
FileUploadEvent,
|
||||
NodesApiService
|
||||
FormRenderingService
|
||||
} from '@alfresco/adf-core';
|
||||
|
||||
import {
|
||||
ContentService,
|
||||
FolderCreatedEvent,
|
||||
UploadService,
|
||||
DocumentListComponent,
|
||||
PermissionStyleModel,
|
||||
UploadFilesEvent,
|
||||
@@ -71,6 +69,8 @@ import {
|
||||
ContentMetadataService,
|
||||
FilterSearch,
|
||||
DialogAspectListService,
|
||||
FileUploadEvent,
|
||||
NodesApiService,
|
||||
SharedLinksApiService
|
||||
} from '@alfresco/adf-content-services';
|
||||
|
||||
|
@@ -19,7 +19,8 @@ import { Component, Inject, ViewEncapsulation } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
|
||||
import { PreviewService } from '../../services/preview.service';
|
||||
import { FileUploadErrorEvent, NotificationService } from '@alfresco/adf-core';
|
||||
import { NotificationService } from '@alfresco/adf-core';
|
||||
import { FileUploadErrorEvent } from '@alfresco/adf-content-services';
|
||||
|
||||
@Component({
|
||||
templateUrl: './version-manager-dialog-adapter.component.html',
|
||||
|
@@ -18,7 +18,8 @@
|
||||
import { Component, Input, OnChanges, OnInit, ViewChild, OnDestroy } from '@angular/core';
|
||||
import { ProcessInstance, ProcessService ,
|
||||
ProcessAttachmentListComponent, ProcessUploadService } from '@alfresco/adf-process-services';
|
||||
import { UploadService, AlfrescoApiService, AppConfigService, DiscoveryApiService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core';
|
||||
import { UploadService, DiscoveryApiService } from '@alfresco/adf-content-services';
|
||||
import { PreviewService } from '../../services/preview.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
@@ -22,7 +22,8 @@ import {
|
||||
TaskUploadService,
|
||||
TaskDetailsModel
|
||||
} from '@alfresco/adf-process-services';
|
||||
import { UploadService, AlfrescoApiService, AppConfigService, DiscoveryApiService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core';
|
||||
import { UploadService, DiscoveryApiService } from '@alfresco/adf-content-services';
|
||||
import { PreviewService } from '../../services/preview.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
Reference in New Issue
Block a user