import { Subject, Subscription } from 'rxjs'; import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy } from '@angular/core'; import { UofxFileModel } from '@uofx/app-components/file-helper'; import { UofxWatermarkSettingModel } from '@uofx/app-components/pdf'; import { UofxFileService } from '../api/service/file.service'; import { UofxFileUploadComponent } from '../file-upload.component'; import { UofxFileButton, UofxFileGroupModel, UofxFileUploadModuleType } from '../file.interface'; import * as i0 from "@angular/core"; export declare class UofxFileViewerComponent implements AfterViewInit, OnDestroy { private fileService; private cdr; fileUploadObj: UofxFileUploadComponent; /** 是否可以編輯 */ editable: boolean; /** 檔案上傳的模組 */ fileUploadModule: string | UofxFileUploadModuleType; /** 檔案file group (來自api) */ value: UofxFileGroupModel; /** 文件檢視器高度 */ viewerHeight: any; /** pdf浮水印的相關設定 */ watermarkSetting: UofxWatermarkSettingModel; /** 是否允許viewer內點擊下載檔案 */ enabledDownloadPdf: boolean; /** 允許選擇多筆檔案 */ allowMultiple: boolean; /** 顯示 tab */ showTab: boolean; /** 支援轉檔的副檔名 */ allowExtensions: string; /** 檔案選項變更時的emitter */ changeFiles: EventEmitter; readonly headerButton: UofxFileButton; /** 要顯示的檔案 */ file: UofxFileModel; /** 用於當前元件操作的file list物件,不可直接拿api取得的fileList來操作,會導致資料有誤 */ tempFileList: Array; /** 目前選擇在第幾份檔案 */ currentCount: number; /** 總共有幾份檔案 */ totalCount: number; /** 目前選取的檔案是第幾個 */ selectedValue: number; /** 用來更換pdf的subject */ openPdfSubject: Subject; /** 檢查檔案是否轉檔完成的訂閱 */ checkFileSub$: Subscription; /** 是否正在檢查檔案轉檔狀態 */ isCheckingFiles: boolean; segmentScroll: boolean; /** pdf是否正在開啟中 */ isPdfOpening: boolean; /** 有重載檔案的需求,但pdf開啟中,所以等開啟完成時再處理 */ reloadAfterOpen: boolean; constructor(fileService: UofxFileService, cdr: ChangeDetectorRef); ngAfterViewInit(): void; ngOnDestroy(): void; /** @internal 檔案有變更時,更新檔案tab及viewer */ onFileChanged(): void; /** @internal 檔案tab change事件 */ onSegmentChange(args: CustomEvent): void; /** 開啟pdf前的事件 */ onBeforeOpenPdf(): void; /** 開啟pdf後的事件 */ onAfterOpenPdf(): void; /** 第一次產生此component要初始化的參數 */ private initValue; /** 檔案變更時要做的邏輯 */ private initWhenFileChanged; /** 重載第一份檔案 */ private reloadFirstFile; /** 初始化檔案數量資訊 */ private initFileCountInfo; /** 初始化tab */ private initTab; /** * 確認是否可以執行 API 檢查檔案狀態 * * @private * @return {*} {Promise} * @memberof UofxFileViewerComponent */ private canDoCheckFiles; /** * 取得需要被檢查的檔案清單 * * @private * @return {*} {Array} * @memberof UofxFileViewerComponent */ private getCheckFiles; /** * 檢查所有檔案是否都已經轉檔完成 * * @private * @return {*} {boolean} * @memberof UofxFileViewerComponent */ private isAllFileCheckFinish; /** * 呼叫 API 檢查檔案並處理結果 * * @private * @param {((value: boolean | PromiseLike) => void)} resolve * @return {*} {void} * @memberof UofxFileViewerComponent */ private doCheckFiles; /** * 檢查檔案轉檔狀態,並在 3 秒後再次檢查 * * @private * @param {((value: boolean | PromiseLike) => void)} resolve * @memberof UofxFileViewerComponent */ private checkAfter3Seconds; /** * 取得檔案轉檔狀態是否已經結束 * * @private * @param {UofxFileViewStatus} viewStatus * @return {*} {boolean} * @memberof UofxFileViewerComponent */ private isConvertEnd; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }