UNPKG

iobroker.lovelace

Version:

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

1 lines 1.86 kB
export const __rspack_esm_id=60761;export const __rspack_esm_ids=[60761];export const __webpack_modules__={70208(t,o,e){e.a(t,async function(t,a){try{e.r(o),e.d(o,{HaFormGrid:()=>m});e(18111),e(61701);var r=e(62826),s=e(5124),i=e(22441),p=e(52763),d=t([p]);p=(d.then?(await d)():d)[0];class m extends s.WF{reportValidity(){const t=this._forms??[];let o=!0;for(const e of t)e.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 s.qy` ${this.schema.schema.map(t=>s.qy` <ha-form .hass="${this.hass}" .data="${this.data}" .schema="${[t]}" .disabled="${this.disabled}" .computeLabel="${this.computeLabel}" .computeHelper="${this.computeHelper}" .localizeValue="${this.localizeValue}"></ha-form> `)} `}constructor(...t){super(...t),this.disabled=!1}}m.shadowRootOptions={...s.WF.shadowRootOptions,delegatesFocus:!0},m.styles=s.AH`: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,r.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,r.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"data",void 0),(0,r.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"schema",void 0),(0,r.Cg)([(0,i.MZ)({type:Boolean})],m.prototype,"disabled",void 0),(0,r.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"computeLabel",void 0),(0,r.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"computeHelper",void 0),(0,r.Cg)([(0,i.MZ)({attribute:!1})],m.prototype,"localizeValue",void 0),(0,r.Cg)([(0,i.YG)("ha-form",!0)],m.prototype,"_forms",void 0),m=(0,r.Cg)([(0,i.EM)("ha-form-grid")],m),a()}catch(t){a(t)}})}};