UNPKG

iobroker.lovelace

Version:

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

2 lines 9.45 kB
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["99091"],{5828:function(e,i,t){t.r(i),t.d(i,{HaIconButtonPrev:()=>r});var a=t(61701),o=(t(71695),t(47021),t(57243)),n=t(50778),l=t(5111);t(23334);let s,d=e=>e;let r=(0,a.Z)([(0,n.Mo)("ha-icon-button-prev")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_icon",value(){return"rtl"===l.E.document.dir?"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z":"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"}},{kind:"method",key:"render",value:function(){var e;return(0,o.dy)(s||(s=d` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.back"))||"Back",this._icon)}}]}}),o.oi)},51784:function(e,i,t){t.d(i,{dJ:()=>m,zB:()=>g});var a=t(61701),o=t(72621),n=(t(52247),t(71695),t(19423),t(40251),t(47021),t(67840)),l=t(88854),s=t(57243),d=t(50778);let r,c,h=e=>e;n.A.addInitializer((async e=>{await e.updateComplete;const i=e;i.dialog.prepend(i.scrim),i.scrim.style.inset=0,i.scrim.style.zIndex=0;const{getOpenAnimation:t,getCloseAnimation:a}=i;i.getOpenAnimation=()=>{var e,i;const a=t.call(void 0);return a.container=[...null!==(e=a.container)&&void 0!==e?e:[],...null!==(i=a.dialog)&&void 0!==i?i:[]],a.dialog=[],a},i.getCloseAnimation=()=>{var e,i;const t=a.call(void 0);return t.container=[...null!==(e=t.container)&&void 0!==e?e:[],...null!==(i=t.dialog)&&void 0!==i?i:[]],t.dialog=[],t}}));(0,a.Z)([(0,d.Mo)("ha-md-dialog")],(function(e,i){class a extends i{constructor(){super(),e(this),this.addEventListener("cancel",this._handleCancel),"function"!=typeof HTMLDialogElement&&(this.addEventListener("open",this._handleOpen),c||(c=t.e("73854").then(t.bind(t,85893)))),void 0===this.animate&&(this.quick=!0),void 0===this.animate&&(this.quick=!0)}}return{F:a,d:[{kind:"field",decorators:[(0,d.Cb)({attribute:"disable-cancel-action",type:Boolean})],key:"disableCancelAction",value(){return!1}},{kind:"field",key:"_polyfillDialogRegistered",value(){return!1}},{kind:"method",key:"_handleOpen",value:async function(e){var i;if(e.preventDefault(),this._polyfillDialogRegistered)return;this._polyfillDialogRegistered=!0,this._loadPolyfillStylesheet("/static/polyfills/dialog-polyfill.css");const t=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector("dialog");(await c).default.registerDialog(t),this.removeEventListener("open",this._handleOpen),this.show()}},{kind:"method",key:"_loadPolyfillStylesheet",value:async function(e){const i=document.createElement("link");return i.rel="stylesheet",i.href=e,new Promise(((t,a)=>{var o;i.onload=()=>t(),i.onerror=()=>a(new Error(`Stylesheet failed to load: ${e}`)),null===(o=this.shadowRoot)||void 0===o||o.appendChild(i)}))}},{kind:"method",key:"_handleCancel",value:function(e){if(this.disableCancelAction){var i;e.preventDefault();const t=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector("dialog .container");void 0!==this.animate&&(null==t||t.animate([{transform:"rotate(-1deg)","animation-timing-function":"ease-in"},{transform:"rotate(1.5deg)","animation-timing-function":"ease-out"},{transform:"rotate(0deg)","animation-timing-function":"ease-in"}],{duration:200,iterations:2}))}}},{kind:"field",static:!0,key:"styles",value(){return[...(0,o.Z)(a,"styles",this),(0,s.iv)(r||(r=h`:host{--md-dialog-container-color:var(--card-background-color);--md-dialog-headline-color:var(--primary-text-color);--md-dialog-supporting-text-color:var(--primary-text-color);--md-sys-color-scrim:#000000;--md-dialog-headline-weight:400;--md-dialog-headline-size:1.574rem;--md-dialog-supporting-text-size:1rem;--md-dialog-supporting-text-line-height:1.5rem}:host([type=alert]){min-width:320px}@media all and (max-width:450px),all and (max-height:500px){:host(:not([type=alert])){min-width:calc(100vw - env(safe-area-inset-right) - env(safe-area-inset-left));max-width:calc(100vw - env(safe-area-inset-right) - env(safe-area-inset-left));min-height:100%;max-height:100%;--md-dialog-container-shape:0}}::slotted(ha-dialog-header[slot=headline]){display:contents}.scroller{overflow:var(--dialog-content-overflow,auto)}slot[name=content]::slotted(*){padding:var(--dialog-content-padding,24px)}.scrim{z-index:10}`))]}}]}}),n.A);const u=Object.assign(Object.assign({},l.I),{},{dialog:[[[{transform:"translateY(50px)"},{transform:"translateY(0)"}],{duration:500,easing:"cubic-bezier(.3,0,0,1)"}]],container:[[[{opacity:0},{opacity:1}],{duration:50,easing:"linear",pseudoElement:"::before"}]]}),p=Object.assign(Object.assign({},l.G),{},{dialog:[[[{transform:"translateY(0)"},{transform:"translateY(50px)"}],{duration:150,easing:"cubic-bezier(.3,0,0,1)"}]],container:[[[{opacity:"1"},{opacity:"0"}],{delay:100,duration:50,easing:"linear",pseudoElement:"::before"}]]}),m=()=>window.matchMedia("all and (max-width: 450px), all and (max-height: 500px)").matches?u:l.I,g=()=>window.matchMedia("all and (max-width: 450px), all and (max-height: 500px)").matches?p:l.G},70697:function(e,i,t){t.a(e,(async function(e,a){try{t.r(i);var o=t(61701),n=(t(71695),t(40251),t(47021),t(57243)),l=t(50778),s=t(36522),d=t(87865),r=(t(59826),t(95198),t(23334),t(5828),t(51784),t(19993),t(74633),t(34326),t(26779)),c=t(28008),h=t(72473),u=e([r]);r=(u.then?(await u)():u)[0];let p,m,g=e=>e;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="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",f="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z";(0,o.Z)([(0,l.Mo)("ha-dialog-show-backup-encryption-key")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[(0,l.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,l.SB)()],key:"_params",value:void 0},{kind:"field",decorators:[(0,l.IO)("ha-md-dialog")],key:"_dialog",value:void 0},{kind:"method",key:"showDialog",value:function(e){this._params=e}},{kind:"method",key:"closeDialog",value:function(){return this._params=void 0,(0,s.B)(this,"dialog-closed",{dialog:this.localName}),!0}},{kind:"method",key:"_closeDialog",value:function(){this._dialog.close()}},{kind:"method",key:"render",value:function(){var e;return this._params?(0,n.dy)(p||(p=g` <ha-md-dialog disable-cancel-action open @closed="${0}"> <ha-dialog-header slot="headline"> <ha-icon-button slot="navigationIcon" .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> <span slot="title"> ${0} </span> </ha-dialog-header> <div slot="content"> <p> ${0} </p> <div class="encryption-key"> <p>${0}</p> <ha-icon-button .path="${0}" @click="${0}"></ha-icon-button> </div> <ha-md-list> <ha-md-list-item> <span slot="headline"> ${0} </span> <span slot="supporting-text"> ${0} </span> <ha-button slot="end" @click="${0}"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} </ha-button> </ha-md-list-item> </ha-md-list> </div> <div slot="actions"> <ha-button @click="${0}"> ${0} </ha-button> </div> </ha-md-dialog> `),this.closeDialog,this.hass.localize("ui.common.close"),v,this._closeDialog,this.hass.localize("ui.panel.config.backup.dialogs.show_encryption_key.title"),this.hass.localize("ui.panel.config.backup.dialogs.show_encryption_key.description"),null===(e=this._params)||void 0===e?void 0:e.currentKey,y,this._copyKeyToClipboard,this.hass.localize("ui.panel.config.backup.encryption_key.download_emergency_kit"),this.hass.localize("ui.panel.config.backup.encryption_key.download_emergency_kit_description"),this._download,f,this.hass.localize("ui.panel.config.backup.encryption_key.download_emergency_kit_action"),this._closeDialog,this.hass.localize("ui.common.close")):n.Ld}},{kind:"method",key:"_copyKeyToClipboard",value:async function(){var e,i;null!==(e=this._params)&&void 0!==e&&e.currentKey&&(await(0,d.v)(null===(i=this._params)||void 0===i?void 0:i.currentKey,this.renderRoot.querySelector("div")),(0,h.C)(this,{message:this.hass.localize("ui.common.copied_clipboard")}))}},{kind:"method",key:"_download",value:function(){var e;null!==(e=this._params)&&void 0!==e&&e.currentKey&&(0,r.VY)(this.hass,this._params.currentKey,"old")}},{kind:"get",static:!0,key:"styles",value:function(){return[c.Qx,c.yu,(0,n.iv)(m||(m=g`ha-md-dialog{width:90vw;max-width:560px;--dialog-content-padding:8px 24px}ha-md-list{background:0 0;--md-list-item-leading-space:0;--md-list-item-trailing-space:0}.encryption-key{border:1px solid var(--divider-color);background-color:var(--primary-background-color);border-radius:8px;padding:16px;display:flex;flex-direction:row;align-items:center;gap:24px}.encryption-key p{margin:0;flex:1;font-family:"Roboto Mono",Consolas,Menlo,monospace;font-size:20px;font-style:normal;font-weight:400;line-height:28px;text-align:center}.encryption-key ha-icon-button{flex:none;margin:-16px}@media all and (max-width:450px),all and (max-height:500px){ha-md-dialog{max-width:none}div[slot=content]{margin-top:0}}p{margin-top:0}`))]}}]}}),n.oi);a()}catch(p){a(p)}}))}}]); //# sourceMappingURL=99091.24282f9a03e17e7a.js.map