@duoduo-oba/ng-devui
Version:
DevUI components based on Angular
1,107 lines • 90.8 kB
JavaScript
/**
* @fileoverview added by tsickle
* Generated from: touch-support/dragdrop-touch.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* 2020.03.23-Modified from https://github.com/Bernardo-Castilho/dragdroptouch, license: MIT,reason:Converting .js file to .ts file
* Huawei Technologies Co.,Ltd.<devcloudmobile\@huawei.com>
*/
var DragDropTouch = /** @class */ (function () {
function DragDropTouch() {
var _this = this;
this.lastClick = 0;
// ** event handlers
this.touchstart = (/**
* @param {?} e
* @return {?}
*/
function (e) {
if (_this.shouldHandle(e)) {
// raise double-click and prevent zooming
if (Date.now() - _this.lastClick < DragDropTouch.DBLCLICK) {
if (_this.dispatchEvent(e, 'dblclick', e.target)) {
e.preventDefault();
_this.reset();
return;
}
}
// clear all variables
_this.reset();
// get nearest draggable element
/** @type {?} */
var src = _this.closestDraggable(e.target);
if (src) {
_this.dragSource = src;
_this.ptDown = _this.getPoint(e);
_this.lastTouch = e;
if (DragDropTouch.IS_PRESS_HOLD_MODE) {
_this.pressHoldInterval = setTimeout((/**
* @return {?}
*/
function () {
_this.bindTouchmoveTouchend(e);
_this.isDragEnabled = true;
_this.touchmove(e);
}), DragDropTouch.PRESS_HOLD_AWAIT);
}
else {
e.preventDefault();
_this.bindTouchmoveTouchend(e);
}
}
}
});
this.touchmoveOnDocument = (/**
* @param {?} e
* @return {?}
*/
function (e) {
if (_this.shouldCancelPressHoldMove(e)) {
_this.reset();
return;
}
});
this.touchmove = (/**
* @param {?} e
* @return {?}
*/
function (e) {
if (_this.shouldCancelPressHoldMove(e)) {
_this.reset();
return;
}
if (_this.shouldHandleMove(e) || _this.shouldHandlePressHoldMove(e)) {
/** @type {?} */
var target = _this.getTarget(e);
// start dragging
if (_this.dragSource && !_this.img && _this.shouldStartDragging(e)) {
_this.dispatchEvent(e, 'dragstart', _this.dragSource);
_this.createImage(e);
}
// continue dragging
if (_this.img) {
_this.clearDragoverInterval();
_this.lastTouch = e;
e.preventDefault(); // prevent scrolling
if (target !== _this.lastTarget) {
// according to drag drop implementation of the browser, dragenterB is supposed to fired before dragleaveA
_this.dispatchEvent(e, 'dragenter', target);
_this.dispatchEvent(_this.lastTouch, 'dragleave', _this.lastTarget);
_this.lastTarget = target;
}
_this.moveImage(e);
_this.isDropZone = _this.dispatchEvent(e, 'dragover', target);
// should continue dispatch dragover event when touch position stay still
_this.setDragoverInterval(e);
}
}
});
this.touchendOnDocument = (/**
* @param {?} e
* @return {?}
*/
function (e) {
if (_this.shouldHandle(e)) {
if (!_this.img) {
_this.dragSource = null;
_this.lastClick = Date.now();
}
// finish dragging
_this.destroyImage();
if (_this.dragSource) {
_this.reset();
}
}
});
this.touchend = (/**
* @param {?} e
* @return {?}
*/
function (e) {
if (_this.shouldHandle(e)) {
// user clicked the element but didn't drag, so clear the source and simulate a click
if (!_this.img) {
_this.dragSource = null;
// browser will dispatch click event after trigger touchend, since touchstart didn't preventDefault
// this._dispatchEvent(this._lastTouch, 'click', e.target);
_this.lastClick = Date.now();
}
// finish dragging
_this.destroyImage();
if (_this.dragSource) {
if (e.type.indexOf('cancel') < 0 && _this.isDropZone) {
_this.dispatchEvent(_this.lastTouch, 'drop', _this.lastTarget);
}
_this.dispatchEvent(_this.lastTouch, 'dragend', _this.dragSource);
_this.reset();
}
}
});
// enforce singleton pattern
if (DragDropTouch.instance) {
throw new Error('DragDropTouch instance already created.');
}
// detect passive event support
// https://github.com/Modernizr/Modernizr/issues/1894
/** @type {?} */
var supportsPassive = false;
document.addEventListener('test', (/**
* @return {?}
*/
function () { }), {
/**
* @return {?}
*/
get passive() {
supportsPassive = true;
return true;
}
});
// listen to touch events
if (DragDropTouch.isTouchDevice()) {
// 能响应触摸事件
/** @type {?} */
var d = document;
/** @type {?} */
var ts = this.touchstart;
/** @type {?} */
var tmod = this.touchmoveOnDocument;
/** @type {?} */
var teod = this.touchendOnDocument;
/** @type {?} */
var opt = supportsPassive ? { passive: false, capture: false } : false;
/** @type {?} */
var optPassive = supportsPassive ? { passive: true } : false;
d.addEventListener('touchstart', ts, opt);
d.addEventListener('touchmove', tmod, optPassive);
d.addEventListener('touchend', teod);
d.addEventListener('touchcancel', teod);
this.touchmoveListener = this.touchmove;
this.touchendListener = this.touchend;
this.listenerOpt = opt;
}
}
/**
* Gets a reference to the @see:DragDropTouch singleton.
*/
/**
* Gets a reference to the \@see:DragDropTouch singleton.
* @return {?}
*/
DragDropTouch.getInstance = /**
* Gets a reference to the \@see:DragDropTouch singleton.
* @return {?}
*/
function () {
if (!DragDropTouch.instance) {
DragDropTouch.instance = new DragDropTouch();
}
return DragDropTouch.instance;
};
/**
* @return {?}
*/
DragDropTouch.isTouchDevice = /**
* @return {?}
*/
function () {
/** @type {?} */
var d = document;
/** @type {?} */
var w = window;
/** @type {?} */
var bool;
if ('ontouchstart' in d // normal mobile device
|| 'ontouchstart' in w
|| navigator.maxTouchPoints > 0
|| navigator.msMaxTouchPoints > 0
|| window['DocumentTouch'] && document instanceof window['DocumentTouch']) {
bool = true;
}
else {
/** @type {?} */
var fakeBody = document.createElement('fakebody');
fakeBody.innerHTML += "\n <style>\n @media (touch-enabled),(-webkit-touch-enabled),(-moz-touch-enabled),(-o-touch-enabled){\n #touch_test {\n top: 42px;\n position: absolute;\n }\n }\n </style>";
document.documentElement.appendChild(fakeBody);
/** @type {?} */
var touchTestNode = document.createElement('div');
touchTestNode.id = 'touch_test';
fakeBody.appendChild(touchTestNode);
bool = touchTestNode.offsetTop === 42;
fakeBody.parentElement.removeChild(fakeBody);
}
return bool;
};
// ** event listener binding
// ** event listener binding
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.bindTouchmoveTouchend =
// ** event listener binding
/**
* @param {?} e
* @return {?}
*/
function (e) {
this.touchTarget = e.target;
e.target.addEventListener('touchmove', this.touchmoveListener, this.listenerOpt);
e.target.addEventListener('touchend', this.touchendListener);
e.target.addEventListener('touchcancel', this.touchendListener);
};
/**
* @return {?}
*/
DragDropTouch.prototype.removeTouchmoveTouchend = /**
* @return {?}
*/
function () {
if (this.touchTarget) {
this.touchTarget.removeEventListener('touchmove', this.touchmoveListener);
this.touchTarget.removeEventListener('touchend', this.touchendListener);
this.touchTarget.removeEventListener('touchcancel', this.touchendListener);
this.touchTarget = undefined;
}
};
// ** utilities
// ignore events that have been handled or that involve more than one touch
// ** utilities
// ignore events that have been handled or that involve more than one touch
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.shouldHandle =
// ** utilities
// ignore events that have been handled or that involve more than one touch
/**
* @param {?} e
* @return {?}
*/
function (e) {
return e &&
!e.defaultPrevented &&
e.touches && e.touches.length < 2;
};
// use regular condition outside of press & hold mode
// use regular condition outside of press & hold mode
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.shouldHandleMove =
// use regular condition outside of press & hold mode
/**
* @param {?} e
* @return {?}
*/
function (e) {
return !DragDropTouch.IS_PRESS_HOLD_MODE && this.shouldHandle(e);
};
// allow to handle moves that involve many touches for press & hold
// allow to handle moves that involve many touches for press & hold
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.shouldHandlePressHoldMove =
// allow to handle moves that involve many touches for press & hold
/**
* @param {?} e
* @return {?}
*/
function (e) {
return DragDropTouch.IS_PRESS_HOLD_MODE &&
this.isDragEnabled && e && e.touches && e.touches.length;
};
// reset data if user drags without pressing & holding
// reset data if user drags without pressing & holding
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.shouldCancelPressHoldMove =
// reset data if user drags without pressing & holding
/**
* @param {?} e
* @return {?}
*/
function (e) {
return DragDropTouch.IS_PRESS_HOLD_MODE && !this.isDragEnabled &&
this.getDelta(e) > DragDropTouch.PRESS_HOLD_MARGIN;
};
// start dragging when mouseover element matches drag handler selector and specified delta is detected
// start dragging when mouseover element matches drag handler selector and specified delta is detected
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.shouldStartDragging =
// start dragging when mouseover element matches drag handler selector and specified delta is detected
/**
* @param {?} e
* @return {?}
*/
function (e) {
/** @type {?} */
var dragHandleSelector = this.getDragHandle();
// start dragging when mouseover element matches drag handler selector
if (dragHandleSelector && !this.matchSelector(e.target, dragHandleSelector)) {
return false;
}
// start dragging when specified delta is detected
/** @type {?} */
var delta = this.getDelta(e);
return delta > DragDropTouch.THRESHOLD ||
(DragDropTouch.IS_PRESS_HOLD_MODE && delta >= DragDropTouch.PRESS_HOLD_THRESHOLD);
};
// find drag handler selector for dragstart only with partial element
// find drag handler selector for dragstart only with partial element
/**
* @return {?}
*/
DragDropTouch.prototype.getDragHandle =
// find drag handler selector for dragstart only with partial element
/**
* @return {?}
*/
function () {
if (this.dragSource) {
return this.dragSource.getAttribute(DragDropTouch.DRAG_HANDLE_ATTR) || '';
}
return '';
};
// test if element matches selector
// test if element matches selector
/**
* @param {?} element
* @param {?} selector
* @return {?}
*/
DragDropTouch.prototype.matchSelector =
// test if element matches selector
/**
* @param {?} element
* @param {?} selector
* @return {?}
*/
function (element, selector) {
if (selector) {
/** @type {?} */
var proto = Element.prototype;
/** @type {?} */
var func = proto['matches'] ||
proto['matchesSelector'] ||
proto['mozMatchesSelector'] ||
proto['msMatchesSelector'] ||
proto['oMatchesSelector'] ||
proto['webkitMatchesSelector'] ||
(/**
* @param {?} s
* @return {?}
*/
function (s) {
/** @type {?} */
var matches = (this.document || this.ownerDocument).querySelectorAll(s);
/** @type {?} */
var i = matches.length;
while (--i >= 0 && matches.item(i) !== this) {
// do nothing
}
return i > -1;
});
return func.call(element, selector);
}
return true;
};
// clear all members
// clear all members
/**
* @return {?}
*/
DragDropTouch.prototype.reset =
// clear all members
/**
* @return {?}
*/
function () {
this.removeTouchmoveTouchend();
this.destroyImage();
this.dragSource = null;
this.lastTouch = null;
this.lastTarget = null;
this.ptDown = null;
this.isDragEnabled = false;
this.isDropZone = false;
this.dataTransfer = new DragDropTouch.DataTransfer();
clearInterval(this.pressHoldInterval);
this.clearDragoverInterval();
};
// get point for a touch event
// get point for a touch event
/**
* @param {?} e
* @param {?=} page
* @return {?}
*/
DragDropTouch.prototype.getPoint =
// get point for a touch event
/**
* @param {?} e
* @param {?=} page
* @return {?}
*/
function (e, page) {
if (e && e.touches) {
e = e.touches[0];
}
return { x: page ? e.pageX : e.clientX, y: page ? e.pageY : e.clientY };
};
// get distance between the current touch event and the first one
// get distance between the current touch event and the first one
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.getDelta =
// get distance between the current touch event and the first one
/**
* @param {?} e
* @return {?}
*/
function (e) {
if (DragDropTouch.IS_PRESS_HOLD_MODE && !this.ptDown) {
return 0;
}
/** @type {?} */
var p = this.getPoint(e);
return Math.abs(p.x - this.ptDown.x) + Math.abs(p.y - this.ptDown.y);
};
// get the element at a given touch event
// get the element at a given touch event
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.getTarget =
// get the element at a given touch event
/**
* @param {?} e
* @return {?}
*/
function (e) {
/** @type {?} */
var pt = this.getPoint(e);
/** @type {?} */
var el = document.elementFromPoint(pt.x, pt.y);
while (el && getComputedStyle(el).pointerEvents === 'none') {
el = el.parentElement;
}
return (/** @type {?} */ (el));
};
// create drag image from source element
// create drag image from source element
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.createImage =
// create drag image from source element
/**
* @param {?} e
* @return {?}
*/
function (e) {
// just in case...
if (this.img) {
this.destroyImage();
}
// create drag image from custom element or drag source
/** @type {?} */
var src = this.imgCustom || this.dragSource;
this.img = src.cloneNode(true);
this.copyStyle(src, this.img);
this.img.style.top = this.img.style.left = '-9999px';
// if creating from drag source, apply offset and opacity
if (!this.imgCustom) {
/** @type {?} */
var rc = src.getBoundingClientRect();
/** @type {?} */
var pt = this.getPoint(e);
this.imgOffset = { x: pt.x - rc.left, y: pt.y - rc.top };
this.img.style.opacity = DragDropTouch.OPACITY.toString();
}
// add image to document
this.moveImage(e);
document.body.appendChild(this.img);
};
// dispose of drag image element
// dispose of drag image element
/**
* @return {?}
*/
DragDropTouch.prototype.destroyImage =
// dispose of drag image element
/**
* @return {?}
*/
function () {
if (this.img && this.img.parentElement) {
this.img.parentElement.removeChild(this.img);
}
this.img = null;
this.imgCustom = null;
};
// move the drag image element
// move the drag image element
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.moveImage =
// move the drag image element
/**
* @param {?} e
* @return {?}
*/
function (e) {
var _this = this;
requestAnimationFrame((/**
* @return {?}
*/
function () {
if (_this.img) {
/** @type {?} */
var pt = _this.getPoint(e, true);
/** @type {?} */
var s = _this.img.style;
s.position = 'absolute';
s.pointerEvents = 'none';
s.zIndex = '999999';
s.left = Math.round(pt.x - _this.imgOffset.x) + 'px';
s.top = Math.round(pt.y - _this.imgOffset.y) + 'px';
}
}));
};
// copy properties from an object to another
// copy properties from an object to another
/**
* @param {?} dst
* @param {?} src
* @param {?} props
* @return {?}
*/
DragDropTouch.prototype.copyProps =
// copy properties from an object to another
/**
* @param {?} dst
* @param {?} src
* @param {?} props
* @return {?}
*/
function (dst, src, props) {
for (var i = 0; i < props.length; i++) {
/** @type {?} */
var p = props[i];
dst[p] = src[p];
}
};
// copy styles/attributes from drag source to drag image element
// copy styles/attributes from drag source to drag image element
/**
* @param {?} src
* @param {?} dst
* @return {?}
*/
DragDropTouch.prototype.copyStyle =
// copy styles/attributes from drag source to drag image element
/**
* @param {?} src
* @param {?} dst
* @return {?}
*/
function (src, dst) {
// remove potentially troublesome attributes
DragDropTouch.rmvAttrs.forEach((/**
* @param {?} att
* @return {?}
*/
function (att) {
dst.removeAttribute(att);
}));
// copy canvas content
if (src instanceof HTMLCanvasElement) {
/** @type {?} */
var canSrc = src;
/** @type {?} */
var canDst = dst;
canDst.width = canSrc.width;
canDst.height = canSrc.height;
canDst.getContext('2d').drawImage(canSrc, 0, 0);
}
// copy canvas content for nested canvas element
/** @type {?} */
var srcCanvases = src.querySelectorAll('canvas');
if (srcCanvases.length > 0) {
/** @type {?} */
var dstCanvases = dst.querySelectorAll('canvas');
for (var i = 0; i < dstCanvases.length; i++) {
/** @type {?} */
var cSrc = srcCanvases[i];
/** @type {?} */
var cDst = dstCanvases[i];
cDst.getContext('2d').drawImage(cSrc, 0, 0);
}
}
// copy style (without transitions)
/** @type {?} */
var cs = getComputedStyle(src);
for (var i = 0; i < cs.length; i++) {
/** @type {?} */
var key = cs[i];
if (key.indexOf('transition') < 0) {
dst.style[key] = cs[key];
}
}
dst.style.pointerEvents = 'none';
// and repeat for all children
for (var i = 0; i < src.children.length; i++) {
this.copyStyle(src.children[i], dst.children[i]);
}
};
// synthesize and dispatch an event
// returns true if the event has been handled (e.preventDefault == true)
// synthesize and dispatch an event
// returns true if the event has been handled (e.preventDefault == true)
/**
* @param {?} e
* @param {?} type
* @param {?} target
* @return {?}
*/
DragDropTouch.prototype.dispatchEvent =
// synthesize and dispatch an event
// returns true if the event has been handled (e.preventDefault == true)
/**
* @param {?} e
* @param {?} type
* @param {?} target
* @return {?}
*/
function (e, type, target) {
if (e && target) {
/** @type {?} */
var evt = document.createEvent('Event');
/** @type {?} */
var t = e.touches ? e.touches[0] : e;
evt.initEvent(type, true, true);
/** @type {?} */
var obj = {
button: 0,
which: 0,
buttons: 1,
dataTransfer: this.dataTransfer
};
this.copyProps(evt, e, DragDropTouch.kbdProps);
this.copyProps(evt, t, DragDropTouch.ptProps);
this.copyProps(evt, { fromTouch: true }, ['fromTouch']); // mark as from touch event
this.copyProps(evt, obj, Object.keys(obj));
target.dispatchEvent(evt);
return evt.defaultPrevented;
}
return false;
};
// gets an element's closest draggable ancestor
// gets an element's closest draggable ancestor
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.closestDraggable =
// gets an element's closest draggable ancestor
/**
* @param {?} e
* @return {?}
*/
function (e) {
for (; e; e = e.parentElement) {
if (e.hasAttribute('draggable') && e.draggable) {
return e;
}
}
return null;
};
// repeat dispatch dragover event when touch point stay still
// repeat dispatch dragover event when touch point stay still
/**
* @param {?} e
* @return {?}
*/
DragDropTouch.prototype.setDragoverInterval =
// repeat dispatch dragover event when touch point stay still
/**
* @param {?} e
* @return {?}
*/
function (e) {
var _this = this;
this.dragoverTimer = setInterval((/**
* @return {?}
*/
function () {
/** @type {?} */
var target = _this.getTarget(e);
if (target !== _this.lastTarget) {
_this.dispatchEvent(e, 'dragenter', target);
_this.dispatchEvent(e, 'dragleave', _this.lastTarget);
_this.lastTarget = target;
}
_this.isDropZone = _this.dispatchEvent(e, 'dragover', target);
}), DragDropTouch.DRAG_OVER_TIME);
};
/**
* @return {?}
*/
DragDropTouch.prototype.clearDragoverInterval = /**
* @return {?}
*/
function () {
if (this.dragoverTimer) {
clearInterval(this.dragoverTimer);
this.dragoverTimer = undefined;
}
};
DragDropTouch.THRESHOLD = 5; // pixels to move before drag starts
// pixels to move before drag starts
DragDropTouch.OPACITY = 0.5; // drag image opacity
// drag image opacity
DragDropTouch.DBLCLICK = 500; // max ms between clicks in a double click
// max ms between clicks in a double click
DragDropTouch.DRAG_OVER_TIME = 300; // interval ms when drag over
// interval ms when drag over
DragDropTouch.CTX_MENU = 900; // ms to hold before raising 'contextmenu' event
// ms to hold before raising 'contextmenu' event
DragDropTouch.IS_PRESS_HOLD_MODE = true; // decides of press & hold mode presence
// decides of press & hold mode presence
DragDropTouch.PRESS_HOLD_AWAIT = 400; // ms to wait before press & hold is detected
// ms to wait before press & hold is detected
DragDropTouch.PRESS_HOLD_MARGIN = 25; // pixels that finger might shiver while pressing
// pixels that finger might shiver while pressing
DragDropTouch.PRESS_HOLD_THRESHOLD = 0; // pixels to move before drag starts
// pixels to move before drag starts
DragDropTouch.DRAG_HANDLE_ATTR = 'data-drag-handle-selector';
DragDropTouch.rmvAttrs = 'id,class,style,draggable'.split(',');
DragDropTouch.kbdProps = 'altKey,ctrlKey,metaKey,shiftKey'.split(',');
DragDropTouch.ptProps = 'pageX,pageY,clientX,clientY,screenX,screenY'.split(',');
DragDropTouch.instance = null;
return DragDropTouch;
}());
export { DragDropTouch };
if (false) {
/** @type {?} */
DragDropTouch.THRESHOLD;
/** @type {?} */
DragDropTouch.OPACITY;
/** @type {?} */
DragDropTouch.DBLCLICK;
/** @type {?} */
DragDropTouch.DRAG_OVER_TIME;
/** @type {?} */
DragDropTouch.CTX_MENU;
/** @type {?} */
DragDropTouch.IS_PRESS_HOLD_MODE;
/** @type {?} */
DragDropTouch.PRESS_HOLD_AWAIT;
/** @type {?} */
DragDropTouch.PRESS_HOLD_MARGIN;
/** @type {?} */
DragDropTouch.PRESS_HOLD_THRESHOLD;
/** @type {?} */
DragDropTouch.DRAG_HANDLE_ATTR;
/** @type {?} */
DragDropTouch.rmvAttrs;
/** @type {?} */
DragDropTouch.kbdProps;
/** @type {?} */
DragDropTouch.ptProps;
/**
* @type {?}
* @private
*/
DragDropTouch.instance;
/** @type {?} */
DragDropTouch.prototype.dataTransfer;
/** @type {?} */
DragDropTouch.prototype.lastClick;
/** @type {?} */
DragDropTouch.prototype.lastTouch;
/** @type {?} */
DragDropTouch.prototype.lastTarget;
/** @type {?} */
DragDropTouch.prototype.dragSource;
/** @type {?} */
DragDropTouch.prototype.ptDown;
/** @type {?} */
DragDropTouch.prototype.isDragEnabled;
/** @type {?} */
DragDropTouch.prototype.isDropZone;
/** @type {?} */
DragDropTouch.prototype.pressHoldInterval;
/** @type {?} */
DragDropTouch.prototype.img;
/** @type {?} */
DragDropTouch.prototype.imgCustom;
/** @type {?} */
DragDropTouch.prototype.imgOffset;
/** @type {?} */
DragDropTouch.prototype.dragoverTimer;
/** @type {?} */
DragDropTouch.prototype.touchTarget;
/** @type {?} */
DragDropTouch.prototype.touchmoveListener;
/** @type {?} */
DragDropTouch.prototype.touchendListener;
/** @type {?} */
DragDropTouch.prototype.listenerOpt;
/** @type {?} */
DragDropTouch.prototype.touchstart;
/** @type {?} */
DragDropTouch.prototype.touchmoveOnDocument;
/** @type {?} */
DragDropTouch.prototype.touchmove;
/** @type {?} */
DragDropTouch.prototype.touchendOnDocument;
/** @type {?} */
DragDropTouch.prototype.touchend;
}
(function (DragDropTouch) {
/**
* Object used to hold the data that is being dragged during drag and drop operations.
*
* It may hold one or more data items of different types. For more information about
* drag and drop operations and data transfer objects, see
* <a href="https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer">HTML Drag and Drop API</a>.
*
* This object is created automatically by the \@see:DragDropTouch singleton and is
* accessible through the \@see:dataTransfer property of all drag events.
*/
var /**
* Object used to hold the data that is being dragged during drag and drop operations.
*
* It may hold one or more data items of different types. For more information about
* drag and drop operations and data transfer objects, see
* <a href="https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer">HTML Drag and Drop API</a>.
*
* This object is created automatically by the \@see:DragDropTouch singleton and is
* accessible through the \@see:dataTransfer property of all drag events.
*/
DataTransfer = /** @class */ (function () {
function DataTransfer() {
this._dropEffect = 'move';
this._effectAllowed = 'all';
this._data = {};
}
Object.defineProperty(DataTransfer.prototype, "dropEffect", {
get: /**
* @return {?}
*/
function () {
return this._dropEffect;
},
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
this._dropEffect = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DataTransfer.prototype, "effectAllowed", {
get: /**
* @return {?}
*/
function () {
return this._effectAllowed;
},
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
this._effectAllowed = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DataTransfer.prototype, "types", {
get: /**
* @return {?}
*/
function () {
return Object.keys(this._data);
},
enumerable: true,
configurable: true
});
/**
* Removes the data associated with a given type.
*
* The type argument is optional. If the type is empty or not specified, the data
* associated with all types is removed. If data for the specified type does not exist,
* or the data transfer contains no data, this method will have no effect.
*
* @param type Type of data to remove.
*/
/**
* Removes the data associated with a given type.
*
* The type argument is optional. If the type is empty or not specified, the data
* associated with all types is removed. If data for the specified type does not exist,
* or the data transfer contains no data, this method will have no effect.
*
* @param {?} type Type of data to remove.
* @return {?}
*/
DataTransfer.prototype.clearData = /**
* Removes the data associated with a given type.
*
* The type argument is optional. If the type is empty or not specified, the data
* associated with all types is removed. If data for the specified type does not exist,
* or the data transfer contains no data, this method will have no effect.
*
* @param {?} type Type of data to remove.
* @return {?}
*/
function (type) {
if (type !== null) {
delete this._data[type];
}
else {
this._data = null;
}
};
/**
* Retrieves the data for a given type, or an empty string if data for that type does
* not exist or the data transfer contains no data.
*
* @param type Type of data to retrieve.
*/
/**
* Retrieves the data for a given type, or an empty string if data for that type does
* not exist or the data transfer contains no data.
*
* @param {?} type Type of data to retrieve.
* @return {?}
*/
DataTransfer.prototype.getData = /**
* Retrieves the data for a given type, or an empty string if data for that type does
* not exist or the data transfer contains no data.
*
* @param {?} type Type of data to retrieve.
* @return {?}
*/
function (type) {
return this._data[type] || '';
};
/**
* Set the data for a given type.
*
* For a list of recommended drag types, please see
* https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Recommended_Drag_Types.
*
* @param type Type of data to add.
* @param value Data to add.
*/
/**
* Set the data for a given type.
*
* For a list of recommended drag types, please see
* https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Recommended_Drag_Types.
*
* @param {?} type Type of data to add.
* @param {?} value Data to add.
* @return {?}
*/
DataTransfer.prototype.setData = /**
* Set the data for a given type.
*
* For a list of recommended drag types, please see
* https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Recommended_Drag_Types.
*
* @param {?} type Type of data to add.
* @param {?} value Data to add.
* @return {?}
*/
function (type, value) {
this._data[type] = value;
};
/**
* Set the image to be used for dragging if a custom one is desired.
*
* @param img An image element to use as the drag feedback image.
* @param offsetX The horizontal offset within the image.
* @param offsetY The vertical offset within the image.
*/
/**
* Set the image to be used for dragging if a custom one is desired.
*
* @param {?} img An image element to use as the drag feedback image.
* @param {?} offsetX The horizontal offset within the image.
* @param {?} offsetY The vertical offset within the image.
* @return {?}
*/
DataTransfer.prototype.setDragImage = /**
* Set the image to be used for dragging if a custom one is desired.
*
* @param {?} img An image element to use as the drag feedback image.
* @param {?} offsetX The horizontal offset within the image.
* @param {?} offsetY The vertical offset within the image.
* @return {?}
*/
function (img, offsetX, offsetY) {
/** @type {?} */
var ddt = DragDropTouch.getInstance();
ddt.imgCustom = img;
ddt.imgOffset = { x: offsetX, y: offsetY };
};
return DataTransfer;
}());
DragDropTouch.DataTransfer = DataTransfer;
if (false) {
/** @type {?} */
DataTransfer.prototype.files;
/** @type {?} */
DataTransfer.prototype.items;
/**
* @type {?}
* @private
*/
DataTransfer.prototype._data;
/**
* Gets or sets the type of drag-and-drop operation currently selected.
* The value must be 'none', 'copy', 'link', or 'move'.
* @type {?}
* @private
*/
DataTransfer.prototype._dropEffect;
/**
* Gets or sets the types of operations that are possible.
* Must be one of 'none', 'copy', 'copyLink', 'copyMove', 'link',
* 'linkMove', 'move', 'all' or 'uninitialized'.
* @type {?}
* @private
*/
DataTransfer.prototype._effectAllowed;
/**
* Gets an array of strings giving the formats that were set in the \@see:dragstart event.
* @type {?}
* @private
*/
DataTransfer.prototype._types;
}
})(DragDropTouch || (DragDropTouch = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhZ2Ryb3AtdG91Y2guanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZy1kZXZ1aS9kcmFnZHJvcC8iLCJzb3VyY2VzIjpbInRvdWNoLXN1cHBvcnQvZHJhZ2Ryb3AtdG91Y2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBSUE7SUF3Q0U7UUFBQSxpQkFnQ0M7UUF0REQsY0FBUyxHQUFHLENBQUMsQ0FBQzs7UUE4R2QsZUFBVTs7OztRQUFHLFVBQUMsQ0FBYTtZQUN6QixJQUFJLEtBQUksQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLEVBQUU7Z0JBQ3hCLHlDQUF5QztnQkFDekMsSUFBSSxJQUFJLENBQUMsR0FBRyxFQUFFLEdBQUcsS0FBSSxDQUFDLFNBQVMsR0FBRyxhQUFhLENBQUMsUUFBUSxFQUFFO29CQUN4RCxJQUFJLE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