UNPKG

@grapecity/activereports-vue

Version:

ActiveReportsJS components for Vue

93 lines (92 loc) 4.46 kB
import * as ArDesignerNs from '@grapecity/activereports/reportdesigner'; import { ResourceLocator, UnregisterHandler } from '@grapecity/activereports/core'; export interface DesignerProps { /** Sets the FontSet config. */ fontSet?: ArDesignerNs.FontSet; /** Sets the Designer interface language. */ language?: string; /** Enables Open /Save hotkeys. */ hotkeysEnabled?: boolean; /** Sets the current report. */ report?: ArDesignerNs.Report; /** Sets templates with default values for report and report items. */ customInitTemplates?: ArDesignerNs.DesignerConfig['customInitTemplates']; /** * Called on open report. * @returns Promise with report info or 'undefined' if operation was cancelled. */ onCreate?: () => Promise<ArDesignerNs.Report | ArDesignerNs.NewReport | undefined>; /** * Called on opening report. * @returns Promise with report info or 'undefined' if operation was cancelled. */ onOpen?: () => Promise<ArDesignerNs.Report | undefined>; /** * Called on saving report. * @param options Current report info. * @returns Promise with new report info if report was saved or 'undefined' if operation was cancelled. */ onSave?: (options: ArDesignerNs.SaveReportInfo) => Promise<ArDesignerNs.SaveResult | undefined>; /** * Called on saving report as new. * @param options Current report info. * @returns Promise with new report info if report was saved or 'undefined' if operation was cancelled. */ onSaveAs?: (options: ArDesignerNs.SaveNewReportInfo) => Promise<ArDesignerNs.SaveAsResult | undefined>; /** * Called on render current report. * @param report Current report info. * @param resourceLocator ResourceLocator instance. */ onRender?: (report: ArDesignerNs.ReportDefinition, resourceLocator?: Partial<ResourceLocator>) => Promise<void>; /** * Called on open custom file menu. */ onOpenFileMenu?: () => void; /** Sets the list of available images. */ imageList?: ArDesignerNs.ImageResourceInfo[]; /** Sets the list of available reports. */ reportList?: ArDesignerNs.ReportResourceInfo[]; /** Sets the list of available reports. */ themeList?: ArDesignerNs.ThemeResourceInfo[]; /** Sets the list of datasource templates. */ dataSources?: ArDesignerNs.DataSourceTemplate[]; } export interface DesignerMethods extends Record<string, Function> { /** * Sets report. * @param report Report to load. * @param whenDirty Action to perform in case of 'dirty' report. * @param isDirtyInitial Initial value for 'dirty' state after load. */ setReport(report: ArDesignerNs.Report, whenDirty?: ArDesignerNs.WhenDirty, isDirtyInitial?: boolean): Promise<void>; /** * Gets report. * @returns Promise with current report information. */ getReport(): Promise<ReportInfo>; /** * Creates report. * @param reportInfo Report info. * @param whenDirty Action to perform in case of 'dirty' report. */ createReport(reportInfo: ArDesignerNs.NewReportInfo, whenDirty?: ArDesignerNs.WhenDirty): Promise<void>; /** * Process command. * @param cmd Command name. */ processCommand(cmd: DesignerCommand): Promise<void>; } export declare type DesignerType = DesignerProps & DesignerMethods; export declare type ReportInfo = ArDesignerNs.ReportInfo; export declare type DesignerCommand = ArDesignerNs.DesignerCommand; declare type InstanceVars = { control: ArDesignerNs.Designer; actionHandlers: ArDesignerNs.ActionHandlers; resourceProvider: Partial<ArDesignerNs.ResourceProvider>; disposables: UnregisterHandler[]; }; export declare const Designer: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{}> & InstanceVars, DesignerMethods, {}, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<{}>, InstanceVars, {}, DesignerMethods, {}, {}, {}, {} & {}, { [x: number]: string; } | {}, true>); export {};