iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 9.23 kB
JavaScript
/*! For license information please see chunk.ead4017327609476ffbe.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[879],{23916:function(e,t,n){"use strict";n.d(t,{N:function(){return s}});n(65233);var i,a=n(9672),r=n(50856);var o,l,s=(0,a.k)({_template:(0,r.d)(i||(o=['\n <style>\n :host {\n display: inline-block;\n position: fixed;\n clip: rect(0px,0px,0px,0px);\n }\n </style>\n <div aria-live$="[[mode]]">[[_text]]</div>\n'],l||(l=o.slice(0)),i=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(l)}})))),is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},_text:{type:String,value:""}},created:function(){s.instance||(s.instance=this),document.body.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async((function(){this._text=e}),100)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});s.instance=null,s.requestAvailability=function(){s.instance||(s.instance=document.createElement("iron-a11y-announcer")),document.body.appendChild(s.instance)}},87772:function(e,t,n){"use strict";n(65233);var i,a,r,o=n(23916),l=n(98235),s=n(9672),p=n(87156),u=n(50856);(0,s.k)({_template:(0,u.d)(i||(a=['\n <style>\n :host {\n display: inline-block;\n }\n </style>\n <slot id="content"></slot>\n'],r||(r=a.slice(0)),i=Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(r)}})))),is:"iron-input",behaviors:[l.x],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){o.N.requestAvailability(),this._previousValidInput="",this._patternAlreadyChecked=!1},attached:function(){this._observer=(0,p.vz)(this).observeNodes(function(e){this._initSlottedInput()}.bind(this))},detached:function(){this._observer&&((0,p.vz)(this).unobserveNodes(this._observer),this._observer=null)},get inputElement(){return this._inputElement},_initSlottedInput:function(){this._inputElement=this.getEffectiveChildren()[0],this.inputElement&&this.inputElement.value&&(this.bindValue=this.inputElement.value),this.fire("iron-input-ready")},get _patternRegExp(){var e;if(this.allowedPattern)e=new RegExp(this.allowedPattern);else switch(this.inputElement.type){case"number":e=/[0-9.,e-]/}return e},_bindValueChanged:function(e,t){t&&(void 0===e?t.value=null:e!==t.value&&(this.inputElement.value=e),this.autoValidate&&this.validate(),this.fire("bind-value-changed",{value:e}))},_onInput:function(){this.allowedPattern&&!this._patternAlreadyChecked&&(this._checkPatternValidity()||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.inputElement.value=this._previousValidInput));this.bindValue=this._previousValidInput=this.inputElement.value,this._patternAlreadyChecked=!1},_isPrintable:function(e){var t=8==e.keyCode||9==e.keyCode||13==e.keyCode||27==e.keyCode,n=19==e.keyCode||20==e.keyCode||45==e.keyCode||46==e.keyCode||144==e.keyCode||145==e.keyCode||e.keyCode>32&&e.keyCode<41||e.keyCode>111&&e.keyCode<124;return!(t||0==e.charCode&&n)},_onKeypress:function(e){if(this.allowedPattern||"number"===this.inputElement.type){var t=this._patternRegExp;if(t&&!(e.metaKey||e.ctrlKey||e.altKey)){this._patternAlreadyChecked=!0;var n=String.fromCharCode(e.charCode);this._isPrintable(e)&&!t.test(n)&&(e.preventDefault(),this._announceInvalidCharacter("Invalid character "+n+" not entered."))}}},_checkPatternValidity:function(){var e=this._patternRegExp;if(!e)return!0;for(var t=0;t<this.inputElement.value.length;t++)if(!e.test(this.inputElement.value[t]))return!1;return!0},validate:function(){if(!this.inputElement)return this.invalid=!1,!0;var e=this.inputElement.checkValidity();return e&&(this.required&&""===this.bindValue?e=!1:this.hasValidator()&&(e=l.x.validate.call(this,this.bindValue))),this.invalid=!e,this.fire("iron-input-validate"),e},_announceInvalidCharacter:function(e){this.fire("iron-announce",{text:e})},_computeValue:function(e){return e}})},30879:function(e,t,n){"use strict";n(65233),n(87772),n(2178),n(98121),n(65911);var i,a,r,o=n(21006),l=(n(21384),n(9672)),s=n(50856),p=n(66668);(0,l.k)({is:"paper-input",_template:(0,s.d)(i||(a=['\n <style>\n :host {\n display: block;\n }\n\n :host([focused]) {\n outline: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n input {\n /* Firefox sets a min-width on the input, which can cause layout issues */\n min-width: 0;\n }\n\n /* In 1.x, the <input> is distributed to paper-input-container, which styles it.\n In 2.x the <iron-input> is distributed to paper-input-container, which styles\n it, but in order for this to work correctly, we need to reset some\n of the native input\'s properties to inherit (from the iron-input) */\n iron-input > input {\n @apply --paper-input-container-shared-input-style;\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n letter-spacing: inherit;\n word-spacing: inherit;\n line-height: inherit;\n text-shadow: inherit;\n color: inherit;\n cursor: inherit;\n }\n\n input:disabled {\n @apply --paper-input-container-input-disabled;\n }\n\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n @apply --paper-input-container-input-webkit-spinner;\n }\n\n input::-webkit-clear-button {\n @apply --paper-input-container-input-webkit-clear;\n }\n\n input::-webkit-calendar-picker-indicator {\n @apply --paper-input-container-input-webkit-calendar-picker-indicator;\n }\n\n input::-webkit-input-placeholder {\n color: var(--paper-input-container-color, var(--secondary-text-color));\n }\n\n input:-moz-placeholder {\n color: var(--paper-input-container-color, var(--secondary-text-color));\n }\n\n input::-moz-placeholder {\n color: var(--paper-input-container-color, var(--secondary-text-color));\n }\n\n input::-ms-clear {\n @apply --paper-input-container-ms-clear;\n }\n\n input::-ms-reveal {\n @apply --paper-input-container-ms-reveal;\n }\n\n input:-ms-input-placeholder {\n color: var(--paper-input-container-color, var(--secondary-text-color));\n }\n\n label {\n pointer-events: none;\n }\n </style>\n\n <paper-input-container id="container" no-label-float="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">\n\n <slot name="prefix" slot="prefix"></slot>\n\n <label hidden$="[[!label]]" aria-hidden="true" for$="[[_inputId]]" slot="label">[[label]]</label>\n\n \x3c!-- Need to bind maxlength so that the paper-input-char-counter works correctly --\x3e\n <iron-input bind-value="{{value}}" slot="input" class="input-element" id$="[[_inputId]]" maxlength$="[[maxlength]]" allowed-pattern="[[allowedPattern]]" invalid="{{invalid}}" validator="[[validator]]">\n <input aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" title$="[[title]]" type$="[[type]]" pattern$="[[pattern]]" required$="[[required]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" min$="[[min]]" max$="[[max]]" step$="[[step]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" list$="[[list]]" size$="[[size]]" autocapitalize$="[[autocapitalize]]" autocorrect$="[[autocorrect]]" on-change="_onChange" tabindex$="[[tabIndex]]" autosave$="[[autosave]]" results$="[[results]]" accept$="[[accept]]" multiple$="[[multiple]]">\n </iron-input>\n\n <slot name="suffix" slot="suffix"></slot>\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 '],r||(r=a.slice(0)),i=Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(r)}})))),behaviors:[p.d0,o.V],properties:{value:{type:String}},get _focusableElement(){return this.inputElement._inputElement},listeners:{"iron-input-ready":"_onIronInputReady"},_onIronInputReady:function(){this.$.nativeInput||(this.$.nativeInput=this.$$("input")),this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.$.nativeInput.type)&&(this.alwaysFloatLabel=!0),this.inputElement.bindValue&&this.$.container._handleValueAndAutoValidate(this.inputElement)}})}}]);
//# sourceMappingURL=chunk.ead4017327609476ffbe.js.map