iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
61 lines (50 loc) • 6.63 kB
JavaScript
/*! For license information please see chunk.5df976700d6cbcf67ff8.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[1422,9978,272,4328,7082,129,4823],{99257:(t,e,o)=>{"use strict";o(65233);var r=o(15112),l=o(9672),s=o(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 r.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 o=this._cloneIcon(e,this.rtlMirroring&&this._targetIsRTL(t));if(o){var r=(0,s.vz)(t.root||t);return r.insertBefore(o,r.childNodes[0]),t._svgIcon=o}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,o){if(t){var r=t.cloneNode(!0),l=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=r.getAttribute("viewBox")||"0 0 "+e+" "+e,i="pointer-events: none; display: block; width: 100%; height: 100%;";return o&&r.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(r).removeAttribute("id"),l}return null}})},67810:(t,e,o)=>{"use strict";o.d(e,{o:()=>l});o(65233);var r=o(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 o=this.domHost;this.scrollTarget=o&&o.$?o.$[t]:(0,r.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 o;"object"==typeof t?(o=t.left,e=t.top):o=t,o=o||0,e=e||0,this.scrollTarget===this._doc?window.scrollTo(o,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=o,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 o=e===this._doc?window:e;t?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),o.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(o.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(t){this._shouldHaveListener=t,this._toggleScrollListener(t,this.scrollTarget)}}},25782:(t,e,o)=>{"use strict";o(65233),o(65660),o(47686),o(97968);var r=o(9672),l=o(50856),s=o(33760);(0,r.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,o)=>{"use strict";o(65233),o(65660),o(1656),o(47686);var r=o(9672),l=o(50856);(0,r.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"})}}]);
//# sourceMappingURL=chunk.5df976700d6cbcf67ff8.js.map