UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

2 lines 11.8 kB
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["62963"],{94369:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{u:()=>d});var n=a(16485),l=a(27486),o=e([n]);n=(o.then?(await o)():o)[0];const d=(e,t)=>{try{var a,i;return null!==(a=null===(i=s(t))||void 0===i?void 0:i.of(e))&&void 0!==a?a:e}catch(n){return e}},s=(0,l.Z)((e=>new Intl.DisplayNames(e.language,{type:"language",fallback:"code"})));i()}catch(d){i(d)}}))},54977:function(e,t,a){var i=a(61701),n=(a(71695),a(47021),a(57243)),l=a(50778);let o,d,s,r=e=>e;(0,i.Z)([(0,l.Mo)("ha-card")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,l.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,l.Cb)({type:Boolean,reflect:!0})],key:"raised",value(){return!1}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(o||(o=r`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,12px);border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, 24px);letter-spacing:-.012em;line-height:48px;padding:12px 16px 16px;display:block;margin-block-start:0px;margin-block-end:0px;font-weight:400}:host ::slotted(.card-content:not(:first-child)),slot:not(:first-child)::slotted(.card-content){padding-top:0px;margin-top:-8px}:host ::slotted(.card-content){padding:16px}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:5px 16px}`))}},{kind:"method",key:"render",value:function(){return(0,n.dy)(d||(d=r` ${0} <slot></slot> `),this.header?(0,n.dy)(s||(s=r`<h1 class="card-header">${0}</h1>`),this.header):n.Ld)}}]}}),n.oi)},2790:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{getLanguageOptions:()=>x});var n=a(61701),l=a(72621),o=a(16485),d=(a(71695),a(61893),a(9359),a(70104),a(47021),a(57243)),s=a(50778),r=a(27486),c=a(36522),u=a(49976),h=a(94369),v=a(1416),p=a(67862),f=(a(7285),a(92824),e([o,h]));[o,h]=f.then?(await f)():f;let g,y,b,k,m=e=>e;const x=(e,t,a,i)=>{let n=[];if(t){const t=p.o.translations;n=e.map((e=>{var a;let i=null===(a=t[e])||void 0===a?void 0:a.nativeName;if(!i)try{i=new Intl.DisplayNames(e,{type:"language",fallback:"code"}).of(e)}catch(n){i=e}return{value:e,label:i}}))}else i&&(n=e.map((e=>({value:e,label:(0,h.u)(e,i)}))));return!a&&i&&n.sort(((e,t)=>(0,v.fe)(e.label,t.label,i.language))),n};(0,n.Z)([(0,s.Mo)("ha-language-picker")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",decorators:[(0,s.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Array})],key:"languages",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"required",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({attribute:"native-name",type:Boolean})],key:"nativeName",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({attribute:"no-sort",type:Boolean})],key:"noSort",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({attribute:"inline-arrow",type:Boolean})],key:"inlineArrow",value(){return!1}},{kind:"field",decorators:[(0,s.SB)()],key:"_defaultLanguages",value(){return[]}},{kind:"field",decorators:[(0,s.IO)("ha-select")],key:"_select",value:void 0},{kind:"method",key:"firstUpdated",value:function(e){(0,l.Z)(a,"firstUpdated",this,3)([e]),this._computeDefaultLanguageOptions()}},{kind:"method",key:"updated",value:function(e){(0,l.Z)(a,"updated",this,3)([e]);const t=e.has("hass")&&this.hass&&e.get("hass")&&e.get("hass").locale.language!==this.hass.locale.language;if(e.has("languages")||e.has("value")||t){var i,n;if(this._select.layoutOptions(),this._select.value!==this.value&&(0,c.B)(this,"value-changed",{value:this._select.value}),!this.value)return;const e=this._getLanguagesOptions(null!==(i=this.languages)&&void 0!==i?i:this._defaultLanguages,this.nativeName,this.noSort,null===(n=this.hass)||void 0===n?void 0:n.locale).findIndex((e=>e.value===this.value));-1===e&&(this.value=void 0),t&&this._select.select(e)}}},{kind:"field",key:"_getLanguagesOptions",value(){return(0,r.Z)(x)}},{kind:"method",key:"_computeDefaultLanguageOptions",value:function(){this._defaultLanguages=Object.keys(p.o.translations)}},{kind:"method",key:"render",value:function(){var e,t,a,i,n,l,o;const s=this._getLanguagesOptions(null!==(e=this.languages)&&void 0!==e?e:this._defaultLanguages,this.nativeName,this.noSort,null===(t=this.hass)||void 0===t?void 0:t.locale),r=null!==(a=this.value)&&void 0!==a?a:this.required?null===(i=s[0])||void 0===i?void 0:i.value:this.value;return(0,d.dy)(g||(g=m` <ha-select .label="${0}" .value="${0}" .required="${0}" .disabled="${0}" @selected="${0}" @closed="${0}" fixedMenuPosition naturalMenuWidth .inlineArrow="${0}"> ${0} </ha-select> `),null!==(n=this.label)&&void 0!==n?n:(null===(l=this.hass)||void 0===l?void 0:l.localize("ui.components.language-picker.language"))||"Language",r||"",this.required,this.disabled,this._changed,u.U,this.inlineArrow,0===s.length?(0,d.dy)(y||(y=m`<ha-list-item value="">${0}</ha-list-item>`),(null===(o=this.hass)||void 0===o?void 0:o.localize("ui.components.language-picker.no_languages"))||"No languages"):s.map((e=>(0,d.dy)(b||(b=m` <ha-list-item .value="${0}">${0}</ha-list-item> `),e.value,e.label))))}},{kind:"field",static:!0,key:"styles",value(){return(0,d.iv)(k||(k=m`ha-select{width:100%}`))}},{kind:"method",key:"_changed",value:function(e){const t=e.target;""!==t.value&&t.value!==this.value&&(this.value=t.value,(0,c.B)(this,"value-changed",{value:this.value}))}}]}}),d.oi);i()}catch(g){i(g)}}))},92824:function(e,t,a){var i=a(61701),n=a(72621),l=(a(71695),a(40251),a(47021),a(60930)),o=a(9714),d=a(57243),s=a(50778),r=a(22381),c=a(76320);a(23334);let u,h,v,p,f=e=>e;(0,i.Z)([(0,s.Mo)("ha-select")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"icon",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"clearable",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({attribute:"inline-arrow",type:Boolean})],key:"inlineArrow",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)()],key:"options",value:void 0},{kind:"method",key:"render",value:function(){return(0,d.dy)(u||(u=f` ${0} ${0} `),(0,n.Z)(a,"render",this,3)([]),this.clearable&&!this.required&&!this.disabled&&this.value?(0,d.dy)(h||(h=f`<ha-icon-button label="clear" @click="${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"):d.Ld)}},{kind:"method",key:"renderLeadingIcon",value:function(){return this.icon?(0,d.dy)(v||(v=f`<span class="mdc-select__icon"><slot name="icon"></slot></span>`)):d.Ld}},{kind:"method",key:"connectedCallback",value:function(){(0,n.Z)(a,"connectedCallback",this,3)([]),window.addEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"firstUpdated",value:async function(){var e;((0,n.Z)(a,"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,n.Z)(a,"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,n.Z)(a,"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[o.W,(0,d.iv)(p||(p=f`: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)},16485:function(e,t,a){a.a(e,(async function(e,t){try{a(71695),a(92745),a(40251),a(47021);var i=a(61449),n=a(40574),l=a(30532),o=a(41674),d=a(49722),s=a(76632),r=a(7884),c=a(35185),u=a(65401),h=a(44180),v=a(49447);const e=async()=>{const e=(0,h.sS)(),t=[];(0,l.shouldPolyfill)()&&await Promise.all([a.e("80210"),a.e("74055")]).then(a.bind(a,98133)),(0,d.shouldPolyfill)()&&await Promise.all([a.e("2142"),a.e("75297"),a.e("80210"),a.e("60251")]).then(a.bind(a,59095)),(0,i.shouldPolyfill)(e)&&t.push(Promise.all([a.e("2142"),a.e("75297"),a.e("68250")]).then(a.bind(a,80561)).then((()=>(0,v.H)()))),(0,u.shouldPolyfill)()&&t.push(Promise.all([a.e("2142"),a.e("75297"),a.e("65578")]).then(a.bind(a,97995))),(0,n.shouldPolyfill)(e)&&t.push(Promise.all([a.e("2142"),a.e("75297"),a.e("59826")]).then(a.bind(a,31514))),(0,o.shouldPolyfill)(e)&&t.push(Promise.all([a.e("2142"),a.e("75297"),a.e("23649")]).then(a.bind(a,93840))),(0,s.shouldPolyfill)(e)&&t.push(Promise.all([a.e("2142"),a.e("75297"),a.e("42831")]).then(a.bind(a,29559))),(0,r.shouldPolyfill)(e)&&t.push(Promise.all([a.e("2142"),a.e("75297"),a.e("57377")]).then(a.bind(a,39030)).then((()=>a.e("61236").then(a.t.bind(a,4121,23))))),(0,c.shouldPolyfill)(e)&&t.push(Promise.all([a.e("2142"),a.e("75297"),a.e("13870")]).then(a.bind(a,74546))),0!==t.length&&await Promise.all(t).then((()=>(0,v.n)(e)))};await e(),t()}catch(p){t(p)}}),1)}}]); //# sourceMappingURL=62963.21f74603d2ad13dd.js.map