Files

Return to Package Diff Home.
Brought to you by Intrinsic.

Package Diff: react-dnd @ 7.2.0 .. 7.2.1

dist/ReactDnD.js

@@ -1769,127 +1769,127 @@
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(__webpack_require__(/*! ./useDragSource */ \"./src/hooks/useDragSource.ts\"));\n__export(__webpack_require__(/*! ./useDropTarget */ \"./src/hooks/useDropTarget.ts\"));\n__export(__webpack_require__(/*! ./useDragLayer */ \"./src/hooks/useDragLayer.ts\"));\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/index.ts?");
+eval("\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(__webpack_require__(/*! ./useDrag */ \"./src/hooks/useDrag.ts\"));\n__export(__webpack_require__(/*! ./useDrop */ \"./src/hooks/useDrop.ts\"));\n__export(__webpack_require__(/*! ./useDragLayer */ \"./src/hooks/useDragLayer.ts\"));\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/index.ts?");
/***/ }),
-/***/ "./src/hooks/useCollector.ts":
-/*!***********************************!*\
- !*** ./src/hooks/useCollector.ts ***!
- \***********************************/
+/***/ "./src/hooks/internal/useCollector.ts":
+/*!********************************************!*\
+ !*** ./src/hooks/internal/useCollector.ts ***!
+ \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar shallowEqual = __webpack_require__(/*! shallowequal */ \"./node_modules/shallowequal/index.js\");\nfunction useCollector(monitor, collect) {\n var _a = react_1.useState(function () { return collect(monitor); }), collected = _a[0], setCollected = _a[1];\n var updateCollected = function () {\n var nextValue = collect(monitor);\n // Not async-safe, but we need a way to opt-out of state updates\n if (!shallowEqual(collected, nextValue)) {\n setCollected(nextValue);\n }\n };\n return [collected, updateCollected];\n}\nexports.useCollector = useCollector;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useCollector.ts?");
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar shallowEqual = __webpack_require__(/*! shallowequal */ \"./node_modules/shallowequal/index.js\");\nfunction useCollector(monitor, collect) {\n var _a = react_1.useState(function () { return collect(monitor); }), collected = _a[0], setCollected = _a[1];\n var updateCollected = function () {\n var nextValue = collect(monitor);\n if (!shallowEqual(collected, nextValue)) {\n setCollected(nextValue);\n }\n };\n return [collected, updateCollected];\n}\nexports.useCollector = useCollector;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/internal/useCollector.ts?");
/***/ }),
-/***/ "./src/hooks/useDragDropManager.ts":
-/*!*****************************************!*\
- !*** ./src/hooks/useDragDropManager.ts ***!
- \*****************************************/
+/***/ "./src/hooks/internal/useDragDropManager.ts":
+/*!**************************************************!*\
+ !*** ./src/hooks/internal/useDragDropManager.ts ***!
+ \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar DragDropContext_1 = __webpack_require__(/*! ../DragDropContext */ \"./src/DragDropContext.tsx\");\nvar invariant = __webpack_require__(/*! invariant */ \"./node_modules/invariant/browser.js\");\n/**\n * A hook to retrieve the DragDropManager from Context\n */\nfunction useDragDropManager() {\n var dragDropManager = react_1.useContext(DragDropContext_1.context).dragDropManager;\n invariant(dragDropManager != null, 'Expected drag drop context');\n return dragDropManager;\n}\nexports.useDragDropManager = useDragDropManager;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useDragDropManager.ts?");
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar DragDropContext_1 = __webpack_require__(/*! ../../DragDropContext */ \"./src/DragDropContext.tsx\");\nvar invariant = __webpack_require__(/*! invariant */ \"./node_modules/invariant/browser.js\");\n/**\n * A hook to retrieve the DragDropManager from Context\n */\nfunction useDragDropManager() {\n var dragDropManager = react_1.useContext(DragDropContext_1.context).dragDropManager;\n invariant(dragDropManager != null, 'Expected drag drop context');\n return dragDropManager;\n}\nexports.useDragDropManager = useDragDropManager;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/internal/useDragDropManager.ts?");
/***/ }),
-/***/ "./src/hooks/useDragLayer.ts":
-/*!***********************************!*\
- !*** ./src/hooks/useDragLayer.ts ***!
- \***********************************/
+/***/ "./src/hooks/internal/useDragSourceHandler.ts":
+/*!****************************************************!*\
+ !*** ./src/hooks/internal/useDragSourceHandler.ts ***!
+ \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar useDragDropManager_1 = __webpack_require__(/*! ./useDragDropManager */ \"./src/hooks/useDragDropManager.ts\");\nvar useCollector_1 = __webpack_require__(/*! ./useCollector */ \"./src/hooks/useCollector.ts\");\n/**\n * useDragLayer Hook (This API is experimental and subject to breaking changes in non-breaking versions)\n * @param collector The property collector\n */\nfunction useDragLayer(collect) {\n var dragDropManager = useDragDropManager_1.useDragDropManager();\n var monitor = dragDropManager.getMonitor();\n var _a = useCollector_1.useCollector(monitor, collect), collected = _a[0], updateCollected = _a[1];\n react_1.useEffect(function () { return monitor.subscribeToOffsetChange(updateCollected); });\n react_1.useEffect(function () { return monitor.subscribeToStateChange(updateCollected); });\n return collected;\n}\nexports.useDragLayer = useDragLayer;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useDragLayer.ts?");
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nfunction useDragSourceHandler(sourceSpec) {\n var sourceSpecRef = react_1.useRef(sourceSpec);\n react_1.useEffect(function () {\n sourceSpecRef.current = sourceSpec;\n });\n // Can't use createSourceFactory, as semantics are different\n var handler = react_1.useMemo(function () {\n return ({\n beginDrag: function (monitor, target) {\n var begin = sourceSpecRef.current.begin;\n return begin(monitor);\n },\n canDrag: function (monitor, target) {\n var canDrag = sourceSpecRef.current.canDrag;\n return canDrag ? canDrag(monitor) : true;\n },\n isDragging: function (monitor, target) {\n var isDragging = sourceSpecRef.current.isDragging;\n return isDragging\n ? isDragging(monitor)\n : target === monitor.getSourceId();\n },\n endDrag: function (monitor, target) {\n var end = sourceSpecRef.current.end;\n if (end) {\n end(monitor);\n }\n },\n });\n }, []);\n return handler;\n}\nexports.useDragSourceHandler = useDragSourceHandler;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/internal/useDragSourceHandler.ts?");
/***/ }),
-/***/ "./src/hooks/useDragSource.ts":
-/*!************************************!*\
- !*** ./src/hooks/useDragSource.ts ***!
- \************************************/
+/***/ "./src/hooks/internal/useDragSourceMonitor.ts":
+/*!****************************************************!*\
+ !*** ./src/hooks/internal/useDragSourceMonitor.ts ***!
+ \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar useDragSourceHandler_1 = __webpack_require__(/*! ./useDragSourceHandler */ \"./src/hooks/useDragSourceHandler.ts\");\nvar useDragDropManager_1 = __webpack_require__(/*! ./useDragDropManager */ \"./src/hooks/useDragDropManager.ts\");\nvar util_1 = __webpack_require__(/*! ./util */ \"./src/hooks/util.ts\");\nvar useMonitorOutput_1 = __webpack_require__(/*! ./useMonitorOutput */ \"./src/hooks/useMonitorOutput.ts\");\nvar useDragSourceMonitor_1 = __webpack_require__(/*! ./useDragSourceMonitor */ \"./src/hooks/useDragSourceMonitor.ts\");\n/**\n * useDragSource hook (This API is experimental and subject to breaking changes in non-major versions)\n * @param ref The drag source element\n * @param type The drag source type\n * @param sourceSpec The drag source specification *\n */\nfunction useDragSource(ref, type, sourceSpec) {\n var manager = useDragDropManager_1.useDragDropManager();\n var backend = manager.getBackend();\n var handler = useDragSourceHandler_1.useDragSourceHandler(sourceSpec);\n var sourceMonitor = useDragSourceMonitor_1.useDragSourceMonitor(type, handler, manager);\n /*\n * Connect the Drag Source Element to the Backend\n */\n react_1.useEffect(function connectDragSource() {\n var dragSourceNode = ref.current;\n var dragSourceOptions = sourceSpec.dragSourceOptions;\n return backend.connectDragSource(sourceMonitor.getHandlerId(), dragSourceNode, dragSourceOptions);\n }, []);\n /*\n * Connect the Drag Previem Element to the Backend\n */\n react_1.useEffect(function connectDragPreview() {\n if (sourceSpec.dragPreview == null) {\n return undefined;\n }\n var dragPreviewNode = util_1.isRef(sourceSpec.dragPreview)\n ? sourceSpec.dragPreview.current\n : sourceSpec.dragPreview;\n var dragPreviewOptions = sourceSpec.dragPreviewOptions;\n return backend.connectDragPreview(sourceMonitor.getHandlerId(), dragPreviewNode, dragPreviewOptions);\n }, []);\n var collector = sourceSpec.collect || (function () { return ({}); });\n return useMonitorOutput_1.useMonitorOutput(sourceMonitor, collector);\n}\nexports.useDragSource = useDragSource;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useDragSource.ts?");
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar registerSource_1 = __webpack_require__(/*! ../../registerSource */ \"./src/registerSource.ts\");\nvar DragSourceMonitorImpl_1 = __webpack_require__(/*! ../../DragSourceMonitorImpl */ \"./src/DragSourceMonitorImpl.ts\");\nfunction useDragSourceMonitor(type, source, manager) {\n var monitor = react_1.useMemo(function () { return new DragSourceMonitorImpl_1.default(manager); }, [manager]);\n react_1.useEffect(function registerSourceWithMonitor() {\n var _a = registerSource_1.default(type, source, manager), handlerId = _a.handlerId, unregister = _a.unregister;\n monitor.receiveHandlerId(handlerId);\n return unregister;\n }, [monitor]);\n return monitor;\n}\nexports.useDragSourceMonitor = useDragSourceMonitor;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/internal/useDragSourceMonitor.ts?");
/***/ }),
-/***/ "./src/hooks/useDragSourceHandler.ts":
-/*!*******************************************!*\
- !*** ./src/hooks/useDragSourceHandler.ts ***!
- \*******************************************/
+/***/ "./src/hooks/internal/useDropTargetHandler.ts":
+/*!****************************************************!*\
+ !*** ./src/hooks/internal/useDropTargetHandler.ts ***!
+ \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nfunction useDragSourceHandler(sourceSpec) {\n var sourceSpecRef = react_1.useRef(sourceSpec);\n react_1.useEffect(function () {\n sourceSpecRef.current = sourceSpec;\n });\n // Can't use createSourceFactory, as semantics are different\n var handler = react_1.useMemo(function () {\n return ({\n beginDrag: function (monitor, target) {\n var beginDrag = sourceSpecRef.current.beginDrag;\n return beginDrag(monitor);\n },\n canDrag: function (monitor, target) {\n var canDrag = sourceSpecRef.current.canDrag;\n return canDrag ? canDrag(monitor) : true;\n },\n isDragging: function (monitor, target) {\n var isDragging = sourceSpecRef.current.isDragging;\n return isDragging\n ? isDragging(monitor)\n : target === monitor.getSourceId();\n },\n endDrag: function (monitor, target) {\n var endDrag = sourceSpecRef.current.endDrag;\n if (endDrag) {\n endDrag(monitor);\n }\n },\n });\n }, []);\n return handler;\n}\nexports.useDragSourceHandler = useDragSourceHandler;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useDragSourceHandler.ts?");
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = __webpack_require__(/*! react */ \"react\");\nfunction useDropTargetHandler(targetSpec) {\n var targetSpecRef = React.useRef(targetSpec);\n React.useEffect(function updateDropTargetSpec() {\n targetSpecRef.current = targetSpec;\n });\n // Can't use createSourceFactory, as semantics are different\n var handler = React.useMemo(function () {\n return ({\n canDrop: function (monitor, targetId) {\n var canDrop = targetSpecRef.current.canDrop;\n return canDrop ? canDrop(monitor) : true;\n },\n hover: function (monitor, targetId) {\n var hover = targetSpecRef.current.hover;\n if (hover) {\n hover(monitor);\n }\n },\n drop: function (monitor, targetId) {\n var drop = targetSpecRef.current.drop;\n if (drop) {\n drop(monitor);\n }\n },\n });\n }, []);\n return handler;\n}\nexports.useDropTargetHandler = useDropTargetHandler;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/internal/useDropTargetHandler.ts?");
/***/ }),
-/***/ "./src/hooks/useDragSourceMonitor.ts":
-/*!*******************************************!*\
- !*** ./src/hooks/useDragSourceMonitor.ts ***!
- \*******************************************/
+/***/ "./src/hooks/internal/useDropTargetMonitor.ts":
+/*!****************************************************!*\
+ !*** ./src/hooks/internal/useDropTargetMonitor.ts ***!
+ \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar registerSource_1 = __webpack_require__(/*! ../registerSource */ \"./src/registerSource.ts\");\nvar DragSourceMonitorImpl_1 = __webpack_require__(/*! ../DragSourceMonitorImpl */ \"./src/DragSourceMonitorImpl.ts\");\nfunction useDragSourceMonitor(type, source, manager) {\n var monitor = react_1.useMemo(function () { return new DragSourceMonitorImpl_1.default(manager); }, [manager]);\n react_1.useEffect(function registerSourceWithMonitor() {\n var _a = registerSource_1.default(type, source, manager), handlerId = _a.handlerId, unregister = _a.unregister;\n monitor.receiveHandlerId(handlerId);\n return unregister;\n }, [monitor]);\n return monitor;\n}\nexports.useDragSourceMonitor = useDragSourceMonitor;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useDragSourceMonitor.ts?");
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar registerTarget_1 = __webpack_require__(/*! ../../registerTarget */ \"./src/registerTarget.ts\");\nvar DropTargetMonitorImpl_1 = __webpack_require__(/*! ../../DropTargetMonitorImpl */ \"./src/DropTargetMonitorImpl.ts\");\nfunction useDropTargetMonitor(type, target, manager) {\n var monitor = react_1.useMemo(function () { return new DropTargetMonitorImpl_1.default(manager); }, [manager]);\n react_1.useEffect(function registerTargetWithMonitor() {\n var _a = registerTarget_1.default(type, target, manager), handlerId = _a.handlerId, unregister = _a.unregister;\n monitor.receiveHandlerId(handlerId);\n return unregister;\n }, [monitor]);\n return monitor;\n}\nexports.useDropTargetMonitor = useDropTargetMonitor;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/internal/useDropTargetMonitor.ts?");
/***/ }),
-/***/ "./src/hooks/useDropTarget.ts":
-/*!************************************!*\
- !*** ./src/hooks/useDropTarget.ts ***!
- \************************************/
+/***/ "./src/hooks/internal/useMonitorOutput.ts":
+/*!************************************************!*\
+ !*** ./src/hooks/internal/useMonitorOutput.ts ***!
+ \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar useDragDropManager_1 = __webpack_require__(/*! ./useDragDropManager */ \"./src/hooks/useDragDropManager.ts\");\nvar useDropTargetHandler_1 = __webpack_require__(/*! ./useDropTargetHandler */ \"./src/hooks/useDropTargetHandler.ts\");\nvar useMonitorOutput_1 = __webpack_require__(/*! ./useMonitorOutput */ \"./src/hooks/useMonitorOutput.ts\");\nvar useDropTargetMonitor_1 = __webpack_require__(/*! ./useDropTargetMonitor */ \"./src/hooks/useDropTargetMonitor.ts\");\n/**\n * useDropTarget Hook (This API is experimental and subject to breaking changes in non-breaking versions)\n * @param ref The drop target's ref\n * @param type The drop target type\n * @param targetSpec The drop target specification\n */\nfunction useDropTarget(ref, type, targetSpec) {\n var manager = useDragDropManager_1.useDragDropManager();\n var backend = manager.getBackend();\n var handler = useDropTargetHandler_1.useDropTargetHandler(targetSpec);\n var targetMonitor = useDropTargetMonitor_1.useDropTargetMonitor(type, handler, manager);\n /*\n * Connect the Drop Target Element to the Backend\n */\n react_1.useEffect(function connectDropTarget() {\n var dropTargetNode = ref.current;\n if (dropTargetNode) {\n var dropTargetOptions = targetSpec.dropTargetOptions;\n return backend.connectDropTarget(targetMonitor.getHandlerId(), dropTargetNode, dropTargetOptions);\n }\n }, []);\n var collector = targetSpec.collect || (function () { return ({}); });\n return useMonitorOutput_1.useMonitorOutput(targetMonitor, collector);\n}\nexports.useDropTarget = useDropTarget;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useDropTarget.ts?");
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar useCollector_1 = __webpack_require__(/*! ./useCollector */ \"./src/hooks/internal/useCollector.ts\");\nfunction useMonitorOutput(monitor, collect) {\n var _a = useCollector_1.useCollector(monitor, collect), collected = _a[0], updateCollected = _a[1];\n // This runs on every render. There will be ways to optimise this, but for\n // now, this is the most correct thing to do.\n react_1.useEffect(function subscribeToMonitorStateChange() {\n var handlerId = monitor.getHandlerId();\n if (handlerId == null) {\n return undefined;\n }\n return monitor.subscribeToStateChange(updateCollected, {\n handlerIds: [handlerId],\n });\n });\n return collected;\n}\nexports.useMonitorOutput = useMonitorOutput;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/internal/useMonitorOutput.ts?");
/***/ }),
-/***/ "./src/hooks/useDropTargetHandler.ts":
-/*!*******************************************!*\
- !*** ./src/hooks/useDropTargetHandler.ts ***!
- \*******************************************/
+/***/ "./src/hooks/useDrag.ts":
+/*!******************************!*\
+ !*** ./src/hooks/useDrag.ts ***!
+ \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = __webpack_require__(/*! react */ \"react\");\nfunction useDropTargetHandler(targetSpec) {\n var targetSpecRef = React.useRef(targetSpec);\n React.useEffect(function updateDropTargetSpec() {\n targetSpecRef.current = targetSpec;\n });\n // Can't use createSourceFactory, as semantics are different\n var handler = React.useMemo(function () {\n return ({\n canDrop: function (monitor, targetId) {\n var canDrop = targetSpecRef.current.canDrop;\n return canDrop ? canDrop(monitor) : true;\n },\n hover: function (monitor, targetId) {\n var hover = targetSpecRef.current.hover;\n if (hover) {\n hover(monitor);\n }\n },\n drop: function (monitor, targetId) {\n var drop = targetSpecRef.current.drop;\n if (drop) {\n drop(monitor);\n }\n },\n });\n }, []);\n return handler;\n}\nexports.useDropTargetHandler = useDropTargetHandler;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useDropTargetHandler.ts?");
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar useDragSourceHandler_1 = __webpack_require__(/*! ./internal/useDragSourceHandler */ \"./src/hooks/internal/useDragSourceHandler.ts\");\nvar useDragDropManager_1 = __webpack_require__(/*! ./internal/useDragDropManager */ \"./src/hooks/internal/useDragDropManager.ts\");\nvar util_1 = __webpack_require__(/*! ./util */ \"./src/hooks/util.ts\");\nvar useMonitorOutput_1 = __webpack_require__(/*! ./internal/useMonitorOutput */ \"./src/hooks/internal/useMonitorOutput.ts\");\nvar useDragSourceMonitor_1 = __webpack_require__(/*! ./internal/useDragSourceMonitor */ \"./src/hooks/internal/useDragSourceMonitor.ts\");\n/**\n * useDragSource hook (This API is experimental and subject to breaking changes in non-major versions)\n * @param sourceSpec The drag source specification *\n */\nfunction useDrag(spec) {\n var ref = spec.ref, type = spec.type, dragSourceOptions = spec.dragSourceOptions, dragPreview = spec.dragPreview, dragPreviewOptions = spec.dragPreviewOptions, collect = spec.collect;\n var manager = useDragDropManager_1.useDragDropManager();\n var backend = manager.getBackend();\n var handler = useDragSourceHandler_1.useDragSourceHandler(spec);\n var sourceMonitor = useDragSourceMonitor_1.useDragSourceMonitor(type, handler, manager);\n /*\n * Connect the Drag Source Element to the Backend\n */\n react_1.useEffect(function connectDragSource() {\n var dragSourceNode = ref.current;\n return backend.connectDragSource(sourceMonitor.getHandlerId(), dragSourceNode, dragSourceOptions);\n }, []);\n /*\n * Connect the Drag Preview Element to the Backend\n */\n react_1.useEffect(function connectDragPreview() {\n if (dragPreview == null) {\n return undefined;\n }\n var dragPreviewNode = util_1.isRef(dragPreview)\n ? dragPreview.current\n : dragPreview;\n return backend.connectDragPreview(sourceMonitor.getHandlerId(), dragPreviewNode, dragPreviewOptions);\n }, []);\n if (collect) {\n return useMonitorOutput_1.useMonitorOutput(sourceMonitor, collect);\n }\n else {\n return {};\n }\n}\nexports.useDrag = useDrag;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useDrag.ts?");
/***/ }),
-/***/ "./src/hooks/useDropTargetMonitor.ts":
-/*!*******************************************!*\
- !*** ./src/hooks/useDropTargetMonitor.ts ***!
- \*******************************************/
+/***/ "./src/hooks/useDragLayer.ts":
+/*!***********************************!*\
+ !*** ./src/hooks/useDragLayer.ts ***!
+ \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar registerTarget_1 = __webpack_require__(/*! ../registerTarget */ \"./src/registerTarget.ts\");\nvar DropTargetMonitorImpl_1 = __webpack_require__(/*! ../DropTargetMonitorImpl */ \"./src/DropTargetMonitorImpl.ts\");\nfunction useDropTargetMonitor(type, target, manager) {\n var monitor = react_1.useMemo(function () { return new DropTargetMonitorImpl_1.default(manager); }, [manager]);\n react_1.useEffect(function registerTargetWithMonitor() {\n var _a = registerTarget_1.default(type, target, manager), handlerId = _a.handlerId, unregister = _a.unregister;\n monitor.receiveHandlerId(handlerId);\n return unregister;\n }, [monitor]);\n return monitor;\n}\nexports.useDropTargetMonitor = useDropTargetMonitor;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useDropTargetMonitor.ts?");
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar useDragDropManager_1 = __webpack_require__(/*! ./internal/useDragDropManager */ \"./src/hooks/internal/useDragDropManager.ts\");\nvar useCollector_1 = __webpack_require__(/*! ./internal/useCollector */ \"./src/hooks/internal/useCollector.ts\");\n/**\n * useDragLayer Hook (This API is experimental and subject to breaking changes in non-breaking versions)\n * @param collector The property collector\n */\nfunction useDragLayer(collect) {\n var dragDropManager = useDragDropManager_1.useDragDropManager();\n var monitor = dragDropManager.getMonitor();\n var _a = useCollector_1.useCollector(monitor, collect), collected = _a[0], updateCollected = _a[1];\n react_1.useEffect(function () { return monitor.subscribeToOffsetChange(updateCollected); });\n react_1.useEffect(function () { return monitor.subscribeToStateChange(updateCollected); });\n return collected;\n}\nexports.useDragLayer = useDragLayer;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useDragLayer.ts?");
/***/ }),
-/***/ "./src/hooks/useMonitorOutput.ts":
-/*!***************************************!*\
- !*** ./src/hooks/useMonitorOutput.ts ***!
- \***************************************/
+/***/ "./src/hooks/useDrop.ts":
+/*!******************************!*\
+ !*** ./src/hooks/useDrop.ts ***!
+ \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar useCollector_1 = __webpack_require__(/*! ./useCollector */ \"./src/hooks/useCollector.ts\");\nfunction useMonitorOutput(monitor, collect) {\n var _a = useCollector_1.useCollector(monitor, collect), collected = _a[0], updateCollected = _a[1];\n // This runs on every render. There will be ways to optimise this, but for\n // now, this is the most correct thing to do.\n react_1.useEffect(function subscribeToMonitorStateChange() {\n var handlerId = monitor.getHandlerId();\n if (handlerId == null) {\n return undefined;\n }\n return monitor.subscribeToStateChange(updateCollected, {\n handlerIds: [handlerId],\n });\n });\n return collected;\n}\nexports.useMonitorOutput = useMonitorOutput;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useMonitorOutput.ts?");
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar useDragDropManager_1 = __webpack_require__(/*! ./internal/useDragDropManager */ \"./src/hooks/internal/useDragDropManager.ts\");\nvar useDropTargetHandler_1 = __webpack_require__(/*! ./internal/useDropTargetHandler */ \"./src/hooks/internal/useDropTargetHandler.ts\");\nvar useMonitorOutput_1 = __webpack_require__(/*! ./internal/useMonitorOutput */ \"./src/hooks/internal/useMonitorOutput.ts\");\nvar useDropTargetMonitor_1 = __webpack_require__(/*! ./internal/useDropTargetMonitor */ \"./src/hooks/internal/useDropTargetMonitor.ts\");\n/**\n * useDropTarget Hook (This API is experimental and subject to breaking changes in non-breaking versions)\n * @param spec The drop target specification\n */\nfunction useDrop(spec) {\n var ref = spec.ref, type = spec.type, dropTargetOptions = spec.dropTargetOptions, collect = spec.collect;\n var manager = useDragDropManager_1.useDragDropManager();\n var backend = manager.getBackend();\n var handler = useDropTargetHandler_1.useDropTargetHandler(spec);\n var targetMonitor = useDropTargetMonitor_1.useDropTargetMonitor(type, handler, manager);\n /*\n * Connect the Drop Target Element to the Backend\n */\n react_1.useEffect(function connectDropTarget() {\n if (ref && ref.current) {\n var dropTargetNode = ref.current;\n if (dropTargetNode) {\n return backend.connectDropTarget(targetMonitor.getHandlerId(), dropTargetNode, dropTargetOptions);\n }\n }\n });\n if (collect) {\n return useMonitorOutput_1.useMonitorOutput(targetMonitor, collect);\n }\n else {\n return {};\n }\n}\nexports.useDrop = useDrop;\n\n\n//# sourceURL=webpack://ReactDnD/./src/hooks/useDrop.ts?");
/***/ }),
@@ -1913,19 +1913,67 @@
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DragDropContext_1 = __webpack_require__(/*! ./DragDropContext */ \"./src/DragDropContext.tsx\");\nexports.DragDropContext = DragDropContext_1.DragDropContext;\nexports.DragDropContextProvider = DragDropContext_1.DragDropContextProvider;\nexports.DragDropContextProviderProps = DragDropContext_1.DragDropContextProviderProps;\nvar DragLayer_1 = __webpack_require__(/*! ./DragLayer */ \"./src/DragLayer.tsx\");\nexports.DragLayer = DragLayer_1.default;\nvar DragSource_1 = __webpack_require__(/*! ./DragSource */ \"./src/DragSource.ts\");\nexports.DragSource = DragSource_1.default;\nvar DropTarget_1 = __webpack_require__(/*! ./DropTarget */ \"./src/DropTarget.ts\");\nexports.DropTarget = DropTarget_1.default;\n__export(__webpack_require__(/*! ./hooks */ \"./src/hooks/index.ts\"));\n__export(__webpack_require__(/*! ./interfaces */ \"./src/interfaces.ts\"));\n\n\n//# sourceURL=webpack://ReactDnD/./src/index.ts?");
+eval("\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar DragDropContext_1 = __webpack_require__(/*! ./DragDropContext */ \"./src/DragDropContext.tsx\");\nexports.DragDropContext = DragDropContext_1.DragDropContext;\nexports.DragDropContextProvider = DragDropContext_1.DragDropContextProvider;\nexports.DragDropContextProviderProps = DragDropContext_1.DragDropContextProviderProps;\nvar DragLayer_1 = __webpack_require__(/*! ./DragLayer */ \"./src/DragLayer.tsx\");\nexports.DragLayer = DragLayer_1.default;\nvar DragSource_1 = __webpack_require__(/*! ./DragSource */ \"./src/DragSource.ts\");\nexports.DragSource = DragSource_1.default;\nvar DropTarget_1 = __webpack_require__(/*! ./DropTarget */ \"./src/DropTarget.ts\");\nexports.DropTarget = DropTarget_1.default;\n__export(__webpack_require__(/*! ./interfaces */ \"./src/interfaces/index.ts\"));\nvar hooks_1 = __webpack_require__(/*! ./hooks */ \"./src/hooks/index.ts\");\nexports.__EXPERIMENTAL_DND_HOOKS_THAT_MAY_CHANGE_AND_BREAK_MY_BUILD__ = {\n useDrag: hooks_1.useDrag,\n useDragLayer: hooks_1.useDragLayer,\n useDrop: hooks_1.useDrop,\n};\n\n\n//# sourceURL=webpack://ReactDnD/./src/index.ts?");
/***/ }),
-/***/ "./src/interfaces.ts":
-/*!***************************!*\
- !*** ./src/interfaces.ts ***!
- \***************************/
+/***/ "./src/interfaces/classApi.ts":
+/*!************************************!*\
+ !*** ./src/interfaces/classApi.ts ***!
+ \************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n\n//# sourceURL=webpack://ReactDnD/./src/interfaces/classApi.ts?");
+
+/***/ }),
+
+/***/ "./src/interfaces/hooksApi.ts":
+/*!************************************!*\
+ !*** ./src/interfaces/hooksApi.ts ***!
+ \************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n\n//# sourceURL=webpack://ReactDnD/./src/interfaces/hooksApi.ts?");
+
+/***/ }),
+
+/***/ "./src/interfaces/index.ts":
+/*!*********************************!*\
+ !*** ./src/interfaces/index.ts ***!
+ \*********************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+eval("\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar dnd_core_1 = __webpack_require__(/*! dnd-core */ \"../dnd-core/lib/cjs/index.js\");\nexports.XYCoord = dnd_core_1.XYCoord;\n__export(__webpack_require__(/*! ./classApi */ \"./src/interfaces/classApi.ts\"));\n__export(__webpack_require__(/*! ./monitors */ \"./src/interfaces/monitors.ts\"));\n__export(__webpack_require__(/*! ./hooksApi */ \"./src/interfaces/hooksApi.ts\"));\n__export(__webpack_require__(/*! ./options */ \"./src/interfaces/options.ts\"));\n\n\n//# sourceURL=webpack://ReactDnD/./src/interfaces/index.ts?");
+
+/***/ }),
+
+/***/ "./src/interfaces/monitors.ts":
+/*!************************************!*\
+ !*** ./src/interfaces/monitors.ts ***!
+ \************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n\n//# sourceURL=webpack://ReactDnD/./src/interfaces/monitors.ts?");
+
+/***/ }),
+
+/***/ "./src/interfaces/options.ts":
+/*!***********************************!*\
+ !*** ./src/interfaces/options.ts ***!
+ \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar dnd_core_1 = __webpack_require__(/*! dnd-core */ \"../dnd-core/lib/cjs/index.js\");\nexports.XYCoord = dnd_core_1.XYCoord;\n\n\n//# sourceURL=webpack://ReactDnD/./src/interfaces.ts?");
+eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n\n//# sourceURL=webpack://ReactDnD/./src/interfaces/options.ts?");
/***/ }),

dist/ReactDnD.min.js

