sortable-dnd
Advanced tools
Comparing version 0.5.0 to 0.5.1
{ | ||
"name": "sortable-dnd", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "JS library for drag-and-drop lists, supports sortable and draggable", | ||
"main": "dist/index.js", | ||
"main": "dist/sortable-dnd.min.js", | ||
"types": "types/index.d.ts", | ||
@@ -7,0 +7,0 @@ "files": [ |
@@ -1,2 +0,16 @@ | ||
type Group = { | ||
type SortableState = { | ||
sortable: Sortable; | ||
group: HTMLElement; | ||
node: HTMLElement; | ||
offset: DOMOffset; | ||
rect: DOMRect; | ||
}; | ||
type MultiNode = { | ||
node: HTMLElement; | ||
offset: DOMOffset; | ||
rect: DOMRect; | ||
}; | ||
export type Group = { | ||
name: String; | ||
@@ -7,3 +21,3 @@ put: Boolean; | ||
type DOMOffset = { | ||
export type DOMOffset = { | ||
height: Number; | ||
@@ -15,3 +29,3 @@ width: Number; | ||
type DOMRect = DOMOffset & { | ||
export type DOMRect = DOMOffset & { | ||
bottom: Number; | ||
@@ -21,23 +35,9 @@ right: Number; | ||
type SortableState = { | ||
sortable: Sortable; | ||
group: HTMLElement; | ||
node: HTMLElement; | ||
offset: DOMOffset; | ||
rect: DOMRect; | ||
}; | ||
export type EventType = Event & (TouchEvent | MouseEvent); | ||
type MultiNode = { | ||
node: HTMLElement; | ||
offset: DOMOffset; | ||
rect: DOMRect; | ||
}; | ||
export type FromTo = SortableState & { nodes?: MultiNode[] }; | ||
type EventType = Event & (PointerEvent | TouchEvent | MouseEvent); | ||
export type Select = SortableState & { event: EventType }; | ||
type FromTo = SortableState & { nodes?: MultiNode[] }; | ||
type Select = SortableState & { event: EventType }; | ||
type Options = { | ||
export type Options = { | ||
/** | ||
@@ -88,7 +88,3 @@ * Specifies which items inside the element should be draggable. | ||
*/ | ||
onDrag?: (params: { | ||
from: FromTo; | ||
to: FromTo; | ||
event: EventType; | ||
}) => void; | ||
onDrag?: (params: { from: FromTo; to: FromTo; event: EventType }) => void; | ||
@@ -98,7 +94,3 @@ /** | ||
*/ | ||
onMove?: (params: { | ||
from: FromTo; | ||
to: FromTo; | ||
event: EventType; | ||
}) => void; | ||
onMove?: (params: { from: FromTo; to: FromTo; event: EventType }) => void; | ||
@@ -118,7 +110,3 @@ /** | ||
*/ | ||
onAdd?: (params: { | ||
from: FromTo; | ||
to: FromTo; | ||
event: EventType; | ||
}) => void; | ||
onAdd?: (params: { from: FromTo; to: FromTo; event: EventType }) => void; | ||
@@ -128,7 +116,3 @@ /** | ||
*/ | ||
onRemove?: (params: { | ||
from: FromTo; | ||
to: FromTo; | ||
event: EventType; | ||
}) => void; | ||
onRemove?: (params: { from: FromTo; to: FromTo; event: EventType }) => void; | ||
@@ -138,7 +122,3 @@ /** | ||
*/ | ||
onChange?: (params: { | ||
from: FromTo; | ||
to: FromTo; | ||
event: EventType; | ||
}) => void; | ||
onChange?: (params: { from: FromTo; to: FromTo; event: EventType }) => void; | ||
@@ -233,4 +213,24 @@ /** | ||
destroy(): void; | ||
}; | ||
/** | ||
* Get/Set sortable options. | ||
* @param key option name | ||
* @param value option value | ||
*/ | ||
option(key: string, value: any): any; | ||
/** | ||
* Get the Sortable instance of an element | ||
* @param el | ||
*/ | ||
get(el: HTMLElement): Sortable | undefined; | ||
/** | ||
* Create sortable instance | ||
* @param el | ||
* @param options | ||
*/ | ||
create(el: HTMLElement, options: Options): void; | ||
} | ||
export = Sortable; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77208
1549
1
1