powerbi-visuals-tools 3.3.2 → 3.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/.vscode/launch.json +52 -0
  2. package/Changelog.md +105 -16
  3. package/bin/pbiviz-new.js +3 -12
  4. package/bin/pbiviz-package.js +12 -8
  5. package/bin/pbiviz-start.js +25 -51
  6. package/bin/pbiviz.js +0 -1
  7. package/config.json +1 -1
  8. package/lib/CertificateTools.js +6 -8
  9. package/lib/TemplateFetcher.js +7 -29
  10. package/lib/VisualGenerator.js +5 -94
  11. package/lib/WebPackWrap.js +69 -75
  12. package/lib/utils.js +26 -0
  13. package/lib/webpack.config.js +9 -6
  14. package/package.json +14 -16
  15. package/templates/visuals/default/package.json +2 -2
  16. package/templates/visuals/rhtml/package.json +1 -1
  17. package/templates/visuals/rvisual/package.json +1 -1
  18. package/templates/visuals/slicer/package.json +2 -2
  19. package/templates/visuals/table/package.json +2 -2
  20. package/bin/pbiviz-update.js +0 -128
  21. package/lib/LessCompiler.js +0 -86
  22. package/lib/TypescriptCompiler.js +0 -243
  23. package/templates/visuals/.api/v1.0.0/PowerBI-visuals.d.ts +0 -1139
  24. package/templates/visuals/.api/v1.0.0/schema.capabilities.json +0 -758
  25. package/templates/visuals/.api/v1.0.0/schema.pbiviz.json +0 -95
  26. package/templates/visuals/.api/v1.1.0/PowerBI-visuals.d.ts +0 -1179
  27. package/templates/visuals/.api/v1.1.0/schema.capabilities.json +0 -828
  28. package/templates/visuals/.api/v1.1.0/schema.pbiviz.json +0 -95
  29. package/templates/visuals/.api/v1.10.0/PowerBI-visuals.d.ts +0 -1406
  30. package/templates/visuals/.api/v1.10.0/schema.capabilities.json +0 -1143
  31. package/templates/visuals/.api/v1.10.0/schema.dependencies.json +0 -38
  32. package/templates/visuals/.api/v1.10.0/schema.pbiviz.json +0 -103
  33. package/templates/visuals/.api/v1.10.0/schema.stringResources.json +0 -67
  34. package/templates/visuals/.api/v1.11.0/PowerBI-visuals.d.ts +0 -1406
  35. package/templates/visuals/.api/v1.11.0/schema.capabilities.json +0 -1143
  36. package/templates/visuals/.api/v1.11.0/schema.dependencies.json +0 -38
  37. package/templates/visuals/.api/v1.11.0/schema.pbiviz.json +0 -103
  38. package/templates/visuals/.api/v1.11.0/schema.stringResources.json +0 -67
  39. package/templates/visuals/.api/v1.12.0/PowerBI-visuals.d.ts +0 -1408
  40. package/templates/visuals/.api/v1.12.0/schema.capabilities.json +0 -1173
  41. package/templates/visuals/.api/v1.12.0/schema.dependencies.json +0 -38
  42. package/templates/visuals/.api/v1.12.0/schema.pbiviz.json +0 -103
  43. package/templates/visuals/.api/v1.12.0/schema.stringResources.json +0 -67
  44. package/templates/visuals/.api/v1.13.0/PowerBI-visuals.d.ts +0 -1450
  45. package/templates/visuals/.api/v1.13.0/schema.capabilities.json +0 -1181
  46. package/templates/visuals/.api/v1.13.0/schema.dependencies.json +0 -38
  47. package/templates/visuals/.api/v1.13.0/schema.pbiviz.json +0 -103
  48. package/templates/visuals/.api/v1.13.0/schema.stringResources.json +0 -67
  49. package/templates/visuals/.api/v1.2.0/PowerBI-visuals.d.ts +0 -1188
  50. package/templates/visuals/.api/v1.2.0/schema.capabilities.json +0 -951
  51. package/templates/visuals/.api/v1.2.0/schema.dependencies.json +0 -38
  52. package/templates/visuals/.api/v1.2.0/schema.pbiviz.json +0 -99
  53. package/templates/visuals/.api/v1.3.0/PowerBI-visuals.d.ts +0 -1293
  54. package/templates/visuals/.api/v1.3.0/schema.capabilities.json +0 -951
  55. package/templates/visuals/.api/v1.3.0/schema.dependencies.json +0 -38
  56. package/templates/visuals/.api/v1.3.0/schema.pbiviz.json +0 -95
  57. package/templates/visuals/.api/v1.4.0/PowerBI-visuals.d.ts +0 -1282
  58. package/templates/visuals/.api/v1.4.0/schema.capabilities.json +0 -951
  59. package/templates/visuals/.api/v1.4.0/schema.dependencies.json +0 -38
  60. package/templates/visuals/.api/v1.4.0/schema.pbiviz.json +0 -95
  61. package/templates/visuals/.api/v1.5.0/PowerBI-visuals.d.ts +0 -1205
  62. package/templates/visuals/.api/v1.5.0/schema.capabilities.json +0 -987
  63. package/templates/visuals/.api/v1.5.0/schema.dependencies.json +0 -38
  64. package/templates/visuals/.api/v1.5.0/schema.pbiviz.json +0 -95
  65. package/templates/visuals/.api/v1.6.0/PowerBI-visuals.d.ts +0 -1297
  66. package/templates/visuals/.api/v1.6.0/schema.capabilities.json +0 -1007
  67. package/templates/visuals/.api/v1.6.0/schema.dependencies.json +0 -38
  68. package/templates/visuals/.api/v1.6.0/schema.pbiviz.json +0 -103
  69. package/templates/visuals/.api/v1.6.0/schema.stringResources.json +0 -67
  70. package/templates/visuals/.api/v1.7.0/PowerBI-visuals.d.ts +0 -1381
  71. package/templates/visuals/.api/v1.7.0/schema.capabilities.json +0 -1007
  72. package/templates/visuals/.api/v1.7.0/schema.dependencies.json +0 -38
  73. package/templates/visuals/.api/v1.7.0/schema.pbiviz.json +0 -103
  74. package/templates/visuals/.api/v1.7.0/schema.stringResources.json +0 -67
  75. package/templates/visuals/.api/v1.8.0/PowerBI-visuals.d.ts +0 -1389
  76. package/templates/visuals/.api/v1.8.0/schema.capabilities.json +0 -1131
  77. package/templates/visuals/.api/v1.8.0/schema.dependencies.json +0 -38
  78. package/templates/visuals/.api/v1.8.0/schema.pbiviz.json +0 -103
  79. package/templates/visuals/.api/v1.8.0/schema.stringResources.json +0 -67
  80. package/templates/visuals/.api/v1.9.0/PowerBI-visuals.d.ts +0 -1391
  81. package/templates/visuals/.api/v1.9.0/schema.capabilities.json +0 -1131
  82. package/templates/visuals/.api/v1.9.0/schema.dependencies.json +0 -38
  83. package/templates/visuals/.api/v1.9.0/schema.pbiviz.json +0 -103
  84. package/templates/visuals/.api/v1.9.0/schema.stringResources.json +0 -67
  85. package/templates/visuals/.api/v2.0.0/PowerBI-visuals.d.ts +0 -1417
  86. package/templates/visuals/.api/v2.0.0/schema.capabilities.json +0 -1177
  87. package/templates/visuals/.api/v2.0.0/schema.dependencies.json +0 -38
  88. package/templates/visuals/.api/v2.0.0/schema.pbiviz.json +0 -103
  89. package/templates/visuals/.api/v2.0.0/schema.stringResources.json +0 -67
  90. package/templates/visuals/.api/v2.1.0/PowerBI-visuals.d.ts +0 -1417
  91. package/templates/visuals/.api/v2.1.0/schema.capabilities.json +0 -1177
  92. package/templates/visuals/.api/v2.1.0/schema.dependencies.json +0 -38
  93. package/templates/visuals/.api/v2.1.0/schema.pbiviz.json +0 -103
  94. package/templates/visuals/.api/v2.1.0/schema.stringResources.json +0 -67
  95. package/templates/visuals/.api/v2.2.0/PowerBI-visuals.d.ts +0 -1423
  96. package/templates/visuals/.api/v2.2.0/schema.capabilities.json +0 -1189
  97. package/templates/visuals/.api/v2.2.0/schema.dependencies.json +0 -38
  98. package/templates/visuals/.api/v2.2.0/schema.pbiviz.json +0 -103
  99. package/templates/visuals/.api/v2.2.0/schema.stringResources.json +0 -67
  100. package/templates/visuals/.api/v2.3.0/PowerBI-visuals.d.ts +0 -1480
  101. package/templates/visuals/.api/v2.3.0/schema.capabilities.json +0 -1193
  102. package/templates/visuals/.api/v2.3.0/schema.dependencies.json +0 -38
  103. package/templates/visuals/.api/v2.3.0/schema.pbiviz.json +0 -103
  104. package/templates/visuals/.api/v2.3.0/schema.stringResources.json +0 -67
  105. package/templates/visuals/.api/v2.5.0/PowerBI-visuals.d.ts +0 -1483
  106. package/templates/visuals/.api/v2.5.0/schema.capabilities.json +0 -1197
  107. package/templates/visuals/.api/v2.5.0/schema.dependencies.json +0 -38
  108. package/templates/visuals/.api/v2.5.0/schema.pbiviz.json +0 -103
  109. package/templates/visuals/.api/v2.5.0/schema.stringResources.json +0 -67
  110. package/templates/visuals/.api/v2.6.0/PowerBI-visuals.d.ts +0 -1485
  111. package/templates/visuals/.api/v2.6.0/schema.capabilities.json +0 -1323
  112. package/templates/visuals/.api/v2.6.0/schema.dependencies.json +0 -38
  113. package/templates/visuals/.api/v2.6.0/schema.pbiviz.json +0 -103
  114. package/templates/visuals/.api/v2.6.0/schema.stringResources.json +0 -67
  115. package/templates/visuals/default1/assets/icon.png +0 -0
  116. package/templates/visuals/default1/capabilities.json +0 -84
  117. package/templates/visuals/default1/package.json +0 -6
  118. package/templates/visuals/default1/pbiviz.json +0 -3
  119. package/templates/visuals/default1/src/settings.ts +0 -32
  120. package/templates/visuals/default1/src/visual.ts +0 -71
  121. package/templates/visuals/default1/style/visual.less +0 -9
  122. package/templates/visuals/default1/tsconfig.json +0 -16
