import { UserSettings } from './UserSettings'; import { CanvasModuleClass } from '../modules/CanvasModule'; import { PdfPageLayoutMode, StampAnnotationColor, AnnotationPermissionCallback } from '../pdf-viewer-api'; export interface PdfWebViewerOptionsInterface { [key: string]: any; viewer?: { [key: string]: any; general?: Partial; sidebar?: Partial; permissions?: Partial; callbacks?: Partial; customButtons?: Partial<{ annotationbar: CustomButton[]; documentbar: CustomButton[]; informationbar: CustomButton[]; }>; }; annotation?: Partial; forms: Partial; modules?: CanvasModuleClass[]; } export interface CustomButton { icon: string; text: string; onClick: () => void; } export interface WebViewerOptionsInterface { [key: string]: any; viewer: ViewerOptionsInterface; annotation: AnnotationOptionsInterface; forms: FormsOptionsInterface; modules: CanvasModuleClass[]; shortcuts: KeyboardShortcutsOptionsInterface; } export interface ViewerOptionsInterface { [key: string]: any; general: GeneralOptionsInterface; sidebar: SidebarOptionsInterface; permissions: PermissionOptions; callbacks: Callbacks; customButtons?: Partial<{ annotationbar: CustomButton[]; documentbar: CustomButton[]; informationbar: CustomButton[]; }>; } export interface KeyboardShortcutBinding { key: string; altKey?: boolean; ctrlKey?: boolean; shiftKey?: boolean; superKey?: boolean; } export interface KeyboardShortcutsOptionsInterface { [key: string]: KeyboardShortcutBinding; zoomIn: KeyboardShortcutBinding; zoomOut: KeyboardShortcutBinding; nextPage: KeyboardShortcutBinding; previousPage: KeyboardShortcutBinding; firstPage: KeyboardShortcutBinding; lastPage: KeyboardShortcutBinding; scrollUp: KeyboardShortcutBinding; scrollDown: KeyboardShortcutBinding; scrollLeft: KeyboardShortcutBinding; scrollRight: KeyboardShortcutBinding; releaseSelection: KeyboardShortcutBinding; copy: KeyboardShortcutBinding; copyMac: KeyboardShortcutBinding; print: KeyboardShortcutBinding; cancelPrint: KeyboardShortcutBinding; resetZoom: KeyboardShortcutBinding; fitToPage: KeyboardShortcutBinding; fitToWidth: KeyboardShortcutBinding; rotateView: KeyboardShortcutBinding; save: KeyboardShortcutBinding; search: KeyboardShortcutBinding; searchNext: KeyboardShortcutBinding; searchPrevious: KeyboardShortcutBinding; closeSearch: KeyboardShortcutBinding; toggleSidePane: KeyboardShortcutBinding; showAnnotations: KeyboardShortcutBinding; showOutline: KeyboardShortcutBinding; showThumbnails: KeyboardShortcutBinding; cancelEditAnnotation: KeyboardShortcutBinding; } export interface Callbacks { onOpenFileButtonClicked?(): void; onSaveFileButtonClicked?(): void; onCloseFileButtonClicked?(): void; } export interface FormsOptionsInterface { enabled: boolean; } export interface PermissionOptions { allowFileDrop: boolean; allowSaveFile: boolean; allowOpenFile: boolean; allowCloseFile: boolean; allowRotatePages: boolean; allowRotateView: boolean; allowCopyText: boolean; allowLockAnnotations: boolean; allowEditLockedAnnotations: boolean; allowPrinting?: boolean; allowExternalLinks?: boolean; enablePageLayoutMode: boolean; enableSearch: boolean; } export interface SidebarOptionsInterface { thumbnailNavigation: boolean; outlineNavigation: boolean; annotationNavigation: boolean | { textMarkup: { preview: 'none' | 'short'; }; }; selectedNavigation?: 'thumbnail' | 'outline' | 'annotation'; } type AnnotationBarPositions = 'top' | 'left' | 'right' | 'bottom'; export interface GeneralOptionsInterface { [key: string]: any; user: string; language: string; annotationBarPosition: AnnotationBarPositions; promptOnUnsavedChange: boolean; searchMatchColor: string; textSelectionColor: string; rectangularTextSelection: 'automatic' | 'none'; pageLayoutModes: PdfPageLayoutMode[]; defaultZoomLevels: number[]; pageShadow?: CanvasShadowStyles; currentPageShadow?: CanvasShadowStyles; tooltips?: 'none' | 'title' | 'css'; viewOnly?: boolean; disableMainToolbar?: boolean; disableAnnotationToolbar?: boolean; hidePasswordFormCancelButton?: boolean; } export interface PdfStampsFile { pdfStampFileName: string; data: string; } export interface AnnotationOptionsInterface { [key: string]: any; pdfStampFiles?: PdfStampsFile[]; stamps: (TextStampSetting | ImageStampSetting | PdfStampSetting)[]; colors: AnnotationColorOptionsInterface; fonts: AnnotationFontOptionsInterface; highlightOpacity: number; strokeWidths: number[]; defaultBorderWidth: number; defaultStampWidth: number; eraserRadius: number; selectedStamp: number; freetextBorderWidth?: number; hideAnnotationSubject?: boolean; trackHistory?: boolean; hideOnDelete?: boolean; onlyAuthorCanEdit?: boolean; annotationPermissionCallback?: AnnotationPermissionCallback; } export interface AnnotationColorOptionsInterface { [key: string]: any; highlightColors: string[]; foregroundColors: string[]; backgroundColors: string[]; defaultHighlightColor: string; defaultForegroundColor: string; defaultBackgroundColor: string; defaultHighlightAnnotationColor?: string; defaultFreetextBackgroundColor?: string; freetextBackgroundColor?: string; defaultInkColor?: string; defaultStickyNoteColor?: string; } export interface AnnotationFontOptionsInterface { [key: string]: any; fontFamilies: string[]; fontSizes: number[]; defaultFontFamily: keyof Fonts; defaultFontSize: number; defaultFreetextFontFamily?: keyof Fonts; defaultFreetextFontSize?: number; } interface Fonts { Helvetica: string; Times: string; Courier: string; Symbol: string; ZapfDingbats: string; } export interface TextStampSetting { translation_key?: string; text?: string; thumbnail?: string; color: StampAnnotationColor; title?: string; } export interface ImageStampSetting { image: string; thumbnail?: string; name?: string; title?: string; } export interface PdfStampSetting { pdfStampFileName: string; name: string; pageNumber: number; thumbnail?: string; aspectRatio?: number; title?: string; } export declare const defaultAnnotationColorOptions: AnnotationColorOptionsInterface; export declare const defaultAnnotationFontOptions: AnnotationFontOptionsInterface; export declare const defaultAnnotationStamps: { translation_key: string; color: StampAnnotationColor; }[]; export declare const defaultAnnotationOptions: AnnotationOptionsInterface; export declare const defaultGeneralOptions: GeneralOptionsInterface; export declare const defaultKeyboardShortcuts: KeyboardShortcutsOptionsInterface; export declare const defaultSidebarOptions: SidebarOptionsInterface; export declare const defaultFormsOptions: FormsOptionsInterface; export declare const defaultPermissions: PermissionOptions; export declare const defaultViewerOptions: ViewerOptionsInterface; export declare const defaultViewerModules: CanvasModuleClass[]; export declare const defaultWebViewerOptions: WebViewerOptionsInterface; export interface OptionsToVerifyInterface { [key: string]: string; defaultHighlightAnnotationColor: string; defaultFreetextBgColor: string; defaultFreetextFontColor: string; defaultFreetextFontFamily: string; defaultFreetextFontSize: string; defaultInkColor: string; defaultStickyNoteColor: string; defaultBackgroundColor: string; defaultForegroundColor: string; defaultHighlightColor: string; defaultFontSize: string; } export declare const OptionsToVerify: OptionsToVerifyInterface; export interface ColorPaletteInterface { [key: string]: string; highlightColors: string; backgroundColors: string; foregroundColors: string; } export declare const ColorPaletteMap: ColorPaletteInterface; declare abstract class StorageClass { private internalStorage; constructor(); get storage(): UserSettings; } export declare class GeneralOptions extends StorageClass { private options; constructor(_options?: Partial); get user(): string; get language(): string; get annotationBarPosition(): AnnotationBarPositions; set annotationBarPosition(position: AnnotationBarPositions); get promptOnUnsavedChange(): boolean; get textSelectionColor(): string; get rectangularTextSelection(): "none" | "automatic"; get searchMatchColor(): string; get pageLayoutModes(): PdfPageLayoutMode[]; get defaultZoomLevels(): number[]; get pageShadow(): CanvasShadowStyles | undefined; get currentPageShadow(): CanvasShadowStyles | undefined; get viewOnly(): boolean | undefined; get tooltips(): "title" | "none" | "css" | undefined; get disableMainToolbar(): boolean | undefined; get disableAnnotationToolbar(): boolean | undefined; get hidePasswordFormCancelButton(): boolean | undefined; } export declare class SidebarOptions { private options; constructor(_options?: Partial); get thumbnailNavigation(): boolean; get outlineNavigation(): boolean; get annotationNavigation(): boolean | { textMarkup: { preview: "none" | "short"; }; }; } export declare class FormsOptions { private options; constructor(_options?: Partial); get enabled(): boolean; } export declare class ViewerOptions { private options; private generalOptions; constructor(_options?: Partial); get general(): GeneralOptionsInterface; get sidebar(): SidebarOptionsInterface; get permissions(): PermissionOptions; get callbacks(): Callbacks; get customButtons(): Partial<{ annotationbar: CustomButton[]; documentbar: CustomButton[]; informationbar: CustomButton[]; }> | undefined; } export declare class AnnotationColorOptions extends StorageClass { private options; constructor(_options?: Partial); get highlightColors(): string[]; get foregroundColors(): string[]; get backgroundColors(): string[]; get defaultHighlightColor(): string; get defaultForegroundColor(): string; get defaultBackgroundColor(): string; get highlightAnnotationColor(): string; set highlightAnnotationColor(color: string); get stickyNoteColor(): string; set stickyNoteColor(color: string); get freetextBackgroundColor(): string; set freetextBackgroundColor(color: string); set freetextFontColor(color: string); get freetextFontColor(): string; get inkColor(): string; set inkColor(color: string); get inkOpacity(): number; set inkOpacity(opacity: number); set shapeColor(color: string); get shapeColor(): string; set shapeFillColor(color: string); get shapeFillColor(): string; } export declare class AnnotationFontOptions extends StorageClass { private options; constructor(_options?: Partial); get fontFamilies(): string[]; get fontSizes(): number[]; get defaultFontFamily(): keyof Fonts; get defaultFontSize(): number; get freetextFontSize(): number; set freetextFontSize(size: number); get freetextFontFamily(): string; set freetextFontFamily(fontFamily: string); } export declare class AnnotationOptions extends StorageClass { private options; private colorOptions; private fontOptions; constructor(_options?: Partial); get stamps(): (PdfStampSetting | TextStampSetting | ImageStampSetting)[]; get colors(): AnnotationColorOptionsInterface; get fonts(): AnnotationFontOptionsInterface; get highlightOpacity(): number; get strokeWidths(): number[]; set shapeStrokeWidth(width: number); get shapeStrokeWidth(): number; set shapeStrokeStyle(style: number); get shapeStrokeStyle(): number; set inkWidth(width: number); get inkWidth(): number; set freetextBorderWidth(width: number); get freetextBorderWidth(): number; get defaultBorderWidth(): number; get defaultStampWidth(): number; get hideOnDelete(): boolean | undefined; get trackHistory(): boolean | undefined; get hideAnnotationSubject(): boolean | undefined; get onlyAuthorCanEdit(): boolean | undefined; get annotationPermissionCallback(): AnnotationPermissionCallback | undefined; get selectedStamp(): number; set selectedStamp(stampNumber: number); set eraserRadius(width: number); get eraserRadius(): number; } export declare class WebViewerOptions { private options; private annotationOptions; private formsOptions; private viewerOptions; constructor(_options?: Partial); get viewer(): ViewerOptionsInterface; get annotation(): AnnotationOptionsInterface; get forms(): FormsOptionsInterface; get modules(): CanvasModuleClass[]; set modules(modules: CanvasModuleClass[]); get shortcuts(): KeyboardShortcutsOptionsInterface; } export {};