react-drag-drop-container
Advanced tools
Comparing version 3.0.10 to 3.0.11
var React = require('react'); | ||
var ReactDOM = require('react-dom'); | ||
import { DragDropContainer, DropTarget } from '../src/index'; | ||
import {Gorilla, Puppy} from './Gorilla'; | ||
import ExpandsOnDragEnter from './ExpandsOnDragEnter'; | ||
import BasicDragDemo from './BasicDragDemo'; | ||
import DragFoodToAnimalsDemo from './DragFoodToAnimalsDemo'; | ||
import DragThingsToBoxesDemo from './DragThingsToBoxesDemo'; | ||
var App = React.createClass({ | ||
getInitialState () { | ||
return {gorillaHighlighted: false, puppyHighlighted: false, compKey: 'gorilla'}; | ||
}, | ||
dropped (e) { | ||
this.setState({gorillaHighlighted: false, puppyHighlighted: false}); | ||
e.sourceElem.style.visibility="hidden"; | ||
alert(`Thanks for the ${e.dragData.label}! It tasted ${e.dragData.tastes}!`) | ||
}, | ||
highlight(animal) { | ||
let newState = {}; | ||
newState[animal + 'Highlighted'] = true; | ||
this.setState(newState); | ||
}, | ||
unHighlight(animal) { | ||
let newState = {}; | ||
newState[animal + 'Highlighted'] = false; | ||
this.setState(newState); | ||
}, | ||
landedOn(e) { | ||
console.log('I was dropped on ' + e.dropData.name) | ||
}, | ||
render () { | ||
return ( | ||
<div> | ||
<DragDropContainer xOnly={true}> | ||
<DropTarget | ||
onDrop={this.dropped} | ||
onDragEnter={()=>{this.highlight('gorilla')}} | ||
onDragLeave={()=>{this.unHighlight('gorilla')}} | ||
targetKey="gorilla" | ||
dropData={{name: 'Kong'}} | ||
> | ||
<Gorilla highlighted={this.state.gorillaHighlighted} /> | ||
</DropTarget> | ||
</DragDropContainer> | ||
<DragDropContainer yOnly={true}> | ||
<DropTarget | ||
onDrop={this.dropped} | ||
onDragEnter={()=>{this.highlight('puppy')}} | ||
onDragLeave={()=>{this.unHighlight('puppy')}} | ||
targetKey="puppy" | ||
dropData={{name: 'Sparky'}} | ||
> | ||
<Puppy highlighted={this.state.puppyHighlighted} /> | ||
</DropTarget> | ||
</DragDropContainer> | ||
<div style={{ float: 'left', marginTop: 100 }}> | ||
<ExpandsOnDragEnter/> | ||
</div> | ||
<div style={{ float: 'left', marginLeft: 20, borderLeft: '1px dashed #999' }}> | ||
<ExpandsOnDragEnter/> | ||
<DragDropContainer | ||
returnToBase={true} | ||
targetKey="gorilla" | ||
dragData={{'label': 'banana', 'tastes': 'yummy'}} | ||
onDropped={this.landedOn} | ||
> | ||
<img src="https://s28.postimg.org/bocsgf43d/banana.png" height="45"/> | ||
</DragDropContainer> | ||
<DragDropContainer | ||
targetKey="puppy" | ||
returnToBase={true} | ||
dragData={{'label': 'cheeseburger', 'tastes': 'excellent'}} | ||
dragGhost={<div style={{backgroundColor: '#ddd', padding: 6, borderRadius: 4, textAlign: 'center'}}>Cheeseburger<br/>Drag Ghost</div>} | ||
onDropped={this.landedOn} | ||
> | ||
<img src="https://s28.postimg.org/3o335ocjd/surprise.png" height="45"/> | ||
</DragDropContainer> | ||
<DragDropContainer | ||
targetKey="gorilla" | ||
returnToBase={true} | ||
dragData={{'label': 'orange', 'tastes': 'yummy'}} | ||
onDropped={this.landedOn} | ||
> | ||
<img src="https://s28.postimg.org/3yalp0r5l/orange.png" height="45"/> | ||
</DragDropContainer> | ||
<DragDropContainer | ||
targetKey="puppy" | ||
returnToBase={true} | ||
dragData={{'label': 'pickle', 'tastes': 'bad'}} | ||
onDropped={this.landedOn} | ||
> | ||
<img src="https://s28.postimg.org/5em475u2h/pickle.png" height="45"/> | ||
</DragDropContainer> | ||
</div> | ||
<div style={{ float: 'left', marginLeft: 20 }}> | ||
<DragDropContainer | ||
targetKey="puppy" | ||
returnToBase={true} | ||
dragData={{'label': 'dogfood', 'tastes': 'yummy'}} | ||
dragHandleClassName="drag_handle" | ||
onDropped={this.landedOn} | ||
> | ||
<div style={{width: 80, textAlign: "center"}}> | ||
<div className="drag_handle" style={{backgroundColor:"#aaa"}}>drag handle</div> | ||
<img draggable="false" src="https://www.dogfoodadvisor.com/wp-content/uploads/2009/01/dog-food-can-160.jpg" height="100" /> | ||
<div className="drag_handle" style={{backgroundColor:"#aaa"}}>drag handle</div> | ||
</div> | ||
</DragDropContainer> | ||
<br/><br/><br/> | ||
<DragDropContainer | ||
noDragging={true} | ||
> | ||
<div style={{ padding: 10, border: '4px solid #ddd', width: 60, textAlign: 'center', borderRadius: 6}}>I am not draggable</div> | ||
</DragDropContainer> | ||
<br/><br/><br/> | ||
</div> | ||
<BasicDragDemo /> | ||
<hr /> | ||
<DragFoodToAnimalsDemo/> | ||
<hr /> | ||
<DragThingsToBoxesDemo/> | ||
</div> | ||
@@ -131,0 +18,0 @@ ); |
import React from 'react'; | ||
/* | ||
* Gorilla -- an example target component for DragDropContainer | ||
*/ | ||
class Gorilla extends React.Component { | ||
@@ -7,0 +5,0 @@ constructor(props) { |
@@ -6,2 +6,2 @@ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=18)}([function(e,t,n){"use strict";var r=n(5),o=r;e.exports=o},function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var i=n(4),a=n(10),s=(n(0),n(13),Object.prototype.hasOwnProperty),u=n(11),l={key:!0,ref:!0,__self:!0,__source:!0},c=function(e,t,n,r,o,i,a){var s={$$typeof:u,type:e,key:t,ref:n,props:a,_owner:i};return s};c.createElement=function(e,t,n){var i,u={},p=null,f=null;if(null!=t){r(t)&&(f=t.ref),o(t)&&(p=""+t.key),void 0===t.__self?null:t.__self,void 0===t.__source?null:t.__source;for(i in t)s.call(t,i)&&!l.hasOwnProperty(i)&&(u[i]=t[i])}var d=arguments.length-2;if(1===d)u.children=n;else if(d>1){for(var h=Array(d),y=0;y<d;y++)h[y]=arguments[y+2];u.children=h}if(e&&e.defaultProps){var g=e.defaultProps;for(i in g)void 0===u[i]&&(u[i]=g[i])}return c(e,p,f,0,0,a.current,u)},c.createFactory=function(e){var t=c.createElement.bind(null,e);return t.type=e,t},c.cloneAndReplaceKey=function(e,t){return c(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},c.cloneElement=function(e,t,n){var u,p=i({},e.props),f=e.key,d=e.ref,h=(e._self,e._source,e._owner);if(null!=t){r(t)&&(d=t.ref,h=a.current),o(t)&&(f=""+t.key);var y;e.type&&e.type.defaultProps&&(y=e.type.defaultProps);for(u in t)s.call(t,u)&&!l.hasOwnProperty(u)&&(void 0===t[u]&&void 0!==y?p[u]=y[u]:p[u]=t[u])}var g=arguments.length-2;if(1===g)p.children=n;else if(g>1){for(var v=Array(g),m=0;m<g;m++)v[m]=arguments[m+2];p.children=v}return c(e.type,f,d,0,0,h,p)},c.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===u},e.exports=c},function(e,t,n){"use strict";function r(e,t,n,r,i,a,s,u){if(o(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,a,s,u],p=0;l=new Error(t.replace(/%s/g,function(){return c[p++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}var o=function(e){};e.exports=r},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}e.exports=r},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/* | ||
*/ | ||
var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),l=1;l<arguments.length;l++){n=Object(arguments[l]);for(var c in n)i.call(n,c)&&(u[c]=n[c]);if(o){s=o(n);for(var p=0;p<s.length;p++)a.call(n,s[p])&&(u[s[p]]=n[s[p]])}}return u}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||i}var o=n(3),i=n(8),a=(n(13),n(6));n(2),n(0);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&o("85"),this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};e.exports=r},function(e,t,n){"use strict";var r=(n(0),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){},enqueueReplaceState:function(e,t){},enqueueSetState:function(e,t){}});e.exports=r},function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){"use strict";var r={current:null};e.exports=r},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);if("function"==typeof t)return t}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(9),c=r(l),p=n(17),f=r(p),d=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={clickX:0,clickY:0,left:0,top:0,initialLeftOffset:0,initialTopOffset:0,clicked:!1,dragging:!1,dragged:!1},n.handleMouseDown=n.handleMouseDown.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.startDrag=n.startDrag.bind(n),n.handleMouseMove=n.handleMouseMove.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.drag=n.drag.bind(n),n.handleMouseUp=n.handleMouseUp.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.drop=n.drop.bind(n),n.setGhostElem=n.setGhostElem.bind(n),n.checkForOffsetChanges=n.checkForOffsetChanges.bind(n),n.setDraggableFalseOnChildren=n.setDraggableFalseOnChildren.bind(n),n.dragElem=null,n.ghostElem=null,n.containerElem=null,n.currentTarget=null,n.prevTarget=null,n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){if(this.dragElem=this.ghostElem||this.containerElem,this.props.dragHandleClassName)for(var e=this.containerElem.getElementsByClassName(this.props.dragHandleClassName),t=0;t<e.length;t+=1)this.addListeners(e[t]);else this.addListeners(this.containerElem)}},{key:"setGhostElem",value:function(e){this.ghostElem=e}},{key:"addListeners",value:function(e){var t=this;e.addEventListener("mousedown",function(e){t.handleMouseDown(e)},!1),e.addEventListener("touchstart",function(e){t.handleTouchStart(e)},!1)}},{key:"buildCustomEvent",value:function(e){var t=void 0;return"function"!=typeof window.CustomEvent?(t=document.createEvent("CustomEvent"),t.initCustomEvent(e,!0,!0,{})):t=new CustomEvent(e,{bubbles:!0,cancelable:!0}),Object.assign(t,{dragData:this.props.dragData,dragElem:this.dragElem,sourceElem:this.containerElem}),t}},{key:"setCurrentTarget",value:function(e,t){this.dragElem.style.zIndex=-1;var n=document.elementFromPoint(e,t)||document.body;this.dragElem.style.zIndex=this.props.zIndex,this.currentTarget=this.dragElem.contains(n)?document.body:n}},{key:"generateEnterLeaveEvents",value:function(e,t){var n=this.props.targetKey;this.setCurrentTarget(e,t),this.currentTarget!==this.prevTarget&&(this.prevTarget&&this.prevTarget.dispatchEvent(this.buildCustomEvent(n+"DragLeave")),this.currentTarget&&this.currentTarget.dispatchEvent(this.buildCustomEvent(n+"DragEnter"))),this.prevTarget=this.currentTarget}},{key:"generateDropEvent",value:function(e,t){this.setCurrentTarget(e,t),this.currentTarget.dispatchEvent(this.buildCustomEvent(this.props.targetKey+"Drop"))}},{key:"handleMouseDown",value:function(e){1!==e.buttons||this.props.noDragging||(document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp),this.startDrag(e.clientX,e.clientY))}},{key:"handleTouchStart",value:function(e){this.props.noDragging||(e.preventDefault(),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("touchend",this.handleTouchEnd),this.startDrag(e.targetTouches[0].pageX,e.targetTouches[0].pageY))}},{key:"startDrag",value:function(e,t){document.addEventListener(this.props.targetKey+"Dropped",this.props.onDropped),this.setState({clicked:!0,clickX:e-this.state.left,clickY:t-this.state.top,initialLeftOffset:this.state.dragged?this.state.initialLeftOffset:this.containerElem.offsetLeft,initialTopOffset:this.state.dragged?this.state.initialTopOffset:this.containerElem.offsetTop}),this.props.onStartDrag(this.props.dragData)}},{key:"handleMouseMove",value:function(e){this.props.noDragging||(e.preventDefault(),this.state.clicked&&this.drag(e.clientX,e.clientY))}},{key:"handleTouchMove",value:function(e){this.props.noDragging||(e.preventDefault(),this.state.clicked&&this.drag(e.targetTouches[0].pageX,e.targetTouches[0].pageY))}},{key:"drag",value:function(e,t){this.generateEnterLeaveEvents(e,t);var n=this.checkForOffsetChanges(),r=s(n,2),o=r[0],i=r[1],a={dragging:!0};this.props.yOnly||(a.left=o+e-this.state.clickX),this.props.xOnly||(a.top=i+t-this.state.clickY),this.setState(a),this.props.onDragging(this.props.dragData,this.currentTarget,e,t)}},{key:"handleMouseUp",value:function(e){this.setState({clicked:!1}),this.state.dragging&&(document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.drop(e.clientX,e.clientY))}},{key:"handleTouchEnd",value:function(e){this.setState({clicked:!1}),this.state.dragging&&(document.removeEventListener("touchmove",this.handleTouchMove),document.removeEventListener("touchend",this.handleTouchEnd),this.drop(e.changedTouches[0].pageX,e.changedTouches[0].pageY))}},{key:"drop",value:function(e,t){this.generateDropEvent(e,t),this.props.returnToBase?this.setState({left:0,top:0,dragging:!1}):this.setState({dragged:!0,dragging:!1}),this.props.onEndDrag(this.props.dragData,this.currentTarget,e,t)}},{key:"checkForOffsetChanges",value:function(){var e=void 0,t=void 0;return this.props.dragGhost?(e=this.state.initialLeftOffset-this.containerElem.offsetLeft,t=this.state.initialTopOffset-this.containerElem.offsetTop):(e=this.state.initialLeftOffset+this.state.left-this.containerElem.offsetLeft,t=this.state.initialTopOffset+this.state.top-this.containerElem.offsetTop),[e,t]}},{key:"setDraggableFalseOnChildren",value:function(){var e=c.default.Children.only(this.props.children);return c.default.cloneElement(e,{draggable:"false"})}},{key:"render",value:function(){var e=this,t={position:"relative"},n="";return this.props.dragGhost?n=c.default.createElement(f.default,{dragging:this.state.dragging,left:this.state.left,top:this.state.top,zIndex:this.props.zIndex,setGhostElem:this.setGhostElem},this.props.dragGhost):(t.left=this.state.left,t.top=this.state.top,t.zIndex=this.state.dragging||this.state.dragged?this.props.zIndex:"inherit"),c.default.createElement("div",{style:t,ref:function(t){e.containerElem=t}},this.setDraggableFalseOnChildren(),n)}}]),t}(c.default.Component);d.propTypes={children:c.default.PropTypes.node.isRequired,targetKey:c.default.PropTypes.string,dragData:c.default.PropTypes.object,dragGhost:c.default.PropTypes.node,dragHandleClassName:c.default.PropTypes.string,noDragging:c.default.PropTypes.bool,onDropped:c.default.PropTypes.func,onDragging:c.default.PropTypes.func,onEndDrag:c.default.PropTypes.func,onStartDrag:c.default.PropTypes.func,returnToBase:c.default.PropTypes.bool,xOnly:c.default.PropTypes.bool,yOnly:c.default.PropTypes.bool,zIndex:c.default.PropTypes.number},d.defaultProps={targetKey:"ddc",dragData:{},dragGhost:null,dragHandleClassName:"",onStartDrag:function(){},onDragging:function(){},onEndDrag:function(){},onDropped:function(){},noDragging:!1,returnToBase:!1,xOnly:!1,yOnly:!1,zIndex:1e3},t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(9),u=function(e){return e&&e.__esModule?e:{default:e}}(s),l=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.elem=null,n.handleDrop=n.handleDrop.bind(n),n}return i(t,e),a(t,[{key:"componentDidMount",value:function(){var e=this;this.elem.addEventListener(this.props.targetKey+"DragEnter",function(t){e.props.onDragEnter(t)},!1),this.elem.addEventListener(this.props.targetKey+"DragLeave",function(t){e.props.onDragLeave(t)},!1),this.elem.addEventListener(this.props.targetKey+"Drop",function(t){e.handleDrop(t)},!1)}},{key:"createEvent",value:function(e,t){var n=void 0;return"function"!=typeof window.CustomEvent?(n=document.createEvent("CustomEvent"),n.initCustomEvent(e,!0,!0,{})):n=new CustomEvent(e,{bubbles:!0,cancelable:!0}),Object.assign(n,t),n}},{key:"handleDrop",value:function(e){var t=this.createEvent(this.props.targetKey+"Dropped",{dropElem:this.elem,dropData:this.props.dropData});e.sourceElem.dispatchEvent(t),this.props.onDrop(e)}},{key:"render",value:function(){var e=this;return u.default.createElement("div",{ref:function(t){e.elem=t},style:Object.assign({display:"inline-block"},this.props.style)},this.props.children)}}]),t}(u.default.Component);l.propTypes={children:u.default.PropTypes.node.isRequired,targetKey:u.default.PropTypes.string,onDragEnter:u.default.PropTypes.func,onDragLeave:u.default.PropTypes.func,onDrop:u.default.PropTypes.func,dropData:u.default.PropTypes.object,style:u.default.PropTypes.object},l.defaultProps={targetKey:"ddc",onDragEnter:function(){console.log("drag enter")},onDragLeave:function(){console.log("drag leave")},onDrop:function(){console.log("dropped!")},dropData:{},style:{}},t.default=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(9),u=function(e){return e&&e.__esModule?e:{default:e}}(s),l=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.setGhostElem(this.ghostElem)}},{key:"render",value:function(){var e=this,t={position:"absolute",zIndex:this.props.zIndex,left:this.props.left,top:this.props.top,display:this.props.dragging?"block":"none"};return u.default.createElement("div",{style:t,ref:function(t){e.ghostElem=t}},this.props.children)}}]),t}(u.default.Component);l.propTypes={children:u.default.PropTypes.node.isRequired,setGhostElem:u.default.PropTypes.func.isRequired,dragging:u.default.PropTypes.bool.isRequired,left:u.default.PropTypes.number.isRequired,top:u.default.PropTypes.number.isRequired,zIndex:u.default.PropTypes.number.isRequired},t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(15),i=r(o),a=n(16),s=r(a);e.exports={DragDropContainer:i.default,DropTarget:s.default}},function(e,t,n){"use strict";function r(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function o(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,function(e){return t[e]})}var i={escape:r,unescape:o};e.exports=i},function(e,t,n){"use strict";var r=n(3),o=(n(2),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},u=function(e){var t=this;e instanceof t||r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},l=o,c=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||l,n.poolSize||(n.poolSize=10),n.release=u,n},p={addPoolingTo:c,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s};e.exports=p},function(e,t,n){"use strict";var r=n(4),o=n(22),i=n(7),a=n(27),s=n(23),u=n(24),l=n(1),c=n(25),p=n(28),f=n(29),d=(n(0),l.createElement),h=l.createFactory,y=l.cloneElement,g=r,v={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:f},Component:i,PureComponent:a,createElement:d,cloneElement:y,isValidElement:l.isValidElement,PropTypes:c,createClass:s.createClass,createFactory:h,createMixin:function(e){return e},DOM:u,version:p,__spread:g};e.exports=v},function(e,t,n){"use strict";function r(e){return(""+e).replace(E,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);v(e,i,r),o.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var o=e.result,i=e.keyPrefix,a=e.func,s=e.context,u=a.call(s,t,e.count++);Array.isArray(u)?l(u,o,n,g.thatReturnsArgument):null!=u&&(y.isValidElement(u)&&(u=y.cloneAndReplaceKey(u,i+(!u.key||t&&t.key===u.key?"":r(u.key)+"/")+n)),o.push(u))}function l(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var l=s.getPooled(t,a,o,i);v(e,u,l),s.release(l)}function c(e,t,n){if(null==e)return e;var r=[];return l(e,r,null,t,n),r}function p(e,t,n){return null}function f(e,t){return v(e,p,null)}function d(e){var t=[];return l(e,t,null,g.thatReturnsArgument),t}var h=n(20),y=n(1),g=n(5),v=n(30),m=h.twoArgumentPooler,b=h.fourArgumentPooler,E=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,m),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,b);var P={forEach:a,map:c,mapIntoWithKeyPrefixInternal:l,count:f,toArray:d};e.exports=P},function(e,t,n){"use strict";function r(e){return e}function o(e,t){var n=E.hasOwnProperty(t)?E[t]:null;D.hasOwnProperty(t)&&"OVERRIDE_BASE"!==n&&f("73",t),e&&"DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n&&f("74",t)}function i(e,t){if(t){"function"==typeof t&&f("75"),y.isValidElement(t)&&f("76");var n=e.prototype,r=n.__reactAutoBindPairs;t.hasOwnProperty(m)&&P.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==m){var a=t[i],s=n.hasOwnProperty(i);if(o(s,i),P.hasOwnProperty(i))P[i](e,a);else{var c=E.hasOwnProperty(i),p="function"==typeof a,d=p&&!c&&!s&&t.autobind!==!1;if(d)r.push(i,a),n[i]=a;else if(s){var h=E[i];(!c||"DEFINE_MANY_MERGED"!==h&&"DEFINE_MANY"!==h)&&f("77",h,i),"DEFINE_MANY_MERGED"===h?n[i]=u(n[i],a):"DEFINE_MANY"===h&&(n[i]=l(n[i],a))}else n[i]=a}}}else;}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in P;o&&f("78",n);var i=n in e;i&&f("79",n),e[n]=r}}}function s(e,t){e&&t&&"object"==typeof e&&"object"==typeof t||f("80");for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]&&f("81",n),e[n]=t[n]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return s(o,n),s(o,r),o}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function c(e,t){var n=t.bind(e);return n}function p(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=c(e,o)}}var f=n(3),d=n(4),h=n(7),y=n(1),g=(n(12),n(8)),v=n(6),m=(n(2),n(0),"mixins"),b=[],E={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},P={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=d({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=d({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=d({},e.propTypes,t)},statics:function(e,t){a(e,t)},autobind:function(){}},D={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},T=function(){};d(T.prototype,h.prototype,D);var _={createClass:function(e){var t=r(function(e,n,r){this.__reactAutoBindPairs.length&&p(this),this.props=e,this.context=n,this.refs=v,this.updater=r||g,this.state=null;var o=this.getInitialState?this.getInitialState():null;("object"!=typeof o||Array.isArray(o))&&f("82",t.displayName||"ReactCompositeComponent"),this.state=o});t.prototype=new T,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],b.forEach(i.bind(null,t)),i(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render||f("83");for(var n in E)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){b.push(e)}}};e.exports=_},function(e,t,n){"use strict";var r=n(1),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};e.exports=i},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function o(e){this.message=e,this.stack=""}function i(e){function t(t,n,r,i,a,s,u){i=i||T,s=s||r;if(null==n[r]){var l=b[a];return t?new o(null===n[r]?"The "+l+" `"+s+"` is marked as required in `"+i+"`, but its value is `null`.":"The "+l+" `"+s+"` is marked as required in `"+i+"`, but its value is `undefined`."):null}return e(n,r,i,a,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function a(e){function t(t,n,r,i,a,s){var u=t[n];if(y(u)!==e)return new o("Invalid "+b[i]+" `"+a+"` of type `"+g(u)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return i(t)}function s(e){function t(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){return new o("Invalid "+b[i]+" `"+a+"` of type `"+y(s)+"` supplied to `"+r+"`, expected an array.")}for(var u=0;u<s.length;u++){var l=e(s,u,r,i,a+"["+u+"]",E);if(l instanceof Error)return l}return null}return i(t)}function u(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var s=b[i],u=e.name||T;return new o("Invalid "+s+" `"+a+"` of type `"+v(t[n])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}return i(t)}function l(e){function t(t,n,i,a,s){for(var u=t[n],l=0;l<e.length;l++)if(r(u,e[l]))return null;return new o("Invalid "+b[a]+" `"+s+"` of value `"+u+"` supplied to `"+i+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?i(t):P.thatReturnsNull}function c(e){function t(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],u=y(s);if("object"!==u){return new o("Invalid "+b[i]+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected an object.")}for(var l in s)if(s.hasOwnProperty(l)){var c=e(s,l,r,i,a+"."+l,E);if(c instanceof Error)return c}return null}return i(t)}function p(e){function t(t,n,r,i,a){for(var s=0;s<e.length;s++){if(null==(0,e[s])(t,n,r,i,a,E))return null}return new o("Invalid "+b[i]+" `"+a+"` supplied to `"+r+"`.")}return Array.isArray(e)?i(t):P.thatReturnsNull}function f(e){function t(t,n,r,i,a){var s=t[n],u=y(s);if("object"!==u){return new o("Invalid "+b[i]+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.")}for(var l in e){var c=e[l];if(c){var p=c(s,l,r,i,a+"."+l,E);if(p)return p}}return null}return i(t)}function d(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(d);if(null===e||m.isValidElement(e))return!0;var t=D(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!d(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!d(o[1]))return!1}return!0;default:return!1}}function h(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":h(t,e)?"symbol":t}function g(e){var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function v(e){return e.constructor&&e.constructor.name?e.constructor.name:T}var m=n(1),b=n(12),E=n(26),P=n(5),D=n(14),T=(n(0),"<<anonymous>>"),_={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:function(){return i(P.thatReturns(null))}(),arrayOf:s,element:function(){function e(e,t,n,r,i){var a=e[t];if(!m.isValidElement(a)){return new o("Invalid "+b[r]+" `"+i+"` of type `"+y(a)+"` supplied to `"+n+"`, expected a single ReactElement.")}return null}return i(e)}(),instanceOf:u,node:function(){function e(e,t,n,r,i){if(!d(e[t])){return new o("Invalid "+b[r]+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}return null}return i(e)}(),objectOf:c,oneOf:l,oneOfType:p,shape:f};o.prototype=Error.prototype,e.exports=_},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||s}function o(){}var i=n(4),a=n(7),s=n(8),u=n(6);o.prototype=a.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,e.exports=r},function(e,t,n){"use strict";e.exports="15.4.2"},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)||o("143"),e}var o=n(3),i=n(1);n(2);e.exports=r},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?l.escape(e.key):t.toString(36)}function o(e,t,n,i){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||"object"===f&&e.$$typeof===s)return n(i,e,""===t?c+r(e,0):t),1;var d,h,y=0,g=""===t?c:t+p;if(Array.isArray(e))for(var v=0;v<e.length;v++)d=e[v],h=g+r(d,v),y+=o(d,h,n,i);else{var m=u(e);if(m){var b,E=m.call(e);if(m!==e.entries)for(var P=0;!(b=E.next()).done;)d=b.value,h=g+r(d,P++),y+=o(d,h,n,i);else for(;!(b=E.next()).done;){var D=b.value;D&&(d=D[1],h=g+l.escape(D[0])+p+r(d,0),y+=o(d,h,n,i))}}else if("object"===f){var T="",_=String(e);a("31","[object Object]"===_?"object with keys {"+Object.keys(e).join(", ")+"}":_,T)}}return y}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=n(3),s=(n(10),n(11)),u=n(14),l=(n(2),n(19)),c=(n(0),"."),p=":";e.exports=i}])}); | ||
var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),l=1;l<arguments.length;l++){n=Object(arguments[l]);for(var c in n)i.call(n,c)&&(u[c]=n[c]);if(o){s=o(n);for(var p=0;p<s.length;p++)a.call(n,s[p])&&(u[s[p]]=n[s[p]])}}return u}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||i}var o=n(3),i=n(8),a=(n(13),n(6));n(2),n(0);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&o("85"),this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};e.exports=r},function(e,t,n){"use strict";var r=(n(0),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){},enqueueReplaceState:function(e,t){},enqueueSetState:function(e,t){}});e.exports=r},function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){"use strict";var r={current:null};e.exports=r},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);if("function"==typeof t)return t}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(9),c=r(l),p=n(17),f=r(p),d=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={clickX:0,clickY:0,left:0,top:0,initialLeftOffset:0,initialTopOffset:0,clicked:!1,dragging:!1,dragged:!1},n.handleMouseDown=n.handleMouseDown.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.startDrag=n.startDrag.bind(n),n.handleMouseMove=n.handleMouseMove.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.drag=n.drag.bind(n),n.handleMouseUp=n.handleMouseUp.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.drop=n.drop.bind(n),n.setGhostElem=n.setGhostElem.bind(n),n.checkForOffsetChanges=n.checkForOffsetChanges.bind(n),n.setDraggableFalseOnChildren=n.setDraggableFalseOnChildren.bind(n),n.dragElem=null,n.ghostElem=null,n.containerElem=null,n.currentTarget=null,n.prevTarget=null,n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){if(this.dragElem=this.ghostElem||this.containerElem,this.props.dragHandleClassName)for(var e=this.containerElem.getElementsByClassName(this.props.dragHandleClassName),t=0;t<e.length;t+=1)this.addListeners(e[t]);else this.addListeners(this.containerElem)}},{key:"setGhostElem",value:function(e){this.ghostElem=e}},{key:"addListeners",value:function(e){var t=this;e.addEventListener("mousedown",function(e){t.handleMouseDown(e)},!1),e.addEventListener("touchstart",function(e){t.handleTouchStart(e)},!1)}},{key:"buildCustomEvent",value:function(e){var t=void 0;return"function"!=typeof window.CustomEvent?(t=document.createEvent("CustomEvent"),t.initCustomEvent(e,!0,!0,{})):t=new CustomEvent(e,{bubbles:!0,cancelable:!0}),Object.assign(t,{dragData:this.props.dragData,dragElem:this.dragElem,sourceElem:this.containerElem}),t}},{key:"setCurrentTarget",value:function(e,t){this.dragElem.style.zIndex=-1;var n=document.elementFromPoint(e,t)||document.body;this.dragElem.style.zIndex=this.props.zIndex,this.currentTarget=this.dragElem.contains(n)?document.body:n}},{key:"generateEnterLeaveEvents",value:function(e,t){var n=this.props.targetKey;this.setCurrentTarget(e,t),this.currentTarget!==this.prevTarget&&(this.prevTarget&&this.prevTarget.dispatchEvent(this.buildCustomEvent(n+"DragLeave")),this.currentTarget&&this.currentTarget.dispatchEvent(this.buildCustomEvent(n+"DragEnter"))),this.prevTarget=this.currentTarget}},{key:"generateDropEvent",value:function(e,t){this.setCurrentTarget(e,t),this.currentTarget.dispatchEvent(this.buildCustomEvent(this.props.targetKey+"Drop"))}},{key:"handleMouseDown",value:function(e){1!==e.buttons||this.props.noDragging||(document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp),this.startDrag(e.clientX,e.clientY))}},{key:"handleTouchStart",value:function(e){this.props.noDragging||(e.preventDefault(),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("touchend",this.handleTouchEnd),this.startDrag(e.targetTouches[0].pageX,e.targetTouches[0].pageY))}},{key:"startDrag",value:function(e,t){document.addEventListener(this.props.targetKey+"Dropped",this.props.onDropped),this.setState({clicked:!0,clickX:e-this.state.left,clickY:t-this.state.top,initialLeftOffset:this.state.dragged?this.state.initialLeftOffset:this.containerElem.offsetLeft,initialTopOffset:this.state.dragged?this.state.initialTopOffset:this.containerElem.offsetTop}),this.props.onStartDrag(this.props.dragData)}},{key:"handleMouseMove",value:function(e){this.props.noDragging||(e.preventDefault(),this.state.clicked&&this.drag(e.clientX,e.clientY))}},{key:"handleTouchMove",value:function(e){this.props.noDragging||(e.preventDefault(),this.state.clicked&&this.drag(e.targetTouches[0].pageX,e.targetTouches[0].pageY))}},{key:"drag",value:function(e,t){this.generateEnterLeaveEvents(e,t);var n=this.checkForOffsetChanges(),r=s(n,2),o=r[0],i=r[1],a={dragging:!0};this.props.yOnly||(a.left=o+e-this.state.clickX),this.props.xOnly||(a.top=i+t-this.state.clickY),this.setState(a),this.props.onDragging(this.props.dragData,this.currentTarget,e,t)}},{key:"handleMouseUp",value:function(e){this.setState({clicked:!1}),this.state.dragging&&(document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.drop(e.clientX,e.clientY))}},{key:"handleTouchEnd",value:function(e){this.setState({clicked:!1}),this.state.dragging&&(document.removeEventListener("touchmove",this.handleTouchMove),document.removeEventListener("touchend",this.handleTouchEnd),this.drop(e.changedTouches[0].pageX,e.changedTouches[0].pageY))}},{key:"drop",value:function(e,t){this.generateDropEvent(e,t),this.containerElem&&(this.props.returnToBase?this.setState({left:0,top:0,dragging:!1}):this.setState({dragged:!0,dragging:!1})),this.props.onEndDrag(this.props.dragData,this.currentTarget,e,t)}},{key:"checkForOffsetChanges",value:function(){var e=void 0,t=void 0;return this.props.dragGhost?(e=this.state.initialLeftOffset-this.containerElem.offsetLeft,t=this.state.initialTopOffset-this.containerElem.offsetTop):(e=this.state.initialLeftOffset+this.state.left-this.containerElem.offsetLeft,t=this.state.initialTopOffset+this.state.top-this.containerElem.offsetTop),[e,t]}},{key:"setDraggableFalseOnChildren",value:function(){var e=c.default.Children.only(this.props.children);return c.default.cloneElement(e,{draggable:"false"})}},{key:"render",value:function(){var e=this,t={position:"relative",display:"inline-block"},n="";return this.props.dragGhost?n=c.default.createElement(f.default,{dragging:this.state.dragging,left:this.state.left,top:this.state.top,zIndex:this.props.zIndex,setGhostElem:this.setGhostElem},this.props.dragGhost):(t.left=this.state.left,t.top=this.state.top,t.zIndex=this.state.dragging||this.state.dragged?this.props.zIndex:"inherit"),c.default.createElement("div",{style:t,ref:function(t){e.containerElem=t}},this.setDraggableFalseOnChildren(),n)}}]),t}(c.default.Component);d.propTypes={children:c.default.PropTypes.node.isRequired,targetKey:c.default.PropTypes.string,dragData:c.default.PropTypes.object,dragGhost:c.default.PropTypes.node,dragHandleClassName:c.default.PropTypes.string,noDragging:c.default.PropTypes.bool,onDropped:c.default.PropTypes.func,onDragging:c.default.PropTypes.func,onEndDrag:c.default.PropTypes.func,onStartDrag:c.default.PropTypes.func,returnToBase:c.default.PropTypes.bool,xOnly:c.default.PropTypes.bool,yOnly:c.default.PropTypes.bool,zIndex:c.default.PropTypes.number},d.defaultProps={targetKey:"ddc",dragData:{},dragGhost:null,dragHandleClassName:"",onStartDrag:function(){},onDragging:function(){},onEndDrag:function(){},onDropped:function(){},noDragging:!1,returnToBase:!1,xOnly:!1,yOnly:!1,zIndex:1e3},t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(9),u=function(e){return e&&e.__esModule?e:{default:e}}(s),l=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.elem=null,n.handleDrop=n.handleDrop.bind(n),n}return i(t,e),a(t,[{key:"componentDidMount",value:function(){var e=this;this.elem.addEventListener(this.props.targetKey+"DragEnter",function(t){e.props.onDragEnter(t)},!1),this.elem.addEventListener(this.props.targetKey+"DragLeave",function(t){e.props.onDragLeave(t)},!1),this.elem.addEventListener(this.props.targetKey+"Drop",function(t){e.handleDrop(t)},!1)}},{key:"createEvent",value:function(e,t){var n=void 0;return"function"!=typeof window.CustomEvent?(n=document.createEvent("CustomEvent"),n.initCustomEvent(e,!0,!0,{})):n=new CustomEvent(e,{bubbles:!0,cancelable:!0}),Object.assign(n,t),n}},{key:"handleDrop",value:function(e){var t=this.createEvent(this.props.targetKey+"Dropped",{dropElem:this.elem,dropData:this.props.dropData});e.sourceElem.dispatchEvent(t),this.props.onDrop(e)}},{key:"render",value:function(){var e=this;return u.default.createElement("div",{ref:function(t){e.elem=t},style:Object.assign({display:"inline-block"},this.props.style)},this.props.children)}}]),t}(u.default.Component);l.propTypes={children:u.default.PropTypes.node.isRequired,targetKey:u.default.PropTypes.string,onDragEnter:u.default.PropTypes.func,onDragLeave:u.default.PropTypes.func,onDrop:u.default.PropTypes.func,dropData:u.default.PropTypes.object,style:u.default.PropTypes.object},l.defaultProps={targetKey:"ddc",onDragEnter:function(){},onDragLeave:function(){},onDrop:function(){return function(){}},dropData:{},style:{}},t.default=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(9),u=function(e){return e&&e.__esModule?e:{default:e}}(s),l=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.setGhostElem(this.ghostElem)}},{key:"render",value:function(){var e=this,t={position:"absolute",zIndex:this.props.zIndex,left:this.props.left,top:this.props.top,display:this.props.dragging?"block":"none"};return u.default.createElement("div",{style:t,ref:function(t){e.ghostElem=t}},this.props.children)}}]),t}(u.default.Component);l.propTypes={children:u.default.PropTypes.node.isRequired,setGhostElem:u.default.PropTypes.func.isRequired,dragging:u.default.PropTypes.bool.isRequired,left:u.default.PropTypes.number.isRequired,top:u.default.PropTypes.number.isRequired,zIndex:u.default.PropTypes.number.isRequired},t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(15),i=r(o),a=n(16),s=r(a);e.exports={DragDropContainer:i.default,DropTarget:s.default}},function(e,t,n){"use strict";function r(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function o(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,function(e){return t[e]})}var i={escape:r,unescape:o};e.exports=i},function(e,t,n){"use strict";var r=n(3),o=(n(2),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},u=function(e){var t=this;e instanceof t||r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},l=o,c=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||l,n.poolSize||(n.poolSize=10),n.release=u,n},p={addPoolingTo:c,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s};e.exports=p},function(e,t,n){"use strict";var r=n(4),o=n(22),i=n(7),a=n(27),s=n(23),u=n(24),l=n(1),c=n(25),p=n(28),f=n(29),d=(n(0),l.createElement),h=l.createFactory,y=l.cloneElement,g=r,v={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:f},Component:i,PureComponent:a,createElement:d,cloneElement:y,isValidElement:l.isValidElement,PropTypes:c,createClass:s.createClass,createFactory:h,createMixin:function(e){return e},DOM:u,version:p,__spread:g};e.exports=v},function(e,t,n){"use strict";function r(e){return(""+e).replace(E,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);v(e,i,r),o.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var o=e.result,i=e.keyPrefix,a=e.func,s=e.context,u=a.call(s,t,e.count++);Array.isArray(u)?l(u,o,n,g.thatReturnsArgument):null!=u&&(y.isValidElement(u)&&(u=y.cloneAndReplaceKey(u,i+(!u.key||t&&t.key===u.key?"":r(u.key)+"/")+n)),o.push(u))}function l(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var l=s.getPooled(t,a,o,i);v(e,u,l),s.release(l)}function c(e,t,n){if(null==e)return e;var r=[];return l(e,r,null,t,n),r}function p(e,t,n){return null}function f(e,t){return v(e,p,null)}function d(e){var t=[];return l(e,t,null,g.thatReturnsArgument),t}var h=n(20),y=n(1),g=n(5),v=n(30),m=h.twoArgumentPooler,b=h.fourArgumentPooler,E=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,m),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,b);var P={forEach:a,map:c,mapIntoWithKeyPrefixInternal:l,count:f,toArray:d};e.exports=P},function(e,t,n){"use strict";function r(e){return e}function o(e,t){var n=E.hasOwnProperty(t)?E[t]:null;D.hasOwnProperty(t)&&"OVERRIDE_BASE"!==n&&f("73",t),e&&"DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n&&f("74",t)}function i(e,t){if(t){"function"==typeof t&&f("75"),y.isValidElement(t)&&f("76");var n=e.prototype,r=n.__reactAutoBindPairs;t.hasOwnProperty(m)&&P.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==m){var a=t[i],s=n.hasOwnProperty(i);if(o(s,i),P.hasOwnProperty(i))P[i](e,a);else{var c=E.hasOwnProperty(i),p="function"==typeof a,d=p&&!c&&!s&&t.autobind!==!1;if(d)r.push(i,a),n[i]=a;else if(s){var h=E[i];(!c||"DEFINE_MANY_MERGED"!==h&&"DEFINE_MANY"!==h)&&f("77",h,i),"DEFINE_MANY_MERGED"===h?n[i]=u(n[i],a):"DEFINE_MANY"===h&&(n[i]=l(n[i],a))}else n[i]=a}}}else;}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in P;o&&f("78",n);var i=n in e;i&&f("79",n),e[n]=r}}}function s(e,t){e&&t&&"object"==typeof e&&"object"==typeof t||f("80");for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]&&f("81",n),e[n]=t[n]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return s(o,n),s(o,r),o}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function c(e,t){var n=t.bind(e);return n}function p(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=c(e,o)}}var f=n(3),d=n(4),h=n(7),y=n(1),g=(n(12),n(8)),v=n(6),m=(n(2),n(0),"mixins"),b=[],E={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},P={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=d({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=d({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=d({},e.propTypes,t)},statics:function(e,t){a(e,t)},autobind:function(){}},D={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},T=function(){};d(T.prototype,h.prototype,D);var _={createClass:function(e){var t=r(function(e,n,r){this.__reactAutoBindPairs.length&&p(this),this.props=e,this.context=n,this.refs=v,this.updater=r||g,this.state=null;var o=this.getInitialState?this.getInitialState():null;("object"!=typeof o||Array.isArray(o))&&f("82",t.displayName||"ReactCompositeComponent"),this.state=o});t.prototype=new T,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],b.forEach(i.bind(null,t)),i(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render||f("83");for(var n in E)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){b.push(e)}}};e.exports=_},function(e,t,n){"use strict";var r=n(1),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};e.exports=i},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function o(e){this.message=e,this.stack=""}function i(e){function t(t,n,r,i,a,s,u){i=i||T,s=s||r;if(null==n[r]){var l=b[a];return t?new o(null===n[r]?"The "+l+" `"+s+"` is marked as required in `"+i+"`, but its value is `null`.":"The "+l+" `"+s+"` is marked as required in `"+i+"`, but its value is `undefined`."):null}return e(n,r,i,a,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function a(e){function t(t,n,r,i,a,s){var u=t[n];if(y(u)!==e)return new o("Invalid "+b[i]+" `"+a+"` of type `"+g(u)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return i(t)}function s(e){function t(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){return new o("Invalid "+b[i]+" `"+a+"` of type `"+y(s)+"` supplied to `"+r+"`, expected an array.")}for(var u=0;u<s.length;u++){var l=e(s,u,r,i,a+"["+u+"]",E);if(l instanceof Error)return l}return null}return i(t)}function u(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var s=b[i],u=e.name||T;return new o("Invalid "+s+" `"+a+"` of type `"+v(t[n])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}return i(t)}function l(e){function t(t,n,i,a,s){for(var u=t[n],l=0;l<e.length;l++)if(r(u,e[l]))return null;return new o("Invalid "+b[a]+" `"+s+"` of value `"+u+"` supplied to `"+i+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?i(t):P.thatReturnsNull}function c(e){function t(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],u=y(s);if("object"!==u){return new o("Invalid "+b[i]+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected an object.")}for(var l in s)if(s.hasOwnProperty(l)){var c=e(s,l,r,i,a+"."+l,E);if(c instanceof Error)return c}return null}return i(t)}function p(e){function t(t,n,r,i,a){for(var s=0;s<e.length;s++){if(null==(0,e[s])(t,n,r,i,a,E))return null}return new o("Invalid "+b[i]+" `"+a+"` supplied to `"+r+"`.")}return Array.isArray(e)?i(t):P.thatReturnsNull}function f(e){function t(t,n,r,i,a){var s=t[n],u=y(s);if("object"!==u){return new o("Invalid "+b[i]+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.")}for(var l in e){var c=e[l];if(c){var p=c(s,l,r,i,a+"."+l,E);if(p)return p}}return null}return i(t)}function d(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(d);if(null===e||m.isValidElement(e))return!0;var t=D(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!d(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!d(o[1]))return!1}return!0;default:return!1}}function h(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":h(t,e)?"symbol":t}function g(e){var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function v(e){return e.constructor&&e.constructor.name?e.constructor.name:T}var m=n(1),b=n(12),E=n(26),P=n(5),D=n(14),T=(n(0),"<<anonymous>>"),_={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:function(){return i(P.thatReturns(null))}(),arrayOf:s,element:function(){function e(e,t,n,r,i){var a=e[t];if(!m.isValidElement(a)){return new o("Invalid "+b[r]+" `"+i+"` of type `"+y(a)+"` supplied to `"+n+"`, expected a single ReactElement.")}return null}return i(e)}(),instanceOf:u,node:function(){function e(e,t,n,r,i){if(!d(e[t])){return new o("Invalid "+b[r]+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}return null}return i(e)}(),objectOf:c,oneOf:l,oneOfType:p,shape:f};o.prototype=Error.prototype,e.exports=_},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||s}function o(){}var i=n(4),a=n(7),s=n(8),u=n(6);o.prototype=a.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,e.exports=r},function(e,t,n){"use strict";e.exports="15.4.2"},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)||o("143"),e}var o=n(3),i=n(1);n(2);e.exports=r},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?l.escape(e.key):t.toString(36)}function o(e,t,n,i){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||"object"===f&&e.$$typeof===s)return n(i,e,""===t?c+r(e,0):t),1;var d,h,y=0,g=""===t?c:t+p;if(Array.isArray(e))for(var v=0;v<e.length;v++)d=e[v],h=g+r(d,v),y+=o(d,h,n,i);else{var m=u(e);if(m){var b,E=m.call(e);if(m!==e.entries)for(var P=0;!(b=E.next()).done;)d=b.value,h=g+r(d,P++),y+=o(d,h,n,i);else for(;!(b=E.next()).done;){var D=b.value;D&&(d=D[1],h=g+l.escape(D[0])+p+r(d,0),y+=o(d,h,n,i))}}else if("object"===f){var T="",_=String(e);a("31","[object Object]"===_?"object with keys {"+Object.keys(e).join(", ")+"}":_,T)}}return y}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=n(3),s=(n(10),n(11)),u=n(14),l=(n(2),n(19)),c=(n(0),"."),p=":";e.exports=i}])}); |
{ | ||
"name": "react-drag-drop-container", | ||
"version": "3.0.10", | ||
"version": "3.0.11", | ||
"description": "DragDropContainer", | ||
@@ -14,3 +14,3 @@ "main": "lib/bundle.js", | ||
"build": "npm run build-demo; npm run build-dist", | ||
"build-demo": "webpack -d", | ||
"build-demo": "webpack -d; cp ./demo/img/* ./public/img/; cp ./demo/*.html ./public/; cp ./demo/*.css ./public/", | ||
"build-dist": "webpack --config webpack.dist.config.js -p", | ||
@@ -49,2 +49,3 @@ "launch": "webpack-dev-server --hot --inline --open", | ||
"sass-loader": "^6.0.3", | ||
"shortid": "^2.2.8", | ||
"style-loader": "^0.16.1", | ||
@@ -51,0 +52,0 @@ "webpack": "^2.2.1", |
@@ -192,6 +192,8 @@ import React from 'react'; | ||
this.generateDropEvent(x, y); | ||
if (this.props.returnToBase) { | ||
this.setState({ left: 0, top: 0, dragging: false }); | ||
} else { | ||
this.setState({ dragged: true, dragging: false }); | ||
if (this.containerElem) { | ||
if (this.props.returnToBase) { | ||
this.setState({ left: 0, top: 0, dragging: false }); | ||
} else { | ||
this.setState({ dragged: true, dragging: false }); | ||
} | ||
} | ||
@@ -227,2 +229,3 @@ this.props.onEndDrag(this.props.dragData, this.currentTarget, x, y); | ||
position: 'relative', | ||
display: 'inline-block', | ||
}; | ||
@@ -229,0 +232,0 @@ |
@@ -57,5 +57,5 @@ import React from 'react'; | ||
targetKey: 'ddc', | ||
onDragEnter: () => { console.log('drag enter'); }, // eslint-disable-line no-console | ||
onDragLeave: () => { console.log('drag leave'); }, // eslint-disable-line no-console | ||
onDrop: () => { console.log('dropped!'); }, // eslint-disable-line no-console | ||
onDragEnter: () => {}, | ||
onDragLeave: () => {}, | ||
onDrop: () => () => {}, | ||
dropData: {}, | ||
@@ -62,0 +62,0 @@ style: {}, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
2708686
40
10227
19