0.6.4 • Published 6 months ago
@types/frappe-gantt v0.6.4
Installation
npm install --save @types/frappe-gantt
Summary
This package contains type definitions for frappe-gantt (https://github.com/frappe/gantt).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/frappe-gantt.
index.d.ts
// Type definitions for frappe-gantt 0.4
// Project: https://github.com/frappe/gantt
// Definitions by: Sam Alexander <https://github.com/samalexander>, Elijah Lucian <https://github.com/eli7vh>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = Gantt;
declare class Gantt {
constructor(wrapper: string | HTMLElement | SVGElement, tasks: Gantt.Task[], options?: Gantt.Options);
change_view_mode(mode: Gantt.viewMode): void;
refresh(tasks: Gantt.Task[]): void;
}
declare namespace Gantt {
interface Task {
id: string;
name: string;
start: string;
end: string;
progress: number;
dependencies: string;
custom_class?: string | undefined;
}
interface EnrichedTask extends Task {
_start: Date;
_end: Date;
_index: number;
}
interface Options {
header_height?: number | undefined;
column_width?: number | undefined;
step?: number | undefined;
view_modes?: viewMode[] | undefined;
bar_height?: number | undefined;
bar_corner_radius?: number | undefined;
arrow_curve?: number | undefined;
padding?: number | undefined;
view_mode?: viewMode | undefined;
date_format?: string | undefined;
custom_popup_html?: string | ((task: EnrichedTask) => string) | undefined;
language?: string | undefined;
on_click?: ((task: EnrichedTask) => void) | undefined;
on_date_change?: ((task: EnrichedTask, start: Date, end: Date) => void) | undefined;
on_progress_change?: ((task: EnrichedTask, progress: number) => void) | undefined;
on_view_change?: ((mode: viewMode) => void) | undefined;
}
type viewMode = 'Quarter Day' | 'Half Day' | 'Day' | 'Week' | 'Month';
}
Additional Details
- Last updated: Thu, 08 Jul 2021 12:01:49 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Sam Alexander, and Elijah Lucian.