100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
UI update: moved or-input to or-mwc-components/or-mwc-input
Rich Turner343787c6c9cb
diff --git a/ui/app/manager/src/pages/page-assets.ts b/ui/app/manager/src/pages/page-assets.tsindex d27bb7e23..e2a154c6f 100644--- a/ui/app/manager/src/pages/page-assets.ts+++ b/ui/app/manager/src/pages/page-assets.ts@@ -22,7 +22,7 @@ import {DefaultBoxShadow, Util} from "@openremote/core";import {Page, PageProvider, router} from "@openremote/or-app";import {AppStateKeyed} from "@openremote/or-app";import {EnhancedStore} from "@reduxjs/toolkit";-import {showOkCancelDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";+import {showOkCancelDialog} from "@openremote/or-mwc-components/or-mwc-dialog";import i18next from "i18next";import {AssetEventCause, WellknownAssets} from "@openremote/model";diff --git a/ui/app/manager/src/pages/page-gateway.ts b/ui/app/manager/src/pages/page-gateway.tsindex 657ffaba4..0bdbe7e05 100644--- a/ui/app/manager/src/pages/page-gateway.ts+++ b/ui/app/manager/src/pages/page-gateway.ts@@ -3,7 +3,7 @@ import i18next from "i18next";import "@openremote/or-panel";import {ConnectionStatus, GatewayConnection, GatewayConnectionStatusEvent} from "@openremote/model";import manager, {DefaultColor1, OREvent} from "@openremote/core";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import {Page, PageProvider} from "@openremote/or-app";import {AppStateKeyed} from "@openremote/or-app";import {EnhancedStore} from "@reduxjs/toolkit";@@ -80,7 +80,7 @@ class PageGateway<S extends AppStateKeyed> extends Page<S> {padding: 10px;}- #fields > or-input {+ #fields > or-mwc-input {margin: 10px 0;width: 100%;}@@ -89,7 +89,7 @@ class PageGateway<S extends AppStateKeyed> extends Page<S> {text-align: right;}- #buttons > or-input {+ #buttons > or-mwc-input {margin: 10px;}@@ -187,18 +187,18 @@ class PageGateway<S extends AppStateKeyed> extends Page<S> {${this._connectionStatus}</div><div id="fields">- <or-input .label="${i18next.t("host")}" .type="${InputType.TEXT}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.host : ""}" @or-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("host", e.detail.value)}"></or-input>- <or-input .label="${i18next.t("port")}" .type="${InputType.NUMBER}" ?disabled="${this._loading || this._readonly}" min="1" max="65536" step="1" .value="${connection ? connection.port : undefined}" @or-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("port", e.detail.value)}"></or-input>- <or-input .label="${i18next.t("realm")}" .type="${InputType.TEXT}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.realm : ""}" @or-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("realm", e.detail.value)}"></or-input>- <or-input .label="${i18next.t("clientId")}" .type="${InputType.TEXT}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.clientId : ""}" @or-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("clientId", e.detail.value)}"></or-input>- <or-input .label="${i18next.t("clientSecret")}" .type="${InputType.TEXT}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.clientSecret : ""}" @or-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("clientSecret", e.detail.value)}"></or-input>- <or-input .label="${i18next.t("secured")}" .type="${InputType.SWITCH}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.secured : false}" @or-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("secured", e.detail.value)}"></or-input>- <or-input .label="${i18next.t("disabled")}" .type="${InputType.SWITCH}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.disabled : false}" @or-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("disabled", e.detail.value)}"></or-input>+ <or-mwc-input .label="${i18next.t("host")}" .type="${InputType.TEXT}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.host : ""}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("host", e.detail.value)}"></or-mwc-input>+ <or-mwc-input .label="${i18next.t("port")}" .type="${InputType.NUMBER}" ?disabled="${this._loading || this._readonly}" min="1" max="65536" step="1" .value="${connection ? connection.port : undefined}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("port", e.detail.value)}"></or-mwc-input>+ <or-mwc-input .label="${i18next.t("realm")}" .type="${InputType.TEXT}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.realm : ""}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("realm", e.detail.value)}"></or-mwc-input>+ <or-mwc-input .label="${i18next.t("clientId")}" .type="${InputType.TEXT}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.clientId : ""}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("clientId", e.detail.value)}"></or-mwc-input>+ <or-mwc-input .label="${i18next.t("clientSecret")}" .type="${InputType.TEXT}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.clientSecret : ""}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("clientSecret", e.detail.value)}"></or-mwc-input>+ <or-mwc-input .label="${i18next.t("secured")}" .type="${InputType.SWITCH}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.secured : false}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("secured", e.detail.value)}"></or-mwc-input>+ <or-mwc-input .label="${i18next.t("disabled")}" .type="${InputType.SWITCH}" ?disabled="${this._loading || this._readonly}" .value="${connection ? connection.disabled : false}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._setConnectionProperty("disabled", e.detail.value)}"></or-mwc-input></div><div id="buttons">- <or-input .label="${i18next.t("reset")}" ?disabled="${!this._dirty || this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._reset()}"></or-input>- <or-input .label="${i18next.t("delete")}" ?disabled="${this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._delete()}"></or-input>- <or-input .label="${i18next.t("save")}" ?disabled="${!this._dirty || this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._save()}"></or-input>+ <or-mwc-input .label="${i18next.t("reset")}" ?disabled="${!this._dirty || this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._reset()}"></or-mwc-input>+ <or-mwc-input .label="${i18next.t("delete")}" ?disabled="${this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._delete()}"></or-mwc-input>+ <or-mwc-input .label="${i18next.t("save")}" ?disabled="${!this._dirty || this._loading || this._readonly}" .type="${InputType.BUTTON}" raised @click="${() => this._save()}"></or-mwc-input></div></or-panel></div>diff --git a/ui/app/manager/src/pages/page-realms.ts b/ui/app/manager/src/pages/page-realms.tsindex 4cfcf91d8..7c1bd2986 100644--- a/ui/app/manager/src/pages/page-realms.ts+++ b/ui/app/manager/src/pages/page-realms.ts@@ -16,8 +16,8 @@ import {AppStateKeyed} from "@openremote/or-app";import { ClientRole, Tenant } from "@openremote/model";import { i18next } from "@openremote/or-translate";import { OrIcon } from "@openremote/or-icon";-import { InputType, OrInputChangedEvent } from "@openremote/or-input";-import {showOkCancelDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";+import { InputType, OrInputChangedEvent } from "@openremote/or-mwc-components/or-mwc-input";+import {showOkCancelDialog} from "@openremote/or-mwc-components/or-mwc-dialog";const tableStyle = require("@material/data-table/dist/mdc.data-table.css");@@ -114,7 +114,7 @@ class PageRealms<S extends AppStateKeyed> extends Page<S> {padding-left: 16px;}- or-input {+ or-mwc-input {margin-bottom: 20px;margin-right: 16px;}@@ -367,11 +367,11 @@ class PageRealms<S extends AppStateKeyed> extends Page<S> {<div class="row"><div class="column">- <or-input ?readonly="${tenant.id}" .label="${i18next.t("realm")}" .type="${InputType.TEXT}" min="1" required .value="${tenant.realm}" @or-input-changed="${(e: OrInputChangedEvent) => tenant.realm = e.detail.value}"></or-input>- <or-input ?readonly="${readonly}" .label="${i18next.t("enabled")}" .type="${InputType.SWITCH}" min="1" .value="${tenant.enabled}" @or-input-changed="${(e: OrInputChangedEvent) =>tenant.enabled = e.detail.value}}"></or-input>+ <or-mwc-input ?readonly="${tenant.id}" .label="${i18next.t("realm")}" .type="${InputType.TEXT}" min="1" required .value="${tenant.realm}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => tenant.realm = e.detail.value}"></or-mwc-input>+ <or-mwc-input ?readonly="${readonly}" .label="${i18next.t("enabled")}" .type="${InputType.SWITCH}" min="1" .value="${tenant.enabled}" @or-mwc-input-changed="${(e: OrInputChangedEvent) =>tenant.enabled = e.detail.value}}"></or-mwc-input></div><div class="column">- <or-input .label="${i18next.t("displayName")}" .type="${InputType.TEXT}" min="1" required .value="${tenant.displayName}" @or-input-changed="${(e: OrInputChangedEvent) => tenant.displayName = e.detail.value}"></or-input>+ <or-mwc-input .label="${i18next.t("displayName")}" .type="${InputType.TEXT}" min="1" required .value="${tenant.displayName}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => tenant.displayName = e.detail.value}"></or-mwc-input></div></div>@@ -380,12 +380,12 @@ class PageRealms<S extends AppStateKeyed> extends Page<S> {<div class="row" style="margin-bottom: 0;">${tenant.id && !readonly ? html`${tenant.realm !== "master" ? html`- <or-input hidden .label="${i18next.t("delete")}" .type="${InputType.BUTTON}" @click="${() => this._deleteTenant(tenant)}"></or-input>+ <or-mwc-input hidden .label="${i18next.t("delete")}" .type="${InputType.BUTTON}" @click="${() => this._deleteTenant(tenant)}"></or-mwc-input>` : ``}- <or-input style="margin-left: auto;" .label="${i18next.t("save")}" .type="${InputType.BUTTON}" @click="${() => this._updateTenant(tenant)}"></or-input>+ <or-mwc-input style="margin-left: auto;" .label="${i18next.t("save")}" .type="${InputType.BUTTON}" @click="${() => this._updateTenant(tenant)}"></or-mwc-input>` : html`- <or-input .label="${i18next.t("cancel")}" .type="${InputType.BUTTON}" @click="${() => {this._tenants.splice(-1,1); this._tenants = [...this._tenants]}}"></or-input>- <or-input style="margin-left: auto;" .label="${i18next.t("create")}" .type="${InputType.BUTTON}" @click="${() => this._createTenant(tenant)}"></or-input>+ <or-mwc-input .label="${i18next.t("cancel")}" .type="${InputType.BUTTON}" @click="${() => {this._tenants.splice(-1,1); this._tenants = [...this._tenants]}}"></or-mwc-input>+ <or-mwc-input style="margin-left: auto;" .label="${i18next.t("create")}" .type="${InputType.BUTTON}" @click="${() => this._createTenant(tenant)}"></or-mwc-input>`}</div></div>diff --git a/ui/app/manager/src/pages/page-roles.ts b/ui/app/manager/src/pages/page-roles.tsindex e9894898d..c741c7ee5 100644--- a/ui/app/manager/src/pages/page-roles.ts+++ b/ui/app/manager/src/pages/page-roles.ts@@ -16,8 +16,8 @@ import {AppStateKeyed} from "@openremote/or-app";import { ClientRole, Role } from "@openremote/model";import { i18next } from "@openremote/or-translate";import { OrIcon } from "@openremote/or-icon";-import { InputType, OrInputChangedEvent } from "@openremote/or-input";-import {showOkCancelDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";+import { InputType, OrInputChangedEvent } from "@openremote/or-mwc-components/or-mwc-input";+import {showOkCancelDialog} from "@openremote/or-mwc-components/or-mwc-dialog";const tableStyle = require("@material/data-table/dist/mdc.data-table.css");@@ -114,7 +114,7 @@ class PageRoles<S extends AppStateKeyed> extends Page<S> {padding-left: 16px;}- or-input {+ or-mwc-input {margin-bottom: 10px;margin-right: 16px;}@@ -382,10 +382,10 @@ class PageRoles<S extends AppStateKeyed> extends Page<S> {<div class="row"><div class="column">- <or-input .label="${i18next.t("user_role")}" .type="${InputType.TEXT}" min="1" required .value="${role.name}" @or-input-changed="${(e: OrInputChangedEvent) => role.name = e.detail.value}"></or-input>+ <or-mwc-input .label="${i18next.t("user_role")}" .type="${InputType.TEXT}" min="1" required .value="${role.name}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => role.name = e.detail.value}"></or-mwc-input></div><div class="column">- <or-input .label="${i18next.t("description")}" .type="${InputType.TEXT}" min="1" required .value="${role.description}" @or-input-changed="${(e: OrInputChangedEvent) => role.description = e.detail.value}"></or-input>+ <or-mwc-input .label="${i18next.t("description")}" .type="${InputType.TEXT}" min="1" required .value="${role.description}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => role.description = e.detail.value}"></or-mwc-input></div></div>@@ -395,7 +395,7 @@ class PageRoles<S extends AppStateKeyed> extends Page<S> {${readRoles.map(r => {return html`- <or-input ?readonly="${readonly}" .label="${r.name.split(":")[1]}: ${r.description}" .type="${InputType.CHECKBOX}" .value="${role.compositeRoleIds && role.compositeRoleIds.find(id => id === r.id)}" @or-input-changed="${(e: OrInputChangedEvent) => this.addRemoveRole(e, r, index) }"></or-input>+ <or-mwc-input ?readonly="${readonly}" .label="${r.name.split(":")[1]}: ${r.description}" .type="${InputType.CHECKBOX}" .value="${role.compositeRoleIds && role.compositeRoleIds.find(id => id === r.id)}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.addRemoveRole(e, r, index) }"></or-mwc-input>`})}@@ -405,7 +405,7 @@ class PageRoles<S extends AppStateKeyed> extends Page<S> {<strong class="column-title">${i18next.t("writePermissions")}</strong>${writeRoles.map(r => {return html`- <or-input ?readonly="${readonly}" .label="${r.name.split(":")[1]}: ${r.description}" .type="${InputType.CHECKBOX}" .value="${role.compositeRoleIds && role.compositeRoleIds.find(id => id === r.id)}" @or-input-changed="${(e: OrInputChangedEvent) => this.addRemoveRole(e, r, index) }"></or-input>+ <or-mwc-input ?readonly="${readonly}" .label="${r.name.split(":")[1]}: ${r.description}" .type="${InputType.CHECKBOX}" .value="${role.compositeRoleIds && role.compositeRoleIds.find(id => id === r.id)}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.addRemoveRole(e, r, index) }"></or-mwc-input>`})}</div>@@ -414,7 +414,7 @@ class PageRoles<S extends AppStateKeyed> extends Page<S> {<div class="column">${otherRoles.map(r => {return html`- <or-input ?readonly="${readonly}" .label="${r.name.split(":")[1]}: ${r.description}" .type="${InputType.CHECKBOX}" .value="${role.compositeRoleIds && role.compositeRoleIds.find(id => id === r.id)}" @or-input-changed="${(e: OrInputChangedEvent) => this.addRemoveRole(e, r, index) }"></or-input>+ <or-mwc-input ?readonly="${readonly}" .label="${r.name.split(":")[1]}: ${r.description}" .type="${InputType.CHECKBOX}" .value="${role.compositeRoleIds && role.compositeRoleIds.find(id => id === r.id)}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.addRemoveRole(e, r, index) }"></or-mwc-input>`})}</div>@@ -422,11 +422,11 @@ class PageRoles<S extends AppStateKeyed> extends Page<S> {<div class="row" style="margin-bottom: 0;">${role.id && !readonly ? html`- <or-input .label="${i18next.t("delete")}" .type="${InputType.BUTTON}" @click="${() => this._deleteRole(role)}"></or-input>- <or-input ?disabled="${this._compositeRoles.some(role => role.compositeRoleIds.length === 0)}" style="margin-left: auto;" .label="${i18next.t("save")}" .type="${InputType.BUTTON}" @click="${() => this._updateRoles()}"></or-input>+ <or-mwc-input .label="${i18next.t("delete")}" .type="${InputType.BUTTON}" @click="${() => this._deleteRole(role)}"></or-mwc-input>+ <or-mwc-input ?disabled="${this._compositeRoles.some(role => role.compositeRoleIds.length === 0)}" style="margin-left: auto;" .label="${i18next.t("save")}" .type="${InputType.BUTTON}" @click="${() => this._updateRoles()}"></or-mwc-input>` : html`- <or-input .label="${i18next.t("cancel")}" .type="${InputType.BUTTON}" @click="${() => {this._compositeRoles.splice(-1,1); this._compositeRoles = [...this._compositeRoles]}}"></or-input>- <or-input ?disabled="${this._compositeRoles.some(role => role.compositeRoleIds.length === 0)}" style="margin-left: auto;" .label="${i18next.t("create")}" .type="${InputType.BUTTON}" @click="${() => this._updateRoles()}"></or-input>+ <or-mwc-input .label="${i18next.t("cancel")}" .type="${InputType.BUTTON}" @click="${() => {this._compositeRoles.splice(-1,1); this._compositeRoles = [...this._compositeRoles]}}"></or-mwc-input>+ <or-mwc-input ?disabled="${this._compositeRoles.some(role => role.compositeRoleIds.length === 0)}" style="margin-left: auto;" .label="${i18next.t("create")}" .type="${InputType.BUTTON}" @click="${() => this._updateRoles()}"></or-mwc-input>`}</div></div>diff --git a/ui/app/manager/src/pages/page-users.ts b/ui/app/manager/src/pages/page-users.tsindex 3ee1c2cff..f7a1ab385 100644--- a/ui/app/manager/src/pages/page-users.ts+++ b/ui/app/manager/src/pages/page-users.ts@@ -17,8 +17,8 @@ import {AppStateKeyed} from "@openremote/or-app";import { ClientRole, Role, User } from "@openremote/model";import { i18next } from "@openremote/or-translate";import { OrIcon } from "@openremote/or-icon";-import { InputType, OrInput, OrInputChangedEvent } from "@openremote/or-input";-import {showOkCancelDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";+import { InputType, OrInput, OrInputChangedEvent } from "@openremote/or-mwc-components/or-mwc-input";+import {showOkCancelDialog} from "@openremote/or-mwc-components/or-mwc-dialog";const tableStyle = require("@material/data-table/dist/mdc.data-table.css");@@ -107,7 +107,7 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {padding-left: 16px;}- or-input {+ or-mwc-input {margin-bottom: 20px;margin-right: 16px;}@@ -418,34 +418,34 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {<div class="meta-item-container"><div class="row"><div class="column">- <or-input ?readonly="${readonly}" .label="${i18next.t("username")}" .type="${InputType.TEXT}" min="1" required .value="${user.username}" @or-input-changed="${(e: OrInputChangedEvent) => user.username = e.detail.value}"></or-input>- <or-input ?readonly="${readonly}" .label="${i18next.t("email")}" .type="${InputType.EMAIL}" min="1" .value="${user.email}" @or-input-changed="${(e: OrInputChangedEvent) => user.email = e.detail.value}"></or-input>- <or-input ?readonly="${readonly}" .label="${i18next.t("firstName")}" .type="${InputType.TEXT}" min="1" .value="${user.firstName}" @or-input-changed="${(e: OrInputChangedEvent) => user.firstName = e.detail.value}"></or-input>- <or-input ?readonly="${readonly}" .label="${i18next.t("surname")}" .type="${InputType.TEXT}" min="1" .value="${user.lastName}" @or-input-changed="${(e: OrInputChangedEvent) => user.lastName = e.detail.value}"></or-input>+ <or-mwc-input ?readonly="${readonly}" .label="${i18next.t("username")}" .type="${InputType.TEXT}" min="1" required .value="${user.username}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => user.username = e.detail.value}"></or-mwc-input>+ <or-mwc-input ?readonly="${readonly}" .label="${i18next.t("email")}" .type="${InputType.EMAIL}" min="1" .value="${user.email}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => user.email = e.detail.value}"></or-mwc-input>+ <or-mwc-input ?readonly="${readonly}" .label="${i18next.t("firstName")}" .type="${InputType.TEXT}" min="1" .value="${user.firstName}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => user.firstName = e.detail.value}"></or-mwc-input>+ <or-mwc-input ?readonly="${readonly}" .label="${i18next.t("surname")}" .type="${InputType.TEXT}" min="1" .value="${user.lastName}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => user.lastName = e.detail.value}"></or-mwc-input></div><div class="column">${user.id && this._userRoleMapper[user.id] ? html`- <or-input ?readonly="${readonly}" ?disabled="${isSameUser}" .value="${userRole ? ifDefined(userRole.id) : ifDefined(null)}" .type="${InputType.SELECT}" .options="${selectOptions}" .label="${i18next.t("role")}" @or-input-changed="${(e: OrInputChangedEvent) => this._userRoleMapper[user.id] = e.detail.value}"></or-input>+ <or-mwc-input ?readonly="${readonly}" ?disabled="${isSameUser}" .value="${userRole ? ifDefined(userRole.id) : ifDefined(null)}" .type="${InputType.SELECT}" .options="${selectOptions}" .label="${i18next.t("role")}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._userRoleMapper[user.id] = e.detail.value}"></or-mwc-input>` : html`- <or-input ?readonly="${readonly}" ?disabled="${isSameUser}" .type="${InputType.SELECT}" .options="${selectOptions}" .label="${i18next.t("role")}" @or-input-changed="${(e: OrInputChangedEvent) => this._userRoleMapper["newUser"] = e.detail.value}"></or-input>+ <or-mwc-input ?readonly="${readonly}" ?disabled="${isSameUser}" .type="${InputType.SELECT}" .options="${selectOptions}" .label="${i18next.t("role")}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._userRoleMapper["newUser"] = e.detail.value}"></or-mwc-input>`}- <or-input id="password-${index}" ?readonly="${readonly}" .label="${i18next.t("password")}" .type="${InputType.PASSWORD}" min="1" @or-input-changed="${(e: OrInputChangedEvent) => { this.checkPassword(index) }}"></or-input>- <or-input id="repeatPassword-${index}" helperPersistent ?readonly="${readonly}" .label="${i18next.t("repeatPassword")}" .type="${InputType.PASSWORD}" min="1" @or-input-changed="${(e: OrInputChangedEvent) => { this.checkPassword(index) }}"></or-input>- <or-input ?readonly="${readonly}" .label="${i18next.t("enabled")}" .type="${InputType.SWITCH}" min="1" .value="${user.enabled}" @or-input-changed="${(e: OrInputChangedEvent) => user.enabled = e.detail.value}" style="height: 56px;"></or-input>+ <or-mwc-input id="password-${index}" ?readonly="${readonly}" .label="${i18next.t("password")}" .type="${InputType.PASSWORD}" min="1" @or-mwc-input-changed="${(e: OrInputChangedEvent) => { this.checkPassword(index) }}"></or-mwc-input>+ <or-mwc-input id="repeatPassword-${index}" helperPersistent ?readonly="${readonly}" .label="${i18next.t("repeatPassword")}" .type="${InputType.PASSWORD}" min="1" @or-mwc-input-changed="${(e: OrInputChangedEvent) => { this.checkPassword(index) }}"></or-mwc-input>+ <or-mwc-input ?readonly="${readonly}" .label="${i18next.t("enabled")}" .type="${InputType.SWITCH}" min="1" .value="${user.enabled}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => user.enabled = e.detail.value}" style="height: 56px;"></or-mwc-input></div></div><div class="row" style="margin-bottom: 0;">${user.id && !readonly ? html`${!isSameUser ? html`- <or-input .label="${i18next.t("delete")}" .type="${InputType.BUTTON}" @click="${() => this._deleteUser(user)}"></or-input>+ <or-mwc-input .label="${i18next.t("delete")}" .type="${InputType.BUTTON}" @click="${() => this._deleteUser(user)}"></or-mwc-input>` : ``}- <or-input style="margin-left: auto;" .label="${i18next.t("save")}" .type="${InputType.BUTTON}" @click="${() => this._updateUser(user, index)}"></or-input>+ <or-mwc-input style="margin-left: auto;" .label="${i18next.t("save")}" .type="${InputType.BUTTON}" @click="${() => this._updateUser(user, index)}"></or-mwc-input>` : html`- <or-input .label="${i18next.t("cancel")}" .type="${InputType.BUTTON}" @click="${() => {this._users.splice(-1,1); this._users = [...this._users]}}"></or-input>- <or-input style="margin-left: auto;" .label="${i18next.t("create")}" .type="${InputType.BUTTON}" @click="${() => this._createUser(user, index)}"></or-input>+ <or-mwc-input .label="${i18next.t("cancel")}" .type="${InputType.BUTTON}" @click="${() => {this._users.splice(-1,1); this._users = [...this._users]}}"></or-mwc-input>+ <or-mwc-input style="margin-left: auto;" .label="${i18next.t("create")}" .type="${InputType.BUTTON}" @click="${() => this._createUser(user, index)}"></or-mwc-input>`}</div></div>diff --git a/ui/component/or-app/src/index.ts b/ui/component/or-app/src/index.tsindex 3cf9d0fa9..133acb770 100644--- a/ui/component/or-app/src/index.ts+++ b/ui/component/or-app/src/index.ts@@ -12,20 +12,20 @@ import {import {unsafeHTML} from "lit-html/directives/unsafe-html";import {AppConfig, RealmAppConfig, router} from "./types";import "@openremote/or-translate";-import "@openremote/or-mwc-components/dist/or-mwc-menu";-import "@openremote/or-mwc-components/dist/or-mwc-snackbar";+import "@openremote/or-mwc-components/or-mwc-menu";+import "@openremote/or-mwc-components/or-mwc-snackbar";import "./or-header";import "@openremote/or-icon";import {updateMetadata} from "pwa-helpers/metadata";import i18next from "i18next";import manager, {Auth, DefaultColor2, DefaultColor3, ManagerConfig, Util, BasicLoginResult, OREvent} from "@openremote/core";import {DEFAULT_LANGUAGES, HeaderConfig, HeaderItem, Languages} from "./or-header";-import {DialogConfig, OrMwcDialog, showErrorDialog, showDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";-import {OrMwcSnackbar} from "@openremote/or-mwc-components/dist/or-mwc-snackbar";+import {DialogConfig, OrMwcDialog, showErrorDialog, showDialog} from "@openremote/or-mwc-components/or-mwc-dialog";+import {OrMwcSnackbar} from "@openremote/or-mwc-components/or-mwc-snackbar";import {AnyAction, EnhancedStore, Unsubscribe} from "@reduxjs/toolkit";import {ThunkMiddleware} from "redux-thunk";import {AppStateKeyed, updatePage} from "./app";-import { InputType, OrInputChangedEvent } from "@openremote/or-input";+import { InputType, OrInputChangedEvent } from "@openremote/or-mwc-components/or-mwc-input";const DefaultLogo = require("../images/logo.png");const DefaultMobileLogo = require("../images/logo-mobile.png");@@ -248,7 +248,7 @@ export class OrApp<S extends AppStateKeyed> extends LitElement {height: 24px;}- #login_wrapper > or-input {+ #login_wrapper > or-mwc-input {margin: 10px 0;width: 100%;}@@ -259,8 +259,8 @@ export class OrApp<S extends AppStateKeyed> extends LitElement {title: html`<img id="login-logo" src="${this._config.logoMobile || this._config.logo}" /></or-icon><or-translate value="login"></or-translate>`,content: html`<div id="login_wrapper">- <or-input .label="${i18next.t("user")}" .type="${InputType.TEXT}" min="1" required .value="${username}" @or-input-changed="${(e: OrInputChangedEvent) => u = e.detail.value}"></or-input>- <or-input .label="${i18next.t("password")}" .type="${InputType.PASSWORD}" min="1" required .value="${password}" @or-input-changed="${(e: OrInputChangedEvent) => p = e.detail.value}"></or-input>+ <or-mwc-input .label="${i18next.t("user")}" .type="${InputType.TEXT}" min="1" required .value="${username}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => u = e.detail.value}"></or-mwc-input>+ <or-mwc-input .label="${i18next.t("password")}" .type="${InputType.PASSWORD}" min="1" required .value="${password}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => p = e.detail.value}"></or-mwc-input></div>`,actions: [@@ -274,7 +274,7 @@ export class OrApp<S extends AppStateKeyed> extends LitElement {password: p!});},- content: html`<or-input .type=${InputType.BUTTON} .label="${i18next.t("submit")}" raised></or-input>`+ content: html`<or-mwc-input .type=${InputType.BUTTON} .label="${i18next.t("submit")}" raised></or-mwc-input>`}]}, document.body); // Attach to document as or-app isn't visible until initialiseddiff --git a/ui/component/or-app/src/or-header.ts b/ui/component/or-app/src/or-header.tsindex 479f3e1ef..69a81005e 100644--- a/ui/component/or-app/src/or-header.ts+++ b/ui/component/or-app/src/or-header.ts@@ -10,9 +10,9 @@ import manager, {DefaultColor5,DefaultHeaderHeight} from "@openremote/core";-import "@openremote/or-mwc-components/dist/or-mwc-dialog";+import "@openremote/or-mwc-components/or-mwc-dialog";import "@openremote/or-icon";-import {getContentWithMenuTemplate, MenuItem} from "@openremote/or-mwc-components/dist/or-mwc-menu";+import {getContentWithMenuTemplate, MenuItem} from "@openremote/or-mwc-components/or-mwc-menu";import {Tenant} from "@openremote/model";import {router} from "./index";diff --git a/ui/component/or-app/tsconfig.json b/ui/component/or-app/tsconfig.jsonindex 8bc2d7c75..9c4bcfeeb 100644--- a/ui/component/or-app/tsconfig.json+++ b/ui/component/or-app/tsconfig.json@@ -14,7 +14,6 @@{ "path": "../../component/or-mwc-components" },{ "path": "../../component/or-icon" },{ "path": "../../component/or-map" },- { "path": "../../component/or-input" },{ "path": "../../component/or-attribute-input" },{ "path": "../../component/or-asset-tree" },{ "path": "../../component/or-asset-viewer" },diff --git a/ui/component/or-asset-tree/src/index.ts b/ui/component/or-asset-tree/src/index.tsindex 648ffc7be..0125bee4e 100644--- a/ui/component/or-asset-tree/src/index.ts+++ b/ui/component/or-asset-tree/src/index.ts@@ -1,5 +1,5 @@import {customElement, html, LitElement, property, PropertyValues, TemplateResult} from "lit-element";-import "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";import "@openremote/or-icon";import {Asset,@@ -18,21 +18,21 @@ import {import "@openremote/or-translate";import {style} from "./style";import manager, {AssetModelUtil, EventCallback, OREvent, subscribe, Util} from "@openremote/core";-import {InputType, OrInput} from "@openremote/or-input";+import {InputType, OrInput} from "@openremote/or-mwc-components/or-mwc-input";import Qs from "qs";import {getAssetDescriptorIconTemplate} from "@openremote/or-icon";-import "@openremote/or-mwc-components/dist/or-mwc-menu";-import {getContentWithMenuTemplate, MenuItem} from "@openremote/or-mwc-components/dist/or-mwc-menu";-import "@openremote/or-mwc-components/dist/or-mwc-list";+import "@openremote/or-mwc-components/or-mwc-menu";+import {getContentWithMenuTemplate, MenuItem} from "@openremote/or-mwc-components/or-mwc-menu";+import "@openremote/or-mwc-components/or-mwc-list";import {i18next} from "@openremote/or-translate";-import "@openremote/or-mwc-components/dist/or-mwc-dialog";+import "@openremote/or-mwc-components/or-mwc-dialog";import {OrMwcDialog,showDialog,showErrorDialog,showOkCancelDialog-} from "@openremote/or-mwc-components/dist/or-mwc-dialog";+} from "@openremote/or-mwc-components/or-mwc-dialog";import {OrAddAssetDialog, OrAddChangedEvent} from "./or-add-asset-dialog";import "./or-add-asset-dialog";import { AgentDescriptor } from "@openremote/model";@@ -306,13 +306,13 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {</div><div id="header-btns">- <or-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length !== 1}" type="${InputType.BUTTON}" icon="content-copy" @click="${() => this._onCopyClicked()}"></or-input>- <or-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length === 0 || this.selectedNodes.some((node) => this.isAncestorSelected(node))}" type="${InputType.BUTTON}" icon="delete" @click="${() => this._onDeleteClicked()}"></or-input>- <or-input ?hidden="${this._isReadonly() || !this._canAdd()}" type="${InputType.BUTTON}" icon="plus" @click="${() => this._onAddClicked()}"></or-input>- <or-input hidden type="${InputType.BUTTON}" icon="magnify" @click="${() => this._onSearchClicked()}"></or-input>+ <or-mwc-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length !== 1}" type="${InputType.BUTTON}" icon="content-copy" @click="${() => this._onCopyClicked()}"></or-mwc-input>+ <or-mwc-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length === 0 || this.selectedNodes.some((node) => this.isAncestorSelected(node))}" type="${InputType.BUTTON}" icon="delete" @click="${() => this._onDeleteClicked()}"></or-mwc-input>+ <or-mwc-input ?hidden="${this._isReadonly() || !this._canAdd()}" type="${InputType.BUTTON}" icon="plus" @click="${() => this._onAddClicked()}"></or-mwc-input>+ <or-mwc-input hidden type="${InputType.BUTTON}" icon="magnify" @click="${() => this._onSearchClicked()}"></or-mwc-input>${getContentWithMenuTemplate(- html`<or-input type="${InputType.BUTTON}" icon="sort-variant" ?hidden="${!this.showSortBtn}"></or-input>`,+ html`<or-mwc-input type="${InputType.BUTTON}" icon="sort-variant" ?hidden="${!this.showSortBtn}"></or-mwc-input>`,["name", "type", "createdOn", "status"].map((sort) => { return {value: sort, text: i18next.t(sort)} as MenuItem; }),this.sortBy,(v) => this._onSortClicked(v as string))}@@ -537,7 +537,7 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {},{actionName: "add",- content: html`<or-input id="add-btn" class="button" .type="${InputType.BUTTON}" label="${i18next.t("add")}" disabled></or-input>`,+ content: html`<or-mwc-input id="add-btn" class="button" .type="${InputType.BUTTON}" label="${i18next.t("add")}" disabled></or-mwc-input>`,action: () => {const addAssetDialog = dialog.shadowRoot!.getElementById("add-panel") as OrAddAssetDialog;diff --git a/ui/component/or-asset-tree/src/or-add-asset-dialog.ts b/ui/component/or-asset-tree/src/or-add-asset-dialog.tsindex c98ab9610..b87fb38e8 100644--- a/ui/component/or-asset-tree/src/or-add-asset-dialog.ts+++ b/ui/component/or-asset-tree/src/or-add-asset-dialog.ts@@ -1,6 +1,6 @@import {css, customElement, html, LitElement, property, query, unsafeCSS} from "lit-element";import {AgentDescriptor, Asset, AssetDescriptor} from "@openremote/model";-import "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";import {AssetTreeConfig, OrAssetTreeSelectionEvent} from "./index";import {createListGroup,@@ -8,10 +8,10 @@ import {ListItem,OrMwcList,OrMwcListChangedEvent-} from "@openremote/or-mwc-components/dist/or-mwc-list";+} from "@openremote/or-mwc-components/or-mwc-list";import {i18next} from "@openremote/or-translate";import {AssetModelUtil, DefaultColor2, DefaultColor5, Util} from "@openremote/core";-import {InputType, OrInput, OrInputChangedEvent} from "@openremote/or-input";+import {InputType, OrInput, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";export type OrAddAssetDetail = {name: string | undefined;@@ -168,10 +168,10 @@ export class OrAddAssetDialog extends LitElement {return html`<div class="col"><div id="name-wrapper">- <or-input id="name-input" .type="${InputType.TEXT}" min="1" max="1023" comfortable required outlined .label="${i18next.t("name")}" .value="${this.name}" @or-input-changed="${(e: OrInputChangedEvent) => this.onNameChanged(e.detail.value)}"></or-input>- <or-input id="parent" .type="${InputType.TEXT}" comfortable readonly outlined .label="${i18next.t("parent")}" .value="${parentStr}" @click="${() => this._onToggleParentAssetSelector()}"></or-input>- <or-input id="toggle-parent-selector" icon="pencil" type="${InputType.BUTTON}" @click="${() => this._onToggleParentAssetSelector()}"></or-input>- <or-input id="remove-parent" ?disabled="${!this.parent}" type="${InputType.BUTTON}" icon="close" @click="${() => this._onDeselectClicked()}"></or-input>+ <or-mwc-input id="name-input" .type="${InputType.TEXT}" min="1" max="1023" comfortable required outlined .label="${i18next.t("name")}" .value="${this.name}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.onNameChanged(e.detail.value)}"></or-mwc-input>+ <or-mwc-input id="parent" .type="${InputType.TEXT}" comfortable readonly outlined .label="${i18next.t("parent")}" .value="${parentStr}" @click="${() => this._onToggleParentAssetSelector()}"></or-mwc-input>+ <or-mwc-input id="toggle-parent-selector" icon="pencil" type="${InputType.BUTTON}" @click="${() => this._onToggleParentAssetSelector()}"></or-mwc-input>+ <or-mwc-input id="remove-parent" ?disabled="${!this.parent}" type="${InputType.BUTTON}" icon="close" @click="${() => this._onDeselectClicked()}"></or-mwc-input></div><form id="mdc-dialog-form-add" class="row"><div id="type-list" class="col">diff --git a/ui/component/or-asset-tree/tsconfig.json b/ui/component/or-asset-tree/tsconfig.jsonindex 5e0bb5d4e..3fea7ad63 100644--- a/ui/component/or-asset-tree/tsconfig.json+++ b/ui/component/or-asset-tree/tsconfig.json@@ -14,7 +14,6 @@{ "path": "../model" },{ "path": "../or-mwc-components" },{ "path": "../or-translate" },- { "path": "../or-input" },{ "path": "../or-icon" }]-}\ No newline at end of file+}diff --git a/ui/component/or-asset-viewer/package.json b/ui/component/or-asset-viewer/package.jsonindex 134fb825c..024941aa1 100644--- a/ui/component/or-asset-viewer/package.json+++ b/ui/component/or-asset-viewer/package.json@@ -19,7 +19,7 @@"@openremote/or-attribute-input": "^1.0.4","@openremote/or-chart": "^1.0.4","@openremote/or-icon": "^1.0.3",- "@openremote/or-input": "^1.0.4",+ "@openremote/or-mwc-components/or-mwc-input": "^1.0.4","@openremote/or-mwc-components": "^1.0.3","@openremote/or-panel": "^1.0.3","@openremote/or-survey": "^1.0.3",diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.tsindex e62475dbb..78fcfc084 100644--- a/ui/component/or-asset-viewer/src/index.ts+++ b/ui/component/or-asset-viewer/src/index.ts@@ -3,7 +3,7 @@ declare function require(name: string): any;import {customElement, html, LitElement, property, PropertyValues, query, TemplateResult, unsafeCSS} from "lit-element";import "@openremote/or-icon";-import "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";import "@openremote/or-attribute-input";import "@openremote/or-attribute-history";import "@openremote/or-chart";@@ -11,11 +11,11 @@ import "@openremote/or-survey";import "@openremote/or-survey-results";import "@openremote/or-table";import "@openremote/or-panel";-import "@openremote/or-mwc-components/dist/or-mwc-dialog";-import {showErrorDialog, showOkCancelDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";-import "@openremote/or-mwc-components/dist/or-mwc-list";+import "@openremote/or-mwc-components/or-mwc-dialog";+import {showOkCancelDialog} from "@openremote/or-mwc-components/or-mwc-dialog";+import "@openremote/or-mwc-components/or-mwc-list";import {OrTranslate, translate} from "@openremote/or-translate";-import {InputType, OrInput, OrInputChangedEvent} from "@openremote/or-input";+import {InputType, OrInput, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import manager, {AssetModelUtil, subscribe, Util} from "@openremote/core";import {OrTable} from "@openremote/or-table";import {OrChartConfig, OrChartEvent} from "@openremote/or-chart";@@ -39,8 +39,8 @@ import {GenericAxiosResponse} from "axios";import {OrIcon} from "@openremote/or-icon";import "./or-edit-asset-panel";import {OrEditAssetModifiedEvent} from "./or-edit-asset-panel";-import "@openremote/or-mwc-components/dist/or-mwc-snackbar";-import {showSnackbar} from "@openremote/or-mwc-components/dist/or-mwc-snackbar";+import "@openremote/or-mwc-components/or-mwc-snackbar";+import {showSnackbar} from "@openremote/or-mwc-components/or-mwc-snackbar";export interface PanelConfig {type?: "info" | "history" | "group" | "survey" | "survey-results";@@ -436,7 +436,7 @@ export function getPanelContent(panelName: string, asset: Asset, attributes: { [}</style><div id="history-controls">- <or-input id="history-attribute-picker" .checkAssetWrite="${false}" .value="${historyAttrs[0].name}" .label="${i18next.t("attribute")}" @or-input-changed="${(evt: OrInputChangedEvent) => attributeChanged(evt.detail.value)}" .type="${InputType.SELECT}" .options="${options}"></or-input>+ <or-mwc-input id="history-attribute-picker" .checkAssetWrite="${false}" .value="${historyAttrs[0].name}" .label="${i18next.t("attribute")}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => attributeChanged(evt.detail.value)}" .type="${InputType.SELECT}" .options="${options}"></or-mwc-input></div><or-attribute-history id="attribute-history" .config="${viewerConfig.historyConfig}" .assetType="${asset.type}" .assetId="${asset.id}"></or-attribute-history>`;@@ -497,8 +497,8 @@ export function getPanelContent(panelName: string, asset: Asset, attributes: { [<div style="display: grid">${availableAttributes.sort().map((attribute) =>html`<div style="grid-column: 1 / -1;">- <or-input .type="${InputType.CHECKBOX}" .label="${i18next.t(attribute)}" .value="${!!selectedAttributes.find((selected) => selected === attribute)}"- @or-input-changed="${(evt: OrInputChangedEvent) => evt.detail.value ? newlySelectedAttributes.push(attribute) : newlySelectedAttributes.splice(newlySelectedAttributes.findIndex((s) => s === attribute), 1)}"></or-input>+ <or-mwc-input .type="${InputType.CHECKBOX}" .label="${i18next.t(attribute)}" .value="${!!selectedAttributes.find((selected) => selected === attribute)}"+ @or-mwc-input-changed="${(evt: OrInputChangedEvent) => evt.detail.value ? newlySelectedAttributes.push(attribute) : newlySelectedAttributes.splice(newlySelectedAttributes.findIndex((s) => s === attribute), 1)}"></or-mwc-input></div>`)}</div>`@@ -681,7 +681,7 @@ export function getPropertyTemplate(asset: Asset, property: string, hostElement:break;}- return html`<or-input id="property-${property}" .type="${type}" dense .value="${value}" .readonly="${itemConfig.readonly !== undefined ? itemConfig.readonly : true}" .label="${itemConfig.label}"></or-input>`;+ return html`<or-mwc-input id="property-${property}" .type="${type}" dense .value="${value}" .readonly="${itemConfig.readonly !== undefined ? itemConfig.readonly : true}" .label="${itemConfig.label}"></or-mwc-input>`;}export function getField(name: string, itemConfig?: InfoPanelItemConfig, content?: TemplateResult): TemplateResult {@@ -975,17 +975,17 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem</a><div id="title"><or-icon title="${descriptor && descriptor.name ? descriptor.name : "unset"}" style="--or-icon-fill: ${descriptor && descriptor.colour ? "#" + descriptor.colour : "unset"}" icon="${descriptor && descriptor.icon ? descriptor.icon : AssetModelUtil.getAssetDescriptorIcon(WellknownAssets.THINGASSET)}"></or-icon>- ${editMode ? html`<or-input id="name-input" .type="${InputType.TEXT}" min="1" max="1023" comfortable required outlined .label="${i18next.t("name")}" .value="${this.asset.name}" @or-input-changed="${(e: OrInputChangedEvent) => {this.asset!.name = e.detail.value; this._onAssetModified();}}"></or-input>` : html`<span>${this.asset.name}</span>`}+ ${editMode ? html`<or-mwc-input id="name-input" .type="${InputType.TEXT}" min="1" max="1023" comfortable required outlined .label="${i18next.t("name")}" .value="${this.asset.name}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => {this.asset!.name = e.detail.value; this._onAssetModified();}}"></or-mwc-input>` : html`<span>${this.asset.name}</span>`}</div>${!this._isReadonly() ? html`<span id="edit-wrapper" class="mobileHidden"><or-translate value="editAsset"></or-translate>- <or-input id="edit-btn" .type="${InputType.SWITCH}" .value="${this.editMode}" @or-input-changed="${(ev: OrInputChangedEvent) => this._onEditToggleClicked(ev.detail.value)}"></or-input>+ <or-mwc-input id="edit-btn" .type="${InputType.SWITCH}" .value="${this.editMode}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this._onEditToggleClicked(ev.detail.value)}"></or-mwc-input></span>`: ``}<div id="right-wrapper" class="mobileHidden">${this.asset!.createdOn ? html`<or-translate id="created-time" value="createdOnWithDate" .options="${{ date: new Date(this.asset!.createdOn!) } as TOptions<InitOptions>}"></or-translate>` : ``}- ${editMode ? html`<or-input id="save-btn" .disabled="${!this.isModified()}" raised .type="${InputType.BUTTON}" .label="${i18next.t("save")}" @or-input-changed="${() => this._onSaveClicked()}"></or-input>` : ``}+ ${editMode ? html`<or-mwc-input id="save-btn" .disabled="${!this.isModified()}" raised .type="${InputType.BUTTON}" .label="${i18next.t("save")}" @or-mwc-input-changed="${() => this._onSaveClicked()}"></or-mwc-input>` : ``}</div></div>${content}diff --git a/ui/component/or-asset-viewer/src/or-add-attribute-panel.ts b/ui/component/or-asset-viewer/src/or-add-attribute-panel.tsindex 9b13b7d85..53cc7e6b2 100644--- a/ui/component/or-asset-viewer/src/or-add-attribute-panel.ts+++ b/ui/component/or-asset-viewer/src/or-add-attribute-panel.ts@@ -1,9 +1,9 @@import {customElement, html, LitElement, property, css} from "lit-element";-import {InputType, OrInput, OrInputChangedEvent} from "@openremote/or-input";+import {InputType, OrInput, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import i18next from "i18next";import {Asset, Attribute} from "@openremote/model";import {AssetModelUtil, Util} from "@openremote/core";-import "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";export class OrAddAttributePanelAttributeChangedEvent extends CustomEvent<Attribute<any>> {@@ -38,7 +38,7 @@ export class OrAddAttributePanel extends LitElement {padding: 20px;}- #attribute-creator > * or-input {+ #attribute-creator > * or-mwc-input {width: 300px;}@@ -72,13 +72,13 @@ export class OrAddAttributePanel extends LitElement {return html`<div id="attribute-creator"><div>- <or-input .type="${InputType.SELECT}" .options="${attributeTypes}" .label="${i18next.t("type")}" @or-input-changed="${(ev: OrInputChangedEvent) => this.onTypeChanged(ev.detail.value)}"></or-input>+ <or-mwc-input .type="${InputType.SELECT}" .options="${attributeTypes}" .label="${i18next.t("type")}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onTypeChanged(ev.detail.value)}"></or-mwc-input></div><div id="name-input" class="hidden">- <or-input .type="${InputType.TEXT}" .label="${i18next.t("name")}" pattern="\\w+" required @keyup="${(ev: KeyboardEvent) => this.onNameChanged((ev.target as OrInput).currentValue)}" @or-input-changed="${(ev: OrInputChangedEvent) => this.onNameChanged(ev.detail.value)}"></or-input>+ <or-mwc-input .type="${InputType.TEXT}" .label="${i18next.t("name")}" pattern="\\w+" required @keyup="${(ev: KeyboardEvent) => this.onNameChanged((ev.target as OrInput).currentValue)}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onNameChanged(ev.detail.value)}"></or-mwc-input></div><div id="type-input" class="hidden">- <or-input .type="${InputType.SELECT}" .options="${attributeValueTypes}" .label="${i18next.t("valueType")}" @or-input-changed="${(ev: OrInputChangedEvent) => this.onValueTypeChanged(ev.detail.value)}"></or-input>+ <or-mwc-input .type="${InputType.SELECT}" .options="${attributeValueTypes}" .label="${i18next.t("valueType")}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onValueTypeChanged(ev.detail.value)}"></or-mwc-input></div></div>`;diff --git a/ui/component/or-asset-viewer/src/or-edit-asset-panel.ts b/ui/component/or-asset-viewer/src/or-edit-asset-panel.tsindex 2e0272a40..91c0a4544 100644--- a/ui/component/or-asset-viewer/src/or-edit-asset-panel.ts+++ b/ui/component/or-asset-viewer/src/or-edit-asset-panel.ts@@ -1,12 +1,12 @@import {css, customElement, html, LitElement, property, TemplateResult, unsafeCSS} from "lit-element";-import {InputType, OrInput, OrInputChangedEvent, getValueHolderInputTemplateProvider, ValueInputProviderOptions, OrInputChangedEventDetail} from "@openremote/or-input";+import {InputType, OrInput, OrInputChangedEvent, getValueHolderInputTemplateProvider, ValueInputProviderOptions, OrInputChangedEventDetail} from "@openremote/or-mwc-components/or-mwc-input";import i18next from "i18next";import {Asset, Attribute, NameValueHolder} from "@openremote/model";import {AssetModelUtil, DefaultColor5, DefaultColor3, Util} from "@openremote/core";-import "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";import {OrIcon} from "@openremote/or-icon";-import {showDialog, OrMwcDialog, DialogAction} from "@openremote/or-mwc-components/dist/or-mwc-dialog";-import {ListItem, ListType, OrMwcList} from "@openremote/or-mwc-components/dist/or-mwc-list";+import {showDialog, OrMwcDialog, DialogAction} from "@openremote/or-mwc-components/or-mwc-dialog";+import {ListItem, ListType, OrMwcList} from "@openremote/or-mwc-components/or-mwc-list";import "./or-add-attribute-panel";import {getField, getPanel, getPropertyTemplate} from "./index";import {@@ -90,7 +90,7 @@ const style = css`max-height: 1000px;transition: max-height 1s ease-in;}- .meta-item-container or-input {+ .meta-item-container or-mwc-input {width: 100%;}.meta-item-wrapper {@@ -178,7 +178,7 @@ export class OrEditAssetPanel extends LitElement {const properties: TemplateResult[] = [getField("type", undefined, getPropertyTemplate(this.asset, "type", this, undefined, undefined, {readonly: true, label: i18next.t("assetType")})),getField("parent", undefined, this._getParentTemplate()),- html`<div @or-input-changed="${(ev: OrInputChangedEvent) => updatePublicRead(ev.detail.value as boolean)}">+ html`<div @or-mwc-input-changed="${(ev: OrInputChangedEvent) => updatePublicRead(ev.detail.value as boolean)}">${getField("accessPublicRead", undefined, getPropertyTemplate(this.asset, "accessPublicRead", this, undefined, undefined, {readonly: false, label: i18next.t("accessPublicRead")}))}</div>`];@@ -217,7 +217,7 @@ export class OrEditAssetPanel extends LitElement {<tr class="mdc-data-table__row"><td colspan="4"><div class="item-add-attribute">- <or-input .type="${InputType.BUTTON}" .label="${i18next.t("addAttribute")}" icon="plus" @click="${() => this._addAttribute()}"></or-input>+ <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("addAttribute")}" icon="plus" @click="${() => this._addAttribute()}"></or-mwc-input></div></td></tr>@@ -251,7 +251,7 @@ export class OrEditAssetPanel extends LitElement {<td class="padded-cell overflow-visible mdc-data-table__cell"><or-attribute-input compact .assetType="${assetType}" .label=${null} .readonly="${false}" .attribute="${attribute}" .assetId="${this.asset.id!}" disableWrite disableSubscribe disableButton @or-attribute-input-changed="${(e: OrAttributeInputChangedEvent) => this._onAttributeModified(attribute, e.detail.value)}"></or-attribute-input></td>- <td class="padded-cell mdc-data-table__cell actions-cell">${canDelete ? html`<or-input type="${InputType.BUTTON}" icon="delete" @click="${deleteAttribute}">` : ``}</td>+ <td class="padded-cell mdc-data-table__cell actions-cell">${canDelete ? html`<or-mwc-input type="${InputType.BUTTON}" icon="delete" @click="${deleteAttribute}">` : ``}</td></tr><tr class="attribute-meta-row"><td colspan="4">@@ -260,7 +260,7 @@ export class OrEditAssetPanel extends LitElement {${!attribute.meta ? `` : Object.entries(attribute.meta).sort(Util.sortByString(([name, value]) => name!)).map(([name, value]) => this._getMetaItemTemplate(attribute, Util.getMetaItemNameValueHolder(name, value)))}</div><div class="item-add">- <or-input .type="${InputType.BUTTON}" .label="${i18next.t("addMetaItems")}" icon="plus" @click="${() => this._addMetaItems(attribute)}"></or-input>+ <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("addMetaItems")}" icon="plus" @click="${() => this._addMetaItems(attribute)}"></or-mwc-input></div></div></td>@@ -363,7 +363,7 @@ export class OrEditAssetPanel extends LitElement {this.asset.attributes![attr.name!] = attr;this._onModified();},- content: html`<or-input id="add-btn" .type="${InputType.BUTTON}" disabled .label="${i18next.t("add")}"></or-input>`+ content: html`<or-mwc-input id="add-btn" .type="${InputType.BUTTON}" disabled .label="${i18next.t("add")}"></or-mwc-input>`}],dismissAction: null@@ -530,7 +530,7 @@ export class OrEditAssetPanel extends LitElement {return html`<div id="parent-edit-wrapper">${getPropertyTemplate(this.asset, "parentId", this, undefined, undefined, {readonly: false, label: i18next.t("parent")})}- <or-input id="change-parent-btn" type="${InputType.BUTTON}" raised .label="${i18next.t("edit")}" @or-input-changed="${openDialog}"></or-input>+ <or-mwc-input id="change-parent-btn" type="${InputType.BUTTON}" raised .label="${i18next.t("edit")}" @or-mwc-input-changed="${openDialog}"></or-mwc-input></div>`;}diff --git a/ui/component/or-attribute-card/package.json b/ui/component/or-attribute-card/package.jsonindex 615b942d6..fe828027a 100644--- a/ui/component/or-attribute-card/package.json+++ b/ui/component/or-attribute-card/package.json@@ -15,7 +15,7 @@"dependencies": {"@openremote/core": "^1.0.3","@openremote/or-chart": "^1.0.4",- "@openremote/or-input": "^1.0.4",+ "@openremote/or-mwc-components/or-mwc-input": "^1.0.4","lit-element": "^2.4.0","moment": "^2.24.0"},diff --git a/ui/component/or-attribute-card/src/index.ts b/ui/component/or-attribute-card/src/index.tsindex 06f551a91..f716757cd 100644--- a/ui/component/or-attribute-card/src/index.ts+++ b/ui/component/or-attribute-card/src/index.ts@@ -12,13 +12,13 @@ import {import {AssetModelUtil, DefaultColor3, DefaultColor4, manager, Util} from "@openremote/core";import Chart, {ChartTooltipCallback} from "chart.js";import {OrChartConfig} from "@openremote/or-chart";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import {getAssetDescriptorIconTemplate} from "@openremote/or-icon";-import "@openremote/or-mwc-components/dist/or-mwc-dialog";+import "@openremote/or-mwc-components/or-mwc-dialog";import moment from "moment";import {OrAssetTreeSelectionEvent} from "@openremote/or-asset-tree";-import {OrMwcDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";-import {getContentWithMenuTemplate} from "@openremote/or-mwc-components/dist/or-mwc-menu";+import {OrMwcDialog} from "@openremote/or-mwc-components/or-mwc-dialog";+import {getContentWithMenuTemplate} from "@openremote/or-mwc-components/or-mwc-menu";export type ContextMenuOptions = "editAttribute" | "editDelta" | "editCurrentValue";@@ -346,7 +346,7 @@ export class OrAttributeCard extends LitElement {this._dialog.dialogActions = [{actionName: "cancel",- content: html`<or-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-mwc-input>`,action: () => {// Nothing to do here}@@ -354,7 +354,7 @@ export class OrAttributeCard extends LitElement {{actionName: "yes",default: true,- content: html`<or-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("ok")}" data-mdc-dialog-action="yes"></or-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("ok")}" data-mdc-dialog-action="yes"></or-mwc-input>`,action: () => {this.delta = this.getFormattedDelta(this.getFirstKnownMeasurement(this.data), this.getLastKnownMeasurement(this.data));}@@ -362,7 +362,7 @@ export class OrAttributeCard extends LitElement {];this._dialog.dialogContent = html`- <or-input id="delta-mode-picker" value="${this.deltaFormat}" @or-input-changed="${(evt: OrInputChangedEvent) => {this.deltaFormat = evt.detail.value;this.saveSettings();}}" .type="${InputType.LIST}" .options="${options}"></or-input>+ <or-mwc-input id="delta-mode-picker" value="${this.deltaFormat}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => {this.deltaFormat = evt.detail.value;this.saveSettings();}}" .type="${InputType.LIST}" .options="${options}"></or-mwc-input>`;this._dialog.dismissAction = null;@@ -374,7 +374,7 @@ export class OrAttributeCard extends LitElement {this._dialog.dialogActions = [{actionName: "cancel",- content: html`<or-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-mwc-input>`,action: () => {// Nothing to do here}@@ -382,7 +382,7 @@ export class OrAttributeCard extends LitElement {{actionName: "yes",default: true,- content: html`<or-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("ok")}" data-mdc-dialog-action="yes"></or-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("ok")}" data-mdc-dialog-action="yes"></or-mwc-input>`,action: () => {const dialog: OrMwcDialog = this._dialog as OrMwcDialog;if (dialog.shadowRoot && dialog.shadowRoot.getElementById("current-value-decimals")) {@@ -399,7 +399,7 @@ export class OrAttributeCard extends LitElement {];this._dialog.dialogContent = html`- <or-input id="current-value-decimals" .label="${i18next.t("decimals")}" value="${this.mainValueDecimals}" .type="${InputType.TEXT}"></or-input>+ <or-mwc-input id="current-value-decimals" .label="${i18next.t("decimals")}" value="${this.mainValueDecimals}" .type="${InputType.TEXT}"></or-mwc-input>`;this._dialog.dismissAction = null;@@ -411,7 +411,7 @@ export class OrAttributeCard extends LitElement {this._dialog.dialogActions = [{actionName: "cancel",- content: html`<or-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-mwc-input>`,action: () => {// Nothing to do here}@@ -419,7 +419,7 @@ export class OrAttributeCard extends LitElement {{actionName: "yes",default: true,- content: html`<or-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("add")}" data-mdc-dialog-action="yes"></or-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("add")}" data-mdc-dialog-action="yes"></or-mwc-input>`,action: () => {const dialog: OrMwcDialog = this.shadowRoot!.getElementById("mdc-dialog") as OrMwcDialog;if (dialog.shadowRoot && dialog.shadowRoot.getElementById("attribute-picker")) {@@ -434,12 +434,12 @@ export class OrAttributeCard extends LitElement {<or-asset-tree id="chart-asset-tree" readonly.selectedIds="${this.asset ? [this.asset.id] : null}"></or-asset-tree>${this.asset && this.asset.attributes ? html`- <or-input id="attribute-picker"+ <or-mwc-input id="attribute-picker"style="display:flex;".label="${i18next.t("attribute")}".type="${InputType.LIST}".options="${this._getAttributeOptions()}"- .value="${this.attributeName}"></or-input>+ .value="${this.attributeName}"></or-mwc-input>` : ``}`;@@ -601,7 +601,7 @@ export class OrAttributeCard extends LitElement {<div class="panel panel-empty"><div class="panel-content-wrapper"><div class="panel-content">- <or-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("addAttribute")}" icon="plus" @click="${() => this._openDialog()}"></or-input>+ <or-mwc-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("addAttribute")}" icon="plus" @click="${() => this._openDialog()}"></or-mwc-input></div></div></div>@@ -615,7 +615,7 @@ export class OrAttributeCard extends LitElement {<div class="panel-content-wrapper"><div class="panel-content"><span>${i18next.t("couldNotRetrieveAttribute")}</span>- <or-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("addAttribute")}" icon="plus" @click="${() => this._openDialog()}"></or-input>+ <or-mwc-input class="button" .type="${InputType.BUTTON}" label="${i18next.t("addAttribute")}" icon="plus" @click="${() => this._openDialog()}"></or-mwc-input></div></div></div>@@ -629,7 +629,7 @@ export class OrAttributeCard extends LitElement {<div class="panel-title"><span class="panel-title-text">${this.asset ? (this.asset.name + " - " + i18next.t(this.attributeName)) : ""}</span>${getContentWithMenuTemplate(html`- <or-input icon="dots-vertical" type="button"></or-input>+ <or-mwc-input icon="dots-vertical" type="button"></or-mwc-input>`,[{@@ -664,7 +664,7 @@ export class OrAttributeCard extends LitElement {<div class="period-selector-wrapper">${getContentWithMenuTemplate(- html`<or-input class="period-selector" .type="${InputType.BUTTON}" .label="${i18next.t(this.period ? this.period : "-")}"></or-input>`,+ html`<or-mwc-input class="period-selector" .type="${InputType.BUTTON}" .label="${i18next.t(this.period ? this.period : "-")}"></or-mwc-input>`,[{value: "hour", text: "hour"}, {value: "day", text: "day"}, {value: "week", text: "week"}, {value: "month", text: "month"}, {value: "year", text: "year"}].map((option) => {option.text = i18next.t(option.value);diff --git a/ui/component/or-attribute-card/tsconfig.json b/ui/component/or-attribute-card/tsconfig.jsonindex 359d98d2d..f37e1a782 100644--- a/ui/component/or-attribute-card/tsconfig.json+++ b/ui/component/or-attribute-card/tsconfig.json@@ -11,6 +11,6 @@"references": [{ "path": "../core" },{ "path": "../or-chart" },- { "path": "../or-input" }+ { "path": "../or-mwc-components" }]-}\ No newline at end of file+}diff --git a/ui/component/or-attribute-history/README.md b/ui/component/or-attribute-history/README.mdindex e383fd8fe..9015feda8 100644--- a/ui/component/or-attribute-history/README.md+++ b/ui/component/or-attribute-history/README.md@@ -24,7 +24,7 @@ Internet Explorer 11 is also supported.[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+[npm-url]: https://npmjs.org/package/@openremote/or-attribute-history[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.svgdiff --git a/ui/component/or-attribute-history/package.json b/ui/component/or-attribute-history/package.jsonindex cd91a6e05..a5a3f29f1 100644--- a/ui/component/or-attribute-history/package.json+++ b/ui/component/or-attribute-history/package.json@@ -14,7 +14,7 @@"dependencies": {"@material/data-table": "^9.0.0","@openremote/core": "^1.0.3",- "@openremote/or-input": "^1.0.4",+ "@openremote/or-mwc-components/or-mwc-input": "^1.0.4","@openremote/or-panel": "^1.0.3","@openremote/or-translate": "^1.0.3","chart.js": "^2.8.0",diff --git a/ui/component/or-attribute-history/src/index.ts b/ui/component/or-attribute-history/src/index.tsindex 0fa033f78..27883961a 100644--- a/ui/component/or-attribute-history/src/index.ts+++ b/ui/component/or-attribute-history/src/index.ts@@ -16,11 +16,11 @@ import i18next from "i18next";import {translate} from "@openremote/or-translate";import {Attribute, AttributeRef, DatapointInterval, ValueDatapoint, ValueDescriptor} from "@openremote/model";import manager, {AssetModelUtil, DefaultColor2, DefaultColor3, DefaultColor4, DefaultColor5} from "@openremote/core";-import "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";import "@openremote/or-panel";import "@openremote/or-translate";import Chart, {ChartTooltipCallback} from "chart.js";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import {MDCDataTable} from "@material/data-table";import {JSONPath} from "jsonpath-plus";import moment from "moment";@@ -313,9 +313,9 @@ export class OrAttributeHistory extends translate(i18next)(LitElement) {return html`<div id="container"><div id="controls">- <or-input .type="${InputType.SELECT}" ?disabled="${disabled}" .label="${i18next.t("timeframe")}" @or-input-changed="${(evt: OrInputChangedEvent) => this.period = evt.detail.value}" .value="${this.period}" .options="${this._getPeriodOptions()}"></or-input>+ <or-mwc-input .type="${InputType.SELECT}" ?disabled="${disabled}" .label="${i18next.t("timeframe")}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this.period = evt.detail.value}" .value="${this.period}" .options="${this._getPeriodOptions()}"></or-mwc-input><div id="ending-controls">- <or-input id="ending-date" .type="${InputType.DATETIME}" ?disabled="${disabled}" label="${i18next.t("ending")}" .value="${this.fromTimestamp}" @or-input-changed="${(evt: OrInputChangedEvent) => this._updateTimestamp(moment(evt.detail.value as string).toDate())}"></or-input>+ <or-mwc-input id="ending-date" .type="${InputType.DATETIME}" ?disabled="${disabled}" label="${i18next.t("ending")}" .value="${this.fromTimestamp}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this._updateTimestamp(moment(evt.detail.value as string).toDate())}"></or-mwc-input><or-icon class="button button-icon" ?disabled="${disabled}" icon="chevron-left" @click="${() => this._updateTimestamp(this.fromTimestamp!, false, 0)}"></or-icon><or-icon class="button button-icon" ?disabled="${disabled}" icon="chevron-right" @click="${() => this._updateTimestamp(this.fromTimestamp!, true, 0)}"></or-icon><or-icon class="button button-icon" ?disabled="${disabled}" icon="chevron-double-right" @click="${() => this._updateTimestamp(new Date())}"></or-icon>diff --git a/ui/component/or-attribute-history/tsconfig.json b/ui/component/or-attribute-history/tsconfig.jsonindex 5e97588c3..ca0100bbe 100644--- a/ui/component/or-attribute-history/tsconfig.json+++ b/ui/component/or-attribute-history/tsconfig.json@@ -11,8 +11,8 @@"references": [{ "path": "../core" },{ "path": "../or-panel" },- { "path": "../or-input" },+ { "path": "../or-mwc-components" },{ "path": "../or-translate" }]-}\ No newline at end of file+}diff --git a/ui/component/or-attribute-input/README.md b/ui/component/or-attribute-input/README.mdindex 70db9a9a0..1d91bc623 100644--- a/ui/component/or-attribute-input/README.md+++ b/ui/component/or-attribute-input/README.md@@ -1,4 +1,4 @@-# @openremote/or-input \<or-input\>+# @openremote/or-attribute-input \<or-attribute-input\>[![NPM Version][npm-image]][npm-url][![Linux Build][travis-image]][travis-url][![Test Coverage][coveralls-image]][coveralls-url]@@ -7,8 +7,8 @@ Web Component for displaying an input control.## Install```bash-npm i @openremote/or-input-yarn add @openremote/or-input+npm i @openremote/or-attribute-input+yarn add @openremote/or-attribute-input```## Usage@@ -24,7 +24,7 @@ Internet Explorer 11 is also supported.[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+[npm-url]: https://npmjs.org/package/@openremote/or-attribute-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.svgdiff --git a/ui/component/or-attribute-input/package.json b/ui/component/or-attribute-input/package.jsonindex fcd09f183..85e2e9ba9 100644--- a/ui/component/or-attribute-input/package.json+++ b/ui/component/or-attribute-input/package.json@@ -13,7 +13,7 @@"license": "AGPL-3.0-or-later","dependencies": {"@openremote/core": "^1.0.3",- "@openremote/or-input": "^1.0.4",+ "@openremote/or-mwc-components/or-mwc-input": "^1.0.4","@openremote/or-map": "^1.0.4","@openremote/or-translate": "^1.0.3","lit-element": "^2.4.0"diff --git a/ui/component/or-attribute-input/src/index.ts b/ui/component/or-attribute-input/src/index.tsindex d34a42e8a..002d9547c 100644--- a/ui/component/or-attribute-input/src/index.ts+++ b/ui/component/or-attribute-input/src/index.ts@@ -22,8 +22,8 @@ import {WellknownValueTypes} from "@openremote/model";import manager, {AssetModelUtil, DefaultColor4, subscribe, Util} from "@openremote/core";-import "@openremote/or-input";-import {InputType, OrInput, OrInputChangedEvent, ValueInputProviderOptions, ValueInputProviderGenerator, getValueHolderInputTemplateProvider, ValueInputProvider, OrInputChangedEventDetail} from "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";+import {InputType, OrInput, OrInputChangedEvent, ValueInputProviderOptions, ValueInputProviderGenerator, getValueHolderInputTemplateProvider, ValueInputProvider, OrInputChangedEventDetail} from "@openremote/or-mwc-components/or-mwc-input";import "@openremote/or-map";import { geoJsonPointInputTemplateProvider } from "@openremote/or-map";@@ -69,12 +69,12 @@ export function getAttributeInputWrapper(content: TemplateResult, value: any, loif (buttonIcon) {content = html`${content}- <or-input id="send-btn" icon="${buttonIcon}" type="button" .disabled="${disabled || loading}" @or-input-changed="${(e: OrInputChangedEvent) => {+ <or-mwc-input id="send-btn" icon="${buttonIcon}" type="button" .disabled="${disabled || loading}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => {e.stopPropagation();if (sendValue) {sendValue();}- }}"></or-input>+ }}"></or-mwc-input>`;}@@ -115,7 +115,7 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitEdisplay: inline-block;}- #wrapper or-input, #wrapper or-map {+ #wrapper or-mwc-input, #wrapper or-map {width: 100%;}diff --git a/ui/component/or-attribute-input/tsconfig.json b/ui/component/or-attribute-input/tsconfig.jsonindex 0bc413e36..bcce51453 100644--- a/ui/component/or-attribute-input/tsconfig.json+++ b/ui/component/or-attribute-input/tsconfig.json@@ -13,6 +13,6 @@{ "path": "../core" },{ "path": "../or-translate" },{ "path": "../or-map" },- { "path": "../or-input" }+ { "path": "../or-mwc-components" }]}diff --git a/ui/component/or-chart/README.md b/ui/component/or-chart/README.mdindex 218c473c4..7668d1efc 100644--- a/ui/component/or-chart/README.md+++ b/ui/component/or-chart/README.md@@ -24,7 +24,7 @@ Internet Explorer 11 is also supported.[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+[npm-url]: https://npmjs.org/package/@openremote/or-chart[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.svgdiff --git a/ui/component/or-chart/package.json b/ui/component/or-chart/package.jsonindex a53546587..52ef6bd89 100644--- a/ui/component/or-chart/package.json+++ b/ui/component/or-chart/package.json@@ -17,7 +17,7 @@"@openremote/core": "^1.0.3","@openremote/or-asset-tree": "^1.0.4","@openremote/or-icon": "^1.0.3",- "@openremote/or-input": "^1.0.4",+ "@openremote/or-mwc-components/or-mwc-input": "^1.0.4","@openremote/or-mwc-components": "^1.0.3","@openremote/or-panel": "^1.0.3","@openremote/or-translate": "^1.0.3",diff --git a/ui/component/or-chart/src/index.ts b/ui/component/or-chart/src/index.tsindex fc1c9d665..eae7f0398 100644--- a/ui/component/or-chart/src/index.ts+++ b/ui/component/or-chart/src/index.ts@@ -21,16 +21,16 @@ import manager, {Util} from "@openremote/core";import "@openremote/or-asset-tree";-import "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";import "@openremote/or-panel";import {MDCDialog} from '@material/dialog';import "@openremote/or-translate";import Chart, {ChartDataSets, ChartOptions} from "chart.js";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import moment from "moment";import {OrAssetTreeSelectionEvent} from "@openremote/or-asset-tree";import {getAssetDescriptorIconTemplate} from "@openremote/or-icon";-import {getContentWithMenuTemplate} from "@openremote/or-mwc-components/dist/or-mwc-menu";+import {getContentWithMenuTemplate} from "@openremote/or-mwc-components/or-mwc-menu";import * as ChartAnnotation from "chartjs-plugin-annotation";export class OrChartEvent extends CustomEvent<OrChartEventDetail> {@@ -264,7 +264,7 @@ const style = css`flex: 1 1 0;}- .dialog-container > or-input{+ .dialog-container > or-mwc-input {background-color: var(--or-app-color2);border-left: 3px solid var(--or-app-color4);}@@ -442,15 +442,15 @@ export class OrChart extends translate(i18next)(LitElement) {<div id="controls"><div class="interval-controls" style="margin-right: 6px;">${getContentWithMenuTemplate(- html`<or-input .type="${InputType.BUTTON}" .label="${i18next.t("timeframe")}: ${i18next.t(this.period ? this.period : "-")}"></or-input>`,+ html`<or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("timeframe")}: ${i18next.t(this.period ? this.period : "-")}"></or-mwc-input>`,this._getPeriodOptions(),this.period,(value) => this.setPeriodOption(value))}${this.periodCompare ? html `- <or-input style="margin-left:auto;" .type="${InputType.BUTTON}" .label="${i18next.t("period")}" @click="${() => this.setPeriodCompare(false)}" icon="minus"></or-input>+ <or-mwc-input style="margin-left:auto;" .type="${InputType.BUTTON}" .label="${i18next.t("period")}" @click="${() => this.setPeriodCompare(false)}" icon="minus"></or-mwc-input>` : html`- <or-input style="margin-left:auto;" .type="${InputType.BUTTON}" .label="${i18next.t("period")}" @click="${() => this.setPeriodCompare(true)}" icon="plus"></or-input>+ <or-mwc-input style="margin-left:auto;" .type="${InputType.BUTTON}" .label="${i18next.t("period")}" @click="${() => this.setPeriodCompare(true)}" icon="plus"></or-mwc-input>`}</div>@@ -459,24 +459,24 @@ export class OrChart extends translate(i18next)(LitElement) {${this.periodCompare ? html `<span class="line-label solid"></span>`: ``}- <or-input id="ending-date"+ <or-mwc-input id="ending-date".checkAssetWrite="${false}".type="${endDateInputType}"?disabled="${disabled}".value="${this.timestamp}"- @or-input-changed="${(evt: OrInputChangedEvent) => this._updateTimestamp(moment(evt.detail.value as string).toDate())}"></or-input>+ @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this._updateTimestamp(moment(evt.detail.value as string).toDate())}"></or-mwc-input><or-icon class="button-icon" icon="chevron-left" @click="${() => this._updateTimestamp(this.timestamp!, false, undefined, 0)}"></or-icon><or-icon class="button-icon" icon="chevron-right" @click="${() =>this._updateTimestamp(this.timestamp!, true, undefined, 0)}"></or-icon></div>${this.periodCompare ? html `<div class="period-controls"><span class="line-label dashed"></span>- <or-input id="ending-date"+ <or-mwc-input id="ending-date".checkAssetWrite="${false}".type="${endDateInputType}"?disabled="${disabled}".value="${this.compareTimestamp}"- @or-input-changed="${(evt: OrInputChangedEvent) => this._updateTimestamp(moment(evt.detail.value as string).toDate(), undefined, true)}"></or-input>+ @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this._updateTimestamp(moment(evt.detail.value as string).toDate(), undefined, true)}"></or-mwc-input><or-icon class="button-icon" icon="chevron-left" @click="${() => this._updateTimestamp(this.compareTimestamp!, false, true, 0)}"></or-icon><or-icon class="button-icon" icon="chevron-right" @click="${() => this._updateTimestamp(this.compareTimestamp!, true, true, 0)}"></or-icon></div>@@ -501,7 +501,7 @@ export class OrChart extends translate(i18next)(LitElement) {`})}</div>- <or-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled}" label="${i18next.t("addAttribute")}" icon="plus" @click="${() => this._openDialog()}"></or-input>+ <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled}" label="${i18next.t("addAttribute")}" icon="plus" @click="${() => this._openDialog()}"></or-mwc-input></div></div>@@ -517,28 +517,28 @@ export class OrChart extends translate(i18next)(LitElement) {<div class="dialog-container mdc-dialog__content" id="my-dialog-content"><or-asset-tree id="chart-asset-tree" readonly .selectedIds="${this.activeAsset ? [this.activeAsset.id] : undefined}"></or-asset-tree>${this.activeAsset && this.activeAsset.attributes ? html`- <or-input id="chart-attribute-picker"+ <or-mwc-input id="chart-attribute-picker"style="display:flex;".label="${i18next.t("attribute")}".type="${InputType.LIST}"- .options="${this._getAttributeOptions()}"></or-input>+ .options="${this._getAttributeOptions()}"></or-mwc-input>`:``}</div><footer class="mdc-dialog__actions">- <or-input class="button"+ <or-mwc-input class="button"slot="secondaryAction".type="${InputType.BUTTON}"label="${i18next.t("cancel")}"class="mdc-button mdc-dialog__button"- data-mdc-dialog-action="no"></or-input>+ data-mdc-dialog-action="no"></or-mwc-input>- <or-input class="button"+ <or-mwc-input class="button"slot="primaryAction".type="${InputType.BUTTON}"label="${i18next.t("add")}"class="mdc-button mdc-dialog__button"data-mdc-dialog-action="yes"- @click="${this.addAttribute}"></or-input>+ @click="${this.addAttribute}"></or-mwc-input></footer></div>diff --git a/ui/component/or-chart/tsconfig.json b/ui/component/or-chart/tsconfig.jsonindex 1f1cc13a3..c9afb4766 100644--- a/ui/component/or-chart/tsconfig.json+++ b/ui/component/or-chart/tsconfig.json@@ -11,7 +11,6 @@"references": [{ "path": "../core" },{ "path": "../or-panel" },- { "path": "../or-input" },{ "path": "../or-icon" },{ "path": "../or-asset-tree" },{ "path": "../or-mwc-components" },diff --git a/ui/component/or-data-viewer/package.json b/ui/component/or-data-viewer/package.jsonindex cd9947909..a94ebabd5 100644--- a/ui/component/or-data-viewer/package.json+++ b/ui/component/or-data-viewer/package.json@@ -19,7 +19,7 @@"@openremote/or-attribute-input": "^1.0.4","@openremote/or-chart": "^1.0.4","@openremote/or-icon": "^1.0.3",- "@openremote/or-input": "^1.0.4",+ "@openremote/or-mwc-components/or-mwc-input": "^1.0.4","@openremote/or-map": "^1.0.4","@openremote/or-panel": "^1.0.3","@openremote/or-translate": "^1.0.3",diff --git a/ui/component/or-input/.npmignore b/ui/component/or-input/.npmignoredeleted file mode 100644index 17e64b1ad..000000000--- a/ui/component/or-input/.npmignore+++ /dev/null@@ -1,8 +0,0 @@-build/-build.gradle-test/-src/-webpack.config.js-tsconfig.json-dist/*.map-.tsbuildinfo\ No newline at end of filediff --git a/ui/component/or-input/README.md b/ui/component/or-input/README.mddeleted file mode 100644index 70db9a9a0..000000000--- a/ui/component/or-input/README.md+++ /dev/null@@ -1,31 +0,0 @@-# @openremote/or-input \<or-input\>-[![NPM Version][npm-image]][npm-url]-[![Linux Build][travis-image]][travis-url]-[![Test Coverage][coveralls-image]][coveralls-url]--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=masterdiff --git a/ui/component/or-input/build.gradle b/ui/component/or-input/build.gradledeleted file mode 100644index 98cdcb8e2..000000000--- a/ui/component/or-input/build.gradle+++ /dev/null@@ -1,15 +0,0 @@-buildDir = "dist"--task clean() {- doLast {- delete "dist"- }-}--task prepareUi() {- dependsOn clean, npmPrepare-}--task publishUi() {- dependsOn clean, npmPublish-}\ No newline at end of filediff --git a/ui/component/or-input/package.json b/ui/component/or-input/package.jsondeleted file mode 100644index a082c27fc..000000000--- a/ui/component/or-input/package.json+++ /dev/null@@ -1,39 +0,0 @@-{- "name": "@openremote/or-input",- "version": "1.0.4",- "description": "OpenRemote input",- "main": "dist/umd/index.bundle.js",- "module": "dist/index.js",- "types": "dist/index.d.ts",- "scripts": {- "build": "npx tsc -b",- "test": "echo \"No tests\" && exit 0",- "prepublishOnly": "npx tsc -b && npx webpack"- },- "author": "OpenRemote",- "license": "AGPL-3.0-or-later",- "dependencies": {- "@material/button": "^9.0.0",- "@material/checkbox": "^9.0.0",- "@material/fab": "^9.0.0",- "@material/floating-label": "^9.0.0",- "@material/form-field": "^9.0.0",- "@material/icon-button": "^9.0.0",- "@material/line-ripple": "^9.0.0",- "@material/ripple": "^9.0.0",- "@material/select": "^9.0.0",- "@material/slider": "^9.0.0",- "@material/switch": "^9.0.0",- "@material/textfield": "^9.0.0",- "lit-element": "^2.4.0"- },- "devDependencies": {- "tslint": ">=5.11.0",- "typescript": ">=4.1.3",- "webpack": "^5.16.0",- "webpack-cli": "^4.4.0"- },- "publishConfig": {- "access": "public"- }-}diff --git a/ui/component/or-input/tsconfig.json b/ui/component/or-input/tsconfig.jsondeleted file mode 100644index 444f15092..000000000--- a/ui/component/or-input/tsconfig.json+++ /dev/null@@ -1,14 +0,0 @@-{- "extends": "../../tsconfig",- "compilerOptions": {- "outDir": "./dist",- "tsBuildInfoFile": "./dist/.tsbuildinfo",- "rootDir": "src"- },- "include": [- "./src"- ],- "references": [- { "path": "../core" }- ]-}diff --git a/ui/component/or-input/webpack.config.js b/ui/component/or-input/webpack.config.jsdeleted file mode 100644index 06448283a..000000000--- a/ui/component/or-input/webpack.config.js+++ /dev/null@@ -1,7 +0,0 @@-const util = require("@openremote/util");--bundles = {- "index.bundle": undefined-};--module.exports = util.generateExports(__dirname);diff --git a/ui/component/or-log-viewer/README.md b/ui/component/or-log-viewer/README.mdindex 6df242ca9..e07b9d9bd 100644--- a/ui/component/or-log-viewer/README.md+++ b/ui/component/or-log-viewer/README.md@@ -24,7 +24,7 @@ Internet Explorer 11 is also supported.[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+[npm-url]: https://npmjs.org/package/@openremote/or-log-viewer[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.svgdiff --git a/ui/component/or-log-viewer/src/index.ts b/ui/component/or-log-viewer/src/index.tsindex 045acd977..9c0df9b49 100644--- a/ui/component/or-log-viewer/src/index.ts+++ b/ui/component/or-log-viewer/src/index.ts@@ -13,14 +13,14 @@ import i18next from "i18next";import {translate} from "@openremote/or-translate";import * as Model from "@openremote/model";import manager, {DefaultColor2, DefaultColor3, Util} from "@openremote/core";-import "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";import "@openremote/or-panel";import "@openremote/or-translate";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import {MDCDataTable} from "@material/data-table";import moment from "moment";-import "@openremote/or-mwc-components/dist/or-mwc-menu";-import {getContentWithMenuTemplate, MenuItem} from "@openremote/or-mwc-components/dist/or-mwc-menu";+import "@openremote/or-mwc-components/or-mwc-menu";+import {getContentWithMenuTemplate, MenuItem} from "@openremote/or-mwc-components/or-mwc-menu";import { GenericAxiosResponse } from "axios";// TODO: Add webpack/rollup to build so consumers aren't forced to use the same tooling@@ -292,30 +292,30 @@ export class OrLogViewer extends translate(i18next)(LitElement) {<div id="controls"><div id="log-controls">${hideCategories ? `` : getContentWithMenuTemplate(- html`<or-input .type=${InputType.BUTTON} raised ?disabled="${disabled}" .label="${i18next.t("categories")}" icontrailing="chevron-down"></or-input>`,+ html`<or-mwc-input .type=${InputType.BUTTON} raised ?disabled="${disabled}" .label="${i18next.t("categories")}" icontrailing="chevron-down"></or-mwc-input>`,this._getCategoryMenuItems(),this.categories,(v) => this._onCategoriesChanged(v as Model.SyslogCategory[]),() => this._onCategoriesClosed(),true)}- <or-input ?hidden="${hideFilter}" .type="${InputType.TEXT}" outlined ?disabled="${disabled}" icontrailing="magnify" .label="${i18next.t("subCategoryFilters")}" .value="${this.filter}" @or-input-changed="${(evt: OrInputChangedEvent) => this._onFilterChanged(evt.detail.value)}"></or-input>- <or-input ?hidden="${hideLevel}" .type="${InputType.SELECT}" id="level-select" ?disabled="${disabled}" .label="${i18next.t("level")}" @or-input-changed="${(evt: OrInputChangedEvent) => this._onLevelChanged(evt.detail.value)}" .value="${this.level}" .options="${this._getLevelOptions()}"></or-input>- <or-input .type="${ InputType.SELECT}" id="limit-select" ?disabled="${disabled}" .label="${i18next.t("limit")}" @or-input-changed="${(evt: OrInputChangedEvent) => this._onLimitChanged(evt.detail.value)}" .value="${this.limit}" .options="${this._getLimitOptions()}"></or-input>+ <or-mwc-input ?hidden="${hideFilter}" .type="${InputType.TEXT}" outlined ?disabled="${disabled}" icontrailing="magnify" .label="${i18next.t("subCategoryFilters")}" .value="${this.filter}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this._onFilterChanged(evt.detail.value)}"></or-mwc-input>+ <or-mwc-input ?hidden="${hideLevel}" .type="${InputType.SELECT}" id="level-select" ?disabled="${disabled}" .label="${i18next.t("level")}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this._onLevelChanged(evt.detail.value)}" .value="${this.level}" .options="${this._getLevelOptions()}"></or-mwc-input>+ <or-mwc-input .type="${ InputType.SELECT}" id="limit-select" ?disabled="${disabled}" .label="${i18next.t("limit")}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this._onLimitChanged(evt.detail.value)}" .value="${this.limit}" .options="${this._getLimitOptions()}"></or-mwc-input></div><div id="page-controls" ?hidden="${isLive || !this._pageCount || !this._data || this._data.length === 0}">- <or-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled || isLive || this._currentPage === 1}" icon="chevron-left" @click="${() => this._updatePage(false)}"></or-input>+ <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled || isLive || this._currentPage === 1}" icon="chevron-left" @click="${() => this._updatePage(false)}"></or-mwc-input><span>${this._currentPage}</span><or-translate value="of"></or-translate><span>${this._pageCount}</span>- <or-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled || isLive || this._currentPage === this._pageCount || (this._data && this._data.length < (this.limit || 50))}" icon="chevron-right" @click="${() => this._updatePage(true)}"></or-input>+ <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled || isLive || this._currentPage === this._pageCount || (this._data && this._data.length < (this.limit || 50))}" icon="chevron-right" @click="${() => this._updatePage(true)}"></or-mwc-input></div><div id="time-controls">- <or-input id="live-button" .type="${InputType.CHECKBOX}" ?disabled="${disabled}" .label="${i18next.t("live")}" @or-input-changed="${(evt: OrInputChangedEvent) => this._onLiveChanged(evt.detail.value)}" .value="${this.live}"></or-input>- <or-input .type="${InputType.SELECT}" id="period-select" ?disabled="${disabled || isLive}" .label="${i18next.t("period")}" @or-input-changed="${(evt: OrInputChangedEvent) => this.interval = evt.detail.value}" .value="${this.interval}" .options="${this._getIntervalOptions()}"></or-input>+ <or-mwc-input id="live-button" .type="${InputType.CHECKBOX}" ?disabled="${disabled}" .label="${i18next.t("live")}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this._onLiveChanged(evt.detail.value)}" .value="${this.live}"></or-mwc-input>+ <or-mwc-input .type="${InputType.SELECT}" id="period-select" ?disabled="${disabled || isLive}" .label="${i18next.t("period")}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this.interval = evt.detail.value}" .value="${this.interval}" .options="${this._getIntervalOptions()}"></or-mwc-input><div id="ending-controls">- <or-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled || isLive}" icon="chevron-left" @click="${() => this.timestamp = this._calculateTimestamp(this.timestamp!, false)}"></or-input>- <or-input id="ending-date" .type="${InputType.DATETIME}" ?disabled="${disabled || isLive}" label="${i18next.t("ending")}" .value="${this.timestamp}" @or-input-changed="${(evt: OrInputChangedEvent) => this.timestamp = this._calculateTimestamp(moment(evt.detail.value as string).toDate())}"></or-input>- <or-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled || isLive}" icon="chevron-right" @click="${() => this.timestamp = this._calculateTimestamp(this.timestamp!, true)}"></or-input>- <or-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled || isLive}" icon="chevron-double-right" @click="${() => this.timestamp = this._calculateTimestamp(new Date())}"></or-input>+ <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled || isLive}" icon="chevron-left" @click="${() => this.timestamp = this._calculateTimestamp(this.timestamp!, false)}"></or-mwc-input>+ <or-mwc-input id="ending-date" .type="${InputType.DATETIME}" ?disabled="${disabled || isLive}" label="${i18next.t("ending")}" .value="${this.timestamp}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this.timestamp = this._calculateTimestamp(moment(evt.detail.value as string).toDate())}"></or-mwc-input>+ <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled || isLive}" icon="chevron-right" @click="${() => this.timestamp = this._calculateTimestamp(this.timestamp!, true)}"></or-mwc-input>+ <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled || isLive}" icon="chevron-double-right" @click="${() => this.timestamp = this._calculateTimestamp(new Date())}"></or-mwc-input></div></div></div>diff --git a/ui/component/or-log-viewer/tsconfig.json b/ui/component/or-log-viewer/tsconfig.jsonindex ce23f60ee..a83ede370 100644--- a/ui/component/or-log-viewer/tsconfig.json+++ b/ui/component/or-log-viewer/tsconfig.json@@ -10,7 +10,6 @@],"references": [{ "path": "../core" },- { "path": "../or-input" },{ "path": "../or-mwc-components" },{ "path": "../or-translate" }]diff --git a/ui/component/or-map/package.json b/ui/component/or-map/package.jsonindex a5c82f81f..4d30813b2 100644--- a/ui/component/or-map/package.json+++ b/ui/component/or-map/package.json@@ -16,7 +16,7 @@"@openremote/core": "^1.0.3","@openremote/model": "^1.0.3","@openremote/or-icon": "^1.0.3",- "@openremote/or-input": "^1.0.4",+ "@openremote/or-mwc-components/or-mwc-input": "^1.0.4","@openremote/or-mwc-components": "^1.0.3","@openremote/or-translate": "^1.0.3","@openremote/rest": "^1.0.3",diff --git a/ui/component/or-map/src/index.ts b/ui/component/or-map/src/index.tsindex bc640a988..ce5256257 100644--- a/ui/component/or-map/src/index.ts+++ b/ui/component/or-map/src/index.ts@@ -6,8 +6,8 @@ import {MapWidget} from "./mapwidget";import {style} from "./style";import {OrMapMarker, OrMapMarkerChangedEvent} from "./markers/or-map-marker";import * as Util from "./util";-import { OrInput, InputType, ValueInputProviderGenerator, ValueInputTemplateFunction } from "@openremote/or-input";-import {showDialog, OrMwcDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";+import { OrInput, InputType, ValueInputProviderGenerator, ValueInputTemplateFunction } from "@openremote/or-mwc-components/or-mwc-input";+import {showDialog, OrMwcDialog} from "@openremote/or-mwc-components/or-mwc-dialog";import {getMarkerIconAndColorFromAssetType} from "./markers/or-map-marker-asset";import { i18next } from "@openremote/or-translate";@@ -291,8 +291,8 @@ export const geoJsonPointInputTemplateProvider: ValueInputProviderGenerator = (a}</style><div id="geo-json-point-input-compact-wrapper">- <or-input .type="${InputType.TEXT}" .value="${centerStr}" .pattern="${CoordinatesRegexPattern}" @keyup="${(e: KeyboardEvent) => getCoordinatesInputKeyHandler(valueChangeNotifier)(e)}"></or-input>- <or-input style="width: auto;" .type="${InputType.BUTTON}" compact icon="crosshairs-gps" @click="${onClick}"></or-input>+ <or-mwc-input .type="${InputType.TEXT}" .value="${centerStr}" .pattern="${CoordinatesRegexPattern}" @keyup="${(e: KeyboardEvent) => getCoordinatesInputKeyHandler(valueChangeNotifier)(e)}"></or-mwc-input>+ <or-mwc-input style="width: auto;" .type="${InputType.BUTTON}" compact icon="crosshairs-gps" @click="${onClick}"></or-mwc-input></div>`;}diff --git a/ui/component/or-map/src/or-map-asset-card.ts b/ui/component/or-map/src/or-map-asset-card.tsindex 37ac27ccf..5efba1d47 100644--- a/ui/component/or-map/src/or-map-asset-card.ts+++ b/ui/component/or-map/src/or-map-asset-card.ts@@ -20,7 +20,7 @@ import {import manager, {AssetModelUtil, subscribe, Util} from "@openremote/core";import "@openremote/or-icon";import {mapAssetCardStyle} from "./style";-import { InputType } from "@openremote/or-input";+import { InputType } from "@openremote/or-mwc-components/or-mwc-input";import { i18next } from "@openremote/or-translate";export interface MapAssetCardTypeConfig {@@ -165,7 +165,7 @@ export class OrMapAssetCard extends subscribe(manager)(LitElement) {</ul></div><div id="footer">- <or-input .type="${InputType.BUTTON}" .label="${i18next.t("viewAsset")}" @click="${(e: MouseEvent) => {e.preventDefault(); this._loadAsset(this.asset!.id!);}}"></or-input>+ <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("viewAsset")}" @click="${(e: MouseEvent) => {e.preventDefault(); this._loadAsset(this.asset!.id!);}}"></or-mwc-input></div></div>`;diff --git a/ui/component/or-map/tsconfig.json b/ui/component/or-map/tsconfig.jsonindex fb543bce8..682436851 100644--- a/ui/component/or-map/tsconfig.json+++ b/ui/component/or-map/tsconfig.json@@ -14,7 +14,6 @@{ "path": "../model" },{ "path": "../or-translate" },{ "path": "../or-mwc-components" },- { "path": "../or-icon" },- { "path": "../or-input" }+ { "path": "../or-icon" }]}diff --git a/ui/component/or-mwc-components/README.md b/ui/component/or-mwc-components/README.mdindex 70db9a9a0..d2fea8961 100644--- a/ui/component/or-mwc-components/README.md+++ b/ui/component/or-mwc-components/README.md@@ -1,14 +1,15 @@-# @openremote/or-input \<or-input\>+# @openremote/or-mwc-* \<or-mwc-*\>[![NPM Version][npm-image]][npm-url][![Linux Build][travis-image]][travis-url][![Test Coverage][coveralls-image]][coveralls-url]-Web Component for displaying an input control.+Web components wrapper for `MDC` web UI components, the standard `MWC` components are not complete, and they have a+horrible icon font dependency (hopefully this will removed) whereas we use `SVG` based icon sets.## Install```bash-npm i @openremote/or-input-yarn add @openremote/or-input+npm i @openremote/or-mwc-components+yarn add @openremote/or-mwc-components```## Usage@@ -24,7 +25,7 @@ Internet Explorer 11 is also supported.[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+[npm-url]: https://npmjs.org/package/@openremote/or-mwc-components[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.svgdiff --git a/ui/component/or-mwc-components/package.json b/ui/component/or-mwc-components/package.jsonindex 5fc75a915..0e838cf17 100644--- a/ui/component/or-mwc-components/package.json+++ b/ui/component/or-mwc-components/package.json@@ -7,6 +7,12 @@"test": "echo \"No tests\" && exit 0","prepublishOnly": "npx tsc -b"},+ "exports": {+ "./*": "./dist/*.js"+ },+ "typesVersions": {+ "*": { "*": ["dist/*"] }+ },"author": "OpenRemote","license": "AGPL-3.0-or-later","dependencies": {@@ -15,7 +21,7 @@"@material/menu": "^9.0.0","@material/snackbar": "^9.0.0","@openremote/core": "^1.0.3",- "@openremote/or-input": "^1.0.3",+"@openremote/or-translate": "^1.0.3","lit-element": "^2.4.0"},diff --git a/ui/component/or-mwc-components/src/or-mwc-dialog.ts b/ui/component/or-mwc-components/src/or-mwc-dialog.tsindex 97825df0d..072fca725 100644--- a/ui/component/or-mwc-components/src/or-mwc-dialog.ts+++ b/ui/component/or-mwc-components/src/or-mwc-dialog.ts@@ -1,8 +1,8 @@import {css, customElement, html, LitElement, property, query, TemplateResult, unsafeCSS, PropertyValues} from "lit-element";import {MDCDialog} from "@material/dialog";import "@openremote/or-translate";-import "@openremote/or-input";-import {InputType} from "@openremote/or-input";+import "./or-mwc-input";+import {InputType} from "./or-mwc-input";import { i18next } from "@openremote/or-translate";import { Util } from "@openremote/core";@@ -274,7 +274,7 @@ export class OrMwcDialog extends LitElement {${this.dialogActions ? this.dialogActions.map((action) => {return html`<div class="mdc-button mdc-dialog__button" ?data-mdc-dialog-button-default="${action.default}" data-mdc-dialog-action="${action.actionName}">- ${typeof(action.content) === "string" ? html`<or-input .type="${InputType.BUTTON}" .disabled="${action.disabled}" .label="${action.content}"></or-input>` : action.content}+ ${typeof(action.content) === "string" ? html`<or-mwc-input .type="${InputType.BUTTON}" .disabled="${action.disabled}" .label="${action.content}"></or-mwc-input>` : action.content}</div>`;}) : ``}</footer>diff --git a/ui/component/or-input/src/index.ts b/ui/component/or-mwc-components/src/or-mwc-input.tssimilarity index 98%rename from ui/component/or-input/src/index.tsrename to ui/component/or-mwc-components/src/or-mwc-input.tsindex 620a05c95..80e2f84c3 100644--- a/ui/component/or-input/src/index.ts+++ b/ui/component/or-mwc-components/src/or-mwc-input.ts@@ -35,7 +35,7 @@ const sliderStyle = require("@material/slider/dist/mdc.slider.css");export class OrInputChangedEvent extends CustomEvent<OrInputChangedEventDetail> {- public static readonly NAME = "or-input-changed";+ public static readonly NAME = "or-mwc-input-changed";constructor(value?: any, previousValue?: any, enterPressed?: boolean) {super(OrInputChangedEvent.NAME, {@@ -345,15 +345,15 @@ export const getValueHolderInputTemplateProvider: ValueInputProviderGenerator =const disabled = options.disabled || loading || sending;const label = supportsLabel ? options.label : undefined;- return html`<or-input id="input" .type="${inputType}" .label="${label}" .value="${value}" .pattern="${pattern}"+ return html`<or-mwc-input id="input" .type="${inputType}" .label="${label}" .value="${value}" .pattern="${pattern}".min="${min}" .max="${max}" .format="${format}" .focused="${focused}" .required="${required}".options="${selectOptions}" .readonly="${readonly}" .disabled="${disabled}" .step="${step}".helperText="${helperText}" .helperPersistent="${true}"- @or-input-changed="${(e: OrInputChangedEvent) => {+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => {e.stopPropagation();e.detail.value = valueConverter ? valueConverter(e.detail.value) : e.detail.value;valueChangeNotifier(e.detail);- }}"></or-input>`+ }}"></or-mwc-input>`};return {@@ -369,12 +369,12 @@ const style = css`:host {display: inline-block;- --internal-or-input-color: var(--or-input-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)}));- --internal-or-input-text-color: var(--or-input-text-color, var(--or-app-color1, ${unsafeCSS(DefaultColor8)}));+ --internal-or-mwc-input-color: var(--or-mwc-input-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)}));+ --internal-or-mwc-input-text-color: var(--or-mwc-input-text-color, var(--or-app-color1, ${unsafeCSS(DefaultColor8)}));- --mdc-theme-primary: var(--internal-or-input-color);- --mdc-theme-on-primary: var(--internal-or-input-text-color);- --mdc-theme-secondary: var(--internal-or-input-color);+ --mdc-theme-primary: var(--internal-or-mwc-input-color);+ --mdc-theme-on-primary: var(--internal-or-mwc-input-text-color);+ --mdc-theme-secondary: var(--internal-or-mwc-input-color);}:host([hidden]) {@@ -448,7 +448,7 @@ const style = css`color: var(--or-app-color2);background-color: var(--mdc-theme-primary);}- .or-input--rounded {+ .or-mwc-input--rounded {border-radius: 50% !important;}@@ -498,7 +498,7 @@ const style = css`.mdc-icon-button {padding: 0;- color: var(--internal-or-input-color);+ color: var(--internal-or-mwc-input-color);}/* Give slider min width like select etc. */@@ -516,7 +516,7 @@ const style = css`}`;-@customElement("or-input")+@customElement("or-mwc-input")export class OrInput extends LitElement {static get styles() {@@ -892,7 +892,7 @@ export class OrInput extends LitElement {"mdc-button--raised": !isIconButton && !this.action && this.raised,"mdc-button--unelevated": !isIconButton && !this.action && this.unElevated,"mdc-button--outlined": !isIconButton && !this.action && this.outlined,- "or-input--rounded": !isIconButton && !this.action && this.rounded+ "or-mwc-input--rounded": !isIconButton && !this.action && this.rounded};return html`<button id="component" class="${classMap(classes)}"diff --git a/ui/component/or-mwc-components/src/or-mwc-list.ts b/ui/component/or-mwc-components/src/or-mwc-list.tsindex 2f0d4fbb1..1e0b89e7b 100644--- a/ui/component/or-mwc-components/src/or-mwc-list.ts+++ b/ui/component/or-mwc-components/src/or-mwc-list.ts@@ -50,12 +50,12 @@ declare global {const style = css`:host {white-space: nowrap;- --internal-or-input-color: var(--or-input-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)}));- --internal-or-input-text-color: var(--or-input-text-color, var(--or-app-color1, ${unsafeCSS(DefaultColor8)}));+ --internal-or-mwc-input-color: var(--or-mwc-input-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)}));+ --internal-or-mwc-input-text-color: var(--or-mwc-input-text-color, var(--or-app-color1, ${unsafeCSS(DefaultColor8)}));- --mdc-theme-primary: var(--internal-or-input-color);- --mdc-theme-on-primary: var(--internal-or-input-text-color);- --mdc-theme-secondary: var(--internal-or-input-color);+ --mdc-theme-primary: var(--internal-or-mwc-input-color);+ --mdc-theme-on-primary: var(--internal-or-mwc-input-text-color);+ --mdc-theme-secondary: var(--internal-or-mwc-input-color);}.mdc-list-item__graphic {diff --git a/ui/component/or-mwc-components/src/or-mwc-menu.ts b/ui/component/or-mwc-components/src/or-mwc-menu.tsindex 25ec7da65..2f281fb25 100644--- a/ui/component/or-mwc-components/src/or-mwc-menu.ts+++ b/ui/component/or-mwc-components/src/or-mwc-menu.ts@@ -83,12 +83,12 @@ export function getContentWithMenuTemplate(content: TemplateResult, menuItems: (const style = css`:host {white-space: nowrap;- --internal-or-input-color: var(--or-input-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)}));- --internal-or-input-text-color: var(--or-input-text-color, var(--or-app-color1, ${unsafeCSS(DefaultColor8)}));+ --internal-or-mwc-input-color: var(--or-mwc-input-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)}));+ --internal-or-mwc-input-text-color: var(--or-mwc-input-text-color, var(--or-app-color1, ${unsafeCSS(DefaultColor8)}));- --mdc-theme-primary: var(--internal-or-input-color);- --mdc-theme-on-primary: var(--internal-or-input-text-color);- --mdc-theme-secondary: var(--internal-or-input-color);+ --mdc-theme-primary: var(--internal-or-mwc-input-color);+ --mdc-theme-on-primary: var(--internal-or-mwc-input-text-color);+ --mdc-theme-secondary: var(--internal-or-mwc-input-color);}.mdc-list-item__graphic {@@ -126,14 +126,9 @@ export class OrMwcMenu extends LitElement {@property({type: Boolean, attribute: true})public visible?: boolean;- @property({type: Boolean, attribute: true})- public noSurface?: boolean = false;-@property({type: Boolean, attribute: true})public twoLine?: boolean;- public anchorElem?: HTMLElement;-@query("#wrapper")protected _wrapperElem!: HTMLElement;@@ -162,7 +157,7 @@ export class OrMwcMenu extends LitElement {return html`<div id="wrapper" class="mdc-menu-surface--anchor">- <div class="mdc-menu ${this.noSurface ? "" : "mdc-menu-surface"}" id="menu" @MDCMenuSurface:closed="${this._onMenuClosed}">+ <div class="mdc-menu mdc-menu-surface" id="menu" @MDCMenuSurface:closed="${this._onMenuClosed}"><ul class="mdc-list ${this.twoLine ? "mdc-list--two-line" : ""}" role="menu" aria-hidden="true" aria-orientation="vertical" tabindex="-1">${this.getItemsTemplate(this.menuItems)}</ul>@@ -243,10 +238,17 @@ export class OrMwcMenu extends LitElement {super.firstUpdated(_changedProperties);if (this._mdcElem) {this._mdcComponent = new MDCMenu(this._mdcElem);++ // This overrides the standard mdc menu body click capture handler as it doesn't work with webcomponents+ (this._mdcComponent as any).menuSurface_.foundation.handleBodyClick = function (evt: MouseEvent) {+ const el = evt.composedPath()[0]; // Use composed path not evt target to work with webcomponents+ if (this.adapter.isElementInContainer(el)) {+ return;+ }+ this.close();+ };+this._mdcComponent!.quickOpen = true;- const elem = this.anchorElem || this._wrapperElem;- // This doesn't work- //this._mdcComponent.setAnchorElement(elem);}}@@ -266,9 +268,7 @@ export class OrMwcMenu extends LitElement {if (!this.multiSelect) {this.values = value;- if(!this.noSurface){- this._mdcComponent!.open = false;- }+ this._mdcComponent!.open = false;} else {if (!Array.isArray(this.values)) {this.values = this.values ? [this.values] : [];diff --git a/ui/component/or-mwc-components/src/or-mwc-snackbar.ts b/ui/component/or-mwc-components/src/or-mwc-snackbar.tsindex 80c00dd7b..da4b5f052 100644--- a/ui/component/or-mwc-components/src/or-mwc-snackbar.ts+++ b/ui/component/or-mwc-components/src/or-mwc-snackbar.ts@@ -123,8 +123,8 @@ export class OrMwcSnackbar extends LitElement {</div>${!this.buttonText ? html`` : html`<div class="mdc-snackbar__actions" aria-atomic="true">- <or-input type="button" class="mdc-button mdc-snackbar__action" .label="${this.buttonText}">- </or-input>+ <or-mwc-input type="button" class="mdc-button mdc-snackbar__action" .label="${this.buttonText}">+ </or-mwc-input></div>`};</div>diff --git a/ui/component/or-mwc-components/src/style.ts b/ui/component/or-mwc-components/src/style.tsdeleted file mode 100644index 1cb1bb5c4..000000000--- a/ui/component/or-mwc-components/src/style.ts+++ /dev/null@@ -1,62 +0,0 @@-import {css, unsafeCSS} from "lit-element";-import {DefaultColor1, DefaultColor4} from "@openremote/core";--// TODO this is temp work, should be replaced with material design components / styling-// language=CSS-export const orInputStyle = css`-- :host {- display: inline-block;- --internal-or-input-color: var(--or-input-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)}));- --internal-or-input-text-color: var(--or-input-text-color, var(--or-app-color1, ${unsafeCSS(DefaultColor1)}));-- --mdc-theme-primary: var(--internal-or-input-color);- --mdc-theme-on-primary: var(--internal-or-input-text-color);- --mdc-theme-secondary: var(--internal-or-input-color);- }-- .or-input--rounded {- border-radius: 50% !important;- }-- /* MDC TEXT FIELD AND SELECT DON'T USE THEME VARS */- .mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label {- color: var(--mdc-theme-primary);- }- .mdc-text-field--focused .mdc-text-field__input:required ~ .mdc-floating-label::after,- .mdc-text-field--focused .mdc-text-field__input:required ~ .mdc-notched-outline .mdc-floating-label::after {- color: var(--mdc-theme-primary);- }-- .mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label {- color: var(--mdc-theme-primary);- }-- .mdc-text-field, .mdc-text-field-helper-line {- width: inherit;- }-- .mdc-text-field--dense:not(.mdc-text-field--no-label):not(.mdc-text-field--outlined) {- height: 52px;- }-- .mdc-text-field--dense.mdc-text-field--no-label {- height: 40px;- }-- .mdc-switch {- margin: 18px;- }-- .mdc-select__dropdown-icon {- background: none;- }-- .mdc-select--focused .mdc-select__dropdown-icon {- --or-icon-fill: var(--internal-or-input-color);- }-- .mdc-icon-button {- padding: 0;- }-`;diff --git a/ui/component/or-mwc-components/tsconfig.json b/ui/component/or-mwc-components/tsconfig.jsonindex 592b79c32..b18fb4430 100644--- a/ui/component/or-mwc-components/tsconfig.json+++ b/ui/component/or-mwc-components/tsconfig.json@@ -9,7 +9,6 @@"./src"],"references": [- { "path": "../or-input" },{ "path": "../core" },{ "path": "../or-translate" }]diff --git a/ui/component/or-panel/README.md b/ui/component/or-panel/README.mdindex 228cb53c5..5f751601e 100644--- a/ui/component/or-panel/README.md+++ b/ui/component/or-panel/README.md@@ -24,7 +24,7 @@ Internet Explorer 11 is also supported.[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+[npm-url]: https://npmjs.org/package/@openremote/or-panel[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.svgdiff --git a/ui/component/or-rules/package.json b/ui/component/or-rules/package.jsonindex 1d96c41e5..be3fdeb1d 100644--- a/ui/component/or-rules/package.json+++ b/ui/component/or-rules/package.json@@ -16,7 +16,7 @@"@openremote/model": "^1.0.3","@openremote/or-attribute-input": "^1.0.4","@openremote/or-icon": "^1.0.3",- "@openremote/or-input": "^1.0.4",+ "@openremote/or-mwc-components/or-mwc-input": "^1.0.4","@openremote/or-mwc-components": "^1.0.3","@openremote/or-panel": "^1.0.3","@openremote/or-translate": "^1.0.3",diff --git a/ui/component/or-rules/src/flow-viewer/components/confirmation-dialog.ts b/ui/component/or-rules/src/flow-viewer/components/confirmation-dialog.tsindex 810a3bfee..24b6de0e8 100644--- a/ui/component/or-rules/src/flow-viewer/components/confirmation-dialog.ts+++ b/ui/component/or-rules/src/flow-viewer/components/confirmation-dialog.ts@@ -27,13 +27,13 @@ export class ConfirmationDialog extends translate(i18next)(LitElement) {return html`<div class="question">${this.question}</div><div class="container">- <or-input type="button" unElevated label="${this.agreeText}"+ <or-mwc-input type="button" unElevated label="${this.agreeText}"@click="${() => { this.dispatchEvent(new CustomEvent("agreed")); }}">- </or-input>+ </or-mwc-input>- <or-input type="button" label="${this.disagreeText}"+ <or-mwc-input type="button" label="${this.disagreeText}"@click="${() => { this.dispatchEvent(new CustomEvent("disagreed")); }}">- </or-input>+ </or-mwc-input></div>`;}diff --git a/ui/component/or-rules/src/flow-viewer/components/editor-workspace.ts b/ui/component/or-rules/src/flow-viewer/components/editor-workspace.tsindex 69ecefe32..3513bf84c 100644--- a/ui/component/or-rules/src/flow-viewer/components/editor-workspace.ts+++ b/ui/component/or-rules/src/flow-viewer/components/editor-workspace.ts@@ -209,8 +209,8 @@ export class EditorWorkspace extends translate(i18next)(LitElement) {</svg><selection-box .workspace="${this}"></selection-box><div class="view-options" style="z-index: ${this.topNodeZindex + 1}">- ${!this.isCameraInDefaultPosition ? html`<or-input type="button" icon="vector-square" @click="${this.resetCamera}" label="${i18next.t("resetView", "Reset view")!}"></or-input>` : null}- ${project.nodes.length !== 0 ? html`<or-input type="button" icon="fit-to-page-outline" @click="${() => this.fitCamera(project.nodes)}" label="${i18next.t("fitView", "Fit view")!}"></or-input>` : null}+ ${!this.isCameraInDefaultPosition ? html`<or-mwc-input type="button" icon="vector-square" @click="${this.resetCamera}" label="${i18next.t("resetView", "Reset view")!}"></or-mwc-input>` : null}+ ${project.nodes.length !== 0 ? html`<or-mwc-input type="button" icon="fit-to-page-outline" @click="${() => this.fitCamera(project.nodes)}" label="${i18next.t("fitView", "Fit view")!}"></or-mwc-input>` : null}</div>`;}diff --git a/ui/component/or-rules/src/flow-viewer/components/internal-picker.ts b/ui/component/or-rules/src/flow-viewer/components/internal-picker.tsindex d546e58a4..448b08267 100644--- a/ui/component/or-rules/src/flow-viewer/components/internal-picker.ts+++ b/ui/component/or-rules/src/flow-viewer/components/internal-picker.ts@@ -1,7 +1,7 @@import { LitElement, property, customElement, html, css, TemplateResult } from "lit-element";import { Node, PickerType, AttributeInternalValue, AssetState, WellknownMetaItems, Asset, NodeDataType } from "@openremote/model";import { nodeConverter } from "../converters/node-converter";-import { OrInputChangedEvent } from "@openremote/or-input";+import { OrInputChangedEvent } from "@openremote/or-mwc-components/or-mwc-input";import rest from "@openremote/rest";import "@openremote/or-asset-tree";import { OrAssetTreeRequestSelectionEvent } from "@openremote/or-asset-tree";@@ -173,13 +173,13 @@ export class InternalPicker extends translate(i18next)(LitElement) {private get assetAttributeInput(): TemplateResult {const hasAssetSelected = this.selectedAsset;return html`- <or-input type="button" fullwidth label="${hasAssetSelected ? this.selectedAsset.name! : (i18next.t("selectAsset", "Select asset")!)}"+ <or-mwc-input type="button" fullwidth label="${hasAssetSelected ? this.selectedAsset.name! : (i18next.t("selectAsset", "Select asset")!)}"icon="format-list-bulleted-square"@click="${() => {modal.element.content = this.assetTreeTemplate;modal.element.header = i18next.t("assets", "Assets");modal.element.open();- }}"></or-input>+ }}"></or-mwc-input>${hasAssetSelected ? (this.attributeNames.length === 0 ?@@ -201,7 +201,7 @@ export class InternalPicker extends translate(i18next)(LitElement) {}private get colorInput(): TemplateResult {- return html`<or-input type="color"></or-input>`; // looks strange+ return html`<or-mwc-input type="color"></or-mwc-input>`; // looks strange}private get doubleDropdownInput(): TemplateResult {@@ -215,10 +215,10 @@ export class InternalPicker extends translate(i18next)(LitElement) {private get checkBoxInput(): TemplateResult {return html`<input type="checkbox" ?checked="${this.internal.value || false}" @input="${(e: any) => this.setValue(e.target.checked)}"/>`;- return html`<or-input type="checkbox"- @or-input-changed="${(e: OrInputChangedEvent) => {+ return html`<or-mwc-input type="checkbox"+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => {this.setValue(e.detail.value);- }}"></or-input>`;+ }}"></or-mwc-input>`;}private get multilineInput(): TemplateResult {diff --git a/ui/component/or-rules/src/flow-viewer/components/node-panel.ts b/ui/component/or-rules/src/flow-viewer/components/node-panel.tsindex d65b42ad1..465d1c93a 100644--- a/ui/component/or-rules/src/flow-viewer/components/node-panel.ts+++ b/ui/component/or-rules/src/flow-viewer/components/node-panel.ts@@ -1,9 +1,9 @@import { LitElement, html, customElement, css, property, query } from "lit-element";import { NodeType, Node } from "@openremote/model";import { i18next, translate } from "@openremote/or-translate";-import { OrMwcDrawer } from "@openremote/or-mwc-components/dist/or-mwc-drawer";+import { OrMwcDrawer } from "@openremote/or-mwc-components/or-mwc-drawer";import { FlowEditor } from "./flow-editor";-import { OrInputChangedEvent } from "@openremote/or-input";+import { OrInputChangedEvent } from "@openremote/or-mwc-components/or-mwc-input";@customElement("node-panel")export class NodePanel extends translate(i18next)(LitElement) {diff --git a/ui/component/or-rules/src/flow-viewer/components/notification-dialog.ts b/ui/component/or-rules/src/flow-viewer/components/notification-dialog.tsindex 33805f981..931cf892c 100644--- a/ui/component/or-rules/src/flow-viewer/components/notification-dialog.ts+++ b/ui/component/or-rules/src/flow-viewer/components/notification-dialog.ts@@ -29,9 +29,9 @@ export class NotificationDialog extends translate(i18next)(LitElement) {return html`<div class="message">${this.message}</div><div class="container">- <or-input type="button" unElevated label="${this.buttonText}"+ <or-mwc-input type="button" unElevated label="${this.buttonText}"@click="${() => { this.dispatchEvent(new CustomEvent("closed")); }}">- </or-input>+ </or-mwc-input></div>`;}diff --git a/ui/component/or-rules/src/flow-viewer/components/top-bar.ts b/ui/component/or-rules/src/flow-viewer/components/top-bar.tsindex 681c03568..cd1a1877d 100644--- a/ui/component/or-rules/src/flow-viewer/components/top-bar.ts+++ b/ui/component/or-rules/src/flow-viewer/components/top-bar.ts@@ -1,6 +1,6 @@import { LitElement, html, customElement, css, property } from "lit-element";import { IdentityDomLink } from "../node-structure";-import { OrInputChangedEvent } from "@openremote/or-input";+import { OrInputChangedEvent } from "@openremote/or-mwc-components/or-mwc-input";import { Utilities } from "../utils";import { i18next, translate } from "@openremote/or-translate";import { project, modal, input, exporter, FlowEditor } from "./flow-editor";@@ -90,19 +90,19 @@ export class TopBar extends translate(i18next)(LitElement) {let chosenDesc = "";modal.element.content = html`<div style="display: flex; flex-direction: column; width: auto; justify-content: space-between; align-items: stretch;">- <or-input style="margin-bottom: 16px; width:100%;" required type="text" label="${i18next.t("name", "Name")!}"- @or-input-changed="${(e: OrInputChangedEvent) => { chosenName = e.detail.value; }}"- ></or-input>- <or-input style="margin-bottom: 16px; width:100%;" fullwidth type="textarea" label="${i18next.t("description", "Description")!}"- @or-input-changed="${(e: OrInputChangedEvent) => { chosenDesc = e.detail.value; }}"- ></or-input>+ <or-mwc-input style="margin-bottom: 16px; width:100%;" required type="text" label="${i18next.t("name", "Name")!}"+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => { chosenName = e.detail.value; }}"+ ></or-mwc-input>+ <or-mwc-input style="margin-bottom: 16px; width:100%;" fullwidth type="textarea" label="${i18next.t("description", "Description")!}"+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => { chosenDesc = e.detail.value; }}"+ ></or-mwc-input><div>- <or-input style="text-align: left; margin-right: 10px" type="button" label="${i18next.t("cancel", "Cancel")!}" @click="${modal.element.close}"></or-input>- <or-input style="text-align: right" type="button" unelevated label="${i18next.t("save", "Save")!}" @click="${() => {+ <or-mwc-input style="text-align: left; margin-right: 10px" type="button" label="${i18next.t("cancel", "Cancel")!}" @click="${modal.element.close}"></or-mwc-input>+ <or-mwc-input style="text-align: right" type="button" unelevated label="${i18next.t("save", "Save")!}" @click="${() => {if (!chosenName) { return; }exporter.exportAsNew(project.toNodeCollection(chosenName, chosenDesc));modal.element.close();- }}"></or-input>+ }}"></or-mwc-input></div></div>`;diff --git a/ui/component/or-rules/src/flow-viewer/styles/editor-workspace-style.ts b/ui/component/or-rules/src/flow-viewer/styles/editor-workspace-style.tsindex 5b469d071..0ea439ed9 100644--- a/ui/component/or-rules/src/flow-viewer/styles/editor-workspace-style.ts+++ b/ui/component/or-rules/src/flow-viewer/styles/editor-workspace-style.ts@@ -25,7 +25,7 @@ export const EditorWorkspaceStyle = css`background: rgba(0,0,0,0.02);}-or-input[type=button]+or-mwc-input[type=button]{margin: 10px;color: inherit;diff --git a/ui/component/or-rules/src/index.ts b/ui/component/or-rules/src/index.tsindex e6a5db645..4f36257ce 100644--- a/ui/component/or-rules/src/index.ts+++ b/ui/component/or-rules/src/index.ts@@ -28,7 +28,7 @@ import {WellknownAssets} from "@openremote/model";import "@openremote/or-translate";-import "@openremote/or-mwc-components/dist/or-mwc-drawer";+import "@openremote/or-mwc-components/or-mwc-drawer";import {translate} from "@openremote/or-translate";import "./or-rule-list";import "./or-rule-viewer";@@ -36,8 +36,8 @@ import "./flow-viewer/flow-viewer";import {OrRuleList} from "./or-rule-list";import {OrRuleViewer} from "./or-rule-viewer";import {RecurrenceOption} from "./json-viewer/or-rule-then-otherwise";-import {ValueInputProviderGenerator} from "@openremote/or-input";-import {showOkCancelDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";+import {ValueInputProviderGenerator} from "@openremote/or-mwc-components/or-mwc-input";+import {showOkCancelDialog} from "@openremote/or-mwc-components/or-mwc-dialog";export const enum ConditionType {ASSET_QUERY = "assetQuery",diff --git a/ui/component/or-rules/src/json-viewer/forms/or-rule-form-email-message.ts b/ui/component/or-rules/src/json-viewer/forms/or-rule-form-email-message.tsindex 875663ca0..32a95c486 100644--- a/ui/component/or-rules/src/json-viewer/forms/or-rule-form-email-message.ts+++ b/ui/component/or-rules/src/json-viewer/forms/or-rule-form-email-message.ts@@ -1,9 +1,9 @@import {customElement, html, LitElement, css, property} from "lit-element";-import "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";import i18next from "i18next";import {translate} from "@openremote/or-translate";-import "@openremote/or-input";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import {RuleActionNotification,EmailNotificationMessage@@ -19,7 +19,7 @@ export class OrRuleFormEmailMessage extends translate(i18next)(LitElement) {static get styles() {return css`- or-input {+ or-mwc-input {margin-bottom: 20px;min-width: 420px;width: 100%;@@ -32,8 +32,8 @@ export class OrRuleFormEmailMessage extends translate(i18next)(LitElement) {return html`<form style="display:grid">- <or-input value="${message && message.subject ? message.subject : ""}" @or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "subject")}" .label="${i18next.t("subject")}" type="${InputType.TEXT}" required placeholder=" "></or-input>- <or-input value="${message && message.html ? message.html : ""}" @or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "html")}" .label="${i18next.t("message")}" type="${InputType.TEXTAREA}" required placeholder=" " ></or-input>+ <or-mwc-input value="${message && message.subject ? message.subject : ""}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "subject")}" .label="${i18next.t("subject")}" type="${InputType.TEXT}" required placeholder=" "></or-mwc-input>+ <or-mwc-input value="${message && message.html ? message.html : ""}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "html")}" .label="${i18next.t("message")}" type="${InputType.TEXTAREA}" required placeholder=" " ></or-mwc-input></form>`}diff --git a/ui/component/or-rules/src/json-viewer/forms/or-rule-form-push-notification.ts b/ui/component/or-rules/src/json-viewer/forms/or-rule-form-push-notification.tsindex 9129cedf3..e4ea43e28 100644--- a/ui/component/or-rules/src/json-viewer/forms/or-rule-form-push-notification.ts+++ b/ui/component/or-rules/src/json-viewer/forms/or-rule-form-push-notification.ts@@ -1,9 +1,9 @@import {customElement, html, LitElement, css, property} from "lit-element";-import "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";import i18next from "i18next";import {translate} from "@openremote/or-translate";-import "@openremote/or-input";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import {RuleActionNotification,PushNotificationMessage@@ -20,7 +20,7 @@ export class OrRuleFormPushNotification extends translate(i18next)(LitElement) {static get styles() {return css`- or-input {+ or-mwc-input {margin-bottom: 20px;min-width: 420px;width: 100%;@@ -47,43 +47,43 @@ export class OrRuleFormPushNotification extends translate(i18next)(LitElement) {const buttons = message && message.buttons ? message.buttons : [];return html`<form style="display:grid">- <or-input value="${title}"- @or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "title")}"+ <or-mwc-input value="${title}"+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "title")}".label="${i18next.t("subject")}"type="${InputType.TEXT}"required- placeholder=" "></or-input>+ placeholder=" "></or-mwc-input>- <or-input value="${body}"- @or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "body")}"+ <or-mwc-input value="${body}"+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "body")}".label="${i18next.t("message")}"type="${InputType.TEXTAREA}"required- placeholder=" " ></or-input>- <or-input value="${actionUrl}"- @or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "action.url")}"+ placeholder=" " ></or-mwc-input>+ <or-mwc-input value="${actionUrl}"+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "action.url")}".label="${i18next.t("openWebsiteUrl")}"type="${InputType.TEXT}"required- placeholder=" "></or-input>+ placeholder=" "></or-mwc-input>- <or-input .value="${action && typeof action.openInBrowser !== "undefined" ? (action && action.openInBrowser) : true}"- @or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "action.openInBrowser")}"+ <or-mwc-input .value="${action && typeof action.openInBrowser !== "undefined" ? (action && action.openInBrowser) : true}"+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "action.openInBrowser")}".label="${i18next.t("openInBrowser")}"type="${InputType.SWITCH}"- placeholder=" "></or-input>+ placeholder=" "></or-mwc-input>- <or-input value="${buttons && buttons[0] && buttons[0].title ? buttons[0].title : ""}"- @or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "buttons.0.title")}"+ <or-mwc-input value="${buttons && buttons[0] && buttons[0].title ? buttons[0].title : ""}"+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "buttons.0.title")}".label="${i18next.t("buttonTextConfirm")}"type="${InputType.TEXT}"required- placeholder=" "></or-input>- <or-input value="${buttons && buttons[1] && buttons[1].title ? buttons[1].title : ""}"- @or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "buttons.1.title")}"+ placeholder=" "></or-mwc-input>+ <or-mwc-input value="${buttons && buttons[1] && buttons[1].title ? buttons[1].title : ""}"+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "buttons.1.title")}".label="${i18next.t("buttonTextDecline")}"type="${InputType.TEXT}"- placeholder=" "></or-input>+ placeholder=" "></or-mwc-input></form>`}diff --git a/ui/component/or-rules/src/json-viewer/modals/or-rule-notification-modal.ts b/ui/component/or-rules/src/json-viewer/modals/or-rule-notification-modal.tsindex ade94b94f..8460026ab 100644--- a/ui/component/or-rules/src/json-viewer/modals/or-rule-notification-modal.ts+++ b/ui/component/or-rules/src/json-viewer/modals/or-rule-notification-modal.ts@@ -4,15 +4,15 @@ import {AssetQuery,} from "@openremote/model";-import "@openremote/or-input";-import {InputType} from "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";+import {InputType} from "@openremote/or-mwc-components/or-mwc-input";import i18next from "i18next";import {translate} from "@openremote/or-translate";-import {DialogAction, OrMwcDialog, OrMwcDialogOpenedEvent} from "@openremote/or-mwc-components/dist/or-mwc-dialog";+import {DialogAction, OrMwcDialog, OrMwcDialogOpenedEvent} from "@openremote/or-mwc-components/or-mwc-dialog";const checkValidity = (form:HTMLElement | null, dialog:OrMwcDialog) => {if(form) {- const inputs = form.querySelectorAll('or-input');+ const inputs = form.querySelectorAll('or-mwc-input');const elements = Array.prototype.slice.call(inputs);const valid = elements.every((element) => {@@ -106,14 +106,14 @@ export class OrRuleNotificationModal extends translate(i18next)(LitElement) {const notificationPickerModalActions: DialogAction[] = [{actionName: "cancel",- content: html`<or-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-mwc-input>`,action: (dialog) => {}},{actionName: "",- content: html`<or-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("ok")}" @click="${this.checkForm}"></or-input>`+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("ok")}" @click="${this.checkForm}"></or-mwc-input>`}];@@ -126,9 +126,9 @@ export class OrRuleNotificationModal extends translate(i18next)(LitElement) {};return html`- <or-input .type="${InputType.BUTTON}" .label="${i18next.t("message")}" @click="${notificationPickerModalOpen}"></or-input>+ <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("message")}" @click="${notificationPickerModalOpen}"></or-mwc-input><or-mwc-dialog id="notification-modal" dialogTitle="${this.title}" .dialogActions="${notificationPickerModalActions}"></or-mwc-dialog><slot class="notification-form-slot"></slot>`}-}\ No newline at end of file+}diff --git a/ui/component/or-rules/src/json-viewer/modals/or-rule-radial-modal.ts b/ui/component/or-rules/src/json-viewer/modals/or-rule-radial-modal.tsindex 9a9fa870d..39266d8d4 100644--- a/ui/component/or-rules/src/json-viewer/modals/or-rule-radial-modal.ts+++ b/ui/component/or-rules/src/json-viewer/modals/or-rule-radial-modal.ts@@ -8,13 +8,13 @@ import {import {getAssetTypeFromQuery,} from "../../index";-import "@openremote/or-input";-import {InputType} from "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";+import {InputType} from "@openremote/or-mwc-components/or-mwc-input";import i18next from "i18next";import {OrRulesJsonRuleChangedEvent} from "../or-rule-json-viewer";import {translate} from "@openremote/or-translate";-import {DialogAction, OrMwcDialog, OrMwcDialogOpenedEvent} from "@openremote/or-mwc-components/dist/or-mwc-dialog";+import {DialogAction, OrMwcDialog, OrMwcDialogOpenedEvent} from "@openremote/or-mwc-components/or-mwc-dialog";import {OrMap, OrMapClickedEvent} from '@openremote/or-map';import '@openremote/or-map/dist/markers/or-map-marker';import {LngLatLike} from "mapbox-gl";@@ -122,7 +122,7 @@ export class OrRuleRadialModal extends translate(i18next)(LitElement) {const radiusPickerModalActions: DialogAction[] = [{actionName: "cancel",- content: html`<or-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-mwc-input>`,action: () => {// Nothing to do here}@@ -130,7 +130,7 @@ export class OrRuleRadialModal extends translate(i18next)(LitElement) {{actionName: "ok",default: true,- content: html`<or-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("ok")}"></or-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("ok")}"></or-mwc-input>`,action: () => {}}@@ -150,7 +150,7 @@ export class OrRuleRadialModal extends translate(i18next)(LitElement) {this.renderDialogHTML(value);return html`- <or-input .type="${InputType.BUTTON}" .label="${i18next.t("area")}" @click="${radialPickerModalOpen}"></or-input>+ <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t("area")}" @click="${radialPickerModalOpen}"></or-mwc-input><or-mwc-dialog id="radial-modal" dialogTitle="area" .dialogActions="${radiusPickerModalActions}"></or-mwc-dialog>`}diff --git a/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.ts b/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.tsindex fbc21704c..03ed296f8 100644--- a/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.ts+++ b/ui/component/or-rules/src/json-viewer/or-rule-action-attribute.ts@@ -11,7 +11,7 @@ import {} from "@openremote/model";import manager, {AssetModelUtil, Util} from "@openremote/core";import "@openremote/or-attribute-input";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import i18next from "i18next";import {OrRulesJsonRuleChangedEvent} from "./or-rule-json-viewer";import {translate} from "@openremote/or-translate";@@ -136,9 +136,9 @@ export class OrRuleActionAttribute extends translate(i18next)(LitElement) {}return html`- <or-input id="matchSelect" .label="${i18next.t("asset")}" .type="${InputType.SELECT}" @or-input-changed="${(e: OrInputChangedEvent) => this._assetId = (e.detail.value)}" .readonly="${this.readonly || false}" .options="${idOptions}" .value="${idValue}"></or-input>+ <or-mwc-input id="matchSelect" .label="${i18next.t("asset")}" .type="${InputType.SELECT}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._assetId = (e.detail.value)}" .readonly="${this.readonly || false}" .options="${idOptions}" .value="${idValue}"></or-mwc-input>${attributes.length > 0 ? html`- <or-input id="attributeSelect" .label="${i18next.t("attribute")}" .type="${InputType.SELECT}" @or-input-changed="${(e: OrInputChangedEvent) => this.setActionAttributeName(e.detail.value)}" .readonly="${this.readonly || false}" .options="${attributes}" .value="${this.action.attributeName}"></or-input>+ <or-mwc-input id="attributeSelect" .label="${i18next.t("attribute")}" .type="${InputType.SELECT}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionAttributeName(e.detail.value)}" .readonly="${this.readonly || false}" .options="${attributes}" .value="${this.action.attributeName}"></or-mwc-input>${attributeInput}` : html`<or-translate value="No attributes with write permission"></or-translate>diff --git a/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts b/ui/component/or-rules/src/json-viewer/or-rule-action-notification.tsindex 6dea74402..da5b2e790 100644--- a/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts+++ b/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts@@ -11,7 +11,7 @@ import {UserQuery,WellknownAssets} from "@openremote/model";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import {getTargetTypeMap, OrRulesJsonRuleChangedEvent} from "./or-rule-json-viewer";import "./modals/or-rule-notification-modal";import "./forms/or-rule-form-email-message";@@ -103,7 +103,7 @@ export class OrRuleActionNotification extends LitElement {if (targetType === ActionTargetType.CUSTOM) {const template = html`- <or-input .type="${InputType.TEXT}" @or-input-changed="${(e: OrInputChangedEvent) => onTargetChangedCallback(targetType!, e.detail.value)}" ?readonly="${readonly}" .value="${action.target!.custom}" ></or-input>+ <or-mwc-input .type="${InputType.TEXT}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => onTargetChangedCallback(targetType!, e.detail.value)}" ?readonly="${readonly}" .value="${action.target!.custom}" ></or-mwc-input>`;targetValueTemplate = Promise.resolve(template);@@ -191,24 +191,24 @@ export class OrRuleActionNotification extends LitElement {}return html`- <or-input type="${InputType.SELECT}"+ <or-mwc-input type="${InputType.SELECT}".options="${values}".label="${label}".value="${value}"- @or-input-changed="${(e: OrInputChangedEvent) => onTargetChangedCallback(targetType!, e.detail.value)}"- ?readonly="${readonly}"></or-input>+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => onTargetChangedCallback(targetType!, e.detail.value)}"+ ?readonly="${readonly}"></or-mwc-input>`;});}targetValueTemplate = targetValueTemplate.then((valueTemplate) => {return html`- <or-input type="${InputType.SELECT}"+ <or-mwc-input type="${InputType.SELECT}".options="${allowedTargetTypes}".value="${targetType}".label="${i18next.t("recipients")}"- @or-input-changed="${(e: OrInputChangedEvent) => onTargetTypeChangedCallback(e.detail.value as ActionTargetType)}"- ?readonly="${readonly}"></or-input>+ @or-mwc-input-changed="${(e: OrInputChangedEvent) => onTargetTypeChangedCallback(e.detail.value as ActionTargetType)}"+ ?readonly="${readonly}"></or-mwc-input>${valueTemplate}`;});diff --git a/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts b/ui/component/or-rules/src/json-viewer/or-rule-asset-query.tsindex f9495e808..ac18d4ba1 100644--- a/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts+++ b/ui/component/or-rules/src/json-viewer/or-rule-asset-query.ts@@ -18,8 +18,8 @@ import {WellknownValueTypes} from "@openremote/model";import {AssetQueryOperator, getAssetIdsFromQuery, getAssetTypeFromQuery, RulesConfig} from "../index";-import "@openremote/or-input";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import "@openremote/or-attribute-input";import manager, {AssetModelUtil, Util} from "@openremote/core";import i18next from "i18next";@@ -174,9 +174,9 @@ export class OrRuleAssetQuery extends translate(i18next)(LitElement) {const operators = attributeName ? this.getOperators(assetDescriptor, descriptors ? descriptors[0] : undefined, descriptors ? descriptors[1] : undefined, attribute, attributeName) : [];return html`- <or-input type="${InputType.SELECT}" class="min-width" @or-input-changed="${(e: OrInputChangedEvent) => this.setAttributeName(attributePredicate, e.detail.value)}" .readonly="${this.readonly || false}" .options="${attributes}" .value="${attributeName}" .label="${i18next.t("attribute")}"></or-input>+ <or-mwc-input type="${InputType.SELECT}" class="min-width" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setAttributeName(attributePredicate, e.detail.value)}" .readonly="${this.readonly || false}" .options="${attributes}" .value="${attributeName}" .label="${i18next.t("attribute")}"></or-mwc-input>- ${attributeName ? html`<or-input type="${InputType.SELECT}" class="min-width" @or-input-changed="${(e: OrInputChangedEvent) => this.setOperator(assetDescriptor, attribute, attributeName, attributePredicate, e.detail.value)}" .readonly="${this.readonly || false}" .options="${operators}" .value="${operator}" .label="${i18next.t("operator")}"></or-input>` : ``}+ ${attributeName ? html`<or-mwc-input type="${InputType.SELECT}" class="min-width" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setOperator(assetDescriptor, attribute, attributeName, attributePredicate, e.detail.value)}" .readonly="${this.readonly || false}" .options="${operators}" .value="${operator}" .label="${i18next.t("operator")}"></or-mwc-input>` : ``}${attributePredicate ? this.attributePredicateValueEditorTemplate(assetDescriptor, asset, attributePredicate) : ``}`;@@ -291,7 +291,7 @@ export class OrRuleAssetQuery extends translate(i18next)(LitElement) {return html`<div class="attribute-group">- <or-input id="idSelect" type="${InputType.SELECT}" @or-input-changed="${(e: OrInputChangedEvent) => this._assetId = (e.detail.value)}" .readonly="${this.readonly || false}" .options="${idOptions}" .value="${idValue}" .label="${i18next.t("asset")}"></or-input>+ <or-mwc-input id="idSelect" type="${InputType.SELECT}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._assetId = (e.detail.value)}" .readonly="${this.readonly || false}" .options="${idOptions}" .value="${idValue}" .label="${i18next.t("asset")}"></or-mwc-input>${this.query.attributes && this.query.attributes.items ? this.query.attributes.items.map((attributePredicate) => {diff --git a/ui/component/or-rules/src/json-viewer/or-rule-condition.ts b/ui/component/or-rules/src/json-viewer/or-rule-condition.tsindex d338a0faa..8fa91abcc 100644--- a/ui/component/or-rules/src/json-viewer/or-rule-condition.ts+++ b/ui/component/or-rules/src/json-viewer/or-rule-condition.ts@@ -2,11 +2,11 @@ import {css, customElement, html, LitElement, property, query, TemplateResult} fimport {AssetTypeInfo, RuleCondition, WellknownAssets} from "@openremote/model";import {ConditionType, getAssetTypeFromQuery, RulesConfig} from "../index";import "./or-rule-asset-query";-import "@openremote/or-mwc-components/dist/or-mwc-menu";-import {getContentWithMenuTemplate, MenuItem} from "@openremote/or-mwc-components/dist/or-mwc-menu";+import "@openremote/or-mwc-components/or-mwc-menu";+import {getContentWithMenuTemplate, MenuItem} from "@openremote/or-mwc-components/or-mwc-menu";import "@openremote/or-icon";import "@openremote/or-translate";-import {InputType} from "@openremote/or-input";+import {InputType} from "@openremote/or-mwc-components/or-mwc-input";import {AssetModelUtil, Util} from "@openremote/core";import {i18next, translate} from "@openremote/or-translate";import {OrRulesJsonRuleChangedEvent} from "./or-rule-json-viewer";@@ -147,13 +147,13 @@ class OrRuleCondition extends translate(i18next)(LitElement) {}if(this.readonly) {typeTemplate = html`- <or-input readonly type="${InputType.BUTTON}" .icon="${buttonIcon || ""}"></or-input>+ <or-mwc-input readonly type="${InputType.BUTTON}" .icon="${buttonIcon || ""}"></or-mwc-input>`;} else {typeTemplate = html`- <div id="type" style="--or-input-color: #${buttonColor}">+ <div id="type" style="--or-mwc-input-color: #${buttonColor}">${getContentWithMenuTemplate(- html`<or-input type="${InputType.BUTTON}" .icon="${buttonIcon || ""}"></or-input>`,+ html`<or-mwc-input type="${InputType.BUTTON}" .icon="${buttonIcon || ""}"></or-mwc-input>`,getWhenTypesMenu(this.config, this.assetInfos),type,(values: string[] | string) => this.type = values as ConditionType)}diff --git a/ui/component/or-rules/src/json-viewer/or-rule-then-otherwise.ts b/ui/component/or-rules/src/json-viewer/or-rule-then-otherwise.tsindex dc6f98381..c2e044490 100644--- a/ui/component/or-rules/src/json-viewer/or-rule-then-otherwise.ts+++ b/ui/component/or-rules/src/json-viewer/or-rule-then-otherwise.ts@@ -12,8 +12,8 @@ import {WellknownAssets} from "@openremote/model";import i18next from "i18next";-import {InputType} from "@openremote/or-input";-import {getContentWithMenuTemplate, MenuItem} from "@openremote/or-mwc-components/dist/or-mwc-menu";+import {InputType} from "@openremote/or-mwc-components/or-mwc-input";+import {getContentWithMenuTemplate, MenuItem} from "@openremote/or-mwc-components/or-mwc-menu";import {AssetModelUtil, Util} from "@openremote/core";import "./or-rule-action-attribute";import "./or-rule-action-notification";@@ -233,13 +233,13 @@ class OrRuleThenOtherwise extends translate(i18next)(LitElement) {}if(readonly) {recurrenceTemplate = html`- <or-input .type="${InputType.BUTTON}" .label="${i18next.t(value)}"></or-input>+ <or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t(value)}"></or-mwc-input>`;} else {recurrenceTemplate = html`- <div style="--or-input-color: #${buttonColor}; margin-right: 6px;">+ <div style="--or-mwc-input-color: #${buttonColor}; margin-right: 6px;">${getContentWithMenuTemplate(- html`<or-input .type="${InputType.BUTTON}" .label="${i18next.t(value)}"></or-input>`,+ html`<or-mwc-input .type="${InputType.BUTTON}" .label="${i18next.t(value)}"></or-mwc-input>`,getRecurrenceMenu(this.config),value,(value) => this.setRecurrenceOption(value as RecurrenceOption))}@@ -297,13 +297,13 @@ class OrRuleThenOtherwise extends translate(i18next)(LitElement) {if(readonly) {typeTemplate = html`- <or-input type="${InputType.BUTTON}" .icon="${buttonIcon || ""}"></or-input>+ <or-mwc-input type="${InputType.BUTTON}" .icon="${buttonIcon || ""}"></or-mwc-input>`;} else {typeTemplate = html`- <div id="type" style="--or-input-color: #${buttonColor}">+ <div id="type" style="--or-mwc-input-color: #${buttonColor}">${getContentWithMenuTemplate(- html`<or-input type="${InputType.BUTTON}" .icon="${buttonIcon || ""}"></or-input>`,+ html`<or-mwc-input type="${InputType.BUTTON}" .icon="${buttonIcon || ""}"></or-mwc-input>`,getActionTypesMenu(this.config, this.assetInfos),action.action,(values: string[] | string) => this.setActionType(actions, action, values as string))}@@ -353,7 +353,7 @@ class OrRuleThenOtherwise extends translate(i18next)(LitElement) {${thenAllowAdd ? html`<span class="add-button-wrapper">${getContentWithMenuTemplate(- html`<or-input class="plus-button" type="${InputType.BUTTON}" icon="plus"></or-input>`,+ html`<or-mwc-input class="plus-button" type="${InputType.BUTTON}" icon="plus"></or-mwc-input>`,getActionTypesMenu(this.config, this.assetInfos),undefined,(values: string[] | string) => this.addAction(values as string))}diff --git a/ui/component/or-rules/src/json-viewer/or-rule-when.ts b/ui/component/or-rules/src/json-viewer/or-rule-when.tsindex c5f421e60..5b541d70c 100644--- a/ui/component/or-rules/src/json-viewer/or-rule-when.ts+++ b/ui/component/or-rules/src/json-viewer/or-rule-when.ts@@ -4,10 +4,10 @@ import {OrRulesRuleUnsupportedEvent, RulesConfig} from "../index";import {buttonStyle} from "../style";import "./or-rule-condition";import i18next from "i18next";-import {InputType} from "@openremote/or-input";+import {InputType} from "@openremote/or-mwc-components/or-mwc-input";import {OrRulesJsonRuleChangedEvent} from "./or-rule-json-viewer";import {getWhenTypesMenu, updateRuleConditionType} from "./or-rule-condition";-import {getContentWithMenuTemplate} from "@openremote/or-mwc-components/dist/or-mwc-menu";+import {getContentWithMenuTemplate} from "@openremote/or-mwc-components/or-mwc-menu";import { translate } from "@openremote/or-translate";enum ResetOption {@@ -193,7 +193,7 @@ class OrRuleWhen extends translate(i18next)(LitElement) {addTemplate = html`<span class="add-button-wrapper">${getContentWithMenuTemplate(- html`<or-input class="plus-button" type="${InputType.BUTTON}" icon="plus"></or-input>`,+ html`<or-mwc-input class="plus-button" type="${InputType.BUTTON}" icon="plus"></or-mwc-input>`,getWhenTypesMenu(this.config, this.assetInfos),undefined,(values: string[] | string) => this.addCondition(group, values as string))}@@ -248,7 +248,7 @@ class OrRuleWhen extends translate(i18next)(LitElement) {<or-panel><span class="add-button-wrapper">${getContentWithMenuTemplate(- html`<or-input class="plus-button" type="${InputType.BUTTON}" icon="plus"></or-input>`,+ html`<or-mwc-input class="plus-button" type="${InputType.BUTTON}" icon="plus"></or-mwc-input>`,getWhenTypesMenu(this.config, this.assetInfos),undefined,(values: string[] | string) => this.addGroup(this.rule!.when!, values as string))}diff --git a/ui/component/or-rules/src/or-rule-list.ts b/ui/component/or-rules/src/or-rule-list.tsindex e50e34232..509f4a081 100644--- a/ui/component/or-rules/src/or-rule-list.ts+++ b/ui/component/or-rules/src/or-rule-list.ts@@ -2,8 +2,8 @@ import {css, customElement, html, LitElement, property, PropertyValues, Templateimport {CalendarEvent, ClientRole, RulesetLang, RulesetUnion, TenantRuleset, WellknownMetaItems, WellknownRulesetMetaItems} from "@openremote/model";import "@openremote/or-translate";import manager, {OREvent, Util} from "@openremote/core";-import "@openremote/or-input";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import {style as OrAssetTreeStyle} from "@openremote/or-asset-tree";import {AddEventDetail,@@ -16,12 +16,11 @@ import {RulesConfig,RulesetNode} from "./index";-import "@openremote/or-mwc-components/dist/or-mwc-menu";-import {MenuItem} from "@openremote/or-mwc-components/dist/or-mwc-menu";+import "@openremote/or-mwc-components/or-mwc-menu";+import {MenuItem, getContentWithMenuTemplate} from "@openremote/or-mwc-components/or-mwc-menu";import {translate} from "@openremote/or-translate";import i18next from "i18next";-import {getContentWithMenuTemplate} from "../../or-mwc-components/dist/or-mwc-menu";-import {showErrorDialog, showOkCancelDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";+import {showErrorDialog, showOkCancelDialog} from "@openremote/or-mwc-components/or-mwc-dialog";import {GenericAxiosResponse} from "@openremote/rest";// language=CSS@@ -60,7 +59,7 @@ const style = css`}#header-btns {- --or-input-color: var(--internal-or-rules-text-color);+ --or-mwc-input-color: var(--internal-or-rules-text-color);}.header-ruleset-type p {@@ -256,14 +255,14 @@ export class OrRuleList extends translate(i18next)(LitElement) {if (!this._isReadonly()) {if (allowedLanguages && allowedLanguages.length > 1) {addTemplate = getContentWithMenuTemplate(- html`<or-input type="${InputType.BUTTON}" icon="plus"></or-input>`,+ html`<or-mwc-input type="${InputType.BUTTON}" icon="plus"></or-mwc-input>`,allowedLanguages.map((l) => {return {value: l, text: i18next.t(l)} as MenuItem;}),this.language,(v) => this._onAddClicked(v as RulesetLang));} else {- addTemplate = html`<or-input type="${InputType.BUTTON}" icon="plus" @click="${() => this._onAddClicked(this.language!)}"></or-input>`;+ addTemplate = html`<or-mwc-input type="${InputType.BUTTON}" icon="plus" @click="${() => this._onAddClicked(this.language!)}"></or-mwc-input>`;}}return html`@@ -273,7 +272,7 @@ export class OrRuleList extends translate(i18next)(LitElement) {<p>${i18next.t("realmRules")}</p><div style="flex: 1 1 0; display: flex;">- <or-input style="margin: auto;" type="${InputType.SWITCH}" @or-input-changed="${(evt: OrInputChangedEvent) => this._globalRulesets = evt.detail.value}"></or-input>+ <or-mwc-input style="margin: auto;" type="${InputType.SWITCH}" @or-mwc-input-changed="${(evt: OrInputChangedEvent) => this._globalRulesets = evt.detail.value}"></or-mwc-input></div><p>${i18next.t("globalRules")}</p>@@ -286,13 +285,13 @@ export class OrRuleList extends translate(i18next)(LitElement) {</div><div id="header-btns">- <or-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length === 0}" type="${InputType.BUTTON}" icon="content-copy" @click="${() => this._onCopyClicked()}"></or-input>- <or-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length === 0}" type="${InputType.BUTTON}" icon="delete" @click="${() => this._onDeleteClicked()}"></or-input>+ <or-mwc-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length === 0}" type="${InputType.BUTTON}" icon="content-copy" @click="${() => this._onCopyClicked()}"></or-mwc-input>+ <or-mwc-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length === 0}" type="${InputType.BUTTON}" icon="delete" @click="${() => this._onDeleteClicked()}"></or-mwc-input>${addTemplate}- <or-input hidden type="${InputType.BUTTON}" icon="magnify" @click="${() => this._onSearchClicked()}"></or-input>+ <or-mwc-input hidden type="${InputType.BUTTON}" icon="magnify" @click="${() => this._onSearchClicked()}"></or-mwc-input>${getContentWithMenuTemplate(- html`<or-input type="${InputType.BUTTON}" icon="sort-variant"></or-input>`,+ html`<or-mwc-input type="${InputType.BUTTON}" icon="sort-variant"></or-mwc-input>`,sortOptions.map((sort) => { return { value: sort, text: i18next.t(sort) } as MenuItem; }),this.sortBy,(v) => this._onSortClicked(v as string))}diff --git a/ui/component/or-rules/src/or-rule-validity.ts b/ui/component/or-rules/src/or-rule-validity.tsindex 5d7c0c646..8925d5aad 100644--- a/ui/component/or-rules/src/or-rule-validity.ts+++ b/ui/component/or-rules/src/or-rule-validity.ts@@ -1,12 +1,12 @@import {css, customElement, html, LitElement, property, PropertyValues, query, TemplateResult} from "lit-element";import {CalendarEvent, RulesetUnion, WellknownRulesetMetaItems} from "@openremote/model";import {OrRulesRuleChangedEvent} from "./index";-import "@openremote/or-input";-import {InputType, OrInputChangedEvent} from "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";+import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";import i18next from "i18next";import {translate} from "@openremote/or-translate";-import {OrMwcDialog, showDialog} from "@openremote/or-mwc-components/dist/or-mwc-dialog";+import {OrMwcDialog, showDialog} from "@openremote/or-mwc-components/or-mwc-dialog";import {ByWeekday, RRule, Weekday} from 'rrule'import moment from "moment";@@ -217,7 +217,7 @@ export class OrRuleValidity extends translate(i18next)(LitElement) {if(!this.ruleset) return html``;return html`- <or-input .type="${InputType.BUTTON}" .label="${this.timeLabel()}" @click="${() => this.showDialog()}"></or-input>+ <or-mwc-input .type="${InputType.BUTTON}" .label="${this.timeLabel()}" @click="${() => this.showDialog()}"></or-mwc-input>`;}@@ -228,7 +228,7 @@ export class OrRuleValidity extends translate(i18next)(LitElement) {actions: [{actionName: "cancel",- content: html`<or-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("cancel")}"></or-mwc-input>`,action: () => {this._dialog = undefined;}@@ -236,7 +236,7 @@ export class OrRuleValidity extends translate(i18next)(LitElement) {{actionName: "ok",default: true,- content: html`<or-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("apply")}"></or-input>`,+ content: html`<or-mwc-input class="button" .type="${InputType.BUTTON}" .label="${i18next.t("apply")}"></or-mwc-input>`,action: () => {if (this.ruleset && this.ruleset.meta) {if (this.getValidityType() === "validityAlways") {@@ -276,39 +276,39 @@ export class OrRuleValidity extends translate(i18next)(LitElement) {return html`<div style="min-height: 200px; min-width: 635px; display:grid; flex-direction: row;"><div class="layout horizontal">- <or-input .value="${validityType}" .type="${InputType.SELECT}" .options="${validityTypes}" @or-input-changed="${(e: OrInputChangedEvent) => this.setValidityType(e.detail.value)}" ></or-input>+ <or-mwc-input .value="${validityType}" .type="${InputType.SELECT}" .options="${validityTypes}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setValidityType(e.detail.value)}" ></or-mwc-input></div>${validity && (validityType === "validityPeriod" || validityType === "validityRecurrence") ? html`<label style="display:block; margin-top: 20px;"><or-translate value="period"></or-translate></label><div style="display: flex; justify-content: space-between;" class="layout horizontal"><div>- <or-input value="${moment(validity.start).format("YYYY-MM-DD")}" .type="${InputType.DATE}" @or-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "start")}" .label="${i18next.t("from")}"></or-input>- <or-input .disabled=${this.isAllDay()} .value="${moment(validity.start).format("HH:mm")}" .type="${InputType.TIME}" @or-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "dtstart-time")}" .label="${i18next.t("from")}"></or-input>+ <or-mwc-input value="${moment(validity.start).format("YYYY-MM-DD")}" .type="${InputType.DATE}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "start")}" .label="${i18next.t("from")}"></or-mwc-input>+ <or-mwc-input .disabled=${this.isAllDay()} .value="${moment(validity.start).format("HH:mm")}" .type="${InputType.TIME}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "dtstart-time")}" .label="${i18next.t("from")}"></or-mwc-input></div><div>- <or-input .value="${moment(validity.end).format("YYYY-MM-DD")}" .type="${InputType.DATE}" @or-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "end")}" .label="${i18next.t("to")}"></or-input>- <or-input .disabled=${this.isAllDay()} .value="${moment(validity.end).format("HH:mm")}" .type="${InputType.TIME}" @or-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "until-time")}" .label="${i18next.t("to")}"></or-input>+ <or-mwc-input .value="${moment(validity.end).format("YYYY-MM-DD")}" .type="${InputType.DATE}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "end")}" .label="${i18next.t("to")}"></or-mwc-input>+ <or-mwc-input .disabled=${this.isAllDay()} .value="${moment(validity.end).format("HH:mm")}" .type="${InputType.TIME}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "until-time")}" .label="${i18next.t("to")}"></or-mwc-input></div></div><div class="layout horizontal">- <or-input .value=${this.isAllDay()} @or-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "all-day")}" .type="${InputType.CHECKBOX}" .label="${i18next.t("allDay")}"></or-input>+ <or-mwc-input .value=${this.isAllDay()} @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "all-day")}" .type="${InputType.CHECKBOX}" .label="${i18next.t("allDay")}"></or-mwc-input></div>` : ``}${validityType === "validityRecurrence" ? html`<label style="display: block; margin-top: 20px;"><or-translate value="repeatOccurrenceEvery"></or-translate></label><div class="layout horizontal">- <or-input .value="${selectedOptions}" .type="${InputType.CHECKBOX_LIST}" .options="${options}" .label="${i18next.t("daysOfTheWeek")}" @or-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "byweekday")}" ></or-input>+ <or-mwc-input .value="${selectedOptions}" .type="${InputType.CHECKBOX_LIST}" .options="${options}" .label="${i18next.t("daysOfTheWeek")}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "byweekday")}" ></or-mwc-input></div><label style="display:block; margin-top: 20px;"><or-translate value="repetitionEnds"></or-translate></label><div class="layout horizontal">- <or-input .value="${!this._rrule!.options.until}" @or-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "never-ends")}" .type="${InputType.CHECKBOX}" .label="${i18next.t("never")}"></or-input>+ <or-mwc-input .value="${!this._rrule!.options.until}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "never-ends")}" .type="${InputType.CHECKBOX}" .label="${i18next.t("never")}"></or-mwc-input></div><div class="layout horizontal">- <or-input ?disabled="${!this._rrule!.options.until}" .value="${this._rrule!.options.until ? moment(this._rrule!.options.until).format("YYYY-MM-DD") : moment().add(1, 'year').format('YYYY-MM-DD')}" .type="${InputType.DATE}" @or-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "until")}" .label="${i18next.t("to")}"></or-input>+ <or-mwc-input ?disabled="${!this._rrule!.options.until}" .value="${this._rrule!.options.until ? moment(this._rrule!.options.until).format("YYYY-MM-DD") : moment().add(1, 'year').format('YYYY-MM-DD')}" .type="${InputType.DATE}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setRRuleValue(e.detail.value, "until")}" .label="${i18next.t("to")}"></or-mwc-input></div>` : ``}</div>`;diff --git a/ui/component/or-rules/src/or-rule-viewer.ts b/ui/component/or-rules/src/or-rule-viewer.tsindex fb55c3d4b..ce8788640 100644--- a/ui/component/or-rules/src/or-rule-viewer.ts+++ b/ui/component/or-rules/src/or-rule-viewer.ts@@ -13,12 +13,12 @@ import "./json-viewer/or-rule-json-viewer";import "./or-rule-text-viewer";import "./or-rule-validity";import "./flow-viewer/components/flow-editor";-import "@openremote/or-input";+import "@openremote/or-mwc-components/or-mwc-input";import {translate} from "@openremote/or-translate";-import {InputType, OrInputChangedEvent, OrInput} from "@openremote/or-input";+import {InputType, OrInputChangedEvent, OrInput} from "@openremote/or-mwc-components/or-mwc-input";import i18next from "i18next";import { GenericAxiosResponse } from "@openremote/rest";-import { showErrorDialog } from "@openremote/or-mwc-components/dist/or-mwc-dialog";+import { showErrorDialog } from "@openremote/or-mwc-components/or-mwc-dialog";// language=CSSexport const style = css`@@ -179,16 +179,16 @@ export class OrRuleViewer extends translate(i18next)(LitElement) {return html`<div id="main-wrapper" class="wrapper"><div id="rule-header">- <or-input id="rule-name" outlined .type="${InputType.TEXT}" .label="${i18next.t("ruleName")}" ?focused="${this._focusName}" .value="${this.ruleset ? this.ruleset.name : null}" ?disabled="${this._isReadonly()}" required minlength="3" maxlength="255" @or-input-changed="${(e: OrInputChangedEvent) => this._changeName(e.detail.value)}"></or-input>+ <or-mwc-input id="rule-name" outlined .type="${InputType.TEXT}" .label="${i18next.t("ruleName")}" ?focused="${this._focusName}" .value="${this.ruleset ? this.ruleset.name : null}" ?disabled="${this._isReadonly()}" required minlength="3" maxlength="255" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this._changeName(e.detail.value)}"></or-mwc-input><or-rule-validity id="rule-header-validity" .ruleset="${this.ruleset}"></or-rule-validity><div id="rule-header-controls"><span id="active-wrapper"><or-translate value="enabled"></or-translate>- <or-input .type="${InputType.SWITCH}" .value="${this.ruleset && this.ruleset.enabled}" ?disabled="${!this.ruleset.id}" @or-input-changed="${this._toggleEnabled}"></or-input>+ <or-mwc-input .type="${InputType.SWITCH}" .value="${this.ruleset && this.ruleset.enabled}" ?disabled="${!this.ruleset.id}" @or-mwc-input-changed="${this._toggleEnabled}"></or-mwc-input></span>- <or-input .type="${InputType.BUTTON}" id="save-btn" .label="${i18next.t("save")}" raised ?disabled="${this._cannotSave()}" @or-input-changed="${this._onSaveClicked}"></or-input>+ <or-mwc-input .type="${InputType.BUTTON}" id="save-btn" .label="${i18next.t("save")}" raised ?disabled="${this._cannotSave()}" @or-mwc-input-changed="${this._onSaveClicked}"></or-mwc-input></div></div>diff --git a/ui/component/or-rules/tsconfig.json b/ui/component/or-rules/tsconfig.jsonindex aa85e573c..cde4384a3 100644--- a/ui/component/or-rules/tsconfig.json+++ b/ui/component/or-rules/tsconfig.json@@ -14,7 +14,6 @@{ "path": "../or-icon" },{ "path": "../or-panel" },{ "path": "../or-mwc-components" },- { "path": "../or-input" },{ "path": "../or-attribute-input" },{ "path": "../or-asset-tree" }]diff --git a/ui/component/or-smart-notify/README.md b/ui/component/or-smart-notify/README.mdindex 651417b16..b1cceb2c1 100644--- a/ui/component/or-smart-notify/README.md+++ b/ui/component/or-smart-notify/README.md@@ -1,4 +1,4 @@-# @openremote/or-input \<or-smart-notify\>+# @openremote/or-smart-notify \<or-smart-notify\>[![NPM Version][npm-image]][npm-url][![Linux Build][travis-image]][travis-url][![Test Coverage][coveralls-image]][coveralls-url]diff --git a/ui/component/or-table/README.md b/ui/component/or-table/README.mdindex ff8d337f1..cb446bbca 100644--- a/ui/component/or-table/README.md+++ b/ui/component/or-table/README.md@@ -24,7 +24,7 @@ Internet Explorer 11 is also supported.[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+[npm-url]: https://npmjs.org/package/@openremote/or-table[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.svgdiff --git a/ui/component/or-translate/README.md b/ui/component/or-translate/README.mdindex 785f1e342..dfe94a6e1 100644--- a/ui/component/or-translate/README.md+++ b/ui/component/or-translate/README.md@@ -59,7 +59,7 @@ Internet Explorer 11 is also supported.[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+[npm-url]: https://npmjs.org/package/@openremote/or-translate[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