New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-dnd

Package Overview
Dependencies
Maintainers
3
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dnd - npm Package Compare versions

Comparing version 6.0.0 to 7.0.0

5

lib/DragDropContext.d.ts

@@ -19,3 +19,3 @@ import * as React from 'react';

*/
export declare function createChildContext<BackendContext>(backend: BackendFactory, context?: BackendContext): {
export declare function createChildContext<BackendContext>(backend: BackendFactory, context?: BackendContext, debugMode?: boolean): {
dragDropManager: DragDropManager<BackendContext | undefined>;

@@ -26,2 +26,3 @@ };

context?: BackendContext;
debugMode?: boolean;
}

@@ -38,2 +39,2 @@ /**

*/
export declare function DragDropContext(backendFactory: BackendFactory, backendContext?: any): <TargetClass extends React.ComponentClass<any, any> | React.StatelessComponent<any>>(DecoratedComponent: TargetClass) => TargetClass & ContextComponent<any>;
export declare function DragDropContext(backendFactory: BackendFactory, backendContext?: any, debugMode?: boolean): <TargetClass extends React.ComponentClass<any, any> | React.StatelessComponent<any>>(DecoratedComponent: TargetClass) => TargetClass & ContextComponent<any>;

16

lib/DragDropContext.js

@@ -43,5 +43,5 @@ "use strict";

*/
function createChildContext(backend, context) {
function createChildContext(backend, context, debugMode) {
return {
dragDropManager: dnd_core_1.createDragDropManager(backend, context),
dragDropManager: dnd_core_1.createDragDropManager(backend, context, debugMode),
};

@@ -54,4 +54,4 @@ }

exports.DragDropContextProvider = function (_a) {
var backend = _a.backend, context = _a.context, children = _a.children;
var contextValue = createChildContext(backend, context);
var backend = _a.backend, context = _a.context, debugMode = _a.debugMode, children = _a.children;
var contextValue = createChildContext(backend, context, debugMode);
return React.createElement(exports.Provider, { value: contextValue }, children);

@@ -65,5 +65,5 @@ };

*/
function DragDropContext(backendFactory, backendContext) {
function DragDropContext(backendFactory, backendContext, debugMode) {
checkDecoratorArguments_1.default('DragDropContext', 'backend', backendFactory);
var childContext = createChildContext(backendFactory, backendContext);
var childContext = createChildContext(backendFactory, backendContext, debugMode);
return function decorateContext(DecoratedComponent) {

@@ -77,2 +77,3 @@ var Decorated = DecoratedComponent;

_this.ref = React.createRef();
_this.getManager = function () { return childContext.dragDropManager; };
return _this;

@@ -84,5 +85,2 @@ }

};
DragDropContextContainer.prototype.getManager = function () {
return childContext.dragDropManager;
};
DragDropContextContainer.prototype.render = function () {

@@ -89,0 +87,0 @@ return (React.createElement(exports.Provider, { value: childContext },

@@ -62,9 +62,2 @@ "use strict";

}
Object.defineProperty(DragLayerContainer.prototype, "DecoratedComponent", {
get: function () {
return DecoratedComponent;
},
enumerable: true,
configurable: true
});
DragLayerContainer.prototype.getDecoratedComponentInstance = function () {

@@ -128,2 +121,3 @@ invariant(this.ref.current, 'In order to access an instance of the decorated component it can not be a stateless component.');

DragLayerContainer.displayName = "DragLayer(" + displayName + ")";
DragLayerContainer.DecoratedComponent = DecoratedComponent;
return DragLayerContainer;

@@ -130,0 +124,0 @@ }(React.Component));

{
"name": "react-dnd",
"version": "6.0.0",
"version": "7.0.0",
"description": "Drag and Drop for React",

@@ -23,3 +23,3 @@ "main": "lib/index.js",

"dependencies": {
"dnd-core": "^6.0.0",
"dnd-core": "^7.0.0",
"hoist-non-react-statics": "^3.1.0",

@@ -37,3 +37,3 @@ "invariant": "^2.1.0",

"babel-loader": "^8.0.4",
"npm-run-all": "^4.1.3",
"npm-run-all": "^4.1.5",
"react": "^16.6.1",

@@ -49,3 +49,3 @@ "rimraf": "^2.6.2",

},
"gitHead": "21b878d2c66f020aa5248b085f4438b59e9c935b"
"gitHead": "f294f68dc82fe516adc1bb9f7452a67870943d84"
}

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

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

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