UNPKG

iobroker.lovelace

Version:

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

3 lines 5.76 kB
/*! For license information please see 62288.5fb92eb7590c3f60.js.LICENSE.txt */ export const __webpack_ids__=["62288"];export const __webpack_modules__={87319:function(e,a,t){var i=t(9065),o=t(15093),s=t(65703),n=t(46289);let l=class extends s.K{};l.styles=[n.W],l=(0,i.__decorate)([(0,o.Mo)("mwc-list-item")],l)},87707:function(e,a,t){t.d(a,{Q:()=>i});const i=e=>!(!e.detail.selected||"property"!==e.detail.source)&&(e.currentTarget.selected=!1,!0)},13928:function(e,a,t){t.r(a),t.d(a,{HaIconNext:()=>l});var i=t(44249),o=t(15093),s=t(5111),n=t(37583);let l=(0,i.Z)([(0,o.Mo)("ha-icon-next")],(function(e,a){return{F:class extends a{constructor(...a){super(...a),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)()],key:"path",value:()=>"rtl"===s.E.document.dir?"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z":"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}]}}),n.HaSvgIcon)},59981:function(e,a,t){t.r(a);var i=t(44249),o=(t(2060),t(57243)),s=t(15093),n=t(36522),l=t(87707),c=t(73729),d=(t(13928),t(7285),t(28008));const h={views:[{title:"Home"}]},r=[{type:"map",iconPath:"M15,19L9,16.89V5L15,7.11M20.5,3C20.44,3 20.39,3 20.34,3L15,5.1L9,3L3.36,4.9C3.15,4.97 3,5.15 3,5.38V20.5A0.5,0.5 0 0,0 3.5,21C3.55,21 3.61,21 3.66,20.97L9,18.9L15,21L20.64,19.1C20.85,19 21,18.85 21,18.62V3.5A0.5,0.5 0 0,0 20.5,3Z"},{type:"iframe",iconPath:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},{type:"areas",iconPath:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"}];(0,i.Z)([(0,s.Mo)("ha-dialog-new-dashboard")],(function(e,a){return{F:class extends a{constructor(...a){super(...a),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_opened",value:()=>!1},{kind:"field",decorators:[(0,s.SB)()],key:"_params",value:void 0},{kind:"method",key:"showDialog",value:function(e){this._opened=!0,this._params=e}},{kind:"method",key:"closeDialog",value:function(){return this._opened&&(0,n.B)(this,"dialog-closed",{dialog:this.localName}),this._opened=!1,this._params=void 0,!0}},{kind:"method",key:"render",value:function(){return this._opened?o.dy` <ha-dialog open hideActions @closed="${this.closeDialog}" .heading="${(0,c.i)(this.hass,this.hass.localize("ui.panel.config.lovelace.dashboards.dialog_new.header"))}"> <mwc-list innerRole="listbox" itemRoles="option" innerAriaLabel="${this.hass.localize("ui.panel.config.lovelace.dashboards.dialog_new.header")}" rootTabbable dialogInitialFocus @selected="${this._selected}"> <ha-list-item hasmeta twoline graphic="icon" .config="${h}" @request-selected="${this._selected}"> <ha-svg-icon slot="graphic" .path="${"M14.06,9L15,9.94L5.92,19H5V18.08L14.06,9M17.66,3C17.41,3 17.15,3.1 16.96,3.29L15.13,5.12L18.88,8.87L20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18.17,3.09 17.92,3 17.66,3M14.06,6.19L3,17.25V21H6.75L17.81,9.94L14.06,6.19Z"}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.lovelace.dashboards.dialog_new.create_empty")} <span slot="secondary"> ${this.hass.localize("ui.panel.config.lovelace.dashboards.dialog_new.create_empty_description")} </span> <ha-icon-next slot="meta"></ha-icon-next> </ha-list-item> <li divider role="separator"></li> <ha-list-item hasmeta twoline graphic="icon" .config="${null}" @request-selected="${this._selected}"> <ha-svg-icon slot="graphic" .path="${"M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z"}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.lovelace.dashboards.dialog_new.default")} <span slot="secondary">${this.hass.localize("ui.panel.config.lovelace.dashboards.dialog_new.default_description")}</span> <ha-icon-next slot="meta"></ha-icon-next> </ha-list-item> ${r.map((e=>o.dy` <ha-list-item hasmeta twoline graphic="icon" .strategy="${e.type}" @request-selected="${this._selected}"> <ha-svg-icon slot="graphic" .path="${e.iconPath}"></ha-svg-icon> ${this.hass.localize(`ui.panel.config.lovelace.dashboards.dialog_new.strategy.${e.type}.title`)} <span slot="secondary"> ${this.hass.localize(`ui.panel.config.lovelace.dashboards.dialog_new.strategy.${e.type}.description`)} </span> <ha-icon-next slot="meta"></ha-icon-next> </ha-list-item> `))} </mwc-list> </ha-dialog> `:o.Ld}},{kind:"method",key:"_generateStrategyConfig",value:function(e){return{strategy:{type:e}}}},{kind:"method",key:"_selected",value:async function(e){if(!(0,l.Q)(e))return;const a=e.currentTarget,t=a.config||a.strategy&&this._generateStrategyConfig(a.strategy)||null;this._params?.selectConfig(t),this.closeDialog()}},{kind:"get",static:!0,key:"styles",value:function(){return[d.Qx,d.yu,o.iv`ha-dialog{--dialog-content-padding:0;--mdc-dialog-max-height:60vh}@media all and (min-width:550px){ha-dialog{--mdc-dialog-min-width:500px}}ha-icon-next{width:24px}`]}}]}}),o.oi)}}; //# sourceMappingURL=62288.5fb92eb7590c3f60.js.map