react-dnd
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.ReactDND=t():e.ReactDND=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";e.exports={DragDropMixin:r(20),ImagePreloaderMixin:r(21),HorizontalDragAnchors:r(6),VerticalDragAnchors:r(7)}},function(e,t,r){"use strict";var n=r(4),i=function(e){var t,r={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};e.exports=i},function(e){function t(e,t,r){for(var n=(r||0)-1,i=e?e.length:0;++n<i;)if(e[n]===t)return n;return-1}e.exports=t},function(e,t,r){function n(e){var t=e.cache;t&&n(t),e.array=e.cache=e.criteria=e.object=e.number=e.string=e.value=null,s.length<i&&s.push(e)}var i=r(15),s=r(16);e.exports=n},function(e){"use strict";var t=function(e,t,r,n,i,s,o,a){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var h=[r,n,i,s,o,a],u=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return h[u++]}))}throw c.framesToPop=1,c}};e.exports=t},function(e,t,r){"use strict";var n=r(1),i=n({DRAG_START:null,DRAG_END:null,DROP:null});e.exports=i},function(e,t,r){"use strict";var n=r(1),i=n({LEFT:null,CENTER:null,RIGHT:null});e.exports=i},function(e,t,r){"use strict";var n=r(1),i=n({TOP:null,CENTER:null,BOTTOM:null});e.exports=i},function(e,t,r){"use strict";var n=r(24).Dispatcher,i=r(42),s=i(new n,{handleAction:function(e){this.dispatch({action:e})}});e.exports=s},function(e){"use strict";function t(e,t){t||(t=e);for(var r in e)e.hasOwnProperty(r)&&"function"==typeof e[r]&&(e[r]=e[r].bind(t));return e}e.exports=t},function(e){var t=[];e.exports=t},function(e,t,r){function n(e,t){var r=typeof t;if(e=e.cache,"boolean"==r||null==t)return e[t]?0:-1;"number"!=r&&"string"!=r&&(r="object");var n="number"==r?t:s+t;return e=(e=e[r])&&e[n],"object"==r?e&&i(e,t)>-1?0:-1:e?0:-1}var i=r(2),s=r(13);e.exports=n},function(e,t,r){function n(e){var t=-1,r=e.length,n=e[0],o=e[r/2|0],a=e[r-1];if(n&&"object"==typeof n&&o&&"object"==typeof o&&a&&"object"==typeof a)return!1;var c=s();c["false"]=c["null"]=c["true"]=c.undefined=!1;var h=s();for(h.array=e,h.cache=c,h.push=i;++t<r;)h.push(e[t]);return h}{var i=r(32),s=r(34);r(3)}e.exports=n},function(e){var t=+new Date+"";e.exports=t},function(e){var t=75;e.exports=t},function(e){var t=40;e.exports=t},function(e){var t=[];e.exports=t},function(e,t,r){"use strict";var n=r(44),i=function(e,t){var r={};return n(r,e),n(r,t),r};e.exports=i},function(e){"use strict";function t(e,t){if(e===t)return!0;var r;for(r in e)if(e.hasOwnProperty(r)&&(!t.hasOwnProperty(r)||e[r]!==t[r]))return!1;for(r in t)if(t.hasOwnProperty(r)&&!e.hasOwnProperty(r))return!1;return!0}e.exports=t},function(e,t,r){"use strict";var n=r(8),i=r(5),s={startDragging:function(e,t){n.handleAction({type:i.DRAG_START,itemType:e,item:t})},recordDrop:function(){n.handleAction({type:i.DROP})},endDragging:function(){n.handleAction({type:i.DRAG_END})}};e.exports=s},function(e,t,r){"use strict";function n(e,t){return-1!==e.indexOf(t,e.length-t.length)}function i(){return/firefox/i.test(navigator.userAgent)}function s(){return!!window.safari}function o(){return"WebkitAppearance"in document.documentElement.style}function a(e){return e?s()&&e instanceof Image&&n(e.src,".gif")?!1:!0:!1}function c(e,t,r,n){r=r||{};var o=e.offsetWidth,a=e.offsetHeight,c=t instanceof Image,h=c?t.width:o,u=c?t.height:a,g=r.horizontal||A.CENTER,f=r.vertical||x.CENTER,p=n,l=p.offsetX,d=p.offsetY;switch(i()?(l=n.layerX,d=n.layerY):s()&&(u/=window.devicePixelRatio,h/=window.devicePixelRatio),g){case A.LEFT:break;case A.CENTER:l*=h/o;break;case A.RIGHT:l=h-h*(1-l/o)}switch(f){case x.TOP:break;case x.CENTER:d*=u/a;break;case x.BOTTOM:d=u-u*(1-d/a)}return s()&&(d+=(window.devicePixelRatio-1)*u),{x:l,y:d}}function h(e){var t={width:e.width,height:e.height};return(i()||s())&&(t.width*=window.devicePixelRatio,t.height*=window.devicePixelRatio),t}function u(e,t,r){var n=t,i=n.dataTransfer,s=r,o=s.dragPreview,h=s.effectAllowed,u=s.dragAnchors;try{i.setData("application/json",{})}catch(g){}if(a(o)&&i.setDragImage){var f=c(e,o,u,t);i.setDragImage(o,f.x,f.y)}i.effectAllowed=h}function g(e){var t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}function f(e,t){v=e,D=g(e),y=!1,m=t}function p(){if(!y){var e=g(v);y=!I(D,e)}return y}function l(){v=null,D=null,y=!1,m=null}function d(){m&&v&&!document.contains(v)&&m()}var v,D,m,y,_=r(19),b=r(22),A=r(6),x=r(7),w=r(9),T=r(4),E=r(17),I=r(18),S=r(27),L=r(28),k=r(41);if(o()&&window.addEventListener("dragover",function(e){p()&&e.preventDefault()}),i()){var P=null;window.addEventListener("dragover",function(){clearTimeout(P),P=setTimeout(d,140)})}else window.addEventListener("drop",d);var O={getInitialState:function(){var e={ownDraggedItemType:null,hasDragEntered:!1};return E(e,this.getStateFromDragDropStore())},getActiveDropTargetType:function(){var e=this.state,t=e.draggedItemType,r=e.draggedItem,n=e.ownDraggedItemType,i=this._dropTargets[t];if(!i)return null;if(t===n)return null;var s=i,o=s.canDrop;return!o||o(r)?t:null},isAnyDropTargetActive:function(e){return e.indexOf(this.getActiveDropTargetType())>-1},getStateFromDragDropStore:function(){return{draggedItem:b.getDraggedItem(),draggedItemType:b.getDraggedItemType()}},getDragState:function(e){return T(this._dragSources[e],"No drag source for %s",e),{isDragging:this.state.ownDraggedItemType===e}},getDropState:function(e){T(this._dropTargets[e],"No drop target for %s",e);var t=this.getActiveDropTargetType()===e,r=this.state.hasDragEntered;return{isDragging:t,isHovering:t&&r}},componentWillMount:function(){this._dragEntered=[],this._dragSources={},this._dropTargets={},this.configureDragDrop(this.registerDragDropItemTypeHandlers)},componentDidMount:function(){b.addChangeListener(this.handleDragDropStoreChange)},componentWillUnmount:function(){b.removeChangeListener(this.handleDragDropStoreChange)},calculateDragPreviewSize:h,registerDragDropItemTypeHandlers:function(e,t){var r=t,n=r.dragSource,i=r.dropTarget;n&&(T(!this._dragSources[e],"Drag source for %s specified twice",e),this._dragSources[e]=w(n,this)),i&&(T(!this._dropTargets[e],"Drop target for %s specified twice",e),this._dropTargets[e]=w(i,this))},handleDragDropStoreChange:function(){this.setState(this.getStateFromDragDropStore())},dragSourceFor:function(e){return T(this._dragSources[e],"No drag source for %s",e),{draggable:!0,onDragStart:this.handleDragStart.bind(this,e),onDragEnd:this.handleDragEnd.bind(this,e)}},handleDragStart:function(e,t){var r=this._dragSources[e],n=r.canDrag,i=r.beginDrag;if(n&&!n(t))return void t.preventDefault();f(t.target,this.handleDragEnd.bind(this,e,null));var s=i(t),o=s,a=o.item;u(this.getDOMNode(),t.nativeEvent,s),T(k(a),'Expected return value of beginDrag to contain "item" object'),this.setState({ownDraggedItemType:e}),_.startDragging(e,a)},handleDragEnd:function(e,t){l(),this.isMounted()&&this.setState({ownDraggedItemType:null});var r=this._dragSources[e],n=r.endDrag,i=b.didDrop();_.endDragging(),n&&n(i,t)},dropTargetFor:function(){var e=Array.prototype.slice.call(arguments,0);return e.forEach(function(e){T(this._dropTargets[e],"No drop target for %s",e)}.bind(this)),{onDragEnter:this.handleDragEnter.bind(this,e),onDragOver:this.handleDragOver.bind(this,e),onDragLeave:this.handleDragLeave.bind(this,e),onDrop:this.handleDrop.bind(this,e)}},handleDragOver:function(e,t){if(this.isAnyDropTargetActive(e)){t.preventDefault();var r=this._dropTargets[this.state.draggedItemType],n=r.over;n&&n(this.state.draggedItem,t)}},handleDragEnter:function(e,t){if(this.isAnyDropTargetActive(e)){if(!this._dragEntered.length){this.setState({hasDragEntered:!0});var r=this._dropTargets[this.state.draggedItemType],n=r.enter;n&&n(this.state.draggedItem,t)}this._dragEntered=S(this._dragEntered,[t.target])}},handleDragLeave:function(e,t){if(this.isAnyDropTargetActive(e)&&(this._dragEntered=L(this._dragEntered,t.target),!this._dragEntered.length)){this.setState({hasDragEntered:!1});var r=this._dropTargets[this.state.draggedItemType],n=r.leave;n&&n(this.state.draggedItem,t)}},handleDrop:function(e,t){if(this.isAnyDropTargetActive(e)){t.preventDefault();var r=b.getDraggedItem(),n=this._dropTargets[this.state.draggedItemType],i=n.acceptDrop;this._dragEntered=[],this.setState({hasDragEntered:!1}),i&&i(r,t)===!1||_.recordDrop()}}};e.exports=O},function(e){"use strict";var t="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",r={componentDidMount:function(){this._cachedImages={},this._readyImages={},this.preloadImages()},componentDidUpdate:function(){this.preloadImages()},componentWillUnmount:function(){for(var e in this._cachedImages)this._cachedImages[e].src=t;this._cachedImages={}},hasPreloadedImage:function(e){return!!this._readyImages[e]},getPreloadedImage:function(e){return this.hasPreloadedImage(e)?this._cachedImages[e]:void 0},preloadImages:function(){var e=this.getImageUrlsToPreload();e.forEach(this.preloadImage)},preloadImage:function(e){if(e&&!this._cachedImages[e]){var t=new Image;t.onload=function(){this.isMounted()&&(this._readyImages[e]=!0)}.bind(this),t.onerror=function(){this.isMounted()&&delete this._cachedImages[e]}.bind(this),t.src=e,this._cachedImages[e]=t}}};e.exports=r},function(e,t,r){"use strict";var n=r(8),i=r(5),s=r(23),o=null,a=null,c=!1,h=s({isDragging:function(){return!!o},didDrop:function(){return c},getDraggedItem:function(){return o},getDraggedItemType:function(){return a}});n.register(function(e){var t=e,r=t.action;switch(r.type){case i.DRAG_START:c=!1,o=r.item,a=r.itemType,h.emitChange();break;case i.DROP:c=!0,h.emitChange();break;case i.DRAG_END:c=!1,o=null,a=null,h.emitChange()}}),e.exports=h},function(e,t,r){"use strict";function n(e){var t=s(i.prototype,s(e,{emitChange:function(){this.emit(a)},addChangeListener:function(e){this.on(a,e)},removeChangeListener:function(e){this.removeListener(a,e)}}));return t.setMaxListeners(0),o(t),t}var i=r(45).EventEmitter,s=r(17),o=(r(18),r(9)),a="change";e.exports=n},function(e,t,r){e.exports.Dispatcher=r(25)},function(e,t,r){"use strict";function n(){this.$Dispatcher_callbacks={},this.$Dispatcher_isPending={},this.$Dispatcher_isHandled={},this.$Dispatcher_isDispatching=!1,this.$Dispatcher_pendingPayload=null}var i=r(26),s=1,o="ID_";n.prototype.register=function(e){var t=o+s++;return this.$Dispatcher_callbacks[t]=e,t},n.prototype.unregister=function(e){i(this.$Dispatcher_callbacks[e],"Dispatcher.unregister(...): `%s` does not map to a registered callback.",e),delete this.$Dispatcher_callbacks[e]},n.prototype.waitFor=function(e){i(this.$Dispatcher_isDispatching,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var t=0;t<e.length;t++){var r=e[t];this.$Dispatcher_isPending[r]?i(this.$Dispatcher_isHandled[r],"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",r):(i(this.$Dispatcher_callbacks[r],"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",r),this.$Dispatcher_invokeCallback(r))}},n.prototype.dispatch=function(e){i(!this.$Dispatcher_isDispatching,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."),this.$Dispatcher_startDispatching(e);try{for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]||this.$Dispatcher_invokeCallback(t)}finally{this.$Dispatcher_stopDispatching()}},n.prototype.isDispatching=function(){return this.$Dispatcher_isDispatching},n.prototype.$Dispatcher_invokeCallback=function(e){this.$Dispatcher_isPending[e]=!0,this.$Dispatcher_callbacks[e](this.$Dispatcher_pendingPayload),this.$Dispatcher_isHandled[e]=!0},n.prototype.$Dispatcher_startDispatching=function(e){for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]=!1,this.$Dispatcher_isHandled[t]=!1;this.$Dispatcher_pendingPayload=e,this.$Dispatcher_isDispatching=!0},n.prototype.$Dispatcher_stopDispatching=function(){this.$Dispatcher_pendingPayload=null,this.$Dispatcher_isDispatching=!1},e.exports=n},function(e){"use strict";var t=function(e,t,r,n,i,s,o,a){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var h=[r,n,i,s,o,a],u=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return h[u++]}))}throw c.framesToPop=1,c}};e.exports=t},function(e,t,r){function n(){return s(i(arguments,!0,!0))}var i=r(30),s=r(31);e.exports=n},function(e,t,r){function n(e){return i(e,s(arguments,1))}var i=r(29),s=r(38);e.exports=n},function(e,t,r){function n(e,t){var r=-1,n=i,h=e?e.length:0,u=h>=a,g=[];if(u){var f=o(t);f?(n=s,t=f):u=!1}for(;++r<h;){var p=e[r];n(t,p)<0&&g.push(p)}return u&&c(t),g}var i=r(2),s=r(11),o=r(12),a=r(14),c=r(3);e.exports=n},function(e,t,r){function n(e,t,r,o){for(var a=(o||0)-1,c=e?e.length:0,h=[];++a<c;){var u=e[a];if(u&&"object"==typeof u&&"number"==typeof u.length&&(s(u)||i(u))){t||(u=n(u,t,r));var g=-1,f=u.length,p=h.length;for(h.length+=f;++g<f;)h[p++]=u[g]}else r||h.push(u)}return h}var i=r(39),s=r(40);e.exports=n},function(e,t,r){function n(e,t,r){var n=-1,g=i,f=e?e.length:0,p=[],l=!t&&f>=c,d=r||l?a():p;if(l){var v=o(d);g=s,d=v}for(;++n<f;){var D=e[n],m=r?r(D,n,e):D;(t?!n||d[d.length-1]!==m:g(d,m)<0)&&((r||l)&&d.push(m),p.push(D))}return l?(h(d.array),u(d)):r&&h(d),p}var i=r(2),s=r(11),o=r(12),a=r(33),c=r(14),h=r(37),u=r(3);e.exports=n},function(e,t,r){function n(e){var t=this.cache,r=typeof e;if("boolean"==r||null==e)t[e]=!0;else{"number"!=r&&"string"!=r&&(r="object");var n="number"==r?e:i+e,s=t[r]||(t[r]={});"object"==r?(s[n]||(s[n]=[])).push(e):s[n]=!0}}var i=r(13);e.exports=n},function(e,t,r){function n(){return i.pop()||[]}var i=r(10);e.exports=n},function(e,t,r){function n(){return i.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}var i=r(16);e.exports=n},function(e){function t(e){return"function"==typeof e&&i.test(e)}var r=Object.prototype,n=r.toString,i=RegExp("^"+String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$");e.exports=t},function(e){var t={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};e.exports=t},function(e,t,r){function n(e){e.length=0,i.length<s&&i.push(e)}var i=r(10),s=r(15);e.exports=n},function(e){function t(e,t,r){t||(t=0),"undefined"==typeof r&&(r=e?e.length:0);for(var n=-1,i=r-t||0,s=Array(0>i?0:i);++n<i;)s[n]=e[t+n];return s}e.exports=t},function(e){function t(e){return e&&"object"==typeof e&&"number"==typeof e.length&&i.call(e)==r||!1}var r="[object Arguments]",n=Object.prototype,i=n.toString;e.exports=t},function(e,t,r){var n=r(35),i="[object Array]",s=Object.prototype,o=s.toString,a=n(a=Array.isArray)&&a,c=a||function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&o.call(e)==i||!1};e.exports=c},function(e,t,r){function n(e){return!(!e||!i[typeof e])}var i=r(36);e.exports=n},function(e){function t(e,t,r,n,i,s,o){e=e||{};for(var a,c=[t,r,n,i,s],h=0;c[h];){a=c[h++];for(var u in a)e[u]=a[u];a.hasOwnProperty&&a.hasOwnProperty("toString")&&"undefined"!=typeof a.toString&&e.toString!==a.toString&&(e.toString=a.toString)}return e}e.exports=t},function(e,t,r){"use strict";var n=r(4),i=r(1),s=36,o=function(e){return"object"!=typeof e||null===e},a={MAX_MERGE_DEPTH:s,isTerminal:o,normalizeMergeArg:function(e){return void 0===e||null===e?{}:e},checkMergeArrayArgs:function(e,t){n(Array.isArray(e)&&Array.isArray(t))},checkMergeObjectArgs:function(e,t){a.checkMergeObjectArg(e),a.checkMergeObjectArg(t)},checkMergeObjectArg:function(e){n(!o(e)&&!Array.isArray(e))},checkMergeIntoObjectArg:function(e){n(!(o(e)&&"function"!=typeof e||Array.isArray(e)))},checkMergeLevel:function(e){n(s>e)},checkArrayStrategy:function(e){n(void 0===e||e in a.ArrayStrategies)},ArrayStrategies:i({Clobber:!0,IndexByIndex:!0})};e.exports=a},function(e,t,r){"use strict";function n(e,t){if(o(e),null!=t){s(t);for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}}var i=r(43),s=i.checkMergeObjectArg,o=i.checkMergeIntoObjectArg;e.exports=n},function(e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}e.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if(!n(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,n,o,a,c,h;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(o=arguments.length,a=new Array(o-1),c=1;o>c;c++)a[c-1]=arguments[c];n.apply(this,a)}else if(i(n)){for(o=arguments.length,a=new Array(o-1),c=1;o>c;c++)a[c-1]=arguments[c];for(h=n.slice(),o=h.length,c=0;o>c;c++)h[c].apply(this,a)}return!0},t.prototype.addListener=function(e,n){var o;if(!r(n))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(n.listener)?n.listener:n),this._events[e]?i(this._events[e])?this._events[e].push(n):this._events[e]=[this._events[e],n]:this._events[e]=n,i(this._events[e])&&!this._events[e].warned){var o;o=s(this._maxListeners)?t.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},t.prototype.removeListener=function(e,t){var n,s,o,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,s=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(a=o;a-->0;)if(n[a]===t||n[a].listener&&n[a].listener===t){s=a;break}if(0>s)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?r(e._events[t])?1:e._events[t].length:0}}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.ReactDND=t():e.ReactDND=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";e.exports={DragDropMixin:r(20),ImagePreloaderMixin:r(21),HorizontalDragAnchors:r(6),VerticalDragAnchors:r(7)}},function(e,t,r){"use strict";var n=r(4),i=function(e){var t,r={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};e.exports=i},function(e){function t(e,t,r){for(var n=(r||0)-1,i=e?e.length:0;++n<i;)if(e[n]===t)return n;return-1}e.exports=t},function(e,t,r){function n(e){var t=e.cache;t&&n(t),e.array=e.cache=e.criteria=e.object=e.number=e.string=e.value=null,s.length<i&&s.push(e)}var i=r(15),s=r(16);e.exports=n},function(e){"use strict";var t=function(e,t,r,n,i,s,o,a){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var h=[r,n,i,s,o,a],u=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return h[u++]}))}throw c.framesToPop=1,c}};e.exports=t},function(e,t,r){"use strict";var n=r(1),i=n({DRAG_START:null,DRAG_END:null,DROP:null});e.exports=i},function(e,t,r){"use strict";var n=r(1),i=n({LEFT:null,CENTER:null,RIGHT:null});e.exports=i},function(e,t,r){"use strict";var n=r(1),i=n({TOP:null,CENTER:null,BOTTOM:null});e.exports=i},function(e,t,r){"use strict";var n=r(24).Dispatcher,i=r(42),s=i(new n,{handleAction:function(e){this.dispatch({action:e})}});e.exports=s},function(e){"use strict";function t(e,t){t||(t=e);for(var r in e)e.hasOwnProperty(r)&&"function"==typeof e[r]&&(e[r]=e[r].bind(t));return e}e.exports=t},function(e){var t=[];e.exports=t},function(e,t,r){function n(e,t){var r=typeof t;if(e=e.cache,"boolean"==r||null==t)return e[t]?0:-1;"number"!=r&&"string"!=r&&(r="object");var n="number"==r?t:s+t;return e=(e=e[r])&&e[n],"object"==r?e&&i(e,t)>-1?0:-1:e?0:-1}var i=r(2),s=r(13);e.exports=n},function(e,t,r){function n(e){var t=-1,r=e.length,n=e[0],o=e[r/2|0],a=e[r-1];if(n&&"object"==typeof n&&o&&"object"==typeof o&&a&&"object"==typeof a)return!1;var c=s();c["false"]=c["null"]=c["true"]=c.undefined=!1;var h=s();for(h.array=e,h.cache=c,h.push=i;++t<r;)h.push(e[t]);return h}{var i=r(32),s=r(34);r(3)}e.exports=n},function(e){var t=+new Date+"";e.exports=t},function(e){var t=75;e.exports=t},function(e){var t=40;e.exports=t},function(e){var t=[];e.exports=t},function(e,t,r){"use strict";var n=r(44),i=function(e,t){var r={};return n(r,e),n(r,t),r};e.exports=i},function(e){"use strict";function t(e,t){if(e===t)return!0;var r;for(r in e)if(e.hasOwnProperty(r)&&(!t.hasOwnProperty(r)||e[r]!==t[r]))return!1;for(r in t)if(t.hasOwnProperty(r)&&!e.hasOwnProperty(r))return!1;return!0}e.exports=t},function(e,t,r){"use strict";var n=r(8),i=r(5),s={startDragging:function(e,t){n.handleAction({type:i.DRAG_START,itemType:e,item:t})},recordDrop:function(){n.handleAction({type:i.DROP})},endDragging:function(){n.handleAction({type:i.DRAG_END})}};e.exports=s},function(e,t,r){"use strict";function n(e,t){return-1!==e.indexOf(t,e.length-t.length)}function i(){return/firefox/i.test(navigator.userAgent)}function s(){return!!window.safari}function o(){return"WebkitAppearance"in document.documentElement.style}function a(e){return e?s()&&e instanceof Image&&n(e.src,".gif")?!1:!0:!1}function c(e,t,r,n){r=r||{};var o=e.offsetWidth,a=e.offsetHeight,c=t instanceof Image,h=c?t.width:o,u=c?t.height:a,g=r.horizontal||A.CENTER,f=r.vertical||x.CENTER,p=n,l=p.offsetX,d=p.offsetY;switch(i()?(l=n.layerX,d=n.layerY):s()&&(u/=window.devicePixelRatio,h/=window.devicePixelRatio),g){case A.LEFT:break;case A.CENTER:l*=h/o;break;case A.RIGHT:l=h-h*(1-l/o)}switch(f){case x.TOP:break;case x.CENTER:d*=u/a;break;case x.BOTTOM:d=u-u*(1-d/a)}return s()&&(d+=(window.devicePixelRatio-1)*u),{x:l,y:d}}function h(e){var t={width:e.width,height:e.height};return(i()||s())&&(t.width*=window.devicePixelRatio,t.height*=window.devicePixelRatio),t}function u(e,t,r){var n=t,i=n.dataTransfer,s=r,o=s.dragPreview,h=s.effectAllowed,u=s.dragAnchors;try{i.setData("application/json",{})}catch(g){}if(a(o)&&i.setDragImage){var f=c(e,o,u,t);i.setDragImage(o,f.x,f.y)}i.effectAllowed=h}function g(e){var t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}function f(e,t){v=e,D=g(e),y=!1,m=t}function p(){if(!y){var e=g(v);y=!I(D,e)}return y}function l(){v=null,D=null,y=!1,m=null}function d(){v&&m&&!document.contains(v)&&m()}var v,D,m,y,_=r(19),b=r(22),A=r(6),x=r(7),w=r(9),T=r(4),E=r(17),I=r(18),S=r(27),L=r(28),k=r(41);if(o()&&window.addEventListener("dragover",function(e){v&&p()&&e.preventDefault()}),i()){var P=null;window.addEventListener("dragover",function(){v&&(clearTimeout(P),P=setTimeout(d,140))})}else window.addEventListener("drop",d);var O={getInitialState:function(){var e={ownDraggedItemType:null,hasDragEntered:!1};return E(e,this.getStateFromDragDropStore())},getActiveDropTargetType:function(){var e=this.state,t=e.draggedItemType,r=e.draggedItem,n=e.ownDraggedItemType,i=this._dropTargets[t];if(!i)return null;if(t===n)return null;var s=i,o=s.canDrop;return!o||o(r)?t:null},isAnyDropTargetActive:function(e){return e.indexOf(this.getActiveDropTargetType())>-1},getStateFromDragDropStore:function(){return{draggedItem:b.getDraggedItem(),draggedItemType:b.getDraggedItemType()}},getDragState:function(e){return T(this._dragSources[e],"No drag source for %s",e),{isDragging:this.state.ownDraggedItemType===e}},getDropState:function(e){T(this._dropTargets[e],"No drop target for %s",e);var t=this.getActiveDropTargetType()===e,r=this.state.hasDragEntered;return{isDragging:t,isHovering:t&&r}},componentWillMount:function(){this._dragEntered=[],this._dragSources={},this._dropTargets={},this.configureDragDrop(this.registerDragDropItemTypeHandlers)},componentDidMount:function(){b.addChangeListener(this.handleDragDropStoreChange)},componentWillUnmount:function(){b.removeChangeListener(this.handleDragDropStoreChange)},calculateDragPreviewSize:h,registerDragDropItemTypeHandlers:function(e,t){var r=t,n=r.dragSource,i=r.dropTarget;n&&(T(!this._dragSources[e],"Drag source for %s specified twice",e),this._dragSources[e]=w(n,this)),i&&(T(!this._dropTargets[e],"Drop target for %s specified twice",e),this._dropTargets[e]=w(i,this))},handleDragDropStoreChange:function(){this.setState(this.getStateFromDragDropStore())},dragSourceFor:function(e){return T(this._dragSources[e],"No drag source for %s",e),{draggable:!0,onDragStart:this.handleDragStart.bind(this,e),onDragEnd:this.handleDragEnd.bind(this,e)}},handleDragStart:function(e,t){var r=this._dragSources[e],n=r.canDrag,i=r.beginDrag;if(n&&!n(t))return void t.preventDefault();f(t.target,this.handleDragEnd.bind(this,e,null));var s=i(t),o=s,a=o.item;u(this.getDOMNode(),t.nativeEvent,s),T(k(a),'Expected return value of beginDrag to contain "item" object'),this.setState({ownDraggedItemType:e}),_.startDragging(e,a)},handleDragEnd:function(e,t){l(),this.isMounted()&&this.setState({ownDraggedItemType:null});var r=this._dragSources[e],n=r.endDrag,i=b.didDrop();_.endDragging(),n&&n(i,t)},dropTargetFor:function(){var e=Array.prototype.slice.call(arguments,0);return e.forEach(function(e){T(this._dropTargets[e],"No drop target for %s",e)}.bind(this)),{onDragEnter:this.handleDragEnter.bind(this,e),onDragOver:this.handleDragOver.bind(this,e),onDragLeave:this.handleDragLeave.bind(this,e),onDrop:this.handleDrop.bind(this,e)}},handleDragOver:function(e,t){if(this.isAnyDropTargetActive(e)){t.preventDefault();var r=this._dropTargets[this.state.draggedItemType],n=r.over;n&&n(this.state.draggedItem,t)}},handleDragEnter:function(e,t){if(this.isAnyDropTargetActive(e)){if(!this._dragEntered.length){this.setState({hasDragEntered:!0});var r=this._dropTargets[this.state.draggedItemType],n=r.enter;n&&n(this.state.draggedItem,t)}this._dragEntered=S(this._dragEntered,[t.target])}},handleDragLeave:function(e,t){if(this.isAnyDropTargetActive(e)&&(this._dragEntered=L(this._dragEntered,t.target),this._dragEntered=this._dragEntered.filter(function(e){return document.contains(e)}),!this._dragEntered.length)){this.setState({hasDragEntered:!1});var r=this._dropTargets[this.state.draggedItemType],n=r.leave;n&&n(this.state.draggedItem,t)}},handleDrop:function(e,t){if(this.isAnyDropTargetActive(e)){t.preventDefault();var r=b.getDraggedItem(),n=this._dropTargets[this.state.draggedItemType],i=n.acceptDrop;this._dragEntered=[],this.setState({hasDragEntered:!1}),i&&i(r,t)===!1||_.recordDrop()}}};e.exports=O},function(e){"use strict";var t="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",r={componentDidMount:function(){this._cachedImages={},this._readyImages={},this.preloadImages()},componentDidUpdate:function(){this.preloadImages()},componentWillUnmount:function(){for(var e in this._cachedImages)this._cachedImages[e].src=t;this._cachedImages={}},hasPreloadedImage:function(e){return!!this._readyImages[e]},getPreloadedImage:function(e){return this.hasPreloadedImage(e)?this._cachedImages[e]:void 0},preloadImages:function(){var e=this.getImageUrlsToPreload();e.forEach(this.preloadImage)},preloadImage:function(e){if(e&&!this._cachedImages[e]){var t=new Image;t.onload=function(){this.isMounted()&&(this._readyImages[e]=!0)}.bind(this),t.onerror=function(){this.isMounted()&&delete this._cachedImages[e]}.bind(this),t.src=e,this._cachedImages[e]=t}}};e.exports=r},function(e,t,r){"use strict";var n=r(8),i=r(5),s=r(23),o=null,a=null,c=!1,h=s({isDragging:function(){return!!o},didDrop:function(){return c},getDraggedItem:function(){return o},getDraggedItemType:function(){return a}});n.register(function(e){var t=e,r=t.action;switch(r.type){case i.DRAG_START:c=!1,o=r.item,a=r.itemType,h.emitChange();break;case i.DROP:c=!0,h.emitChange();break;case i.DRAG_END:c=!1,o=null,a=null,h.emitChange()}}),e.exports=h},function(e,t,r){"use strict";function n(e){var t=s(i.prototype,s(e,{emitChange:function(){this.emit(a)},addChangeListener:function(e){this.on(a,e)},removeChangeListener:function(e){this.removeListener(a,e)}}));return t.setMaxListeners(0),o(t),t}var i=r(45).EventEmitter,s=r(17),o=(r(18),r(9)),a="change";e.exports=n},function(e,t,r){e.exports.Dispatcher=r(25)},function(e,t,r){"use strict";function n(){this.$Dispatcher_callbacks={},this.$Dispatcher_isPending={},this.$Dispatcher_isHandled={},this.$Dispatcher_isDispatching=!1,this.$Dispatcher_pendingPayload=null}var i=r(26),s=1,o="ID_";n.prototype.register=function(e){var t=o+s++;return this.$Dispatcher_callbacks[t]=e,t},n.prototype.unregister=function(e){i(this.$Dispatcher_callbacks[e],"Dispatcher.unregister(...): `%s` does not map to a registered callback.",e),delete this.$Dispatcher_callbacks[e]},n.prototype.waitFor=function(e){i(this.$Dispatcher_isDispatching,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var t=0;t<e.length;t++){var r=e[t];this.$Dispatcher_isPending[r]?i(this.$Dispatcher_isHandled[r],"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",r):(i(this.$Dispatcher_callbacks[r],"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",r),this.$Dispatcher_invokeCallback(r))}},n.prototype.dispatch=function(e){i(!this.$Dispatcher_isDispatching,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."),this.$Dispatcher_startDispatching(e);try{for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]||this.$Dispatcher_invokeCallback(t)}finally{this.$Dispatcher_stopDispatching()}},n.prototype.isDispatching=function(){return this.$Dispatcher_isDispatching},n.prototype.$Dispatcher_invokeCallback=function(e){this.$Dispatcher_isPending[e]=!0,this.$Dispatcher_callbacks[e](this.$Dispatcher_pendingPayload),this.$Dispatcher_isHandled[e]=!0},n.prototype.$Dispatcher_startDispatching=function(e){for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]=!1,this.$Dispatcher_isHandled[t]=!1;this.$Dispatcher_pendingPayload=e,this.$Dispatcher_isDispatching=!0},n.prototype.$Dispatcher_stopDispatching=function(){this.$Dispatcher_pendingPayload=null,this.$Dispatcher_isDispatching=!1},e.exports=n},function(e){"use strict";var t=function(e,t,r,n,i,s,o,a){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var h=[r,n,i,s,o,a],u=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return h[u++]}))}throw c.framesToPop=1,c}};e.exports=t},function(e,t,r){function n(){return s(i(arguments,!0,!0))}var i=r(30),s=r(31);e.exports=n},function(e,t,r){function n(e){return i(e,s(arguments,1))}var i=r(29),s=r(38);e.exports=n},function(e,t,r){function n(e,t){var r=-1,n=i,h=e?e.length:0,u=h>=a,g=[];if(u){var f=o(t);f?(n=s,t=f):u=!1}for(;++r<h;){var p=e[r];n(t,p)<0&&g.push(p)}return u&&c(t),g}var i=r(2),s=r(11),o=r(12),a=r(14),c=r(3);e.exports=n},function(e,t,r){function n(e,t,r,o){for(var a=(o||0)-1,c=e?e.length:0,h=[];++a<c;){var u=e[a];if(u&&"object"==typeof u&&"number"==typeof u.length&&(s(u)||i(u))){t||(u=n(u,t,r));var g=-1,f=u.length,p=h.length;for(h.length+=f;++g<f;)h[p++]=u[g]}else r||h.push(u)}return h}var i=r(39),s=r(40);e.exports=n},function(e,t,r){function n(e,t,r){var n=-1,g=i,f=e?e.length:0,p=[],l=!t&&f>=c,d=r||l?a():p;if(l){var v=o(d);g=s,d=v}for(;++n<f;){var D=e[n],m=r?r(D,n,e):D;(t?!n||d[d.length-1]!==m:g(d,m)<0)&&((r||l)&&d.push(m),p.push(D))}return l?(h(d.array),u(d)):r&&h(d),p}var i=r(2),s=r(11),o=r(12),a=r(33),c=r(14),h=r(37),u=r(3);e.exports=n},function(e,t,r){function n(e){var t=this.cache,r=typeof e;if("boolean"==r||null==e)t[e]=!0;else{"number"!=r&&"string"!=r&&(r="object");var n="number"==r?e:i+e,s=t[r]||(t[r]={});"object"==r?(s[n]||(s[n]=[])).push(e):s[n]=!0}}var i=r(13);e.exports=n},function(e,t,r){function n(){return i.pop()||[]}var i=r(10);e.exports=n},function(e,t,r){function n(){return i.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}var i=r(16);e.exports=n},function(e){function t(e){return"function"==typeof e&&i.test(e)}var r=Object.prototype,n=r.toString,i=RegExp("^"+String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$");e.exports=t},function(e){var t={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};e.exports=t},function(e,t,r){function n(e){e.length=0,i.length<s&&i.push(e)}var i=r(10),s=r(15);e.exports=n},function(e){function t(e,t,r){t||(t=0),"undefined"==typeof r&&(r=e?e.length:0);for(var n=-1,i=r-t||0,s=Array(0>i?0:i);++n<i;)s[n]=e[t+n];return s}e.exports=t},function(e){function t(e){return e&&"object"==typeof e&&"number"==typeof e.length&&i.call(e)==r||!1}var r="[object Arguments]",n=Object.prototype,i=n.toString;e.exports=t},function(e,t,r){var n=r(35),i="[object Array]",s=Object.prototype,o=s.toString,a=n(a=Array.isArray)&&a,c=a||function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&o.call(e)==i||!1};e.exports=c},function(e,t,r){function n(e){return!(!e||!i[typeof e])}var i=r(36);e.exports=n},function(e){function t(e,t,r,n,i,s,o){e=e||{};for(var a,c=[t,r,n,i,s],h=0;c[h];){a=c[h++];for(var u in a)e[u]=a[u];a.hasOwnProperty&&a.hasOwnProperty("toString")&&"undefined"!=typeof a.toString&&e.toString!==a.toString&&(e.toString=a.toString)}return e}e.exports=t},function(e,t,r){"use strict";var n=r(4),i=r(1),s=36,o=function(e){return"object"!=typeof e||null===e},a={MAX_MERGE_DEPTH:s,isTerminal:o,normalizeMergeArg:function(e){return void 0===e||null===e?{}:e},checkMergeArrayArgs:function(e,t){n(Array.isArray(e)&&Array.isArray(t))},checkMergeObjectArgs:function(e,t){a.checkMergeObjectArg(e),a.checkMergeObjectArg(t)},checkMergeObjectArg:function(e){n(!o(e)&&!Array.isArray(e))},checkMergeIntoObjectArg:function(e){n(!(o(e)&&"function"!=typeof e||Array.isArray(e)))},checkMergeLevel:function(e){n(s>e)},checkArrayStrategy:function(e){n(void 0===e||e in a.ArrayStrategies)},ArrayStrategies:i({Clobber:!0,IndexByIndex:!0})};e.exports=a},function(e,t,r){"use strict";function n(e,t){if(o(e),null!=t){s(t);for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}}var i=r(43),s=i.checkMergeObjectArg,o=i.checkMergeIntoObjectArg;e.exports=n},function(e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}e.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if(!n(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,n,o,a,c,h;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(o=arguments.length,a=new Array(o-1),c=1;o>c;c++)a[c-1]=arguments[c];n.apply(this,a)}else if(i(n)){for(o=arguments.length,a=new Array(o-1),c=1;o>c;c++)a[c-1]=arguments[c];for(h=n.slice(),o=h.length,c=0;o>c;c++)h[c].apply(this,a)}return!0},t.prototype.addListener=function(e,n){var o;if(!r(n))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(n.listener)?n.listener:n),this._events[e]?i(this._events[e])?this._events[e].push(n):this._events[e]=[this._events[e],n]:this._events[e]=n,i(this._events[e])&&!this._events[e].warned){var o;o=s(this._maxListeners)?t.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},t.prototype.removeListener=function(e,t){var n,s,o,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,s=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(a=o;a-->0;)if(n[a]===t||n[a].listener&&n[a].listener===t){s=a;break}if(0>s)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?r(e._events[t])?1:e._events[t].length:0}}])}); |
@@ -189,3 +189,3 @@ 'use strict'; | ||
window.addEventListener('dragover', function (e) { | ||
if (checkIfCurrentDragTargetRectChanged()) { | ||
if (_currentDragTarget && checkIfCurrentDragTargetRectChanged()) { | ||
// Prevent animating to incorrect position | ||
@@ -202,4 +202,4 @@ e.preventDefault(); | ||
function triggerDragEndIfDragSourceWasRemovedFromDOM() { | ||
if (_handleCurrentDragEnd && | ||
_currentDragTarget && | ||
if (_currentDragTarget && | ||
_handleCurrentDragEnd && | ||
!document.contains(_currentDragTarget)) { | ||
@@ -223,2 +223,6 @@ | ||
window.addEventListener('dragover', function () { | ||
if (!_currentDragTarget) { | ||
return; | ||
} | ||
clearTimeout(_lastDragSourceCheckTimeout); | ||
@@ -451,2 +455,3 @@ | ||
this._dragEntered = without(this._dragEntered, e.target); | ||
this._dragEntered = this._dragEntered.filter(node => document.contains(node)); | ||
@@ -486,2 +491,2 @@ if (!this._dragEntered.length) { | ||
module.exports = DragDropMixin; | ||
module.exports = DragDropMixin; |
{ | ||
"name": "react-dnd", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "HTML5 drag and drop mixin for React with full DOM control", | ||
@@ -5,0 +5,0 @@ "main": "modules/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52939
597