@@ -1,4 +1,4 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactDnD=e(require("react")):t.ReactDnD=e(t.React)}(window,function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=54)}([function(t,e,r){"use strict";t.exports=function(t,e,r,n,o,i,a,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,o,i,a,u],f=0;(c=new Error(e.replace(/%s/g,function(){return s[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,r){e.exports=t},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INIT_COORDS="dnd-core/INIT_COORDS",e.BEGIN_DRAG="dnd-core/BEGIN_DRAG",e.PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",e.HOVER="dnd-core/HOVER",e.DROP="dnd-core/DROP",e.END_DRAG="dnd-core/END_DRAG"},function(t,e,r){var n=r(12),o=r(149),i=r(4),a="[object Object]",u=Function.prototype,c=Object.prototype,s=u.toString,f=c.hasOwnProperty,p=s.call(Object);t.exports=function(t){if(!i(t)||n(t)!=a)return!1;var e=o(t);if(null===e)return!0;var r=f.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==p}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t,e,r,n){var o=r?r.call(n,t,e):void 0;if(void 0!==o)return!!o;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(e),c=0;c<i.length;c++){var s=i[c];if(!u(s))return!1;var f=t[s],p=e[s];if(!1===(o=r?r.call(n,f,p,s):void 0)||void 0===o&&f!==p)return!1}return!0}},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=r(1),u=r(33),c=r(19),s=r(0),f=r(29),p=r(30).default;function d(t,e,r){return{dragDropManager:u.createDragDropManager(t,e,r)}}e.context=a.createContext({dragDropManager:void 0}),e.Consumer=e.context.Consumer,e.Provider=e.context.Provider,e.createChildContext=d,e.DragDropContextProvider=function(t){var r=t.backend,n=t.context,o=t.debugMode,i=t.children,u=d(r,n,o);return a.useEffect(function(){return function(){return u.dragDropManager.dispatch({type:"DragDropContextProvider::Exiting"})}}),a.createElement(e.Provider,{value:u},i)},e.DragDropContext=function(t,r,n){c.default("DragDropContext","backend",t);var u=d(t,r,n);return function(t){var r=t,n=r.displayName||r.name||"Component",c=function(c){function f(){var t=null!==c&&c.apply(this,arguments)||this;return t.ref=a.createRef(),t.getManager=function(){return u.dragDropManager},t}return o(f,c),f.prototype.getDecoratedComponentInstance=function(){return s(this.ref.current,"In order to access an instance of the decorated component it can not be a stateless component."),this.ref.current},f.prototype.render=function(){return a.createElement(e.Provider,{value:u},a.createElement(r,i({},this.props,{ref:p(r)?this.ref:void 0})))},f.DecoratedComponent=t,f.displayName="DragDropContext("+n+")",f}(a.Component);return f(c,t)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(61),o=r(63),i=r(64),a=r(65),u=r(66);!function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(2)),e.default=function(t){return{beginDrag:n.default(t),publishDragSource:o.default(t),hover:i.default(t),drop:a.default(t),endDrag:u.default(t)}}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ADD_SOURCE="dnd-core/ADD_SOURCE",e.ADD_TARGET="dnd-core/ADD_TARGET",e.REMOVE_SOURCE="dnd-core/REMOVE_SOURCE",e.REMOVE_TARGET="dnd-core/REMOVE_TARGET",e.addSource=function(t){return{type:e.ADD_SOURCE,payload:{sourceId:t}}},e.addTarget=function(t){return{type:e.ADD_TARGET,payload:{targetId:t}}},e.removeSource=function(t){return{type:e.REMOVE_SOURCE,payload:{sourceId:t}}},e.removeTarget=function(t){return{type:e.REMOVE_TARGET,payload:{targetId:t}}}},function(t,e,r){var n=r(11)(Object,"create");t.exports=n},function(t,e,r){var n=r(72),o=r(79);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},function(t,e,r){var n=r(13),o=r(74),i=r(75),a="[object Null]",u="[object Undefined]",c=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?u:a:c&&c in Object(t)?o(t):i(t)}},function(t,e,r){var n=r(14).Symbol;t.exports=n},function(t,e,r){var n=r(73),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},function(t,e,r){var n=r(87);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e,r){var n=r(93);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n]}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(38),o=r(97),i=r(98);function a(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},function(t,e,r){var n=r(12),o=r(8),i="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";t.exports=function(t){if(!o(t))return!1;var e=n(t);return e==a||e==u||e==i||e==c}},function(t,e,r){var n=r(99);t.exports=function(t,e){return!(null==t||!t.length)&&n(t,e,0)>-1}},function(t,e){t.exports=function(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,r){var n=r(40),o=r(103),i=r(105);t.exports=function(t,e){return i(o(t,e,n),t+"")}},function(t,e,r){var n=r(110),o=r(4);t.exports=function(t){return o(t)&&n(t)}},function(t,e,r){var n=r(12),o=r(4),i="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||o(t)&&n(t)==i}},function(t,e,r){"use strict";var n=r(146),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function c(t){return n.isMemo(t)?a:u[t.$$typeof]||o}u[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var s=Object.defineProperty,f=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,l=Object.getPrototypeOf,h=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(h){var o=l(r);o&&o!==h&&t(e,o,n)}var a=f(r);p&&(a=a.concat(p(r)));for(var u=c(e),g=c(r),v=0;v<a.length;++v){var y=a[v];if(!(i[y]||n&&n[y]||g&&g[y]||u&&u[y])){var b=d(r,y);try{s(e,y,b)}catch(t){}}}return e}return e}},function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n=function(t){return Boolean(t&&t.prototype&&"function"==typeof t.prototype.render)};e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(6),i=r(0);e.useDragDropManager=function(){var t=n.useContext(o.context).dragDropManager;return i(null!=t,"Expected drag drop context"),t}},function(t,e,r){"use strict";(function(t,n){var o,i=r(53);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:n;var a=Object(i.a)(o);e.a=a}).call(this,r(20),r(58)(t))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),n(r(34)),n(r(55))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(e.HandlerRole||(e.HandlerRole={}))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return null===e?null===t:Array.isArray(t)?t.some(function(t){return t===e}):t===e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.strictEquality=function(t,e){return t===e},e.areCoordsEqual=function(t,e){return!t&&!e||!(!t||!e)&&t.x===e.x&&t.y===e.y},e.areArraysEqual=function(t,r,n){if(void 0===n&&(n=e.strictEquality),t.length!==r.length)return!1;for(var o=0;o<t.length;++o)if(!n(t[o],r[o]))return!1;return!0}},function(t,e,r){var n=r(21),o=r(23),i=r(24),a=r(17),u=r(39),c=r(25),s=200;t.exports=function(t,e,r,f){var p=-1,d=o,l=!0,h=t.length,g=[],v=e.length;if(!h)return g;r&&(e=a(e,u(r))),f?(d=i,l=!1):e.length>=s&&(d=c,l=!1,e=new n(e));t:for(;++p<h;){var y=t[p],b=null==r?y:r(y);if(y=f||0!==y?y:0,l&&b==b){for(var O=v;O--;)if(e[O]===b)continue t;g.push(y)}else d(e,b,f)||g.push(y)}return g}},function(t,e,r){var n=r(69),o=r(92),i=r(94),a=r(95),u=r(96);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){t.exports=function(t){return t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(114);e.NONE=[],e.ALL=[],e.areDirty=function(t,r){return t!==e.NONE&&(t===e.ALL||void 0===r||n(r,t).length>0)}},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=r(1),u=r(6),c=r(152),s=r(30).default,f=(r(3),r(0)),p=r(29),d=r(5);e.default=function(t){var e=t.DecoratedComponent,r=t.createHandler,n=t.createMonitor,l=t.createConnector,h=t.registerHandler,g=t.containerDisplayName,v=t.getType,y=t.collect,b=t.options.arePropsEqual,O=void 0===b?d:b,m=e,_=e.displayName||e.name||"Component",D=function(t){function p(e){var r=t.call(this,e)||this;return r.handleChange=function(){var t=r.getCurrentState();d(t,r.state)||r.setState(t)},r.disposable=new c.SerialDisposable,r.receiveProps(e),r.dispose(),r}return o(p,t),p.prototype.getHandlerId=function(){return this.handlerId},p.prototype.getDecoratedComponentInstance=function(){return this.handler?this.handler.ref.current:null},p.prototype.shouldComponentUpdate=function(t,e){return!O(t,this.props)||!d(e,this.state)},p.prototype.componentDidMount=function(){this.disposable=new c.SerialDisposable,this.currentType=void 0,this.receiveProps(this.props),this.handleChange()},p.prototype.componentDidUpdate=function(t){O(this.props,t)||(this.receiveProps(this.props),this.handleChange())},p.prototype.componentWillUnmount=function(){this.dispose()},p.prototype.receiveProps=function(t){this.handler&&(this.handler.receiveProps(t),this.receiveType(v(t)))},p.prototype.receiveType=function(t){if(this.handlerMonitor&&this.manager&&this.handlerConnector&&t!==this.currentType){this.currentType=t;var e=h(t,this.handler,this.manager),r=e.handlerId,n=e.unregister;this.handlerId=r,this.handlerMonitor.receiveHandlerId(r),this.handlerConnector.receiveHandlerId(r);var o=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[r]});this.disposable.setDisposable(new c.CompositeDisposable(new c.Disposable(o),new c.Disposable(n)))}},p.prototype.dispose=function(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)},p.prototype.getCurrentState=function(){return this.handlerConnector?y(this.handlerConnector.hooks,this.handlerMonitor):{}},p.prototype.render=function(){var t=this;return a.createElement(u.Consumer,null,function(e){var r=e.dragDropManager;return void 0===r?null:(t.receiveDragDropManager(r),a.createElement(m,i({},t.props,t.getCurrentState(),{ref:t.handler&&s(m)?t.handler.ref:void 0})))})},p.prototype.receiveDragDropManager=function(t){void 0===this.manager&&(this.manager=t,f("object"==typeof t,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",_,_),this.handlerMonitor=n(t),this.handlerConnector=l(t.getBackend()),this.handler=r(this.handlerMonitor))},p.DecoratedComponent=e,p.displayName=g+"("+_+")",p}(a.Component);return p(D,e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var n=r.getRegistry(),o=n.addSource(t,e);return{handlerId:o,unregister:function(){return n.removeSource(o)}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=!1,i=!1,a=function(){function t(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}return t.prototype.receiveHandlerId=function(t){this.sourceId=t},t.prototype.getHandlerId=function(){return this.sourceId},t.prototype.canDrag=function(){n(!o,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source-monitor.html");try{return o=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{o=!1}},t.prototype.isDragging=function(){n(!i,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source-monitor.html");try{return i=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{i=!1}},t.prototype.subscribeToStateChange=function(t,e){return this.internalMonitor.subscribeToStateChange(t,e)},t.prototype.isDraggingSource=function(t){return this.internalMonitor.isDraggingSource(t)},t.prototype.isOverTarget=function(t,e){return this.internalMonitor.isOverTarget(t,e)},t.prototype.getTargetIds=function(){return this.internalMonitor.getTargetIds()},t.prototype.isSourcePublic=function(){return this.internalMonitor.isSourcePublic()},t.prototype.getSourceId=function(){return this.internalMonitor.getSourceId()},t.prototype.subscribeToOffsetChange=function(t){return this.internalMonitor.subscribeToOffsetChange(t)},t.prototype.canDragSource=function(t){return this.internalMonitor.canDragSource(t)},t.prototype.canDropOnTarget=function(t){return this.internalMonitor.canDropOnTarget(t)},t.prototype.getItemType=function(){return this.internalMonitor.getItemType()},t.prototype.getItem=function(){return this.internalMonitor.getItem()},t.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},t.prototype.didDrop=function(){return this.internalMonitor.didDrop()},t.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},t}();e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(158);function i(t){return function(e,r){if(void 0===e&&(e=null),void 0===r&&(r=null),n.isValidElement(e)){var i=e;!function(t){if("string"!=typeof t.type){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors.You can either wrap "+e+" into a <div>, or turn it into a drag source or a drop target itself.")}}(i);var a=r?function(e){return t(e,r)}:t;return o.default(i,a)}t(e,r)}}e.default=function(t){var e={};return Object.keys(t).forEach(function(r){var n=i(t[r]);e[r]=function(){return n}}),e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,r){return"string"==typeof e||"symbol"==typeof e||!!r&&Array.isArray(e)&&e.every(function(e){return t(e,!1)})}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var n=r.getRegistry(),o=n.addTarget(t,e);return{handlerId:o,unregister:function(){return n.removeTarget(o)}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=!1,i=function(){function t(t){this.targetId=null,this.internalMonitor=t.getMonitor()}return t.prototype.receiveHandlerId=function(t){this.targetId=t},t.prototype.getHandlerId=function(){return this.targetId},t.prototype.subscribeToStateChange=function(t,e){return this.internalMonitor.subscribeToStateChange(t,e)},t.prototype.canDrop=function(){n(!o,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target-monitor.html");try{return o=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{o=!1}},t.prototype.isOver=function(t){return this.internalMonitor.isOverTarget(this.targetId,t)},t.prototype.getItemType=function(){return this.internalMonitor.getItemType()},t.prototype.getItem=function(){return this.internalMonitor.getItem()},t.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},t.prototype.didDrop=function(){return this.internalMonitor.didDrop()},t.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},t}();e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(52);e.useMonitorOutput=function(t,e){var r=o.useCollector(t,e),i=r[0],a=r[1];return n.useEffect(function(){var e=t.getHandlerId();if(null!=e)return t.subscribeToStateChange(a,{handlerIds:[e]})}),i}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(5);e.useCollector=function(t,e){var r=n.useState(function(){return e(t)}),i=r[0],a=r[1];return[i,function(){var r=e(t);o(i,r)||a(r)}]}},function(t,e,r){"use strict";function n(t){var e,r=t.Symbol;return"function"==typeof r?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}r.d(e,"a",function(){return n})},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0});var o=r(6);e.DragDropContext=o.DragDropContext,e.DragDropContextProvider=o.DragDropContextProvider,e.DragDropContextProviderProps=o.DragDropContextProviderProps;var i=r(148);e.DragLayer=i.default;var a=r(151);e.DragSource=a.default;var u=r(159);e.DropTarget=u.default,n(r(162)),n(r(171))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(56);e.createDragDropManager=function(t,e,r){return new n.default(t,e,r)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(57),o=r(59),i=r(7),a=r(139),u=r(141);var c=function(){function t(t,e,r){void 0===e&&(e={}),void 0===r&&(r=!1);var i=this;this.context=e,this.isSetUp=!1,this.handleRefCountChange=function(){var t=i.store.getState().refCount>0;t&&!i.isSetUp?(i.backend.setup(),i.isSetUp=!0):!t&&i.isSetUp&&(i.backend.teardown(),i.isSetUp=!1)};var c=function(t){var e="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return n.createStore(o.default,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}(r);this.store=c,this.monitor=new a.default(c,new u.default(c)),this.backend=t(this),c.subscribe(this.handleRefCountChange)}return t.prototype.getContext=function(){return this.context},t.prototype.getMonitor=function(){return this.monitor},t.prototype.getBackend=function(){return this.backend},t.prototype.getRegistry=function(){return this.monitor.registry},t.prototype.getActions=function(){var t=this,e=this.store.dispatch;var r=i.default(this);return Object.keys(r).reduce(function(n,o){var i,a=r[o];return n[o]=(i=a,function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=i.apply(t,r);void 0!==o&&e(o)}),n},{})},t.prototype.dispatch=function(t){this.store.dispatch(t)},t}();e.default=c},function(t,e,r){"use strict";r.r(e),r.d(e,"createStore",function(){return u}),r.d(e,"combineReducers",function(){return s}),r.d(e,"bindActionCreators",function(){return p}),r.d(e,"applyMiddleware",function(){return h}),r.d(e,"compose",function(){return l}),r.d(e,"__DO_NOT_USE__ActionTypes",function(){return i});var n=r(32),o=function(){return Math.random().toString(36).substring(7).split("").join(".")},i={INIT:"@@redux/INIT"+o(),REPLACE:"@@redux/REPLACE"+o(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+o()}};function a(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function u(t,e,r){var o;if("function"==typeof e&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function");if("function"==typeof e&&void 0===r&&(r=e,e=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(u)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var c=t,s=e,f=[],p=f,d=!1;function l(){p===f&&(p=f.slice())}function h(){if(d)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function g(t){if("function"!=typeof t)throw new Error("Expected the listener to be a function.");if(d)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var e=!0;return l(),p.push(t),function(){if(e){if(d)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");e=!1,l();var r=p.indexOf(t);p.splice(r,1)}}}function v(t){if(!a(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(d)throw new Error("Reducers may not dispatch actions.");try{d=!0,s=c(s,t)}finally{d=!1}for(var e=f=p,r=0;r<e.length;r++){(0,e[r])()}return t}return v({type:i.INIT}),(o={dispatch:v,subscribe:g,getState:h,replaceReducer:function(t){if("function"!=typeof t)throw new Error("Expected the nextReducer to be a function.");c=t,v({type:i.REPLACE})}})[n.a]=function(){var t,e=g;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new TypeError("Expected the observer to be an object.");function r(){t.next&&t.next(h())}return r(),{unsubscribe:e(r)}}})[n.a]=function(){return this},t},o}function c(t,e){var r=e&&e.type;return"Given "+(r&&'action "'+String(r)+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function s(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var o=e[n];0,"function"==typeof t[o]&&(r[o]=t[o])}var a,u=Object.keys(r);try{!function(t){Object.keys(t).forEach(function(e){var r=t[e];if(void 0===r(void 0,{type:i.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===r(void 0,{type:i.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+i.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(r)}catch(t){a=t}return function(t,e){if(void 0===t&&(t={}),a)throw a;for(var n=!1,o={},i=0;i<u.length;i++){var s=u[i],f=r[s],p=t[s],d=f(p,e);if(void 0===d){var l=c(s,e);throw new Error(l)}o[s]=d,n=n||d!==p}return n?o:t}}function f(t,e){return function(){return e(t.apply(this,arguments))}}function p(t,e){if("function"==typeof t)return f(t,e);if("object"!=typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var r=Object.keys(t),n={},o=0;o<r.length;o++){var i=r[o],a=t[i];"function"==typeof a&&(n[i]=f(a,e))}return n}function d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}function h(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return function(){var r=t.apply(void 0,arguments),n=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=e.map(function(t){return t(o)});return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(e){d(t,e,r[e])})}return t}({},r,{dispatch:n=l.apply(void 0,i)(r.dispatch)})}}}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=r(60),i=r(67),a=r(112),u=r(113),c=r(128),s=r(129);e.default=function(t,e){return void 0===t&&(t={}),{dirtyHandlerIds:u.default(t.dirtyHandlerIds,{type:e.type,payload:n({},e.payload,{prevTargetIds:s(t,"dragOperation.targetIds",[])})}),dragOffset:o.default(t.dragOffset,e),refCount:a.default(t.refCount,e),dragOperation:i.default(t.dragOperation,e),stateId:c.default(t.stateId)}}},function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=r(7),i=r(36),a={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};e.default=function(t,e){void 0===t&&(t=a);var r=e.payload;switch(e.type){case o.INIT_COORDS:case o.BEGIN_DRAG:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case o.HOVER:return i.areCoordsEqual(t.clientOffset,r.clientOffset)?t:n({},t,{clientOffset:r.clientOffset});case o.END_DRAG:case o.DROP:return a;default:return t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(62),o=r(0),i=r(8),a=r(2),u={type:a.INIT_COORDS,payload:{clientOffset:null,sourceClientOffset:null}};e.default=function(t){return function(e,r){void 0===e&&(e=[]),void 0===r&&(r={publishSource:!0});var c=r.publishSource,s=void 0===c||c,f=r.clientOffset,p=r.getSourceClientOffset,d=t.getMonitor(),l=t.getRegistry();t.dispatch(n.setClientOffset(f)),function(t,e,r){o(!e.isDragging(),"Cannot call beginDrag while dragging.");for(var n=0,i=t;n<i.length;n++){var a=i[n];o(r.getSource(a),"Expected sourceIds to be registered.")}}(e,d,l);var h=function(t,e){for(var r=null,n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}(e,d);if(null!==h){var g=null;f&&(function(t){o("function"==typeof t,"When clientOffset is provided, getSourceClientOffset must be a function.")}(p),g=p(h)),t.dispatch(n.setClientOffset(f,g));var v=l.getSource(h).beginDrag(d,h);!function(t){o(i(t),"Item must be an object.")}(v),l.pinSource(h);var y=l.getSourceType(h);return{type:a.BEGIN_DRAG,payload:{itemType:y,item:v,sourceId:h,clientOffset:f||null,sourceClientOffset:g||null,isSourcePublic:!!s}}}t.dispatch(u)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2);e.setClientOffset=function(t,e){return{type:n.INIT_COORDS,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2);e.default=function(t){return function(){if(t.getMonitor().isDragging())return{type:n.PUBLISH_DRAG_SOURCE}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(35),o=r(2),i=r(0);e.default=function(t){return function(e,r){var a=(void 0===r?{}:r).clientOffset;!function(t){i(Array.isArray(t),"Expected targetIds to be an array.")}(e);var u=e.slice(0),c=t.getMonitor(),s=t.getRegistry();return function(t,e,r){i(e.isDragging(),"Cannot call hover while not dragging."),i(!e.didDrop(),"Cannot call hover after drop.");for(var n=0;n<t.length;n++){var o=t[n];i(t.lastIndexOf(o)===n,"Expected targetIds to be unique in the passed array.");var a=r.getTarget(o);i(a,"Expected targetIds to be registered.")}}(u,c,s),function(t,e,r){for(var o=t.length-1;o>=0;o--){var i=t[o],a=e.getTargetType(i);n.default(a,r)||t.splice(o,1)}}(u,s,c.getItemType()),function(t,e,r){for(var n=0,o=t;n<o.length;n++){var i=o[n],a=r.getTarget(i);a.hover(e,i)}}(u,c,s),{type:o.HOVER,payload:{targetIds:u,clientOffset:a||null}}}}},function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=r(2),i=r(0),a=r(8);e.default=function(t){return function(e){void 0===e&&(e={});var r=t.getMonitor(),u=t.getRegistry();!function(t){i(t.isDragging(),"Cannot call drop while not dragging."),i(!t.didDrop(),"Cannot call drop twice during one drag operation.")}(r),function(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}(r).forEach(function(c,s){var f=function(t,e,r,n){var o=r.getTarget(t).drop(n,t);return function(t){i(void 0===t||a(t),"Drop result must either be an object or undefined.")}(o),void 0===o&&(o=0===e?{}:n.getDropResult()),o}(c,s,u,r),p={type:o.DROP,payload:{dropResult:n({},e,f)}};t.dispatch(p)})}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2),o=r(0);e.default=function(t){return function(){var e=t.getMonitor(),r=t.getRegistry();!function(t){o(t.isDragging(),"Cannot call endDrag while not dragging.")}(e);var i=e.getSourceId();return r.getSource(i,!0).endDrag(e,i),r.unpinSource(),{type:n.END_DRAG}}}},function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=r(7),i=r(9),a=r(68),u={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};e.default=function(t,e){void 0===t&&(t=u);var r=e.payload;switch(e.type){case o.BEGIN_DRAG:return n({},t,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case o.PUBLISH_DRAG_SOURCE:return n({},t,{isSourcePublic:!0});case o.HOVER:return n({},t,{targetIds:r.targetIds});case i.REMOVE_TARGET:return-1===t.targetIds.indexOf(r.targetId)?t:n({},t,{targetIds:a(t.targetIds,r.targetId)});case o.DROP:return n({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case o.END_DRAG:return n({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}},function(t,e,r){var n=r(37),o=r(26),i=r(27),a=o(function(t,e){return i(t)?n(t,e):[]});t.exports=a},function(t,e,r){var n=r(70),o=r(84),i=r(91);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},function(t,e,r){var n=r(71),o=r(80),i=r(81),a=r(82),u=r(83);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e,r){var n=r(10);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e,r){var n=r(22),o=r(76),i=r(8),a=r(78),u=/^\[object .+?Constructor\]$/,c=Function.prototype,s=Object.prototype,f=c.toString,p=s.hasOwnProperty,d=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(n(t)?d:u).test(a(t))}},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(20))},function(t,e,r){var n=r(13),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[u]=r:delete t[u]),o}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n,o=r(77),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!i&&i in t}},function(t,e,r){var n=r(14)["__core-js_shared__"];t.exports=n},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(10),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return r===o?void 0:r}return i.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(10),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},function(t,e,r){var n=r(10),o="__lodash_hash_undefined__";t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?o:e,this}},function(t,e,r){var n=r(85),o=r(86),i=r(88),a=r(89),u=r(90);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(15),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():o.call(e,r,1),--this.size,0))}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(15);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(15);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(15);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},function(t,e,r){var n=r(11)(r(14),"Map");t.exports=n},function(t,e,r){var n=r(16);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(16);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(16);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(16);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},function(t,e){var r="__lodash_hash_undefined__";t.exports=function(t){return this.__data__.set(t,r),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(100),o=r(101),i=r(102);t.exports=function(t,e,r){return e==e?i(t,e,r):n(t,o,r)}},function(t,e){t.exports=function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}},function(t,e,r){var n=r(104),o=Math.max;t.exports=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),c=Array(u);++a<u;)c[a]=i[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=i[a];return s[e]=r(c),n(t,this,s)}}},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(106),o=r(109)(n);t.exports=o},function(t,e,r){var n=r(107),o=r(108),i=r(40),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i;t.exports=a},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,r){var n=r(11),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e){var r=800,n=16,o=Date.now;t.exports=function(t){var e=0,i=0;return function(){var a=o(),u=n-(a-i);if(i=a,u>0){if(++e>=r)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){var n=r(22),o=r(111);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},function(t,e){var r=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(9);e.default=function(t,e){switch(void 0===t&&(t=0),e.type){case n.ADD_SOURCE:case n.ADD_TARGET:return t+1;case n.REMOVE_SOURCE:case n.REMOVE_TARGET:return t-1;default:return t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7),o=r(9),i=r(36),a=r(41),u=r(117);e.default=function(t,e){switch(void 0===t&&(t=a.NONE),e.type){case n.HOVER:break;case o.ADD_SOURCE:case o.ADD_TARGET:case o.REMOVE_TARGET:case o.REMOVE_SOURCE:return a.NONE;case n.BEGIN_DRAG:case n.PUBLISH_DRAG_SOURCE:case n.END_DRAG:case n.DROP:default:return a.ALL}var r=e.payload,c=r.targetIds,s=void 0===c?[]:c,f=r.prevTargetIds,p=void 0===f?[]:f,d=u(s,p);if(!(d.length>0)&&i.areArraysEqual(s,p))return a.NONE;var l=p[p.length-1],h=s[s.length-1];return l!==h&&(l&&d.push(l),h&&d.push(h)),d}},function(t,e,r){var n=r(17),o=r(115),i=r(26),a=r(116),u=i(function(t){var e=n(t,a);return e.length&&e[0]===t[0]?o(e):[]});t.exports=u},function(t,e,r){var n=r(21),o=r(23),i=r(24),a=r(17),u=r(39),c=r(25),s=Math.min;t.exports=function(t,e,r){for(var f=r?i:o,p=t[0].length,d=t.length,l=d,h=Array(d),g=1/0,v=[];l--;){var y=t[l];l&&e&&(y=a(y,u(e))),g=s(y.length,g),h[l]=!r&&(e||p>=120&&y.length>=120)?new n(l&&y):void 0}y=t[0];var b=-1,O=h[0];t:for(;++b<p&&v.length<g;){var m=y[b],_=e?e(m):m;if(m=r||0!==m?m:0,!(O?c(O,_):f(v,_,r))){for(l=d;--l;){var D=h[l];if(!(D?c(D,_):f(t[l],_,r)))continue t}O&&O.push(_),v.push(m)}}return v}},function(t,e,r){var n=r(27);t.exports=function(t){return n(t)?t:[]}},function(t,e,r){var n=r(118),o=r(26),i=r(119),a=r(27),u=o(function(t){return i(n(t,a))});t.exports=u},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}},function(t,e,r){var n=r(37),o=r(120),i=r(125);t.exports=function(t,e,r){var a=t.length;if(a<2)return a?i(t[0]):[];for(var u=-1,c=Array(a);++u<a;)for(var s=t[u],f=-1;++f<a;)f!=u&&(c[u]=n(c[u]||s,t[f],e,r));return i(o(c,1),e,r)}},function(t,e,r){var n=r(121),o=r(122);t.exports=function t(e,r,i,a,u){var c=-1,s=e.length;for(i||(i=o),u||(u=[]);++c<s;){var f=e[c];r>0&&i(f)?r>1?t(f,r-1,i,a,u):n(u,f):a||(u[u.length]=f)}return u}},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}},function(t,e,r){var n=r(13),o=r(123),i=r(18),a=n?n.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(a&&t&&t[a])}},function(t,e,r){var n=r(124),o=r(4),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(t){return o(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=c},function(t,e,r){var n=r(12),o=r(4),i="[object Arguments]";t.exports=function(t){return o(t)&&n(t)==i}},function(t,e,r){var n=r(21),o=r(23),i=r(24),a=r(25),u=r(126),c=r(43),s=200;t.exports=function(t,e,r){var f=-1,p=o,d=t.length,l=!0,h=[],g=h;if(r)l=!1,p=i;else if(d>=s){var v=e?null:u(t);if(v)return c(v);l=!1,p=a,g=new n}else g=e?[]:h;t:for(;++f<d;){var y=t[f],b=e?e(y):y;if(y=r||0!==y?y:0,l&&b==b){for(var O=g.length;O--;)if(g[O]===b)continue t;e&&g.push(b),h.push(y)}else p(g,b,r)||(g!==h&&g.push(b),h.push(y))}return h}},function(t,e,r){var n=r(127),o=r(42),i=r(43),a=n&&1/i(new n([,-0]))[1]==1/0?function(t){return new n(t)}:o;t.exports=a},function(t,e,r){var n=r(11)(r(14),"Set");t.exports=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return void 0===t&&(t=0),t+1}},function(t,e,r){var n=r(130);t.exports=function(t,e,r){var o=null==t?void 0:n(t,e);return void 0===o?r:o}},function(t,e,r){var n=r(131),o=r(138);t.exports=function(t,e){for(var r=0,i=(e=n(e,t)).length;null!=t&&r<i;)t=t[o(e[r++])];return r&&r==i?t:void 0}},function(t,e,r){var n=r(18),o=r(132),i=r(133),a=r(136);t.exports=function(t,e){return n(t)?t:o(t,e)?[t]:i(a(t))}},function(t,e,r){var n=r(18),o=r(28),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!o(t))||a.test(t)||!i.test(t)||null!=e&&t in Object(e)}},function(t,e,r){var n=r(134),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,function(t,r,n,o){e.push(n?o.replace(i,"$1"):r||t)}),e});t.exports=a},function(t,e,r){var n=r(135),o=500;t.exports=function(t){var e=n(t,function(t){return r.size===o&&r.clear(),t}),r=e.cache;return e}},function(t,e,r){var n=r(38),o="Expected a function";function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},function(t,e,r){var n=r(137);t.exports=function(t){return null==t?"":n(t)}},function(t,e,r){var n=r(13),o=r(17),i=r(18),a=r(28),u=1/0,c=n?n.prototype:void 0,s=c?c.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return s?s.call(e):"";var r=e+"";return"0"==r&&1/e==-u?"-0":r}},function(t,e,r){var n=r(28),o=1/0;t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(35),o=r(140),i=r(41),a=r(0),u=function(){function t(t,e){this.store=t,this.registry=e}return t.prototype.subscribeToStateChange=function(t,e){var r=this;void 0===e&&(e={handlerIds:void 0});var n=e.handlerIds;a("function"==typeof t,"listener must be a function."),a(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId;return this.store.subscribe(function(){var e=r.store.getState(),a=e.stateId;try{a===o||a===o+1&&!i.areDirty(e.dirtyHandlerIds,n)||t()}finally{o=a}})},t.prototype.subscribeToOffsetChange=function(t){var e=this;a("function"==typeof t,"listener must be a function.");var r=this.store.getState().dragOffset;return this.store.subscribe(function(){var n=e.store.getState().dragOffset;n!==r&&(r=n,t())})},t.prototype.canDragSource=function(t){if(!t)return!1;var e=this.registry.getSource(t);return a(e,"Expected to find a valid source."),!this.isDragging()&&e.canDrag(this,t)},t.prototype.canDropOnTarget=function(t){if(!t)return!1;var e=this.registry.getTarget(t);if(a(e,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var r=this.registry.getTargetType(t),o=this.getItemType();return n.default(r,o)&&e.canDrop(this,t)},t.prototype.isDragging=function(){return Boolean(this.getItemType())},t.prototype.isDraggingSource=function(t){if(!t)return!1;var e=this.registry.getSource(t,!0);return a(e,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&(this.registry.getSourceType(t)===this.getItemType()&&e.isDragging(this,t))},t.prototype.isOverTarget=function(t,e){if(void 0===e&&(e={shallow:!1}),!t)return!1;var r=e.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(t),i=this.getItemType();if(i&&!n.default(o,i))return!1;var a=this.getTargetIds();if(!a.length)return!1;var u=a.indexOf(t);return r?u===a.length-1:u>-1},t.prototype.getItemType=function(){return this.store.getState().dragOperation.itemType},t.prototype.getItem=function(){return this.store.getState().dragOperation.item},t.prototype.getSourceId=function(){return this.store.getState().dragOperation.sourceId},t.prototype.getTargetIds=function(){return this.store.getState().dragOperation.targetIds},t.prototype.getDropResult=function(){return this.store.getState().dragOperation.dropResult},t.prototype.didDrop=function(){return this.store.getState().dragOperation.didDrop},t.prototype.isSourcePublic=function(){return this.store.getState().dragOperation.isSourcePublic},t.prototype.getInitialClientOffset=function(){return this.store.getState().dragOffset.initialClientOffset},t.prototype.getInitialSourceClientOffset=function(){return this.store.getState().dragOffset.initialSourceClientOffset},t.prototype.getClientOffset=function(){return this.store.getState().dragOffset.clientOffset},t.prototype.getSourceClientOffset=function(){return o.getSourceClientOffset(this.store.getState().dragOffset)},t.prototype.getDifferenceFromInitialOffset=function(){return o.getDifferenceFromInitialOffset(this.store.getState().dragOffset)},t}();e.default=u},function(t,e,r){"use strict";function n(t,e){return{x:t.x+e.x,y:t.y+e.y}}function o(t,e){return{x:t.x-e.x,y:t.y-e.y}}Object.defineProperty(e,"__esModule",{value:!0}),e.add=n,e.subtract=o,e.getSourceClientOffset=function(t){var e=t.clientOffset,r=t.initialClientOffset,i=t.initialSourceClientOffset;return e&&r&&i?o(n(e,i),r):null},e.getDifferenceFromInitialOffset=function(t){var e=t.clientOffset,r=t.initialClientOffset;return e&&r?o(e,r):null}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(9),o=r(142),i=r(34),a=r(143),u=r(0),c=r(144);function s(t){switch(t[0]){case"S":return i.HandlerRole.SOURCE;case"T":return i.HandlerRole.TARGET;default:u(!1,"Cannot parse handler ID: "+t)}}function f(t,e){var r=t.entries(),n=!1;do{var o=r.next(),i=o.done;if(o.value[1]===e)return!0;n=i}while(!n);return!1}var p=function(){function t(t){this.store=t,this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null}return t.prototype.addSource=function(t,e){a.validateType(t),a.validateSourceContract(e);var r=this.addHandler(i.HandlerRole.SOURCE,t,e);return this.store.dispatch(n.addSource(r)),r},t.prototype.addTarget=function(t,e){a.validateType(t,!0),a.validateTargetContract(e);var r=this.addHandler(i.HandlerRole.TARGET,t,e);return this.store.dispatch(n.addTarget(r)),r},t.prototype.containsHandler=function(t){return f(this.dragSources,t)||f(this.dropTargets,t)},t.prototype.getSource=function(t,e){return void 0===e&&(e=!1),u(this.isSourceId(t),"Expected a valid source ID."),e&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)},t.prototype.getTarget=function(t){return u(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)},t.prototype.getSourceType=function(t){return u(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)},t.prototype.getTargetType=function(t){return u(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)},t.prototype.isSourceId=function(t){return s(t)===i.HandlerRole.SOURCE},t.prototype.isTargetId=function(t){return s(t)===i.HandlerRole.TARGET},t.prototype.removeSource=function(t){var e=this;u(this.getSource(t),"Expected an existing source."),this.store.dispatch(n.removeSource(t)),c(function(){e.dragSources.delete(t),e.types.delete(t)})},t.prototype.removeTarget=function(t){u(this.getTarget(t),"Expected an existing target."),this.store.dispatch(n.removeTarget(t)),this.dropTargets.delete(t),this.types.delete(t)},t.prototype.pinSource=function(t){var e=this.getSource(t);u(e,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=e},t.prototype.unpinSource=function(){u(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null},t.prototype.addHandler=function(t,e,r){var n=function(t){var e=o.default().toString();switch(t){case i.HandlerRole.SOURCE:return"S"+e;case i.HandlerRole.TARGET:return"T"+e;default:throw new Error("Unknown Handler Role: "+t)}}(t);return this.types.set(n,e),t===i.HandlerRole.SOURCE?this.dragSources.set(n,r):t===i.HandlerRole.TARGET&&this.dropTargets.set(n,r),n},t}();e.default=p},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=0;e.default=function(){return n++}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0);e.validateSourceContract=function(t){n("function"==typeof t.canDrag,"Expected canDrag to be a function."),n("function"==typeof t.beginDrag,"Expected beginDrag to be a function."),n("function"==typeof t.endDrag,"Expected endDrag to be a function.")},e.validateTargetContract=function(t){n("function"==typeof t.canDrop,"Expected canDrop to be a function."),n("function"==typeof t.hover,"Expected hover to be a function."),n("function"==typeof t.drop,"Expected beginDrag to be a function.")},e.validateType=function t(e,r){r&&Array.isArray(e)?e.forEach(function(e){return t(e,!1)}):n("string"==typeof e||"symbol"==typeof e,r?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}},function(t,e,r){"use strict";var n=r(145),o=[],i=[],a=n.makeRequestCallFromTimer(function(){if(i.length)throw i.shift()});function u(t){var e;(e=o.length?o.pop():new c).task=t,n(e)}function c(){this.task=null}t.exports=u,c.prototype.call=function(){try{this.task.call()}catch(t){u.onerror?u.onerror(t):(i.push(t),a())}finally{this.task=null,o[o.length]=this}}},function(t,e,r){"use strict";(function(e){function r(t){o.length||(n(),!0),o[o.length]=t}t.exports=r;var n,o=[],i=0,a=1024;function u(){for(;i<o.length;){var t=i;if(i+=1,o[t].call(),i>a){for(var e=0,r=o.length-i;e<r;e++)o[e]=o[e+i];o.length-=i,i=0}}o.length=0,i=0,!1}var c,s,f,p=void 0!==e?e:self,d=p.MutationObserver||p.WebKitMutationObserver;function l(t){return function(){var e=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(e),clearInterval(r),t()}}}"function"==typeof d?(c=1,s=new d(u),f=document.createTextNode(""),s.observe(f,{characterData:!0}),n=function(){c=-c,f.data=c}):n=l(u),r.requestFlush=n,r.makeRequestCallFromTimer=l}).call(this,r(20))},function(t,e,r){"use strict";t.exports=r(147)},function(t,e,r){"use strict";
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactDnD=e(require("react")):t.ReactDnD=e(t.React)}(window,function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=54)}([function(t,e,r){"use strict";t.exports=function(t,e,r,n,o,i,u,a){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,o,i,u,a],f=0;(c=new Error(e.replace(/%s/g,function(){return s[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,r){e.exports=t},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INIT_COORDS="dnd-core/INIT_COORDS",e.BEGIN_DRAG="dnd-core/BEGIN_DRAG",e.PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",e.HOVER="dnd-core/HOVER",e.DROP="dnd-core/DROP",e.END_DRAG="dnd-core/END_DRAG"},function(t,e,r){var n=r(12),o=r(149),i=r(4),u="[object Object]",a=Function.prototype,c=Object.prototype,s=a.toString,f=c.hasOwnProperty,p=s.call(Object);t.exports=function(t){if(!i(t)||n(t)!=u)return!1;var e=o(t);if(null===e)return!0;var r=f.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==p}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t,e,r,n){var o=r?r.call(n,t,e):void 0;if(void 0!==o)return!!o;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var i=Object.keys(t),u=Object.keys(e);if(i.length!==u.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(e),c=0;c<i.length;c++){var s=i[c];if(!a(s))return!1;var f=t[s],p=e[s];if(!1===(o=r?r.call(n,f,p,s):void 0)||void 0===o&&f!==p)return!1}return!0}},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var u=r(1),a=r(33),c=r(19),s=r(0),f=r(29),p=r(30).default;function d(t,e,r){return{dragDropManager:a.createDragDropManager(t,e,r)}}e.context=u.createContext({dragDropManager:void 0}),e.Consumer=e.context.Consumer,e.Provider=e.context.Provider,e.createChildContext=d,e.DragDropContextProvider=function(t){var r=t.backend,n=t.context,o=t.debugMode,i=t.children,a=d(r,n,o);return u.useEffect(function(){return function(){return a.dragDropManager.dispatch({type:"DragDropContextProvider::Exiting"})}}),u.createElement(e.Provider,{value:a},i)},e.DragDropContext=function(t,r,n){c.default("DragDropContext","backend",t);var a=d(t,r,n);return function(t){var r=t,n=r.displayName||r.name||"Component",c=function(c){function f(){var t=null!==c&&c.apply(this,arguments)||this;return t.ref=u.createRef(),t.getManager=function(){return a.dragDropManager},t}return o(f,c),f.prototype.getDecoratedComponentInstance=function(){return s(this.ref.current,"In order to access an instance of the decorated component it can not be a stateless component."),this.ref.current},f.prototype.render=function(){return u.createElement(e.Provider,{value:a},u.createElement(r,i({},this.props,{ref:p(r)?this.ref:void 0})))},f.DecoratedComponent=t,f.displayName="DragDropContext("+n+")",f}(u.Component);return f(c,t)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(61),o=r(63),i=r(64),u=r(65),a=r(66);!function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(2)),e.default=function(t){return{beginDrag:n.default(t),publishDragSource:o.default(t),hover:i.default(t),drop:u.default(t),endDrag:a.default(t)}}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ADD_SOURCE="dnd-core/ADD_SOURCE",e.ADD_TARGET="dnd-core/ADD_TARGET",e.REMOVE_SOURCE="dnd-core/REMOVE_SOURCE",e.REMOVE_TARGET="dnd-core/REMOVE_TARGET",e.addSource=function(t){return{type:e.ADD_SOURCE,payload:{sourceId:t}}},e.addTarget=function(t){return{type:e.ADD_TARGET,payload:{targetId:t}}},e.removeSource=function(t){return{type:e.REMOVE_SOURCE,payload:{sourceId:t}}},e.removeTarget=function(t){return{type:e.REMOVE_TARGET,payload:{targetId:t}}}},function(t,e,r){var n=r(11)(Object,"create");t.exports=n},function(t,e,r){var n=r(72),o=r(79);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},function(t,e,r){var n=r(13),o=r(74),i=r(75),u="[object Null]",a="[object Undefined]",c=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:u:c&&c in Object(t)?o(t):i(t)}},function(t,e,r){var n=r(14).Symbol;t.exports=n},function(t,e,r){var n=r(73),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},function(t,e,r){var n=r(87);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e,r){var n=r(93);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n]}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(38),o=r(97),i=r(98);function u(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}u.prototype.add=u.prototype.push=o,u.prototype.has=i,t.exports=u},function(t,e,r){var n=r(12),o=r(8),i="[object AsyncFunction]",u="[object Function]",a="[object GeneratorFunction]",c="[object Proxy]";t.exports=function(t){if(!o(t))return!1;var e=n(t);return e==u||e==a||e==i||e==c}},function(t,e,r){var n=r(99);t.exports=function(t,e){return!(null==t||!t.length)&&n(t,e,0)>-1}},function(t,e){t.exports=function(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,r){var n=r(40),o=r(103),i=r(105);t.exports=function(t,e){return i(o(t,e,n),t+"")}},function(t,e,r){var n=r(110),o=r(4);t.exports=function(t){return o(t)&&n(t)}},function(t,e,r){var n=r(12),o=r(4),i="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||o(t)&&n(t)==i}},function(t,e,r){"use strict";var n=r(146),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function c(t){return n.isMemo(t)?u:a[t.$$typeof]||o}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var s=Object.defineProperty,f=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,l=Object.getPrototypeOf,h=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(h){var o=l(r);o&&o!==h&&t(e,o,n)}var u=f(r);p&&(u=u.concat(p(r)));for(var a=c(e),g=c(r),v=0;v<u.length;++v){var y=u[v];if(!(i[y]||n&&n[y]||g&&g[y]||a&&a[y])){var b=d(r,y);try{s(e,y,b)}catch(t){}}}return e}return e}},function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n=function(t){return Boolean(t&&t.prototype&&"function"==typeof t.prototype.render)};e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(6),i=r(0);e.useDragDropManager=function(){var t=n.useContext(o.context).dragDropManager;return i(null!=t,"Expected drag drop context"),t}},function(t,e,r){"use strict";(function(t,n){var o,i=r(53);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:n;var u=Object(i.a)(o);e.a=u}).call(this,r(20),r(58)(t))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),n(r(34)),n(r(55))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(e.HandlerRole||(e.HandlerRole={}))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return null===e?null===t:Array.isArray(t)?t.some(function(t){return t===e}):t===e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.strictEquality=function(t,e){return t===e},e.areCoordsEqual=function(t,e){return!t&&!e||!(!t||!e)&&t.x===e.x&&t.y===e.y},e.areArraysEqual=function(t,r,n){if(void 0===n&&(n=e.strictEquality),t.length!==r.length)return!1;for(var o=0;o<t.length;++o)if(!n(t[o],r[o]))return!1;return!0}},function(t,e,r){var n=r(21),o=r(23),i=r(24),u=r(17),a=r(39),c=r(25),s=200;t.exports=function(t,e,r,f){var p=-1,d=o,l=!0,h=t.length,g=[],v=e.length;if(!h)return g;r&&(e=u(e,a(r))),f?(d=i,l=!1):e.length>=s&&(d=c,l=!1,e=new n(e));t:for(;++p<h;){var y=t[p],b=null==r?y:r(y);if(y=f||0!==y?y:0,l&&b==b){for(var O=v;O--;)if(e[O]===b)continue t;g.push(y)}else d(e,b,f)||g.push(y)}return g}},function(t,e,r){var n=r(69),o=r(92),i=r(94),u=r(95),a=r(96);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){t.exports=function(t){return t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(114);e.NONE=[],e.ALL=[],e.areDirty=function(t,r){return t!==e.NONE&&(t===e.ALL||void 0===r||n(r,t).length>0)}},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var u=r(1),a=r(6),c=r(152),s=r(30).default,f=(r(3),r(0)),p=r(29),d=r(5);e.default=function(t){var e=t.DecoratedComponent,r=t.createHandler,n=t.createMonitor,l=t.createConnector,h=t.registerHandler,g=t.containerDisplayName,v=t.getType,y=t.collect,b=t.options.arePropsEqual,O=void 0===b?d:b,m=e,_=e.displayName||e.name||"Component",D=function(t){function p(e){var r=t.call(this,e)||this;return r.handleChange=function(){var t=r.getCurrentState();d(t,r.state)||r.setState(t)},r.disposable=new c.SerialDisposable,r.receiveProps(e),r.dispose(),r}return o(p,t),p.prototype.getHandlerId=function(){return this.handlerId},p.prototype.getDecoratedComponentInstance=function(){return this.handler?this.handler.ref.current:null},p.prototype.shouldComponentUpdate=function(t,e){return!O(t,this.props)||!d(e,this.state)},p.prototype.componentDidMount=function(){this.disposable=new c.SerialDisposable,this.currentType=void 0,this.receiveProps(this.props),this.handleChange()},p.prototype.componentDidUpdate=function(t){O(this.props,t)||(this.receiveProps(this.props),this.handleChange())},p.prototype.componentWillUnmount=function(){this.dispose()},p.prototype.receiveProps=function(t){this.handler&&(this.handler.receiveProps(t),this.receiveType(v(t)))},p.prototype.receiveType=function(t){if(this.handlerMonitor&&this.manager&&this.handlerConnector&&t!==this.currentType){this.currentType=t;var e=h(t,this.handler,this.manager),r=e.handlerId,n=e.unregister;this.handlerId=r,this.handlerMonitor.receiveHandlerId(r),this.handlerConnector.receiveHandlerId(r);var o=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[r]});this.disposable.setDisposable(new c.CompositeDisposable(new c.Disposable(o),new c.Disposable(n)))}},p.prototype.dispose=function(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)},p.prototype.getCurrentState=function(){return this.handlerConnector?y(this.handlerConnector.hooks,this.handlerMonitor):{}},p.prototype.render=function(){var t=this;return u.createElement(a.Consumer,null,function(e){var r=e.dragDropManager;return void 0===r?null:(t.receiveDragDropManager(r),u.createElement(m,i({},t.props,t.getCurrentState(),{ref:t.handler&&s(m)?t.handler.ref:void 0})))})},p.prototype.receiveDragDropManager=function(t){void 0===this.manager&&(this.manager=t,f("object"==typeof t,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",_,_),this.handlerMonitor=n(t),this.handlerConnector=l(t.getBackend()),this.handler=r(this.handlerMonitor))},p.DecoratedComponent=e,p.displayName=g+"("+_+")",p}(u.Component);return p(D,e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var n=r.getRegistry(),o=n.addSource(t,e);return{handlerId:o,unregister:function(){return n.removeSource(o)}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=!1,i=!1,u=function(){function t(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}return t.prototype.receiveHandlerId=function(t){this.sourceId=t},t.prototype.getHandlerId=function(){return this.sourceId},t.prototype.canDrag=function(){n(!o,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source-monitor.html");try{return o=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{o=!1}},t.prototype.isDragging=function(){n(!i,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source-monitor.html");try{return i=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{i=!1}},t.prototype.subscribeToStateChange=function(t,e){return this.internalMonitor.subscribeToStateChange(t,e)},t.prototype.isDraggingSource=function(t){return this.internalMonitor.isDraggingSource(t)},t.prototype.isOverTarget=function(t,e){return this.internalMonitor.isOverTarget(t,e)},t.prototype.getTargetIds=function(){return this.internalMonitor.getTargetIds()},t.prototype.isSourcePublic=function(){return this.internalMonitor.isSourcePublic()},t.prototype.getSourceId=function(){return this.internalMonitor.getSourceId()},t.prototype.subscribeToOffsetChange=function(t){return this.internalMonitor.subscribeToOffsetChange(t)},t.prototype.canDragSource=function(t){return this.internalMonitor.canDragSource(t)},t.prototype.canDropOnTarget=function(t){return this.internalMonitor.canDropOnTarget(t)},t.prototype.getItemType=function(){return this.internalMonitor.getItemType()},t.prototype.getItem=function(){return this.internalMonitor.getItem()},t.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},t.prototype.didDrop=function(){return this.internalMonitor.didDrop()},t.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},t}();e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(158);function i(t){return function(e,r){if(void 0===e&&(e=null),void 0===r&&(r=null),n.isValidElement(e)){var i=e;!function(t){if("string"!=typeof t.type){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors.You can either wrap "+e+" into a <div>, or turn it into a drag source or a drop target itself.")}}(i);var u=r?function(e){return t(e,r)}:t;return o.default(i,u)}t(e,r)}}e.default=function(t){var e={};return Object.keys(t).forEach(function(r){var n=i(t[r]);e[r]=function(){return n}}),e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,r){return"string"==typeof e||"symbol"==typeof e||!!r&&Array.isArray(e)&&e.every(function(e){return t(e,!1)})}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var n=r.getRegistry(),o=n.addTarget(t,e);return{handlerId:o,unregister:function(){return n.removeTarget(o)}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),o=!1,i=function(){function t(t){this.targetId=null,this.internalMonitor=t.getMonitor()}return t.prototype.receiveHandlerId=function(t){this.targetId=t},t.prototype.getHandlerId=function(){return this.targetId},t.prototype.subscribeToStateChange=function(t,e){return this.internalMonitor.subscribeToStateChange(t,e)},t.prototype.canDrop=function(){n(!o,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target-monitor.html");try{return o=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{o=!1}},t.prototype.isOver=function(t){return this.internalMonitor.isOverTarget(this.targetId,t)},t.prototype.getItemType=function(){return this.internalMonitor.getItemType()},t.prototype.getItem=function(){return this.internalMonitor.getItem()},t.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},t.prototype.didDrop=function(){return this.internalMonitor.didDrop()},t.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},t}();e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(52);e.useMonitorOutput=function(t,e){var r=o.useCollector(t,e),i=r[0],u=r[1];return n.useEffect(function(){var e=t.getHandlerId();if(null!=e)return t.subscribeToStateChange(u,{handlerIds:[e]})}),i}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(5);e.useCollector=function(t,e){var r=n.useState(function(){return e(t)}),i=r[0],u=r[1];return[i,function(){var r=e(t);o(i,r)||u(r)}]}},function(t,e,r){"use strict";function n(t){var e,r=t.Symbol;return"function"==typeof r?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}r.d(e,"a",function(){return n})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6);e.DragDropContext=n.DragDropContext,e.DragDropContextProvider=n.DragDropContextProvider,e.DragDropContextProviderProps=n.DragDropContextProviderProps;var o=r(148);e.DragLayer=o.default;var i=r(151);e.DragSource=i.default;var u=r(159);e.DropTarget=u.default,function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(162));var a=r(167);e.__EXPERIMENTAL_DND_HOOKS_THAT_MAY_CHANGE_AND_BREAK_MY_BUILD__={useDrag:a.useDrag,useDragLayer:a.useDragLayer,useDrop:a.useDrop}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(56);e.createDragDropManager=function(t,e,r){return new n.default(t,e,r)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(57),o=r(59),i=r(7),u=r(139),a=r(141);var c=function(){function t(t,e,r){void 0===e&&(e={}),void 0===r&&(r=!1);var i=this;this.context=e,this.isSetUp=!1,this.handleRefCountChange=function(){var t=i.store.getState().refCount>0;t&&!i.isSetUp?(i.backend.setup(),i.isSetUp=!0):!t&&i.isSetUp&&(i.backend.teardown(),i.isSetUp=!1)};var c=function(t){var e="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return n.createStore(o.default,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}(r);this.store=c,this.monitor=new u.default(c,new a.default(c)),this.backend=t(this),c.subscribe(this.handleRefCountChange)}return t.prototype.getContext=function(){return this.context},t.prototype.getMonitor=function(){return this.monitor},t.prototype.getBackend=function(){return this.backend},t.prototype.getRegistry=function(){return this.monitor.registry},t.prototype.getActions=function(){var t=this,e=this.store.dispatch;var r=i.default(this);return Object.keys(r).reduce(function(n,o){var i,u=r[o];return n[o]=(i=u,function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=i.apply(t,r);void 0!==o&&e(o)}),n},{})},t.prototype.dispatch=function(t){this.store.dispatch(t)},t}();e.default=c},function(t,e,r){"use strict";r.r(e),r.d(e,"createStore",function(){return a}),r.d(e,"combineReducers",function(){return s}),r.d(e,"bindActionCreators",function(){return p}),r.d(e,"applyMiddleware",function(){return h}),r.d(e,"compose",function(){return l}),r.d(e,"__DO_NOT_USE__ActionTypes",function(){return i});var n=r(32),o=function(){return Math.random().toString(36).substring(7).split("").join(".")},i={INIT:"@@redux/INIT"+o(),REPLACE:"@@redux/REPLACE"+o(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+o()}};function u(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function a(t,e,r){var o;if("function"==typeof e&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function");if("function"==typeof e&&void 0===r&&(r=e,e=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(a)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var c=t,s=e,f=[],p=f,d=!1;function l(){p===f&&(p=f.slice())}function h(){if(d)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function g(t){if("function"!=typeof t)throw new Error("Expected the listener to be a function.");if(d)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var e=!0;return l(),p.push(t),function(){if(e){if(d)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");e=!1,l();var r=p.indexOf(t);p.splice(r,1)}}}function v(t){if(!u(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(d)throw new Error("Reducers may not dispatch actions.");try{d=!0,s=c(s,t)}finally{d=!1}for(var e=f=p,r=0;r<e.length;r++){(0,e[r])()}return t}return v({type:i.INIT}),(o={dispatch:v,subscribe:g,getState:h,replaceReducer:function(t){if("function"!=typeof t)throw new Error("Expected the nextReducer to be a function.");c=t,v({type:i.REPLACE})}})[n.a]=function(){var t,e=g;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new TypeError("Expected the observer to be an object.");function r(){t.next&&t.next(h())}return r(),{unsubscribe:e(r)}}})[n.a]=function(){return this},t},o}function c(t,e){var r=e&&e.type;return"Given "+(r&&'action "'+String(r)+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function s(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var o=e[n];0,"function"==typeof t[o]&&(r[o]=t[o])}var u,a=Object.keys(r);try{!function(t){Object.keys(t).forEach(function(e){var r=t[e];if(void 0===r(void 0,{type:i.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===r(void 0,{type:i.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+i.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(r)}catch(t){u=t}return function(t,e){if(void 0===t&&(t={}),u)throw u;for(var n=!1,o={},i=0;i<a.length;i++){var s=a[i],f=r[s],p=t[s],d=f(p,e);if(void 0===d){var l=c(s,e);throw new Error(l)}o[s]=d,n=n||d!==p}return n?o:t}}function f(t,e){return function(){return e(t.apply(this,arguments))}}function p(t,e){if("function"==typeof t)return f(t,e);if("object"!=typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var r=Object.keys(t),n={},o=0;o<r.length;o++){var i=r[o],u=t[i];"function"==typeof u&&(n[i]=f(u,e))}return n}function d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}function h(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return function(){var r=t.apply(void 0,arguments),n=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=e.map(function(t){return t(o)});return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(e){d(t,e,r[e])})}return t}({},r,{dispatch:n=l.apply(void 0,i)(r.dispatch)})}}}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=r(60),i=r(67),u=r(112),a=r(113),c=r(128),s=r(129);e.default=function(t,e){return void 0===t&&(t={}),{dirtyHandlerIds:a.default(t.dirtyHandlerIds,{type:e.type,payload:n({},e.payload,{prevTargetIds:s(t,"dragOperation.targetIds",[])})}),dragOffset:o.default(t.dragOffset,e),refCount:u.default(t.refCount,e),dragOperation:i.default(t.dragOperation,e),stateId:c.default(t.stateId)}}},function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=r(7),i=r(36),u={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};e.default=function(t,e){void 0===t&&(t=u);var r=e.payload;switch(e.type){case o.INIT_COORDS:case o.BEGIN_DRAG:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case o.HOVER:return i.areCoordsEqual(t.clientOffset,r.clientOffset)?t:n({},t,{clientOffset:r.clientOffset});case o.END_DRAG:case o.DROP:return u;default:return t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(62),o=r(0),i=r(8),u=r(2),a={type:u.INIT_COORDS,payload:{clientOffset:null,sourceClientOffset:null}};e.default=function(t){return function(e,r){void 0===e&&(e=[]),void 0===r&&(r={publishSource:!0});var c=r.publishSource,s=void 0===c||c,f=r.clientOffset,p=r.getSourceClientOffset,d=t.getMonitor(),l=t.getRegistry();t.dispatch(n.setClientOffset(f)),function(t,e,r){o(!e.isDragging(),"Cannot call beginDrag while dragging.");for(var n=0,i=t;n<i.length;n++){var u=i[n];o(r.getSource(u),"Expected sourceIds to be registered.")}}(e,d,l);var h=function(t,e){for(var r=null,n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}(e,d);if(null!==h){var g=null;f&&(function(t){o("function"==typeof t,"When clientOffset is provided, getSourceClientOffset must be a function.")}(p),g=p(h)),t.dispatch(n.setClientOffset(f,g));var v=l.getSource(h).beginDrag(d,h);!function(t){o(i(t),"Item must be an object.")}(v),l.pinSource(h);var y=l.getSourceType(h);return{type:u.BEGIN_DRAG,payload:{itemType:y,item:v,sourceId:h,clientOffset:f||null,sourceClientOffset:g||null,isSourcePublic:!!s}}}t.dispatch(a)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2);e.setClientOffset=function(t,e){return{type:n.INIT_COORDS,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2);e.default=function(t){return function(){if(t.getMonitor().isDragging())return{type:n.PUBLISH_DRAG_SOURCE}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(35),o=r(2),i=r(0);e.default=function(t){return function(e,r){var u=(void 0===r?{}:r).clientOffset;!function(t){i(Array.isArray(t),"Expected targetIds to be an array.")}(e);var a=e.slice(0),c=t.getMonitor(),s=t.getRegistry();return function(t,e,r){i(e.isDragging(),"Cannot call hover while not dragging."),i(!e.didDrop(),"Cannot call hover after drop.");for(var n=0;n<t.length;n++){var o=t[n];i(t.lastIndexOf(o)===n,"Expected targetIds to be unique in the passed array.");var u=r.getTarget(o);i(u,"Expected targetIds to be registered.")}}(a,c,s),function(t,e,r){for(var o=t.length-1;o>=0;o--){var i=t[o],u=e.getTargetType(i);n.default(u,r)||t.splice(o,1)}}(a,s,c.getItemType()),function(t,e,r){for(var n=0,o=t;n<o.length;n++){var i=o[n],u=r.getTarget(i);u.hover(e,i)}}(a,c,s),{type:o.HOVER,payload:{targetIds:a,clientOffset:u||null}}}}},function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=r(2),i=r(0),u=r(8);e.default=function(t){return function(e){void 0===e&&(e={});var r=t.getMonitor(),a=t.getRegistry();!function(t){i(t.isDragging(),"Cannot call drop while not dragging."),i(!t.didDrop(),"Cannot call drop twice during one drag operation.")}(r),function(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}(r).forEach(function(c,s){var f=function(t,e,r,n){var o=r.getTarget(t).drop(n,t);return function(t){i(void 0===t||u(t),"Drop result must either be an object or undefined.")}(o),void 0===o&&(o=0===e?{}:n.getDropResult()),o}(c,s,a,r),p={type:o.DROP,payload:{dropResult:n({},e,f)}};t.dispatch(p)})}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2),o=r(0);e.default=function(t){return function(){var e=t.getMonitor(),r=t.getRegistry();!function(t){o(t.isDragging(),"Cannot call endDrag while not dragging.")}(e);var i=e.getSourceId();return r.getSource(i,!0).endDrag(e,i),r.unpinSource(),{type:n.END_DRAG}}}},function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var o=r(7),i=r(9),u=r(68),a={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};e.default=function(t,e){void 0===t&&(t=a);var r=e.payload;switch(e.type){case o.BEGIN_DRAG:return n({},t,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case o.PUBLISH_DRAG_SOURCE:return n({},t,{isSourcePublic:!0});case o.HOVER:return n({},t,{targetIds:r.targetIds});case i.REMOVE_TARGET:return-1===t.targetIds.indexOf(r.targetId)?t:n({},t,{targetIds:u(t.targetIds,r.targetId)});case o.DROP:return n({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case o.END_DRAG:return n({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}},function(t,e,r){var n=r(37),o=r(26),i=r(27),u=o(function(t,e){return i(t)?n(t,e):[]});t.exports=u},function(t,e,r){var n=r(70),o=r(84),i=r(91);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},function(t,e,r){var n=r(71),o=r(80),i=r(81),u=r(82),a=r(83);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},function(t,e,r){var n=r(10);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e,r){var n=r(22),o=r(76),i=r(8),u=r(78),a=/^\[object .+?Constructor\]$/,c=Function.prototype,s=Object.prototype,f=c.toString,p=s.hasOwnProperty,d=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(n(t)?d:a).test(u(t))}},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(20))},function(t,e,r){var n=r(13),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(t){}var o=u.call(t);return n&&(e?t[a]=r:delete t[a]),o}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n,o=r(77),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!i&&i in t}},function(t,e,r){var n=r(14)["__core-js_shared__"];t.exports=n},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(10),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return r===o?void 0:r}return i.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(10),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},function(t,e,r){var n=r(10),o="__lodash_hash_undefined__";t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?o:e,this}},function(t,e,r){var n=r(85),o=r(86),i=r(88),u=r(89),a=r(90);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(15),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():o.call(e,r,1),--this.size,0))}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(15);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(15);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(15);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},function(t,e,r){var n=r(11)(r(14),"Map");t.exports=n},function(t,e,r){var n=r(16);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(16);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(16);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(16);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},function(t,e){var r="__lodash_hash_undefined__";t.exports=function(t){return this.__data__.set(t,r),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(100),o=r(101),i=r(102);t.exports=function(t,e,r){return e==e?i(t,e,r):n(t,o,r)}},function(t,e){t.exports=function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}},function(t,e,r){var n=r(104),o=Math.max;t.exports=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,u=-1,a=o(i.length-e,0),c=Array(a);++u<a;)c[u]=i[e+u];u=-1;for(var s=Array(e+1);++u<e;)s[u]=i[u];return s[e]=r(c),n(t,this,s)}}},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(106),o=r(109)(n);t.exports=o},function(t,e,r){var n=r(107),o=r(108),i=r(40),u=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i;t.exports=u},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,r){var n=r(11),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e){var r=800,n=16,o=Date.now;t.exports=function(t){var e=0,i=0;return function(){var u=o(),a=n-(u-i);if(i=u,a>0){if(++e>=r)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){var n=r(22),o=r(111);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},function(t,e){var r=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(9);e.default=function(t,e){switch(void 0===t&&(t=0),e.type){case n.ADD_SOURCE:case n.ADD_TARGET:return t+1;case n.REMOVE_SOURCE:case n.REMOVE_TARGET:return t-1;default:return t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7),o=r(9),i=r(36),u=r(41),a=r(117);e.default=function(t,e){switch(void 0===t&&(t=u.NONE),e.type){case n.HOVER:break;case o.ADD_SOURCE:case o.ADD_TARGET:case o.REMOVE_TARGET:case o.REMOVE_SOURCE:return u.NONE;case n.BEGIN_DRAG:case n.PUBLISH_DRAG_SOURCE:case n.END_DRAG:case n.DROP:default:return u.ALL}var r=e.payload,c=r.targetIds,s=void 0===c?[]:c,f=r.prevTargetIds,p=void 0===f?[]:f,d=a(s,p);if(!(d.length>0)&&i.areArraysEqual(s,p))return u.NONE;var l=p[p.length-1],h=s[s.length-1];return l!==h&&(l&&d.push(l),h&&d.push(h)),d}},function(t,e,r){var n=r(17),o=r(115),i=r(26),u=r(116),a=i(function(t){var e=n(t,u);return e.length&&e[0]===t[0]?o(e):[]});t.exports=a},function(t,e,r){var n=r(21),o=r(23),i=r(24),u=r(17),a=r(39),c=r(25),s=Math.min;t.exports=function(t,e,r){for(var f=r?i:o,p=t[0].length,d=t.length,l=d,h=Array(d),g=1/0,v=[];l--;){var y=t[l];l&&e&&(y=u(y,a(e))),g=s(y.length,g),h[l]=!r&&(e||p>=120&&y.length>=120)?new n(l&&y):void 0}y=t[0];var b=-1,O=h[0];t:for(;++b<p&&v.length<g;){var m=y[b],_=e?e(m):m;if(m=r||0!==m?m:0,!(O?c(O,_):f(v,_,r))){for(l=d;--l;){var D=h[l];if(!(D?c(D,_):f(t[l],_,r)))continue t}O&&O.push(_),v.push(m)}}return v}},function(t,e,r){var n=r(27);t.exports=function(t){return n(t)?t:[]}},function(t,e,r){var n=r(118),o=r(26),i=r(119),u=r(27),a=o(function(t){return i(n(t,u))});t.exports=a},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[o++]=u)}return i}},function(t,e,r){var n=r(37),o=r(120),i=r(125);t.exports=function(t,e,r){var u=t.length;if(u<2)return u?i(t[0]):[];for(var a=-1,c=Array(u);++a<u;)for(var s=t[a],f=-1;++f<u;)f!=a&&(c[a]=n(c[a]||s,t[f],e,r));return i(o(c,1),e,r)}},function(t,e,r){var n=r(121),o=r(122);t.exports=function t(e,r,i,u,a){var c=-1,s=e.length;for(i||(i=o),a||(a=[]);++c<s;){var f=e[c];r>0&&i(f)?r>1?t(f,r-1,i,u,a):n(a,f):u||(a[a.length]=f)}return a}},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}},function(t,e,r){var n=r(13),o=r(123),i=r(18),u=n?n.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(u&&t&&t[u])}},function(t,e,r){var n=r(124),o=r(4),i=Object.prototype,u=i.hasOwnProperty,a=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(t){return o(t)&&u.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},function(t,e,r){var n=r(12),o=r(4),i="[object Arguments]";t.exports=function(t){return o(t)&&n(t)==i}},function(t,e,r){var n=r(21),o=r(23),i=r(24),u=r(25),a=r(126),c=r(43),s=200;t.exports=function(t,e,r){var f=-1,p=o,d=t.length,l=!0,h=[],g=h;if(r)l=!1,p=i;else if(d>=s){var v=e?null:a(t);if(v)return c(v);l=!1,p=u,g=new n}else g=e?[]:h;t:for(;++f<d;){var y=t[f],b=e?e(y):y;if(y=r||0!==y?y:0,l&&b==b){for(var O=g.length;O--;)if(g[O]===b)continue t;e&&g.push(b),h.push(y)}else p(g,b,r)||(g!==h&&g.push(b),h.push(y))}return h}},function(t,e,r){var n=r(127),o=r(42),i=r(43),u=n&&1/i(new n([,-0]))[1]==1/0?function(t){return new n(t)}:o;t.exports=u},function(t,e,r){var n=r(11)(r(14),"Set");t.exports=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return void 0===t&&(t=0),t+1}},function(t,e,r){var n=r(130);t.exports=function(t,e,r){var o=null==t?void 0:n(t,e);return void 0===o?r:o}},function(t,e,r){var n=r(131),o=r(138);t.exports=function(t,e){for(var r=0,i=(e=n(e,t)).length;null!=t&&r<i;)t=t[o(e[r++])];return r&&r==i?t:void 0}},function(t,e,r){var n=r(18),o=r(132),i=r(133),u=r(136);t.exports=function(t,e){return n(t)?t:o(t,e)?[t]:i(u(t))}},function(t,e,r){var n=r(18),o=r(28),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!o(t))||u.test(t)||!i.test(t)||null!=e&&t in Object(e)}},function(t,e,r){var n=r(134),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,u=n(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,function(t,r,n,o){e.push(n?o.replace(i,"$1"):r||t)}),e});t.exports=u},function(t,e,r){var n=r(135),o=500;t.exports=function(t){var e=n(t,function(t){return r.size===o&&r.clear(),t}),r=e.cache;return e}},function(t,e,r){var n=r(38),o="Expected a function";function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var u=t.apply(this,n);return r.cache=i.set(o,u)||i,u};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},function(t,e,r){var n=r(137);t.exports=function(t){return null==t?"":n(t)}},function(t,e,r){var n=r(13),o=r(17),i=r(18),u=r(28),a=1/0,c=n?n.prototype:void 0,s=c?c.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(u(e))return s?s.call(e):"";var r=e+"";return"0"==r&&1/e==-a?"-0":r}},function(t,e,r){var n=r(28),o=1/0;t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(35),o=r(140),i=r(41),u=r(0),a=function(){function t(t,e){this.store=t,this.registry=e}return t.prototype.subscribeToStateChange=function(t,e){var r=this;void 0===e&&(e={handlerIds:void 0});var n=e.handlerIds;u("function"==typeof t,"listener must be a function."),u(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId;return this.store.subscribe(function(){var e=r.store.getState(),u=e.stateId;try{u===o||u===o+1&&!i.areDirty(e.dirtyHandlerIds,n)||t()}finally{o=u}})},t.prototype.subscribeToOffsetChange=function(t){var e=this;u("function"==typeof t,"listener must be a function.");var r=this.store.getState().dragOffset;return this.store.subscribe(function(){var n=e.store.getState().dragOffset;n!==r&&(r=n,t())})},t.prototype.canDragSource=function(t){if(!t)return!1;var e=this.registry.getSource(t);return u(e,"Expected to find a valid source."),!this.isDragging()&&e.canDrag(this,t)},t.prototype.canDropOnTarget=function(t){if(!t)return!1;var e=this.registry.getTarget(t);if(u(e,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var r=this.registry.getTargetType(t),o=this.getItemType();return n.default(r,o)&&e.canDrop(this,t)},t.prototype.isDragging=function(){return Boolean(this.getItemType())},t.prototype.isDraggingSource=function(t){if(!t)return!1;var e=this.registry.getSource(t,!0);return u(e,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&(this.registry.getSourceType(t)===this.getItemType()&&e.isDragging(this,t))},t.prototype.isOverTarget=function(t,e){if(void 0===e&&(e={shallow:!1}),!t)return!1;var r=e.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(t),i=this.getItemType();if(i&&!n.default(o,i))return!1;var u=this.getTargetIds();if(!u.length)return!1;var a=u.indexOf(t);return r?a===u.length-1:a>-1},t.prototype.getItemType=function(){return this.store.getState().dragOperation.itemType},t.prototype.getItem=function(){return this.store.getState().dragOperation.item},t.prototype.getSourceId=function(){return this.store.getState().dragOperation.sourceId},t.prototype.getTargetIds=function(){return this.store.getState().dragOperation.targetIds},t.prototype.getDropResult=function(){return this.store.getState().dragOperation.dropResult},t.prototype.didDrop=function(){return this.store.getState().dragOperation.didDrop},t.prototype.isSourcePublic=function(){return this.store.getState().dragOperation.isSourcePublic},t.prototype.getInitialClientOffset=function(){return this.store.getState().dragOffset.initialClientOffset},t.prototype.getInitialSourceClientOffset=function(){return this.store.getState().dragOffset.initialSourceClientOffset},t.prototype.getClientOffset=function(){return this.store.getState().dragOffset.clientOffset},t.prototype.getSourceClientOffset=function(){return o.getSourceClientOffset(this.store.getState().dragOffset)},t.prototype.getDifferenceFromInitialOffset=function(){return o.getDifferenceFromInitialOffset(this.store.getState().dragOffset)},t}();e.default=a},function(t,e,r){"use strict";function n(t,e){return{x:t.x+e.x,y:t.y+e.y}}function o(t,e){return{x:t.x-e.x,y:t.y-e.y}}Object.defineProperty(e,"__esModule",{value:!0}),e.add=n,e.subtract=o,e.getSourceClientOffset=function(t){var e=t.clientOffset,r=t.initialClientOffset,i=t.initialSourceClientOffset;return e&&r&&i?o(n(e,i),r):null},e.getDifferenceFromInitialOffset=function(t){var e=t.clientOffset,r=t.initialClientOffset;return e&&r?o(e,r):null}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(9),o=r(142),i=r(34),u=r(143),a=r(0),c=r(144);function s(t){switch(t[0]){case"S":return i.HandlerRole.SOURCE;case"T":return i.HandlerRole.TARGET;default:a(!1,"Cannot parse handler ID: "+t)}}function f(t,e){var r=t.entries(),n=!1;do{var o=r.next(),i=o.done;if(o.value[1]===e)return!0;n=i}while(!n);return!1}var p=function(){function t(t){this.store=t,this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null}return t.prototype.addSource=function(t,e){u.validateType(t),u.validateSourceContract(e);var r=this.addHandler(i.HandlerRole.SOURCE,t,e);return this.store.dispatch(n.addSource(r)),r},t.prototype.addTarget=function(t,e){u.validateType(t,!0),u.validateTargetContract(e);var r=this.addHandler(i.HandlerRole.TARGET,t,e);return this.store.dispatch(n.addTarget(r)),r},t.prototype.containsHandler=function(t){return f(this.dragSources,t)||f(this.dropTargets,t)},t.prototype.getSource=function(t,e){return void 0===e&&(e=!1),a(this.isSourceId(t),"Expected a valid source ID."),e&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)},t.prototype.getTarget=function(t){return a(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)},t.prototype.getSourceType=function(t){return a(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)},t.prototype.getTargetType=function(t){return a(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)},t.prototype.isSourceId=function(t){return s(t)===i.HandlerRole.SOURCE},t.prototype.isTargetId=function(t){return s(t)===i.HandlerRole.TARGET},t.prototype.removeSource=function(t){var e=this;a(this.getSource(t),"Expected an existing source."),this.store.dispatch(n.removeSource(t)),c(function(){e.dragSources.delete(t),e.types.delete(t)})},t.prototype.removeTarget=function(t){a(this.getTarget(t),"Expected an existing target."),this.store.dispatch(n.removeTarget(t)),this.dropTargets.delete(t),this.types.delete(t)},t.prototype.pinSource=function(t){var e=this.getSource(t);a(e,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=e},t.prototype.unpinSource=function(){a(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null},t.prototype.addHandler=function(t,e,r){var n=function(t){var e=o.default().toString();switch(t){case i.HandlerRole.SOURCE:return"S"+e;case i.HandlerRole.TARGET:return"T"+e;default:throw new Error("Unknown Handler Role: "+t)}}(t);return this.types.set(n,e),t===i.HandlerRole.SOURCE?this.dragSources.set(n,r):t===i.HandlerRole.TARGET&&this.dropTargets.set(n,r),n},t}();e.default=p},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=0;e.default=function(){return n++}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0);e.validateSourceContract=function(t){n("function"==typeof t.canDrag,"Expected canDrag to be a function."),n("function"==typeof t.beginDrag,"Expected beginDrag to be a function."),n("function"==typeof t.endDrag,"Expected endDrag to be a function.")},e.validateTargetContract=function(t){n("function"==typeof t.canDrop,"Expected canDrop to be a function."),n("function"==typeof t.hover,"Expected hover to be a function."),n("function"==typeof t.drop,"Expected beginDrag to be a function.")},e.validateType=function t(e,r){r&&Array.isArray(e)?e.forEach(function(e){return t(e,!1)}):n("string"==typeof e||"symbol"==typeof e,r?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}},function(t,e,r){"use strict";var n=r(145),o=[],i=[],u=n.makeRequestCallFromTimer(function(){if(i.length)throw i.shift()});function a(t){var e;(e=o.length?o.pop():new c).task=t,n(e)}function c(){this.task=null}t.exports=a,c.prototype.call=function(){try{this.task.call()}catch(t){a.onerror?a.onerror(t):(i.push(t),u())}finally{this.task=null,o[o.length]=this}}},function(t,e,r){"use strict";(function(e){function r(t){o.length||(n(),!0),o[o.length]=t}t.exports=r;var n,o=[],i=0,u=1024;function a(){for(;i<o.length;){var t=i;if(i+=1,o[t].call(),i>u){for(var e=0,r=o.length-i;e<r;e++)o[e]=o[e+i];o.length-=i,i=0}}o.length=0,i=0,!1}var c,s,f,p=void 0!==e?e:self,d=p.MutationObserver||p.WebKitMutationObserver;function l(t){return function(){var e=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(e),clearInterval(r),t()}}}"function"==typeof d?(c=1,s=new d(a),f=document.createTextNode(""),s.observe(f,{characterData:!0}),n=function(){c=-c,f.data=c}):n=l(a),r.requestFlush=n,r.makeRequestCallFromTimer=l}).call(this,r(20))},function(t,e,r){"use strict";t.exports=r(147)},function(t,e,r){"use strict";
/** @license React v16.8.4
* react-is.production.min.js
*
@@ -6,4 +6,4 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,f=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,l=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116;function y(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case o:switch(t=t.type){case p:case d:case a:case c:case u:case h:return t;default:switch(t=t&&t.$$typeof){case f:case l:case s:return t;default:return e}}case v:case g:case i:return e}}}function b(t){return y(t)===d}e.typeOf=y,e.AsyncMode=p,e.ConcurrentMode=d,e.ContextConsumer=f,e.ContextProvider=s,e.Element=o,e.ForwardRef=l,e.Fragment=a,e.Lazy=v,e.Memo=g,e.Portal=i,e.Profiler=c,e.StrictMode=u,e.Suspense=h,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===a||t===d||t===c||t===u||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===g||t.$$typeof===s||t.$$typeof===f||t.$$typeof===l)},e.isAsyncMode=function(t){return b(t)||y(t)===p},e.isConcurrentMode=b,e.isContextConsumer=function(t){return y(t)===f},e.isContextProvider=function(t){return y(t)===s},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===o},e.isForwardRef=function(t){return y(t)===l},e.isFragment=function(t){return y(t)===a},e.isLazy=function(t){return y(t)===v},e.isMemo=function(t){return y(t)===g},e.isPortal=function(t){return y(t)===i},e.isProfiler=function(t){return y(t)===c},e.isStrictMode=function(t){return y(t)===u},e.isSuspense=function(t){return y(t)===h}},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=r(1),u=r(19),c=r(6),s=r(29),f=r(3),p=r(0),d=r(5),l=r(30).default;e.default=function(t,e){return void 0===e&&(e={}),u.default("DragLayer","collect[, options]",t,e),p("function"==typeof t,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html",t),p(f(e),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html',e),function(r){var n=r,u=e.arePropsEqual,f=void 0===u?d:u,h=n.displayName||n.name||"Component",g=function(e){function u(){var t=null!==e&&e.apply(this,arguments)||this;return t.isCurrentlyMounted=!1,t.ref=a.createRef(),t.handleChange=function(){if(t.isCurrentlyMounted){var e=t.getCurrentState();d(e,t.state)||t.setState(e)}},t}return o(u,e),u.prototype.getDecoratedComponentInstance=function(){return p(this.ref.current,"In order to access an instance of the decorated component it can not be a stateless component."),this.ref.current},u.prototype.shouldComponentUpdate=function(t,e){return!f(t,this.props)||!d(e,this.state)},u.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0,this.handleChange()},u.prototype.componentWillUnmount=function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange&&(this.unsubscribeFromOffsetChange(),this.unsubscribeFromOffsetChange=void 0),this.unsubscribeFromStateChange&&(this.unsubscribeFromStateChange(),this.unsubscribeFromStateChange=void 0)},u.prototype.render=function(){var t=this;return a.createElement(c.Consumer,null,function(e){var r=e.dragDropManager;return void 0===r?null:(t.receiveDragDropManager(r),t.isCurrentlyMounted?a.createElement(n,i({},t.props,t.state,{ref:l(n)?t.ref:void 0})):null)})},u.prototype.receiveDragDropManager=function(t){if(void 0===this.manager){this.manager=t,p("object"==typeof t,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",h,h);var e=this.manager.getMonitor();this.unsubscribeFromOffsetChange=e.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=e.subscribeToStateChange(this.handleChange)}},u.prototype.getCurrentState=function(){if(!this.manager)return{};var e=this.manager.getMonitor();return t(e,this.props)},u.displayName="DragLayer("+h+")",u.DecoratedComponent=r,u}(a.Component);return s(g,r)}}},function(t,e,r){var n=r(150)(Object.getPrototypeOf,Object);t.exports=n},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(19),o=r(44),i=r(45),a=r(156),u=r(46),c=r(157),s=r(48),f=r(0),p=r(3);e.default=function(t,e,r,d){void 0===d&&(d={}),n.default("DragSource","type, spec, collect[, options]",t,e,r,d);var l=t;"function"!=typeof t&&(f(s.default(t),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',t),l=function(){return t}),f(p(e),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',e);var h=a.default(e);return f("function"==typeof r,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',r),f(p(d),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',r),function(t){return o.default({containerDisplayName:"DragSource",createHandler:h,registerHandler:i.default,createMonitor:function(t){return new u.default(t)},createConnector:c.default,DecoratedComponent:t,getType:l,collect:r,options:d})}}},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),n(r(153)),n(r(154)),n(r(155))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(22),o=r(42),i=function(){function t(t){this.isDisposed=!1,this.action=n(t)?t:o}return t.isDisposable=function(t){return t&&n(t.dispose)},t._fixup=function(e){return t.isDisposable(e)?e:t.empty},t.create=function(e){return new t(e)},t.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)},t.empty={dispose:o},t}();e.Disposable=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.isDisposed=!1}return t.prototype.getDisposable=function(){return this.current},t.prototype.setDisposable=function(t){var e=this.isDisposed;if(!e){var r=this.current;this.current=t,r&&r.dispose()}e&&t&&t.dispose()},t.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.current;this.current=void 0,t&&t.dispose()}},t}();e.SerialDisposable=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.isDisposed=!1,this.disposables=t}return t.prototype.add=function(t){this.isDisposed?t.dispose():this.disposables.push(t)},t.prototype.remove=function(t){var e=!1;if(!this.isDisposed){var r=this.disposables.indexOf(t);-1!==r&&(e=!0,this.disposables.splice(r,1),t.dispose())}return e},t.prototype.clear=function(){if(!this.isDisposed){for(var t=this.disposables.length,e=new Array(t),r=0;r<t;r++)e[r]=this.disposables[r];this.disposables=[];for(r=0;r<t;r++)e[r].dispose()}},t.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var t=this.disposables.length,e=new Array(t),r=0;r<t;r++)e[r]=this.disposables[r];this.disposables=[];for(r=0;r<t;r++)e[r].dispose()}},t}();e.CompositeDisposable=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(0),i=(r(3),["canDrag","beginDrag","isDragging","endDrag"]),a=["beginDrag"];e.default=function(t){Object.keys(t).forEach(function(e){o(i.indexOf(e)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',i.join(", "),e),o("function"==typeof t[e],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",e,e,t[e])}),a.forEach(function(e){o("function"==typeof t[e],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",e,e,t[e])});var e=function(){function e(e){var r=this;this.monitor=e,this.props=null,this.ref=n.createRef(),this.beginDrag=function(){if(r.props)return t.beginDrag(r.props,r.monitor,r.ref.current)}}return e.prototype.receiveProps=function(t){this.props=t},e.prototype.canDrag=function(){return!!this.props&&(!t.canDrag||t.canDrag(this.props,this.monitor))},e.prototype.isDragging=function(e,r){return!!this.props&&(t.isDragging?t.isDragging(this.props,this.monitor):r===e.getSourceId())},e.prototype.endDrag=function(){this.props&&t.endDrag&&t.endDrag(this.props,this.monitor,this.ref.current)},e}();return function(t){return new e(t)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(47),o=r(5);e.default=function(t){var e,r,i,a,u,c,s;function f(){a&&(a(),a=void 0),e&&r&&(a=t.connectDragSource(e,r,i))}function p(){s&&(s(),s=void 0),e&&u&&(s=t.connectDragPreview(e,u,c))}return{receiveHandlerId:function(t){t!==e&&(e=t,f(),p())},hooks:n.default({dragSource:function(t,e){t===r&&o(e,i)||(r=t,i=e,f())},dragPreview:function(t,e){t===u&&o(e,c)||(u=t,c=e,p())}})}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(0);function i(t,e){"function"==typeof t?t(e):t.current=e}e.default=function(t,e){var r=t.ref;return o("string"!=typeof r,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),r?n.cloneElement(t,{ref:function(t){i(e,t),r&&i(r,t)}}):n.cloneElement(t,{ref:e})}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(19),o=r(44),i=r(49),a=r(160),u=r(161),c=r(48),s=r(50),f=r(0),p=r(3);e.default=function(t,e,r,d){void 0===d&&(d={}),n.default("DropTarget","type, spec, collect[, options]",t,e,r,d);var l=t;"function"!=typeof t&&(f(c.default(t,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',t),l=function(){return t}),f(p(e),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',e);var h=a.default(e);return f("function"==typeof r,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',r),f(p(d),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',r),function(t){return o.default({containerDisplayName:"DropTarget",createHandler:h,registerHandler:i.default,createMonitor:function(t){return new s.default(t)},createConnector:u.default,DecoratedComponent:t,getType:l,collect:r,options:d})}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(0),i=(r(3),["canDrop","hover","drop"]);e.default=function(t){Object.keys(t).forEach(function(e){o(i.indexOf(e)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',i.join(", "),e),o("function"==typeof t[e],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html",e,e,t[e])});var e=function(){function e(t){this.monitor=t,this.props=null,this.ref=n.createRef()}return e.prototype.receiveProps=function(t){this.props=t},e.prototype.receiveMonitor=function(t){this.monitor=t},e.prototype.canDrop=function(){return!t.canDrop||t.canDrop(this.props,this.monitor)},e.prototype.hover=function(){t.hover&&t.hover(this.props,this.monitor,this.ref.current)},e.prototype.drop=function(){if(t.drop)return t.drop(this.props,this.monitor,this.ref.current)},e}();return function(t){return new e(t)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(47),o=r(5);e.default=function(t){var e,r,i,a;function u(){a&&(a(),a=void 0),e&&r&&(a=t.connectDropTarget(e,r,i))}return{receiveHandlerId:function(t){t!==e&&(e=t,u())},hooks:n.default({dropTarget:function(t,e){t===r&&o(e,i)||(r=t,i=e,u())}})}}},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),n(r(163)),n(r(167)),n(r(170))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(164),i=r(31),a=r(165),u=r(51),c=r(166);e.useDragSource=function(t,e,r){var s=i.useDragDropManager(),f=s.getBackend(),p=o.useDragSourceHandler(r),d=c.useDragSourceMonitor(e,p,s);n.useEffect(function(){var e=t.current,n=r.dragSourceOptions;return f.connectDragSource(d.getHandlerId(),e,n)},[]),n.useEffect(function(){if(null!=r.dragPreview){var t=a.isRef(r.dragPreview)?r.dragPreview.current:r.dragPreview,e=r.dragPreviewOptions;return f.connectDragPreview(d.getHandlerId(),t,e)}},[]);var l=r.collect||function(){return{}};return u.useMonitorOutput(d,l)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1);e.useDragSourceHandler=function(t){var e=n.useRef(t);return n.useEffect(function(){e.current=t}),n.useMemo(function(){return{beginDrag:function(t,r){return(0,e.current.beginDrag)(t)},canDrag:function(t,r){var n=e.current.canDrag;return!n||n(t)},isDragging:function(t,r){var n=e.current.isDragging;return n?n(t):r===t.getSourceId()},endDrag:function(t,r){var n=e.current.endDrag;n&&n(t)}}},[])}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isRef=function(t){if(null!==t&&"object"==typeof t){var e=Object.keys(t);return 1===e.length&&"current"===e[0]}return!1}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(45),i=r(46);e.useDragSourceMonitor=function(t,e,r){var a=n.useMemo(function(){return new i.default(r)},[r]);return n.useEffect(function(){var n=o.default(t,e,r),i=n.handlerId,u=n.unregister;return a.receiveHandlerId(i),u},[a]),a}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(31),i=r(168),a=r(51),u=r(169);e.useDropTarget=function(t,e,r){var c=o.useDragDropManager(),s=c.getBackend(),f=i.useDropTargetHandler(r),p=u.useDropTargetMonitor(e,f,c);n.useEffect(function(){var e=t.current;if(e){var n=r.dropTargetOptions;return s.connectDropTarget(p.getHandlerId(),e,n)}},[]);var d=r.collect||function(){return{}};return a.useMonitorOutput(p,d)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1);e.useDropTargetHandler=function(t){var e=n.useRef(t);return n.useEffect(function(){e.current=t}),n.useMemo(function(){return{canDrop:function(t,r){var n=e.current.canDrop;return!n||n(t)},hover:function(t,r){var n=e.current.hover;n&&n(t)},drop:function(t,r){var n=e.current.drop;n&&n(t)}}},[])}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(49),i=r(50);e.useDropTargetMonitor=function(t,e,r){var a=n.useMemo(function(){return new i.default(r)},[r]);return n.useEffect(function(){var n=o.default(t,e,r),i=n.handlerId,u=n.unregister;return a.receiveHandlerId(i),u},[a]),a}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(31),i=r(52);e.useDragLayer=function(t){var e=o.useDragDropManager().getMonitor(),r=i.useCollector(e,t),a=r[0],u=r[1];return n.useEffect(function(){return e.subscribeToOffsetChange(u)}),n.useEffect(function(){return e.subscribeToStateChange(u)}),a}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(33);e.XYCoord=n.XYCoord}])});
\ No newline at end of file
+ */Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,u=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,f=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,l=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116;function y(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case o:switch(t=t.type){case p:case d:case u:case c:case a:case h:return t;default:switch(t=t&&t.$$typeof){case f:case l:case s:return t;default:return e}}case v:case g:case i:return e}}}function b(t){return y(t)===d}e.typeOf=y,e.AsyncMode=p,e.ConcurrentMode=d,e.ContextConsumer=f,e.ContextProvider=s,e.Element=o,e.ForwardRef=l,e.Fragment=u,e.Lazy=v,e.Memo=g,e.Portal=i,e.Profiler=c,e.StrictMode=a,e.Suspense=h,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===u||t===d||t===c||t===a||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===g||t.$$typeof===s||t.$$typeof===f||t.$$typeof===l)},e.isAsyncMode=function(t){return b(t)||y(t)===p},e.isConcurrentMode=b,e.isContextConsumer=function(t){return y(t)===f},e.isContextProvider=function(t){return y(t)===s},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===o},e.isForwardRef=function(t){return y(t)===l},e.isFragment=function(t){return y(t)===u},e.isLazy=function(t){return y(t)===v},e.isMemo=function(t){return y(t)===g},e.isPortal=function(t){return y(t)===i},e.isProfiler=function(t){return y(t)===c},e.isStrictMode=function(t){return y(t)===a},e.isSuspense=function(t){return y(t)===h}},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var u=r(1),a=r(19),c=r(6),s=r(29),f=r(3),p=r(0),d=r(5),l=r(30).default;e.default=function(t,e){return void 0===e&&(e={}),a.default("DragLayer","collect[, options]",t,e),p("function"==typeof t,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html",t),p(f(e),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html',e),function(r){var n=r,a=e.arePropsEqual,f=void 0===a?d:a,h=n.displayName||n.name||"Component",g=function(e){function a(){var t=null!==e&&e.apply(this,arguments)||this;return t.isCurrentlyMounted=!1,t.ref=u.createRef(),t.handleChange=function(){if(t.isCurrentlyMounted){var e=t.getCurrentState();d(e,t.state)||t.setState(e)}},t}return o(a,e),a.prototype.getDecoratedComponentInstance=function(){return p(this.ref.current,"In order to access an instance of the decorated component it can not be a stateless component."),this.ref.current},a.prototype.shouldComponentUpdate=function(t,e){return!f(t,this.props)||!d(e,this.state)},a.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0,this.handleChange()},a.prototype.componentWillUnmount=function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange&&(this.unsubscribeFromOffsetChange(),this.unsubscribeFromOffsetChange=void 0),this.unsubscribeFromStateChange&&(this.unsubscribeFromStateChange(),this.unsubscribeFromStateChange=void 0)},a.prototype.render=function(){var t=this;return u.createElement(c.Consumer,null,function(e){var r=e.dragDropManager;return void 0===r?null:(t.receiveDragDropManager(r),t.isCurrentlyMounted?u.createElement(n,i({},t.props,t.state,{ref:l(n)?t.ref:void 0})):null)})},a.prototype.receiveDragDropManager=function(t){if(void 0===this.manager){this.manager=t,p("object"==typeof t,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",h,h);var e=this.manager.getMonitor();this.unsubscribeFromOffsetChange=e.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=e.subscribeToStateChange(this.handleChange)}},a.prototype.getCurrentState=function(){if(!this.manager)return{};var e=this.manager.getMonitor();return t(e,this.props)},a.displayName="DragLayer("+h+")",a.DecoratedComponent=r,a}(u.Component);return s(g,r)}}},function(t,e,r){var n=r(150)(Object.getPrototypeOf,Object);t.exports=n},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(19),o=r(44),i=r(45),u=r(156),a=r(46),c=r(157),s=r(48),f=r(0),p=r(3);e.default=function(t,e,r,d){void 0===d&&(d={}),n.default("DragSource","type, spec, collect[, options]",t,e,r,d);var l=t;"function"!=typeof t&&(f(s.default(t),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',t),l=function(){return t}),f(p(e),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',e);var h=u.default(e);return f("function"==typeof r,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',r),f(p(d),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',r),function(t){return o.default({containerDisplayName:"DragSource",createHandler:h,registerHandler:i.default,createMonitor:function(t){return new a.default(t)},createConnector:c.default,DecoratedComponent:t,getType:l,collect:r,options:d})}}},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),n(r(153)),n(r(154)),n(r(155))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(22),o=r(42),i=function(){function t(t){this.isDisposed=!1,this.action=n(t)?t:o}return t.isDisposable=function(t){return t&&n(t.dispose)},t._fixup=function(e){return t.isDisposable(e)?e:t.empty},t.create=function(e){return new t(e)},t.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)},t.empty={dispose:o},t}();e.Disposable=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.isDisposed=!1}return t.prototype.getDisposable=function(){return this.current},t.prototype.setDisposable=function(t){var e=this.isDisposed;if(!e){var r=this.current;this.current=t,r&&r.dispose()}e&&t&&t.dispose()},t.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.current;this.current=void 0,t&&t.dispose()}},t}();e.SerialDisposable=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.isDisposed=!1,this.disposables=t}return t.prototype.add=function(t){this.isDisposed?t.dispose():this.disposables.push(t)},t.prototype.remove=function(t){var e=!1;if(!this.isDisposed){var r=this.disposables.indexOf(t);-1!==r&&(e=!0,this.disposables.splice(r,1),t.dispose())}return e},t.prototype.clear=function(){if(!this.isDisposed){for(var t=this.disposables.length,e=new Array(t),r=0;r<t;r++)e[r]=this.disposables[r];this.disposables=[];for(r=0;r<t;r++)e[r].dispose()}},t.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var t=this.disposables.length,e=new Array(t),r=0;r<t;r++)e[r]=this.disposables[r];this.disposables=[];for(r=0;r<t;r++)e[r].dispose()}},t}();e.CompositeDisposable=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(0),i=(r(3),["canDrag","beginDrag","isDragging","endDrag"]),u=["beginDrag"];e.default=function(t){Object.keys(t).forEach(function(e){o(i.indexOf(e)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',i.join(", "),e),o("function"==typeof t[e],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",e,e,t[e])}),u.forEach(function(e){o("function"==typeof t[e],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",e,e,t[e])});var e=function(){function e(e){var r=this;this.monitor=e,this.props=null,this.ref=n.createRef(),this.beginDrag=function(){if(r.props)return t.beginDrag(r.props,r.monitor,r.ref.current)}}return e.prototype.receiveProps=function(t){this.props=t},e.prototype.canDrag=function(){return!!this.props&&(!t.canDrag||t.canDrag(this.props,this.monitor))},e.prototype.isDragging=function(e,r){return!!this.props&&(t.isDragging?t.isDragging(this.props,this.monitor):r===e.getSourceId())},e.prototype.endDrag=function(){this.props&&t.endDrag&&t.endDrag(this.props,this.monitor,this.ref.current)},e}();return function(t){return new e(t)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(47),o=r(5);e.default=function(t){var e,r,i,u,a,c,s;function f(){u&&(u(),u=void 0),e&&r&&(u=t.connectDragSource(e,r,i))}function p(){s&&(s(),s=void 0),e&&a&&(s=t.connectDragPreview(e,a,c))}return{receiveHandlerId:function(t){t!==e&&(e=t,f(),p())},hooks:n.default({dragSource:function(t,e){t===r&&o(e,i)||(r=t,i=e,f())},dragPreview:function(t,e){t===a&&o(e,c)||(a=t,c=e,p())}})}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(0);function i(t,e){"function"==typeof t?t(e):t.current=e}e.default=function(t,e){var r=t.ref;return o("string"!=typeof r,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),r?n.cloneElement(t,{ref:function(t){i(e,t),r&&i(r,t)}}):n.cloneElement(t,{ref:e})}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(19),o=r(44),i=r(49),u=r(160),a=r(161),c=r(48),s=r(50),f=r(0),p=r(3);e.default=function(t,e,r,d){void 0===d&&(d={}),n.default("DropTarget","type, spec, collect[, options]",t,e,r,d);var l=t;"function"!=typeof t&&(f(c.default(t,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',t),l=function(){return t}),f(p(e),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',e);var h=u.default(e);return f("function"==typeof r,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',r),f(p(d),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',r),function(t){return o.default({containerDisplayName:"DropTarget",createHandler:h,registerHandler:i.default,createMonitor:function(t){return new s.default(t)},createConnector:a.default,DecoratedComponent:t,getType:l,collect:r,options:d})}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(0),i=(r(3),["canDrop","hover","drop"]);e.default=function(t){Object.keys(t).forEach(function(e){o(i.indexOf(e)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',i.join(", "),e),o("function"==typeof t[e],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html",e,e,t[e])});var e=function(){function e(t){this.monitor=t,this.props=null,this.ref=n.createRef()}return e.prototype.receiveProps=function(t){this.props=t},e.prototype.receiveMonitor=function(t){this.monitor=t},e.prototype.canDrop=function(){return!t.canDrop||t.canDrop(this.props,this.monitor)},e.prototype.hover=function(){t.hover&&t.hover(this.props,this.monitor,this.ref.current)},e.prototype.drop=function(){if(t.drop)return t.drop(this.props,this.monitor,this.ref.current)},e}();return function(t){return new e(t)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(47),o=r(5);e.default=function(t){var e,r,i,u;function a(){u&&(u(),u=void 0),e&&r&&(u=t.connectDropTarget(e,r,i))}return{receiveHandlerId:function(t){t!==e&&(e=t,a())},hooks:n.default({dropTarget:function(t,e){t===r&&o(e,i)||(r=t,i=e,a())}})}}},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0});var o=r(33);e.XYCoord=o.XYCoord,n(r(163)),n(r(164)),n(r(165)),n(r(166))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),n(r(168)),n(r(172)),n(r(175))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(169),i=r(31),u=r(170),a=r(51),c=r(171);e.useDrag=function(t){var e=t.ref,r=t.type,s=t.dragSourceOptions,f=t.dragPreview,p=t.dragPreviewOptions,d=t.collect,l=i.useDragDropManager(),h=l.getBackend(),g=o.useDragSourceHandler(t),v=c.useDragSourceMonitor(r,g,l);return n.useEffect(function(){var t=e.current;return h.connectDragSource(v.getHandlerId(),t,s)},[]),n.useEffect(function(){if(null!=f){var t=u.isRef(f)?f.current:f;return h.connectDragPreview(v.getHandlerId(),t,p)}},[]),d?a.useMonitorOutput(v,d):{}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1);e.useDragSourceHandler=function(t){var e=n.useRef(t);return n.useEffect(function(){e.current=t}),n.useMemo(function(){return{beginDrag:function(t,r){return(0,e.current.begin)(t)},canDrag:function(t,r){var n=e.current.canDrag;return!n||n(t)},isDragging:function(t,r){var n=e.current.isDragging;return n?n(t):r===t.getSourceId()},endDrag:function(t,r){var n=e.current.end;n&&n(t)}}},[])}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isRef=function(t){if(null!==t&&"object"==typeof t){var e=Object.keys(t);return 1===e.length&&"current"===e[0]}return!1}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(45),i=r(46);e.useDragSourceMonitor=function(t,e,r){var u=n.useMemo(function(){return new i.default(r)},[r]);return n.useEffect(function(){var n=o.default(t,e,r),i=n.handlerId,a=n.unregister;return u.receiveHandlerId(i),a},[u]),u}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(31),i=r(173),u=r(51),a=r(174);e.useDrop=function(t){var e=t.ref,r=t.type,c=t.dropTargetOptions,s=t.collect,f=o.useDragDropManager(),p=f.getBackend(),d=i.useDropTargetHandler(t),l=a.useDropTargetMonitor(r,d,f);return n.useEffect(function(){if(e&&e.current){var t=e.current;if(t)return p.connectDropTarget(l.getHandlerId(),t,c)}}),s?u.useMonitorOutput(l,s):{}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1);e.useDropTargetHandler=function(t){var e=n.useRef(t);return n.useEffect(function(){e.current=t}),n.useMemo(function(){return{canDrop:function(t,r){var n=e.current.canDrop;return!n||n(t)},hover:function(t,r){var n=e.current.hover;n&&n(t)},drop:function(t,r){var n=e.current.drop;n&&n(t)}}},[])}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(49),i=r(50);e.useDropTargetMonitor=function(t,e,r){var u=n.useMemo(function(){return new i.default(r)},[r]);return n.useEffect(function(){var n=o.default(t,e,r),i=n.handlerId,a=n.unregister;return u.receiveHandlerId(i),a},[u]),u}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),o=r(31),i=r(52);e.useDragLayer=function(t){var e=o.useDragDropManager().getMonitor(),r=i.useCollector(e,t),u=r[0],a=r[1];return n.useEffect(function(){return e.subscribeToOffsetChange(a)}),n.useEffect(function(){return e.subscribeToStateChange(a)}),u}}])});
\ No newline at end of file

lib/cjs/hooks/index.d.ts

@@ -1,3 +1,3 @@
-export * from './useDragSource';
-export * from './useDropTarget';
+export * from './useDrag';
+export * from './useDrop';
export * from './useDragLayer';

lib/cjs/hooks/index.js

@@ -3,6 +3,6 @@
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./useDragSource"));
-__export(require("./useDropTarget"));
+__export(require("./useDrag"));
+__export(require("./useDrop"));
__export(require("./useDragLayer"));

lib/cjs/hooks/internal/useCollector.d.ts

@@ -0,0 +1 @@
+export declare function useCollector<T, S>(monitor: T, collect: (monitor: T) => S): [S, () => void];

lib/cjs/hooks/internal/useCollector.js

@@ -0,0 +1,15 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var react_1 = require("react");
+var shallowEqual = require('shallowequal');
+function useCollector(monitor, collect) {
+ var _a = react_1.useState(function () { return collect(monitor); }), collected = _a[0], setCollected = _a[1];
+ var updateCollected = function () {
+ var nextValue = collect(monitor);
+ if (!shallowEqual(collected, nextValue)) {
+ setCollected(nextValue);
+ }
+ };
+ return [collected, updateCollected];
+}
+exports.useCollector = useCollector;

lib/cjs/hooks/internal/useDragDropManager.d.ts

@@ -0,0 +1,5 @@
+import { DragDropManager } from 'dnd-core';
+/**
+ * A hook to retrieve the DragDropManager from Context
+ */
+export declare function useDragDropManager<Context>(): DragDropManager<Context>;

lib/cjs/hooks/internal/useDragDropManager.js

@@ -0,0 +1,14 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var react_1 = require("react");
+var DragDropContext_1 = require("../../DragDropContext");
+var invariant = require('invariant');
+/**
+ * A hook to retrieve the DragDropManager from Context
+ */
+function useDragDropManager() {
+ var dragDropManager = react_1.useContext(DragDropContext_1.context).dragDropManager;
+ invariant(dragDropManager != null, 'Expected drag drop context');
+ return dragDropManager;
+}
+exports.useDragDropManager = useDragDropManager;

lib/cjs/hooks/internal/useDragSourceHandler.d.ts

@@ -0,0 +1,3 @@
+import { DragSource } from 'dnd-core';
+import { DragSourceHookSpec } from '../../interfaces';
+export declare function useDragSourceHandler<DragObject, CustomProps>(sourceSpec: DragSourceHookSpec<DragObject, CustomProps>): DragSource;

lib/cjs/hooks/internal/useDragSourceHandler.js

@@ -0,0 +1,36 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var react_1 = require("react");
+function useDragSourceHandler(sourceSpec) {
+ var sourceSpecRef = react_1.useRef(sourceSpec);
+ react_1.useEffect(function () {
+ sourceSpecRef.current = sourceSpec;
+ });
+ // Can't use createSourceFactory, as semantics are different
+ var handler = react_1.useMemo(function () {
+ return ({
+ beginDrag: function (monitor, target) {
+ var begin = sourceSpecRef.current.begin;
+ return begin(monitor);
+ },
+ canDrag: function (monitor, target) {
+ var canDrag = sourceSpecRef.current.canDrag;
+ return canDrag ? canDrag(monitor) : true;
+ },
+ isDragging: function (monitor, target) {
+ var isDragging = sourceSpecRef.current.isDragging;
+ return isDragging
+ ? isDragging(monitor)
+ : target === monitor.getSourceId();
+ },
+ endDrag: function (monitor, target) {
+ var end = sourceSpecRef.current.end;
+ if (end) {
+ end(monitor);
+ }
+ },
+ });
+ }, []);
+ return handler;
+}
+exports.useDragSourceHandler = useDragSourceHandler;

lib/cjs/hooks/internal/useDragSourceMonitor.d.ts

@@ -0,0 +1,3 @@
+import { DragDropManager, SourceType, DragSource } from 'dnd-core';
+import DragSourceMonitorImpl from '../../DragSourceMonitorImpl';
+export declare function useDragSourceMonitor<Context>(type: SourceType, source: DragSource, manager: DragDropManager<Context>): DragSourceMonitorImpl;

lib/cjs/hooks/internal/useDragSourceMonitor.js

@@ -0,0 +1,15 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var react_1 = require("react");
+var registerSource_1 = require("../../registerSource");
+var DragSourceMonitorImpl_1 = require("../../DragSourceMonitorImpl");
+function useDragSourceMonitor(type, source, manager) {
+ var monitor = react_1.useMemo(function () { return new DragSourceMonitorImpl_1.default(manager); }, [manager]);
+ react_1.useEffect(function registerSourceWithMonitor() {
+ var _a = registerSource_1.default(type, source, manager), handlerId = _a.handlerId, unregister = _a.unregister;
+ monitor.receiveHandlerId(handlerId);
+ return unregister;
+ }, [monitor]);
+ return monitor;
+}
+exports.useDragSourceMonitor = useDragSourceMonitor;

lib/cjs/hooks/internal/useDropTargetHandler.d.ts

@@ -0,0 +1,3 @@
+import { DropTargetHookSpec } from '../../interfaces';
+import { DropTarget } from 'dnd-core';
+export declare function useDropTargetHandler<CustomProps>(targetSpec: DropTargetHookSpec<CustomProps>): DropTarget;

lib/cjs/hooks/internal/useDropTargetHandler.js

@@ -0,0 +1,32 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var React = require("react");
+function useDropTargetHandler(targetSpec) {
+ var targetSpecRef = React.useRef(targetSpec);
+ React.useEffect(function updateDropTargetSpec() {
+ targetSpecRef.current = targetSpec;
+ });
+ // Can't use createSourceFactory, as semantics are different
+ var handler = React.useMemo(function () {
+ return ({
+ canDrop: function (monitor, targetId) {
+ var canDrop = targetSpecRef.current.canDrop;
+ return canDrop ? canDrop(monitor) : true;
+ },
+ hover: function (monitor, targetId) {
+ var hover = targetSpecRef.current.hover;
+ if (hover) {
+ hover(monitor);
+ }
+ },
+ drop: function (monitor, targetId) {
+ var drop = targetSpecRef.current.drop;
+ if (drop) {
+ drop(monitor);
+ }
+ },
+ });
+ }, []);
+ return handler;
+}
+exports.useDropTargetHandler = useDropTargetHandler;

lib/cjs/hooks/internal/useDropTargetMonitor.d.ts

@@ -0,0 +1,3 @@
+import { DragDropManager, TargetType, DropTarget } from 'dnd-core';
+import { DropTargetMonitor } from '../../interfaces';
+export declare function useDropTargetMonitor<Context>(type: TargetType, target: DropTarget, manager: DragDropManager<Context>): DropTargetMonitor;

lib/cjs/hooks/internal/useDropTargetMonitor.js

@@ -0,0 +1,15 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var react_1 = require("react");
+var registerTarget_1 = require("../../registerTarget");
+var DropTargetMonitorImpl_1 = require("../../DropTargetMonitorImpl");
+function useDropTargetMonitor(type, target, manager) {
+ var monitor = react_1.useMemo(function () { return new DropTargetMonitorImpl_1.default(manager); }, [manager]);
+ react_1.useEffect(function registerTargetWithMonitor() {
+ var _a = registerTarget_1.default(type, target, manager), handlerId = _a.handlerId, unregister = _a.unregister;
+ monitor.receiveHandlerId(handlerId);
+ return unregister;
+ }, [monitor]);
+ return monitor;
+}
+exports.useDropTargetMonitor = useDropTargetMonitor;

lib/cjs/hooks/internal/useMonitorOutput.d.ts

@@ -0,0 +1,3 @@
+import { HandlerManager } from '../../interfaces';
+import { DragDropMonitor } from 'dnd-core';
+export declare function useMonitorOutput<Monitor extends DragDropMonitor & HandlerManager, Collected>(monitor: Monitor, collect: (monitor: Monitor) => Collected): Collected;

lib/cjs/hooks/internal/useMonitorOutput.js

@@ -0,0 +1,20 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var react_1 = require("react");
+var useCollector_1 = require("./useCollector");
+function useMonitorOutput(monitor, collect) {
+ var _a = useCollector_1.useCollector(monitor, collect), collected = _a[0], updateCollected = _a[1];
+ // This runs on every render. There will be ways to optimise this, but for
+ // now, this is the most correct thing to do.
+ react_1.useEffect(function subscribeToMonitorStateChange() {
+ var handlerId = monitor.getHandlerId();
+ if (handlerId == null) {
+ return undefined;
+ }
+ return monitor.subscribeToStateChange(updateCollected, {
+ handlerIds: [handlerId],
+ });
+ });
+ return collected;
+}
+exports.useMonitorOutput = useMonitorOutput;

lib/cjs/hooks/useCollector.d.ts

@@ -1 +0,0 @@
-export declare function useCollector<T, S>(monitor: T, collect: (monitor: T) => S): [S, () => void];

lib/cjs/hooks/useCollector.js

@@ -1,16 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var react_1 = require("react");
-var shallowEqual = require('shallowequal');
-function useCollector(monitor, collect) {
- var _a = react_1.useState(function () { return collect(monitor); }), collected = _a[0], setCollected = _a[1];
- var updateCollected = function () {
- var nextValue = collect(monitor);
- // Not async-safe, but we need a way to opt-out of state updates
- if (!shallowEqual(collected, nextValue)) {
- setCollected(nextValue);
- }
- };
- return [collected, updateCollected];
-}
-exports.useCollector = useCollector;

lib/cjs/hooks/useDragDropManager.d.ts

@@ -1,5 +0,0 @@
-import { DragDropManager } from 'dnd-core';
-/**
- * A hook to retrieve the DragDropManager from Context
- */
-export declare function useDragDropManager<Context>(): DragDropManager<Context>;

lib/cjs/hooks/useDragDropManager.js

@@ -1,14 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var react_1 = require("react");
-var DragDropContext_1 = require("../DragDropContext");
-var invariant = require('invariant');
-/**
- * A hook to retrieve the DragDropManager from Context
- */
-function useDragDropManager() {
- var dragDropManager = react_1.useContext(DragDropContext_1.context).dragDropManager;
- invariant(dragDropManager != null, 'Expected drag drop context');
- return dragDropManager;
-}
-exports.useDragDropManager = useDragDropManager;

lib/cjs/hooks/useDrag.d.ts

@@ -0,0 +1,6 @@
+import { DragSourceHookSpec } from '../interfaces';
+/**
+ * useDragSource hook (This API is experimental and subject to breaking changes in non-major versions)
+ * @param sourceSpec The drag source specification *
+ */
+export declare function useDrag<DragObject, CustomProps>(spec: DragSourceHookSpec<DragObject, CustomProps>): CustomProps;

lib/cjs/hooks/useDrag.js

@@ -0,0 +1,45 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var react_1 = require("react");
+var useDragSourceHandler_1 = require("./internal/useDragSourceHandler");
+var useDragDropManager_1 = require("./internal/useDragDropManager");
+var util_1 = require("./util");
+var useMonitorOutput_1 = require("./internal/useMonitorOutput");
+var useDragSourceMonitor_1 = require("./internal/useDragSourceMonitor");
+/**
+ * useDragSource hook (This API is experimental and subject to breaking changes in non-major versions)
+ * @param sourceSpec The drag source specification *
+ */
+function useDrag(spec) {
+ var ref = spec.ref, type = spec.type, dragSourceOptions = spec.dragSourceOptions, dragPreview = spec.dragPreview, dragPreviewOptions = spec.dragPreviewOptions, collect = spec.collect;
+ var manager = useDragDropManager_1.useDragDropManager();
+ var backend = manager.getBackend();
+ var handler = useDragSourceHandler_1.useDragSourceHandler(spec);
+ var sourceMonitor = useDragSourceMonitor_1.useDragSourceMonitor(type, handler, manager);
+ /*
+ * Connect the Drag Source Element to the Backend
+ */
+ react_1.useEffect(function connectDragSource() {
+ var dragSourceNode = ref.current;
+ return backend.connectDragSource(sourceMonitor.getHandlerId(), dragSourceNode, dragSourceOptions);
+ }, []);
+ /*
+ * Connect the Drag Preview Element to the Backend
+ */
+ react_1.useEffect(function connectDragPreview() {
+ if (dragPreview == null) {
+ return undefined;
+ }
+ var dragPreviewNode = util_1.isRef(dragPreview)
+ ? dragPreview.current
+ : dragPreview;
+ return backend.connectDragPreview(sourceMonitor.getHandlerId(), dragPreviewNode, dragPreviewOptions);
+ }, []);
+ if (collect) {
+ return useMonitorOutput_1.useMonitorOutput(sourceMonitor, collect);
+ }
+ else {
+ return {};
+ }
+}
+exports.useDrag = useDrag;

lib/cjs/hooks/useDragLayer.js

@@ -1,8 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
-var useDragDropManager_1 = require("./useDragDropManager");
-var useCollector_1 = require("./useCollector");
+var useDragDropManager_1 = require("./internal/useDragDropManager");
+var useCollector_1 = require("./internal/useCollector");
/**
* useDragLayer Hook (This API is experimental and subject to breaking changes in non-breaking versions)
* @param collector The property collector

lib/cjs/hooks/useDragSource.d.ts

@@ -1,14 +0,0 @@
-import { SourceType } from 'dnd-core';
-import { DragPreviewOptions, DragSourceHookSpec } from '../interfaces';
-import { Ref } from './util';
-/**
- * useDragSource hook (This API is experimental and subject to breaking changes in non-major versions)
- * @param ref The drag source element
- * @param type The drag source type
- * @param sourceSpec The drag source specification *
- */
-export declare function useDragSource<DragObject, CustomProps>(ref: Ref<any>, type: SourceType, sourceSpec: DragSourceHookSpec<DragObject, CustomProps> & {
- dragSourceOptions?: {};
- dragPreview?: Ref<any> | Element;
- dragPreviewOptions?: DragPreviewOptions;
-}): CustomProps;

lib/cjs/hooks/useDragSourceHandler.d.ts

@@ -1,3 +0,0 @@
-import { DragSource } from 'dnd-core';
-import { DragSourceHookSpec } from '../interfaces';
-export declare function useDragSourceHandler<DragObject, CustomProps>(sourceSpec: DragSourceHookSpec<DragObject, CustomProps>): DragSource;

lib/cjs/hooks/useDragSourceHandler.js

@@ -1,36 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var react_1 = require("react");
-function useDragSourceHandler(sourceSpec) {
- var sourceSpecRef = react_1.useRef(sourceSpec);
- react_1.useEffect(function () {
- sourceSpecRef.current = sourceSpec;
- });
- // Can't use createSourceFactory, as semantics are different
- var handler = react_1.useMemo(function () {
- return ({
- beginDrag: function (monitor, target) {
- var beginDrag = sourceSpecRef.current.beginDrag;
- return beginDrag(monitor);
- },
- canDrag: function (monitor, target) {
- var canDrag = sourceSpecRef.current.canDrag;
- return canDrag ? canDrag(monitor) : true;
- },
- isDragging: function (monitor, target) {
- var isDragging = sourceSpecRef.current.isDragging;
- return isDragging
- ? isDragging(monitor)
- : target === monitor.getSourceId();
- },
- endDrag: function (monitor, target) {
- var endDrag = sourceSpecRef.current.endDrag;
- if (endDrag) {
- endDrag(monitor);
- }
- },
- });
- }, []);
- return handler;
-}
-exports.useDragSourceHandler = useDragSourceHandler;

lib/cjs/hooks/useDragSource.js

@@ -1,44 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var react_1 = require("react");
-var useDragSourceHandler_1 = require("./useDragSourceHandler");
-var useDragDropManager_1 = require("./useDragDropManager");
-var util_1 = require("./util");
-var useMonitorOutput_1 = require("./useMonitorOutput");
-var useDragSourceMonitor_1 = require("./useDragSourceMonitor");
-/**
- * useDragSource hook (This API is experimental and subject to breaking changes in non-major versions)
- * @param ref The drag source element
- * @param type The drag source type
- * @param sourceSpec The drag source specification *
- */
-function useDragSource(ref, type, sourceSpec) {
- var manager = useDragDropManager_1.useDragDropManager();
- var backend = manager.getBackend();
- var handler = useDragSourceHandler_1.useDragSourceHandler(sourceSpec);
- var sourceMonitor = useDragSourceMonitor_1.useDragSourceMonitor(type, handler, manager);
- /*
- * Connect the Drag Source Element to the Backend
- */
- react_1.useEffect(function connectDragSource() {
- var dragSourceNode = ref.current;
- var dragSourceOptions = sourceSpec.dragSourceOptions;
- return backend.connectDragSource(sourceMonitor.getHandlerId(), dragSourceNode, dragSourceOptions);
- }, []);
- /*
- * Connect the Drag Previem Element to the Backend
- */
- react_1.useEffect(function connectDragPreview() {
- if (sourceSpec.dragPreview == null) {
- return undefined;
- }
- var dragPreviewNode = util_1.isRef(sourceSpec.dragPreview)
- ? sourceSpec.dragPreview.current
- : sourceSpec.dragPreview;
- var dragPreviewOptions = sourceSpec.dragPreviewOptions;
- return backend.connectDragPreview(sourceMonitor.getHandlerId(), dragPreviewNode, dragPreviewOptions);
- }, []);
- var collector = sourceSpec.collect || (function () { return ({}); });
- return useMonitorOutput_1.useMonitorOutput(sourceMonitor, collector);
-}
-exports.useDragSource = useDragSource;

lib/cjs/hooks/useDragSourceMonitor.d.ts

@@ -1,3 +0,0 @@
-import { DragDropManager, SourceType, DragSource } from 'dnd-core';
-import DragSourceMonitorImpl from '../DragSourceMonitorImpl';
-export declare function useDragSourceMonitor<Context>(type: SourceType, source: DragSource, manager: DragDropManager<Context>): DragSourceMonitorImpl;

lib/cjs/hooks/useDragSourceMonitor.js

@@ -1,15 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var react_1 = require("react");
-var registerSource_1 = require("../registerSource");
-var DragSourceMonitorImpl_1 = require("../DragSourceMonitorImpl");
-function useDragSourceMonitor(type, source, manager) {
- var monitor = react_1.useMemo(function () { return new DragSourceMonitorImpl_1.default(manager); }, [manager]);
- react_1.useEffect(function registerSourceWithMonitor() {
- var _a = registerSource_1.default(type, source, manager), handlerId = _a.handlerId, unregister = _a.unregister;
- monitor.receiveHandlerId(handlerId);
- return unregister;
- }, [monitor]);
- return monitor;
-}
-exports.useDragSourceMonitor = useDragSourceMonitor;

lib/cjs/hooks/useDrop.d.ts

@@ -0,0 +1,6 @@
+import { DropTargetHookSpec } from '../interfaces';
+/**
+ * useDropTarget Hook (This API is experimental and subject to breaking changes in non-breaking versions)
+ * @param spec The drop target specification
+ */
+export declare function useDrop<CustomProps>(spec: DropTargetHookSpec<CustomProps>): CustomProps;

lib/cjs/hooks/useDrop.js

@@ -0,0 +1,36 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var react_1 = require("react");
+var useDragDropManager_1 = require("./internal/useDragDropManager");
+var useDropTargetHandler_1 = require("./internal/useDropTargetHandler");
+var useMonitorOutput_1 = require("./internal/useMonitorOutput");
+var useDropTargetMonitor_1 = require("./internal/useDropTargetMonitor");
+/**
+ * useDropTarget Hook (This API is experimental and subject to breaking changes in non-breaking versions)
+ * @param spec The drop target specification
+ */
+function useDrop(spec) {
+ var ref = spec.ref, type = spec.type, dropTargetOptions = spec.dropTargetOptions, collect = spec.collect;
+ var manager = useDragDropManager_1.useDragDropManager();
+ var backend = manager.getBackend();
+ var handler = useDropTargetHandler_1.useDropTargetHandler(spec);
+ var targetMonitor = useDropTargetMonitor_1.useDropTargetMonitor(type, handler, manager);
+ /*
+ * Connect the Drop Target Element to the Backend
+ */
+ react_1.useEffect(function connectDropTarget() {
+ if (ref && ref.current) {
+ var dropTargetNode = ref.current;
+ if (dropTargetNode) {
+ return backend.connectDropTarget(targetMonitor.getHandlerId(), dropTargetNode, dropTargetOptions);
+ }
+ }
+ });
+ if (collect) {
+ return useMonitorOutput_1.useMonitorOutput(targetMonitor, collect);
+ }
+ else {
+ return {};
+ }
+}
+exports.useDrop = useDrop;

lib/cjs/hooks/useDropTarget.d.ts

@@ -1,12 +0,0 @@
-import { TargetType } from 'dnd-core';
-import { DropTargetHookSpec } from '../interfaces';
-import { Ref } from './util';
-/**
- * useDropTarget Hook (This API is experimental and subject to breaking changes in non-breaking versions)
- * @param ref The drop target's ref
- * @param type The drop target type
- * @param targetSpec The drop target specification
- */
-export declare function useDropTarget<CustomProps>(ref: Ref<any>, type: TargetType, targetSpec: DropTargetHookSpec<CustomProps> & {
- dropTargetOptions?: {};
-}): CustomProps;

lib/cjs/hooks/useDropTargetHandler.d.ts

@@ -1,3 +0,0 @@
-import { DropTargetHookSpec } from '../interfaces';
-import { DropTarget } from 'dnd-core';
-export declare function useDropTargetHandler<CustomProps>(targetSpec: DropTargetHookSpec<CustomProps>): DropTarget;

lib/cjs/hooks/useDropTargetHandler.js

@@ -1,32 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var React = require("react");
-function useDropTargetHandler(targetSpec) {
- var targetSpecRef = React.useRef(targetSpec);
- React.useEffect(function updateDropTargetSpec() {
- targetSpecRef.current = targetSpec;
- });
- // Can't use createSourceFactory, as semantics are different
- var handler = React.useMemo(function () {
- return ({
- canDrop: function (monitor, targetId) {
- var canDrop = targetSpecRef.current.canDrop;
- return canDrop ? canDrop(monitor) : true;
- },
- hover: function (monitor, targetId) {
- var hover = targetSpecRef.current.hover;
- if (hover) {
- hover(monitor);
- }
- },
- drop: function (monitor, targetId) {
- var drop = targetSpecRef.current.drop;
- if (drop) {
- drop(monitor);
- }
- },
- });
- }, []);
- return handler;
-}
-exports.useDropTargetHandler = useDropTargetHandler;

lib/cjs/hooks/useDropTarget.js

@@ -1,32 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var react_1 = require("react");
-var useDragDropManager_1 = require("./useDragDropManager");
-var useDropTargetHandler_1 = require("./useDropTargetHandler");
-var useMonitorOutput_1 = require("./useMonitorOutput");
-var useDropTargetMonitor_1 = require("./useDropTargetMonitor");
-/**
- * useDropTarget Hook (This API is experimental and subject to breaking changes in non-breaking versions)
- * @param ref The drop target's ref
- * @param type The drop target type
- * @param targetSpec The drop target specification
- */
-function useDropTarget(ref, type, targetSpec) {
- var manager = useDragDropManager_1.useDragDropManager();
- var backend = manager.getBackend();
- var handler = useDropTargetHandler_1.useDropTargetHandler(targetSpec);
- var targetMonitor = useDropTargetMonitor_1.useDropTargetMonitor(type, handler, manager);
- /*
- * Connect the Drop Target Element to the Backend
- */
- react_1.useEffect(function connectDropTarget() {
- var dropTargetNode = ref.current;
- if (dropTargetNode) {
- var dropTargetOptions = targetSpec.dropTargetOptions;
- return backend.connectDropTarget(targetMonitor.getHandlerId(), dropTargetNode, dropTargetOptions);
- }
- }, []);
- var collector = targetSpec.collect || (function () { return ({}); });
- return useMonitorOutput_1.useMonitorOutput(targetMonitor, collector);
-}
-exports.useDropTarget = useDropTarget;

lib/cjs/hooks/useDropTargetMonitor.d.ts

@@ -1,3 +0,0 @@
-import { DragDropManager, TargetType, DropTarget } from 'dnd-core';
-import { DropTargetMonitor } from '../interfaces';
-export declare function useDropTargetMonitor<Context>(type: TargetType, target: DropTarget, manager: DragDropManager<Context>): DropTargetMonitor;

lib/cjs/hooks/useDropTargetMonitor.js

@@ -1,15 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var react_1 = require("react");
-var registerTarget_1 = require("../registerTarget");
-var DropTargetMonitorImpl_1 = require("../DropTargetMonitorImpl");
-function useDropTargetMonitor(type, target, manager) {
- var monitor = react_1.useMemo(function () { return new DropTargetMonitorImpl_1.default(manager); }, [manager]);
- react_1.useEffect(function registerTargetWithMonitor() {
- var _a = registerTarget_1.default(type, target, manager), handlerId = _a.handlerId, unregister = _a.unregister;
- monitor.receiveHandlerId(handlerId);
- return unregister;
- }, [monitor]);
- return monitor;
-}
-exports.useDropTargetMonitor = useDropTargetMonitor;

lib/cjs/hooks/useMonitorOutput.d.ts

@@ -1,3 +0,0 @@
-import { HandlerManager } from '../interfaces';
-import { DragDropMonitor } from 'dnd-core';
-export declare function useMonitorOutput<Monitor extends DragDropMonitor & HandlerManager, Collected>(monitor: Monitor, collect: (monitor: Monitor) => Collected): Collected;

lib/cjs/hooks/useMonitorOutput.js

@@ -1,20 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var react_1 = require("react");
-var useCollector_1 = require("./useCollector");
-function useMonitorOutput(monitor, collect) {
- var _a = useCollector_1.useCollector(monitor, collect), collected = _a[0], updateCollected = _a[1];
- // This runs on every render. There will be ways to optimise this, but for
- // now, this is the most correct thing to do.
- react_1.useEffect(function subscribeToMonitorStateChange() {
- var handlerId = monitor.getHandlerId();
- if (handlerId == null) {
- return undefined;
- }
- return monitor.subscribeToStateChange(updateCollected, {
- handlerIds: [handlerId],
- });
- });
- return collected;
-}
-exports.useMonitorOutput = useMonitorOutput;

lib/cjs/index.d.ts

@@ -2,5 +2,10 @@
export { default as DragLayer } from './DragLayer';
export { default as DragSource } from './DragSource';
export { default as DropTarget } from './DropTarget';
-export * from './hooks';
export * from './interfaces';
+import { useDrag, useDragLayer, useDrop } from './hooks';
+export declare const __EXPERIMENTAL_DND_HOOKS_THAT_MAY_CHANGE_AND_BREAK_MY_BUILD__: {
+ useDrag: typeof useDrag;
+ useDragLayer: typeof useDragLayer;
+ useDrop: typeof useDrop;
+};

lib/cjs/index.js

@@ -1,7 +1,4 @@
"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
Object.defineProperty(exports, "__esModule", { value: true });
var DragDropContext_1 = require("./DragDropContext");
exports.DragDropContext = DragDropContext_1.DragDropContext;
@@ -12,4 +9,9 @@
exports.DragSource = DragSource_1.default;
var DropTarget_1 = require("./DropTarget");
exports.DropTarget = DropTarget_1.default;
-__export(require("./hooks"));
+var hooks_1 = require("./hooks");
+exports.__EXPERIMENTAL_DND_HOOKS_THAT_MAY_CHANGE_AND_BREAK_MY_BUILD__ = {
+ useDrag: hooks_1.useDrag,
+ useDragLayer: hooks_1.useDragLayer,
+ useDrop: hooks_1.useDrop,
+};

lib/cjs/interfaces/classApi.d.ts

@@ -0,0 +1,146 @@
+/// <reference types="react" />
+import { DragDropManager, Identifier } from 'dnd-core';
+import { DropTargetMonitor, DragSourceMonitor, DragLayerMonitor } from './monitors';
+import { DragSourceOptions, DragPreviewOptions } from './options';
+/**
+ * The React Component that manages the DragDropContext for its children.
+ */
+export interface ContextComponent<Props> extends React.Component<Props> {
+ getDecoratedComponentInstance(): React.Component<Props>;
+ getManager(): DragDropManager<any>;
+}
+/**
+ * A DnD interactive component
+ */
+export interface DndComponent<Props> extends React.Component<Props> {
+ getDecoratedComponentInstance(): React.Component<Props> | null;
+ getHandlerId(): Identifier;
+}
+/**
+ * The class interface for a context component
+ */
+export interface ContextComponentClass<Props> extends React.ComponentClass<Props> {
+ DecoratedComponent: React.ComponentType<Props>;
+ new (props?: Props, context?: any): ContextComponent<Props>;
+}
+/**
+ * The class interface for a DnD component
+ */
+export interface DndComponentClass<Props> extends React.ComponentClass<Props> {
+ DecoratedComponent: React.ComponentType<Props>;
+ new (props?: Props, context?: any): DndComponent<Props>;
+}
+/**
+ * Interface for the DropTarget specification object
+ */
+export interface DropTargetSpec<Props> {
+ /**
+ * Optional.
+ * Called when a compatible item is dropped on the target. You may either return undefined, or a plain object.
+ * If you return an object, it is going to become the drop result and will be available to the drag source in its
+ * endDrag method as monitor.getDropResult(). This is useful in case you want to perform different actions
+ * depending on which target received the drop. If you have nested drop targets, you can test whether a nested
+ * target has already handled drop by checking monitor.didDrop() and monitor.getDropResult(). Both this method and
+ * the source's endDrag method are good places to fire Flux actions. This method will not be called if canDrop()
+ * is defined and returns false.
+ */
+ drop?: (props: Props, monitor: DropTargetMonitor, component: any) => any;
+ /**
+ * Optional.
+ * Called when an item is hovered over the component. You can check monitor.isOver({ shallow: true }) to test whether
+ * the hover happens over just the current target, or over a nested one. Unlike drop(), this method will be called even
+ * if canDrop() is defined and returns false. You can check monitor.canDrop() to test whether this is the case.
+ */
+ hover?: (props: Props, monitor: DropTargetMonitor, component: any) => void;
+ /**
+ * Optional. Use it to specify whether the drop target is able to accept the item. If you want to always allow it, just
+ * omit this method. Specifying it is handy if you'd like to disable dropping based on some predicate over props or
+ * monitor.getItem(). Note: You may not call monitor.canDrop() inside this method.
+ */
+ canDrop?: (props: Props, monitor: DropTargetMonitor) => boolean;
+}
+export interface DragSourceSpec<Props, DragObject> {
+ /**
+ * Required.
+ * When the dragging starts, beginDrag is called. You must return a plain JavaScript object describing the
+ * data being dragged. What you return is the only information available to the drop targets about the drag
+ * source so it's important to pick the minimal data they need to know. You may be tempted to put a reference
+ * to the component into it, but you should try very hard to avoid doing this because it couples the drag
+ * sources and drop targets. It's a good idea to return something like { id: props.id } from this method.
+ */
+ beginDrag: (props: Props, monitor: DragSourceMonitor, component: any) => DragObject;
+ /**
+ * Optional.
+ * When the dragging stops, endDrag is called. For every beginDrag call, a corresponding endDrag call is guaranteed.
+ * You may call monitor.didDrop() to check whether or not the drop was handled by a compatible drop target. If it was handled,
+ * and the drop target specified a drop result by returning a plain object from its drop() method, it will be available as
+ * monitor.getDropResult(). This method is a good place to fire a Flux action. Note: If the component is unmounted while dragging,
+ * component parameter is set to be null.
+ */
+ endDrag?: (props: Props, monitor: DragSourceMonitor, component: any) => void;
+ /**
+ * Optional.
+ * Use it to specify whether the dragging is currently allowed. If you want to always allow it, just omit this method.
+ * Specifying it is handy if you'd like to disable dragging based on some predicate over props. Note: You may not call
+ * monitor.canDrag() inside this method.
+ */
+ canDrag?: (props: Props, monitor: DragSourceMonitor) => boolean;
+ /**
+ * Optional.
+ * By default, only the drag source that initiated the drag operation is considered to be dragging. You can
+ * override this behavior by defining a custom isDragging method. It might return something like props.id === monitor.getItem().id.
+ * Do this if the original component may be unmounted during the dragging and later “resurrected” with a different parent.
+ * For example, when moving a card across the lists in a Kanban board, you want it to retain the dragged appearance—even though
+ * technically, the component gets unmounted and a different one gets mounted every time you move it to another list.
+ *
+ * Note: You may not call monitor.isDragging() inside this method.
+ */
+ isDragging?: (props: Props, monitor: DragSourceMonitor) => boolean;
+}
+export declare type DragElementWrapper<Options> = <Props>(elementOrNode: React.ReactElement<Props> | Element, options?: Options) => React.ReactElement<Props>;
+export declare type ConnectDragSource = DragElementWrapper<DragSourceOptions>;
+export declare type ConnectDragPreview = DragElementWrapper<DragPreviewOptions>;
+/**
+ * DragSourceConnector is an object passed to a collecting function of the DragSource.
+ * Its methods return functions that let you assign the roles to your component's DOM nodes.
+ */
+export interface DragSourceConnector {
+ /**
+ * Returns a function that must be used inside the component to assign the drag source role to a node. By
+ * returning { connectDragSource: connect.dragSource() } from your collecting function, you can mark any React
+ * element as the draggable node. To do that, replace any element with this.props.connectDragSource(element) inside
+ * the render function.
+ *
+ * @param elementOrNode
+ * @param options
+ */
+ dragSource(): ConnectDragSource;
+ /**
+ * Optional. Returns a function that may be used inside the component to assign the drag preview role to a node. By
+ * returning { connectDragPreview: connect.dragPreview() } from your collecting function, you can mark any React element
+ * as the drag preview node. To do that, replace any element with this.props.connectDragPreview(element) inside the render
+ * function. The drag preview is the node that will be screenshotted by the HTML5 backend when the drag begins. For example,
+ * if you want to make something draggable by a small custom handle, you can mark this handle as the dragSource(), but also
+ * mark an outer, larger component node as the dragPreview(). Thus the larger drag preview appears on the screenshot, but
+ * only the smaller drag source is actually draggable. Another possible customization is passing an Image instance to dragPreview
+ * from a lifecycle method like componentDidMount. This lets you use the actual images for drag previews. (Note that IE does not
+ * support this customization). See the example code below for the different usage examples.
+ */
+ dragPreview(): ConnectDragPreview;
+}
+/**
+ * DropTargetConnector is an object passed to a collecting function of the DropTarget. Its only method dropTarget() returns a function
+ * that lets you assign the drop target role to one of your component's DOM nodes.
+ */
+export interface DropTargetConnector {
+ /**
+ * Returns a function that must be used inside the component to assign the drop target role to a node.
+ * By returning { connectDropTarget: connect.dropTarget() } from your collecting function, you can mark any React element
+ * as the droppable node. To do that, replace any element with this.props.connectDropTarget(element) inside the render function.
+ */
+ dropTarget(): ConnectDropTarget;
+}
+export declare type ConnectDropTarget = <Props>(elementOrNode: React.ReactElement<Props>) => React.ReactElement<Props>;
+export declare type DragSourceCollector<CollectedProps> = (connect: DragSourceConnector, monitor: DragSourceMonitor) => CollectedProps;
+export declare type DropTargetCollector<CollectedProps> = (connect: DropTargetConnector, monitor: DropTargetMonitor) => CollectedProps;
+export declare type DragLayerCollector<TargetProps, CollectedProps> = (monitor: DragLayerMonitor, props: TargetProps) => CollectedProps;

lib/cjs/interfaces/classApi.js

@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });

lib/cjs/interfaces/hooksApi.d.ts

@@ -0,0 +1,87 @@
+import { TargetType, SourceType } from 'dnd-core';
+import { DropTargetMonitor, DragSourceMonitor } from './monitors';
+import { RefObject } from 'react';
+import { DragSourceOptions, DragPreviewOptions } from './options';
+/**
+ * Interface for the DropTarget specification object
+ */
+export interface DropTargetHookSpec<CollectedProps> {
+ ref: RefObject<any>;
+ type: TargetType;
+ dropTargetOptions?: any;
+ /**
+ * Optional.
+ * Called when a compatible item is dropped on the target. You may either return undefined, or a plain object.
+ * If you return an object, it is going to become the drop result and will be available to the drag source in its
+ * endDrag method as monitor.getDropResult(). This is useful in case you want to perform different actions
+ * depending on which target received the drop. If you have nested drop targets, you can test whether a nested
+ * target has already handled drop by checking monitor.didDrop() and monitor.getDropResult(). Both this method and
+ * the source's endDrag method are good places to fire Flux actions. This method will not be called if canDrop()
+ * is defined and returns false.
+ */
+ drop?: (monitor: DropTargetMonitor) => any;
+ /**
+ * Optional.
+ * Called when an item is hovered over the component. You can check monitor.isOver({ shallow: true }) to test whether
+ * the hover happens over just the current target, or over a nested one. Unlike drop(), this method will be called even
+ * if canDrop() is defined and returns false. You can check monitor.canDrop() to test whether this is the case.
+ */
+ hover?: (monitor: DropTargetMonitor) => void;
+ /**
+ * Optional. Use it to specify whether the drop target is able to accept the item. If you want to always allow it, just
+ * omit this method. Specifying it is handy if you'd like to disable dropping based on some predicate over props or
+ * monitor.getItem(). Note: You may not call monitor.canDrop() inside this method.
+ */
+ canDrop?: (monitor: DropTargetMonitor) => boolean;
+ /**
+ * A function to collect rendering properties
+ */
+ collect?: (monitor: DropTargetMonitor) => CollectedProps;
+}
+export interface DragSourceHookSpec<DragObject, CollectedProps> {
+ ref: RefObject<any>;
+ type: SourceType;
+ dragSourceOptions?: DragSourceOptions;
+ dragPreview?: React.Ref<any> | Element;
+ dragPreviewOptions?: DragPreviewOptions;
+ /**
+ * Required.
+ * When the dragging starts, beginDrag is called. You must return a plain JavaScript object describing the
+ * data being dragged. What you return is the only information available to the drop targets about the drag
+ * source so it's important to pick the minimal data they need to know. You may be tempted to put a reference
+ * to the component into it, but you should try very hard to avoid doing this because it couples the drag
+ * sources and drop targets. It's a good idea to return something like { id: props.id } from this method.
+ */
+ begin: (monitor: DragSourceMonitor) => DragObject;
+ /**
+ * Optional.
+ * When the dragging stops, endDrag is called. For every beginDrag call, a corresponding endDrag call is guaranteed.
+ * You may call monitor.didDrop() to check whether or not the drop was handled by a compatible drop target. If it was handled,
+ * and the drop target specified a drop result by returning a plain object from its drop() method, it will be available as
+ * monitor.getDropResult(). This method is a good place to fire a Flux action. Note: If the component is unmounted while dragging,
+ * component parameter is set to be null.
+ */
+ end?: (monitor: DragSourceMonitor) => void;
+ /**
+ * Optional.
+ * Use it to specify whether the dragging is currently allowed. If you want to always allow it, just omit this method.
+ * Specifying it is handy if you'd like to disable dragging based on some predicate over props. Note: You may not call
+ * monitor.canDrag() inside this method.
+ */
+ canDrag?: (monitor: DragSourceMonitor) => boolean;
+ /**
+ * Optional.
+ * By default, only the drag source that initiated the drag operation is considered to be dragging. You can
+ * override this behavior by defining a custom isDragging method. It might return something like props.id === monitor.getItem().id.
+ * Do this if the original component may be unmounted during the dragging and later “resurrected” with a different parent.
+ * For example, when moving a card across the lists in a Kanban board, you want it to retain the dragged appearance—even though
+ * technically, the component gets unmounted and a different one gets mounted every time you move it to another list.
+ *
+ * Note: You may not call monitor.isDragging() inside this method.
+ */
+ isDragging?: (monitor: DragSourceMonitor) => boolean;
+ /**
+ * A function to collect rendering properties
+ */
+ collect?: (monitor: DragSourceMonitor) => CollectedProps;
+}

lib/cjs/interfaces/hooksApi.js

@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });

