@engineai-dev/web-component
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

Web Component

Installation

To install the package, use the following command:

npm i @engineai-dev/web-component

Alternatively, you can import the UMD/ESM bundle directly as a script tag.

Usage

To use the package, add the following code to your HTML file:

<engineai-web-component
    src="https://example.engineai.com"
></engineai-web-component>

Properties

The following properties are available:

src

URL of the EngineAI platform to load.

token

Valid authentication token to use when loading the EngineAI platform.

options

Json configuration to use when loading the EngineAI platform.

resizable

Can be set to "false". This way, we can force the embed app to be responsive to the container, otherwise the embed app will resize based on the dashboard size.

Events

The following events are available:

state-change

This event is triggered when the EngineAI platform changes state. The event's detail property contains the platform's event type and the associated data.

Notes

Version 1.0.0, 1.0.1, 1.1.0 were wrongly versioned in the past, so the 0.X.0 are actually more updated and 2.0.0 is the new starting point.

/@engineai-dev/web-component/

    Package Sidebar

    Install

    npm i @engineai-dev/web-component

    Weekly Downloads

    11

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    234 kB

    Total Files

    28

    Last publish

    Collaborators

    • engineaipedro
    • miguelvps
    • pedrombafonso