UNPKG

iobroker.lovelace

Version:

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

3 lines 11.4 kB
/*! For license information please see chunk.0e6c98578e69f1f351ef.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[5422],{99257:function(e,t,n){"use strict";n(65233);var a=n(15112),i=n(9672),r=n(87156);(0,i.k)({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new a.P({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map((function(e){return this.name+":"+e}),this)},applyIcon:function(e,t){this.removeIcon(e);var n=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(n){var a=(0,r.vz)(e.root||e);return a.insertBefore(n,a.childNodes[0]),e._svgIcon=n}return null},removeIcon:function(e){e._svgIcon&&((0,r.vz)(e.root||e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var t=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===t.getAttribute("dir")}else e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&"rtl"===window.getComputedStyle(e).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async((function(){this.fire("iron-iconset-added",this,{node:window})}))},_createIconMap:function(){var e=Object.create(null);return(0,r.vz)(this).querySelectorAll("[id]").forEach((function(t){e[t.id]=t})),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,n){if(e){var a=e.cloneNode(!0),i=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=a.getAttribute("viewBox")||"0 0 "+t+" "+t,o="pointer-events: none; display: block; width: 100%; height: 100%;";return n&&a.hasAttribute("mirror-in-rtl")&&(o+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),i.setAttribute("viewBox",r),i.setAttribute("preserveAspectRatio","xMidYMid meet"),i.setAttribute("focusable","false"),i.style.cssText=o,i.appendChild(a).removeAttribute("id"),i}return null}})},25856:function(e,t,n){"use strict";n(65233),n(65660);var a,i,r,o=n(26110),l=n(98235),s=n(9672),d=n(87156),u=n(50856);(0,s.k)({_template:(0,u.d)(a||(i=['\n <style>\n :host {\n display: inline-block;\n position: relative;\n width: 400px;\n border: 1px solid;\n padding: 2px;\n -moz-appearance: textarea;\n -webkit-appearance: textarea;\n overflow: hidden;\n }\n\n .mirror-text {\n visibility: hidden;\n word-wrap: break-word;\n @apply --iron-autogrow-textarea;\n }\n\n .fit {\n @apply --layout-fit;\n }\n\n textarea {\n position: relative;\n outline: none;\n border: none;\n resize: none;\n background: inherit;\n color: inherit;\n /* see comments in template */\n width: 100%;\n height: 100%;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n text-align: inherit;\n @apply --iron-autogrow-textarea;\n }\n\n textarea::-webkit-input-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea:-moz-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea::-moz-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea:-ms-input-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n </style>\n\n \x3c!-- the mirror sizes the input/textarea so it grows with typing --\x3e\n \x3c!-- use &#160; instead &nbsp; of to allow this element to be used in XHTML --\x3e\n <div id="mirror" class="mirror-text" aria-hidden="true">&nbsp;</div>\n\n \x3c!-- size the input/textarea with a div, because the textarea has intrinsic size in ff --\x3e\n <div class="textarea-container fit">\n <textarea id="textarea" name$="[[name]]" aria-label$="[[label]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" disabled$="[[disabled]]" rows$="[[rows]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]"></textarea>\n </div>\n'],r=['\n <style>\n :host {\n display: inline-block;\n position: relative;\n width: 400px;\n border: 1px solid;\n padding: 2px;\n -moz-appearance: textarea;\n -webkit-appearance: textarea;\n overflow: hidden;\n }\n\n .mirror-text {\n visibility: hidden;\n word-wrap: break-word;\n @apply --iron-autogrow-textarea;\n }\n\n .fit {\n @apply --layout-fit;\n }\n\n textarea {\n position: relative;\n outline: none;\n border: none;\n resize: none;\n background: inherit;\n color: inherit;\n /* see comments in template */\n width: 100%;\n height: 100%;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n text-align: inherit;\n @apply --iron-autogrow-textarea;\n }\n\n textarea::-webkit-input-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea:-moz-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea::-moz-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n\n textarea:-ms-input-placeholder {\n @apply --iron-autogrow-textarea-placeholder;\n }\n </style>\n\n \x3c!-- the mirror sizes the input/textarea so it grows with typing --\x3e\n \x3c!-- use &#160; instead &nbsp; of to allow this element to be used in XHTML --\x3e\n <div id="mirror" class="mirror-text" aria-hidden="true">&nbsp;</div>\n\n \x3c!-- size the input/textarea with a div, because the textarea has intrinsic size in ff --\x3e\n <div class="textarea-container fit">\n <textarea id="textarea" name\\$="[[name]]" aria-label\\$="[[label]]" autocomplete\\$="[[autocomplete]]" autofocus\\$="[[autofocus]]" inputmode\\$="[[inputmode]]" placeholder\\$="[[placeholder]]" readonly\\$="[[readonly]]" required\\$="[[required]]" disabled\\$="[[disabled]]" rows\\$="[[rows]]" minlength\\$="[[minlength]]" maxlength\\$="[[maxlength]]"></textarea>\n </div>\n'],r||(r=i.slice(0)),a=Object.freeze(Object.defineProperties(i,{raw:{value:Object.freeze(r)}})))),is:"iron-autogrow-textarea",behaviors:[l.x,o.a],properties:{value:{observer:"_valueChanged",type:String,notify:!0},bindValue:{observer:"_bindValueChanged",type:String,notify:!0},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean},minlength:{type:Number},maxlength:{type:Number},label:{type:String}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(e){this.$.textarea.selectionStart=e},set selectionEnd(e){this.$.textarea.selectionEnd=e},attached:function(){navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&(this.$.textarea.style.marginLeft="-3px")},validate:function(){var e=this.$.textarea.validity.valid;return e&&(this.required&&""===this.value?e=!1:this.hasValidator()&&(e=l.x.validate.call(this,this.value))),this.invalid=!e,this.fire("iron-input-validate"),e},_bindValueChanged:function(e){this.value=e},_valueChanged:function(e){var t=this.textarea;t&&(t.value!==e&&(t.value=e||0===e?e:""),this.bindValue=e,this.$.mirror.innerHTML=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))},_onInput:function(e){var t=(0,d.vz)(e).path;this.value=t?t[0].value:e.target.value},_constrain:function(e){var t;for(e=e||[""],t=this.maxRows>0&&e.length>this.maxRows?e.slice(0,this.maxRows):e.slice(0);this.rows>0&&t.length<this.rows;)t.push("");return t.join("<br/>")+"&#160;"},_valueForMirror:function(){var e=this.textarea;if(e)return this.tokens=e&&e.value?e.value.replace(/&/gm,"&amp;").replace(/"/gm,"&quot;").replace(/'/gm,"&#39;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").split("\n"):[""],this._constrain(this.tokens)},_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)}});n(2178),n(98121),n(65911);var p,c=n(21006),h=n(66668);(0,s.k)({_template:(0,u.d)(p||(p=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n label {\n pointer-events: none;\n }\n </style>\n\n <paper-input-container no-label-float$="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">\n\n <label hidden$="[[!label]]" aria-hidden="true" for$="[[_inputId]]" slot="label">[[label]]</label>\n\n <iron-autogrow-textarea class="paper-input-input" slot="input" id$="[[_inputId]]" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" bind-value="{{value}}" invalid="{{invalid}}" validator$="[[validator]]" disabled$="[[disabled]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" autocapitalize$="[[autocapitalize]]" rows$="[[rows]]" max-rows$="[[maxRows]]" on-change="_onChange"></iron-autogrow-textarea>\n\n <template is="dom-if" if="[[errorMessage]]">\n <paper-input-error aria-live="assertive" slot="add-on">[[errorMessage]]</paper-input-error>\n </template>\n\n <template is="dom-if" if="[[charCounter]]">\n <paper-input-char-counter slot="add-on"></paper-input-char-counter>\n </template>\n\n </paper-input-container>\n']))),is:"paper-textarea",behaviors:[h.d0,c.V],properties:{_ariaLabelledBy:{observer:"_ariaLabelledByChanged",type:String},_ariaDescribedBy:{observer:"_ariaDescribedByChanged",type:String},value:{type:String},rows:{type:Number,value:1},maxRows:{type:Number,value:0}},get selectionStart(){return this.$.input.textarea.selectionStart},set selectionStart(e){this.$.input.textarea.selectionStart=e},get selectionEnd(){return this.$.input.textarea.selectionEnd},set selectionEnd(e){this.$.input.textarea.selectionEnd=e},_ariaLabelledByChanged:function(e){this._focusableElement.setAttribute("aria-labelledby",e)},_ariaDescribedByChanged:function(e){this._focusableElement.setAttribute("aria-describedby",e)},get _focusableElement(){return this.inputElement.textarea}})}}]); //# sourceMappingURL=chunk.0e6c98578e69f1f351ef.js.map