Skip to content
Permalink
Browse files

Minor & Package updates

  • Loading branch information...
robin-dekkers committed May 14, 2019
1 parent 3f72885 commit 681a558b5e61e9dcc4257e01f95538164166e5b5
@@ -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",
@@ -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",
@@ -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);
@@ -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",
@@ -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",
@@ -30,7 +30,7 @@ export const rulesEditorConfig = {
originRegion: {
options: regions
},
passengerCapacity: {},
pax: {},
languageCodes: {
options: languages
},
@@ -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();
}
}
@@ -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`
@@ -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}">
@@ -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`
@@ -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>
@@ -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>
@@ -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",

0 comments on commit 681a558

Please sign in to comment.
You can’t perform that action at this time.