iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 6.25 kB
JavaScript
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["9387"],{74633:function(e,o,t){var i=t(61701),a=t(72621),n=(t(71695),t(47021),t(78755)),s=t(57243),d=t(50778);let l,r=e=>e;(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),(0,s.iv)(l||(l=r`: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(61701),a=t(72621),n=(t(71695),t(47021),t(623)),s=t(57243),d=t(50778);let l,r=e=>e;(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),(0,s.iv)(l||(l=r`:host{--md-sys-color-surface:var(--card-background-color)}`))]}}]}}),n.j)},72781:function(e,o,t){var i=t(61701),a=(t(71695),t(47021),t(47711)),n=t(81577),s=t(57243),d=t(50778);let l,r=e=>e;(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(){return[n.W,(0,s.iv)(l||(l=r`:host{--mdc-theme-secondary:var(--primary-color)}`))]}}]}}),a.J)},19456:function(e,o,t){t.r(o);var i=t(61701),a=(t(71695),t(9359),t(70104),t(19423),t(11740),t(47021),t(31622),t(87319),t(57243)),n=t(50778),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);let h,u,m,v,p=e=>e;(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(){return!1}},{kind:"field",key:"_params",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_newMode",value(){return 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(){var e,o;if(!this._opened)return a.Ld;const t=this.hass.localize("ui.panel.config.automation.editor.change_mode");return(0,a.dy)(h||(h=p` <ha-dialog open scrimClickAction ="${0}" .heading="${0}"> <ha-dialog-header slot="heading"> <ha-icon-button slot="navigationIcon" dialogAction="cancel" .label="${0}" .path="${0}"></ha-icon-button> <div slot="title">${0}</div> <a href="${0}" slot="actionItems" target="_blank" rel="noopener noreferer"> <ha-icon-button .label="${0}" .path="${0}"></ha-icon-button> </a> </ha-dialog-header> <ha-md-list role="listbox" tabindex="0" aria-activedescendant="option-${0}" aria-label="${0}"> ${0} </ha-md-list> ${0} <mwc-button ="${0}" slot="secondaryAction"> ${0} </mwc-button> <mwc-button ="${0}" slot="primaryAction"> ${0} </mwc-button> </ha-dialog> `),this.closeDialog,t,this.hass.localize("ui.common.close"),"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",t,(0,c.R)(this.hass,"/docs/automation/modes/"),this.hass.localize("ui.panel.config.automation.editor.modes.learn_more"),"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",this._newMode,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(0,a.dy)(u||(u=p` <ha-md-list-item class="option" type="button" ="${0}" .value="${0}" id="option-${0}" role="option" aria-label="${0}" aria-selected="${0}"> <div slot="start"> <ha-radio inert .checked="${0}" value="${0}" ="${0}" name="mode"></ha-radio> </div> <div slot="headline"> ${0} </div> <div slot="supporting-text"> ${0} </div> </ha-md-list-item> `),this._modeChanged,e,e,o,this._newMode===e,this._newMode===e,e,this._modeChanged,this.hass.localize(`ui.panel.config.automation.editor.modes.${e}`),this.hass.localize(`ui.panel.config.automation.editor.modes.${e}_description`))})),(0,l.vA)(this._newMode)?(0,a.dy)(m||(m=p` <div class="options"> <ha-textfield .label="${0}" type="number" name="max" .value="${0}" ="${0}" class="max"> </ha-textfield> </div> `),this.hass.localize(`ui.panel.config.automation.editor.max.${this._newMode}`),null!==(e=null===(o=this._newMax)||void 0===o?void 0:o.toString())&&void 0!==e?e:"",this._valueChanged):a.Ld,this.closeDialog,this.hass.localize("ui.common.cancel"),this._save,this.hass.localize("ui.panel.config.automation.editor.change_mode"))}},{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(Object.assign(Object.assign({},this._params.config),{},{mode:this._newMode,max:this._newMax})),this.closeDialog()}},{kind:"get",static:!0,key:"styles",value:function(){return[r.Qx,r.yu,(0,a.iv)(v||(v=p`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.346021e86ff94d06.js.map