react-split
Advanced tools
Comparing version 2.0.13 to 2.0.14
@@ -175,3 +175,5 @@ import React from 'react'; | ||
gutterAlign: PropTypes.string, | ||
snapOffset: PropTypes.number, | ||
snapOffset: PropTypes.oneOfType([ | ||
PropTypes.number, | ||
PropTypes.arrayOf(PropTypes.number) ]), | ||
dragInterval: PropTypes.number, | ||
@@ -178,0 +180,0 @@ direction: PropTypes.string, |
@@ -1,2 +0,2 @@ | ||
/*! react-split - v2.0.13 */ | ||
/*! react-split - v2.0.14 */ | ||
@@ -185,3 +185,5 @@ (function (global, factory) { | ||
gutterAlign: PropTypes__default['default'].string, | ||
snapOffset: PropTypes__default['default'].number, | ||
snapOffset: PropTypes__default['default'].oneOfType([ | ||
PropTypes__default['default'].number, | ||
PropTypes__default['default'].arrayOf(PropTypes__default['default'].number) ]), | ||
dragInterval: PropTypes__default['default'].number, | ||
@@ -188,0 +190,0 @@ direction: PropTypes__default['default'].string, |
@@ -1,3 +0,3 @@ | ||
/*! react-split - v2.0.13 */ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("prop-types"),require("split.js")):"function"==typeof define&&define.amd?define(["react","prop-types","split.js"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).ReactSplit=t(e.React,e.PropTypes,e.Split)}(this,(function(e,t,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(e),o=i(t),a=i(r);function u(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(r[i]=e[i]);return r}var l=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){var e=this.props;e.children;var t=e.gutter,r=u(e,["children","gutter"]);r.gutter=function(e,r){var i;return t?i=t(e,r):(i=document.createElement("div")).className="gutter gutter-"+r,i.__isSplitGutter=!0,i},this.split=a.default(this.parent.children,r)},t.prototype.componentDidUpdate=function(e){var t=this,r=this.props;r.children;var i=r.minSize,n=r.sizes,o=r.collapsed,l=u(r,["children","minSize","sizes","collapsed"]),s=e.minSize,d=e.sizes,f=e.collapsed,p=["maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor"].map((function(r){return t.props[r]!==e[r]})).reduce((function(e,t){return e||t}),!1);if(Array.isArray(i)&&Array.isArray(s)){var c=!1;i.forEach((function(e,t){c=c||e!==s[t]})),p=p||c}else p=!(!Array.isArray(i)&&!Array.isArray(s))||(p||i!==s);if(p)l.minSize=i,l.sizes=n||this.split.getSizes(),this.split.destroy(!0,!0),l.gutter=function(e,t,r){return r.previousSibling},this.split=a.default(Array.from(this.parent.children).filter((function(e){return!e.__isSplitGutter})),l);else if(n){var g=!1;n.forEach((function(e,t){g=g||e!==d[t]})),g&&this.split.setSizes(this.props.sizes)}Number.isInteger(o)&&(o!==f||p)&&this.split.collapse(o)},t.prototype.componentWillUnmount=function(){this.split.destroy(),delete this.split},t.prototype.render=function(){var e=this,t=this.props;t.sizes,t.minSize,t.maxSize,t.expandToMin,t.gutterSize,t.gutterAlign,t.snapOffset,t.dragInterval,t.direction,t.cursor,t.gutter,t.elementStyle,t.gutterStyle,t.onDrag,t.onDragStart,t.onDragEnd,t.collapsed;var r=t.children,i=u(t,["sizes","minSize","maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor","gutter","elementStyle","gutterStyle","onDrag","onDragStart","onDragEnd","collapsed","children"]);return n.default.createElement("div",Object.assign({},{ref:function(t){e.parent=t}},i),r)},t}(n.default.Component);return l.propTypes={sizes:o.default.arrayOf(o.default.number),minSize:o.default.oneOfType([o.default.number,o.default.arrayOf(o.default.number)]),maxSize:o.default.oneOfType([o.default.number,o.default.arrayOf(o.default.number)]),expandToMin:o.default.bool,gutterSize:o.default.number,gutterAlign:o.default.string,snapOffset:o.default.number,dragInterval:o.default.number,direction:o.default.string,cursor:o.default.string,gutter:o.default.func,elementStyle:o.default.func,gutterStyle:o.default.func,onDrag:o.default.func,onDragStart:o.default.func,onDragEnd:o.default.func,collapsed:o.default.number,children:o.default.arrayOf(o.default.element)},l.defaultProps={sizes:void 0,minSize:void 0,maxSize:void 0,expandToMin:void 0,gutterSize:void 0,gutterAlign:void 0,snapOffset:void 0,dragInterval:void 0,direction:void 0,cursor:void 0,gutter:void 0,elementStyle:void 0,gutterStyle:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0,collapsed:void 0,children:void 0},l})); | ||
/*! react-split - v2.0.14 */ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("prop-types"),require("split.js")):"function"==typeof define&&define.amd?define(["react","prop-types","split.js"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).ReactSplit=t(e.React,e.PropTypes,e.Split)}(this,(function(e,t,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(e),a=i(t),o=i(r);function u(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===t.indexOf(i)&&(r[i]=e[i]);return r}var l=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){var e=this.props;e.children;var t=e.gutter,r=u(e,["children","gutter"]);r.gutter=function(e,r){var i;return t?i=t(e,r):(i=document.createElement("div")).className="gutter gutter-"+r,i.__isSplitGutter=!0,i},this.split=o.default(this.parent.children,r)},t.prototype.componentDidUpdate=function(e){var t=this,r=this.props;r.children;var i=r.minSize,n=r.sizes,a=r.collapsed,l=u(r,["children","minSize","sizes","collapsed"]),d=e.minSize,s=e.sizes,f=e.collapsed,p=["maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor"].map((function(r){return t.props[r]!==e[r]})).reduce((function(e,t){return e||t}),!1);if(Array.isArray(i)&&Array.isArray(d)){var c=!1;i.forEach((function(e,t){c=c||e!==d[t]})),p=p||c}else p=!(!Array.isArray(i)&&!Array.isArray(d))||(p||i!==d);if(p)l.minSize=i,l.sizes=n||this.split.getSizes(),this.split.destroy(!0,!0),l.gutter=function(e,t,r){return r.previousSibling},this.split=o.default(Array.from(this.parent.children).filter((function(e){return!e.__isSplitGutter})),l);else if(n){var g=!1;n.forEach((function(e,t){g=g||e!==s[t]})),g&&this.split.setSizes(this.props.sizes)}Number.isInteger(a)&&(a!==f||p)&&this.split.collapse(a)},t.prototype.componentWillUnmount=function(){this.split.destroy(),delete this.split},t.prototype.render=function(){var e=this,t=this.props;t.sizes,t.minSize,t.maxSize,t.expandToMin,t.gutterSize,t.gutterAlign,t.snapOffset,t.dragInterval,t.direction,t.cursor,t.gutter,t.elementStyle,t.gutterStyle,t.onDrag,t.onDragStart,t.onDragEnd,t.collapsed;var r=t.children,i=u(t,["sizes","minSize","maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor","gutter","elementStyle","gutterStyle","onDrag","onDragStart","onDragEnd","collapsed","children"]);return n.default.createElement("div",Object.assign({},{ref:function(t){e.parent=t}},i),r)},t}(n.default.Component);return l.propTypes={sizes:a.default.arrayOf(a.default.number),minSize:a.default.oneOfType([a.default.number,a.default.arrayOf(a.default.number)]),maxSize:a.default.oneOfType([a.default.number,a.default.arrayOf(a.default.number)]),expandToMin:a.default.bool,gutterSize:a.default.number,gutterAlign:a.default.string,snapOffset:a.default.oneOfType([a.default.number,a.default.arrayOf(a.default.number)]),dragInterval:a.default.number,direction:a.default.string,cursor:a.default.string,gutter:a.default.func,elementStyle:a.default.func,gutterStyle:a.default.func,onDrag:a.default.func,onDragStart:a.default.func,onDragEnd:a.default.func,collapsed:a.default.number,children:a.default.arrayOf(a.default.element)},l.defaultProps={sizes:void 0,minSize:void 0,maxSize:void 0,expandToMin:void 0,gutterSize:void 0,gutterAlign:void 0,snapOffset:void 0,dragInterval:void 0,direction:void 0,cursor:void 0,gutter:void 0,elementStyle:void 0,gutterStyle:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0,collapsed:void 0,children:void 0},l})); | ||
//# sourceMappingURL=react-split.min.js.map |
import React from 'react' | ||
import { Options } from 'split.js' | ||
export interface SplitProps extends React.HTMLAttributes<HTMLDivElement> { | ||
export interface SplitProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onDrag'|'onDragStart'|'onDragEnd'> { | ||
sizes?: Options["sizes"] | ||
@@ -6,0 +6,0 @@ minSize?: Options["minSize"] |
{ | ||
"name": "react-split", | ||
"version": "2.0.13", | ||
"version": "2.0.14", | ||
"description": "React component for Split.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/react-split.js", |
Sorry, the diff of this file is not supported yet
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
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
38156
418