@worktile/gantt 12.0.2 → 12.1.2
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 +101 -25
- package/bundles/worktile-gantt.umd.js.map +1 -1
- package/class/item.d.ts +4 -4
- package/components/calendar/calendar.component.d.ts +1 -1
- package/components/main/gantt-main.component.d.ts +1 -1
- package/components/table/gantt-table.component.d.ts +4 -1
- package/esm2015/class/item.js +1 -1
- package/esm2015/components/bar/bar-drag.js +6 -1
- package/esm2015/components/calendar/calendar.component.js +2 -2
- package/esm2015/components/main/gantt-main.component.js +2 -2
- package/esm2015/components/table/gantt-table.component.js +9 -2
- package/esm2015/gantt-drag-container.js +2 -1
- package/esm2015/gantt-upper.js +33 -7
- package/esm2015/gantt.component.js +11 -7
- package/esm2015/gantt.config.js +13 -0
- package/esm2015/gantt.module.js +14 -3
- package/esm2015/public-api.js +2 -1
- package/esm2015/table/gantt-table.component.js +9 -3
- package/esm2015/views/day.js +2 -2
- package/esm2015/views/month.js +3 -3
- package/esm2015/views/quarter.js +3 -3
- package/esm2015/views/view.js +4 -2
- package/esm2015/views/week.js +3 -3
- package/esm2015/views/year.js +2 -2
- package/fesm2015/worktile-gantt.js +97 -27
- package/fesm2015/worktile-gantt.js.map +1 -1
- package/gantt-drag-container.d.ts +1 -0
- package/gantt-upper.d.ts +8 -3
- package/gantt.component.d.ts +2 -1
- package/gantt.config.d.ts +23 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/table/gantt-table.component.d.ts +4 -2
- package/views/view.d.ts +2 -0
|
@@ -5,6 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare type LinkDragFrom = 'source' | 'target';
|
|
6
6
|
export declare class GanttDragContainer {
|
|
7
7
|
dragStarted: EventEmitter<GanttDragEvent<unknown>>;
|
|
8
|
+
dragMoved: EventEmitter<GanttDragEvent<unknown>>;
|
|
8
9
|
dragEnded: EventEmitter<GanttDragEvent<unknown>>;
|
|
9
10
|
linkDragStarted: EventEmitter<GanttLinkDragEvent<unknown>>;
|
|
10
11
|
linkDragEntered: EventEmitter<GanttLinkDragEvent<unknown>>;
|
package/gantt-upper.d.ts
CHANGED
|
@@ -4,11 +4,13 @@ import { GanttItem, GanttGroup, GanttViewType, GanttLoadOnScrollEvent, GanttDrag
|
|
|
4
4
|
import { GanttView, GanttViewOptions } from './views/view';
|
|
5
5
|
import { GanttStyles } from './gantt.styles';
|
|
6
6
|
import { GanttDragContainer } from './gantt-drag-container';
|
|
7
|
+
import { GanttGlobalConfig } from './gantt.config';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare abstract class GanttUpper {
|
|
9
10
|
protected elementRef: ElementRef<HTMLElement>;
|
|
10
11
|
protected cdr: ChangeDetectorRef;
|
|
11
12
|
protected ngZone: NgZone;
|
|
13
|
+
protected config: GanttGlobalConfig;
|
|
12
14
|
originItems: GanttItem[];
|
|
13
15
|
originGroups: GanttGroup[];
|
|
14
16
|
viewType: GanttViewType;
|
|
@@ -21,6 +23,7 @@ export declare abstract class GanttUpper {
|
|
|
21
23
|
disabledLoadOnScroll: boolean;
|
|
22
24
|
loadOnScroll: EventEmitter<GanttLoadOnScrollEvent>;
|
|
23
25
|
dragStarted: EventEmitter<GanttDragEvent<unknown>>;
|
|
26
|
+
dragMoved: EventEmitter<GanttDragEvent<unknown>>;
|
|
24
27
|
dragEnded: EventEmitter<GanttDragEvent<unknown>>;
|
|
25
28
|
barClick: EventEmitter<GanttBarClickEvent<unknown>>;
|
|
26
29
|
barTemplate: TemplateRef<any>;
|
|
@@ -41,7 +44,7 @@ export declare abstract class GanttUpper {
|
|
|
41
44
|
unsubscribe$: Subject<unknown>;
|
|
42
45
|
private groupsMap;
|
|
43
46
|
ganttClass: boolean;
|
|
44
|
-
constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, ngZone: NgZone);
|
|
47
|
+
constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, ngZone: NgZone, config: GanttGlobalConfig);
|
|
45
48
|
private createView;
|
|
46
49
|
private setupGroups;
|
|
47
50
|
private setupItems;
|
|
@@ -53,12 +56,14 @@ export declare abstract class GanttUpper {
|
|
|
53
56
|
onChanges(changes: SimpleChanges): void;
|
|
54
57
|
onDestroy(): void;
|
|
55
58
|
computeItemsRefs(...items: GanttItemInternal[]): void;
|
|
56
|
-
trackBy(item: GanttGroupInternal | GanttItemInternal
|
|
59
|
+
trackBy(index: number, item: GanttGroupInternal | GanttItemInternal): string | number;
|
|
57
60
|
detectChanges(): void;
|
|
58
61
|
expandGroup(group: GanttGroupInternal): void;
|
|
59
62
|
expandAll(): void;
|
|
60
63
|
collapseAll(): void;
|
|
64
|
+
getGanttItem(id: string): GanttItemInternal;
|
|
65
|
+
getGanttItems(ids: string[]): GanttItemInternal[];
|
|
61
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<GanttUpper, never>;
|
|
62
|
-
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"; "dragEnded": "dragEnded"; "barClick": "barClick"; }, ["barTemplate", "rangeTemplate", "itemTemplate", "groupTemplate", "groupHeaderTemplate"]>;
|
|
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"]>;
|
|
63
68
|
}
|
|
64
69
|
export declare const GANTT_UPPER_TOKEN: InjectionToken<GanttUpper>;
|
package/gantt.component.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { GanttUpper } from './gantt-upper';
|
|
|
4
4
|
import { GanttLinkDragEvent, GanttLineClickEvent, GanttItemInternal, GanttItem } from './class';
|
|
5
5
|
import { NgxGanttTableColumnComponent } from './table/gantt-column.component';
|
|
6
6
|
import { NgxGanttTableComponent } from './table/gantt-table.component';
|
|
7
|
+
import { GanttGlobalConfig } from './gantt.config';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class NgxGanttComponent extends GanttUpper implements OnInit, AfterViewInit, OnChanges, OnDestroy {
|
|
9
10
|
maxLevel: number;
|
|
@@ -18,7 +19,7 @@ export declare class NgxGanttComponent extends GanttUpper implements OnInit, Aft
|
|
|
18
19
|
tableEmptyTemplate: TemplateRef<any>;
|
|
19
20
|
private ngUnsubscribe$;
|
|
20
21
|
sideTableWidth: number;
|
|
21
|
-
constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, ngZone: NgZone);
|
|
22
|
+
constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, ngZone: NgZone, config: GanttGlobalConfig);
|
|
22
23
|
ngOnInit(): void;
|
|
23
24
|
ngAfterViewInit(): void;
|
|
24
25
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export interface GanttDateFormat {
|
|
3
|
+
week?: string;
|
|
4
|
+
month?: string;
|
|
5
|
+
quarter?: string;
|
|
6
|
+
year?: string;
|
|
7
|
+
yearMonth?: string;
|
|
8
|
+
yearQuarter?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface GanttGlobalConfig {
|
|
11
|
+
dateFormat?: GanttDateFormat;
|
|
12
|
+
}
|
|
13
|
+
export declare const defaultConfig: {
|
|
14
|
+
dateFormat: {
|
|
15
|
+
week: string;
|
|
16
|
+
month: string;
|
|
17
|
+
quarter: string;
|
|
18
|
+
year: string;
|
|
19
|
+
yearMonth: string;
|
|
20
|
+
yearQuarter: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare const GANTT_GLOBAL_CONFIG: InjectionToken<GanttGlobalConfig>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { GanttTableEvent } from '../class';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class NgxGanttTableComponent implements OnInit {
|
|
5
5
|
columnChanges: EventEmitter<GanttTableEvent>;
|
|
6
|
+
rowBeforeTemplate: TemplateRef<any>;
|
|
7
|
+
rowAfterTemplate: TemplateRef<any>;
|
|
6
8
|
constructor();
|
|
7
9
|
ngOnInit(): void;
|
|
8
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttTableComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttTableComponent, "ngx-gantt-table", never, {}, { "columnChanges": "columnChanges"; },
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttTableComponent, "ngx-gantt-table", never, {}, { "columnChanges": "columnChanges"; }, ["rowBeforeTemplate", "rowAfterTemplate"], never>;
|
|
10
12
|
}
|
package/views/view.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GanttDate, GanttDateUtil } from '../utils/date';
|
|
2
2
|
import { GanttDatePoint } from '../class/date-point';
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import { GanttDateFormat } from '../gantt.config';
|
|
4
5
|
export declare const primaryDatePointTop = 18;
|
|
5
6
|
export declare const secondaryDatePointTop = 36;
|
|
6
7
|
export interface GanttViewDate {
|
|
@@ -15,6 +16,7 @@ export interface GanttViewOptions {
|
|
|
15
16
|
cellWidth?: number;
|
|
16
17
|
addAmount?: number;
|
|
17
18
|
addUnit?: GanttDateUtil;
|
|
19
|
+
dateFormat?: GanttDateFormat;
|
|
18
20
|
}
|
|
19
21
|
export declare abstract class GanttView {
|
|
20
22
|
start$: BehaviorSubject<GanttDate>;
|