react-resizable 1.10.1 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.eslintrc +10 -6
  2. package/.flowconfig +8 -8
  3. package/CHANGELOG.md +48 -37
  4. package/README.md +13 -3
  5. package/__tests__/Resizable.test.js +245 -0
  6. package/__tests__/ResizableBox.test.js +99 -0
  7. package/__tests__/__snapshots__/Resizable.test.js.snap +29 -0
  8. package/__tests__/__snapshots__/ResizableBox.test.js.snap +23 -0
  9. package/build/Resizable.js +100 -134
  10. package/build/Resizable.js.flow +87 -161
  11. package/build/ResizableBox.js +32 -29
  12. package/build/ResizableBox.js.flow +44 -28
  13. package/build/propTypes.js +112 -0
  14. package/build/propTypes.js.flow +135 -0
  15. package/build/utils.js +3 -3
  16. package/coverage/clover.xml +107 -0
  17. package/coverage/coverage-final.json +5 -0
  18. package/coverage/lcov-report/Resizable.js.html +665 -0
  19. package/coverage/lcov-report/ResizableBox.js.html +374 -0
  20. package/coverage/lcov-report/base.css +224 -0
  21. package/coverage/lcov-report/block-navigation.js +79 -0
  22. package/coverage/lcov-report/favicon.png +0 -0
  23. package/coverage/lcov-report/flow-typed/npm/index.html +111 -0
  24. package/coverage/lcov-report/flow-typed/npm/jest_v26.x.x.js.html +3734 -0
  25. package/coverage/lcov-report/index.html +156 -0
  26. package/coverage/lcov-report/prettify.css +1 -0
  27. package/coverage/lcov-report/prettify.js +2 -0
  28. package/coverage/lcov-report/propTypes.js.html +485 -0
  29. package/coverage/lcov-report/react-resizable/dist/bundle.js.html +95 -0
  30. package/coverage/lcov-report/react-resizable/dist/index.html +111 -0
  31. package/coverage/lcov-report/react-resizable/flow-typed/npm/index.html +111 -0
  32. package/coverage/lcov-report/react-resizable/flow-typed/npm/jest_v26.x.x.js.html +3734 -0
  33. package/coverage/lcov-report/react-resizable/index.html +111 -0
  34. package/coverage/lcov-report/react-resizable/index.js.html +101 -0
  35. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  36. package/coverage/lcov-report/sorter.js +170 -0
  37. package/coverage/lcov-report/utils.js.html +122 -0
  38. package/coverage/lcov.info +233 -0
  39. package/dist/bundle.js +6 -0
  40. package/flow-typed/npm/jest_v26.x.x.js +1218 -0
  41. package/package.json +26 -20
  42. package/setupTests/enzyme.js +4 -0
  43. package/index.html +0 -15
package/package.json CHANGED
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "react-resizable",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "description": "A component that is resizable with handles.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "lint": "eslint --ext .js,.jsx lib/ test/; flow",
8
- "test": "echo \"Error: no test specified\" && exit 1",
7
+ "lint": "eslint lib/ __tests__/ setupTests/; flow",
8
+ "test": "jest --coverage",
9
+ "unit": "jest --watch --verbose",
9
10
  "build": "bash build.sh",
10
11
  "build-example": "webpack",
11
12
  "dev": "webpack-dev-server --open --open-page=examples/1.html",
12
13
  "watch": "webpack --progress --watch",
13
- "prepare": "npm run build",
14
+ "prepublishOnly": "npm run build",
14
15
  "validate": "yarn check",
15
16
  "preversion": "npm run lint",
16
17
  "version": "git add CHANGELOG.md",
@@ -33,27 +34,31 @@
33
34
  },
34
35
  "homepage": "https://github.com/STRML/react-resizable",
35
36
  "devDependencies": {
36
- "@babel/cli": "^7.0.0",
37
- "@babel/core": "^7.0.0",
38
- "@babel/plugin-proposal-class-properties": "^7.0.0",
39
- "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
40
- "@babel/preset-env": "^7.0.0",
41
- "@babel/preset-flow": "^7.0.0",
42
- "@babel/preset-react": "^7.0.0",
37
+ "@babel/cli": "^7.11.6",
38
+ "@babel/core": "^7.11.6",
39
+ "@babel/plugin-proposal-class-properties": "^7.10.4",
40
+ "@babel/plugin-proposal-object-rest-spread": "^7.11.0",
41
+ "@babel/preset-env": "^7.11.5",
42
+ "@babel/preset-flow": "^7.10.4",
43
+ "@babel/preset-react": "^7.10.4",
43
44
  "babel-eslint": "^10.0.3",
44
45
  "babel-loader": "^8.0.6",
45
- "cross-env": "^6.0.3",
46
- "css-loader": "^3.2.0",
47
- "eslint": "^6.5.1",
48
- "eslint-plugin-react": "^7.16.0",
49
- "flow-bin": "^0.110.0",
50
- "lodash": "^4.17.15",
46
+ "cross-env": "^7.0.2",
47
+ "css-loader": "^4.2.2",
48
+ "enzyme": "^3.11.0",
49
+ "enzyme-adapter-react-16": "^1.15.4",
50
+ "eslint": "^7.8.1",
51
+ "eslint-plugin-react": "^7.20.6",
52
+ "flow-bin": "^0.133.0",
53
+ "jest": "^26.4.2",
54
+ "lodash": "^4.17.20",
51
55
  "pre-commit": "^1.1.2",
52
56
  "react": "^16.10.2",
53
57
  "react-dom": "^16.10.2",
58
+ "react-test-renderer": "^16.11.0",
54
59
  "style-loader": "^1.0.0",
55
- "webpack": "^4.41.2",
56
- "webpack-cli": "^3.3.9",
60
+ "webpack": "^4.44.1",
61
+ "webpack-cli": "^3.3.12",
57
62
  "webpack-dev-server": "^3.8.2"
58
63
  },
59
64
  "dependencies": {
@@ -69,6 +74,7 @@
69
74
  },
70
75
  "pre-commit": [
71
76
  "lint",
72
- "validate"
77
+ "validate",
78
+ "test"
73
79
  ]
74
80
  }
@@ -0,0 +1,4 @@
1
+ const Adapter = require('enzyme-adapter-react-16');
2
+ const enzyme = require('enzyme');
3
+
4
+ enzyme.configure({ adapter: new Adapter() });
package/index.html DELETED
@@ -1,15 +0,0 @@
1
- <html>
2
- <head>
3
- <style>
4
- body {
5
- background: darkblue;
6
- color: white;
7
- font-size: 32px;
8
- }
9
- </style>
10
- </head>
11
- <body>
12
- Hello! This is a website wow
13
- <div style="background-color: black; width: 200px; height: 200px">BOX</div>
14
- </body>
15
- </html>