import { DashboardFilters } from './interfaces/dashboard-filters'; import { RevealViewOptions } from './options/reveal-view-options'; import { LitElement, PropertyValueMap } from 'lit'; import { RvDashboardChangedArgs, DashboardLinkRequestedArgs, DataLoadingArgs, DataPointClickedArgs, DataSourceDialogOpeningArgs, DataSourcesRequestedArgs, EditModeEnteredArgs, EditModeExitedArgs, EditorClosedArgs, EditorClosingArgs, EditorOpenedArgs, EditorOpeningArgs, FieldsInitializingArgs, ImageExportedArgs, LinkSelectionDialogOpeningArgs, MenuOpeningArgs, SavingArgs, SeriesColorRequestedArgs, TooltipShowingArgs, UrlLinkRequestedArgs } from './reveal-view.callback-args'; /** * A web component that wraps the jQuery RevealView component. */ export declare class RvRevealView extends LitElement { static styles: import('lit').CSSResult; static readonly tagName = "rv-reveal-view"; private _revealView; private _mergedOptions; /** * Gets or sets the dashboard to display in the RevealView component. */ dashboard: string | unknown; /** * Gets or sets the options for the RevealView component. */ options: RevealViewOptions; /** * Callback triggered when data is loading. */ dataLoading?: (args: DataLoadingArgs) => void; /** * Callback triggered when a data point is clicked. */ dataPointClicked?: (args: DataPointClickedArgs) => void; /** * Callback triggered when the data source dialog is opening. */ dataSourceDialogOpening?: (args: DataSourceDialogOpeningArgs) => void; /** * Callback triggered when data sources are requested. * * @example * ```typescript * revealView.dataSourcesRequested = (args: DataSourcesRequestedArgs) => { * const restDataSource = new $.ig.RVRESTDataSource(); * restDataSource.url = "https://excel2json.io/api/share/6e0f06b3-72d3-4fec-7984-08da43f56bb9"; * restDataSource.title = "Sales by Category"; * restDataSource.subtitle = "Excel2Json"; * restDataSource.useAnonymousAuthentication = true; * * return { dataSources: [restDataSource], dataSourceItems: [] }; * } * ``` */ dataSourcesRequested?: (args: DataSourcesRequestedArgs) => any; /** * Callback triggered when a dashboard link is requested. * Can return a string (dashboard ID/title), Promise (resolving to RVDashboard), or RDashDocument. * * @example * ```typescript * revealView.dashboardLinkRequested = (args: DashboardLinkRequestedArgs) => { * console.log('Dashboard link requested:', args); * return args.dashboardId; * //return $.ig.RVDashboard.loadDashboard(args.dashboardId); * } * ``` */ dashboardLinkRequested?: (args: DashboardLinkRequestedArgs) => string | Promise | any; /** * Callback triggered when the underlying RevealView dashboard instance changes. * This does not fire when the web component's `dashboard` property changes, * but only when the wrapped jQuery RevealView's dashboard instance changes. * * @example * ```typescript * revealView.rvDashboardChanged = (args: RvDashboardChangedArgs) => { * console.log("Underlying RevealView dashboard changed", args); * } * ``` */ rvDashboardChanged?: (args: RvDashboardChangedArgs) => void; /** * Callback triggered when edit mode is entered. * * @example * ```typescript * revealView.editModeEntered = (e: EditModeEnteredArgs) => { * console.log("Edit mode entered", e.dashboard); * } * ``` */ editModeEntered?: (args: EditModeEnteredArgs) => void; /** * Callback triggered when edit mode is exited. * * @example * ```typescript * revealView.editModeExited = (e: EditModeExitedArgs) => { * console.log("Edit mode exited", e.dashboard); * } * ``` */ editModeExited?: (args: EditModeExitedArgs) => void; /** * Callback triggered when the editor is closed. */ editorClosed?: (args: EditorClosedArgs) => void; /** * Callback triggered when the editor is closing. */ editorClosing?: (args: EditorClosingArgs) => void; /** * Callback triggered when the editor is opened. */ editorOpened?: (args: EditorOpenedArgs) => void; /** * Callback triggered when the editor is opening. */ editorOpening?: (args: EditorOpeningArgs) => void; /** * Callback triggered when fields are initializing. */ fieldsInitializing?: (args: FieldsInitializingArgs) => void; /** * Callback triggered when an image is exported. */ imageExported?: (image: ImageExportedArgs) => void; /** * Callback triggered when the RevealView component is initialized. */ initialized?: () => void; /** * Callback triggered when a link selection dialog is opening. */ linkSelectionDialogOpening?: (args: LinkSelectionDialogOpeningArgs) => void; /** * Callback triggered when a menu is opening. */ menuOpening?: (args: MenuOpeningArgs) => void; /** * Callback triggered when a dashboard is saving. */ saving?: (args: SavingArgs) => void; /** * Callback triggered when a series color is requested. */ seriesColorRequested?: (args: SeriesColorRequestedArgs) => string; /** * Callback triggered when a tooltip is showing. */ tooltipShowing?: (args: TooltipShowingArgs) => void; /** * Callback triggered when a URL link is requested. * @example * ```typescript * revealView.urlLinkRequested = (args: UrlLinkRequestedArgs) => { * console.log("urlLinkRequested", args); * return args.url; * } * ``` */ urlLinkRequested?: (args: UrlLinkRequestedArgs) => string; connectedCallback(): void; disconnectedCallback(): void; protected firstUpdated(changedProperties: Map): Promise; private init; private loadRVDashboard; private updateOptions; private updateDashboard; private initializeEvents; private updateIndividualCallbacks; private updateMenuOpeningHandler; private updateDataSourcesRequestedHandler; private updateDashboardLinkRequestedHandler; private assignHandler; private onRevealThemeChanged; /** * Adds a textbox visualization to the dashboard. * @returns {void} */ addTextBoxVisualization(): void; /** * Adds a visualization to the dashboard. * @returns {void} */ addVisualization(): void; /** * Copies a visualization to the clipboard. * If a string ID is provided, the visualization with that ID is copied. * If a number index is provided, the visualization at that index is copied. * @param {string | number} input The ID or index of the visualization to copy * @returns {void} */ copy(input: string | number): void; /** * Places the component in edit mode. * @returns {void} */ enterEditMode(): void; /** * Exits edit mode. * @param {boolean} applyChanges If true, the changes made in edit mode will be applied. If false, the changes will be discarded. * @returns {void} */ exitEditMode(applyChanges: boolean): void; /** * Export the dashboard to Excel. * @returns {void} */ exportToExcel(): void; /** * Export the dashboard to an image. * @param {boolean} showDialog If true, the export dialog will be shown. If false, the image will be exported directly. * @returns {void | Promise} A promise that resolves to the exported image element or null. */ exportToImage(showDialog?: boolean): void | Promise; /** * Export the dashboard to PDF. * @returns {void} */ exportToPdf(): void; /** * Export the dashboard to PowerPoint. * @returns {void} */ exportToPowerPoint(): void; /** * Gets the current dashboard filters in the RevealView component. * @returns {DashboardFilters | undefined} The current dashboard filters, or undefined if the RevealView component is not initialized. */ getFilters(): DashboardFilters | undefined; /** * Gets the RVDashboard instance from the underlying RevealView object. * @returns {RVDashboard} The RVDashboard instance. */ getRVDashboard(): any; /** * Pastes a visualization from the clipboard. * If a target RevealView component is provided, the visualization is pasted to that component. * @param {RvRevealView} target The target RevealView component to paste the visualization to. * @returns {void} */ paste(target?: RvRevealView): void; /** * Refreshes the data in the dashboard. * If no parameter is provided, the entire dashboard is refreshed. * If a string ID is provided, the visualization with that ID is refreshed. * If a number index is provided, the visualization at that index is refreshed. * @param {string | number} input The ID or index of the visualization to refresh, or nothing to refresh the entire dashboard. * @returns {void} */ refreshData(input?: string | number): void; /** * Refreshes the theme of the component. * @returns {void} */ refreshTheme(): void; protected updated(changedProperties: PropertyValueMap | Map): void; protected render(): unknown; } declare global { interface HTMLElementTagNameMap { 'rv-reveal-view': RvRevealView; } }