react-resizable 1.8.0 → 1.11.1
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.
- package/.babelrc +10 -4
- package/.browserslistrc +3 -0
- package/.eslintrc +10 -6
- package/.flowconfig +10 -10
- package/CHANGELOG.md +61 -32
- package/README.md +14 -4
- package/__tests__/Resizable.test.js +245 -0
- package/__tests__/ResizableBox.test.js +99 -0
- package/__tests__/__snapshots__/Resizable.test.js.snap +29 -0
- package/__tests__/__snapshots__/ResizableBox.test.js.snap +23 -0
- package/build/Resizable.js +172 -208
- package/build/Resizable.js.flow +99 -178
- package/build/ResizableBox.js +95 -79
- package/build/ResizableBox.js.flow +58 -33
- package/build/propTypes.js +112 -0
- package/build/propTypes.js.flow +135 -0
- package/build/utils.js +27 -0
- package/build/{cloneElement.js.flow → utils.js.flow} +2 -2
- package/coverage/clover.xml +107 -0
- package/coverage/coverage-final.json +5 -0
- package/coverage/lcov-report/Resizable.js.html +665 -0
- package/coverage/lcov-report/ResizableBox.js.html +374 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +79 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/flow-typed/npm/index.html +111 -0
- package/coverage/lcov-report/flow-typed/npm/jest_v26.x.x.js.html +3734 -0
- package/coverage/lcov-report/index.html +156 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/propTypes.js.html +485 -0
- package/coverage/lcov-report/react-resizable/dist/bundle.js.html +95 -0
- package/coverage/lcov-report/react-resizable/dist/index.html +111 -0
- package/coverage/lcov-report/react-resizable/flow-typed/npm/index.html +111 -0
- package/coverage/lcov-report/react-resizable/flow-typed/npm/jest_v26.x.x.js.html +3734 -0
- package/coverage/lcov-report/react-resizable/index.html +111 -0
- package/coverage/lcov-report/react-resizable/index.js.html +101 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +170 -0
- package/coverage/lcov-report/utils.js.html +122 -0
- package/coverage/lcov.info +233 -0
- package/dist/bundle.js +6 -0
- package/flow-typed/npm/jest_v26.x.x.js +1218 -0
- package/package.json +34 -26
- package/setupTests/enzyme.js +4 -0
- package/.github/ISSUE_TEMPLATE.md +0 -23
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -5
- package/build/cloneElement.js +0 -20
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-resizable",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "A component that is resizable with handles.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"lint": "eslint
|
|
8
|
-
"test": "
|
|
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
|
-
"
|
|
14
|
+
"prepublishOnly": "npm run build",
|
|
14
15
|
"validate": "yarn check",
|
|
15
16
|
"preversion": "npm run lint",
|
|
16
17
|
"version": "git add CHANGELOG.md",
|
|
@@ -33,40 +34,47 @@
|
|
|
33
34
|
},
|
|
34
35
|
"homepage": "https://github.com/STRML/react-resizable",
|
|
35
36
|
"devDependencies": {
|
|
36
|
-
"babel
|
|
37
|
-
"babel
|
|
38
|
-
"babel-
|
|
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",
|
|
44
|
+
"babel-eslint": "^10.0.3",
|
|
39
45
|
"babel-loader": "^8.0.6",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"lodash": "^4.3.0",
|
|
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",
|
|
50
55
|
"pre-commit": "^1.1.2",
|
|
51
|
-
"react": "^16.
|
|
52
|
-
"react-dom": "^16.
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"webpack
|
|
56
|
+
"react": "^16.10.2",
|
|
57
|
+
"react-dom": "^16.10.2",
|
|
58
|
+
"react-test-renderer": "^16.11.0",
|
|
59
|
+
"style-loader": "^1.0.0",
|
|
60
|
+
"webpack": "^4.44.1",
|
|
61
|
+
"webpack-cli": "^3.3.12",
|
|
62
|
+
"webpack-dev-server": "^3.8.2"
|
|
56
63
|
},
|
|
57
64
|
"dependencies": {
|
|
58
65
|
"prop-types": "15.x",
|
|
59
|
-
"react-draggable": "^
|
|
66
|
+
"react-draggable": "^4.0.3"
|
|
60
67
|
},
|
|
61
68
|
"peerDependencies": {
|
|
62
|
-
"react": "0.14.x || 15.x || 16.x",
|
|
63
|
-
"react-dom": "0.14.x || 15.x || 16.x"
|
|
69
|
+
"react": "0.14.x || 15.x || 16.x || 17.x",
|
|
70
|
+
"react-dom": "0.14.x || 15.x || 16.x || 17.x"
|
|
64
71
|
},
|
|
65
72
|
"publishConfig": {
|
|
66
73
|
"registry": "https://registry.npmjs.org"
|
|
67
74
|
},
|
|
68
75
|
"pre-commit": [
|
|
69
76
|
"lint",
|
|
70
|
-
"validate"
|
|
77
|
+
"validate",
|
|
78
|
+
"test"
|
|
71
79
|
]
|
|
72
80
|
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
### Thanks for opening an issue!
|
|
2
|
-
|
|
3
|
-
Please select the type of issue you're reporting. For questions.
|
|
4
|
-
|
|
5
|
-
- [ ] Bug
|
|
6
|
-
- [ ] Feature Request
|
|
7
|
-
- [ ] Question
|
|
8
|
-
|
|
9
|
-
### Problem Report
|
|
10
|
-
|
|
11
|
-
> Please describe the problem here.
|
|
12
|
-
|
|
13
|
-
#### System Info
|
|
14
|
-
|
|
15
|
-
Node Version:
|
|
16
|
-
Browser:
|
|
17
|
-
OS:
|
|
18
|
-
|
|
19
|
-
#### Reproduction
|
|
20
|
-
|
|
21
|
-
If this is a bug report, please provide a reproduction of the issue by going to
|
|
22
|
-
https://codesandbox.io/s/9229wz40yo?fontsize=14.
|
|
23
|
-
Paste a link here to your working reproduction.
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
Thanks for submitting a pull request to React-Resizable!
|
|
2
|
-
|
|
3
|
-
Please reference an open issue. If one has not been created, please create one along with a failing example or test case.
|
|
4
|
-
|
|
5
|
-
Please do not commit built files (`/dist`) to pull requests. They are built only at release.
|
package/build/cloneElement.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
4
|
-
|
|
5
|
-
var _react = require('react');
|
|
6
|
-
|
|
7
|
-
var _react2 = _interopRequireDefault(_react);
|
|
8
|
-
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
11
|
-
// React.addons.cloneWithProps look-alike that merges style & className.
|
|
12
|
-
module.exports = function cloneElement(element, props) {
|
|
13
|
-
if (props.style && element.props.style) {
|
|
14
|
-
props.style = _extends({}, element.props.style, props.style);
|
|
15
|
-
}
|
|
16
|
-
if (props.className && element.props.className) {
|
|
17
|
-
props.className = element.props.className + ' ' + props.className;
|
|
18
|
-
}
|
|
19
|
-
return _react2.default.cloneElement(element, props);
|
|
20
|
-
};
|