var __extends=(this&&this.__extends)||(function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||({__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b;})||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];};return extendStatics(d,b);};return function(d,b){extendStatics(d,b);function __(){this.constructor=d;} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __());};})();var __assign=(this&&this.__assign)||function(){__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i0||this.props.owner.state[this.props.name]===0};} if(!this.props.component.props.InputProps||!this.props.component.props.InputProps.classes){this.props.component.props.InputProps=Object.assign({classes:{focused:'focused',error:'error'}},this.props.component.props.InputProps||{});} return this.props.component;};_Mui_field.prototype.propChange=function(e){var _a;var _this=this;var value=e;var send_validation=false;if(e.target!==undefined){value=e.target.value;if(e.target.type==="radio"||e.target.type==="checkbox"){send_validation=true;}} else if(value.value!==undefined){value=value.value;} if(this.props.component.type.name==="DateField"){value=value?moment(value).format('YYYY-MM-DD'):null;send_validation=true;} if(value==="(   )    -    "){value="";} this.props.handler.handleAction(this.props.owner,"PROP_UPDATE",{data:(_a={},_a[this.props.name]=value,_a),callback:function(){if(send_validation){_this.props.handler.validateProperty(_this.props.owner,_this.props.handler,_this.props.name,_this.props.uncontrolled?value:null);}}});};return _Mui_field;}(React.Component));function Mui_field(props){var component=props.component,name=props.name,owner=props.owner,handler=props.handler,other=__rest(props,["component","name","owner","handler"]);return(React.createElement(_Mui_field,__assign({owner:owner,handler:handler,component:component,name:name},other)));} exports.default=Mui_field;;});