UNPKG

iobroker.lovelace

Version:

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

3 lines 5.31 kB
/*! For license information please see 35577.8f3f4ba58c5010e1.js.LICENSE.txt */ export const __webpack_ids__=["35577"];export const __webpack_modules__={71220:function(e,t,o){o.d(t,{Dm:()=>s,jg:()=>r,p4:()=>i,pN:()=>n,xC:()=>a});const a=e=>{let t=e;return"string"==typeof e&&(t=parseInt(e,16)),"0x"+t.toString(16).padStart(4,"0")},i=e=>e.split(":").slice(-4).reverse().join(""),r=(e,t)=>{const o=e.user_given_name?e.user_given_name:e.name,a=t.user_given_name?t.user_given_name:t.name;return o.localeCompare(a)},n=(e,t)=>{const o=e.name,a=t.name;return o.localeCompare(a)},s=e=>`${e.name} (Endpoint id: ${e.endpoint_id}, Id: ${a(e.id)}, Type: ${e.type})`},90072:function(e,t,o){o.a(e,(async function(e,a){try{o.r(t),o.d(t,{ZHAGroupsDashboard:()=>v});var i=o(44249),r=o(72621),n=(o(9359),o(70104),o(31622),o(57243)),s=o(15093),d=o(27486),l=o(83523),c=(o(20130),o(23334),o(74794)),u=(o(38419),o(28008)),p=o(71220),h=o(34976),f=e([h]);h=(f.then?(await f)():f)[0];const b="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z";let v=(0,i.Z)([(0,s.Mo)("zha-groups-dashboard")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({attribute:"is-wide",type:Boolean})],key:"isWide",value:()=>!1},{kind:"field",decorators:[(0,s.SB)()],key:"_groups",value:()=>[]},{kind:"field",key:"_firstUpdatedCalled",value:()=>!1},{kind:"method",key:"connectedCallback",value:function(){(0,r.Z)(o,"connectedCallback",this,3)([]),this.hass&&this._firstUpdatedCalled&&this._fetchGroups()}},{kind:"method",key:"firstUpdated",value:function(e){(0,r.Z)(o,"firstUpdated",this,3)([e]),this.hass&&this._fetchGroups(),this._firstUpdatedCalled=!0}},{kind:"field",key:"_formattedGroups",value:()=>(0,d.Z)((e=>{let t=e;return t=t.map((e=>({...e,id:String(e.group_id)}))),t}))},{kind:"field",key:"_columns",value:()=>(0,d.Z)((e=>({name:{title:e("ui.panel.config.zha.groups.groups"),sortable:!0,filterable:!0,showNarrow:!0,main:!0,hideable:!1,moveable:!1,direction:"asc",flex:2},group_id:{title:e("ui.panel.config.zha.groups.group_id"),type:"numeric",template:e=>n.dy` ${(0,p.xC)(e.group_id)} `,sortable:!0},members:{title:e("ui.panel.config.zha.groups.members"),type:"numeric",template:e=>n.dy` ${e.members.length} `,sortable:!0}})))},{kind:"method",key:"render",value:function(){return n.dy` <hass-tabs-subpage-data-table .tabs="${h.zhaTabs}" .hass="${this.hass}" .narrow="${this.narrow}" .route="${this.route}" .columns="${this._columns(this.hass.localize)}" .data="${this._formattedGroups(this._groups)}" @row-click="${this._handleRowClicked}" clickable has-fab> <a href="/config/zha/group-add" slot="fab"> <ha-fab .label="${this.hass.localize("ui.panel.config.zha.groups.add_group")}" extended> <ha-svg-icon slot="icon" .path="${b}"></ha-svg-icon> </ha-fab> </a> </hass-tabs-subpage-data-table> `}},{kind:"method",key:"_fetchGroups",value:async function(){this._groups=(await(0,c.bt)(this.hass)).sort(p.pN)}},{kind:"method",key:"_handleRowClicked",value:function(e){const t=e.detail.id;(0,l.c)(`/config/zha/group/${t}`)}},{kind:"get",static:!0,key:"styles",value:function(){return[u.Qx,n.iv`a{color:var(--primary-color)}`]}}]}}),n.oi);a()}catch(e){a(e)}}))},35709:function(e,t,o){var a=o(27847),i=o(72309),r=o(13465).f,n=a("unscopables"),s=Array.prototype;void 0===s[n]&&r(s,n,{configurable:!0,value:i(null)}),e.exports=function(e){s[n][e]=!0}},17743:function(e,t,o){var a=o(13053);e.exports=function(e,t,o){for(var i=0,r=arguments.length>2?o:a(t),n=new e(r);r>i;)n[i]=t[i++];return n}},37595:function(e,t,o){var a=o(31269),i=o(72878),r=o(25091),n=o(12360),s=o(70273),d=o(13053),l=o(72309),c=o(17743),u=Array,p=i([].push);e.exports=function(e,t,o,i){for(var h,f,b,v=n(e),g=r(v),_=a(t,o),m=l(null),y=d(g),k=0;y>k;k++)b=g[k],(f=s(_(b,k,v)))in m?p(m[f],b):m[f]=[b];if(i&&(h=i(v))!==u)for(f in m)m[f]=c(h,m[f]);return m}},22139:function(e,t,o){var a=o(40810),i=o(37595),r=o(35709);a({target:"Array",proto:!0},{group:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r("group")},1231:function(e,t,o){o.d(t,{B:()=>d});var a=o(9065),i=o(15093),r=o(57243);class n extends r.oi{constructor(){super(...arguments),this.inset=!1,this.insetStart=!1,this.insetEnd=!1}}(0,a.__decorate)([(0,i.Cb)({type:Boolean,reflect:!0})],n.prototype,"inset",void 0),(0,a.__decorate)([(0,i.Cb)({type:Boolean,reflect:!0,attribute:"inset-start"})],n.prototype,"insetStart",void 0),(0,a.__decorate)([(0,i.Cb)({type:Boolean,reflect:!0,attribute:"inset-end"})],n.prototype,"insetEnd",void 0);const s=r.iv`:host{box-sizing:border-box;color:var(--md-divider-color,var(--md-sys-color-outline-variant,#cac4d0));display:flex;height:var(--md-divider-thickness,1px);width:100%}:host([inset-start]),:host([inset]){padding-inline-start:16px}:host([inset-end]),:host([inset]){padding-inline-end:16px}:host::before{background:currentColor;content:"";height:100%;width:100%}@media(forced-colors:active){:host::before{background:CanvasText}}`;let d=class extends n{};d.styles=[s],d=(0,a.__decorate)([(0,i.Mo)("md-divider")],d)}}; //# sourceMappingURL=35577.8f3f4ba58c5010e1.js.map