Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI components documentation

Rich Turnerb11f9d7ad201
diff --git a/ui/component/README.md b/ui/component/README.md
index f741189f6..ae8ddd365 100644
--- a/ui/component/README.md
+++ b/ui/component/README.md
@@ -10,4 +10,4 @@ Please refer to the [Developer Guide](https://github.com/openremote/openremote/w
## Usage
To consume the components in an application simply add the required dependencies to your `package.json` and then import the required component(s) using standard ES6 module syntax; for our own applications we use webpack for bundling (see the existing [apps](../apps) for examples). When using components from a custom project, yarn workspaces can be used to `symlink` the components to the code base allowing for tight development of components within an application.
-For usage information on each component refer to the component's `README` file.
+For usage information on each component refer to the component's `README` file and the TypeDoc generated [documentation]().
diff --git a/ui/component/core/README.md b/ui/component/core/README.md
index f8c2e955a..a2563be82 100644
--- a/ui/component/core/README.md
+++ b/ui/component/core/README.md
@@ -1,27 +1,105 @@
# @openremote/core
-
-> ${DESCRIPTION}
-
[![NPM Version][npm-image]][npm-url]
[![Linux Build][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
-## Install
+ES6 modules for connecting to an OpenRemote Manager as well as utilities for performing common tasks.
+The default export is a singleton of type `Manager` that can be used to connect to an OpenRemote Manager, initiate
+authentication and download common resources (translation files, icons, etc). Everything is initiated by calling
+the `init` method, what tasks are performed during initialisation is determined by the `ManagerConfig` passed to the
+`init`, the tasks include the following:
+
+* Check the manager exists and is accessible (calls the `api/master/info` endpoint)
+* Initialise authentication and perform login redirect (if requested in the `ManagerConfig`)
+* Download `mdi` iconset (if requested in the `ManagerConfig` - if not specified iconset will be downloaded)
+* Initialise REST API client (`@openremote/rest`) - Sets a timeout of 10s and will also add a request interceptor to
+add required `Authorization` header for authentication
+* Initialise console (the console is the device used to render the application desktop, Android or iOS device)
+* Download built in OpenRemote translation files
+* Download Asset Model Descriptors
+
+## Install
```bash
-npm i -S @openremote/or-core
+npm i @openremote/core
+yarn add @openremote/core
```
## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
-TODO
+Initialisation is done by calling the `init` method which returns a Promise that is fulfilled with a `boolean` indicating
+whether initialisation was successful or not.
+
+Initialisation usage example:
+
+```$javascript
+import openremote from "@openremote/core";
+
+openremote.init({
+ managerUrl: "http://localhost:8080",
+ keycloakUrl: "http://localhost:8080/auth",
+ auth: Auth.KEYCLOAK,
+ autoLogin: false,
+ realm: "tenantA",
+ configureTranslationsOptions: (options) => {
+ options.lng = "nl"; // Change initial language to dutch rather than english
+ }
+}).then((success) => {
+ if (success) {
+ // Load the app
+ } else {
+ // Something has gone wrong
+ }
+});
+```
-## License
+### Asset Mixin (`dist/asset-mixin`)
+Exports a `subscribe` function/mixin that can be used by components to connect to one or more Assets in the OpenRemote
+Manager; it takes care of subscribing to events for the specified Asset(s), usage example:
+
+```$javascript
+class AssetComponent extends subscribe(openremote) {
+
+ constructor() {
+ this.assetIds = [this.asset];
+ }
+
+ // Override this method to be notified when an attribute event is received for a subscribed asset. This is called
+ // whenever an attribute's value is modified.
+ public onAttributeEvent(event: AttributeEvent) {}
+
+ // Override this method to be notified when an asset event is received for a subscribed asset. This is called when
+ // an asset is first subscribed or when an asset is modified (attribute value changes are handled as attribute events)
+ public onAssetEvent(event: AssetEvent) {}
+
+ // If you need to modify an attribute then call the sendAttributeEvent method; the event must be for a subscribed asset.
+ doSendEvent(event: AttributeEvent) {
+ this.sendAttributeEvent(event);
+ }
+}
+```
+
+### Events (`./dist/event`)
+Provides infrastructure for connecting to the OpenRemote Manager client event bus; by default an `EventProvider` instance
+`Manager` is initialised by the `Manager` during the initialisation process and can be accessed from `openremote.events`
+but it is also possible to instantiate an `EventProvider` manually.
+
+### Util (`./dist/util`)
+Various utility methods for common tasks.
+
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
-[npm-url]: https://npmjs.org/package/live-xxx
+[npm-url]: https://npmjs.org/package/@openremote/core
[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
[travis-url]: https://travis-ci.org/live-js/live-xxx
[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
diff --git a/ui/component/core/package.json b/ui/component/core/package.json
index ea9254e6f..a77df986c 100644
--- a/ui/component/core/package.json
+++ b/ui/component/core/package.json
@@ -20,6 +20,7 @@
},
"devDependencies": {
"tslint": "^5.11.0",
+ "typedoc-plugin-monorepo": "^0.1.0",
"typescript": "^3.2.2"
}
}
diff --git a/ui/component/core/typedoc.js b/ui/component/core/typedoc.js
new file mode 100644
index 000000000..7268c271b
--- /dev/null
+++ b/ui/component/core/typedoc.js
@@ -0,0 +1,3 @@
+module.exports = {
+ ... require('../../typedoc.js')
+};
\ No newline at end of file
diff --git a/ui/component/model/README.md b/ui/component/model/README.md
index 8fb987d51..a24b05381 100644
--- a/ui/component/model/README.md
+++ b/ui/component/model/README.md
@@ -1,27 +1,33 @@
-# or-model
-
-> ${DESCRIPTION}
-
+# @openremote/model
[![NPM Version][npm-image]][npm-url]
[![Linux Build][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
-## Install
+Typescript type definitions for the OpenRemote object model.
+## Install
```bash
-npm i -S @openremote/or-model
+npm i @openremote/model
+yarn add @openremote/model
```
## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
-TODO
+```$javascript
+import {Asset} from "@openremote/model";
-## License
+const asset: Asset = {
+ ...
+};
+```
+
+## License
[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
-[npm-url]: https://npmjs.org/package/live-xxx
+[npm-url]: https://npmjs.org/package/@openremote/core
[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
[travis-url]: https://travis-ci.org/live-js/live-xxx
[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
diff --git a/ui/component/or-bottom-navigation/README.md b/ui/component/or-bottom-navigation/README.md
index 88b6c43d1..343be02c5 100644
--- a/ui/component/or-bottom-navigation/README.md
+++ b/ui/component/or-bottom-navigation/README.md
@@ -1,3 +1,33 @@
-A Pen created at CodePen.io. You can find this one at https://codepen.io/eskimojo14/pen/PEVjBJ.
+# @openremote/or-bottom-navigation \<or-bottom-navigation\>
+[![NPM Version][npm-image]][npm-url]
+[![Linux Build][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
- A recreation of the [Bottom navigation](https://material.io/guidelines/components/bottom-navigation.html) bar from Material Design
\ No newline at end of file
+***WORK IN PROGRESS***
+
+Web Component for displaying a bottom navigation based on slots.
+
+## Install
+```bash
+npm i @openremote/or-bottom-navigation
+yarn add @openremote/or-bottom-navigation
+```
+
+## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
+
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
+[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
+
+[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
+[npm-url]: https://npmjs.org/package/@openremote/or-header
+[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
+[travis-url]: https://travis-ci.org/live-js/live-xxx
+[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
+[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
diff --git a/ui/component/or-header/README.md b/ui/component/or-header/README.md
index 6bf87e6a9..cd8da3ac1 100644
--- a/ui/component/or-header/README.md
+++ b/ui/component/or-header/README.md
@@ -1,21 +1,31 @@
-# \<or-header\>
+# @openremote/or-header \<or-header\>
+[![NPM Version][npm-image]][npm-url]
+[![Linux Build][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
-Displays header with menu based on slots.
+Web Component for displaying a header with a menu based on slots.
-## Install the Polymer-CLI
+## Install
+```bash
+npm i @openremote/or-header
+yarn add @openremote/or-header
+```
-First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) and npm (packaged with [Node.js](https://nodejs.org)) installed. Run `npm install` to install your element's dependencies, then run `polymer serve` to serve your element locally.
+## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
-## Viewing Your Element
-```
-$ polymer serve
-```
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
-## Running Tests
-```
-$ polymer test
-```
+## License
+[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
-Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.
+[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
+[npm-url]: https://npmjs.org/package/@openremote/or-header
+[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
+[travis-url]: https://travis-ci.org/live-js/live-xxx
+[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
+[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
diff --git a/ui/component/or-icon/README.md b/ui/component/or-icon/README.md
index 02a20ece3..7ddff7273 100644
--- a/ui/component/or-icon/README.md
+++ b/ui/component/or-icon/README.md
@@ -1,24 +1,61 @@
+# @openremote/or-icon \<or-icon\>
[![NPM Version][npm-image]][npm-url]
[![Linux Build][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
-## Install
+Web Component for displaying an icon from a loaded iconset.
+## Install
```bash
-npm i -S @openremote/or-map
+npm i @openremote/or-icon
+yarn add @openremote/or-icon
```
## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
-TODO
+Icons are defined in iconsets, there are two iconsets provided by default and new ones can be created as required (see
+[demo-core](../../demo/demo-core)), The `mdi` iconset is quite large and it is possible to prevent loading of this
+when initialising the OpenRemote `Manager` via the `ManagerConfig`:
-## License
+* `mdi` - [Material Design Icons](https://materialdesignicons.com/)
+* `or` - OpenRemote icons (see [here](./or-iconset.ts))
+
+The default iconset is `mdi` but this can be changed by setting `OrIcon.DEFAULT_ICONSET`, to load an icon use the
+following HTML:
+
+```$html
+<or-icon icon="mdi:access-point" />
+```
+
+If using the default iconset then the iconset prefix can be omitted:
+```$html
+<or-icon icon="access-point" />
+```
+Styling is done through CSS, the following CSS variables can be used:
+
+```$css
+--or-icon-fill (default: currentcolor)
+--or-icon-stroke (default: none)
+--or-icon-height (default: 24px)
+--or-icon-width (default: 24px)
+--or-icon-pointer-events (default: none)
+```
+
+When an iconset is added then any `or-icon` components in the DOM will be notified and refresh as required.
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
-[npm-url]: https://npmjs.org/package/live-xxx
+[npm-url]: https://npmjs.org/package/@openremote/or-icon
[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
[travis-url]: https://travis-ci.org/live-js/live-xxx
[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
-[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
\ No newline at end of file
+[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
diff --git a/ui/component/or-icon/src/index.ts b/ui/component/or-icon/src/index.ts
index 2863073ab..0ff835ce8 100644
--- a/ui/component/or-icon/src/index.ts
+++ b/ui/component/or-icon/src/index.ts
@@ -1,5 +1,5 @@
import {css, customElement, html, LitElement, property, PropertyValues} from 'lit-element';
-import orIcons from "./or-icons";
+import orIconset from "./or-iconset";
export interface IconSets {
[name: string]: IconSet;
@@ -15,7 +15,7 @@ export enum IconEvent {
class Icons {
private _icons: IconSets = {
- or: orIcons
+ or: orIconset
};
addIconSet(name: string, iconset: IconSet) {
@@ -33,15 +33,15 @@ export var IconSets = new Icons();
@customElement('or-icon')
export class OrIcon extends LitElement {
- static _DEFAULT_ICONSET: string = "mdi";
+ static DEFAULT_ICONSET: string = "mdi";
static styles = css`
:host {
display: inline-block;
position: relative;
vertical-align: middle;
- fill: var(--or-icon-fill-color, currentcolor);
- stroke: var(--or-icon-stroke-color, none);
+ fill: var(--or-icon-fill, currentcolor);
+ stroke: var(--or-icon-stroke, none);
width: var(--or-icon-width, 24px);
height: var(--or-icon-height, 24px);
}
@@ -83,7 +83,7 @@ export class OrIcon extends LitElement {
window.removeEventListener(IconEvent.ICONSET_ADDED, this._handler);
let parts = (this.icon || "").split(":");
let iconName = parts.pop();
- let iconSetName = parts.pop() || OrIcon._DEFAULT_ICONSET;
+ let iconSetName = parts.pop() || OrIcon.DEFAULT_ICONSET;
if (!iconSetName || iconSetName === "" || !iconName || iconName === "") {
return;
}
diff --git a/ui/component/or-icon/src/or-icons.ts b/ui/component/or-icon/src/or-iconset.ts
similarity index 87%
rename from ui/component/or-icon/src/or-icons.ts
rename to ui/component/or-icon/src/or-iconset.ts
index dfad4de68..baf22bdc8 100644
--- a/ui/component/or-icon/src/or-icons.ts
+++ b/ui/component/or-icon/src/or-iconset.ts
@@ -1,9 +1,9 @@
import {IconSetSvg} from "./icon-set-svg";
-let orIcons: IconSetSvg = new IconSetSvg(24, {
+let orIconset: IconSetSvg = new IconSetSvg(24, {
"logo": "<path style='pointer-events: var(--or-icon-pointer-events, none);' fill=\"#C4D600\" d=\"m11.96125,23.85096c-6.56773,0 -11.90971,-5.34202 -11.90971,-11.90862l2.49411,0c0,5.19176 4.22389,9.41568 9.41561,9.41568c5.19053,0 9.41561,-4.22392 9.41561,-9.41568c0,-5.19176 -4.22389,-9.41568 -9.41561,-9.41568l0,-2.49413c6.56655,0 11.90971,5.34439 11.90971,11.9098c0,6.5666 -5.34316,11.90862 -11.90971,11.90862l0,0z\" /><path fill=\"#4E9D2D\" d=\"m10.25094,20.38647c-2.26848,-0.47231 -4.21822,-1.80199 -5.48741,-3.74009s-1.70892,-4.25777 -1.23545,-6.52625c0.47347,-2.26965 1.80315,-4.21822 3.74242,-5.48857c1.93926,-1.27035 4.25661,-1.70892 6.52625,-1.23545c4.68471,0.97719 7.70121,5.5828 6.72286,10.26635l-2.39994,-0.49907c0.70149,-3.36085 -1.4623,-6.66585 -4.82431,-7.36734c-1.62866,-0.33969 -3.29105,-0.02559 -4.68238,0.88645c-1.39134,0.91088 -2.34526,2.3092 -2.68495,3.93786c-0.33853,1.62633 -0.02443,3.28988 0.88645,4.68122c0.91088,1.39134 2.3092,2.34526 3.93786,2.68379l-0.50139,2.4011l0,0z\"/><path fill=\"#1D5632\"d=\"m12.03064,17.49616c-0.09524,0 -0.19048,-0.00116 -0.28457,-0.00465c-1.49833,-0.0755 -2.87818,-0.72942 -3.88636,-1.84097c-1.00818,-1.11271 -1.52156,-2.54948 -1.44722,-4.05013l2.44378,0.12196c-0.04181,0.84557 0.24856,1.65745 0.81769,2.28466c0.56681,0.62721 1.34733,0.99656 2.1929,1.03838c0.84208,0.03833 1.65629,-0.2474 2.2835,-0.81653c0.62837,-0.56797 0.99656,-1.34617 1.03954,-2.19174c0.08711,-1.74573 -1.26371,-3.23708 -3.00943,-3.3242l0.12196,-2.44378c3.09422,0.15332 5.4869,2.79455 5.33358,5.88877c-0.07434,1.49949 -0.72942,2.87818 -1.84097,3.8852c-1.04186,0.94313 -2.36945,1.45303 -3.7644,1.45303l0,0z\"/>",
"logo-plain": "m11.9925,23.91349c-6.58498,0 -11.94099,-5.35605 -11.94099,-11.9399l2.50066,0c0,5.20539 4.23498,9.44041 9.44033,9.44041c5.20416,0 9.44033,-4.23502 9.44033,-9.44041c0,-5.20539 -4.23498,-9.44041 -9.44033,-9.44041l0,-2.50068c6.5838,0 11.94099,5.35842 11.94099,11.94108c0,6.58385 -5.35719,11.9399 -11.94099,11.9399l0,0zm-1.80787,-3.27769c-2.31323,-0.48163 -4.30141,-1.83755 -5.59563,-3.81389s-1.74263,-4.34178 -1.25982,-6.65502c0.48281,-2.31443 1.83872,-4.30145 3.81623,-5.59686c1.97751,-1.29542 4.34056,-1.74264 6.65497,-1.25983c4.77711,0.99647 7.8531,5.69295 6.85545,10.46891l-2.44727,-0.50891c0.71532,-3.42716 -1.49114,-6.79738 -4.91946,-7.5127c-1.66078,-0.34639 -3.35596,-0.0261 -4.77474,0.90394c-1.41878,0.92886 -2.39152,2.35476 -2.73791,4.01555c-0.3452,1.65842 -0.02491,3.3548 0.90394,4.77359c0.92885,1.41879 2.35475,2.39154 4.01552,2.73675l-0.51128,2.44848l0,0zm1.81499,-2.92536c-0.09727,0 -0.19455,-0.00119 -0.29064,-0.00475c-1.53029,-0.07711 -2.93958,-0.74498 -3.96926,-1.88025c-1.02968,-1.13646 -1.55401,-2.60388 -1.47809,-4.13655l2.49591,0.12456c-0.04271,0.86361 0.25386,1.69282 0.83513,2.33341c0.5789,0.64059 1.37607,1.01783 2.23968,1.06053c0.86005,0.03915 1.69162,-0.25268 2.33221,-0.83395c0.64177,-0.58009 1.01782,-1.3749 1.06171,-2.23851c0.08897,-1.78298 -1.29066,-3.30616 -3.07362,-3.39513l0.12456,-2.49593c3.16022,0.15659 5.60394,2.85419 5.44735,6.01443c-0.07592,1.53149 -0.74498,2.9396 -1.88024,3.9681c-1.06408,0.96326 -2.41999,1.48403 -3.8447,1.48403l0,0z",
- "marker": "<ellipse fill=\"#000\" opacity=\"0.2\" ry=\"1.5\" rx=\"4\" cy=\"22.5\" cx=\"12\" /><path style='pointer-events: var(--or-icon-pointer-events, none);' d=\"m11.999999,0a8.437501,8.344057 0 0 1 8.437501,8.344057c0,6.500779 -5.798864,6.280799 -8.437501,14.412461c-2.638637,-8.131662 -8.437501,-7.911683 -8.437501,-14.412461a8.437501,8.344057 0 0 1 8.437501,-8.344057z\" />"
+ "marker": "<ellipse fill=\"#000\" opacity=\"0.2\" ry=\"1.5\" rx=\"4\" cy=\"22.5\" cx=\"12\" /><path style='pointer-events: var(--or-icon-pointer-events, none);' d=\"m11.999999,0a8.437501,8.344057 0 0 1 8.437501,8.344057c0,6.500779 -5.798864,6.280799 -8.437501,14.412461c-2.638637,-8.131662 -8.437501,-7.911683 -8.437501,-14.412461a8.437501,8.344057 0 0 1 8.437501,-8.344057z\" />"
});
-export default orIcons;
\ No newline at end of file
+export default orIconset;
\ No newline at end of file
diff --git a/ui/component/or-input/README.md b/ui/component/or-input/README.md
index 437da10d4..70db9a9a0 100644
--- a/ui/component/or-input/README.md
+++ b/ui/component/or-input/README.md
@@ -1,3 +1,31 @@
-# \<or-select\>
+# @openremote/or-input \<or-input\>
+[![NPM Version][npm-image]][npm-url]
+[![Linux Build][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
-OpenRemote select
+Web Component for displaying an input control.
+
+## Install
+```bash
+npm i @openremote/or-input
+yarn add @openremote/or-input
+```
+
+## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
+
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
+[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
+
+[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
+[npm-url]: https://npmjs.org/package/@openremote/or-input
+[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
+[travis-url]: https://travis-ci.org/live-js/live-xxx
+[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
+[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
diff --git a/ui/component/or-map/README.md b/ui/component/or-map/README.md
index 883789246..520e8fc9e 100644
--- a/ui/component/or-map/README.md
+++ b/ui/component/or-map/README.md
@@ -1,46 +1,113 @@
-# @openremote/or-map
-
-> IN DEVELOPMENT
-
+# @openremote/or-map \<or-map\>
[![NPM Version][npm-image]][npm-url]
[![Linux Build][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
-## Install
+Web Component for displaying a Mapbox map; either raster or vector (default). This component requires an OpenRemote
+Manager to retrieve map settings and tiles.
+## Install
```bash
-npm i -S @openremote/or-map
+npm i @openremote/or-map
+yarn add @openremote/or-map
```
## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
-TODO
-
-```{html}
- /**
- * By default this generates the following marker HTML:
- * <div class="or-map-marker">
- * <CHILD NODE>
- * <CHILD NODE>
- * </div>
- *
- * If there are no child nodes then the default or-map-marker is
- * used:
- * <div class="or-map-marker or-map-marker-default">
- * <div>
- * <or-icon icon="or:marker"></or-icon>
- * <or-icon class="marker-icon" icon="${icon || ""}"></or-icon>
- * </div>
- * </div>
- */
+```$html
+<or-map center="5.454250, 51.445990" zoom="5" style="height: 500px; width: 100%;" />
```
-## License
+For a raster map (raster tile serving in the OpenRemote Manager must be properly configured):
+
+```$html
+<or-map type="RASTER" center="5.454250, 51.445990" zoom="5" style="height: 500px; width: 100%;" />
+```
+
+The center and zoom are optional overrides for the defaults that will be defined in the `mapsettings` loaded from the
+OpenRemote Manager; each realm can have different `mapsettings` with a fallback to the default.
+
+Markers can be added via markup as children:
+
+```$html
+<or-map id="vectorMap" center="5.454250, 51.445990" zoom="5" style="height: 500px; width: 100%;">
+ <or-map-marker id="demo-marker" lng="5.454250" class="marker" icon="or:logo-plain"></or-map-marker>
+</or-map>
+```
+
+Or programmatically:
+
+```$typescript
+const vectorMap = docuemnt.getElementById("vectorMap");
+const assetMarker = document.createElement("or-map-marker-asset");
+assetMarker.setAttribute("asset", apartment1.id!);
+vectorMap.appendChild(assetMarker);
+```
+
+There are two types of built in markers:
+### \<or-map-marker\>
+This is a basic marker and the base class for any other markers and it has the following attributes:
+
+* lat*
+* lng*
+* visible (show/hide the marker)
+* icon (uses `or-icon` to render an icon inside the default marker)
+* interactive (sets pointer events for the marker)
+
+*required
+
+The visual content of the marker can be controlled by adding child content to the `or-map-marker` element; any child
+content is rendered inside a `div`. If no children are specified then the default marker will be used. Subclasses can
+override the `createMarkerContent()` method to control the look of the marker.
+
+### \<or-map-marker-asset\>
+This links the marker to an Asset in the OpenRemote Manager by using the `asset-mixin` and adds the following attribute:
+
+* asset* (ID of the Asset to link)
+
+*required
+
+The Asset must be valid, accessible and must have a valid `location` attribute otherwise no marker will be shown. By
+default the `AssetType` is used to set the icon of the marker but this can be controlled by setting the `assetTypeAsIcon`
+property.
+
+### Styling
+All styling is done through CSS, the following CSS variables can be used:
+
+```$css
+--or-map-marker-fill (default: #1D5632)
+--or-map-marker-stroke (default: none)
+--or-map-marker-width (default: 48px)
+--or-map-marker-height (default: 48px)
+--or-map-marker-transform (default: translate(-24px, -45px))
+
+--or-map-marker-icon-fill (default: #FFF)
+--or-map-marker-icon-stroke (default: none)
+--or-map-marker-icon-width (default: 24px)
+--or-map-marker-icon-height (default: 24px)
+--or-map-marker-icon-transform (default: translate(-50%, -19px))
+```
+
+### Events
+The following DOM events may be fired by the component and markers:
+
+* `click` - Standard click event is fired when the map itself is clicked
+* `OrMapMarkerEvent.CLICKED` - A map marker has been clicked; details contains the clicked `marker`
+* `OrMapMarkerEvent.CHANGED` - A map marker has been modified; details contains the changed `marker` and name of changed
+`property`
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
-[npm-url]: https://npmjs.org/package/live-xxx
+[npm-url]: https://npmjs.org/package/@openremote/or-map
[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
[travis-url]: https://travis-ci.org/live-js/live-xxx
[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
diff --git a/ui/component/or-map/src/markers/or-map-marker.ts b/ui/component/or-map/src/markers/or-map-marker.ts
index 6a7feb4e2..c01a3d0b6 100644
--- a/ui/component/or-map/src/markers/or-map-marker.ts
+++ b/ui/component/or-map/src/markers/or-map-marker.ts
@@ -1,6 +1,4 @@
import {css, customElement, LitElement, property, PropertyValues, query, html} from "lit-element";
-import {Type} from "../index";
-import {Marker as MarkerJS} from "mapbox.js";
export enum OrMapMarkerEvent {
CLICKED = "or-map-marker-clicked",
@@ -60,7 +58,8 @@ export const MarkerStyle = css`
cursor: pointer;
--or-icon-width: var(--or-map-marker-width, 48px);
--or-icon-height: var(--or-map-marker-height, 48px);
- --or-icon-fill-color: var(--or-map-marker-fill, #1D5632);
+ --or-icon-fill: var(--or-map-marker-fill, #1D5632);
+ --or-icon-stroke: var(--or-map-marker-stroke, none);
}
.or-map-marker.interactive .marker-container {
@@ -77,7 +76,8 @@ export const MarkerStyle = css`
left: 50%;
top: 50%;
z-index: 1000;
- --or-icon-fill-color: var(--or-map-marker-icon-fill, #FFF);
+ --or-icon-fill: var(--or-map-marker-icon-fill, #FFF);
+ --or-icon-stroke: var(--or-map-marker-icon-stroke, none);
--or-icon-width: var(--or-map-marker-icon-width, 24px);
--or-icon-height: var(--or-map-marker-icon-height, 24px);
transform: var(--or-map-marker-icon-transform, translate(-50%, -19px));
diff --git a/ui/component/or-map/test/index.html b/ui/component/or-map/test/index.html
deleted file mode 100644
index 8960f4bb9..000000000
--- a/ui/component/or-map/test/index.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <script src="../node_modules/wct-browser-legacy/browser.js"></script>
- </head>
- <body>
- <script>
- // Load and run all tests (.html, .js):
- WCT.loadSuites([
- 'or-asset-tree_test.html'
- ]);
- </script>
- </body>
-</html>
diff --git a/ui/component/or-map/test/or-asset-tree_test.html b/ui/component/or-map/test/or-asset-tree_test.html
deleted file mode 100644
index 8db8b67dc..000000000
--- a/ui/component/or-map/test/or-asset-tree_test.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!doctype html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
-
- <title>or-asset-tree test</title>
-
- <script src="../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
- <script src="../node_modules/wct-browser-legacy/browser.js"></script>
-
- <script type="module" src="../or-asset-tree.ts"></script>
- </head>
- <body>
-
- <test-fixture id="BasicTestFixture">
- <template>
- <or-asset-tree></or-asset-tree>
- </template>
- </test-fixture>
-
- <test-fixture id="ChangedPropertyTestFixture">
- <template>
- <or-asset-tree prop1="new-prop1"></or-asset-tree>
- </template>
- </test-fixture>
-
- <script type="module">
- suite('or-asset-tree', () => {
-
- test('instantiating the element with default properties works', () => {
- const element = fixture('BasicTestFixture');
- assert.equal(element.prop1, 'or-asset-tree');
- const elementShadowRoot = element.shadowRoot;
- const elementHeader = elementShadowRoot.querySelector('h2');
- assert.equal(elementHeader.innerHTML, 'Hello or-asset-tree!');
- });
-
- test('setting a property on the element works', () => {
- // Create a test fixture
- const element = fixture('ChangedPropertyTestFixture');
- assert.equal(element.prop1, 'new-prop1');
- const elementShadowRoot = element.shadowRoot;
- const elementHeader = elementShadowRoot.querySelector('h2');
- assert.equal(elementHeader.innerHTML, 'Hello new-prop1!');
- });
-
- });
- </script>
-
- </body>
-</html>
diff --git a/ui/component/or-rules-editor/README.md b/ui/component/or-rules-editor/README.md
index 6b09f9757..2e0cd52ab 100644
--- a/ui/component/or-rules-editor/README.md
+++ b/ui/component/or-rules-editor/README.md
@@ -1,3 +1,31 @@
-# \<or-rules-editor\>
+# @openremote/or-rules-editor \<or-rules-editor\>
+[![NPM Version][npm-image]][npm-url]
+[![Linux Build][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
-OpenRemote Timline
+Web Component for displaying a rules editor. This component requires an OpenRemote Manager to retrieve/save rules.
+
+## Install
+```bash
+npm i @openremote/or-rules-editor
+yarn add @openremote/or-rules-editor
+```
+
+## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
+
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
+[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
+
+[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
+[npm-url]: https://npmjs.org/package/@openremote/or-rules-editor
+[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
+[travis-url]: https://travis-ci.org/live-js/live-xxx
+[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
+[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
\ No newline at end of file
diff --git a/ui/component/or-select/README.md b/ui/component/or-select/README.md
index 437da10d4..95e5f6cac 100644
--- a/ui/component/or-select/README.md
+++ b/ui/component/or-select/README.md
@@ -1,3 +1,31 @@
-# \<or-select\>
+# @openremote/or-select \<or-select\>
+[![NPM Version][npm-image]][npm-url]
+[![Linux Build][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
-OpenRemote select
+Web Component for displaying a drop down.
+
+## Install
+```bash
+npm i @openremote/or-select
+yarn add @openremote/or-select
+```
+
+## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
+
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
+[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
+
+[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
+[npm-url]: https://npmjs.org/package/@openremote/or-input
+[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
+[travis-url]: https://travis-ci.org/live-js/live-xxx
+[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
+[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
diff --git a/ui/component/or-smart-notify/README.md b/ui/component/or-smart-notify/README.md
index 1492f67af..651417b16 100644
--- a/ui/component/or-smart-notify/README.md
+++ b/ui/component/or-smart-notify/README.md
@@ -1,3 +1,31 @@
-# \<or-smart-notify\>
+# @openremote/or-input \<or-smart-notify\>
+[![NPM Version][npm-image]][npm-url]
+[![Linux Build][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
-OpenRemote SmartNotify
\ No newline at end of file
+Web Component for displaying a smart notify control.
+
+## Install
+```bash
+npm i @openremote/or-smart-notify
+yarn add @openremote/or-smart-notify
+```
+
+## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
+
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
+[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
+
+[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
+[npm-url]: https://npmjs.org/package/@openremote/or-smart-notify
+[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
+[travis-url]: https://travis-ci.org/live-js/live-xxx
+[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
+[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
diff --git a/ui/component/or-thermostat/README.md b/ui/component/or-thermostat/README.md
index 3b5e9059e..d70644ba9 100644
--- a/ui/component/or-thermostat/README.md
+++ b/ui/component/or-thermostat/README.md
@@ -1,10 +1,31 @@
-# \<or-thermostat\>
+# @openremote/or-thermostat \<or-thermostat\>
+[![NPM Version][npm-image]][npm-url]
+[![Linux Build][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
-Displays room temperature and setpoint information.
+Web Component for displaying a thermostat control for a room Asset.
-# Component Attributes
+## Install
+```bash
+npm i @openremote/or-thermostat
+yarn add @openremote/or-thermostat
+```
-* ***assetId*** - The ID of the room asset to display
-* label - The label to display in the thermostat
+## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
-***BOLD ITEMS ARE REQUIRED***
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
+[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
+
+[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
+[npm-url]: https://npmjs.org/package/@openremote/or-thermostat
+[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
+[travis-url]: https://travis-ci.org/live-js/live-xxx
+[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
+[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
diff --git a/ui/component/or-timeline/README.md b/ui/component/or-timeline/README.md
index f443ae029..f25a46f86 100644
--- a/ui/component/or-timeline/README.md
+++ b/ui/component/or-timeline/README.md
@@ -1,3 +1,31 @@
-# \<or-timeline\>
+# @openremote/or-timeline \<or-timeline\>
+[![NPM Version][npm-image]][npm-url]
+[![Linux Build][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
-OpenRemote Timline
+Web Component for displaying a timeline control.
+
+## Install
+```bash
+npm i @openremote/or-timeline
+yarn add @openremote/or-timeline
+```
+
+## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
+
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
+[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
+
+[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
+[npm-url]: https://npmjs.org/package/@openremote/or-timeline
+[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
+[travis-url]: https://travis-ci.org/live-js/live-xxx
+[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
+[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
diff --git a/ui/component/or-translate/README.md b/ui/component/or-translate/README.md
index 02a20ece3..42431ff19 100644
--- a/ui/component/or-translate/README.md
+++ b/ui/component/or-translate/README.md
@@ -1,24 +1,66 @@
+# @openremote/or-translate \<or-translate\>
[![NPM Version][npm-image]][npm-url]
[![Linux Build][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
-## Install
+Web Component for displaying a translated string based on the `18next` library.
+## Install
```bash
-npm i -S @openremote/or-map
+npm i @openremote/or-translate
+yarn add @openremote/or-translate
```
## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
-TODO
+For a full list of `i18next` functionality refer to that project's [documentation](https://www.i18next.com/).
-## License
+If used in conjunction with `@openremote/core` and the `Manager` `init` method has been called then the `i18next`
+default export will be ready to use and would have been configured with the following settings:
+
+* Language: `en`
+* Fallback language: `en`
+* Default Namespace: `app`
+* Fallback namespace: `or`
+* Available namespaces: `ManagerConfig.loadTranslations`
+* OR Namespace path: `managerURL` + `/shared/locales/{{lng}}/{{ns}}.json`
+* Namespace path: `ManagerConfig.loadTranslations` or fallback to `locales/{{lng}}/{{ns}}.json`
+There is an `or` namespace which is used for OpenRemote related translations; apps can use any other namespace(s) it is
+recommended to use `app` as this is set as the default as described above. To translate a string use the following HTML:
+
+```$html
+<or-translate value="app:asset" />
+```
+
+If using the default namespace then the namespace prefix can be omitted:
+```$html
+<or-translate value="asset" />
+```
+
+It is also possible to pass an `i18next.TOptions<i18next.InitOptions>` object to the `18next.t` method by setting the
+`options` attribute.
+
+
+### Translate mixin (`dist/translate-mixin`)
+Exports a `translate` function/mixin that can be used by any web component to hook into the `i18next` `initialized` and
+`languageChanged` events; if the web component is a `LitElement` an update of the component will be automatically
+requested when either event fires; otherwise the `initCallback` and/or `langChangedCallback` should be overridden as
+required. For usage example see the [or-translate source code](./src/index.ts).
+
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
-[npm-url]: https://npmjs.org/package/live-xxx
+[npm-url]: https://npmjs.org/package/@openremote/or-input
[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
[travis-url]: https://travis-ci.org/live-js/live-xxx
[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
-[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
\ No newline at end of file
+[coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
diff --git a/ui/component/rest/README.md b/ui/component/rest/README.md
index 59e95a25c..913dda17e 100644
--- a/ui/component/rest/README.md
+++ b/ui/component/rest/README.md
@@ -1,27 +1,74 @@
-# or-core
-
-> ${DESCRIPTION}
-
+# @openremote/rest
[![NPM Version][npm-image]][npm-url]
[![Linux Build][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
-## Install
+ES6 modules for connecting to an OpenRemote Manager as well as utilities for performing common tasks.
+
+The default export is a singleton of type `RestApi` that can be used to communicate with the OpenRemote Manager REST API.
+It uses an [axios](https://github.com/axios/axios) client to perform the requests and it contains strongly typed
+definitions for each OpenRemote Manager REST API endpoint (JAX-RS resource).
+
+
+## Install
```bash
-npm i -S @openremote/or-core
+npm i @openremote/rest
+yarn add @openremote/rest
```
## Usage
+For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
-TODO
+If used in conjunction with `@openremote/core` and the `Manager` `init` method has been called then the default export
+will be ready to use, the endpoints can be accessed via the `RestApi` `api` property and each JAX-RS resource defined
+in the OpenRemote Manager is also defined with the same name in the `RestApi` object.
-## License
+```$typescript
+import openremote from "@openremote/core";
+import rest from "@openremote/rest";
+
+openremote.init({
+ ...
+}).then((success) => {
+ if (success) {
+ let assetQuery = ...;
+ let response = await rest.api.AssetResource.queryAssets(assetQuery);
+ let assets = response.data;
+
+ // Do something with the assets
+ } else {
+ // Something has gone wrong
+ }
+});
+```
+It is possible to add additional request interceptors by calling the `addRequestInterceptor` method, it is also possible
+to access the `AxiosInstance` by calling the `axiosInstance` property.
+
+It is also possible to instantiate the `RestApi` object on demand but note you will need to ensure the Authorization
+header is correctly set if calling secure endpoints on the OpenRemote Manager REST API.
+
+```$typescript
+import {RestApi} from "@openremote/rest";
+
+let rest = new RestApi();
+rest.setTimeout(10000);
+rest.addRequestInterceptor(...);
+rest.initialise();
+```
+
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
+Internet Explorer 11 is also supported.
+
+
+## License
[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
[npm-image]: https://img.shields.io/npm/v/live-xxx.svg
-[npm-url]: https://npmjs.org/package/live-xxx
+[npm-url]: https://npmjs.org/package/@openremote/core
[travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
[travis-url]: https://travis-ci.org/live-js/live-xxx
[coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
diff --git a/ui/component/rest/src/index.ts b/ui/component/rest/src/index.ts
index 8899630e4..e7e8eed12 100644
--- a/ui/component/rest/src/index.ts
+++ b/ui/component/rest/src/index.ts
@@ -14,6 +14,10 @@ export class RestApi {
this._axiosInstance = axios.create();
}
+ get axiosInstance() {
+ return this._axiosInstance;
+ }
+
public setTimeout(timeout: number) {
this._axiosInstance.defaults.timeout = timeout;
}
diff --git a/ui/component/rest/test/index.html b/ui/component/rest/test/index.html
deleted file mode 100644
index 61a8ed064..000000000
--- a/ui/component/rest/test/index.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <script src="../node_modules/wct-browser-legacy/browser.js"></script>
- </head>
- <body>
- <script>
- // Load and run all tests (.html, .js):
- WCT.loadSuites([
- 'test-element_test.html'
- ]);
- </script>
- </body>
-</html>
diff --git a/ui/component/rest/test/test-element_test.html b/ui/component/rest/test/test-element_test.html
deleted file mode 100644
index 5e0964088..000000000
--- a/ui/component/rest/test/test-element_test.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!doctype html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
-
- <title>test-element test</title>
-
- <script src="../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
- <script src="../node_modules/wct-browser-legacy/browser.js"></script>
-
- <script type="module" src="../test-element.js"></script>
- </head>
- <body>
-
- <test-fixture id="BasicTestFixture">
- <template>
- <test-element></test-element>
- </template>
- </test-fixture>
-
- <test-fixture id="ChangedPropertyTestFixture">
- <template>
- <test-element prop1="new-prop1"></test-element>
- </template>
- </test-fixture>
-
- <script type="module">
- suite('test-element', () => {
-
- test('instantiating the element with default properties works', () => {
- const element = fixture('BasicTestFixture');
- assert.equal(element.prop1, 'test-element');
- const elementShadowRoot = element.shadowRoot;
- const elementHeader = elementShadowRoot.querySelector('h2');
- assert.equal(elementHeader.innerHTML, 'Hello test-element!');
- });
-
- test('setting a property on the element works', () => {
- // Create a test fixture
- const element = fixture('ChangedPropertyTestFixture');
- assert.equal(element.prop1, 'new-prop1');
- const elementShadowRoot = element.shadowRoot;
- const elementHeader = elementShadowRoot.querySelector('h2');
- assert.equal(elementHeader.innerHTML, 'Hello new-prop1!');
- });
-
- });
- </script>
-
- </body>
-</html>
diff --git a/ui/demo/demo-core/README.md b/ui/demo/demo-core/README.md
new file mode 100644
index 000000000..82ea9f75f
--- /dev/null
+++ b/ui/demo/demo-core/README.md
@@ -0,0 +1,12 @@
+# demo-core
+Provides a very basic app intended as a development harness for
+To run the demo you must have a running OpenRemote Manager backend with Demo assets (see [Quickstart](https://github.com/openremote/openremote/blob/master/README.md#quickstart)).
+
+
+
+## Supported Browsers
+The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition, Internet Explorer 11 is also supported.
+
+
+## License
+[GNU AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
diff --git a/ui/typedoc.js b/ui/typedoc.js
new file mode 100644
index 000000000..402a39874
--- /dev/null
+++ b/ui/typedoc.js
@@ -0,0 +1,18 @@
+module.exports = {
+ "mode": "modules",
+ "out": "docs",
+ "exclude": "test",
+ "theme": "minimal",
+ "ignoreCompilerErrors": true,
+ "excludePrivate": true,
+ "excludeProtected": true,
+ "excludeNotExported": true,
+ "target": "es6",
+ "moduleResolution": "node",
+ "preserveConstEnums": true,
+ "stripInternal": true,
+ "suppressExcessPropertyErrors": true,
+ "suppressImplicitAnyIndexErrors": true,
+ "module": "esNext",
+ "external-modulemap": ".*node_modules\/(@openremote\/[^\/]+)\/.*"
+}
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index 3d2bb3c6a..ce1ef3138 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -874,6 +874,17 @@
resolved "https://registry.yarnpkg.com/@mdi/svg/-/svg-3.5.95.tgz#9e5c3dda43957bb436b75d5e0f3f7e57d8d2efb7"
integrity sha512-OOHqPi6s6nEeOOvo9uZgdfLyTHGDiIXiAXtvIrCBbnU4mZFSHpskQUw7Yqmp/tluYzI6neLN5Dwy/vTusDcsdA==
+"@openremote/or-map@^1.0.0-alpha":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@openremote/or-map/-/or-map-1.0.0.tgz#dfd37ae3ddcf5b68f08077fb0f59c3172341079b"
+ integrity sha512-iWitaAwYem+3gOrU8cxSnVLjDDYIeC4llIBULSyVBWup5cuEKTpAPSgLPGcWU/wHMqzBYAsuCrcqh8sRitbmyQ==
+ dependencies:
+ "@openremote/rest" "^1.0.0"
+ "@polymer/polymer" "^3.0.0"
+ "@types/mapbox-gl" "^0.51.1"
+ mapbox-gl "^0.52.0-beta.1"
+ mapbox.js "^3.1.1"
+
"@polymer/app-layout@^3.0.0":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@polymer/app-layout/-/app-layout-3.0.2.tgz#8a6f3c87b405635fd3547db82db8dbb6c51b6bf9"
@@ -3319,6 +3330,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
+highlight.js@^9.12.0:
+ version "9.15.6"
+ resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.6.tgz#72d4d8d779ec066af9a17cb14360c3def0aa57c4"
+ integrity sha512-zozTAWM1D6sozHo8kqhfYgsac+B+q0PmsjXeyDrYIHHcBN0zTVT66+s2GW1GZv7DbyaROdLXKdabwS/WqPyIdQ==
+
hmac-drbg@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
@@ -3432,21 +3448,11 @@ https-browserify@^1.0.0:
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=
-i18next-xhr-backend@^1.5.1:
- version "1.5.1"
- resolved "https://registry.yarnpkg.com/i18next-xhr-backend/-/i18next-xhr-backend-1.5.1.tgz#50282610780c6a696d880dfa7f4ac1d01e8c3ad5"
- integrity sha512-9OLdC/9YxDvTFcgsH5t2BHCODHEotHCa6h7Ly0EUlUC7Y2GS09UeoHOGj3gWKQ3HCqXz8NlH4gOrK3NNc9vPuw==
-
i18next-xhr-backend@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/i18next-xhr-backend/-/i18next-xhr-backend-2.0.1.tgz#7af735ee1b0c6d4ce49fa5756591040a0fba6db7"
integrity sha512-CP0XPjJsTE4hY1rM1KXFYo63Ib61EBLEcTvMDyJwr0vs9p/UTuA3ENCmzSs9+ghZgWSjdOigc0oUERHaxctbsQ==
-i18next@^14.1.1:
- version "14.1.1"
- resolved "https://registry.yarnpkg.com/i18next/-/i18next-14.1.1.tgz#d569aff68c088151f09fcb0cb6f44b36d62731d3"
- integrity sha512-HItn9RHLyrDqe6pw6qXMYHGPHNc3y1FZndJfBlD6k4sRS0FAlYLvqCDVIWFc1XultBgsv348TtvL/lleG6JgBg==
-
i18next@^15.0.9:
version "15.0.9"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-15.0.9.tgz#42536407a921bb5a8535a4c090a26f16827a1884"
@@ -4207,7 +4213,7 @@ mapbox-gl@^0.52.0-beta.1:
tinyqueue "^1.1.0"
vt-pbf "^3.0.1"
-mapbox.js@^3.2.0:
+mapbox.js@^3.1.1, mapbox.js@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/mapbox.js/-/mapbox.js-3.2.0.tgz#f36a3e9e00daa52d387460eb7fc4d9d62ab32fc2"
integrity sha512-705f1N+U209yOhgzY4uvENxVf2chpwaGmHNcwVybL+tM3hA4lQQfF/udM9mHOtkVgBIuQJdv7ydZbqGFcasdow==
@@ -4217,7 +4223,7 @@ mapbox.js@^3.2.0:
mustache "3.0.1"
sanitize-caja "0.1.4"
-marked@~0.3.9:
+marked@^0.3.19, marked@~0.3.9:
version "0.3.19"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790"
integrity sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==
@@ -6340,6 +6346,14 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
+typedoc-plugin-monorepo@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/typedoc-plugin-monorepo/-/typedoc-plugin-monorepo-0.1.0.tgz#d923cb6d9ffff09d8256b679c1bce2b929c0f271"
+ integrity sha512-hx42ck+9dJCoZO0jLCmEE3R6lydYaaYIKL+g6LT5Ev+B8CdAESsML2jiGR+TFu1rUuEujjArtCHjNLj2YqnKnQ==
+ dependencies:
+ highlight.js "^9.12.0"
+ marked "^0.3.19"
+
typescript@^3.2.2:
version "3.3.4000"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.4000.tgz#76b0f89cfdbf97827e1112d64f283f1151d6adf0"