react-draggable
Advanced tools
Comparing version 2.2.4 to 2.2.5
{ | ||
"name": "react-draggable", | ||
"version": "2.2.4", | ||
"version": "2.2.5", | ||
"homepage": "https://github.com/mzabriskie/react-draggable", | ||
@@ -5,0 +5,0 @@ "authors": [ |
# Changelog | ||
### 2.2.5 (Apr 28, 2017) | ||
- Bugfix: Typescript definition was incorrect. [#244](https://github.com/mzabriskie/react-draggable/issues/244) | ||
### 2.2.4 (Apr 27, 2017) | ||
- Internal: Moved `PropTypes` access to `prop-types` package for React 15.5 (prep for 16) | ||
- Feature: Added TypeScript definitions (thanks @erfangc) | ||
- Bugfix: No longer can erroneously add user-select style multiple times | ||
- Bugfix: OffsetParent with padding problem, fixes [#218](https://github.com/mzabriskie/react-draggable/issues/218) | ||
- Refactor: Misc example updates. | ||
### 2.2.3 (Nov 21, 2016) | ||
@@ -4,0 +16,0 @@ |
@@ -1,62 +0,48 @@ | ||
import * as React from 'react'; | ||
declare module 'react-draggable' { | ||
import * as React from 'react'; | ||
export interface DraggableBounds { | ||
left: number | ||
right: number | ||
top: number | ||
bottom: number | ||
} | ||
export interface DraggableBounds { | ||
left: number | ||
right: number | ||
top: number | ||
bottom: number | ||
} | ||
export interface DraggableProps extends DraggableCoreProps { | ||
axis: 'both' | 'x' | 'y' | 'none', | ||
bounds: DraggableBounds | string | false , | ||
defaultClassName: string, | ||
defaultClassNameDragging: string, | ||
defaultClassNameDragged: string, | ||
defaultPosition: ControlPosition, | ||
position: ControlPosition | ||
} | ||
export interface DraggableProps extends DraggableCoreProps { | ||
axis: 'both' | 'x' | 'y' | 'none', | ||
bounds: DraggableBounds | string | false , | ||
defaultClassName: string, | ||
defaultClassNameDragging: string, | ||
defaultClassNameDragged: string, | ||
defaultPosition: ControlPosition, | ||
position: ControlPosition | ||
} | ||
// eslint-disable-next-line no-use-before-define | ||
export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void | false; | ||
export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void | false; | ||
export interface DraggableData { | ||
node: HTMLElement, | ||
x: number, y: number, | ||
deltaX: number, deltaY: number, | ||
lastX: number, lastY: number | ||
} | ||
export interface DraggableData { | ||
node: HTMLElement, | ||
x: number, y: number, | ||
deltaX: number, deltaY: number, | ||
lastX: number, lastY: number | ||
} | ||
export type Bounds = { | ||
left: number, top: number, right: number, bottom: number | ||
}; | ||
export type ControlPosition = {x: number, y: number}; | ||
export type EventHandler<T> = (e: T) => void | false; | ||
export type ControlPosition = {x: number, y: number}; | ||
export interface DraggableCoreProps { | ||
allowAnyClick: boolean, | ||
cancel: string, | ||
disabled: boolean, | ||
enableUserSelectHack: boolean, | ||
offsetParent: HTMLElement, | ||
grid: [number, number], | ||
handle: string, | ||
onStart: DraggableEventHandler, | ||
onDrag: DraggableEventHandler, | ||
onStop: DraggableEventHandler, | ||
onMouseDown: (e: MouseEvent) => void | ||
} | ||
export interface DraggableCoreProps { | ||
allowAnyClick: boolean, | ||
cancel: string, | ||
disabled: boolean, | ||
enableUserSelectHack: boolean, | ||
offsetParent: HTMLElement, | ||
grid: [number, number], | ||
handle: string, | ||
onStart: DraggableEventHandler, | ||
onDrag: DraggableEventHandler, | ||
onStop: DraggableEventHandler, | ||
onMouseDown: (e: MouseEvent) => void | ||
} | ||
class Draggable extends React.Component<Partial<DraggableProps>, DraggableState> { | ||
export class Draggable extends React.Component<Partial<DraggableProps>, {}> {} | ||
export class DraggableCore extends React.Component<Partial<DraggableCoreProps>, {}> {} | ||
} | ||
class DraggableCore extends React.Component<Partial<DraggableCoreProps>, DraggableState> { | ||
} | ||
declare module 'react-draggable' { | ||
export { | ||
Draggable, | ||
DraggableCore | ||
} | ||
} |
{ | ||
"name": "react-draggable", | ||
"version": "2.2.4", | ||
"version": "2.2.5", | ||
"description": "React draggable component", | ||
@@ -5,0 +5,0 @@ "main": "dist/react-draggable.js", |
@@ -1,3 +0,8 @@ | ||
# React-Draggable [![Build Status](https://travis-ci.org/mzabriskie/react-draggable.svg?branch=master)](https://travis-ci.org/mzabriskie/react-draggable) ![https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true](https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true) [![npm downloads](https://img.shields.io/npm/dt/react-draggable.svg?maxAge=2592000)]() | ||
# React-Draggable | ||
[![TravisCI Build Status](https://travis-ci.org/mzabriskie/react-draggable.svg?branch=master)](https://travis-ci.org/mzabriskie/react-draggable) | ||
[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true)](https://ci.appveyor.com/project/mzabriskie/react-draggable) | ||
[![npm downloads](https://img.shields.io/npm/dt/react-draggable.svg?maxAge=2592000)](http://npmjs.com/package/react-draggable) | ||
[![gzip size](http://img.badgesize.io/https://npmcdn.com/react-draggable/dist/react-draggable.min.js?compression=gzip)]() | ||
A simple component for making elements draggable. | ||
@@ -4,0 +9,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
46275930
307
3
2375