UNPKG

iobroker.lovelace

Version:

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

3 lines 9.81 kB
/*! For license information please see chunk.e63594f6b7091a060bae.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[8202,1823],{63207:function(t,e,i){"use strict";i(65660),i(15112);var n=i(9672),s=i(87156),o=i(50856),r=i(43437);function a(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(["\n <style>\n :host {\n @apply --layout-inline;\n @apply --layout-center-center;\n position: relative;\n\n vertical-align: middle;\n\n fill: var(--iron-icon-fill-color, currentcolor);\n stroke: var(--iron-icon-stroke-color, none);\n\n width: var(--iron-icon-width, 24px);\n height: var(--iron-icon-height, 24px);\n @apply --iron-icon;\n }\n\n :host([hidden]) {\n display: none;\n }\n </style>\n"]);return a=function(){return t},t}(0,n.k)({_template:(0,o.d)(a()),is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:r.XY.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(t){var e=(t||"").split(":");this._iconName=e.pop(),this._iconsetName=e.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(t){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&(0,s.vz)(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,(0,s.vz)(this.root).appendChild(this._img))}})},78161:function(t,e,i){"use strict";i.d(e,{D:function(){return a},i:function(){return c}});i(43437);var n=i(8621),s=i(6755),o=i(11018),r=i(87156),a={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:!0,type:Object},attrForItemTitle:{type:String},disabled:{type:Boolean,value:!1,observer:"_disabledChanged"}},_MODIFIER_KEYS:["Alt","AltGraph","CapsLock","Control","Fn","FnLock","Hyper","Meta","NumLock","OS","ScrollLock","Shift","Super","Symbol","SymbolLock"],_SEARCH_RESET_TIMEOUT_MS:1e3,_previousTabIndex:0,hostAttributes:{role:"menu"},observers:["_updateMultiselectable(multi)"],listeners:{focus:"_onFocus",keydown:"_onKeydown","iron-items-changed":"_onIronItemsChanged"},keyBindings:{up:"_onUpKey",down:"_onDownKey",esc:"_onEscKey","shift+tab:keydown":"_onShiftTabDown"},attached:function(){this._resetTabindices()},select:function(t){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null);var e=this._valueToItem(t);e&&e.hasAttribute("disabled")||(this._setFocusedItem(e),s.A.select.apply(this,arguments))},_resetTabindices:function(){var t=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach((function(e){e.setAttribute("tabindex",e===t?"0":"-1"),e.setAttribute("aria-selected",this._selection.isSelected(e))}),this)},_updateMultiselectable:function(t){t?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable")},_focusWithKeyboardEvent:function(t){if(-1===this._MODIFIER_KEYS.indexOf(t.key)){this.cancelDebouncer("_clearSearchText");for(var e,i=this._searchText||"",n=(i+=(t.key&&1==t.key.length?t.key:String.fromCharCode(t.keyCode)).toLocaleLowerCase()).length,s=0;e=this.items[s];s++)if(!e.hasAttribute("disabled")){var o=this.attrForItemTitle||"textContent",r=(e[o]||e.getAttribute(o)||"").trim();if(!(r.length<n)&&r.slice(0,n).toLocaleLowerCase()==i){this._setFocusedItem(e);break}}this._searchText=i,this.debounce("_clearSearchText",this._clearSearchText,this._SEARCH_RESET_TIMEOUT_MS)}},_clearSearchText:function(){this._searchText=""},_focusPrevious:function(){for(var t=this.items.length,e=Number(this.indexOf(this.focusedItem)),i=1;i<t+1;i++){var n=this.items[(e-i+t)%t];if(!n.hasAttribute("disabled")){var s=(0,r.vz)(n).getOwnerRoot()||document;if(this._setFocusedItem(n),(0,r.vz)(s).activeElement==n)return}}},_focusNext:function(){for(var t=this.items.length,e=Number(this.indexOf(this.focusedItem)),i=1;i<t+1;i++){var n=this.items[(e+i)%t];if(!n.hasAttribute("disabled")){var s=(0,r.vz)(n).getOwnerRoot()||document;if(this._setFocusedItem(n),(0,r.vz)(s).activeElement==n)return}}},_applySelection:function(t,e){e?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"),o.P._applySelection.apply(this,arguments)},_focusedItemChanged:function(t,e){e&&e.setAttribute("tabindex","-1"),!t||t.hasAttribute("disabled")||this.disabled||(t.setAttribute("tabindex","0"),t.focus())},_onIronItemsChanged:function(t){t.detail.addedNodes.length&&this._resetTabindices()},_onShiftTabDown:function(t){var e=this.getAttribute("tabindex");a._shiftTabPressed=!0,this._setFocusedItem(null),this.setAttribute("tabindex","-1"),this.async((function(){this.setAttribute("tabindex",e),a._shiftTabPressed=!1}),1)},_onFocus:function(t){if(!a._shiftTabPressed){var e=(0,r.vz)(t).rootTarget;(e===this||void 0===e.tabIndex||this.isLightDescendant(e))&&(this._defaultFocusAsync=this.async((function(){var t=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this._setFocusedItem(null),t?this._setFocusedItem(t):this.items[0]&&this._focusNext()})))}},_onUpKey:function(t){this._focusPrevious(),t.detail.keyboardEvent.preventDefault()},_onDownKey:function(t){this._focusNext(),t.detail.keyboardEvent.preventDefault()},_onEscKey:function(t){var e=this.focusedItem;e&&e.blur()},_onKeydown:function(t){this.keyboardEventMatchesKeys(t,"up down esc")||this._focusWithKeyboardEvent(t),t.stopPropagation()},_activateHandler:function(t){o.P._activateHandler.call(this,t),t.stopPropagation()},_disabledChanged:function(t){t?(this._previousTabIndex=this.hasAttribute("tabindex")?this.tabIndex:0,this.removeAttribute("tabindex")):this.hasAttribute("tabindex")||this.setAttribute("tabindex",this._previousTabIndex)},_shiftTabPressed:!1},c=[s.U,n.G,a]},15112:function(t,e,i){"use strict";i.d(e,{P:function(){return o}});i(43437);var n=i(9672);function s(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),t[" "](e),this.type=e&&e.type||"default",this.key=e&&e.key,e&&"value"in e&&(this.value=e.value)}var e,i,n;return e=t,(i=[{key:"byKey",value:function(t){return this.key=t,this.value}},{key:"value",get:function(){var e=this.type,i=this.key;if(e&&i)return t.types[e]&&t.types[e][i]},set:function(e){var i=this.type,n=this.key;i&&n&&(i=t.types[i]=t.types[i]||{},null==e?delete i[n]:i[n]=e)}},{key:"list",get:function(){if(this.type){var e=t.types[this.type];return e?Object.keys(e).map((function(t){return r[this.type][t]}),this):[]}}}])&&s(e.prototype,i),n&&s(e,n),t}();o[" "]=function(){},o.types={};var r=o.types;(0,n.k)({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(t,e,i){var n=new o({type:t,key:e});return void 0!==i&&i!==n.value?n.value=i:this.value!==n.value&&(this.value=n.value),n},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(t){t&&(this.value=this)},byKey:function(t){return new o({type:this.type,key:t}).value}})},58993:function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}i.d(e,{yh:function(){return r},U2:function(){return c},t8:function(){return u},ZH:function(){return h}});var o,r=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"keyval-store",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"keyval";n(this,t),this.storeName=i,this._dbp=new Promise((function(t,n){var s=indexedDB.open(e,1);s.onerror=function(){return n(s.error)},s.onsuccess=function(){return t(s.result)},s.onupgradeneeded=function(){s.result.createObjectStore(i)}}))}var e,i,o;return e=t,(i=[{key:"_withIDBStore",value:function(t,e){var i=this;return this._dbp.then((function(n){return new Promise((function(s,o){var r=n.transaction(i.storeName,t);r.oncomplete=function(){return s()},r.onabort=r.onerror=function(){return o(r.error)},e(r.objectStore(i.storeName))}))}))}}])&&s(e.prototype,i),o&&s(e,o),t}();function a(){return o||(o=new r),o}function c(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a();return i._withIDBStore("readonly",(function(i){e=i.get(t)})).then((function(){return e.result}))}function u(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a();return i._withIDBStore("readwrite",(function(i){i.put(e,t)}))}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a();return t._withIDBStore("readwrite",(function(t){t.clear()}))}}}]); //# sourceMappingURL=chunk.e63594f6b7091a060bae.js.map