UNPKG

@ng-dnd/sortable

Version:
63 lines (62 loc) 2.12 kB
import { AfterViewInit, ElementRef, OnChanges, OnDestroy, OnInit } from '@angular/core'; import { DndService, DragSource, DropTarget } from '@ng-dnd/core'; import { Observable } from 'rxjs'; import { DraggedItem, RenderContext } from '../types'; import * as i0 from "@angular/core"; export declare class DndSortableRenderer<Data> implements OnChanges, OnInit, AfterViewInit, OnDestroy { private dnd; private el; context: RenderContext<Data>; get data(): Data; get index(): number; get type(): string | symbol; get listId(): number; /** @ignore */ private get accepts(); /** @ignore */ private get spec(); /** @ignore */ private subs; /** * This DropTarget is attached where [dndSortableRender] is. * * It is responsible for triggering {@link SortableSpec.hover} when the place you are hovering changes. */ target: DropTarget<DraggedItem<Data>>; /** * This DragSource is NOT attached for you. * * You need to attach it yourself, by pulling #render="dndSortableRender", and applying [dragSource]="render.source". */ source: DragSource<DraggedItem<Data>>; /** * Shortcut for `this.source.listen(m => m.isDragging())` */ isDragging$: Observable<boolean>; /** @ignore */ constructor(dnd: DndService, el: ElementRef<HTMLElement>); /** @ignore */ private createItem; /** @ignore */ private sameIds; /** @ignore */ private getCanDrag; /** @ignore */ private isDragging; /** @ignore */ private hover; /** @ignore */ private rect; /** @ignore */ private size; /** @ignore */ ngOnChanges(): void; /** @ignore */ ngOnInit(): void; /** @ignore */ ngAfterViewInit(): void; /** @ignore */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<DndSortableRenderer<any>, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<DndSortableRenderer<any>, "[dndSortableRender]", ["dndSortableRender"], { "context": { "alias": "dndSortableRender"; "required": false; }; }, {}, never, never, true, never>; }