[AAE-10767] Separate core card view logic from content-services and add documentation to reflect the changes (#7952)

This commit is contained in:
Diogo Bastos
2022-12-16 15:28:36 +00:00
committed by GitHub
parent 8d074e8b33
commit 02578dcdc5
27 changed files with 487 additions and 65 deletions

View File

@@ -16,8 +16,9 @@
*/
import { Injectable } from '@angular/core';
import { AlfrescoApiService, CardViewUpdateService, NodesApiService } from '@alfresco/adf-core';
import { AlfrescoApiService, NodesApiService } from '@alfresco/adf-core';
import { DialogAspectListService } from './dialog-aspect-list.service';
import { CardViewContentUpdateService } from '../../services/card-view-content-update.service';
@Injectable({
providedIn: 'root'
@@ -27,14 +28,14 @@ export class NodeAspectService {
constructor(private alfrescoApiService: AlfrescoApiService,
private nodesApiService: NodesApiService,
private dialogAspectListService: DialogAspectListService,
private cardViewUpdateService: CardViewUpdateService) {
private cardViewContentUpdateService: CardViewContentUpdateService) {
}
updateNodeAspects(nodeId: string, selectorAutoFocusedOnClose?: string) {
this.dialogAspectListService.openAspectListDialog(nodeId, selectorAutoFocusedOnClose).subscribe((aspectList) => {
this.nodesApiService.updateNode(nodeId, { aspectNames: [...aspectList] }).subscribe((updatedNode) => {
this.alfrescoApiService.nodeUpdated.next(updatedNode);
this.cardViewUpdateService.updateNodeAspect(updatedNode);
this.cardViewContentUpdateService.updateNodeAspect(updatedNode);
});
});
}