Skip to content

Commit a1e096a

Browse files
committed
Remove report.print, report.refresh and code related to visuals.
1 parent 31fa32a commit a1e096a

File tree

7 files changed

+0
-843
lines changed

7 files changed

+0
-843
lines changed

Diff for: src/page.ts

-44
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { IFilterable } from './ifilterable';
22
import { IReportNode } from './report';
3-
import { Visual } from './visual';
43
import * as models from 'powerbi-models';
54

65
/**
@@ -74,28 +73,6 @@ export class Page implements IPageNode, IFilterable {
7473
});
7574
}
7675

77-
/**
78-
* Gets all the visuals on the page.
79-
*
80-
* ```javascript
81-
* page.getVisuals()
82-
* .then(visuals => { ... });
83-
* ```
84-
*
85-
* @returns {Promise<Visual[]>}
86-
*/
87-
getVisuals(): Promise<Visual[]> {
88-
return this.report.service.hpm.get<models.IVisual[]>(`/report/pages/${this.name}/visuals`, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)
89-
.then(response => {
90-
return response.body
91-
.map(visual => {
92-
return new Visual(this, visual.name);
93-
});
94-
}, response => {
95-
throw response.body;
96-
});
97-
}
98-
9976
/**
10077
* Removes all filters from this page of the report.
10178
*
@@ -147,25 +124,4 @@ export class Page implements IPageNode, IFilterable {
147124
throw response.body;
148125
});
149126
}
150-
151-
/**
152-
* Creates a Visual object given a name for the visual.
153-
*
154-
* Normally you would get Visual objects by calling `page.getVisuals()` but in the case
155-
* that the visual name is known and you want to perform an action on a visual such as setting a filter
156-
* without having to retrieve it first you can create it directly.
157-
*
158-
* Note: Because you are creating the visual manually there is no guarantee that the visual actually exists in the report and the subsequence requests could fail.
159-
*
160-
* ```javascript
161-
* const visual = report.page('ReportSection1').visual('BarChart1');
162-
* visual.setFilters(filters);
163-
* ```
164-
*
165-
* @param {string} name
166-
* @returns {Visual}
167-
*/
168-
visual(name: string): Visual {
169-
return new Visual(this, name);
170-
}
171127
}

Diff for: src/powerbi.ts

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ export {
2222
export {
2323
Page
2424
} from './page';
25-
export {
26-
Visual
27-
} from './visual';
2825

2926
declare var powerbi: service.Service;
3027
declare global {

Diff for: src/report.ts

-30
Original file line numberDiff line numberDiff line change
@@ -160,36 +160,6 @@ export class Report extends embed.Embed implements IReportNode, IFilterable {
160160
return new Page(this, name, displayName);
161161
}
162162

163-
/**
164-
* Prints the active page of the report by invoking `window.print()` on the embed iframe component.
165-
*/
166-
print(): Promise<void> {
167-
return this.service.hpm.post<models.IError[]>('/report/print', null, { uid: this.config.uniqueId }, this.iframe.contentWindow)
168-
.then(response => {
169-
return response.body;
170-
})
171-
.catch(response => {
172-
throw response.body;
173-
});
174-
}
175-
176-
/**
177-
* Refreshes data sources for the report.
178-
*
179-
* ```javascript
180-
* report.refresh();
181-
* ```
182-
*/
183-
refresh(): Promise<void> {
184-
return this.service.hpm.post<models.IError[]>('/report/refresh', null, { uid: this.config.uniqueId }, this.iframe.contentWindow)
185-
.then(response => {
186-
return response.body;
187-
})
188-
.catch(response => {
189-
throw response.body;
190-
});
191-
}
192-
193163
/**
194164
* Removes all filters at the report level.
195165
*

Diff for: src/visual.ts

-91
This file was deleted.

0 commit comments

Comments
 (0)