UNPKG

iobroker.lovelace

Version:

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

2 lines 1.42 kB
export const __webpack_ids__=["41871"];export const __webpack_modules__={69819:function(i,e,n){n.r(e);var o=n(44249),t=n(57243),r=n(15093),a=n(20552);n(65981);(0,o.Z)([(0,r.Mo)("hui-weblink-row")],(function(i,e){return{F:class extends e{constructor(...e){super(...e),i(this)}},d:[{kind:"field",key:"hass",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_config",value:void 0},{kind:"method",key:"setConfig",value:function(i){if(!i||!i.url)throw new Error("URL required");this._config={icon:"hass:link",name:i.url,...i}}},{kind:"method",key:"render",value:function(){return this._config?t.dy` <a href="${this._config.url}" target="${(0,a.o)(this._computeTargetValue())}" rel="noreferrer" ?download="${this._config.download}"> <ha-icon .icon="${this._config.icon}"></ha-icon> <div .title="${this._config.name}">${this._config.name}</div> </a> `:t.Ld}},{kind:"field",static:!0,key:"styles",value:()=>t.iv`a{display:flex;align-items:center;color:var(--primary-color)}ha-icon{padding:8px;color:var(--paper-item-icon-color)}div{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:16px;margin-inline-start:16px;margin-inline-end:initial}`},{kind:"method",key:"_computeTargetValue",value:function(){return!this._config||-1===this._config.url.indexOf("://")&&!0!==this._config.new_tab&&!0!==this._config.download?void 0:"_blank"}}]}}),t.oi)}}; //# sourceMappingURL=41871.566c947a8885c209.js.map