initial commit

This commit is contained in:
2026-03-22 03:21:45 +02:00
commit 897fea9f4e
15431 changed files with 2548840 additions and 0 deletions

View File

@@ -0,0 +1 @@
"use strict";var e=function(e){return e&&e.__esModule?e["default"]:e},t=e(require("react")),n=t.createClass({displayName:"IntegerInputView",getDefaultProps:function(){return{min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,tabIndex:-1,defaultValue:0,value:0,precision:0,onChange:function(){}}},getInitialState:function(){return{value:this.toPrecision(this.props.value)}},componentWillMount:function(){this.textValue=this.props.value},componentWillReceiveProps:function(e){var t=this.toPrecision(e.value),n=this.getDOMNode().childNodes[0];this.textValue!==t&&(this.textValue=t,n.value=t,this.setState({value:t}))},toPrecision:function(e){return parseFloat(e.toFixed(this.props.precision))},render:function(){var e={width:"100%"};return t.createElement("div",{className:"native-key-bindings",tabIndex:-1},t.createElement("input",{onKeyPress:this.onKeyPress,className:"native-key-bindings",style:Object.assign({},e,this.props.style),tabIndex:this.props.tabIndex,type:"number",onChange:this.onChange,defaultValue:this.state.value,min:this.props.min,max:this.props.max,step:"any"}))},onKeyPress:function(e){13===e.nativeEvent.keyCode&&(this.getDOMNode().childNodes[0].value=this.state.value)},onChange:function(e){var t=e.target.value;0!==t.length&&(t=parseFloat(t),t=Math.max(this.props.min,t),t=Math.min(this.props.max,t),t=this.toPrecision(t),t!==this.state.value&&(this.setState({value:t}),this.textValue=t,this.props.onChange(t)))}});module.exports=n;