24.4.1 • Published 9 months ago

@opentext/forms-ui-runtime v24.4.1

Weekly downloads
-
License
OT-NO-FEE-LIC
Repository
-
Last release
9 months ago

forms-ui-runtime

UI runtime components for OpenText™ Forms API

Contents

Install

Run:

npm install @opentext/forms-ui-runtime

Usage

Consuming individual UI components

import { Ot2mcBaseElement, CheckBox } from '@opentext/forms-ui-runtime';

Consuming the components module in a VS Code extension

Add the following in the webpack.js, the following which will copy the components.js file in the dist folder.

  plugins: [
    new CopyWebpackPlugin({
      patterns: [{ from: require.resolve('@opentext/forms-ui-runtime/dist/components.js'), to: '' }]
    })
  ],

Now, components.js is available to be added in the VS Code webview.

    // Local path to script and css for the webview
    const componentsUri = webview.asWebviewUri(
      vscode.Uri.joinPath(this._context.extensionUri, 'dist', 'components.js')
    );

Consuming in UI Designer

Add the locale files to a root folder called locales.

And then add the following files to the root folder: components.js, designer-components.js and the runtime chunk runtime.js.