@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
27 lines (26 loc) • 956 B
TypeScript
import { OnDestroy } from '@angular/core';
import { Subject } from 'rxjs';
import * as i0 from "@angular/core";
export declare class DragService<T = unknown> implements OnDestroy {
/** Emit when dragging begins */
onDragStart: Subject<UxDragEvent<T>>;
/** Emit when dragging moves */
onDrag: Subject<UxDragEvent<T>>;
/** Emit when dragging ends */
onDragEnd: Subject<UxDragEvent<T>>;
/** Emit when the user is dragging over the drop area */
onDropEnter: Subject<void>;
/** Emit when the user is dragging out of the drop area */
onDropLeave: Subject<void>;
/** Emit when a drop occurs */
onDrop: Subject<T>;
/** Destroy all observables */
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DragService<any>, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<DragService<any>>;
}
export type UxDragEvent<T = unknown> = {
group?: string;
event?: MouseEvent;
data?: T;
};