1 line
85 KiB
Plaintext
1 line
85 KiB
Plaintext
{"version":3,"file":"vue-easy-dnd.esm.min.js","sources":["../../src/vue-easy-dnd/vue-easy-dnd.esm.js"],"sourcesContent":["/* eslint-disable */\r\nimport { reactive, openBlock, createBlock, resolveDynamicComponent, normalizeClass, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps, createElementBlock, createCommentVNode, renderList, TransitionGroup, h, nextTick } from '../vue/vue';\r\n\r\nfunction mitt(n){return {all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e]);},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]));},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e);}),(i=n.get(\"*\"))&&i.slice().map(function(n){n(t,e);});}}}\r\n\r\n/**\r\n * This is the class of the global object that holds the state of the drag and drop during its progress. It emits events\r\n * reporting its state evolution during the progress of the drag and drop. Its data is reactive and listeners can be\r\n * attached to it using the method on.\r\n */\r\nclass DnD {\r\n\r\n inProgress = false;\r\n type = null;\r\n data = null;\r\n source = null;\r\n top = null;\r\n position = null;\r\n eventBus = mitt();\r\n success = null;\r\n\r\n startDrag (source, event, x, y, type, data) {\r\n this.type = type;\r\n this.data = data;\r\n this.source = source;\r\n this.position = { x, y };\r\n this.top = null;\r\n this.inProgress = true;\r\n this.emit(event, 'dragstart');\r\n this.emit(event, 'dragtopchanged', { previousTop: null });\r\n }\r\n\r\n resetVariables () {\r\n this.inProgress = false;\r\n this.data = null;\r\n this.source = null;\r\n this.position = null;\r\n this.success = null;\r\n }\r\n\r\n stopDrag (event) {\r\n this.success = this.top !== null && this.top['compatibleMode'] && this.top['dropAllowed'];\r\n if (this.top !== null) {\r\n this.emit(event, 'drop');\r\n }\r\n this.emit(event, 'dragend');\r\n this.resetVariables();\r\n }\r\n\r\n cancelDrag (event) {\r\n this.success = false;\r\n this.emit(event, 'dragend');\r\n this.resetVariables();\r\n }\r\n\r\n mouseMove (event, comp) {\r\n if (this.inProgress) {\r\n let prevent = false;\r\n const previousTop = this.top;\r\n if (comp === null) {\r\n // The mouse move event reached the top of the document without hitting a drop component.\r\n this.top = null;\r\n prevent = true;\r\n }\r\n else if (comp['isDropMask']) {\r\n // The mouse move event bubbled until it reached a drop mask.\r\n this.top = null;\r\n prevent = true;\r\n }\r\n else if (comp['candidate'](this.type, this.data, this.source)) {\r\n // The mouse move event bubbled until it reached a drop component that participates in the current drag operation.\r\n this.top = comp;\r\n prevent = true;\r\n }\r\n\r\n if (prevent) {\r\n // We prevent the mouse move event from bubbling further up the tree because it reached the foremost drop component and that component is all that matters.\r\n event.stopPropagation();\r\n }\r\n if (this.top !== previousTop) {\r\n this.emit(event.detail.native, 'dragtopchanged', { previousTop: previousTop });\r\n }\r\n this.position = {\r\n x: event.detail.x,\r\n y: event.detail.y\r\n };\r\n this.emit(event.detail.native, 'dragpositionchanged');\r\n }\r\n }\r\n\r\n emit (native, event, data = {}) {\r\n this.eventBus.emit(event, {\r\n type: this.type,\r\n data: this.data,\r\n top: this.top,\r\n source: this.source,\r\n position: this.position,\r\n success: this.success,\r\n native,\r\n ...data\r\n });\r\n }\r\n\r\n on (event, callback) {\r\n this.eventBus.on(event, callback);\r\n }\r\n\r\n off (event, callback) {\r\n this.eventBus.off(event, callback);\r\n }\r\n}\r\n\r\nconst dnd = reactive(new DnD());\r\n\r\nvar DragAwareMixin = {\r\n data () {\r\n return {\r\n isDropMask: false\r\n };\r\n },\r\n computed: {\r\n dragInProgress () {\r\n return dnd.inProgress;\r\n },\r\n dragData () {\r\n return dnd.data;\r\n },\r\n dragType () {\r\n return dnd.type;\r\n },\r\n dragPosition () {\r\n return dnd.position;\r\n },\r\n dragSource () {\r\n return dnd.source;\r\n },\r\n dragTop () {\r\n return dnd.top;\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * This files contains the primitives required to create drag images from HTML elements that serve as models. A snapshot\r\n * of the computed styles of the model elements is taken when creating the drag image, so that it will look the same as\r\n * the model, no matter where the drag images is grafted into the DOM.\r\n */\r\n\r\n/**\r\n * Creates a drag image using the given element as model.\r\n */\r\nfunction createDragImage (el) {\r\n const clone = deepClone(el);\r\n clone.style.position = 'fixed';\r\n clone.style.margin = '0';\r\n clone.style['z-index'] = '1000';\r\n clone.style.transition = 'opacity 0.2s';\r\n return clone;\r\n}\r\n\r\n/**\r\n * Clones the given element and all its descendants.\r\n */\r\nfunction deepClone (el) {\r\n const clone = el.cloneNode(true);\r\n copyStyle(el, clone);\r\n const vSrcElements = el.getElementsByTagName('*');\r\n const vDstElements = clone.getElementsByTagName('*');\r\n for (let i = vSrcElements.length; i--;) {\r\n const vSrcElement = vSrcElements[i];\r\n const vDstElement = vDstElements[i];\r\n copyStyle(vSrcElement, vDstElement);\r\n }\r\n return clone;\r\n}\r\n\r\n/**\r\n * Copy the computed styles from src to destination.\r\n */\r\nfunction copyStyle (src, destination) {\r\n const computedStyle = window.getComputedStyle(src);\r\n for (const key of computedStyle) {\r\n if (key === 'width') {\r\n // IE11\r\n const width = computedStyle.getPropertyValue('box-sizing') === 'border-box' ?\r\n src.clientWidth :\r\n src.clientWidth - parseFloat(computedStyle.paddingLeft) - parseFloat(computedStyle.paddingRight);\r\n destination.style.setProperty('width', width + 'px');\r\n }\r\n else if (key === 'height') {\r\n // IE11\r\n const height = computedStyle.getPropertyValue('box-sizing') === 'border-box' ?\r\n src.clientHeight :\r\n src.clientHeight - parseFloat(computedStyle.paddingTop) - parseFloat(computedStyle.paddingBottom);\r\n destination.style.setProperty('height', height + 'px');\r\n }\r\n else {\r\n destination.style.setProperty(key, computedStyle.getPropertyValue(key), computedStyle.getPropertyPriority(key));\r\n }\r\n }\r\n destination.style.pointerEvents = 'none';\r\n}\r\n\r\n// Forked from https://gist.github.com/gre/296291b8ce0d8fe6e1c3ea4f1d1c5c3b\r\nconst regex = /(auto|scroll)/;\r\n\r\nconst style = (node, prop) =>\r\n getComputedStyle(node, null).getPropertyValue(prop);\r\n\r\nconst scroll = (node) =>\r\n regex.test(\r\n style(node, 'overflow') +\r\n style(node, 'overflow-y') +\r\n style(node, 'overflow-x'));\r\n\r\nconst scrollparent = (node) =>\r\n !node || node===document.body\r\n ? document.body\r\n : scroll(node)\r\n ? node\r\n : scrollparent(node.parentNode);\r\n\r\n// Forked from https://github.com/bennadel/JavaScript-Demos/blob/master/demos/window-edge-scrolling/index.htm\r\n// Code was altered to work with scrollable containers\r\n\r\nvar timer = null;\r\n\r\nfunction cancelScrollAction () {\r\n clearTimeout(timer);\r\n}\r\n\r\nfunction performEdgeScroll (event, container, clientX, clientY, edgeSize) {\r\n if (!container || !edgeSize) {\r\n cancelScrollAction();\r\n return false;\r\n }\r\n \r\n // NOTE: Much of the information here, with regard to document dimensions,\r\n // viewport dimensions, and window scrolling is derived from JavaScript.info.\r\n // I am consuming it here primarily as NOTE TO SELF.\r\n // --\r\n // Read More: https://javascript.info/size-and-scroll-window\r\n // --\r\n // CAUTION: The viewport and document dimensions can all be CACHED and then\r\n // recalculated on window-resize events (for the most part). I am keeping it\r\n // all here in the mousemove event handler to remove as many of the moving\r\n // parts as possible and keep the demo as simple as possible.\r\n \r\n // Get the viewport-relative coordinates of the mousemove event.\r\n var rect = container.getBoundingClientRect();\r\n var isBody = container === document.body;\r\n \r\n var viewportX = clientX - rect.left;\r\n var viewportY = clientY - rect.top;\r\n if (isBody) {\r\n viewportX = clientX;\r\n viewportY = clientY;\r\n }\r\n \r\n // Get the viewport dimensions.\r\n var viewportWidth = rect.width;\r\n var viewportHeight = rect.height;\r\n if (isBody) {\r\n viewportWidth = document.documentElement.clientWidth;\r\n viewportHeight = document.documentElement.clientHeight;\r\n }\r\n \r\n // Next, we need to determine if the mouse is within the \"edge\" of the\r\n // viewport, which may require scrolling the window. To do this, we need to\r\n // calculate the boundaries of the edge in the viewport (these coordinates\r\n // are relative to the viewport grid system).\r\n var edgeTop = edgeSize;\r\n var edgeLeft = edgeSize;\r\n var edgeBottom = ( viewportHeight - edgeSize );\r\n var edgeRight = ( viewportWidth - edgeSize );\r\n \r\n var isInLeftEdge = ( viewportX < edgeLeft );\r\n var isInRightEdge = ( viewportX > edgeRight );\r\n var isInTopEdge = ( viewportY < edgeTop );\r\n var isInBottomEdge = ( viewportY > edgeBottom );\r\n \r\n // If the mouse is not in the viewport edge, there's no need to calculate\r\n // anything else.\r\n if (!(isInLeftEdge || isInRightEdge || isInTopEdge || isInBottomEdge)) {\r\n cancelScrollAction();\r\n return false;\r\n }\r\n \r\n // If we made it this far, the user's mouse is located within the edge of the\r\n // viewport. As such, we need to check to see if scrolling needs to be done.\r\n \r\n // Get the document dimensions.\r\n var documentWidth = Math.max(\r\n container.scrollWidth,\r\n container.offsetWidth,\r\n container.clientWidth\r\n );\r\n var documentHeight = Math.max(\r\n container.scrollHeight,\r\n container.offsetHeight,\r\n container.clientHeight\r\n );\r\n \r\n // Calculate the maximum scroll offset in each direction. Since you can only\r\n // scroll the overflow portion of the document, the maximum represents the\r\n // length of the document that is NOT in the viewport.\r\n var maxScrollX = (documentWidth - viewportWidth);\r\n var maxScrollY = (documentHeight - viewportHeight);\r\n \r\n // As we examine the mousemove event, we want to adjust the window scroll in\r\n // immediate response to the event; but, we also want to continue adjusting\r\n // the window scroll if the user rests their mouse in the edge boundary. To\r\n // do this, we'll invoke the adjustment logic immediately. Then, we'll setup\r\n // a timer that continues to invoke the adjustment logic while the window can\r\n // still be scrolled in a particular direction.\r\n (function checkForWindowScroll () {\r\n cancelScrollAction();\r\n \r\n if (adjustWindowScroll()) {\r\n timer = setTimeout( checkForWindowScroll, 30 );\r\n }\r\n })();\r\n \r\n // Adjust the window scroll based on the user's mouse position. Returns True\r\n // or False depending on whether or not the window scroll was changed.\r\n function adjustWindowScroll () {\r\n // Get the current scroll position of the document.\r\n var currentScrollX = container.scrollLeft;\r\n var currentScrollY = container.scrollTop;\r\n if (isBody) {\r\n currentScrollX = window.pageXOffset;\r\n currentScrollY = window.pageYOffset;\r\n }\r\n \r\n // Determine if the window can be scrolled in any particular direction.\r\n var canScrollUp = (currentScrollY > 0);\r\n var canScrollDown = (currentScrollY < maxScrollY);\r\n var canScrollLeft = (currentScrollX > 0);\r\n var canScrollRight = (currentScrollX < maxScrollX);\r\n \r\n // Since we can potentially scroll in two directions at the same time,\r\n // let's keep track of the next scroll, starting with the current scroll.\r\n // Each of these values can then be adjusted independently in the logic\r\n // below.\r\n var nextScrollX = currentScrollX;\r\n var nextScrollY = currentScrollY;\r\n \r\n // As we examine the mouse position within the edge, we want to make the\r\n // incremental scroll changes more \"intense\" the closer that the user\r\n // gets the viewport edge. As such, we'll calculate the percentage that\r\n // the user has made it \"through the edge\" when calculating the delta.\r\n // Then, that use that percentage to back-off from the \"max\" step value.\r\n var maxStep = 50;\r\n \r\n // Should we scroll left?\r\n if (isInLeftEdge && canScrollLeft) {\r\n const intensity = ((edgeLeft - viewportX) / edgeSize);\r\n nextScrollX = (nextScrollX - (maxStep * intensity));\r\n }\r\n // Should we scroll right?\r\n else if (isInRightEdge && canScrollRight) {\r\n const intensity = ((viewportX - edgeRight) / edgeSize);\r\n nextScrollX = (nextScrollX + (maxStep * intensity));\r\n }\r\n \r\n // Should we scroll up?\r\n if (isInTopEdge && canScrollUp) {\r\n const intensity = ((edgeTop - viewportY) / edgeSize);\r\n nextScrollY = (nextScrollY - (maxStep * intensity));\r\n }\r\n // Should we scroll down?\r\n else if (isInBottomEdge && canScrollDown) {\r\n const intensity = ((viewportY - edgeBottom) / edgeSize);\r\n nextScrollY = (nextScrollY + (maxStep * intensity));\r\n }\r\n \r\n // Sanitize invalid maximums. An invalid scroll offset won't break the\r\n // subsequent .scrollTo() call; however, it will make it harder to\r\n // determine if the .scrollTo() method should have been called in the\r\n // first place.\r\n nextScrollX = Math.max(0, Math.min(maxScrollX, nextScrollX));\r\n nextScrollY = Math.max(0, Math.min(maxScrollY, nextScrollY));\r\n \r\n if (\r\n (nextScrollX !== currentScrollX) ||\r\n (nextScrollY !== currentScrollY)\r\n ) {\r\n (isBody ? window : container).scrollTo(nextScrollX, nextScrollY);\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n \r\n return true;\r\n}\r\n\r\nvar DragMixin = {\r\n mixins: [DragAwareMixin],\r\n props: {\r\n type: {\r\n type: String,\r\n default: null\r\n },\r\n data: {\r\n default: null\r\n },\r\n dragImageOpacity: {\r\n type: Number,\r\n default: 0.7\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n },\r\n goBack: {\r\n type: Boolean,\r\n default: false\r\n },\r\n handle: {\r\n type: String,\r\n default: null\r\n },\r\n delta: {\r\n type: Number,\r\n default: 0\r\n },\r\n delay: {\r\n type: Number,\r\n default: 0\r\n },\r\n dragClass: {\r\n type: String,\r\n default: null\r\n },\r\n vibration: {\r\n type: Number,\r\n default: 0\r\n },\r\n scrollingEdgeSize: {\r\n type: Number,\r\n default: 100\r\n }\r\n },\r\n emits: ['dragstart', 'dragend', 'cut', 'copy'],\r\n data () {\r\n return {\r\n dragInitialised: false,\r\n dragStarted: false,\r\n ignoreNextClick: false,\r\n initialUserSelect: null,\r\n downEvent: null,\r\n startPosition: null,\r\n delayTimer: null,\r\n scrollContainer: null\r\n };\r\n },\r\n computed: {\r\n cssClasses () {\r\n const clazz = {\r\n 'dnd-drag': true\r\n };\r\n if (!this.disabled) {\r\n return {\r\n ...clazz,\r\n 'drag-source': this.dragInProgress && this.dragSource === this,\r\n 'drag-mode-copy': this.currentDropMode === 'copy',\r\n 'drag-mode-cut': this.currentDropMode === 'cut',\r\n 'drag-mode-reordering': this.currentDropMode === 'reordering',\r\n 'drag-no-handle': !this.handle\r\n };\r\n }\r\n else {\r\n return clazz;\r\n }\r\n },\r\n currentDropMode () {\r\n if (this.dragInProgress && this.dragSource === this) {\r\n if (this.dragTop && this.dragTop['dropAllowed']) {\r\n if (this.dragTop['reordering']) {\r\n return 'reordering';\r\n }\r\n else {\r\n return this.dragTop['mode'];\r\n }\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n },\r\n methods: {\r\n onSelectStart (e) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n },\r\n performVibration () {\r\n // If browser can perform vibration and user has defined a vibration, perform it\r\n if (this.vibration > 0 && window.navigator && window.navigator.vibrate) {\r\n window.navigator.vibrate(this.vibration);\r\n }\r\n },\r\n onMouseDown (e) {\r\n let target = null;\r\n let goodButton = false;\r\n if (e.type === 'mousedown') {\r\n const mouse = e;\r\n target = e.target;\r\n goodButton = mouse.buttons === 1;\r\n }\r\n else {\r\n const touch = e;\r\n target = touch.touches[0].target;\r\n goodButton = true;\r\n }\r\n\r\n if (this.disabled || this.downEvent !== null || !goodButton) {\r\n return;\r\n }\r\n\r\n // Check that the target element is eligible for starting a drag\r\n // Includes checking against the handle selector\r\n // or whether the element contains 'dnd-no-drag' class (which should disable dragging from that\r\n // sub-element of a draggable parent)\r\n const goodTarget = !target.matches('.dnd-no-drag, .dnd-no-drag *') &&\r\n (\r\n !this.handle ||\r\n target.matches(this.handle + ', ' + this.handle + ' *')\r\n );\r\n\r\n if (!goodTarget) {\r\n return;\r\n }\r\n\r\n this.scrollContainer = scrollparent(target);\r\n this.initialUserSelect = document.body.style.userSelect;\r\n document.documentElement.style.userSelect = 'none'; // Permet au drag de se poursuivre normalement même\r\n // quand on quitte un élémént avec overflow: hidden.\r\n this.dragStarted = false;\r\n this.downEvent = e;\r\n if (this.downEvent.type === 'mousedown') {\r\n const mouse = e;\r\n this.startPosition = {\r\n x: mouse.clientX,\r\n y: mouse.clientY\r\n };\r\n }\r\n else {\r\n const touch = e;\r\n this.startPosition = {\r\n x: touch.touches[0].clientX,\r\n y: touch.touches[0].clientY\r\n };\r\n }\r\n\r\n if (this.delay) {\r\n this.dragInitialised = false;\r\n clearTimeout(this.delayTimer);\r\n this.delayTimer = setTimeout(() => {\r\n this.dragInitialised = true;\r\n this.performVibration();\r\n }, this.delay);\r\n }\r\n else {\r\n this.dragInitialised = true;\r\n this.performVibration();\r\n }\r\n\r\n document.addEventListener('click', this.onMouseClick, true);\r\n document.addEventListener('mouseup', this.onMouseUp);\r\n document.addEventListener('touchend', this.onMouseUp);\r\n document.addEventListener('selectstart', this.onSelectStart);\r\n document.addEventListener('keyup', this.onKeyUp);\r\n\r\n setTimeout(() => {\r\n document.addEventListener('mousemove', this.onMouseMove);\r\n document.addEventListener('touchmove', this.onMouseMove, { passive: false });\r\n document.addEventListener('easy-dnd-move', this.onEasyDnDMove);\r\n }, 0);\r\n\r\n // Prevents event from bubbling to ancestor drag components and initiate several drags at the same time\r\n e.stopPropagation();\r\n },\r\n // Prevent the user from accidentally causing a click event\r\n // if they have just attempted a drag event\r\n onMouseClick (e) {\r\n if (this.ignoreNextClick) {\r\n e.preventDefault();\r\n e.stopPropagation && e.stopPropagation();\r\n e.stopImmediatePropagation && e.stopImmediatePropagation();\r\n this.ignoreNextClick = false;\r\n return false;\r\n }\r\n },\r\n onMouseMove (e) {\r\n // We ignore the mousemove event that follows touchend :\r\n if (this.downEvent === null) return;\r\n\r\n // On touch devices, we ignore fake mouse events and deal with touch events only.\r\n if (this.downEvent.type === 'touchstart' && e.type === 'mousemove') return;\r\n\r\n // Find out event target and pointer position :\r\n let target = null;\r\n let x = null;\r\n let y = null;\r\n if (e.type === 'touchmove') {\r\n const touch = e;\r\n x = touch.touches[0].clientX;\r\n y = touch.touches[0].clientY;\r\n target = document.elementFromPoint(x, y);\r\n if (!target) {\r\n // Mouse going off screen. Ignore event.\r\n return;\r\n }\r\n }\r\n else {\r\n const mouse = e;\r\n x = mouse.clientX;\r\n y = mouse.clientY;\r\n target = mouse.target;\r\n }\r\n\r\n // Distance between current event and start position :\r\n const dist = Math.sqrt(Math.pow(this.startPosition.x - x, 2) + Math.pow(this.startPosition.y - y, 2));\r\n\r\n // If the drag has not begun yet and distance from initial point is greater than delta, we start the drag :\r\n if (!this.dragStarted && dist > this.delta) {\r\n // If they have dragged greater than the delta before the delay period has ended,\r\n // It means that they attempted to perform another action (such as scrolling) on the page\r\n if (!this.dragInitialised) {\r\n clearTimeout(this.delayTimer);\r\n }\r\n else {\r\n this.ignoreNextClick = true;\r\n this.dragStarted = true;\r\n dnd.startDrag(this, this.downEvent, this.startPosition.x, this.startPosition.y, this.type, this.data);\r\n document.documentElement.classList.add('drag-in-progress');\r\n }\r\n }\r\n\r\n // Dispatch custom easy-dnd-move event :\r\n if (this.dragStarted) {\r\n // If cursor/touch is at edge of container, perform scroll if available\r\n // If this.dragTop is defined, it means they are dragging on top of another DropList/EasyDnd component\r\n // if dropTop is a DropList, use the scrollingEdgeSize of that container if it exists, otherwise use the scrollingEdgeSize of the Drag component\r\n const currEdgeSize = this.dragTop && this.dragTop.$props.scrollingEdgeSize !== undefined ?\r\n this.dragTop.$props.scrollingEdgeSize :\r\n this.scrollingEdgeSize;\r\n\r\n if (currEdgeSize) {\r\n const currScrollContainer = this.dragTop ? scrollparent(this.dragTop.$el) : this.scrollContainer;\r\n performEdgeScroll(e, currScrollContainer, x, y, currEdgeSize);\r\n }\r\n else {\r\n cancelScrollAction();\r\n }\r\n\r\n const custom = new CustomEvent('easy-dnd-move', {\r\n bubbles: true,\r\n cancelable: true,\r\n detail: {\r\n x,\r\n y,\r\n native: e\r\n }\r\n });\r\n target.dispatchEvent(custom);\r\n }\r\n\r\n // Prevent scroll on touch devices if they were performing a drag\r\n if (this.dragInitialised && e.cancelable) {\r\n e.preventDefault();\r\n }\r\n },\r\n onEasyDnDMove (e) {\r\n dnd.mouseMove(e, null);\r\n },\r\n onMouseUp (e) {\r\n // On touch devices, we ignore fake mouse events and deal with touch events only.\r\n if (this.downEvent.type === 'touchstart' && e.type === 'mouseup') return;\r\n\r\n // This delay makes sure that when the click event that results from the mouseup is produced, the drag is\r\n // still in progress. So by checking the flag dnd.inProgress, one can tell apart true clicks from drag and\r\n // drop artefacts.\r\n setTimeout(() => {\r\n this.cancelDragActions();\r\n\r\n if (this.dragStarted) {\r\n dnd.stopDrag(e);\r\n }\r\n this.finishDrag();\r\n }, 0);\r\n },\r\n onKeyUp (e) {\r\n // If ESC is pressed, cancel the drag\r\n if (e.key === 'Escape') {\r\n this.cancelDragActions();\r\n\r\n setTimeout(() => {\r\n dnd.cancelDrag(e);\r\n this.finishDrag();\r\n }, 0);\r\n }\r\n },\r\n cancelDragActions () {\r\n this.dragInitialised = false;\r\n clearTimeout(this.delayTimer);\r\n cancelScrollAction();\r\n },\r\n finishDrag () {\r\n this.downEvent = null;\r\n this.scrollContainer = null;\r\n\r\n if (this.dragStarted) {\r\n document.documentElement.classList.remove('drag-in-progress');\r\n }\r\n document.removeEventListener('click', this.onMouseClick, true);\r\n document.removeEventListener('mousemove', this.onMouseMove);\r\n document.removeEventListener('touchmove', this.onMouseMove);\r\n document.removeEventListener('easy-dnd-move', this.onEasyDnDMove);\r\n document.removeEventListener('mouseup', this.onMouseUp);\r\n document.removeEventListener('touchend', this.onMouseUp);\r\n document.removeEventListener('selectstart', this.onSelectStart);\r\n document.removeEventListener('keyup', this.onKeyUp);\r\n document.documentElement.style.userSelect = this.initialUserSelect;\r\n },\r\n dndDragStart (ev) {\r\n if (ev.source === this) {\r\n this.$emit('dragstart', ev);\r\n }\r\n },\r\n dndDragEnd (ev) {\r\n if (ev.source === this) {\r\n this.$emit('dragend', ev);\r\n }\r\n },\r\n createDragImage (selfTransform) {\r\n let image;\r\n if (this.$slots['drag-image']) {\r\n const el = this.$refs['drag-image'] || document.createElement('div');\r\n if (el.childElementCount !== 1) {\r\n image = createDragImage(el);\r\n }\r\n else {\r\n image = createDragImage(el.children.item(0));\r\n }\r\n }\r\n else {\r\n image = createDragImage(this.$el);\r\n image.style.transform = selfTransform;\r\n }\r\n\r\n if (this.dragClass) {\r\n image.classList.add(this.dragClass);\r\n }\r\n image.classList.add('dnd-ghost');\r\n image['__opacity'] = this.dragImageOpacity;\r\n return image;\r\n }\r\n },\r\n created () {\r\n dnd.on('dragstart', this.dndDragStart);\r\n dnd.on('dragend', this.dndDragEnd);\r\n },\r\n mounted () {\r\n this.$el.addEventListener('mousedown', this.onMouseDown);\r\n this.$el.addEventListener('touchstart', this.onMouseDown);\r\n },\r\n beforeUnmount () {\r\n dnd.off('dragstart', this.dndDragStart);\r\n dnd.off('dragend', this.dndDragEnd);\r\n\r\n this.$el.removeEventListener('mousedown', this.onMouseDown);\r\n this.$el.removeEventListener('touchstart', this.onMouseDown);\r\n }\r\n};\r\n\r\nvar script$4 = {\r\n name: 'Drag',\r\n mixins: [DragMixin],\r\n props: {\r\n /**\r\n * Tag to be used as root of this component. Defaults to div.\r\n */\r\n tag: {\r\n type: [String, Object, Function],\r\n default: 'div'\r\n }\r\n },\r\n computed: {\r\n dynamicSlots () {\r\n return Object.entries(this.$slots).filter(([key]) => key !== 'drag-image' && key !== 'default');\r\n }\r\n }\r\n};\r\n\r\nconst _hoisted_1$2 = {\r\n key: 0,\r\n ref: \"drag-image\",\r\n class: \"__drag-image\"\r\n};\r\n\r\nfunction render$3(_ctx, _cache, $props, $setup, $data, $options) {\r\n return (openBlock(), createBlock(resolveDynamicComponent($props.tag), {\r\n class: normalizeClass(_ctx.cssClasses)\r\n }, createSlots({\r\n default: withCtx(() => [\r\n renderSlot(_ctx.$slots, \"default\", normalizeProps(guardReactiveProps(_ctx.$slots['default'] || {}))),\r\n (_ctx.dragInitialised)\r\n ? (openBlock(), createElementBlock(\"div\", _hoisted_1$2, [\r\n renderSlot(_ctx.$slots, \"drag-image\")\r\n ], 512 /* NEED_PATCH */))\r\n : createCommentVNode(\"v-if\", true)\r\n ]),\r\n _: 2 /* DYNAMIC */\r\n }, [\r\n renderList($options.dynamicSlots, ([slot, args]) => {\r\n return {\r\n name: slot,\r\n fn: withCtx(() => [\r\n renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(args)))\r\n ])\r\n }\r\n })\r\n ]), 1032 /* PROPS, DYNAMIC_SLOTS */, [\"class\"]))\r\n}\r\n\r\nscript$4.render = render$3;\r\nscript$4.__scopeId = \"data-v-f87407ce\";\r\n\r\nfunction dropAllowed (inst) {\r\n if (inst.dragInProgress && inst.typeAllowed) {\r\n return inst.compatibleMode && inst.effectiveAcceptsData(inst.dragData, inst.dragType);\r\n }\r\n return null;\r\n}\r\n\r\nfunction doDrop (inst, event) {\r\n inst.$emit('drop', event);\r\n event.source.$emit(inst.mode, event);\r\n}\r\n\r\nfunction candidate (inst, type) {\r\n return inst.effectiveAcceptsType(type);\r\n}\r\n\r\nvar DropMixin = {\r\n mixins: [DragAwareMixin],\r\n props: {\r\n acceptsType: {\r\n type: [String, Array, Function],\r\n default: null\r\n },\r\n acceptsData: {\r\n type: Function,\r\n default: () => {\r\n return true;\r\n }\r\n },\r\n mode: {\r\n type: String,\r\n default: 'copy'\r\n },\r\n dragImageOpacity: {\r\n type: Number,\r\n default: 0.7\r\n }\r\n },\r\n emits: ['dragover', 'dragenter', 'dragleave', 'dragend', 'drop'],\r\n data () {\r\n return {\r\n isDrop: true\r\n };\r\n },\r\n computed: {\r\n compatibleMode () {\r\n return this.dragInProgress ? true : null;\r\n },\r\n dropIn () {\r\n if (this.dragInProgress) {\r\n return this.dragTop === this;\r\n }\r\n return null;\r\n },\r\n typeAllowed () {\r\n if (this.dragInProgress) {\r\n return this.effectiveAcceptsType(this.dragType);\r\n }\r\n return null;\r\n },\r\n dropAllowed () {\r\n return dropAllowed(this);\r\n },\r\n cssClasses () {\r\n const clazz = {\r\n 'dnd-drop': true\r\n };\r\n if (this.dropIn !== null) {\r\n clazz['drop-in'] = this.dropIn;\r\n clazz['drop-out'] = !this.dropIn;\r\n }\r\n if (this.typeAllowed !== null) {\r\n clazz['type-allowed'] = this.typeAllowed;\r\n clazz['type-forbidden'] = !this.typeAllowed;\r\n }\r\n if (this.dropAllowed !== null) {\r\n clazz['drop-allowed'] = this.dropAllowed;\r\n clazz['drop-forbidden'] = !this.dropAllowed;\r\n }\r\n return clazz;\r\n }\r\n },\r\n methods: {\r\n effectiveAcceptsType (type) {\r\n if (this.acceptsType === null) {\r\n return true;\r\n }\r\n else if (typeof (this.acceptsType) === 'string' || typeof(this.acceptsType) === 'number') {\r\n return this.acceptsType === type;\r\n }\r\n else if (typeof (this.acceptsType) === 'object' && Array.isArray(this.acceptsType)) {\r\n return this.acceptsType.includes(type);\r\n }\r\n else {\r\n return this.acceptsType(type);\r\n }\r\n },\r\n effectiveAcceptsData (data, type) {\r\n return this.acceptsData(data, type);\r\n },\r\n onDragPositionChanged (event) {\r\n if (this === event.top) {\r\n this.$emit('dragover', event);\r\n }\r\n },\r\n onDragTopChanged (event) {\r\n if (this === event.top) {\r\n this.$emit('dragenter', event);\r\n }\r\n if (this === event.previousTop) {\r\n this.$emit('dragleave', event);\r\n }\r\n },\r\n onDragEnd (event) {\r\n if (this === event.top) {\r\n this.$emit('dragend', event);\r\n }\r\n },\r\n onDrop (event) {\r\n if (this.dropIn && this.compatibleMode && this.dropAllowed) {\r\n this.doDrop(event);\r\n }\r\n },\r\n doDrop (event) {\r\n doDrop(this, event);\r\n },\r\n /**\r\n * Returns true if the current drop area participates in the current drag operation.\r\n */\r\n candidate (type) {\r\n return candidate(this, type);\r\n },\r\n createDragImage () {\r\n let image = 'source';\r\n if (this.$refs['drag-image']) {\r\n const el = this.$refs['drag-image'];\r\n if (el.childElementCount !== 1) {\r\n image = createDragImage(el);\r\n }\r\n else {\r\n image = createDragImage(el.children.item(0));\r\n }\r\n image['__opacity'] = this.dragImageOpacity;\r\n image.classList.add('dnd-ghost');\r\n }\r\n return image;\r\n },\r\n onDnDMove (e) {\r\n dnd.mouseMove(e, this);\r\n }\r\n },\r\n created () {\r\n dnd.on('dragpositionchanged', this.onDragPositionChanged);\r\n dnd.on('dragtopchanged', this.onDragTopChanged);\r\n dnd.on('drop', this.onDrop);\r\n dnd.on('dragend', this.onDragEnd);\r\n },\r\n mounted () {\r\n this.$el.addEventListener('easy-dnd-move', this.onDnDMove);\r\n },\r\n beforeUnmount () {\r\n this.$el.removeEventListener('easy-dnd-move', this.onDnDMove);\r\n\r\n dnd.off('dragpositionchanged', this.onDragPositionChanged);\r\n dnd.off('dragtopchanged', this.onDragTopChanged);\r\n dnd.off('drop', this.onDrop);\r\n dnd.off('dragend', this.onDragEnd);\r\n }\r\n};\r\n\r\nvar script$3 = {\r\n name: 'Drop',\r\n mixins: [DropMixin],\r\n props: {\r\n tag: {\r\n type: [String, Object, Function],\r\n default: 'div'\r\n }\r\n },\r\n computed: {\r\n dynamicSlots () {\r\n return Object.entries(this.$slots).filter(([key]) => key !== 'drag-image' && key !== 'default');\r\n },\r\n showDragImage () {\r\n return this.dragInProgress && this.typeAllowed && !!this.$slots['drag-image'];\r\n }\r\n }\r\n};\r\n\r\nconst _hoisted_1$1 = {\r\n key: 0,\r\n ref: \"drag-image\",\r\n class: \"__drag-image\"\r\n};\r\n\r\nfunction render$2(_ctx, _cache, $props, $setup, $data, $options) {\r\n return (openBlock(), createBlock(resolveDynamicComponent($props.tag), {\r\n class: normalizeClass(_ctx.cssClasses)\r\n }, createSlots({\r\n default: withCtx(() => [\r\n renderSlot(_ctx.$slots, \"default\", normalizeProps(guardReactiveProps(_ctx.$slots['default'] || {}))),\r\n ($options.showDragImage)\r\n ? (openBlock(), createElementBlock(\"div\", _hoisted_1$1, [\r\n renderSlot(_ctx.$slots, \"drag-image\", {\r\n type: _ctx.dragType,\r\n data: _ctx.dragData\r\n })\r\n ], 512 /* NEED_PATCH */))\r\n : createCommentVNode(\"v-if\", true)\r\n ]),\r\n _: 2 /* DYNAMIC */\r\n }, [\r\n renderList($options.dynamicSlots, ([slot, args]) => {\r\n return {\r\n name: slot,\r\n fn: withCtx(() => [\r\n renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(args)))\r\n ])\r\n }\r\n })\r\n ]), 1032 /* PROPS, DYNAMIC_SLOTS */, [\"class\"]))\r\n}\r\n\r\nscript$3.render = render$2;\r\nscript$3.__scopeId = \"data-v-12a39e52\";\r\n\r\nvar script$2 = {\r\n name: 'DropMask',\r\n mixins: [DragAwareMixin],\r\n props: {\r\n tag: {\r\n type: [String, Object, Function],\r\n default: 'div'\r\n }\r\n },\r\n data () {\r\n return {\r\n isDropMask: true\r\n };\r\n },\r\n mounted () {\r\n this.$el.addEventListener('easy-dnd-move', this.onDndMove);\r\n },\r\n beforeUnmount () {\r\n this.$el.removeEventListener('easy-dnd-move', this.onDndMove);\r\n },\r\n methods: {\r\n createDragImage () {\r\n return 'source';\r\n },\r\n onDndMove (e) {\r\n dnd.mouseMove(e, this);\r\n }\r\n }\r\n};\r\n\r\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\r\n return (openBlock(), createBlock(resolveDynamicComponent($props.tag), null, createSlots({ _: 2 /* DYNAMIC */ }, [\r\n renderList(_ctx.$slots, (args, slot) => {\r\n return {\r\n name: slot,\r\n fn: withCtx(() => [\r\n renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(args)))\r\n ])\r\n }\r\n })\r\n ]), 1024 /* DYNAMIC_SLOTS */))\r\n}\r\n\r\nscript$2.render = render$1;\r\n\r\nvar script$1 = {\r\n name: 'DragFeedback'\r\n};\r\n\r\nconst _hoisted_1 = { class: \"DragFeedback\" };\r\n\r\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\r\n return (openBlock(), createElementBlock(\"div\", _hoisted_1, [\r\n renderSlot(_ctx.$slots, \"default\")\r\n ]))\r\n}\r\n\r\nscript$1.render = render;\r\n\r\nclass Grid {\r\n reference;\r\n referenceOriginalPosition;\r\n magnets = [];\r\n\r\n constructor (collection, upToIndex, direction, fromIndex) {\r\n this.reference = collection.item(0).parentNode;\r\n this.referenceOriginalPosition = {\r\n x: this.reference.getBoundingClientRect().left - this.reference.scrollLeft,\r\n y: this.reference.getBoundingClientRect().top - this.reference.scrollTop,\r\n };\r\n let index = 0;\r\n for (const child of collection) {\r\n if (index > upToIndex) break;\r\n const rect = child.getBoundingClientRect();\r\n const hasNestedDrop = child.classList.contains('dnd-drop') || child.getElementsByClassName('dnd-drop').length > 0;\r\n let horizontal = false;\r\n if (hasNestedDrop) {\r\n if (direction === 'auto') {\r\n // Auto mode not supported for now. Row or column must be defined explicitly if there are nested drop lists.\r\n throw 'Easy-DnD error : a drop list is missing one of these attributes : \\'row\\' or \\'column\\'.';\r\n }\r\n else {\r\n horizontal = direction === 'row';\r\n }\r\n }\r\n if (fromIndex === null) {\r\n // Inserting mode.\r\n this.magnets.push(hasNestedDrop ? this.before(rect, horizontal) : this.center(rect));\r\n }\r\n else {\r\n // Reordering mode.\r\n this.magnets.push(hasNestedDrop ? (\r\n fromIndex < index ? this.after : this.before\r\n )(rect, horizontal) : this.center(rect));\r\n }\r\n // Debug : show magnets :\r\n //document.body.insertAdjacentHTML(\"beforeend\", \"<div style='background-color: red; position: fixed; width: 1px; height: 1px; top:\" + this.magnets[index].y + \"px; left:\" + this.magnets[index].x + \"px;' ></div>\")\r\n index++;\r\n }\r\n }\r\n\r\n /**\r\n * Returns the center of the rectangle.\r\n */\r\n center (rect) {\r\n return {\r\n x: rect.left + rect.width / 2,\r\n y: rect.top + rect.height / 2\r\n };\r\n }\r\n\r\n /**\r\n * When horizontal is true / false, returns middle of the left / top side of the rectangle.\r\n */\r\n before (rect, horizontal) {\r\n return horizontal ? {\r\n x: rect.left,\r\n y: rect.top + rect.height / 2\r\n } : {\r\n x: rect.left + rect.width / 2,\r\n y: rect.top\r\n };\r\n }\r\n\r\n /**\r\n * When horizontal is true / false, returns middle of the right / bottom side of the rectangle.\r\n */\r\n after (rect, horizontal) {\r\n return horizontal ? {\r\n x: rect.left + rect.width,\r\n y: rect.top + rect.height / 2\r\n } : {\r\n x: rect.left + rect.width / 2,\r\n y: rect.top + rect.height\r\n };\r\n }\r\n\r\n /**\r\n * In case the user scrolls during the drag, the position of the magnets are not what they used to be when the drag\r\n * started. A correction must be applied that takes into account the amount of scroll. This correction is the\r\n * difference between the current position of the parent element and its position when the drag started.\r\n */\r\n correction () {\r\n return {\r\n x: this.reference.getBoundingClientRect().left - this.reference.scrollLeft - this.referenceOriginalPosition.x,\r\n y: this.reference.getBoundingClientRect().top - this.reference.scrollTop - this.referenceOriginalPosition.y,\r\n };\r\n }\r\n\r\n closestIndex (position) {\r\n const x = position.x - this.correction().x;\r\n const y = position.y - this.correction().y;\r\n let minDist = 999999;\r\n let index = -1;\r\n for (let i = 0; i < this.magnets.length; i++) {\r\n const magnet = this.magnets[i];\r\n const dist = Math.sqrt(Math.pow(magnet.x - x, 2) + Math.pow(magnet.y - y, 2));\r\n if (dist < minDist) {\r\n minDist = dist;\r\n index = i;\r\n }\r\n }\r\n return index;\r\n }\r\n}\r\n\r\nclass DnDEvent {\r\n type;\r\n data;\r\n top;\r\n previousTop;\r\n source;\r\n position;\r\n success;\r\n native;\r\n}\r\n\r\nclass ReorderEvent {\r\n from;\r\n to;\r\n \r\n constructor (from, to) {\r\n this.from = from;\r\n this.to = to;\r\n }\r\n\r\n apply (array) {\r\n const temp = array[this.from];\r\n array.splice(this.from, 1);\r\n array.splice(this.to, 0, temp);\r\n }\r\n\r\n}\r\n\r\nclass InsertEvent {\r\n type;\r\n data;\r\n index;\r\n \r\n constructor (type, data, index) {\r\n this.type = type;\r\n this.data = data;\r\n this.index = index;\r\n }\r\n}\r\n\r\nvar script = {\r\n name: 'DropList',\r\n mixins: [DropMixin],\r\n props: {\r\n tag: {\r\n type: [String, Object, Function],\r\n default: 'div'\r\n },\r\n items: {\r\n type: Array,\r\n required: true\r\n },\r\n row: {\r\n type: Boolean,\r\n default: false\r\n },\r\n column: {\r\n type: Boolean,\r\n default: false\r\n },\r\n noAnimations: {\r\n type: Boolean,\r\n default: false\r\n },\r\n scrollingEdgeSize: {\r\n type: Number,\r\n default: undefined\r\n }\r\n },\r\n emits: ['reorder', 'insert'],\r\n data () {\r\n return {\r\n grid: null,\r\n forbiddenKeys: [],\r\n feedbackKey: null,\r\n fromIndex: null\r\n };\r\n },\r\n computed: {\r\n rootTag () {\r\n if (this.noAnimations) {\r\n return this.tag;\r\n }\r\n return TransitionGroup;\r\n },\r\n rootProps () {\r\n if (this.noAnimations) {\r\n return {};\r\n }\r\n\r\n return {\r\n tag: this.tag,\r\n css: false\r\n };\r\n },\r\n direction () {\r\n // todo - rewrite this logic\r\n if (this.row) return 'row';\r\n if (this.column) return 'column';\r\n return 'auto';\r\n },\r\n reordering () {\r\n if (dnd.inProgress) {\r\n return dnd.source.$el.parentElement === this.$el;\r\n }\r\n return null;\r\n },\r\n closestIndex () {\r\n if (this.grid) {\r\n return this.grid.closestIndex(dnd.position);\r\n }\r\n return null;\r\n },\r\n dropAllowed () {\r\n if (this.dragInProgress) {\r\n if (this.reordering) {\r\n return this.items.length > 1;\r\n }\r\n else {\r\n // todo - eventually refactor so that this isn't necessary\r\n if (!dropAllowed(this)) {\r\n return false;\r\n }\r\n\r\n if (this.forbiddenKeys !== null && this.feedbackKey !== null) {\r\n return !this.forbiddenKeys.includes(this.feedbackKey);\r\n }\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n itemsBeforeFeedback () {\r\n if (this.closestIndex === 0) {\r\n return [];\r\n }\r\n return this.items.slice(0, this.closestIndex);\r\n },\r\n itemsAfterFeedback () {\r\n if (this.closestIndex === this.items.length) {\r\n return [];\r\n }\r\n return this.items.slice(this.closestIndex);\r\n },\r\n itemsBeforeReorderingFeedback () {\r\n if (this.closestIndex <= this.fromIndex) {\r\n return this.items.slice(0, this.closestIndex);\r\n }\r\n return this.items.slice(0, this.closestIndex + 1);\r\n },\r\n itemsAfterReorderingFeedback () {\r\n if (this.closestIndex <= this.fromIndex) {\r\n return this.items.slice(this.closestIndex);\r\n }\r\n return this.items.slice(this.closestIndex + 1);\r\n },\r\n reorderedItems () {\r\n const toIndex = this.closestIndex;\r\n const reordered = [...this.items];\r\n const temp = reordered[this.fromIndex];\r\n\r\n reordered.splice(this.fromIndex, 1);\r\n reordered.splice(toIndex, 0, temp);\r\n return reordered;\r\n },\r\n clazz () {\r\n return {\r\n 'drop-list': true,\r\n 'reordering': this.reordering === true,\r\n 'inserting': this.reordering === false,\r\n ...(this.reordering === false ? this.cssClasses : { 'dnd-drop': true })\r\n };\r\n },\r\n showDragFeedback () {\r\n return this.dragInProgress && this.typeAllowed && !this.reordering;\r\n },\r\n showInsertingDragImage () {\r\n return this.dragInProgress && this.typeAllowed && !this.reordering && !!this.$slots['drag-image'];\r\n },\r\n showReorderingDragImage () {\r\n return this.dragInProgress && this.reordering && !!this.$slots['reordering-drag-image'];\r\n },\r\n hasReorderingFeedback () {\r\n return !!this.$slots['reordering-feedback'];\r\n },\r\n hasEmptySlot () {\r\n return !!this.$slots['empty'];\r\n }\r\n },\r\n created () {\r\n dnd.on('dragstart', this.onDragStart);\r\n dnd.on('dragend', this.onDragEnd);\r\n },\r\n beforeUnmount () {\r\n dnd.off('dragstart', this.onDragStart);\r\n dnd.off('dragend', this.onDragEnd);\r\n },\r\n methods: {\r\n // Presence of feedback node in the DOM and of keys in the virtual DOM required => delayed until what\r\n // depends on drag data has been processed.\r\n refresh () {\r\n this.$nextTick(() => {\r\n this.grid = this.computeInsertingGrid();\r\n this.feedbackKey = this.computeFeedbackKey();\r\n this.forbiddenKeys = this.computeForbiddenKeys();\r\n });\r\n },\r\n onDragStart (event) {\r\n if (this.candidate(dnd.type)) {\r\n if (this.reordering) {\r\n this.fromIndex = Array.prototype.indexOf.call(event.source.$el.parentElement.children, event.source.$el);\r\n this.grid = this.computeReorderingGrid();\r\n }\r\n else {\r\n this.refresh();\r\n }\r\n }\r\n },\r\n onDragEnd () {\r\n this.fromIndex = null;\r\n this.feedbackKey = null;\r\n this.forbiddenKeys = null;\r\n this.grid = null;\r\n },\r\n doDrop (event) {\r\n if (this.reordering) {\r\n if (this.fromIndex !== this.closestIndex) {\r\n this.$emit('reorder', new ReorderEvent(\r\n this.fromIndex,\r\n this.closestIndex\r\n ));\r\n }\r\n }\r\n else {\r\n // todo - eventually remove the need for this\r\n doDrop(this, event);\r\n this.$emit('insert', new InsertEvent(\r\n event.type,\r\n event.data,\r\n this.closestIndex\r\n ));\r\n }\r\n },\r\n candidate (type) {\r\n return candidate(this, type) || this.reordering;\r\n },\r\n computeForbiddenKeys () {\r\n return (this.noAnimations ? [] : this.$refs.component.$slots['default']())\r\n .map(vn => vn.key)\r\n .filter(k => !!k && k !== 'drag-image' && k !== 'drag-feedback');\r\n },\r\n computeFeedbackKey () {\r\n return this.$refs['feedback']['$slots']['default']()[0]['key'];\r\n },\r\n computeInsertingGrid () {\r\n if (this.$refs.feedback.$el.children.length < 1) {\r\n return null;\r\n }\r\n\r\n const feedback = this.$refs.feedback.$el.children[0];\r\n const clone = feedback.cloneNode(true);\r\n const tg = this.$el;\r\n if (tg.children.length > this.items.length) {\r\n tg.insertBefore(clone, tg.children[this.items.length]);\r\n }\r\n else {\r\n tg.appendChild(clone);\r\n }\r\n const grid = new Grid(tg.children, this.items.length, this.direction, null);\r\n tg.removeChild(clone);\r\n return grid;\r\n },\r\n computeReorderingGrid () {\r\n return new Grid(this.$el.children, this.items.length - 1, this.direction, this.fromIndex);\r\n },\r\n createDragImage () {\r\n let image;\r\n if (this.$refs['drag-image']) {\r\n const el = this.$refs['drag-image'];\r\n let model;\r\n if (el.childElementCount !== 1) {\r\n model = el;\r\n }\r\n else {\r\n model = el.children.item(0);\r\n }\r\n const clone = model.cloneNode(true);\r\n const tg = this.$el;\r\n tg.appendChild(clone);\r\n image = createDragImage(clone);\r\n tg.removeChild(clone);\r\n image['__opacity'] = this.dragImageOpacity;\r\n image.classList.add('dnd-ghost');\r\n }\r\n else {\r\n image = 'source';\r\n }\r\n return image;\r\n }\r\n },\r\n render () {\r\n if (!this.$slots['item']) {\r\n throw 'The \"Item\" slot must be defined to use DropList';\r\n }\r\n\r\n if (!this.$slots['feedback']) {\r\n throw 'The \"Feedback\" slot must be defined to use DropList';\r\n }\r\n\r\n let defaultArr = [];\r\n if (this.dropIn && this.dropAllowed) {\r\n if (this.reordering) {\r\n if (this.hasReorderingFeedback) {\r\n const itemsReorderingBefore = this.itemsBeforeReorderingFeedback.map((item, index) => {\r\n return this.$slots['item']({\r\n item: item,\r\n index: index,\r\n reorder: false\r\n })[0];\r\n });\r\n if (itemsReorderingBefore.length > 0) {\r\n defaultArr = defaultArr.concat(itemsReorderingBefore);\r\n }\r\n\r\n defaultArr.push(this.$slots['reordering-feedback']({\r\n key: 'reordering-feedback',\r\n item: this.items[this.fromIndex]\r\n })[0]);\r\n\r\n const itemsReorderingAfter = this.itemsAfterReorderingFeedback.map((item, index) => {\r\n return this.$slots['item']({\r\n item: item,\r\n index: this.itemsBeforeReorderingFeedback.length + index,\r\n reorder: false\r\n })[0];\r\n });\r\n if (itemsReorderingAfter.length > 0) {\r\n defaultArr = defaultArr.concat(itemsReorderingAfter);\r\n }\r\n }\r\n else {\r\n const reorderedItems = this.reorderedItems.map((item, index) => {\r\n return this.$slots['item']({\r\n item: item,\r\n index: index,\r\n reorder: index === this.closestIndex\r\n })[0];\r\n });\r\n if (reorderedItems.length > 0) {\r\n defaultArr = defaultArr.concat(reorderedItems);\r\n }\r\n }\r\n }\r\n else {\r\n const itemsBefore = this.itemsBeforeFeedback.map((item, index) => {\r\n return this.$slots['item']({\r\n item: item,\r\n index: index,\r\n reorder: false\r\n })[0];\r\n });\r\n if (itemsBefore.length > 0) {\r\n defaultArr = defaultArr.concat(itemsBefore);\r\n }\r\n\r\n defaultArr.push(this.$slots['feedback']({\r\n key: 'drag-feedback',\r\n data: this.dragData,\r\n type: this.dragType\r\n })[0]);\r\n\r\n const itemsAfter = this.itemsAfterFeedback.map((item, index) => {\r\n return this.$slots['item']({\r\n item: item,\r\n index: this.itemsBeforeFeedback.length + index,\r\n reorder: false\r\n })[0];\r\n });\r\n if (itemsAfter.length > 0) {\r\n defaultArr = defaultArr.concat(itemsAfter);\r\n }\r\n }\r\n }\r\n else {\r\n const defaultItems = this.items.map((item, index) => {\r\n return this.$slots['item']({\r\n item: item,\r\n index: index,\r\n reorder: false\r\n })[0];\r\n });\r\n\r\n if (defaultItems.length > 0) {\r\n defaultArr = defaultArr.concat(defaultItems);\r\n }\r\n else if (this.hasEmptySlot) {\r\n defaultArr.push(this.$slots['empty']()[0]);\r\n }\r\n }\r\n\r\n if (this.showDragFeedback) {\r\n defaultArr.push(h(\r\n script$1,\r\n {\r\n class: '__feedback',\r\n ref: 'feedback',\r\n key: 'drag-feedback'\r\n },\r\n {\r\n default: () => this.$slots['feedback']({\r\n type: this.dragType,\r\n data: this.dragData\r\n })[0]\r\n }\r\n ));\r\n }\r\n\r\n if (this.showReorderingDragImage) {\r\n defaultArr.push(h(\r\n 'div',\r\n {\r\n class: '__drag-image',\r\n ref: 'drag-image',\r\n key: 'reordering-drag-image'\r\n },\r\n {\r\n default: () => this.$slots['reordering-drag-image']({\r\n item: this.items[this.fromIndex]\r\n })[0]\r\n }\r\n ));\r\n }\r\n\r\n if (this.showInsertingDragImage) {\r\n defaultArr.push(h(\r\n 'div',\r\n {\r\n class: '__drag-image',\r\n ref: 'drag-image',\r\n key: 'inserting-drag-image'\r\n },\r\n {\r\n default: () => this.$slots['drag-image']({\r\n type: this.dragType,\r\n data: this.dragData\r\n })[0]\r\n }\r\n ));\r\n }\r\n\r\n return h(\r\n this.rootTag,\r\n {\r\n ref: 'component',\r\n class: this.clazz,\r\n ...this.rootProps\r\n },\r\n {\r\n default: () => defaultArr\r\n }\r\n );\r\n }\r\n};\r\n\r\nscript.__scopeId = \"data-v-230f65e3\";\r\n\r\n/**\r\n * This class reacts to drag events emitted by the dnd object to manage a sequence of drag images and fade from one to the\r\n * other as the drag progresses.\r\n */\r\nclass DragImagesManager {\r\n\r\n selfTransform = null;\r\n clones = null;\r\n source = null;\r\n sourcePos = null;\r\n sourceClone = null;\r\n\r\n constructor () {\r\n dnd.on('dragstart', this.onDragStart.bind(this));\r\n dnd.on('dragtopchanged', this.onDragTopChanged.bind(this));\r\n dnd.on('dragpositionchanged', this.onDragPositionChanged.bind(this));\r\n dnd.on('dragend', this.onDragEnd.bind(this));\r\n }\r\n\r\n onDragStart (event) {\r\n // If go-back=true and it is still animating while they attempt another drag,\r\n // it will bug out. Best to clean up any existing elements on the page before\r\n // attempting to start the next animation\r\n this.cleanUp();\r\n\r\n this.sourcePos = {\r\n x: event.source.$el.getBoundingClientRect().left,\r\n y: event.source.$el.getBoundingClientRect().top\r\n };\r\n this.selfTransform = 'translate(-' + (event.position.x - this.sourcePos.x) + 'px, -' + (event.position.y - this.sourcePos.y) + 'px)';\r\n this.clones = new Map();\r\n this.source = event.source;\r\n }\r\n\r\n onDragEnd (event) {\r\n nextTick()\r\n .then(() => {\r\n if (!event.success && this.source && this.source['goBack']) {\r\n // Restore the drag image that is active when hovering outside any drop zone :\r\n const img = this.switch(null);\r\n \r\n // Move it back to its original place :\r\n window.requestAnimationFrame(() => {\r\n img.style.transition = 'all 0.5s';\r\n window.requestAnimationFrame(() => {\r\n img.style.left = this.sourcePos.x + 'px';\r\n img.style.top = this.sourcePos.y + 'px';\r\n img.style.transform = 'translate(0,0)';\r\n const handler = () => {\r\n this.cleanUp();\r\n img.removeEventListener('transitionend', handler);\r\n };\r\n img.addEventListener('transitionend', handler);\r\n });\r\n });\r\n }\r\n else {\r\n this.cleanUp();\r\n }\r\n });\r\n }\r\n\r\n cleanUp () {\r\n if (this.clones) {\r\n this.clones.forEach((clone) => {\r\n if (clone.parentNode === document.body) {\r\n document.body.removeChild(clone);\r\n }\r\n });\r\n }\r\n if (this.sourceClone !== null) {\r\n if (this.sourceClone.parentNode === document.body) {\r\n document.body.removeChild(this.sourceClone);\r\n }\r\n }\r\n this.selfTransform = null;\r\n this.clones = null;\r\n this.source = null;\r\n this.sourceClone = null;\r\n this.sourcePos = null;\r\n }\r\n\r\n onDragTopChanged (event) {\r\n this.switch(event.top);\r\n }\r\n\r\n switch (top) {\r\n this.clones.forEach(clone => {\r\n clone.style.opacity = '0';\r\n });\r\n if (this.sourceClone) {\r\n this.sourceClone.style.opacity = '0';\r\n }\r\n\r\n let activeClone;\r\n if (top === null) {\r\n activeClone = this.getSourceClone();\r\n }\r\n else {\r\n if (!this.clones.has(top)) {\r\n let clone = top['createDragImage'](this.selfTransform);\r\n if (clone === 'source') {\r\n clone = this.getSourceClone();\r\n }\r\n else if (clone !== null) {\r\n clone.style.opacity = '0';\r\n document.body.appendChild(clone);\r\n }\r\n this.clones.set(top, clone);\r\n }\r\n activeClone = this.clones.get(top);\r\n }\r\n\r\n if (activeClone !== null) {\r\n activeClone.offsetWidth; // Forces browser reflow\r\n activeClone.style.opacity = activeClone['__opacity'];\r\n activeClone.style.visibility = 'visible';\r\n }\r\n\r\n return activeClone;\r\n }\r\n\r\n getSourceClone () {\r\n if (this.sourceClone === null) {\r\n this.sourceClone = this.source['createDragImage'](this.selfTransform);\r\n this.sourceClone.style.opacity = '0';\r\n document.body.appendChild(this.sourceClone);\r\n }\r\n return this.sourceClone;\r\n }\r\n\r\n onDragPositionChanged () {\r\n this.clones.forEach((clone) => {\r\n clone.style.left = dnd.position.x + 'px';\r\n clone.style.top = dnd.position.y + 'px';\r\n });\r\n if (this.sourceClone) {\r\n this.sourceClone.style.left = dnd.position.x + 'px';\r\n this.sourceClone.style.top = dnd.position.y + 'px';\r\n }\r\n }\r\n\r\n}\r\n\r\nnew DragImagesManager();\r\n\r\nexport { DnDEvent, script$4 as Drag, DragAwareMixin, script$1 as DragFeedback, DragImagesManager, DragMixin, script$3 as Drop, script as DropList, script$2 as DropMask, DropMixin, InsertEvent, ReorderEvent, createDragImage, dnd };\r\n"],"names":["DnD","n","all","Map","on","t","e","i","get","push","set","off","splice","indexOf","emit","slice","map","source","event","x","y","type","data","position","top","inProgress","previousTop","success","this","resetVariables","comp","prevent","stopPropagation","detail","native","eventBus","callback","dnd","DragAwareMixin","isDropMask","computed","dragInProgress","dragData","dragType","dragPosition","dragSource","dragTop","createDragImage","el","clone","cloneNode","copyStyle","vSrcElements","getElementsByTagName","vDstElements","length","deepClone","style","margin","transition","src","destination","computedStyle","window","getComputedStyle","key","width","getPropertyValue","clientWidth","parseFloat","paddingLeft","paddingRight","setProperty","height","clientHeight","paddingTop","paddingBottom","getPropertyPriority","pointerEvents","regex","node","prop","scrollparent","document","body","test","scroll","parentNode","timer","cancelScrollAction","clearTimeout","performEdgeScroll","container","clientX","clientY","edgeSize","rect","getBoundingClientRect","isBody","viewportX","left","viewportY","viewportWidth","viewportHeight","documentElement","edgeTop","edgeLeft","edgeBottom","edgeRight","isInLeftEdge","isInRightEdge","isInTopEdge","isInBottomEdge","documentWidth","Math","max","scrollWidth","offsetWidth","documentHeight","scrollHeight","offsetHeight","maxScrollX","maxScrollY","checkForWindowScroll","currentScrollX","scrollLeft","currentScrollY","scrollTop","pageXOffset","pageYOffset","canScrollUp","canScrollDown","canScrollLeft","canScrollRight","nextScrollX","nextScrollY","maxStep","min","scrollTo","adjustWindowScroll","setTimeout","DragMixin","mixins","props","String","default","dragImageOpacity","Number","disabled","Boolean","goBack","handle","delta","delay","dragClass","vibration","scrollingEdgeSize","emits","dragInitialised","dragStarted","ignoreNextClick","initialUserSelect","downEvent","startPosition","delayTimer","scrollContainer","cssClasses","clazz","currentDropMode","methods","onSelectStart","preventDefault","performVibration","navigator","vibrate","onMouseDown","target","goodButton","mouse","buttons","touches","matches","userSelect","touch","_this","addEventListener","onMouseClick","onMouseUp","onKeyUp","onMouseMove","passive","onEasyDnDMove","stopImmediatePropagation","elementFromPoint","dist","sqrt","pow","startDrag","classList","add","currEdgeSize","undefined","$props","$el","custom","CustomEvent","bubbles","cancelable","dispatchEvent","mouseMove","_this2","cancelDragActions","stopDrag","finishDrag","cancelDrag","_this3","remove","removeEventListener","dndDragStart","ev","$emit","dndDragEnd","selfTransform","image","$slots","$refs","createElement","childElementCount","children","item","transform","created","mounted","beforeUnmount","script$4","name","tag","Object","Function","dynamicSlots","entries","filter","_hoisted_1$2","ref","class","dropAllowed","inst","typeAllowed","compatibleMode","effectiveAcceptsData","doDrop","mode","candidate","effectiveAcceptsType","render","_ctx","_cache","$setup","$data","$options","_","slot","args","fn","__scopeId","DropMixin","acceptsType","Array","acceptsData","isDrop","dropIn","_typeof","isArray","includes","onDragPositionChanged","onDragTopChanged","onDragEnd","onDrop","onDnDMove","script$3","showDragImage","_hoisted_1$1","script$2","onDndMove","script$1","_hoisted_1","Grid","collection","upToIndex","direction","fromIndex","reference","referenceOriginalPosition","index","child","hasNestedDrop","contains","getElementsByClassName","horizontal","magnets","before","center","after","correction","minDist","magnet","DnDEvent","ReorderEvent","from","to","array","temp","InsertEvent","script","items","required","row","column","noAnimations","grid","forbiddenKeys","feedbackKey","rootTag","TransitionGroup","rootProps","css","reordering","parentElement","closestIndex","itemsBeforeFeedback","itemsAfterFeedback","itemsBeforeReorderingFeedback","itemsAfterReorderingFeedback","reorderedItems","toIndex","reordered","showDragFeedback","showInsertingDragImage","showReorderingDragImage","hasReorderingFeedback","hasEmptySlot","onDragStart","refresh","$nextTick","_this4","computeInsertingGrid","computeFeedbackKey","computeForbiddenKeys","prototype","call","computeReorderingGrid","component","vn","k","feedback","tg","insertBefore","appendChild","removeChild","defaultArr","itemsReorderingBefore","_this5","reorder","concat","itemsReorderingAfter","itemsBefore","itemsAfter","defaultItems","DragImagesManager","bind","cleanUp","sourcePos","clones","then","_this6","img","switch","requestAnimationFrame","handler","forEach","sourceClone","activeClone","opacity","getSourceClone","has","visibility"],"mappings":"2rJAUMA,kCAPQC,+DASG,+BACN,kCACA,oCACE,iCACH,sCACK,sCAdS,CAACC,IAAID,EAAEA,GAAG,IAAIE,IAAIC,GAAG,SAASC,EAAEC,OAAOC,EAAEN,EAAEO,IAAIH,GAAGE,EAAEA,EAAEE,KAAKH,GAAGL,EAAES,IAAIL,EAAE,CAACC,KAAMK,IAAI,SAASN,EAAEC,OAAOC,EAAEN,EAAEO,IAAIH,GAAGE,IAAID,EAAEC,EAAEK,OAAOL,EAAEM,QAAQP,KAAK,EAAE,GAAGL,EAAES,IAAIL,EAAE,MAAOS,KAAK,SAAST,EAAEC,OAAOC,EAAEN,EAAEO,IAAIH,GAAGE,GAAGA,EAAEQ,QAAQC,KAAI,SAASf,GAAGA,EAAEK,OAAOC,EAAEN,EAAEO,IAAI,OAAO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