/** All supported exports. */ export type ExportType = "pdf" | "excel" | "exceldata" | "docx" | "csv" | "html" | "image" | "json" | "txt" | "xml"; declare const ALL_CUSTOM_TOGGLE_ICONS_PAIRS_KEYS: readonly [ "plusMinus", "plusMinusBoxOutline", "rightBottomChevronsCircleOutline", "rightBottomDoubleChevrons", "rightBottomTriangles", "rightBottomChevrons" ]; export type CustomToggleIconsPairKey = typeof ALL_CUSTOM_TOGGLE_ICONS_PAIRS_KEYS[number]; export type CustomToggleIconsOptions = { iconsPairKey: "$default"; } | { iconsPairKey: CustomToggleIconsPairKey; fillColor?: string; lineColor?: string; }; declare const ALL_DISPLAY_TYPES: readonly [ "Page", "Galley" ]; /** All supported display types. */ export type DisplayType = typeof ALL_DISPLAY_TYPES[number]; declare const ALL_ZOOM_MODES: readonly [ "Default", "FitToPage", "FitToWidth" ]; /** All supported zoom modes. */ export type ZoomMode = typeof ALL_ZOOM_MODES[number]; declare const ALL_VIEW_MODES: readonly [ "Single", "Continuous" ]; /** All supported view modes. */ export type ViewMode = typeof ALL_VIEW_MODES[number]; /** Generic to create a type from another type with all keys and nested keys set to optional.*/ export type PartialDeep = { [attr in keyof K]?: K[attr] extends object ? PartialDeep : K[attr]; }; /** Describes hyperlink text color options. */ export type HyperlinkOptions = { /** * Specifies the hyperlink text color on urls, bookmarks and reports.\ * Default value: '#0000ff'.\ * '$theme' - hyperlink text color is used from theme hyperlink text color.\ * '$none' - hyperlink text color remains unchanged.\ * 'LightGray'|'#6495ed'|... - hyperlink text color is used from value. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value * @example * textColor: '#0000ee' */ textColor?: string; /** * Specifies the visited hyperlink text color on urls, bookmarks and reports.\ * Default value: '#800080'.\ * '$theme' - visited hyperlink text color is used from theme hyperlink text color.\ * '$none' - visited hyperlink text color remains unchanged.\ * 'LightGray'|'#6495ed'|... - visited hyperlink text color is used from value. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value * @example * visitedTextColor: '#551a8b' */ visitedTextColor?: string; /** * Specifies the hovered hyperlink text color on urls, bookmarks and reports.\ * Default value: '#0000cc'.\ * '$theme' - hovered hyperlink text color is used from theme hyperlink text color.\ * '$none' - hovered hyperlink text color remains unchanged.\ * 'LightGray'|'#6495ed'|... - hovered hyperlink text color is used from value. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value * @example * hoveredTextColor: '#5f5fee' */ hoveredTextColor?: string; }; /** All supported parameter panel show modes */ export type ParamPanelShowMode = "Default" | "Always"; /** All supported panel locations */ export type PanelsLocation = "Top" | "Right"; /** * | Key | Description | * | :-------------- | :------------------------------------------------------- | * | $split | Toolbar items splitter. | * | $navigation | Pages navigation buttons group. | * | $refresh | Refresh report. | * | $refreshcache | Refresh report from cache. | * | $history | 'Go back', 'Go forward', 'Back to parent' buttons group. | * | $mousemode | Move tool button. | * | $zoom | Zoom controls group. | * | $fullscreen | Fullscreen switcher button. | * | $print | Print report. | * | $email | Email export panel. | * | $singlepagemode | Single page mode switcher button. | * | $continuousmode | Continuous mode switcher button. | * | $galleymode | Galley mode switcher button. | * | $variants | Report data variants. | * | $thumbnail | Generate thumbnail. | */ export type ToolbarButton = ("$split" | "$navigation" | "$refresh" | "$refreshcache" | "$history" | "$mousemode" | "$zoom" | "$fullscreen" | "$print" | "$email" | "$singlepagemode" | "$continuousmode" | "$galleymode" | "$variants" | "$thumbnail"); /** Describes Page View scrollbars options on desktop devices. */ export type PageViewScrollbarsOptions = { /** * Specifies whether page view scrollbars are always visible or not.\ * If set to `true`, thumb and track `opacity` settings and `growOnHover` track setting are ignored. * Default value: `false`. * @example * alwaysVisible: true */ alwaysVisible?: boolean; /** * Specifies the page view scrollbars width in px.\ * Scrollbars width has to be greater than or equal to 4 and must not exceed 20. * @example * width: 8 */ width?: number; /** * Specifies vertical and horizontal scrollbars thumbs settings. */ thumb?: { /** * Specifies vertical and horizontal scrollbars thumbs background color.\ * Default value: '$none'.\ * '$theme' - thumb background color is used from theme background color.\ * '$none' - thumb background color remains unchanged.\ * '$none' and '$theme' colors are equal.\ * 'LightGray'|'#6495ed'|... - thumb background color is used from value. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value * @example * color: 'LightGray' */ color?: string; /** * Specifies vertical or horizontal scrollbars thumb background color on hover over the thumb.\ * Default value: '$none'.\ * '$theme' - background color is used from theme background color.\ * '$none' - background color remains unchanged.\ * If `alwaysVisible` setting is enabled, '$none' and '$theme' colors are equal.\ * 'LightGray'|'#6495ed'|... - thumb background color is used from value. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value * @example * colorHovered: 'LightGray' */ colorHovered?: string; /** * Specifies whether thumbs have to grow on hover. Default value: true.\ * This setting is applied only if `alwaysVisible` setting is disabled or track color fits al least one of the following conditions:\ * track color is not set;\ * track color equals to `transparent`;\ * track has opacity `0`. * @example * growOnHover: false */ growOnHover?: boolean; /** * Specifies the page view vertical and horizontal scrollbars thumbs opacity in `%`.\ * Thumbs opacity have to be greater than or equal to 10 and must not exceed 100.\ * This setting is ignored if `alwaysVisible` setting is enable.\ * Default value: 20. * @example * opacity: 50 */ opacity?: number; }; /** * Specifies vertical and horizontal scrollbars tracks settings. */ track?: { /** * Specifies vertical and horizontal scrollbars tracks background color.\ * Default value: '$none'.\ * '$theme' - track background color is used from theme background color.\ * '$none' - track background color remains unchanged.\ * If `alwaysVisible` setting is enabled, '$none' and '$theme' colors are equal.\ * 'LightGray'|'#6495ed'|... - background color is used from value. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value * @example * color: 'LightGray' */ color?: string; /** * Specifies the page view vertical and horizontal scrollbars tracks opacity in `%`.\ * Tracks opacity have to be greater than or equal to 0 and must not exceed 100.\ * This setting is ignored if `alwaysVisible` setting is enable.\ * Default value: 0. * @example * opacity: 10 */ opacity?: number; }; }; /** Describes the page view options. */ export type PageViewOptions = { /** * Defines horizontal alignment for report page inside view area. Default value: 'center'. * @example * horizontalAlignment: 'left' */ horizontalAlignment?: "left" | "right" | "center"; /** * Removes 'gray' background, shadows, paper borders, and other things that make 'paper view'. Default value: false. * @example * withoutPaperView: true */ withoutPaperView?: boolean; /** * Specifies page view horizontal and vertical scrollbars settings. * @example * scrollbars: { alwaysVisible: true, width: 10, thumb: { color: '$theme' } } */ scrollbars?: PageViewScrollbarsOptions; }; /** Describes load chart animation that can be applied to the report view. */ export type LoadChartAnimationOptions = { /** * Enable load chart animation. Default value: false. * @example * enabled: true */ enabled?: boolean; }; /** Describes hover chart animation that can be applied to the report view. */ export type HoverChartAnimationOptions = { /** * Enable hover chart animation. Default value: false. * @example * enabled: true */ enabled?: boolean; }; /** Describes hover table and tablix animation that can be applied to the report view. */ export type HoverTableAnimationOptions = { /** * Enable hover table and tablix animation. Default value: false. * @example * enabled: true */ enabled?: boolean; /** * Specifies the background color on hover over the table and tablix row.\ * Default value: '$theme'.\ * '$theme' - background color is used from theme background color.\ * '$none' - background color remains unchanged.\ * 'LightGray'|'#6495ed'|... - background color is used from value. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value * @example * backgroundColor: 'LightGray' */ backgroundColor?: string; /** * Specifies the text color on hover over the table and tablix row.\ * Default value: '$theme'.\ * '$theme' - text color is used from theme text color.\ * '$none' - text color remains unchanged.\ * 'LightGray'|'#6495ed'|... - text color is used from value. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value * @example * textColor: 'DarkGray' */ textColor?: string; }; /** Describes all possible values for chart tooltip fontStyle option. */ export type ChartTooltipFontStyle = "Normal" | "Italic"; /** Describes all possible values for chart tooltip fontWeight option. */ export type ChartTooltipFontWeight = "Lighter" | "Thin" | "ExtraLight" | "Light" | "Normal" | "Medium" | "SemiBold" | "Bold" | "ExtraBold" | "Heavy" | "Bolder"; /** Describes all possible values for chart tooltip borderStyle option. */ export type ChartTooltipBorderStyle = "None" | "Dotted" | "Dashed" | "Solid" | "Double" | "Groove" | "Ridge" | "Inset" | "Outset"; /** Describes chart tooltip style options. */ export type ChartTooltipAnimationOptions = { /** * Enable chart tooltip.\ * If this value is set to false, the chart tooltip will not be displayed.\ * Default value: true. * @example * enabled: false */ enabled?: boolean; /** * Specifies the chart tooltip background color.\ * Default value: '#fff'.\ * '$theme' - background color is used from theme background color.\ * '$none' - background color remains unchanged.\ * 'LightGray'|'#6495ed'|... - background color is used from value. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value * @example * backgroundColor: 'LightGray' */ backgroundColor?: string; /** * Specifies the chart tooltip text color.\ * Default value: '#333'.\ * '$theme' - text color is used from theme text color.\ * '$none' - text color remains unchanged.\ * 'LightGray'|'#6495ed'|... - text color is used from value. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value * @example * textColor: 'DarkGray' */ textColor?: string; /** * Specifies the font family used in the chart tooltip.\ * If **fontFamily** is not specified explicitly here, the default font family is used. * @example * fontFamily: 'Times New Roman' */ fontFamily?: string; /** * Specifies the size of the font used in the chart tooltip.\ * Font size can be set in px or pt. Font size value has to be greater than 6 and must not exceed 72. * Default value: '12px'.\ * @example * fontSize: '10pt' */ fontSize?: string; /** * Specifies the font style used in the chart tooltip.\ * Default value: 'Normal'.\ * @example * fontStyle: 'Italic' */ fontStyle?: ChartTooltipFontStyle; /** * Specifies the font weight used in the chart tooltip.\ * Default value: 'Normal'.\ * @example * fontWeight: 'Bold' */ fontWeight?: ChartTooltipFontWeight; /** * Specifies the color of chart tooltip borders.\ * Default value: '#292929'.\ * '$theme' - border color is used from theme border color.\ * '$none' - border color remains unchanged.\ * 'LightGray'|'#6495ed'|... - border color is used from value. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value * @example * borderColor: '#4e0000' */ borderColor?: string; /** * Specifies the size of the chart tooltip borders.\ * The value must be greater than 0 and less than 10.\ * Default value: '1px'.\ * @example * borderSize: '1pt' */ borderSize?: string; /** * Specifies the style of the chart tooltip borders.\ * Default value: 'Solid'.\ * @example * borderStyle: 'Dotted' */ borderStyle?: ChartTooltipBorderStyle; /** * Specifies the radius of the chart tooltip borders in px or pt.\ * The value must be greater or equal to 0 and less than 72.\ * Default value: '3px'.\ * @example * borderRadius: '1pt' */ borderRadius?: string; }; /** Describes animation that can be applied to the report view. */ export type AnimationOptions = { /** * Set load chart animation settings. Default value: \. * @example * loadChart: { enabled: true } */ loadChart?: LoadChartAnimationOptions; /** * Set hover chart animation settings. Default value: \. * @example * hoverChart: { enabled: true } */ hoverChart?: HoverChartAnimationOptions; /** * Set hover table and tablix animation settings. Default value: \. * @example * hoverTable: { enabled: true } */ hoverTable?: HoverTableAnimationOptions; /** * Set chart tooltip style settings. */ chartTooltip?: ChartTooltipAnimationOptions; }; /** Parameter panel's init validation modes */ export type ParameterPanelInitValidationMode = "Full" | "Fast"; /** Describes Relative Date editors options */ export type RelativeDateEditorsOptions = { /** * Enable Relative Date editor for date/date-time parameters. Default value: false. * @example * enabled: true */ enabled?: boolean; /** * A flag specifying whether to hide the date shifts editor in the Relative Date editor for date/date-time parameters. Default value: false. * @example * hideShifts: true */ hideShifts?: boolean; /** * A flag specifying whether to hide the time editor in the Relative Date editor for date-time parameters. Default value: false. * @example * hideTime: true */ hideTime?: boolean; }; /** Describes parameter panel options. */ export type ParameterPanelOptions = { /** * Set up parameters panel position. Default value: 'Right'. */ position?: PanelsLocation; /** * Set up a rule for showing parameter panel. If value is 'Always', parameter panel is shown anyway on document opening event. Default value: 'Default'. */ showMode?: ParamPanelShowMode; /** * Enables rounded corners of parameter panel's controls. Default value: false. */ roundedControls?: boolean; /** * Specifies validation mode on parameter panel's initialization. * If this option is set to 'Full' then all validation will be performed as usual. * If this option is set to 'Fast' then only basic validation of parameters will take place. This might increase Viewer opening speed significantly, however please ensure that all passed parameters values are valid. * When this option is set to 'Fast', parameter panel will be initialized with parameter's default values or values passed to Viewer on initialization (from URL, Jump To options, Viewer API, or Data Filters). This option takes effect only if **all** parameters values are defined constants. * If any of the parameters values are not set or invalid then 'Full' validation mode will be used. * Default value: 'Full'. */ initValidationMode?: ParameterPanelInitValidationMode; /** * Specifies whether to enable inline Preview button in Multivalue parameter dropdown. * If set to `true`, inline Preview button will be shown inside dropdown if any value is selected. * Default value: true. */ enableInlinePreviewButton?: boolean; /** * Specifies whether Null icon should be always shown. * If set to `false`, Null icon will be shown only on hover and when parameter value is set to Null. * Default value: false. */ alwaysShowNullIcon?: boolean; /** * Defines Relative Date editors options. * @example * relativeDateEditors: { enabled: true } */ relativeDateEditors?: RelativeDateEditorsOptions; /** * A flag specifying whether to hide the Time Zone dropdown on the Parameter Panel. Default value: false. * @example * hideTimeZone: true */ hideTimeZone?: boolean; }; /** Base notification structure */ export type BaseNotification = { /** Title or short summary of the notification */ caption: string; /** Detailed description or content of the notification */ details: string; }; /** Warning-level notification structure */ export type WarningNotification = BaseNotification; /** Error-level notification structure */ export type ErrorNotification = BaseNotification; /** * Function type to handle notification * @param notification - Notification object to be handled * @returns void */ export type NotificationHandler = (notification: T) => void; /** The other secondary options of the InitViewerOptions type. */ export type InitViewerOptionsOther = { /** * Makes the Viewer display the custom title. * @param reportName report name. * @example * makeTitle: (reportName) => reportName + ' - Wyn Enterprise' */ makeTitle?: (reportName: string) => string; /** * The array of export types available via Export functionality of Viewer. By default all `ExportType` values are used. * @example * availableExports: ['xml', 'pdf'] */ availableExports?: ExportType[]; /** * The array of toolbar buttons to be available in Viewer Toolbar. The order of toolbar buttons in this array affects Viewer.\ * By default all toolbar buttons are available. Please find below all available toolbar buttons in the predefined order:\ * \ * `'$navigation', '$split', '$refresh', '$refreshcache', '$split', '$history',`\ * `'$split', '$mousemode', '$zoom', '$fullscreen', '$split', '$print', '$email',`\ * `'$singlepagemode', '$continuousmode', '$galleymode', '$variants', '$thumbnail',`\ * \ * Here `'$split'` is used to add splitters between toolbar buttons. Leading, trailing and duplicate `'$split'` entries are omitted.\ * Toolbar buttons displayed in Viewer are intersection of this option and toolbar buttons specified in commands of the previewed report. * @example * availableToolbarButtons: ['$navigation', '$split', '$refresh', '$split', '$history', '$split', '$zoom', '$fullscreen'], */ availableToolbarButtons?: ToolbarButton[]; /** * Set up display type. Default value is report display type. * @example * displayType: 'Galley' */ displayType?: DisplayType; /** * Set up single page or continuous page. Default value: 'Single'. * @example * viewMode: 'Continuous' */ viewMode?: ViewMode; /** * Set up zoom mode. Default value 'Default'. * @example * zoomMode: 'FitToWidth' */ zoomMode?: ZoomMode; /** * Set up parameters panel position. Default value: 'Right'. * @deprecated * @example * paramPanelPosition: 'Top' */ paramPanelPosition?: PanelsLocation; /** * Set up a rule for showing parameter panel. If value is 'Always', parameter panel is shown anyway on document opening event. Default value: 'Default'. * @deprecated * @example * paramPanelShowMode: 'Always' */ paramPanelShowMode?: ParamPanelShowMode; /** * A flag specifying whether to hide the toolbars. Default value: false. * @example * hideToolbar: true */ hideToolbar?: boolean; /** * A flag specifying whether to hide the search panel. Default value: false. * @example * hideSearch: true */ hideSearch?: boolean; /** * A flag specifying whether to hide the Breadcrumbs panel. Default value: false. * @example * hideBreadcrumbs: true */ hideBreadcrumbs?: boolean; /** * A flag specifying whether to hide the Table of Contents panel. Default value: false. * @example * hideTableOfContents: true */ hideTableOfContents?: boolean; /** * Defines toolbar size. Default value: 'large'. * @example * toolbarSize: 'small' */ toolbarSize?: "small" | "medium" | "large"; /** * Disables focus highlighting timer for better accessibility. * @example * disableFocusTimer: false */ disableFocusTimer?: boolean; /** * Defines horizontal alignment, scrollbars settings and view for report page like part of the WebPage or 'paper view' * @example * pageViewOptions: { horizontalAlignment: 'right', withoutPaperView: true } */ pageViewOptions?: PageViewOptions; /** * The report view animation options. Default value: \. * @example * animation: { hoverTable: { enabled: true } } */ animation?: AnimationOptions; /** * Defines hyperlink text color settings. * @example * hyperlink: { textColor: '#0000ee', visitedTextColor: '#551a8b', hoveredTextColor: '#5f5fee' } */ hyperlink?: HyperlinkOptions; /** * Defines parameter panel options. * @example * parameterPanel: { position: 'Right', showMode: 'Always', roundedControls: true, enableInlinePreviewButton: false, alwaysShowNullIcon: true } */ parameterPanel?: ParameterPanelOptions; /** * A flag specifying whether to enable fullscreen mode.\ * Default value: fullscreen mode value specified in the opened report. * @example * isFullscreen: true */ isFullscreen?: boolean; /** * Set up report variants options. * @example * variants: { enableDefaultVariant: false } */ variants?: { /** * A flag specifying whether to enable the default variant feature for reports.\ * Default variant is applied when report is opened if no *variantId* or *parameters* passed via *OpenReportOptions*.\ * Default value: true. * @example * enableDefaultVariant: false */ enableDefaultVariant?: boolean; }; /** * Custom warning notifications handler. * If `undefined` (or not provided): keeps the default warnings handling. * If provided as a function: overrides the default warnings handling. * If `null`: explicitly suppresses warning notifications (they are not shown). * @example * onWarning: (warning) => { * console.warn(`Warning: ${warning.caption} - ${warning.details}`); * }; */ onWarning?: NotificationHandler | null; /** * Custom error notifications handler. * If `undefined` (or not provided): keeps the default errors handling. * If provided as a function: overrides the default errors handling. * If `null`: explicitly suppresses errors notifications (they are not shown). * @example * onError: (error) => { * console.error(`Error: ${error.caption} - ${error.details}`); * }; */ onError?: NotificationHandler | null; /** * If defined, this option overrides custom toggle icons specified on the report level. * @example * customToggleIcons: { * iconsPairKey: 'plusMinusBoxOutline', * fillColor: 'Lime', * lineColor: 'Teal', * } */ customToggleIcons?: CustomToggleIconsOptions; }; /** This type is derived from InitViewerOptionsOther but all its properties are recursively optional. */ export type PartialDeepViewerOptionsOther = PartialDeep; /** The base primary options of the DesignerOptions type. */ export type DesignerOptionsBase = { /** * Wyn Portal URL. * @example * designerOptions.portalUrl = 'https://wyn-portal.com/'; */ portalUrl: string; /** * The reference key needed to access the Wyn API. * @example * designerOptions.referenceToken = ''; */ referenceToken?: string; /** * The reference key name used in query parameters, configured in the Wyn Config file. * If referenceTokenKey is not specified, default value is 'token' * @example * designerOptions.referenceTokenKey = ''; */ referenceTokenKey?: string; /** * Specifies the locale used for displaying Designer.\ * If **locale** is not specified explicitly here, the locale corresponding to the browser preferences is used. * @example * designerOptions.locale = 'zh'; */ locale?: Locale; /** * You can plug-in **Report Viewer** component by providing **openViewer** function to **designerOptions**.\ * When **openViewer** is passed to **designerOptions** and **previewButton.visible** is set to **true** in **designerOptions**, then **Preview** button appears in Designer. * @param options ViewerOptions * @example * designerOptions.openViewer = function(options) { * // ... create viewer and open report * }; */ openViewer?: (options: ViewerOptions) => void; /** * If **reportInfo.id** is specified, the corresponding document (report or template) will be opened in Designer when Designer application is rendered. */ reportInfo: { /** * Specify the report (or template) id to open it in Designer when Designer application is rendered. * @example * designerOptions.reportInfo.id = '6e975775-38e3-4ac5-b92c-0ff7dab091a6'; */ id?: string | null; /** * Specify the exact report (or template) version if not the latest version needs to be opened. * @example * designerOptions.reportInfo.version = 5; */ version?: number | null; /** * Specify whether a report or a template is opened. * @example * designerOptions.isTemplate = true; */ isTemplate?: boolean; /** * Specify whether a report or a template is opened in the read-only mode so saving any changes is prohibited. * By default this option is **disabled** so saving report or template changes is allowed. * @example * designerOptions.readOnly = true; */ readOnly?: boolean; }; /** * Overrides the default About info. * @example * designerOptions.aboutInfo.applicationTitle = 'Report Designer'; * designerOptions.aboutInfo.applicationTitleCompact = 'Designer'; * designerOptions.aboutInfo.productTitle = ''; * designerOptions.aboutInfo.productVersion = '1.2.3'; */ aboutInfo: ApplicationInfo & ProductInfo; }; /** Report item property descriptor. */ export type PropertyDescriptor = { /** property category */ category: string; /** property label */ label: string; /** property type */ type: string; /** property value path */ valuePath: string; /** property mode */ mode: "simple" | "advanced" | "both"; /** property metadata */ meta?: Record; }; /** The other secondary options of the DesignerOptions type. */ export type DesignerOptionsOther = { /** * Specifies the default measurement units used in Designer.\ * If **units** are not specified explicitly here, they are identified depending on **locale**. * @example * designerOptions.units = 'cm'; */ units?: Units; /** * Specifies the list of fonts displayed in **Font Family** drop-downs all over Designer.\ * If **fonts** are not specified explicitly here, the default list of fonts is used. * @example * designerOptions.fonts = ['Arial', 'Courier New', 'Times New Roman']; */ fonts?: string[]; /** * It is possible to limit and/or reorder the list of available report items.\ * Specify comma-separated report items keys from this list: * ```none * BandedList, Barcode, Bullet, Chart, CheckBox, Container, FormattedText, Image, InputField, Line, List, * OverflowPlaceholder, Shape, Sparkline, Subreport, Table, TableOfContents, Tablix, TextBox * ``` * @example * designerOptions.reportItems = 'TextBox,CheckBox,Table,Chart,Image'; */ reportItems?: string; /** * Customizable report items features are specified here. */ reportItemsFeatures: { /** Barcode features */ barcode: { /** * Overrides the default symbology used for newly-created barcodes.\ * By default new barcodes are created with **QRCode** symbology. * @example * designerOptions.reportItemsFeatures.barcode.defaultSymbology = 'Code_128_A'; */ defaultSymbology?: BarcodeSymbology; /** * Limits the list of barcode symbologies available for creation.\ * By default all barcode symbologies supported by Designer are available. * @example * designerOptions.reportItemsFeatures.barcode.symbologies = ['Code_128_A', 'Code_128_B', 'Code_128_C']; */ symbologies?: BarcodeSymbology[]; }; /** Chart features */ chart: { /** * Specifies whether **Chart Wizard** is available for creating Chart.\ * By default this feature is **enabled**. * @example * designerOptions.reportItemsFeatures.chart.canUseWizard = false; */ canUseWizard: boolean; }; /** Table features */ table: { /** * Specifies whether **Table Header** needs to be auto-filled when a field is dropped to **Table Details**.\ * For example, if **ProductName** field is dropped to **Details**, **Product Name** value is set to **Header**.\ * By default this feature is **enabled**. * @example * designerOptions.reportItemsFeatures.table.autoFillHeader = false; */ autoFillHeader: boolean; /** * Specifies whether **Table Footer** needs to be auto-filled when a field is dropped to **Table Details**.\ * For example, if **ProductName** field is dropped to **Details**, **{Count(ProductName)}** value is set to **Footer**.\ * By default this feature is **disabled**. * @example * designerOptions.reportItemsFeatures.table.autoFillFooter = true; */ autoFillFooter: boolean; /** * Specifies whether vertical merge of cells is enabled within **Table Header**, **Details** and **Footer**.\ * By default this feature is **enabled**. * @example * designerOptions.reportItemsFeatures.table.canMergeCellsVertically = false; */ canMergeCellsVertically: boolean; }; /** Tablix features */ tablix: { /** * Specifies whether **Tablix Corner Cell** needs to be auto-filled when a field is dropped to **Tablix Row Group Cell**.\ * For example, if **ProductName** field is dropped to **Row Group Cell**, **Product Name** value is set to **Corner Cell**.\ * By default this feature is **enabled**. * @example * designerOptions.reportItemsFeatures.tablix.autoFillCorner = false; */ autoFillCorner: boolean; /** * Specifies whether **Tablix Wizard** is available for creating/editing Tablix.\ * By default this feature is **enabled**. * @example * designerOptions.reportItemsFeatures.tablix.canUseWizard = false; */ canUseWizard: boolean; }; }; /** * When **lockLayout** is enabled, it is only possible to modify properties of existing report items.\ * I.e., adding a new report item or deleting an existing one is not possible as well as other operations that modify report layout structure.\ * By default this feature is **disabled**. * @example * designerOptions.lockLayout = true; */ lockLayout: boolean; /** * When **restoreUnsavedReport** is **enabled**, the last unsaved report can be restored if browser tab or browser itself gets accidentally closed.\ * In case **restoreUnsavedReport** is **disabled**, the aforementioned functionality is not available.\ * By default this feature is **enabled**. * @example * designerOptions.restoreUnsavedReport = false; */ restoreUnsavedReport: boolean; /** * Allows specifying user-defined Help links to be shown in Designer About dialog. * @example * designerOptions.helpInfos = [ * { title: 'My Documentation', link: 'https://main-documentation.com/' }, * { link: 'https://other-documentation.com/' }, * ]; */ helpInfos?: HelpInfo[]; /** **Preview** button settings */ previewButton: { /** * Specifies whether **Preview** button needs to be shown.\ * If this option is set to true and **openViewer** is passed to **designerOptions**, then **Preview** button appears in Designer.\ * **Preview** button is **visible** by default. * @example * designerOptions.previewButton.visible = false; */ visible: boolean; }; /** **Save** button settings */ saveButton: { /** * Specifies whether **Save** button needs to be shown.\ * If **Save** button is **not visible**, then **Save As** button will be **not visible** as well.\ * **Save** button is **visible** by default. * @example * designerOptions.saveButton.visible = false; */ visible: boolean; }; /** **Save As** button settings */ saveAsButton: { /** * Specifies whether **Save As** button needs to be shown.\ * If **Save** button is **not visible**, then **Save As** button will be **not visible** as well.\ * **Save As** button is **visible** by default. * @example * designerOptions.saveAsButton.visible = false; */ visible: boolean; }; /** **Insert** tab settings */ insertTab: { /** * Specifies whether **Insert** tab needs to be shown in Designer application bar.\ * **Tool Box** and **Insert** tab are interchangeable.\ * **Insert** tab is **not visible** by default. * @example * designerOptions.insertTab.visible = true; */ visible: boolean; }; /** **Parameters View** settings */ parametersView: { /** * Specifies whether **Parameters View** button needs to be shown.\ * **Parameters View** button is **visible** by default. * @example * designerOptions.parametersView.visible = false; */ visible: boolean; }; /** **About** button settings */ aboutButton: { /** * Specifies whether **About** button needs to be shown.\ * **About** button is **visible** by default. * @example * designerOptions.aboutButton.visible = false; */ visible: boolean; }; /** **Report Explorer** settings */ reportExplorer: { /** * Specifies whether **Report Explorer** button needs to be shown.\ * **Report Explorer** button is **visible** by default. * @example * designerOptions.reportExplorer.visible = false; */ visible: boolean; }; /** **Group Editor** settings */ groupEditor: { /** * Specifies whether **Group Editor** button needs to be shown.\ * **Group Editor** button is **visible** by default. * @example * designerOptions.groupEditor.visible = false; */ visible: boolean; }; /** **Layers Editor** settings */ layersEditor: { /** * Specifies whether **Layers Editor** button needs to be shown.\ * **Layers Editor** button is **visible** by default. * @example * designerOptions.layersEditor.visible = false; */ visible: boolean; }; /** **Tool Box** settings */ toolBox: { /** * Specifies whether left-side menu **Tool Box** needs to be shown.\ * **Tool Box** is **visible** by default. * @example * designerOptions.toolBox.visible = false; */ visible: boolean; }; /** * It is possible to implement custom logic to filter and reorder `descriptors` of `reportItem` properties. * @param descriptors descriptors of report item properties * @param reportItem report item which properties are displayed * @example * designerOptions.filterProperties = function(descriptors, reportItem) { * if (reportItem.Type !== 'textbox') return descriptors; * return descriptors.filter(desc => desc.valuePath !== 'Value'); * }; */ filterProperties?: (descriptors: PropertyDescriptor[], reportItem: Record) => PropertyDescriptor[]; /** **Properties** tab settings */ propertiesTab: { /** * Specifies whether **Properties** tab needs to be shown.\ * **Properties** tab is **visible** by default. * @example * designerOptions.propertiesTab.visible = false; */ visible: boolean; /** * Specifies available properties modes.\ * The default value is **Both**. * @example * designerOptions.propertiesTab.mode = 'Basic'; */ mode: "Basic" | "Advanced" | "Both"; /** * Relevant only when **mode** is **Both**.\ * If *undefined*, the last used properties mode is set. * @example * designerOptions.propertiesTab.defaultMode = 'Advanced'; */ defaultMode?: "Basic" | "Advanced"; }; /** **Data** tab settings */ dataTab: { /** * Specifies whether **Data** tab needs to be shown.\ * **Data** tab is **visible** by default. * @example * designerOptions.dataTab.visible = false; */ visible: boolean; /** **Data Sources** section settings */ dataSources: { /** * Specifies whether **Data Sources** section needs to be shown.\ * **Data Sources** section is **visible** by default. * @example * designerOptions.dataTab.dataSources.visible = false; */ visible: boolean; /** * Specifies whether it is possible to remove data sources.\ * By default this feature is **enabled**. * @example * designerOptions.dataTab.dataSources.canModify = false; */ canModify: boolean; /** * Specifies whether it is possible to replace data sources and semantic models.\ * This feature is applied when `canModify` is **enabled**, otherwise `canReplace` is always **disabled**. * By default this feature is **enabled**. * @example * designerOptions.dataTab.dataSources.canReplace = false; */ canReplace: boolean; }; /** **Data Sets** section settings */ dataSets: { /** * Specifies whether **Data Sets** section needs to be shown.\ * **Data Sets** section is **visible** by default. * @example * designerOptions.dataTab.dataSets.visible = false; */ visible: boolean; /** * Specifies whether it is possible to modify (including add/edit/remove) data sets.\ * By default this feature is **enabled**. * @example * designerOptions.dataTab.dataSets.canModify = false; */ canModify: boolean; /** * Specifies whether it is possible to add calculated fields for server data sets. * * - If this option is set to `true`, then the `Edit` icon is shown next to server data set name in `Data Panel`. * - If this option is set to `false`, then the `Fields` category is not shown in the `Edit Data Set` dialog. * - The `Edit` icon is not shown in case all edit-related options are disabled and server data set has no parameters. * * The option is applied only when `canModify` is **enabled**, otherwise `canEditCalculatedFieldsForServerDataSets` is **disabled**.\ * By default this feature is **enabled**. * @example * designerOptions.dataTab.dataSets.canEditCalculatedFieldsForServerDataSets = false; */ canEditCalculatedFieldsForServerDataSets: boolean; /** * Specifies whether it is possible to add filters for server data sets. * * - If this option is set to `true`, then the `Edit` icon is shown next to server data set name in `Data Panel`. * - If this option is set to `false`, then the `Filters` category is not shown in the `Edit Data Set` dialog. * - The `Edit` icon is not shown in case all edit-related options are disabled and server data set has no parameters. * * The option is applied only when `canModify` is **enabled**, otherwise `canEditFiltersForServerDataSets` is **disabled**.\ * By default this feature is **enabled**. * @example * designerOptions.dataTab.dataSets.canEditFiltersForServerDataSets = false; */ canEditFiltersForServerDataSets: boolean; /** * Specifies whether it is possible to open the external Dataset Designer to edit server data sets.\ * The corresponding data set dropdown menu option appears when this feature is enabled.\ * This feature is applied when `canModify` is **enabled**, otherwise `canEditServerDataSets` is always **disabled**. * By default this feature is **enabled**. * @example * designerOptions.dataTab.dataSets.canEditServerDataSets = false; */ canEditServerDataSets: boolean; /** * Specifies whether it is possible to replace data sets.\ * The corresponding data set dropdown menu option appears when this feature is enabled.\ * This feature is applied when `canModify` is **enabled**, otherwise `canReplace` is always **disabled**. * By default this feature is **enabled**. * @example * designerOptions.dataTab.dataSets.canReplace = false; */ canReplace: boolean; /** * Specifies whether it is possible to update server data sets to their latest versions.\ * The corresponding data set dropdown menu option appears when this feature is enabled.\ * This feature is applied when `canModify` is **enabled**, otherwise `canUpdate` is always **disabled**. * By default this feature is **enabled**. * @example * designerOptions.dataTab.dataSets.canUpdate = false; */ canUpdate: boolean; /** * Specifies whether it is allowed to auto-generate calculated fields transformed to user time zone for bound Date/DateTime fields.\ * By default this feature is **enabled**. * @example * designerOptions.dataTab.dataSets.autoGenerateCalculatedFieldsWithUserTimeZone = false; */ autoGenerateCalculatedFieldsWithUserTimeZone: boolean; /** * Specifies whether it is allowed to auto-generate calculated fields transformed to render time zone for bound Date/DateTime fields.\ * By default this feature is **enabled**. * @example * designerOptions.dataTab.dataSets.autoGenerateCalculatedFieldsWithRenderTimeZone = false; */ autoGenerateCalculatedFieldsWithRenderTimeZone: boolean; /** Hidden Server Data Set parameters settings */ hiddenServerDataSetParameters: { /** * Specifies whether hidden data sets parameters and bound report parameters should be shown in Data Panel.\ * If this option is set true, then parameters are shown in Data panel as read-only.\ * By default this feature is **disabled**. * @example * designerOptions.dataTab.dataSets.hiddenServerDataSetParameters.visible = true; */ visible: boolean; }; /** **Data Set Picker** settings */ picker: { /** * It is possible to limit and/or reorder the list of data resources used for data sets creation.\ * Specify comma-separated data resources keys from this list: * ```none * DataSets, DataSources, SemanticModels * ``` * The default value is **DataSets,SemanticModels,DataSources**. * @example * designerOptions.dataTab.dataSets.picker.dataResources = 'SemanticModels,DataSets'; */ dataResources?: string; }; }; /** **Parameters** section settings */ parameters: { /** * Specifies whether **Parameters** section needs to be shown.\ * **Parameters** section is **visible** by default. * @example * designerOptions.dataTab.parameters.visible = false; */ visible: boolean; /** * Specifies whether it is possible to modify (including add/edit/remove) report parameters.\ * By default this feature is **enabled**. * @example * designerOptions.dataTab.parameters.canModify = false; */ canModify: boolean; }; /** **Common Values** section settings */ commonValues: { /** * Specifies whether **Common Values** section needs to be shown.\ * **Common Values** section is **visible** by default. * @example * designerOptions.dataTab.commonValues.visible = false; */ visible: boolean; }; }; /** **Info** tab settings */ infoTab: { /** * Specifies whether **Info** tab needs to be shown.\ * **Info** tab is **visible** by default. * @example * designerOptions.infoTab.visible = false; */ visible: boolean; /** **Permissions** editor settings */ permissions: { /** * Specifies whether **Permissions** editor needs to be shown.\ * **Permissions** editor is **visible** by default. * @example * designerOptions.infoTab.permissions.visible = false; */ visible: boolean; /** * Specifies whether it is possible to modify (including add/edit/remove) permissions.\ * By default this feature is **enabled**. * @example * designerOptions.infoTab.permissions.canModify = false; */ canModify: boolean; }; /** **Caching** editor settings */ caching: { /** * Specifies whether **Caching** editor needs to be shown.\ * **Caching** editor is **visible** by default. * @example * designerOptions.infoTab.caching.visible = false; */ visible: boolean; /** * Specifies whether it is possible to modify caching settings.\ * By default this feature is **enabled**. * @example * designerOptions.infoTab.caching.canModify = false; */ canModify: boolean; }; /** **Commands** editor settings */ commands: { /** * Specifies whether **Commands** editor needs to be shown.\ * **Commands** editor is **visible** by default. * @example * designerOptions.infoTab.commands.visible = false; */ visible: boolean; /** * Specifies whether it is possible to modify (including add/remove) commands.\ * By default this feature is **enabled**. * @example * designerOptions.infoTab.commands.canModify = false; */ canModify: boolean; }; /** **Custom Toggle Icons** editor settings */ customToggleIcons: { /** * Specifies whether **Custom Toggle Icons** editor needs to be shown.\ * **Custom Toggle Icons** editor is **visible** by default. * @example * designerOptions.infoTab.customToggleIcons.visible = false; */ visible: boolean; }; /** **Jump To Report** editor settings */ jumpToReport: { /** * Specifies whether **Jump To Report** editor needs to be shown.\ * **Jump To Report** editor is **visible** by default. * @example * designerOptions.infoTab.jumpToReport.visible = false; */ visible: boolean; }; /** **Jump To URL** editor settings */ jumpToURL: { /** * Specifies whether **Jump To URL** editor needs to be shown.\ * **Jump To URL** editor is **visible** by default. * @example * designerOptions.infoTab.jumpToURL.visible = false; */ visible: boolean; }; /** **Render Time Zone** editor settings */ renderTimeZone: { /** * Specifies whether **Render Time Zone** editor needs to be shown.\ * **Render Time Zone** editor is **visible** by default. * @example * designerOptions.infoTab.renderTimeZone.visible = false; */ visible: boolean; }; /** **Hyperlink** editor settings */ hyperlink: { /** * Specifies whether **Hyperlink** editor needs to be shown.\ * **Hyperlink** editor is **visible** by default. * @example * designerOptions.infoTab.hyperlink.visible = false; */ visible: boolean; }; }; /** **Grid Size** editor settings */ gridSize: { /** * Specifies whether **Grid Size** editor in Status Bar needs to be shown.\ * **Grid Size** editor is **visible** by default. * @example * designerOptions.gridSize.visible = false; */ visible: boolean; /** * If **Grid Size** editor is **not visible**, it is possible to specify **Grid Size** value in **in/cm** (i.e. inches or centimeters). * @example * designerOptions.gridSize.value = '0.5in'; */ value?: string; }; /** **Snap Editor** settings */ snapEditor: { /** * Specifies whether **Snap Editor** button in Status Bar needs to be shown.\ * **Snap Editor** button is **visible** by default. * @example * designerOptions.snapEditor.visible = false; */ visible: boolean; snapToGrid: { /** * If **Snap Editor** is **visible**, it is possible to specify whether **Snap to Grid** toggle in **Snap Editor** needs to be shown.\ * **Snap to Grid** toggle is **visible** by default. * @example * designerOptions.snapEditor.snapToGrid.visible = false; */ visible: boolean; /** * Specifies whether **Snap to Grid** option is enabled by default.\ * @example * designerOptions.snapEditor.snapToGrid.value = true; */ value?: boolean; }; snapToGuides: { /** * If **Snap Editor** is **visible**, it is possible to specify whether **Snap to Guides** toggle in **Snap Editor** needs to be shown.\ * **Snap to Guides** toggle is **visible** by default. * @example * designerOptions.snapEditor.snapToGuides.visible = false; */ visible: boolean; /** * Specifies whether **Snap to Guides** option is enabled by default.\ * @example * designerOptions.snapEditor.snapToGuides.value = true; */ value?: boolean; }; }; /** **Show Grid** toggle settings */ showGrid: { /** * Specifies whether **Show Grid** toggle in Status Bar needs to be shown.\ * **Show Grid** toggle is **visible** by default. * @example * designerOptions.showGrid.visible = false; */ visible: boolean; /** * If **Show Grid** toggle is **not visible**, it is possible to specify **Show Grid** value as *true* or *false*. * @example * designerOptions.showGrid.value = false; */ value?: boolean; }; /** **Show Rulers** toggle settings */ showRulers: { /** * Specifies whether **Show Rulers** toggle in Status Bar needs to be shown.\ * **Show Rulers** toggle is **visible** by default. * @example * designerOptions.showRulers.visible = false; */ visible: boolean; /** * Specifies whether **Show Rulers** toggle is enabled by default. Default value is *false*. * @example * designerOptions.showRulers.value = true; */ value?: boolean; }; /** **Zoom Editor** settings */ zoomEditor: { /** * Specifies whether **Zoom Editor** button in Status Bar needs to be shown.\ * **Zoom Editor** button is **visible** by default. * @example * designerOptions.zoomEditor.visible = false; */ visible: boolean; }; saveDialog: { /** * Specifies whether it is possible to set a revision comment in Save dialog.\ * By default this feature is **enabled**. * @example * designerOptions.saveDialog.canSetComment = false; */ canSetComment: boolean; /** * Specifies whether report can be saved silently without showing Save dialog.\ * This option only takes effect if all of the following conditions are met: * - the option is enabled * - designerOptions.saveDialog.canSetComment option is disabled * - the Publish toggle is not displayed (either the drafts feature is disabled, or the user doesn't have permissions to publish drafts, or the saved document is a template) * - report is not a master report * * By default this feature is **enabled**. * @example * designerOptions.saveDialog.canSaveSilently = false; */ canSaveSilently: boolean; }; /** **Save As** dialog settings */ saveAsDialog: { /** * Specifies whether it is possible to set categories.\ * By default this feature is **enabled**. * @example * designerOptions.saveAsDialog.canSetCategories = false; */ canSetCategories: boolean; /** * Specifies whether report can be saved as a template.\ * By default this feature is **enabled**. * @example * designerOptions.saveAsDialog.canSaveReportAsTemplate = false; */ canSaveReportAsTemplate: boolean; /** * Specifies whether template can be saved as a report.\ * By default this feature is **enabled**. * @example * designerOptions.saveAsDialog.canSaveTemplateAsReport = false; */ canSaveTemplateAsReport: boolean; /** * Specifies whether it is possible to set a revision comment in Save As dialog.\ * By default this feature is **enabled**. * @example * designerOptions.saveAsDialog.canSetComment = false; */ canSetComment: boolean; }; /** * Disables focus highlighting timer for better accessibility.\ * The default value is *false*. * @example * designerOptions.disableFocusTimer = true; */ disableFocusTimer?: boolean; /** * Specifies the expression syntax used in Designer: * - **i11n** - interpolation syntax * - **rdl** - "old" rdl expression syntax * * By default the **interpolation syntax** is used for expressions. * @example * designerOptions.expressionSyntax = 'rdl'; */ expressionSyntax: "i11n" | "rdl"; /** * It is possible to implement custom logic for updating route when edited report info gets updated in Designer.\ * Report info - **id** / **version** / **isTemplate** - is updated on creating/opening/saving a report - after that **updateRoute** is called.\ * By default **updateRoute** is *undefined* so route remains unchanged. * @param options UpdateRouteOptions * @example * designerOptions.updateRoute = function(options) { * // ... custom logic for updating route * }; */ updateRoute?: (options: UpdateRouteOptions) => void; /** * It is possible to implement custom logic to be executed after a report is saved. * @param options OnSavedOptions * @example * designerOptions.onSaved = function(options) { * // ... custom logic to be executed after a report is saved * }; */ onSaved?: (options: OnSavedOptions) => void; /** * It is possible to implement custom logic for making a title of a browser tab containing Designer.\ * By default **makeTitle** is *undefined* so title remains unchanged. * @param reportName string - report (or template) name * @param options MakeTitleOptions * @example * designerOptions.makeTitle = function(reportName, options) { * // ... custom logic for making a title * }; */ makeTitle?: (reportName: string, options: MakeTitleOptions) => string; /** * It is possible to implement custom logic on failed report (or template) operation. * @param operation ReportOperation - report (or template) operation * @param options OnErrorOptions * @example * designerOptions.onError = function(operation, options) { * console.log(`[${operation}] ${options.errorCaption}`); * console.log(options.errorDetails.join('\n\n')); * }; */ onError?: (operation: ReportOperation, options: OnErrorOptions) => void; /** * It is possible to implement custom logic on closing Designer.\ * If `onClose` is specified, ✕ button appears in the top right corner. * @param options OnCloseOptions * @example * designerOptions.onClose = function(options) { * Wyn.Reporting.Designer.destroy(); * }; */ onClose?: (options?: OnCloseOptions) => void; /** * It is possible to implement custom logic on closing Viewer. * @example * designerOptions.onCloseViewer = function() { * // ... custom logic to be executed on closing Viewer * }; */ onCloseViewer?: () => void; }; /** This type is derived from DesignerOptionsOther but all its properties are recursively optional. */ export type PartialDeepDesignerOptionsOther = PartialDeep; /** Type of the return value of the `Wyn.Reporting.Designer.createDesignerOptions()` function. */ export type DesignerOptions = DesignerOptionsBase & DesignerOptionsOther; /** Type of the `GetLocalizationResourcesSuccessResult.resourceBundles` array element. */ export type LocalizationResourceBundle = { /** bundle namespace */ ns: string; /** localization resources */ resources: Record; }; /** Type of **success** result returned by the `Wyn.Reporting.Designer.addLocalization()` function. */ export type AddLocalizationSuccessResult = { /** success result type */ type: "success"; }; /** Type of **error** result returned by the `Wyn.Reporting.Designer.addLocalization()` function. */ export type AddLocalizationErrorResult = { /** error result type */ type: "error"; /** error caption */ errorCaption: string; /** error details */ errorDetails: string[]; }; /** Type of result returned by the `Wyn.Reporting.Designer.addLocalization()` function. */ export type AddLocalizationResult = AddLocalizationSuccessResult | AddLocalizationErrorResult; /** Type of **success** result returned by the `Wyn.Reporting.Designer.getLocalizationResources()` function. */ export type GetLocalizationResourcesSuccessResult = { /** success result type */ type: "success"; /** localization resource bundles */ resourceBundles: LocalizationResourceBundle[] | undefined; }; /** Type of **error** result returned by the `Wyn.Reporting.Designer.getLocalizationResources()` function. */ export type GetLocalizationResourcesErrorResult = { /** error result type */ type: "error"; /** error caption */ errorCaption: string; /** error details */ errorDetails: string[]; }; /** Type of result returned by the `Wyn.Reporting.Designer.getLocalizationResources()` function. */ export type GetLocalizationResourcesResult = GetLocalizationResourcesSuccessResult | GetLocalizationResourcesErrorResult; /** Type of the `Wyn.Reporting.Designer` object. */ export type DesignerApi = { /** * Creates the default `DesignerOptions` object to be passed to the `Wyn.Reporting.Designer.renderApplication()` function. * @param portalUrl Wyn Portal URL. * @param referenceToken The reference key needed to access the Wyn API. * @example * const designerOptions = Wyn.Reporting.Designer.createDesignerOptions('', ''); */ createDesignerOptions: (portalUrl: string, referenceToken?: string) => DesignerOptions; /** * Renders Designer to the **div** element with id **designerElementId** using the specified **designerOptions**. * @param designerElementId string - for now the **div id** must **always** be `report-designer-app` * @param designerOptions DesignerOptions * @example * Wyn.Reporting.Designer.renderApplication('report-designer-app', designerOptions); */ renderApplication: (designerElementId: string, designerOptions: DesignerOptions) => Promise; /** * Adds custom localization resources for Report Designer.\ * Then it is required to pass `lng` to `designerOptions.locale` to apply added resources. * @param lng language code * @param resourceBundles LocalizationResourceBundle[] * @example * const result = Wyn.Reporting.Designer.addLocalization('zh-CN', resourceBundles); * if (result.type === 'success') designerOptions.locale = 'zh-CN'; * else console.error([result.errorCaption, ...result.errorDetails].join('\n')); */ addLocalization: (lng: string, resourceBundles: LocalizationResourceBundle[]) => AddLocalizationResult; /** * Gets custom localization resources provided by the Wyn API.\ * Obtained resources are intended for `Wyn.Reporting.Designer.addLocalization()`. * @param lng language code * @param portalUrl Wyn Portal URL. * @param referenceToken The reference key needed to access the Wyn API. * @example * const result = Wyn.Reporting.Designer.getLocalizationResources('zh-CN', '', ''); * if (result.type === 'success') Wyn.Reporting.Designer.addLocalization('zh-CN', result.resourceBundles); * else console.error([result.errorCaption, ...result.errorDetails].join('\n')); */ getLocalizationResources: (lng: string, portalUrl: string, referenceToken?: string) => Promise; /** * Closes Viewer that is plugged-in to Designer via **designerOptions.openViewer()**. * @example * Wyn.Reporting.Designer.closeViewer(); */ closeViewer: () => void; /** * Destroys Designer. * * If it is needed to continue work with Designer after destroying it, it is mandatory to call `Wyn.Reporting.Designer.renderApplication()` again. * @example * Wyn.Reporting.Designer.destroy(); */ destroy: () => void; /** * Returns focus to Designer. Focus may be lost when plugged-in or external components are opened/closed.\ * Returning focus is essential to continue using Designer hotkeys like Ctrl+Z (undo), Ctrl+Y (redo), etc. * @example * Wyn.Reporting.Designer.focus(); */ focus: () => void; /** * This object includes functions allowing to create/open/save report, etc. */ api: ReportingApi; }; /** Predefined locales supported by Designer. */ export type PredefinedLocale = "en" | "en-GB" | "pl" | "zh" | "zh-TW"; /** Type of `DesignerOptions.locale` and `ViewerOptions.locale`. */ export type Locale = PredefinedLocale | string; /** Measurement units supported by Designer. */ export type Units = "in" | "cm"; export type DocumentType = "report" | "reportTemplate" | "masterReport"; /** Type of `options` passed to the `DesignerOptions.updateRoute()` function. */ export type UpdateRouteOptions = { /** report (or template) id */ id: string | null; /** report (or template) version */ version: string | number | null; /** is document a report or a template */ isTemplate: boolean; }; /** Type of `options` passed to the `DesignerOptions.onSaved()` function. */ export type OnSavedOptions = { /** saved report (or template) id */ id: string; /** saved report (or template) name */ name: string; /** is saved document a report or a template * @deprecated Use `documentType` instead. */ isTemplate: boolean; /** document type */ documentType: DocumentType; }; /** Type of `options` passed to the `DesignerOptions.onClose()` function. */ export type OnCloseOptions = { /** closed report (or template) id */ id: string | null; /** closed report (or template) name */ name: string; /** is closed document a report or a template * @deprecated Use `documentType` instead. */ isTemplate: boolean; /** is closed document a master report or not * @deprecated Use `documentType` instead. */ isMaster: boolean; /** document type */ documentType: DocumentType; }; /** Type of `options` passed to the `DesignerOptions.makeTitle()` function. */ export type MakeTitleOptions = { /** report (or template) id */ id: string | null; /** report (or template) version */ version: string | number | null; /** is document a report or a template */ isTemplate: boolean; /** specifies whether report (or template) has unsaved changes */ dirty: boolean; }; /** Type of report (or template) `operation` passed to the `DesignerOptions.onError()` function. */ export type ReportOperation = "create" | "open" | "save" | "preview" | "restore"; /** Type of `options` passed to the `DesignerOptions.onError()` function. */ export type OnErrorOptions = { /** * report (or template) id * * If operation on an existing report (or template) failed, **id** is defined.\ * Otherwise, **id** is *null*. */ id: string | null; /** report (or template) name */ name: string; /** report (or template) version - relevant for errors on `open` operation only */ version?: number | null; /** is document a report or a template */ isTemplate: boolean; /** error caption */ errorCaption: string; /** error details */ errorDetails: string[]; }; /** Partial type of the `DesignerOptions.aboutInfo` object. */ export type ApplicationInfo = { /** * Specifies the application title to be used in Designer. * @example * applicationTitle: 'Report Designer' */ applicationTitle?: string; /** * Specifies the compact application title to be used in Designer in places where there is not enough space for a full title. * @example * applicationTitleCompact: 'Designer' */ applicationTitleCompact?: string; }; /** Partial type of the `DesignerOptions.aboutInfo` object. */ export type ProductInfo = { /** * Specifies the product title to be shown in Designer About dialog. * @example * productTitle: '' */ productTitle?: string; /** * Specifies the product version to be shown in Designer About dialog. * @example * productVersion: '1.2.3' */ productVersion?: string; }; /** Type of an array element of the `DesignerOptions.helpInfos` array. */ export type HelpInfo = { /** * Specifies the Help page title. * @example * title: 'My Documentation' */ title?: string; /** * Specifies the Help page URL. * @example * link: 'https://main-documentation.com/' */ link: string; }; /** Barcode symbologies supported by Designer. */ export type BarcodeSymbology = "Ansi39" | "Ansi39x" | "Aztec" | "BC412" | "Codabar" | "Code_11" | "Code_128_A" | "Code_128_B" | "Code_128_C" | "Code_128auto" | "Code_2_of_5" | "Code_93" | "Code25intlv" | "Code39" | "Code39x" | "Code49" | "Code93x" | "DataMatrix" | "EAN_13" | "EAN_8" | "EAN128FNC1" | "GS1DataMatrix" | "GS1QRCode" | "HIBCCode128" | "HIBCCode39" | "IATA_2_of_5" | "IntelligentMail" | "IntelligentMailPackage" | "ISBN" | "ISMN" | "ISSN" | "ITF14" | "JapanesePostal" | "Matrix_2_of_5" | "MaxiCode" | "MicroPDF417" | "MicroQRCode" | "MSI" | "Pdf417" | "Pharmacode" | "Plessey" | "PostNet" | "PZN" | "QRCode" | "RM4SCC" | "RSS14" | "RSS14Stacked" | "RSS14StackedOmnidirectional" | "RSS14Truncated" | "RSSExpanded" | "RSSExpandedStacked" | "RSSLimited" | "SSCC_18" | "Telepen" | "UCCEAN128" | "UPC_A" | "UPC_E0" | "UPC_E1"; /** Type of `options` passed to the `DesignerOptions.openViewer()` function. */ export type ViewerOptions = { /** element id where to render viewer */ element: string; /** locale passed by Designer */ locale: Locale; /** application title passed by Designer */ applicationTitle: string; /** information on the report (or template) to-be-previewed */ reportInfo: { /** report (or template) id */ id: string; /** report (or template) name */ name: string; /** is to-be-previewed document a report or a template */ isTemplate: boolean; /** * Specifies whether the report (or template) to-be-previewed is an existing one saved on server side. */ isTemporary?: boolean; }; /** additional init Viewer options that are passed to `Wyn.Reporting.Designer.api.previewReport()` */ initOptions?: PartialDeepViewerOptionsOther; }; /** Type of the `Wyn.Reporting.Designer.api` object. */ export type ReportingApi = { /** * Indicates whether report (or template) has unsaved changes. * @example * const hasUnsavedChanges = Wyn.Reporting.Designer.api.isReportDirty(); * if (hasUnsavedChanges) console.log('There are unsaved changes.'); */ isReportDirty: () => boolean; /** * Returns information about the currently edited report (or template). * @example * const info = Wyn.Reporting.Designer.api.getReportInfo(); * console.log(`"${info.name}" is currently edited.`); */ getReportInfo: () => ReportInfo; /** * Returns the currently edited report (or template) content.\ * This content can be passed to the corresponding `createReport()`/`openReport()` sub-options. * @example * const content = Wyn.Reporting.Designer.api.getReportContent(); * console.log('Content: ', content); */ getReportContent: () => any; /** * Creates a new report to be edited in Designer using the specified **options**. * @param options CreateReportOptions * @example * Wyn.Reporting.Designer.api.createReport({ * onFinish: () => { * console.log('Finished creating a new report.'); * }, * }).then(function(result) { * if (result.type === 'error') { * console.log(result.errorCaption); * console.log(result.errorDetails.join('\n')); * return; * } * console.log(`Report "${result.reportInfo.name}" is created successfully.`); * }); */ createReport: (options?: CreateReportOptions) => Promise; /** * Opens an existing report (or template) to be edited in Designer using the specified **options**. * @param options OpenReportOptions * @example * Wyn.Reporting.Designer.api.openReport({ * reportInfo: { * id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6', * name: 'MyReport', * }, * onFinish: () => { * console.log('Finished opening an existing report "MyReport".'); * }, * }).then(function(result) { * if (result.type === 'error') { * console.log(result.errorCaption); * console.log(result.errorDetails.join('\n')); * return; * } * console.log(`Report "${result.reportInfo.name}" is opened successfully.`); * }); */ openReport: (options: OpenReportOptions) => Promise; /** * Saves the report (or template) currently edited in Designer using the specified **options**. * @param options SaveReportOptions * @example * Wyn.Reporting.Designer.api.saveReport({ * reportInfo: { * name: 'MyReport', * }, * onFinish: () => { * console.log('Finished saving a new report "MyReport".'); * }, * }).then(function(result) { * if (result.type === 'error') { * console.log(result.errorCaption); * console.log(result.errorDetails.join('\n')); * return; * } * console.log(`Report "${result.reportInfo.name}" is saved successfully.`); * }); */ saveReport: (options: SaveReportOptions) => Promise; /** * Previews the report (or template) currently edited in Designer. * Use `Wyn.Reporting.Designer.closeViewer()` to close the preview. * @example * Wyn.Reporting.Designer.api.previewReport({ * initOptions: { viewMode: 'Continuous', animation: { loadChart: { enabled: true } } } * }).then(function(result) { * if (result.type === 'error') { * console.log(result.errorCaption); * console.log(result.errorDetails.join('\n')); * return; * } * console.log(`Preview of the report "${result.reportInfo.name}" is started successfully.`); * }); */ previewReport: (options?: PreviewReportOptions) => Promise; /** * Loads the report (or template) content using the specified **options**. * @param options LoadReportOptions * @example * Wyn.Reporting.Designer.api.loadReport({ * reportInfo: { * id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6', * version: 5 * }, * }).then(function(result) { * if (result.type === 'error') { * console.log(result.errorCaption); * console.log(result.errorDetails.join('\n')); * return; * } * const { name, content } = result.reportInfo; * console.log(`Report "${name}": `, content); * }); */ loadReport: (options: LoadReportOptions) => Promise; /** * Caches the report (or template) content using the specified **options**.\ * Caching reports is required to use the API for adding report items, data sets, report parameters, etc. from such reports. * @param options CacheReportOptions * @example * Wyn.Reporting.Designer.api.cacheReport({ * reportCacheKey: 'ChartsAndTables', * reportInfo: { * id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6', * name: 'MyReport', * version: 5, * isTemplate: false, * content: loadedReportContent, * }, * }).then(function(result) { * if (result.type === 'error') { * console.log(result.errorCaption); * console.log(result.errorDetails.join('\n')); * return; * } * const { reportCacheKey } = result; * console.log('Report is cached: ', reportCacheKey); * * const addReportItemResult = Wyn.Reporting.Designer.api.addReportItem({ * reportCacheKey, * reportItemName: 'Chart1', * }); * }); */ cacheReport: (options: CacheReportOptions) => Promise; /** * Returns whether any report (or template) content is cached using the specified key. * @param reportCacheKey report cache key * @example * const isCached = Wyn.Reporting.Designer.api.hasCachedReport('ChartsAndTables'); * console.log(isCached ? 'Report is cached.' : 'Report is not cached.'); */ hasCachedReport: (reportCacheKey: string) => boolean; /** * Returns the report (or template) content cached using the specified key.\ * If there is no report (or template) cached using this key, `null` is returned. * @param reportCacheKey report cache key * @example * const reportInfo = Wyn.Reporting.Designer.api.getCachedReport('ChartsAndTables'); * if (!reportInfo) return; * const { content } = reportInfo; * console.log('Report: ', content); */ getCachedReport: (reportCacheKey: string) => CachedReportInfo | null; /** * Adds the report item from the cached report (or template) content to the currently edited report. * @param options AddReportItemOptions * @example * const result = Wyn.Reporting.Designer.api.addReportItem({ * reportCacheKey: 'ChartsAndTables', * reportItemName: 'Chart1', * }); * if (result.type === 'error') { * console.log(result.errorCaption); * console.log(result.errorDetails.join('\n')); * return; * } * const { reportItemName, targetContainer } = result; * console.log(`Report item is added to '${targetContainer}' under the name '${reportItemName}'.`); */ addReportItem: (options: AddReportItemOptions) => AddReportItemResult; /** * Adds the data set from the cached report (or template) content to the currently edited report. * @param options AddDataSetOptions * @example * const result = Wyn.Reporting.Designer.api.addDataSet({ * reportCacheKey: 'ChartsAndTables', * dataSetName: 'DataSet1', * }); * if (result.type === 'error') { * console.log(result.errorCaption); * console.log(result.errorDetails.join('\n')); * return; * } * const { dataSetName } = result; * console.log(`Data set is added to report under the name '${dataSetName}'.`); */ addDataSet: (options: AddDataSetOptions) => AddDataSetResult; /** * Adds the report parameter from the cached report (or template) content to the currently edited report. * @param options AddReportParameterOptions * @example * const result = Wyn.Reporting.Designer.api.addReportParameter({ * reportCacheKey: 'ChartsAndTables', * reportParameterName: 'Parameter1', * }); * if (result.type === 'error') { * console.log(result.errorCaption); * console.log(result.errorDetails.join('\n')); * return; * } * const { reportParameterName } = result; * console.log(`Report parameter is added to report under the name '${reportParameterName}'.`); */ addReportParameter: (options: AddReportParameterOptions) => AddReportParameterResult; /** * Adds the embedded image from the cached report (or template) content to the currently edited report. * @param options AddEmbeddedImageOptions * @example * const result = Wyn.Reporting.Designer.api.addEmbeddedImage({ * reportCacheKey: 'ChartsAndTables', * embeddedImageName: 'Image1', * }); * if (result.type === 'error') { * console.log(result.errorCaption); * console.log(result.errorDetails.join('\n')); * return; * } * const { embeddedImageName } = result; * console.log(`Embedded image is added to report under the name '${embeddedImageName}'.`); */ addEmbeddedImage: (options: AddEmbeddedImageOptions) => AddEmbeddedImageResult; /** * Adds the layer from the cached report (or template) content to the currently edited report. * @param options AddLayerOptions * @example * const result = Wyn.Reporting.Designer.api.addLayer({ * reportCacheKey: 'ChartsAndTables', * layerName: 'Layer1', * }); * if (result.type === 'error') { * console.log(result.errorCaption); * console.log(result.errorDetails.join('\n')); * return; * } * const { layerName } = result; * console.log(`Layer is added to report under the name '${layerName}'.`); */ addLayer: (options: AddLayerOptions) => AddLayerResult; }; /** Type of the return value of the `Wyn.Reporting.Designer.api.getReportInfo()` function. */ export type ReportInfo = { /** * report (or template) id * * If an existing report (or template) is edited, **id** is defined.\ * Otherwise, if a new report is edited, **id** is *null*. */ id: string | null; /** report (or template) name */ name: string; /** report (or template) permissions */ permissions: string[]; /** is document a master report or not * @deprecated Use `documentType` instead. */ isMaster: boolean; /** is document a report or a template * @deprecated Use `documentType` instead. */ isTemplate: boolean; /** document type */ documentType: DocumentType; }; /** Type of `options` passed to the `Wyn.Reporting.Designer.api.createReport()` function. */ export type CreateReportOptions = { /** * Specifies the type of a new report - CPL (RDL) or FPL (Page). * By default CPL (RDL) report is created. * @example * reportType: 'FPL' */ reportType?: "CPL" | "FPL"; /** * template info * * If **templateInfo** is specified for report creation, either **id** or **content** needs to be defined. * @example * templateInfo: { id: 'b294d31c-81d2-48f1-9555-753023d62632', name: 'MyTemplate' } */ templateInfo?: { /** * template id * * If **id** is defined, template content is loaded from server. * @example * id: 'b294d31c-81d2-48f1-9555-753023d62632' */ id?: string; /** * template name * @example * name: 'MyTemplate' */ name?: string; /** * template content * * If **content** is defined, new report is created basing on this content. */ content?: any; }; /** * data sets - id/name/version array * * If **dataSets** option is specified, new report is created with these data sets added. * @example * dataSets: [{ id: '1f183c3f-64f9-4b4c-ac92-cd37580bde21', name: 'MyDataSet', version: 3 }] */ dataSets?: DataSetInfo[]; /** * callback on starting to create a report * @example * onStart: () => { * console.log('Started creating a new report.'); * } */ onStart?: () => void; /** * callback on finishing to create a report * @example * onFinish: () => { * console.log('Finished creating a new report.'); * } */ onFinish?: () => void; }; /** Type of an array element of the `CreateReportOptions.dataSets` array. */ export type DataSetInfo = { /** * data set id * @example * id: '1f183c3f-64f9-4b4c-ac92-cd37580bde21' */ id: string; /** * data set name * @example * name: 'MyDataSet' */ name: string; /** * data set version * @example * version: 3 */ version: string | number; }; /** Type of **error** result returned by the `createReport()` / `openReport()` / `saveReport()` / `previewReport()` functions from `Wyn.Reporting.Designer.api`. */ export type ReportOperationErrorResult = { /** result type */ type: "error"; /** error caption */ errorCaption: string; /** error details */ errorDetails: string[]; }; /** Type of **success** result returned by the `Wyn.Reporting.Designer.api.createReport()` function. */ export type CreateReportSuccessResult = { /** result type */ type: "success"; /** report info - information about the created report */ reportInfo: { /** report id - it is always `null` for a new report */ id: null; /** report name */ name: string; /** report version - it is always `null` for a new report */ version: null; /** is created document a report or a template - it is always `false` for a new report */ isTemplate: false; }; }; /** Type of result returned by the `Wyn.Reporting.Designer.api.createReport()` function. */ export type CreateReportResult = CreateReportSuccessResult | ReportOperationErrorResult; /** Type of `options` passed to the `Wyn.Reporting.Designer.api.openReport()` function. */ export type OpenReportOptions = { /** * report info - information about the report (or template) to be opened * @example * reportInfo: { id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6', name: 'MyReport' } */ reportInfo: { /** * report (or template) id * @example * id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6' */ id: string; /** * report (or template) name * * The correct name needs to be always specified explicitly. * * @deprecated This property won't have any effect. */ name?: string; /** * report (or template) content * * If **content** is defined, opened report (or template) content is overridden with this content. */ content?: any; /** * report (or template) permissions * * @deprecated This property won't have any effect. */ permissions?: string[]; /** * report (or template) version * @example * version: 5 */ version?: string | number | null; /** * is opened document a report or a template * @example * isTemplate: false */ isTemplate?: boolean; /** * is opened in the read-only mode * @example * readOnly: true */ readOnly?: boolean; }; /** * callback on starting to open a report (or a template) * @example * onStart: () => { * console.log('Started opening a report.'); * } */ onStart?: () => void; /** * callback on finishing to open a report (or a template) * @example * onFinish: () => { * console.log('Finished opening a report.'); * } */ onFinish?: () => void; }; /** Type of **success** result returned by the `Wyn.Reporting.Designer.api.openReport()` function. */ export type OpenReportSuccessResult = { /** result type */ type: "success"; /** report info - information about the opened report (or template) */ reportInfo: { /** report (or template) id */ id: string; /** report (or template) name */ name: string; /** report (or template) version */ version: number | null; /** is opened document a report or a template */ isTemplate: boolean; }; }; /** Type of result returned by the `Wyn.Reporting.Designer.api.openReport()` function. */ export type OpenReportResult = OpenReportSuccessResult | ReportOperationErrorResult; /** Type of `options` passed to the `Wyn.Reporting.Designer.api.saveReport()` function. */ export type SaveReportOptions = { /** * report info - information about the report (or template) to be saved * @example * reportInfo: { id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6' } */ reportInfo: { /** * report (or template) id * * If an existing report is to be overwritten on saving, the correct **id** should be specified explicitly. * @example * id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6' */ id?: string; /** * report (or template) name * * The correct name needs to be always specified explicitly. * @example * name: 'MyReport' */ name: string; /** * is saved document a report or a template * @example * isTemplate: false */ isTemplate?: boolean; }; /** * saved report (or template) revision comment * @example * comment: 'Changed report theme' */ comment?: string; /** * specifies whether publishing needs to be done after saving * * This property is effective only for reports in case server supports drafts and when user is an administrator or an organization administrator. * @example * publish: true */ publish?: boolean; /** * specifies whether updating references to this document in dependent documents to the latest revision needs to be done after saving * * This property is effective only for master reports. * @example * updateReferences: true */ updateReferences?: boolean; /** * callback on starting to save a report (or a template) * @example * onStart: () => { * console.log('Started saving a report.'); * } */ onStart?: () => void; /** * callback on finishing to save a report (or a template) * @example * onFinish: () => { * console.log('Finished saving a report.'); * } */ onFinish?: () => void; }; /** Type of **success** result returned by the `Wyn.Reporting.Designer.api.saveReport()` function. */ export type SaveReportSuccessResult = { /** result type */ type: "success"; /** report info - information about the saved report (or template) */ reportInfo: { /** report (or template) id */ id: string; /** report (or template) name */ name: string; /** report (or template) version - it is always `null` after saving */ version: null; /** is saved document a report or a template */ isTemplate: boolean; }; }; /** Type of result returned by the `Wyn.Reporting.Designer.api.saveReport()` function. */ export type SaveReportResult = SaveReportSuccessResult | ReportOperationErrorResult; /** Type of **success** result returned by the `Wyn.Reporting.Designer.api.previewReport()` function. */ export type PreviewReportSuccessResult = { type: "success"; /** report info - information about the previewed report (or template) */ reportInfo: { /** report (or template) id */ id: string | null; /** report (or template) name */ name: string; /** is previewed document a report or a template */ isTemplate: boolean; }; }; /** Type of result returned by the `Wyn.Reporting.Designer.api.previewReport()` function. */ export type PreviewReportResult = PreviewReportSuccessResult | ReportOperationErrorResult; /** Type of `options` passed to the `Wyn.Reporting.Designer.api.previewReport()` function. */ export type PreviewReportOptions = { /** * Additional init options that will be passed to Viewer on preview. */ initOptions: PartialDeepViewerOptionsOther; }; /** Type of `options` passed to the `Wyn.Reporting.Designer.api.loadReport()` function. */ export type LoadReportOptions = { /** * report info - information about the report (or template) to be loaded * @example * reportInfo: { id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6', version: 5 } */ reportInfo: { /** * report (or template) id * @example * id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6' */ id: string; /** * report (or template) version * @example * version: 5 */ version?: number | null; }; }; /** Type of **success** result returned by the `Wyn.Reporting.Designer.api.loadReport()` function. */ export type LoadReportSuccessResult = { /** result type */ type: "success"; /** report info - information about the loaded report (or template) */ reportInfo: { /** report (or template) id */ id: string; /** report (or template) name */ name: string; /** report (or template) version */ version: number; /** is loaded document a report or a template */ isTemplate: boolean; /** report (or template) content */ content: any; }; }; /** Type of result returned by the `Wyn.Reporting.Designer.api.loadReport()` function. */ export type LoadReportResult = LoadReportSuccessResult | ReportOperationErrorResult; /** Information about the cached report (or template). */ export type CachedReportInfo = { /** report (or template) id */ id?: string; /** report (or template) name */ name?: string; /** report (or template) version */ version?: number | null; /** is cached document a report or a template */ isTemplate?: boolean; /** report (or template) content */ content: any; }; /** Type of `options` passed to the `Wyn.Reporting.Designer.api.cacheReport()` function. */ export type CacheReportOptions = { /** report cache key */ reportCacheKey: string; /** report info - information about the cached report (or template) */ reportInfo: CachedReportInfo; }; /** Type of **success** result returned by the `Wyn.Reporting.Designer.api.cacheReport()` function. */ export type CacheReportSuccessResult = { /** result type */ type: "success"; /** report cache key */ reportCacheKey: string; }; /** Type of result returned by the `Wyn.Reporting.Designer.api.cacheReport()` function. */ export type CacheReportResult = CacheReportSuccessResult | ReportOperationErrorResult; /** Type of `options` passed to the `Wyn.Reporting.Designer.api.addReportItem()` function. */ export type AddReportItemOptions = { /** cache key of the report (or template) to be used as the source for the specified report item */ reportCacheKey: string; /** name of the report item to be sourced from the cached report (or template) */ reportItemName: string; /** * Specifies the target container within the currently edited report where to add the report item: * - CPL (RDL) reports - can be only 'Body' * - FPL (Page) reports - can be only page - 'Page1', 'Page2', etc. * * If not specified, target will be set to 'Body' for CPL reports or to 'Page1' for FPL reports. */ targetContainer?: string; }; /** Type of **success** result returned by the `Wyn.Reporting.Designer.api.addReportItem()` function. */ export type AddReportItemSuccessResult = { /** result type */ type: "success"; /** result name of the added report item */ reportItemName: string; /** result target container where the report item is added */ targetContainer: string; }; /** Type of result returned by the `Wyn.Reporting.Designer.api.addReportItem()` function. */ export type AddReportItemResult = AddReportItemSuccessResult | ReportOperationErrorResult; /** Type of `options` passed to the `Wyn.Reporting.Designer.api.addDataSet()` function. */ export type AddDataSetOptions = { /** cache key of the report (or template) to be used as the source for the specified data set */ reportCacheKey: string; /** name of the data set to be sourced from the cached report (or template) */ dataSetName: string; }; /** Type of **success** result returned by the `Wyn.Reporting.Designer.api.addDataSet()` function. */ export type AddDataSetSuccessResult = { /** result type */ type: "success"; /** result name of the added data set */ dataSetName: string; }; /** Type of result returned by the `Wyn.Reporting.Designer.api.addDataSet()` function. */ export type AddDataSetResult = AddDataSetSuccessResult | ReportOperationErrorResult; /** Type of `options` passed to the `Wyn.Reporting.Designer.api.addReportParameter()` function. */ export type AddReportParameterOptions = { /** cache key of the report (or template) to be used as the source for the specified report parameter */ reportCacheKey: string; /** name of the report parameter to be sourced from the cached report (or template) */ reportParameterName: string; }; /** Type of **success** result returned by the `Wyn.Reporting.Designer.api.addReportParameter()` function. */ export type AddReportParameterSuccessResult = { /** result type */ type: "success"; /** result name of the added report parameter */ reportParameterName: string; }; /** Type of result returned by the `Wyn.Reporting.Designer.api.addReportParameter()` function. */ export type AddReportParameterResult = AddReportParameterSuccessResult | ReportOperationErrorResult; /** Type of `options` passed to the `Wyn.Reporting.Designer.api.addEmbeddedImage()` function. */ export type AddEmbeddedImageOptions = { /** cache key of the report (or template) to be used as the source for the specified embedded image */ reportCacheKey: string; /** name of the embedded image to be sourced from the cached report (or template) */ embeddedImageName: string; }; /** Type of **success** result returned by the `Wyn.Reporting.Designer.api.addEmbeddedImage()` function. */ export type AddEmbeddedImageSuccessResult = { /** result type */ type: "success"; /** result name of the added embedded image */ embeddedImageName: string; }; /** Type of result returned by the `Wyn.Reporting.Designer.api.addEmbeddedImage()` function. */ export type AddEmbeddedImageResult = AddEmbeddedImageSuccessResult | ReportOperationErrorResult; /** Type of `options` passed to the `Wyn.Reporting.Designer.api.addLayer()` function. */ export type AddLayerOptions = { /** cache key of the report (or template) to be used as the source for the specified layer */ reportCacheKey: string; /** name of the layer to be sourced from the cached report (or template) */ layerName: string; }; /** Type of **success** result returned by the `Wyn.Reporting.Designer.api.addLayer()` function. */ export type AddLayerSuccessResult = { /** result type */ type: "success"; /** result name of the added layer */ layerName: string; }; /** Type of result returned by the `Wyn.Reporting.Designer.api.addLayer()` function. */ export type AddLayerResult = AddLayerSuccessResult | ReportOperationErrorResult; export {};