[ACA-4677] Added download functionality on DownloadPromptDialog (#8467)

* [ACA-4677] Added download functionality on DownloadPromptDialog

* [ACA-4677] Added downloadFile event emitter documentation to ViewerComponent README. Updated reference of NonResponsiveDialog to DownloadPromptDialog

* [ACA-4677] Corrected typo in documentation for downloadFile event

* [ACA-4677] Updated test case to check for method call via actual event handling instead of calling the method manually
This commit is contained in:
swapnil-verma-gl
2023-04-20 13:53:45 +05:30
committed by GitHub
parent 0ebdecbe74
commit 760798338f
6 changed files with 51 additions and 12 deletions

View File

@@ -60,6 +60,7 @@ import { ContentService } from '../../common/services/content.service';
import { NodesApiService } from '../../common/services/nodes-api.service';
import { UploadService } from '../../common/services/upload.service';
import { FileModel } from '../../common/models/file.model';
import { NodeActionsService } from '../../document-list';
@Component({
selector: 'adf-alfresco-viewer',
@@ -238,7 +239,8 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {
private contentService: ContentService,
private uploadService: UploadService,
public dialog: MatDialog,
private cdr: ChangeDetectorRef) {
private cdr: ChangeDetectorRef,
private nodeActionsService: NodeActionsService) {
renditionService.maxRetries = this.maxRetries;
}
@@ -449,4 +451,7 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {
this.onDestroy$.complete();
}
onDownloadFile() {
this.nodeActionsService.downloadNode(this.nodeEntry);
}
}