import { ActionSheetController, AlertController } from '@ionic/angular'; import { ViewerOptions } from 'ng2-adsk-forge-viewer'; import { UofxCADViewerService } from './api/cad-viewer.service'; import { UofxFileDownloadHelper } from '@uofx/app-components/file-helper'; import { UofxI18NService } from '@uofx/core'; import * as i0 from "@angular/core"; export declare class UofxCADViewerDialog { private service; private i18n; private alertCtrl; private actSheetCtrl; private downloadHelper; /** 檢視器標題(如果未填,會顯示fileName) */ title: string; /** 檔案id */ fileId: string; /** CAD檔名 */ fileName: string; /** cad urn */ urn: string; /** * 下載url(file:綁token的下載url、img:原始檔案url), * 欄位是前端用,未在 UofxFileModel裡,所以另外傳入。 */ downloadUrl: string; /** 原始檔案url */ url: string; /** 是否允許下載原始檔 */ allowDownloadFile: boolean; private mcoreConfig; /** Viewer的設定 */ viewerOptions: ViewerOptions; /** * Viewer Token * - * 1. 透過後端跟Autodesk取得 * 2. 這組token是有時效性的,因此需要即時跟後端取得 */ ACCESS_TOKEN: string; /** 要檢視的CAD檔案 (這組base64是經過Autodesk轉換後的URN) */ DOCUMENT_URN: string; constructor(service: UofxCADViewerService, i18n: UofxI18NService, alertCtrl: AlertController, actSheetCtrl: ActionSheetController, downloadHelper: UofxFileDownloadHelper); ionViewDidEnter(): void; /** 初始化dialog params */ initParams(): void; /** * 初始化CAD * - * 1. 取得Autodesk Token * 2. 設定Viewer Options */ initCAD(): void; /** * 檢查CAD檔是否可讀取 * - * 不可讀取時api也會是200,但會提示無法觀看 */ checkCADReadable(): void; /** 設定Viewer Options */ setViewerOptions(): void; /** 提示無法觀看 */ alertMessage(errorCode: string): Promise; /** 點按右上角 [更多] 按鈕 */ onMoreBtnClick(): Promise; /** more items */ setMoreItemButtons(): any[]; /** * 下載檔案 * - * 1. if: web下載檔案 * 2. else: app下載檔案 */ downloadCAD(isPdfUrl: boolean, downloadUrl: string, url: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }