UNPKG

iobroker.lovelace

Version:

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

1 lines 4.68 kB
export const __rspack_esm_id=84175;export const __rspack_esm_ids=[84175];export const __webpack_modules__={45100(o,t,a){a.a(o,async function(o,e){try{a.r(t),a.d(t,{HaIconButtonPrev:()=>d});var i=a(62826),n=a(5124),s=a(22441),r=a(63091),c=a(26300),l=o([c]);c=(l.then?(await l)():l)[0];const p="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",h="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z";class d extends n.WF{render(){return n.qy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"></ha-icon-button> `}constructor(...o){super(...o),this.disabled=!1,this._icon="rtl"===r.G.document.dir?h:p}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],d.prototype,"disabled",void 0),(0,i.Cg)([(0,s.MZ)()],d.prototype,"label",void 0),(0,i.Cg)([(0,s.MZ)()],d.prototype,"href",void 0),(0,i.Cg)([(0,s.MZ)()],d.prototype,"target",void 0),(0,i.Cg)([(0,s.MZ)()],d.prototype,"rel",void 0),(0,i.Cg)([(0,s.MZ)()],d.prototype,"download",void 0),(0,i.Cg)([(0,s.wk)()],d.prototype,"_icon",void 0),d=(0,i.Cg)([(0,s.EM)("ha-icon-button-prev")],d),e()}catch(o){e(o)}})},55218(o,t,a){a.a(o,async function(o,e){try{a.r(t);var i=a(62826),n=a(5124),s=a(22441),r=a(1087),c=a(63130),l=a(18350),p=a(72554),h=(a(93444),a(26300)),d=a(45100),g=(a(83892),a(31420)),y=a(14503),_=a(81619),u=o([l,p,h,d,g]);[l,p,h,d,g]=u.then?(await u)():u;const m="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",b="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",v="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z";class k extends n.WF{showDialog(o){this._params=o,this._open=!0}closeDialog(){return this._open&&(0,r.r)(this,"dialog-closed",{dialog:this.localName}),this._open=!1,this._params=void 0,!0}render(){return this._params?n.qy` <ha-dialog .open="${this._open}" header-title="${this.hass.localize("ui.panel.config.backup.dialogs.show_encryption_key.title")}" prevent-scrim-close @closed="${this.closeDialog}"> <ha-icon-button slot="headerNavigationIcon" data-dialog="close" .label="${this.hass.localize("ui.common.close")}" .path="${m}"></ha-icon-button> <p> ${this.hass.localize("ui.panel.config.backup.dialogs.show_encryption_key.description")} </p> <div class="encryption-key"> <p>${this._params?.currentKey}</p> <ha-icon-button .path="${b}" @click="${this._copyKeyToClipboard}"></ha-icon-button> </div> <ha-row-item> <span slot="headline"> ${this.hass.localize("ui.panel.config.backup.encryption_key.download_emergency_kit")} </span> <span slot="supporting-text"> ${this.hass.localize("ui.panel.config.backup.encryption_key.download_emergency_kit_description")} </span> <ha-button slot="end" appearance="filled" @click="${this._download}"> <ha-svg-icon .path="${v}" slot="start"></ha-svg-icon> ${this.hass.localize("ui.panel.config.backup.encryption_key.download_emergency_kit_action")} </ha-button> </ha-row-item> <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" @click="${this.closeDialog}"> ${this.hass.localize("ui.common.close")} </ha-button> </ha-dialog-footer> </ha-dialog> `:n.s6}async _copyKeyToClipboard(){this._params?.currentKey&&(await(0,c.l)(this._params?.currentKey,this._copyContainer),(0,_.P)(this,{message:this.hass.localize("ui.common.copied_clipboard")}))}_download(){this._params?.currentKey&&(0,g.Sx)(this.hass,this._params.currentKey,"old")}static get styles(){return[y.RF,y.nA,n.AH`ha-dialog{--dialog-content-padding:var(--ha-space-2) var(--ha-space-6)}ha-row-item{--ha-row-item-padding-inline:0}.encryption-key{border:1px solid var(--divider-color);background-color:var(--primary-background-color);border-radius:var(--ha-border-radius-md);padding:16px;display:flex;flex-direction:row;align-items:center;gap:var(--ha-space-6)}.encryption-key p{margin:0;flex:1;font-size:var(--ha-font-size-xl);font-family:var(--ha-font-family-code);font-style:normal;font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);text-align:center}.encryption-key ha-icon-button{flex:none;margin:-16px}p{margin-top:0}`]}constructor(...o){super(...o),this._open=!1}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],k.prototype,"hass",void 0),(0,i.Cg)([(0,s.wk)()],k.prototype,"_open",void 0),(0,i.Cg)([(0,s.wk)()],k.prototype,"_params",void 0),(0,i.Cg)([(0,s.P)("div")],k.prototype,"_copyContainer",void 0),k=(0,i.Cg)([(0,s.EM)("ha-dialog-show-backup-encryption-key")],k),e()}catch(o){e(o)}})}};