UNPKG

@docsvision/webclient

Version:

Type definitions for DocsVision WebClient scripts and extensions.

109 lines (108 loc) 4.52 kB
/// <reference types="react" /> import { FilePreviewParams } from '@docsvision/webclient/Platform/FilePreview'; import { BaseControlState } from '@docsvision/webclient/System/BaseControl'; import { BaseControlImpl } from '@docsvision/webclient/System/BaseControlImpl'; import { FileListItem } from '@docsvision/webclient/BackOffice/FileListItem'; import { IComboBoxElement } from '@docsvision/webclient/Helpers/ComboBox/Data/ClientModels/IComboBoxElement'; import { CancelableApiEvent, BasicApiEvent } from '@docsvision/webclient/System/ApiEvent'; import { IFilePreviewingArgs } from '@docsvision/webclient/BackOffice/IFilePreviewingArgs'; import { IFilePreviewedArgs } from '@docsvision/webclient/BackOffice/IFilePreviewedArgs'; import { GenModels } from "@docsvision/webclient/Generated/DocsVision.WebClient.Models"; import { FileViewer, IFileViewerConstructor } from '@docsvision/webclient/Platform/FileViewer'; export interface IFilePreviewState extends FilePreviewParams, BaseControlState { defaultWidth: string; height: string; comments: boolean; fileOpen: boolean; isOpened: boolean; isPreviewShown: boolean; isPreviewInModalShown: boolean; beforeOpenCloseWindow: CancelableApiEvent<IFilePreviewingArgs>; afterOpenCloseWindow: BasicApiEvent<IFilePreviewedArgs>; fileItem: FileListItem; files: FileListItem[]; isCommentsOpened: boolean; wasClosed: boolean; useR7Viewer: boolean; viewer: IFileViewerConstructor | FileViewer; } export interface FilePreviewState extends IFilePreviewState { } export declare class FilePreviewImpl extends BaseControlImpl<FilePreviewParams, IFilePreviewState> { private rootControl; private firstChildBlock; private lastChildBlock; private previewBlock; private contentBlock; private firstChildBlockWidth; private originalMouseX; private dragHandle; private parentNode; private parentWidth; private handlerWidth; commentBlockContainer: HTMLElement; private commentResizerBottomRight; private commentBlockWidth; private commentBlockHeight; private commentBlockLeft; private commentBlockTop; private startPageX; private startPageY; private handlerInDrag; private isMouseDown; private isResizing; private documentRootNode; private bodyCommentsProvider; private previewWithResize; private contentBlockWidth; private previewBlockWidth; private rootLocationLayout; private modalContentBlock; constructor(props: FilePreviewParams, state: IFilePreviewState); getViewer(services: any): FileViewer; UNSAFE_componentWillMount(): void; get isEditMode(): boolean; get fileOpen(): boolean; get isCommentsOpened(): boolean; getTabIndex(): 0 | -1; componentDidMount(): Promise<void>; componentWillUnmount(): Promise<void>; onFileListWasChanged: () => Promise<void>; startResizePreview: (e: MouseEvent) => void; updatePreviewWidth: (e: any) => void; stopResizePreview: () => void; showFilePreview: (showInModal?: boolean, version?: GenModels.VersionedFileModel) => Promise<void>; closeFilePreviewInModal: () => Promise<void>; showModalDialog(): void; previewInModal: () => JSX.Element; previewInModalContent: () => JSX.Element; addListenerToButton: () => void; loadFileData: (version?: GenModels.VersionedFileModel) => Promise<void>; checkAllowedPreviewExtension: (ext: string) => boolean; showPreviewArea: () => void; canComment: () => boolean; startDrag: (e: any) => void; commentsControl: (showInModal: boolean) => JSX.Element; onCommentsClose: () => Promise<void>; showComments: (isModalPreview?: boolean) => Promise<void>; addListenersToComments: () => void; onEscapeKeyDown: (e: any) => void; startResizeComments: (e: any) => void; resizeComments: (e: any) => void; stopResizeComments: () => void; protected get canDownload(): boolean; generateLinkTag: (url: string) => void; getDownloadFileUrl: (targetVersion: any, currentVersion: any) => string; downloadFile: () => void; closeFilePreview: () => Promise<void>; getComboBoxElements: () => { elements: IComboBoxElement[]; allowEmpty: boolean; strictMode: boolean; selectedID: string; }; onCurrentFileChange: (selectedElement: IComboBoxElement) => Promise<void>; filePreviewDialog: () => JSX.Element; private getFileId; protected renderControl(): JSX.Element; }