3 lines
18 KiB
JavaScript
3 lines
18 KiB
JavaScript
|
/*! For license information please see 8663.FdTscuomRRU.js.LICENSE.txt */
|
||
|
export const id=8663;export const ids=[8663];export const modules={96400:(e,t,i)=>{var n=i(309),a=i(34541),d=i(47838),r=i(5095),o=i(43204),l=i(95260),c=i(58417),s=i(39274);let p=class extends c.A{};p.styles=[s.W],p=(0,o.__decorate)([(0,l.Mo)("mwc-checkbox")],p);var h=i(53180),f=i(61092);class m extends f.K{constructor(){super(...arguments),this.left=!1,this.graphic="control"}render(){const e={"mdc-deprecated-list-item__graphic":this.left,"mdc-deprecated-list-item__meta":!this.left},t=this.renderText(),i=this.graphic&&"control"!==this.graphic&&!this.left?this.renderGraphic():r.dy``,n=this.hasMeta&&this.left?this.renderMeta():r.dy``,a=this.renderRipple();return r.dy` ${a} ${i} ${this.left?"":t} <span class="${(0,h.$)(e)}"> <mwc-checkbox reducedTouchTarget tabindex="${this.tabindex}" .checked="${this.selected}" ?disabled="${this.disabled}" @change="${this.onChange}"> </mwc-checkbox> </span> ${this.left?t:""} ${n}`}async onChange(e){const t=e.target;this.selected===t.checked||(this._skipPropRequest=!0,this.selected=t.checked,await this.updateComplete,this._skipPropRequest=!1)}}(0,o.__decorate)([(0,l.IO)("slot")],m.prototype,"slotElement",void 0),(0,o.__decorate)([(0,l.IO)("mwc-checkbox")],m.prototype,"checkboxElement",void 0),(0,o.__decorate)([(0,l.Cb)({type:Boolean})],m.prototype,"left",void 0),(0,o.__decorate)([(0,l.Cb)({type:String,reflect:!0})],m.prototype,"graphic",void 0);const g=r.iv`:host(:not([twoline])){height:56px}:host(:not([left])) .mdc-deprecated-list-item__meta{height:40px;width:40px}`;var u=i(96762),v=i(18394);(0,n.Z)([(0,l.Mo)("ha-check-list-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"onChange",value:async function(e){(0,a.Z)((0,d.Z)(i.prototype),"onChange",this).call(this,e),(0,v.B)(this,e.type)}},{kind:"field",static:!0,key:"styles",value:()=>[u.W,g,r.iv`:host{--mdc-theme-secondary:var(--primary-color)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,16px);margin-inline-start:0px;direction:var(--direction)}.mdc-deprecated-list-item__meta{flex-shrink:0;direction:var(--direction);margin-inline-start:auto;margin-inline-end:0}.mdc-deprecated-list-item__graphic{margin-top:var(--check-list-item-graphic-margin-top)}`]}]}}),m)},74376:(e,t,i)=>{var n=i(309),a=i(58417),d=i(39274),r=i(5095),o=i(95260);(0,n.Z)([(0,o.Mo)("ha-checkbox")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[d.W,r.iv`:host{--mdc-theme-secondary:var(--primary-color)}`]}]}}),a.A)},58663:(e,t,i)=>{i.r(t),i.d(t,{HaFormMultiSelect:()=>c});var n=i(309),a=i(5095),d=i(95260),r=i(18394);i(85878),i(96400),i(74376),i(48950),i(37662),i(51520);function o(e){return Array.isArray(e)?e[0]:e}function l(e){return Array.isArray(e)?e[1]||e[0]:e}let c=(0,n.Z)([(0,d.Mo)("ha-form-multi_select")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,d.Cb)()],key:"schema",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"data",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,d.SB)()],key:"_opened",value:()=>!1},{kind:"field",decorators:[(0,d.IO)("ha-button-menu")],key:"_input",value:void 0},{kind:"method",key:"focus",value:function(){this._input&&this._input.focus()}},{kind:"method",key:"render",value:function(){const e=Array.isArray(this.schema.options)?this.schema.options:Object.entries(this.schema.options),t=this.data||[];return e.length<6?a.dy`<div> ${this.label}${e.map((e=>{const i=o(e);return a.dy` <ha-formfield .label="${l(e)}"> <ha-checkbox .checked="${t.includes(i)}" .value="${i}" .disabled="${this.disabled}" @change="${this._valueChanged}"></ha-checkbox> </ha-formfield> `
|
||
|
//# sourceMappingURL=8663.FdTscuomRRU.js.map
|