angular-kanban
Version:
A lightweight and customizable Kanban board library for Angular application
45 lines (44 loc) • 1.88 kB
TypeScript
import { EventEmitter } from '@angular/core';
import { KanbanCard, KanbanColumn } from '../models/kanban.modal';
import * as i0 from "@angular/core";
export declare class KanbanColumnComponent {
/** Column data: {
id: string;
title: string;
cards: KanbanCard[];
} */
column: KanbanColumn;
/** Emit event when a card is clicked */
cardClick: EventEmitter<KanbanCard>;
/** Emit event when a card is moved */
cardMoved: EventEmitter<{
cardId: string;
sourceColumnId: string;
targetColumnId: string;
}>;
/** Fires continuously while a card is being dragged over the column. */
onDragOver(event: DragEvent): void;
/**
* @param event Fires when a dragged card enters the column.
* Adds a CSS class (drag-over) to the column's content area to provide visual feedback (e.g., highlighting the column).
*/
onDragEnter(event: DragEvent): void;
/**
* @param event Fires when a dragged card leaves the column.
* Removes the drag-over CSS class to reset the visual feedback.
*/
onDragLeave(event: DragEvent): void;
/**
*
* @param event Fires when a card is dropped on the column.
* Prevents the default behavior.
* Removes the drag-over styling.
* Gets the cardId from the dataTransfer object.
* Finds the sourceColumnId (the column the card is coming from).
* Emits a cardMoved event to notify the parent component that the card has been moved.
* @returns
*/
onDrop(event: DragEvent): void;
static ɵfac: i0.ɵɵFactoryDeclaration<KanbanColumnComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<KanbanColumnComponent, "lib-kanban-column", never, { "column": { "alias": "column"; "required": false; }; }, { "cardClick": "cardClick"; "cardMoved": "cardMoved"; }, never, never, true, never>;
}