@pie-lib/drag 2.0.2-next.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/lib/with-drag-context.js +3 -1
- package/lib/with-drag-context.js.map +1 -1
- package/package.json +2 -2
- package/src/with-drag-context.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/drag@2.0.1...@pie-lib/drag@2.0.2) (2022-11-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* react-dnd issue ([a39cb6d](https://github.com/pie-framework/pie-lib/commit/a39cb6dfa290840f3521f390ac3bd8091acee3d1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.0.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/drag@2.0.0...@pie-lib/drag@2.0.1) (2022-11-23)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @pie-lib/drag
|
package/lib/with-drag-context.js
CHANGED
|
@@ -13,10 +13,12 @@ var _reactDndHtml5Backend = require("react-dnd-html5-backend");
|
|
|
13
13
|
|
|
14
14
|
var _reactDnd = require("react-dnd");
|
|
15
15
|
|
|
16
|
+
// https://github.com/react-dnd/react-dnd/issues/3257
|
|
16
17
|
var _default = function _default(Component) {
|
|
17
18
|
return function (props) {
|
|
18
19
|
return /*#__PURE__*/_react["default"].createElement(_reactDnd.DndProvider, {
|
|
19
|
-
backend: _reactDndHtml5Backend.HTML5Backend
|
|
20
|
+
backend: _reactDndHtml5Backend.HTML5Backend,
|
|
21
|
+
context: window
|
|
20
22
|
}, /*#__PURE__*/_react["default"].createElement(Component, props));
|
|
21
23
|
};
|
|
22
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-drag-context.js"],"names":["Component","props","HTML5Backend"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;
|
|
1
|
+
{"version":3,"sources":["../src/with-drag-context.js"],"names":["Component","props","HTML5Backend","window"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AAEA;eACe,kBAACA,SAAD;AAAA,SAAe,UAACC,KAAD;AAAA,wBAC5B,gCAAC,qBAAD;AAAa,MAAA,OAAO,EAAEC,kCAAtB;AAAoC,MAAA,OAAO,EAAEC;AAA7C,oBACE,gCAAC,SAAD,EAAeF,KAAf,CADF,CAD4B;AAAA,GAAf;AAAA,C","sourcesContent":["import React from 'react';\nimport { HTML5Backend } from 'react-dnd-html5-backend';\n\nimport { DndProvider } from 'react-dnd';\n\n// https://github.com/react-dnd/react-dnd/issues/3257\nexport default (Component) => (props) => (\n <DndProvider backend={HTML5Backend} context={window}>\n <Component {...props} />\n </DndProvider>\n);\n"],"file":"with-drag-context.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/drag",
|
|
3
|
-
"version": "2.0.2
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"scripts": {},
|
|
18
18
|
"author": "",
|
|
19
19
|
"license": "ISC",
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "522667c95c389f230a3bec8a59ce0014359e9599"
|
|
21
21
|
}
|
package/src/with-drag-context.js
CHANGED
|
@@ -3,8 +3,9 @@ import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
|
3
3
|
|
|
4
4
|
import { DndProvider } from 'react-dnd';
|
|
5
5
|
|
|
6
|
+
// https://github.com/react-dnd/react-dnd/issues/3257
|
|
6
7
|
export default (Component) => (props) => (
|
|
7
|
-
<DndProvider backend={HTML5Backend}>
|
|
8
|
+
<DndProvider backend={HTML5Backend} context={window}>
|
|
8
9
|
<Component {...props} />
|
|
9
10
|
</DndProvider>
|
|
10
11
|
);
|