UNPKG

iobroker.lovelace

Version:

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

1 lines 2.19 kB
export const __rspack_esm_id=70133;export const __rspack_esm_ids=[70133];export const __webpack_modules__={34370(e,o,t){t(18111),t(7588),e.exports=function e(o){return Object.freeze(o),Object.getOwnPropertyNames(o).forEach(function(t){!o.hasOwnProperty(t)||null===o[t]||"object"!=typeof o[t]&&"function"!=typeof o[t]||Object.isFrozen(o[t])||e(o[t])}),o}},79316(e,o,t){t.a(e,async function(e,i){try{t.r(o),t.d(o,{HuiDialogDeleteCard:()=>u});var a=t(62826),s=t(34370),r=t.n(s),c=t(5124),n=t(22441),l=t(1087),d=t(14503),h=t(46856),p=t(18350),_=(t(93444),t(72554)),g=e([h,p,_]);[h,p,_]=g.then?(await g)():g;class u extends c.WF{async showDialog(e){this._params=e,this._cardConfig=e.cardConfig,this._open=!0,Object.isFrozen(this._cardConfig)||(this._cardConfig=r()(this._cardConfig))}closeDialog(){this._open=!1}_dialogClosed(){this._open=!1,this._params=void 0,this._cardConfig=void 0,(0,l.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._params?c.qy` <ha-dialog .open="${this._open}" header-title="${this.hass.localize("ui.panel.lovelace.cards.confirm_delete")}" @closed="${this._dialogClosed}"> <div> ${this._cardConfig?c.qy` <div class="element-preview"> <hui-card .hass="${this.hass}" .config="${this._cardConfig}" preview></hui-card> </div> `:""} </div> <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" @click="${this.closeDialog}" autofocus> ${this.hass.localize("ui.common.cancel")} </ha-button> <ha-button slot="primaryAction" class="warning" @click="${this._delete}"> ${this.hass.localize("ui.common.delete")} </ha-button> </ha-dialog-footer> </ha-dialog> `:c.s6}static get styles(){return[d.nA,c.AH`.element-preview{position:relative}hui-card{margin:4px auto;max-width:500px;display:block;width:100%}`]}_delete(){this._params?.deleteCard&&(this._params.deleteCard(),this.closeDialog())}constructor(...e){super(...e),this._open=!1}}(0,a.Cg)([(0,n.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,a.Cg)([(0,n.wk)()],u.prototype,"_params",void 0),(0,a.Cg)([(0,n.wk)()],u.prototype,"_open",void 0),(0,a.Cg)([(0,n.wk)()],u.prototype,"_cardConfig",void 0),u=(0,a.Cg)([(0,n.EM)("hui-dialog-delete-card")],u),i()}catch(e){i(e)}})}};