@worktile/gantt 12.2.0-next.0 → 12.2.1
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/bundles/worktile-gantt.umd.js +516 -325
- package/bundles/worktile-gantt.umd.js.map +1 -1
- package/class/event.d.ts +6 -0
- package/class/index.d.ts +1 -0
- package/class/item.d.ts +1 -1
- package/class/link.d.ts +19 -4
- package/components/links/lines/curve.d.ts +10 -0
- package/components/links/lines/factory.d.ts +5 -0
- package/components/links/lines/line.d.ts +8 -0
- package/components/links/lines/straight.d.ts +9 -0
- package/components/links/links.component.d.ts +5 -4
- package/components/table/gantt-table.component.d.ts +8 -5
- package/esm2015/class/event.js +3 -1
- package/esm2015/class/index.js +2 -1
- package/esm2015/class/item.js +4 -3
- package/esm2015/class/link.js +9 -4
- package/esm2015/components/bar/bar-drag.js +50 -24
- package/esm2015/components/bar/bar.component.js +4 -4
- package/esm2015/components/calendar/calendar.component.js +3 -3
- package/esm2015/components/drag-backdrop/drag-backdrop.component.js +3 -3
- package/esm2015/components/icon/icon.component.js +3 -3
- package/esm2015/components/links/lines/curve.js +96 -0
- package/esm2015/components/links/lines/factory.js +14 -0
- package/esm2015/components/links/lines/line.js +24 -0
- package/esm2015/components/links/lines/straight.js +58 -0
- package/esm2015/components/links/links.component.js +37 -114
- package/esm2015/components/main/gantt-main.component.js +4 -4
- package/esm2015/components/range/range.component.js +3 -3
- package/esm2015/components/table/gantt-table.component.js +17 -7
- package/esm2015/gantt-dom.service.js +3 -3
- package/esm2015/gantt-drag-container.js +57 -40
- package/esm2015/gantt-item-upper.js +3 -3
- package/esm2015/gantt-print.service.js +3 -3
- package/esm2015/gantt-upper.js +55 -4
- package/esm2015/gantt.component.js +25 -5
- package/esm2015/gantt.config.js +8 -2
- package/esm2015/gantt.module.js +4 -4
- package/esm2015/gantt.pipe.js +9 -9
- package/esm2015/root.component.js +3 -3
- package/esm2015/table/gantt-column.component.js +3 -3
- package/esm2015/table/gantt-table.component.js +3 -3
- package/fesm2015/worktile-gantt.js +475 -243
- package/fesm2015/worktile-gantt.js.map +1 -1
- package/gantt-drag-container.d.ts +20 -8
- package/gantt-upper.d.ts +17 -2
- package/gantt.component.d.ts +4 -2
- package/gantt.config.d.ts +7 -0
- package/main.bundle.scss +43 -1
- package/package.json +1 -1
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { GanttDragEvent, GanttLinkDragEvent } from './class/event';
|
|
3
3
|
import { GanttItemInternal } from './class/item';
|
|
4
|
+
import { GanttUpper } from './gantt-upper';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare
|
|
6
|
+
export declare enum InBarPosition {
|
|
7
|
+
start = "start",
|
|
8
|
+
finish = "finish"
|
|
9
|
+
}
|
|
10
|
+
export declare type LinkDragPosition = {
|
|
11
|
+
element: HTMLElement;
|
|
12
|
+
item: GanttItemInternal;
|
|
13
|
+
pos?: InBarPosition;
|
|
14
|
+
};
|
|
15
|
+
export interface LinkDragPath {
|
|
16
|
+
from?: LinkDragPosition;
|
|
17
|
+
to?: LinkDragPosition;
|
|
18
|
+
}
|
|
6
19
|
export declare class GanttDragContainer {
|
|
20
|
+
ganttUpper: GanttUpper;
|
|
7
21
|
dragStarted: EventEmitter<GanttDragEvent<unknown>>;
|
|
8
22
|
dragMoved: EventEmitter<GanttDragEvent<unknown>>;
|
|
9
23
|
dragEnded: EventEmitter<GanttDragEvent<unknown>>;
|
|
@@ -11,14 +25,12 @@ export declare class GanttDragContainer {
|
|
|
11
25
|
linkDragEntered: EventEmitter<GanttLinkDragEvent<unknown>>;
|
|
12
26
|
linkDragEnded: EventEmitter<GanttLinkDragEvent<unknown>>;
|
|
13
27
|
linkDraggingId: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
emitLinkDragStarted(from: LinkDragFrom, item: GanttItemInternal): void;
|
|
19
|
-
emitLinkDragEntered(item: GanttItemInternal): void;
|
|
28
|
+
linkDragPath: LinkDragPath;
|
|
29
|
+
constructor(ganttUpper: GanttUpper);
|
|
30
|
+
emitLinkDragStarted(from: LinkDragPosition): void;
|
|
31
|
+
emitLinkDragEntered(to: LinkDragPosition): void;
|
|
20
32
|
emitLinkDragLeaved(): void;
|
|
21
|
-
emitLinkDragEnded(): void;
|
|
33
|
+
emitLinkDragEnded(to: LinkDragPosition): void;
|
|
22
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<GanttDragContainer, never>;
|
|
23
35
|
static ɵprov: i0.ɵɵInjectableDeclaration<GanttDragContainer>;
|
|
24
36
|
}
|
package/gantt-upper.d.ts
CHANGED
|
@@ -5,12 +5,15 @@ import { GanttView, GanttViewOptions } from './views/view';
|
|
|
5
5
|
import { GanttStyles } from './gantt.styles';
|
|
6
6
|
import { GanttDragContainer } from './gantt-drag-container';
|
|
7
7
|
import { GanttGlobalConfig } from './gantt.config';
|
|
8
|
+
import { GanttLinkOptions } from './class/link';
|
|
9
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
10
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
8
11
|
import * as i0 from "@angular/core";
|
|
9
12
|
export declare abstract class GanttUpper {
|
|
10
13
|
protected elementRef: ElementRef<HTMLElement>;
|
|
11
14
|
protected cdr: ChangeDetectorRef;
|
|
12
15
|
protected ngZone: NgZone;
|
|
13
|
-
|
|
16
|
+
config: GanttGlobalConfig;
|
|
14
17
|
originItems: GanttItem[];
|
|
15
18
|
originGroups: GanttGroup[];
|
|
16
19
|
viewType: GanttViewType;
|
|
@@ -20,7 +23,13 @@ export declare abstract class GanttUpper {
|
|
|
20
23
|
draggable: boolean;
|
|
21
24
|
styles: GanttStyles;
|
|
22
25
|
viewOptions: GanttViewOptions;
|
|
26
|
+
set linkOptions(options: GanttLinkOptions);
|
|
27
|
+
get linkOptions(): GanttLinkOptions;
|
|
23
28
|
disabledLoadOnScroll: boolean;
|
|
29
|
+
set selectable(value: BooleanInput);
|
|
30
|
+
get selectable(): boolean;
|
|
31
|
+
set multiple(value: BooleanInput);
|
|
32
|
+
get multiple(): boolean;
|
|
24
33
|
loadOnScroll: EventEmitter<GanttLoadOnScrollEvent>;
|
|
25
34
|
dragStarted: EventEmitter<GanttDragEvent<unknown>>;
|
|
26
35
|
dragMoved: EventEmitter<GanttDragEvent<unknown>>;
|
|
@@ -42,7 +51,11 @@ export declare abstract class GanttUpper {
|
|
|
42
51
|
firstChange: boolean;
|
|
43
52
|
dragContainer: GanttDragContainer;
|
|
44
53
|
unsubscribe$: Subject<unknown>;
|
|
54
|
+
selectionModel: SelectionModel<string>;
|
|
45
55
|
private groupsMap;
|
|
56
|
+
private _selectable;
|
|
57
|
+
private _multiple;
|
|
58
|
+
private _linkOptions;
|
|
46
59
|
ganttClass: boolean;
|
|
47
60
|
constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, ngZone: NgZone, config: GanttGlobalConfig);
|
|
48
61
|
private createView;
|
|
@@ -52,6 +65,7 @@ export declare abstract class GanttUpper {
|
|
|
52
65
|
private getViewDate;
|
|
53
66
|
computeRefs(): void;
|
|
54
67
|
private expandGroups;
|
|
68
|
+
private initSelectionModel;
|
|
55
69
|
onInit(): void;
|
|
56
70
|
onChanges(changes: SimpleChanges): void;
|
|
57
71
|
onDestroy(): void;
|
|
@@ -63,7 +77,8 @@ export declare abstract class GanttUpper {
|
|
|
63
77
|
collapseAll(): void;
|
|
64
78
|
getGanttItem(id: string): GanttItemInternal;
|
|
65
79
|
getGanttItems(ids: string[]): GanttItemInternal[];
|
|
80
|
+
isSelected(id: string): boolean;
|
|
66
81
|
static ɵfac: i0.ɵɵFactoryDeclaration<GanttUpper, never>;
|
|
67
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<GanttUpper, never, never, { "originItems": "items"; "originGroups": "groups"; "viewType": "viewType"; "start": "start"; "end": "end"; "showTodayLine": "showTodayLine"; "draggable": "draggable"; "styles": "styles"; "viewOptions": "viewOptions"; "disabledLoadOnScroll": "disabledLoadOnScroll"; }, { "loadOnScroll": "loadOnScroll"; "dragStarted": "dragStarted"; "dragMoved": "dragMoved"; "dragEnded": "dragEnded"; "barClick": "barClick"; }, ["barTemplate", "rangeTemplate", "itemTemplate", "groupTemplate", "groupHeaderTemplate"]>;
|
|
82
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<GanttUpper, never, never, { "originItems": "items"; "originGroups": "groups"; "viewType": "viewType"; "start": "start"; "end": "end"; "showTodayLine": "showTodayLine"; "draggable": "draggable"; "styles": "styles"; "viewOptions": "viewOptions"; "linkOptions": "linkOptions"; "disabledLoadOnScroll": "disabledLoadOnScroll"; "selectable": "selectable"; "multiple": "multiple"; }, { "loadOnScroll": "loadOnScroll"; "dragStarted": "dragStarted"; "dragMoved": "dragMoved"; "dragEnded": "dragEnded"; "barClick": "barClick"; }, ["barTemplate", "rangeTemplate", "itemTemplate", "groupTemplate", "groupHeaderTemplate"]>;
|
|
68
83
|
}
|
|
69
84
|
export declare const GANTT_UPPER_TOKEN: InjectionToken<GanttUpper>;
|
package/gantt.component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnInit, ElementRef, EventEmitter, ChangeDetectorRef, NgZone, OnChanges, OnDestroy, SimpleChanges, QueryList, AfterViewInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { GanttUpper } from './gantt-upper';
|
|
4
|
-
import { GanttLinkDragEvent, GanttLineClickEvent, GanttItemInternal, GanttItem } from './class';
|
|
4
|
+
import { GanttLinkDragEvent, GanttLineClickEvent, GanttItemInternal, GanttItem, GanttSelectedEvent } from './class';
|
|
5
5
|
import { NgxGanttTableColumnComponent } from './table/gantt-column.component';
|
|
6
6
|
import { NgxGanttTableComponent } from './table/gantt-table.component';
|
|
7
7
|
import { GanttGlobalConfig } from './gantt.config';
|
|
@@ -14,6 +14,7 @@ export declare class NgxGanttComponent extends GanttUpper implements OnInit, Aft
|
|
|
14
14
|
linkDragStarted: EventEmitter<GanttLinkDragEvent<unknown>>;
|
|
15
15
|
linkDragEnded: EventEmitter<GanttLinkDragEvent<unknown>>;
|
|
16
16
|
lineClick: EventEmitter<GanttLineClickEvent<unknown>>;
|
|
17
|
+
selectedChange: EventEmitter<GanttSelectedEvent<unknown>>;
|
|
17
18
|
table: NgxGanttTableComponent;
|
|
18
19
|
columns: QueryList<NgxGanttTableColumnComponent>;
|
|
19
20
|
tableEmptyTemplate: TemplateRef<any>;
|
|
@@ -24,7 +25,8 @@ export declare class NgxGanttComponent extends GanttUpper implements OnInit, Aft
|
|
|
24
25
|
ngAfterViewInit(): void;
|
|
25
26
|
ngOnChanges(changes: SimpleChanges): void;
|
|
26
27
|
expandChildren(item: GanttItemInternal): void;
|
|
28
|
+
selectItem(selectEvent: GanttSelectedEvent): void;
|
|
27
29
|
ngOnDestroy(): void;
|
|
28
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttComponent, "ngx-gantt", never, { "maxLevel": "maxLevel"; "async": "async"; "childrenResolve": "childrenResolve"; "linkable": "linkable"; }, { "linkDragStarted": "linkDragStarted"; "linkDragEnded": "linkDragEnded"; "lineClick": "lineClick"; }, ["table", "tableEmptyTemplate", "columns"], never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttComponent, "ngx-gantt", never, { "maxLevel": "maxLevel"; "async": "async"; "childrenResolve": "childrenResolve"; "linkable": "linkable"; }, { "linkDragStarted": "linkDragStarted"; "linkDragEnded": "linkDragEnded"; "lineClick": "lineClick"; "selectedChange": "selectedChange"; }, ["table", "tableEmptyTemplate", "columns"], never>;
|
|
30
32
|
}
|
package/gantt.config.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GanttLinkType, GanttLinkOptions, GanttLinkLineType } from './class/link';
|
|
1
2
|
import { InjectionToken } from '@angular/core';
|
|
2
3
|
export interface GanttDateFormat {
|
|
3
4
|
week?: string;
|
|
@@ -9,6 +10,7 @@ export interface GanttDateFormat {
|
|
|
9
10
|
}
|
|
10
11
|
export interface GanttGlobalConfig {
|
|
11
12
|
dateFormat?: GanttDateFormat;
|
|
13
|
+
linkOptions?: GanttLinkOptions;
|
|
12
14
|
}
|
|
13
15
|
export declare const defaultConfig: {
|
|
14
16
|
dateFormat: {
|
|
@@ -19,5 +21,10 @@ export declare const defaultConfig: {
|
|
|
19
21
|
yearMonth: string;
|
|
20
22
|
yearQuarter: string;
|
|
21
23
|
};
|
|
24
|
+
linkOptions: {
|
|
25
|
+
dependencyTypes: GanttLinkType[];
|
|
26
|
+
showArrow: boolean;
|
|
27
|
+
lineType: GanttLinkLineType;
|
|
28
|
+
};
|
|
22
29
|
};
|
|
23
30
|
export declare const GANTT_GLOBAL_CONFIG: InjectionToken<GanttGlobalConfig>;
|
package/main.bundle.scss
CHANGED
|
@@ -119,7 +119,12 @@ $gantt-table-header-drag-line-color: #348fe4 !default;
|
|
|
119
119
|
border-bottom: 1px solid $gantt-border-color;
|
|
120
120
|
box-sizing: border-box;
|
|
121
121
|
position: relative;
|
|
122
|
+
|
|
123
|
+
&.gantt-main-item-active {
|
|
124
|
+
background-color: rgba($color: $gantt-table-header-drag-line-color, $alpha: 0.1);
|
|
125
|
+
}
|
|
122
126
|
}
|
|
127
|
+
|
|
123
128
|
}
|
|
124
129
|
}
|
|
125
130
|
|
|
@@ -258,6 +263,13 @@ $gantt-table-header-drag-line-color: #348fe4 !default;
|
|
|
258
263
|
&:hover {
|
|
259
264
|
background-color: $gantt-container-background-color;
|
|
260
265
|
}
|
|
266
|
+
|
|
267
|
+
&-active {
|
|
268
|
+
background-color: rgba($color: $gantt-table-header-drag-line-color, $alpha: 0.1);
|
|
269
|
+
&:hover {
|
|
270
|
+
background-color: rgba($color: $gantt-table-header-drag-line-color, $alpha: 0.1);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
261
273
|
}
|
|
262
274
|
|
|
263
275
|
.gantt-expand-icon {
|
|
@@ -398,6 +410,7 @@ $gantt-table-header-drag-line-color: #348fe4 !default;
|
|
|
398
410
|
$gantt-bar-layer-append-width: 32px;
|
|
399
411
|
$gantt-bar-layer-append-height: 42px;
|
|
400
412
|
$gantt-bar-link-height: 16px;
|
|
413
|
+
$gantt-bar-link-handle-size: 16px;
|
|
401
414
|
$gantt-bar-link-drop-border: 5px;
|
|
402
415
|
|
|
403
416
|
@mixin link-handles {
|
|
@@ -541,6 +554,7 @@ $gantt-bar-link-drop-border: 5px;
|
|
|
541
554
|
background: $gantt-bar-background-color;
|
|
542
555
|
overflow: hidden;
|
|
543
556
|
box-sizing: border-box;
|
|
557
|
+
|
|
544
558
|
.gantt-bar-content-progress {
|
|
545
559
|
position: absolute;
|
|
546
560
|
left: 0;
|
|
@@ -554,7 +568,7 @@ $gantt-bar-link-drop-border: 5px;
|
|
|
554
568
|
@include active-bar();
|
|
555
569
|
}
|
|
556
570
|
|
|
557
|
-
&-
|
|
571
|
+
&-single-drop-active {
|
|
558
572
|
.gantt-bar-border {
|
|
559
573
|
display: block;
|
|
560
574
|
}
|
|
@@ -563,6 +577,34 @@ $gantt-bar-link-drop-border: 5px;
|
|
|
563
577
|
box-shadow: none;
|
|
564
578
|
}
|
|
565
579
|
}
|
|
580
|
+
|
|
581
|
+
&-drop-active {
|
|
582
|
+
@include active-bar();
|
|
583
|
+
|
|
584
|
+
.gantt-bar-layer {
|
|
585
|
+
.link-handles {
|
|
586
|
+
.handle {
|
|
587
|
+
width: $gantt-bar-link-handle-size + 10px;
|
|
588
|
+
height: 100%;
|
|
589
|
+
|
|
590
|
+
&:first-child {
|
|
591
|
+
left: -$gantt-bar-link-handle-size - 5px;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
&:last-child {
|
|
595
|
+
right: -$gantt-bar-link-handle-size - 5px;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
&:hover {
|
|
599
|
+
.point {
|
|
600
|
+
width: 12px;
|
|
601
|
+
height: 12px;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
566
608
|
}
|
|
567
609
|
|
|
568
610
|
.gantt-range {
|