powerbi-visuals-tools 5.2.0-beta.1 → 5.2.0
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.
- package/Changelog.md +3 -0
- package/bin/pbiviz.js +1 -0
- package/certs/PowerBICustomVisualTest_private.key +26 -26
- package/certs/PowerBICustomVisualTest_public.crt +17 -17
- package/lib/CertificateTools.js +10 -5
- package/lib/CommandManager.js +2 -2
- package/lib/VisualManager.js +19 -14
- package/lib/features/AdvancedEditMode.js +1 -0
- package/lib/features/AllowInteractions.js +1 -0
- package/lib/features/AnalyticsPane.js +1 -0
- package/lib/features/BaseFeature.js +1 -3
- package/lib/features/Bookmarks.js +1 -0
- package/lib/features/ColorPalette.js +1 -0
- package/lib/features/ConditionalFormatting.js +1 -0
- package/lib/features/ContextMenu.js +1 -0
- package/lib/features/DrillDown.js +1 -0
- package/lib/features/ESLint.js +2 -1
- package/lib/features/FetchMoreData.js +1 -0
- package/lib/features/FileDownload.js +1 -0
- package/lib/features/FormatPane.js +1 -0
- package/lib/features/HighContrast.js +1 -0
- package/lib/features/HighlightData.js +1 -0
- package/lib/features/KeyboardNavigation.js +1 -0
- package/lib/features/LandingPage.js +1 -0
- package/lib/features/LaunchURL.js +1 -0
- package/lib/features/LocalStorage.js +1 -0
- package/lib/features/Localizations.js +1 -0
- package/lib/features/ModalDialog.js +1 -0
- package/lib/features/RenderingEvents.js +1 -0
- package/lib/features/SelectionAcrossVisuals.js +1 -0
- package/lib/features/SyncSlicer.js +1 -0
- package/lib/features/Tooltips.js +1 -0
- package/lib/features/TotalSubTotal.js +2 -1
- package/lib/features/WarningIcon.js +1 -0
- package/package.json +8 -8
- package/templates/visuals/default/package.json +1 -1
- package/templates/visuals/default/src/settings.ts +1 -1
- package/templates/visuals/default/src/visual.ts +1 -1
- package/templates/visuals/rhtml/package.json +1 -1
- package/templates/visuals/rhtml/src/settings.ts +1 -1
- package/templates/visuals/rhtml/src/visual.ts +1 -1
- package/templates/visuals/rvisual/package.json +1 -1
- package/templates/visuals/rvisual/src/settings.ts +1 -1
- package/templates/visuals/rvisual/src/visual.ts +1 -1
- package/templates/visuals/slicer/package.json +1 -1
- package/templates/visuals/slicer/src/settings.ts +1 -1
- package/templates/visuals/slicer/src/visual.ts +1 -1
- package/templates/visuals/table/package.json +1 -1
package/Changelog.md
CHANGED
|
@@ -5,6 +5,9 @@ This page contains information about changes to the PowerBI Visual Tools (pbiviz
|
|
|
5
5
|
## 5.2.0
|
|
6
6
|
* Integrated PAC validation
|
|
7
7
|
|
|
8
|
+
## 5.1.1
|
|
9
|
+
* Updated crypto import to fix error in old Node versions
|
|
10
|
+
|
|
8
11
|
## 5.1.0
|
|
9
12
|
* New flag `--skip-api` to skip verifying api version. It might produce different errors in visual, so use it only in some specific cases (ex. installing something during the build process brakes packages managed by monorepo managers).
|
|
10
13
|
* New flag `--all-locales` to disable optimization using localization loader. It's recommended not to use this flag because all locales take a huge amount of package size. If you need just a few of them follow [this guide](https://learn.microsoft.com/en-us/power-bi/developer/visuals/localization?tabs=English#step-5---add-a-resources-file-for-each-language). In this case, only declared in stringResources locales will be added to your visual package.
|
package/bin/pbiviz.js
CHANGED
|
@@ -89,6 +89,7 @@ pbiviz
|
|
|
89
89
|
.option('--no-stats', "Doesn't generate statistics files")
|
|
90
90
|
.option('--skip-api', "Skips powerbi-visuals-api verifying")
|
|
91
91
|
.option('-l, --all-locales', "Keeps all locale files in the package. By default only used inside stringResources folder locales are included.")
|
|
92
|
+
.option('-v, --verbose', "Enables verbose logging")
|
|
92
93
|
.addOption(new Option('-c, --compression <compressionLevel>', "Enables compression of visual package")
|
|
93
94
|
.choices(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'])
|
|
94
95
|
.default('6')
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
-----BEGIN PRIVATE KEY-----
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|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|
|
13
|
+
Ul3UHn0htYQfe3luetCk4gp+oi2g3uiuCaG0CXcCLw/fcrn/a+BXIu89M/Lr3B58
|
|
14
|
+
0fMU8M8X86MSztKXHU31b6w44J/zbqRKV8NR1f3pRnfKW1LIQAMg6RZCvFoFLKdL
|
|
15
|
+
jUuhGeig9JtyYFJ1wrbS8B+Z6ZqLci+whR6KG517umutIRfkjFeY4w/kblMLLBbp
|
|
16
|
+
EB7eHuflR06swZDZzyFm1hoJWSQkraiovuwFDPO02YfQAQdxH6y+ZyGoK7okSszs
|
|
17
|
+
9ARzORTmiMGqaQIw0BDMji8GOij27ou8MQhWXJ+BS0xLBPPCjMcT5JujV/ewqeUh
|
|
18
|
+
2CwYaihEXAJtwSvwSw==
|
|
19
19
|
-----END CERTIFICATE-----
|
package/lib/CertificateTools.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-case-declarations */
|
|
1
2
|
/*
|
|
2
3
|
* Power BI Visual CLI
|
|
3
4
|
*
|
|
@@ -28,7 +29,7 @@ import { exec as nodeExec } from 'child_process';
|
|
|
28
29
|
import fs from 'fs-extra';
|
|
29
30
|
import os from 'os';
|
|
30
31
|
import path from 'path';
|
|
31
|
-
import crypto
|
|
32
|
+
import crypto from "crypto";
|
|
32
33
|
import { getRootPath, readJsonFromRoot } from './utils.js';
|
|
33
34
|
import ConsoleWriter from './ConsoleWriter.js';
|
|
34
35
|
const certSafePeriod = 1000 * 60 * 60 * 24; // 24 hours
|
|
@@ -114,11 +115,8 @@ export async function createCertFile(config, open) {
|
|
|
114
115
|
}
|
|
115
116
|
break;
|
|
116
117
|
case "win32":
|
|
117
|
-
// eslint-disable-next-line no-case-declarations
|
|
118
|
-
let passphrase = "";
|
|
119
118
|
// for windows 7 and others
|
|
120
119
|
// 6.1 - Windows 7
|
|
121
|
-
// eslint-disable-next-line no-case-declarations
|
|
122
120
|
const osVersion = os.release().split(".");
|
|
123
121
|
if ((Number(osVersion[0]) === 6 && Number(osVersion[1]) === 1) || Number(osVersion[0]) < 6) {
|
|
124
122
|
await removeCertFiles(certPath, keyPath, pfxPath);
|
|
@@ -140,7 +138,14 @@ export async function createCertFile(config, open) {
|
|
|
140
138
|
}
|
|
141
139
|
break;
|
|
142
140
|
}
|
|
143
|
-
|
|
141
|
+
let randomValues;
|
|
142
|
+
if (crypto.getRandomValues !== undefined) {
|
|
143
|
+
randomValues = crypto.getRandomValues(new Uint32Array(1));
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
randomValues = crypto.webcrypto.getRandomValues(new Uint32Array(1));
|
|
147
|
+
}
|
|
148
|
+
const passphrase = randomValues[0].toString().substring(2);
|
|
144
149
|
config.server.passphrase = passphrase;
|
|
145
150
|
fs.writeFileSync(path.join(rootPath, confPath), JSON.stringify(config));
|
|
146
151
|
// for windows 8 / 8.1 / server 2012 R2 /
|
package/lib/CommandManager.js
CHANGED
|
@@ -40,9 +40,9 @@ export default class CommandManager {
|
|
|
40
40
|
};
|
|
41
41
|
new VisualManager(rootPath)
|
|
42
42
|
.prepareVisual()
|
|
43
|
-
.validateVisual()
|
|
43
|
+
.validateVisual(options.verbose)
|
|
44
44
|
.initializeWebpack(webpackOptions)
|
|
45
|
-
.then(visualManager => visualManager.generatePackage());
|
|
45
|
+
.then(visualManager => visualManager.generatePackage(options.verbose));
|
|
46
46
|
}
|
|
47
47
|
static new({ force, template }, name, rootPath) {
|
|
48
48
|
const generateOptions = {
|
package/lib/VisualManager.js
CHANGED
|
@@ -78,11 +78,11 @@ export default class VisualManager {
|
|
|
78
78
|
this.compiler = webpack(this.webpackConfig);
|
|
79
79
|
return this;
|
|
80
80
|
}
|
|
81
|
-
generatePackage() {
|
|
81
|
+
generatePackage(verbose = false) {
|
|
82
82
|
const callback = (err, stats) => {
|
|
83
83
|
this.createPackageInstance();
|
|
84
84
|
const logs = this.validatePackage();
|
|
85
|
-
this.outputResults(logs);
|
|
85
|
+
this.outputResults(logs, verbose);
|
|
86
86
|
this.parseCompilationResults(err, stats);
|
|
87
87
|
};
|
|
88
88
|
this.compiler.run(callback);
|
|
@@ -114,10 +114,10 @@ export default class VisualManager {
|
|
|
114
114
|
process.exit(1);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
validateVisual() {
|
|
117
|
+
validateVisual(verbose = false) {
|
|
118
118
|
this.featureManager = new FeatureManager();
|
|
119
119
|
const { status, logs } = this.featureManager.validate(Stage.PreBuild, this.visual);
|
|
120
|
-
this.outputResults(logs);
|
|
120
|
+
this.outputResults(logs, verbose);
|
|
121
121
|
if (status === Status.Error) {
|
|
122
122
|
process.exit(1);
|
|
123
123
|
}
|
|
@@ -128,17 +128,21 @@ export default class VisualManager {
|
|
|
128
128
|
const { logs } = featureManager.validate(Stage.PostBuild, this.package);
|
|
129
129
|
return logs;
|
|
130
130
|
}
|
|
131
|
-
outputResults({ errors, deprecation, warnings, info }) {
|
|
132
|
-
const
|
|
133
|
-
|
|
131
|
+
outputResults({ errors, deprecation, warnings, info }, verbose) {
|
|
132
|
+
const headerMessage = {
|
|
133
|
+
error: `Visual doesn't support some features required for all custom visuals:`,
|
|
134
134
|
deprecation: `Some features are going to be required soon, please update the visual:`,
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
warning: `Visual doesn't support some features recommended for all custom visuals:`,
|
|
136
|
+
verboseInfo: `Visual can be improved by adding some features:`,
|
|
137
|
+
shortInfo: `Visual can be improved by adding ${info.length} more optional features.`
|
|
137
138
|
};
|
|
138
|
-
this.outputLogsWithHeadMessage(
|
|
139
|
-
this.outputLogsWithHeadMessage(
|
|
140
|
-
this.outputLogsWithHeadMessage(
|
|
141
|
-
|
|
139
|
+
this.outputLogsWithHeadMessage(headerMessage.error, errors, Severity.Error);
|
|
140
|
+
this.outputLogsWithHeadMessage(headerMessage.deprecation, deprecation, Severity.Deprecation);
|
|
141
|
+
this.outputLogsWithHeadMessage(headerMessage.warning, warnings, Severity.Warning);
|
|
142
|
+
const verboseSuggestion = 'Run `pbiviz package` with --verbose flag to see more details.';
|
|
143
|
+
const headerInfoMessage = headerMessage[verbose ? "verboseInfo" : "shortInfo"];
|
|
144
|
+
const infoLogs = (!info.length || verbose) ? info : [verboseSuggestion];
|
|
145
|
+
this.outputLogsWithHeadMessage(headerInfoMessage, infoLogs, Severity.Info);
|
|
142
146
|
}
|
|
143
147
|
displayInfo() {
|
|
144
148
|
if (this.pbivizConfig) {
|
|
@@ -246,7 +250,8 @@ export default class VisualManager {
|
|
|
246
250
|
}
|
|
247
251
|
let outputLog;
|
|
248
252
|
switch (severity) {
|
|
249
|
-
case Severity.
|
|
253
|
+
case Severity.Deprecation:
|
|
254
|
+
case Severity.Error:
|
|
250
255
|
outputLog = ConsoleWriter.error;
|
|
251
256
|
break;
|
|
252
257
|
case Severity.Warning:
|
|
@@ -5,6 +5,7 @@ export default class AdvancedEditMode {
|
|
|
5
5
|
static severity = Severity.Info;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return !packageInstance.isCapabilityEnabled({ advancedEditMode: 0 }); // 0 - Advanced edit mode is disabled
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class AllowInteractions {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain('.allowInteractions');
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class AnalyticsPane {
|
|
|
5
5
|
static severity = Severity.Info;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return (packageInstance.isCapabilityEnabled({
|
|
10
11
|
objects: {
|
|
@@ -5,6 +5,7 @@ export default class Bookmarks {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain("applySelectionFromFilter") || packageInstance.contain("registerOnSelectCallback");
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class ColorPalette {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain(".colorPalette");
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class ConditionalFormatting {
|
|
|
5
5
|
static severity = Severity.Info;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain(".createDataViewWildcardSelector");
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class ContextMenu {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain(".showContextMenu");
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class DrillDown {
|
|
|
5
5
|
static severity = Severity.Info;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.isCapabilityEnabled({
|
|
10
11
|
drilldown: {
|
package/lib/features/ESLint.js
CHANGED
|
@@ -2,9 +2,10 @@ import { Severity, Stage, VisualFeatureType } from "./FeatureTypes.js";
|
|
|
2
2
|
export default class ESLint {
|
|
3
3
|
static featureName = "ESLint";
|
|
4
4
|
static documentationLink = "https://github.com/microsoft/eslint-plugin-powerbi-visuals";
|
|
5
|
-
static severity = Severity.
|
|
5
|
+
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PreBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.All;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(visual) {
|
|
9
10
|
return visual.doesESLlintSupported();
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class FetchMoreData {
|
|
|
5
5
|
static severity = Severity.Info;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.isCapabilityEnabled({
|
|
10
11
|
dataViewMappings: [
|
|
@@ -5,6 +5,7 @@ export default class FileDownload {
|
|
|
5
5
|
static severity = Severity.Info;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain(".downloadService") && packageInstance.contain(".exportVisualsContent");
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class FormatPane {
|
|
|
5
5
|
static severity = Severity.Deprecation;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.All;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain("getFormattingModel");
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class HighContrast {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain(".isHighContrast");
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class HighlightData {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.isCapabilityEnabled({ supportsHighlight: true });
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class KeyboardNavigation {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.isCapabilityEnabled({ supportsKeyboardFocus: true });
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class LandingPage {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.isCapabilityEnabled({ supportsLandingPage: true });
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class LaunchURL {
|
|
|
5
5
|
static severity = Severity.Info;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain(".launchUrl");
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class LocalStorage {
|
|
|
5
5
|
static severity = Severity.Info;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain(".storageService");
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class Localizations {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain(".createLocalizationManager");
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class ModalDialog {
|
|
|
5
5
|
static severity = Severity.Info;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain(".openModalDialog");
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class RenderingEvents {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.All;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
const keywords = [".eventService", ".renderingStarted", ".renderingFinished"];
|
|
10
11
|
return !keywords.some(keyword => !packageInstance.contain(keyword));
|
|
@@ -5,6 +5,7 @@ export default class SelectionAcrossVisuals {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.isCapabilityEnabled({ supportsMultiVisualSelection: true });
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class SyncSlicer {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.isCapabilityEnabled({ supportsSynchronizingFilterState: true });
|
|
10
11
|
}
|
package/lib/features/Tooltips.js
CHANGED
|
@@ -5,6 +5,7 @@ export default class Tooltips {
|
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain("tooltipService") && packageInstance.isCapabilityEnabled({ tooltips: {} });
|
|
10
11
|
}
|
|
@@ -4,7 +4,8 @@ export default class TotalSubTotal {
|
|
|
4
4
|
static documentationLink = "https://learn.microsoft.com/en-us/power-bi/developer/visuals/total-subtotal-api";
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
|
-
static visualFeatureType = VisualFeatureType.Matrix
|
|
7
|
+
static visualFeatureType = VisualFeatureType.Matrix;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.isCapabilityEnabled({ subtotals: true });
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export default class WarningIcon {
|
|
|
5
5
|
static severity = Severity.Info;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
|
|
8
|
+
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
8
9
|
static isSupported(packageInstance) {
|
|
9
10
|
return packageInstance.contain(".displayWarningIcon");
|
|
10
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerbi-visuals-tools",
|
|
3
|
-
"version": "5.2.0
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Command line tool for creating and publishing visuals for Power BI",
|
|
5
5
|
"main": "./bin/pbiviz.js",
|
|
6
6
|
"type": "module",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/Microsoft/PowerBI-visuals-tools#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@typescript-eslint/parser": "^
|
|
33
|
-
"assert": "^2.
|
|
32
|
+
"@typescript-eslint/parser": "^6.7.5",
|
|
33
|
+
"assert": "^2.1.0",
|
|
34
34
|
"async": "^3.2.4",
|
|
35
35
|
"browserify-zlib": "^0.2.0",
|
|
36
36
|
"buffer": "^6.0.3",
|
|
@@ -68,19 +68,19 @@
|
|
|
68
68
|
"string_decoder": "^1.3.0",
|
|
69
69
|
"terser-webpack-plugin": "^5.3.9",
|
|
70
70
|
"timers-browserify": "^2.0.12",
|
|
71
|
-
"ts-loader": "^9.
|
|
71
|
+
"ts-loader": "^9.5.0",
|
|
72
72
|
"tty-browserify": "^0.0.1",
|
|
73
73
|
"typescript": "^4.9.5",
|
|
74
|
-
"url": "^0.11.
|
|
74
|
+
"url": "^0.11.3",
|
|
75
75
|
"util": "^0.12.5",
|
|
76
76
|
"vm-browserify": "^1.1.2",
|
|
77
77
|
"webpack": "^5.88.2",
|
|
78
|
-
"webpack-bundle-analyzer": "4.9.
|
|
78
|
+
"webpack-bundle-analyzer": "4.9.1",
|
|
79
79
|
"webpack-dev-server": "^4.15.1"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
83
|
-
"eslint": "^8.
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^6.7.5",
|
|
83
|
+
"eslint": "^8.51.0",
|
|
84
84
|
"eslint-plugin-powerbi-visuals": "^0.8.1",
|
|
85
85
|
"jasmine": "5.1.0",
|
|
86
86
|
"jasmine-spec-reporter": "7.0.0",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@types/d3": "7.4.0",
|
|
18
18
|
"d3": "7.8.5",
|
|
19
19
|
"powerbi-visuals-api": "5.4.0",
|
|
20
|
-
"powerbi-visuals-utils-formattingmodel": "
|
|
20
|
+
"powerbi-visuals-utils-formattingmodel": "6.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@typescript-eslint/eslint-plugin": "^5.59.11",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
|
|
30
30
|
|
|
31
|
-
import FormattingSettingsCard = formattingSettings.
|
|
31
|
+
import FormattingSettingsCard = formattingSettings.SimpleCard;
|
|
32
32
|
import FormattingSettingsSlice = formattingSettings.Slice;
|
|
33
33
|
import FormattingSettingsModel = formattingSettings.Model;
|
|
34
34
|
|
|
@@ -59,7 +59,7 @@ export class Visual implements IVisual {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
public update(options: VisualUpdateOptions) {
|
|
62
|
-
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
|
|
62
|
+
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
|
|
63
63
|
|
|
64
64
|
console.log('Visual update', options);
|
|
65
65
|
if (this.textNode) {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
|
|
30
30
|
|
|
31
|
-
import FormattingSettingsCard = formattingSettings.
|
|
31
|
+
import FormattingSettingsCard = formattingSettings.SimpleCard;
|
|
32
32
|
import FormattingSettingsSlice = formattingSettings.Slice;
|
|
33
33
|
import FormattingSettingsModel = formattingSettings.Model;
|
|
34
34
|
|
|
@@ -111,7 +111,7 @@ export class Visual implements IVisual {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
const dataView: DataView = options.dataViews[0];
|
|
114
|
-
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
|
|
114
|
+
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
|
|
115
115
|
|
|
116
116
|
let payloadBase64: string = null;
|
|
117
117
|
if (dataView.scriptResult && dataView.scriptResult.payloadBase64) {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
|
|
30
30
|
|
|
31
|
-
import FormattingSettingsCard = formattingSettings.
|
|
31
|
+
import FormattingSettingsCard = formattingSettings.SimpleCard;
|
|
32
32
|
import FormattingSettingsSlice = formattingSettings.Slice;
|
|
33
33
|
import FormattingSettingsModel = formattingSettings.Model;
|
|
34
34
|
|
|
@@ -63,7 +63,7 @@ export class Visual implements IVisual {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
const dataView: DataView = options.dataViews[0];
|
|
66
|
-
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
|
|
66
|
+
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
|
|
67
67
|
|
|
68
68
|
let imageUrl: string = null;
|
|
69
69
|
if (dataView.scriptResult && dataView.scriptResult.payloadBase64) {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
|
|
30
30
|
|
|
31
|
-
import FormattingSettingsCard = formattingSettings.
|
|
31
|
+
import FormattingSettingsCard = formattingSettings.SimpleCard;
|
|
32
32
|
import FormattingSettingsSlice = formattingSettings.Slice;
|
|
33
33
|
import FormattingSettingsModel = formattingSettings.Model;
|
|
34
34
|
|
|
@@ -59,7 +59,7 @@ export class Visual implements IVisual {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
public update(options: VisualUpdateOptions) {
|
|
62
|
-
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
|
|
62
|
+
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
|
|
63
63
|
console.log("Visual update", options);
|
|
64
64
|
if (this.textNode) {
|
|
65
65
|
this.textNode.textContent = (this.updateCount++).toString();
|