@worktile/gantt 12.2.1 → 12.2.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 +305 -210
- package/bundles/worktile-gantt.umd.js.map +1 -1
- package/components/bar/bar-drag.d.ts +4 -2
- package/components/bar/bar.component.d.ts +4 -4
- package/components/calendar/calendar.component.d.ts +3 -5
- package/components/drag-backdrop/drag-backdrop.component.d.ts +1 -5
- package/components/icon/icon.component.d.ts +2 -4
- package/components/main/gantt-main.component.d.ts +2 -3
- package/components/range/range.component.d.ts +2 -5
- package/components/table/gantt-table.component.d.ts +2 -3
- package/esm2015/components/bar/bar-drag.js +24 -17
- package/esm2015/components/bar/bar.component.js +21 -14
- package/esm2015/components/calendar/calendar.component.js +16 -11
- package/esm2015/components/drag-backdrop/drag-backdrop.component.js +8 -12
- package/esm2015/components/icon/icon.component.js +1 -3
- package/esm2015/components/links/links.component.js +2 -2
- package/esm2015/components/main/gantt-main.component.js +1 -2
- package/esm2015/components/range/range.component.js +2 -11
- package/esm2015/components/table/gantt-table.component.js +7 -3
- package/esm2015/gantt-dom.service.js +39 -25
- package/esm2015/gantt-item-upper.js +5 -5
- package/esm2015/gantt-print.service.js +50 -47
- package/esm2015/gantt-upper.js +27 -18
- package/esm2015/gantt.component.js +17 -16
- package/esm2015/root.component.js +41 -29
- package/esm2015/table/gantt-column.component.js +1 -2
- package/esm2015/table/gantt-table.component.js +2 -3
- package/esm2015/utils/passive-listeners.js +30 -0
- package/esm2015/utils/set-style-with-vendor-prefix.js +15 -0
- package/esm2015/views/day.js +1 -1
- package/fesm2015/worktile-gantt.js +285 -205
- package/fesm2015/worktile-gantt.js.map +1 -1
- package/gantt-dom.service.d.ts +11 -4
- package/gantt-item-upper.d.ts +5 -5
- package/gantt-print.service.d.ts +1 -1
- package/gantt-upper.d.ts +5 -5
- package/gantt.component.d.ts +2 -4
- package/main.bundle.scss +3 -2
- package/package.json +1 -1
- package/root.component.d.ts +5 -3
- package/table/gantt-column.component.d.ts +2 -3
- package/table/gantt-table.component.d.ts +2 -4
- package/utils/passive-listeners.d.ts +13 -0
- package/utils/set-style-with-vendor-prefix.d.ts +12 -0
- package/README.md +0 -24
package/gantt-dom.service.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy } from '@angular/core';
|
|
1
|
+
import { ElementRef, OnDestroy, NgZone } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare enum ScrollDirection {
|
|
4
5
|
NONE = 0,
|
|
@@ -10,6 +11,8 @@ export interface ScrollEvent {
|
|
|
10
11
|
direction: ScrollDirection;
|
|
11
12
|
}
|
|
12
13
|
export declare class GanttDomService implements OnDestroy {
|
|
14
|
+
private ngZone;
|
|
15
|
+
private platformId;
|
|
13
16
|
root: Element;
|
|
14
17
|
side: Element;
|
|
15
18
|
container: Element;
|
|
@@ -18,13 +21,17 @@ export declare class GanttDomService implements OnDestroy {
|
|
|
18
21
|
calendarOverlay: Element;
|
|
19
22
|
linksOverlay: Element;
|
|
20
23
|
private unsubscribe$;
|
|
21
|
-
constructor();
|
|
24
|
+
constructor(ngZone: NgZone, platformId: string);
|
|
22
25
|
private monitorScrollChange;
|
|
23
26
|
private syncScroll;
|
|
24
27
|
private disableBrowserWheelEvent;
|
|
25
28
|
initialize(root: ElementRef<HTMLElement>): void;
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
/**
|
|
30
|
+
* @returns An observable that will emit outside the Angular zone. Note, consumers should re-enter the Angular zone
|
|
31
|
+
* to run the change detection if needed.
|
|
32
|
+
*/
|
|
33
|
+
getViewerScroll(options?: AddEventListenerOptions): Observable<ScrollEvent>;
|
|
34
|
+
getResize(): Observable<Event>;
|
|
28
35
|
scrollMainContainer(left: number): void;
|
|
29
36
|
ngOnDestroy(): void;
|
|
30
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<GanttDomService, never>;
|
package/gantt-item-upper.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ElementRef, TemplateRef } from '@angular/core';
|
|
1
|
+
import { ElementRef, TemplateRef, OnInit, OnChanges, OnDestroy } from '@angular/core';
|
|
2
2
|
import { GanttItemInternal } from './class';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
4
|
import { GanttUpper } from './gantt-upper';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare abstract class GanttItemUpper {
|
|
6
|
+
export declare abstract class GanttItemUpper implements OnChanges, OnInit, OnDestroy {
|
|
7
7
|
protected elementRef: ElementRef<HTMLElement>;
|
|
8
8
|
protected ganttUpper: GanttUpper;
|
|
9
9
|
template: TemplateRef<any>;
|
|
@@ -11,10 +11,10 @@ export declare abstract class GanttItemUpper {
|
|
|
11
11
|
firstChange: boolean;
|
|
12
12
|
unsubscribe$: Subject<unknown>;
|
|
13
13
|
constructor(elementRef: ElementRef<HTMLElement>, ganttUpper: GanttUpper);
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
ngOnChanges(): void;
|
|
16
16
|
private setPositions;
|
|
17
|
-
|
|
17
|
+
ngOnDestroy(): void;
|
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<GanttItemUpper, never>;
|
|
19
19
|
static ɵdir: i0.ɵɵDirectiveDeclaration<GanttItemUpper, never, never, { "template": "template"; "item": "item"; }, {}, never>;
|
|
20
20
|
}
|
package/gantt-print.service.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare class GanttPrintService {
|
|
|
7
7
|
private setInlineStyles;
|
|
8
8
|
private recursElementChildren;
|
|
9
9
|
register(root: ElementRef<HTMLElement>): void;
|
|
10
|
-
print(name?: string, ignoreElementClass?: string): void
|
|
10
|
+
print(name?: string, ignoreElementClass?: string): Promise<void>;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<GanttPrintService, never>;
|
|
12
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<GanttPrintService>;
|
|
13
13
|
}
|
package/gantt-upper.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TemplateRef, EventEmitter, ElementRef, ChangeDetectorRef, NgZone, SimpleChanges, InjectionToken } from '@angular/core';
|
|
1
|
+
import { TemplateRef, EventEmitter, ElementRef, ChangeDetectorRef, NgZone, SimpleChanges, InjectionToken, OnInit, OnDestroy, OnChanges } from '@angular/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import { GanttItem, GanttGroup, GanttViewType, GanttLoadOnScrollEvent, GanttDragEvent, GanttGroupInternal, GanttItemInternal, GanttBarClickEvent, GanttLinkDragEvent } from './class';
|
|
4
4
|
import { GanttView, GanttViewOptions } from './views/view';
|
|
@@ -9,7 +9,7 @@ import { GanttLinkOptions } from './class/link';
|
|
|
9
9
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
10
10
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
|
-
export declare abstract class GanttUpper {
|
|
12
|
+
export declare abstract class GanttUpper implements OnChanges, OnInit, OnDestroy {
|
|
13
13
|
protected elementRef: ElementRef<HTMLElement>;
|
|
14
14
|
protected cdr: ChangeDetectorRef;
|
|
15
15
|
protected ngZone: NgZone;
|
|
@@ -66,9 +66,9 @@ export declare abstract class GanttUpper {
|
|
|
66
66
|
computeRefs(): void;
|
|
67
67
|
private expandGroups;
|
|
68
68
|
private initSelectionModel;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
ngOnInit(): void;
|
|
70
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
71
|
+
ngOnDestroy(): void;
|
|
72
72
|
computeItemsRefs(...items: GanttItemInternal[]): void;
|
|
73
73
|
trackBy(index: number, item: GanttGroupInternal | GanttItemInternal): string | number;
|
|
74
74
|
detectChanges(): void;
|
package/gantt.component.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit, ElementRef, EventEmitter, ChangeDetectorRef, NgZone,
|
|
1
|
+
import { OnInit, ElementRef, EventEmitter, ChangeDetectorRef, NgZone, QueryList, AfterViewInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { GanttUpper } from './gantt-upper';
|
|
4
4
|
import { GanttLinkDragEvent, GanttLineClickEvent, GanttItemInternal, GanttItem, GanttSelectedEvent } from './class';
|
|
@@ -6,7 +6,7 @@ import { NgxGanttTableColumnComponent } from './table/gantt-column.component';
|
|
|
6
6
|
import { NgxGanttTableComponent } from './table/gantt-table.component';
|
|
7
7
|
import { GanttGlobalConfig } from './gantt.config';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class NgxGanttComponent extends GanttUpper implements OnInit, AfterViewInit
|
|
9
|
+
export declare class NgxGanttComponent extends GanttUpper implements OnInit, AfterViewInit {
|
|
10
10
|
maxLevel: number;
|
|
11
11
|
async: boolean;
|
|
12
12
|
childrenResolve: (GanttItem: any) => Observable<GanttItem[]>;
|
|
@@ -23,10 +23,8 @@ export declare class NgxGanttComponent extends GanttUpper implements OnInit, Aft
|
|
|
23
23
|
constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, ngZone: NgZone, config: GanttGlobalConfig);
|
|
24
24
|
ngOnInit(): void;
|
|
25
25
|
ngAfterViewInit(): void;
|
|
26
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
27
26
|
expandChildren(item: GanttItemInternal): void;
|
|
28
27
|
selectItem(selectEvent: GanttSelectedEvent): void;
|
|
29
|
-
ngOnDestroy(): void;
|
|
30
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttComponent, never>;
|
|
31
29
|
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>;
|
|
32
30
|
}
|
package/main.bundle.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
1
2
|
// basic
|
|
2
3
|
$gantt-color: #333 !default;
|
|
3
4
|
$gantt-header-height: 44px !default;
|
|
@@ -525,8 +526,8 @@ $gantt-bar-link-drop-border: 5px;
|
|
|
525
526
|
height: calc(100% + #{$gantt-bar-layer-append-height});
|
|
526
527
|
position: absolute;
|
|
527
528
|
border-radius: 4px;
|
|
528
|
-
left: $gantt-bar-layer-append-width
|
|
529
|
-
top: $gantt-bar-layer-append-height
|
|
529
|
+
left: math.div($gantt-bar-layer-append-width, 2) * -1;
|
|
530
|
+
top: math.div($gantt-bar-layer-append-height, 2) * -1;
|
|
530
531
|
display: none;
|
|
531
532
|
@include drag-handles();
|
|
532
533
|
@include link-handles();
|
package/package.json
CHANGED
package/root.component.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { OnInit, NgZone, ElementRef, TemplateRef } from '@angular/core';
|
|
1
|
+
import { OnInit, NgZone, ElementRef, TemplateRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { GanttDomService } from './gantt-dom.service';
|
|
3
3
|
import { GanttDragContainer } from './gantt-drag-container';
|
|
4
4
|
import { GanttUpper } from './gantt-upper';
|
|
5
5
|
import { GanttPrintService } from './gantt-print.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class NgxGanttRootComponent implements OnInit {
|
|
7
|
+
export declare class NgxGanttRootComponent implements OnInit, OnDestroy {
|
|
8
8
|
private elementRef;
|
|
9
9
|
private ngZone;
|
|
10
10
|
private dom;
|
|
@@ -12,13 +12,15 @@ export declare class NgxGanttRootComponent implements OnInit {
|
|
|
12
12
|
private ganttUpper;
|
|
13
13
|
private printService;
|
|
14
14
|
sideWidth: number;
|
|
15
|
-
ganttClass: boolean;
|
|
16
15
|
sideTemplate: TemplateRef<any>;
|
|
17
16
|
mainTemplate: TemplateRef<any>;
|
|
17
|
+
/** The native `<gantt-drag-backdrop></gantt-drag-backdrop>` element. */
|
|
18
|
+
backdrop: ElementRef<HTMLElement>;
|
|
18
19
|
private unsubscribe$;
|
|
19
20
|
private get view();
|
|
20
21
|
constructor(elementRef: ElementRef<HTMLElement>, ngZone: NgZone, dom: GanttDomService, dragContainer: GanttDragContainer, ganttUpper: GanttUpper, printService: GanttPrintService);
|
|
21
22
|
ngOnInit(): void;
|
|
23
|
+
ngOnDestroy(): void;
|
|
22
24
|
private setupViewScroll;
|
|
23
25
|
private setupResize;
|
|
24
26
|
private setupScrollClass;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
2
|
import { GanttUpper } from '../gantt-upper';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgxGanttTableColumnComponent
|
|
4
|
+
export declare class NgxGanttTableColumnComponent {
|
|
5
5
|
ganttUpper: GanttUpper;
|
|
6
6
|
columnWidth: string;
|
|
7
7
|
set width(width: number | string);
|
|
@@ -9,7 +9,6 @@ export declare class NgxGanttTableColumnComponent implements OnInit {
|
|
|
9
9
|
templateRef: TemplateRef<any>;
|
|
10
10
|
headerTemplateRef: TemplateRef<any>;
|
|
11
11
|
constructor(ganttUpper: GanttUpper);
|
|
12
|
-
ngOnInit(): void;
|
|
13
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttTableColumnComponent, never>;
|
|
14
13
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttTableColumnComponent, "ngx-gantt-column", never, { "width": "width"; "name": "name"; }, {}, ["templateRef", "headerTemplateRef"], never>;
|
|
15
14
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { EventEmitter,
|
|
1
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
2
|
import { GanttTableEvent } from '../class';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgxGanttTableComponent
|
|
4
|
+
export declare class NgxGanttTableComponent {
|
|
5
5
|
columnChanges: EventEmitter<GanttTableEvent>;
|
|
6
6
|
rowBeforeTemplate: TemplateRef<any>;
|
|
7
7
|
rowAfterTemplate: TemplateRef<any>;
|
|
8
|
-
constructor();
|
|
9
|
-
ngOnInit(): void;
|
|
10
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttTableComponent, never>;
|
|
11
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttTableComponent, "ngx-gantt-table", never, {}, { "columnChanges": "columnChanges"; }, ["rowBeforeTemplate", "rowAfterTemplate"], never>;
|
|
12
10
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether the user's browser supports passive event listeners.
|
|
3
|
+
* See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
|
|
4
|
+
*/
|
|
5
|
+
export declare function supportsPassiveEventListeners(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Normalizes an `AddEventListener` object to something that can be passed
|
|
8
|
+
* to `addEventListener` on any browser, no matter whether it supports the
|
|
9
|
+
* `options` parameter.
|
|
10
|
+
*/
|
|
11
|
+
export declare function normalizePassiveListenerOptions(options: AddEventListenerOptions): AddEventListenerOptions | boolean;
|
|
12
|
+
/** Options used to bind passive event listeners. */
|
|
13
|
+
export declare const passiveListenerOptions: AddEventListenerOptions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface SetStyleWithVendorPrefixOptions {
|
|
2
|
+
element: HTMLElement;
|
|
3
|
+
style: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Note: we don't need to add vendor prefixes within `.scss` files since they're added automatically.
|
|
8
|
+
* This function is necessary when the `element.style` is updated directly through the JavaScript.
|
|
9
|
+
* This is not required to be used with CSS properties that don't require vendor prefixes (e.g. `opacity`).
|
|
10
|
+
*/
|
|
11
|
+
export declare function setStyleWithVendorPrefix({ element, style, value }: SetStyleWithVendorPrefixOptions): void;
|
|
12
|
+
export {};
|
package/README.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Gantt
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Run `ng generate component component-name --project gantt` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project gantt`.
|
|
8
|
-
> Note: Don't forget to add `--project gantt` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
-
|
|
10
|
-
## Build
|
|
11
|
-
|
|
12
|
-
Run `ng build gantt` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
-
|
|
14
|
-
## Publishing
|
|
15
|
-
|
|
16
|
-
After building your library with `ng build gantt`, go to the dist folder `cd dist/gantt` and run `npm publish`.
|
|
17
|
-
|
|
18
|
-
## Running unit tests
|
|
19
|
-
|
|
20
|
-
Run `ng test gantt` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
-
|
|
22
|
-
## Further help
|
|
23
|
-
|
|
24
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
|