UNPKG

iobroker.lovelace

Version:

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

2 lines 13.7 kB
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["25117"],{31146:function(e,t,i){i.d(t,{i:()=>a});const o=(0,i(93826).P)((e=>{history.replaceState({scrollPosition:e},"")}),300),a=e=>t=>({kind:"method",placement:"prototype",key:t.key,descriptor:{set(e){o(e),this[`__${String(t.key)}`]=e},get(){var e;return this[`__${String(t.key)}`]||(null===(e=history.state)||void 0===e?void 0:e.scrollPosition)},enumerable:!0,configurable:!0},finisher(i){const o=i.prototype.connectedCallback;i.prototype.connectedCallback=function(){o.call(this);const i=this[t.key];i&&this.updateComplete.then((()=>{const t=this.renderRoot.querySelector(e);t&&setTimeout((()=>{t.scrollTop=i}),0)}))}}})},87707:function(e,t,i){i.d(t,{Q:()=>o});const o=e=>!(!e.detail.selected||"property"!==e.detail.source)&&(e.currentTarget.selected=!1,!0)},93826:function(e,t,i){i.d(t,{P:()=>o});i(71695),i(47021);const o=(e,t,i=!0,o=!0)=>{let a,r=0;const n=(...n)=>{const s=()=>{r=!1===i?0:Date.now(),a=void 0,e(...n)},d=Date.now();r||!1!==i||(r=d);const l=t-(d-r);l<=0||l>t?(a&&(clearTimeout(a),a=void 0),r=d,e(...n)):a||!1===o||(a=window.setTimeout(s,l))};return n.cancel=()=>{clearTimeout(a),a=void 0,r=0},n}},54977:function(e,t,i){var o=i(61701),a=(i(71695),i(47021),i(57243)),r=i(50778);let n,s,d,l=e=>e;(0,o.Z)([(0,r.Mo)("ha-card")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,r.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"raised",value(){return!1}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(n||(n=l`: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,a.dy)(s||(s=l` ${0} <slot></slot> `),this.header?(0,a.dy)(d||(d=l`<h1 class="card-header">${0}</h1>`),this.header):a.Ld)}}]}}),a.oi)},48103:function(e,t,i){var o=i(61701),a=i(72621),r=(i(71695),i(40251),i(47021),i(57243)),n=i(93958),s=i(97536),d=i(46289),l=i(50778),c=i(36522);let h,p=e=>e;(0,o.Z)([(0,l.Mo)("ha-check-list-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"onChange",value:async function(e){(0,a.Z)(i,"onChange",this,3)([e]),(0,c.B)(this,e.type)}},{kind:"field",static:!0,key:"styles",value(){return[d.W,s.W,(0,r.iv)(h||(h=p`:host{--mdc-theme-secondary:var(--primary-color)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,16px);margin-inline-start:0px;direction:var(--direction)}.mdc-deprecated-list-item__meta{flex-shrink:0;direction:var(--direction);margin-inline-start:auto;margin-inline-end:0}.mdc-deprecated-list-item__graphic{margin-top:var(--check-list-item-graphic-margin-top)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{margin-inline-start:0;margin-inline-end:var(--mdc-list-item-graphic-margin,32px)}`))]}}]}}),n.F)},54202:function(e,t,i){i.r(t),i.d(t,{HaIconButtonArrowPrev:()=>l});var o=i(61701),a=(i(71695),i(47021),i(57243)),r=i(50778),n=i(5111);i(23334);let s,d=e=>e;let l=(0,o.Z)([(0,r.Mo)("ha-icon-button-arrow-prev")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_icon",value(){return"rtl"===n.E.document.dir?"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z":"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"}},{kind:"method",key:"render",value:function(){var e;return(0,a.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)}}]}}),a.oi)},87979:function(e,t,i){var o=i(61701),a=(i(71695),i(47021),i(57243)),r=i(50778),n=i(31146),s=(i(54202),i(43344),i(28008));let d,l,c,h,p,u=e=>e;(0,o.Z)([(0,r.Mo)("hass-subpage")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"main-page"})],key:"mainPage",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"backCallback",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"supervisor",value(){return!1}},{kind:"field",decorators:[(0,n.i)(".content")],key:"_savedScrollPos",value:void 0},{kind:"method",key:"render",value:function(){var e;return(0,a.dy)(d||(d=u` <div class="toolbar"> ${0} <div class="main-title"><slot name="header">${0}</slot></div> <slot name="toolbar-icon"></slot> </div> <div class="content ha-scrollbar" @scroll="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),this.mainPage||null!==(e=history.state)&&void 0!==e&&e.root?(0,a.dy)(l||(l=u` <ha-menu-button .hassio="${0}" .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.supervisor,this.hass,this.narrow):this.backPath?(0,a.dy)(c||(c=u` <a href="${0}"> <ha-icon-button-arrow-prev .hass="${0}"></ha-icon-button-arrow-prev> </a> `),this.backPath,this.hass):(0,a.dy)(h||(h=u` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,this._saveScrollPos)}},{kind:"method",decorators:[(0,r.hO)({passive:!0})],key:"_saveScrollPos",value:function(e){this._savedScrollPos=e.target.scrollTop}},{kind:"method",key:"_backTapped",value:function(){this.backCallback?this.backCallback():history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[s.$c,(0,a.iv)(p||(p=u`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin:var(--margin-title);line-height:20px;min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;padding-bottom:1px}.content{position:relative;width:100%;height:calc(100% - 1px - var(--header-height));overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}#fab{position:absolute;right:calc(16px + env(safe-area-inset-right));inset-inline-end:calc(16px + env(safe-area-inset-right));inset-inline-start:initial;bottom:calc(16px + env(safe-area-inset-bottom));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}:host([narrow]) #fab.tabs{bottom:calc(84px + env(safe-area-inset-bottom))}#fab[is-wide]{bottom:24px;right:24px;inset-inline-end:24px;inset-inline-start:initial}`))]}}]}}),a.oi)},29782:function(e,t,i){i.a(e,(async function(e,o){try{i.r(t);var a=i(61701),r=i(72621),n=(i(71695),i(61893),i(9359),i(56475),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(47021),i(57243)),s=i(50778),d=i(27486),l=i(72344),c=i(87707),h=i(83523),p=i(58776),u=(i(54977),i(48103),i(25482)),b=(i(87979),i(6736)),v=i(99801),m=i(17227),g=i(25576),f=e([v]);v=(f.then?(await f)():f)[0];let k,y,x,w,_,$=e=>e;const C="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z";(0,a.Z)([(0,s.Mo)("ha-config-repairs-dashboard")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,s.SB)()],key:"_repairsIssues",value(){return[]}},{kind:"field",decorators:[(0,s.SB)()],key:"_showIgnored",value(){return!1}},{kind:"field",key:"_getFilteredIssues",value(){return(0,d.Z)(((e,t)=>e?t:t.filter((e=>!e.ignored))))}},{kind:"method",key:"connectedCallback",value:function(){(0,r.Z)(i,"connectedCallback",this,3)([]);"system-health"===(0,p.io)("dialog")&&((0,h.c)("/config/repairs",{replace:!0}),(0,g.H)(this))}},{kind:"method",key:"hassSubscribe",value:function(){return[(0,u.$X)(this.hass.connection,(e=>{this._repairsIssues=e.issues.sort(((e,t)=>u.wC[e.severity]-u.wC[t.severity]));const t=new Set;for(const i of this._repairsIssues)t.add(i.domain);this.hass.loadBackendTranslation("issues",[...t])}))]}},{kind:"method",key:"render",value:function(){const e=this._getFilteredIssues(this._showIgnored,this._repairsIssues);return(0,n.dy)(k||(k=$` <hass-subpage back-path="/config/system" .hass="${0}" .narrow="${0}" .header="${0}"> <div slot="toolbar-icon"> <ha-button-menu multi> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> <ha-check-list-item left @request-selected="${0}" .selected="${0}"> ${0} </ha-check-list-item> <li divider role="separator"></li> ${0} <mwc-list-item @request-selected="${0}"> ${0} </mwc-list-item> </ha-button-menu> </div> <div class="content"> <ha-card outlined> <div class="card-content"> ${0} </div> </ha-card> </div> </hass-subpage> `),this.hass,this.narrow,this.hass.localize("ui.panel.config.repairs.caption"),this.hass.localize("ui.common.menu"),C,this._toggleIgnored,this._showIgnored,this.hass.localize("ui.panel.config.repairs.show_ignored"),(0,l.p)(this.hass,"system_health")||(0,l.p)(this.hass,"hassio")?(0,n.dy)(y||(y=$` <mwc-list-item @request-selected="${0}"> ${0} </mwc-list-item> `),this._showSystemInformationDialog,this.hass.localize("ui.panel.config.repairs.system_information")):"",this._showIntegrationStartupDialog,this.hass.localize("ui.panel.config.repairs.integration_startup_time"),e.length?(0,n.dy)(x||(x=$` <ha-config-repairs .hass="${0}" .narrow="${0}" .repairsIssues="${0}"></ha-config-repairs> `),this.hass,this.narrow,e):(0,n.dy)(w||(w=$` <div class="no-repairs"> ${0} </div> `),this.hass.localize("ui.panel.config.repairs.no_repairs")))}},{kind:"method",key:"_showSystemInformationDialog",value:function(e){(0,c.Q)(e)&&(0,g.H)(this)}},{kind:"method",key:"_showIntegrationStartupDialog",value:function(e){(0,c.Q)(e)&&(0,m.b)(this)}},{kind:"method",key:"_toggleIgnored",value:function(e){"property"===e.detail.source&&(this._showIgnored=!this._showIgnored)}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(_||(_=$`.content{padding:28px 20px 0;max-width:1040px;margin:0 auto}ha-card{max-width:600px;margin:0 auto;height:100%;justify-content:space-between;flex-direction:column;display:flex;margin-bottom:max(24px,env(safe-area-inset-bottom))}.card-content{display:flex;justify-content:space-between;flex-direction:column;padding:0}.no-repairs{padding:16px}li[divider]{border-bottom-color:var(--divider-color)}`))}}]}}),(0,b.f)(n.oi));o()}catch(k){o(k)}}))},17227:function(e,t,i){i.d(t,{b:()=>r});i(71695),i(40251),i(47021);var o=i(36522);const a=()=>Promise.all([i.e("91552"),i.e("97983"),i.e("71815"),i.e("59325")]).then(i.bind(i,9954)),r=e=>{(0,o.B)(e,"show-dialog",{dialogTag:"dialog-integration-startup",dialogImport:a,dialogParams:{}})}},25576:function(e,t,i){i.d(t,{H:()=>r});i(71695),i(40251),i(47021);var o=i(36522);const a=()=>Promise.all([i.e("97983"),i.e("43572"),i.e("34658")]).then(i.bind(i,2048)),r=e=>{(0,o.B)(e,"show-dialog",{dialogTag:"dialog-system-information",dialogImport:a,dialogParams:void 0})}}}]); //# sourceMappingURL=25117.49406709468ac280.js.map