@@ -1,1179 +0,0 @@
1
- /*
2
- * Power BI Visual CLI
3
- *
4
- * Copyright (c) Microsoft Corporation
5
- * All rights reserved.
6
- * MIT License
7
- *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy
9
- * of this software and associated documentation files (the ""Software""), to deal
10
- * in the Software without restriction, including without limitation the rights
11
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- * copies of the Software, and to permit persons to whom the Software is
13
- * furnished to do so, subject to the following conditions:
14
- *
15
- * The above copyright notice and this permission notice shall be included in
16
- * all copies or substantial portions of the Software.
17
- *
18
- * THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
- * THE SOFTWARE.
25
- */
26
- declare module powerbi {
27
- enum VisualDataRoleKind {
28
- /** Indicates that the role should be bound to something that evaluates to a grouping of values. */
29
- Grouping = 0,
30
- /** Indicates that the role should be bound to something that evaluates to a single value in a scope. */
31
- Measure = 1,
32
- /** Indicates that the role can be bound to either Grouping or Measure. */
33
- GroupingOrMeasure = 2,
34
- }
35
- enum VisualDataChangeOperationKind {
36
- Create = 0,
37
- Append = 1,
38
- }
39
- enum VisualUpdateType {
40
- Data = 2,
41
- Resize = 4,
42
- ViewMode = 8,
43
- Style = 16,
44
- ResizeEnd = 32,
45
- All = 62,
46
- }
47
- enum VisualPermissions {
48
- }
49
- const enum CartesianRoleKind {
50
- X = 0,
51
- Y = 1,
52
- }
53
- const enum ViewMode {
54
- View = 0,
55
- Edit = 1,
56
- InFocusEdit = 2,
57
- }
58
- const enum ResizeMode {
59
- Resizing = 1,
60
- Resized = 2,
61
- }
62
- const enum JoinPredicateBehavior {
63
- /** Prevent items in this role from acting as join predicates. */
64
- None = 0,
65
- }
66
- const enum PromiseResultType {
67
- Success = 0,
68
- Failure = 1,
69
- }
70
- /**
71
- * Defines actions to be taken by the visual in response to a selection.
72
- *
73
- * An undefined/null VisualInteractivityAction should be treated as Selection,
74
- * as that is the default action.
75
- */
76
- const enum VisualInteractivityAction {
77
- /** Normal selection behavior which should call onSelect */
78
- Selection = 0,
79
- /** No additional action or feedback from the visual is needed */
80
- None = 1,
81
- }
82
- }
83
- 
84
-
85
-
86
-
87
- declare module powerbi.visuals.plugins {
88
- /** This IVisualPlugin interface is only used by the CLI tools when compiling */
89
- export interface IVisualPlugin {
90
- /** The name of the plugin. Must match the property name in powerbi.visuals. */
91
- name: string;
92
-
93
- /** Function to call to create the visual. */
94
- create: (options?: extensibility.VisualConstructorOptions) => extensibility.IVisual;
95
-
96
- /** The class of the plugin. At the moment it is only used to have a way to indicate the class name that a custom visual has. */
97
- class: string;
98
-
99
- /** Check if a visual is custom */
100
- custom: boolean;
101
-
102
- /** The version of the api that this plugin should be run against */
103
- apiVersion: string;
104
-
105
- /** Human readable plugin name displayed to users */
106
- displayName: string;
107
-
108
- }
109
- }
110
- 
111
-
112
-
113
-
114
- declare module jsCommon {
115
- export interface IStringResourceProvider {
116
- get(id: string): string;
117
- getOptional(id: string): string;
118
- }
119
- }
120
-
121
-
122
-
123
- declare module powerbi {
124
- /**
125
- * An interface to promise/deferred,
126
- * which abstracts away the underlying mechanism (e.g., Angular, jQuery, etc.).
127
- */
128
- export interface IPromiseFactory {
129
- /**
130
- * Creates a Deferred object which represents a task which will finish in the future.
131
- */
132
- defer<T>(): IDeferred<T>;
133
-
134
- /**
135
- * Creates a Deferred object which represents a task which will finish in the future.
136
- */
137
- defer<TSuccess, TError>(): IDeferred2<TSuccess, TError>;
138
-
139
- /**
140
- * Creates a promise that is resolved as rejected with the specified reason.
141
- * This api should be used to forward rejection in a chain of promises.
142
- * If you are dealing with the last promise in a promise chain, you don't need to worry about it.
143
- * When comparing deferreds/promises to the familiar behavior of try/catch/throw,
144
- * think of reject as the throw keyword in JavaScript.
145
- * This also means that if you "catch" an error via a promise error callback and you want
146
- * to forward the error to the promise derived from the current promise,
147
- * you have to "rethrow" the error by returning a rejection constructed via reject.
148
- *
149
- * @param reason Constant, message, exception or an object representing the rejection reason.
150
- */
151
- reject<TError>(reason?: TError): IPromise2<any, TError>;
152
-
153
- /**
154
- * Creates a promise that is resolved with the specified value.
155
- * This api should be used to forward rejection in a chain of promises.
156
- * If you are dealing with the last promise in a promise chain, you don't need to worry about it.
157
- *
158
- * @param value Object representing the promise result.
159
- */
160
- resolve<TSuccess>(value?: TSuccess): IPromise2<TSuccess, any>;
161
-
162
- /**
163
- * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
164
- * Rejects immediately if any of the promises fail
165
- */
166
- all(promises: IPromise2<any, any>[]): IPromise<any[]>;
167
-
168
- /**
169
- * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
170
- * Does not resolve until all promises finish (success or failure).
171
- */
172
- allSettled<T>(promises: IPromise2<any, any>[]): IPromise<IPromiseResult<T>[]>;
173
-
174
- /**
175
- * Wraps an object that might be a value or a then-able promise into a promise.
176
- * This is useful when you are dealing with an object that might or might not be a promise
177
- */
178
- when<T>(value: T | IPromise<T>): IPromise<T>;
179
- }
180
-
181
- /**
182
- * Represents an operation, to be completed (resolve/rejected) in the future.
183
- */
184
- export interface IPromise<T> extends IPromise2<T, T> {
185
- }
186
-
187
- /**
188
- * Represents an operation, to be completed (resolve/rejected) in the future.
189
- * Success and failure types can be set independently.
190
- */
191
- export interface IPromise2<TSuccess, TError> {
192
- /**
193
- * Regardless of when the promise was or will be resolved or rejected,
194
- * then calls one of the success or error callbacks asynchronously as soon as the result is available.
195
- * The callbacks are called with a single argument: the result or rejection reason.
196
- * Additionally, the notify callback may be called zero or more times to provide a progress indication,
197
- * before the promise is resolved or rejected.
198
- * This method returns a new promise which is resolved or rejected via
199
- * the return value of the successCallback, errorCallback.
200
- */
201
- then<TSuccessResult, TErrorResult>(successCallback: (promiseValue: TSuccess) => IPromise2<TSuccessResult, TErrorResult>, errorCallback?: (reason: TError) => TErrorResult): IPromise2<TSuccessResult, TErrorResult>;
202
-
203
- /**
204
- * Regardless of when the promise was or will be resolved or rejected,
205
- * then calls one of the success or error callbacks asynchronously as soon as the result is available.
206
- * The callbacks are called with a single argument: the result or rejection reason.
207
- * Additionally, the notify callback may be called zero or more times to provide a progress indication,
208
- * before the promise is resolved or rejected.
209
- * This method returns a new promise which is resolved or rejected via
210
- * the return value of the successCallback, errorCallback.
211
- */
212
- then<TSuccessResult, TErrorResult>(successCallback: (promiseValue: TSuccess) => TSuccessResult, errorCallback?: (reason: TError) => TErrorResult): IPromise2<TSuccessResult, TErrorResult>;
213
-
214
- /**
215
- * Shorthand for promise.then(null, errorCallback).
216
- */
217
- catch<TErrorResult>(onRejected: (reason: any) => IPromise2<TSuccess, TErrorResult>): IPromise2<TSuccess, TErrorResult>;
218
-
219
- /**
220
- * Shorthand for promise.then(null, errorCallback).
221
- */
222
- catch<TErrorResult>(onRejected: (reason: any) => TErrorResult): IPromise2<TSuccess, TErrorResult>;
223
-
224
- /**
225
- * Allows you to observe either the fulfillment or rejection of a promise,
226
- * but to do so without modifying the final value.
227
- * This is useful to release resources or do some clean-up that needs to be done
228
- * whether the promise was rejected or resolved.
229
- * See the full specification for more information.
230
- * Because finally is a reserved word in JavaScript and reserved keywords
231
- * are not supported as property names by ES3, you'll need to invoke
232
- * the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible.
233
- */
234
- finally<T, U>(finallyCallback: () => any): IPromise2<T, U>;
235
- }
236
-
237
- export interface IDeferred<T> extends IDeferred2<T, T> {
238
- }
239
-
240
- export interface IDeferred2<TSuccess, TError> {
241
- resolve(value: TSuccess): void;
242
- reject(reason?: TError): void;
243
- promise: IPromise2<TSuccess, TError>;
244
- }
245
-
246
- export interface RejectablePromise2<T, E> extends IPromise2<T, E> {
247
- reject(reason?: E): void;
248
- resolved(): boolean;
249
- rejected(): boolean;
250
- pending(): boolean;
251
- }
252
-
253
- export interface RejectablePromise<T> extends RejectablePromise2<T, T> {
254
- }
255
-
256
- export interface IResultCallback<T> {
257
- (result: T, done: boolean): void;
258
- }
259
-
260
- export interface IPromiseResult<T> {
261
- type: PromiseResultType;
262
- value: T;
263
- }
264
- }
265
-
266
-
267
-
268
- declare module powerbi.visuals {
269
- import Selector = data.Selector;
270
-
271
- export interface ISelectionIdBuilder {
272
- withCategory(categoryColumn: DataViewCategoryColumn, index: number): this;
273
- withSeries(seriesColumn: DataViewValueColumns, valueColumn: DataViewValueColumn | DataViewValueColumnGroup): this;
274
- withMeasure(measureId: string): this;
275
- createSelectionId(): ISelectionId;
276
- }
277
-
278
- export interface ISelectionId {
279
- equals(other: ISelectionId): boolean;
280
- includes(other: ISelectionId, ignoreHighlight?: boolean): boolean;
281
- getKey(): string;
282
- getSelector(): Selector;
283
- getSelectorsByColumn(): Selector;
284
- hasIdentity(): boolean;
285
- }
286
- }
287
-
288
-
289
-
290
- declare module powerbi {
291
- export const enum SortDirection {
292
- Ascending = 1,
293
- Descending = 2,
294
- }
295
- }
296
-
297
-
298
-
299
- declare module powerbi {
300
- /** Represents views of a data set. */
301
- export interface DataView {
302
- metadata: DataViewMetadata;
303
- categorical?: DataViewCategorical;
304
- single?: DataViewSingle;
305
- tree?: DataViewTree;
306
- table?: DataViewTable;
307
- matrix?: DataViewMatrix;
308
- scriptResult?: DataViewScriptResultData;
309
- }
310
-
311
- export interface DataViewMetadata {
312
- columns: DataViewMetadataColumn[];
313
-
314
- /** The metadata repetition objects. */
315
- objects?: DataViewObjects;
316
-
317
- /** When defined, describes whether the DataView contains just a segment of the complete data set. */
318
- segment?: DataViewSegmentMetadata;
319
- }
320
-
321
- export interface DataViewMetadataColumn {
322
- /** The user-facing display name of the column. */
323
- displayName: string;
324
-
325
- /** The query name the source column in the query. */
326
- queryName?: string;
327
-
328
- /** The format string of the column. */
329
- format?: string; // TODO: Deprecate this, and populate format string through objects instead.
330
-
331
- /** Data type information for the column. */
332
- type?: ValueTypeDescriptor;
333
-
334
- /** Indicates that this column is a measure (aggregate) value. */
335
- isMeasure?: boolean;
336
-
337
- /** The position of the column in the select statement. */
338
- index?: number;
339
-
340
- /** The properties that this column provides to the visualization. */
341
- roles?: { [name: string]: boolean };
342
-
343
- /** The metadata repetition objects. */
344
- objects?: DataViewObjects;
345
-
346
- /** The name of the containing group. */
347
- groupName?: PrimitiveValue;
348
-
349
- /** The sort direction of this column. */
350
- sort?: SortDirection;
351
-
352
- /** The KPI metadata to use to convert a numeric status value into its visual representation. */
353
- kpi?: DataViewKpiColumnMetadata;
354
-
355
- /** Indicates that aggregates should not be computed across groups with different values of this column. */
356
- discourageAggregationAcrossGroups?: boolean;
357
-
358
- /** The aggregates computed for this column, if any. */
359
- aggregates?: DataViewColumnAggregates;
360
-
361
- /** The SQExpr this column represents. */
362
- expr?: data.ISQExpr;
363
- }
364
-
365
- export interface DataViewSegmentMetadata {
366
- }
367
-
368
- export interface DataViewColumnAggregates {
369
- subtotal?: PrimitiveValue;
370
- max?: PrimitiveValue;
371
- min?: PrimitiveValue;
372
- average?: PrimitiveValue;
373
- median?: PrimitiveValue;
374
- count?: number;
375
- percentiles?: DataViewColumnPercentileAggregate[];
376
-
377
- /** Client-computed maximum value for a column. */
378
- maxLocal?: PrimitiveValue;
379
-
380
- /** Client-computed maximum value for a column. */
381
- minLocal?: PrimitiveValue;
382
- }
383
-
384
- export interface DataViewColumnPercentileAggregate {
385
- exclusive?: boolean;
386
- k: number;
387
- value: PrimitiveValue;
388
- }
389
-
390
- export interface DataViewCategorical {
391
- categories?: DataViewCategoryColumn[];
392
- values?: DataViewValueColumns;
393
- }
394
-
395
- export interface DataViewCategoricalColumn {
396
- source: DataViewMetadataColumn;
397
- values: PrimitiveValue[];
398
-
399
- /** The data repetition objects. */
400
- objects?: DataViewObjects[];
401
- }
402
-
403
- export interface DataViewValueColumns extends Array<DataViewValueColumn> {
404
- /** Returns an array that groups the columns in this group together. */
405
- grouped(): DataViewValueColumnGroup[];
406
-
407
- /** The set of expressions that define the identity for instances of the value group. This must match items in the DataViewScopeIdentity in the grouped items result. */
408
- identityFields?: data.ISQExpr[];
409
-
410
- source?: DataViewMetadataColumn;
411
- }
412
-
413
- export interface DataViewValueColumnGroup {
414
- values: DataViewValueColumn[];
415
- identity?: DataViewScopeIdentity;
416
-
417
- /** The data repetition objects. */
418
- objects?: DataViewObjects;
419
-
420
- name?: PrimitiveValue;
421
- }
422
-
423
- export interface DataViewValueColumn extends DataViewCategoricalColumn {
424
- highlights?: PrimitiveValue[];
425
- identity?: DataViewScopeIdentity;
426
- }
427
-
428
- // NOTE: The following is needed for backwards compatibility and should be deprecated. Callers should use
429
- // DataViewMetadataColumn.aggregates instead.
430
- export interface DataViewValueColumn extends DataViewColumnAggregates {
431
- }
432
-
433
- export interface DataViewCategoryColumn extends DataViewCategoricalColumn {
434
- identity?: DataViewScopeIdentity[];
435
-
436
- /** The set of expressions that define the identity for instances of the category. This must match items in the DataViewScopeIdentity in the identity. */
437
- identityFields?: data.ISQExpr[];
438
- }
439
-
440
- export interface DataViewSingle {
441
- value: PrimitiveValue;
442
- }
443
-
444
- export interface DataViewTree {
445
- root: DataViewTreeNode;
446
- }
447
-
448
- export interface DataViewTreeNode {
449
- name?: PrimitiveValue;
450
-
451
- /**
452
- * When used under the context of DataView.tree, this value is one of the elements in the values property.
453
- *
454
- * When used under the context of DataView.matrix, this property is the value of the particular
455
- * group instance represented by this node (e.g. In a grouping on Year, a node can have value == 2016).
456
- *
457
- * DEPRECATED for usage under the context of DataView.matrix: This property is deprecated for objects
458
- * that conform to the DataViewMatrixNode interface (which extends DataViewTreeNode).
459
- * New visuals code should consume the new property levelValues on DataViewMatrixNode instead.
460
- * If this node represents a composite group node in matrix, this property will be undefined.
461
- */
462
- value?: PrimitiveValue;
463
-
464
- /**
465
- * This property contains all the values in this node.
466
- * The key of each of the key-value-pair in this dictionary is the position of the column in the
467
- * select statement to which the value belongs.
468
- */
469
- values?: { [id: number]: DataViewTreeNodeValue };
470
-
471
- children?: DataViewTreeNode[];
472
- identity?: DataViewScopeIdentity;
473
-
474
- /** The data repetition objects. */
475
- objects?: DataViewObjects;
476
-
477
- /** The set of expressions that define the identity for the child nodes. This must match items in the DataViewScopeIdentity of those nodes. */
478
- childIdentityFields?: data.ISQExpr[];
479
- }
480
-
481
- export interface DataViewTreeNodeValue {
482
- value?: PrimitiveValue;
483
- }
484
-
485
- export interface DataViewTreeNodeMeasureValue extends DataViewTreeNodeValue, DataViewColumnAggregates {
486
- highlight?: PrimitiveValue;
487
- }
488
-
489
- export interface DataViewTreeNodeGroupValue extends DataViewTreeNodeValue {
490
- count?: PrimitiveValue;
491
- }
492
-
493
- export interface DataViewTable {
494
- columns: DataViewMetadataColumn[];
495
-
496
- identity?: DataViewScopeIdentity[];
497
-
498
- /** The set of expressions that define the identity for rows of the table. This must match items in the DataViewScopeIdentity in the identity. */
499
- identityFields?: data.ISQExpr[];
500
-
501
- rows?: DataViewTableRow[];
502
-
503
- totals?: PrimitiveValue[];
504
- }
505
-
506
- export interface DataViewTableRow extends Array<PrimitiveValue> {
507
- /** The metadata repetition objects. */
508
- objects?: DataViewObjects[];
509
- }
510
-
511
- export interface DataViewMatrix {
512
- rows: DataViewHierarchy;
513
- columns: DataViewHierarchy;
514
- valueSources: DataViewMetadataColumn[];
515
- }
516
-
517
- export interface DataViewMatrixNode extends DataViewTreeNode {
518
- /** Indicates the level this node is on. Zero indicates the outermost children (root node level is undefined). */
519
- level?: number;
520
-
521
- children?: DataViewMatrixNode[];
522
-
523
-
524
- values?: { [id: number]: DataViewMatrixNodeValue };
525
-
526
- /**
527
- * Indicates the source metadata index on the node's level. Its value is 0 if omitted.
528
- *
529
- * DEPRECATED: This property is deprecated and exists for backward-compatibility only.
530
- * New visuals code should consume the new property levelSourceIndex on DataViewMatrixGroupValue instead.
531
- */
532
- levelSourceIndex?: number;
533
-
534
- /**
535
- * The values of the particular group instance represented by this node.
536
- * This array property would contain more than one element in a composite group
537
- * (e.g. Year == 2016 and Month == 'January').
538
- */
539
- levelValues?: DataViewMatrixGroupValue[];
540
-
541
- /** Indicates whether or not the node is a subtotal node. Its value is false if omitted. */
542
- isSubtotal?: boolean;
543
- }
544
-
545
- /**
546
- * Represents a value at a particular level of a matrix's rows or columns hierarchy.
547
- * In the hierarchy level node is an instance of a composite group, this object will
548
- * be one of multiple values
549
- */
550
- export interface DataViewMatrixGroupValue extends DataViewTreeNodeValue {
551
- /**
552
- * Indicates the index of the corresponding column for this group level value
553
- * (held by DataViewHierarchyLevel.sources).
554
- *
555
- * @example
556
- * // For example, to get the source column metadata of each level value at a particular row hierarchy node:
557
- * let matrixRowsHierarchy: DataViewHierarchy = dataView.matrix.rows;
558
- * let targetRowsHierarchyNode = <DataViewMatrixNode>matrixRowsHierarchy.root.children[0];
559
- * // Use the DataViewMatrixNode.level property to get the corresponding DataViewHierarchyLevel...
560
- * let targetRowsHierarchyLevel: DataViewHierarchyLevel = matrixRows.levels[targetRowsHierarchyNode.level];
561
- * for (let levelValue in rowsRootNode.levelValues) {
562
- * // columnMetadata is the source column for the particular levelValue.value in this loop iteration
563
- * let columnMetadata: DataViewMetadataColumn =
564
- * targetRowsHierarchyLevel.sources[levelValue.levelSourceIndex];
565
- * }
566
- */
567
- levelSourceIndex: number;
568
- }
569
-
570
- /** Represents a value at the matrix intersection, used in the values property on DataViewMatrixNode (inherited from DataViewTreeNode). */
571
- export interface DataViewMatrixNodeValue extends DataViewTreeNodeValue {
572
- highlight?: PrimitiveValue;
573
-
574
- /** Indicates the index of the corresponding measure (held by DataViewMatrix.valueSources). Its value is 0 if omitted. */
575
- valueSourceIndex?: number;
576
- }
577
-
578
- export interface DataViewHierarchy {
579
- root: DataViewMatrixNode;
580
- levels: DataViewHierarchyLevel[];
581
- }
582
-
583
- export interface DataViewHierarchyLevel {
584
- sources: DataViewMetadataColumn[];
585
- }
586
-
587
- export interface DataViewKpiColumnMetadata {
588
- graphic: string;
589
-
590
- // When false, five state KPIs are in: { -2, -1, 0, 1, 2 }.
591
- // When true, five state KPIs are in: { -1, -0.5, 0, 0.5, 1 }.
592
- normalizedFiveStateKpiRange?: boolean;
593
- }
594
-
595
- export interface DataViewScriptResultData {
596
- payloadBase64: string;
597
- }
598
- }
599
-
600
-
601
-
602
- declare module powerbi {
603
- /** Represents evaluated, named, custom objects in a DataView. */
604
- export interface DataViewObjects {
605
- [name: string]: DataViewObject;
606
- }
607
-
608
- /** Represents an object (name-value pairs) in a DataView. */
609
- export interface DataViewObject {
610
- /** Map of property name to property value. */
611
- [propertyName: string]: DataViewPropertyValue;
612
-
613
- /** Instances of this object. When there are multiple instances with the same object name they will appear here. */
614
- $instances?: DataViewObjectMap;
615
- }
616
-
617
- export interface DataViewObjectWithId {
618
- id: string;
619
- object: DataViewObject;
620
- }
621
-
622
- export interface DataViewObjectPropertyIdentifier {
623
- objectName: string;
624
- propertyName: string;
625
- }
626
-
627
- export type DataViewObjectMap = { [id: string]: DataViewObject };
628
-
629
- export type DataViewPropertyValue = PrimitiveValue | StructuralObjectValue;
630
- }
631
-
632
-
633
-
634
- declare module powerbi.data {
635
- /** Defines a match against all instances of given roles. */
636
- export interface DataViewRoleWildcard {
637
- roles: string[];
638
- key: string;
639
- }
640
- }
641
-
642
-
643
-
644
- declare module powerbi {
645
- /** Encapsulates the identity of a data scope in a DataView. */
646
- export interface DataViewScopeIdentity {
647
- /** Predicate expression that identifies the scope. */
648
- expr: data.ISQExpr;
649
-
650
- /** Key string that identifies the DataViewScopeIdentity to a string, which can be used for equality comparison. */
651
- key: string;
652
- }
653
- }
654
-
655
-
656
-
657
- declare module powerbi.data {
658
- /** Defines a match against all instances of a given DataView scope. */
659
- export interface DataViewScopeWildcard {
660
- exprs: ISQExpr[];
661
- key: string;
662
- }
663
- }
664
-
665
-
666
-
667
- declare module powerbi.data {
668
- import IStringResourceProvider = jsCommon.IStringResourceProvider;
669
-
670
- export type DisplayNameGetter = ((resourceProvider: IStringResourceProvider) => string) | string;
671
- }
672
-
673
-
674
-
675
- declare module powerbi.data {
676
- /** Defines a selector for content, including data-, metadata, and user-defined repetition. */
677
- export interface Selector {
678
- /** Data-bound repetition selection. */
679
- data?: DataRepetitionSelector[];
680
-
681
- /** Metadata-bound repetition selection. Refers to a DataViewMetadataColumn queryName. */
682
- metadata?: string;
683
-
684
- /** User-defined repetition selection. */
685
- id?: string;
686
- }
687
-
688
- export type DataRepetitionSelector = DataViewScopeIdentity | DataViewScopeWildcard | DataViewRoleWildcard;
689
- }
690
-
691
-
692
-
693
- declare module powerbi.data {
694
- //intentionally blank interfaces since this is not part of the public API
695
-
696
- export interface ISemanticFilter { }
697
-
698
- export interface ISQExpr { }
699
-
700
- export interface ISQConstantExpr extends ISQExpr { }
701
-
702
- }
703
-
704
-
705
-
706
- declare module powerbi {
707
- export interface DefaultValueDefinition {
708
- value: data.ISQConstantExpr;
709
- identityFieldsValues?: data.ISQConstantExpr[];
710
- }
711
-
712
- export interface DefaultValueTypeDescriptor {
713
- defaultValue: boolean;
714
- }
715
- }
716
-
717
-
718
-
719
- declare module powerbi {
720
- import DisplayNameGetter = powerbi.data.DisplayNameGetter;
721
-
722
- export type EnumMemberValue = string | number;
723
-
724
- export interface IEnumMember {
725
- value: EnumMemberValue;
726
- displayName: DisplayNameGetter;
727
- }
728
-
729
- /** Defines a custom enumeration data type, and its values. */
730
- export interface IEnumType {
731
- /** Gets the members of the enumeration, limited to the validMembers, if appropriate. */
732
- members(validMembers?: EnumMemberValue[]): IEnumMember[];
733
- }
734
-
735
- }
736
-
737
-
738
-
739
- declare module powerbi {
740
- export interface Fill {
741
- solid?: {
742
- color?: string;
743
- };
744
- gradient?: {
745
- startColor?: string;
746
- endColor?: string;
747
- };
748
- pattern?: {
749
- patternKind?: string;
750
- color?: string;
751
- };
752
- }
753
-
754
- export interface FillTypeDescriptor {
755
- solid?: {
756
- color?: FillSolidColorTypeDescriptor;
757
- };
758
- gradient?: {
759
- startColor?: boolean;
760
- endColor?: boolean;
761
- };
762
- pattern?: {
763
- patternKind?: boolean;
764
- color?: boolean;
765
- };
766
- }
767
-
768
- export type FillSolidColorTypeDescriptor = boolean | FillSolidColorAdvancedTypeDescriptor;
769
-
770
- export interface FillSolidColorAdvancedTypeDescriptor {
771
- /** Indicates whether the color value may be nullable, and a 'no fill' option is appropriate. */
772
- nullable: boolean;
773
- }
774
- }
775
-
776
-
777
-
778
- declare module powerbi {
779
- export interface FillRule extends FillRuleGeneric<string, number> {
780
- }
781
-
782
- export interface FillRuleTypeDescriptor {
783
- }
784
-
785
- export interface FillRuleGeneric<TColor, TValue> {
786
- linearGradient2?: LinearGradient2Generic<TColor, TValue>;
787
- linearGradient3?: LinearGradient3Generic<TColor, TValue>;
788
-
789
- // stepped2?
790
- // ...
791
- }
792
-
793
- export interface LinearGradient2Generic<TColor, TValue> {
794
- max: RuleColorStopGeneric<TColor, TValue>;
795
- min: RuleColorStopGeneric<TColor, TValue>;
796
- }
797
-
798
- export interface LinearGradient3Generic<TColor, TValue> {
799
- max: RuleColorStopGeneric<TColor, TValue>;
800
- mid: RuleColorStopGeneric<TColor, TValue>;
801
- min: RuleColorStopGeneric<TColor, TValue>;
802
- }
803
-
804
- export interface RuleColorStopGeneric<TColor, TValue> {
805
- color: TColor;
806
- value?: TValue;
807
- }
808
- }
809
-
810
-
811
-
812
- declare module powerbi {
813
- export interface FilterTypeDescriptor {
814
- selfFilter?: boolean;
815
- }
816
- }
817
-
818
- declare module powerbi {
819
- export type GeoJson = GeoJsonDefinitionGeneric<string>;
820
-
821
- export interface GeoJsonDefinitionGeneric<T> {
822
- type: T;
823
- name: T;
824
- content: T;
825
- }
826
-
827
- export interface GeoJsonTypeDescriptor { }
828
- }
829
-
830
-
831
-
832
- declare module powerbi {
833
- export type ImageValue = ImageDefinitionGeneric<string>;
834
-
835
- export interface ImageDefinitionGeneric<T> {
836
- name: T;
837
- url: T;
838
- scaling?: T;
839
- }
840
-
841
- export interface ImageTypeDescriptor { }
842
-
843
- }
844
-
845
-
846
-
847
- declare module powerbi {
848
- export type Paragraphs = Paragraph[];
849
- export interface Paragraph {
850
- horizontalTextAlignment?: string;
851
- textRuns: TextRun[];
852
- }
853
-
854
- export interface ParagraphsTypeDescriptor {
855
- }
856
-
857
- export interface TextRunStyle {
858
- fontFamily?: string;
859
- fontSize?: string;
860
- fontStyle?: string;
861
- fontWeight?: string;
862
- textDecoration?: string;
863
- }
864
-
865
- export interface TextRun {
866
- textStyle?: TextRunStyle;
867
- url?: string;
868
- value: string;
869
- }
870
- }
871
-
872
-
873
-
874
- declare module powerbi {
875
- import SemanticFilter = data.ISemanticFilter;
876
-
877
- /** Defines instances of structural types. */
878
- export type StructuralObjectValue =
879
- Fill |
880
- FillRule |
881
- SemanticFilter |
882
- DefaultValueDefinition |
883
- ImageValue |
884
- Paragraphs |
885
- GeoJson;
886
-
887
- /** Describes a structural type in the client type system. Leaf properties should use ValueType. */
888
- export interface StructuralTypeDescriptor {
889
- fill?: FillTypeDescriptor;
890
- fillRule?: FillRuleTypeDescriptor;
891
- filter?: FilterTypeDescriptor;
892
- expression?: DefaultValueTypeDescriptor;
893
- image?: ImageTypeDescriptor;
894
- paragraphs?: ParagraphsTypeDescriptor;
895
- geoJson?: GeoJsonTypeDescriptor;
896
-
897
- //border?: BorderTypeDescriptor;
898
- //etc.
899
- }
900
- }
901
-
902
-
903
-
904
- declare module powerbi {
905
- /** Describes a data value type in the client type system. Can be used to get a concrete ValueType instance. */
906
- export interface ValueTypeDescriptor {
907
- // Simplified primitive types
908
- text?: boolean;
909
- numeric?: boolean;
910
- integer?: boolean;
911
- bool?: boolean;
912
- dateTime?: boolean;
913
- duration?: boolean;
914
- binary?: boolean;
915
- none?: boolean; //TODO: 5005022 remove none type when we introduce property categories.
916
-
917
- // Extended types
918
- temporal?: TemporalTypeDescriptor;
919
- geography?: GeographyTypeDescriptor;
920
- misc?: MiscellaneousTypeDescriptor;
921
- formatting?: FormattingTypeDescriptor;
922
- enumeration?: IEnumType;
923
- scripting?: ScriptTypeDescriptor;
924
- operations?: OperationalTypeDescriptor;
925
- }
926
-
927
- export interface ScriptTypeDescriptor {
928
- source?: boolean;
929
- }
930
-
931
- export interface TemporalTypeDescriptor {
932
- year?: boolean;
933
- quarter?: boolean;
934
- month?: boolean;
935
- day?: boolean;
936
- paddedDateTableDate?: boolean;
937
- }
938
-
939
- export interface GeographyTypeDescriptor {
940
- address?: boolean;
941
- city?: boolean;
942
- continent?: boolean;
943
- country?: boolean;
944
- county?: boolean;
945
- region?: boolean;
946
- postalCode?: boolean;
947
- stateOrProvince?: boolean;
948
- place?: boolean;
949
- latitude?: boolean;
950
- longitude?: boolean;
951
- }
952
-
953
- export interface MiscellaneousTypeDescriptor {
954
- image?: boolean;
955
- imageUrl?: boolean;
956
- webUrl?: boolean;
957
- barcode?: boolean;
958
- }
959
-
960
- export interface FormattingTypeDescriptor {
961
- color?: boolean;
962
- formatString?: boolean;
963
- alignment?: boolean;
964
- labelDisplayUnits?: boolean;
965
- fontSize?: boolean;
966
- labelDensity?: boolean;
967
- }
968
-
969
- export interface OperationalTypeDescriptor {
970
- searchEnabled?: boolean;
971
- }
972
-
973
- /** Describes instances of value type objects. */
974
- export type PrimitiveValue = string | number | boolean | Date;
975
- }
976
-
977
-
978
-
979
- declare module powerbi {
980
- export interface IViewport {
981
- height: number;
982
- width: number;
983
- }
984
- }
985
-
986
-
987
-
988
- declare module powerbi {
989
- import Selector = powerbi.data.Selector;
990
-
991
- export interface VisualObjectInstance {
992
- /** The name of the object (as defined in VisualCapabilities). */
993
- objectName: string;
994
-
995
- /** A display name for the object instance. */
996
- displayName?: string;
997
-
998
- /** The set of property values for this object. Some of these properties may be defaults provided by the IVisual. */
999
- properties: {
1000
- [propertyName: string]: DataViewPropertyValue;
1001
- };
1002
-
1003
- /** The selector that identifies this object. */
1004
- selector: Selector;
1005
-
1006
- /** Defines the constrained set of valid values for a property. */
1007
- validValues?: {
1008
- [propertyName: string]: string[];
1009
- };
1010
-
1011
- /** (Optional) VisualObjectInstanceEnumeration category index. */
1012
- containerIdx?: number;
1013
- }
1014
-
1015
- export type VisualObjectInstanceEnumeration = VisualObjectInstance[] | VisualObjectInstanceEnumerationObject;
1016
-
1017
- export interface VisualObjectInstanceEnumerationObject {
1018
- /** The visual object instances. */
1019
- instances: VisualObjectInstance[];
1020
-
1021
- /** Defines a set of containers for related object instances. */
1022
- containers?: VisualObjectInstanceContainer[];
1023
- }
1024
-
1025
- export interface VisualObjectInstanceContainer {
1026
- displayName: data.DisplayNameGetter;
1027
- }
1028
-
1029
- export interface VisualObjectInstancesToPersist {
1030
- /** Instances which should be merged with existing instances. */
1031
- merge?: VisualObjectInstance[];
1032
-
1033
- /** Instances which should replace existing instances. */
1034
- replace?: VisualObjectInstance[];
1035
-
1036
- /** Instances which should be deleted from the existing instances. */
1037
- remove?: VisualObjectInstance[];
1038
-
1039
- /** Instances which should be deleted from the existing objects. */
1040
- removeObject?: VisualObjectInstance[];
1041
- }
1042
-
1043
- export interface EnumerateVisualObjectInstancesOptions {
1044
- objectName: string;
1045
- }
1046
- }
1047
-
1048
-
1049
-
1050
-
1051
- declare module powerbi {
1052
- import Selector = powerbi.data.Selector;
1053
-
1054
- export interface VisualObjectRepetition {
1055
- /** The selector that identifies the objects. */
1056
- selector: Selector;
1057
-
1058
- /** The set of repetition descriptors for this object. */
1059
- objects: {
1060
- [objectName: string]: DataViewRepetitionObjectDescriptor;
1061
- };
1062
- }
1063
-
1064
- export interface DataViewRepetitionObjectDescriptor {
1065
- /** Properties used for formatting (e.g., Conditional Formatting). */
1066
- formattingProperties?: string[];
1067
- }
1068
- }
1069
- 
1070
-
1071
-
1072
-
1073
- declare module powerbi.extensibility {
1074
-
1075
- export interface IVisualPluginOptions {
1076
- transform?: IVisualDataViewTransform;
1077
- }
1078
-
1079
- export interface IVisualConstructor {
1080
- __transform__?: IVisualDataViewTransform;
1081
- }
1082
-
1083
- export interface IVisualDataViewTransform {
1084
- <T>(dataview: DataView[]): T;
1085
- }
1086
-
1087
- // These are the base interfaces. These should remain empty
1088
- // All visual versions should extend these for type compatability
1089
-
1090
- export interface IVisual { }
1091
-
1092
- export interface IVisualHost { }
1093
-
1094
- export interface VisualUpdateOptions { }
1095
-
1096
- export interface VisualConstructorOptions { }
1097
- }
1098
-
1099
-
1100
-
1101
-
1102
-
1103
- declare module powerbi {
1104
- export interface IColorInfo extends IStyleInfo {
1105
- value: string;
1106
- }
1107
-
1108
- export interface IStyleInfo {
1109
- className?: string;
1110
- }
1111
- }
1112
-
1113
-
1114
-
1115
- declare module powerbi.extensibility {
1116
- interface ISelectionManager {
1117
- select(selectionId: ISelectionId, multiSelect?: boolean): IPromise<ISelectionId[]>;
1118
- hasSelection(): boolean;
1119
- clear(): IPromise<{}>;
1120
- getSelectionIds(): ISelectionId[];
1121
- }
1122
- }
1123
-
1124
-
1125
-
1126
- declare module powerbi.extensibility {
1127
- export interface ISelectionId { }
1128
-
1129
- export interface ISelectionIdBuilder {
1130
- withCategory(categoryColumn: DataViewCategoryColumn, index: number): this;
1131
- withSeries(seriesColumn: DataViewValueColumns, valueColumn: DataViewValueColumn | DataViewValueColumnGroup): this;
1132
- withMeasure(measureId: string): this;
1133
- createSelectionId(): ISelectionId;
1134
- }
1135
-
1136
- function VisualPlugin (options: IVisualPluginOptions): ClassDecorator;
1137
- }
1138
-
1139
- /**
1140
- * Change Log Version 1.1.0
1141
- */
1142
-
1143
-
1144
-
1145
- declare module powerbi.extensibility.visual {
1146
- /**
1147
- * Represents a visualization displayed within an application (PowerBI dashboards, ad-hoc reporting, etc.).
1148
- * This interface does not make assumptions about the underlying JS/HTML constructs the visual uses to render itself.
1149
- */
1150
- export interface IVisual extends extensibility.IVisual {
1151
- /** Notifies the IVisual of an update (data, viewmode, size change). */
1152
- update<T>(options: VisualUpdateOptions, viewModel?: T): void;
1153
-
1154
- /** Notifies the visual that it is being destroyed, and to do any cleanup necessary (such as unsubscribing event handlers). */
1155
- destroy?(): void;
1156
-
1157
- /** Gets the set of objects that the visual is currently displaying. */
1158
- enumerateObjectInstances?(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
1159
- }
1160
-
1161
- export interface IVisualHost extends extensibility.IVisualHost {
1162
- createSelectionIdBuilder: () => visuals.ISelectionIdBuilder;
1163
- createSelectionManager: () => ISelectionManager;
1164
- /** An array of default colors to be used by the visual */
1165
- colors: IColorInfo[];
1166
- }
1167
-
1168
- export interface VisualUpdateOptions extends extensibility.VisualUpdateOptions {
1169
- viewport: IViewport;
1170
- dataViews: DataView[];
1171
- type: VisualUpdateType;
1172
- viewMode?: ViewMode;
1173
- }
1174
-
1175
- export interface VisualConstructorOptions extends extensibility.VisualConstructorOptions {
1176
- element: HTMLElement;
1177
- host: IVisualHost;
1178
- }
1179
- }