lib/cjs/interfaces/index.d.ts

@@ -0,0 +1,5 @@
+export { XYCoord } from 'dnd-core';
+export * from './classApi';
+export * from './monitors';
+export * from './hooksApi';
+export * from './options';

lib/cjs/interfaces/index.js

@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });

lib/cjs/interfaces/monitors.d.ts

@@ -0,0 +1,160 @@
+import { Identifier, XYCoord } from 'dnd-core';
+export interface HandlerManager {
+ receiveHandlerId: (handlerId: Identifier | null) => void;
+ getHandlerId: () => Identifier | null;
+}
+export interface DragSourceMonitor extends HandlerManager {
+ /**
+ * Returns true if no drag operation is in progress, and the owner's canDrag() returns true or is not defined.
+ */
+ canDrag(): boolean;
+ /**
+ * Returns true if a drag operation is in progress, and either the owner initiated the drag, or its isDragging() is defined and returns true.
+ */
+ isDragging(): boolean;
+ /**
+ * Returns a string or an ES6 symbol identifying the type of the current dragged item. Returns null if no item is being dragged.
+ */
+ getItemType(): Identifier | null;
+ /**
+ * Returns a plain object representing the currently dragged item. Every drag source must specify it by returning an object from its beginDrag() method.
+ * Returns null if no item is being dragged.
+ */
+ getItem(): any;
+ /**
+ * Returns a plain object representing the last recorded drop result. The drop targets may optionally specify it by returning an object from their
+ * drop() methods. When a chain of drop() is dispatched for the nested targets, bottom up, any parent that explicitly returns its own result from drop()
+ * overrides the child drop result previously set by the child. Returns null if called outside endDrag().
+ */
+ getDropResult(): any;
+ /**
+ * Returns true if some drop target has handled the drop event, false otherwise. Even if a target did not return a drop result, didDrop() returns true.
+ * Use it inside endDrag() to test whether any drop target has handled the drop. Returns false if called outside endDrag().
+ */
+ didDrop(): boolean;
+ /**
+ * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started. Returns null if no item is being dragged.
+ */
+ getInitialClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current drag operation has started.
+ * Returns null if no item is being dragged.
+ */
+ getInitialSourceClientOffset(): XYCoord | null;
+ /**
+ * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress. Returns null if no item is being dragged.
+ */
+ getClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } difference between the last recorded client offset of the pointer and the client offset when the current drag operation has started.
+ * Returns null if no item is being dragged.
+ */
+ getDifferenceFromInitialOffset(): XYCoord | null;
+ /**
+ * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its position at the time when the current drag operation has
+ * started, and the movement difference. Returns null if no item is being dragged.
+ */
+ getSourceClientOffset(): XYCoord | null;
+}
+export interface DropTargetMonitor extends HandlerManager {
+ /**
+ * Returns true if there is a drag operation in progress, and the owner's canDrop() returns true or is not defined.
+ */
+ canDrop(): boolean;
+ /**
+ * Returns true if there is a drag operation in progress, and the pointer is currently hovering over the owner.
+ * You may optionally pass { shallow: true } to strictly check whether only the owner is being hovered, as opposed
+ * to a nested target.
+ */
+ isOver(options?: {
+ shallow?: boolean;
+ }): boolean;
+ /**
+ * Returns a string or an ES6 symbol identifying the type of the current dragged item. Returns null if no item is being dragged.
+ */
+ getItemType(): Identifier | null;
+ /**
+ * Returns a plain object representing the currently dragged item. Every drag source must specify it by returning an object from
+ * its beginDrag() method. Returns null if no item is being dragged.
+ */
+ getItem(): any;
+ /**
+ * Returns a plain object representing the last recorded drop result. The drop targets may optionally specify it by returning an
+ * object from their drop() methods. When a chain of drop() is dispatched for the nested targets, bottom up, any parent that explicitly
+ * returns its own result from drop() overrides the drop result previously set by the child. Returns null if called outside drop().
+ */
+ getDropResult(): any;
+ /**
+ * Returns true if some drop target has handled the drop event, false otherwise. Even if a target did not return a drop result,
+ * didDrop() returns true. Use it inside drop() to test whether any nested drop target has already handled the drop. Returns false
+ * if called outside drop().
+ */
+ didDrop(): boolean;
+ /**
+ * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started. Returns null if no item
+ * is being dragged.
+ */
+ getInitialClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current drag operation has started.
+ * Returns null if no item is being dragged.
+ */
+ getInitialSourceClientOffset(): XYCoord | null;
+ /**
+ * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress. Returns null if no item is being dragged.
+ */
+ getClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } difference between the last recorded client offset of the pointer and the client offset when current the drag operation has
+ * started. Returns null if no item is being dragged.
+ */
+ getDifferenceFromInitialOffset(): XYCoord | null;
+ /**
+ * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its position at the time when the current
+ * drag operation has started, and the movement difference. Returns null if no item is being dragged.
+ */
+ getSourceClientOffset(): XYCoord | null;
+}
+export interface DragLayerMonitor {
+ /**
+ * Returns true if a drag operation is in progress. Returns false otherwise.
+ */
+ isDragging(): boolean;
+ /**
+ * Returns a string or an ES6 symbol identifying the type of the current dragged item.
+ * Returns null if no item is being dragged.
+ */
+ getItemType(): Identifier | null;
+ /**
+ * Returns a plain object representing the currently dragged item.
+ * Every drag source must specify it by returning an object from its beginDrag() method.
+ * Returns null if no item is being dragged.
+ */
+ getItem(): any;
+ /**
+ * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started.
+ * Returns null if no item is being dragged.
+ */
+ getInitialClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current
+ * drag operation has started. Returns null if no item is being dragged.
+ */
+ getInitialSourceClientOffset(): XYCoord | null;
+ /**
+ * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress.
+ * Returns null if no item is being dragged.
+ */
+ getClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } difference between the last recorded client offset of the pointer and the client
+ * offset when current the drag operation has started. Returns null if no item is being dragged.
+ */
+ getDifferenceFromInitialOffset(): XYCoord | null;
+ /**
+ * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its
+ * position at the time when the current drag operation has started, and the movement difference.
+ * Returns null if no item is being dragged.
+ */
+ getSourceClientOffset(): XYCoord | null;
+}

