iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
61 lines (50 loc) • 7.07 kB
JavaScript
/*! For license information please see chunk.7f084901e4ab99d1b0f9.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[655,4074,5374,4159,9978,272,4328,7082,129,1422,4823],{99257:(t,e,r)=>{"use strict";r(65233);var o=r(15112),l=r(9672),s=r(87156);(0,l.k)({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new o.P({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map((function(t){return this.name+":"+t}),this)},applyIcon:function(t,e){this.removeIcon(t);var r=this._cloneIcon(e,this.rtlMirroring&&this._targetIsRTL(t));if(r){var o=(0,s.vz)(t.root||t);return o.insertBefore(r,o.childNodes[0]),t._svgIcon=r}return null},removeIcon:function(t){t._svgIcon&&((0,s.vz)(t.root||t).removeChild(t._svgIcon),t._svgIcon=null)},_targetIsRTL:function(t){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var e=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===e.getAttribute("dir")}else t&&t.nodeType!==Node.ELEMENT_NODE&&(t=t.host),this.__targetIsRTL=t&&"rtl"===window.getComputedStyle(t).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async((function(){this.fire("iron-iconset-added",this,{node:window})}))},_createIconMap:function(){var t=Object.create(null);return(0,s.vz)(this).querySelectorAll("[id]").forEach((function(e){t[e.id]=e})),t},_cloneIcon:function(t,e){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[t],this.size,e)},_prepareSvgClone:function(t,e,r){if(t){var o=t.cloneNode(!0),l=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=o.getAttribute("viewBox")||"0 0 "+e+" "+e,i="pointer-events: none; display: block; width: 100%; height: 100%;";return r&&o.hasAttribute("mirror-in-rtl")&&(i+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),l.setAttribute("viewBox",s),l.setAttribute("preserveAspectRatio","xMidYMid meet"),l.setAttribute("focusable","false"),l.style.cssText=i,l.appendChild(o).removeAttribute("id"),l}return null}})},67810:(t,e,r)=>{"use strict";r.d(e,{o:()=>l});r(65233);var o=r(87156);const l={properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(t,e){if(this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),e)if("document"===t)this.scrollTarget=this._doc;else if("string"==typeof t){var r=this.domHost;this.scrollTarget=r&&r.$?r.$[t]:(0,o.vz)(this.ownerDocument).querySelector("#"+t)}else this._isValidScrollTarget()&&(this._oldScrollTarget=t,this._toggleScrollListener(this._shouldHaveListener,t))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(t){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=t)},set _scrollLeft(t){this.scrollTarget===this._doc?window.scrollTo(t,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=t)},scroll:function(t,e){var r;"object"==typeof t?(r=t.left,e=t.top):r=t,r=r||0,e=e||0,this.scrollTarget===this._doc?window.scrollTo(r,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=r,this.scrollTarget.scrollTop=e)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(t,e){var r=e===this._doc?window:e;t?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),r.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(r.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(t){this._shouldHaveListener=t,this._toggleScrollListener(t,this.scrollTarget)}}},25782:(t,e,r)=>{"use strict";r(65233),r(65660),r(47686),r(97968);var o=r(9672),l=r(50856),s=r(33760);(0,o.k)({_template:l.d`
<style include="paper-item-shared-styles"></style>
<style>
:host {
--layout-horizontal;
--layout-center;
--paper-font-subhead;
--paper-item;
--paper-icon-item;
}
.content-icon {
--layout-horizontal;
--layout-center;
width: var(--paper-item-icon-width, 56px);
--paper-item-icon;
}
</style>
<div id="contentIcon" class="content-icon">
<slot name="item-icon"></slot>
</div>
<slot></slot>
`,is:"paper-icon-item",behaviors:[s.U]})},89194:(t,e,r)=>{"use strict";r(65233),r(65660),r(1656),r(47686);var o=r(9672),l=r(50856);(0,o.k)({_template:l.d`
<style>
:host {
overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
--layout-vertical;
--layout-center-justified;
--layout-flex;
}
:host([two-line]) {
min-height: var(--paper-item-body-two-line-min-height, 72px);
}
:host([three-line]) {
min-height: var(--paper-item-body-three-line-min-height, 88px);
}
:host > ::slotted(*) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
:host > ::slotted([secondary]) {
--paper-font-body1;
color: var(--paper-item-body-secondary-color, var(--secondary-text-color));
--paper-item-body-secondary;
}
</style>
<slot></slot>
`,is:"paper-item-body"})},40417:(t,e,r)=>{"use strict";r.d(e,{l:()=>i});var o=r(99602),l=r(55122);const s={},i=(0,l.XM)(class extends l.Xe{constructor(){super(...arguments),this.$t=s}render(t,e){return e()}update(t,[e,r]){if(Array.isArray(e)){if(Array.isArray(this.$t)&&this.$t.length===e.length&&e.every(((t,e)=>t===this.$t[e])))return o.Jb}else if(this.$t===e)return o.Jb;return this.$t=Array.isArray(e)?Array.from(e):e,this.render(e,r)}})}}]);
//# sourceMappingURL=chunk.7f084901e4ab99d1b0f9.js.map