@progress/kendo-angular-gantt 0.3.0-dev.202201131518 → 0.3.0-dev.202201190830
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/dist/cdn/js/kendo-angular-gantt.js +2 -2
- package/dist/cdn/main.js +2 -2
- package/dist/es/editing/edit-dialog.component.js +3 -3
- package/dist/es/editing/edit.service.js +4 -2
- package/dist/es/gantt.component.js +191 -24
- package/dist/es/index.js +1 -0
- package/dist/es/models/events/task-delete-event.interface.js +4 -0
- package/dist/es/navigation/navigation-models.js +4 -0
- package/dist/es/navigation/navigation.service.js +390 -0
- package/dist/es/navigation/utils.js +77 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rendering/gantt-milestone-task.component.js +7 -4
- package/dist/es/rendering/gantt-summary-task.component.js +22 -4
- package/dist/es/rendering/gantt-task-base.js +57 -6
- package/dist/es/rendering/gantt-task.component.js +9 -6
- package/dist/es/rendering/gantt-tasks-table-body.component.js +9 -5
- package/dist/es/timeline/gantt-timeline.component.js +10 -6
- package/dist/es/toolbar/toolbar.component.js +12 -13
- package/dist/es/toolbar/view-selector.component.js +1 -1
- package/dist/es/utils.js +14 -4
- package/dist/es2015/editing/edit-dialog.component.d.ts +1 -1
- package/dist/es2015/editing/edit-dialog.component.js +11 -3
- package/dist/es2015/editing/edit.service.d.ts +2 -3
- package/dist/es2015/editing/edit.service.js +4 -2
- package/dist/es2015/editing/utils.d.ts +2 -2
- package/dist/es2015/gantt.component.d.ts +75 -16
- package/dist/es2015/gantt.component.js +177 -26
- package/dist/es2015/index.d.ts +1 -0
- package/dist/es2015/index.js +1 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/models/events/task-click-event.interface.d.ts +3 -3
- package/dist/es2015/models/events/task-delete-event.interface.d.ts +21 -0
- package/dist/es2015/models/events/task-delete-event.interface.js +4 -0
- package/dist/es2015/models/events/task-edit-event.interface.d.ts +27 -10
- package/dist/es2015/models/models.d.ts +2 -0
- package/dist/es2015/navigation/navigation-models.d.ts +34 -0
- package/dist/es2015/navigation/navigation-models.js +4 -0
- package/dist/es2015/navigation/navigation.service.d.ts +126 -0
- package/dist/es2015/navigation/navigation.service.js +355 -0
- package/dist/es2015/navigation/utils.d.ts +26 -0
- package/dist/es2015/navigation/utils.js +69 -0
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/rendering/gantt-milestone-task.component.d.ts +2 -1
- package/dist/es2015/rendering/gantt-milestone-task.component.js +18 -4
- package/dist/es2015/rendering/gantt-summary-task.component.d.ts +4 -1
- package/dist/es2015/rendering/gantt-summary-task.component.js +30 -4
- package/dist/es2015/rendering/gantt-task-base.d.ts +10 -2
- package/dist/es2015/rendering/gantt-task-base.js +48 -6
- package/dist/es2015/rendering/gantt-task.component.d.ts +3 -2
- package/dist/es2015/rendering/gantt-task.component.js +31 -9
- package/dist/es2015/rendering/gantt-tasks-table-body.component.d.ts +5 -3
- package/dist/es2015/rendering/gantt-tasks-table-body.component.js +23 -12
- package/dist/es2015/scrolling/scroll-sync.service.d.ts +1 -1
- package/dist/es2015/timeline/gantt-timeline.component.d.ts +5 -3
- package/dist/es2015/timeline/gantt-timeline.component.js +15 -6
- package/dist/es2015/toolbar/toolbar.component.d.ts +4 -5
- package/dist/es2015/toolbar/toolbar.component.js +12 -13
- package/dist/es2015/toolbar/view-selector.component.js +3 -1
- package/dist/es2015/utils.d.ts +10 -3
- package/dist/es2015/utils.js +14 -4
- package/dist/fesm2015/index.js +2311 -1610
- package/dist/fesm5/index.js +1722 -1013
- package/dist/npm/editing/edit-dialog.component.js +3 -3
- package/dist/npm/editing/edit.service.js +4 -2
- package/dist/npm/gantt.component.js +191 -24
- package/dist/npm/index.js +2 -0
- package/dist/npm/models/events/task-delete-event.interface.js +6 -0
- package/dist/npm/navigation/navigation-models.js +6 -0
- package/dist/npm/navigation/navigation.service.js +392 -0
- package/dist/npm/navigation/utils.js +79 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/rendering/gantt-milestone-task.component.js +7 -4
- package/dist/npm/rendering/gantt-summary-task.component.js +22 -4
- package/dist/npm/rendering/gantt-task-base.js +57 -6
- package/dist/npm/rendering/gantt-task.component.js +9 -6
- package/dist/npm/rendering/gantt-tasks-table-body.component.js +9 -5
- package/dist/npm/timeline/gantt-timeline.component.js +10 -6
- package/dist/npm/toolbar/toolbar.component.js +10 -11
- package/dist/npm/toolbar/view-selector.component.js +1 -1
- package/dist/npm/utils.js +14 -4
- package/dist/systemjs/kendo-angular-gantt.js +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { AfterViewInit, ElementRef, EventEmitter, NgZone, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
6
6
|
import { ScrollSyncService } from '../scrolling/scroll-sync.service';
|
|
7
7
|
import { DependencyDomService } from '../dependencies/dependency-dom.service';
|
|
8
|
+
import { ViewItem } from '../models/view-item.interface';
|
|
8
9
|
import { TimelineViewType, TaskClassFn, DragScrollSettings } from '../models/models';
|
|
9
10
|
/**
|
|
10
11
|
* @hidden
|
|
@@ -33,7 +34,7 @@ export declare class GanttTimelineComponent implements AfterViewInit {
|
|
|
33
34
|
*/
|
|
34
35
|
dependencyDragCreatePolyline: ElementRef<SVGPolylineElement>;
|
|
35
36
|
hostClass: boolean;
|
|
36
|
-
rows:
|
|
37
|
+
rows: ViewItem[];
|
|
37
38
|
slots: any[];
|
|
38
39
|
groupSlots: any[];
|
|
39
40
|
tableWidth: number;
|
|
@@ -42,10 +43,11 @@ export declare class GanttTimelineComponent implements AfterViewInit {
|
|
|
42
43
|
taskTemplate: TemplateRef<any>;
|
|
43
44
|
summaryTaskTemplate: TemplateRef<any>;
|
|
44
45
|
taskClass: TaskClassFn;
|
|
45
|
-
isTaskSelected: (item: object) => boolean;
|
|
46
46
|
renderDependencyDragClues: boolean;
|
|
47
47
|
dragScrollSettings: DragScrollSettings;
|
|
48
|
-
|
|
48
|
+
selectable: boolean;
|
|
49
|
+
isTaskSelected: (item: object) => boolean;
|
|
50
|
+
isExpanded: (item: object) => boolean;
|
|
49
51
|
dependencies: any[];
|
|
50
52
|
timelineContainerPress: EventEmitter<any>;
|
|
51
53
|
timelineContainerDrag: EventEmitter<any>;
|
|
@@ -120,10 +120,6 @@ tslib_1.__decorate([
|
|
|
120
120
|
Input(),
|
|
121
121
|
tslib_1.__metadata("design:type", Function)
|
|
122
122
|
], GanttTimelineComponent.prototype, "taskClass", void 0);
|
|
123
|
-
tslib_1.__decorate([
|
|
124
|
-
Input(),
|
|
125
|
-
tslib_1.__metadata("design:type", Function)
|
|
126
|
-
], GanttTimelineComponent.prototype, "isTaskSelected", void 0);
|
|
127
123
|
tslib_1.__decorate([
|
|
128
124
|
Input(),
|
|
129
125
|
tslib_1.__metadata("design:type", Boolean)
|
|
@@ -132,10 +128,18 @@ tslib_1.__decorate([
|
|
|
132
128
|
Input(),
|
|
133
129
|
tslib_1.__metadata("design:type", Object)
|
|
134
130
|
], GanttTimelineComponent.prototype, "dragScrollSettings", void 0);
|
|
131
|
+
tslib_1.__decorate([
|
|
132
|
+
Input(),
|
|
133
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
134
|
+
], GanttTimelineComponent.prototype, "selectable", void 0);
|
|
135
|
+
tslib_1.__decorate([
|
|
136
|
+
Input(),
|
|
137
|
+
tslib_1.__metadata("design:type", Function)
|
|
138
|
+
], GanttTimelineComponent.prototype, "isTaskSelected", void 0);
|
|
135
139
|
tslib_1.__decorate([
|
|
136
140
|
Input(),
|
|
137
141
|
tslib_1.__metadata("design:type", Function)
|
|
138
|
-
], GanttTimelineComponent.prototype, "
|
|
142
|
+
], GanttTimelineComponent.prototype, "isExpanded", void 0);
|
|
139
143
|
tslib_1.__decorate([
|
|
140
144
|
Input(),
|
|
141
145
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -171,9 +175,13 @@ GanttTimelineComponent = tslib_1.__decorate([
|
|
|
171
175
|
</table>
|
|
172
176
|
</div>
|
|
173
177
|
</div>
|
|
178
|
+
<!-- tabindex="-1" required for https://bugzilla.mozilla.org/show_bug.cgi?id=1069739 -->
|
|
174
179
|
<div
|
|
175
180
|
#timelineContent
|
|
176
181
|
class="k-grid-content"
|
|
182
|
+
tabindex="-1"
|
|
183
|
+
role="tree"
|
|
184
|
+
aria-roledescription="Timeline"
|
|
177
185
|
kendoGanttTimelineScrollable
|
|
178
186
|
[scrollSettings]="dragScrollSettings"
|
|
179
187
|
kendoDraggable
|
|
@@ -232,7 +240,8 @@ GanttTimelineComponent = tslib_1.__decorate([
|
|
|
232
240
|
[taskTemplate]="taskTemplate"
|
|
233
241
|
[summaryTaskTemplate]="summaryTaskTemplate"
|
|
234
242
|
[taskClass]="taskClass"
|
|
235
|
-
[
|
|
243
|
+
[isExpanded]="isExpanded"
|
|
244
|
+
[selectable]="selectable"
|
|
236
245
|
[isTaskSelected]="isTaskSelected"
|
|
237
246
|
[renderDependencyDragClues]="renderDependencyDragClues"
|
|
238
247
|
>
|
|
@@ -3,22 +3,21 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { TemplateRef } from '@angular/core';
|
|
6
|
-
import { GanttComponent } from
|
|
7
|
-
import { ScrollSyncService } from '../scrolling/scroll-sync.service';
|
|
6
|
+
import { GanttComponent } from '../gantt.component';
|
|
8
7
|
import { TimelineViewType } from './../models/timeline-view';
|
|
9
8
|
/**
|
|
10
9
|
* @hidden
|
|
11
10
|
*/
|
|
12
11
|
export declare class ToolbarComponent {
|
|
13
12
|
gantt: GanttComponent;
|
|
14
|
-
private scrollSyncService;
|
|
15
13
|
context: any;
|
|
14
|
+
role: string;
|
|
16
15
|
showAddTask: boolean;
|
|
17
16
|
showViewSelector: boolean;
|
|
18
17
|
position: 'top' | 'bottom';
|
|
19
18
|
readonly toolbarTemplateRef: TemplateRef<any>;
|
|
20
19
|
readonly renderTemplate: boolean;
|
|
21
20
|
private _position;
|
|
22
|
-
constructor(gantt: GanttComponent
|
|
23
|
-
|
|
21
|
+
constructor(gantt: GanttComponent);
|
|
22
|
+
handleViewChange(view: TimelineViewType): void;
|
|
24
23
|
}
|
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Component, Input } from '@angular/core';
|
|
7
|
-
import { GanttComponent } from
|
|
8
|
-
import { ScrollSyncService } from '../scrolling/scroll-sync.service';
|
|
6
|
+
import { Component, Input, HostBinding } from '@angular/core';
|
|
7
|
+
import { GanttComponent } from '../gantt.component';
|
|
9
8
|
/**
|
|
10
9
|
* @hidden
|
|
11
10
|
*/
|
|
12
11
|
let ToolbarComponent = class ToolbarComponent {
|
|
13
|
-
constructor(gantt
|
|
12
|
+
constructor(gantt) {
|
|
14
13
|
this.gantt = gantt;
|
|
15
|
-
this.scrollSyncService = scrollSyncService;
|
|
16
14
|
this.context = {};
|
|
15
|
+
this.role = 'toolbar';
|
|
17
16
|
}
|
|
18
17
|
set position(value) {
|
|
19
18
|
this.context.position = this._position = value;
|
|
@@ -29,13 +28,14 @@ let ToolbarComponent = class ToolbarComponent {
|
|
|
29
28
|
const templatePosition = ganttToolbarTemplate ? ganttToolbarTemplate.position : null;
|
|
30
29
|
return ganttToolbarTemplate && (templatePosition === 'both' || templatePosition === this.position);
|
|
31
30
|
}
|
|
32
|
-
|
|
33
|
-
this.gantt.
|
|
34
|
-
this.gantt.loadTimelineData();
|
|
35
|
-
this.gantt.activeViewChange.emit(e);
|
|
36
|
-
this.scrollSyncService.resetTimelineScrollLeft();
|
|
31
|
+
handleViewChange(view) {
|
|
32
|
+
this.gantt.changeActiveView(view);
|
|
37
33
|
}
|
|
38
34
|
};
|
|
35
|
+
tslib_1.__decorate([
|
|
36
|
+
HostBinding('attr.role'),
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
38
|
+
], ToolbarComponent.prototype, "role", void 0);
|
|
39
39
|
tslib_1.__decorate([
|
|
40
40
|
Input(),
|
|
41
41
|
tslib_1.__metadata("design:type", Boolean)
|
|
@@ -60,7 +60,7 @@ ToolbarComponent = tslib_1.__decorate([
|
|
|
60
60
|
*ngIf="showViewSelector"
|
|
61
61
|
[views]="gantt.viewTypes"
|
|
62
62
|
[activeView]="gantt.activeView"
|
|
63
|
-
(activeViewChange)="
|
|
63
|
+
(activeViewChange)="handleViewChange($event)"></kendo-gantt-view-selector>
|
|
64
64
|
</ng-container>
|
|
65
65
|
<ng-template
|
|
66
66
|
*ngIf="renderTemplate"
|
|
@@ -70,7 +70,6 @@ ToolbarComponent = tslib_1.__decorate([
|
|
|
70
70
|
</ng-template>
|
|
71
71
|
`
|
|
72
72
|
}),
|
|
73
|
-
tslib_1.__metadata("design:paramtypes", [GanttComponent
|
|
74
|
-
ScrollSyncService])
|
|
73
|
+
tslib_1.__metadata("design:paramtypes", [GanttComponent])
|
|
75
74
|
], ToolbarComponent);
|
|
76
75
|
export { ToolbarComponent };
|
|
@@ -57,7 +57,9 @@ ViewSelectorComponent = tslib_1.__decorate([
|
|
|
57
57
|
Component({
|
|
58
58
|
selector: 'kendo-gantt-view-selector',
|
|
59
59
|
template: `
|
|
60
|
-
<select
|
|
60
|
+
<select
|
|
61
|
+
class="k-dropdown k-views-dropdown"
|
|
62
|
+
aria-label="View Selector"
|
|
61
63
|
[value]="activeView"
|
|
62
64
|
(change)="activeViewChange.emit($event.target.value)">
|
|
63
65
|
<option *ngFor="let view of views" [value]="view">{{getViewTypeText(view)}}</option>
|
package/dist/es2015/utils.d.ts
CHANGED
|
@@ -96,21 +96,28 @@ export declare const getClosestTask: (element: Element, parentScope: Element) =>
|
|
|
96
96
|
* Uses the `data-task-index` attribute assigned to each task.
|
|
97
97
|
* Restricts the search up to the provided parent element from the second param.
|
|
98
98
|
*/
|
|
99
|
-
export declare const getClosestTaskIndex: (element: Element, parentScope: Element) => number;
|
|
99
|
+
export declare const getClosestTaskIndex: (element: EventTarget | Element, parentScope: Element) => number;
|
|
100
100
|
/**
|
|
101
101
|
* @hidden
|
|
102
102
|
*
|
|
103
103
|
* Checks whether the queried item or its parent items has a `k-task` selector.
|
|
104
104
|
* Restricts the search up to the provided parent element from the second param.
|
|
105
105
|
*/
|
|
106
|
-
export declare const isTask: (contender: Element, parentScope: Element) => boolean;
|
|
106
|
+
export declare const isTask: (contender: EventTarget | Element, parentScope: Element) => boolean;
|
|
107
|
+
/**
|
|
108
|
+
* @hidden
|
|
109
|
+
*
|
|
110
|
+
* Checks whether the queried item or its parent items has a `k-toolbar` selector.
|
|
111
|
+
* Restricts the search up to the provided parent element from the second param.
|
|
112
|
+
*/
|
|
113
|
+
export declare const isToolbar: (contender: EventTarget | Element, parentScope: Element) => boolean;
|
|
107
114
|
/**
|
|
108
115
|
* @hidden
|
|
109
116
|
*
|
|
110
117
|
* Checks whether the queried item or its parent items has a `k-task-actions` selector - used for the clear button.
|
|
111
118
|
* Restricts the search up to the provided parent element from the second param.
|
|
112
119
|
*/
|
|
113
|
-
export declare const isClearButton: (contender: Element, parentScope: Element) => boolean;
|
|
120
|
+
export declare const isClearButton: (contender: EventTarget | Element, parentScope: Element) => boolean;
|
|
114
121
|
/**
|
|
115
122
|
* @hidden
|
|
116
123
|
*
|
package/dist/es2015/utils.js
CHANGED
|
@@ -160,6 +160,16 @@ export const isTask = (contender, parentScope) => {
|
|
|
160
160
|
const task = closestInScope(contender, matchesClasses('k-task'), parentScope);
|
|
161
161
|
return isPresent(task);
|
|
162
162
|
};
|
|
163
|
+
/**
|
|
164
|
+
* @hidden
|
|
165
|
+
*
|
|
166
|
+
* Checks whether the queried item or its parent items has a `k-toolbar` selector.
|
|
167
|
+
* Restricts the search up to the provided parent element from the second param.
|
|
168
|
+
*/
|
|
169
|
+
export const isToolbar = (contender, parentScope) => {
|
|
170
|
+
const toolbar = closestInScope(contender, matchesClasses('k-gantt-toolbar'), parentScope);
|
|
171
|
+
return isPresent(toolbar);
|
|
172
|
+
};
|
|
163
173
|
/**
|
|
164
174
|
* @hidden
|
|
165
175
|
*
|
|
@@ -234,12 +244,12 @@ export const sameTaskClues = (fromTaskClue, toTaskClue, parentScope) => {
|
|
|
234
244
|
* If the contender is above the max value, the max value is returned.
|
|
235
245
|
*/
|
|
236
246
|
export const fitToRange = (contender, min, max) => {
|
|
237
|
-
if (contender
|
|
238
|
-
return max;
|
|
239
|
-
}
|
|
240
|
-
else if (contender < min) {
|
|
247
|
+
if (!isPresent(contender) || contender < min) {
|
|
241
248
|
return min;
|
|
242
249
|
}
|
|
250
|
+
else if (contender > max) {
|
|
251
|
+
return max;
|
|
252
|
+
}
|
|
243
253
|
else {
|
|
244
254
|
return contender;
|
|
245
255
|
}
|