Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-sortablejs

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-sortablejs - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

11

dist/react-sortable.js

@@ -1,2 +0,2 @@

/*! react-sortablejs v1.1.1 | (c) 2016 Cheton Wu <cheton@gmail.com> | MIT | https://github.com/cheton/react-sortable */
/*! react-sortablejs v1.1.2 | (c) 2016 Cheton Wu <cheton@gmail.com> | MIT | https://github.com/cheton/react-sortable */
(function webpackUniversalModuleDefinition(root, factory) {

@@ -173,4 +173,5 @@ if(typeof exports === 'object' && typeof module === 'object')

var tag = _props.tag;
var style = _props.style;
return _react2.default.DOM[tag]({ className: className }, children);
return _react2.default.DOM[tag]({ className: className, style: style }, children);
}

@@ -183,6 +184,8 @@ }]);

onChange: _react2.default.PropTypes.func,
tag: _react2.default.PropTypes.string
tag: _react2.default.PropTypes.string,
style: _react2.default.PropTypes.object
}, _class.defaultProps = {
options: {},
tag: 'div'
tag: 'div',
style: {}
}, _temp2);

@@ -189,0 +192,0 @@

@@ -1,2 +0,2 @@

/*! react-sortablejs v1.1.1 | (c) 2016 Cheton Wu <cheton@gmail.com> | MIT | https://github.com/cheton/react-sortable */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("sortablejs")):"function"==typeof define&&define.amd?define(["react","react-dom","sortablejs"],t):"object"==typeof exports?exports.ReactSortable=t(require("react"),require("react-dom"),require("sortablejs")):e.ReactSortable=t(e.React,e.ReactDOM,e.Sortable)}(this,function(e,t,o){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u,l,p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),f=o(1),b=n(f),y=o(2),d=n(y),m=o(3),h=n(m),v={nextSibling:null,activeComponent:null};e.exports=(l=u=function(e){function t(){var e,o,n,i;r(this,t);for(var u=arguments.length,l=Array(u),p=0;p<u;p++)l[p]=arguments[p];return o=n=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),n.sortable=null,i=o,a(n,i)}return i(t,e),c(t,[{key:"componentDidMount",value:function(){var e=this,t=s({},this.props.options);["onStart","onEnd","onAdd","onSort","onUpdate","onRemove","onFilter","onMove"].forEach(function(o){var n=t[o];t[o]=function(t){if("onStart"===o)v.nextSibling=t.item.nextElementSibling,v.activeComponent=e;else if(("onAdd"===o||"onUpdate"===o)&&e.props.onChange){var r=e.sortable.toArray(),a=v.activeComponent,i=a.sortable.toArray();if(t.from.insertBefore(t.item,v.nextSibling),a!==e){var u=a.props.options||{};"object"===p(u.group)&&"clone"===u.group.pull&&t.item.parentNode.removeChild(t.item),a.props.onChange&&a.props.onChange(i,a.sortable,t)}e.props.onChange&&e.props.onChange(r,e.sortable,t)}if("move"===t.type){var l=!n||n(t);return l}setTimeout(function(){n&&n(t)},0)}}),this.sortable=h["default"].create(d["default"].findDOMNode(this),t)}},{key:"componentWillUnmount",value:function(){this.sortable&&(this.sortable.destroy(),this.sortable=null)}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.className,n=e.tag;return b["default"].DOM[n]({className:o},t)}}]),t}(b["default"].Component),u.propTypes={options:b["default"].PropTypes.object,onChange:b["default"].PropTypes.func,tag:b["default"].PropTypes.string},u.defaultProps={options:{},tag:"div"},l)},function(t,o){t.exports=e},function(e,o){e.exports=t},function(e,t){e.exports=o}])});
/*! react-sortablejs v1.1.2 | (c) 2016 Cheton Wu <cheton@gmail.com> | MIT | https://github.com/cheton/react-sortable */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("sortablejs")):"function"==typeof define&&define.amd?define(["react","react-dom","sortablejs"],t):"object"==typeof exports?exports.ReactSortable=t(require("react"),require("react-dom"),require("sortablejs")):e.ReactSortable=t(e.React,e.ReactDOM,e.Sortable)}(this,function(e,t,o){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l,u,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),f=o(1),b=n(f),y=o(2),d=n(y),m=o(3),h=n(m),v={nextSibling:null,activeComponent:null};e.exports=(u=l=function(e){function t(){var e,o,n,i;r(this,t);for(var l=arguments.length,u=Array(l),s=0;s<l;s++)u[s]=arguments[s];return o=n=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.sortable=null,i=o,a(n,i)}return i(t,e),c(t,[{key:"componentDidMount",value:function(){var e=this,t=p({},this.props.options);["onStart","onEnd","onAdd","onSort","onUpdate","onRemove","onFilter","onMove"].forEach(function(o){var n=t[o];t[o]=function(t){if("onStart"===o)v.nextSibling=t.item.nextElementSibling,v.activeComponent=e;else if(("onAdd"===o||"onUpdate"===o)&&e.props.onChange){var r=e.sortable.toArray(),a=v.activeComponent,i=a.sortable.toArray();if(t.from.insertBefore(t.item,v.nextSibling),a!==e){var l=a.props.options||{};"object"===s(l.group)&&"clone"===l.group.pull&&t.item.parentNode.removeChild(t.item),a.props.onChange&&a.props.onChange(i,a.sortable,t)}e.props.onChange&&e.props.onChange(r,e.sortable,t)}if("move"===t.type){var u=!n||n(t);return u}setTimeout(function(){n&&n(t)},0)}}),this.sortable=h["default"].create(d["default"].findDOMNode(this),t)}},{key:"componentWillUnmount",value:function(){this.sortable&&(this.sortable.destroy(),this.sortable=null)}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.className,n=e.tag,r=e.style;return b["default"].DOM[n]({className:o,style:r},t)}}]),t}(b["default"].Component),l.propTypes={options:b["default"].PropTypes.object,onChange:b["default"].PropTypes.func,tag:b["default"].PropTypes.string,style:b["default"].PropTypes.object},l.defaultProps={options:{},tag:"div",style:{}},u)},function(t,o){t.exports=e},function(e,o){e.exports=t},function(e,t){e.exports=o}])});

@@ -116,4 +116,5 @@ 'use strict';

var tag = _props.tag;
var style = _props.style;
return _react2.default.DOM[tag]({ className: className }, children);
return _react2.default.DOM[tag]({ className: className, style: style }, children);
}

@@ -126,6 +127,8 @@ }]);

onChange: _react2.default.PropTypes.func,
tag: _react2.default.PropTypes.string
tag: _react2.default.PropTypes.string,
style: _react2.default.PropTypes.object
}, _class.defaultProps = {
options: {},
tag: 'div'
tag: 'div',
style: {}
}, _temp2);
{
"name": "react-sortablejs",
"version": "1.1.1",
"version": "1.1.2",
"description": "A React component built on top of Sortable (https://github.com/RubaXa/Sortable).",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -14,7 +14,9 @@ import React from 'react';

onChange: React.PropTypes.func,
tag: React.PropTypes.string
tag: React.PropTypes.string,
style: React.PropTypes.object
};
static defaultProps = {
options: {},
tag: 'div'
tag: 'div',
style: {}
};

@@ -83,5 +85,5 @@ sortable = null;

render() {
const { children, className, tag } = this.props;
return React.DOM[tag]({ className }, children);
const { children, className, tag, style } = this.props;
return React.DOM[tag]({ className, style }, children);
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc