@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
35 lines (34 loc) • 1.59 kB
TypeScript
import { EventEmitter, OnDestroy } from '@angular/core';
import { UxDragEvent } from './drag.service';
import * as i0 from "@angular/core";
export declare class DropDirective<T = unknown> implements OnDestroy {
private readonly _dragService;
/** Define a specific group of dragged items to listen to */
group: string | string[];
/** Define whether or not dropping is enabled */
dropDisabled: boolean;
/** Emit the model of the item dropped */
onDrop: EventEmitter<T>;
/** Determine whether or not the mouse is within the drop region */
isMouseOver: boolean;
/** Determine whether or not we are currently dragging an item */
isDragging: boolean;
/** Store the group of the dragged item */
private _group;
/** Ensure we destroy all subscriptions */
private readonly _onDestroy;
constructor();
ngOnDestroy(): void;
/** Update the mouse over state */
onMouseOver(): void;
/** Update the mouse over state */
onMouseLeave(): void;
/** Update the dragging state */
onDragStart(): void;
/** Update the dragging state */
onDragEnd(event: UxDragEvent<T>): void;
/** Determine whether or not the event is part of the specified groups */
private isDropAllowed;
static ɵfac: i0.ɵɵFactoryDeclaration<DropDirective<any>, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<DropDirective<any>, "[uxDrop]", never, { "group": { "alias": "group"; "required": false; }; "dropDisabled": { "alias": "dropDisabled"; "required": false; }; }, { "onDrop": "onDrop"; }, never, never, false, never>;
}