Giter Club home page Giter Club logo

powerbi-client-vue-js's Introduction

powerbi-client-vue-js

Power BI Vue component. This library lets you embed Power BI reports, dashboards, tiles, report visuals, Q&As and paginated reports in your Vue application.

Quick Start

Import

Import the 'PowerBIReportEmbed' inside your target module:

import { PowerBIReportEmbed } from 'powerbi-client-vue-js';

Embed a Power BI report

<PowerBIReportEmbed
    :embedConfig = {{
        type: "report",
        id: "<Report Id>",
        embedUrl: "<Embed Url>",
        accessToken: "<Access Token>",
        tokenType: models.TokenType.Embed,
        settings: {
            panes: {
                filters: {
                    expanded: false,
                    visible: false
                }
            },
            background: models.BackgroundType.Transparent,
        }
    }}

    :cssClassName = { "reportClass" }

    :phasedEmbedding = { false }

    :eventHandlers = {
        new Map([
            ['loaded', () => console.log('Report loaded');],
            ['rendered', () => console.log('Report rendered');],
            ['error', (event) => console.log(event.detail);]
        ])
    }
>
</PowerBIReportEmbed>
<PowerBIReportEmbed
    :embedConfig = {{
        type: "report",
        id: undefined,
        embedUrl: undefined,
        accessToken: undefined, // Keep as empty string, null or undefined
        tokenType: models.TokenType.Embed,
        hostname: "https://app.powerbi.com"
    }}
>
</PowerBIReportEmbed>

Note: To embed the report after bootstrapping, update the embedConfig (with at least accessToken and embedUrl).

Embedding other Power BI artifacts

The library offers the following components that can be used to embed various Power BI artifacts.

Component Selector to use for embedding
PowerBIReportEmbedComponent <PowerBIReportEmbed>
PowerBIDashboardEmbedComponent <PowerBIDashboardEmbed>
PowerBITileEmbedComponent <PowerBITileEmbed>
PowerBIVisualEmbedComponent <PowerBIVisualEmbed>
PowerBIQnaEmbedComponent <PowerBIQnaEmbed>
PowerBIPaginatedReportEmbedComponent <PowerBIPaginatedReportEmbed>

You can embed other artifacts such as:

<PowerBIDashboardEmbed
    :embedConfig = "<IDashboardEmbedConfiguration>"
    :cssClassName = "<className>"
    :eventHandlers = "<Map of String and eventHandler>"
>
</PowerBIDashboardEmbed>

Demo

This demo includes a Vue application that embeds a sample report using the PowerBIReportEmbed component.
It demonstrates the complete flow from bootstrapping the report, to embedding and updating the embedded report.
It also demonstrates using the powerbi report authoring library, by enabling the user to change the type of visual from a report using the "Change visual type" button.
It also sets a 'DataSelected' event.


To run the demo on localhost, run the following command:
npm run demo

Redirect to http://localhost:3000/ to view in the browser.

Usage

Use case Details
Embed Power BI To embed your powerbi artifact, pass the component with at least type, embedUrl and accessToken in embedConfig property.
Apply style class Pass the name(s) of style classes to be applied to the embed container div to the cssClassName property.
Set event handlers Pass a map object of event name (string) and event handler (function) to the eventHandlers prop.
Key: Event name
Value: Event handler method to be triggered
Event handler method takes two optional parameters:
First parameter: Event
Second parameter: Reference to the embedded entity

List of supported events is given here: Additional events
Reset event handlers To reset event handler for an event, set the event handler's value as null in the eventHandlers map of properties.
Bootstrap Power BI To bootstrap your powerbi entity, pass the property embedConfig to the component without accessToken
Note: embedConfig should at least contain type of the powerbi entity being embedded.
Available types: "report", "dashboard", "tile", "visual" and "qna".
Refer to How to bootstrap a report section in Quick Start.

Note: A paginated report cannot be bootstrapped.
Using with PowerBI Report Authoring 1. Install powerbi-report-authoring as an npm dependency.
2. Use the report authoring APIs using the embedded report's instance.
Phased embedding (Report type only) Set the phasedEmbedding property value to true
Refer to the Phased embedding article.

Note: Supported browsers are Edge, Chrome, and Firefox.

Properties accepted by Components

Property Description Supported by
embedConfig Configuration for embedding the PowerBI entity (required) All
phasedEmbedding Phased embedding flag (optional) Report
eventHandlers Map of pair of event name and its handler method to be triggered on the event (optional) Report, Dashboard, Tile, Visual, Qna
cssClassName CSS class to be set on the embedding container (optional) All
service Provide the instance of PowerBI service (optional) All

Supported Events

Events supported by various Power BI entities:

Entity Event
Report "buttonClicked", "commandTriggered", "dataHyperlinkClicked", "dataSelected", "loaded", "pageChanged", "rendered", "saveAsTriggered", "saved", "selectionChanged", "visualClicked", "visualRendered"
Dashboard "loaded", "tileClicked"
Tile "tileLoaded", "tileClicked"
QnA "visualRendered"

Event Handler to be used with Map

type EventHandler = (event?: service.ICustomEvent<any>, embeddedEntity?: Embed) => void | null;

Using supported SDK methods for Power BI artifacts

Import

Import the 'PowerBIReportEmbed' inside your targeted component file:

import { PowerBIReportEmbed } from 'powerbi-client-vue-js';

Initialize inside the Component

Component will emit report-obj and You can use this variable.Add method in the component template.

<PowerBIReportEmbed v-if="isEmbedded"
    :embed-config="sampleReportConfig"
    :phased-embedding="phasedEmbeddingFlag"
    :css-class-name="reportClass"
    :event-handlers="eventHandlersMap"
    @report-obj="setReportObj">
</PowerBIReportEmbed>

Declare a variable report!:Report and set the report to the report-obj.

setReportObj(value: Report) {
    this.report = value;
},

Use

You can use report to call supported SDK APIs.

async getReportPages(): Page[] {
    const pages = await this.report.getPages();
    console.log(pages);
}

Note

The library supports Vue applications having version >= 3.

Dependencies

