@pie-lib/drag 2.1.19-next.0 → 2.1.19
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 +13 -1
- package/lib/index.js +0 -6
- package/lib/index.js.map +1 -1
- package/lib/with-drag-context.js +8 -13
- package/lib/with-drag-context.js.map +1 -1
- package/package.json +3 -2
- package/src/index.js +1 -2
- package/src/with-drag-context.js +3 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,24 @@
|
|
|
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.1.19](https://github.com/pie-framework/pie-lib/compare/@pie-lib/drag@2.1.18...@pie-lib/drag@2.1.19) (2023-06-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **drag:** provide drag support for multiple devices PD-2722 ([747186c](https://github.com/pie-framework/pie-lib/commit/747186c230645ca805a8c446e7c74d1ec0003ab7))
|
|
12
|
+
* **drag:** provide drag support for multiple-devices PD-2722 ([04534da](https://github.com/pie-framework/pie-lib/commit/04534da486616ddbfd08794361c9bdadaa2d1655))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
## [2.1.18](https://github.com/pie-framework/pie-lib/compare/@pie-lib/drag@2.1.17...@pie-lib/drag@2.1.18) (2023-04-19)
|
|
7
19
|
|
|
8
20
|
|
|
9
21
|
### Bug Fixes
|
|
10
22
|
|
|
11
|
-
* **eslint:** fix eslint problems-
|
|
23
|
+
* **eslint:** fix eslint problems-PD-2732 ([9eb9976](https://github.com/pie-framework/pie-lib/commit/9eb9976749753da86e1057a07bd2cfc65bf64ae4))
|
|
12
24
|
|
|
13
25
|
|
|
14
26
|
|
package/lib/index.js
CHANGED
|
@@ -13,12 +13,6 @@ Object.defineProperty(exports, "Choice", {
|
|
|
13
13
|
return _choice["default"];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
Object.defineProperty(exports, "DndProvider", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function get() {
|
|
19
|
-
return _reactDnd.DndProvider;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
16
|
Object.defineProperty(exports, "DragDroppablePlaceholder", {
|
|
23
17
|
enumerable: true,
|
|
24
18
|
get: function get() {
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;AACA;;AACA","sourcesContent":["import { DragSource, DropTarget } from 'react-dnd';\n\nimport PlaceHolder from './placeholder';\nimport Choice from './choice';\nimport withDragContext from './with-drag-context';\nimport swap from './swap';\nimport * as uid from './uid-context';\nimport MatchDroppablePlaceholder from './match-list-dp';\nimport DragDroppablePlaceholder from './drag-in-the-blank-dp';\n\nexport {\n PlaceHolder,\n MatchDroppablePlaceholder,\n DragDroppablePlaceholder,\n withDragContext,\n Choice,\n swap,\n uid,\n DragSource,\n DropTarget,\n};\n"],"file":"index.js"}
|
package/lib/with-drag-context.js
CHANGED
|
@@ -9,24 +9,19 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _reactDndMultiBackend = _interopRequireDefault(require("react-dnd-multi-backend"));
|
|
13
13
|
|
|
14
14
|
var _reactDnd = require("react-dnd");
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// https://github.com/react-dnd/react-dnd/issues/3257
|
|
19
|
-
// eslint-disable-next-line react/display-name
|
|
16
|
+
var _HTML5toTouch = _interopRequireDefault(require("react-dnd-multi-backend/dist/cjs/HTML5toTouch"));
|
|
17
|
+
|
|
20
18
|
var _default = function _default(Component) {
|
|
21
19
|
return function (props) {
|
|
22
|
-
return (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
context: window
|
|
28
|
-
}, /*#__PURE__*/_react["default"].createElement(Component, props))
|
|
29
|
-
);
|
|
20
|
+
return /*#__PURE__*/_react["default"].createElement(_reactDnd.DndProvider, {
|
|
21
|
+
backend: _reactDndMultiBackend["default"],
|
|
22
|
+
options: _HTML5toTouch["default"],
|
|
23
|
+
debugMode: "true"
|
|
24
|
+
}, /*#__PURE__*/_react["default"].createElement(Component, props));
|
|
30
25
|
};
|
|
31
26
|
};
|
|
32
27
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-drag-context.js"],"names":["Component","props","
|
|
1
|
+
{"version":3,"sources":["../src/with-drag-context.js"],"names":["Component","props","MultiBackend","HTML5toTouch"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;eAEe,kBAACA,SAAD;AAAA,SAAe,UAACC,KAAD;AAAA,wBAC5B,gCAAC,qBAAD;AAAa,MAAA,OAAO,EAAEC,gCAAtB;AAAoC,MAAA,OAAO,EAAEC,wBAA7C;AAA2D,MAAA,SAAS,EAAC;AAArE,oBACE,gCAAC,SAAD,EAAeF,KAAf,CADF,CAD4B;AAAA,GAAf;AAAA,C","sourcesContent":["import React from 'react';\nimport MultiBackend from 'react-dnd-multi-backend';\nimport { DndProvider } from 'react-dnd';\nimport HTML5toTouch from 'react-dnd-multi-backend/dist/cjs/HTML5toTouch';\n\nexport default (Component) => (props) => (\n <DndProvider backend={MultiBackend} options={HTML5toTouch} debugMode=\"true\">\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.1.19
|
|
3
|
+
"version": "2.1.19",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"lodash": "^4.17.11",
|
|
11
11
|
"react-dnd": "^14.0.5",
|
|
12
12
|
"react-dnd-html5-backend": "^14.0.2",
|
|
13
|
+
"react-dnd-multi-backend": "^6.0.2",
|
|
13
14
|
"react-dnd-touch-backend": "^14.1.0"
|
|
14
15
|
},
|
|
15
16
|
"publishConfig": {
|
|
@@ -18,5 +19,5 @@
|
|
|
18
19
|
"scripts": {},
|
|
19
20
|
"author": "",
|
|
20
21
|
"license": "ISC",
|
|
21
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "2a3ce431dfb8e4d8b53b28f2877edfa6991b6643"
|
|
22
23
|
}
|
package/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DragSource, DropTarget } from 'react-dnd';
|
|
2
2
|
|
|
3
3
|
import PlaceHolder from './placeholder';
|
|
4
4
|
import Choice from './choice';
|
|
@@ -9,7 +9,6 @@ import MatchDroppablePlaceholder from './match-list-dp';
|
|
|
9
9
|
import DragDroppablePlaceholder from './drag-in-the-blank-dp';
|
|
10
10
|
|
|
11
11
|
export {
|
|
12
|
-
DndProvider,
|
|
13
12
|
PlaceHolder,
|
|
14
13
|
MatchDroppablePlaceholder,
|
|
15
14
|
DragDroppablePlaceholder,
|
package/src/with-drag-context.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
// import { TouchBackend } from 'react-dnd-touch-backend';
|
|
4
|
-
|
|
2
|
+
import MultiBackend from 'react-dnd-multi-backend';
|
|
5
3
|
import { DndProvider } from 'react-dnd';
|
|
4
|
+
import HTML5toTouch from 'react-dnd-multi-backend/dist/cjs/HTML5toTouch';
|
|
6
5
|
|
|
7
|
-
// const isTouchEnabled = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
8
|
-
|
|
9
|
-
// https://github.com/react-dnd/react-dnd/issues/3257
|
|
10
|
-
// eslint-disable-next-line react/display-name
|
|
11
6
|
export default (Component) => (props) => (
|
|
12
|
-
|
|
13
|
-
<DndProvider backend={HTML5Backend} context={window}>
|
|
7
|
+
<DndProvider backend={MultiBackend} options={HTML5toTouch} debugMode="true">
|
|
14
8
|
<Component {...props} />
|
|
15
9
|
</DndProvider>
|
|
16
10
|
);
|