react-split-pane 0.1.72 → 0.1.77
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/.idea/misc.xml +0 -23
- package/.idea/shelf/Get_Resizer_dimensions/shelved.patch +206 -0
- package/.idea/shelf/Get_Resizer_dimensions.xml +4 -0
- package/.idea/workspace.xml +762 -684
- package/.npmignore +4 -0
- package/README.md +1 -1
- package/index.d.ts +2 -2
- package/lib/Pane.js +0 -11
- package/lib/Resizer.js +0 -11
- package/lib/SplitPane.js +11 -6
- package/package.json +4 -4
- package/.idea/compiler.xml +0 -22
- package/.idea/copyright/profiles_settings.xml +0 -3
- package/.idea/dictionaries/tom.xml +0 -8
package/.npmignore
ADDED
package/README.md
CHANGED
|
@@ -177,7 +177,7 @@ I'm always happy to receive Pull Requests for contributions of any kind.
|
|
|
177
177
|
|
|
178
178
|
Please include tests and/or update the examples if possible.
|
|
179
179
|
|
|
180
|
-
I'
|
|
180
|
+
**I'm working on an updated version of this library, and looking for help:** https://github.com/tomkp/react-split-pane/pull/240
|
|
181
181
|
|
|
182
182
|
Thanks, Tom
|
|
183
183
|
|
package/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface Props {
|
|
|
13
13
|
size?: Size;
|
|
14
14
|
split?: 'vertical' | 'horizontal';
|
|
15
15
|
onDragStarted?: () => void;
|
|
16
|
-
onDragFinished?: () => void;
|
|
16
|
+
onDragFinished?: (newSize: number) => void;
|
|
17
17
|
onChange?: (newSize: number) => void;
|
|
18
18
|
onResizerClick?: (event: MouseEvent) => void;
|
|
19
19
|
onResizerDoubleClick?: (event: MouseEvent) => void;
|
|
@@ -50,4 +50,4 @@ declare class SplitPane extends React.Component<Props, State> {
|
|
|
50
50
|
static defaultProps: Props;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export
|
|
53
|
+
export default SplitPane;
|
package/lib/Pane.js
CHANGED
|
@@ -24,10 +24,6 @@ var _reactStyleProptype = require('react-style-proptype');
|
|
|
24
24
|
|
|
25
25
|
var _reactStyleProptype2 = _interopRequireDefault(_reactStyleProptype);
|
|
26
26
|
|
|
27
|
-
var _fastDeepEqual = require('fast-deep-equal');
|
|
28
|
-
|
|
29
|
-
var _fastDeepEqual2 = _interopRequireDefault(_fastDeepEqual);
|
|
30
|
-
|
|
31
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
28
|
|
|
33
29
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -52,13 +48,6 @@ var Pane = function (_React$Component) {
|
|
|
52
48
|
}
|
|
53
49
|
|
|
54
50
|
_createClass(Pane, [{
|
|
55
|
-
key: 'shouldComponentUpdate',
|
|
56
|
-
value: function shouldComponentUpdate(nextProps, nextState) {
|
|
57
|
-
var currentState = this.state;
|
|
58
|
-
var currentProps = this.props;
|
|
59
|
-
return !(0, _fastDeepEqual2.default)(currentProps, nextProps) || !(0, _fastDeepEqual2.default)(currentState, nextState);
|
|
60
|
-
}
|
|
61
|
-
}, {
|
|
62
51
|
key: 'render',
|
|
63
52
|
value: function render() {
|
|
64
53
|
var _props = this.props,
|
package/lib/Resizer.js
CHANGED
|
@@ -23,10 +23,6 @@ var _reactStyleProptype = require('react-style-proptype');
|
|
|
23
23
|
|
|
24
24
|
var _reactStyleProptype2 = _interopRequireDefault(_reactStyleProptype);
|
|
25
25
|
|
|
26
|
-
var _fastDeepEqual = require('fast-deep-equal');
|
|
27
|
-
|
|
28
|
-
var _fastDeepEqual2 = _interopRequireDefault(_fastDeepEqual);
|
|
29
|
-
|
|
30
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
27
|
|
|
32
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -49,13 +45,6 @@ var Resizer = function (_React$Component) {
|
|
|
49
45
|
}
|
|
50
46
|
|
|
51
47
|
_createClass(Resizer, [{
|
|
52
|
-
key: 'shouldComponentUpdate',
|
|
53
|
-
value: function shouldComponentUpdate(nextProps, nextState) {
|
|
54
|
-
var currentState = this.state;
|
|
55
|
-
var currentProps = this.props;
|
|
56
|
-
return !(0, _fastDeepEqual2.default)(currentProps, nextProps) || !(0, _fastDeepEqual2.default)(currentState, nextState);
|
|
57
|
-
}
|
|
58
|
-
}, {
|
|
59
48
|
key: 'render',
|
|
60
49
|
value: function render() {
|
|
61
50
|
var _props = this.props,
|
package/lib/SplitPane.js
CHANGED
|
@@ -58,8 +58,8 @@ function unFocus(document, window) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
var SplitPane = function (_React$
|
|
62
|
-
_inherits(SplitPane, _React$
|
|
61
|
+
var SplitPane = function (_React$Component) {
|
|
62
|
+
_inherits(SplitPane, _React$Component);
|
|
63
63
|
|
|
64
64
|
function SplitPane() {
|
|
65
65
|
_classCallCheck(this, SplitPane);
|
|
@@ -232,9 +232,9 @@ var SplitPane = function (_React$PureComponent) {
|
|
|
232
232
|
}, {
|
|
233
233
|
key: 'setSize',
|
|
234
234
|
value: function setSize(props, state) {
|
|
235
|
-
var
|
|
236
|
-
|
|
237
|
-
var
|
|
235
|
+
var isPrimaryFirst = props.primary === 'first';
|
|
236
|
+
var ref = isPrimaryFirst ? this.pane1 : this.pane2;
|
|
237
|
+
var ref2 = isPrimaryFirst ? this.pane2 : this.pane1;
|
|
238
238
|
var newSize = void 0;
|
|
239
239
|
if (ref) {
|
|
240
240
|
newSize = props.size || state && state.draggedSize || props.defaultSize || props.minSize;
|
|
@@ -247,6 +247,11 @@ var SplitPane = function (_React$PureComponent) {
|
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
+
if (ref2 && props.primary !== this.props.primary) {
|
|
251
|
+
ref2.setState({
|
|
252
|
+
size: undefined
|
|
253
|
+
});
|
|
254
|
+
}
|
|
250
255
|
}
|
|
251
256
|
}, {
|
|
252
257
|
key: 'render',
|
|
@@ -371,7 +376,7 @@ var SplitPane = function (_React$PureComponent) {
|
|
|
371
376
|
}]);
|
|
372
377
|
|
|
373
378
|
return SplitPane;
|
|
374
|
-
}(_react2.default.
|
|
379
|
+
}(_react2.default.Component);
|
|
375
380
|
|
|
376
381
|
SplitPane.propTypes = {
|
|
377
382
|
allowResize: _propTypes2.default.bool,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "React split-pane component",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.77",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/tomkp/react-split-pane"
|
|
@@ -22,14 +22,13 @@
|
|
|
22
22
|
"es6"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@types/inline-style-prefixer": "^3.0.0",
|
|
26
|
-
"@types/react": "^16.0.18",
|
|
27
|
-
"fast-deep-equal": "^1.0.0",
|
|
28
25
|
"inline-style-prefixer": "^3.0.6",
|
|
29
26
|
"prop-types": "^15.5.10",
|
|
30
27
|
"react-style-proptype": "^3.0.0"
|
|
31
28
|
},
|
|
32
29
|
"devDependencies": {
|
|
30
|
+
"@types/inline-style-prefixer": "^3.0.1",
|
|
31
|
+
"@types/react": "^16.0.36",
|
|
33
32
|
"babel-cli": "^6.24.1",
|
|
34
33
|
"babel-plugin-add-module-exports": "^0.2.1",
|
|
35
34
|
"babel-plugin-transform-object-assign": "^6.22.0",
|
|
@@ -46,6 +45,7 @@
|
|
|
46
45
|
"prettier": "^1.7.4",
|
|
47
46
|
"react": "^15.6.1",
|
|
48
47
|
"react-dom": "^15.6.1",
|
|
48
|
+
"release-it": "^7.0.2",
|
|
49
49
|
"surge": "^0.19.0",
|
|
50
50
|
"typescript": "^2.5.3",
|
|
51
51
|
"watchify": "^3.9.0"
|
package/.idea/compiler.xml
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="CompilerConfiguration">
|
|
4
|
-
<resourceExtensions />
|
|
5
|
-
<wildcardResourcePatterns>
|
|
6
|
-
<entry name="!?*.java" />
|
|
7
|
-
<entry name="!?*.form" />
|
|
8
|
-
<entry name="!?*.class" />
|
|
9
|
-
<entry name="!?*.groovy" />
|
|
10
|
-
<entry name="!?*.scala" />
|
|
11
|
-
<entry name="!?*.flex" />
|
|
12
|
-
<entry name="!?*.kt" />
|
|
13
|
-
<entry name="!?*.clj" />
|
|
14
|
-
<entry name="!?*.aj" />
|
|
15
|
-
</wildcardResourcePatterns>
|
|
16
|
-
<annotationProcessing>
|
|
17
|
-
<profile default="true" name="Default" enabled="false">
|
|
18
|
-
<processorPath useClasspath="true" />
|
|
19
|
-
</profile>
|
|
20
|
-
</annotationProcessing>
|
|
21
|
-
</component>
|
|
22
|
-
</project>
|