powerbi-client (https://www.npmjs.com/package/powerbi-client)

Peer Dependencies

vue (https://www.npmjs.com/package/vue)

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments

Data Collection.

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications.

If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at Microsoft Privacy Statement. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.

Support

Our public support page is available at Microsoft Support Statement.

powerbi-client-vue-js's People

Contributors

ali-hamud avatar bapat-atharva avatar kkd1215 avatar kotanasai21 avatar may-hartov avatar microsoft-github-operations[bot] avatar microsoftopensource avatar rad10wave avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

powerbi-client-vue-js's Issues

Uncaught TypeError: Cannot read properties of null (reading 'defineComponent')

Hello,

I would like to integrate the module powerbi-client-vue-js with the importmap approach, but something goes wrong at import-time for PowerBIReportEmbed component that makes me harder to debug the error:

Uncaught TypeError: Cannot read properties of null (reading 'defineComponent')

image

Code to reproduce the issue (maybe accessToken is not needed. In any case it is not reserved):

<!DOCTYPE HTML>
<html>

<head>
    <title>Play PowerBI Client VueJS</title>
    <script type="importmap">
    { "imports": 
        { "vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.js", 
          "vuetify": "https://unpkg.com/[email protected]/dist/vuetify.esm.js",
          "powerbi-report-authoring": "https://cdn.jsdelivr.net/npm/[email protected]/+esm",
          "powerbi-router": "https://cdn.jsdelivr.net/npm/[email protected]/+esm",
          "powerbi-models": "https://cdn.jsdelivr.net/npm/[email protected]/+esm",
          "powerbi-client": "https://cdn.jsdelivr.net/npm/[email protected]/+esm",
          "powerbi-client-vue-js": "https://cdn.jsdelivr.net/npm/[email protected]/+esm",
          "window-post-message-proxy": "https://cdn.jsdelivr.net/npm/@ont-community/[email protected]/+esm",
          "http-post-message": "https://cdn.jsdelivr.net/npm/[email protected]/+esm"
        }
    }
    </script>
</head>

<body>

    <div id="app" class="mt-8 mb-4">
        <PowerBIReportEmbed
            :embed-config="reportConfig"
            css-class-name="reportClass"
            :phased-embedding={false}
            :event-handlers="reportHandlers"
        >
        </PowerBIReportEmbed> 
    </div>

<script type="module" lang="js">
  import { createApp, ref } from 'vue'
  import { createVuetify } from 'vuetify'

  import pbi from 'powerbi-client';
  import "powerbi-report-authoring"
  import { PowerBIReportEmbed } from 'powerbi-client-vue-js'

  const vuetify = createVuetify({
    theme: {
        defaultTheme: 'light'
    }
  })

  createApp({
      data: () => ({
        report: undefined,
        reportConfig: {
            type: "report",
            id: "74d7db75-6278-4066-8d7d-b67693080566",
            embedUrl: "https://app.powerbi.com/view?r=eyJrIjoiYWI5OGViZjItYmZmNi00NmYwLTlmMjAtYjc5ODBiM2Q4NDhhIiwidCI6IjA1NGMzYmE3LTlhNDMtNGM4Ny05YmRiLThiNGYyZTJlYmRkYyIsImMiOjl9",
            accessToken: "H4sIAAAAAAAEAC2WxQ7siBVE_-VtHclMkWZht6nNTDszMzvKv6ejmf1dHd06Vf_5YyZPPyX5n3__YZDMcrJrhKxmCmmvHoHqi6KOje0HYbLpYhbDVGIchTJFGhkloNfCiUssmA3Qg54n5IcLtO7yRPCnCB4JMaw4P0vV-DSqGiXkRjb0EySIkSpppdAjmVv4PJkmlSoupnsfDKHG_bzRBPTvlanEgOGZQ5OOOM3FoVAxcEftadNaQgeh1VNOdR_pXqGzL025aet-V-mimY05V07E72zJ2hpvsEJBPEnKKAAi37pLPGKW-qZGHkNCbTSTzDGVMLlI6J6pweqR-Hl2u-e1qNeVvxJXOEiK3AFIyF9IRnp3fna1b2yyLQHOM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UmEcCu7rSZ3fE6PQqbxegUN16Cm_AEVRnyVhWkwZMqeiSb6FZQBFaTeLXuSkr0JkTnjXy7atos96C-0JCaEgsHmk1vkWDj57vGgZ1j8NpXJKhYxtQJA0dKbXz--b7CaS-7cSIasYRjTWjf0Yy52QUgs86kf8Tvmu81Qwugb0VY4pxeGqR0LPBJ8hTCWtfcVIftrgoN7dID1aw21DM2tD7KqjYejoZXZzWtOfL8h4RW766l3169Dn21bMyK_WSFGyrVhbqsBz5f0X-3I-WvpHxCIMJaQ7ubAUI80OeY3Ozhy5kahY7G3cQTOsChHgGJQBxygcPdLwIJ0vAeZzxGMFeHmH8zPXBfr1_9RdunmjJ8tHeYl6OJ4rcQeNf--cppqTPZjLX5nJuRX3RQGmdjyq5UPTaV--uS0rq83cZzROikrQ-ZyGN1sqvdPcAGmTnmRG6k2DrPhS7ZpyQpPgTqIKeRFUxqS7sWu6gU4KPLdeiX8eK0ooKfPD71kHNAck5nqPhvkKKuJmB15TBqTsHPq7vhHu-YGsp4cf50ag5PFn9rTrUPOD-I84YCUv4cDbo4F1D7G6K_1-8Nu-_AHXFeLaKMD27Xb0gm6vMbDZ85vW33Cbqx9ByJOI4DZFas4OXhC2J4q4TSNrQfk5Ym8FMUGlOZL6A4xT9k72I57zFvF140V-_tbq1x_vcfPipr05cEusNkNqG4D9jVSPcszkZfiV77Vgtz4LQH_x_zf_wGPhDTtmgwAAA==.eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly9XQUJJLVVTLU5PUlRILUNFTlRSQUwtcmVkaXJlY3QuYW5hbHlzaXMud2luZG93cy5uZXQiLCJleHAiOjE3MDg0NDgwMjksImFsbG93QWNjZXNzT3ZlclB1YmxpY0ludGVybmV0Ijp0cnVlfQ==",
            tokenType: null,
        },
    }),
    methods: {
        reportHandlers() { 
            console.log("8")
            new Map([
                ['loaded', () => console.log('Report loaded')],
                ['rendered', () => console.log('Report rendered')],
                ['error', (event) => console.log(event.detail)]
            ])
        }
    }
  }).use(vuetify).use(PowerBIReportEmbed).mount('#app')
</script>
</body>
</html>

More details also on using pure javascript powerbi-client here:

https://stackoverflow.com/questions/78033502/import-powerbi-client-vue-js-umd-js-with-importmap-leads-to-uncaught-typeerror

vue/demo cannot run

vue/demo

npm run demo
error message Uncaught SyntaxError: Unexpected token . App.vue:48

How to modify it to run

Vite build fails on PowerBIReportEmbed import

Describe the bug

When running vite build on an app that uses the recommended import:

import { PowerBIReportEmbed } from 'powerbi-client-vue-js';

The following error is returned:

'PowerBIReportEmbed' is not exported by node_modules/powerbi-client-vue-js/dist/powerbi-client-vue-js.umd.ts, imported by App.vue file: C:/powerbi-client-vue-js/vue/demo/App.vue:3:9

This can easily be reproduced in the demo app by changing line 38 of App.vue from:

import PowerBIReportEmbed from '../src/components/PowerBIReportEmbed';
to
import { PowerBIReportEmbed } from 'powerbi-client-vue-js';

I've also raised this with Vite: vitejs/vite#11021.

Reproduction

https://stackblitz.com/edit/vitejs-vite-5jwnis?file=main.ts

Logs

vite build
vite v2.9.15 building for production...
transforming (18) node_modules\@vue\reactivity\dist\reactivity.esm-bundler.jsError when using sourcemap for reporting an error: Can't resolve original location of error.
✓ 19 modules transformed.
'PowerBIReportEmbed' is not exported by node_modules/powerbi-client-vue-js/dist/powerbi-client-vue-js.umd.ts, imported by App.vue
file: C:/powerbi-client-vue-js/vue/demo/App.vue:3:9
1: import { models, Report } from "powerbi-client";
2: import "powerbi-report-authoring";
3: import { PowerBIReportEmbed } from "powerbi-client-vue-js";
            ^
4: import { reportUrl } from "./public/constant";
5: const phasedEmbeddingFlag = false;
error during build:
Error: 'PowerBIReportEmbed' is not exported by node_modules/powerbi-client-vue-js/dist/powerbi-client-vue-js.umd.ts, imported by App.vue
    at error (C:\powerbi-client-vue-js\vue\demo\node_modules\rollup\dist\shared\rollup.js:198:30)
    at Module.error (C:\powerbi-client-vue-js\vue\demo\node_modules\rollup\dist\shared\rollup.js:12543:16)
    at Module.traceVariable (C:\powerbi-client-vue-js\vue\demo\node_modules\rollup\dist\shared\rollup.js:12902:29)
    at ModuleScope.findVariable (C:\powerbi-client-vue-js\vue\demo\node_modules\rollup\dist\shared\rollup.js:11554:39)
    at Identifier.bind (C:\powerbi-client-vue-js\vue\demo\node_modules\rollup\dist\shared\rollup.js:7553:40)
    at Property.bind (C:\powerbi-client-vue-js\vue\demo\node_modules\rollup\dist\shared\rollup.js:5383:23)
    at ObjectExpression.bind (C:\powerbi-client-vue-js\vue\demo\node_modules\rollup\dist\shared\rollup.js:5379:73)
    at Property.bind (C:\powerbi-client-vue-js\vue\demo\node_modules\rollup\dist\shared\rollup.js:5383:23)
    at ObjectExpression.bind (C:\powerbi-client-vue-js\vue\demo\node_modules\rollup\dist\shared\rollup.js:5379:73)
    at VariableDeclarator.bind (C:\powerbi-client-vue-js\vue\demo\node_modules\rollup\dist\shared\rollup.js:5383:23)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Component doesn't render on Vue 3 app due to missing ref owner context

I am currently trying to use this component in a Vue 3.2 app I maintain. However, it fails to render under any circumstance, giving out a console warning as follows:
image

Trying to mount the component with the bootstrap config object (empty or undefined as the documentation recommends), the behaviour persists:
image

Reading online about the error, it might have something to do with passing the ref to the render function as a string, which should not be done as of Vue 3.

Uncaught (in promise) undefined

Hello,

I am currently using the powerbi-client-vue-js library in my Vue.js project and I am encountering an intermittent issue where I receive an "Uncaught (in promise) undefined" error. This error seems to occur randomly and I have not been able to identify a consistent trigger for it.

Here is some information about my setup:

  • Vue version: 3.3.11
  • powerbi-client-vue-js version: 1.0.3
  • Operating System: macOS
  • IDE: WebStorm 2023.3.6
Capture d’écran 2024-04-18 à 09 03 58

The bug occur when I call my api that return my token and I update my ref 'sampleReportConfig'. Here is a snippet of my code :

let sampleReportConfig = ref({
  type: 'report',
  id: undefined,
  embedUrl: undefined,
  tokenType: models.TokenType.Embed,
  accessToken: undefined,
  settings: undefined,
  hostname: "https://app.powerbi.com"
} as IReportEmbedConfiguration);

The error appear here in the then of my api call

  api.get("/generateToken/"+ reportId.value).then(response => {
      sampleReportConfig.value = {
        ...sampleReportConfig.value,
        id: reportId.value,
        embedUrl: reportUrl,
        accessToken: response.data.token,
      };
  }).catch(error => {
    console.log('An error occurred:', error);
  });

I would appreciate any guidance or suggestions you might have to help me resolve this issue. Please let me know if you need any additional information. Thank you for your time and assistance.

Could not load Edit mode: insufficient Permissions

I'm using this project to embed a PowerBI Report to my project but somehow there is an error of Insufficient Permissions in my console using the switchMode() Function.

mx_screencap_20230725_110506

These 2 pics are using the same reportID, embededURL, access Token. But p1 is VUE version while p2 is native Javascript version.

I got the token from the /GenerateToken api (with 'Edit' mode, Not 'View' mode), and it works with my native JS version demo and embeded playground. I switched to the Edit Mode and saved the report successfully. But the VUE version is down when I'm switching to the Edit Mode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.