@nibo-ai/ngx-powerbi
Version:
TypeScript library for embedding Power BI assets (reports/dashboards/tiles) in your application. This TypeScript library is built on top of the official powerbi-client library provided by Microsoft.
279 lines • 20.2 kB
JavaScript
/**
* @fileoverview added by tsickle
* Generated from: lib/ngx-powerbi.service.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import { Injectable, Optional } from '@angular/core';
import { factories, service as pbiService } from 'powerbi-client';
import * as i0 from "@angular/core";
/**
* @return {?}
*/
export function powerBiServiceFactory() {
return new pbiService.Service(factories.hpmFactory, factories.wpmpFactory, factories.routerFactory);
}
var NgxPowerBiService = /** @class */ (function () {
function NgxPowerBiService(service) {
this.service = service;
if (!service) {
this.powerBiCoreService = new pbiService.Service(factories.hpmFactory, factories.wpmpFactory, factories.routerFactory);
}
else {
this.powerBiCoreService = service;
}
}
/**
* Creates new report
* @param HTMLElement Parent HTML element
* @param IEmbedConfiguration Embed configuration
* @returns Embed Embedded object
*/
/**
* Creates new report
* @param {?} element
* @param {?} config
* @return {?} Embed Embedded object
*/
NgxPowerBiService.prototype.createReport = /**
* Creates new report
* @param {?} element
* @param {?} config
* @return {?} Embed Embedded object
*/
function (element, config) {
return this.powerBiCoreService.createReport(element, config);
};
/**
* Given a configuration based on an HTML element,
* if the component has already been created and attached to the element, reuses the component instance and existing iframe,
* otherwise creates a new component instance.
*
* @param HTMLElement Parent HTML element
* @param IEmbedConfiguration Embed configuration
* @returns Embed Embedded object
*/
/**
* Given a configuration based on an HTML element,
* if the component has already been created and attached to the element, reuses the component instance and existing iframe,
* otherwise creates a new component instance.
*
* @param {?} element
* @param {?} config
* @return {?} Embed Embedded object
*/
NgxPowerBiService.prototype.embed = /**
* Given a configuration based on an HTML element,
* if the component has already been created and attached to the element, reuses the component instance and existing iframe,
* otherwise creates a new component instance.
*
* @param {?} element
* @param {?} config
* @return {?} Embed Embedded object
*/
function (element, config) {
return this.powerBiCoreService.embed(element, config);
};
/**
* Given a configuration based on an HTML element,
* if the component has already been created and attached to the element, reuses the component instance and existing iframe,
* otherwise creates a new component instance.
* This is used for the phased embedding API, once element is loaded successfully, one can call 'render' on it.
*
* @param HTMLElement} Parent HTML element
* @param IEmbedConfiguration Embed configuration
* @returns Embed Embedded object
*/
/**
* Given a configuration based on an HTML element,
* if the component has already been created and attached to the element, reuses the component instance and existing iframe,
* otherwise creates a new component instance.
* This is used for the phased embedding API, once element is loaded successfully, one can call 'render' on it.
*
* @param {?} element
* @param {?} config
* @return {?} Embed Embedded object
*/
NgxPowerBiService.prototype.load = /**
* Given a configuration based on an HTML element,
* if the component has already been created and attached to the element, reuses the component instance and existing iframe,
* otherwise creates a new component instance.
* This is used for the phased embedding API, once element is loaded successfully, one can call 'render' on it.
*
* @param {?} element
* @param {?} config
* @return {?} Embed Embedded object
*/
function (element, config) {
return this.powerBiCoreService.load(element, config);
};
/**
* Adds an event handler for DOMContentLoaded, which searches the DOM for elements that have the 'powerbi-embed-url' attribute,
* and automatically attempts to embed a Power BI component based on information from other powerbi-* attributes.
*
* Note: Only runs if `config.autoEmbedOnContentLoaded` is true when the service is created.
* This handler is typically useful only for applications that are rendered on the server so that all
* required data is available when the handler is called.
*/
/**
* Adds an event handler for DOMContentLoaded, which searches the DOM for elements that have the 'powerbi-embed-url' attribute,
* and automatically attempts to embed a Power BI component based on information from other powerbi-* attributes.
*
* Note: Only runs if `config.autoEmbedOnContentLoaded` is true when the service is created.
* This handler is typically useful only for applications that are rendered on the server so that all
* required data is available when the handler is called.
* @return {?}
*/
NgxPowerBiService.prototype.enableAutoEmbed = /**
* Adds an event handler for DOMContentLoaded, which searches the DOM for elements that have the 'powerbi-embed-url' attribute,
* and automatically attempts to embed a Power BI component based on information from other powerbi-* attributes.
*
* Note: Only runs if `config.autoEmbedOnContentLoaded` is true when the service is created.
* This handler is typically useful only for applications that are rendered on the server so that all
* required data is available when the handler is called.
* @return {?}
*/
function () {
return this.powerBiCoreService.enableAutoEmbed();
};
/**
* Returns an instance of the component associated with the element.
*
* @param HTMLElement Parent HTML element
* @returns (Report | Tile) Embedded report/tile object
*/
/**
* Returns an instance of the component associated with the element.
*
* @param {?} element
* @return {?} (Report | Tile) Embedded report/tile object
*/
NgxPowerBiService.prototype.get = /**
* Returns an instance of the component associated with the element.
*
* @param {?} element
* @return {?} (Report | Tile) Embedded report/tile object
*/
function (element) {
return this.powerBiCoreService.get(element);
};
/**
* Finds an embed instance by the name or unique ID that is provided.
*
* @param string} uniqueId or name of the report/tile
* @returns (Report | Tile) Embedded report/tile object
*/
/**
* Finds an embed instance by the name or unique ID that is provided.
*
* @param {?} uniqueId
* @return {?} (Report | Tile) Embedded report/tile object
*/
NgxPowerBiService.prototype.findById = /**
* Finds an embed instance by the name or unique ID that is provided.
*
* @param {?} uniqueId
* @return {?} (Report | Tile) Embedded report/tile object
*/
function (uniqueId) {
return this.powerBiCoreService.find(uniqueId);
};
/**
* Given an HTML element that has a component embedded within it,
* removes the component from the list of embedded components,
* removes the association between the element and the component, and removes the iframe.
*
* @param HTMLElement Parent HTML element
* @returns void
*/
/**
* Given an HTML element that has a component embedded within it,
* removes the component from the list of embedded components,
* removes the association between the element and the component, and removes the iframe.
*
* @param {?} element
* @return {?} void
*/
NgxPowerBiService.prototype.reset = /**
* Given an HTML element that has a component embedded within it,
* removes the component from the list of embedded components,
* removes the association between the element and the component, and removes the iframe.
*
* @param {?} element
* @return {?} void
*/
function (element) {
return this.powerBiCoreService.reset(element);
};
/**
* handles tile events
*
* @param IEvent<any> event
*/
/**
* handles tile events
*
* @param {?} event
* @return {?}
*/
NgxPowerBiService.prototype.handleTileEvents = /**
* handles tile events
*
* @param {?} event
* @return {?}
*/
function (event) {
return this.powerBiCoreService.handleTileEvents(event);
};
/**
* API for warm starting Power BI embedded endpoints.
* Use this API to preload Power BI Embedded in the background.
*
* @param embed.IEmbedConfiguration Embed configuration
* @param HTMLElement [element=undefined]
*/
/**
* API for warm starting Power BI embedded endpoints.
* Use this API to preload Power BI Embedded in the background.
*
* @param {?} config
* @param {?} element
* @return {?}
*/
NgxPowerBiService.prototype.preload = /**
* API for warm starting Power BI embedded endpoints.
* Use this API to preload Power BI Embedded in the background.
*
* @param {?} config
* @param {?} element
* @return {?}
*/
function (config, element) {
return this.powerBiCoreService.preload(config, element);
};
NgxPowerBiService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root',
useFactory: powerBiServiceFactory
},] }
];
/** @nocollapse */
NgxPowerBiService.ctorParameters = function () { return [
{ type: pbiService.Service, decorators: [{ type: Optional }] }
]; };
/** @nocollapse */ NgxPowerBiService.ɵprov = i0.ɵɵdefineInjectable({ factory: powerBiServiceFactory, token: NgxPowerBiService, providedIn: "root" });
return NgxPowerBiService;
}());
export { NgxPowerBiService };
if (false) {
/**
* @type {?}
* @private
*/
NgxPowerBiService.prototype.powerBiCoreService;
/**
* @type {?}
* @private
*/
NgxPowerBiService.prototype.service;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXBvd2VyYmkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuaWJvLWFpL25neC1wb3dlcmJpLyIsInNvdXJjZXMiOlsibGliL25neC1wb3dlcmJpLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNyRCxPQUFPLEVBRUwsU0FBUyxFQUdULE9BQU8sSUFBSSxVQUFVLEVBRXRCLE1BQU0sZ0JBQWdCLENBQUM7Ozs7O0FBRXhCLE1BQU0sVUFBVSxxQkFBcUI7SUFDbkMsT0FBTyxJQUFJLFVBQVUsQ0FBQyxPQUFPLENBQzNCLFNBQVMsQ0FBQyxVQUFVLEVBQ3BCLFNBQVMsQ0FBQyxXQUFXLEVBQ3JCLFNBQVMsQ0FBQyxhQUFhLENBQ3hCLENBQUM7QU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