homeassistant/custom_components/hacs/hacs_frontend_experimental/frontend_es5/947.vXxufIv6HzY.js

2 lines
9.9 KiB
JavaScript
Raw Normal View History

2025-01-10 21:08:35 -08:00
"use strict";(self.webpackChunkhacs_frontend=self.webpackChunkhacs_frontend||[]).push([[947],{20947:function(e,t,i){i.r(t),i.d(t,{HaFormString:function(){return g}});var n,d,a,r,o=i(88962),l=i(33368),s=i(71650),c=i(68308),f=i(82390),u=i(69205),h=i(91808),p=(i(97393),i(22859),i(94738),i(98214),i(40271),i(46798),i(60163),i(5095)),m=i(95260),v=i(18394),x=(i(54371),i(51520),["password","secret","token"]),g=(0,h.Z)([(0,m.Mo)("ha-form-string")],(function(e,t){var i=function(t){function i(){var t;(0,s.Z)(this,i);for(var n=arguments.length,d=new Array(n),a=0;a<n;a++)d[a]=arguments[a];return t=(0,c.Z)(this,i,[].concat(d)),e((0,f.Z)(t)),t}return(0,u.Z)(i,t),(0,l.Z)(i)}(t);return{F:i,d:[{kind:"field",decorators:[(0,m.Cb)({attribute:!1})],key:"localize",value:void 0},{kind:"field",decorators:[(0,m.Cb)()],key:"localizeBaseKey",value:function(){return"ui.components.selectors.text"}},{kind:"field",decorators:[(0,m.Cb)()],key:"schema",value:void 0},{kind:"field",decorators:[(0,m.Cb)()],key:"data",value:void 0},{kind:"field",decorators:[(0,m.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,m.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,m.Cb)({type:Boolean})],key:"disabled",value:function(){return!1}},{kind:"field",decorators:[(0,m.SB)()],key:"unmaskedPassword",value:function(){return!1}},{kind:"field",decorators:[(0,m.IO)("ha-textfield")],key:"_input",value:void 0},{kind:"method",key:"focus",value:function(){this._input&&this._input.focus()}},{kind:"method",key:"render",value:function(){var e,t;return(0,p.dy)(n||(n=(0,o.Z)([' <ha-textfield .type="','" .label="','" .value="','" .helper="','" helperPersistent .disabled="','" .required="','" .autoValidate="','" .name="','" .autocomplete="','" .suffix="','" .validationMessage="','" @input="','" @change="','"></ha-textfield> '," "])),this.isPassword?this.unmaskedPassword?"text":"password":this.stringType,this.label,this.data||"",this.helper,this.disabled,this.schema.required,this.schema.required,this.schema.name,this.schema.autocomplete,this.isPassword?(0,p.dy)(d||(d=(0,o.Z)(['<div style="width:24px"></div>']))):null===(e=this.schema.description)||void 0===e?void 0:e.suffix,this.schema.required?null===(t=this.localize)||void 0===t?void 0:t.call(this,"ui.common.error_required"):void 0,this._valueChanged,this._valueChanged,this.renderIcon())}},{kind:"method",key:"renderIcon",value:function(){var e;return this.isPassword?(0,p.dy)(a||(a=(0,o.Z)([' <ha-icon-button toggles .label="','" @click="','" .path="','"></ha-icon-button> '])),null===(e=this.localize)||void 0===e?void 0:e.call(this,"".concat(this.localizeBaseKey,".").concat(this.unmaskedPassword?"hide_password":"show_password")),this.toggleUnmaskedPassword,this.unmaskedPassword?"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z":"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"):p.Ld}},{kind:"method",key:"updated",value:function(e){e.has("schema")&&this.toggleAttribute("own-margin",!!this.schema.required)}},{kind:"method",key:"toggleUnmaskedPassword",value:function(){this.unmaskedPassword=!this.unmaskedPassword}},{kind:"method",key:"_valueChanged",value:function(e){var t=e.target.value;this.data!==t&&(""!==t||this.schema.required||(t=void 0),(0,v.B)(this,"value-changed",{value:t}))}},{kind:"get",key:"stringType",value:function(){if(this.schema.format){if(["email","url"].includes(this.schema.format))retur
//# sourceMappingURL=947.vXxufIv6HzY.js.map