mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-09-17 14:21:14 +00:00
optimise upload service injections
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
*/
|
||||
|
||||
import { ContentApiService, PageComponent } from '@alfresco/aca-shared';
|
||||
import { UploadService } from '@alfresco/adf-content-services';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, PathElementEntity, PathInfo } from '@alfresco/js-api';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
@@ -36,7 +35,7 @@ import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
export class FavoritesComponent extends PageComponent implements OnInit {
|
||||
columns: DocumentListPresetRef[] = [];
|
||||
|
||||
constructor(private router: Router, private contentApi: ContentApiService, private uploadService: UploadService) {
|
||||
constructor(private router: Router, private contentApi: ContentApiService) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,7 @@ import { NodeActionsService } from '../../services/node-actions.service';
|
||||
import { ContentApiService, PageComponent } from '@alfresco/aca-shared';
|
||||
import { SetCurrentFolderAction, isAdmin, UploadFileVersionAction, showLoaderSelector } from '@alfresco/aca-shared/store';
|
||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||
import { FilterSearch, ShareDataRow, UploadService, FileUploadEvent } from '@alfresco/adf-content-services';
|
||||
import { FilterSearch, ShareDataRow, FileUploadEvent } from '@alfresco/adf-content-services';
|
||||
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
|
||||
@Component({
|
||||
@@ -51,8 +51,7 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private contentApi: ContentApiService,
|
||||
private nodeActionsService: NodeActionsService,
|
||||
private uploadService: UploadService
|
||||
private nodeActionsService: NodeActionsService
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
@@ -24,7 +24,6 @@
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { UploadService } from '@alfresco/adf-content-services';
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
import { Router } from '@angular/router';
|
||||
import { PageComponent } from '@alfresco/aca-shared';
|
||||
@@ -36,7 +35,7 @@ import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
export class RecentFilesComponent extends PageComponent implements OnInit {
|
||||
columns: DocumentListPresetRef[] = [];
|
||||
|
||||
constructor(private uploadService: UploadService, private router: Router) {
|
||||
constructor(private router: Router) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,6 @@
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
import { UploadService } from '@alfresco/adf-content-services';
|
||||
import { Router } from '@angular/router';
|
||||
import { MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { AppHookService, PageComponent } from '@alfresco/aca-shared';
|
||||
@@ -35,7 +34,7 @@ import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
export class SharedFilesComponent extends PageComponent implements OnInit {
|
||||
columns: DocumentListPresetRef[] = [];
|
||||
|
||||
constructor(private appHookService: AppHookService, private uploadService: UploadService, private router: Router) {
|
||||
constructor(private appHookService: AppHookService, private router: Router) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@@ -33,7 +33,7 @@ import { ContentActionRef, ViewerExtensionRef } from '@alfresco/adf-extensions';
|
||||
import { SearchRequest } from '@alfresco/js-api';
|
||||
import { from } from 'rxjs';
|
||||
import { Actions, ofType } from '@ngrx/effects';
|
||||
import { NodesApiService, UploadService } from '@alfresco/adf-content-services';
|
||||
import { NodesApiService } from '@alfresco/adf-content-services';
|
||||
|
||||
@Component({
|
||||
selector: 'app-preview',
|
||||
@@ -90,7 +90,6 @@ export class PreviewComponent extends PageComponent implements OnInit, OnDestroy
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private nodesApiService: NodesApiService,
|
||||
private uploadService: UploadService,
|
||||
private actions$: Actions,
|
||||
private location: Location,
|
||||
private appHookService: AppHookService
|
||||
|
@@ -22,7 +22,7 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { DocumentListComponent, ShareDataRow } from '@alfresco/adf-content-services';
|
||||
import { DocumentListComponent, ShareDataRow, UploadService } from '@alfresco/adf-content-services';
|
||||
import { ShowHeaderMode } from '@alfresco/adf-core';
|
||||
import { ContentActionRef, DocumentListPresetRef, SelectionState } from '@alfresco/adf-extensions';
|
||||
import { OnDestroy, OnInit, OnChanges, ViewChild, SimpleChanges, Directive, inject } from '@angular/core';
|
||||
@@ -76,6 +76,7 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
||||
protected content = inject(DocumentBasePageService);
|
||||
protected store = inject<Store<AppStore>>(Store<AppStore>);
|
||||
protected breakpointObserver = inject(BreakpointObserver);
|
||||
protected uploadService = inject(UploadService);
|
||||
private fileAutoDownloadService = inject(AcaFileAutoDownloadService, { optional: true });
|
||||
|
||||
protected subscriptions: Subscription[] = [];
|
||||
|
@@ -54,7 +54,7 @@ import { NodesApiService, UploadService } from '@alfresco/adf-content-services';
|
||||
host: { class: 'app-viewer' }
|
||||
})
|
||||
export class AcaViewerComponent implements OnInit, OnDestroy {
|
||||
_versionsApi: VersionsApi;
|
||||
private _versionsApi: VersionsApi;
|
||||
get versionsApi(): VersionsApi {
|
||||
this._versionsApi = this._versionsApi ?? new VersionsApi(this.apiService.getInstance());
|
||||
return this._versionsApi;
|
||||
|
Reference in New Issue
Block a user