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,38 +0,0 @@
1
- {
2
- "PBI_API_VERSION": "v2.6.0",
3
- "type": "object",
4
- "properties": {
5
- "cranPackages": {
6
- "type": "array",
7
- "description": "An array of the Cran packages required for the custom R visual script to operate",
8
- "items": {
9
- "$ref": "#/definitions/cranPackage"
10
- }
11
- }
12
- },
13
- "definitions": {
14
- "cranPackage": {
15
- "type": "object",
16
- "description": "cranPackage - Defines the name and displayName of a required Cran package",
17
- "properties": {
18
- "name": {
19
- "type": "string",
20
- "description": "The name for this Cran package"
21
- },
22
- "displayName": {
23
- "type": "string",
24
- "description": "The name for this Cran package that is shown to the user"
25
- },
26
- "url": {
27
- "type": "string",
28
- "description": "A url for package documentation in Cran website"
29
- }
30
- },
31
- "required": [
32
- "name",
33
- "url"
34
- ],
35
- "additionalProperties": false
36
- }
37
- }
38
- }
@@ -1,103 +0,0 @@
1
- {
2
- "PBI_API_VERSION": "v2.6.0",
3
- "type": "object",
4
- "properties": {
5
- "apiVersion": {
6
- "type": "string",
7
- "description": "Version of the IVisual API"
8
- },
9
- "author": {
10
- "type": "object",
11
- "description": "Information about the author of the visual",
12
- "properties": {
13
- "name": {
14
- "type": "string",
15
- "description": "Name of the visual author. This is displayed to users."
16
- },
17
- "email": {
18
- "type": "string",
19
- "description": "E-mail of the visual author. This is displayed to users for support."
20
- }
21
- }
22
- },
23
- "assets": {
24
- "type": "object",
25
- "description": "Assets used by the visual",
26
- "properties": {
27
- "icon": {
28
- "type": "string",
29
- "description": "A 20x20 png icon used to represent the visual"
30
- }
31
- }
32
- },
33
- "externalJS": {
34
- "type": "array",
35
- "description": "An array of relative paths to 3rd party javascript libraries to load",
36
- "items": {
37
- "type": "string"
38
- }
39
- },
40
- "stringResources": {
41
- "type": "array",
42
- "description": "An array of relative paths to string resources to load",
43
- "items": {
44
- "type": "string"
45
- },
46
- "uniqueItems": true
47
- },
48
- "style" : {
49
- "type": "string",
50
- "description": "Relative path to the stylesheet (less) for the visual"
51
- },
52
- "capabilities": {
53
- "type": "string",
54
- "description": "Relative path to the visual capabilities json file"
55
- },
56
- "visual": {
57
- "type": "object",
58
- "description": "Details about this visual",
59
- "properties": {
60
- "description": {
61
- "type": "string",
62
- "description": "What does this visual do?"
63
- },
64
- "name": {
65
- "type": "string",
66
- "description": "Internal visual name"
67
- },
68
- "displayName": {
69
- "type": "string",
70
- "description": "A friendly name"
71
- },
72
- "externals": {
73
- "type": "array",
74
- "description": "External files (such as JavaScript) that you would like to include"
75
- },
76
- "guid": {
77
- "type": "string",
78
- "description": "Unique identifier for the visual"
79
- },
80
- "visualClassName": {
81
- "type": "string",
82
- "description": "Class of your IVisual"
83
- },
84
- "icon": {
85
- "type": "string",
86
- "description": "Icon path"
87
- },
88
- "version": {
89
- "type": "string",
90
- "description": "Visual version"
91
- },
92
- "gitHubUrl": {
93
- "type": "string",
94
- "description": "Url to the github repository for this visual"
95
- },
96
- "supportUrl": {
97
- "type": "string",
98
- "description": "Url to the support page for this visual"
99
- }
100
- }
101
- }
102
- }
103
- }
@@ -1,67 +0,0 @@
1
- {
2
- "PBI_API_VERSION": "v2.6.0",
3
- "type": "object",
4
- "properties": {
5
- "locale": {
6
- "$ref": "#/definitions/localeOptions"
7
- },
8
- "values": {
9
- "type": "object",
10
- "description": "translations for the display name keys in the capabilities",
11
- "additionalProperties": { "type": "string" }
12
- }
13
- },
14
- "required": [ "locale" ],
15
- "definitions": {
16
- "localeOptions": {
17
- "description": "Specifies the locale key from a list of supported locales",
18
- "type": "string",
19
- "enum": [
20
- "ar-SA",
21
- "bg-BG",
22
- "ca-ES",
23
- "cs-CZ",
24
- "da-DK",
25
- "de-DE",
26
- "el-GR",
27
- "en-US",
28
- "es-ES",
29
- "et-EE",
30
- "eu-ES",
31
- "fi-FI",
32
- "fr-FR",
33
- "gl-ES",
34
- "he-IL",
35
- "hi-IN",
36
- "hr-HR",
37
- "hu-HU",
38
- "id-ID",
39
- "it-IT",
40
- "ja-JP",
41
- "kk-KZ",
42
- "ko-KR",
43
- "lt-LT",
44
- "lv-LV",
45
- "ms-MY",
46
- "nb-NO",
47
- "nl-NL",
48
- "pl-PL",
49
- "pt-BR",
50
- "pt-PT",
51
- "ro-RO",
52
- "ru-RU",
53
- "sk-SK",
54
- "sl-SI",
55
- "sr-Cyrl-RS",
56
- "sr-Latn-RS",
57
- "sv-SE",
58
- "th-TH",
59
- "tr-TR",
60
- "uk-UA",
61
- "vi-VN",
62
- "zh-CN",
63
- "zh-TW"
64
- ]
65
- }
66
- }
67
- }
@@ -1,84 +0,0 @@
1
- {
2
- "dataRoles": [
3
- {
4
- "displayName": "Category Data",
5
- "name": "category",
6
- "kind": "Grouping"
7
- },
8
- {
9
- "displayName": "Measure Data",
10
- "name": "measure",
11
- "kind": "Measure"
12
- }
13
- ],
14
- "objects": {
15
- "dataPoint": {
16
- "displayName": "Data colors",
17
- "properties": {
18
- "defaultColor": {
19
- "displayName": "Default color",
20
- "type": {
21
- "fill": {
22
- "solid": {
23
- "color": true
24
- }
25
- }
26
- }
27
- },
28
- "showAllDataPoints": {
29
- "displayName": "Show all",
30
- "type": {
31
- "bool": true
32
- }
33
- },
34
- "fill": {
35
- "displayName": "Fill",
36
- "type": {
37
- "fill": {
38
- "solid": {
39
- "color": true
40
- }
41
- }
42
- }
43
- },
44
- "fillRule": {
45
- "displayName": "Color saturation",
46
- "type": {
47
- "fill": {}
48
- }
49
- },
50
- "fontSize": {
51
- "displayName": "Text Size",
52
- "type": {
53
- "formatting": {
54
- "fontSize": true
55
- }
56
- }
57
- }
58
- }
59
- }
60
- },
61
- "dataViewMappings": [
62
- {
63
- "categorical": {
64
- "categories": {
65
- "for": {
66
- "in": "category"
67
- },
68
- "dataReductionAlgorithm": {
69
- "top": {}
70
- }
71
- },
72
- "values": {
73
- "select": [
74
- {
75
- "bind": {
76
- "to": "measure"
77
- }
78
- }
79
- ]
80
- }
81
- }
82
- }
83
- ]
84
- }
@@ -1,6 +0,0 @@
1
- {
2
- "name": "visual",
3
- "dependencies": {
4
- "powerbi-visuals-utils-dataviewutils": "1.5.0"
5
- }
6
- }
@@ -1,3 +0,0 @@
1
- {
2
- "dependencies": null
3
- }
@@ -1,32 +0,0 @@
1
- /*
2
- * Power BI Visualizations
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
-
27
- module powerbi.extensibility.visual {
28
- "use strict";
29
- import DataViewObjectsParser = powerbi.extensibility.utils.dataview.DataViewObjectsParser;
30
-
31
- <%= visualSettingsClasses %>
32
- }
@@ -1,71 +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
-
27
- module powerbi.extensibility.visual {
28
- "use strict";
29
- export class Visual implements IVisual {
30
- private target: HTMLElement;
31
- private updateCount: number;
32
- private settings: VisualSettings;
33
- private textNode: Text;
34
-
35
- constructor(options: VisualConstructorOptions) {
36
- console.log('Visual constructor', options);
37
- this.target = options.element;
38
- this.updateCount = 0;
39
- if (typeof document !== "undefined") {
40
- const new_p: HTMLElement = document.createElement("p");
41
- new_p.appendChild(document.createTextNode("Update count:"));
42
- const new_em: HTMLElement = document.createElement("em");
43
- this.textNode = document.createTextNode(this.updateCount.toString());
44
- new_em.appendChild(this.textNode);
45
- new_p.appendChild(new_em);
46
- this.target.appendChild(new_p);
47
- }
48
- }
49
-
50
- public update(options: VisualUpdateOptions) {
51
- this.settings = Visual.parseSettings(options && options.dataViews && options.dataViews[0]);
52
- console.log('Visual update', options);
53
- if (this.textNode) {
54
- this.textNode.textContent = (this.updateCount++).toString();
55
- }
56
- }
57
-
58
- private static parseSettings(dataView: DataView): VisualSettings {
59
- return VisualSettings.parse(dataView) as VisualSettings;
60
- }
61
-
62
- /**
63
- * This function gets called for each of the objects defined in the capabilities files and allows you to select which of the
64
- * objects and properties you want to expose to the users in the property pane.
65
- *
66
- */
67
- public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] | VisualObjectInstanceEnumerationObject {
68
- return VisualSettings.enumerateObjectInstances(this.settings || VisualSettings.getDefault(), options);
69
- }
70
- }
71
- }
@@ -1,9 +0,0 @@
1
- p {
2
- font-size: 20px;
3
- font-weight: bold;
4
- em {
5
- background: yellow;
6
- padding: 5px;
7
-
8
- }
9
- }
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "allowJs": true,
4
- "emitDecoratorMetadata": true,
5
- "experimentalDecorators": true,
6
- "target": "ES5",
7
- "sourceMap": true,
8
- "out": "./.tmp/build/visual.js"
9
- },
10
- "files": [
11
- ".api/v1.12.0/PowerBI-visuals.d.ts",
12
- "node_modules/powerbi-visuals-utils-dataviewutils/lib/index.d.ts",
13
- "src/settings.ts",
14
- "src/visual.ts"
15
- ]
16
- }