ActiveUI

ActiveUI

  • User Guide
  • Developer Documentation

›Advanced

About

  • Introduction
  • Changelog

Getting Started

  • Step by Step
  • Development Environment
  • Artifacts
  • ActiveUI Application
  • Usage as an npm Dependency
  • Initialization
  • Project Architecture

Guides

  • Adding KaTex fonts
  • Adding Servers
  • Authentication
  • Bookmark favorites
  • Charts
  • Configuring Widget Handlers and Actions
  • Container
  • Custom UI components with Ant Design
  • Data manipulation
  • Debugging
  • Deployment
  • Internationalization
  • MDX Manipulation
  • Plugins
  • Reporting
  • Settings
  • Tabular View and Pivot Tables
  • Testing

Reference

  • API Reference
  • Default Widget Bookmarks
  • Plugins
  • Settings

Advanced

  • Content Server Setup
  • Experimental Features
  • Maven Integration
  • Offline Installation
  • Script-based Integration

Script-based Integration

You don't need Node.js to use ActiveUI SDK. You can directly import the library in any HTML page.

Installation and Environment

Make sure you read the Artifacts page first.

Configure your application server so that umd/activeui-sdk.production.min.js script is served from https://host:port/your-application/umd/activeui-sdk.production.min.js.

Importing the SDK

Create an index.html file with the following code:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>A Sample Page</title>
    <!-- Load React and ReactDOM from a CDN. -->
    <script src="https://unpkg.com/react@16.6.0/umd/react.production.min.js"></script>
    <script src="https://unpkg.com/react-dom@16.6.0/umd/react-dom.production.min.js"></script>
    <!-- Adapt the path to where you retrieve the library from. -->
    <script src="https://host:port/your-application/umd/activeui-sdk.production.min.js"></script>
  </head>
  <body>
    <div id="example"></div>
    <script type="text/javascript">
      // ** Your code goes here! **
    </script>
  </body>
</html>

If you want to debug your application, take a look at this page.

Importing Named Exports

@activeviam/activeui-sdk has several named exports. In other sections of the docs you will see them imported:

import {createActiveUI} from '@activeviam/activeui-sdk';

If you are using the script integration you should do the following instead:

const {createActiveUI} = window.ActiveUI;
// Or if you're supporting older browsers:
// Note that in other documentation we also use some ES6 features that
// may not work in older browsers without using a compile step (which is used in the sandbox).
var createActiveUI = window.ActiveUI.createActiveUI;

Serving the Translation Files

The Internationalization of ActiveUI is done through separate JSON files: one for each available locale. These files need to be accessible in a folder named ./locales relatively to the index.html file mentioned above.

Using the Library

Open your browser to https://host:port/your-application/index.html. React, ReactDOM and ActiveUI will be available as global JavaScript variables.

← Offline Installation
  • Installation and Environment
  • Importing the SDK
  • Importing Named Exports
  • Serving the Translation Files
  • Using the Library
Copyright © 2020 ActiveViam