react-keybinding-component
Advanced tools
Comparing version 0.5.2 to 1.0.0
{ | ||
"name": "react-keybinding-component", | ||
"version": "0.5.2", | ||
"version": "1.0.0", | ||
"description": "A React keybinding component", | ||
"main": "dist/react-keybinding-component.js", | ||
"main": "dist/keybinding.js", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"compile": "gulp", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"prepublishOnly": "npm run build", | ||
"build": "tsc", | ||
"test": "jest", | ||
"test:watch": "jest --watch" | ||
}, | ||
@@ -33,7 +38,10 @@ "repository": { | ||
"devDependencies": { | ||
"babel-preset-es2015": "^6.1.18", | ||
"babel-preset-react": "^6.1.18", | ||
"gulp": "^3.9.0", | ||
"gulp-babel": "^6.1.1", | ||
"gulp-rename": "^1.2.2" | ||
"@types/jest": "^23.3.9", | ||
"@types/prop-types": "^15.5.6", | ||
"@types/react": "^16.7.6", | ||
"@types/react-dom": "^16.0.10", | ||
"jest": "^23.6.0", | ||
"react": "^16.6.3", | ||
"ts-jest": "^23.10.4", | ||
"typescript": "^3.1.6" | ||
}, | ||
@@ -40,0 +48,0 @@ "dependencies": { |
@@ -30,11 +30,11 @@ # react-keybinding-component | ||
All properties are optional. | ||
All properties except `onKey` are optional. | ||
| Property | Description | Default value | | ||
|--------------------|---------------------------------------------|---------------| | ||
| onKey | the function executed after a key event | () => {} | | ||
| type | keyup or keydown | `'keydown'` | | ||
| target | the element you want to attach the event to, it can be an **existing** DOM element or a CSS selector (in that case, you will need to add a `tabIndex='0'` to your element, otherwise the event won't be caught) | `document` | | ||
| preventInputConflict | prevent onKey from firing if you have an onChange on an input, a textarea or a select | `false` | | ||
| preventDefault | prevent event default | `false` | | ||
| preventPropagation | prevent event propagation | `false` | | ||
| Property | Description | Default value | | ||
|------------------------|---------------------------------------------|---------------| | ||
| `onKey` (required) | the function executed after a key event | () => {} | | ||
| `type` | keyup or keydown | `'keydown'` | | ||
| `target` | the element you want to attach the event to, it can be an **existing** DOM element or a CSS selector (in that case, you will need to add a `tabIndex='0'` to your element, otherwise the event won't be caught) | `document` | | ||
| `preventInputConflict` | prevent onKey from firing if you have an onChange on an input, a textarea or a select | `false` | | ||
| `preventDefault` | prevent event default | `false` | | ||
| `preventPropagation` | prevent event propagation | `false` | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
10853
8
6
118