{"_id":"@arguiwu/react-native-gesture-password","_rev":"3-5363062da516e8ed5fe6e7fd85d909e4","name":"@arguiwu/react-native-gesture-password","description":"A gesture password component for React Native. It supports both iOS and Android since it's' written in pure JavaScript.","dist-tags":{"latest":"0.3.4"},"versions":{"0.3.3":{"name":"@arguiwu/react-native-gesture-password","version":"0.3.3","description":"A gesture password component for React Native. It supports both iOS and Android since it's' written in pure JavaScript.","main":"source/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Arguiwu/react-native-gesture-password.git"},"keywords":["react-component","react-native","ios","android","gesture password"],"license":"MIT","bugs":{"url":"https://github.com/Arguiwu/react-native-gesture-password/issues"},"peerDependencies":{"react-native":">=15.5"},"dependencies":{"prop-types":"^15.6.0"},"gitHead":"f7dd36830ffc06edc88ca78e3d839379992166b6","homepage":"https://github.com/Arguiwu/react-native-gesture-password#readme","_id":"@arguiwu/react-native-gesture-password@0.3.3","_shasum":"5768f1c0af9b1534a531eb64882e131bc9e58c43","_from":".","_npmVersion":"3.10.6","_nodeVersion":"8.6.0","_npmUser":{"name":"arguiwu","email":"wxgsorry@gmail.com"},"dist":{"shasum":"5768f1c0af9b1534a531eb64882e131bc9e58c43","tarball":"https://registry.npmjs.org/@arguiwu/react-native-gesture-password/-/react-native-gesture-password-0.3.3.tgz","integrity":"sha512-odVthe4EFfy19npqqbTmYiAIIwAu/wJ66YbRp7/WLe55FMrBqJEKVLjQdbuHsX3tp/EBmXYJLVYeAK/ehIezIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+Oh3V/jjSWw9XIvEakypsGF3H8GNZDzn75u58MCvNfAiARlr8TVwXAd/L/gw4Tuy3Ow3BSlbTb/pBh23S57My0zg=="}]},"maintainers":[{"name":"arguiwu","email":"wxgsorry@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-gesture-password-0.3.3.tgz_1516850553709_0.014213124988600612"}},"0.3.4":{"name":"@arguiwu/react-native-gesture-password","version":"0.3.4","description":"A gesture password component for React Native. It supports both iOS and Android since it's' written in pure JavaScript.","main":"source/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Arguiwu/react-native-gesture-password.git"},"keywords":["react-component","react-native","ios","android","gesture password"],"license":"MIT","bugs":{"url":"https://github.com/Arguiwu/react-native-gesture-password/issues"},"peerDependencies":{"react-native":">=15.5"},"dependencies":{"prop-types":"^15.6.0"},"gitHead":"f7dd36830ffc06edc88ca78e3d839379992166b6","homepage":"https://github.com/Arguiwu/react-native-gesture-password#readme","_id":"@arguiwu/react-native-gesture-password@0.3.4","_shasum":"b985a75baa411396c7dbc46c2c9bb0c4b3a96acd","_from":".","_npmVersion":"3.10.6","_nodeVersion":"8.6.0","_npmUser":{"name":"arguiwu","email":"wxgsorry@gmail.com"},"dist":{"shasum":"b985a75baa411396c7dbc46c2c9bb0c4b3a96acd","tarball":"https://registry.npmjs.org/@arguiwu/react-native-gesture-password/-/react-native-gesture-password-0.3.4.tgz","integrity":"sha512-sHcVQ4Wm4VDrlOBNi2hhe6AG4ave3kE11tiQTFVWcZUxKxdbwkvialEHP5jzE+mZowDDchDJBBsPcMiIihIOBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBglIRjtuxQ1oGlIlmNhvJ4ezs6YBCN6kgNag1PliWnBAiEAzPQr/Vh9mIzEaetAJzaczCei5gcDkewQUJ14fnl4ABg="}]},"maintainers":[{"name":"arguiwu","email":"wxgsorry@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-gesture-password-0.3.4.tgz_1516850937910_0.001605216646566987"}}},"readme":"# react-native-gesture-password\r\n\r\nA gesture password component for React Native. It supports both iOS and Android since it's written in pure JavaScript.\r\n\r\n一个React Native的手势密码组件，纯JavaScript实现，因此同时支持iOS和安卓平台。\r\n\r\n![image](https://github.com/Arguiwu/react-native-gesture-password/raw/master/screenshot.gif)\r\n\r\n## Install\r\n\r\n```javascript\r\nnpm install @arguiwu/react-native-gesture-password --save\r\nyarn add @arguiwu/react-native-gesture-password\r\n```\r\n\r\n## Properties\r\n\r\nAll properties bellow are optional.\r\n\r\n### message (string)\r\n\r\nThe message text you want to show. NOTE: If you leave this blank, no message appears for any state changes.\r\n\r\n### status (string)\r\n\r\nCan be 'normal', 'right' or 'wrong'.\r\n\r\nThe gesture password don't validate your password. You should do that yourself, and tell the result by status.\r\n\r\n### style (string)\r\n\r\nStyles for the gesture password view.\r\n\r\n### textStyle (string)\r\nStyle for the text element in the view.\r\n\r\n### normalColor (string)\r\n\r\nUse this color to render the default circle color.\r\n\r\n### rightColor (string)\r\n\r\nUse this color to render when status !== 'wrong'.\r\n\r\n### wrongColor (string)\r\n\r\nUse this color to render when status === 'wrong'.\r\n\r\n### interval (number)\r\n\r\nThe active circles will be reset automatically after you give an interval.\r\n\r\n### allowCross (boolean)\r\n\r\nAllow cross the circles(eg: 1 -> 7 -> 4), default is false.\r\n\r\n### onStart (function)\r\n\r\nEvent raised when user touch a number circle.\r\n\r\n### onEnd (function)\r\n\r\nEvent raised when user finish input a password.\r\n\r\n### onReset (function)\r\n\r\nEvent raised after the reset interval has cleared circles. Can be used to reset message.\r\n\r\n### children\r\n\r\nOther components that you want to display.\r\n\r\n### outerCircle and innerCircle (boolean)\r\n\r\nControl whether to draw outer and inner circle, true default.\r\n\r\n## Examples\r\n\r\n```javascript\r\n\r\nvar React = require('react');\r\nvar {\r\n    AppRegistry,\r\n    } = require('react-native');\r\n\r\nvar PasswordGesture = require('@arguiwu/react-native-gesture-password');\r\n\r\nvar Password1 = '';\r\nvar AppDemo = React.createClass({\r\n    // Example for check password\r\n    onEnd: function(password) {\r\n        if (password == '123') {\r\n            this.setState({\r\n                status: 'right',\r\n                message: 'Password is right, success.'\r\n            });\r\n\r\n            // your codes to close this view\r\n        } else {\r\n            this.setState({\r\n                status: 'wrong',\r\n                message: 'Password is wrong, try again.'\r\n            });\r\n        }\r\n    },\r\n    onStart: function() {\r\n        this.setState({\r\n            status: 'normal',\r\n            message: 'Please input your password.'\r\n        });\r\n    },\r\n    onReset: function() {\r\n        this.setState({\r\n            status: 'normal',\r\n            message: 'Please input your password (again).'\r\n        });\r\n    },\r\n    // Example for set password\r\n    /*\r\n    onEnd: function(password) {\r\n        if ( Password1 === '' ) {\r\n            // The first password\r\n            Password1 = password;\r\n            this.setState({\r\n                status: 'normal',\r\n                message: 'Please input your password secondly.'\r\n            });\r\n        } else {\r\n            // The second password\r\n            if ( password === Password1 ) {\r\n                this.setState({\r\n                    status: 'right',\r\n                    message: 'Your password is set to ' + password\r\n                });\r\n\r\n                Password1 = '';\r\n                // your codes to close this view\r\n            } else {\r\n                this.setState({\r\n                    status: 'wrong',\r\n                    message:  'Not the same, try again.'\r\n                });\r\n            }\r\n        }\r\n    },\r\n    onStart: function() {\r\n        if ( Password1 === '') {\r\n            this.setState({\r\n                message: 'Please input your password.'\r\n            });\r\n        } else {\r\n            this.setState({\r\n                message: 'Please input your password secondly.'\r\n            });\r\n        }\r\n    },\r\n    */\r\n\r\n    getInitialState: function() {\r\n        return {\r\n            message: 'Please input your password.',\r\n            status: 'normal'\r\n        }\r\n    },\r\n    render: function() {\r\n        return (\r\n            <PasswordGesture\r\n                ref='pg'\r\n                status={this.state.status}\r\n                message={this.state.message}\r\n                onStart={() => this.onStart()}\r\n                onEnd={(password) => this.onEnd(password)}\r\n                />\r\n        );\r\n    }\r\n});\r\n\r\nAppRegistry.registerComponent('AppDemo', () => AppDemo);\r\n\r\n```\r\n## Change Logs\r\n\r\n#### v0.2.0\r\n\r\nRewrite with ES6 for React-Native@v0.25+ support\r\n\r\nAdd outerCircle and innerCircle properties\r\n\r\n#### v0.1.5\r\n\r\nTextStyle and onReset event. (@caledhwa)\r\n\r\n#### v0.1.4\r\n\r\nManage the adaptation to landscape orientation. (@jujumoz)\r\n\r\n#### v0.1.3\r\n\r\nAdd the allowCross property.\r\n\r\n#### v0.1.2\r\n\r\nImprove the performance for real device.\r\n\r\n#### v0.1.0\r\n\r\nRewrite in pure javascript, for Android support.\r\n\r\n## Notes\r\n\r\nThis old version(<0.1.0) is at the branch native. I won't update that unless fix bugs.\r\n\r\nIf you have suggestions or bug reports, feel free to send pull request or [create new issue](https://github.com/spikef/react-native-gesture-password/issues/new).\r\n","maintainers":[{"name":"arguiwu","email":"wxgsorry@gmail.com"}],"time":{"modified":"2022-06-12T14:47:38.052Z","created":"2018-01-25T03:22:33.791Z","0.3.3":"2018-01-25T03:22:33.791Z","0.3.4":"2018-01-25T03:28:58.100Z"},"homepage":"https://github.com/Arguiwu/react-native-gesture-password#readme","keywords":["react-component","react-native","ios","android","gesture password"],"repository":{"type":"git","url":"git+https://github.com/Arguiwu/react-native-gesture-password.git"},"bugs":{"url":"https://github.com/Arguiwu/react-native-gesture-password/issues"},"license":"MIT","readmeFilename":"README.md"}