Skip to content

armgit / core

Public Imported from GitHub
0

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

Minor & Package updates

robindekkers681a558b5e61
diff --git a/ui/component/core/package.json b/ui/component/core/package.json
index 188596b1c..ea9254e6f 100644
--- a/ui/component/core/package.json
+++ b/ui/component/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@openremote/core",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "OpenRemote 3.x Core",
"main": "dist/index.js",
"types": "src/index.ts",
diff --git a/ui/component/model/package.json b/ui/component/model/package.json
index 5275adbc4..f48f97c04 100644
--- a/ui/component/model/package.json
+++ b/ui/component/model/package.json
@@ -1,6 +1,6 @@
{
"name": "@openremote/model",
- "version": "1.0.1",
+ "version": "1.0.2",
"main": "dist/index.js",
"description": "OpenRemote 3.x Model Types",
"types": "src/index.ts",
diff --git a/ui/component/or-input/src/index.ts b/ui/component/or-input/src/index.ts
index 619585257..4edc7fcc7 100644
--- a/ui/component/or-input/src/index.ts
+++ b/ui/component/or-input/src/index.ts
@@ -1,7 +1,7 @@
-import {html, LitElement, property, PropertyValues} from 'lit-element';
+import {html, LitElement, property, PropertyValues} from "lit-element";
import openremote from "@openremote/core";
-import {orInputStyle} from './style';
+import {orInputStyle} from "./style";
class OrInput extends LitElement {
@property({type: String})
@@ -29,18 +29,18 @@ class OrInput extends LitElement {
protected render() {
return html`
- <input class="or-input" ?required="${this.required}" type="${this.type}" name="${this.name}" @change="${this.onChange}" .value="${this.value}" ?disabled="${this.disabled} />
+ <input class="or-input" ?required="${this.required}" type="${this.type}" name="${this.name}" @change="${this.onChange}" value="${this.value}" ?disabled="${this.disabled}" />
`;
}
onChange() {
- if(this.shadowRoot){
- const input = (<HTMLInputElement> this.shadowRoot.querySelector('.or-input'));
+ if (this.shadowRoot) {
+ const input = (<HTMLInputElement> this.shadowRoot.querySelector(".or-input"));
const value = input.value;
const name = input.name;
// Launch event for all parent elements
- let event = new CustomEvent('or-input:changed', {
+ const event = new CustomEvent("or-input:changed", {
detail: { value: value, name: name },
bubbles: true,
composed: true });
@@ -59,4 +59,4 @@ class OrInput extends LitElement {
}
}
-window.customElements.define('or-input', OrInput);
+window.customElements.define("or-input", OrInput);
diff --git a/ui/component/or-map/package.json b/ui/component/or-map/package.json
index 2c8a6cdc4..5ebb95613 100644
--- a/ui/component/or-map/package.json
+++ b/ui/component/or-map/package.json
@@ -1,6 +1,6 @@
{
"name": "@openremote/or-map",
- "version": "1.0.0-alpha",
+ "version": "1.0.2-alpha",
"description": "Displays s vector or raster map",
"main": "dist/index.js",
"types": "src/index.ts",
diff --git a/ui/component/or-rules-editor/package.json b/ui/component/or-rules-editor/package.json
index 1570d2941..822a0a126 100644
--- a/ui/component/or-rules-editor/package.json
+++ b/ui/component/or-rules-editor/package.json
@@ -11,12 +11,12 @@
"author": "OpenRemote",
"license": "AGPL-3.0-or-later",
"dependencies": {
- "@openremote/core": "^1.0.0",
- "@openremote/model": "^1.0.1",
+ "@openremote/core": "^1.0.2",
+ "@openremote/model": "^1.0.2",
"@openremote/or-input": "^1.0.0",
"@openremote/or-select": "^1.0.0",
"@openremote/or-translate": "^1.0.0",
- "@openremote/rest": "^1.0.0",
+ "@openremote/rest": "^1.0.2",
"@types/lodash-es": "^4.17.3",
"lit-element": "^2.1.0",
"lodash-es": "^4.17.11",
diff --git a/ui/component/or-rules-editor/src/const/rule-config.ts b/ui/component/or-rules-editor/src/const/rule-config.ts
index 22c377541..449b0e689 100644
--- a/ui/component/or-rules-editor/src/const/rule-config.ts
+++ b/ui/component/or-rules-editor/src/const/rule-config.ts
@@ -30,7 +30,7 @@ export const rulesEditorConfig = {
originRegion: {
options: regions
},
- passengerCapacity: {},
+ pax: {},
languageCodes: {
options: languages
},
diff --git a/ui/component/or-rules-editor/src/index.ts b/ui/component/or-rules-editor/src/index.ts
index c1a937ef3..995b9585f 100644
--- a/ui/component/or-rules-editor/src/index.ts
+++ b/ui/component/or-rules-editor/src/index.ts
@@ -147,7 +147,6 @@ class OrRulesEditor extends translate(i18next)(LitElement) {
// ID is not found when a new ruleset is added
if (index > -1) {
updatedRuleset = this.rulesets[index];
- console.log(updatedRuleset, this.rulesets[index]);
} else {
updatedRuleset = this.rulesets[this.rulesets.length - 1];
}
@@ -171,7 +170,7 @@ class OrRulesEditor extends translate(i18next)(LitElement) {
const newRule = cloneDeep(rulesetTemplate);
this.rulesets = [...this.rulesets, rulesetTemplate];
this.ruleset = newRule;
- this.computeRuleset()
+ this.computeRuleset();
// this.readRules();
}
}
diff --git a/ui/component/or-rules-editor/src/or-rule-then/index.ts b/ui/component/or-rules-editor/src/or-rule-then/index.ts
index 866e8fa3a..815a31425 100644
--- a/ui/component/or-rules-editor/src/or-rule-then/index.ts
+++ b/ui/component/or-rules-editor/src/or-rule-then/index.ts
@@ -33,7 +33,7 @@ class OrRuleThen extends LitElement {
return html`
<div class="rule-content-section">
<div class="rule-then-container bg-white shadow">
- <strong>Dan..</strong>
+ <strong>Dan...</strong>
${this.rule && this.rule.then ? this.rule.then.map((then: RuleActionUnion) => {
return html`
diff --git a/ui/component/or-rules-editor/src/or-rule-when-condition/index.ts b/ui/component/or-rules-editor/src/or-rule-when-condition/index.ts
index 981fe364d..114f69cf1 100644
--- a/ui/component/or-rules-editor/src/or-rule-when-condition/index.ts
+++ b/ui/component/or-rules-editor/src/or-rule-when-condition/index.ts
@@ -66,10 +66,10 @@ class OrRuleWhenCondition extends LitElement {
${this.predicate.name ? html`
<or-select-asset-attribute type="when" value="${this.predicate.name.value}"></or-select-asset-attribute>
-
+
${this.predicate.value && this.predicate.value.predicateType === "string" ? html`
${this.predicate.name.value ? html`
- <or-select-operator .type="${this.getAttributeDescriptor(this.predicate.name.value)!.valueDescriptor!.valueType}" .value="${this.predicate.value.match}"></or-select-operator>
+ <or-select-operator type="${this.getAttributeDescriptor(this.predicate.name.value)!.valueDescriptor!.valueType}" .value="${this.predicate.value.match}"></or-select-operator>
` : ``}
${this.predicate.name.value && this.predicate.value.match ? html`
@@ -80,7 +80,7 @@ class OrRuleWhenCondition extends LitElement {
`}
` : ``}
- ${openremote.hasRole("write:assets") ? html`
+ ${openremote.hasRole("write:assets") ? html`
${this.predicate.value.value ? html`
<a style="margin-left: auto;" @click="${this.deleteCondition}">
diff --git a/ui/component/or-rules-editor/src/or-rule-when/index.ts b/ui/component/or-rules-editor/src/or-rule-when/index.ts
index 3c2756675..0170f6bfd 100644
--- a/ui/component/or-rules-editor/src/or-rule-when/index.ts
+++ b/ui/component/or-rules-editor/src/or-rule-when/index.ts
@@ -35,7 +35,7 @@ class OrRuleWhen extends LitElement {
return html`
<div class="rule-content-section">
<div class="rule-when-container bg-white shadow">
- <strong>Als..</strong>
+ <strong>Als...</strong>
${this.rule && this.rule.when && this.rule.when.predicates && this.rule.when.predicates.length > 0 && this.rule.when.predicates[0].assets && this.rule.when.predicates[0].assets.types && this.rule.when.predicates[0].assets.attributes && this.rule.when.predicates[0].assets.attributes.predicates ? html`
${this.rule.when.predicates[0].assets.attributes.predicates.map((predicate: AttributePredicate, index) => {
return html`
diff --git a/ui/component/or-rules-editor/src/selects/or-select-operator/index.ts b/ui/component/or-rules-editor/src/selects/or-select-operator/index.ts
index cb0cb3fe0..fd1314072 100644
--- a/ui/component/or-rules-editor/src/selects/or-select-operator/index.ts
+++ b/ui/component/or-rules-editor/src/selects/or-select-operator/index.ts
@@ -1,15 +1,15 @@
import {html, LitElement, property, customElement, PropertyValues} from "lit-element";
import openremote from "@openremote/core";
-import {AttributeValueType, BaseAssetQueryMatch, BaseAssetQueryOperator, AttributeValueDescriptor} from "@openremote/model";
+import {AttributeValueType, BaseAssetQueryMatch, BaseAssetQueryOperator, AttributeValueDescriptor, ValueType} from "@openremote/model";
import {selectStyle} from "@openremote/or-select/dist/style";
import {AssetModelUtil} from "@openremote/core/dist";
-@customElement('or-select-operator')
+@customElement("or-select-operator")
class OrRuleWhen extends LitElement {
- @property({type: Object})
- type?: AttributeValueDescriptor;
+ @property({type: String})
+ type?: ValueType;
@property({type: String})
value?: BaseAssetQueryOperator;
@@ -30,7 +30,7 @@ class OrRuleWhen extends LitElement {
<select ?disabled="${this.disabled}" id="or-select-operator" @change="${this.onChange}">
<option ?selected="${this.value === BaseAssetQueryOperator.EQUALS}" value="${BaseAssetQueryOperator.EQUALS}">=</option>
<option ?selected="${this.value === BaseAssetQueryOperator.NOT_EQUALS}" value="${BaseAssetQueryOperator.NOT_EQUALS}">!=</option>
- ${AssetModelUtil.attributeValueDescriptorsMatch(this.type, AttributeValueType.NUMBER) ? html`
+ ${this.type === ValueType.NUMBER ? html`
<option ?selected="${this.value === BaseAssetQueryOperator.LESS_THAN}" value="${BaseAssetQueryOperator.LESS_THAN}" value="LESS_THAN"><</option>
<option ?selected="${this.value === BaseAssetQueryOperator.GREATER_THAN}" value="${BaseAssetQueryOperator.GREATER_THAN}" value="GREATER_THAN">></option>
<option ?selected="${this.value === BaseAssetQueryOperator.LESS_EQUALS}" value="${BaseAssetQueryOperator.LESS_EQUALS}" value="LESS_EQUALS">=<</option>
diff --git a/ui/component/or-smart-notify/src/index.ts b/ui/component/or-smart-notify/src/index.ts
index 23ef9691e..c5b739682 100644
--- a/ui/component/or-smart-notify/src/index.ts
+++ b/ui/component/or-smart-notify/src/index.ts
@@ -195,7 +195,7 @@ class OrSmartNotify extends LitElement {
<icon>${icon(faClock).node.item(0)}</icon>
<div class="flex padding-2-5" style="font-weight: 600;">Smart Notify</div>
- <a style="height: 22px;" @click="${this.close}">
+ <a style="cursor: pointer;height: 22px;" @click="${this.close}">
<icon>${icon(faTimes).node.item(0)}</icon>
</a>
</div>
diff --git a/ui/component/rest/package.json b/ui/component/rest/package.json
index 63ad515c8..137bb6df9 100644
--- a/ui/component/rest/package.json
+++ b/ui/component/rest/package.json
@@ -1,6 +1,6 @@
{
"name": "@openremote/rest",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "OpenRemote 3.x REST API",
"main": "dist/index.js",
"types": "src/index.ts",