lib/cjs/interfaces/monitors.js

@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });

lib/cjs/interfaces/options.d.ts

@@ -0,0 +1,47 @@
+/**
+ * Options for the Drag Sources, Drop Tragets, and Drag Layers annotation
+ */
+export interface DndOptions<Props> {
+ arePropsEqual?: (first: Props, second: Props) => boolean;
+}
+export interface DragSourceOptions {
+ /**
+ * Optional. A string. By default, 'move'. In the browsers that support this feature, specifying 'copy'
+ * shows a special “copying” cursor, while 'move' corresponds to the “move” cursor. You might want to use
+ * this option to provide a hint to the user about whether an action is destructive.
+ */
+ dropEffect?: string;
+}
+export interface DragPreviewOptions {
+ /**
+ * Optional. A boolean. By default, false. If true, the component will learn that it is being dragged immediately as the drag
+ * starts instead of the next tick. This means that the screenshotting would occur with monitor.isDragging() already being true,
+ * and if you apply any styling like a decreased opacity to the dragged element, this styling will also be reflected on the
+ * screenshot. This is rarely desirable, so false is a sensible default. However, you might want to set it to true in rare cases,
+ * such as if you want to make the custom drag layers work in IE and you need to hide the original element without resorting to
+ * an empty drag preview which IE doesn't support.
+ */
+ captureDraggingState?: boolean;
+ /**
+ * Optional. A number between 0 and 1. By default, 0.5. Specifies how the offset relative to the drag source node is translated
+ * into the horizontal offset of the drag preview when their sizes don't match. 0 means “dock the preview to the left”, 0.5 means
+ * “interpolate linearly” and 1 means “dock the preview to the right”.
+ */
+ anchorX?: number;
+ /**
+ * Optional. A number between 0 and 1. By default, 0.5. Specifies how the offset relative to the drag source node is translated into
+ * the vertical offset of the drag preview when their sizes don't match. 0 means “dock the preview to the top, 0.5 means “interpolate
+ * linearly” and 1 means “dock the preview to the bottom.
+ */
+ anchorY?: number;
+ /**
+ * Optional. A number or null if not needed. By default, null. Specifies the vertical offset between the cursor and the drag preview
+ * element. If offsetX has a value, anchorX won't be used.
+ */
+ offsetX?: number;
+ /**
+ * Optional. A number or null if not needed. By default, null. Specifies the vertical offset between the cursor and the drag
+ * preview element. If offsetY has a value, anchorY won't be used.
+ */
+ offsetY?: number;
+}

