1"use strict";(self.webpackChunkapp_inspector=self.webpackChunkapp_inspector||[]).push([[9493],{129493:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return y}});let r=s(438754),i=s(661757)._(s(667294)),a=r._(s(45697)),p=r._(s(944237)),o=s(593347),n=s(232316),l=r._(s(730381)),d=s(215352),h=s(895331),u=r._(s(267598)),c=r._(s(572063)),f=s(789608),m={date:"DD/MM/YYYY",month:"MM/YYYY","default-date":"YYYY-MM-DD","default-month":"YYYY-MM"},g=(0,n.withStyles)()(u.default),v=(0,p.default)(d.InputField).withConfig({displayName:"TextRedux__InputText"})(["width:100%;"," input{border:",";&:focus{border:",";}","}fieldset{border-bottom:",";}"],e=>e.errorMessages&&!e.isNewUIVisible&&`width: calc(100% - 14px); 2 input{ 3 border: none; 4 &:focus{ border: none;} 5 } 6 fieldset{ 7 border-color: ${f.color.red}!important;} 8 }`,e=>e.errorMessages&&"none",e=>e.errorMessages&&"none",e=>e.disabled&&` 9 &:disabled { 10 border: 1px solid #0000001f; 11 background: #f3f3f3; 12 } 13 `,e=>e.isNewUIVisible&&e.errorMessages&&"2px solid red !important"),b=(0,p.default)(d.Container).withConfig({displayName:"TextRedux__TextContainer"})(["@media (max-width:450px){padding-left:4.166vw;padding-right:4.166vw;}"]);class x extends i.default.PureComponent{constructor(e){super(e),this.state={id:Math.random(),focus:!1,type:this.props.type||"text",textStyle:{},disabled:this.props.disabled||!1},this.textRef=i.default.createRef(),this.classList=this.classList.bind(this),this.eventFocus=this.eventFocus.bind(this),this.eventFocusClick=this.eventFocusClick.bind(this),this.focus=this.focus.bind(this),this.parseChangeEventValue=this.parseChangeEventValue.bind(this),this.eventChange=this.eventChange.bind(this),this.updateHeight=this.updateHeight.bind(this),this.renderIcon=this.renderIcon.bind(this),this.parseValue=this.parseValue.bind(this),this.valueTransforms=[{id:"forceUppercaseInput",shouldUse:e=>"text"===e.type||e.forceUppercaseInput,transform:e=>e.toUpperCase()},{id:"identity",shouldUse:()=>!0,transform:e=>e}],this.validators={required(){return!0!==this.props.required||this.props.value.length>0},email(){var e=this.props.value;return"email"!==this.props.type||0===e.length||!0===/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(e)},password(){return"password"!==this.props.type||!0!==this.props.required||this.props.value.length>5},confirmPassword(){return!0!==this.props.required||""===this.props.value||this.props.value===this.state.passwordValue},range(){var e,t,s=parseInt(this.props.value,10);return void 0!==this.props.range&&(e=parseInt(this.props.range.min),t=parseInt(this.props.range.max)),!0===isNaN(s)||(!0!==isNaN(e)&&!0!==isNaN(t)?s>=e&&s<=t:!0!==isNaN(e)?s>=e:!0!==isNaN(t)?s<=t:void 0)},inputType(){return"number"!==this.props.inputType||!0===/^\d*$/.test(this.props.value)},price(){var e=this.props.value.toString();return"price"!==this.props.inputType||/^\d*$/.test(e.replace(/[,.]/g,""))},regex(){let e=this.props.value.toString(),{regex:t}=this.props,s=new RegExp(t);return void 0===t||void 0===e||0===e.length||!0===s.test(e)}}}componentDidMount(){void 0!==this.props.validator&&Object.keys(this.validators).forEach((function(e){this.props.validator.addValidationHandler(this.props.name,this.validators[e].bind(this),this.props.errorMessageStrings[e])}).bind(this)),void 0!==this.props.onComponentDidMount&&this.props.onComponentDidMount(this)}componentWillUnmount(){void 0!==this.props.validator&&this.props.validator.removeValidationHandler(this.props.name)}classList(){var e=["inputText"];return String(this.props.value).length>0&&e.push("content"),"date"===this.props.type&&e.push("date-input"),"month"===this.props.type&&e.push("month-input"),!0===this.state.focus&&e.push("focus"),void 0!==this.props.className&&e.push(this.props.className),!0===this.props.compact&&e.push("inputTextCompact"),e.join(" ")}eventFocus(){let e=!this.state.focus;this.setState({focus:e}),e?"function"==typeof this.props.onFocus&&this.props.onFocus():"function"==typeof this.props.onBlur&&this.props.onBlur()}eventFocusClick(){this.textRef.focus()}focus(){this.eventFocusClick()}parseChangeEventValue(e){if(["date","month"].includes(this.props.type))return e?(0,l.default)(e,m[`default-${this.props.type}`]).format(m[this.props.type]):"";if("vinNumber"===this.props.name){let t=e?.toUpperCase().replace(/[^a-zA-Z0-9]/g,"");return t.length>18?t.slice(0,18):t}return this.props.maxLength&&e&&e.length>this.props.maxLength?e.slice(0,this.props.maxLength):e}eventChange(e){void 0!==this.props.onChange&&this.props.onChange(this.parseChangeEventValue(e.target.value)),this.updateHeight()}updateHeight(){if(!0===this.props.multiLine&&"inspection"!==this.props.parent){let e=window.getComputedStyle(this.textRef),t=parseInt(e.paddingTop,10)+parseInt(e.paddingBottom,10);this.setState({textStyle:{}},(function(){let e=this.textRef.scrollHeight-t;this.setState({textStyle:{height:`${e}px`}})}).bind(this))}}
13renderIcon(){return void 0!==this.props.icon?i.default.createElement(this.props.icon,null):""}parseValue(){let e=["date","month"].includes(this.props.type),t=e?(0,l.default)(this.props.value,m[this.props.type]):this.props.value;return e&&t.isValid()?t.isValid()?t.format(m[`default-${this.props.type}`]):"":this.valueTransforms.reduce((e,{shouldUse:t,transform:s})=>t(this.props)?s(e):e,this.props.value)}render(){let e=this.props.multiLine?i.default.createElement("textarea",null):i.default.createElement("input",null),t=this.parseValue(),{classes:s,multiLine:r}=this.props,a=r?s.textField:"",p=void 0!==this.props.hint?` (${this.props.hint})`:"";return i.default.createElement(i.default.Fragment,null,"inspection"===this.props.parent?i.default.createElement(i.default.Fragment,null,i.default.createElement(b,null,i.default.createElement(d.LabelWrapper,null,i.default.createElement(d.InputLabel,{required:this.props.required},this.props.label,p)),i.default.createElement(r?g:v,{isNewUIVisible:this.props.isNewUIVisible,className:a,multiline:this.props.multiLine,"data-test":`text-${this.props.name}`,inputRef:e=>{this.textRef=e},type:this.props.type,value:t,renderValue:""!==t?void 0:()=>i.default.createElement(d.Placeholder,{"data-test":`placeholder-${this.props.placeholder}`},this.props.placeholder),maxLength:this.props.maxLength||-1,onChange:this.eventChange,onBlur:this.props.onBlur,required:this.props.required,disabled:this.state.disabled,name:this.props.name,margin:"normal",inputProps:r?{"aria-label":"naked"}:{},errorMessages:this.props.errorMessages,endAdornment:this.props.errorMessages&&!this.props.isNewUIVisible?i.default.createElement(c.default,{style:{color:f.color.red}}):null,classes:{focused:"input-focused"}}),i.default.createElement(h.ErrorWrapper,{"data-test":`validate-message-${this.props.name}`},i.default.createElement(h.ErrorMessages,null,i.default.createElement(o.FormErrorMessages,{messages:this.props.errorMessages}))))):i.default.createElement("div",{className:"inputTextContainer reduxInput"},i.default.createElement("div",{className:this.classList(),onClick:this.eventFocusClick},i.default.cloneElement(e,{type:this.props.type,ref:e=>{this.textRef=e},value:t,maxLength:this.props.maxLength||-1,onBlur:this.eventFocus,onFocus:this.eventFocus,onChange:this.eventChange,required:this.props.required,disabled:this.state.disabled,name:this.props.name,style:this.state.textStyle,placeholder:this.props.placeholder}),i.default.createElement("label",null,this.props.label,p),this.renderIcon(),this.props.disabled?null:i.default.createElement(i.Fragment,null,i.default.createElement("hr",{className:"blurLine"}),i.default.createElement("hr",{className:"focusLine"}))),i.default.createElement(o.FormErrorMessages,{messages:this.props.errorMessages})))}}x.proptypes={id:a.default.string,hint:a.default.string,icon:a.default.any,maxLength:a.default.number,label:a.default.string,type:a.default.oneOf(["password","text","email","file","date","month"]),value:a.default.any,required:a.default.bool,disabled:a.default.bool,name:a.default.string,validator:a.default.instanceOf(o.FormValidator),errorMessageStrings:a.default.object,multiLine:a.default.bool,placeholder:a.default.string,onFocus:a.default.func,compact:a.default.bool,regex:a.default.string},x.defaultProps={value:""};let y=(0,n.withStyles)(()=>({textField:{width:"100%",minHeight:"48px",background:"#fff",borderRadius:4,border:"1px solid #002f34",padding:"8px",transition:"0.3s all ease-in-out",display:"flex",alignItems:"center",paddingLeft:"8px",paddingRight:"8px",boxSizing:"border-box","&:focus":{border:"2px solid #3a77ff",borderRadius:4,background:"#fff"}},input:{width:"100%",padding:"8px",border:"none !important"}}))(x)}}]); 14//# sourceMappingURL=9493.f2b2fb5c.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.