UNPKG

3.99 kBTypeScriptView Raw
1export function clear(): void;
2export function setAxisFormat(txt: any): void;
3export function getAxisFormat(): string;
4export function setTickInterval(txt: any): void;
5export function getTickInterval(): any;
6export function setTodayMarker(txt: any): void;
7export function getTodayMarker(): string;
8export function setDateFormat(txt: any): void;
9export function enableInclusiveEndDates(): void;
10export function endDatesAreInclusive(): boolean;
11export function enableTopAxis(): void;
12export function topAxisEnabled(): boolean;
13export function setDisplayMode(txt: any): void;
14export function getDisplayMode(): string;
15export function getDateFormat(): string;
16export function setIncludes(txt: any): void;
17export function getIncludes(): any[];
18export function setExcludes(txt: any): void;
19export function getExcludes(): any[];
20export function getLinks(): {};
21export function addSection(txt: any): void;
22export function getSections(): any[];
23export function getTasks(): any[];
24export function isInvalidDate(date: any, dateFormat: any, excludes: any, includes: any): any;
25export function setWeekday(txt: any): void;
26export function getWeekday(): string;
27export function addTask(descr: any, data: any): void;
28export function findTaskById(id: any): any;
29export function addTaskOrg(descr: any, data: any): void;
30export function setLink(ids: any, _linkStr: any): void;
31export function setClass(ids: any, className: any): void;
32export function setClickEvent(ids: any, functionName: any, functionArgs: any): void;
33export function bindFunctions(element: any): void;
34declare namespace _default {
35 export function getConfig(): import("../../config.type.js").GanttDiagramConfig | undefined;
36 export { clear };
37 export { setDateFormat };
38 export { getDateFormat };
39 export { enableInclusiveEndDates };
40 export { endDatesAreInclusive };
41 export { enableTopAxis };
42 export { topAxisEnabled };
43 export { setAxisFormat };
44 export { getAxisFormat };
45 export { setTickInterval };
46 export { getTickInterval };
47 export { setTodayMarker };
48 export { getTodayMarker };
49 export { setAccTitle };
50 export { getAccTitle };
51 export { setDiagramTitle };
52 export { getDiagramTitle };
53 export { setDisplayMode };
54 export { getDisplayMode };
55 export { setAccDescription };
56 export { getAccDescription };
57 export { addSection };
58 export { getSections };
59 export { getTasks };
60 export { addTask };
61 export { findTaskById };
62 export { addTaskOrg };
63 export { setIncludes };
64 export { getIncludes };
65 export { setExcludes };
66 export { getExcludes };
67 export { setClickEvent };
68 export { setLink };
69 export { getLinks };
70 export { bindFunctions };
71 export { parseDuration };
72 export { isInvalidDate };
73 export { setWeekday };
74 export { getWeekday };
75}
76export default _default;
77import { setAccTitle } from '../common/commonDb.js';
78import { getAccTitle } from '../common/commonDb.js';
79import { setDiagramTitle } from '../common/commonDb.js';
80import { getDiagramTitle } from '../common/commonDb.js';
81import { setAccDescription } from '../common/commonDb.js';
82import { getAccDescription } from '../common/commonDb.js';
83/**
84 * Parse a string into the args for `dayjs.add()`.
85 *
86 * The string have to be compound by a value and a shorthand duration unit. For example `5d`
87 * represents 5 days.
88 *
89 * Please be aware that 1 day may be 23 or 25 hours, if the user lives in an area
90 * that has daylight savings time (or even 23.5/24.5 hours in Lord Howe Island!)
91 *
92 * Shorthand unit supported are:
93 *
94 * - `y` for years
95 * - `M` for months
96 * - `w` for weeks
97 * - `d` for days
98 * - `h` for hours
99 * - `s` for seconds
100 * - `ms` for milliseconds
101 *
102 * @param {string} str - A string representing the duration.
103 * @returns {[value: number, unit: dayjs.ManipulateType]} Arguments to pass to `dayjs.add()`
104 */
105declare function parseDuration(str: string): [value: number, unit: dayjs.ManipulateType];
106import dayjs from 'dayjs';