lib/cjs/interfaces/options.js

@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });

lib/cjs/interfaces.d.ts

@@ -1,426 +0,0 @@
-import * as React from 'react';
-import { XYCoord, Identifier, DragDropManager } from 'dnd-core';
-export { XYCoord };
-export interface HandlerManager {
- receiveHandlerId: (handlerId: Identifier | null) => void;
- getHandlerId: () => Identifier | null;
-}
-/**
- * The React Component that manages the DragDropContext for its children.
- */
-export interface ContextComponent<Props> extends React.Component<Props> {
- getDecoratedComponentInstance(): React.Component<Props>;
- getManager(): DragDropManager<any>;
-}
-/**
- * A DnD interactive component
- */
-export interface DndComponent<Props> extends React.Component<Props> {
- getDecoratedComponentInstance(): React.Component<Props> | null;
- getHandlerId(): Identifier;
-}
-/**
- * The class interface for a context component
- */
-export interface ContextComponentClass<Props> extends React.ComponentClass<Props> {
- DecoratedComponent: React.ComponentType<Props>;
- new (props?: Props, context?: any): ContextComponent<Props>;
-}
-/**
- * The class interface for a DnD component
- */
-export interface DndComponentClass<Props> extends React.ComponentClass<Props> {
- DecoratedComponent: React.ComponentType<Props>;
- new (props?: Props, context?: any): DndComponent<Props>;
-}
-export interface DragSourceMonitor extends HandlerManager {
- /**
- * Returns true if no drag operation is in progress, and the owner's canDrag() returns true or is not defined.
- */
- canDrag(): boolean;
- /**
- * Returns true if a drag operation is in progress, and either the owner initiated the drag, or its isDragging() is defined and returns true.
- */
- isDragging(): boolean;
- /**
- * Returns a string or an ES6 symbol identifying the type of the current dragged item. Returns null if no item is being dragged.
- */
- getItemType(): Identifier | null;
- /**
- * Returns a plain object representing the currently dragged item. Every drag source must specify it by returning an object from its beginDrag() method.
- * Returns null if no item is being dragged.
- */
- getItem(): any;
- /**
- * Returns a plain object representing the last recorded drop result. The drop targets may optionally specify it by returning an object from their
- * drop() methods. When a chain of drop() is dispatched for the nested targets, bottom up, any parent that explicitly returns its own result from drop()
- * overrides the child drop result previously set by the child. Returns null if called outside endDrag().
- */
- getDropResult(): any;
- /**
- * Returns true if some drop target has handled the drop event, false otherwise. Even if a target did not return a drop result, didDrop() returns true.
- * Use it inside endDrag() to test whether any drop target has handled the drop. Returns false if called outside endDrag().
- */
- didDrop(): boolean;
- /**
- * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started. Returns null if no item is being dragged.
- */
- getInitialClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current drag operation has started.
- * Returns null if no item is being dragged.
- */
- getInitialSourceClientOffset(): XYCoord | null;
- /**
- * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress. Returns null if no item is being dragged.
- */
- getClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } difference between the last recorded client offset of the pointer and the client offset when the current drag operation has started.
- * Returns null if no item is being dragged.
- */
- getDifferenceFromInitialOffset(): XYCoord | null;
- /**
- * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its position at the time when the current drag operation has
- * started, and the movement difference. Returns null if no item is being dragged.
- */
- getSourceClientOffset(): XYCoord | null;
-}
-export interface DropTargetMonitor extends HandlerManager {
- /**
- * Returns true if there is a drag operation in progress, and the owner's canDrop() returns true or is not defined.
- */
- canDrop(): boolean;
- /**
- * Returns true if there is a drag operation in progress, and the pointer is currently hovering over the owner.
- * You may optionally pass { shallow: true } to strictly check whether only the owner is being hovered, as opposed
- * to a nested target.
- */
- isOver(options?: {
- shallow?: boolean;
- }): boolean;
- /**
- * Returns a string or an ES6 symbol identifying the type of the current dragged item. Returns null if no item is being dragged.
- */
- getItemType(): Identifier | null;
- /**
- * Returns a plain object representing the currently dragged item. Every drag source must specify it by returning an object from
- * its beginDrag() method. Returns null if no item is being dragged.
- */
- getItem(): any;
- /**
- * Returns a plain object representing the last recorded drop result. The drop targets may optionally specify it by returning an
- * object from their drop() methods. When a chain of drop() is dispatched for the nested targets, bottom up, any parent that explicitly
- * returns its own result from drop() overrides the drop result previously set by the child. Returns null if called outside drop().
- */
- getDropResult(): any;
- /**
- * Returns true if some drop target has handled the drop event, false otherwise. Even if a target did not return a drop result,
- * didDrop() returns true. Use it inside drop() to test whether any nested drop target has already handled the drop. Returns false
- * if called outside drop().
- */
- didDrop(): boolean;
- /**
- * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started. Returns null if no item
- * is being dragged.
- */
- getInitialClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current drag operation has started.
- * Returns null if no item is being dragged.
- */
- getInitialSourceClientOffset(): XYCoord | null;
- /**
- * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress. Returns null if no item is being dragged.
- */
- getClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } difference between the last recorded client offset of the pointer and the client offset when current the drag operation has
- * started. Returns null if no item is being dragged.
- */
- getDifferenceFromInitialOffset(): XYCoord | null;
- /**
- * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its position at the time when the current
- * drag operation has started, and the movement difference. Returns null if no item is being dragged.
- */
- getSourceClientOffset(): XYCoord | null;
-}
-export interface DragLayerMonitor {
- /**
- * Returns true if a drag operation is in progress. Returns false otherwise.
- */
- isDragging(): boolean;
- /**
- * Returns a string or an ES6 symbol identifying the type of the current dragged item.
- * Returns null if no item is being dragged.
- */
- getItemType(): Identifier | null;
- /**
- * Returns a plain object representing the currently dragged item.
- * Every drag source must specify it by returning an object from its beginDrag() method.
- * Returns null if no item is being dragged.
- */
- getItem(): any;
- /**
- * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started.
- * Returns null if no item is being dragged.
- */
- getInitialClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current
- * drag operation has started. Returns null if no item is being dragged.
- */
- getInitialSourceClientOffset(): XYCoord | null;
- /**
- * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress.
- * Returns null if no item is being dragged.
- */
- getClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } difference between the last recorded client offset of the pointer and the client
- * offset when current the drag operation has started. Returns null if no item is being dragged.
- */
- getDifferenceFromInitialOffset(): XYCoord | null;
- /**
- * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its
- * position at the time when the current drag operation has started, and the movement difference.
- * Returns null if no item is being dragged.
- */
- getSourceClientOffset(): XYCoord | null;
-}
-/**
- * Interface for the DropTarget specification object
- */
-export interface DropTargetSpec<Props> {
- /**
- * Optional.
- * Called when a compatible item is dropped on the target. You may either return undefined, or a plain object.
- * If you return an object, it is going to become the drop result and will be available to the drag source in its
- * endDrag method as monitor.getDropResult(). This is useful in case you want to perform different actions
- * depending on which target received the drop. If you have nested drop targets, you can test whether a nested
- * target has already handled drop by checking monitor.didDrop() and monitor.getDropResult(). Both this method and
- * the source's endDrag method are good places to fire Flux actions. This method will not be called if canDrop()
- * is defined and returns false.
- */
- drop?: (props: Props, monitor: DropTargetMonitor, component: any) => any;
- /**
- * Optional.
- * Called when an item is hovered over the component. You can check monitor.isOver({ shallow: true }) to test whether
- * the hover happens over just the current target, or over a nested one. Unlike drop(), this method will be called even
- * if canDrop() is defined and returns false. You can check monitor.canDrop() to test whether this is the case.
- */
- hover?: (props: Props, monitor: DropTargetMonitor, component: any) => void;
- /**
- * Optional. Use it to specify whether the drop target is able to accept the item. If you want to always allow it, just
- * omit this method. Specifying it is handy if you'd like to disable dropping based on some predicate over props or
- * monitor.getItem(). Note: You may not call monitor.canDrop() inside this method.
- */
- canDrop?: (props: Props, monitor: DropTargetMonitor) => boolean;
-}
-/**
- * Interface for the DropTarget specification object
- */
-export interface DropTargetHookSpec<CollectedProps> {
- /**
- * Optional.
- * Called when a compatible item is dropped on the target. You may either return undefined, or a plain object.
- * If you return an object, it is going to become the drop result and will be available to the drag source in its
- * endDrag method as monitor.getDropResult(). This is useful in case you want to perform different actions
- * depending on which target received the drop. If you have nested drop targets, you can test whether a nested
- * target has already handled drop by checking monitor.didDrop() and monitor.getDropResult(). Both this method and
- * the source's endDrag method are good places to fire Flux actions. This method will not be called if canDrop()
- * is defined and returns false.
- */
- drop?: (monitor: DropTargetMonitor) => any;
- /**
- * Optional.
- * Called when an item is hovered over the component. You can check monitor.isOver({ shallow: true }) to test whether
- * the hover happens over just the current target, or over a nested one. Unlike drop(), this method will be called even
- * if canDrop() is defined and returns false. You can check monitor.canDrop() to test whether this is the case.
- */
- hover?: (monitor: DropTargetMonitor) => void;
- /**
- * Optional. Use it to specify whether the drop target is able to accept the item. If you want to always allow it, just
- * omit this method. Specifying it is handy if you'd like to disable dropping based on some predicate over props or
- * monitor.getItem(). Note: You may not call monitor.canDrop() inside this method.
- */
- canDrop?: (monitor: DropTargetMonitor) => boolean;
- /**
- * A function to collect rendering properties
- */
- collect?: (monitor: DropTargetMonitor) => CollectedProps;
-}
-export interface DragSourceSpec<Props, DragObject> {
- /**
- * Required.
- * When the dragging starts, beginDrag is called. You must return a plain JavaScript object describing the
- * data being dragged. What you return is the only information available to the drop targets about the drag
- * source so it's important to pick the minimal data they need to know. You may be tempted to put a reference
- * to the component into it, but you should try very hard to avoid doing this because it couples the drag
- * sources and drop targets. It's a good idea to return something like { id: props.id } from this method.
- */
- beginDrag: (props: Props, monitor: DragSourceMonitor, component: any) => DragObject;
- /**
- * Optional.
- * When the dragging stops, endDrag is called. For every beginDrag call, a corresponding endDrag call is guaranteed.
- * You may call monitor.didDrop() to check whether or not the drop was handled by a compatible drop target. If it was handled,
- * and the drop target specified a drop result by returning a plain object from its drop() method, it will be available as
- * monitor.getDropResult(). This method is a good place to fire a Flux action. Note: If the component is unmounted while dragging,
- * component parameter is set to be null.
- */
- endDrag?: (props: Props, monitor: DragSourceMonitor, component: any) => void;
- /**
- * Optional.
- * Use it to specify whether the dragging is currently allowed. If you want to always allow it, just omit this method.
- * Specifying it is handy if you'd like to disable dragging based on some predicate over props. Note: You may not call
- * monitor.canDrag() inside this method.
- */
- canDrag?: (props: Props, monitor: DragSourceMonitor) => boolean;
- /**
- * Optional.
- * By default, only the drag source that initiated the drag operation is considered to be dragging. You can
- * override this behavior by defining a custom isDragging method. It might return something like props.id === monitor.getItem().id.
- * Do this if the original component may be unmounted during the dragging and later “resurrected” with a different parent.
- * For example, when moving a card across the lists in a Kanban board, you want it to retain the dragged appearance—even though
- * technically, the component gets unmounted and a different one gets mounted every time you move it to another list.
- *
- * Note: You may not call monitor.isDragging() inside this method.
- */
- isDragging?: (props: Props, monitor: DragSourceMonitor) => boolean;
-}
-export interface DragSourceHookSpec<DragObject, CollectedProps> {
- /**
- * Required.
- * When the dragging starts, beginDrag is called. You must return a plain JavaScript object describing the
- * data being dragged. What you return is the only information available to the drop targets about the drag
- * source so it's important to pick the minimal data they need to know. You may be tempted to put a reference
- * to the component into it, but you should try very hard to avoid doing this because it couples the drag
- * sources and drop targets. It's a good idea to return something like { id: props.id } from this method.
- */
- beginDrag: (monitor: DragSourceMonitor) => DragObject;
- /**
- * Optional.
- * When the dragging stops, endDrag is called. For every beginDrag call, a corresponding endDrag call is guaranteed.
- * You may call monitor.didDrop() to check whether or not the drop was handled by a compatible drop target. If it was handled,
- * and the drop target specified a drop result by returning a plain object from its drop() method, it will be available as
- * monitor.getDropResult(). This method is a good place to fire a Flux action. Note: If the component is unmounted while dragging,
- * component parameter is set to be null.
- */
- endDrag?: (monitor: DragSourceMonitor) => void;
- /**
- * Optional.
- * Use it to specify whether the dragging is currently allowed. If you want to always allow it, just omit this method.
- * Specifying it is handy if you'd like to disable dragging based on some predicate over props. Note: You may not call
- * monitor.canDrag() inside this method.
- */
- canDrag?: (monitor: DragSourceMonitor) => boolean;
- /**
- * Optional.
- * By default, only the drag source that initiated the drag operation is considered to be dragging. You can
- * override this behavior by defining a custom isDragging method. It might return something like props.id === monitor.getItem().id.
- * Do this if the original component may be unmounted during the dragging and later “resurrected” with a different parent.
- * For example, when moving a card across the lists in a Kanban board, you want it to retain the dragged appearance—even though
- * technically, the component gets unmounted and a different one gets mounted every time you move it to another list.
- *
- * Note: You may not call monitor.isDragging() inside this method.
- */
- isDragging?: (monitor: DragSourceMonitor) => boolean;
- /**
- * A function to collect rendering properties
- */
- collect?: (monitor: DragSourceMonitor) => CollectedProps;
-}
-/**
- * Options for the Drag Sources, Drop Tragets, and Drag Layers annotation
- */
-export interface DndOptions<Props> {
- arePropsEqual?: (first: Props, second: Props) => boolean;
-}
-export declare type DragElementWrapper<Options> = <Props>(elementOrNode: React.ReactElement<Props> | Element, options?: Options) => React.ReactElement<Props>;
-export declare type ConnectDragSource = DragElementWrapper<DragSourceOptions>;
-export declare type ConnectDragPreview = DragElementWrapper<DragPreviewOptions>;
-export interface DragSourceOptions {
- /**
- * Optional. A string. By default, 'move'. In the browsers that support this feature, specifying 'copy'
- * shows a special “copying” cursor, while 'move' corresponds to the “move” cursor. You might want to use
- * this option to provide a hint to the user about whether an action is destructive.
- */
- dropEffect?: string;
-}
-export interface DragPreviewOptions {
- /**
- * Optional. A boolean. By default, false. If true, the component will learn that it is being dragged immediately as the drag
- * starts instead of the next tick. This means that the screenshotting would occur with monitor.isDragging() already being true,
- * and if you apply any styling like a decreased opacity to the dragged element, this styling will also be reflected on the
- * screenshot. This is rarely desirable, so false is a sensible default. However, you might want to set it to true in rare cases,
- * such as if you want to make the custom drag layers work in IE and you need to hide the original element without resorting to
- * an empty drag preview which IE doesn't support.
- */
- captureDraggingState?: boolean;
- /**
- * Optional. A number between 0 and 1. By default, 0.5. Specifies how the offset relative to the drag source node is translated
- * into the horizontal offset of the drag preview when their sizes don't match. 0 means “dock the preview to the left”, 0.5 means
- * “interpolate linearly” and 1 means “dock the preview to the right”.
- */
- anchorX?: number;
- /**
- * Optional. A number between 0 and 1. By default, 0.5. Specifies how the offset relative to the drag source node is translated into
- * the vertical offset of the drag preview when their sizes don't match. 0 means “dock the preview to the top, 0.5 means “interpolate
- * linearly” and 1 means “dock the preview to the bottom.
- */
- anchorY?: number;
- /**
- * Optional. A number or null if not needed. By default, null. Specifies the vertical offset between the cursor and the drag preview
- * element. If offsetX has a value, anchorX won't be used.
- */
- offsetX?: number;
- /**
- * Optional. A number or null if not needed. By default, null. Specifies the vertical offset between the cursor and the drag
- * preview element. If offsetY has a value, anchorY won't be used.
- */
- offsetY?: number;
-}
-/**
- * DragSourceConnector is an object passed to a collecting function of the DragSource.
- * Its methods return functions that let you assign the roles to your component's DOM nodes.
- */
-export interface DragSourceConnector {
- /**
- * Returns a function that must be used inside the component to assign the drag source role to a node. By
- * returning { connectDragSource: connect.dragSource() } from your collecting function, you can mark any React
- * element as the draggable node. To do that, replace any element with this.props.connectDragSource(element) inside
- * the render function.
- *
- * @param elementOrNode
- * @param options
- */
- dragSource(): ConnectDragSource;
- /**
- * Optional. Returns a function that may be used inside the component to assign the drag preview role to a node. By
- * returning { connectDragPreview: connect.dragPreview() } from your collecting function, you can mark any React element
- * as the drag preview node. To do that, replace any element with this.props.connectDragPreview(element) inside the render
- * function. The drag preview is the node that will be screenshotted by the HTML5 backend when the drag begins. For example,
- * if you want to make something draggable by a small custom handle, you can mark this handle as the dragSource(), but also
- * mark an outer, larger component node as the dragPreview(). Thus the larger drag preview appears on the screenshot, but
- * only the smaller drag source is actually draggable. Another possible customization is passing an Image instance to dragPreview
- * from a lifecycle method like componentDidMount. This lets you use the actual images for drag previews. (Note that IE does not
- * support this customization). See the example code below for the different usage examples.
- */
- dragPreview(): ConnectDragPreview;
-}
-/**
- * DropTargetConnector is an object passed to a collecting function of the DropTarget. Its only method dropTarget() returns a function
- * that lets you assign the drop target role to one of your component's DOM nodes.
- */
-export interface DropTargetConnector {
- /**
- * Returns a function that must be used inside the component to assign the drop target role to a node.
- * By returning { connectDropTarget: connect.dropTarget() } from your collecting function, you can mark any React element
- * as the droppable node. To do that, replace any element with this.props.connectDropTarget(element) inside the render function.
- */
- dropTarget(): ConnectDropTarget;
-}
-export declare type ConnectDropTarget = <Props>(elementOrNode: React.ReactElement<Props>) => React.ReactElement<Props>;
-export declare type DragSourceCollector<CollectedProps> = (connect: DragSourceConnector, monitor: DragSourceMonitor) => CollectedProps;
-export declare type DropTargetCollector<CollectedProps> = (connect: DropTargetConnector, monitor: DropTargetMonitor) => CollectedProps;
-export declare type DragLayerCollector<TargetProps, CollectedProps> = (monitor: DragLayerMonitor, props: TargetProps) => CollectedProps;

