@types/frappe-gantt
TypeScript icon, indicating that this package has built-in type declarations

0.6.4 • Public • Published

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

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;
        invalid?: boolean | undefined;
    }

    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" | "Year";

    type viewModeKey = "QUARTER_DAY" | "HALF_DAY" | "DAY" | "WEEK" | "MONTH" | "YEAR";

    const VIEW_MODE: Record<viewModeKey, viewMode>;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Sam Alexander, and Elijah Lucian.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/frappe-gantt

Weekly Downloads

1,744

Version

0.6.4

License

MIT

Unpacked Size

6.25 kB

Total Files

5

Last publish

Collaborators

  • types