UNPKG

@larva.io/webcomponents

Version:

Fentrica SmartUnits WebComponents package

406 lines (405 loc) 13.9 kB
/*! * (C) Fentrica http://fentrica.com - Seee LICENSE.md */ import { h } from "@stencil/core"; export class LarvaAnalogValueNode { constructor() { /////// LarvaNode base properties /** * Component main icon */ this.icon = 'security'; /** * The color to use from your application's color palette. * Detrouble options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. */ this.color = 'primary'; /** * Is logging for this component enabled (lar-log subcomponent loaded) */ this.log = false; /** * Node size */ this.nodeSize = 'default'; this.loading = true; } componentDidLoad() { const el = this.el.shadowRoot || this.el; this.node = el.querySelector('lar-node'); this.output.emit(); } /** * Larva error input */ async error(data) { if (this.node) { this.node.error(data); } this.loading = false; } /** * Input Larva event message (see abow) */ async input(data) { this.text = data; this.loading = false; } render() { return [ h("lar-node", { key: 'a94a250125e83ca418dca8d17939f6dd1be54692', value: this.text, hideTitles: this.hideTitles, icon: this.icon, color: this.color, supTitle: this.supTitle, mainTitle: this.mainTitle, subTitle: this.subTitle, colorModal: this.colorModal, colorInputs: this.colorInputs, colorIconSmall: this.colorIconSmall, nodeSize: this.nodeSize, loading: this.loading, log: this.log }, h("slot", { key: 'efe620a30e5a88f639146f00b729c3a00045ac20' })) ]; } static get is() { return "lar-analog-value"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["analog-value.scss"] }; } static get styleUrls() { return { "$": ["analog-value.css"] }; } static get properties() { return { "icon": { "type": "string", "mutable": true, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "Component main icon" }, "getter": false, "setter": false, "reflect": false, "attribute": "icon", "defaultValue": "'security'" }, "color": { "type": "string", "mutable": true, "complexType": { "original": "Color", "resolved": "string", "references": { "Color": { "location": "import", "path": "../../interface", "id": "src/interface.d.ts::Color" } } }, "required": false, "optional": true, "docs": { "tags": [], "text": "The color to use from your application's color palette.\nDetrouble options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`." }, "getter": false, "setter": false, "reflect": false, "attribute": "color", "defaultValue": "'primary'" }, "colorModal": { "type": "string", "mutable": true, "complexType": { "original": "Color", "resolved": "string", "references": { "Color": { "location": "import", "path": "../../interface", "id": "src/interface.d.ts::Color" } } }, "required": false, "optional": true, "docs": { "tags": [], "text": "The color to use from your application's color palette for Components modal window." }, "getter": false, "setter": false, "reflect": false, "attribute": "color-modal" }, "colorInputs": { "type": "string", "mutable": true, "complexType": { "original": "Color", "resolved": "string", "references": { "Color": { "location": "import", "path": "../../interface", "id": "src/interface.d.ts::Color" } } }, "required": false, "optional": true, "docs": { "tags": [], "text": "The color to use from your application's color palette for inputs" }, "getter": false, "setter": false, "reflect": false, "attribute": "color-inputs" }, "colorIconSmall": { "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": "The color to use from your application's color palette for indication icon" }, "getter": false, "setter": false, "reflect": false, "attribute": "color-icon-small" }, "hideTitles": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "Hide node titles" }, "getter": false, "setter": false, "reflect": false, "attribute": "hide-titles" }, "supTitle": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "Component superscript title" }, "getter": false, "setter": false, "reflect": false, "attribute": "sup-title" }, "subTitle": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "Component subtitle" }, "getter": false, "setter": false, "reflect": false, "attribute": "sub-title" }, "log": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Is logging for this component enabled (lar-log subcomponent loaded)" }, "getter": false, "setter": false, "reflect": false, "attribute": "log", "defaultValue": "false" }, "mainTitle": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": true, "optional": false, "docs": { "tags": [], "text": "Component main title" }, "getter": false, "setter": false, "reflect": false, "attribute": "main-title" }, "nodeSize": { "type": "string", "mutable": false, "complexType": { "original": "Size", "resolved": "\"default\" | \"small\"", "references": { "Size": { "location": "import", "path": "../../interface", "id": "src/interface.d.ts::Size" } } }, "required": false, "optional": true, "docs": { "tags": [], "text": "Node size" }, "getter": false, "setter": false, "reflect": false, "attribute": "node-size", "defaultValue": "'default'" } }; } static get states() { return { "text": {}, "loading": {} }; } static get events() { return [{ "method": "output", "name": "output", "bubbles": true, "cancelable": true, "composed": true, "docs": { "tags": [{ "name": "see", "text": "{@link ../readme.md} chapter \"Components input and output\" for further information." }], "text": "" }, "complexType": { "original": "any", "resolved": "any", "references": {} } }, { "method": "request", "name": "request", "bubbles": true, "cancelable": true, "composed": true, "docs": { "tags": [{ "name": "see", "text": "{@link ../readme.md} chapter \"Sub-Components requests and responses\" for further information." }], "text": "" }, "complexType": { "original": "any", "resolved": "any", "references": {} } }]; } static get methods() { return { "error": { "complexType": { "signature": "(data: any) => Promise<void>", "parameters": [{ "name": "data", "type": "any", "docs": "" }], "references": { "Promise": { "location": "global", "id": "global::Promise" } }, "return": "Promise<void>" }, "docs": { "text": "Larva error input", "tags": [] } }, "input": { "complexType": { "signature": "(data: any) => Promise<void>", "parameters": [{ "name": "data", "type": "any", "docs": "" }], "references": { "Promise": { "location": "global", "id": "global::Promise" } }, "return": "Promise<void>" }, "docs": { "text": "Input Larva event message (see abow)", "tags": [] } } }; } static get elementRef() { return "el"; } } //# sourceMappingURL=analog-value.js.map