How to use the powerbi-models.TokenType function in powerbi-models

To help you get started, we’ve selected a few powerbi-models examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ramandeep-singh-1983 / ngx-powerbi / projects / ngx-powerbi / src / lib / ngx-powerbi.component.ts View on Github external
private getTokenType(tokenType: TokenType): models.TokenType {
    if (tokenType) {
      switch (tokenType) {
        case TokenType.Aad:
          return models.TokenType.Aad;
        case TokenType.Embed:
          return models.TokenType.Embed;
        default:
          return models.TokenType.Aad;
      }
    } else {
      // default is AAD
      return models.TokenType.Aad;
    }
  }
github ramandeep-singh-1983 / ngx-powerbi / projects / ngx-powerbi / src / lib / ngx-powerbi.component.ts View on Github external
private getTokenType(tokenType: TokenType): models.TokenType {
    if (tokenType) {
      switch (tokenType) {
        case TokenType.Aad:
          return models.TokenType.Aad;
        case TokenType.Embed:
          return models.TokenType.Embed;
        default:
          return models.TokenType.Aad;
      }
    } else {
      // default is AAD
      return models.TokenType.Aad;
    }
  }
github CriticalPathTraining / DPBIE / Demos / cpt-powerbi-spfx-webparts / src / webparts / powerBiReport1 / PowerBiReport1WebPart.ts View on Github external
PowerBiService.GetReport(this.context.serviceScope, this.workspaceId, this.reportId).then((report: PowerBiReport) => {

      this.context.statusRenderer.clearLoadingIndicator(this.domElement);
      this.domElement.style.height = this.properties.reportHeight + "px";

      var config: any = {
        type: 'report',
        id: report.id,
        embedUrl: report.embedUrl,
        accessToken: report.accessToken,
        tokenType: models.TokenType.Aad,
        permissions: models.Permissions.All,
        viewMode: models.ViewMode.View,
        settings: {
          filterPaneEnabled: false,
          navContentPaneEnabled: this.properties.showPageTabs,
        }
      };

      window.powerbi.reset(this.domElement);
      window.powerbi.embed(this.domElement, config);

    });
  }

powerbi-models

Contains JavaScript & TypeScript object models for Microsoft Power BI JavaScript SDK. For each model there is a TypeScript interface, and a validation function to ensure and object is valid.

MIT
Latest version published 9 months ago

Package Health Score

74 / 100
Full package analysis