Skip to content

Extension - Web Component SDK

External Resources

Quick Setup

Download

ThingWorx Web Component SDK Utility Setup

npm install -g gulp gulp-cli
npm install -g aurelia-cli

From wc-sdk-utility/ : 1. npm install 2. npm link

Web Component Development

Documentation

Project Setup

From simple-el/:

  1. Delete content of twx-wc-sdk/ folder and replace with the content of wc-sdk-library
  2. npm install

Development

  • Review the simple-el.js demo web component
    • Review the out of the box ptcs web components implementation in twx-wc-sdk\

Testing

  1. npm start
  2. Open URL from prompt in a browser

Widget / Extension package

Documentation

Setup

From simple-el-widget/:

  1. Create tmp/ folder next to input/ and copy the simple-el web component folder to it, without the server configuration file

Development

  • Review the various config files in input\
    • widget.json: extension definition (metadata.xml)
    • widgets\sample-el.json: widget definition
      • WC properties, services and events mapping, and more...
    • ui/simpleel/simpleel.runtime.js: custom widget code for behavior that cannot be implemented with mappings only

Build

Package the web component as Widget and build the Extension

mub