Skip to content

Commit 8afa2de

Browse files
committed
Merged PR 5254: Use new PowerBI-Models
Bug fix: Export Data should return ExportDataResult instead of a string. Bug fix: switch mode should be able to take a string and ViewMode enum. built javascript files for groupID in load config.
1 parent a6bc5c9 commit 8afa2de

File tree

8 files changed

+151
-33
lines changed

8 files changed

+151
-33
lines changed

dist/powerbi-client.d.ts

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! powerbi-client v2.5.1 | (c) 2016 Microsoft Corporation MIT */
1+
/*! powerbi-client v2.5.2 | (c) 2016 Microsoft Corporation MIT */
22
declare module "util" {
33
/**
44
* Raises a custom event with event data on the specified HTML element.
@@ -82,6 +82,7 @@ declare module "embed" {
8282
type?: string;
8383
accessToken?: string;
8484
tokenType?: models.TokenType;
85+
groupId?: string;
8586
}
8687
/**
8788
* Configuration settings for Power BI embed components
@@ -345,6 +346,13 @@ declare module "embed" {
345346
* @returns {string}
346347
*/
347348
private getUniqueId();
349+
/**
350+
* Gets the group ID from the first available location: options, embeddedUrl.
351+
*
352+
* @private
353+
* @returns {string}
354+
*/
355+
private getGroupId();
348356
/**
349357
* Gets the report ID from the first available location: options, attribute.
350358
*
@@ -377,6 +385,15 @@ declare module "embed" {
377385
* Sets Iframe for embed
378386
*/
379387
private setIframe(isLoad, phasedRender?);
388+
/**
389+
* Adds the ability to get groupId from url.
390+
* By extracting the ID we can ensure that the ID is always explicitly provided as part of the load configuration.
391+
*
392+
* @static
393+
* @param {string} url
394+
* @returns {string}
395+
*/
396+
static findGroupIdFromEmbedUrl(url: string): string;
380397
}
381398
}
382399
declare module "ifilterable" {
@@ -509,9 +526,9 @@ declare module "visualDescriptor" {
509526
* .then(data => { ... });
510527
* ```
511528
*
512-
* @returns {(Promise<string>)}
529+
* @returns {(Promise<models.ExportDataType>)}
513530
*/
514-
exportData(exportDataType?: models.ExportDataType, rows?: number): Promise<string>;
531+
exportData(exportDataType?: models.ExportDataType, rows?: number): Promise<models.ExportDataType>;
515532
}
516533
}
517534
declare module "page" {
@@ -562,15 +579,24 @@ declare module "page" {
562579
* @type {boolean}
563580
*/
564581
isActive: boolean;
582+
/**
583+
* The visibility of the page.
584+
* 0 - Always Visible
585+
* 1 - Hidden in View Mode
586+
*
587+
* @type {models.SectionVisibility}
588+
*/
589+
visibility: models.SectionVisibility;
565590
/**
566591
* Creates an instance of a Power BI report page.
567592
*
568593
* @param {IReportNode} report
569594
* @param {string} name
570595
* @param {string} [displayName]
571596
* @param {boolean} [isActivePage]
597+
* @param {models.SectionVisibility} [visibility]
572598
*/
573-
constructor(report: IReportNode, name: string, displayName?: string, isActivePage?: boolean);
599+
constructor(report: IReportNode, name: string, displayName?: string, isActivePage?: boolean, visibility?: models.SectionVisibility);
574600
/**
575601
* Gets all page level filters within the report.
576602
*
@@ -768,7 +794,7 @@ declare module "report" {
768794
* @param {boolean} [isActive]
769795
* @returns {Page}
770796
*/
771-
page(name: string, displayName?: string, isActive?: boolean): Page;
797+
page(name: string, displayName?: string, isActive?: boolean, visibility?: models.SectionVisibility): Page;
772798
/**
773799
* Prints the active page of the report by invoking `window.print()` on the embed iframe component.
774800
*/
@@ -846,7 +872,7 @@ declare module "report" {
846872
*
847873
* @returns {Promise<void>}
848874
*/
849-
switchMode(viewMode: models.ViewMode): Promise<void>;
875+
switchMode(viewMode: models.ViewMode | string): Promise<void>;
850876
/**
851877
* Refreshes data sources for the report.
852878
*
@@ -855,6 +881,7 @@ declare module "report" {
855881
* ```
856882
*/
857883
refresh(): Promise<void>;
884+
private viewModeToString(viewMode);
858885
}
859886
}
860887
declare module "create" {

dist/powerbi.js

Lines changed: 82 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)