iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
1 lines • 6.05 kB
JavaScript
;(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[19695],{93421:function(t,e,r){r.d(e,{IW:function(){return h},dH:function(){return l},fI:function(){return c}});r(44114),r(62953);var i=r(35211),o=r(22792),n=r(32172);const s=(t,e)=>{let r=t;for(const i of e){if(null==r)return;r=r[i]}return r},a=(t,e,r)=>{const o=(0,n.p)({transformer:function(t){return r.call(this,t)},watch:e?[e]:[]}),s=(0,i.Fg)({context:t,subscribe:!0});return(t,e)=>{o(t,e),s(t,e)}},c=t=>a(o.iN,t.entityIdPath[0],function(e){const r=s(this,t.entityIdPath);return"string"==typeof r?null==e?void 0:e[r]:void 0}),l=t=>a(o.X1,t.entityIdPath[0],function(e){const r=s(this,t.entityIdPath);return"string"==typeof r?null==e?void 0:e[r]:void 0}),h=()=>a(o.D5,void 0,({localize:t})=>t)},32172:function(t,e,r){r.d(e,{p:function(){return i}});r(16280),r(18111),r(7588),r(45367),r(92731),r(17642),r(58004),r(33853),r(45876),r(32475),r(15024),r(31698),r(62953);function i(t){return(e,r)=>{if("object"==typeof r)throw new Error("This decorator does not support this compilation type.");const i=String(r),o=e;if(o._transformers){if(!o.hasOwnProperty("_transformers")){const t=o._transformers;o._transformers=new Map,t.forEach((t,e)=>o._transformers.set(e,t))}}else{o._transformers=new Map,o._watching=new Map;const t=o.willUpdate;o.willUpdate=function(e){t.call(this,e);const r=new Set;e.forEach((t,e)=>{const i=this._watching.get(e);void 0!==i&&i.forEach(t=>r.add(t))}),r.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}o._transformers.set(r,t.transformer),t.watch&&t.watch.forEach(t=>{let e=o._watching.get(t);e||(e=new Set,o._watching.set(t,e)),e.add(r)});const n=Object.getOwnPropertyDescriptor(e,r);let s;if(void 0===n)s={get(){return this[`__transform_${i}`]},set(t){const e=this[`__transform_${i}`],r=this._transformers.get(i);this[`__transform_${i}`]=r?r.call(this,t):t,this[`__original_${i}`]=t,this.requestUpdate(i,e)},configurable:!0,enumerable:!0};else{const t=n.set;s=Object.assign(Object.assign({},n),{},{set(e){const r=this[`__transform_${i}`],o=this._transformers.get(i);this[`__transform_${i}`]=o?o.call(this,e):e,this[`__original_${i}`]=e,this.requestUpdate(i,r),null==t||t.call(this,e)}})}Object.defineProperty(e,r,s)}}},38962:function(t,e,r){r.a(t,async function(t,i){try{r.r(e);r(62953);var o=r(40445),n=r(5124),s=r(67576),a=r(6412),c=r(93421),l=r(1087),h=r(26300),d=(r(67094),t([h]));h=(d.then?(await d)():d)[0];let p,u,f,g,m=t=>t;const v="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",y={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};class _ extends n.WF{render(){var t;return(0,n.qy)(p||(p=m` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,a.H)({[this.alertType]:!0}),this.title?"":"no-title",y[this.alertType],(0,a.H)({content:!0,narrow:this.narrow}),this.title?(0,n.qy)(u||(u=m`<div class="title">${0}</div>`),this.title):n.s6,this.dismissable?(0,n.qy)(f||(f=m`<ha-icon-button @click="${0}" .label="${0}" .path="${0}"></ha-icon-button>`),this._dismissClicked,null===(t=this._localize)||void 0===t?void 0:t.call(this,"ui.common.dismiss_alert"),v):n.s6)}_dismissClicked(){(0,l.r)(this,"alert-dismissed-clicked")}constructor(...t){super(...t),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}_.styles=(0,n.AH)(g||(g=m`.issue-type{position:relative;padding:8px;display:flex}.icon{height:var(--ha-alert-icon-size,24px);width:var(--ha-alert-icon-size,24px)}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:var(--ha-border-radius-sm)}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;line-height:normal;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:8px}.title{margin-top:2px;font-weight:var(--ha-font-weight-bold)}.action ha-icon-button{--mdc-theme-primary:var(--primary-text-color);--ha-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`)),(0,o.Cg)([(0,s.MZ)()],_.prototype,"title",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"alert-type"})],_.prototype,"alertType",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],_.prototype,"dismissable",void 0),(0,o.Cg)([(0,s.wk)(),(0,c.IW)()],_.prototype,"_localize",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],_.prototype,"narrow",void 0),_=(0,o.Cg)([(0,s.EM)("ha-alert")],_),i()}catch(p){i(p)}})}}]);