@wamra/gantt-task-react
Version:
Interactive Gantt Chart for React with TypeScript
50 lines (49 loc) • 2.75 kB
TypeScript
import React from "react";
import type { MouseEvent } from "react";
import { BarMoveAction, ChildByLevelMap, ChildOutOfParentWarnings, ColorStyles, CriticalPaths, DependencyMap, DependentMap, Distances, FixPosition, GlobalRowIndexToTaskMap, RelationKind, DateExtremity, Task, TaskContextualPaletteProps, TaskCoordinates, TaskOrEmpty, TaskToHasDependencyWarningMap, TaskDependencyContextualPaletteProps } from "../../types/public-types";
import { GanttRelationEvent } from "../../types/gantt-task-actions";
import type { OptimizedListParams } from "../../helpers/use-optimized-list";
export type TaskGanttContentProps = {
authorizedRelations: RelationKind[];
additionalLeftSpace: number;
additionalRightSpace: number;
childOutOfParentWarnings: ChildOutOfParentWarnings | null;
childTasksMap: ChildByLevelMap;
colorStyles: ColorStyles;
comparisonLevels: number;
criticalPaths: CriticalPaths | null;
dependencyMap: DependencyMap;
dependentMap: DependentMap;
distances: Distances;
fixEndPosition?: FixPosition;
fixStartPosition?: FixPosition;
fontFamily: string;
fontSize: string;
fullRowHeight: number;
ganttRelationEvent: GanttRelationEvent | null;
getTaskCoordinates: (task: Task) => TaskCoordinates;
getTaskGlobalIndexByRef: (task: Task) => number;
handleBarRelationStart: (target: DateExtremity, task: Task) => void;
handleDeleteTasks: (task: TaskOrEmpty[]) => void;
handleFixDependency: (task: Task, delta: number) => void;
handleTaskDragStart: (action: BarMoveAction, task: Task, clientX: number, taskRootNode: Element) => void;
isShowDependencyWarnings: boolean;
mapGlobalRowIndexToTask: GlobalRowIndexToTaskMap;
onArrowClick?: (taskFrom: Task, extremityFrom: DateExtremity, taskTo: Task, extremityTo: DateExtremity, event: React.MouseEvent<SVGElement>) => void;
onArrowDoubleClick: (taskFrom: Task, taskTo: Task) => void;
onClick?: (task: Task, event: React.MouseEvent<SVGElement>) => void;
onDoubleClick?: (task: Task) => void;
renderedRowIndexes: OptimizedListParams | null;
rtl: boolean;
selectTaskOnMouseDown: (taskId: string, event: MouseEvent) => void;
selectedIdsMirror: Readonly<Record<string, true>>;
setTooltipTask: (task: Task | null, element: Element | null) => void;
taskToHasDependencyWarningMap: TaskToHasDependencyWarningMap | null;
taskYOffset: number;
visibleTasksMirror: Readonly<Record<string, true>>;
taskHeight: number;
taskHalfHeight: number;
ContextualPalette?: React.FC<TaskContextualPaletteProps>;
TaskDependencyContextualPalette?: React.FC<TaskDependencyContextualPaletteProps>;
};
export declare const TaskGanttContent: React.FC<TaskGanttContentProps>;