1
- /*! powerbi-client v2.0.0-beta.13 | (c) 2016 Microsoft Corporation MIT */
1
+ /*! powerbi-client v2.0.0 | (c) 2016 Microsoft Corporation MIT */
2
2
import * as service from './service' ;
3
3
import * as models from 'powerbi-models' ;
4
4
declare global {
@@ -25,7 +25,7 @@ export interface IEmbedConfiguration {
25
25
accessToken ?: string ;
26
26
settings ?: models . ISettings ;
27
27
pageName ?: string ;
28
- filters ?: ( models . IBasicFilter | models . IAdvancedFilter ) [ ] ;
28
+ filters ?: models . IFilter [ ] ;
29
29
}
30
30
export interface IInternalEmbedConfiguration extends models . ILoadConfiguration {
31
31
uniqueId : string ;
@@ -53,40 +53,40 @@ export declare abstract class Embed {
53
53
private static defaultSettings ;
54
54
allowedEvents : any [ ] ;
55
55
/**
56
- * Gets or set the event handler registered for this embed component
56
+ * Gets or sets the event handler registered for this embed component.
57
57
*
58
58
* @type {IInternalEventHandler<any>[] }
59
59
*/
60
60
eventHandlers : IInternalEventHandler < any > [ ] ;
61
61
/**
62
- * Gets or sets the Power BI embed service
62
+ * Gets or sets the Power BI embed service.
63
63
*
64
64
* @type {service.Service }
65
65
*/
66
66
service : service . Service ;
67
67
/**
68
- * Gets or sets the HTML element containing the Power BI embed component
68
+ * Gets or sets the HTML element that contains the Power BI embed component.
69
69
*
70
70
* @type {HTMLElement }
71
71
*/
72
72
element : HTMLElement ;
73
73
/**
74
- * Gets or sets the HTML iframe element that renders the Power BI embed component
74
+ * Gets or sets the HTML iframe element that renders the Power BI embed component.
75
75
*
76
76
* @type {HTMLIFrameElement }
77
77
*/
78
78
iframe : HTMLIFrameElement ;
79
79
/**
80
- * Gets or sets the configuration settings for the embed component
80
+ * Gets or sets the configuration settings for the Power BI embed component.
81
81
*
82
82
* @type {IInternalEmbedConfiguration }
83
83
*/
84
84
config : IInternalEmbedConfiguration ;
85
85
/**
86
86
* Creates an instance of Embed.
87
87
*
88
- * Note: there is circular reference between embeds and service
89
- * The service has list of all embeds on the host page, and each embed has reference to the service that created it.
88
+ * Note: there is circular reference between embeds and the service, because
89
+ * the service has a list of all embeds on the host page, and each embed has a reference to the service that created it.
90
90
*
91
91
* @param {service.Service } service
92
92
* @param {HTMLElement } element
@@ -119,10 +119,9 @@ export declare abstract class Embed {
119
119
*/
120
120
load ( config : models . ILoadConfiguration ) : Promise < void > ;
121
121
/**
122
- * Removes event handler(s) from list of handlers.
123
- *
124
- * If reference to existing handle function is specified remove specific handler.
125
- * If handler is not specified, remove all handlers for the event name specified.
122
+ * Removes one or more event handlers from the list of handlers.
123
+ * If a reference to the existing handle function is specified, remove the specific handler.
124
+ * If the handler is not specified, remove all handlers for the event name specified.
126
125
*
127
126
* ```javascript
128
127
* report.off('pageChanged')
@@ -142,7 +141,7 @@ export declare abstract class Embed {
142
141
*/
143
142
off < T > ( eventName : string , handler ?: service . IEventHandler < T > ) : void ;
144
143
/**
145
- * Adds event handler for specific event.
144
+ * Adds an event handler for a specific event.
146
145
*
147
146
* ```javascript
148
147
* report.on('pageChanged', (event) => {
@@ -156,46 +155,55 @@ export declare abstract class Embed {
156
155
*/
157
156
on < T > ( eventName : string , handler : service . IEventHandler < T > ) : void ;
158
157
/**
159
- * Get access token from first available location: config, attribute, global.
158
+ * Reloads embed using existing configuration.
159
+ * E.g. For reports this effectively clears all filters and makes the first page active which simulates resetting a report back to loaded state.
160
+ *
161
+ * ```javascript
162
+ * report.reload();
163
+ * ```
164
+ */
165
+ reload ( ) : Promise < void > ;
166
+ /**
167
+ * Gets an access token from the first available location: config, attribute, global.
160
168
*
161
169
* @private
162
170
* @param {string } globalAccessToken
163
171
* @returns {string }
164
172
*/
165
173
private getAccessToken ( globalAccessToken ) ;
166
174
/**
167
- * Get embed url from first available location: options, attribute.
175
+ * Gets an embed url from the first available location: options, attribute.
168
176
*
169
177
* @private
170
178
* @returns {string }
171
179
*/
172
180
private getEmbedUrl ( ) ;
173
181
/**
174
- * Get unique id from first available location: options, attribute.
175
- * If neither is provided generate unique string.
182
+ * Gets a unique ID from the first available location: options, attribute.
183
+ * If neither is provided generate a unique string.
176
184
*
177
185
* @private
178
186
* @returns {string }
179
187
*/
180
188
private getUniqueId ( ) ;
181
189
/**
182
- * Get report id from first available location: options, attribute.
190
+ * Gets the report ID from the first available location: options, attribute.
183
191
*
184
192
* @abstract
185
193
* @returns {string }
186
194
*/
187
195
abstract getId ( ) : string ;
188
196
/**
189
- * Request the browser to make the component's iframe fullscreen.
197
+ * Requests the browser to render the component's iframe in fullscreen mode .
190
198
*/
191
199
fullscreen ( ) : void ;
192
200
/**
193
- * Exit fullscreen.
201
+ * Requests the browser to exit fullscreen mode .
194
202
*/
195
203
exitFullscreen ( ) : void ;
196
204
/**
197
- * Return true if iframe is fullscreen,
198
- * otherwise return false
205
+ * Returns true if the iframe is rendered in fullscreen mode ,
206
+ * otherwise returns false.
199
207
*
200
208
* @private
201
209
* @param {HTMLIFrameElement } iframe
0 commit comments