iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 5.78 kB
JavaScript
export const __webpack_ids__=["9387"];export const __webpack_modules__={74633:function(e,o,t){var i=t(44249),a=t(72621),n=t(78755),s=t(57243),d=t(15093);(0,i.Z)([(0,d.Mo)("ha-md-list-item")],(function(e,o){class t extends o{constructor(...o){super(...o),e(this)}}return{F:t,d:[{kind:"field",static:!0,key:"styles",value(){return[...(0,a.Z)(t,"styles",this),s.iv`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center)}`]}}]}}),n.g)},19993:function(e,o,t){var i=t(44249),a=t(72621),n=t(623),s=t(57243),d=t(15093);(0,i.Z)([(0,d.Mo)("ha-md-list")],(function(e,o){class t extends o{constructor(...o){super(...o),e(this)}}return{F:t,d:[{kind:"field",static:!0,key:"styles",value(){return[...(0,a.Z)(t,"styles",this),s.iv`:host{--md-sys-color-surface:var(--card-background-color)}`]}}]}}),n.j)},72781:function(e,o,t){var i=t(44249),a=t(47711),n=t(81577),s=t(57243),d=t(15093);(0,i.Z)([(0,d.Mo)("ha-radio")],(function(e,o){return{F:class extends o{constructor(...o){super(...o),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[n.W,s.iv`:host{--mdc-theme-secondary:var(--primary-color)}`]}]}}),a.J)},19456:function(e,o,t){t.r(o);var i=t(44249),a=(t(9359),t(70104),t(31622),t(87319),t(57243)),n=t(15093),s=t(36522),d=(t(95198),t(23334),t(74633),t(19993),t(72781),t(83166),t(73729),t(14473)),l=t(68418),r=t(28008),c=t(73192);(0,i.Z)([(0,n.Mo)("ha-dialog-automation-mode")],(function(e,o){return{F:class extends o{constructor(...o){super(...o),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_opened",value:()=>!1},{kind:"field",key:"_params",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_newMode",value:()=>d.B$},{kind:"field",decorators:[(0,n.SB)()],key:"_newMax",value:void 0},{kind:"method",key:"showDialog",value:function(e){this._opened=!0,this._params=e,this._newMode=e.config.mode||d.B$,this._newMax=(0,l.vA)(this._newMode)?e.config.max||d.Yc:void 0}},{kind:"method",key:"closeDialog",value:function(){return this._params.onClose(),this._opened&&(0,s.B)(this,"dialog-closed",{dialog:this.localName}),this._opened=!1,!0}},{kind:"method",key:"render",value:function(){if(!this._opened)return a.Ld;const e=this.hass.localize("ui.panel.config.automation.editor.change_mode");return a.dy` <ha-dialog open scrimClickAction ="${this.closeDialog}" .heading="${e}"> <ha-dialog-header slot="heading"> <ha-icon-button slot="navigationIcon" dialogAction="cancel" .label="${this.hass.localize("ui.common.close")}" .path="${"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}"></ha-icon-button> <div slot="title">${e}</div> <a href="${(0,c.R)(this.hass,"/docs/automation/modes/")}" slot="actionItems" target="_blank" rel="noopener noreferer"> <ha-icon-button .label="${this.hass.localize("ui.panel.config.automation.editor.modes.learn_more")}" .path="${"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"}"></ha-icon-button> </a> </ha-dialog-header> <ha-md-list role="listbox" tabindex="0" aria-activedescendant="option-${this._newMode}" aria-label="${this.hass.localize("ui.panel.config.automation.editor.modes.label")}"> ${l.EH.map((e=>{const o=this.hass.localize(`ui.panel.config.automation.editor.modes.${e}`);return a.dy` <ha-md-list-item class="option" type="button" ="${this._modeChanged}" .value="${e}" id="option-${e}" role="option" aria-label="${o}" aria-selected="${this._newMode===e}"> <div slot="start"> <ha-radio inert .checked="${this._newMode===e}" value="${e}" ="${this._modeChanged}" name="mode"></ha-radio> </div> <div slot="headline"> ${this.hass.localize(`ui.panel.config.automation.editor.modes.${e}`)} </div> <div slot="supporting-text"> ${this.hass.localize(`ui.panel.config.automation.editor.modes.${e}_description`)} </div> </ha-md-list-item> `}))} </ha-md-list> ${(0,l.vA)(this._newMode)?a.dy` <div class="options"> <ha-textfield .label="${this.hass.localize(`ui.panel.config.automation.editor.max.${this._newMode}`)}" type="number" name="max" .value="${this._newMax?.toString()??""}" ="${this._valueChanged}" class="max"> </ha-textfield> </div> `:a.Ld} <mwc-button ="${this.closeDialog}" slot="secondaryAction"> ${this.hass.localize("ui.common.cancel")} </mwc-button> <mwc-button ="${this._save}" slot="primaryAction"> ${this.hass.localize("ui.panel.config.automation.editor.change_mode")} </mwc-button> </ha-dialog> `}},{kind:"method",key:"_modeChanged",value:function(e){const o=e.currentTarget.value;this._newMode=o,(0,l.vA)(o)?this._newMax||(this._newMax=d.Yc):this._newMax=void 0}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation();const o=e.target;"max"===o.name&&(this._newMax=Number(o.value))}},{kind:"method",key:"_save",value:function(){this._params.updateConfig({...this._params.config,mode:this._newMode,max:this._newMax}),this.closeDialog()}},{kind:"get",static:!0,key:"styles",value:function(){return[r.Qx,r.yu,a.iv`ha-textfield{display:block}ha-dialog{--dialog-content-padding:0}.options{padding:0 24px 24px 24px}ha-dialog-header a{color:inherit}`]}}]}}),a.oi)}};
//# sourceMappingURL=9387.65c096281754b23b.js.map