diff --git a/visual/base-webpack.config.js b/visual/base-webpack.config.js index 1d7d950..6c8b778 100644 --- a/visual/base-webpack.config.js +++ b/visual/base-webpack.config.js @@ -150,6 +150,9 @@ const performance = { }; const plugins = [ + new webpack.SourceMapDevToolPlugin({ + filename: '[name].js.map', + }), new webpack.DefinePlugin({ CHARTICULATOR_PACKAGE: JSON.stringify({ version, diff --git a/visual/editor-webpack.config.js b/visual/editor-webpack.config.js index c9376ca..f0bd731 100644 --- a/visual/editor-webpack.config.js +++ b/visual/editor-webpack.config.js @@ -4,7 +4,7 @@ const webpack = require("webpack"); const Visualizer = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; // werbpack plugin -const PowerBICustomVisualsWebpackPlugin = require('powerbi-visuals-webpack-plugin'); +const { PowerBICustomVisualsWebpackPlugin } = require('powerbi-visuals-webpack-plugin'); // api configuration const powerbiApi = require("powerbi-visuals-api"); @@ -22,9 +22,9 @@ const localizationFolders = fs.existsSync(resourcesFolder) && fs.readdirSync(res const { merge } = require('webpack-merge'); const base = require('./base-webpack.config.js'); -const GUID = 'charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_EDITOR' || pbivizFile.visual.guid; -const NAME = 'Charticulator Community Version (Editor)' || pbivizFile.visual.name; -const DISPLAY_NAME = 'CharticulatorCommunityVersionEditor' || pbivizFile.visual.displayName; +const GUID = 'charticulatorVisualCommunity_EDITOR' || pbivizFile.visual.guid; +const NAME = 'CharticulatorCommunityVersionEditor' || pbivizFile.visual.name; +const DISPLAY_NAME = 'Charticulator Community Version (Editor)' || pbivizFile.visual.displayName; const pluginLocation = './src/visualPluginEditor.ts'; const statsLocation = "../../editor.webpack.statistics.html"; @@ -83,7 +83,7 @@ module.exports = merge(base, { dependenciesSchema: powerbiApi.schemas.dependencies, devMode: false, generatePbiviz: true, - generateResources: true, + generateResources: false, modules: true, visualSourceLocation: "../src/visual", pluginLocation: pluginLocation, diff --git a/visual/package.json b/visual/package.json index c966210..2b8cb9a 100644 --- a/visual/package.json +++ b/visual/package.json @@ -30,7 +30,7 @@ "pegjs-loader": "0.5.8", "powerbi-visuals-api": "4.7.0", "powerbi-visuals-utils-dataviewutils": "2.4.1", - "powerbi-visuals-webpack-plugin": "3.1.0", + "powerbi-visuals-webpack-plugin": "3.2.1", "raw-loader": "4.0.2", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/visual/pbiviz.json b/visual/pbiviz.json index 9cb7c5a..58f7d65 100644 --- a/visual/pbiviz.json +++ b/visual/pbiviz.json @@ -1,10 +1,10 @@ { "visual": { - "name": "CharticulatorCommunityVersion", + "name": "Charticulator Community Version", "displayName": "Charticulator (Community version)", - "guid": "charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD", + "guid": "charticulatorCommunityVersion", "visualClassName": "Visual", - "version": "0.0.3", + "version": "0.0.4", "description": "The community version of the charticulator visual. The visual in development mode doesn't include all functionalities implemented in the original version. But the visual uses the latest version of the Charticulator with new features and bug fixes", "supportUrl": "https://github.com/zBritva/charticulator-visual-community/issues", "gitHubUrl": "https://github.com/zBritva/charticulator-visual-community" diff --git a/visual/src/visualPluginEditor.ts b/visual/src/visualPluginEditor.ts index ff2ab12..ef34278 100644 --- a/visual/src/visualPluginEditor.ts +++ b/visual/src/visualPluginEditor.ts @@ -5,9 +5,9 @@ import VisualConstructorOptions = powerbiVisualsApi.extensibility.visual.VisualC import DialogConstructorOptions = powerbiVisualsApi.extensibility.visual.DialogConstructorOptions; var powerbiKey: any = "powerbi"; var powerbi: any = window[powerbiKey]; -var charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_EDITOR: IVisualPlugin = { - name: 'charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_EDITOR', - displayName: 'CharticulatorCommunityVersionEditor', +var charticulatorVisualCommunity_EDITOR: IVisualPlugin = { + name: 'charticulatorVisualCommunity_EDITOR', + displayName: 'Charticulator Community Version (Editor)', class: 'Visual', apiVersion: '4.7.0', create: (options: VisualConstructorOptions) => { @@ -27,6 +27,6 @@ var charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_EDITOR: IVisual if (typeof powerbi !== "undefined") { powerbi.visuals = powerbi.visuals || {}; powerbi.visuals.plugins = powerbi.visuals.plugins || {}; - powerbi.visuals.plugins["charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_EDITOR"] = charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_EDITOR; + powerbi.visuals.plugins["charticulatorVisualCommunity_EDITOR"] = charticulatorVisualCommunity_EDITOR; } -export default charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_EDITOR; \ No newline at end of file +export default charticulatorVisualCommunity_EDITOR; \ No newline at end of file diff --git a/visual/src/visualPluginView.ts b/visual/src/visualPluginView.ts index 5944fed..80d3cbd 100644 --- a/visual/src/visualPluginView.ts +++ b/visual/src/visualPluginView.ts @@ -5,19 +5,19 @@ import VisualConstructorOptions = powerbiVisualsApi.extensibility.visual.VisualC import DialogConstructorOptions = powerbiVisualsApi.extensibility.visual.DialogConstructorOptions; var powerbiKey: any = "powerbi"; var powerbi: any = window[powerbiKey]; -var charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_VIEW: IVisualPlugin = { - name: 'charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_VIEW', - displayName: 'CharticulatorCommunityVersionView', +var charticulatorVisualCommunity_VIEW: IVisualPlugin = { + name: 'charticulatorVisualCommunity_VIEW', + displayName: 'Charticulator Community Version (View)', class: 'Visual', apiVersion: '4.7.0', - create: (options: VisualConstructorOptions) => { + create: (options?: VisualConstructorOptions) => { if (Visual) { return new Visual(options); } throw 'Visual instance not found'; }, createModalDialog: (dialogId: string, options: DialogConstructorOptions, initialState: object) => { - const dialogRegistry = globalThis.dialogRegistry; + const dialogRegistry = (globalThis).dialogRegistry; if (dialogId in dialogRegistry) { new dialogRegistry[dialogId](options, initialState); } @@ -27,6 +27,6 @@ var charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_VIEW: IVisualPl if (typeof powerbi !== "undefined") { powerbi.visuals = powerbi.visuals || {}; powerbi.visuals.plugins = powerbi.visuals.plugins || {}; - powerbi.visuals.plugins["charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_VIEW"] = charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_VIEW; + powerbi.visuals.plugins["charticulatorVisualCommunity_VIEW"] = charticulatorVisualCommunity_VIEW; } -export default charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_VIEW; \ No newline at end of file +export default charticulatorVisualCommunity_VIEW; \ No newline at end of file diff --git a/visual/view-webpack.config.js b/visual/view-webpack.config.js index 005df6b..66af366 100644 --- a/visual/view-webpack.config.js +++ b/visual/view-webpack.config.js @@ -22,9 +22,9 @@ const localizationFolders = fs.existsSync(resourcesFolder) && fs.readdirSync(res const { merge } = require('webpack-merge'); const base = require('./base-webpack.config.js'); -const GUID = 'charticulatorVisualCommunity487D3ADCA7E14F729E78065092536DBD_VIEW' || pbivizFile.visual.guid; -const NAME = 'Charticulator Community Version (View)' || pbivizFile.visual.name; -const DISPLAY_NAME = 'CharticulatorCommunityVersionView' || pbivizFile.visual.displayName; +const GUID = 'charticulatorVisualCommunity_VIEW' || pbivizFile.visual.guid; +const NAME = 'CharticulatorCommunityVersionView' || pbivizFile.visual.name; +const DISPLAY_NAME = 'Charticulator Community Version (View)' || pbivizFile.visual.displayName; const pluginLocation = './src/visualPluginView.ts'; const statsLocation = "../../view.webpack.statistics.html"; @@ -88,7 +88,7 @@ module.exports = merge(base, { dependenciesSchema: powerbiApi.schemas.dependencies, devMode: false, generatePbiviz: true, - generateResources: true, + generateResources: false, modules: true, visualSourceLocation: "../src/visual", pluginLocation: pluginLocation, diff --git a/yarn.lock b/yarn.lock index 4ec7820..3a411ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6686,7 +6686,7 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" -jszip@^3.7.0: +jszip@^3.10.1: version "3.10.1" resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2" integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g== @@ -8121,18 +8121,18 @@ powerbi-visuals-utils-dataviewutils@2.4.1: resolved "https://registry.yarnpkg.com/powerbi-visuals-utils-dataviewutils/-/powerbi-visuals-utils-dataviewutils-2.4.1.tgz#8657a24d773ac9e471b621195f04e9a24ccd8138" integrity sha512-xgI4ru1KWcYFTbftLsR7Pzg14cslVPajUZUyRk6nzCEQvUMN/kVtPpVT5+s8UuhDZe7zpqSDAhSGS5yAcn9GcA== -powerbi-visuals-webpack-plugin@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/powerbi-visuals-webpack-plugin/-/powerbi-visuals-webpack-plugin-3.1.0.tgz#b2794435c788fd0c28e73f7963a59947f8b288d2" - integrity sha512-020pnxD800IPr8ZvQ7eJDZpK3HaJ6Qf7/MA0n+jipH7dpcoHdY/AHYkQQQJzrlB23XxkdmnP15pYXFQufwi7EA== +powerbi-visuals-webpack-plugin@3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/powerbi-visuals-webpack-plugin/-/powerbi-visuals-webpack-plugin-3.2.1.tgz#636d9129e53baef9a71ae7cc13fa6164835cfc35" + integrity sha512-Mb0j3EzInvNcVlYf8EzgmzKl8XMSEvOA+3MQuSYA4/CFtILilqUz5PFXNBqgcyEC0gJ5nZouhXWXujsLvsep6g== dependencies: ajv "6.12.3" chalk "^4.1.1" compare-versions "^3.6.0" fs-extra "9.0.1" - jszip "^3.7.0" + jszip "^3.10.1" lodash.clonedeep "4.5.0" - webpack-sources "^3.2.1" + webpack-sources "^3.2.3" preact-compat@^3.18.3: version "3.19.0" @@ -10238,7 +10238,7 @@ webpack-merge@^5.10.0, webpack-merge@^5.7.3: flat "^5.0.2" wildcard "^2.0.0" -webpack-sources@^3.2.1, webpack-sources@^3.2.3: +webpack-sources@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==