/**----------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { AfterContentInit, ElementRef, NgZone, OnDestroy } from '@angular/core'; import { Draggable } from '@progress/kendo-draggable'; import { DragClueService } from './drag-clue/drag-clue.service'; import { DropHintService } from './drop-hint/drop-hint.service'; import { DragClueTemplateDirective } from './drag-clue/drag-clue-template.directive'; import { DropHintTemplateDirective } from './drop-hint/drop-hint-template.directive'; import { TreeViewComponent } from '../treeview.component'; import { DragAndDropScrollSettings } from './models'; import * as i0 from "@angular/core"; /** * Represents the directive that enables you to drag and drop items inside the current TreeView or between multiple linked TreeView component instances * ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop)). * * Triggers the [`nodeDragStart`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedragstart), * [`nodeDrag`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedrag), * [`nodeDrop`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedrop), * [`nodeDragEnd`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedragend), * [`addItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#additem) and * [`removeItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#removeitem) * events when you perform the corresponding actions. * * @example * ```html * * * ``` * * @remarks * Applied to: {@link TreeViewComponent} */ export declare class DragAndDropDirective implements AfterContentInit, OnDestroy { private element; private zone; private treeview; private dragClueService; private dropHintService; /** * Specifies whether the `removeItem` event fires after the user drops an item while pressing the `ctrl` key. * If enabled, the `removeItem` event does not fire on the source TreeView * ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#multiple-treeviews)). * * @default false */ allowCopy: boolean; /** * Specifies the `TreeViewComponent` instances into which the user can drop dragged items from the current `TreeViewComponent` * ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#multiple-treeviews)). */ dropZoneTreeViews: TreeViewComponent[]; /** * Specifies the distance in pixels from the initial item `pointerdown` event before dragging starts. * The `nodeDragStart` and all subsequent TreeView drag events do not fire until dragging begins. * * @default 5 */ startDragAfter: number; /** * Controls the auto-scrolling behavior during drag-and-drop ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#auto-scrolling)). * Enabled by default. To turn off auto-scrolling, set this property to `false`. * * By default, scrolling occurs by 1 pixel every 1 millisecond when the dragged item reaches the top or bottom of the scrollable container. * You can override the `step` and `interval` by providing a `DragAndDropScrollSettings` object. * * @default true */ autoScroll: boolean | DragAndDropScrollSettings; /** * @hidden */ dragClueTemplate: DragClueTemplateDirective; /** * @hidden */ dropHintTemplate: DropHintTemplateDirective; /** * @hidden */ userSelectStyle: string; protected draggable: Draggable; protected draggedItem: HTMLElement; /** * The pointer event of the last successful item pointerdown event (the draggable `press` event). * Used for determining whether the `startDragAfter` distance is covered and for the `nodeDragStart` event args. * Used also as a flag for whether a drag attempt is pending. Should be set to `null` once the dragging begins. */ protected pendingDragStartEvent: PointerEvent; private get scrollSettings(); /** * Describes the offset of the parent element if the latter has the `transform` CSS prop applied. * Transformed parents create new stacking context and the fixed children must be position based on the transformed parent. * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context */ private containerOffset; constructor(element: ElementRef, zone: NgZone, treeview: TreeViewComponent, dragClueService: DragClueService, dropHintService: DropHintService); ngAfterContentInit(): void; ngOnDestroy(): void; /** * @hidden */ handlePress({ originalEvent }: any): void; /** * @hidden */ handleDrag({ originalEvent, clientX, clientY }: any): void; /** * @hidden */ handleRelease({ originalEvent, clientY }: any): void; private updateDropHintState; private updateDragClueState; private initalizeDraggable; private notifyDragStart; private notifyDrag; private notifyDrop; private notifyDragEnd; private getTargetTreeView; private disableAnimationsForNextTick; private shouldInitiateDragStart; private initiateDragStart; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }