Skip to content

Commit 9a6c6a3

Browse files
committed
[update] version 8.0.2
1 parent 96582f3 commit 9a6c6a3

16 files changed

+300
-53
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# dhtmlxGantt #
22

33
[![dhtmlx.com](https://img.shields.io/badge/made%20by-DHTMLX-blue)](https://dhtmlx.com/)
4-
[![npm: v.8.0.1](https://img.shields.io/badge/npm-v.8.0.1-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
4+
[![npm: v.8.0.2](https://img.shields.io/badge/npm-v.8.0.2-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
55
[![License: GPL v2](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
66

77
[Getting started](#getting-started) | [Features](#features) | [License](#license) | [Useful links](#links) | [Follow us](#followus)
@@ -117,7 +117,7 @@ Resource management, critical path calculation, auto scheduling, and other enhan
117117
<a name="license"></a>
118118
## License ##
119119

120-
dhtmlxGantt v.8.0.1 Standard
120+
dhtmlxGantt v.8.0.2 Standard
121121

122122
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
123123

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gantt",
3-
"version": "8.0.1",
3+
"version": "8.0.2",
44
"homepage": "https://dhtmlx.com/docs/products/dhtmlxGantt/",
55
"description": "An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.",
66
"main": [

codebase/dhtmlxgantt.d.ts

+124-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// Type definitions for dhtmlxGantt 8.0.1
1+
// Type definitions for dhtmlxGantt 8.0.2
22
// Project: https://dhtmlx.com/docs/products/dhtmlxGantt
33

44
type GanttCallback = (...args: any[]) => any;
55

66

7-
export type GanttEventName = "onAfterAutoSchedule" | "onAfterBatchUpdate" | "onAfterBranchLoading" | "onAfterLightbox" | "onAfterLinkAdd" | "onAfterLinkDelete" | "onAfterLinkUpdate" | "onAfterQuickInfo" | "onAfterRedo" | "onAfterRowResize" | "onAfterSort" | "onAfterTaskAdd" | "onAfterTaskAutoSchedule" | "onAfterTaskDelete" | "onAfterTaskDrag" | "onAfterTaskMove" | "onAfterTaskUpdate" | "onAfterUndo" | "onAjaxError" | "onAutoScheduleCircularLink" | "onBeforeAutoSchedule" | "onBeforeBatchUpdate" | "onBeforeBranchLoading" | "onBeforeCollapse" | "onBeforeDataRender" | "onBeforeExpand" | "onBeforeGanttReady" | "onBeforeGanttRender" | "onBeforeLightbox" | "onBeforeLinkAdd" | "onBeforeLinkDelete" | "onBeforeLinkDisplay" | "onBeforeLinkUpdate" | "onBeforeMultiSelect" | "onBeforeParse" | "onBeforeRedo" | "onBeforeRedoStack" | "onBeforeRowDragEnd" | "onBeforeRowDragMove" | "onBeforeRowResize" | "onBeforeRowResizeEnd" | "onBeforeTaskAdd" | "onBeforeTaskAutoSchedule" | "onBeforeTaskChanged" | "onBeforeTaskDelete" | "onBeforeTaskDisplay" | "onBeforeTaskDrag" | "onBeforeTaskMove" | "onBeforeTaskMultiSelect" | "onBeforeTaskSelected" | "onBeforeTaskUpdate" | "onBeforeUndo" | "onBeforeUndoStack" | "onCircularLinkError" | "onClear" | "onCollapse" | "onColumnResize" | "onColumnResizeEnd" | "onColumnResizeStart" | "onContextMenu" | "onDataProcessorReady" | "onDataRender" | "onDestroy" | "onEmptyClick" | "onError" | "onExpand" | "onGanttLayoutReady" | "onGanttReady" | "onGanttRender" | "onGanttScroll" | "onGridHeaderClick" | "onGridResize" | "onGridResizeEnd" | "onGridResizeStart" | "onLightbox" | "onLightboxButton" | "onLightboxCancel" | "onLightboxChange" | "onLightboxDelete" | "onLightboxSave" | "onLinkClick" | "onLinkCreated" | "onLinkDblClick" | "onLinkIdChange" | "onLinkValidation" | "onLoadEnd" | "onLoadStart" | "onMouseMove" | "onMultiSelect" | "onOptionsLoad" | "onParse" | "onQuickInfo" | "onRowDragEnd" | "onRowDragStart" | "onRowResize" | "onScaleAdjusted" | "onScaleClick" | "onTaskClick" | "onTaskClosed" | "onTaskCreated" | "onTaskDblClick" | "onTaskDrag" | "onTaskIdChange" | "onTaskLoading" | "onTaskMultiSelect" | "onTaskOpened" | "onTaskRowClick" | "onTaskSelected" | "onTaskUnselected" | "onTemplatesReady";
7+
export type GanttEventName = "onAfterAutoSchedule" | "onAfterBatchUpdate" | "onAfterBranchLoading" | "onAfterLightbox" | "onAfterLinkAdd" | "onAfterLinkDelete" | "onAfterLinkUpdate" | "onAfterQuickInfo" | "onAfterRedo" | "onAfterRowResize" | "onAfterSort" | "onAfterTaskAdd" | "onAfterTaskAutoSchedule" | "onAfterTaskDelete" | "onAfterTaskDrag" | "onAfterTaskMove" | "onAfterTaskUpdate" | "onAfterUndo" | "onAjaxError" | "onAutoScheduleCircularLink" | "onBeforeAutoSchedule" | "onBeforeBatchUpdate" | "onBeforeBranchLoading" | "onBeforeCollapse" | "onBeforeDataRender" | "onBeforeExpand" | "onBeforeGanttReady" | "onBeforeGanttRender" | "onBeforeLightbox" | "onBeforeLinkAdd" | "onBeforeLinkDelete" | "onBeforeLinkDisplay" | "onBeforeLinkUpdate" | "onBeforeMultiSelect" | "onBeforeParse" | "onBeforeRedo" | "onBeforeRedoStack" | "onBeforeRollupTaskDisplay" | "onBeforeRowDragEnd" | "onBeforeRowDragMove" | "onBeforeRowResize" | "onBeforeRowResizeEnd" | "onBeforeSplitTaskDisplay" | "onBeforeTaskAdd" | "onBeforeTaskAutoSchedule" | "onBeforeTaskChanged" | "onBeforeTaskDelete" | "onBeforeTaskDisplay" | "onBeforeTaskDrag" | "onBeforeTaskMove" | "onBeforeTaskMultiSelect" | "onBeforeTaskSelected" | "onBeforeTaskUpdate" | "onBeforeUndo" | "onBeforeUndoStack" | "onCircularLinkError" | "onClear" | "onCollapse" | "onColumnResize" | "onColumnResizeEnd" | "onColumnResizeStart" | "onContextMenu" | "onDataProcessorReady" | "onDataRender" | "onDestroy" | "onEmptyClick" | "onError" | "onExpand" | "onGanttLayoutReady" | "onGanttReady" | "onGanttRender" | "onGanttScroll" | "onGridHeaderClick" | "onGridResize" | "onGridResizeEnd" | "onGridResizeStart" | "onLightbox" | "onLightboxButton" | "onLightboxCancel" | "onLightboxChange" | "onLightboxDelete" | "onLightboxSave" | "onLinkClick" | "onLinkCreated" | "onLinkDblClick" | "onLinkIdChange" | "onLinkValidation" | "onLoadEnd" | "onLoadStart" | "onMouseMove" | "onMultiSelect" | "onOptionsLoad" | "onParse" | "onQuickInfo" | "onRowDragEnd" | "onRowDragStart" | "onRowResize" | "onScaleAdjusted" | "onScaleClick" | "onTaskClick" | "onTaskClosed" | "onTaskCreated" | "onTaskDblClick" | "onTaskDrag" | "onTaskIdChange" | "onTaskLoading" | "onTaskMultiSelect" | "onTaskOpened" | "onTaskRowClick" | "onTaskSelected" | "onTaskUnselected" | "onTemplatesReady";
88

99

1010
export interface GanttTemplates {
@@ -286,6 +286,13 @@ export interface GanttTemplates {
286286
*/
287287
timeline_cell_class(item: any, date: Date): string;
288288

289+
/**
290+
* specifies custom HTML content in the timeline cells
291+
* @param task the task's object
292+
* @param date the date of a cell
293+
*/
294+
timeline_cell_content(task: Task, date: Date): string;
295+
289296
/**
290297
* specifies the format of start and end dates displayed in the tooltip
291298
* @param date the date which needs formatting
@@ -372,11 +379,21 @@ export interface GanttConfigOptions {
372379
*/
373380
auto_scheduling_move_projects: boolean;
374381

382+
/**
383+
* defines whether tasks should inherit the constraint type from their parent project
384+
*/
385+
auto_scheduling_project_constraint: boolean;
386+
375387
/**
376388
* enables the auto scheduling mode, in which tasks will always be rescheduled to the earliest possible date
377389
*/
378390
auto_scheduling_strict: boolean;
379391

392+
/**
393+
* sets the way the scheduling algorithms process completed tasks
394+
*/
395+
auto_scheduling_use_progress: boolean;
396+
380397
/**
381398
* automatically converts tasks with subtasks to projects and projects without subtasks back to tasks
382399
*/
@@ -765,7 +782,7 @@ export interface GanttConfigOptions {
765782
/**
766783
* adds an empty row into the end of the list of tasks to simplify tasks editing via keyboard
767784
*/
768-
placeholder_task: boolean;
785+
placeholder_task: any;
769786

770787
/**
771788
* preserves the current position of the vertical and horizontal scrolls while re-drawing the gantt chart
@@ -857,6 +874,11 @@ export interface GanttConfigOptions {
857874
*/
858875
resource_store: string;
859876

877+
/**
878+
* defines an extra configuration for the resource store
879+
*/
880+
resources: any;
881+
860882
/**
861883
* sets the id of the virtual root element
862884
*/
@@ -927,6 +949,11 @@ export interface GanttConfigOptions {
927949
*/
928950
show_chart: boolean;
929951

952+
/**
953+
* defines whether to display the placeholder element inside the grid when it is empty
954+
*/
955+
show_empty_state: boolean;
956+
930957
/**
931958
* enables showing error alerts in case of unexpected behavior
932959
*/
@@ -1057,6 +1084,11 @@ export interface GanttConfigOptions {
10571084
*/
10581085
time_step: number;
10591086

1087+
/**
1088+
* shows the background grid in the empty timeline
1089+
*/
1090+
timeline_placeholder: boolean;
1091+
10601092
/**
10611093
* sets the length of time, in milliseconds, before the tooltip hides
10621094
*/
@@ -1888,6 +1920,12 @@ export interface GanttStatic {
18881920
*/
18891921
getLastSelectedTask(): string | number;
18901922

1923+
/**
1924+
* returns the object of the layout view by its name
1925+
* @param name the name of the layout view
1926+
*/
1927+
getLayoutView(name: string): any;
1928+
18911929
/**
18921930
* gets the lightbox's HTML object element
18931931
*/
@@ -1975,8 +2013,9 @@ export interface GanttStatic {
19752013
/**
19762014
* returns all tasks assigned to the resource
19772015
* @param resourceId the id of the resource
2016+
* @param taskId the id of the task
19782017
*/
1979-
getResourceAssignments(resourceId: string | number): any[];
2018+
getResourceAssignments(resourceId: string | number, taskId?: string | number): any[];
19802019

19812020
/**
19822021
* returns a calendar which the resource is assigned to
@@ -2063,8 +2102,9 @@ export interface GanttStatic {
20632102
* finds a task by the specified criteria
20642103
* @param propertyName the name of the property to match, or a filter function
20652104
* @param propertyValue the property value
2105+
* @param types an object with types of the tasks which should be returned
20662106
*/
2067-
getTaskBy(propertyName: string | GanttCallback, propertyValue?: string | number | any[]): Array<Task>;
2107+
getTaskBy(propertyName: string | GanttCallback, propertyValue?: string | number | any[], types?: any): Array<Task>;
20682108

20692109
/**
20702110
* returns a task by its global task index
@@ -2353,7 +2393,7 @@ export interface GanttStatic {
23532393
* @param tindex the index of the position that the task will be moved to <br> (the index within a branch)
23542394
* @param parent the parent id. If specified, the <b>tindex</b> will refer to the index in the <br> <b>'parent'</b> branch
23552395
*/
2356-
moveTask(sid: string | number, tindex: number, parent?: string | number): boolean | undefined;
2396+
moveTask(sid: string | number, tindex: number, parent?: string | number): boolean | void;
23572397

23582398
/**
23592399
* opens the branch with the specified id
@@ -2470,6 +2510,14 @@ export interface GanttStatic {
24702510
*/
24712511
roundTaskDates(task: Task): void;
24722512

2513+
/**
2514+
* scrolls the layout view to the specified position
2515+
* @param name the name of the layout view
2516+
* @param x optional, value of horizontal scroll or 'null' (if the scroll position shouldn't be changed)
2517+
* @param y optional, value of vertical scroll or 'null' (if the scroll position shouldn't be changed)
2518+
*/
2519+
scrollLayoutCell(name: string, x: number | null, y: number | null): void;
2520+
24732521
/**
24742522
* scrolls the Gantt container to the specified position
24752523
* @param x optional, value of horizontal scroll or 'null' (if the scroll position shouldn't be changed)
@@ -2759,7 +2807,6 @@ export interface Task {
27592807

27602808
/**
27612809
* the task type. The available values are stored in the api/gantt_types_config.md object:
2762-
27632810
"task" - a regular task (default value).
27642811
"project" - a task that starts, when its earliest child task starts, and ends, when its latest child ends.
27652812
The start_date, end_date, duration properties are ignored for such tasks.
@@ -2849,6 +2896,11 @@ export interface Task {
28492896
*/
28502897
$raw?: object,
28512898

2899+
/**
2900+
* The id of a row the rollup item / split task is rendered at. This is the temporary property which appears in the object of the rollup/split task only when it's been rendering on the page.
2901+
*/
2902+
$rendered_at?: string | number,
2903+
28522904
/**
28532905
* The id of the parent under which the task is rendered (not id of the real parent of the task). The property is used in internal calculations and on tasks' grouping.
28542906
*/
@@ -2922,7 +2974,6 @@ export interface Link {
29222974

29232975
/**
29242976
* the dependency type. The available values are stored in the api/gantt_links_config.md object. By default, they are:
2925-
29262977
"0" - 'finish_to_start'.
29272978
"1" - 'start_to_start'.
29282979
"2" - 'finish_to_finish'.
@@ -3056,7 +3107,14 @@ export interface GridColumn {
30563107
* @param the Task object
30573108
* @param the HTML element of the Grid cell
30583109
*/
3059-
onrender?(task: Task, node: HTMLElement): any
3110+
onrender?(task: Task, node: HTMLElement): any,
3111+
3112+
/**
3113+
* sort configuration after clicking on the column header. When it is set to *false*, sorting is disabled. Otherwise you can set a different task property in the *string* to sort the column or use a custom sorting function
3114+
* @param the first task that will be sorted
3115+
* @param the second task that will be sorted
3116+
*/
3117+
sort?: boolean | string | ((task1: Task, task2: Task,) => any)
30603118
}
30613119

30623120
export interface DateHelpers {
@@ -4628,8 +4686,65 @@ export interface Formatters {
46284686
): LinkFormatter
46294687
}
46304688

4689+
export interface EmptyState {
4690+
4691+
/**
4692+
* an array with the IDs of the attached handlers. Modified by the *attachAddTaskEvent* and *detachAddTaskEvents* methods.
4693+
*/
4694+
clickEvents?: Array<string>,
4695+
4696+
/**
4697+
* returns *true* if there is no data loaded into the Gantt chart, otherwise
4698+
* @param the container element
4699+
*/
4700+
isGanttEmpty(container: HTMLElement): boolean,
4701+
4702+
/**
4703+
* returns *true* if the api/gantt_show_empty_state_config.md property is enabled, otherwise
4704+
* @param the container element
4705+
*/
4706+
isEnabled(container: HTMLElement): boolean,
4707+
4708+
/**
4709+
* puts an HTML content into the empty state element. The method can be redefined.
4710+
* @param the container element
4711+
*/
4712+
renderContent(container: HTMLElement): void,
4713+
4714+
/**
4715+
* returns the DOM element where the empty state will be attached to. By default, returns the grid element (the "empty state" will be displayed in the grid). If there is no grid, returns the timeline element (the "empty state" will be displayed in the timeline). The method can be redefined.
4716+
*/
4717+
getContainer(): HTMLElement | null,
4718+
4719+
/**
4720+
* returns the DOM node of the empty state element.
4721+
*/
4722+
getNode(): HTMLElement | null,
4723+
4724+
/**
4725+
* displays the "empty state". Returns *false* if there is no container for the Empty State Element. The extension calls the method by itself
4726+
*/
4727+
show(): null | void,
4728+
4729+
/**
4730+
* hides the "empty state". Returns *false* if there is no Empty State Element node, so there is nothing to hide. The extension calls the method by itself
4731+
*/
4732+
hide(): boolean | void,
4733+
4734+
/**
4735+
* adds the handler that will fire after clicking on the Empty State Element. By default, used to add a new task.
4736+
*/
4737+
attachAddTaskEvent(): void,
4738+
4739+
/**
4740+
* removes the handlers that were used to add a task after clicking on the Empty State Element.
4741+
*/
4742+
detachAddTaskEvents(): void
4743+
}
4744+
46314745
export interface Ext {
46324746
inlineEditors: InlineEditorMethods,
4747+
emptyStateElement: EmptyState,
46334748
fullscreen: Fullscreen,
46344749
formatters: Formatters,
46354750
keyboardNavigation: KeyNav,

codebase/dhtmlxgantt.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/dhtmlxgantt.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/sources/dhtmlxgantt.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.8.0.1 Standard
4+
dhtmlxGantt v.8.0.2 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

0 commit comments

Comments
 (0)