mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
Update react-dnd-touch-backend dnd-core dependency (#38734)
* Update react-dnd-touch-backend dnd-core dependency dnd-core dependency goes from 4.5 to 9.3.1. 9.3.1 is the first version that fixes an incorrect export that is now detected by Typescript 3.7. I'm not sure this is the best fix, but I don't see a way to create a new release of dnd-core@4.x either. * remove react-dnd-touch-backend
This commit is contained in:
@@ -2886,6 +2886,12 @@
|
||||
"sourceRepoURL": "https://github.com/react-dnd/react-dnd",
|
||||
"asOfVersion": "3.0.2"
|
||||
},
|
||||
{
|
||||
"libraryName": "react-dnd-touch-backend",
|
||||
"typingsPackageName": "react-dnd-touch-backend",
|
||||
"sourceRepoURL": "https://github.com/react-dnd/react-dnd",
|
||||
"asOfVersion": "0.5.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "react-dropzone",
|
||||
"typingsPackageName": "react-dropzone",
|
||||
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
// Type definitions for react-dnd-touch-backend 0.4
|
||||
// Project: https://github.com/yahoo/react-dnd-touch-backend#readme
|
||||
// Definitions by: Daniel Król <https://github.com/mleko>,
|
||||
// Janeene Beeforth <https://github.com/dawnmist>
|
||||
// Adam Haglund <https://github.com/beeequeue>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import { BackendFactory } from 'dnd-core';
|
||||
|
||||
export default function createTouchBackend(option?: TouchBackendOptions): BackendFactory;
|
||||
|
||||
export interface TouchBackendOptions {
|
||||
/**
|
||||
* Support mouse events as well as touch events.
|
||||
*/
|
||||
enableMouseEvents?: boolean;
|
||||
/**
|
||||
* Can cancel drag by hitting Escape if enableKeyboardEvents option is set to true
|
||||
*/
|
||||
enableKeyboardEvents?: boolean;
|
||||
/**
|
||||
* Number of milliseconds that the item needs to be touched before the touch is considered the start of a drag.
|
||||
* This is used to allow both flick-to-scroll and drag-n-drop on objects in a list.
|
||||
*/
|
||||
delayTouchStart?: number;
|
||||
/**
|
||||
* Number of milliseconds that the item needs to be clicked on before the click is considered the start of a drag.
|
||||
*/
|
||||
delayMouseStart?: number;
|
||||
/**
|
||||
* Number of milliseconds delay before the touch/click is considered a drag.
|
||||
* @deprecated replaced by delayTouchStart and delayMouseStart, but is still supported at present.
|
||||
*/
|
||||
delay?: number;
|
||||
/**
|
||||
* Specifies the pixel distance moved before a drag is signaled. Default 0.
|
||||
*/
|
||||
touchSlop?: number;
|
||||
/**
|
||||
* If true, prevents the contextmenu event from canceling a drag. Default false.
|
||||
*/
|
||||
ignoreContextMenu?: boolean;
|
||||
/**
|
||||
* Specifies ranges of angles in degrees that drag events should be ignored. This is useful when you want to allow
|
||||
* the user to scroll in a particular direction instead of dragging. Degrees move clockwise, 0/360 pointing to the
|
||||
* left. Default: undefined
|
||||
*/
|
||||
scrollAngleRanges?: ReadonlyArray<{ start?: number, end?: number }>;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"dnd-core": "^4.0.5"
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import { createDragDropManager } from "dnd-core";
|
||||
import TouchBackend from "react-dnd-touch-backend";
|
||||
|
||||
const context = {};
|
||||
|
||||
const dndComponent = createDragDropManager(TouchBackend(), context);
|
||||
const dndComponentMouseEvents = createDragDropManager(TouchBackend({enableMouseEvents: true}), context);
|
||||
const dndComponentDelayTouchStart = createDragDropManager(TouchBackend({delayTouchStart: 200}), context);
|
||||
const dndComponentDelayMouseStart = createDragDropManager(TouchBackend({enableMouseEvents: true, delayMouseStart: 100}), context);
|
||||
const dndComponentKeyboardEvents = createDragDropManager(TouchBackend({enableKeyboardEvents: true}), context);
|
||||
const dndComponentOldDelay = createDragDropManager(TouchBackend({delay: 300}), context);
|
||||
const dndComponentAllCurrentEvents = createDragDropManager(TouchBackend(
|
||||
{enableKeyboardEvents: true, enableMouseEvents: true, delayMouseStart: 100, delayTouchStart: 200}), context);
|
||||
const dndComponentWithScrollAngleRanges = createDragDropManager(TouchBackend(
|
||||
{ scrollAngleRanges: [{ start: 0, end: 0 }, { start: 0 }, { end: 0 }] }), context);
|
||||
const dndComponentWithTouchSlop = createDragDropManager(TouchBackend({ touchSlop: 0 }), context);
|
||||
const dndComponentWithIgnoreContextMenu = createDragDropManager(TouchBackend({ ignoreContextMenu: true }), context);
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-dnd-touch-backend-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user