How to use the powerbi-models.LayoutType 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 microsoft / PowerBI-JavaScript / src / page.ts View on Github external
hasLayout(layoutType): Promise {
    if (utils.isRDLEmbed(this.report.config.embedUrl)) {
      return Promise.reject(errors.APINotSupportedForRDLError);
    }

    let layoutTypeEnum = models.LayoutType[layoutType];
    return this.report.service.hpm.get(`/report/pages/${this.name}/layoutTypes/${layoutTypeEnum}`, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)
      .then(response => response.body,
      response => {
        throw response.body;
      });
  }
}

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 8 months ago

Package Health Score

76 / 100
Full package analysis