iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 15.4 kB
JavaScript
/*! For license information please see chunk.9a94b4aec5b62c37e2d2.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[6002],{46002:function(n,o,e){"use strict";e(65233),e(8621),e(63207),e(78814),e(1656),e(57548),e(73962);var t,i,r,a=e(51644),l=e(26110),p=e(21006),d=e(98235),s=e(84938),c=e(9672),b=e(87156),u=e(81668),h=e(50856);(0,c.k)({_template:(0,h.d)(t||(i=['\n <style include="paper-dropdown-menu-shared-styles">\n :host(:focus) {\n outline: none;\n }\n\n :host {\n width: 200px; /* Default size of an <input> */\n }\n\n /**\n * All of these styles below are for styling the fake-input display\n */\n [slot="dropdown-trigger"] {\n box-sizing: border-box;\n position: relative;\n width: 100%;\n padding: 16px 0 8px 0;\n }\n\n :host([disabled]) [slot="dropdown-trigger"] {\n pointer-events: none;\n opacity: var(--paper-dropdown-menu-disabled-opacity, 0.33);\n }\n\n :host([no-label-float]) [slot="dropdown-trigger"] {\n padding-top: 8px; /* If there\'s no label, we need less space up top. */\n }\n\n #input {\n @apply --paper-font-subhead;\n @apply --paper-font-common-nowrap;\n line-height: 1.5;\n border-bottom: 1px solid var(--paper-dropdown-menu-color, var(--secondary-text-color));\n color: var(--paper-dropdown-menu-color, var(--primary-text-color));\n width: 100%;\n box-sizing: border-box;\n padding: 12px 20px 0 0; /* Right padding so that text doesn\'t overlap the icon */\n outline: none;\n @apply --paper-dropdown-menu-input;\n }\n\n #input:dir(rtl) {\n padding-right: 0px;\n padding-left: 20px;\n }\n\n :host([disabled]) #input {\n border-bottom: 1px dashed var(--paper-dropdown-menu-color, var(--secondary-text-color));\n }\n\n :host([invalid]) #input {\n border-bottom: 2px solid var(--paper-dropdown-error-color, var(--error-color));\n }\n\n :host([no-label-float]) #input {\n padding-top: 0; /* If there\'s no label, we need less space up top. */\n }\n\n label {\n @apply --paper-font-subhead;\n @apply --paper-font-common-nowrap;\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n /**\n * The container has a 16px top padding, and there\'s 12px of padding\n * between the input and the label (from the input\'s padding-top)\n */\n top: 28px;\n box-sizing: border-box;\n width: 100%;\n padding-right: 20px; /* Right padding so that text doesn\'t overlap the icon */\n text-align: left;\n transition-duration: .2s;\n transition-timing-function: cubic-bezier(.4,0,.2,1);\n color: var(--paper-dropdown-menu-color, var(--secondary-text-color));\n @apply --paper-dropdown-menu-label;\n }\n\n label:dir(rtl) {\n padding-right: 0px;\n padding-left: 20px;\n }\n\n :host([no-label-float]) label {\n top: 8px;\n /* Since the label doesn\'t need to float, remove the animation duration\n which slows down visibility changes (i.e. when a selection is made) */\n transition-duration: 0s;\n }\n\n label.label-is-floating {\n font-size: 12px;\n top: 8px;\n }\n\n label.label-is-hidden {\n visibility: hidden;\n }\n\n :host([focused]) label.label-is-floating {\n color: var(--paper-dropdown-menu-focus-color, var(--primary-color));\n }\n\n :host([invalid]) label.label-is-floating {\n color: var(--paper-dropdown-error-color, var(--error-color));\n }\n\n /**\n * Sets up the focused underline. It\'s initially hidden, and becomes\n * visible when it\'s focused.\n */\n label:after {\n background-color: var(--paper-dropdown-menu-focus-color, var(--primary-color));\n bottom: 7px; /* The container has an 8px bottom padding */\n content: \'\';\n height: 2px;\n left: 45%;\n position: absolute;\n transition-duration: .2s;\n transition-timing-function: cubic-bezier(.4,0,.2,1);\n visibility: hidden;\n width: 8px;\n z-index: 10;\n }\n\n :host([invalid]) label:after {\n background-color: var(--paper-dropdown-error-color, var(--error-color));\n }\n\n :host([no-label-float]) label:after {\n bottom: 7px; /* The container has a 8px bottom padding */\n }\n\n :host([focused]:not([disabled])) label:after {\n left: 0;\n visibility: visible;\n width: 100%;\n }\n\n iron-icon {\n position: absolute;\n right: 0px;\n bottom: 8px; /* The container has an 8px bottom padding */\n @apply --paper-font-subhead;\n color: var(--disabled-text-color);\n @apply --paper-dropdown-menu-icon;\n }\n\n iron-icon:dir(rtl) {\n left: 0;\n right: auto;\n }\n\n :host([no-label-float]) iron-icon {\n margin-top: 0px;\n }\n\n .error {\n display: inline-block;\n visibility: hidden;\n color: var(--paper-dropdown-error-color, var(--error-color));\n @apply --paper-font-caption;\n position: absolute;\n left:0;\n right:0;\n bottom: -12px;\n }\n\n :host([invalid]) .error {\n visibility: visible;\n }\n </style>\n\n \x3c!-- this div fulfills an a11y requirement for combobox, do not remove --\x3e\n <span role="button"></span>\n <paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat, verticalOffset)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate allow-outside-scroll="[[allowOutsideScroll]]">\n \x3c!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via <content> --\x3e\n <div class="dropdown-trigger" slot="dropdown-trigger">\n <label class$="[[_computeLabelClass(noLabelFloat,alwaysFloatLabel,hasContent)]]">\n [[label]]\n </label>\n <div id="input" tabindex="-1"> </div>\n <iron-icon icon="paper-dropdown-menu:arrow-drop-down"></iron-icon>\n <span class="error">[[errorMessage]]</span>\n </div>\n <slot id="content" name="dropdown-content" slot="dropdown-content"></slot>\n </paper-menu-button>\n'],r=['\n <style include="paper-dropdown-menu-shared-styles">\n :host(:focus) {\n outline: none;\n }\n\n :host {\n width: 200px; /* Default size of an <input> */\n }\n\n /**\n * All of these styles below are for styling the fake-input display\n */\n [slot="dropdown-trigger"] {\n box-sizing: border-box;\n position: relative;\n width: 100%;\n padding: 16px 0 8px 0;\n }\n\n :host([disabled]) [slot="dropdown-trigger"] {\n pointer-events: none;\n opacity: var(--paper-dropdown-menu-disabled-opacity, 0.33);\n }\n\n :host([no-label-float]) [slot="dropdown-trigger"] {\n padding-top: 8px; /* If there\'s no label, we need less space up top. */\n }\n\n #input {\n @apply --paper-font-subhead;\n @apply --paper-font-common-nowrap;\n line-height: 1.5;\n border-bottom: 1px solid var(--paper-dropdown-menu-color, var(--secondary-text-color));\n color: var(--paper-dropdown-menu-color, var(--primary-text-color));\n width: 100%;\n box-sizing: border-box;\n padding: 12px 20px 0 0; /* Right padding so that text doesn\'t overlap the icon */\n outline: none;\n @apply --paper-dropdown-menu-input;\n }\n\n #input:dir(rtl) {\n padding-right: 0px;\n padding-left: 20px;\n }\n\n :host([disabled]) #input {\n border-bottom: 1px dashed var(--paper-dropdown-menu-color, var(--secondary-text-color));\n }\n\n :host([invalid]) #input {\n border-bottom: 2px solid var(--paper-dropdown-error-color, var(--error-color));\n }\n\n :host([no-label-float]) #input {\n padding-top: 0; /* If there\'s no label, we need less space up top. */\n }\n\n label {\n @apply --paper-font-subhead;\n @apply --paper-font-common-nowrap;\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n /**\n * The container has a 16px top padding, and there\'s 12px of padding\n * between the input and the label (from the input\'s padding-top)\n */\n top: 28px;\n box-sizing: border-box;\n width: 100%;\n padding-right: 20px; /* Right padding so that text doesn\'t overlap the icon */\n text-align: left;\n transition-duration: .2s;\n transition-timing-function: cubic-bezier(.4,0,.2,1);\n color: var(--paper-dropdown-menu-color, var(--secondary-text-color));\n @apply --paper-dropdown-menu-label;\n }\n\n label:dir(rtl) {\n padding-right: 0px;\n padding-left: 20px;\n }\n\n :host([no-label-float]) label {\n top: 8px;\n /* Since the label doesn\'t need to float, remove the animation duration\n which slows down visibility changes (i.e. when a selection is made) */\n transition-duration: 0s;\n }\n\n label.label-is-floating {\n font-size: 12px;\n top: 8px;\n }\n\n label.label-is-hidden {\n visibility: hidden;\n }\n\n :host([focused]) label.label-is-floating {\n color: var(--paper-dropdown-menu-focus-color, var(--primary-color));\n }\n\n :host([invalid]) label.label-is-floating {\n color: var(--paper-dropdown-error-color, var(--error-color));\n }\n\n /**\n * Sets up the focused underline. It\'s initially hidden, and becomes\n * visible when it\'s focused.\n */\n label:after {\n background-color: var(--paper-dropdown-menu-focus-color, var(--primary-color));\n bottom: 7px; /* The container has an 8px bottom padding */\n content: \'\';\n height: 2px;\n left: 45%;\n position: absolute;\n transition-duration: .2s;\n transition-timing-function: cubic-bezier(.4,0,.2,1);\n visibility: hidden;\n width: 8px;\n z-index: 10;\n }\n\n :host([invalid]) label:after {\n background-color: var(--paper-dropdown-error-color, var(--error-color));\n }\n\n :host([no-label-float]) label:after {\n bottom: 7px; /* The container has a 8px bottom padding */\n }\n\n :host([focused]:not([disabled])) label:after {\n left: 0;\n visibility: visible;\n width: 100%;\n }\n\n iron-icon {\n position: absolute;\n right: 0px;\n bottom: 8px; /* The container has an 8px bottom padding */\n @apply --paper-font-subhead;\n color: var(--disabled-text-color);\n @apply --paper-dropdown-menu-icon;\n }\n\n iron-icon:dir(rtl) {\n left: 0;\n right: auto;\n }\n\n :host([no-label-float]) iron-icon {\n margin-top: 0px;\n }\n\n .error {\n display: inline-block;\n visibility: hidden;\n color: var(--paper-dropdown-error-color, var(--error-color));\n @apply --paper-font-caption;\n position: absolute;\n left:0;\n right:0;\n bottom: -12px;\n }\n\n :host([invalid]) .error {\n visibility: visible;\n }\n </style>\n\n \x3c!-- this div fulfills an a11y requirement for combobox, do not remove --\x3e\n <span role="button"></span>\n <paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat, verticalOffset)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate allow-outside-scroll="[[allowOutsideScroll]]">\n \x3c!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via <content> --\x3e\n <div class="dropdown-trigger" slot="dropdown-trigger">\n <label class\\$="[[_computeLabelClass(noLabelFloat,alwaysFloatLabel,hasContent)]]">\n [[label]]\n </label>\n <div id="input" tabindex="-1"> </div>\n <iron-icon icon="paper-dropdown-menu:arrow-drop-down"></iron-icon>\n <span class="error">[[errorMessage]]</span>\n </div>\n <slot id="content" name="dropdown-content" slot="dropdown-content"></slot>\n </paper-menu-button>\n'],r||(r=i.slice(0)),t=Object.freeze(Object.defineProperties(i,{raw:{value:Object.freeze(r)}})))),is:"paper-dropdown-menu-light",behaviors:[a.P,l.a,s.o,p.V,d.x],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0,observer:"_valueChanged"},label:{type:String},placeholder:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,hasContent:{type:Boolean,readOnly:!0}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},hostAttributes:{tabindex:0,role:"combobox","aria-autocomplete":"none","aria-haspopup":"true"},observers:["_selectedItemChanged(selectedItem)"],attached:function(){var n=this.contentElement;n&&n.selectedItem&&this._setSelectedItem(n.selectedItem)},get contentElement(){for(var n=(0,b.vz)(this.$.content).getDistributedNodes(),o=0,e=n.length;o<e;o++)if(n[o].nodeType===Node.ELEMENT_NODE)return n[o]},open:function(){this.$.menuButton.open()},close:function(){this.$.menuButton.close()},_onIronSelect:function(n){this._setSelectedItem(n.detail.item)},_onIronDeselect:function(n){this._setSelectedItem(null)},_onTap:function(n){u.nJ(n)===this&&this.open()},_selectedItemChanged:function(n){var o="";o=n?n.label||n.getAttribute("label")||n.textContent.trim():"",this.value=o,this._setSelectedItemLabel(o)},_computeMenuVerticalOffset:function(n,o){return o||(n?-4:8)},_getValidity:function(n){return this.disabled||!this.required||this.required&&!!this.value},_openedChanged:function(){var n=this.opened?"true":"false",o=this.contentElement;o&&o.setAttribute("aria-expanded",n)},_computeLabelClass:function(n,o,e){var t="";return!0===n?e?"label-is-hidden":"":((e||!0===o)&&(t+=" label-is-floating"),t)},_valueChanged:function(){this.$.input&&this.$.input.textContent!==this.value&&(this.$.input.textContent=this.value),this._setHasContent(!!this.value)}})}}]);
//# sourceMappingURL=chunk.9a94b4aec5b62c37e2d2.js.map