iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 9.7 kB
JavaScript
/*! For license information please see chunk.502226efd4bc379d1197.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 o}});n(43437);var i=n(9672),a=n(50856);function r(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\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']);return r=function(){return e},e}var o=(0,i.k)({_template:(0,a.d)(r()),is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){o.instance||(o.instance=this),document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async((function(){this._text=e}),this.timeout)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});o.instance=null,o.requestAvailability=function(){o.instance||(o.instance=document.createElement("iron-a11y-announcer")),document.body?document.body.appendChild(o.instance):document.addEventListener("load",(function(){document.body.appendChild(o.instance)}))}},87772:function(e,t,n){"use strict";n(43437);var i=n(23916),a=n(98235),r=n(9672),o=n(87156),l=n(50856);function u(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n :host {\n display: inline-block;\n }\n </style>\n <slot id="content"></slot>\n']);return u=function(){return e},e}(0,r.k)({_template:(0,l.d)(u()),is:"iron-input",behaviors:[a.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(){i.N.requestAvailability(),this._previousValidInput="",this._patternAlreadyChecked=!1},attached:function(){this._observer=(0,o.vz)(this).observeNodes(function(e){this._initSlottedInput()}.bind(this))},detached:function(){this._observer&&((0,o.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=a.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(43437),n(87772),n(2178),n(98121),n(65911);var i=n(21006),a=(n(21384),n(9672)),r=n(50856),o=n(66668);function l(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\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]]" role$="[[inputRole]]" aria-haspopup$="[[inputAriaHaspopup]]">\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 ']);return l=function(){return e},e}(0,a.k)({is:"paper-input",_template:(0,r.d)(l()),behaviors:[o.d0,i.V],properties:{value:{type:String},inputRole:{type:String,value:void 0},inputAriaHaspopup:{type:String,value:void 0}},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.502226efd4bc379d1197.js.map