-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchunk-KOIR5LAD.js
More file actions
1 lines (1 loc) · 3.44 KB
/
Copy pathchunk-KOIR5LAD.js
File metadata and controls
1 lines (1 loc) · 3.44 KB
1
import{a as z}from"./chunk-AQGOD4VY.js";import{b as m}from"./chunk-FFGJMO62.js";import{$a as M,Da as r,Ea as c,Fa as _,G as w,I as v,Ja as h,Ka as a,La as g,N as y,O as o,P as s,Qa as P,Ra as D,Sa as T,U as I,ca as f,da as S,gb as H,l as p,la as N,ma as b,ra as V,sb as B,va as d,xa as E,zb as k}from"./chunk-UJIEDWPF.js";var Q=["inputEle"];function R(i,n){if(i&1){let t=h();r(0,"span",3),a("click",function(){o(t);let l=g();return s(l.handleClear())}),r(1,"span",4),_(2,"i",5),c()()}}function j(i,n){if(i&1){let t=h();r(0,"span",3),a("click",function(){o(t);let l=g();return s(l.changeType())}),r(1,"span",4),_(2,"i",6),c()()}}var u=class i{constructor(n){this.cdr=n,this.nelPlaceHolder="",this.nelDisabled=!1,this.nelClearable=!1,this.nelShowPassword=!1,this.nelSize=null,this.onClear=new I,this.focused=!1,this.hovering=!1,this.type="text",this.change=t=>{}}ngOnChanges(n){let{nelShowPassword:t}=n;t&&(this.type=this.nelShowPassword?"password":"text")}onInput(n){this.data=n.target.value,this.change(this.data)}handleBlur(){this.focused=!1}handleFocus(){this.focused=!0}handleClear(){this.data="",this.change(this.data),this.inputEle.nativeElement.value=this.data,this.onClear.emit()}handleMouseEnter(){this.hovering=!0}handleMouseLeave(){this.hovering=!1}changeType(){this.type=this.type==="text"?"password":"text"}writeValue(n){this.data=n,this.cdr.detectChanges()}registerOnChange(n){this.change=n}registerOnTouched(n){}static{this.\u0275fac=function(t){return new(t||i)(S(H))}}static{this.\u0275cmp=N({type:i,selectors:[["nel-input"]],viewQuery:function(t,e){if(t&1&&P(Q,5),t&2){let l;D(l=T())&&(e.inputEle=l.first)}},hostAttrs:[1,"el-input"],hostVars:10,hostBindings:function(t,e){t&1&&a("mouseenter",function(){return e.handleMouseEnter()})("mouseleave",function(){return e.handleMouseLeave()}),t&2&&E("is-disabled",e.nelDisabled)("el-input--suffix",e.nelClearable)("el-input--medium",e.nelSize=="medium")("el-input--small",e.nelSize=="small")("el-input--mini",e.nelSize=="mini")},inputs:{nelPlaceHolder:"nelPlaceHolder",nelDisabled:"nelDisabled",nelClearable:"nelClearable",nelShowPassword:"nelShowPassword",nelSize:"nelSize"},outputs:{onClear:"onClear"},standalone:!1,features:[M([{provide:z,useExisting:w(()=>i),multi:!0}]),y],decls:4,vars:6,consts:[["inputEle",""],["autocomplete","off",1,"el-input__inner",3,"input","blur","focus","type","value","placeholder","disabled"],["class","el-input__suffix",3,"click",4,"ngIf"],[1,"el-input__suffix",3,"click"],[1,"el-input__suffix-inner"],[1,"el-input__icon","el-icon-circle-close","el-input__clear"],[1,"el-input__icon","el-icon-view","el-input__clear"]],template:function(t,e){if(t&1){let l=h();r(0,"input",1,0),a("input",function(F){return o(l),s(e.onInput(F))})("blur",function(){return o(l),s(e.handleBlur())})("focus",function(){return o(l),s(e.handleFocus())}),c(),V(2,R,3,0,"span",2)(3,j,3,0,"span",2)}t&2&&(d("type",e.type)("value",e.data)("placeholder",e.nelPlaceHolder)("disabled",e.nelDisabled),f(2),d("ngIf",e.nelClearable&&(e.data==null?null:e.data.length)>0&&(e.focused||e.hovering)),f(),d("ngIf",e.nelShowPassword&&((e.data==null?null:e.data.length)>0||e.focused||e.hovering)))},dependencies:[B],encapsulation:2,changeDetection:0})}};p([m()],u.prototype,"nelDisabled",void 0);p([m()],u.prototype,"nelClearable",void 0);p([m()],u.prototype,"nelShowPassword",void 0);var te=(()=>{class i{static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275mod=b({type:i})}static{this.\u0275inj=v({imports:[k]})}}return i})();export{u as a,te as b};