import { RuntimeConfiguration } from "./RuntimeConfiguration"; import { Product, Item } from "./ObjectModel/ObjectModel"; import { Client } from "./PostMessage/Client"; import { Item as CcItem } from "@aurigma/design-atoms/Model/Product/Items"; import { PointF } from "@aurigma/design-atoms/Math"; import { ZoomMode } from "@aurigma/design-atoms/Viewer"; import { IConfiguration, IProductThemeConfig } from "./Configuration/ConfigurationInterfaces"; import { IBarcodeData } from "./Configuration/Barcode"; export declare class Editor { private _iframe; private _postMessageClient; private _context; private _configuration; static get version(): string; constructor(_iframe: HTMLIFrameElement, postMessageClient: Client, editorUrl: string, config?: IConfiguration); getProofImages(options?: { maxWidth?: number; maxHeight?: number; pregeneratePreviewImages?: boolean; generateProductProof?: boolean; generateLargePreviews?: boolean; largePreviewMaxWidth?: number; largePreviewMaxHeight?: number; }): Promise; finishProductDesign(options?: { proofMaxWidth?: number; proofMaxHeight?: number; fileName?: string; stateId?: string; pregeneratePreviewImages?: boolean; generateProductProof?: boolean; generateLargePreviews?: boolean; largePreviewMaxWidth?: number; largePreviewMaxHeight?: number; }): Promise; saveProduct(stateId?: string): Promise; revertProduct(revertToinitial?: boolean): Promise; undo(): Promise; redo(): Promise; loadUserInfo(data?: Editor.IUserInfo): Promise; validateUserInfo(data: Editor.IUserInfo): Promise; getUnchangedItems(): Promise; subscribe(event: string, handler: (...args: any[]) => void): void; getProduct(): Promise; replaceInterpolationPlaceholders(): void; get configuration(): RuntimeConfiguration; applyProductTheme(theme: string | IProductThemeConfig): Promise; eval(code: string | Function, ...args: any[]): Promise; dispose(): void; getSelectedItems(): Promise; selectItems(items: CcItem[]): Promise; clearSelection(): Promise; selectAllItems(): Promise; setViewerSettings(settings: Editor.IViewerSettings): Promise; openGallery(params?: { tabs?: string[]; }): Promise; openGalleryForBackground(params?: { tabs?: string[]; }): Promise; openGalleryForItem(name: string, params?: { tabs?: string[]; }): Promise; private _checkParams; } export declare namespace Editor { interface IProofResult { proofImageUrls: string[][]; } interface IFinishDesignResult { proofImageUrls: string[][]; hiResOutputUrls: string[]; returnToEditUrl: string; stateId: string; userId: string; userChanges: IUserChanges; boundsData: { currentSurface: { Left: number; Top: number; Width: number; Height: number; }; }; violationWarningData: IViolationWarningData[]; } interface IUserChanges { texts: { name: string; usersValue: string; isNewItem: boolean; isRemovedItem?: boolean; }[]; inStringPlaceholders: { name: string; usersValue: string; }[]; mockups: { [surfaceName: string]: string; }; surfaces: ISurfacesChanges; } interface ISurfacesChanges { [surfaceName: string]: { texts: { name: string; usersValue: string; isNewItem: boolean; isRemovedItem?: boolean; }[]; inStringPlaceholders: { name: string; usersValue: string; }[]; }; } interface ISaveProductResult { stateId: string; userId: string; returnToEditUrl: string; } interface IContext { editor: Editor; client: Client; config: IConfiguration; editorUrl: string; } interface IUnchangedItems { items: { name: string; surface: number; }[]; } interface IViolationWarningData { type: string; name: string; surfaceName: string; surfaceIndex: number; dpiValue?: number; qualityViolationState?: ViolationState; safetyLineViolationState?: ViolationState.Warning | ViolationState.Good; regionViolationState?: ViolationState.Warning | ViolationState.Good; textCropViolationState?: ViolationState.Warning | ViolationState.Good; } enum ViolationState { None = 0, Good = 1, Warning = 2, Bad = 3 } interface IValidationResult { error: boolean; errorMessage?: string; } interface IUserInfo { [key: string]: string | IBarcodeData | ISurfaceUserInfo; } interface ISurfaceUserInfo { [key: string]: IUserInfo; } interface IViewerSettings { zoom?: number; zoomMode?: ZoomMode; scrollingPosition?: PointF; contentAngle?: number; clearSelectionOnViewerClick?: boolean; clearSelectionOnDocumentClick?: boolean; } }