mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
move nodeupdate in nodeapiservice (#2860)
* move nodeupdate in nodeapiservice * [ci:force][auto-commit] Update @alfresco/adf-testing to 6.0.0-A.1-37577 for branch: update-alfresco-dependencies originated from @alfresco/adf-testing PR: 37578f # Conflicts: # package-lock.json # package.json * fix lint * fix compiler issue
This commit is contained in:
parent
ffc00b44cc
commit
8ba18bb6dc
31
package-lock.json
generated
31
package-lock.json
generated
@ -11,9 +11,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@alfresco/adf-cli": {
|
"@alfresco/adf-cli": {
|
||||||
"version": "6.0.0-A.1-37541",
|
"version": "6.0.0-A.1-37577",
|
||||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-6.0.0-A.1-37541.tgz",
|
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-6.0.0-A.1-37577.tgz",
|
||||||
"integrity": "sha512-SgHe43OYsjG5lqogX5DAW2f9uXjQE4Ed67Yi3bJFWTVm3BXLYCskrmb7ii5qu9V5c+ZDzcQZ2gnHZkHgKnYvFA==",
|
"integrity": "sha512-gq5Jqvw1VLINbCWeDzAZ4H9oVuqlj5bf/84atcYHZHdXSzW31c3f4+RdlORi9OjsV8sb+dLKJdrpT4JEDRgmIQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@alfresco/js-api": "5.2.0",
|
"@alfresco/js-api": "5.2.0",
|
||||||
@ -42,17 +42,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@alfresco/adf-content-services": {
|
"@alfresco/adf-content-services": {
|
||||||
"version": "6.0.0-A.1-37541",
|
"version": "6.0.0-A.1-37577",
|
||||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-6.0.0-A.1-37541.tgz",
|
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-6.0.0-A.1-37577.tgz",
|
||||||
"integrity": "sha512-yoCluaQSNiphj2J1BkXzbSZKV6ZhTihUdshjYin26p9kA7J2JryH9jkF11mgAtjMyMH4ph5UaIS3RKfGG7IRmA==",
|
"integrity": "sha512-twqen+rHlbnWV88/MnGvT9kiJEf3mPpUtE8AakDKWpbFzIMIZoChmj56zd9/i5ysjS2PLQ06fbz2xGBRgqbZeQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^2.3.0"
|
"tslib": "^2.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@alfresco/adf-core": {
|
"@alfresco/adf-core": {
|
||||||
"version": "6.0.0-A.1-37541",
|
"version": "6.0.0-A.1-37577",
|
||||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-6.0.0-A.1-37541.tgz",
|
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-6.0.0-A.1-37577.tgz",
|
||||||
"integrity": "sha512-lHK85RPsjGsV4As9QR78hyDS1q7YxDM6uwKAm6OyaGELHKzJEl5LiI3weIj0pMErqnJZ0c1L0WWYVJ+Kv/obzg==",
|
"integrity": "sha512-33RL5ImndbUMf/n0/XrrSjfEaTig7f+iBHbvRrpeB5eJ25zYpgLkxoPIcn0ld0JbckQwOP3jbozvlodEURBGIA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@editorjs/code": "2.7.0",
|
"@editorjs/code": "2.7.0",
|
||||||
"@editorjs/editorjs": "2.25.0",
|
"@editorjs/editorjs": "2.25.0",
|
||||||
@ -70,24 +70,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@alfresco/adf-extensions": {
|
"@alfresco/adf-extensions": {
|
||||||
"version": "6.0.0-A.1-37541",
|
"version": "6.0.0-A.1-37577",
|
||||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-6.0.0-A.1-37541.tgz",
|
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-6.0.0-A.1-37577.tgz",
|
||||||
"integrity": "sha512-skS3mpirsLwNuWHOgoOmCReDvuGNvCbFbS/ujasiRjHFuAoRLySi9awp146TNQxbT3i5vitea0nho1zaK6o8Rg==",
|
"integrity": "sha512-A/oSSE+aD/2CaZeqK/DyaOKQp5qBm4qr7S/MfY1c0KWACam+ZikLJ0j6IajBlIwPXu/D7aDKhIPXJOiaTGbxBw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^2.3.0"
|
"tslib": "^2.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@alfresco/adf-testing": {
|
"@alfresco/adf-testing": {
|
||||||
"version": "6.0.0-A.1-37541",
|
"version": "6.0.0-A.1-37577",
|
||||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-6.0.0-A.1-37541.tgz",
|
"resolved": "https://registry.npmjs.org/@alfresco/adf-testing/-/adf-testing-6.0.0-A.1-37577.tgz",
|
||||||
"integrity": "sha512-Mx59rjw+S1tRVKRR5+33lLCtLXVXRWEabzbO9wH7xuf561cGK3y4oquLNUFdIMqFcZYe8P+Qsu6OMjKmlZsV2w==",
|
"integrity": "sha512-dKmVNayPWi+klX3qUQFP6H0MbteQZnO1K/3V+dN8Ps3ITaY6ynFwb6yLjoed58mFXNyHtgApneVtfR9cS2JWVQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@alfresco/js-api": "5.3.0-492",
|
"@alfresco/js-api": "5.3.0-492",
|
||||||
"@angular/compiler": "14.1.3",
|
"@angular/compiler": "14.1.3",
|
||||||
"@angular/core": "14.1.3",
|
"@angular/core": "14.1.3",
|
||||||
"rxjs": "6.6.6",
|
"rxjs": "6.6.6",
|
||||||
"tslib": "^2.4.1",
|
|
||||||
"zone.js": "~0.11.4"
|
"zone.js": "~0.11.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
10
package.json
10
package.json
@ -26,9 +26,9 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alfresco/adf-content-services": "6.0.0-A.1-37541",
|
"@alfresco/adf-content-services": "6.0.0-A.1-37577",
|
||||||
"@alfresco/adf-core": "6.0.0-A.1-37541",
|
"@alfresco/adf-core": "6.0.0-A.1-37577",
|
||||||
"@alfresco/adf-extensions": "6.0.0-A.1-37541",
|
"@alfresco/adf-extensions": "6.0.0-A.1-37577",
|
||||||
"@alfresco/js-api": "5.3.0-492",
|
"@alfresco/js-api": "5.3.0-492",
|
||||||
"@angular/animations": "14.1.2",
|
"@angular/animations": "14.1.2",
|
||||||
"@angular/cdk": "14.1.2",
|
"@angular/cdk": "14.1.2",
|
||||||
@ -58,8 +58,8 @@
|
|||||||
"zone.js": "0.11.8"
|
"zone.js": "0.11.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@alfresco/adf-cli": "6.0.0-A.1-37541",
|
"@alfresco/adf-cli": "6.0.0-A.1-37577",
|
||||||
"@alfresco/adf-testing": "6.0.0-A.1-37541",
|
"@alfresco/adf-testing": "6.0.0-A.1-37577",
|
||||||
"@angular-custom-builders/lite-serve": "^0.2.3",
|
"@angular-custom-builders/lite-serve": "^0.2.3",
|
||||||
"@angular-devkit/build-angular": "14.1.2",
|
"@angular-devkit/build-angular": "14.1.2",
|
||||||
"@angular-eslint/builder": "^14.1.2",
|
"@angular-eslint/builder": "^14.1.2",
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NameColumnComponent } from '@alfresco/adf-content-services';
|
import { NameColumnComponent } from '@alfresco/adf-content-services';
|
||||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
import { NodesApiService } from '@alfresco/adf-core';
|
||||||
import { ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
import { ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { Actions, ofType } from '@ngrx/effects';
|
import { Actions, ofType } from '@ngrx/effects';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
@ -44,14 +44,14 @@ import { isLocked } from '@alfresco/aca-shared';
|
|||||||
export class CustomNameColumnComponent extends NameColumnComponent implements OnInit, OnDestroy {
|
export class CustomNameColumnComponent extends NameColumnComponent implements OnInit, OnDestroy {
|
||||||
private onDestroy$$ = new Subject<boolean>();
|
private onDestroy$$ = new Subject<boolean>();
|
||||||
|
|
||||||
constructor(element: ElementRef, private cd: ChangeDetectorRef, private actions$: Actions, private apiService: AlfrescoApiService) {
|
constructor(element: ElementRef, private cd: ChangeDetectorRef, private actions$: Actions, private nodesService: NodesApiService) {
|
||||||
super(element, apiService);
|
super(element, nodesService);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.updateValue();
|
this.updateValue();
|
||||||
|
|
||||||
this.apiService.nodeUpdated.pipe(takeUntil(this.onDestroy$$)).subscribe((node: any) => {
|
this.nodesService.nodeUpdated.pipe(takeUntil(this.onDestroy$$)).subscribe((node: any) => {
|
||||||
const row = this.context.row;
|
const row = this.context.row;
|
||||||
if (row) {
|
if (row) {
|
||||||
const { entry } = row.node;
|
const { entry } = row.node;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
import { Router, ActivatedRoute } from '@angular/router';
|
import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import { TestBed, ComponentFixture, fakeAsync, tick } from '@angular/core/testing';
|
import { TestBed, ComponentFixture, fakeAsync, tick } from '@angular/core/testing';
|
||||||
import { UserPreferencesService, UploadService, AlfrescoApiService } from '@alfresco/adf-core';
|
import { UserPreferencesService, UploadService, NodesApiService } from '@alfresco/adf-core';
|
||||||
import { ClosePreviewAction } from '@alfresco/aca-shared/store';
|
import { ClosePreviewAction } from '@alfresco/aca-shared/store';
|
||||||
import { PreviewComponent } from './preview.component';
|
import { PreviewComponent } from './preview.component';
|
||||||
import { of, throwError } from 'rxjs';
|
import { of, throwError } from 'rxjs';
|
||||||
@ -45,7 +45,7 @@ describe('PreviewComponent', () => {
|
|||||||
let preferences: UserPreferencesService;
|
let preferences: UserPreferencesService;
|
||||||
let contentApi: ContentApiService;
|
let contentApi: ContentApiService;
|
||||||
let uploadService: UploadService;
|
let uploadService: UploadService;
|
||||||
let alfrescoApiService: AlfrescoApiService;
|
let nodesApiService: NodesApiService;
|
||||||
let appHookService: AppHookService;
|
let appHookService: AppHookService;
|
||||||
let store: Store<any>;
|
let store: Store<any>;
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ describe('PreviewComponent', () => {
|
|||||||
preferences = TestBed.inject(UserPreferencesService);
|
preferences = TestBed.inject(UserPreferencesService);
|
||||||
contentApi = TestBed.inject(ContentApiService);
|
contentApi = TestBed.inject(ContentApiService);
|
||||||
uploadService = TestBed.inject(UploadService);
|
uploadService = TestBed.inject(UploadService);
|
||||||
alfrescoApiService = TestBed.inject(AlfrescoApiService);
|
nodesApiService = TestBed.inject(NodesApiService);
|
||||||
appHookService = TestBed.inject(AppHookService);
|
appHookService = TestBed.inject(AppHookService);
|
||||||
store = TestBed.inject(Store);
|
store = TestBed.inject(Store);
|
||||||
});
|
});
|
||||||
@ -633,12 +633,12 @@ describe('PreviewComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should emit nodeUpdated event on fileUploadComplete event', fakeAsync(() => {
|
it('should emit nodeUpdated event on fileUploadComplete event', fakeAsync(() => {
|
||||||
spyOn(alfrescoApiService.nodeUpdated, 'next');
|
spyOn(nodesApiService.nodeUpdated, 'next');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
uploadService.fileUploadComplete.next({ data: { entry: {} } } as any);
|
uploadService.fileUploadComplete.next({ data: { entry: {} } } as any);
|
||||||
tick(300);
|
tick(300);
|
||||||
|
|
||||||
expect(alfrescoApiService.nodeUpdated.next).toHaveBeenCalled();
|
expect(nodesApiService.nodeUpdated.next).toHaveBeenCalled();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should return to parent folder when event emitted from extension', async () => {
|
it('should return to parent folder when event emitted from extension', async () => {
|
||||||
|
@ -27,7 +27,7 @@ import { Component, OnInit, OnDestroy, ViewEncapsulation, HostListener } from '@
|
|||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { ActivatedRoute, Router, UrlTree, UrlSegmentGroup, UrlSegment, PRIMARY_OUTLET } from '@angular/router';
|
import { ActivatedRoute, Router, UrlTree, UrlSegmentGroup, UrlSegment, PRIMARY_OUTLET } from '@angular/router';
|
||||||
import { debounceTime, map, takeUntil } from 'rxjs/operators';
|
import { debounceTime, map, takeUntil } from 'rxjs/operators';
|
||||||
import { UserPreferencesService, ObjectUtils, UploadService, AlfrescoApiService } from '@alfresco/adf-core';
|
import { UserPreferencesService, ObjectUtils, UploadService, NodesApiService } from '@alfresco/adf-core';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { AppStore, ClosePreviewAction, ViewerActionTypes, SetSelectedNodesAction } from '@alfresco/aca-shared/store';
|
import { AppStore, ClosePreviewAction, ViewerActionTypes, SetSelectedNodesAction } from '@alfresco/aca-shared/store';
|
||||||
import { PageComponent } from '../page.component';
|
import { PageComponent } from '../page.component';
|
||||||
@ -92,7 +92,7 @@ export class PreviewComponent extends PageComponent implements OnInit, OnDestroy
|
|||||||
private preferences: UserPreferencesService,
|
private preferences: UserPreferencesService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private apiService: AlfrescoApiService,
|
private nodesApiService: NodesApiService,
|
||||||
private uploadService: UploadService,
|
private uploadService: UploadService,
|
||||||
private actions$: Actions,
|
private actions$: Actions,
|
||||||
private location: Location,
|
private location: Location,
|
||||||
@ -143,7 +143,7 @@ export class PreviewComponent extends PageComponent implements OnInit, OnDestroy
|
|||||||
|
|
||||||
this.uploadService.fileUploadDeleted.subscribe(() => this.navigateToFileLocation(true)),
|
this.uploadService.fileUploadDeleted.subscribe(() => this.navigateToFileLocation(true)),
|
||||||
|
|
||||||
this.uploadService.fileUploadComplete.pipe(debounceTime(300)).subscribe((file) => this.apiService.nodeUpdated.next(file.data.entry)),
|
this.uploadService.fileUploadComplete.pipe(debounceTime(300)).subscribe((file) => this.nodesApiService.nodeUpdated.next(file.data.entry)),
|
||||||
|
|
||||||
this.actions$
|
this.actions$
|
||||||
.pipe(
|
.pipe(
|
||||||
|
@ -28,7 +28,7 @@ import { MinimalNodeEntity } from '@alfresco/js-api';
|
|||||||
import { ViewNodeAction, NavigateToFolder } from '@alfresco/aca-shared/store';
|
import { ViewNodeAction, NavigateToFolder } from '@alfresco/aca-shared/store';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { BehaviorSubject, Subject } from 'rxjs';
|
import { BehaviorSubject, Subject } from 'rxjs';
|
||||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
import { NodesApiService } from '@alfresco/adf-core';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
@ -50,12 +50,12 @@ export class SearchResultsRowComponent implements OnInit, OnDestroy {
|
|||||||
name$ = new BehaviorSubject<string>('');
|
name$ = new BehaviorSubject<string>('');
|
||||||
title$ = new BehaviorSubject<string>('');
|
title$ = new BehaviorSubject<string>('');
|
||||||
|
|
||||||
constructor(private store: Store<any>, private alfrescoApiService: AlfrescoApiService, private router: Router) {}
|
constructor(private store: Store<any>, private nodesApiService: NodesApiService, private router: Router) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.updateValues();
|
this.updateValues();
|
||||||
|
|
||||||
this.alfrescoApiService.nodeUpdated.pipe(takeUntil(this.onDestroy$)).subscribe((node) => {
|
this.nodesApiService.nodeUpdated.pipe(takeUntil(this.onDestroy$)).subscribe((node) => {
|
||||||
const row = this.context.row;
|
const row = this.context.row;
|
||||||
if (row) {
|
if (row) {
|
||||||
const { entry } = row.node;
|
const { entry } = row.node;
|
||||||
|
@ -40,7 +40,7 @@ import { ContentActionRef, SelectionState } from '@alfresco/adf-extensions';
|
|||||||
import { MinimalNodeEntryEntity, SearchRequest, VersionEntry, VersionsApi } from '@alfresco/js-api';
|
import { MinimalNodeEntryEntity, SearchRequest, VersionEntry, VersionsApi } from '@alfresco/js-api';
|
||||||
import { Component, HostListener, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, HostListener, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { ActivatedRoute, PRIMARY_OUTLET, Router } from '@angular/router';
|
import { ActivatedRoute, PRIMARY_OUTLET, Router } from '@angular/router';
|
||||||
import { AlfrescoApiService, ObjectUtils, UploadService, UserPreferencesService } from '@alfresco/adf-core';
|
import { AlfrescoApiService, ObjectUtils, UploadService, UserPreferencesService, NodesApiService } from '@alfresco/adf-core';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { from, Observable, Subject } from 'rxjs';
|
import { from, Observable, Subject } from 'rxjs';
|
||||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||||
@ -117,6 +117,7 @@ export class AppViewerComponent implements OnInit, OnDestroy {
|
|||||||
private actions$: Actions,
|
private actions$: Actions,
|
||||||
private preferences: UserPreferencesService,
|
private preferences: UserPreferencesService,
|
||||||
private apiService: AlfrescoApiService,
|
private apiService: AlfrescoApiService,
|
||||||
|
private nodesApiService: NodesApiService,
|
||||||
private uploadService: UploadService,
|
private uploadService: UploadService,
|
||||||
private appHookService: AppHookService
|
private appHookService: AppHookService
|
||||||
) {}
|
) {}
|
||||||
@ -194,7 +195,7 @@ export class AppViewerComponent implements OnInit, OnDestroy {
|
|||||||
this.uploadService.fileUploadDeleted.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.navigateToFileLocation());
|
this.uploadService.fileUploadDeleted.pipe(takeUntil(this.onDestroy$)).subscribe(() => this.navigateToFileLocation());
|
||||||
|
|
||||||
this.uploadService.fileUploadComplete.pipe(debounceTime(300), takeUntil(this.onDestroy$)).subscribe((file) => {
|
this.uploadService.fileUploadComplete.pipe(debounceTime(300), takeUntil(this.onDestroy$)).subscribe((file) => {
|
||||||
this.apiService.nodeUpdated.next(file.data.entry);
|
this.nodesApiService.nodeUpdated.next(file.data.entry);
|
||||||
this.displayNode(file.data.entry.id);
|
this.displayNode(file.data.entry.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ import { AppHookService, ContentApiService } from '@alfresco/aca-shared';
|
|||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { ContentManagementService } from './content-management.service';
|
import { ContentManagementService } from './content-management.service';
|
||||||
import { NodeActionsService } from './node-actions.service';
|
import { NodeActionsService } from './node-actions.service';
|
||||||
import { TranslationService, AlfrescoApiService, FileModel, NotificationService } from '@alfresco/adf-core';
|
import { TranslationService, NodesApiService, FileModel, NotificationService } from '@alfresco/adf-core';
|
||||||
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
|
import { MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
|
||||||
import { NodeEntry, Node, VersionPaging, MinimalNodeEntity } from '@alfresco/js-api';
|
import { NodeEntry, Node, VersionPaging, MinimalNodeEntity } from '@alfresco/js-api';
|
||||||
@ -68,7 +68,7 @@ describe('ContentManagementService', () => {
|
|||||||
let notificationService: NotificationService;
|
let notificationService: NotificationService;
|
||||||
let nodeActions: NodeActionsService;
|
let nodeActions: NodeActionsService;
|
||||||
let translationService: TranslationService;
|
let translationService: TranslationService;
|
||||||
let alfrescoApiService: AlfrescoApiService;
|
let nodesApiService: NodesApiService;
|
||||||
let nodeAspectService: NodeAspectService;
|
let nodeAspectService: NodeAspectService;
|
||||||
let appHookService: AppHookService;
|
let appHookService: AppHookService;
|
||||||
let newVersionUploaderService: NewVersionUploaderService;
|
let newVersionUploaderService: NewVersionUploaderService;
|
||||||
@ -85,7 +85,7 @@ describe('ContentManagementService', () => {
|
|||||||
notificationService = TestBed.inject(NotificationService);
|
notificationService = TestBed.inject(NotificationService);
|
||||||
nodeActions = TestBed.inject(NodeActionsService);
|
nodeActions = TestBed.inject(NodeActionsService);
|
||||||
translationService = TestBed.inject(TranslationService);
|
translationService = TestBed.inject(TranslationService);
|
||||||
alfrescoApiService = TestBed.inject(AlfrescoApiService);
|
nodesApiService = TestBed.inject(NodesApiService);
|
||||||
nodeAspectService = TestBed.inject(NodeAspectService);
|
nodeAspectService = TestBed.inject(NodeAspectService);
|
||||||
appHookService = TestBed.inject(AppHookService);
|
appHookService = TestBed.inject(AppHookService);
|
||||||
newVersionUploaderService = TestBed.inject(NewVersionUploaderService);
|
newVersionUploaderService = TestBed.inject(NewVersionUploaderService);
|
||||||
@ -1659,12 +1659,12 @@ describe('ContentManagementService', () => {
|
|||||||
afterClosed: () => of(newNode)
|
afterClosed: () => of(newNode)
|
||||||
};
|
};
|
||||||
|
|
||||||
spyOn(alfrescoApiService.nodeUpdated, 'next');
|
spyOn(nodesApiService.nodeUpdated, 'next');
|
||||||
spyOn(dialog, 'open').and.returnValue(mockDialogInstance);
|
spyOn(dialog, 'open').and.returnValue(mockDialogInstance);
|
||||||
|
|
||||||
contentManagementService.editFolder(node);
|
contentManagementService.editFolder(node);
|
||||||
|
|
||||||
expect(alfrescoApiService.nodeUpdated.next).toHaveBeenCalledWith(newNode);
|
expect(nodesApiService.nodeUpdated.next).toHaveBeenCalledWith(newNode);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should focus element indicated by passed selector after closing modal', () => {
|
it('should focus element indicated by passed selector after closing modal', () => {
|
||||||
|
@ -56,7 +56,7 @@ import {
|
|||||||
NewVersionUploaderData,
|
NewVersionUploaderData,
|
||||||
NewVersionUploaderDataAction
|
NewVersionUploaderDataAction
|
||||||
} from '@alfresco/adf-content-services';
|
} from '@alfresco/adf-content-services';
|
||||||
import { TranslationService, AlfrescoApiService, NotificationService } from '@alfresco/adf-core';
|
import { TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core';
|
||||||
import {
|
import {
|
||||||
DeletedNodesPaging,
|
DeletedNodesPaging,
|
||||||
MinimalNodeEntity,
|
MinimalNodeEntity,
|
||||||
@ -88,7 +88,7 @@ export class ContentManagementService {
|
|||||||
private readonly createMenuButtonSelector = 'app-create-menu button';
|
private readonly createMenuButtonSelector = 'app-create-menu button';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private alfrescoApiService: AlfrescoApiService,
|
private nodesApiService: NodesApiService,
|
||||||
private store: Store<AppStore>,
|
private store: Store<AppStore>,
|
||||||
private contentApi: ContentApiService,
|
private contentApi: ContentApiService,
|
||||||
private permission: NodePermissionService,
|
private permission: NodePermissionService,
|
||||||
@ -262,7 +262,7 @@ export class ContentManagementService {
|
|||||||
|
|
||||||
dialog.afterClosed().subscribe((node) => {
|
dialog.afterClosed().subscribe((node) => {
|
||||||
if (node) {
|
if (node) {
|
||||||
this.alfrescoApiService.nodeUpdated.next(node);
|
this.nodesApiService.nodeUpdated.next(node);
|
||||||
}
|
}
|
||||||
this.focusAfterClose(focusedElementOnCloseSelector);
|
this.focusAfterClose(focusedElementOnCloseSelector);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user