lib/cjs/interfaces.js

@@ -1,2 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });

lib/esm/hooks/index.d.ts

@@ -1,3 +1,3 @@
-export * from './useDragSource';
-export * from './useDropTarget';
+export * from './useDrag';
+export * from './useDrop';
export * from './useDragLayer';

lib/esm/hooks/index.js

@@ -1,3 +1,3 @@
-export * from './useDragSource';
-export * from './useDropTarget';
+export * from './useDrag';
+export * from './useDrop';
export * from './useDragLayer';

lib/esm/hooks/internal/useCollector.d.ts

@@ -0,0 +1 @@
+export declare function useCollector<T, S>(monitor: T, collect: (monitor: T) => S): [S, () => void];

lib/esm/hooks/internal/useCollector.js

@@ -0,0 +1,12 @@
+import { useState } from 'react';
+const shallowEqual = require('shallowequal');
+export function useCollector(monitor, collect) {
+ const [collected, setCollected] = useState(() => collect(monitor));
+ const updateCollected = () => {
+ const nextValue = collect(monitor);
+ if (!shallowEqual(collected, nextValue)) {
+ setCollected(nextValue);
+ }
+ };
+ return [collected, updateCollected];
+}

lib/esm/hooks/internal/useDragDropManager.d.ts

@@ -0,0 +1,5 @@
+import { DragDropManager } from 'dnd-core';
+/**
+ * A hook to retrieve the DragDropManager from Context
+ */
+export declare function useDragDropManager<Context>(): DragDropManager<Context>;

