@larva.io/webcomponents
Version:
Fentrica SmartUnits WebComponents package
220 lines (219 loc) • 8.97 kB
JavaScript
/*!
* (C) Fentrica http://fentrica.com - Seee LICENSE.md
*/
import { h } from "@stencil/core";
export class SlidingDoorContent {
render() {
const secondaryButtonColor = (this.color) === 'dark' ? 'light' : 'dark';
const colorClass = this.color ? `lar-color-${this.color}` : '';
return (h("div", { key: '27edab5df8b5af8ed99268df8cf2b75c3a39834e', class: `thermostat-container ${colorClass}` }, h("div", { key: '23060d34ba7d7723efe81cbb73bc321a88a6df5f', class: "temp-display" }, h("div", { key: 'c707a787240ccb06e63f921d95088a3d8f50ce23', class: "temp-ring" }), h("div", { key: '8ce81816cb6f50013db34027229ce3fab772f53c', class: "temp-content" }, h("div", { key: 'bc995c527463dd88fc1ab38fda807aa752652d6e', class: "temp-value" }, this.setpoint), h("div", { key: 'f2a78a24f75ad6d5dbc16fb6e51e2612319a7b7a', class: "temp-label" }, h("lar-translate", { key: 'fea5cce1d206e40b717ba2309d0f89d656ecf2e3', t: "twoPosController.target" }))), h("div", { key: '2762480fb6b7492968640f2bf5398c9d89384690', class: "temp-controls" }, h("lar-button", { key: 'edc64f843c0849e2adf34b6f5f8b3886fb22ff39', disabled: (this.min && this.setpoint <= this.min) || this.disabled, color: this.color, onClick: () => this.changesetpoint.emit(false) }, "-"), h("lar-button", { key: 'daddf95af6c1387690b66a47b0e6ca8c36c2a7ef', disabled: (this.max && this.setpoint >= this.max) || this.disabled, color: this.color, onClick: () => this.changesetpoint.emit(true) }, "+"))), this.manualcontrols &&
h("lar-button-group", { key: 'a7f708ff181ec9d86119660cbc9ac70b0a7cd177' }, h("lar-button", { key: '44064cb9ad420d3a5a2a6bf639ad3fdfd662a84d', disabled: this.disabled, color: this.mode === 'on' ? this.color : secondaryButtonColor, onClick: () => this.changemode.emit('on') }, h("lar-translate", { key: '6981089f82cbcd15ea7a2ac4f8485e147c343895', t: "twoPosController.on" })), h("lar-button", { key: '1e63130fdd3163b61e0e728961e37d7f749f6de0', disabled: this.disabled, color: this.mode === 'off' ? this.color : secondaryButtonColor, onClick: () => this.changemode.emit('off') }, h("lar-translate", { key: 'b0dec73255ab6ea53d03da8844624c1c3eb38cca', t: "twoPosController.off" })), h("lar-button", { key: 'a23435bf20927c4702de8be1c7bb1c754e010146', disabled: this.disabled, color: this.mode === 'auto' ? this.color : secondaryButtonColor, onClick: () => this.changemode.emit('auto') }, h("lar-translate", { key: '5995675823453eb0ed773cb962d05f4f19c9193c', t: "twoPosController.auto" })))));
}
static get is() { return "two-pos-controller-content"; }
static get originalStyleUrls() {
return {
"$": ["two-pos-controller.scss"]
};
}
static get styleUrls() {
return {
"$": ["two-pos-controller.css"]
};
}
static get properties() {
return {
"color": {
"type": "string",
"mutable": false,
"complexType": {
"original": "Color",
"resolved": "string",
"references": {
"Color": {
"location": "import",
"path": "../../interface",
"id": "src/interface.d.ts::Color"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "color"
},
"disabled": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "disabled"
},
"mode": {
"type": "string",
"mutable": false,
"complexType": {
"original": "'on' | 'off' | 'auto'",
"resolved": "\"auto\" | \"off\" | \"on\"",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "mode"
},
"manualcontrols": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "manualcontrols"
},
"min": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "min"
},
"max": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "max"
},
"step": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "step"
},
"setpoint": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "setpoint"
}
};
}
static get events() {
return [{
"method": "changemode",
"name": "changemode",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
}
}, {
"method": "changesetpoint",
"name": "changesetpoint",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
}
}];
}
}
//# sourceMappingURL=two-pos-controller-content.js.map