Skip to content

Files

Latest commit

3f339ca · Dec 18, 2024

History

History

reports-config-widget

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 4, 2024
Jun 10, 2024
Aug 10, 2023
Sep 12, 2024
Dec 18, 2024
Dec 18, 2024
Jun 4, 2024
Sep 12, 2024
Jun 4, 2024
Dec 18, 2024
Dec 17, 2024
Jun 4, 2024

@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 the itwin-platform scope.

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()]}
/>