import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { FormUtilityService } from '../../services/form-utility.service'; import { FileUploadService } from '../../services/file-upload.service'; import { FileDownloadAndDeleteConfig } from '../../models/file-download-config.model'; import { DownloadAttachment } from '../../models/download-file.model'; import { Subject } from 'rxjs'; import { AlertsService } from '@ieeesa-npm/utility'; import { AlignType } from '@ieeesa-npm/models'; import * as i0 from "@angular/core"; export declare class FileDownloadComponent implements OnInit, OnDestroy { formUtilityService: FormUtilityService; private fileUploadService; private alertService; constants: { ariaLabel: { clear: string; warning: string; previousMonth: string; nextMonth: string; menuIcon: string; close: string; search: string; addFormGroup: string; }; button: { cancel: string; ok: string; add: string; }; modalConfig: { ariaLabel: string; autoFocus: string; width: string; }; chips: { noOfDefaultVisibleChips: number; label: { viewAll: string; viewLess: string; }; ariaLabel: { chipsList: string; }; icons: { arrow: { id: number; iconURL: string; toolTip: string; ariaLabel: string; }; remove: { id: number; iconURL: string; toolTip: string; ariaLabel: string; }; check: { id: number; iconURL: string; toolTip: string; ariaLabel: string; }; }; }; dataTable: { label: { clearAll: string; }; message: { noRecordFound: string; }; ariaLabel: { search: string; selectAll: string; select: string; link: string; pagination: string; }; buttons: { id: number; iconURL: string; toolTip: string; ariaLabel: string; }[]; }; datePicker: { selectDateLabel: string; dateFormatLabel: string; startDateLabel: string; endDateLabel: string; datePickerIcon: string; }; dropdown: { placeholderText: string; }; filter: { label: { filterBy: string; applyButton: string; clearAll: string; }; buttons: { id: number; iconURL: string; toolTip: string; ariaLabel: string; }[]; }; textarea: { maxLengthDefault: number; leftCharacters: string; }; autocomplete: { minCharToSearch: number; debounceTime: number; }; multiSelectAutoComplete: { label: { clearAll: string; }; ariaLabel: { selectedOption: string; removeOption: string; }; icons: { remove: string; clearAll: string; }; }; header: { alt: { logo: string; }; ariaLabel: { helpLink: string; hamburgerMenu: string; }; label: { signOut: string; }; buttons: { id: number; iconURL: string; toolTip: string; ariaLabel: string; }[]; userProfileMenuOptions: { id: number; iconURL: string; label: string; ariaLabel: string; toolTip: string; isToolTipNeeded: boolean; }[]; errors: { "2029": string; }; }; footer: { alt: { logo: string; }; links: { label: string; ariaLabel: string; redirectUrl: string; }[]; ieeeLogo: string; copyright: { link: string; textPart1: string; textPart2: string; hyperLinkPart3: string; textPart4: string; }; }; welcome: { buttons: { label: string; ariaLabel: string; url: string; }[]; }; breadcrumb: { label: { initial: string; }; }; loader: { ariaLabel: { spinner: string; }; }; defaultWelcomeBgColor: string; timePicker: { defaultTimeFormat: number; timePickerIcon: string; }; colorPicker: { label: { select: string; cancel: string; }; ariaLabel: { colorPicker: string; next: string; back: string; select: string; cancel: string; hexCodeInput: string; palette: string; }; defaultColor: string; ariaDescription: string; ariaDescribedById: string; paletteColors: { name: string; hexCode: string; }[]; }; fileUpload: { label: { fileUpload: string; allowedFileSize1: string; allowedFileSize2: string; allowedFileFormat: string; browseFiles: string; uploadProgress: string; upload: string; mb: string; uploadFor: string; uploadErrorMsg: string; of: string; filesUploaded: string; fileAlreadyExists: string; }; ariaLabel: { fileUpload: string; browseFiles: string; fileUploadIcon: string; removeFileIcon: string; deleteFileIcon: string; fileDownload: string; fileUploadInput: string; }; iconUrl: { fileUploadIcon: string; fileRemoveIcon: string; deleteIcon: string; }; buttons: { id: number; ariaLabel: string; iconURL: string; toolTip: string; disabled: boolean; }[]; message: { error: { ER1002: string; invalidFileFormat: string; invalidFileSize: string; "2026": string; "2059": string; "2060": string; "2061": string; "2062": string; "2063": string; "2064": string; }; }; limit: { maxFilesUploadedOnce: number; }; }; list: { defaultIndentation: number; dragAndDropIconUrl: string; }; search: { minCharToSearch: number; searchIcon: string; }; richTextEditor: { label: { editor: string; }; ariaLabel: { editor: string; colorPicker: string; }; }; fileDownload: { buttons: { id: number; ariaLabel: string; iconURL: string; toolTip: string; disabled: boolean; }[]; preSignedDuration: string; message: { errors: { ER1002: string; "5038": string; "6027": string; "6028": string; }; }; }; breakPointMaxWidth: string; }; destroy$: Subject; preSignedUrl: string; fileName: string; alignType: typeof AlignType; downloadFiles: File | FileList | any | DownloadAttachment[]; fileDownloadAndDeleteConfig: FileDownloadAndDeleteConfig; isPublicAPI?: boolean; domainUrl?: string; downloadSelectedFile: EventEmitter; deleteSelectedFile: EventEmitter; fileDeleteBtn: { id: number; ariaLabel: string; iconURL: string; toolTip: string; disabled: boolean; }; apiBaseUrl: string; constructor(formUtilityService: FormUtilityService, fileUploadService: FileUploadService, alertService: AlertsService); /** * Sets API base URL to file upload service * @memberof FileDownloadComponent */ ngOnInit(): void; /** * Gets the download AWS pre-signed URL from API on button click or emit the downloadSelectedFile if canDownloadFileInternally flg is true. * @param {File } file * @memberof FileDownloadedComponent */ onDownloadFile(file: File | DownloadAttachment): void; /** * Retrieves pre-signed URL for downloading the selected file from Amazon S3 bucket. * @memberof FileDownloadedComponent */ getFileDownloadPresignedUrls(file: File | DownloadAttachment): void; /** * Emits deleteSelectedFile event or deletes the selected file by calling deleteFile() if the file can be deleted internally. * @param {number} index * @param {File } file * @memberof FileDownloadedComponent */ onDeleteFile(file: File | DownloadAttachment, index: number): void; /** * Deletes the file by given attachmentId, index. * @param {string} attachmentId * @param {number} index * @memberof UploadAttachmentsComponent */ deleteFile(attachmentId: string, index: number): void; /** * Returns unique identifier for the file list. * @param {number} index * @return {(number | string)} * @memberof FileDownloadComponent */ trackByFn(index: number): number | string; /** * Cleans up resources when the component is destroyed. * @memberof FileDownloadComponent */ ngOnDestroy(): void; /** * Download the file using generated presigned Url. * @param {string} fileDownloadPresignedUrl * @param {string} fileName * @memberof FileDownloadComponent */ downloadFileFromS3(fileDownloadPresignedUrl: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }