@progress/kendo-angular-sortable
Version:
A Sortable Component for Angular
56 lines (55 loc) • 2.25 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { OnDestroy, OnInit } from '@angular/core';
import { SortableComponent } from './sortable.component';
import { SortableService } from './sortable.service';
import * as i0 from "@angular/core";
/**
* Represents a directive that handles common scenarios such as reordering and moving items between Sortables, reducing boilerplate code.
*
* This directive subscribes to the Sortable's events and handles them using the provided API methods.
*
* @example
* ```html
* <kendo-sortable
* [kendoSortableBinding]="items"
* [navigable]="true"
* [animation]="true"
* itemClass="item col-xs-6 col-sm-3"
* activeItemClass="item col-xs-6 col-sm-3 active">
* </kendo-sortable>
* ```
*
* @remarks
* Applied to: {@link SortableComponent}
*/
export declare class SortableBindingDirective implements OnInit, OnDestroy {
sortable: SortableComponent;
private sortableService;
private removeHiddenSubscription;
private dragOverSubscription;
private navigateSubscription;
private lastTarget;
/**
* Sets a data-bound array that is used as a data source for the Sortable ([see example](slug:overview_sortable)).
*/
set data(data: any[]);
constructor(sortable: SortableComponent, sortableService: SortableService);
private nextEnabledIndex;
private addItem;
private removeItem;
private moveItem;
/**
* Removes the Draggable item from which the drag started.
* @hidden
*/
private removeOriginDraggable;
private onDragOver;
private onNavigate;
ngOnInit(): void;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SortableBindingDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SortableBindingDirective, "[kendoSortableBinding]", never, { "data": { "alias": "kendoSortableBinding"; "required": false; }; }, {}, never, never, true, never>;
}