iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 7.12 kB
JavaScript
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["59810"],{49976:function(e,t,i){i.d(t,{U:()=>n});const n=e=>e.stopPropagation()},76320:function(e,t,i){i.d(t,{T:()=>n,y:()=>a});i(40251);const n=e=>{requestAnimationFrame((()=>setTimeout(e,0)))},a=()=>new Promise((e=>{n(e)}))},92824:function(e,t,i){var n=i(61701),a=i(72621),l=(i(71695),i(40251),i(47021),i(60930)),d=i(9714),s=i(57243),o=i(50778),r=i(22381),c=i(76320);i(23334);let u,h,v,m,k=e=>e;(0,n.Z)([(0,o.Mo)("ha-select")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"icon",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"clearable",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({attribute:"inline-arrow",type:Boolean})],key:"inlineArrow",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)()],key:"options",value:void 0},{kind:"method",key:"render",value:function(){return(0,s.dy)(u||(u=k` ${0} ${0} `),(0,a.Z)(i,"render",this,3)([]),this.clearable&&!this.required&&!this.disabled&&this.value?(0,s.dy)(h||(h=k`<ha-icon-button label="clear" ="${0}" .path="${0}"></ha-icon-button>`),this._clearValue,"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"):s.Ld)}},{kind:"method",key:"renderLeadingIcon",value:function(){return this.icon?(0,s.dy)(v||(v=k`<span class="mdc-select__icon"><slot name="icon"></slot></span>`)):s.Ld}},{kind:"method",key:"connectedCallback",value:function(){(0,a.Z)(i,"connectedCallback",this,3)([]),window.addEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"firstUpdated",value:async function(){var e;((0,a.Z)(i,"firstUpdated",this,3)([]),this.inlineArrow)&&(null===(e=this.shadowRoot)||void 0===e||null===(e=e.querySelector(".mdc-select__selected-text-container"))||void 0===e||e.classList.add("inline-arrow"))}},{kind:"method",key:"updated",value:function(e){if((0,a.Z)(i,"updated",this,3)([e]),e.has("inlineArrow")){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".mdc-select__selected-text-container");this.inlineArrow?null==e||e.classList.add("inline-arrow"):null==e||e.classList.remove("inline-arrow")}e.get("options")&&(this.layoutOptions(),this.selectByValue(this.value))}},{kind:"method",key:"disconnectedCallback",value:function(){(0,a.Z)(i,"disconnectedCallback",this,3)([]),window.removeEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"_clearValue",value:function(){!this.disabled&&this.value&&(this.valueSetDirectly=!0,this.select(-1),this.mdcFoundation.handleChange())}},{kind:"field",key:"_translationsUpdated",value(){return(0,r.D)((async()=>{await(0,c.y)(),this.layoutOptions()}),500)}},{kind:"field",static:!0,key:"styles",value(){return[d.W,(0,s.iv)(m||(m=k`:host([clearable]){position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:var(--secondary-text-color)}.mdc-select__anchor{width:var(--ha-select-min-width,200px)}.mdc-select--filled .mdc-select__anchor{height:var(--ha-select-height,56px)}.mdc-select--filled .mdc-floating-label{inset-inline-start:12px;inset-inline-end:initial;direction:var(--direction)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{inset-inline-start:48px;inset-inline-end:initial;direction:var(--direction)}.mdc-select .mdc-select__anchor{padding-inline-start:12px;padding-inline-end:0px;direction:var(--direction)}.mdc-select__anchor .mdc-floating-label--float-above{transform-origin:var(--float-start)}.mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,0px)}:host([clearable]) .mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,12px)}ha-icon-button{position:absolute;top:10px;right:28px;--mdc-icon-button-size:36px;--mdc-icon-size:20px;color:var(--secondary-text-color);inset-inline-start:initial;inset-inline-end:28px;direction:var(--direction)}.inline-arrow{flex-grow:0}`))]}}]}}),l.K)},93408:function(e,t,i){i.r(t),i.d(t,{HaThemeSelector:()=>o});var n=i(61701),a=(i(71695),i(47021),i(57243)),l=i(50778);i(95439);let d,s=e=>e,o=(0,n.Z)([(0,l.Mo)("ha-selector-theme")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,l.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,l.Cb)({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[(0,l.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,l.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,l.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,l.Cb)({type:Boolean})],key:"required",value(){return!0}},{kind:"method",key:"render",value:function(){var e;return(0,a.dy)(d||(d=s` <ha-theme-picker .hass="${0}" .value="${0}" .label="${0}" .includeDefault="${0}" .disabled="${0}" .required="${0}"></ha-theme-picker> `),this.hass,this.value,this.label,null===(e=this.selector.theme)||void 0===e?void 0:e.include_default,this.disabled,this.required)}}]}}),a.oi)},95439:function(e,t,i){var n=i(61701),a=(i(71695),i(61893),i(9359),i(70104),i(47021),i(87319),i(57243)),l=i(50778),d=i(36522),s=i(49976);i(92824);let o,r,c,u,h,v=e=>e;(0,n.Z)([(0,l.Mo)("ha-theme-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,l.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,l.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,l.Cb)({attribute:"include-default",type:Boolean})],key:"includeDefault",value(){return!1}},{kind:"field",decorators:[(0,l.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,l.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,l.Cb)({type:Boolean})],key:"required",value(){return!1}},{kind:"method",key:"render",value:function(){return(0,a.dy)(o||(o=v` <ha-select .label="${0}" .value="${0}" .required="${0}" .disabled="${0}" ="${0}" ="${0}" fixedMenuPosition naturalMenuWidth> ${0} ${0} ${0} </ha-select> `),this.label||this.hass.localize("ui.components.theme-picker.theme"),this.value,this.required,this.disabled,this._changed,s.U,this.required?a.Ld:(0,a.dy)(r||(r=v` <mwc-list-item value="remove"> ${0} </mwc-list-item> `),this.hass.localize("ui.components.theme-picker.no_theme")),this.includeDefault?(0,a.dy)(c||(c=v` <mwc-list-item .value="${0}"> ioBroker </mwc-list-item> `),"default"):a.Ld,Object.keys(this.hass.themes.themes).sort().map((e=>(0,a.dy)(u||(u=v`<mwc-list-item .value="${0}">${0}</mwc-list-item>`),e,e))))}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(h||(h=v`ha-select{width:100%}`))}},{kind:"method",key:"_changed",value:function(e){this.hass&&""!==e.target.value&&(this.value="remove"===e.target.value?void 0:e.target.value,(0,d.B)(this,"value-changed",{value:this.value}))}}]}}),a.oi)}}]);
//# sourceMappingURL=59810.4f78e389f87a399d.js.map