UNPKG

iobroker.lovelace

Version:

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

1 lines 2.04 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[60761],{70208:function(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{HaFormGrid:function(){return m}});o(18111),o(61701),o(62953);var s=o(40445),r=o(5124),i=o(67576),d=o(52763),p=t([d]);d=(p.then?(await p)():p)[0];let h,n,c,l=t=>t;class m extends r.WF{reportValidity(){var t;const e=null!==(t=this._forms)&&void 0!==t?t:[];let o=!0;for(const a of e)a.reportValidity()||(o=!1);return o}updated(t){super.updated(t),t.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",""))}render(){return(0,r.qy)(h||(h=l` ${0} `),this.schema.schema.map(t=>(0,r.qy)(n||(n=l` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .disabled="${0}" .computeLabel="${0}" .computeHelper="${0}" .localizeValue="${0}"></ha-form> `),this.hass,this.data,[t],this.disabled,this.computeLabel,this.computeHelper,this.localizeValue)))}constructor(...t){super(...t),this.disabled=!1}}m.shadowRootOptions=Object.assign(Object.assign({},r.WF.shadowRootOptions),{},{delegatesFocus:!0}),m.styles=(0,r.AH)(c||(c=l`: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:var(--ha-space-2);grid-row-gap:var(--ha-space-6)}:host>ha-form{display:block}`)),(0,s.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,s.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"data",void 0),(0,s.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"schema",void 0),(0,s.Cg)([(0,i.MZ)({type:Boolean})],m.prototype,"disabled",void 0),(0,s.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"computeLabel",void 0),(0,s.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"computeHelper",void 0),(0,s.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"localizeValue",void 0),(0,s.Cg)([(0,i.YG)("ha-form",!0)],m.prototype,"_forms",void 0),m=(0,s.Cg)([(0,i.EM)("ha-form-grid")],m),a()}catch(h){a(h)}})}}]);