@@ -9,8 +9,8 @@ export class Report extends embed.Embed {
99 static reportIdAttribute = 'powerbi-report-id' ;
1010 static type = "Report" ;
1111
12- constructor ( service : service . Service , hpmFactory : service . IHpmFactory , element : HTMLElement , config : embed . IEmbedConfiguration ) {
13- super ( service , hpmFactory , element , config ) ;
12+ constructor ( service : service . Service , element : HTMLElement , config : embed . IEmbedConfiguration ) {
13+ super ( service , element , config ) ;
1414 Array . prototype . push . apply ( this . allowedEvents , Report . allowedEvents ) ;
1515 }
1616
@@ -49,7 +49,7 @@ export class Report extends embed.Embed {
4949 */
5050 addFilter ( filter : models . IFilter , target ?: models . IPageTarget | models . IVisualTarget ) : Promise < void > {
5151 const targetUrl = this . getTargetUrl ( target ) ;
52- return this . hpm . post < void > ( `${ targetUrl } /filters` , filter , { uid : this . config . uniqueId } )
52+ return this . service . hpm . post < void > ( `${ targetUrl } /filters` , filter , { uid : this . config . uniqueId } , this . iframe . contentWindow )
5353 . catch ( response => {
5454 throw response . body ;
5555 } ) ;
@@ -79,7 +79,7 @@ export class Report extends embed.Embed {
7979 */
8080 getFilters ( target ?: models . IPageTarget | models . IVisualTarget ) : Promise < models . IFilter [ ] > {
8181 const targetUrl = this . getTargetUrl ( target ) ;
82- return this . hpm . get < models . IFilter [ ] > ( `${ targetUrl } /filters` , { uid : this . config . uniqueId } )
82+ return this . service . hpm . get < models . IFilter [ ] > ( `${ targetUrl } /filters` , { uid : this . config . uniqueId } , this . iframe . contentWindow )
8383 . then ( response => response . body ,
8484 response => {
8585 throw response . body ;
@@ -110,7 +110,7 @@ export class Report extends embed.Embed {
110110 * ```
111111 */
112112 getPages ( ) : Promise < models . IPage [ ] > {
113- return this . hpm . get < models . IPage [ ] > ( '/report/pages' , { uid : this . config . uniqueId } )
113+ return this . service . hpm . get < models . IPage [ ] > ( '/report/pages' , { uid : this . config . uniqueId } , this . iframe . contentWindow )
114114 . then ( response => response . body ,
115115 response => {
116116 throw response . body ;
@@ -131,7 +131,7 @@ export class Report extends embed.Embed {
131131 displayName : null
132132 } ;
133133
134- return this . hpm . put < models . IError [ ] > ( '/report/pages/active' , page , { uid : this . config . uniqueId } )
134+ return this . service . hpm . put < models . IError [ ] > ( '/report/pages/active' , page , { uid : this . config . uniqueId } , this . iframe . contentWindow )
135135 . catch ( response => {
136136 throw response . body ;
137137 } ) ;
@@ -149,7 +149,7 @@ export class Report extends embed.Embed {
149149 */
150150 removeFilter ( filter : models . IFilter , target ?: models . IPageTarget | models . IVisualTarget ) : Promise < void > {
151151 const targetUrl = this . getTargetUrl ( target ) ;
152- return this . hpm . delete < models . IError [ ] > ( `${ targetUrl } /filters` , filter , { uid : this . config . uniqueId } )
152+ return this . service . hpm . delete < models . IError [ ] > ( `${ targetUrl } /filters` , filter , { uid : this . config . uniqueId } , this . iframe . contentWindow )
153153 . catch ( response => {
154154 throw response . body ;
155155 } ) ;
@@ -163,7 +163,7 @@ export class Report extends embed.Embed {
163163 * ```
164164 */
165165 removeAllFilters ( ) : Promise < void > {
166- return this . hpm . delete < models . IError [ ] > ( '/report/allfilters' , null , { uid : this . config . uniqueId } )
166+ return this . service . hpm . delete < models . IError [ ] > ( '/report/allfilters' , null , { uid : this . config . uniqueId } , this . iframe . contentWindow )
167167 . catch ( response => {
168168 throw response . body ;
169169 } ) ;
@@ -186,7 +186,7 @@ export class Report extends embed.Embed {
186186 */
187187 updateFilter ( filter : models . IFilter , target ?: models . IPageTarget | models . IVisualTarget ) : Promise < void > {
188188 const targetUrl = this . getTargetUrl ( target ) ;
189- return this . hpm . put < models . IError [ ] > ( `${ targetUrl } /filters` , filter , { uid : this . config . uniqueId } )
189+ return this . service . hpm . put < models . IError [ ] > ( `${ targetUrl } /filters` , filter , { uid : this . config . uniqueId } , this . iframe . contentWindow )
190190 . catch ( response => {
191191 throw response . body ;
192192 } ) ;
@@ -206,7 +206,7 @@ export class Report extends embed.Embed {
206206 * ```
207207 */
208208 updateSettings ( settings : models . ISettings ) : Promise < void > {
209- return this . hpm . patch < models . IError [ ] > ( '/report/settings' , settings , { uid : this . config . uniqueId } )
209+ return this . service . hpm . patch < models . IError [ ] > ( '/report/settings' , settings , { uid : this . config . uniqueId } , this . iframe . contentWindow )
210210 . catch ( response => {
211211 throw response . body ;
212212 } ) ;
0 commit comments