1 | !function(modules) {
|
2 | function __webpack_require__(moduleId) {
|
3 | if (installedModules[moduleId]) return installedModules[moduleId].exports;
|
4 | var module = installedModules[moduleId] = {
|
5 | exports: {},
|
6 | id: moduleId,
|
7 | loaded: !1
|
8 | };
|
9 | return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__),
|
10 | module.loaded = !0, module.exports;
|
11 | }
|
12 | var installedModules = {};
|
13 | return __webpack_require__.m = modules, __webpack_require__.c = installedModules,
|
14 | __webpack_require__.p = "", __webpack_require__(0);
|
15 | }({
|
16 | 0: function(module, exports, __webpack_require__) {
|
17 | module.exports = __webpack_require__(438);
|
18 | },
|
19 | 438: function(module, exports, __webpack_require__) {
|
20 | window.jsCommon, window.powerbi, window.powerbitests, window.InJs, window.debug,
|
21 | window.jasmine, window.Microsoft;
|
22 | window.jsCommon = window.jsCommon || {}, window.powerbi = window.powerbi || {},
|
23 | window.debug = window.debug || {}, window.InJs = window.InJs || {}, __webpack_require__(439);
|
24 | },
|
25 | 439: function(module, exports, __webpack_require__) {
|
26 | window.jsCommon, window.powerbi, window.powerbitests, window.InJs, window.debug,
|
27 | window.jasmine, window.Microsoft;
|
28 | __webpack_require__(440), __webpack_require__(441), __webpack_require__(442), __webpack_require__(443),
|
29 | __webpack_require__(444), __webpack_require__(445), __webpack_require__(446), __webpack_require__(447),
|
30 | __webpack_require__(448), __webpack_require__(449), __webpack_require__(450);
|
31 | },
|
32 | 440: function(module, exports) {
|
33 | window.jsCommon, window.powerbi, window.powerbitests, window.InJs, window.debug,
|
34 | window.jasmine, window.Microsoft;
|
35 | },
|
36 | 441: function(module, exports) {
|
37 | var powerbi, powerbi = (window.jsCommon, window.powerbi);
|
38 | window.powerbitests, window.InJs, window.debug, window.jasmine, window.Microsoft;
|
39 | !function(powerbi) {
|
40 | var visuals;
|
41 | !function(visuals) {
|
42 | var telemetry;
|
43 | !function(telemetry) {
|
44 | function generateGuid() {
|
45 | var guid = "", idx = 0;
|
46 | for (idx = 0; 32 > idx; idx += 1) {
|
47 | var guidDigitsItem = 16 * Math.random() | 0;
|
48 | switch (idx) {
|
49 | case 8:
|
50 | case 12:
|
51 | case 16:
|
52 | case 20:
|
53 | guid += "-";
|
54 | }
|
55 | guid += guidDigitsItem.toString(16);
|
56 | }
|
57 | return guid;
|
58 | }
|
59 | telemetry.generateGuid = generateGuid;
|
60 | }(telemetry = visuals.telemetry || (visuals.telemetry = {}));
|
61 | }(visuals = powerbi.visuals || (powerbi.visuals = {}));
|
62 | }(powerbi || (powerbi = {}));
|
63 | },
|
64 | 442: function(module, exports) {
|
65 | var powerbi, jsCommon = window.jsCommon, powerbi = window.powerbi;
|
66 | window.powerbitests, window.InJs, window.debug, window.jasmine, window.Microsoft;
|
67 | !function(powerbi) {
|
68 | var visuals;
|
69 | !function(visuals) {
|
70 | var telemetry;
|
71 | !function(telemetry) {
|
72 | var g = jsCommon.Utility.generateGuid;
|
73 | telemetry.VisualApiUsage = function(name, apiVersion, custom, parentId, isError, errorSource, errorCode) {
|
74 | void 0 === isError && (isError = !1), void 0 === errorSource && (errorSource = void 0),
|
75 | void 0 === errorCode && (errorCode = void 0);
|
76 | var info = {
|
77 | name: name,
|
78 | apiVersion: apiVersion,
|
79 | custom: custom,
|
80 | parentId: parentId,
|
81 | isError: isError,
|
82 | errorSource: errorSource,
|
83 | errorCode: errorCode
|
84 | }, event = {
|
85 | name: "PBI.Visual.ApiUsage",
|
86 | category: 1,
|
87 | time: Date.now(),
|
88 | id: g(),
|
89 | getFormattedInfoObject: function() {
|
90 | var formattedObject = {
|
91 | name: info.name,
|
92 | apiVersion: info.apiVersion,
|
93 | custom: info.custom,
|
94 | parentId: info.parentId,
|
95 | isError: info.isError
|
96 | };
|
97 | return "undefined" != typeof info.errorSource && (formattedObject.errorSource = powerbi.visuals.telemetry.ErrorSource[info.errorSource]),
|
98 | "undefined" != typeof info.errorCode && (formattedObject.errorCode = info.errorCode),
|
99 | formattedObject;
|
100 | },
|
101 | info: info,
|
102 | privateFields: [],
|
103 | orgInfoFields: []
|
104 | };
|
105 | return "undefined" != typeof powerbi.visuals.telemetry.VisualApiUsageLoggers && (event.loggers = powerbi.visuals.telemetry.VisualApiUsageLoggers),
|
106 | event;
|
107 | }, telemetry.VisualException = function(visualType, isCustom, apiVersion, source, lineNumber, columnNumber, stack, message) {
|
108 | var info = {
|
109 | visualType: visualType,
|
110 | isCustom: isCustom,
|
111 | apiVersion: apiVersion,
|
112 | source: source,
|
113 | lineNumber: lineNumber,
|
114 | columnNumber: columnNumber,
|
115 | stack: stack,
|
116 | message: message
|
117 | }, event = {
|
118 | name: "PBI.Visual.Exception",
|
119 | category: 2,
|
120 | time: Date.now(),
|
121 | id: telemetry.generateGuid(),
|
122 | getFormattedInfoObject: function() {
|
123 | var formattedObject = {
|
124 | visualType: info.visualType,
|
125 | isCustom: info.isCustom,
|
126 | apiVersion: info.apiVersion,
|
127 | source: info.source,
|
128 | lineNumber: info.lineNumber,
|
129 | columnNumber: info.columnNumber,
|
130 | stack: info.stack,
|
131 | message: info.message
|
132 | };
|
133 | return formattedObject;
|
134 | },
|
135 | info: info,
|
136 | privateFields: [],
|
137 | orgInfoFields: []
|
138 | };
|
139 | return "undefined" != typeof telemetry.VisualExceptionLoggers && (event.loggers = telemetry.VisualExceptionLoggers),
|
140 | event;
|
141 | };
|
142 | }(telemetry = visuals.telemetry || (visuals.telemetry = {}));
|
143 | }(visuals = powerbi.visuals || (powerbi.visuals = {}));
|
144 | }(powerbi || (powerbi = {}));
|
145 | },
|
146 | 443: function(module, exports) {
|
147 | var powerbi, powerbi = (window.jsCommon, window.powerbi);
|
148 | window.powerbitests, window.InJs, window.debug, window.jasmine, window.Microsoft;
|
149 | !function(powerbi) {
|
150 | var extensibility;
|
151 | !function(extensibility) {
|
152 | function VisualPlugin(options) {
|
153 | return function(constructor) {
|
154 | constructor.__transform__ = options.transform;
|
155 | };
|
156 | }
|
157 | extensibility.VisualPlugin = VisualPlugin;
|
158 | }(extensibility = powerbi.extensibility || (powerbi.extensibility = {}));
|
159 | }(powerbi || (powerbi = {}));
|
160 | },
|
161 | 444: function(module, exports) {
|
162 | var powerbi, powerbi = (window.jsCommon, window.powerbi);
|
163 | window.powerbitests, window.InJs, window.debug, window.jasmine, window.Microsoft;
|
164 | !function(powerbi) {
|
165 | var extensibility;
|
166 | !function(extensibility) {
|
167 | var SelectionManager = function() {
|
168 | function SelectionManager(options) {
|
169 | this.hostServices = options.hostServices, this.selectedIds = [], this.promiseFactory = this.hostServices.promiseFactory();
|
170 | }
|
171 | return SelectionManager.prototype.select = function(selectionId, multiSelect) {
|
172 | void 0 === multiSelect && (multiSelect = !1);
|
173 | var deferred = this.promiseFactory.defer();
|
174 | return this.hostServices.shouldRetainSelection() ? this.sendSelectionToHost([ selectionId ]) : (this.selectInternal(selectionId, multiSelect),
|
175 | this.sendSelectionToHost(this.selectedIds)), deferred.resolve(this.selectedIds),
|
176 | deferred.promise;
|
177 | }, SelectionManager.prototype.showContextMenu = function(selectionId, position) {
|
178 | var deferred = this.promiseFactory.defer();
|
179 | return this.sendContextMenuToHost(selectionId, position), deferred.resolve(null),
|
180 | deferred.promise;
|
181 | }, SelectionManager.prototype.hasSelection = function() {
|
182 | return this.selectedIds.length > 0;
|
183 | }, SelectionManager.prototype.clear = function() {
|
184 | var deferred = this.promiseFactory.defer();
|
185 | return this.selectedIds = [], this.sendSelectionToHost([]), deferred.resolve(null),
|
186 | deferred.promise;
|
187 | }, SelectionManager.prototype.getSelectionIds = function() {
|
188 | return this.selectedIds;
|
189 | }, SelectionManager.prototype.sendSelectionToHost = function(ids) {
|
190 | var selectArgs = {
|
191 | data: ids.filter(function(value) {
|
192 | return value.hasIdentity();
|
193 | }).map(function(value) {
|
194 | return value.getSelector();
|
195 | })
|
196 | }, data2 = this.getSelectorsByColumn(ids);
|
197 | _.isEmpty(data2) || (selectArgs.data2 = data2), this.hostServices.onSelect(selectArgs);
|
198 | }, SelectionManager.prototype.sendContextMenuToHost = function(selectionId, position) {
|
199 | var selectors = this.getSelectorsByColumn([ selectionId ]);
|
200 | if (!_.isEmpty(selectors)) {
|
201 | var args = {
|
202 | data: selectors,
|
203 | position: position
|
204 | };
|
205 | this.hostServices.onContextMenu(args);
|
206 | }
|
207 | }, SelectionManager.prototype.getSelectorsByColumn = function(selectionIds) {
|
208 | return _(selectionIds).filter(function(value) {
|
209 | return value.hasIdentity;
|
210 | }).map(function(value) {
|
211 | return value.getSelectorsByColumn();
|
212 | }).compact().value();
|
213 | }, SelectionManager.prototype.selectInternal = function(selectionId, multiSelect) {
|
214 | SelectionManager.containsSelection(this.selectedIds, selectionId) ? this.selectedIds = multiSelect ? this.selectedIds.filter(function(d) {
|
215 | return !selectionId.equals(d);
|
216 | }) : this.selectedIds.length > 1 ? [ selectionId ] : [] : multiSelect ? this.selectedIds.push(selectionId) : this.selectedIds = [ selectionId ];
|
217 | }, SelectionManager.containsSelection = function(list, id) {
|
218 | return list.some(function(d) {
|
219 | return id.equals(d);
|
220 | });
|
221 | }, SelectionManager;
|
222 | }();
|
223 | extensibility.SelectionManager = SelectionManager;
|
224 | }(extensibility = powerbi.extensibility || (powerbi.extensibility = {}));
|
225 | }(powerbi || (powerbi = {}));
|
226 | },
|
227 | 445: function(module, exports) {
|
228 | var powerbi, powerbi = (window.jsCommon, window.powerbi);
|
229 | window.powerbitests, window.InJs, window.debug, window.jasmine, window.Microsoft;
|
230 | !function(powerbi) {
|
231 | var extensibility;
|
232 | !function(extensibility) {
|
233 | var SelectionIdBuilder = function() {
|
234 | function SelectionIdBuilder() {}
|
235 | return SelectionIdBuilder.prototype.withCategory = function(categoryColumn, index) {
|
236 | return categoryColumn && categoryColumn.source && categoryColumn.source.queryName && categoryColumn.identity && (this.ensureDataMap()[categoryColumn.source.queryName] = categoryColumn.identity[index]),
|
237 | this;
|
238 | }, SelectionIdBuilder.prototype.withSeries = function(seriesColumn, valueColumn) {
|
239 | return seriesColumn && seriesColumn.source && seriesColumn.source.queryName && valueColumn && (this.ensureDataMap()[seriesColumn.source.queryName] = valueColumn.identity),
|
240 | this;
|
241 | }, SelectionIdBuilder.prototype.withMeasure = function(measureId) {
|
242 | return this.measure = measureId, this;
|
243 | }, SelectionIdBuilder.prototype.createSelectionId = function() {
|
244 | return powerbi.visuals.SelectionId.createWithSelectorForColumnAndMeasure(this.ensureDataMap(), this.measure);
|
245 | }, SelectionIdBuilder.prototype.ensureDataMap = function() {
|
246 | return this.dataMap || (this.dataMap = {}), this.dataMap;
|
247 | }, SelectionIdBuilder;
|
248 | }();
|
249 | extensibility.SelectionIdBuilder = SelectionIdBuilder;
|
250 | }(extensibility = powerbi.extensibility || (powerbi.extensibility = {}));
|
251 | }(powerbi || (powerbi = {}));
|
252 | },
|
253 | 446: function(module, exports) {
|
254 | var powerbi, powerbi = (window.jsCommon, window.powerbi);
|
255 | window.powerbitests, window.InJs, window.debug, window.jasmine, window.Microsoft;
|
256 | !function(powerbi) {
|
257 | var extensibility;
|
258 | !function(extensibility) {
|
259 | function createVisualAdapter(visualPlugin, telemetryService) {
|
260 | var visualAdapter = new VisualAdapter(visualPlugin, telemetryService);
|
261 | return new extensibility.VisualSafeExecutionWrapper(visualAdapter, visualPlugin, telemetryService, visualAdapter.isPluginInError);
|
262 | }
|
263 | extensibility.visualApiVersions = [], extensibility.createVisualAdapter = createVisualAdapter;
|
264 | var VisualAdapter = function() {
|
265 | function VisualAdapter(visualPlugin, telemetryService) {
|
266 | this.isPluginInError = !1, this.telemetryService = telemetryService, this.plugin = visualPlugin;
|
267 | var version = visualPlugin.apiVersion, versionIndex = this.getVersionIndex(version);
|
268 | version ? versionIndex > -1 ? (this.apiVersionIndex = versionIndex, this.legacy = !1) : this.isPluginInError = !0 : this.legacy = !0;
|
269 | }
|
270 | return VisualAdapter.prototype.init = function(options) {
|
271 | if (options.element.empty(), this.legacy) this.visual = this.plugin.create(), this.visualLegacy.init(options); else {
|
272 | var host = extensibility.visualApiVersions[this.apiVersionIndex].hostAdapter(options.host);
|
273 | this.visual = this.plugin.create({
|
274 | element: options.element.get(0),
|
275 | host: host
|
276 | }), this.overloadMethods();
|
277 | }
|
278 | }, VisualAdapter.prototype.update = function(options) {
|
279 | (options.type & powerbi.VisualUpdateType.Resize) === powerbi.VisualUpdateType.Resize && this.visualHasMethod("onResizing") ? (this.plugin.custom && this.visualHasMethod("update") && this.visualLegacy.update(options),
|
280 | this.onResizing(options.viewport, options.resizeMode)) : this.visualHasMethod("update") ? this.visualLegacy.update(options) : ((!options.type || options.type & powerbi.VisualUpdateType.Data) && this.onDataChanged(_.pick(options, [ "dataViews", "operationKind" ])),
|
281 | options.type & powerbi.VisualUpdateType.ViewMode && this.onViewModeChanged(options.viewMode));
|
282 | }, VisualAdapter.prototype.destroy = function() {
|
283 | this.visualHasMethod("destroy") && this.visualLegacy.destroy();
|
284 | }, VisualAdapter.prototype.enumerateObjectInstances = function(options) {
|
285 | return this.visualHasMethod("enumerateObjectInstances") ? this.visualLegacy.enumerateObjectInstances(options) : void 0;
|
286 | }, VisualAdapter.prototype.enumerateObjectRepetition = function() {
|
287 | return this.visualHasMethod("enumerateObjectRepetition") ? this.visualLegacy.enumerateObjectRepetition() : void 0;
|
288 | }, VisualAdapter.prototype.onResizing = function(finalViewport, resizeMode) {
|
289 | this.visualHasMethod("onResizing") && this.visualLegacy.onResizing(finalViewport, resizeMode);
|
290 | }, VisualAdapter.prototype.onDataChanged = function(options) {
|
291 | this.visualHasMethod("onDataChanged") && this.visualLegacy.onDataChanged(options);
|
292 | }, VisualAdapter.prototype.onViewModeChanged = function(viewMode) {
|
293 | this.visualHasMethod("onViewModeChanged") && this.visualLegacy.onViewModeChanged(viewMode);
|
294 | }, VisualAdapter.prototype.onClearSelection = function() {
|
295 | this.visualHasMethod("onClearSelection") && this.visualLegacy.onClearSelection();
|
296 | }, VisualAdapter.prototype.canResizeTo = function(viewport) {
|
297 | return this.visualHasMethod("canResizeTo") ? this.visualLegacy.canResizeTo(viewport) : void 0;
|
298 | }, VisualAdapter.prototype.unwrap = function() {
|
299 | return this.visual;
|
300 | }, Object.defineProperty(VisualAdapter.prototype, "visualNew", {
|
301 | get: function() {
|
302 | return this.legacy ? void 0 : this.visual;
|
303 | },
|
304 | enumerable: !0,
|
305 | configurable: !0
|
306 | }), Object.defineProperty(VisualAdapter.prototype, "visualLegacy", {
|
307 | get: function() {
|
308 | return this.legacy ? this.visual : void 0;
|
309 | },
|
310 | enumerable: !0,
|
311 | configurable: !0
|
312 | }), VisualAdapter.prototype.visualHasMethod = function(methodName) {
|
313 | var visual = this.legacy ? this.visualLegacy : this.visualNew;
|
314 | return visual && _.isFunction(visual[methodName]);
|
315 | }, VisualAdapter.prototype.getVersionIndex = function(version) {
|
316 | if (version) for (var versionCount = extensibility.visualApiVersions.length, i = 0; versionCount > i; i++) if (extensibility.visualApiVersions[i].version === version) return i;
|
317 | return -1;
|
318 | }, VisualAdapter.prototype.overloadMethods = function() {
|
319 | var overloads = this.getCompiledOverloads();
|
320 | for (var key in overloads) this[key] = overloads[key];
|
321 | }, VisualAdapter.prototype.getCompiledOverloads = function() {
|
322 | for (var overloads = {}, versionIndex = this.apiVersionIndex, visualNew = this.visualNew, i = 0; versionIndex >= i; i++) {
|
323 | var overloadFactory = extensibility.visualApiVersions[i].overloads;
|
324 | _.isFunction(overloadFactory) && _.assign(overloads, overloadFactory(visualNew));
|
325 | }
|
326 | return overloads;
|
327 | }, VisualAdapter;
|
328 | }();
|
329 | extensibility.VisualAdapter = VisualAdapter;
|
330 | }(extensibility = powerbi.extensibility || (powerbi.extensibility = {}));
|
331 | }(powerbi || (powerbi = {}));
|
332 | },
|
333 | 447: function(module, exports) {
|
334 | var powerbi, powerbi = (window.jsCommon, window.powerbi);
|
335 | window.powerbitests, window.InJs, window.debug, window.jasmine, window.Microsoft;
|
336 | !function(powerbi) {
|
337 | var extensibility;
|
338 | !function(extensibility) {
|
339 | function translateVisualPlugin(plugin) {
|
340 | translateCapabilities(plugin.capabilities);
|
341 | }
|
342 | function translateCapabilities(capabilities) {
|
343 | capabilities && (translateObjects(capabilities.objects), translateDataRoles(capabilities.dataRoles));
|
344 | }
|
345 | function translateObjects(objects) {
|
346 | for (var key in objects) {
|
347 | var object = objects[key];
|
348 | if (object) {
|
349 | var properties = object.properties;
|
350 | if (properties) for (var pKey in properties) {
|
351 | var property = properties[pKey];
|
352 | if (property) {
|
353 | var propertyType = property.type;
|
354 | propertyType && propertyType.enumeration && (propertyType.enumeration = powerbi.createEnumType(propertyType.enumeration));
|
355 | }
|
356 | }
|
357 | }
|
358 | }
|
359 | }
|
360 | function translateDataRoles(dataRoles) {
|
361 | for (var key in dataRoles) {
|
362 | var dataRole = dataRoles[key];
|
363 | if (dataRole && dataRole.kind) switch (dataRole.kind.toString().toLowerCase()) {
|
364 | case "grouping":
|
365 | dataRole.kind = powerbi.VisualDataRoleKind.Grouping;
|
366 | break;
|
367 |
|
368 | case "measure":
|
369 | dataRole.kind = powerbi.VisualDataRoleKind.Measure;
|
370 | break;
|
371 |
|
372 | case "groupingormeasure":
|
373 | dataRole.kind = powerbi.VisualDataRoleKind.GroupingOrMeasure;
|
374 | }
|
375 | }
|
376 | }
|
377 | extensibility.translateVisualPlugin = translateVisualPlugin;
|
378 | }(extensibility = powerbi.extensibility || (powerbi.extensibility = {}));
|
379 | }(powerbi || (powerbi = {}));
|
380 | },
|
381 | 448: function(module, exports) {
|
382 | var powerbi, powerbi = (window.jsCommon, window.powerbi);
|
383 | window.powerbitests, window.InJs, window.debug, window.jasmine, window.Microsoft;
|
384 | !function(powerbi) {
|
385 | var extensibility;
|
386 | !function(extensibility) {
|
387 | var VisualException = powerbi.visuals.telemetry.VisualException, VisualSafeExecutionWrapper = function() {
|
388 | function VisualSafeExecutionWrapper(wrappedVisual, visualPlugin, telemetryService, isPluginInError, silent) {
|
389 | this.wrappedVisual = wrappedVisual, this.visualPlugin = visualPlugin, this.telemetryService = telemetryService,
|
390 | this.isPluginInError = isPluginInError, this.silent = silent, this.telemetryService && (this.perfLoadEvent = this.telemetryService.startEvent(powerbi.visuals.telemetry.VisualApiUsage, visualPlugin.name, visualPlugin.apiVersion, !!visualPlugin.custom, void 0, isPluginInError, powerbi.visuals.telemetry.ErrorSource.User, void 0));
|
391 | }
|
392 | return VisualSafeExecutionWrapper.prototype.init = function(options) {
|
393 | var _this = this;
|
394 | this.wrappedVisual.init && this.executeSafely(function() {
|
395 | return _this.wrappedVisual.init(options);
|
396 | });
|
397 | }, VisualSafeExecutionWrapper.prototype.destroy = function() {
|
398 | var _this = this;
|
399 | this.wrappedVisual.destroy && this.executeSafely(function() {
|
400 | return _this.wrappedVisual.destroy();
|
401 | }), this.perfLoadEvent && (this.perfLoadEvent = null);
|
402 | }, VisualSafeExecutionWrapper.prototype.update = function(options) {
|
403 | var _this = this;
|
404 | this.wrappedVisual.update && this.executeSafely(function() {
|
405 | _this.wrappedVisual.update(options), _this.perfLoadEvent && (_this.perfLoadEvent.resolve(),
|
406 | _this.perfLoadEvent = null);
|
407 | });
|
408 | }, VisualSafeExecutionWrapper.prototype.onResizing = function(finalViewport, resizeMode) {
|
409 | var _this = this;
|
410 | this.wrappedVisual.onResizing && this.executeSafely(function() {
|
411 | return _this.wrappedVisual.onResizing(finalViewport, resizeMode);
|
412 | });
|
413 | }, VisualSafeExecutionWrapper.prototype.onDataChanged = function(options) {
|
414 | var _this = this;
|
415 | this.wrappedVisual.onDataChanged && this.executeSafely(function() {
|
416 | return _this.wrappedVisual.onDataChanged(options);
|
417 | });
|
418 | }, VisualSafeExecutionWrapper.prototype.onViewModeChanged = function(viewMode) {
|
419 | var _this = this;
|
420 | this.wrappedVisual.onViewModeChanged && this.executeSafely(function() {
|
421 | return _this.wrappedVisual.onViewModeChanged(viewMode);
|
422 | });
|
423 | }, VisualSafeExecutionWrapper.prototype.onClearSelection = function() {
|
424 | var _this = this;
|
425 | this.wrappedVisual.onClearSelection && this.executeSafely(function() {
|
426 | return _this.wrappedVisual.onClearSelection();
|
427 | });
|
428 | }, VisualSafeExecutionWrapper.prototype.canResizeTo = function(viewport) {
|
429 | var _this = this;
|
430 | return this.wrappedVisual.canResizeTo ? this.executeSafely(function() {
|
431 | return _this.wrappedVisual.canResizeTo(viewport);
|
432 | }) : void 0;
|
433 | }, VisualSafeExecutionWrapper.prototype.enumerateObjectInstances = function(options) {
|
434 | var _this = this;
|
435 | return this.wrappedVisual.enumerateObjectInstances ? this.executeSafely(function() {
|
436 | return _this.wrappedVisual.enumerateObjectInstances(options);
|
437 | }) : void 0;
|
438 | }, VisualSafeExecutionWrapper.prototype.enumerateObjectRepetition = function() {
|
439 | var _this = this;
|
440 | return this.wrappedVisual.enumerateObjectRepetition ? this.executeSafely(function() {
|
441 | return _this.wrappedVisual.enumerateObjectRepetition();
|
442 | }) : void 0;
|
443 | }, VisualSafeExecutionWrapper.prototype.unwrap = function() {
|
444 | var visual = this.wrappedVisual;
|
445 | return visual.unwrap ? visual.unwrap() : visual;
|
446 | }, VisualSafeExecutionWrapper.prototype.isCustomVisual = function() {
|
447 | return this.visualPlugin.custom;
|
448 | }, VisualSafeExecutionWrapper.prototype.executeSafely = function(callback) {
|
449 | try {
|
450 | return callback();
|
451 | } catch (exception) {
|
452 | !this.silent, this.telemetryService && (this.telemetryService.logEvent(VisualException, this.visualPlugin.name, !!this.visualPlugin.custom, this.visualPlugin.apiVersion, exception.fileName, exception.lineNumber, exception.columnNumber, exception.stack, exception.message),
|
453 | this.perfLoadEvent && (this.perfLoadEvent.reject(), this.perfLoadEvent = null));
|
454 | }
|
455 | }, VisualSafeExecutionWrapper;
|
456 | }();
|
457 | extensibility.VisualSafeExecutionWrapper = VisualSafeExecutionWrapper;
|
458 | }(extensibility = powerbi.extensibility || (powerbi.extensibility = {}));
|
459 | }(powerbi || (powerbi = {}));
|
460 | },
|
461 | 449: function(module, exports) {
|
462 | var powerbi, powerbi = (window.jsCommon, window.powerbi);
|
463 | window.powerbitests, window.InJs, window.debug, window.jasmine, window.Microsoft;
|
464 | !function(powerbi) {
|
465 | var extensibility;
|
466 | !function(extensibility) {
|
467 | var v100;
|
468 | !function(v100) {
|
469 | function convertLegacyUpdateType(options) {
|
470 | var type = options.type || powerbi.VisualUpdateType.Data;
|
471 | return type & powerbi.VisualUpdateType.Resize && 2 === options.resizeMode && (type |= powerbi.VisualUpdateType.ResizeEnd),
|
472 | type;
|
473 | }
|
474 | v100.convertLegacyUpdateType = convertLegacyUpdateType;
|
475 | var overloadFactory = function(visual) {
|
476 | return {
|
477 | update: function(options) {
|
478 | visual.update && visual.update({
|
479 | viewport: options.viewport,
|
480 | dataViews: options.dataViews,
|
481 | type: convertLegacyUpdateType(options)
|
482 | });
|
483 | },
|
484 | destroy: function() {
|
485 | visual.destroy && visual.destroy();
|
486 | },
|
487 | enumerateObjectInstances: function(options) {
|
488 | return visual.enumerateObjectInstances ? visual.enumerateObjectInstances(options) : void 0;
|
489 | }
|
490 | };
|
491 | }, hostAdapter = function(host) {
|
492 | return {};
|
493 | };
|
494 | extensibility.visualApiVersions.push({
|
495 | version: "1.0.0",
|
496 | overloads: overloadFactory,
|
497 | hostAdapter: hostAdapter
|
498 | });
|
499 | }(v100 = extensibility.v100 || (extensibility.v100 = {}));
|
500 | }(extensibility = powerbi.extensibility || (powerbi.extensibility = {}));
|
501 | }(powerbi || (powerbi = {}));
|
502 | },
|
503 | 450: function(module, exports) {
|
504 | var powerbi, powerbi = (window.jsCommon, window.powerbi);
|
505 | window.powerbitests, window.InJs, window.debug, window.jasmine, window.Microsoft;
|
506 | !function(powerbi) {
|
507 | var extensibility;
|
508 | !function(extensibility) {
|
509 | var v110;
|
510 | !function(v110) {
|
511 | var overloadFactory = function(visual) {
|
512 | return {
|
513 | update: function(options) {
|
514 | if (visual.update) {
|
515 | var updateOptions = {
|
516 | viewport: options.viewport,
|
517 | dataViews: options.dataViews,
|
518 | type: extensibility.v100.convertLegacyUpdateType(options)
|
519 | }, transform = visual.constructor.__transform__;
|
520 | _.isFunction(transform) ? visual.update(updateOptions, transform(updateOptions.dataViews)) : visual.update(updateOptions);
|
521 | }
|
522 | }
|
523 | };
|
524 | }, hostAdapter = function(host) {
|
525 | return {
|
526 | createSelectionIdBuilder: function() {
|
527 | return new powerbi.visuals.SelectionIdBuilder();
|
528 | },
|
529 | createSelectionManager: function() {
|
530 | return new extensibility.SelectionManager({
|
531 | hostServices: host
|
532 | });
|
533 | },
|
534 | colors: powerbi.visuals.ThemeManager.getDefaultTheme()
|
535 | };
|
536 | };
|
537 | extensibility.visualApiVersions.push({
|
538 | version: "1.1.0",
|
539 | overloads: overloadFactory,
|
540 | hostAdapter: hostAdapter
|
541 | });
|
542 | }(v110 = extensibility.v110 || (extensibility.v110 = {}));
|
543 | }(extensibility = powerbi.extensibility || (powerbi.extensibility = {}));
|
544 | }(powerbi || (powerbi = {}));
|
545 | }
|
546 | }); |
\ | No newline at end of file |