react-reorder
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -5,5 +5,6 @@ 'use strict'; | ||
var ReactDOM = require('react-dom'); | ||
var createReactClass = require('create-react-class'); | ||
var Reorder = require('../../../index'); | ||
var ListItem = React.createClass({ | ||
var ListItem = createReactClass({ | ||
render: function () { | ||
@@ -19,3 +20,3 @@ return React.createElement('div', { | ||
var Main = React.createClass({ | ||
var Main = createReactClass({ | ||
callback: function (event, item, index, newIndex, list) { | ||
@@ -22,0 +23,0 @@ this.setState({arr: list}); |
13
index.js
(function () { | ||
'use strict'; | ||
var getReorderComponent = function (React, ReactDOM) { | ||
var getReorderComponent = function (React, ReactDOM, createReactClass) { | ||
return React.createClass({ | ||
return createReactClass({ | ||
displayName: 'Reorder', | ||
@@ -462,7 +462,8 @@ nonCollisionElement: new RegExp('(^|\\s)(placeholder|dragged)($|\\s)', ''), | ||
var ReactDOM = require('react-dom'); | ||
module.exports = getReorderComponent(React, ReactDOM); | ||
var createReactClass = require('create-react-class'); | ||
module.exports = getReorderComponent(React, ReactDOM, createReactClass); | ||
// Export for amd / require | ||
} else if (typeof define === 'function' && define.amd) { // eslint-disable-line no-undef | ||
define(['react', 'react-dom'], function (React, ReactDOM) { // eslint-disable-line no-undef | ||
return getReorderComponent(React, ReactDOM); | ||
define(['react', 'react-dom', 'create-react-class'], function (ReactAMD, ReactDOMAMD, createReactClassAMD) { // eslint-disable-line no-undef | ||
return getReorderComponent(ReactAMD, ReactDOMAMD, createReactClassAMD); | ||
}); | ||
@@ -483,5 +484,5 @@ // Export globally | ||
root.Reorder = getReorderComponent(root.React, root.ReactDOM); | ||
root.Reorder = getReorderComponent(root.React, root.ReactDOM, root.createReactClass); | ||
} | ||
})(); |
{ | ||
"name": "react-reorder", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Drag & drop, touch enabled, reorderable / sortable list, React component", | ||
@@ -33,11 +33,17 @@ "author": "Jake 'Sid' Smith", | ||
], | ||
"dependencies": {}, | ||
"dependencies": { | ||
"create-react-class": "~15.5.2" | ||
}, | ||
"devDependencies": { | ||
"browserify": "=12.0.1", | ||
"http-server": "=0.8.5", | ||
"less": "=2.5.3", | ||
"less": "=2.7.2", | ||
"react": ">=0.14.7", | ||
"react-dom": ">=0.14.7", | ||
"watchify": "=3.6.1" | ||
}, | ||
"peerDependencies": { | ||
"react": "*", | ||
"react-dom": "*" | ||
} | ||
} |
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
32725
560
3
+ Addedcreate-react-class@~15.5.2
+ Addedasap@2.0.6(transitive)
+ Addedcore-js@1.2.7(transitive)
+ Addedcreate-react-class@15.5.4(transitive)
+ Addedencoding@0.1.13(transitive)
+ Addedfbjs@0.8.18(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisomorphic-fetch@2.2.1(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addednode-fetch@1.7.3(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedpromise@7.3.1(transitive)
+ Addedreact@18.3.1(transitive)
+ Addedreact-dom@18.3.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedscheduler@0.23.2(transitive)
+ Addedsetimmediate@1.0.5(transitive)
+ Addedua-parser-js@0.7.39(transitive)
+ Addedwhatwg-fetch@3.6.20(transitive)