UNPKG

@progress/kendo-angular-utils

Version:

Kendo UI Angular utils component

48 lines (47 loc) 2.24 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 that is 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 that is 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 used by 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. Applicable for the `DragTargetContainerDirective`. */ dragTargetId: any; /** * The index of the current drag target in the collection of drag targets. Applicable for the `DragTargetContainerDirective`. */ dragTargetIndex: number; } /** * Represents the callback arguments used by the `dragTargetId` property. */ export interface DragTargetIdArgs { /** * The drag target HTML element. */ dragTarget: HTMLElement; /** * The index of the current drag target in the collection of drag targets. Applicable for the `DragTargetContainerDirective`. */ dragTargetIndex: number; }