react-sortablejs
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -1,2 +0,2 @@ | ||
/*! react-sortablejs v1.3.1 | (c) 2017 Cheton Wu <cheton@gmail.com> | MIT | https://github.com/cheton/react-sortable */ | ||
/*! react-sortablejs v1.3.2 | (c) 2017 Cheton Wu <cheton@gmail.com> | MIT | https://github.com/cheton/react-sortable */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -181,4 +181,4 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
evt.from.insertBefore(evt.item, store.nextSibling); | ||
var referenceNode = store.nextSibling && store.nextSibling.parentNode !== null ? store.nextSibling : null; | ||
evt.from.insertBefore(evt.item, referenceNode); | ||
if (remote !== _this2) { | ||
@@ -185,0 +185,0 @@ var remoteOptions = remote.props.options || {}; |
@@ -1,2 +0,2 @@ | ||
/*! react-sortablejs v1.3.1 | (c) 2017 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]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};return t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(t,o){t.exports=e},function(e,o){e.exports=t},function(e,t){e.exports=o},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&&e!==Symbol.prototype?"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(0),y=n(f),b=o(1),d=n(b),m=o(2),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=t.__proto__||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);["onChoose","onStart","onEnd","onAdd","onUpdate","onSort","onRemove","onFilter","onMove","onClone"].forEach(function(o){var n=t[o];t[o]=function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];var i=r[0];if("onChoose"===o)v.nextSibling=i.item.nextElementSibling,v.activeComponent=e;else if(("onAdd"===o||"onUpdate"===o)&&e.props.onChange){var u=e.sortable.toArray(),l=v.activeComponent,s=l.sortable.toArray();if(i.from.insertBefore(i.item,v.nextSibling),l!==e){var c=l.props.options||{};"object"===p(c.group)&&"clone"===c.group.pull&&i.item.parentNode.removeChild(i.item),l.props.onChange&&l.props.onChange(s,l.sortable,i)}e.props.onChange&&e.props.onChange(u,e.sortable,i)}if("move"===i.type){var f=r[0],y=r[1],b=!n||n(f,y);return b}setTimeout(function(){n&&n(i)},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 y.default.DOM[n]({className:o,style:r},t)}}]),t}(y.default.Component),u.propTypes={options:y.default.PropTypes.object,onChange:y.default.PropTypes.func,tag:y.default.PropTypes.string,style:y.default.PropTypes.object},u.defaultProps={options:{},tag:"div",style:{}},l)}])}); | ||
/*! react-sortablejs v1.3.2 | (c) 2017 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]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};return t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(t,o){t.exports=e},function(e,o){e.exports=t},function(e,t){e.exports=o},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 i(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 a(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&&e!==Symbol.prototype?"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(0),b=n(f),y=o(1),d=n(y),m=o(2),h=n(m),v={nextSibling:null,activeComponent:null};e.exports=(l=u=function(e){function t(){var e,o,n,a;r(this,t);for(var u=arguments.length,l=Array(u),p=0;p<u;p++)l[p]=arguments[p];return o=n=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),n.sortable=null,a=o,i(n,a)}return a(t,e),c(t,[{key:"componentDidMount",value:function(){var e=this,t=s({},this.props.options);["onChoose","onStart","onEnd","onAdd","onUpdate","onSort","onRemove","onFilter","onMove","onClone"].forEach(function(o){var n=t[o];t[o]=function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var a=r[0];if("onChoose"===o)v.nextSibling=a.item.nextElementSibling,v.activeComponent=e;else if(("onAdd"===o||"onUpdate"===o)&&e.props.onChange){var u=e.sortable.toArray(),l=v.activeComponent,s=l.sortable.toArray(),c=v.nextSibling&&null!==v.nextSibling.parentNode?v.nextSibling:null;if(a.from.insertBefore(a.item,c),l!==e){var f=l.props.options||{};"object"===p(f.group)&&"clone"===f.group.pull&&a.item.parentNode.removeChild(a.item),l.props.onChange&&l.props.onChange(s,l.sortable,a)}e.props.onChange&&e.props.onChange(u,e.sortable,a)}if("move"===a.type){var b=r[0],y=r[1],d=!n||n(b,y);return d}setTimeout(function(){n&&n(a)},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),u.propTypes={options:b.default.PropTypes.object,onChange:b.default.PropTypes.func,tag:b.default.PropTypes.string,style:b.default.PropTypes.object},u.defaultProps={options:{},tag:"div",style:{}},l)}])}); |
@@ -79,4 +79,4 @@ 'use strict'; | ||
evt.from.insertBefore(evt.item, store.nextSibling); | ||
var referenceNode = store.nextSibling && store.nextSibling.parentNode !== null ? store.nextSibling : null; | ||
evt.from.insertBefore(evt.item, referenceNode); | ||
if (remote !== _this2) { | ||
@@ -83,0 +83,0 @@ var remoteOptions = remote.props.options || {}; |
{ | ||
"name": "react-sortablejs", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "A React component built on top of Sortable (https://github.com/RubaXa/Sortable).", | ||
@@ -71,4 +71,5 @@ "main": "lib/index.js", | ||
"webpack": "^2.2.1", | ||
"webpack-dev-server": "^2.3.0" | ||
"webpack-dev-server": "^2.3.0", | ||
"which": "~1.2.12" | ||
} | ||
} |
@@ -52,4 +52,4 @@ import React from 'react'; | ||
evt.from.insertBefore(evt.item, store.nextSibling); | ||
const referenceNode = (store.nextSibling && store.nextSibling.parentNode !== null) ? store.nextSibling : null; | ||
evt.from.insertBefore(evt.item, referenceNode); | ||
if (remote !== this) { | ||
@@ -56,0 +56,0 @@ const remoteOptions = remote.props.options || {}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
489505
2393
0
26