lib/esm/hooks/internal/useDragDropManager.js

@@ -0,0 +1,11 @@
+import { useContext } from 'react';
+import { context } from '../../DragDropContext';
+const invariant = require('invariant');
+/**
+ * A hook to retrieve the DragDropManager from Context
+ */
+export function useDragDropManager() {
+ const { dragDropManager } = useContext(context);
+ invariant(dragDropManager != null, 'Expected drag drop context');
+ return dragDropManager;
+}

lib/esm/hooks/internal/useDragSourceHandler.d.ts

@@ -0,0 +1,3 @@
+import { DragSource } from 'dnd-core';
+import { DragSourceHookSpec } from '../../interfaces';
+export declare function useDragSourceHandler<DragObject, CustomProps>(sourceSpec: DragSourceHookSpec<DragObject, CustomProps>): DragSource;

lib/esm/hooks/internal/useDragSourceHandler.js

@@ -0,0 +1,31 @@
+import { useMemo, useEffect, useRef } from 'react';
+export function useDragSourceHandler(sourceSpec) {
+ const sourceSpecRef = useRef(sourceSpec);
+ useEffect(() => {
+ sourceSpecRef.current = sourceSpec;
+ });
+ // Can't use createSourceFactory, as semantics are different
+ const handler = useMemo(() => ({
+ beginDrag(monitor, target) {
+ const { begin } = sourceSpecRef.current;
+ return begin(monitor);
+ },
+ canDrag(monitor, target) {
+ const { canDrag } = sourceSpecRef.current;
+ return canDrag ? canDrag(monitor) : true;
+ },
+ isDragging(monitor, target) {
+ const { isDragging } = sourceSpecRef.current;
+ return isDragging
+ ? isDragging(monitor)
+ : target === monitor.getSourceId();
+ },
+ endDrag(monitor, target) {
+ const { end } = sourceSpecRef.current;
+ if (end) {
+ end(monitor);
+ }
+ },
+ }), []);
+ return handler;
+}

lib/esm/hooks/internal/useDragSourceMonitor.d.ts

@@ -0,0 +1,3 @@
+import { DragDropManager, SourceType, DragSource } from 'dnd-core';
+import DragSourceMonitorImpl from '../../DragSourceMonitorImpl';
+export declare function useDragSourceMonitor<Context>(type: SourceType, source: DragSource, manager: DragDropManager<Context>): DragSourceMonitorImpl;

lib/esm/hooks/internal/useDragSourceMonitor.js

@@ -0,0 +1,12 @@
+import { useMemo, useEffect } from 'react';
+import registerSource from '../../registerSource';
+import DragSourceMonitorImpl from '../../DragSourceMonitorImpl';
+export function useDragSourceMonitor(type, source, manager) {
+ const monitor = useMemo(() => new DragSourceMonitorImpl(manager), [manager]);
+ useEffect(function registerSourceWithMonitor() {
+ const { handlerId, unregister } = registerSource(type, source, manager);
+ monitor.receiveHandlerId(handlerId);
+ return unregister;
+ }, [monitor]);
+ return monitor;
+}

lib/esm/hooks/internal/useDropTargetHandler.d.ts

@@ -0,0 +1,3 @@
+import { DropTargetHookSpec } from '../../interfaces';
+import { DropTarget } from 'dnd-core';
+export declare function useDropTargetHandler<CustomProps>(targetSpec: DropTargetHookSpec<CustomProps>): DropTarget;

lib/esm/hooks/internal/useDropTargetHandler.js

@@ -0,0 +1,27 @@
+import * as React from 'react';
+export function useDropTargetHandler(targetSpec) {
+ const targetSpecRef = React.useRef(targetSpec);
+ React.useEffect(function updateDropTargetSpec() {
+ targetSpecRef.current = targetSpec;
+ });
+ // Can't use createSourceFactory, as semantics are different
+ const handler = React.useMemo(() => ({
+ canDrop(monitor, targetId) {
+ const { canDrop } = targetSpecRef.current;
+ return canDrop ? canDrop(monitor) : true;
+ },
+ hover(monitor, targetId) {
+ const { hover } = targetSpecRef.current;
+ if (hover) {
+ hover(monitor);
+ }
+ },
+ drop(monitor, targetId) {
+ const { drop } = targetSpecRef.current;
+ if (drop) {
+ drop(monitor);
+ }
+ },
+ }), []);
+ return handler;
+}

lib/esm/hooks/internal/useDropTargetMonitor.d.ts

@@ -0,0 +1,3 @@
+import { DragDropManager, TargetType, DropTarget } from 'dnd-core';
+import { DropTargetMonitor } from '../../interfaces';
+export declare function useDropTargetMonitor<Context>(type: TargetType, target: DropTarget, manager: DragDropManager<Context>): DropTargetMonitor;

lib/esm/hooks/internal/useDropTargetMonitor.js

@@ -0,0 +1,12 @@
+import { useMemo, useEffect } from 'react';
+import registerTarget from '../../registerTarget';
+import DropTargetMonitorImpl from '../../DropTargetMonitorImpl';
+export function useDropTargetMonitor(type, target, manager) {
+ const monitor = useMemo(() => new DropTargetMonitorImpl(manager), [manager]);
+ useEffect(function registerTargetWithMonitor() {
+ const { handlerId, unregister } = registerTarget(type, target, manager);
+ monitor.receiveHandlerId(handlerId);
+ return unregister;
+ }, [monitor]);
+ return monitor;
+}

lib/esm/hooks/internal/useMonitorOutput.d.ts

@@ -0,0 +1,3 @@
+import { HandlerManager } from '../../interfaces';
+import { DragDropMonitor } from 'dnd-core';
+export declare function useMonitorOutput<Monitor extends DragDropMonitor & HandlerManager, Collected>(monitor: Monitor, collect: (monitor: Monitor) => Collected): Collected;

lib/esm/hooks/internal/useMonitorOutput.js

@@ -0,0 +1,17 @@
+import { useEffect } from 'react';
+import { useCollector } from './useCollector';
+export function useMonitorOutput(monitor, collect) {
+ const [collected, updateCollected] = useCollector(monitor, collect);
+ // This runs on every render. There will be ways to optimise this, but for
+ // now, this is the most correct thing to do.
+ useEffect(function subscribeToMonitorStateChange() {
+ const handlerId = monitor.getHandlerId();
+ if (handlerId == null) {
+ return undefined;
+ }
+ return monitor.subscribeToStateChange(updateCollected, {
+ handlerIds: [handlerId],
+ });
+ });
+ return collected;
+}

lib/esm/hooks/useCollector.d.ts

@@ -1 +0,0 @@
-export declare function useCollector<T, S>(monitor: T, collect: (monitor: T) => S): [S, () => void];

lib/esm/hooks/useCollector.js

@@ -1,13 +0,0 @@
-import { useState } from 'react';
-const shallowEqual = require('shallowequal');
-export function useCollector(monitor, collect) {
- const [collected, setCollected] = useState(() => collect(monitor));
- const updateCollected = () => {
- const nextValue = collect(monitor);
- // Not async-safe, but we need a way to opt-out of state updates
- if (!shallowEqual(collected, nextValue)) {
- setCollected(nextValue);
- }
- };
- return [collected, updateCollected];
-}

lib/esm/hooks/useDragDropManager.d.ts

@@ -1,5 +0,0 @@
-import { DragDropManager } from 'dnd-core';
-/**
- * A hook to retrieve the DragDropManager from Context
- */
-export declare function useDragDropManager<Context>(): DragDropManager<Context>;

lib/esm/hooks/useDragDropManager.js

@@ -1,11 +0,0 @@
-import { useContext } from 'react';
-import { context } from '../DragDropContext';
-const invariant = require('invariant');
-/**
- * A hook to retrieve the DragDropManager from Context
- */
-export function useDragDropManager() {
- const { dragDropManager } = useContext(context);
- invariant(dragDropManager != null, 'Expected drag drop context');
- return dragDropManager;
-}

lib/esm/hooks/useDrag.d.ts

@@ -0,0 +1,6 @@
+import { DragSourceHookSpec } from '../interfaces';
+/**
+ * useDragSource hook (This API is experimental and subject to breaking changes in non-major versions)
+ * @param sourceSpec The drag source specification *
+ */
+export declare function useDrag<DragObject, CustomProps>(spec: DragSourceHookSpec<DragObject, CustomProps>): CustomProps;

lib/esm/hooks/useDrag.js

@@ -0,0 +1,42 @@
+import { useEffect } from 'react';
+import { useDragSourceHandler } from './internal/useDragSourceHandler';
+import { useDragDropManager } from './internal/useDragDropManager';
+import { isRef } from './util';
+import { useMonitorOutput } from './internal/useMonitorOutput';
+import { useDragSourceMonitor } from './internal/useDragSourceMonitor';
+/**
+ * useDragSource hook (This API is experimental and subject to breaking changes in non-major versions)
+ * @param sourceSpec The drag source specification *
+ */
+export function useDrag(spec) {
+ const { ref, type, dragSourceOptions, dragPreview, dragPreviewOptions, collect, } = spec;
+ const manager = useDragDropManager();
+ const backend = manager.getBackend();
+ const handler = useDragSourceHandler(spec);
+ const sourceMonitor = useDragSourceMonitor(type, handler, manager);
+ /*
+ * Connect the Drag Source Element to the Backend
+ */
+ useEffect(function connectDragSource() {
+ const dragSourceNode = ref.current;
+ return backend.connectDragSource(sourceMonitor.getHandlerId(), dragSourceNode, dragSourceOptions);
+ }, []);
+ /*
+ * Connect the Drag Preview Element to the Backend
+ */
+ useEffect(function connectDragPreview() {
+ if (dragPreview == null) {
+ return undefined;
+ }
+ const dragPreviewNode = isRef(dragPreview)
+ ? dragPreview.current
+ : dragPreview;
+ return backend.connectDragPreview(sourceMonitor.getHandlerId(), dragPreviewNode, dragPreviewOptions);
+ }, []);
+ if (collect) {
+ return useMonitorOutput(sourceMonitor, collect);
+ }
+ else {
+ return {};
+ }
+}

lib/esm/hooks/useDragLayer.js

@@ -1,6 +1,6 @@
import { useEffect } from 'react';
-import { useDragDropManager } from './useDragDropManager';
-import { useCollector } from './useCollector';
+import { useDragDropManager } from './internal/useDragDropManager';
+import { useCollector } from './internal/useCollector';
/**
* useDragLayer Hook (This API is experimental and subject to breaking changes in non-breaking versions)
* @param collector The property collector

lib/esm/hooks/useDragSource.d.ts

@@ -1,14 +0,0 @@
-import { SourceType } from 'dnd-core';
-import { DragPreviewOptions, DragSourceHookSpec } from '../interfaces';
-import { Ref } from './util';
-/**
- * useDragSource hook (This API is experimental and subject to breaking changes in non-major versions)
- * @param ref The drag source element
- * @param type The drag source type
- * @param sourceSpec The drag source specification *
- */
-export declare function useDragSource<DragObject, CustomProps>(ref: Ref<any>, type: SourceType, sourceSpec: DragSourceHookSpec<DragObject, CustomProps> & {
- dragSourceOptions?: {};
- dragPreview?: Ref<any> | Element;
- dragPreviewOptions?: DragPreviewOptions;
-}): CustomProps;

lib/esm/hooks/useDragSourceHandler.d.ts

@@ -1,3 +0,0 @@
-import { DragSource } from 'dnd-core';
-import { DragSourceHookSpec } from '../interfaces';
-export declare function useDragSourceHandler<DragObject, CustomProps>(sourceSpec: DragSourceHookSpec<DragObject, CustomProps>): DragSource;

lib/esm/hooks/useDragSourceHandler.js

@@ -1,31 +0,0 @@
-import { useMemo, useEffect, useRef } from 'react';
-export function useDragSourceHandler(sourceSpec) {
- const sourceSpecRef = useRef(sourceSpec);
- useEffect(() => {
- sourceSpecRef.current = sourceSpec;
- });
- // Can't use createSourceFactory, as semantics are different
- const handler = useMemo(() => ({
- beginDrag(monitor, target) {
- const { beginDrag } = sourceSpecRef.current;
- return beginDrag(monitor);
- },
- canDrag(monitor, target) {
- const { canDrag } = sourceSpecRef.current;
- return canDrag ? canDrag(monitor) : true;
- },
- isDragging(monitor, target) {
- const { isDragging } = sourceSpecRef.current;
- return isDragging
- ? isDragging(monitor)
- : target === monitor.getSourceId();
- },
- endDrag(monitor, target) {
- const { endDrag } = sourceSpecRef.current;
- if (endDrag) {
- endDrag(monitor);
- }
- },
- }), []);
- return handler;
-}

lib/esm/hooks/useDragSource.js

@@ -1,41 +0,0 @@
-import { useEffect } from 'react';
-import { useDragSourceHandler } from './useDragSourceHandler';
-import { useDragDropManager } from './useDragDropManager';
-import { isRef } from './util';
-import { useMonitorOutput } from './useMonitorOutput';
-import { useDragSourceMonitor } from './useDragSourceMonitor';
-/**
- * useDragSource hook (This API is experimental and subject to breaking changes in non-major versions)
- * @param ref The drag source element
- * @param type The drag source type
- * @param sourceSpec The drag source specification *
- */
-export function useDragSource(ref, type, sourceSpec) {
- const manager = useDragDropManager();
- const backend = manager.getBackend();
- const handler = useDragSourceHandler(sourceSpec);
- const sourceMonitor = useDragSourceMonitor(type, handler, manager);
- /*
- * Connect the Drag Source Element to the Backend
- */
- useEffect(function connectDragSource() {
- const dragSourceNode = ref.current;
- const dragSourceOptions = sourceSpec.dragSourceOptions;
- return backend.connectDragSource(sourceMonitor.getHandlerId(), dragSourceNode, dragSourceOptions);
- }, []);
- /*
- * Connect the Drag Previem Element to the Backend
- */
- useEffect(function connectDragPreview() {
- if (sourceSpec.dragPreview == null) {
- return undefined;
- }
- const dragPreviewNode = isRef(sourceSpec.dragPreview)
- ? sourceSpec.dragPreview.current
- : sourceSpec.dragPreview;
- const { dragPreviewOptions } = sourceSpec;
- return backend.connectDragPreview(sourceMonitor.getHandlerId(), dragPreviewNode, dragPreviewOptions);
- }, []);
- const collector = sourceSpec.collect || (() => ({}));
- return useMonitorOutput(sourceMonitor, collector);
-}

lib/esm/hooks/useDragSourceMonitor.d.ts

@@ -1,3 +0,0 @@
-import { DragDropManager, SourceType, DragSource } from 'dnd-core';
-import DragSourceMonitorImpl from '../DragSourceMonitorImpl';
-export declare function useDragSourceMonitor<Context>(type: SourceType, source: DragSource, manager: DragDropManager<Context>): DragSourceMonitorImpl;

lib/esm/hooks/useDragSourceMonitor.js

@@ -1,12 +0,0 @@
-import { useMemo, useEffect } from 'react';
-import registerSource from '../registerSource';
-import DragSourceMonitorImpl from '../DragSourceMonitorImpl';
-export function useDragSourceMonitor(type, source, manager) {
- const monitor = useMemo(() => new DragSourceMonitorImpl(manager), [manager]);
- useEffect(function registerSourceWithMonitor() {
- const { handlerId, unregister } = registerSource(type, source, manager);
- monitor.receiveHandlerId(handlerId);
- return unregister;
- }, [monitor]);
- return monitor;
-}

lib/esm/hooks/useDrop.d.ts

@@ -0,0 +1,6 @@
+import { DropTargetHookSpec } from '../interfaces';
+/**
+ * useDropTarget Hook (This API is experimental and subject to breaking changes in non-breaking versions)
+ * @param spec The drop target specification
+ */
+export declare function useDrop<CustomProps>(spec: DropTargetHookSpec<CustomProps>): CustomProps;

lib/esm/hooks/useDrop.js

@@ -0,0 +1,33 @@
+import { useEffect } from 'react';
+import { useDragDropManager } from './internal/useDragDropManager';
+import { useDropTargetHandler } from './internal/useDropTargetHandler';
+import { useMonitorOutput } from './internal/useMonitorOutput';
+import { useDropTargetMonitor } from './internal/useDropTargetMonitor';
+/**
+ * useDropTarget Hook (This API is experimental and subject to breaking changes in non-breaking versions)
+ * @param spec The drop target specification
+ */
+export function useDrop(spec) {
+ const { ref, type, dropTargetOptions, collect } = spec;
+ const manager = useDragDropManager();
+ const backend = manager.getBackend();
+ const handler = useDropTargetHandler(spec);
+ const targetMonitor = useDropTargetMonitor(type, handler, manager);
+ /*
+ * Connect the Drop Target Element to the Backend
+ */
+ useEffect(function connectDropTarget() {
+ if (ref && ref.current) {
+ const dropTargetNode = ref.current;
+ if (dropTargetNode) {
+ return backend.connectDropTarget(targetMonitor.getHandlerId(), dropTargetNode, dropTargetOptions);
+ }
+ }
+ });
+ if (collect) {
+ return useMonitorOutput(targetMonitor, collect);
+ }
+ else {
+ return {};
+ }
+}

lib/esm/hooks/useDropTarget.d.ts

@@ -1,12 +0,0 @@
-import { TargetType } from 'dnd-core';
-import { DropTargetHookSpec } from '../interfaces';
-import { Ref } from './util';
-/**
- * useDropTarget Hook (This API is experimental and subject to breaking changes in non-breaking versions)
- * @param ref The drop target's ref
- * @param type The drop target type
- * @param targetSpec The drop target specification
- */
-export declare function useDropTarget<CustomProps>(ref: Ref<any>, type: TargetType, targetSpec: DropTargetHookSpec<CustomProps> & {
- dropTargetOptions?: {};
-}): CustomProps;

lib/esm/hooks/useDropTargetHandler.d.ts

@@ -1,3 +0,0 @@
-import { DropTargetHookSpec } from '../interfaces';
-import { DropTarget } from 'dnd-core';
-export declare function useDropTargetHandler<CustomProps>(targetSpec: DropTargetHookSpec<CustomProps>): DropTarget;

lib/esm/hooks/useDropTargetHandler.js

@@ -1,27 +0,0 @@
-import * as React from 'react';
-export function useDropTargetHandler(targetSpec) {
- const targetSpecRef = React.useRef(targetSpec);
- React.useEffect(function updateDropTargetSpec() {
- targetSpecRef.current = targetSpec;
- });
- // Can't use createSourceFactory, as semantics are different
- const handler = React.useMemo(() => ({
- canDrop(monitor, targetId) {
- const { canDrop } = targetSpecRef.current;
- return canDrop ? canDrop(monitor) : true;
- },
- hover(monitor, targetId) {
- const { hover } = targetSpecRef.current;
- if (hover) {
- hover(monitor);
- }
- },
- drop(monitor, targetId) {
- const { drop } = targetSpecRef.current;
- if (drop) {
- drop(monitor);
- }
- },
- }), []);
- return handler;
-}

lib/esm/hooks/useDropTarget.js

@@ -1,29 +0,0 @@
-import { useEffect } from 'react';
-import { useDragDropManager } from './useDragDropManager';
-import { useDropTargetHandler } from './useDropTargetHandler';
-import { useMonitorOutput } from './useMonitorOutput';
-import { useDropTargetMonitor } from './useDropTargetMonitor';
-/**
- * useDropTarget Hook (This API is experimental and subject to breaking changes in non-breaking versions)
- * @param ref The drop target's ref
- * @param type The drop target type
- * @param targetSpec The drop target specification
- */
-export function useDropTarget(ref, type, targetSpec) {
- const manager = useDragDropManager();
- const backend = manager.getBackend();
- const handler = useDropTargetHandler(targetSpec);
- const targetMonitor = useDropTargetMonitor(type, handler, manager);
- /*
- * Connect the Drop Target Element to the Backend
- */
- useEffect(function connectDropTarget() {
- const dropTargetNode = ref.current;
- if (dropTargetNode) {
- const dropTargetOptions = targetSpec.dropTargetOptions;
- return backend.connectDropTarget(targetMonitor.getHandlerId(), dropTargetNode, dropTargetOptions);
- }
- }, []);
- const collector = targetSpec.collect || (() => ({}));
- return useMonitorOutput(targetMonitor, collector);
-}

lib/esm/hooks/useDropTargetMonitor.d.ts

@@ -1,3 +0,0 @@
-import { DragDropManager, TargetType, DropTarget } from 'dnd-core';
-import { DropTargetMonitor } from '../interfaces';
-export declare function useDropTargetMonitor<Context>(type: TargetType, target: DropTarget, manager: DragDropManager<Context>): DropTargetMonitor;

lib/esm/hooks/useDropTargetMonitor.js

@@ -1,12 +0,0 @@
-import { useMemo, useEffect } from 'react';
-import registerTarget from '../registerTarget';
-import DropTargetMonitorImpl from '../DropTargetMonitorImpl';
-export function useDropTargetMonitor(type, target, manager) {
- const monitor = useMemo(() => new DropTargetMonitorImpl(manager), [manager]);
- useEffect(function registerTargetWithMonitor() {
- const { handlerId, unregister } = registerTarget(type, target, manager);
- monitor.receiveHandlerId(handlerId);
- return unregister;
- }, [monitor]);
- return monitor;
-}

lib/esm/hooks/useMonitorOutput.d.ts

@@ -1,3 +0,0 @@
-import { HandlerManager } from '../interfaces';
-import { DragDropMonitor } from 'dnd-core';
-export declare function useMonitorOutput<Monitor extends DragDropMonitor & HandlerManager, Collected>(monitor: Monitor, collect: (monitor: Monitor) => Collected): Collected;

lib/esm/hooks/useMonitorOutput.js

@@ -1,17 +0,0 @@
-import { useEffect } from 'react';
-import { useCollector } from './useCollector';
-export function useMonitorOutput(monitor, collect) {
- const [collected, updateCollected] = useCollector(monitor, collect);
- // This runs on every render. There will be ways to optimise this, but for
- // now, this is the most correct thing to do.
- useEffect(function subscribeToMonitorStateChange() {
- const handlerId = monitor.getHandlerId();
- if (handlerId == null) {
- return undefined;
- }
- return monitor.subscribeToStateChange(updateCollected, {
- handlerIds: [handlerId],
- });
- });
- return collected;
-}

lib/esm/index.d.ts

@@ -2,5 +2,10 @@
export { default as DragLayer } from './DragLayer';
export { default as DragSource } from './DragSource';
export { default as DropTarget } from './DropTarget';
-export * from './hooks';
export * from './interfaces';
+import { useDrag, useDragLayer, useDrop } from './hooks';
+export declare const __EXPERIMENTAL_DND_HOOKS_THAT_MAY_CHANGE_AND_BREAK_MY_BUILD__: {
+ useDrag: typeof useDrag;
+ useDragLayer: typeof useDragLayer;
+ useDrop: typeof useDrop;
+};

lib/esm/index.js

@@ -2,4 +2,9 @@
export { default as DragLayer } from './DragLayer';
export { default as DragSource } from './DragSource';
export { default as DropTarget } from './DropTarget';
-export * from './hooks';
+import { useDrag, useDragLayer, useDrop } from './hooks';
+export const __EXPERIMENTAL_DND_HOOKS_THAT_MAY_CHANGE_AND_BREAK_MY_BUILD__ = {
+ useDrag,
+ useDragLayer,
+ useDrop,
+};

lib/esm/interfaces/classApi.d.ts

@@ -0,0 +1,146 @@
+/// <reference types="react" />
+import { DragDropManager, Identifier } from 'dnd-core';
+import { DropTargetMonitor, DragSourceMonitor, DragLayerMonitor } from './monitors';
+import { DragSourceOptions, DragPreviewOptions } from './options';
+/**
+ * The React Component that manages the DragDropContext for its children.
+ */
+export interface ContextComponent<Props> extends React.Component<Props> {
+ getDecoratedComponentInstance(): React.Component<Props>;
+ getManager(): DragDropManager<any>;
+}
+/**
+ * A DnD interactive component
+ */
+export interface DndComponent<Props> extends React.Component<Props> {
+ getDecoratedComponentInstance(): React.Component<Props> | null;
+ getHandlerId(): Identifier;
+}
+/**
+ * The class interface for a context component
+ */
+export interface ContextComponentClass<Props> extends React.ComponentClass<Props> {
+ DecoratedComponent: React.ComponentType<Props>;
+ new (props?: Props, context?: any): ContextComponent<Props>;
+}
+/**
+ * The class interface for a DnD component
+ */
+export interface DndComponentClass<Props> extends React.ComponentClass<Props> {
+ DecoratedComponent: React.ComponentType<Props>;
+ new (props?: Props, context?: any): DndComponent<Props>;
+}
+/**
+ * Interface for the DropTarget specification object
+ */
+export interface DropTargetSpec<Props> {
+ /**
+ * Optional.
+ * Called when a compatible item is dropped on the target. You may either return undefined, or a plain object.
+ * If you return an object, it is going to become the drop result and will be available to the drag source in its
+ * endDrag method as monitor.getDropResult(). This is useful in case you want to perform different actions
+ * depending on which target received the drop. If you have nested drop targets, you can test whether a nested
+ * target has already handled drop by checking monitor.didDrop() and monitor.getDropResult(). Both this method and
+ * the source's endDrag method are good places to fire Flux actions. This method will not be called if canDrop()
+ * is defined and returns false.
+ */
+ drop?: (props: Props, monitor: DropTargetMonitor, component: any) => any;
+ /**
+ * Optional.
+ * Called when an item is hovered over the component. You can check monitor.isOver({ shallow: true }) to test whether
+ * the hover happens over just the current target, or over a nested one. Unlike drop(), this method will be called even
+ * if canDrop() is defined and returns false. You can check monitor.canDrop() to test whether this is the case.
+ */
+ hover?: (props: Props, monitor: DropTargetMonitor, component: any) => void;
+ /**
+ * Optional. Use it to specify whether the drop target is able to accept the item. If you want to always allow it, just
+ * omit this method. Specifying it is handy if you'd like to disable dropping based on some predicate over props or
+ * monitor.getItem(). Note: You may not call monitor.canDrop() inside this method.
+ */
+ canDrop?: (props: Props, monitor: DropTargetMonitor) => boolean;
+}
+export interface DragSourceSpec<Props, DragObject> {
+ /**
+ * Required.
+ * When the dragging starts, beginDrag is called. You must return a plain JavaScript object describing the
+ * data being dragged. What you return is the only information available to the drop targets about the drag
+ * source so it's important to pick the minimal data they need to know. You may be tempted to put a reference
+ * to the component into it, but you should try very hard to avoid doing this because it couples the drag
+ * sources and drop targets. It's a good idea to return something like { id: props.id } from this method.
+ */
+ beginDrag: (props: Props, monitor: DragSourceMonitor, component: any) => DragObject;
+ /**
+ * Optional.
+ * When the dragging stops, endDrag is called. For every beginDrag call, a corresponding endDrag call is guaranteed.
+ * You may call monitor.didDrop() to check whether or not the drop was handled by a compatible drop target. If it was handled,
+ * and the drop target specified a drop result by returning a plain object from its drop() method, it will be available as
+ * monitor.getDropResult(). This method is a good place to fire a Flux action. Note: If the component is unmounted while dragging,
+ * component parameter is set to be null.
+ */
+ endDrag?: (props: Props, monitor: DragSourceMonitor, component: any) => void;
+ /**
+ * Optional.
+ * Use it to specify whether the dragging is currently allowed. If you want to always allow it, just omit this method.
+ * Specifying it is handy if you'd like to disable dragging based on some predicate over props. Note: You may not call
+ * monitor.canDrag() inside this method.
+ */
+ canDrag?: (props: Props, monitor: DragSourceMonitor) => boolean;
+ /**
+ * Optional.
+ * By default, only the drag source that initiated the drag operation is considered to be dragging. You can
+ * override this behavior by defining a custom isDragging method. It might return something like props.id === monitor.getItem().id.
+ * Do this if the original component may be unmounted during the dragging and later “resurrected” with a different parent.
+ * For example, when moving a card across the lists in a Kanban board, you want it to retain the dragged appearance—even though
+ * technically, the component gets unmounted and a different one gets mounted every time you move it to another list.
+ *
+ * Note: You may not call monitor.isDragging() inside this method.
+ */
+ isDragging?: (props: Props, monitor: DragSourceMonitor) => boolean;
+}
+export declare type DragElementWrapper<Options> = <Props>(elementOrNode: React.ReactElement<Props> | Element, options?: Options) => React.ReactElement<Props>;
+export declare type ConnectDragSource = DragElementWrapper<DragSourceOptions>;
+export declare type ConnectDragPreview = DragElementWrapper<DragPreviewOptions>;
+/**
+ * DragSourceConnector is an object passed to a collecting function of the DragSource.
+ * Its methods return functions that let you assign the roles to your component's DOM nodes.
+ */
+export interface DragSourceConnector {
+ /**
+ * Returns a function that must be used inside the component to assign the drag source role to a node. By
+ * returning { connectDragSource: connect.dragSource() } from your collecting function, you can mark any React
+ * element as the draggable node. To do that, replace any element with this.props.connectDragSource(element) inside
+ * the render function.
+ *
+ * @param elementOrNode
+ * @param options
+ */
+ dragSource(): ConnectDragSource;
+ /**
+ * Optional. Returns a function that may be used inside the component to assign the drag preview role to a node. By
+ * returning { connectDragPreview: connect.dragPreview() } from your collecting function, you can mark any React element
+ * as the drag preview node. To do that, replace any element with this.props.connectDragPreview(element) inside the render
+ * function. The drag preview is the node that will be screenshotted by the HTML5 backend when the drag begins. For example,
+ * if you want to make something draggable by a small custom handle, you can mark this handle as the dragSource(), but also
+ * mark an outer, larger component node as the dragPreview(). Thus the larger drag preview appears on the screenshot, but
+ * only the smaller drag source is actually draggable. Another possible customization is passing an Image instance to dragPreview
+ * from a lifecycle method like componentDidMount. This lets you use the actual images for drag previews. (Note that IE does not
+ * support this customization). See the example code below for the different usage examples.
+ */
+ dragPreview(): ConnectDragPreview;
+}
+/**
+ * DropTargetConnector is an object passed to a collecting function of the DropTarget. Its only method dropTarget() returns a function
+ * that lets you assign the drop target role to one of your component's DOM nodes.
+ */
+export interface DropTargetConnector {
+ /**
+ * Returns a function that must be used inside the component to assign the drop target role to a node.
+ * By returning { connectDropTarget: connect.dropTarget() } from your collecting function, you can mark any React element
+ * as the droppable node. To do that, replace any element with this.props.connectDropTarget(element) inside the render function.
+ */
+ dropTarget(): ConnectDropTarget;
+}
+export declare type ConnectDropTarget = <Props>(elementOrNode: React.ReactElement<Props>) => React.ReactElement<Props>;
+export declare type DragSourceCollector<CollectedProps> = (connect: DragSourceConnector, monitor: DragSourceMonitor) => CollectedProps;
+export declare type DropTargetCollector<CollectedProps> = (connect: DropTargetConnector, monitor: DropTargetMonitor) => CollectedProps;
+export declare type DragLayerCollector<TargetProps, CollectedProps> = (monitor: DragLayerMonitor, props: TargetProps) => CollectedProps;

