@itwin/one-click-lca-react
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

@itwin/one-click-lca-react

Copyright © Bentley Systems, Incorporated. All rights reserved.

The One Click LCA widget is a UI component for iTwin Viewer applications that simplifies how users (and developers) interface with the Carbon Calculation One Click LCA APIs. The one-click-lca-react package provides a UiProvider class, OneClickLCAProvider, 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. This package provides a viewer widget. Documentation on how to add a widget to your application can be found here.

Permissions and Scopes

The SPA client used by your iTwin viewer application must have allowed scopes insights:read and insights:write, found under the Reporting & Insights category. Users must have the imodels_read and insights_view permissions assigned at either the Project or iModel level. Additional instruction on how to create roles and assign permissions can be found in the iTwin Platform Projects API documentation.

Sample usage

import { OneClickLCAProvider } from "@itwin/one-click-lca-react";

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

Package Sidebar

Install

npm i @itwin/one-click-lca-react

Weekly Downloads

10

Version

0.4.0

License

MIT

Unpacked Size

213 kB

Total Files

58

Last publish

Collaborators

  • wgoehrig
  • cshafer
  • aruniverse
  • imodeljs
  • colinkerr