[ADF-5426] Remove compatibility layer from Lib (#7110)

* remove compatibility step 1

* remove compatibility step 2

* remove compatibility step 3

* remove compatibility step 4

* remove compatibility step 5
This commit is contained in:
Eugenio Romano
2021-08-04 17:31:35 +02:00
committed by GitHub
parent 5d5b582e32
commit f30b20cc46
113 changed files with 1375 additions and 2348 deletions

View File

@@ -17,9 +17,11 @@
import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { DownloadEntry, NodeEntry } from '@alfresco/js-api';
import { DownloadEntry, MinimalNode } from '@alfresco/js-api';
import { LogService } from '../../services/log.service';
import { DownloadZipService } from '../../services/download-zip.service';
import { ContentService } from '../../services/content.service';
import { NodesApiService } from '../../services/nodes-api.service';
@Component({
selector: 'adf-download-zip-dialog',
@@ -38,7 +40,9 @@ export class DownloadZipDialogComponent implements OnInit {
@Inject(MAT_DIALOG_DATA)
public data: any,
private logService: LogService,
private downloadZipService: DownloadZipService) {
private downloadZipService: DownloadZipService,
private nodeService: NodesApiService,
private contentService: ContentService) {
}
ngOnInit() {
@@ -62,11 +66,11 @@ export class DownloadZipDialogComponent implements OnInit {
this.downloadZipService.createDownload({ nodeIds }).subscribe((data: DownloadEntry) => {
if (data && data.entry && data.entry.id) {
const url = this.downloadZipService.getContentUrl(data.entry.id, true);
const url = this.contentService.getContentUrl(data.entry.id, true);
this.downloadZipService.getNode(data.entry.id).subscribe((downloadNode: NodeEntry) => {
this.nodeService.getNode(data.entry.id).subscribe((downloadNode: MinimalNode) => {
this.logService.log(downloadNode);
const fileName = downloadNode.entry.name;
const fileName = downloadNode.name;
this.downloadId = data.entry.id;
this.waitAndDownload(data.entry.id, url, fileName);
});