lib/esm/interfaces/hooksApi.d.ts

@@ -0,0 +1,87 @@
+import { TargetType, SourceType } from 'dnd-core';
+import { DropTargetMonitor, DragSourceMonitor } from './monitors';
+import { RefObject } from 'react';
+import { DragSourceOptions, DragPreviewOptions } from './options';
+/**
+ * Interface for the DropTarget specification object
+ */
+export interface DropTargetHookSpec<CollectedProps> {
+ ref: RefObject<any>;
+ type: TargetType;
+ dropTargetOptions?: any;
+ /**
+ * Optional.
+ * Called when a compatible item is dropped on the target. You may either return undefined, or a plain object.
+ * If you return an object, it is going to become the drop result and will be available to the drag source in its
+ * endDrag method as monitor.getDropResult(). This is useful in case you want to perform different actions
+ * depending on which target received the drop. If you have nested drop targets, you can test whether a nested
+ * target has already handled drop by checking monitor.didDrop() and monitor.getDropResult(). Both this method and
+ * the source's endDrag method are good places to fire Flux actions. This method will not be called if canDrop()
+ * is defined and returns false.
+ */
+ drop?: (monitor: DropTargetMonitor) => any;
+ /**
+ * Optional.
+ * Called when an item is hovered over the component. You can check monitor.isOver({ shallow: true }) to test whether
+ * the hover happens over just the current target, or over a nested one. Unlike drop(), this method will be called even
+ * if canDrop() is defined and returns false. You can check monitor.canDrop() to test whether this is the case.
+ */
+ hover?: (monitor: DropTargetMonitor) => void;
+ /**
+ * Optional. Use it to specify whether the drop target is able to accept the item. If you want to always allow it, just
+ * omit this method. Specifying it is handy if you'd like to disable dropping based on some predicate over props or
+ * monitor.getItem(). Note: You may not call monitor.canDrop() inside this method.
+ */
+ canDrop?: (monitor: DropTargetMonitor) => boolean;
+ /**
+ * A function to collect rendering properties
+ */
+ collect?: (monitor: DropTargetMonitor) => CollectedProps;
+}
+export interface DragSourceHookSpec<DragObject, CollectedProps> {
+ ref: RefObject<any>;
+ type: SourceType;
+ dragSourceOptions?: DragSourceOptions;
+ dragPreview?: React.Ref<any> | Element;
+ dragPreviewOptions?: DragPreviewOptions;
+ /**
+ * Required.
+ * When the dragging starts, beginDrag is called. You must return a plain JavaScript object describing the
+ * data being dragged. What you return is the only information available to the drop targets about the drag
+ * source so it's important to pick the minimal data they need to know. You may be tempted to put a reference
+ * to the component into it, but you should try very hard to avoid doing this because it couples the drag
+ * sources and drop targets. It's a good idea to return something like { id: props.id } from this method.
+ */
+ begin: (monitor: DragSourceMonitor) => DragObject;
+ /**
+ * Optional.
+ * When the dragging stops, endDrag is called. For every beginDrag call, a corresponding endDrag call is guaranteed.
+ * You may call monitor.didDrop() to check whether or not the drop was handled by a compatible drop target. If it was handled,
+ * and the drop target specified a drop result by returning a plain object from its drop() method, it will be available as
+ * monitor.getDropResult(). This method is a good place to fire a Flux action. Note: If the component is unmounted while dragging,
+ * component parameter is set to be null.
+ */
+ end?: (monitor: DragSourceMonitor) => void;
+ /**
+ * Optional.
+ * Use it to specify whether the dragging is currently allowed. If you want to always allow it, just omit this method.
+ * Specifying it is handy if you'd like to disable dragging based on some predicate over props. Note: You may not call
+ * monitor.canDrag() inside this method.
+ */
+ canDrag?: (monitor: DragSourceMonitor) => boolean;
+ /**
+ * Optional.
+ * By default, only the drag source that initiated the drag operation is considered to be dragging. You can
+ * override this behavior by defining a custom isDragging method. It might return something like props.id === monitor.getItem().id.
+ * Do this if the original component may be unmounted during the dragging and later “resurrected” with a different parent.
+ * For example, when moving a card across the lists in a Kanban board, you want it to retain the dragged appearance—even though
+ * technically, the component gets unmounted and a different one gets mounted every time you move it to another list.
+ *
+ * Note: You may not call monitor.isDragging() inside this method.
+ */
+ isDragging?: (monitor: DragSourceMonitor) => boolean;
+ /**
+ * A function to collect rendering properties
+ */
+ collect?: (monitor: DragSourceMonitor) => CollectedProps;
+}

lib/esm/interfaces/index.d.ts

@@ -0,0 +1,5 @@
+export { XYCoord } from 'dnd-core';
+export * from './classApi';
+export * from './monitors';
+export * from './hooksApi';
+export * from './options';

lib/esm/interfaces/monitors.d.ts

@@ -0,0 +1,160 @@
+import { Identifier, XYCoord } from 'dnd-core';
+export interface HandlerManager {
+ receiveHandlerId: (handlerId: Identifier | null) => void;
+ getHandlerId: () => Identifier | null;
+}
+export interface DragSourceMonitor extends HandlerManager {
+ /**
+ * Returns true if no drag operation is in progress, and the owner's canDrag() returns true or is not defined.
+ */
+ canDrag(): boolean;
+ /**
+ * Returns true if a drag operation is in progress, and either the owner initiated the drag, or its isDragging() is defined and returns true.
+ */
+ isDragging(): boolean;
+ /**
+ * Returns a string or an ES6 symbol identifying the type of the current dragged item. Returns null if no item is being dragged.
+ */
+ getItemType(): Identifier | null;
+ /**
+ * Returns a plain object representing the currently dragged item. Every drag source must specify it by returning an object from its beginDrag() method.
+ * Returns null if no item is being dragged.
+ */
+ getItem(): any;
+ /**
+ * Returns a plain object representing the last recorded drop result. The drop targets may optionally specify it by returning an object from their
+ * drop() methods. When a chain of drop() is dispatched for the nested targets, bottom up, any parent that explicitly returns its own result from drop()
+ * overrides the child drop result previously set by the child. Returns null if called outside endDrag().
+ */
+ getDropResult(): any;
+ /**
+ * Returns true if some drop target has handled the drop event, false otherwise. Even if a target did not return a drop result, didDrop() returns true.
+ * Use it inside endDrag() to test whether any drop target has handled the drop. Returns false if called outside endDrag().
+ */
+ didDrop(): boolean;
+ /**
+ * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started. Returns null if no item is being dragged.
+ */
+ getInitialClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current drag operation has started.
+ * Returns null if no item is being dragged.
+ */
+ getInitialSourceClientOffset(): XYCoord | null;
+ /**
+ * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress. Returns null if no item is being dragged.
+ */
+ getClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } difference between the last recorded client offset of the pointer and the client offset when the current drag operation has started.
+ * Returns null if no item is being dragged.
+ */
+ getDifferenceFromInitialOffset(): XYCoord | null;
+ /**
+ * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its position at the time when the current drag operation has
+ * started, and the movement difference. Returns null if no item is being dragged.
+ */
+ getSourceClientOffset(): XYCoord | null;
+}
+export interface DropTargetMonitor extends HandlerManager {
+ /**
+ * Returns true if there is a drag operation in progress, and the owner's canDrop() returns true or is not defined.
+ */
+ canDrop(): boolean;
+ /**
+ * Returns true if there is a drag operation in progress, and the pointer is currently hovering over the owner.
+ * You may optionally pass { shallow: true } to strictly check whether only the owner is being hovered, as opposed
+ * to a nested target.
+ */
+ isOver(options?: {
+ shallow?: boolean;
+ }): boolean;
+ /**
+ * Returns a string or an ES6 symbol identifying the type of the current dragged item. Returns null if no item is being dragged.
+ */
+ getItemType(): Identifier | null;
+ /**
+ * Returns a plain object representing the currently dragged item. Every drag source must specify it by returning an object from
+ * its beginDrag() method. Returns null if no item is being dragged.
+ */
+ getItem(): any;
+ /**
+ * Returns a plain object representing the last recorded drop result. The drop targets may optionally specify it by returning an
+ * object from their drop() methods. When a chain of drop() is dispatched for the nested targets, bottom up, any parent that explicitly
+ * returns its own result from drop() overrides the drop result previously set by the child. Returns null if called outside drop().
+ */
+ getDropResult(): any;
+ /**
+ * Returns true if some drop target has handled the drop event, false otherwise. Even if a target did not return a drop result,
+ * didDrop() returns true. Use it inside drop() to test whether any nested drop target has already handled the drop. Returns false
+ * if called outside drop().
+ */
+ didDrop(): boolean;
+ /**
+ * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started. Returns null if no item
+ * is being dragged.
+ */
+ getInitialClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current drag operation has started.
+ * Returns null if no item is being dragged.
+ */
+ getInitialSourceClientOffset(): XYCoord | null;
+ /**
+ * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress. Returns null if no item is being dragged.
+ */
+ getClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } difference between the last recorded client offset of the pointer and the client offset when current the drag operation has
+ * started. Returns null if no item is being dragged.
+ */
+ getDifferenceFromInitialOffset(): XYCoord | null;
+ /**
+ * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its position at the time when the current
+ * drag operation has started, and the movement difference. Returns null if no item is being dragged.
+ */
+ getSourceClientOffset(): XYCoord | null;
+}
+export interface DragLayerMonitor {
+ /**
+ * Returns true if a drag operation is in progress. Returns false otherwise.
+ */
+ isDragging(): boolean;
+ /**
+ * Returns a string or an ES6 symbol identifying the type of the current dragged item.
+ * Returns null if no item is being dragged.
+ */
+ getItemType(): Identifier | null;
+ /**
+ * Returns a plain object representing the currently dragged item.
+ * Every drag source must specify it by returning an object from its beginDrag() method.
+ * Returns null if no item is being dragged.
+ */
+ getItem(): any;
+ /**
+ * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started.
+ * Returns null if no item is being dragged.
+ */
+ getInitialClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current
+ * drag operation has started. Returns null if no item is being dragged.
+ */
+ getInitialSourceClientOffset(): XYCoord | null;
+ /**
+ * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress.
+ * Returns null if no item is being dragged.
+ */
+ getClientOffset(): XYCoord | null;
+ /**
+ * Returns the { x, y } difference between the last recorded client offset of the pointer and the client
+ * offset when current the drag operation has started. Returns null if no item is being dragged.
+ */
+ getDifferenceFromInitialOffset(): XYCoord | null;
+ /**
+ * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its
+ * position at the time when the current drag operation has started, and the movement difference.
+ * Returns null if no item is being dragged.
+ */
+ getSourceClientOffset(): XYCoord | null;
+}

lib/esm/interfaces/options.d.ts

@@ -0,0 +1,47 @@
+/**
+ * Options for the Drag Sources, Drop Tragets, and Drag Layers annotation
+ */
+export interface DndOptions<Props> {
+ arePropsEqual?: (first: Props, second: Props) => boolean;
+}
+export interface DragSourceOptions {
+ /**
+ * Optional. A string. By default, 'move'. In the browsers that support this feature, specifying 'copy'
+ * shows a special “copying” cursor, while 'move' corresponds to the “move” cursor. You might want to use
+ * this option to provide a hint to the user about whether an action is destructive.
+ */
+ dropEffect?: string;
+}
+export interface DragPreviewOptions {
+ /**
+ * Optional. A boolean. By default, false. If true, the component will learn that it is being dragged immediately as the drag
+ * starts instead of the next tick. This means that the screenshotting would occur with monitor.isDragging() already being true,
+ * and if you apply any styling like a decreased opacity to the dragged element, this styling will also be reflected on the
+ * screenshot. This is rarely desirable, so false is a sensible default. However, you might want to set it to true in rare cases,
+ * such as if you want to make the custom drag layers work in IE and you need to hide the original element without resorting to
+ * an empty drag preview which IE doesn't support.
+ */
+ captureDraggingState?: boolean;
+ /**
+ * Optional. A number between 0 and 1. By default, 0.5. Specifies how the offset relative to the drag source node is translated
+ * into the horizontal offset of the drag preview when their sizes don't match. 0 means “dock the preview to the left”, 0.5 means
+ * “interpolate linearly” and 1 means “dock the preview to the right”.
+ */
+ anchorX?: number;
+ /**
+ * Optional. A number between 0 and 1. By default, 0.5. Specifies how the offset relative to the drag source node is translated into
+ * the vertical offset of the drag preview when their sizes don't match. 0 means “dock the preview to the top, 0.5 means “interpolate
+ * linearly” and 1 means “dock the preview to the bottom.
+ */
+ anchorY?: number;
+ /**
+ * Optional. A number or null if not needed. By default, null. Specifies the vertical offset between the cursor and the drag preview
+ * element. If offsetX has a value, anchorX won't be used.
+ */
+ offsetX?: number;
+ /**
+ * Optional. A number or null if not needed. By default, null. Specifies the vertical offset between the cursor and the drag
+ * preview element. If offsetY has a value, anchorY won't be used.
+ */
+ offsetY?: number;
+}

lib/esm/interfaces.d.ts

@@ -1,426 +0,0 @@
-import * as React from 'react';
-import { XYCoord, Identifier, DragDropManager } from 'dnd-core';
-export { XYCoord };
-export interface HandlerManager {
- receiveHandlerId: (handlerId: Identifier | null) => void;
- getHandlerId: () => Identifier | null;
-}
-/**
- * The React Component that manages the DragDropContext for its children.
- */
-export interface ContextComponent<Props> extends React.Component<Props> {
- getDecoratedComponentInstance(): React.Component<Props>;
- getManager(): DragDropManager<any>;
-}
-/**
- * A DnD interactive component
- */
-export interface DndComponent<Props> extends React.Component<Props> {
- getDecoratedComponentInstance(): React.Component<Props> | null;
- getHandlerId(): Identifier;
-}
-/**
- * The class interface for a context component
- */
-export interface ContextComponentClass<Props> extends React.ComponentClass<Props> {
- DecoratedComponent: React.ComponentType<Props>;
- new (props?: Props, context?: any): ContextComponent<Props>;
-}
-/**
- * The class interface for a DnD component
- */
-export interface DndComponentClass<Props> extends React.ComponentClass<Props> {
- DecoratedComponent: React.ComponentType<Props>;
- new (props?: Props, context?: any): DndComponent<Props>;
-}
-export interface DragSourceMonitor extends HandlerManager {
- /**
- * Returns true if no drag operation is in progress, and the owner's canDrag() returns true or is not defined.
- */
- canDrag(): boolean;
- /**
- * Returns true if a drag operation is in progress, and either the owner initiated the drag, or its isDragging() is defined and returns true.
- */
- isDragging(): boolean;
- /**
- * Returns a string or an ES6 symbol identifying the type of the current dragged item. Returns null if no item is being dragged.
- */
- getItemType(): Identifier | null;
- /**
- * Returns a plain object representing the currently dragged item. Every drag source must specify it by returning an object from its beginDrag() method.
- * Returns null if no item is being dragged.
- */
- getItem(): any;
- /**
- * Returns a plain object representing the last recorded drop result. The drop targets may optionally specify it by returning an object from their
- * drop() methods. When a chain of drop() is dispatched for the nested targets, bottom up, any parent that explicitly returns its own result from drop()
- * overrides the child drop result previously set by the child. Returns null if called outside endDrag().
- */
- getDropResult(): any;
- /**
- * Returns true if some drop target has handled the drop event, false otherwise. Even if a target did not return a drop result, didDrop() returns true.
- * Use it inside endDrag() to test whether any drop target has handled the drop. Returns false if called outside endDrag().
- */
- didDrop(): boolean;
- /**
- * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started. Returns null if no item is being dragged.
- */
- getInitialClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current drag operation has started.
- * Returns null if no item is being dragged.
- */
- getInitialSourceClientOffset(): XYCoord | null;
- /**
- * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress. Returns null if no item is being dragged.
- */
- getClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } difference between the last recorded client offset of the pointer and the client offset when the current drag operation has started.
- * Returns null if no item is being dragged.
- */
- getDifferenceFromInitialOffset(): XYCoord | null;
- /**
- * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its position at the time when the current drag operation has
- * started, and the movement difference. Returns null if no item is being dragged.
- */
- getSourceClientOffset(): XYCoord | null;
-}
-export interface DropTargetMonitor extends HandlerManager {
- /**
- * Returns true if there is a drag operation in progress, and the owner's canDrop() returns true or is not defined.
- */
- canDrop(): boolean;
- /**
- * Returns true if there is a drag operation in progress, and the pointer is currently hovering over the owner.
- * You may optionally pass { shallow: true } to strictly check whether only the owner is being hovered, as opposed
- * to a nested target.
- */
- isOver(options?: {
- shallow?: boolean;
- }): boolean;
- /**
- * Returns a string or an ES6 symbol identifying the type of the current dragged item. Returns null if no item is being dragged.
- */
- getItemType(): Identifier | null;
- /**
- * Returns a plain object representing the currently dragged item. Every drag source must specify it by returning an object from
- * its beginDrag() method. Returns null if no item is being dragged.
- */
- getItem(): any;
- /**
- * Returns a plain object representing the last recorded drop result. The drop targets may optionally specify it by returning an
- * object from their drop() methods. When a chain of drop() is dispatched for the nested targets, bottom up, any parent that explicitly
- * returns its own result from drop() overrides the drop result previously set by the child. Returns null if called outside drop().
- */
- getDropResult(): any;
- /**
- * Returns true if some drop target has handled the drop event, false otherwise. Even if a target did not return a drop result,
- * didDrop() returns true. Use it inside drop() to test whether any nested drop target has already handled the drop. Returns false
- * if called outside drop().
- */
- didDrop(): boolean;
- /**
- * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started. Returns null if no item
- * is being dragged.
- */
- getInitialClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current drag operation has started.
- * Returns null if no item is being dragged.
- */
- getInitialSourceClientOffset(): XYCoord | null;
- /**
- * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress. Returns null if no item is being dragged.
- */
- getClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } difference between the last recorded client offset of the pointer and the client offset when current the drag operation has
- * started. Returns null if no item is being dragged.
- */
- getDifferenceFromInitialOffset(): XYCoord | null;
- /**
- * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its position at the time when the current
- * drag operation has started, and the movement difference. Returns null if no item is being dragged.
- */
- getSourceClientOffset(): XYCoord | null;
-}
-export interface DragLayerMonitor {
- /**
- * Returns true if a drag operation is in progress. Returns false otherwise.
- */
- isDragging(): boolean;
- /**
- * Returns a string or an ES6 symbol identifying the type of the current dragged item.
- * Returns null if no item is being dragged.
- */
- getItemType(): Identifier | null;
- /**
- * Returns a plain object representing the currently dragged item.
- * Every drag source must specify it by returning an object from its beginDrag() method.
- * Returns null if no item is being dragged.
- */
- getItem(): any;
- /**
- * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started.
- * Returns null if no item is being dragged.
- */
- getInitialClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current
- * drag operation has started. Returns null if no item is being dragged.
- */
- getInitialSourceClientOffset(): XYCoord | null;
- /**
- * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress.
- * Returns null if no item is being dragged.
- */
- getClientOffset(): XYCoord | null;
- /**
- * Returns the { x, y } difference between the last recorded client offset of the pointer and the client
- * offset when current the drag operation has started. Returns null if no item is being dragged.
- */
- getDifferenceFromInitialOffset(): XYCoord | null;
- /**
- * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its
- * position at the time when the current drag operation has started, and the movement difference.
- * Returns null if no item is being dragged.
- */
- getSourceClientOffset(): XYCoord | null;
-}
-/**
- * Interface for the DropTarget specification object
- */
-export interface DropTargetSpec<Props> {
- /**
- * Optional.
- * Called when a compatible item is dropped on the target. You may either return undefined, or a plain object.
- * If you return an object, it is going to become the drop result and will be available to the drag source in its
- * endDrag method as monitor.getDropResult(). This is useful in case you want to perform different actions
- * depending on which target received the drop. If you have nested drop targets, you can test whether a nested
- * target has already handled drop by checking monitor.didDrop() and monitor.getDropResult(). Both this method and
- * the source's endDrag method are good places to fire Flux actions. This method will not be called if canDrop()
- * is defined and returns false.
- */
- drop?: (props: Props, monitor: DropTargetMonitor, component: any) => any;
- /**
- * Optional.
- * Called when an item is hovered over the component. You can check monitor.isOver({ shallow: true }) to test whether
- * the hover happens over just the current target, or over a nested one. Unlike drop(), this method will be called even
- * if canDrop() is defined and returns false. You can check monitor.canDrop() to test whether this is the case.
- */
- hover?: (props: Props, monitor: DropTargetMonitor, component: any) => void;
- /**
- * Optional. Use it to specify whether the drop target is able to accept the item. If you want to always allow it, just
- * omit this method. Specifying it is handy if you'd like to disable dropping based on some predicate over props or
- * monitor.getItem(). Note: You may not call monitor.canDrop() inside this method.
- */
- canDrop?: (props: Props, monitor: DropTargetMonitor) => boolean;
-}
-/**
- * Interface for the DropTarget specification object
- */
-export interface DropTargetHookSpec<CollectedProps> {
- /**
- * Optional.
- * Called when a compatible item is dropped on the target. You may either return undefined, or a plain object.
- * If you return an object, it is going to become the drop result and will be available to the drag source in its
- * endDrag method as monitor.getDropResult(). This is useful in case you want to perform different actions
- * depending on which target received the drop. If you have nested drop targets, you can test whether a nested
- * target has already handled drop by checking monitor.didDrop() and monitor.getDropResult(). Both this method and
- * the source's endDrag method are good places to fire Flux actions. This method will not be called if canDrop()
- * is defined and returns false.
- */
- drop?: (monitor: DropTargetMonitor) => any;
- /**
- * Optional.
- * Called when an item is hovered over the component. You can check monitor.isOver({ shallow: true }) to test whether
- * the hover happens over just the current target, or over a nested one. Unlike drop(), this method will be called even
- * if canDrop() is defined and returns false. You can check monitor.canDrop() to test whether this is the case.
- */
- hover?: (monitor: DropTargetMonitor) => void;
- /**
- * Optional. Use it to specify whether the drop target is able to accept the item. If you want to always allow it, just
- * omit this method. Specifying it is handy if you'd like to disable dropping based on some predicate over props or
- * monitor.getItem(). Note: You may not call monitor.canDrop() inside this method.
- */
- canDrop?: (monitor: DropTargetMonitor) => boolean;
- /**
- * A function to collect rendering properties
- */
- collect?: (monitor: DropTargetMonitor) => CollectedProps;
-}
-export interface DragSourceSpec<Props, DragObject> {
- /**
- * Required.
- * When the dragging starts, beginDrag is called. You must return a plain JavaScript object describing the
- * data being dragged. What you return is the only information available to the drop targets about the drag
- * source so it's important to pick the minimal data they need to know. You may be tempted to put a reference
- * to the component into it, but you should try very hard to avoid doing this because it couples the drag
- * sources and drop targets. It's a good idea to return something like { id: props.id } from this method.
- */
- beginDrag: (props: Props, monitor: DragSourceMonitor, component: any) => DragObject;
- /**
- * Optional.
- * When the dragging stops, endDrag is called. For every beginDrag call, a corresponding endDrag call is guaranteed.
- * You may call monitor.didDrop() to check whether or not the drop was handled by a compatible drop target. If it was handled,
- * and the drop target specified a drop result by returning a plain object from its drop() method, it will be available as
- * monitor.getDropResult(). This method is a good place to fire a Flux action. Note: If the component is unmounted while dragging,
- * component parameter is set to be null.
- */
- endDrag?: (props: Props, monitor: DragSourceMonitor, component: any) => void;
- /**
- * Optional.
- * Use it to specify whether the dragging is currently allowed. If you want to always allow it, just omit this method.
- * Specifying it is handy if you'd like to disable dragging based on some predicate over props. Note: You may not call
- * monitor.canDrag() inside this method.
- */
- canDrag?: (props: Props, monitor: DragSourceMonitor) => boolean;
- /**
- * Optional.
- * By default, only the drag source that initiated the drag operation is considered to be dragging. You can
- * override this behavior by defining a custom isDragging method. It might return something like props.id === monitor.getItem().id.
- * Do this if the original component may be unmounted during the dragging and later “resurrected” with a different parent.
- * For example, when moving a card across the lists in a Kanban board, you want it to retain the dragged appearance—even though
- * technically, the component gets unmounted and a different one gets mounted every time you move it to another list.
- *
- * Note: You may not call monitor.isDragging() inside this method.
- */
- isDragging?: (props: Props, monitor: DragSourceMonitor) => boolean;
-}
-export interface DragSourceHookSpec<DragObject, CollectedProps> {
- /**
- * Required.
- * When the dragging starts, beginDrag is called. You must return a plain JavaScript object describing the
- * data being dragged. What you return is the only information available to the drop targets about the drag
- * source so it's important to pick the minimal data they need to know. You may be tempted to put a reference
- * to the component into it, but you should try very hard to avoid doing this because it couples the drag
- * sources and drop targets. It's a good idea to return something like { id: props.id } from this method.
- */
- beginDrag: (monitor: DragSourceMonitor) => DragObject;
- /**
- * Optional.
- * When the dragging stops, endDrag is called. For every beginDrag call, a corresponding endDrag call is guaranteed.
- * You may call monitor.didDrop() to check whether or not the drop was handled by a compatible drop target. If it was handled,
- * and the drop target specified a drop result by returning a plain object from its drop() method, it will be available as
- * monitor.getDropResult(). This method is a good place to fire a Flux action. Note: If the component is unmounted while dragging,
- * component parameter is set to be null.
- */
- endDrag?: (monitor: DragSourceMonitor) => void;
- /**
- * Optional.
- * Use it to specify whether the dragging is currently allowed. If you want to always allow it, just omit this method.
- * Specifying it is handy if you'd like to disable dragging based on some predicate over props. Note: You may not call
- * monitor.canDrag() inside this method.
- */
- canDrag?: (monitor: DragSourceMonitor) => boolean;
- /**
- * Optional.
- * By default, only the drag source that initiated the drag operation is considered to be dragging. You can
- * override this behavior by defining a custom isDragging method. It might return something like props.id === monitor.getItem().id.
- * Do this if the original component may be unmounted during the dragging and later “resurrected” with a different parent.
- * For example, when moving a card across the lists in a Kanban board, you want it to retain the dragged appearance—even though
- * technically, the component gets unmounted and a different one gets mounted every time you move it to another list.
- *
- * Note: You may not call monitor.isDragging() inside this method.
- */
- isDragging?: (monitor: DragSourceMonitor) => boolean;
- /**
- * A function to collect rendering properties
- */
- collect?: (monitor: DragSourceMonitor) => CollectedProps;
-}
-/**
- * Options for the Drag Sources, Drop Tragets, and Drag Layers annotation
- */
-export interface DndOptions<Props> {
- arePropsEqual?: (first: Props, second: Props) => boolean;
-}
-export declare type DragElementWrapper<Options> = <Props>(elementOrNode: React.ReactElement<Props> | Element, options?: Options) => React.ReactElement<Props>;
-export declare type ConnectDragSource = DragElementWrapper<DragSourceOptions>;
-export declare type ConnectDragPreview = DragElementWrapper<DragPreviewOptions>;
-export interface DragSourceOptions {
- /**
- * Optional. A string. By default, 'move'. In the browsers that support this feature, specifying 'copy'
- * shows a special “copying” cursor, while 'move' corresponds to the “move” cursor. You might want to use
- * this option to provide a hint to the user about whether an action is destructive.
- */
- dropEffect?: string;
-}
-export interface DragPreviewOptions {
- /**
- * Optional. A boolean. By default, false. If true, the component will learn that it is being dragged immediately as the drag
- * starts instead of the next tick. This means that the screenshotting would occur with monitor.isDragging() already being true,
- * and if you apply any styling like a decreased opacity to the dragged element, this styling will also be reflected on the
- * screenshot. This is rarely desirable, so false is a sensible default. However, you might want to set it to true in rare cases,
- * such as if you want to make the custom drag layers work in IE and you need to hide the original element without resorting to
- * an empty drag preview which IE doesn't support.
- */
- captureDraggingState?: boolean;
- /**
- * Optional. A number between 0 and 1. By default, 0.5. Specifies how the offset relative to the drag source node is translated
- * into the horizontal offset of the drag preview when their sizes don't match. 0 means “dock the preview to the left”, 0.5 means
- * “interpolate linearly” and 1 means “dock the preview to the right”.
- */
- anchorX?: number;
- /**
- * Optional. A number between 0 and 1. By default, 0.5. Specifies how the offset relative to the drag source node is translated into
- * the vertical offset of the drag preview when their sizes don't match. 0 means “dock the preview to the top, 0.5 means “interpolate
- * linearly” and 1 means “dock the preview to the bottom.
- */
- anchorY?: number;
- /**
- * Optional. A number or null if not needed. By default, null. Specifies the vertical offset between the cursor and the drag preview
- * element. If offsetX has a value, anchorX won't be used.
- */
- offsetX?: number;
- /**
- * Optional. A number or null if not needed. By default, null. Specifies the vertical offset between the cursor and the drag
- * preview element. If offsetY has a value, anchorY won't be used.
- */
- offsetY?: number;
-}
-/**
- * DragSourceConnector is an object passed to a collecting function of the DragSource.
- * Its methods return functions that let you assign the roles to your component's DOM nodes.
- */
-export interface DragSourceConnector {
- /**
- * Returns a function that must be used inside the component to assign the drag source role to a node. By
- * returning { connectDragSource: connect.dragSource() } from your collecting function, you can mark any React
- * element as the draggable node. To do that, replace any element with this.props.connectDragSource(element) inside
- * the render function.
- *
- * @param elementOrNode
- * @param options
- */
- dragSource(): ConnectDragSource;
- /**
- * Optional. Returns a function that may be used inside the component to assign the drag preview role to a node. By
- * returning { connectDragPreview: connect.dragPreview() } from your collecting function, you can mark any React element
- * as the drag preview node. To do that, replace any element with this.props.connectDragPreview(element) inside the render
- * function. The drag preview is the node that will be screenshotted by the HTML5 backend when the drag begins. For example,
- * if you want to make something draggable by a small custom handle, you can mark this handle as the dragSource(), but also
- * mark an outer, larger component node as the dragPreview(). Thus the larger drag preview appears on the screenshot, but
- * only the smaller drag source is actually draggable. Another possible customization is passing an Image instance to dragPreview
- * from a lifecycle method like componentDidMount. This lets you use the actual images for drag previews. (Note that IE does not
- * support this customization). See the example code below for the different usage examples.
- */
- dragPreview(): ConnectDragPreview;
-}
-/**
- * DropTargetConnector is an object passed to a collecting function of the DropTarget. Its only method dropTarget() returns a function
- * that lets you assign the drop target role to one of your component's DOM nodes.
- */
-export interface DropTargetConnector {
- /**
- * Returns a function that must be used inside the component to assign the drop target role to a node.
- * By returning { connectDropTarget: connect.dropTarget() } from your collecting function, you can mark any React element
- * as the droppable node. To do that, replace any element with this.props.connectDropTarget(element) inside the render function.
- */
- dropTarget(): ConnectDropTarget;
-}
-export declare type ConnectDropTarget = <Props>(elementOrNode: React.ReactElement<Props>) => React.ReactElement<Props>;
-export declare type DragSourceCollector<CollectedProps> = (connect: DragSourceConnector, monitor: DragSourceMonitor) => CollectedProps;
-export declare type DropTargetCollector<CollectedProps> = (connect: DropTargetConnector, monitor: DropTargetMonitor) => CollectedProps;
-export declare type DragLayerCollector<TargetProps, CollectedProps> = (monitor: DragLayerMonitor, props: TargetProps) => CollectedProps;

package.json

@@ -1,6 +1,6 @@
{
"name": "react-dnd",
- "version": "7.2.0",
+ "version": "7.2.1",
"description": "Drag and Drop for React",
"main": "lib/cjs/index.js",
"types": "lib/cjs/index.d.ts",
@@ -48,5 +48,5 @@
"react": ">= 16.8",
"react-dom": ">= 16.8"
},
- "gitHead": "e4f7ebcdeb135ff3aa44c6b28001d3339dc5d55b"
+ "gitHead": "35352b26c97268727812d45488ae2586aba5a944"
}