Initial Commit
This commit is contained in:
commit
d4a69c41be
2748 files changed
+80489
No files matched your search
@@ -0,0 +1,2 @@
|
||||
"use strict";(self.webpackChunkhacs_frontend=self.webpackChunkhacs_frontend||[]).push([["9752"],{58701:function(e,i,t){t.r(i),t.d(i,{HaFormString:function(){return h}});var d=t(73577),n=(t(22152),t(63721),t(19083),t(71695),t(61006),t(47021),t(57243)),a=t(50778),l=t(11297);t(59897),t(70596);let r,o,s,c,f=e=>e;const u=["password","secret","token"];let h=(0,d.Z)([(0,a.Mo)("ha-form-string")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"localize",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"localizeBaseKey",value(){return"ui.components.selectors.text"}},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"schema",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"data",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,a.SB)()],key:"unmaskedPassword",value(){return!1}},{kind:"field",decorators:[(0,a.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,i;return(0,n.dy)(r||(r=f` <ha-textfield .type="${0}" .label="${0}" .value="${0}" .helper="${0}" helperPersistent .disabled="${0}" .required="${0}" .autoValidate="${0}" .name="${0}" .autocomplete="${0}" .suffix="${0}" .validationMessage="${0}" @input="${0}" @change="${0}"></ha-textfield> ${0} `),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,n.dy)(o||(o=f`<div style="width:24px"></div>`)):null===(e=this.schema.description)||void 0===e?void 0:e.suffix,this.schema.required?null===(i=this.localize)||void 0===i?void 0:i.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,n.dy)(s||(s=f` <ha-icon-button toggles .label="${0}" @click="${0}" .path="${0}"></ha-icon-button> `),null===(e=this.localize)||void 0===e?void 0:e.call(this,`${this.localizeBaseKey}.${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"):n.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){let i=e.target.value;this.data!==i&&(""!==i||this.schema.required||(i=void 0),(0,l.B)(this,"value-changed",{value:i}))}},{kind:"get",key:"stringType",value:function(){if(this.schema.format){if(["email","url"].includes(this.schema.format))return this.schema.format;if("fqdnurl"===this.schema.format)return"url"}return"text"}},{kind:"get",key:"isPassword",value:function(){return u.some((e=>this.schema.name.includes(e)))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(c||(c=f`:host{display:block;position:relative}:host([own-margin]){margin-bottom:5px}ha-textfield{display:block}ha-icon-button{position:absolute;top:8px;right:8px;inset-inline-start:initial;inset-inline-end:8px;--mdc-icon-button-size:40px;--mdc-icon-size:20px;color:var(--secondary-text-color);direction:var(--direction)}`))}}]}}),n.oi)},70596:function(e,i,t){var d=t(73577),n=t(72621),a=(t(71695),t(47021),t(1105)),l=t(33990),r=t(57243),o=t(50778),s=t(13089);let c,f,u,h,p=e=>e;(0,d.Z)([(0,o.Mo)("ha-textfield")],(function(e,i){class t extends i{constructor(...i){super(...i),e(this)}}return{F:t,d:[{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"invalid",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"icon",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({tLine truncated
|
||||
//# sourceMappingURL=9752.34a37d6adb8e9e6e.js.map
|
||||
Reference in new issue
Block a user