iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 2.13 kB
JavaScript
;(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["45036"],{20018:function(e,t,i){i.r(t),i.d(t,{HaFormGrid:()=>c});var a=i(61701),o=i(72621),d=(i(71695),i(9359),i(70104),i(40251),i(47021),i(29073),i(57243)),r=i(50778);let s,l,u,n=e=>e,c=(0,a.Z)([(0,r.Mo)("ha-form-grid")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"data",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"schema",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"computeLabel",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"computeHelper",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"localizeValue",value:void 0},{kind:"method",key:"focus",value:async function(){var e;await this.updateComplete,null===(e=this.renderRoot.querySelector("ha-form"))||void 0===e||e.focus()}},{kind:"method",key:"updated",value:function(e){(0,o.Z)(i,"updated",this,3)([e]),e.has("schema")&&(this.schema.column_min_width?this.style.setProperty("--form-grid-min-width",this.schema.column_min_width):this.style.setProperty("--form-grid-min-width",""))}},{kind:"method",key:"render",value:function(){return(0,d.dy)(s||(s=n` ${0} `),this.schema.schema.map((e=>(0,d.dy)(l||(l=n` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .disabled="${0}" .computeLabel="${0}" .computeHelper="${0}" .localizeValue="${0}"></ha-form> `),this.hass,this.data,[e],this.disabled,this.computeLabel,this.computeHelper,this.localizeValue))))}},{kind:"field",static:!0,key:"styles",value(){return(0,d.iv)(u||(u=n`:host{display:grid!important;grid-template-columns:repeat(var(--form-grid-column-count,auto-fit),minmax(var(--form-grid-min-width,200px),1fr));grid-column-gap:8px;grid-row-gap:24px}:host>ha-form{display:block}`))}}]}}),d.oi)}}]);
//# sourceMappingURL=45036.024ab17251f6ff52.js.map