@syncfusion/ej2-gantt 19.4.56 → 20.1.47-1460716
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1072 -1060
- package/README.md +75 -75
- package/dist/ej2-gantt.umd.min.js +1 -10
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +274 -176
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +642 -534
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +1 -10
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/dist/ts/components.ts +4 -0
- package/dist/ts/gantt/actions/actions.ts +18 -0
- package/dist/ts/gantt/actions/cell-edit.ts +606 -0
- package/dist/ts/gantt/actions/chart-scroll.ts +167 -0
- package/dist/ts/gantt/actions/column-menu.ts +35 -0
- package/dist/ts/gantt/actions/column-reorder.ts +52 -0
- package/dist/ts/gantt/actions/column-resize.ts +52 -0
- package/dist/ts/gantt/actions/connector-line-edit.ts +829 -0
- package/dist/ts/gantt/actions/context-menu.ts +754 -0
- package/dist/ts/gantt/actions/day-markers.ts +80 -0
- package/dist/ts/gantt/actions/dependency.ts +692 -0
- package/dist/ts/gantt/actions/dialog-edit.ts +2208 -0
- package/dist/ts/gantt/actions/edit.ts +3499 -0
- package/dist/ts/gantt/actions/excel-export.ts +61 -0
- package/dist/ts/gantt/actions/filter.ts +302 -0
- package/dist/ts/gantt/actions/keyboard.ts +306 -0
- package/dist/ts/gantt/actions/pdf-export.ts +214 -0
- package/dist/ts/gantt/actions/rowdragdrop.ts +839 -0
- package/dist/ts/gantt/actions/selection.ts +536 -0
- package/dist/ts/gantt/actions/sort.ts +98 -0
- package/dist/ts/gantt/actions/taskbar-edit.ts +1940 -0
- package/dist/ts/gantt/actions/toolbar.ts +489 -0
- package/dist/ts/gantt/actions/virtual-scroll.ts +60 -0
- package/dist/ts/gantt/base/common.ts +9 -0
- package/dist/ts/gantt/base/constant.ts +13 -0
- package/dist/ts/gantt/base/css-constants.ts +148 -0
- package/dist/ts/gantt/base/date-processor.ts +1257 -0
- package/dist/ts/gantt/base/enum.ts +372 -0
- package/dist/ts/gantt/base/gantt-chart.ts +1248 -0
- package/dist/ts/gantt/base/gantt.ts +4069 -0
- package/dist/ts/gantt/base/interface.ts +955 -0
- package/dist/ts/gantt/base/splitter.ts +174 -0
- package/dist/ts/gantt/base/task-processor.ts +2217 -0
- package/dist/ts/gantt/base/tree-grid.ts +694 -0
- package/dist/ts/gantt/base/utils.ts +208 -0
- package/dist/ts/gantt/export/export-helper.ts +552 -0
- package/dist/ts/gantt/export/pdf-base/dictionary.ts +152 -0
- package/dist/ts/gantt/export/pdf-base/pdf-borders.ts +277 -0
- package/dist/ts/gantt/export/pdf-base/pdf-grid-table.ts +901 -0
- package/dist/ts/gantt/export/pdf-base/pdf-style/gantt-theme.ts +131 -0
- package/dist/ts/gantt/export/pdf-base/pdf-style/style.ts +91 -0
- package/dist/ts/gantt/export/pdf-base/treegrid-layouter.ts +414 -0
- package/dist/ts/gantt/export/pdf-connector-line.ts +422 -0
- package/dist/ts/gantt/export/pdf-gantt.ts +282 -0
- package/dist/ts/gantt/export/pdf-taskbar.ts +395 -0
- package/dist/ts/gantt/export/pdf-timeline.ts +202 -0
- package/dist/ts/gantt/export/pdf-treegrid.ts +406 -0
- package/dist/ts/gantt/models/add-dialog-field-settings.ts +33 -0
- package/dist/ts/gantt/models/column.ts +464 -0
- package/dist/ts/gantt/models/day-working-time.ts +22 -0
- package/dist/ts/gantt/models/edit-dialog-field-settings.ts +33 -0
- package/dist/ts/gantt/models/edit-settings.ts +79 -0
- package/dist/ts/gantt/models/event-marker.ts +27 -0
- package/dist/ts/gantt/models/filter-settings.ts +53 -0
- package/dist/ts/gantt/models/holiday.ts +34 -0
- package/dist/ts/gantt/models/label-settings.ts +30 -0
- package/dist/ts/gantt/models/models.ts +36 -0
- package/dist/ts/gantt/models/resource-fields.ts +38 -0
- package/dist/ts/gantt/models/search-settings.ts +77 -0
- package/dist/ts/gantt/models/selection-settings.ts +56 -0
- package/dist/ts/gantt/models/sort-settings.ts +50 -0
- package/dist/ts/gantt/models/splitter-settings.ts +47 -0
- package/dist/ts/gantt/models/task-fields.ts +171 -0
- package/dist/ts/gantt/models/timeline-settings.ts +112 -0
- package/dist/ts/gantt/models/tooltip-settings.ts +46 -0
- package/dist/ts/gantt/renderer/chart-rows.ts +1838 -0
- package/dist/ts/gantt/renderer/connector-line.ts +1025 -0
- package/dist/ts/gantt/renderer/edit-tooltip.ts +228 -0
- package/dist/ts/gantt/renderer/event-marker.ts +96 -0
- package/dist/ts/gantt/renderer/nonworking-day.ts +205 -0
- package/dist/ts/gantt/renderer/render.ts +5 -0
- package/dist/ts/gantt/renderer/timeline.ts +1397 -0
- package/dist/ts/gantt/renderer/tooltip.ts +450 -0
- package/dist/ts/gantt/renderer/virtual-content-render.ts +50 -0
- package/license +9 -9
- package/package.json +80 -80
- package/src/gantt/actions/cell-edit.js +2 -1
- package/src/gantt/actions/dialog-edit.js +2 -1
- package/src/gantt/actions/edit.js +11 -2
- package/src/gantt/actions/rowdragdrop.js +37 -15
- package/src/gantt/actions/taskbar-edit.js +24 -24
- package/src/gantt/base/date-processor.js +0 -1
- package/src/gantt/base/gantt-chart.js +9 -4
- package/src/gantt/base/gantt-model.d.ts +779 -779
- package/src/gantt/base/gantt.d.ts +27 -27
- package/src/gantt/base/gantt.js +22 -22
- package/src/gantt/base/splitter.js +1 -0
- package/src/gantt/base/task-processor.js +13 -13
- package/src/gantt/base/tree-grid.js +3 -1
- package/src/gantt/export/pdf-base/treegrid-layouter.js +13 -13
- package/src/gantt/export/pdf-connector-line.js +11 -11
- package/src/gantt/export/pdf-gantt.js +24 -24
- package/src/gantt/export/pdf-taskbar.js +11 -11
- package/src/gantt/export/pdf-treegrid.js +13 -13
- package/src/gantt/models/add-dialog-field-settings-model.d.ts +21 -21
- package/src/gantt/models/add-dialog-field-settings.js +19 -19
- package/src/gantt/models/day-working-time-model.d.ts +11 -11
- package/src/gantt/models/day-working-time.js +19 -19
- package/src/gantt/models/edit-dialog-field-settings-model.d.ts +21 -21
- package/src/gantt/models/edit-dialog-field-settings.js +19 -19
- package/src/gantt/models/edit-settings-model.d.ts +50 -50
- package/src/gantt/models/edit-settings.js +19 -19
- package/src/gantt/models/event-marker-model.d.ts +16 -16
- package/src/gantt/models/event-marker.js +19 -19
- package/src/gantt/models/filter-settings-model.d.ts +34 -34
- package/src/gantt/models/filter-settings.js +19 -19
- package/src/gantt/models/holiday-model.d.ts +21 -21
- package/src/gantt/models/holiday.js +19 -19
- package/src/gantt/models/label-settings-model.d.ts +16 -16
- package/src/gantt/models/label-settings.js +19 -19
- package/src/gantt/models/resource-fields-model.d.ts +21 -21
- package/src/gantt/models/resource-fields.js +19 -19
- package/src/gantt/models/search-settings-model.d.ts +56 -56
- package/src/gantt/models/search-settings.js +19 -19
- package/src/gantt/models/selection-settings-model.d.ts +35 -35
- package/src/gantt/models/selection-settings.js +19 -19
- package/src/gantt/models/sort-settings-model.d.ts +24 -24
- package/src/gantt/models/sort-settings.js +19 -19
- package/src/gantt/models/splitter-settings-model.d.ts +30 -30
- package/src/gantt/models/splitter-settings.js +19 -19
- package/src/gantt/models/task-fields-model.d.ts +110 -110
- package/src/gantt/models/task-fields.js +19 -19
- package/src/gantt/models/timeline-settings-model.d.ts +71 -71
- package/src/gantt/models/timeline-settings.js +19 -19
- package/src/gantt/models/tooltip-settings-model.d.ts +26 -26
- package/src/gantt/models/tooltip-settings.js +19 -19
- package/src/gantt/renderer/chart-rows.js +49 -37
- package/src/gantt/renderer/connector-line.js +22 -18
- package/src/gantt/renderer/event-marker.js +1 -0
- package/src/gantt/renderer/nonworking-day.js +13 -6
- package/src/gantt/renderer/timeline.d.ts +1 -0
- package/src/gantt/renderer/timeline.js +48 -12
- package/src/gantt/renderer/tooltip.js +11 -3
- package/styles/bootstrap-dark.css +442 -427
- package/styles/bootstrap.css +442 -433
- package/styles/bootstrap4.css +454 -479
- package/styles/bootstrap5-dark.css +457 -433
- package/styles/bootstrap5.css +457 -433
- package/styles/fabric-dark.css +438 -421
- package/styles/fabric.css +445 -428
- package/styles/fluent-dark.css +1938 -0
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent.css +1938 -0
- package/styles/fluent.scss +1 -0
- package/styles/gantt/_all.scss +2 -2
- package/styles/gantt/_bootstrap-dark-definition.scss +210 -156
- package/styles/gantt/_bootstrap-definition.scss +211 -157
- package/styles/gantt/_bootstrap4-definition.scss +213 -158
- package/styles/gantt/_bootstrap5-definition.scss +215 -162
- package/styles/gantt/_fabric-dark-definition.scss +211 -157
- package/styles/gantt/_fabric-definition.scss +211 -157
- package/styles/gantt/_fluent-dark-definition.scss +1 -0
- package/styles/gantt/_fluent-definition.scss +215 -162
- package/styles/gantt/_fusionnew-definition.scss +214 -0
- package/styles/gantt/_highcontrast-definition.scss +211 -157
- package/styles/gantt/_highcontrast-light-definition.scss +211 -157
- package/styles/gantt/_layout.scss +1446 -1027
- package/styles/gantt/_material-dark-definition.scss +212 -157
- package/styles/gantt/_material-definition.scss +212 -157
- package/styles/gantt/_material3-definition.scss +215 -0
- package/styles/gantt/_tailwind-definition.scss +215 -161
- package/styles/gantt/_theme.scss +702 -668
- package/styles/gantt/bootstrap-dark.css +442 -427
- package/styles/gantt/bootstrap.css +442 -433
- package/styles/gantt/bootstrap4.css +454 -479
- package/styles/gantt/bootstrap5-dark.css +457 -433
- package/styles/gantt/bootstrap5.css +457 -433
- package/styles/gantt/fabric-dark.css +438 -421
- package/styles/gantt/fabric.css +445 -428
- package/styles/gantt/fluent-dark.css +1938 -0
- package/styles/gantt/fluent-dark.scss +22 -0
- package/styles/gantt/fluent.css +1938 -0
- package/styles/gantt/fluent.scss +22 -0
- package/styles/gantt/highcontrast-light.css +405 -405
- package/styles/gantt/highcontrast.css +444 -456
- package/styles/gantt/icons/_bootstrap-dark.scss +124 -113
- package/styles/gantt/icons/_bootstrap.scss +124 -113
- package/styles/gantt/icons/_bootstrap4.scss +124 -113
- package/styles/gantt/icons/_bootstrap5.scss +124 -112
- package/styles/gantt/icons/_fabric-dark.scss +124 -112
- package/styles/gantt/icons/_fabric.scss +124 -112
- package/styles/gantt/icons/_fluent-dark.scss +1 -0
- package/styles/gantt/icons/_fluent.scss +124 -112
- package/styles/gantt/icons/_fusionnew.scss +120 -0
- package/styles/gantt/icons/_highcontrast.scss +124 -112
- package/styles/gantt/icons/_material-dark.scss +124 -112
- package/styles/gantt/icons/_material.scss +124 -112
- package/styles/gantt/icons/_material3.scss +124 -0
- package/styles/gantt/icons/_tailwind-dark.scss +124 -113
- package/styles/gantt/icons/_tailwind.scss +124 -113
- package/styles/gantt/material-dark.css +446 -417
- package/styles/gantt/material.css +445 -419
- package/styles/gantt/tailwind-dark.css +452 -482
- package/styles/gantt/tailwind.css +449 -479
- package/styles/highcontrast-light.css +405 -405
- package/styles/highcontrast.css +444 -456
- package/styles/material-dark.css +446 -417
- package/styles/material.css +445 -419
- package/styles/tailwind-dark.css +452 -482
- package/styles/tailwind.css +449 -479
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { formatUnit, EventHandler, getValue, isNullOrUndefined} from '@syncfusion/ej2-base';
|
|
2
|
+
import { Gantt } from '../base/gantt';
|
|
3
|
+
import { ScrollArgs } from '../base/interface';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* To handle scroll event on chart and from TreeGrid
|
|
7
|
+
*
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export class ChartScroll {
|
|
11
|
+
private parent: Gantt;
|
|
12
|
+
private element: HTMLElement;
|
|
13
|
+
private isFromTreeGrid: boolean;
|
|
14
|
+
public previousScroll: { top: number, left: number } = { top: 0, left: 0 };
|
|
15
|
+
/**
|
|
16
|
+
* Constructor for the scrolling.
|
|
17
|
+
*
|
|
18
|
+
* @param {Gantt} parent .
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
constructor(parent: Gantt) {
|
|
22
|
+
this.parent = parent;
|
|
23
|
+
this.element = this.parent.ganttChartModule.scrollElement;
|
|
24
|
+
this.addEventListeners();
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Bind event
|
|
28
|
+
*
|
|
29
|
+
* @returns {void} .
|
|
30
|
+
*/
|
|
31
|
+
private addEventListeners(): void {
|
|
32
|
+
this.parent.on('grid-scroll', this.gridScrollHandler, this);
|
|
33
|
+
EventHandler.add(this.element, 'scroll' , this.onScroll, this);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Unbind events
|
|
37
|
+
*
|
|
38
|
+
* @returns {void} .
|
|
39
|
+
*/
|
|
40
|
+
private removeEventListeners(): void {
|
|
41
|
+
EventHandler.remove(this.element, 'scroll', this.onScroll);
|
|
42
|
+
this.parent.off('grid-scroll', this.gridScrollHandler);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param {object} args .
|
|
47
|
+
* @returns {void} .
|
|
48
|
+
*/
|
|
49
|
+
private gridScrollHandler(args: object ): void {
|
|
50
|
+
this.element.scrollTop = getValue('top', args);
|
|
51
|
+
this.isFromTreeGrid = true;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Method to update vertical grid line, holiday, event markers and weekend container's top position on scroll action
|
|
55
|
+
*
|
|
56
|
+
* @returns {void} .
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
public updateTopPosition(): void {
|
|
60
|
+
const content: HTMLElement = this.parent.treeGrid.element.querySelector('.e-content');
|
|
61
|
+
const contentScrollTop: number = content.scrollTop;
|
|
62
|
+
let scrollTop: number;
|
|
63
|
+
if (this.parent.virtualScrollModule && this.parent.enableVirtualization) {
|
|
64
|
+
const top: number = this.parent.virtualScrollModule.getTopPosition();
|
|
65
|
+
scrollTop = contentScrollTop - top;
|
|
66
|
+
} else {
|
|
67
|
+
scrollTop = contentScrollTop;
|
|
68
|
+
}
|
|
69
|
+
if (!isNullOrUndefined(this.parent.dayMarkersModule)) {
|
|
70
|
+
const holidayContainer: HTMLElement = getValue('nonworkingDayRender.holidayContainer', this.parent.dayMarkersModule);
|
|
71
|
+
const weekendContainer: HTMLElement = getValue('nonworkingDayRender.weekendContainer', this.parent.dayMarkersModule);
|
|
72
|
+
const eventMarkersContainer: HTMLElement = getValue('eventMarkerRender.eventMarkersContainer', this.parent.dayMarkersModule);
|
|
73
|
+
if (holidayContainer) {
|
|
74
|
+
holidayContainer.style.top = formatUnit(scrollTop);
|
|
75
|
+
}
|
|
76
|
+
if (weekendContainer) {
|
|
77
|
+
weekendContainer.style.top = formatUnit(scrollTop);
|
|
78
|
+
}
|
|
79
|
+
if (eventMarkersContainer) {
|
|
80
|
+
eventMarkersContainer.style.top = formatUnit(scrollTop);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (this.parent.chartVerticalLineContainer) {
|
|
84
|
+
this.parent.chartVerticalLineContainer.style.top = formatUnit(scrollTop);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Scroll event handler
|
|
89
|
+
*
|
|
90
|
+
* @returns {void} .
|
|
91
|
+
*/
|
|
92
|
+
private onScroll(): void {
|
|
93
|
+
const scrollArgs: ScrollArgs = {};
|
|
94
|
+
if (this.element.scrollTop !== this.previousScroll.top) {
|
|
95
|
+
// eslint-disable-next-line
|
|
96
|
+
!this.isFromTreeGrid ? this.parent.notify('chartScroll', { top: this.element.scrollTop }) : (this.isFromTreeGrid = false);
|
|
97
|
+
scrollArgs.previousScrollTop = this.previousScroll.top;
|
|
98
|
+
this.previousScroll.top = this.element.scrollTop;
|
|
99
|
+
scrollArgs.scrollTop = this.element.scrollTop;
|
|
100
|
+
scrollArgs.scrollDirection = 'Vertical';
|
|
101
|
+
scrollArgs.action = 'VerticalScroll';
|
|
102
|
+
this.updateTopPosition();
|
|
103
|
+
}
|
|
104
|
+
if (this.element.scrollLeft !== this.previousScroll.left) {
|
|
105
|
+
this.parent.ganttChartModule.chartTimelineContainer.scrollLeft = this.element.scrollLeft;
|
|
106
|
+
scrollArgs.previousScrollLeft = this.previousScroll.left;
|
|
107
|
+
this.previousScroll.left = this.element.scrollLeft;
|
|
108
|
+
scrollArgs.scrollLeft = this.element.scrollLeft;
|
|
109
|
+
scrollArgs.scrollDirection = 'Horizontal';
|
|
110
|
+
scrollArgs.action = 'HorizontalScroll';
|
|
111
|
+
}
|
|
112
|
+
scrollArgs.requestType = 'scroll';
|
|
113
|
+
this.parent.trigger('actionComplete', scrollArgs);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* To set height for chart scroll container
|
|
117
|
+
*
|
|
118
|
+
* @param {string | number} height - To set height for scroll container in chart side
|
|
119
|
+
* @returns {void} .
|
|
120
|
+
* @private
|
|
121
|
+
*/
|
|
122
|
+
public setHeight(height: string | number): void {
|
|
123
|
+
this.element.style.height = formatUnit(height);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* To set width for chart scroll container
|
|
127
|
+
*
|
|
128
|
+
* @param {string | number} width - To set width to scroll container
|
|
129
|
+
* @returns {void} .
|
|
130
|
+
* @private
|
|
131
|
+
*/
|
|
132
|
+
public setWidth(width: string | number): void {
|
|
133
|
+
this.element.style.width = formatUnit(width);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* To set scroll top for chart scroll container
|
|
137
|
+
*
|
|
138
|
+
* @param {number} scrollTop - To set scroll top for scroll container
|
|
139
|
+
* @returns {void} .
|
|
140
|
+
* @private
|
|
141
|
+
*/
|
|
142
|
+
public setScrollTop(scrollTop: number): void {
|
|
143
|
+
this.element.scrollTop = scrollTop;
|
|
144
|
+
this.parent.treeGrid.element.querySelector('.e-content').scrollTop = scrollTop;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* To set scroll left for chart scroll container
|
|
148
|
+
*
|
|
149
|
+
* @param {number} scrollLeft - To set scroll left for scroll container
|
|
150
|
+
* @returns {void} .
|
|
151
|
+
*/
|
|
152
|
+
public setScrollLeft(scrollLeft: number): void {
|
|
153
|
+
this.element.scrollLeft = scrollLeft;
|
|
154
|
+
this.parent.ganttChartModule.chartTimelineContainer.scrollLeft = this.element.scrollLeft;
|
|
155
|
+
this.previousScroll.left = this.element.scrollLeft;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Destroy scroll related elements and unbind the events
|
|
160
|
+
*
|
|
161
|
+
* @returns {void} .
|
|
162
|
+
* @private
|
|
163
|
+
*/
|
|
164
|
+
public destroy(): void {
|
|
165
|
+
this.removeEventListeners();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Gantt } from '../base/gantt';
|
|
2
|
+
import { TreeGrid, ColumnMenu as TreeGridColumnMenu } from '@syncfusion/ej2-treegrid';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Configures columnMenu collection in Gantt.
|
|
6
|
+
*/
|
|
7
|
+
export class ColumnMenu {
|
|
8
|
+
private parent: Gantt;
|
|
9
|
+
|
|
10
|
+
constructor(parent?: Gantt) {
|
|
11
|
+
TreeGrid.Inject(TreeGridColumnMenu);
|
|
12
|
+
this.parent = parent;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @returns {HTMLAllCollection} .
|
|
16
|
+
* To get column menu collection.
|
|
17
|
+
*/
|
|
18
|
+
public getColumnMenu(): HTMLElement {
|
|
19
|
+
return this.parent.treeGrid.columnMenuModule.getColumnMenu();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
public destroy(): void {
|
|
23
|
+
// column menu destroy module
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* For internal use only - Get the module name.
|
|
28
|
+
*
|
|
29
|
+
* @returns {string} .
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
private getModuleName(): string {
|
|
33
|
+
return 'columnMenu';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { TreeGrid, Reorder as TreeGridReorder } from '@syncfusion/ej2-treegrid';
|
|
2
|
+
import { Gantt } from '../base/gantt';
|
|
3
|
+
import { ColumnDragEventArgs } from '@syncfusion/ej2-grids';
|
|
4
|
+
/**
|
|
5
|
+
* To handle column reorder action from TreeGrid
|
|
6
|
+
*/
|
|
7
|
+
export class Reorder {
|
|
8
|
+
public parent: Gantt;
|
|
9
|
+
constructor(gantt: Gantt) {
|
|
10
|
+
this.parent = gantt;
|
|
11
|
+
TreeGrid.Inject(TreeGridReorder);
|
|
12
|
+
this.parent.treeGrid.allowReordering = this.parent.allowReordering;
|
|
13
|
+
this.bindEvents();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Get module name
|
|
18
|
+
*
|
|
19
|
+
* @returns {string} .
|
|
20
|
+
*/
|
|
21
|
+
private getModuleName(): string {
|
|
22
|
+
return 'reorder';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* To bind reorder events.
|
|
27
|
+
*
|
|
28
|
+
* @returns {void} .
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
private bindEvents(): void {
|
|
32
|
+
this.parent.treeGrid.columnDragStart = (args: ColumnDragEventArgs) => {
|
|
33
|
+
this.parent.trigger('columnDragStart', args);
|
|
34
|
+
};
|
|
35
|
+
this.parent.treeGrid.columnDrag = (args: ColumnDragEventArgs) => {
|
|
36
|
+
this.parent.trigger('columnDrag', args);
|
|
37
|
+
};
|
|
38
|
+
this.parent.treeGrid.columnDrop = (args: ColumnDragEventArgs) => {
|
|
39
|
+
this.parent.trigger('columnDrop', args);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* To destroy the column-reorder.
|
|
45
|
+
*
|
|
46
|
+
* @returns {void} .
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
public destroy(): void {
|
|
50
|
+
// Destroy Method
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { TreeGrid, Resize as TreeGridResize } from '@syncfusion/ej2-treegrid';
|
|
2
|
+
import { Gantt } from '../base/gantt';
|
|
3
|
+
import { ResizeArgs } from '@syncfusion/ej2-grids';
|
|
4
|
+
/**
|
|
5
|
+
* Column resize action related code goes here
|
|
6
|
+
*/
|
|
7
|
+
export class Resize {
|
|
8
|
+
public parent: Gantt;
|
|
9
|
+
constructor(gantt: Gantt) {
|
|
10
|
+
this.parent = gantt;
|
|
11
|
+
TreeGrid.Inject(TreeGridResize);
|
|
12
|
+
this.parent.treeGrid.allowResizing = this.parent.allowResizing;
|
|
13
|
+
this.bindEvents();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Get module name
|
|
18
|
+
*
|
|
19
|
+
* @returns {void} .
|
|
20
|
+
*/
|
|
21
|
+
private getModuleName(): string {
|
|
22
|
+
return 'resize';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* To bind resize events.
|
|
27
|
+
*
|
|
28
|
+
* @returns {void} .
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
private bindEvents(): void {
|
|
32
|
+
this.parent.treeGrid.resizeStart = (args: ResizeArgs) => {
|
|
33
|
+
this.parent.trigger('resizeStart', args);
|
|
34
|
+
};
|
|
35
|
+
this.parent.treeGrid.resizing = (args: ResizeArgs) => {
|
|
36
|
+
this.parent.trigger('resizing', args);
|
|
37
|
+
};
|
|
38
|
+
this.parent.treeGrid.resizeStop = (args: ResizeArgs) => {
|
|
39
|
+
this.parent.trigger('resizeStop', args);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* To destroy the column-resizer.
|
|
45
|
+
*
|
|
46
|
+
* @returns {void} .
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
public destroy(): void {
|
|
50
|
+
// Destroy Method
|
|
51
|
+
}
|
|
52
|
+
}
|