@itwin/reports-config-widget-react
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

@itwin/reports-config-widget-react

Copyright © Bentley Systems, Incorporated. All rights reserved. The Reports Config widget is a UI component for iTwin Viewer applications that simplifies how users (and developers) interface with the Reporting Platform APIs. This widget is one piece of the Reporting story that focuses on the configuration of Reports and the extraction thereof. It complements the Grouping & Mapping Widget. The reports-config-widget-react package provides a UiProvider class - ReportsConfigProvider - which can be passed into the uiProviders prop of the iTwin Viewer's <Viewer /> component.

Getting Started

This is not a standalone UI and requires a parent iTwin Viewer application to work as intended. A guide on how to create a basic iTwin Viewer application can be found here: https://www.itwinjs.org/learning/tutorials/develop-web-viewer/. This package provides a viewer 'widget'. Documentation on how to add a widget to your application can be found here: https://developer.bentley.com/tutorials/itwin-viewer-hello-world/#2-your-first-ui-widget.

Permissions and Scopes

The SPA client used by your iTwin viewer must have these additional scopes:

  • insights:read
  • insights:modify
  • projects:read

In addition, users must have the imodels_read and imodels_write permissions assigned at either the Project or iModel level. Further instruction on how to create roles and assign permissions can be found in the iTwin Platform Projects API documentation.

Sample usage

Call ReportsConfigWidget.initialize() before making use of the provider

import { ReportsConfigProvider, ReportsConfigWidget } from '@itwin/reports-config-widget-react'

...

await ReportsConfigWidget.initialize(IModelApp.localization);

<Viewer
  ...
  uiProviders={[new ReportsConfigProvider()]}
/>

Package Sidebar

Install

npm i @itwin/reports-config-widget-react

Weekly Downloads

241

Version

0.5.0

License

MIT

Unpacked Size

2.84 MB

Total Files

467

Last publish

Collaborators

  • wgoehrig
  • cshafer
  • aruniverse
  • imodeljs
  • colinkerr