import { WindowRef } from './windowRef'; import { IEmbedConfiguration, Embed } from 'powerbi-client'; /** * Wrapper for the Microsoft Javascript PowerBI client. This wrapper is browser aware in order to correctly * work with AOT and server side rendering. Unfortunately, reports cannot be serverside rendered but will be rendered * once teh state is shipped to the client. * * @export * @class PowerBIService */ export declare class PowerBIService { private _windowRef; private _powerBiCoreService; private _isBrowser; /** * Creates an instance of PowerBIService. * * @param {WindowRef} _windowRef - an instance of {@link WindowRef} to determine availability of client side context. * @memberof PowerBIService */ constructor(_windowRef: WindowRef); /** * Embeds a report into an HTML element. * * @param {HTMLElement} element - Element into which to embed the report. * @param {pbi.IEmbedConfiguration} config - Configuration paramters. * @returns {pbi.Embed} - A {@link pbi.Embed} object representing the embeded report. * @memberof PowerBIService */ embed(element: HTMLElement, config: IEmbedConfiguration): Embed; /** * Gets the report embeded in an HTML element. * * @param {HTMLElement} element - Element from which to obtain the report. * @returns {pbi.Embed} - A {@link pbi.Embed} object representing the embeded report. * @memberof PowerBIService */ get(element: HTMLElement): Embed; /** * Find a PowerBI report or tile with a given Id. * * @param {string} uniqueId - Id to search for. * @returns {pbi.Embed} - A PowerBI report or tile object matching the id. * @memberof PowerBIService */ find(uniqueId: string): Embed; /** * Removes the embeded report from an HTML element. * * @param {HTMLElement} element - Element from which to remove the report. * @returns {void} * @memberof PowerBIService */ reset(element: HTMLElement): void; /** * Handles invalid browser context errors * * @private * @returns {*} * @memberof PowerBIService */ private HandleBrowserContextError(); }