UNPKG

@progress/kendo-angular-utils

Version:

Kendo UI Angular utils component

46 lines (45 loc) 2.16 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ /** * Represents the callback used by the `dragData` property of the [`DragTarget`]({% slug api_utils_dragtargetdirective %}) and [`DragTargetContainer`]({% slug api_utils_dragtargetcontainerdirective %}) directives. * It returns the custom data that will be available in the events of the respective [`DropTarget`]({% slug api_utils_droptargetdirective %}) or [`DropTargetContainer`]({% slug api_utils_droptargetcontainerdirective %}) directives upon interaction. * */ export type DragTargetDataFn = (args: DragTargetDataArgs) => any; /** * Represents the callback used by the `dragTargetId` property of the [`DragTargetContainer`]({% slug api_utils_dragtargetcontainerdirective %}) directive. * It returns a custom identifier that will be available in the events of the respective directive upon its interaction with a valid DropTarget. */ export type DragTargetIdFn = (args: DragTargetIdArgs) => any; /** * Represents the callback arguments for the `dragData` property. */ export interface DragTargetDataArgs { /** * The drag target HTML element. */ dragTarget: HTMLElement; /** * The drag target unique identifier, result from executing the callback used by the `dragTargetId` property. Applies to `DragTargetContainerDirective`. */ dragTargetId: any; /** * The index of the current drag target in the collection. Applies to `DragTargetContainerDirective`. */ dragTargetIndex: number; } /** * Represents the callback arguments for the `dragTargetId` property. */ export interface DragTargetIdArgs { /** * The drag target HTML element. */ dragTarget: HTMLElement; /** * The index of the current drag target in the collection. Applies to `DragTargetContainerDirective`. */ dragTargetIndex: number; }