This commit is contained in:
50
node_modules/react-split-pane/CHANGELOG.md
generated
vendored
Normal file
50
node_modules/react-split-pane/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
### [0.1.92](https://github.com/tomkp/react-split-pane/compare/v0.1.91...v0.1.92) (2020-08-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add storybook ([3a8b6e6](https://github.com/tomkp/react-split-pane/commit/3a8b6e664d05e8daf3d0339eadfdcd69adde9d04))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* no coverage for now ([a1ef084](https://github.com/tomkp/react-split-pane/commit/a1ef08488865cc1b4f35bb77a11865b07683f282))
|
||||
* typo ([2ab168d](https://github.com/tomkp/react-split-pane/commit/2ab168d0ed2137efe679ab0aacbfc5d439a634f0))
|
||||
|
||||
### [0.1.91](https://github.com/tomkp/react-split-pane/compare/v0.1.89...v0.1.91) (2020-03-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* typescript typings ([ae3e41f](https://github.com/tomkp/react-split-pane/commit/ae3e41f0076903e02cc4c5011b31ea7eeadf2ac9))
|
||||
* Update site title ([f61efff](https://github.com/tomkp/react-split-pane/commit/f61efff1f7676059d6b049774f004c4e49cb1e1f))
|
||||
|
||||
### [0.1.90](https://github.com/tomkp/react-split-pane/compare/v0.1.89...v0.1.90) (2020-03-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* typescript typings ([ae3e41f](https://github.com/tomkp/react-split-pane/commit/ae3e41f0076903e02cc4c5011b31ea7eeadf2ac9))
|
||||
* Update site title ([f61efff](https://github.com/tomkp/react-split-pane/commit/f61efff1f7676059d6b049774f004c4e49cb1e1f))
|
||||
|
||||
### [0.1.89](https://github.com/tomkp/react-split-pane/compare/v0.1.88...v0.1.89) (2019-11-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* also include named exports ([bfd16af](https://github.com/tomkp/react-split-pane/commit/bfd16afe8e4f186968ecfd73929a961a9525abed))
|
||||
* ignore changelog in prettier ([7c0a6a4](https://github.com/tomkp/react-split-pane/commit/7c0a6a4f123fe266dece1d823bd0de580cca6507))
|
||||
|
||||
### [0.1.88](https://github.com/tomkp/react-split-pane/compare/v0.1.87...v0.1.88) (2019-11-12)
|
||||
|
||||
### Features
|
||||
|
||||
- new less complex site w parcel and gh-pages deploys ([#378](https://github.com/tomkp/react-split-pane/issues/378)) ([ea98d68](https://github.com/tomkp/react-split-pane/commit/ea98d6853f71c479b3b351a4dd23520fe7595409))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- excluded react and react-dom from bundle ([#349](https://github.com/tomkp/react-split-pane/issues/349)) ([eb6b2bc](https://github.com/tomkp/react-split-pane/commit/eb6b2bc92873f1b671243de4f8fba96029f119df))
|
||||
22
node_modules/react-split-pane/LICENSE
generated
vendored
Normal file
22
node_modules/react-split-pane/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 tomkp
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
239
node_modules/react-split-pane/README.md
generated
vendored
Normal file
239
node_modules/react-split-pane/README.md
generated
vendored
Normal file
@@ -0,0 +1,239 @@
|
||||
# React Split Pane
|
||||
|
||||
[](https://www.npmjs.com/package/react-split-pane)
|
||||

|
||||
[](https://npmcharts.com/compare/react-split-pane?minimal=true)
|
||||
[](https://npmcharts.com/compare/react-split-pane?minimal=true)
|
||||

|
||||
[](https://coveralls.io/r/tomkp/react-split-pane)
|
||||
|
||||
Split-Pane React component, can be nested or split vertically or horizontally!
|
||||
|
||||
## Installing
|
||||
|
||||
````sh
|
||||
npm install react-split-pane
|
||||
|
||||
# or if you use yarn
|
||||
|
||||
yarn add react-split-pane
|
||||
|
||||
## Example Usage
|
||||
|
||||
```jsx
|
||||
<SplitPane split="vertical" minSize={50} defaultSize={100}>
|
||||
<div />
|
||||
<div />
|
||||
</SplitPane>
|
||||
````
|
||||
|
||||
```jsx
|
||||
<SplitPane split="vertical" minSize={50}>
|
||||
<div />
|
||||
<SplitPane split="horizontal">
|
||||
<div />
|
||||
<div />
|
||||
</SplitPane>
|
||||
</SplitPane>
|
||||
```
|
||||
|
||||
## Props
|
||||
|
||||
### primary
|
||||
|
||||
By dragging 'draggable' surface you can change size of the first pane.
|
||||
The first pane keeps then its size while the second pane is resized by browser window.
|
||||
By default it is the left pane for 'vertical' SplitPane and the top pane for 'horizontal' SplitPane.
|
||||
If you want to keep size of the second pane and let the first pane to shrink or grow by browser window dimensions,
|
||||
set SplitPane prop `primary` to `second`. In case of 'horizontal' SplitPane the height of bottom pane remains the same.
|
||||
|
||||
Resizing can be disabled by passing the `allowResize` prop as `false` (`allowResize={false}`). Resizing is enabled by default.
|
||||
|
||||
You can also set the size of the pane using the `size` prop. Note that a size set through props ignores the `defaultSize` and `minSize` properties.
|
||||
|
||||
In this example right pane keeps its width 200px while user is resizing browser window.
|
||||
|
||||
```jsx
|
||||
<SplitPane split="vertical" defaultSize={200} primary="second">
|
||||
<div />
|
||||
<div />
|
||||
</SplitPane>
|
||||
```
|
||||
|
||||
### maxSize
|
||||
|
||||
You can limit the maximal size of the 'fixed' pane using the maxSize parameter with a positive value (measured in pixels but state just a number).
|
||||
If you wrap the SplitPane into a container component (yes you can, just remember the container has to have the relative or absolute positioning),
|
||||
then you'll need to limit the movement of the splitter (resizer) at the end of the SplitPane (otherwise it can be dragged outside the SplitPane
|
||||
and you don't catch it never more). For this purpose use the maxSize parameter with value 0. When dragged the splitter/resizer will stop at the border
|
||||
of the SplitPane component and think this you'll be able to pick it again and drag it back then.
|
||||
And more: if you set the maxSize to negative value (e.g. -200), then the splitter stops 200px before the border (in other words it sets the minimal
|
||||
size of the 'resizable' pane in this case). This can be useful also in the full-screen case of use.
|
||||
|
||||
### step
|
||||
|
||||
You can use the step prop to only allow resizing in fixed increments.
|
||||
|
||||
### onDragStarted
|
||||
|
||||
This callback is invoked when a drag starts.
|
||||
|
||||
### onDragFinished
|
||||
|
||||
This callback is invoked when a drag ends.
|
||||
|
||||
### onChange
|
||||
|
||||
This callback is invoked with the current drag during a drag event. It is recommended that it is wrapped in a debounce function.
|
||||
|
||||
### Inline Styles
|
||||
|
||||
You can also pass inline styles to the components via props. These are:
|
||||
|
||||
- `style` - Styling to be applied to the main container.
|
||||
- `paneStyle` - Styling to be applied to both panes
|
||||
- `pane1Style` - Styling to be applied to the first pane, with precedence over `paneStyle`
|
||||
- `pane2Style` - Styling to be applied to the second pane, with precedence over `paneStyle`
|
||||
- `resizerStyle` - Styling to be applied to the resizer bar
|
||||
|
||||
## Persisting Positions
|
||||
|
||||
Each SplitPane accepts an onChange function prop. Used in conjunction with
|
||||
defaultSize and a persistence layer, you can ensure that your splitter choices
|
||||
survive a refresh of your app.
|
||||
|
||||
For example, if you are comfortable with the trade-offs of localStorage, you
|
||||
could do something like the following:
|
||||
|
||||
```jsx
|
||||
<SplitPane
|
||||
split="vertical"
|
||||
minSize={50}
|
||||
defaultSize={parseInt(localStorage.getItem('splitPos'), 10)}
|
||||
onChange={(size) => localStorage.setItem('splitPos', size)}
|
||||
>
|
||||
<div />
|
||||
<div />
|
||||
</SplitPane>
|
||||
```
|
||||
|
||||
Disclaimer: localStorage has a variety of performance trade-offs. Browsers such
|
||||
as Firefox have now optimized localStorage use so that they will asynchronously
|
||||
initiate a read of all saved localStorage data for an origin once they know the
|
||||
page will load. If the data has not fully loaded by the time code accesses
|
||||
localStorage, the code will cause the page's main thread to block until the
|
||||
database load completes. When the main thread is blocked, no other JS code will
|
||||
run or layout will occur. In multiprocess browsers and for users with fast
|
||||
disk storage, this will be less of a problem. You _are_ likely to get yelled at
|
||||
if you use localStorage.
|
||||
|
||||
A potentially better idea is to use something like
|
||||
https://github.com/mozilla/localForage although hooking it up will be slightly
|
||||
more involved. You are likely to be admired by all for judiciously avoiding
|
||||
use of localStorage.
|
||||
|
||||
## Example styling
|
||||
|
||||
This gives a single pixel wide divider, but with a 'grabbable' surface of 11 pixels.
|
||||
|
||||
Thanks to `background-clip: padding-box;` for making transparent borders possible.
|
||||
|
||||
```css
|
||||
.Resizer {
|
||||
background: #000;
|
||||
opacity: 0.2;
|
||||
z-index: 1;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-moz-background-clip: padding;
|
||||
-webkit-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.Resizer:hover {
|
||||
-webkit-transition: all 2s ease;
|
||||
transition: all 2s ease;
|
||||
}
|
||||
|
||||
.Resizer.horizontal {
|
||||
height: 11px;
|
||||
margin: -5px 0;
|
||||
border-top: 5px solid rgba(255, 255, 255, 0);
|
||||
border-bottom: 5px solid rgba(255, 255, 255, 0);
|
||||
cursor: row-resize;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.Resizer.horizontal:hover {
|
||||
border-top: 5px solid rgba(0, 0, 0, 0.5);
|
||||
border-bottom: 5px solid rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.Resizer.vertical {
|
||||
width: 11px;
|
||||
margin: 0 -5px;
|
||||
border-left: 5px solid rgba(255, 255, 255, 0);
|
||||
border-right: 5px solid rgba(255, 255, 255, 0);
|
||||
cursor: col-resize;
|
||||
}
|
||||
|
||||
.Resizer.vertical:hover {
|
||||
border-left: 5px solid rgba(0, 0, 0, 0.5);
|
||||
border-right: 5px solid rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.Resizer.disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.Resizer.disabled:hover {
|
||||
border-color: transparent;
|
||||
}
|
||||
```
|
||||
|
||||
## New Version
|
||||
|
||||
**I'm working on an updated version of this library, and looking for help:**
|
||||
|
||||
Demo
|
||||
|
||||
http://react-split-pane-v2.surge.sh/
|
||||
|
||||
Install
|
||||
|
||||
```sh
|
||||
npm install react-split-pane@next
|
||||
|
||||
# or if you use yarn
|
||||
|
||||
yarn add react-split-pane@next
|
||||
```
|
||||
|
||||
Usage
|
||||
|
||||
```jsx
|
||||
import SplitPane, { Pane } from 'react-split-pane';
|
||||
|
||||
<SplitPane split="vertical">
|
||||
<Pane initialSize="200px">You can use a Pane component</Pane>
|
||||
<div>or you can use a plain old div</div>
|
||||
<Pane initialSize="25%" minSize="10%" maxSize="500px">
|
||||
Using a Pane allows you to specify any constraints directly
|
||||
</Pane>
|
||||
</SplitPane>;
|
||||
```
|
||||
|
||||
Pull request
|
||||
|
||||
https://github.com/tomkp/react-split-pane/pull/240
|
||||
|
||||
More discussion
|
||||
|
||||
https://github.com/tomkp/react-split-pane/issues/233
|
||||
|
||||
## Contributing
|
||||
|
||||
I'm always happy to receive Pull Requests for contributions of any kind.
|
||||
|
||||
Please include tests and/or update the examples if possible.
|
||||
|
||||
Thanks, Tom
|
||||
707
node_modules/react-split-pane/dist/index.cjs.js
generated
vendored
Normal file
707
node_modules/react-split-pane/dist/index.cjs.js
generated
vendored
Normal file
@@ -0,0 +1,707 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var React = _interopDefault(require('react'));
|
||||
var PropTypes = _interopDefault(require('prop-types'));
|
||||
var stylePropType = _interopDefault(require('react-style-proptype'));
|
||||
var reactLifecyclesCompat = require('react-lifecycles-compat');
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function ownKeys(object, enumerableOnly) {
|
||||
var keys = Object.keys(object);
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var symbols = Object.getOwnPropertySymbols(object);
|
||||
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
||||
});
|
||||
keys.push.apply(keys, symbols);
|
||||
}
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
function _objectSpread2(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function _inherits(subClass, superClass) {
|
||||
if (typeof superClass !== "function" && superClass !== null) {
|
||||
throw new TypeError("Super expression must either be null or a function");
|
||||
}
|
||||
|
||||
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||
constructor: {
|
||||
value: subClass,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
if (superClass) _setPrototypeOf(subClass, superClass);
|
||||
}
|
||||
|
||||
function _getPrototypeOf(o) {
|
||||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
||||
return o.__proto__ || Object.getPrototypeOf(o);
|
||||
};
|
||||
return _getPrototypeOf(o);
|
||||
}
|
||||
|
||||
function _setPrototypeOf(o, p) {
|
||||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
||||
o.__proto__ = p;
|
||||
return o;
|
||||
};
|
||||
|
||||
return _setPrototypeOf(o, p);
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct() {
|
||||
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
|
||||
try {
|
||||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function _assertThisInitialized(self) {
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
function _possibleConstructorReturn(self, call) {
|
||||
if (call && (typeof call === "object" || typeof call === "function")) {
|
||||
return call;
|
||||
}
|
||||
|
||||
return _assertThisInitialized(self);
|
||||
}
|
||||
|
||||
function _createSuper(Derived) {
|
||||
return function () {
|
||||
var Super = _getPrototypeOf(Derived),
|
||||
result;
|
||||
|
||||
if (_isNativeReflectConstruct()) {
|
||||
var NewTarget = _getPrototypeOf(this).constructor;
|
||||
|
||||
result = Reflect.construct(Super, arguments, NewTarget);
|
||||
} else {
|
||||
result = Super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return _possibleConstructorReturn(this, result);
|
||||
};
|
||||
}
|
||||
|
||||
var Pane = /*#__PURE__*/function (_React$PureComponent) {
|
||||
_inherits(Pane, _React$PureComponent);
|
||||
|
||||
var _super = _createSuper(Pane);
|
||||
|
||||
function Pane() {
|
||||
_classCallCheck(this, Pane);
|
||||
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Pane, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props = this.props,
|
||||
children = _this$props.children,
|
||||
className = _this$props.className,
|
||||
split = _this$props.split,
|
||||
styleProps = _this$props.style,
|
||||
size = _this$props.size,
|
||||
eleRef = _this$props.eleRef;
|
||||
var classes = ['Pane', split, className];
|
||||
var style = {
|
||||
flex: 1,
|
||||
position: 'relative',
|
||||
outline: 'none'
|
||||
};
|
||||
|
||||
if (size !== undefined) {
|
||||
if (split === 'vertical') {
|
||||
style.width = size;
|
||||
} else {
|
||||
style.height = size;
|
||||
style.display = 'flex';
|
||||
}
|
||||
|
||||
style.flex = 'none';
|
||||
}
|
||||
|
||||
style = Object.assign({}, style, styleProps || {});
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
ref: eleRef,
|
||||
className: classes.join(' '),
|
||||
style: style
|
||||
}, children);
|
||||
}
|
||||
}]);
|
||||
|
||||
return Pane;
|
||||
}(React.PureComponent);
|
||||
|
||||
Pane.propTypes = {
|
||||
className: PropTypes.string.isRequired,
|
||||
children: PropTypes.node.isRequired,
|
||||
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
split: PropTypes.oneOf(['vertical', 'horizontal']),
|
||||
style: stylePropType,
|
||||
eleRef: PropTypes.func
|
||||
};
|
||||
Pane.defaultProps = {};
|
||||
|
||||
var RESIZER_DEFAULT_CLASSNAME = 'Resizer';
|
||||
|
||||
var Resizer = /*#__PURE__*/function (_React$Component) {
|
||||
_inherits(Resizer, _React$Component);
|
||||
|
||||
var _super = _createSuper(Resizer);
|
||||
|
||||
function Resizer() {
|
||||
_classCallCheck(this, Resizer);
|
||||
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Resizer, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props = this.props,
|
||||
className = _this$props.className,
|
||||
_onClick = _this$props.onClick,
|
||||
_onDoubleClick = _this$props.onDoubleClick,
|
||||
_onMouseDown = _this$props.onMouseDown,
|
||||
_onTouchEnd = _this$props.onTouchEnd,
|
||||
_onTouchStart = _this$props.onTouchStart,
|
||||
resizerClassName = _this$props.resizerClassName,
|
||||
split = _this$props.split,
|
||||
style = _this$props.style;
|
||||
var classes = [resizerClassName, split, className];
|
||||
return /*#__PURE__*/React.createElement("span", {
|
||||
role: "presentation",
|
||||
className: classes.join(' '),
|
||||
style: style,
|
||||
onMouseDown: function onMouseDown(event) {
|
||||
return _onMouseDown(event);
|
||||
},
|
||||
onTouchStart: function onTouchStart(event) {
|
||||
event.preventDefault();
|
||||
|
||||
_onTouchStart(event);
|
||||
},
|
||||
onTouchEnd: function onTouchEnd(event) {
|
||||
event.preventDefault();
|
||||
|
||||
_onTouchEnd(event);
|
||||
},
|
||||
onClick: function onClick(event) {
|
||||
if (_onClick) {
|
||||
event.preventDefault();
|
||||
|
||||
_onClick(event);
|
||||
}
|
||||
},
|
||||
onDoubleClick: function onDoubleClick(event) {
|
||||
if (_onDoubleClick) {
|
||||
event.preventDefault();
|
||||
|
||||
_onDoubleClick(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}]);
|
||||
|
||||
return Resizer;
|
||||
}(React.Component);
|
||||
|
||||
Resizer.propTypes = {
|
||||
className: PropTypes.string.isRequired,
|
||||
onClick: PropTypes.func,
|
||||
onDoubleClick: PropTypes.func,
|
||||
onMouseDown: PropTypes.func.isRequired,
|
||||
onTouchStart: PropTypes.func.isRequired,
|
||||
onTouchEnd: PropTypes.func.isRequired,
|
||||
split: PropTypes.oneOf(['vertical', 'horizontal']),
|
||||
style: stylePropType,
|
||||
resizerClassName: PropTypes.string.isRequired
|
||||
};
|
||||
Resizer.defaultProps = {
|
||||
resizerClassName: RESIZER_DEFAULT_CLASSNAME
|
||||
};
|
||||
|
||||
function unFocus(document, window) {
|
||||
if (document.selection) {
|
||||
document.selection.empty();
|
||||
} else {
|
||||
try {
|
||||
window.getSelection().removeAllRanges(); // eslint-disable-next-line no-empty
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
function getDefaultSize(defaultSize, minSize, maxSize, draggedSize) {
|
||||
if (typeof draggedSize === 'number') {
|
||||
var min = typeof minSize === 'number' ? minSize : 0;
|
||||
var max = typeof maxSize === 'number' && maxSize >= 0 ? maxSize : Infinity;
|
||||
return Math.max(min, Math.min(max, draggedSize));
|
||||
}
|
||||
|
||||
if (defaultSize !== undefined) {
|
||||
return defaultSize;
|
||||
}
|
||||
|
||||
return minSize;
|
||||
}
|
||||
|
||||
function removeNullChildren(children) {
|
||||
return React.Children.toArray(children).filter(function (c) {
|
||||
return c;
|
||||
});
|
||||
}
|
||||
|
||||
var SplitPane = /*#__PURE__*/function (_React$Component) {
|
||||
_inherits(SplitPane, _React$Component);
|
||||
|
||||
var _super = _createSuper(SplitPane);
|
||||
|
||||
function SplitPane(props) {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, SplitPane);
|
||||
|
||||
_this = _super.call(this, props);
|
||||
_this.onMouseDown = _this.onMouseDown.bind(_assertThisInitialized(_this));
|
||||
_this.onTouchStart = _this.onTouchStart.bind(_assertThisInitialized(_this));
|
||||
_this.onMouseMove = _this.onMouseMove.bind(_assertThisInitialized(_this));
|
||||
_this.onTouchMove = _this.onTouchMove.bind(_assertThisInitialized(_this));
|
||||
_this.onMouseUp = _this.onMouseUp.bind(_assertThisInitialized(_this)); // order of setting panel sizes.
|
||||
// 1. size
|
||||
// 2. getDefaultSize(defaultSize, minsize, maxSize)
|
||||
|
||||
var size = props.size,
|
||||
defaultSize = props.defaultSize,
|
||||
minSize = props.minSize,
|
||||
maxSize = props.maxSize,
|
||||
primary = props.primary;
|
||||
var initialSize = size !== undefined ? size : getDefaultSize(defaultSize, minSize, maxSize, null);
|
||||
_this.state = {
|
||||
active: false,
|
||||
resized: false,
|
||||
pane1Size: primary === 'first' ? initialSize : undefined,
|
||||
pane2Size: primary === 'second' ? initialSize : undefined,
|
||||
// these are props that are needed in static functions. ie: gDSFP
|
||||
instanceProps: {
|
||||
size: size
|
||||
}
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(SplitPane, [{
|
||||
key: "componentDidMount",
|
||||
value: function componentDidMount() {
|
||||
document.addEventListener('mouseup', this.onMouseUp);
|
||||
document.addEventListener('mousemove', this.onMouseMove);
|
||||
document.addEventListener('touchmove', this.onTouchMove);
|
||||
this.setState(SplitPane.getSizeUpdate(this.props, this.state));
|
||||
}
|
||||
}, {
|
||||
key: "componentWillUnmount",
|
||||
value: function componentWillUnmount() {
|
||||
document.removeEventListener('mouseup', this.onMouseUp);
|
||||
document.removeEventListener('mousemove', this.onMouseMove);
|
||||
document.removeEventListener('touchmove', this.onTouchMove);
|
||||
}
|
||||
}, {
|
||||
key: "onMouseDown",
|
||||
value: function onMouseDown(event) {
|
||||
var eventWithTouches = Object.assign({}, event, {
|
||||
touches: [{
|
||||
clientX: event.clientX,
|
||||
clientY: event.clientY
|
||||
}]
|
||||
});
|
||||
this.onTouchStart(eventWithTouches);
|
||||
}
|
||||
}, {
|
||||
key: "onTouchStart",
|
||||
value: function onTouchStart(event) {
|
||||
var _this$props = this.props,
|
||||
allowResize = _this$props.allowResize,
|
||||
onDragStarted = _this$props.onDragStarted,
|
||||
split = _this$props.split;
|
||||
|
||||
if (allowResize) {
|
||||
unFocus(document, window);
|
||||
var position = split === 'vertical' ? event.touches[0].clientX : event.touches[0].clientY;
|
||||
|
||||
if (typeof onDragStarted === 'function') {
|
||||
onDragStarted();
|
||||
}
|
||||
|
||||
this.setState({
|
||||
active: true,
|
||||
position: position
|
||||
});
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "onMouseMove",
|
||||
value: function onMouseMove(event) {
|
||||
var eventWithTouches = Object.assign({}, event, {
|
||||
touches: [{
|
||||
clientX: event.clientX,
|
||||
clientY: event.clientY
|
||||
}]
|
||||
});
|
||||
this.onTouchMove(eventWithTouches);
|
||||
}
|
||||
}, {
|
||||
key: "onTouchMove",
|
||||
value: function onTouchMove(event) {
|
||||
var _this$props2 = this.props,
|
||||
allowResize = _this$props2.allowResize,
|
||||
maxSize = _this$props2.maxSize,
|
||||
minSize = _this$props2.minSize,
|
||||
onChange = _this$props2.onChange,
|
||||
split = _this$props2.split,
|
||||
step = _this$props2.step;
|
||||
var _this$state = this.state,
|
||||
active = _this$state.active,
|
||||
position = _this$state.position;
|
||||
|
||||
if (allowResize && active) {
|
||||
unFocus(document, window);
|
||||
var isPrimaryFirst = this.props.primary === 'first';
|
||||
var ref = isPrimaryFirst ? this.pane1 : this.pane2;
|
||||
var ref2 = isPrimaryFirst ? this.pane2 : this.pane1;
|
||||
|
||||
if (ref) {
|
||||
var node = ref;
|
||||
var node2 = ref2;
|
||||
|
||||
if (node.getBoundingClientRect) {
|
||||
var width = node.getBoundingClientRect().width;
|
||||
var height = node.getBoundingClientRect().height;
|
||||
var current = split === 'vertical' ? event.touches[0].clientX : event.touches[0].clientY;
|
||||
var size = split === 'vertical' ? width : height;
|
||||
var positionDelta = position - current;
|
||||
|
||||
if (step) {
|
||||
if (Math.abs(positionDelta) < step) {
|
||||
return;
|
||||
} // Integer division
|
||||
// eslint-disable-next-line no-bitwise
|
||||
|
||||
|
||||
positionDelta = ~~(positionDelta / step) * step;
|
||||
}
|
||||
|
||||
var sizeDelta = isPrimaryFirst ? positionDelta : -positionDelta;
|
||||
var pane1Order = parseInt(window.getComputedStyle(node).order);
|
||||
var pane2Order = parseInt(window.getComputedStyle(node2).order);
|
||||
|
||||
if (pane1Order > pane2Order) {
|
||||
sizeDelta = -sizeDelta;
|
||||
}
|
||||
|
||||
var newMaxSize = maxSize;
|
||||
|
||||
if (maxSize !== undefined && maxSize <= 0) {
|
||||
var splitPane = this.splitPane;
|
||||
|
||||
if (split === 'vertical') {
|
||||
newMaxSize = splitPane.getBoundingClientRect().width + maxSize;
|
||||
} else {
|
||||
newMaxSize = splitPane.getBoundingClientRect().height + maxSize;
|
||||
}
|
||||
}
|
||||
|
||||
var newSize = size - sizeDelta;
|
||||
var newPosition = position - positionDelta;
|
||||
|
||||
if (newSize < minSize) {
|
||||
newSize = minSize;
|
||||
} else if (maxSize !== undefined && newSize > newMaxSize) {
|
||||
newSize = newMaxSize;
|
||||
} else {
|
||||
this.setState({
|
||||
position: newPosition,
|
||||
resized: true
|
||||
});
|
||||
}
|
||||
|
||||
if (onChange) onChange(newSize);
|
||||
this.setState(_defineProperty({
|
||||
draggedSize: newSize
|
||||
}, isPrimaryFirst ? 'pane1Size' : 'pane2Size', newSize));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "onMouseUp",
|
||||
value: function onMouseUp() {
|
||||
var _this$props3 = this.props,
|
||||
allowResize = _this$props3.allowResize,
|
||||
onDragFinished = _this$props3.onDragFinished;
|
||||
var _this$state2 = this.state,
|
||||
active = _this$state2.active,
|
||||
draggedSize = _this$state2.draggedSize;
|
||||
|
||||
if (allowResize && active) {
|
||||
if (typeof onDragFinished === 'function') {
|
||||
onDragFinished(draggedSize);
|
||||
}
|
||||
|
||||
this.setState({
|
||||
active: false
|
||||
});
|
||||
}
|
||||
} // we have to check values since gDSFP is called on every render and more in StrictMode
|
||||
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this2 = this;
|
||||
|
||||
var _this$props4 = this.props,
|
||||
allowResize = _this$props4.allowResize,
|
||||
children = _this$props4.children,
|
||||
className = _this$props4.className,
|
||||
onResizerClick = _this$props4.onResizerClick,
|
||||
onResizerDoubleClick = _this$props4.onResizerDoubleClick,
|
||||
paneClassName = _this$props4.paneClassName,
|
||||
pane1ClassName = _this$props4.pane1ClassName,
|
||||
pane2ClassName = _this$props4.pane2ClassName,
|
||||
paneStyle = _this$props4.paneStyle,
|
||||
pane1StyleProps = _this$props4.pane1Style,
|
||||
pane2StyleProps = _this$props4.pane2Style,
|
||||
resizerClassName = _this$props4.resizerClassName,
|
||||
resizerStyle = _this$props4.resizerStyle,
|
||||
split = _this$props4.split,
|
||||
styleProps = _this$props4.style;
|
||||
var _this$state3 = this.state,
|
||||
pane1Size = _this$state3.pane1Size,
|
||||
pane2Size = _this$state3.pane2Size;
|
||||
var disabledClass = allowResize ? '' : 'disabled';
|
||||
var resizerClassNamesIncludingDefault = resizerClassName ? "".concat(resizerClassName, " ").concat(RESIZER_DEFAULT_CLASSNAME) : resizerClassName;
|
||||
var notNullChildren = removeNullChildren(children);
|
||||
|
||||
var style = _objectSpread2({
|
||||
display: 'flex',
|
||||
flex: 1,
|
||||
height: '100%',
|
||||
position: 'absolute',
|
||||
outline: 'none',
|
||||
overflow: 'hidden',
|
||||
MozUserSelect: 'text',
|
||||
WebkitUserSelect: 'text',
|
||||
msUserSelect: 'text',
|
||||
userSelect: 'text'
|
||||
}, styleProps);
|
||||
|
||||
if (split === 'vertical') {
|
||||
Object.assign(style, {
|
||||
flexDirection: 'row',
|
||||
left: 0,
|
||||
right: 0
|
||||
});
|
||||
} else {
|
||||
Object.assign(style, {
|
||||
bottom: 0,
|
||||
flexDirection: 'column',
|
||||
minHeight: '100%',
|
||||
top: 0,
|
||||
width: '100%'
|
||||
});
|
||||
}
|
||||
|
||||
var classes = ['SplitPane', className, split, disabledClass];
|
||||
|
||||
var pane1Style = _objectSpread2({}, paneStyle, {}, pane1StyleProps);
|
||||
|
||||
var pane2Style = _objectSpread2({}, paneStyle, {}, pane2StyleProps);
|
||||
|
||||
var pane1Classes = ['Pane1', paneClassName, pane1ClassName].join(' ');
|
||||
var pane2Classes = ['Pane2', paneClassName, pane2ClassName].join(' ');
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: classes.join(' '),
|
||||
ref: function ref(node) {
|
||||
_this2.splitPane = node;
|
||||
},
|
||||
style: style
|
||||
}, /*#__PURE__*/React.createElement(Pane, {
|
||||
className: pane1Classes,
|
||||
key: "pane1",
|
||||
eleRef: function eleRef(node) {
|
||||
_this2.pane1 = node;
|
||||
},
|
||||
size: pane1Size,
|
||||
split: split,
|
||||
style: pane1Style
|
||||
}, notNullChildren[0]), /*#__PURE__*/React.createElement(Resizer, {
|
||||
className: disabledClass,
|
||||
onClick: onResizerClick,
|
||||
onDoubleClick: onResizerDoubleClick,
|
||||
onMouseDown: this.onMouseDown,
|
||||
onTouchStart: this.onTouchStart,
|
||||
onTouchEnd: this.onMouseUp,
|
||||
key: "resizer",
|
||||
resizerClassName: resizerClassNamesIncludingDefault,
|
||||
split: split,
|
||||
style: resizerStyle || {}
|
||||
}), /*#__PURE__*/React.createElement(Pane, {
|
||||
className: pane2Classes,
|
||||
key: "pane2",
|
||||
eleRef: function eleRef(node) {
|
||||
_this2.pane2 = node;
|
||||
},
|
||||
size: pane2Size,
|
||||
split: split,
|
||||
style: pane2Style
|
||||
}, notNullChildren[1]));
|
||||
}
|
||||
}], [{
|
||||
key: "getDerivedStateFromProps",
|
||||
value: function getDerivedStateFromProps(nextProps, prevState) {
|
||||
return SplitPane.getSizeUpdate(nextProps, prevState);
|
||||
}
|
||||
}, {
|
||||
key: "getSizeUpdate",
|
||||
value: function getSizeUpdate(props, state) {
|
||||
var newState = {};
|
||||
var instanceProps = state.instanceProps;
|
||||
|
||||
if (instanceProps.size === props.size && props.size !== undefined) {
|
||||
return {};
|
||||
}
|
||||
|
||||
var newSize = props.size !== undefined ? props.size : getDefaultSize(props.defaultSize, props.minSize, props.maxSize, state.draggedSize);
|
||||
|
||||
if (props.size !== undefined) {
|
||||
newState.draggedSize = newSize;
|
||||
}
|
||||
|
||||
var isPanel1Primary = props.primary === 'first';
|
||||
newState[isPanel1Primary ? 'pane1Size' : 'pane2Size'] = newSize;
|
||||
newState[isPanel1Primary ? 'pane2Size' : 'pane1Size'] = undefined;
|
||||
newState.instanceProps = {
|
||||
size: props.size
|
||||
};
|
||||
return newState;
|
||||
}
|
||||
}]);
|
||||
|
||||
return SplitPane;
|
||||
}(React.Component);
|
||||
|
||||
SplitPane.propTypes = {
|
||||
allowResize: PropTypes.bool,
|
||||
children: PropTypes.arrayOf(PropTypes.node).isRequired,
|
||||
className: PropTypes.string,
|
||||
primary: PropTypes.oneOf(['first', 'second']),
|
||||
minSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
maxSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
// eslint-disable-next-line react/no-unused-prop-types
|
||||
defaultSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
split: PropTypes.oneOf(['vertical', 'horizontal']),
|
||||
onDragStarted: PropTypes.func,
|
||||
onDragFinished: PropTypes.func,
|
||||
onChange: PropTypes.func,
|
||||
onResizerClick: PropTypes.func,
|
||||
onResizerDoubleClick: PropTypes.func,
|
||||
style: stylePropType,
|
||||
resizerStyle: stylePropType,
|
||||
paneClassName: PropTypes.string,
|
||||
pane1ClassName: PropTypes.string,
|
||||
pane2ClassName: PropTypes.string,
|
||||
paneStyle: stylePropType,
|
||||
pane1Style: stylePropType,
|
||||
pane2Style: stylePropType,
|
||||
resizerClassName: PropTypes.string,
|
||||
step: PropTypes.number
|
||||
};
|
||||
SplitPane.defaultProps = {
|
||||
allowResize: true,
|
||||
minSize: 50,
|
||||
primary: 'first',
|
||||
split: 'vertical',
|
||||
paneClassName: '',
|
||||
pane1ClassName: '',
|
||||
pane2ClassName: ''
|
||||
};
|
||||
reactLifecyclesCompat.polyfill(SplitPane);
|
||||
|
||||
exports.Pane = Pane;
|
||||
exports.default = SplitPane;
|
||||
701
node_modules/react-split-pane/dist/index.esm.js
generated
vendored
Normal file
701
node_modules/react-split-pane/dist/index.esm.js
generated
vendored
Normal file
@@ -0,0 +1,701 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import stylePropType from 'react-style-proptype';
|
||||
import { polyfill } from 'react-lifecycles-compat';
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function ownKeys(object, enumerableOnly) {
|
||||
var keys = Object.keys(object);
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var symbols = Object.getOwnPropertySymbols(object);
|
||||
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
||||
});
|
||||
keys.push.apply(keys, symbols);
|
||||
}
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
function _objectSpread2(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function _inherits(subClass, superClass) {
|
||||
if (typeof superClass !== "function" && superClass !== null) {
|
||||
throw new TypeError("Super expression must either be null or a function");
|
||||
}
|
||||
|
||||
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||
constructor: {
|
||||
value: subClass,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
if (superClass) _setPrototypeOf(subClass, superClass);
|
||||
}
|
||||
|
||||
function _getPrototypeOf(o) {
|
||||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
||||
return o.__proto__ || Object.getPrototypeOf(o);
|
||||
};
|
||||
return _getPrototypeOf(o);
|
||||
}
|
||||
|
||||
function _setPrototypeOf(o, p) {
|
||||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
||||
o.__proto__ = p;
|
||||
return o;
|
||||
};
|
||||
|
||||
return _setPrototypeOf(o, p);
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct() {
|
||||
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
|
||||
try {
|
||||
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function _assertThisInitialized(self) {
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
function _possibleConstructorReturn(self, call) {
|
||||
if (call && (typeof call === "object" || typeof call === "function")) {
|
||||
return call;
|
||||
}
|
||||
|
||||
return _assertThisInitialized(self);
|
||||
}
|
||||
|
||||
function _createSuper(Derived) {
|
||||
return function () {
|
||||
var Super = _getPrototypeOf(Derived),
|
||||
result;
|
||||
|
||||
if (_isNativeReflectConstruct()) {
|
||||
var NewTarget = _getPrototypeOf(this).constructor;
|
||||
|
||||
result = Reflect.construct(Super, arguments, NewTarget);
|
||||
} else {
|
||||
result = Super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return _possibleConstructorReturn(this, result);
|
||||
};
|
||||
}
|
||||
|
||||
var Pane = /*#__PURE__*/function (_React$PureComponent) {
|
||||
_inherits(Pane, _React$PureComponent);
|
||||
|
||||
var _super = _createSuper(Pane);
|
||||
|
||||
function Pane() {
|
||||
_classCallCheck(this, Pane);
|
||||
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Pane, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props = this.props,
|
||||
children = _this$props.children,
|
||||
className = _this$props.className,
|
||||
split = _this$props.split,
|
||||
styleProps = _this$props.style,
|
||||
size = _this$props.size,
|
||||
eleRef = _this$props.eleRef;
|
||||
var classes = ['Pane', split, className];
|
||||
var style = {
|
||||
flex: 1,
|
||||
position: 'relative',
|
||||
outline: 'none'
|
||||
};
|
||||
|
||||
if (size !== undefined) {
|
||||
if (split === 'vertical') {
|
||||
style.width = size;
|
||||
} else {
|
||||
style.height = size;
|
||||
style.display = 'flex';
|
||||
}
|
||||
|
||||
style.flex = 'none';
|
||||
}
|
||||
|
||||
style = Object.assign({}, style, styleProps || {});
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
ref: eleRef,
|
||||
className: classes.join(' '),
|
||||
style: style
|
||||
}, children);
|
||||
}
|
||||
}]);
|
||||
|
||||
return Pane;
|
||||
}(React.PureComponent);
|
||||
|
||||
Pane.propTypes = {
|
||||
className: PropTypes.string.isRequired,
|
||||
children: PropTypes.node.isRequired,
|
||||
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
split: PropTypes.oneOf(['vertical', 'horizontal']),
|
||||
style: stylePropType,
|
||||
eleRef: PropTypes.func
|
||||
};
|
||||
Pane.defaultProps = {};
|
||||
|
||||
var RESIZER_DEFAULT_CLASSNAME = 'Resizer';
|
||||
|
||||
var Resizer = /*#__PURE__*/function (_React$Component) {
|
||||
_inherits(Resizer, _React$Component);
|
||||
|
||||
var _super = _createSuper(Resizer);
|
||||
|
||||
function Resizer() {
|
||||
_classCallCheck(this, Resizer);
|
||||
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Resizer, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props = this.props,
|
||||
className = _this$props.className,
|
||||
_onClick = _this$props.onClick,
|
||||
_onDoubleClick = _this$props.onDoubleClick,
|
||||
_onMouseDown = _this$props.onMouseDown,
|
||||
_onTouchEnd = _this$props.onTouchEnd,
|
||||
_onTouchStart = _this$props.onTouchStart,
|
||||
resizerClassName = _this$props.resizerClassName,
|
||||
split = _this$props.split,
|
||||
style = _this$props.style;
|
||||
var classes = [resizerClassName, split, className];
|
||||
return /*#__PURE__*/React.createElement("span", {
|
||||
role: "presentation",
|
||||
className: classes.join(' '),
|
||||
style: style,
|
||||
onMouseDown: function onMouseDown(event) {
|
||||
return _onMouseDown(event);
|
||||
},
|
||||
onTouchStart: function onTouchStart(event) {
|
||||
event.preventDefault();
|
||||
|
||||
_onTouchStart(event);
|
||||
},
|
||||
onTouchEnd: function onTouchEnd(event) {
|
||||
event.preventDefault();
|
||||
|
||||
_onTouchEnd(event);
|
||||
},
|
||||
onClick: function onClick(event) {
|
||||
if (_onClick) {
|
||||
event.preventDefault();
|
||||
|
||||
_onClick(event);
|
||||
}
|
||||
},
|
||||
onDoubleClick: function onDoubleClick(event) {
|
||||
if (_onDoubleClick) {
|
||||
event.preventDefault();
|
||||
|
||||
_onDoubleClick(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}]);
|
||||
|
||||
return Resizer;
|
||||
}(React.Component);
|
||||
|
||||
Resizer.propTypes = {
|
||||
className: PropTypes.string.isRequired,
|
||||
onClick: PropTypes.func,
|
||||
onDoubleClick: PropTypes.func,
|
||||
onMouseDown: PropTypes.func.isRequired,
|
||||
onTouchStart: PropTypes.func.isRequired,
|
||||
onTouchEnd: PropTypes.func.isRequired,
|
||||
split: PropTypes.oneOf(['vertical', 'horizontal']),
|
||||
style: stylePropType,
|
||||
resizerClassName: PropTypes.string.isRequired
|
||||
};
|
||||
Resizer.defaultProps = {
|
||||
resizerClassName: RESIZER_DEFAULT_CLASSNAME
|
||||
};
|
||||
|
||||
function unFocus(document, window) {
|
||||
if (document.selection) {
|
||||
document.selection.empty();
|
||||
} else {
|
||||
try {
|
||||
window.getSelection().removeAllRanges(); // eslint-disable-next-line no-empty
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
function getDefaultSize(defaultSize, minSize, maxSize, draggedSize) {
|
||||
if (typeof draggedSize === 'number') {
|
||||
var min = typeof minSize === 'number' ? minSize : 0;
|
||||
var max = typeof maxSize === 'number' && maxSize >= 0 ? maxSize : Infinity;
|
||||
return Math.max(min, Math.min(max, draggedSize));
|
||||
}
|
||||
|
||||
if (defaultSize !== undefined) {
|
||||
return defaultSize;
|
||||
}
|
||||
|
||||
return minSize;
|
||||
}
|
||||
|
||||
function removeNullChildren(children) {
|
||||
return React.Children.toArray(children).filter(function (c) {
|
||||
return c;
|
||||
});
|
||||
}
|
||||
|
||||
var SplitPane = /*#__PURE__*/function (_React$Component) {
|
||||
_inherits(SplitPane, _React$Component);
|
||||
|
||||
var _super = _createSuper(SplitPane);
|
||||
|
||||
function SplitPane(props) {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, SplitPane);
|
||||
|
||||
_this = _super.call(this, props);
|
||||
_this.onMouseDown = _this.onMouseDown.bind(_assertThisInitialized(_this));
|
||||
_this.onTouchStart = _this.onTouchStart.bind(_assertThisInitialized(_this));
|
||||
_this.onMouseMove = _this.onMouseMove.bind(_assertThisInitialized(_this));
|
||||
_this.onTouchMove = _this.onTouchMove.bind(_assertThisInitialized(_this));
|
||||
_this.onMouseUp = _this.onMouseUp.bind(_assertThisInitialized(_this)); // order of setting panel sizes.
|
||||
// 1. size
|
||||
// 2. getDefaultSize(defaultSize, minsize, maxSize)
|
||||
|
||||
var size = props.size,
|
||||
defaultSize = props.defaultSize,
|
||||
minSize = props.minSize,
|
||||
maxSize = props.maxSize,
|
||||
primary = props.primary;
|
||||
var initialSize = size !== undefined ? size : getDefaultSize(defaultSize, minSize, maxSize, null);
|
||||
_this.state = {
|
||||
active: false,
|
||||
resized: false,
|
||||
pane1Size: primary === 'first' ? initialSize : undefined,
|
||||
pane2Size: primary === 'second' ? initialSize : undefined,
|
||||
// these are props that are needed in static functions. ie: gDSFP
|
||||
instanceProps: {
|
||||
size: size
|
||||
}
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(SplitPane, [{
|
||||
key: "componentDidMount",
|
||||
value: function componentDidMount() {
|
||||
document.addEventListener('mouseup', this.onMouseUp);
|
||||
document.addEventListener('mousemove', this.onMouseMove);
|
||||
document.addEventListener('touchmove', this.onTouchMove);
|
||||
this.setState(SplitPane.getSizeUpdate(this.props, this.state));
|
||||
}
|
||||
}, {
|
||||
key: "componentWillUnmount",
|
||||
value: function componentWillUnmount() {
|
||||
document.removeEventListener('mouseup', this.onMouseUp);
|
||||
document.removeEventListener('mousemove', this.onMouseMove);
|
||||
document.removeEventListener('touchmove', this.onTouchMove);
|
||||
}
|
||||
}, {
|
||||
key: "onMouseDown",
|
||||
value: function onMouseDown(event) {
|
||||
var eventWithTouches = Object.assign({}, event, {
|
||||
touches: [{
|
||||
clientX: event.clientX,
|
||||
clientY: event.clientY
|
||||
}]
|
||||
});
|
||||
this.onTouchStart(eventWithTouches);
|
||||
}
|
||||
}, {
|
||||
key: "onTouchStart",
|
||||
value: function onTouchStart(event) {
|
||||
var _this$props = this.props,
|
||||
allowResize = _this$props.allowResize,
|
||||
onDragStarted = _this$props.onDragStarted,
|
||||
split = _this$props.split;
|
||||
|
||||
if (allowResize) {
|
||||
unFocus(document, window);
|
||||
var position = split === 'vertical' ? event.touches[0].clientX : event.touches[0].clientY;
|
||||
|
||||
if (typeof onDragStarted === 'function') {
|
||||
onDragStarted();
|
||||
}
|
||||
|
||||
this.setState({
|
||||
active: true,
|
||||
position: position
|
||||
});
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "onMouseMove",
|
||||
value: function onMouseMove(event) {
|
||||
var eventWithTouches = Object.assign({}, event, {
|
||||
touches: [{
|
||||
clientX: event.clientX,
|
||||
clientY: event.clientY
|
||||
}]
|
||||
});
|
||||
this.onTouchMove(eventWithTouches);
|
||||
}
|
||||
}, {
|
||||
key: "onTouchMove",
|
||||
value: function onTouchMove(event) {
|
||||
var _this$props2 = this.props,
|
||||
allowResize = _this$props2.allowResize,
|
||||
maxSize = _this$props2.maxSize,
|
||||
minSize = _this$props2.minSize,
|
||||
onChange = _this$props2.onChange,
|
||||
split = _this$props2.split,
|
||||
step = _this$props2.step;
|
||||
var _this$state = this.state,
|
||||
active = _this$state.active,
|
||||
position = _this$state.position;
|
||||
|
||||
if (allowResize && active) {
|
||||
unFocus(document, window);
|
||||
var isPrimaryFirst = this.props.primary === 'first';
|
||||
var ref = isPrimaryFirst ? this.pane1 : this.pane2;
|
||||
var ref2 = isPrimaryFirst ? this.pane2 : this.pane1;
|
||||
|
||||
if (ref) {
|
||||
var node = ref;
|
||||
var node2 = ref2;
|
||||
|
||||
if (node.getBoundingClientRect) {
|
||||
var width = node.getBoundingClientRect().width;
|
||||
var height = node.getBoundingClientRect().height;
|
||||
var current = split === 'vertical' ? event.touches[0].clientX : event.touches[0].clientY;
|
||||
var size = split === 'vertical' ? width : height;
|
||||
var positionDelta = position - current;
|
||||
|
||||
if (step) {
|
||||
if (Math.abs(positionDelta) < step) {
|
||||
return;
|
||||
} // Integer division
|
||||
// eslint-disable-next-line no-bitwise
|
||||
|
||||
|
||||
positionDelta = ~~(positionDelta / step) * step;
|
||||
}
|
||||
|
||||
var sizeDelta = isPrimaryFirst ? positionDelta : -positionDelta;
|
||||
var pane1Order = parseInt(window.getComputedStyle(node).order);
|
||||
var pane2Order = parseInt(window.getComputedStyle(node2).order);
|
||||
|
||||
if (pane1Order > pane2Order) {
|
||||
sizeDelta = -sizeDelta;
|
||||
}
|
||||
|
||||
var newMaxSize = maxSize;
|
||||
|
||||
if (maxSize !== undefined && maxSize <= 0) {
|
||||
var splitPane = this.splitPane;
|
||||
|
||||
if (split === 'vertical') {
|
||||
newMaxSize = splitPane.getBoundingClientRect().width + maxSize;
|
||||
} else {
|
||||
newMaxSize = splitPane.getBoundingClientRect().height + maxSize;
|
||||
}
|
||||
}
|
||||
|
||||
var newSize = size - sizeDelta;
|
||||
var newPosition = position - positionDelta;
|
||||
|
||||
if (newSize < minSize) {
|
||||
newSize = minSize;
|
||||
} else if (maxSize !== undefined && newSize > newMaxSize) {
|
||||
newSize = newMaxSize;
|
||||
} else {
|
||||
this.setState({
|
||||
position: newPosition,
|
||||
resized: true
|
||||
});
|
||||
}
|
||||
|
||||
if (onChange) onChange(newSize);
|
||||
this.setState(_defineProperty({
|
||||
draggedSize: newSize
|
||||
}, isPrimaryFirst ? 'pane1Size' : 'pane2Size', newSize));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "onMouseUp",
|
||||
value: function onMouseUp() {
|
||||
var _this$props3 = this.props,
|
||||
allowResize = _this$props3.allowResize,
|
||||
onDragFinished = _this$props3.onDragFinished;
|
||||
var _this$state2 = this.state,
|
||||
active = _this$state2.active,
|
||||
draggedSize = _this$state2.draggedSize;
|
||||
|
||||
if (allowResize && active) {
|
||||
if (typeof onDragFinished === 'function') {
|
||||
onDragFinished(draggedSize);
|
||||
}
|
||||
|
||||
this.setState({
|
||||
active: false
|
||||
});
|
||||
}
|
||||
} // we have to check values since gDSFP is called on every render and more in StrictMode
|
||||
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this2 = this;
|
||||
|
||||
var _this$props4 = this.props,
|
||||
allowResize = _this$props4.allowResize,
|
||||
children = _this$props4.children,
|
||||
className = _this$props4.className,
|
||||
onResizerClick = _this$props4.onResizerClick,
|
||||
onResizerDoubleClick = _this$props4.onResizerDoubleClick,
|
||||
paneClassName = _this$props4.paneClassName,
|
||||
pane1ClassName = _this$props4.pane1ClassName,
|
||||
pane2ClassName = _this$props4.pane2ClassName,
|
||||
paneStyle = _this$props4.paneStyle,
|
||||
pane1StyleProps = _this$props4.pane1Style,
|
||||
pane2StyleProps = _this$props4.pane2Style,
|
||||
resizerClassName = _this$props4.resizerClassName,
|
||||
resizerStyle = _this$props4.resizerStyle,
|
||||
split = _this$props4.split,
|
||||
styleProps = _this$props4.style;
|
||||
var _this$state3 = this.state,
|
||||
pane1Size = _this$state3.pane1Size,
|
||||
pane2Size = _this$state3.pane2Size;
|
||||
var disabledClass = allowResize ? '' : 'disabled';
|
||||
var resizerClassNamesIncludingDefault = resizerClassName ? "".concat(resizerClassName, " ").concat(RESIZER_DEFAULT_CLASSNAME) : resizerClassName;
|
||||
var notNullChildren = removeNullChildren(children);
|
||||
|
||||
var style = _objectSpread2({
|
||||
display: 'flex',
|
||||
flex: 1,
|
||||
height: '100%',
|
||||
position: 'absolute',
|
||||
outline: 'none',
|
||||
overflow: 'hidden',
|
||||
MozUserSelect: 'text',
|
||||
WebkitUserSelect: 'text',
|
||||
msUserSelect: 'text',
|
||||
userSelect: 'text'
|
||||
}, styleProps);
|
||||
|
||||
if (split === 'vertical') {
|
||||
Object.assign(style, {
|
||||
flexDirection: 'row',
|
||||
left: 0,
|
||||
right: 0
|
||||
});
|
||||
} else {
|
||||
Object.assign(style, {
|
||||
bottom: 0,
|
||||
flexDirection: 'column',
|
||||
minHeight: '100%',
|
||||
top: 0,
|
||||
width: '100%'
|
||||
});
|
||||
}
|
||||
|
||||
var classes = ['SplitPane', className, split, disabledClass];
|
||||
|
||||
var pane1Style = _objectSpread2({}, paneStyle, {}, pane1StyleProps);
|
||||
|
||||
var pane2Style = _objectSpread2({}, paneStyle, {}, pane2StyleProps);
|
||||
|
||||
var pane1Classes = ['Pane1', paneClassName, pane1ClassName].join(' ');
|
||||
var pane2Classes = ['Pane2', paneClassName, pane2ClassName].join(' ');
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: classes.join(' '),
|
||||
ref: function ref(node) {
|
||||
_this2.splitPane = node;
|
||||
},
|
||||
style: style
|
||||
}, /*#__PURE__*/React.createElement(Pane, {
|
||||
className: pane1Classes,
|
||||
key: "pane1",
|
||||
eleRef: function eleRef(node) {
|
||||
_this2.pane1 = node;
|
||||
},
|
||||
size: pane1Size,
|
||||
split: split,
|
||||
style: pane1Style
|
||||
}, notNullChildren[0]), /*#__PURE__*/React.createElement(Resizer, {
|
||||
className: disabledClass,
|
||||
onClick: onResizerClick,
|
||||
onDoubleClick: onResizerDoubleClick,
|
||||
onMouseDown: this.onMouseDown,
|
||||
onTouchStart: this.onTouchStart,
|
||||
onTouchEnd: this.onMouseUp,
|
||||
key: "resizer",
|
||||
resizerClassName: resizerClassNamesIncludingDefault,
|
||||
split: split,
|
||||
style: resizerStyle || {}
|
||||
}), /*#__PURE__*/React.createElement(Pane, {
|
||||
className: pane2Classes,
|
||||
key: "pane2",
|
||||
eleRef: function eleRef(node) {
|
||||
_this2.pane2 = node;
|
||||
},
|
||||
size: pane2Size,
|
||||
split: split,
|
||||
style: pane2Style
|
||||
}, notNullChildren[1]));
|
||||
}
|
||||
}], [{
|
||||
key: "getDerivedStateFromProps",
|
||||
value: function getDerivedStateFromProps(nextProps, prevState) {
|
||||
return SplitPane.getSizeUpdate(nextProps, prevState);
|
||||
}
|
||||
}, {
|
||||
key: "getSizeUpdate",
|
||||
value: function getSizeUpdate(props, state) {
|
||||
var newState = {};
|
||||
var instanceProps = state.instanceProps;
|
||||
|
||||
if (instanceProps.size === props.size && props.size !== undefined) {
|
||||
return {};
|
||||
}
|
||||
|
||||
var newSize = props.size !== undefined ? props.size : getDefaultSize(props.defaultSize, props.minSize, props.maxSize, state.draggedSize);
|
||||
|
||||
if (props.size !== undefined) {
|
||||
newState.draggedSize = newSize;
|
||||
}
|
||||
|
||||
var isPanel1Primary = props.primary === 'first';
|
||||
newState[isPanel1Primary ? 'pane1Size' : 'pane2Size'] = newSize;
|
||||
newState[isPanel1Primary ? 'pane2Size' : 'pane1Size'] = undefined;
|
||||
newState.instanceProps = {
|
||||
size: props.size
|
||||
};
|
||||
return newState;
|
||||
}
|
||||
}]);
|
||||
|
||||
return SplitPane;
|
||||
}(React.Component);
|
||||
|
||||
SplitPane.propTypes = {
|
||||
allowResize: PropTypes.bool,
|
||||
children: PropTypes.arrayOf(PropTypes.node).isRequired,
|
||||
className: PropTypes.string,
|
||||
primary: PropTypes.oneOf(['first', 'second']),
|
||||
minSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
maxSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
// eslint-disable-next-line react/no-unused-prop-types
|
||||
defaultSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
split: PropTypes.oneOf(['vertical', 'horizontal']),
|
||||
onDragStarted: PropTypes.func,
|
||||
onDragFinished: PropTypes.func,
|
||||
onChange: PropTypes.func,
|
||||
onResizerClick: PropTypes.func,
|
||||
onResizerDoubleClick: PropTypes.func,
|
||||
style: stylePropType,
|
||||
resizerStyle: stylePropType,
|
||||
paneClassName: PropTypes.string,
|
||||
pane1ClassName: PropTypes.string,
|
||||
pane2ClassName: PropTypes.string,
|
||||
paneStyle: stylePropType,
|
||||
pane1Style: stylePropType,
|
||||
pane2Style: stylePropType,
|
||||
resizerClassName: PropTypes.string,
|
||||
step: PropTypes.number
|
||||
};
|
||||
SplitPane.defaultProps = {
|
||||
allowResize: true,
|
||||
minSize: 50,
|
||||
primary: 'first',
|
||||
split: 'vertical',
|
||||
paneClassName: '',
|
||||
pane1ClassName: '',
|
||||
pane2ClassName: ''
|
||||
};
|
||||
polyfill(SplitPane);
|
||||
|
||||
export default SplitPane;
|
||||
export { Pane };
|
||||
71
node_modules/react-split-pane/index.d.ts
generated
vendored
Normal file
71
node_modules/react-split-pane/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
import * as React from 'react';
|
||||
|
||||
export type Size = string | number;
|
||||
|
||||
export type Split = 'vertical' | 'horizontal';
|
||||
|
||||
export type SplitPaneProps = {
|
||||
allowResize?: boolean;
|
||||
className?: string;
|
||||
primary?: 'first' | 'second';
|
||||
minSize?: Size;
|
||||
maxSize?: Size;
|
||||
defaultSize?: Size;
|
||||
size?: Size;
|
||||
split?: 'vertical' | 'horizontal';
|
||||
onDragStarted?: () => void;
|
||||
onDragFinished?: (newSize: number) => void;
|
||||
onChange?: (newSize: number) => void;
|
||||
onResizerClick?: (event: MouseEvent) => void;
|
||||
onResizerDoubleClick?: (event: MouseEvent) => void;
|
||||
style?: React.CSSProperties;
|
||||
resizerStyle?: React.CSSProperties;
|
||||
paneStyle?: React.CSSProperties;
|
||||
pane1Style?: React.CSSProperties;
|
||||
pane2Style?: React.CSSProperties;
|
||||
resizerClassName?: string;
|
||||
step?: number;
|
||||
};
|
||||
|
||||
export type SplitPaneState = {
|
||||
active: boolean;
|
||||
resized: boolean;
|
||||
};
|
||||
|
||||
declare class SplitPane extends React.Component<
|
||||
SplitPaneProps,
|
||||
SplitPaneState
|
||||
> {
|
||||
constructor();
|
||||
|
||||
onMouseDown(event: MouseEvent): void;
|
||||
|
||||
onTouchStart(event: TouchEvent): void;
|
||||
|
||||
onMouseMove(event: MouseEvent): void;
|
||||
|
||||
onTouchMove(event: TouchEvent): void;
|
||||
|
||||
onMouseUp(): void;
|
||||
|
||||
static getSizeUpdate(
|
||||
props: SplitPaneProps,
|
||||
state: SplitPaneState
|
||||
): Partial<SplitPaneState>;
|
||||
|
||||
static defaultProps: SplitPaneProps;
|
||||
}
|
||||
|
||||
export default SplitPane;
|
||||
|
||||
export type PaneProps = {
|
||||
className?: string;
|
||||
size?: Size;
|
||||
split?: Split;
|
||||
style?: React.CSSProperties;
|
||||
eleRef?: (el: HTMLDivElement) => void;
|
||||
};
|
||||
|
||||
declare class Pane extends React.PureComponent<PaneProps> {}
|
||||
|
||||
export { Pane };
|
||||
106
node_modules/react-split-pane/package.json
generated
vendored
Normal file
106
node_modules/react-split-pane/package.json
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"name": "react-split-pane",
|
||||
"description": "React split-pane component",
|
||||
"main": "dist/index.cjs.js",
|
||||
"module": "dist/index.esm.js",
|
||||
"source": "src/index.js",
|
||||
"types": "index.d.ts",
|
||||
"files": [
|
||||
"dist",
|
||||
"index.d.ts"
|
||||
],
|
||||
"version": "0.1.92",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tomkp/react-split-pane"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/tomkp/react-split-pane"
|
||||
},
|
||||
"homepage": "https://github.com/tomkp/react-split-pane",
|
||||
"author": "tomkp <tom@tomkp.com>",
|
||||
"keywords": [
|
||||
"react",
|
||||
"react-component",
|
||||
"split-pane",
|
||||
"react-split-pane",
|
||||
"es6"
|
||||
],
|
||||
"scripts": {
|
||||
"start": "parcel website/index.html",
|
||||
"prebuild": "yarn run clean",
|
||||
"build": "rollup -c",
|
||||
"build:watch": "rollup -c --watch",
|
||||
"clean": "rimraf dist",
|
||||
"test": "BABEL_ENV=test mochify -R spec --transform babelify",
|
||||
"test:watch": "BABEL_ENV=test mochify -R spec --watch --transform babelify",
|
||||
"test:coverage": "BABEL_ENV=test mochify --plugin [ mochify-istanbul --exclude '**/test/**' --report lcovonly ] --transform babelify && cat lcov.info | coveralls && rm lcov.info",
|
||||
"prettier": "prettier --write '{src,test}/**/*.js'",
|
||||
"lint": "eslint src test",
|
||||
"release": "standard-version",
|
||||
"build:storybook": "build-storybook -o build",
|
||||
"storybook": "start-storybook -p ${PORT:-3001} -h 0.0.0.0",
|
||||
"deploy": "gh-pages -d build",
|
||||
"prepublishOnly": "yarn run test && yarn run build"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "pretty-quick --staged"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"prop-types": "^15.7.2",
|
||||
"react-lifecycles-compat": "^3.0.4",
|
||||
"react-style-proptype": "^3.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.7.2",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.7.0",
|
||||
"@babel/preset-env": "^7.7.1",
|
||||
"@babel/preset-react": "^7.7.0",
|
||||
"@emotion/core": "^10.0.22",
|
||||
"@emotion/styled": "^10.0.23",
|
||||
"@storybook/addons": "^5.3.17",
|
||||
"@storybook/react": "^5.3.17",
|
||||
"@storybook/theming": "^5.3.17",
|
||||
"@types/react": "^16.9.11",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"babel-loader": "^8.0.0-beta.6",
|
||||
"babelify": "^10.0.0",
|
||||
"chai": "^4.2.0",
|
||||
"chai-spies": "^1.0.0",
|
||||
"coveralls": "^3.0.7",
|
||||
"cross-env": "^7.0.0",
|
||||
"eslint": "^6.6.0",
|
||||
"eslint-config-fbjs": "^3.1.1",
|
||||
"eslint-config-prettier": "^6.5.0",
|
||||
"eslint-config-react": "^1.1.7",
|
||||
"eslint-plugin-babel": "^5.1.0",
|
||||
"eslint-plugin-flowtype": "^4.3.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.3",
|
||||
"eslint-plugin-prettier": "^3.1.1",
|
||||
"eslint-plugin-react": "^7.16.0",
|
||||
"eslint-plugin-relay": "^1.3.12",
|
||||
"gh-pages": "^2.1.1",
|
||||
"husky": "^4.2.3",
|
||||
"mochify": "^6.6.0",
|
||||
"mochify-istanbul": "^2.4.2",
|
||||
"parcel-bundler": "^1.12.4",
|
||||
"prettier": "2.0.5",
|
||||
"pretty-quick": "^2.0.1",
|
||||
"react": ">=15",
|
||||
"react-dom": "^16.0.0-0",
|
||||
"react-router-dom": "^5.1.2",
|
||||
"rimraf": "^3.0.0",
|
||||
"rollup": "^2.3.4",
|
||||
"rollup-plugin-babel": "^4.3.3",
|
||||
"rollup-plugin-commonjs": "^10.1.0",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"standard-version": "^7.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.0.0-0",
|
||||
"react-dom": "^16.0.0-0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user