@worktile/gantt 19.0.0-next.0 → 19.0.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/components/table/body/gantt-table-body.component.d.ts +11 -5
- package/components/table/gantt-table.scss +21 -1
- package/components/table/header/gantt-table-header.component.d.ts +5 -3
- package/fesm2022/worktile-gantt.mjs +93 -70
- package/fesm2022/worktile-gantt.mjs.map +1 -1
- package/gantt-dom.service.d.ts +1 -1
- package/gantt.component.d.ts +2 -1
- package/gantt.component.scss +8 -0
- package/gantt.module.d.ts +1 -1
- package/gantt.pipe.d.ts +0 -5
- package/package.json +4 -4
- package/table/gantt-table.component.d.ts +6 -2
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { CdkDrag, CdkDragDrop, CdkDragEnd, CdkDragMove, CdkDragStart } from '@angular/cdk/drag-drop';
|
|
2
|
+
import { AfterViewInit, ChangeDetectorRef, EventEmitter, NgZone, OnDestroy, OnInit, QueryList, TemplateRef } from '@angular/core';
|
|
3
|
+
import { GanttGroupInternal, GanttItemInternal, GanttSelectedEvent, GanttTableDragDroppedEvent, GanttTableDragEndedEvent, GanttTableDragEnterPredicateContext, GanttTableDragStartedEvent } from '../../../class';
|
|
4
4
|
import { GanttAbstractComponent } from '../../../gantt-abstract';
|
|
5
5
|
import { GanttUpper } from '../../../gantt-upper';
|
|
6
|
-
import {
|
|
6
|
+
import { NgxGanttTableColumnComponent } from '../../../table/gantt-column.component';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class GanttTableBodyComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
9
9
|
gantt: GanttAbstractComponent;
|
|
10
10
|
ganttUpper: GanttUpper;
|
|
11
11
|
private cdr;
|
|
12
12
|
private document;
|
|
13
|
+
private ngZone;
|
|
13
14
|
private _viewportItems;
|
|
14
15
|
set viewportItems(data: (GanttGroupInternal | GanttItemInternal)[]);
|
|
15
16
|
get viewportItems(): (GanttGroupInternal | GanttItemInternal)[];
|
|
@@ -35,9 +36,14 @@ export declare class GanttTableBodyComponent implements OnInit, OnDestroy, After
|
|
|
35
36
|
private itemDragMoved;
|
|
36
37
|
private itemDropTarget;
|
|
37
38
|
private destroy$;
|
|
38
|
-
|
|
39
|
+
sideContainer: Element;
|
|
40
|
+
headerContainer: Element;
|
|
41
|
+
footerContainer: Element;
|
|
42
|
+
constructor(gantt: GanttAbstractComponent, ganttUpper: GanttUpper, cdr: ChangeDetectorRef, document: Document, ngZone: NgZone);
|
|
39
43
|
ngOnInit(): void;
|
|
40
44
|
ngAfterViewInit(): void;
|
|
45
|
+
initialize(): void;
|
|
46
|
+
private monitorScrollChange;
|
|
41
47
|
expandGroup(group: GanttGroupInternal): void;
|
|
42
48
|
expandChildren(event: MouseEvent, item: GanttItemInternal): void;
|
|
43
49
|
onItemDragStarted(event: CdkDragStart<GanttItemInternal>): void;
|
|
@@ -10,8 +10,15 @@
|
|
|
10
10
|
border-right: 1px solid variables.$gantt-border-color;
|
|
11
11
|
box-sizing: border-box;
|
|
12
12
|
position: relative;
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
|
|
15
|
+
&:nth-last-child(2) {
|
|
16
|
+
border-right: none;
|
|
17
|
+
}
|
|
13
18
|
|
|
14
19
|
&:last-child {
|
|
20
|
+
padding: 0;
|
|
21
|
+
border: 1px solid variables.$gantt-border-color;
|
|
15
22
|
border-right: none;
|
|
16
23
|
}
|
|
17
24
|
}
|
|
@@ -60,7 +67,12 @@
|
|
|
60
67
|
display: flex;
|
|
61
68
|
padding: variables.$gantt-table-td-padding;
|
|
62
69
|
|
|
70
|
+
&:nth-last-child(2) {
|
|
71
|
+
border-right: none;
|
|
72
|
+
}
|
|
63
73
|
&:last-child {
|
|
74
|
+
padding: 0;
|
|
75
|
+
border: 1px solid variables.$gantt-border-color;
|
|
64
76
|
border-right: none;
|
|
65
77
|
}
|
|
66
78
|
}
|
|
@@ -174,6 +186,13 @@
|
|
|
174
186
|
|
|
175
187
|
.gantt-table-header-container {
|
|
176
188
|
display: flex;
|
|
189
|
+
overflow-x: auto;
|
|
190
|
+
overflow-y: hidden;
|
|
191
|
+
white-space: nowrap;
|
|
192
|
+
|
|
193
|
+
&::-webkit-scrollbar {
|
|
194
|
+
display: none;
|
|
195
|
+
}
|
|
177
196
|
}
|
|
178
197
|
|
|
179
198
|
@include gantt-table-item();
|
|
@@ -247,6 +266,7 @@
|
|
|
247
266
|
bottom: 0;
|
|
248
267
|
cursor: ew-resize;
|
|
249
268
|
height: 5000px;
|
|
269
|
+
z-index: 2;
|
|
250
270
|
|
|
251
271
|
&:hover {
|
|
252
272
|
background: variables.$gantt-table-header-drag-line-color;
|
|
@@ -255,7 +275,7 @@
|
|
|
255
275
|
|
|
256
276
|
.column-resize-handle {
|
|
257
277
|
height: unset;
|
|
258
|
-
z-index:
|
|
278
|
+
z-index: 2;
|
|
259
279
|
}
|
|
260
280
|
|
|
261
281
|
.table-resize-auxiliary-line {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { QueryList, OnInit, ElementRef, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { NgxGanttTableColumnComponent } from '../../../table/gantt-column.component';
|
|
3
1
|
import { CdkDragEnd, CdkDragMove, CdkDragStart } from '@angular/cdk/drag-drop';
|
|
2
|
+
import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
4
3
|
import { GanttAbstractComponent } from '../../../gantt-abstract';
|
|
4
|
+
import { NgxGanttTableColumnComponent } from '../../../table/gantt-column.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare const defaultColumnWidth = 100;
|
|
7
7
|
export declare const minColumnWidth = 80;
|
|
8
8
|
export declare class GanttTableHeaderComponent implements OnInit, OnDestroy {
|
|
9
9
|
private elementRef;
|
|
10
|
-
|
|
10
|
+
gantt: GanttAbstractComponent;
|
|
11
11
|
private cdr;
|
|
12
12
|
dragStartLeft: number;
|
|
13
13
|
tableWidth: number;
|
|
14
|
+
customWidth: number;
|
|
14
15
|
private unsubscribe$;
|
|
15
16
|
columns: QueryList<NgxGanttTableColumnComponent>;
|
|
16
17
|
resizeLineElementRef: ElementRef<HTMLElement>;
|
|
@@ -27,6 +28,7 @@ export declare class GanttTableHeaderComponent implements OnInit, OnDestroy {
|
|
|
27
28
|
onOverallResizeEnded(event: CdkDragEnd): void;
|
|
28
29
|
private showAuxiliaryLine;
|
|
29
30
|
private hideAuxiliaryLine;
|
|
31
|
+
private getCalcWidth;
|
|
30
32
|
ngOnDestroy(): void;
|
|
31
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<GanttTableHeaderComponent, never>;
|
|
32
34
|
static ɵcmp: i0.ɵɵComponentDeclaration<GanttTableHeaderComponent, "gantt-table-header", never, { "columns": { "alias": "columns"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -2043,7 +2043,7 @@ function createSvgElement(qualifiedName, className) {
|
|
|
2043
2043
|
}
|
|
2044
2044
|
class GanttBarDrag {
|
|
2045
2045
|
get dragDisabled() {
|
|
2046
|
-
return !this.item()
|
|
2046
|
+
return !this.item()?.draggable || !this.ganttUpper.draggable;
|
|
2047
2047
|
}
|
|
2048
2048
|
get linkDragDisabled() {
|
|
2049
2049
|
return !this.item().linkable || !this.ganttUpper.linkable;
|
|
@@ -3507,20 +3507,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
3507
3507
|
standalone: true
|
|
3508
3508
|
}]
|
|
3509
3509
|
}] });
|
|
3510
|
-
class GanttDateFormatPipe {
|
|
3511
|
-
transform(value, format) {
|
|
3512
|
-
return new GanttDate(value).format(format);
|
|
3513
|
-
}
|
|
3514
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: GanttDateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3515
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.3", ngImport: i0, type: GanttDateFormatPipe, isStandalone: true, name: "dateFormat" }); }
|
|
3516
|
-
}
|
|
3517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: GanttDateFormatPipe, decorators: [{
|
|
3518
|
-
type: Pipe,
|
|
3519
|
-
args: [{
|
|
3520
|
-
name: 'dateFormat',
|
|
3521
|
-
standalone: true
|
|
3522
|
-
}]
|
|
3523
|
-
}] });
|
|
3524
3510
|
|
|
3525
3511
|
class NgxGanttRangeComponent extends GanttItemUpper {
|
|
3526
3512
|
constructor(elementRef, ganttUpper) {
|
|
@@ -3661,8 +3647,9 @@ class GanttTableHeaderComponent {
|
|
|
3661
3647
|
ngOnInit() {
|
|
3662
3648
|
this.columnsChange();
|
|
3663
3649
|
this.columns.changes.pipe(takeUntil$1(this.unsubscribe$)).subscribe(() => {
|
|
3664
|
-
this.
|
|
3665
|
-
|
|
3650
|
+
if (!this.gantt?.table?.width && !this.customWidth) {
|
|
3651
|
+
this.columnsChange();
|
|
3652
|
+
}
|
|
3666
3653
|
});
|
|
3667
3654
|
}
|
|
3668
3655
|
columnsChange() {
|
|
@@ -3673,7 +3660,8 @@ class GanttTableHeaderComponent {
|
|
|
3673
3660
|
}
|
|
3674
3661
|
tableWidth += Number(column.columnWidth.replace('px', ''));
|
|
3675
3662
|
});
|
|
3676
|
-
this.tableWidth = tableWidth;
|
|
3663
|
+
this.tableWidth = this.gantt?.table?.width ?? this.customWidth ?? this.getCalcWidth(tableWidth);
|
|
3664
|
+
this.gantt.cdr.detectChanges();
|
|
3677
3665
|
}
|
|
3678
3666
|
dragFixed(config) {
|
|
3679
3667
|
if (config.movedWidth < config.minWidth) {
|
|
@@ -3722,7 +3710,7 @@ class GanttTableHeaderComponent {
|
|
|
3722
3710
|
if (this.gantt.table) {
|
|
3723
3711
|
this.gantt.table.columnChanges.emit({ columns: this.columns });
|
|
3724
3712
|
}
|
|
3725
|
-
this.tableWidth = this.tableWidth - beforeWidth + columnWidth;
|
|
3713
|
+
this.tableWidth = this.gantt?.table?.width ?? this.customWidth ?? this.getCalcWidth(this.tableWidth - beforeWidth + columnWidth);
|
|
3726
3714
|
this.hideAuxiliaryLine();
|
|
3727
3715
|
event.source.reset();
|
|
3728
3716
|
}
|
|
@@ -3731,17 +3719,10 @@ class GanttTableHeaderComponent {
|
|
|
3731
3719
|
const left = target.getBoundingClientRect().left;
|
|
3732
3720
|
const tableWidth = this.elementRef.nativeElement.getBoundingClientRect().width;
|
|
3733
3721
|
const dragWidth = left - this.dragStartLeft;
|
|
3734
|
-
|
|
3735
|
-
this.
|
|
3736
|
-
const lastColumnWidth = parseInt(column.columnWidth, 10);
|
|
3737
|
-
const distributeWidth = parseInt(String(dragWidth * (lastColumnWidth / tableWidth)), 10);
|
|
3738
|
-
const columnWidth = Math.max(lastColumnWidth + distributeWidth || 0, minColumnWidth);
|
|
3739
|
-
column.columnWidth = coerceCssPixelValue(columnWidth);
|
|
3740
|
-
tempWidth += columnWidth;
|
|
3741
|
-
});
|
|
3742
|
-
this.tableWidth = tempWidth;
|
|
3722
|
+
this.tableWidth = this.getCalcWidth(parseInt(tableWidth + dragWidth, 10));
|
|
3723
|
+
this.customWidth = this.tableWidth;
|
|
3743
3724
|
if (this.gantt.table) {
|
|
3744
|
-
this.gantt.table.
|
|
3725
|
+
this.gantt.table.resizeChange.emit(this.tableWidth);
|
|
3745
3726
|
}
|
|
3746
3727
|
this.hideAuxiliaryLine();
|
|
3747
3728
|
event.source.reset();
|
|
@@ -3756,16 +3737,19 @@ class GanttTableHeaderComponent {
|
|
|
3756
3737
|
hideAuxiliaryLine() {
|
|
3757
3738
|
this.resizeLineElementRef.nativeElement.style.display = 'none';
|
|
3758
3739
|
}
|
|
3740
|
+
getCalcWidth(width) {
|
|
3741
|
+
return this.gantt.table?.maxWidth && width > this.gantt.table?.maxWidth ? this.gantt.table?.maxWidth : width;
|
|
3742
|
+
}
|
|
3759
3743
|
ngOnDestroy() {
|
|
3760
3744
|
this.unsubscribe$.next();
|
|
3761
3745
|
this.unsubscribe$.complete();
|
|
3762
3746
|
}
|
|
3763
3747
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: GanttTableHeaderComponent, deps: [{ token: i0.ElementRef }, { token: GANTT_ABSTRACT_TOKEN }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3764
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: GanttTableHeaderComponent, isStandalone: true, selector: "gantt-table-header", inputs: { columns: "columns" }, host: { properties: { "class": "this.className", "style.height": "this.height", "style.line-height": "this.lineHeight" } }, viewQueries: [{ propertyName: "resizeLineElementRef", first: true, predicate: ["resizeLine"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"gantt-table-header-container\">\n @for (column of columns; track $index) {\n <div class=\"gantt-table-column\" [style.width]=\"column.columnWidth\">\n @if (column.headerTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"column.headerTemplateRef\"> </ng-container>\n } @else {\n {{ column.name }}\n }\n <div\n class=\"column-resize-handle\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"onResizeMoved($event, column)\"\n (cdkDragStarted)=\"onResizeStarted($event)\"\n (cdkDragEnded)=\"onResizeEnded($event, column)\"\n ></div>\n </div>\n }\n</div>\n\n<div\n class=\"table-resize-handle\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"onResizeMoved($event)\"\n (cdkDragStarted)=\"onResizeStarted($event)\"\n (cdkDragEnded)=\"onOverallResizeEnded($event)\"\n></div>\n\n<div #resizeLine class=\"table-resize-auxiliary-line\"></div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }] }); }
|
|
3748
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: GanttTableHeaderComponent, isStandalone: true, selector: "gantt-table-header", inputs: { columns: "columns" }, host: { properties: { "class": "this.className", "style.height": "this.height", "style.line-height": "this.lineHeight" } }, viewQueries: [{ propertyName: "resizeLineElementRef", first: true, predicate: ["resizeLine"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"gantt-table-header-container\" [style.width.px]=\"tableWidth\" cdkScrollable>\n @for (column of columns; track $index) {\n <div class=\"gantt-table-column\" [style.width]=\"column.columnWidth\">\n @if (column.headerTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"column.headerTemplateRef\"> </ng-container>\n } @else {\n {{ column.name }}\n }\n <div\n class=\"column-resize-handle\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"onResizeMoved($event, column)\"\n (cdkDragStarted)=\"onResizeStarted($event)\"\n (cdkDragEnded)=\"onResizeEnded($event, column)\"\n ></div>\n </div>\n }\n <div class=\"gantt-table-column\"></div>\n</div>\n\n@if (gantt?.table?.settingsSlot) {\n <ng-template [ngTemplateOutlet]=\"gantt?.table?.settingsSlot\"></ng-template>\n}\n\n<div\n class=\"table-resize-handle\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"onResizeMoved($event)\"\n (cdkDragStarted)=\"onResizeStarted($event)\"\n (cdkDragEnded)=\"onOverallResizeEnded($event)\"\n></div>\n\n<div #resizeLine class=\"table-resize-auxiliary-line\"></div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }] }); }
|
|
3765
3749
|
}
|
|
3766
3750
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: GanttTableHeaderComponent, decorators: [{
|
|
3767
3751
|
type: Component,
|
|
3768
|
-
args: [{ selector: 'gantt-table-header', imports: [NgTemplateOutlet, CdkDrag], template: "<div class=\"gantt-table-header-container\">\n @for (column of columns; track $index) {\n <div class=\"gantt-table-column\" [style.width]=\"column.columnWidth\">\n @if (column.headerTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"column.headerTemplateRef\"> </ng-container>\n } @else {\n {{ column.name }}\n }\n <div\n class=\"column-resize-handle\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"onResizeMoved($event, column)\"\n (cdkDragStarted)=\"onResizeStarted($event)\"\n (cdkDragEnded)=\"onResizeEnded($event, column)\"\n ></div>\n </div>\n }\n</div>\n\n<div\n class=\"table-resize-handle\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"onResizeMoved($event)\"\n (cdkDragStarted)=\"onResizeStarted($event)\"\n (cdkDragEnded)=\"onOverallResizeEnded($event)\"\n></div>\n\n<div #resizeLine class=\"table-resize-auxiliary-line\"></div>\n" }]
|
|
3752
|
+
args: [{ selector: 'gantt-table-header', imports: [NgTemplateOutlet, CdkDrag], template: "<div class=\"gantt-table-header-container\" [style.width.px]=\"tableWidth\" cdkScrollable>\n @for (column of columns; track $index) {\n <div class=\"gantt-table-column\" [style.width]=\"column.columnWidth\">\n @if (column.headerTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"column.headerTemplateRef\"> </ng-container>\n } @else {\n {{ column.name }}\n }\n <div\n class=\"column-resize-handle\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"onResizeMoved($event, column)\"\n (cdkDragStarted)=\"onResizeStarted($event)\"\n (cdkDragEnded)=\"onResizeEnded($event, column)\"\n ></div>\n </div>\n }\n <div class=\"gantt-table-column\"></div>\n</div>\n\n@if (gantt?.table?.settingsSlot) {\n <ng-template [ngTemplateOutlet]=\"gantt?.table?.settingsSlot\"></ng-template>\n}\n\n<div\n class=\"table-resize-handle\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"onResizeMoved($event)\"\n (cdkDragStarted)=\"onResizeStarted($event)\"\n (cdkDragEnded)=\"onOverallResizeEnded($event)\"\n></div>\n\n<div #resizeLine class=\"table-resize-auxiliary-line\"></div>\n" }]
|
|
3769
3753
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
3770
3754
|
type: Inject,
|
|
3771
3755
|
args: [GANTT_ABSTRACT_TOKEN]
|
|
@@ -3797,11 +3781,12 @@ class GanttTableBodyComponent {
|
|
|
3797
3781
|
get viewportItems() {
|
|
3798
3782
|
return this._viewportItems;
|
|
3799
3783
|
}
|
|
3800
|
-
constructor(gantt, ganttUpper, cdr, document) {
|
|
3784
|
+
constructor(gantt, ganttUpper, cdr, document, ngZone) {
|
|
3801
3785
|
this.gantt = gantt;
|
|
3802
3786
|
this.ganttUpper = ganttUpper;
|
|
3803
3787
|
this.cdr = cdr;
|
|
3804
3788
|
this.document = document;
|
|
3789
|
+
this.ngZone = ngZone;
|
|
3805
3790
|
this.draggable = false;
|
|
3806
3791
|
this.dragDropped = new EventEmitter();
|
|
3807
3792
|
this.dragStarted = new EventEmitter();
|
|
@@ -3831,6 +3816,7 @@ class GanttTableBodyComponent {
|
|
|
3831
3816
|
});
|
|
3832
3817
|
}
|
|
3833
3818
|
ngAfterViewInit() {
|
|
3819
|
+
this.initialize();
|
|
3834
3820
|
this.cdkDrags.changes
|
|
3835
3821
|
.pipe(startWith$1(this.cdkDrags), takeUntil$1(this.destroy$))
|
|
3836
3822
|
.subscribe((drags) => {
|
|
@@ -3850,6 +3836,32 @@ class GanttTableBodyComponent {
|
|
|
3850
3836
|
this.onItemDragMoved(event);
|
|
3851
3837
|
});
|
|
3852
3838
|
}
|
|
3839
|
+
initialize() {
|
|
3840
|
+
this.sideContainer = this.document.getElementsByClassName('gantt-side-container')[0];
|
|
3841
|
+
this.headerContainer = this.document.getElementsByClassName('gantt-table-header-container')[0];
|
|
3842
|
+
this.footerContainer = this.document.getElementsByClassName('gantt-table-footer')[0];
|
|
3843
|
+
this.monitorScrollChange();
|
|
3844
|
+
}
|
|
3845
|
+
monitorScrollChange() {
|
|
3846
|
+
const scrollObservers = [
|
|
3847
|
+
fromEvent(this.sideContainer, 'scroll', passiveListenerOptions),
|
|
3848
|
+
fromEvent(this.headerContainer, 'scroll', passiveListenerOptions)
|
|
3849
|
+
];
|
|
3850
|
+
this.ngZone.runOutsideAngular(() => merge(...scrollObservers)
|
|
3851
|
+
.pipe(takeUntil$1(this.destroy$))
|
|
3852
|
+
.subscribe((event) => {
|
|
3853
|
+
const target = event.currentTarget;
|
|
3854
|
+
const classList = target.classList;
|
|
3855
|
+
if (classList.contains('gantt-table-header-container')) {
|
|
3856
|
+
this.sideContainer && (this.sideContainer.scrollLeft = target.scrollLeft);
|
|
3857
|
+
this.footerContainer && (this.footerContainer.scrollLeft = target.scrollLeft);
|
|
3858
|
+
}
|
|
3859
|
+
else {
|
|
3860
|
+
this.headerContainer && (this.headerContainer.scrollLeft = target.scrollLeft);
|
|
3861
|
+
this.footerContainer && (this.footerContainer.scrollLeft = target.scrollLeft);
|
|
3862
|
+
}
|
|
3863
|
+
}));
|
|
3864
|
+
}
|
|
3853
3865
|
expandGroup(group) {
|
|
3854
3866
|
this.gantt.expandGroup(group);
|
|
3855
3867
|
}
|
|
@@ -4044,12 +4056,12 @@ class GanttTableBodyComponent {
|
|
|
4044
4056
|
this.document.querySelectorAll('.drop-position-after').forEach((element) => element.classList.remove('drop-position-after'));
|
|
4045
4057
|
this.document.querySelectorAll('.drop-position-inside').forEach((element) => element.classList.remove('drop-position-inside'));
|
|
4046
4058
|
}
|
|
4047
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: GanttTableBodyComponent, deps: [{ token: GANTT_ABSTRACT_TOKEN }, { token: GANTT_UPPER_TOKEN }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4048
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: GanttTableBodyComponent, isStandalone: true, selector: "gantt-table-body", inputs: { viewportItems: "viewportItems", flatItems: "flatItems", columns: "columns", groupTemplate: "groupTemplate", emptyTemplate: "emptyTemplate", rowBeforeTemplate: "rowBeforeTemplate", rowAfterTemplate: "rowAfterTemplate", draggable: "draggable", dropEnterPredicate: "dropEnterPredicate" }, outputs: { dragDropped: "dragDropped", dragStarted: "dragStarted", dragEnded: "dragEnded", itemClick: "itemClick" }, host: { properties: { "class.gantt-table-draggable": "this.draggable", "class.gantt-table-body": "this.ganttTableClass", "class.gantt-table-empty": "this.ganttTableEmptyClass", "class.gantt-table-dragging": "this.ganttTableDragging" } }, viewQueries: [{ propertyName: "cdkDrags", predicate: (CdkDrag), descendants: true }], ngImport: i0, template: "<div\n class=\"gantt-table-body-container\"\n cdkDropList\n [cdkDropListAutoScrollStep]=\"6\"\n [cdkDropListData]=\"viewportItems\"\n [cdkDropListSortingDisabled]=\"true\"\n (cdkDropListDropped)=\"onListDropped($event)\"\n>\n @if (!viewportItems?.length) {\n @if (!emptyTemplate) {\n <gantt-icon class=\"empty-icon\" iconName=\"empty\"></gantt-icon>\n <div class=\"empty-text\">\u6CA1\u6709\u6570\u636E</div>\n }\n <ng-template [ngTemplateOutlet]=\"emptyTemplate\"></ng-template>\n }\n\n @if (viewportItems && viewportItems.length > 0) {\n @for (item of viewportItems; track trackBy($index, item)) {\n @if (item | isGanttGroup) {\n <div class=\"gantt-table-group\" [style.height.px]=\"gantt.styles.lineHeight\" [ngClass]=\"item.class\">\n <div class=\"gantt-table-group-title\" [class.expanded]=\"item.expanded\" (click)=\"expandGroup(item)\">\n <gantt-icon class=\"expand-icon\" [iconName]=\"item.expanded ? 'angle-down' : 'angle-right'\"></gantt-icon>\n @if (groupTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, group: item.origin }\"\n ></ng-template>\n } @else {\n <span class=\"group-title\">{{ item.title }}</span>\n }\n </div>\n </div>\n }\n @if (!(item | isGanttGroup)) {\n <div\n (click)=\"itemClick.emit({ event: $event, current: item.origin, selectedValue: item.origin })\"\n cdkDrag\n [cdkDragData]=\"item\"\n [cdkDragDisabled]=\"(draggable && item.itemDraggable === false) || !draggable\"\n (cdkDragStarted)=\"onItemDragStarted($event)\"\n (cdkDragEnded)=\"onItemDragEnded($event)\"\n (cdkDragMoved)=\"emitItemDragMoved($event)\"\n class=\"gantt-table-item\"\n [class.gantt-table-item-with-group]=\"hasGroup\"\n [class.gantt-table-item-first-level-group]=\"item.level === 0 && (item.type | isGanttRangeItem)\"\n [style.height.px]=\"gantt.styles.lineHeight\"\n [style.lineHeight.px]=\"gantt.styles.lineHeight\"\n [class.gantt-table-item-active]=\"ganttUpper.isSelected(item.id)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"rowBeforeTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n @for (column of columns; track $index; let first = $first) {\n <div [classList]=\"column.classList\" [style.width]=\"column.columnWidth\">\n <!-- drag icon -->\n @if (first && draggable) {\n <gantt-icon\n class=\"gantt-drag-handle\"\n iconName=\"drag\"\n cdkDragHandle\n [cdkDragHandleDisabled]=\"(draggable && item.itemDraggable === false) || !draggable\"\n ></gantt-icon>\n }\n <!-- expand icon -->\n @if (column?.showExpandIcon || (!hasExpandIcon && first)) {\n <div class=\"gantt-expand-icon\" [style.marginLeft.px]=\"item.level * 20\">\n @if (item.level < gantt.maxLevel - 1 && ((gantt.async && item.expandable) || item.children?.length > 0)) {\n @if (!item.loading) {\n <gantt-icon\n class=\"expand-icon\"\n [iconName]=\"item.expanded ? 'angle-down' : 'angle-right'\"\n (click)=\"expandChildren($event, item)\"\n >\n </gantt-icon>\n }\n @if (item.loading) {\n <gantt-icon [iconName]=\"'loading'\"></gantt-icon>\n }\n }\n </div>\n }\n <!-- column content -->\n <div class=\"gantt-table-column-content\">\n <ng-template\n [ngTemplateOutlet]=\"column.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n </div>\n </div>\n }\n <ng-template\n [ngTemplateOutlet]=\"rowAfterTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n </div>\n }\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: GanttIconComponent, selector: "gantt-icon", inputs: ["iconName"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: IsGanttRangeItemPipe, name: "isGanttRangeItem" }, { kind: "pipe", type: IsGanttGroupPipe, name: "isGanttGroup" }] }); }
|
|
4059
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: GanttTableBodyComponent, deps: [{ token: GANTT_ABSTRACT_TOKEN }, { token: GANTT_UPPER_TOKEN }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4060
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: GanttTableBodyComponent, isStandalone: true, selector: "gantt-table-body", inputs: { viewportItems: "viewportItems", flatItems: "flatItems", columns: "columns", groupTemplate: "groupTemplate", emptyTemplate: "emptyTemplate", rowBeforeTemplate: "rowBeforeTemplate", rowAfterTemplate: "rowAfterTemplate", draggable: "draggable", dropEnterPredicate: "dropEnterPredicate" }, outputs: { dragDropped: "dragDropped", dragStarted: "dragStarted", dragEnded: "dragEnded", itemClick: "itemClick" }, host: { properties: { "class.gantt-table-draggable": "this.draggable", "class.gantt-table-body": "this.ganttTableClass", "class.gantt-table-empty": "this.ganttTableEmptyClass", "class.gantt-table-dragging": "this.ganttTableDragging" } }, viewQueries: [{ propertyName: "cdkDrags", predicate: (CdkDrag), descendants: true }], ngImport: i0, template: "<div\n class=\"gantt-table-body-container\"\n cdkDropList\n [cdkDropListAutoScrollStep]=\"6\"\n [cdkDropListData]=\"viewportItems\"\n [cdkDropListSortingDisabled]=\"true\"\n (cdkDropListDropped)=\"onListDropped($event)\"\n>\n @if (!viewportItems?.length) {\n @if (!emptyTemplate) {\n <gantt-icon class=\"empty-icon\" iconName=\"empty\"></gantt-icon>\n <div class=\"empty-text\">\u6CA1\u6709\u6570\u636E</div>\n }\n <ng-template [ngTemplateOutlet]=\"emptyTemplate\"></ng-template>\n }\n\n @if (viewportItems && viewportItems.length > 0) {\n @for (item of viewportItems; track trackBy($index, item)) {\n @if (item | isGanttGroup) {\n <div class=\"gantt-table-group\" [style.height.px]=\"gantt.styles.lineHeight\" [ngClass]=\"item.class\">\n <div class=\"gantt-table-group-title\" [class.expanded]=\"item.expanded\" (click)=\"expandGroup(item)\">\n <gantt-icon class=\"expand-icon\" [iconName]=\"item.expanded ? 'angle-down' : 'angle-right'\"></gantt-icon>\n @if (groupTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, group: item.origin }\"\n ></ng-template>\n } @else {\n <span class=\"group-title\">{{ item.title }}</span>\n }\n </div>\n </div>\n }\n @if (!(item | isGanttGroup)) {\n <div\n (click)=\"itemClick.emit({ event: $event, current: item.origin, selectedValue: item.origin })\"\n cdkDrag\n [cdkDragData]=\"item\"\n [cdkDragDisabled]=\"(draggable && item.itemDraggable === false) || !draggable\"\n (cdkDragStarted)=\"onItemDragStarted($event)\"\n (cdkDragEnded)=\"onItemDragEnded($event)\"\n (cdkDragMoved)=\"emitItemDragMoved($event)\"\n class=\"gantt-table-item\"\n [class.gantt-table-item-with-group]=\"hasGroup\"\n [class.gantt-table-item-first-level-group]=\"item.level === 0 && (item.type | isGanttRangeItem)\"\n [style.height.px]=\"gantt.styles.lineHeight\"\n [style.lineHeight.px]=\"gantt.styles.lineHeight\"\n [class.gantt-table-item-active]=\"ganttUpper.isSelected(item.id)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"rowBeforeTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n @for (column of columns; track $index; let first = $first) {\n <div [classList]=\"column.classList\" [style.width]=\"column.columnWidth\">\n <!-- drag icon -->\n @if (first && draggable) {\n <gantt-icon\n class=\"gantt-drag-handle\"\n iconName=\"drag\"\n cdkDragHandle\n [cdkDragHandleDisabled]=\"(draggable && item.itemDraggable === false) || !draggable\"\n ></gantt-icon>\n }\n <!-- expand icon -->\n @if (column?.showExpandIcon || (!hasExpandIcon && first)) {\n <div class=\"gantt-expand-icon\" [style.marginLeft.px]=\"item.level * 20\">\n @if (item.level < gantt.maxLevel - 1 && ((gantt.async && item.expandable) || item.children?.length > 0)) {\n @if (!item.loading) {\n <gantt-icon\n class=\"expand-icon\"\n [iconName]=\"item.expanded ? 'angle-down' : 'angle-right'\"\n (click)=\"expandChildren($event, item)\"\n >\n </gantt-icon>\n }\n @if (item.loading) {\n <gantt-icon [iconName]=\"'loading'\"></gantt-icon>\n }\n }\n </div>\n }\n <!-- column content -->\n <div class=\"gantt-table-column-content\">\n <ng-template\n [ngTemplateOutlet]=\"column.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n </div>\n </div>\n }\n <div class=\"gantt-table-column\"></div>\n <ng-template\n [ngTemplateOutlet]=\"rowAfterTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n </div>\n }\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: GanttIconComponent, selector: "gantt-icon", inputs: ["iconName"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: IsGanttRangeItemPipe, name: "isGanttRangeItem" }, { kind: "pipe", type: IsGanttGroupPipe, name: "isGanttGroup" }] }); }
|
|
4049
4061
|
}
|
|
4050
4062
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: GanttTableBodyComponent, decorators: [{
|
|
4051
4063
|
type: Component,
|
|
4052
|
-
args: [{ selector: 'gantt-table-body', imports: [CdkDropList, GanttIconComponent, NgTemplateOutlet, NgClass, CdkDrag, CdkDragHandle, IsGanttRangeItemPipe, IsGanttGroupPipe], template: "<div\n class=\"gantt-table-body-container\"\n cdkDropList\n [cdkDropListAutoScrollStep]=\"6\"\n [cdkDropListData]=\"viewportItems\"\n [cdkDropListSortingDisabled]=\"true\"\n (cdkDropListDropped)=\"onListDropped($event)\"\n>\n @if (!viewportItems?.length) {\n @if (!emptyTemplate) {\n <gantt-icon class=\"empty-icon\" iconName=\"empty\"></gantt-icon>\n <div class=\"empty-text\">\u6CA1\u6709\u6570\u636E</div>\n }\n <ng-template [ngTemplateOutlet]=\"emptyTemplate\"></ng-template>\n }\n\n @if (viewportItems && viewportItems.length > 0) {\n @for (item of viewportItems; track trackBy($index, item)) {\n @if (item | isGanttGroup) {\n <div class=\"gantt-table-group\" [style.height.px]=\"gantt.styles.lineHeight\" [ngClass]=\"item.class\">\n <div class=\"gantt-table-group-title\" [class.expanded]=\"item.expanded\" (click)=\"expandGroup(item)\">\n <gantt-icon class=\"expand-icon\" [iconName]=\"item.expanded ? 'angle-down' : 'angle-right'\"></gantt-icon>\n @if (groupTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, group: item.origin }\"\n ></ng-template>\n } @else {\n <span class=\"group-title\">{{ item.title }}</span>\n }\n </div>\n </div>\n }\n @if (!(item | isGanttGroup)) {\n <div\n (click)=\"itemClick.emit({ event: $event, current: item.origin, selectedValue: item.origin })\"\n cdkDrag\n [cdkDragData]=\"item\"\n [cdkDragDisabled]=\"(draggable && item.itemDraggable === false) || !draggable\"\n (cdkDragStarted)=\"onItemDragStarted($event)\"\n (cdkDragEnded)=\"onItemDragEnded($event)\"\n (cdkDragMoved)=\"emitItemDragMoved($event)\"\n class=\"gantt-table-item\"\n [class.gantt-table-item-with-group]=\"hasGroup\"\n [class.gantt-table-item-first-level-group]=\"item.level === 0 && (item.type | isGanttRangeItem)\"\n [style.height.px]=\"gantt.styles.lineHeight\"\n [style.lineHeight.px]=\"gantt.styles.lineHeight\"\n [class.gantt-table-item-active]=\"ganttUpper.isSelected(item.id)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"rowBeforeTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n @for (column of columns; track $index; let first = $first) {\n <div [classList]=\"column.classList\" [style.width]=\"column.columnWidth\">\n <!-- drag icon -->\n @if (first && draggable) {\n <gantt-icon\n class=\"gantt-drag-handle\"\n iconName=\"drag\"\n cdkDragHandle\n [cdkDragHandleDisabled]=\"(draggable && item.itemDraggable === false) || !draggable\"\n ></gantt-icon>\n }\n <!-- expand icon -->\n @if (column?.showExpandIcon || (!hasExpandIcon && first)) {\n <div class=\"gantt-expand-icon\" [style.marginLeft.px]=\"item.level * 20\">\n @if (item.level < gantt.maxLevel - 1 && ((gantt.async && item.expandable) || item.children?.length > 0)) {\n @if (!item.loading) {\n <gantt-icon\n class=\"expand-icon\"\n [iconName]=\"item.expanded ? 'angle-down' : 'angle-right'\"\n (click)=\"expandChildren($event, item)\"\n >\n </gantt-icon>\n }\n @if (item.loading) {\n <gantt-icon [iconName]=\"'loading'\"></gantt-icon>\n }\n }\n </div>\n }\n <!-- column content -->\n <div class=\"gantt-table-column-content\">\n <ng-template\n [ngTemplateOutlet]=\"column.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n </div>\n </div>\n }\n <ng-template\n [ngTemplateOutlet]=\"rowAfterTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n </div>\n }\n }\n }\n</div>\n" }]
|
|
4064
|
+
args: [{ selector: 'gantt-table-body', imports: [CdkDropList, GanttIconComponent, NgTemplateOutlet, NgClass, CdkDrag, CdkDragHandle, IsGanttRangeItemPipe, IsGanttGroupPipe], template: "<div\n class=\"gantt-table-body-container\"\n cdkDropList\n [cdkDropListAutoScrollStep]=\"6\"\n [cdkDropListData]=\"viewportItems\"\n [cdkDropListSortingDisabled]=\"true\"\n (cdkDropListDropped)=\"onListDropped($event)\"\n>\n @if (!viewportItems?.length) {\n @if (!emptyTemplate) {\n <gantt-icon class=\"empty-icon\" iconName=\"empty\"></gantt-icon>\n <div class=\"empty-text\">\u6CA1\u6709\u6570\u636E</div>\n }\n <ng-template [ngTemplateOutlet]=\"emptyTemplate\"></ng-template>\n }\n\n @if (viewportItems && viewportItems.length > 0) {\n @for (item of viewportItems; track trackBy($index, item)) {\n @if (item | isGanttGroup) {\n <div class=\"gantt-table-group\" [style.height.px]=\"gantt.styles.lineHeight\" [ngClass]=\"item.class\">\n <div class=\"gantt-table-group-title\" [class.expanded]=\"item.expanded\" (click)=\"expandGroup(item)\">\n <gantt-icon class=\"expand-icon\" [iconName]=\"item.expanded ? 'angle-down' : 'angle-right'\"></gantt-icon>\n @if (groupTemplate) {\n <ng-template\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, group: item.origin }\"\n ></ng-template>\n } @else {\n <span class=\"group-title\">{{ item.title }}</span>\n }\n </div>\n </div>\n }\n @if (!(item | isGanttGroup)) {\n <div\n (click)=\"itemClick.emit({ event: $event, current: item.origin, selectedValue: item.origin })\"\n cdkDrag\n [cdkDragData]=\"item\"\n [cdkDragDisabled]=\"(draggable && item.itemDraggable === false) || !draggable\"\n (cdkDragStarted)=\"onItemDragStarted($event)\"\n (cdkDragEnded)=\"onItemDragEnded($event)\"\n (cdkDragMoved)=\"emitItemDragMoved($event)\"\n class=\"gantt-table-item\"\n [class.gantt-table-item-with-group]=\"hasGroup\"\n [class.gantt-table-item-first-level-group]=\"item.level === 0 && (item.type | isGanttRangeItem)\"\n [style.height.px]=\"gantt.styles.lineHeight\"\n [style.lineHeight.px]=\"gantt.styles.lineHeight\"\n [class.gantt-table-item-active]=\"ganttUpper.isSelected(item.id)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"rowBeforeTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n @for (column of columns; track $index; let first = $first) {\n <div [classList]=\"column.classList\" [style.width]=\"column.columnWidth\">\n <!-- drag icon -->\n @if (first && draggable) {\n <gantt-icon\n class=\"gantt-drag-handle\"\n iconName=\"drag\"\n cdkDragHandle\n [cdkDragHandleDisabled]=\"(draggable && item.itemDraggable === false) || !draggable\"\n ></gantt-icon>\n }\n <!-- expand icon -->\n @if (column?.showExpandIcon || (!hasExpandIcon && first)) {\n <div class=\"gantt-expand-icon\" [style.marginLeft.px]=\"item.level * 20\">\n @if (item.level < gantt.maxLevel - 1 && ((gantt.async && item.expandable) || item.children?.length > 0)) {\n @if (!item.loading) {\n <gantt-icon\n class=\"expand-icon\"\n [iconName]=\"item.expanded ? 'angle-down' : 'angle-right'\"\n (click)=\"expandChildren($event, item)\"\n >\n </gantt-icon>\n }\n @if (item.loading) {\n <gantt-icon [iconName]=\"'loading'\"></gantt-icon>\n }\n }\n </div>\n }\n <!-- column content -->\n <div class=\"gantt-table-column-content\">\n <ng-template\n [ngTemplateOutlet]=\"column.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n </div>\n </div>\n }\n <div class=\"gantt-table-column\"></div>\n <ng-template\n [ngTemplateOutlet]=\"rowAfterTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n </div>\n }\n }\n }\n</div>\n" }]
|
|
4053
4065
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
4054
4066
|
type: Inject,
|
|
4055
4067
|
args: [GANTT_ABSTRACT_TOKEN]
|
|
@@ -4059,7 +4071,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
4059
4071
|
}] }, { type: i0.ChangeDetectorRef }, { type: Document, decorators: [{
|
|
4060
4072
|
type: Inject,
|
|
4061
4073
|
args: [DOCUMENT]
|
|
4062
|
-
}] }], propDecorators: { viewportItems: [{
|
|
4074
|
+
}] }, { type: i0.NgZone }], propDecorators: { viewportItems: [{
|
|
4063
4075
|
type: Input
|
|
4064
4076
|
}], flatItems: [{
|
|
4065
4077
|
type: Input
|
|
@@ -4133,6 +4145,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
4133
4145
|
args: ['style.top']
|
|
4134
4146
|
}] } });
|
|
4135
4147
|
|
|
4148
|
+
class GanttScrollbarComponent {
|
|
4149
|
+
constructor(ganttUpper) {
|
|
4150
|
+
this.ganttUpper = ganttUpper;
|
|
4151
|
+
this.hasFooter = false;
|
|
4152
|
+
}
|
|
4153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: GanttScrollbarComponent, deps: [{ token: GANTT_UPPER_TOKEN }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4154
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: GanttScrollbarComponent, isStandalone: true, selector: "gantt-scrollbar", inputs: { hasFooter: "hasFooter", tableWidth: "tableWidth", ganttRoot: "ganttRoot" }, ngImport: i0, template: "<div\n class=\"gantt-scrollbar\"\n [ngClass]=\"{ 'gantt-scrollbar-bg': hasFooter }\"\n [style.height.px]=\"ganttRoot?.horizontalScrollbarHeight + 1\"\n [style.right.px]=\"ganttRoot?.verticalScrollbarWidth\"\n>\n <div class=\"gantt-table-scrollbar\" [class.with-scrollbar]=\"ganttRoot?.horizontalScrollbarHeight\" [style.width.px]=\"tableWidth\"></div>\n <div class=\"gantt-main-scrollbar\">\n <div class=\"h-100\" [style.width.px]=\"ganttRoot['view']?.width\"></div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
4155
|
+
}
|
|
4156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: GanttScrollbarComponent, decorators: [{
|
|
4157
|
+
type: Component,
|
|
4158
|
+
args: [{ selector: 'gantt-scrollbar', imports: [NgClass], template: "<div\n class=\"gantt-scrollbar\"\n [ngClass]=\"{ 'gantt-scrollbar-bg': hasFooter }\"\n [style.height.px]=\"ganttRoot?.horizontalScrollbarHeight + 1\"\n [style.right.px]=\"ganttRoot?.verticalScrollbarWidth\"\n>\n <div class=\"gantt-table-scrollbar\" [class.with-scrollbar]=\"ganttRoot?.horizontalScrollbarHeight\" [style.width.px]=\"tableWidth\"></div>\n <div class=\"gantt-main-scrollbar\">\n <div class=\"h-100\" [style.width.px]=\"ganttRoot['view']?.width\"></div>\n </div>\n</div>\n" }]
|
|
4159
|
+
}], ctorParameters: () => [{ type: GanttUpper, decorators: [{
|
|
4160
|
+
type: Inject,
|
|
4161
|
+
args: [GANTT_UPPER_TOKEN]
|
|
4162
|
+
}] }], propDecorators: { hasFooter: [{
|
|
4163
|
+
type: Input
|
|
4164
|
+
}], tableWidth: [{
|
|
4165
|
+
type: Input
|
|
4166
|
+
}], ganttRoot: [{
|
|
4167
|
+
type: Input
|
|
4168
|
+
}] } });
|
|
4169
|
+
|
|
4136
4170
|
class GanttPrintService {
|
|
4137
4171
|
constructor() { }
|
|
4138
4172
|
setInlineStyles(targetElem) {
|
|
@@ -4427,10 +4461,11 @@ class NgxGanttTableComponent {
|
|
|
4427
4461
|
this.dragStarted = new EventEmitter();
|
|
4428
4462
|
this.dragEnded = new EventEmitter();
|
|
4429
4463
|
this.columnChanges = new EventEmitter();
|
|
4464
|
+
this.resizeChange = new EventEmitter();
|
|
4430
4465
|
this.itemClick = new EventEmitter();
|
|
4431
4466
|
}
|
|
4432
4467
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: NgxGanttTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4433
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: NgxGanttTableComponent, isStandalone: true, selector: "ngx-gantt-table", inputs: { draggable: "draggable", dropEnterPredicate: "dropEnterPredicate" }, outputs: { dragDropped: "dragDropped", dragStarted: "dragStarted", dragEnded: "dragEnded", columnChanges: "columnChanges", itemClick: "itemClick" }, queries: [{ propertyName: "rowBeforeTemplate", first: true, predicate: ["rowBeforeSlot"], descendants: true, static: true }, { propertyName: "rowAfterTemplate", first: true, predicate: ["rowAfterSlot"], descendants: true, static: true }, { propertyName: "tableEmptyTemplate", first: true, predicate: ["tableEmpty"], descendants: true, static: true }, { propertyName: "tableFooterTemplate", first: true, predicate: ["tableFooter"], descendants: true, static: true }], ngImport: i0, template: '', isInline: true }); }
|
|
4468
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: NgxGanttTableComponent, isStandalone: true, selector: "ngx-gantt-table", inputs: { draggable: "draggable", maxWidth: "maxWidth", width: "width", dropEnterPredicate: "dropEnterPredicate" }, outputs: { dragDropped: "dragDropped", dragStarted: "dragStarted", dragEnded: "dragEnded", columnChanges: "columnChanges", resizeChange: "resizeChange", itemClick: "itemClick" }, queries: [{ propertyName: "rowBeforeTemplate", first: true, predicate: ["rowBeforeSlot"], descendants: true, static: true }, { propertyName: "rowAfterTemplate", first: true, predicate: ["rowAfterSlot"], descendants: true, static: true }, { propertyName: "tableEmptyTemplate", first: true, predicate: ["tableEmpty"], descendants: true, static: true }, { propertyName: "tableFooterTemplate", first: true, predicate: ["tableFooter"], descendants: true, static: true }, { propertyName: "settingsSlot", first: true, predicate: ["settingsSlot"], descendants: true, static: true }], ngImport: i0, template: '', isInline: true }); }
|
|
4434
4469
|
}
|
|
4435
4470
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: NgxGanttTableComponent, decorators: [{
|
|
4436
4471
|
type: Component,
|
|
@@ -4441,6 +4476,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
4441
4476
|
}]
|
|
4442
4477
|
}], propDecorators: { draggable: [{
|
|
4443
4478
|
type: Input
|
|
4479
|
+
}], maxWidth: [{
|
|
4480
|
+
type: Input
|
|
4481
|
+
}], width: [{
|
|
4482
|
+
type: Input
|
|
4444
4483
|
}], dropEnterPredicate: [{
|
|
4445
4484
|
type: Input
|
|
4446
4485
|
}], dragDropped: [{
|
|
@@ -4451,6 +4490,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
4451
4490
|
type: Output
|
|
4452
4491
|
}], columnChanges: [{
|
|
4453
4492
|
type: Output
|
|
4493
|
+
}], resizeChange: [{
|
|
4494
|
+
type: Output
|
|
4454
4495
|
}], itemClick: [{
|
|
4455
4496
|
type: Output
|
|
4456
4497
|
}], rowBeforeTemplate: [{
|
|
@@ -4465,28 +4506,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
4465
4506
|
}], tableFooterTemplate: [{
|
|
4466
4507
|
type: ContentChild,
|
|
4467
4508
|
args: ['tableFooter', { static: true }]
|
|
4468
|
-
}]
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
constructor(ganttUpper) {
|
|
4472
|
-
this.ganttUpper = ganttUpper;
|
|
4473
|
-
this.hasFooter = false;
|
|
4474
|
-
}
|
|
4475
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: GanttScrollbarComponent, deps: [{ token: GANTT_UPPER_TOKEN }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4476
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: GanttScrollbarComponent, isStandalone: true, selector: "gantt-scrollbar", inputs: { hasFooter: "hasFooter", tableWidth: "tableWidth", ganttRoot: "ganttRoot" }, ngImport: i0, template: "<div\n class=\"gantt-scrollbar\"\n [ngClass]=\"{ 'gantt-scrollbar-bg': hasFooter }\"\n [style.height.px]=\"ganttRoot?.horizontalScrollbarHeight + 1\"\n [style.right.px]=\"ganttRoot?.verticalScrollbarWidth\"\n>\n <div class=\"gantt-table-scrollbar\" [class.with-scrollbar]=\"ganttRoot?.horizontalScrollbarHeight\" [style.width.px]=\"tableWidth\"></div>\n <div class=\"gantt-main-scrollbar\">\n <div class=\"h-100\" [style.width.px]=\"ganttRoot['view']?.width\"></div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
4477
|
-
}
|
|
4478
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: GanttScrollbarComponent, decorators: [{
|
|
4479
|
-
type: Component,
|
|
4480
|
-
args: [{ selector: 'gantt-scrollbar', imports: [NgClass], template: "<div\n class=\"gantt-scrollbar\"\n [ngClass]=\"{ 'gantt-scrollbar-bg': hasFooter }\"\n [style.height.px]=\"ganttRoot?.horizontalScrollbarHeight + 1\"\n [style.right.px]=\"ganttRoot?.verticalScrollbarWidth\"\n>\n <div class=\"gantt-table-scrollbar\" [class.with-scrollbar]=\"ganttRoot?.horizontalScrollbarHeight\" [style.width.px]=\"tableWidth\"></div>\n <div class=\"gantt-main-scrollbar\">\n <div class=\"h-100\" [style.width.px]=\"ganttRoot['view']?.width\"></div>\n </div>\n</div>\n" }]
|
|
4481
|
-
}], ctorParameters: () => [{ type: GanttUpper, decorators: [{
|
|
4482
|
-
type: Inject,
|
|
4483
|
-
args: [GANTT_UPPER_TOKEN]
|
|
4484
|
-
}] }], propDecorators: { hasFooter: [{
|
|
4485
|
-
type: Input
|
|
4486
|
-
}], tableWidth: [{
|
|
4487
|
-
type: Input
|
|
4488
|
-
}], ganttRoot: [{
|
|
4489
|
-
type: Input
|
|
4509
|
+
}], settingsSlot: [{
|
|
4510
|
+
type: ContentChild,
|
|
4511
|
+
args: ['settingsSlot', { static: true }]
|
|
4490
4512
|
}] } });
|
|
4491
4513
|
|
|
4492
4514
|
class NgxGanttComponent extends GanttUpper {
|
|
@@ -4718,6 +4740,11 @@ class NgxGanttComponent extends GanttUpper {
|
|
|
4718
4740
|
count: this.flatItems.length
|
|
4719
4741
|
});
|
|
4720
4742
|
}
|
|
4743
|
+
changeView(type) {
|
|
4744
|
+
super.changeView(type);
|
|
4745
|
+
this.viewportItems = this.flatItems.slice(this.rangeStart, this.rangeEnd);
|
|
4746
|
+
this.computeTempDataRefs();
|
|
4747
|
+
}
|
|
4721
4748
|
expandGroups(expanded) {
|
|
4722
4749
|
this.groups.forEach((group) => {
|
|
4723
4750
|
group.setExpand(expanded);
|
|
@@ -4750,7 +4777,7 @@ class NgxGanttComponent extends GanttUpper {
|
|
|
4750
4777
|
provide: GANTT_ABSTRACT_TOKEN,
|
|
4751
4778
|
useExisting: forwardRef(() => NgxGanttComponent)
|
|
4752
4779
|
}
|
|
4753
|
-
], queries: [{ propertyName: "table", first: true, predicate: NgxGanttTableComponent, descendants: true }, { propertyName: "tableEmptyTemplate", first: true, predicate: ["tableEmpty"], descendants: true, static: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, static: true }, { propertyName: "columns", predicate: NgxGanttTableColumnComponent, descendants: true }], viewQueries: [{ propertyName: "ganttRoot", first: true, predicate: ["ganttRoot"], descendants: true }, { propertyName: "virtualScroll", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ngx-gantt-root #ganttRoot>\n <div class=\"gantt-header\">\n <gantt-table-header #tableHeader [columns]=\"columns\"></gantt-table-header>\n <div class=\"gantt-container-header\">\n <gantt-calendar-header [style.padding-right.px]=\"ganttRoot.verticalScrollbarWidth\"></gantt-calendar-header>\n </div>\n </div>\n @if (loading) {\n <gantt-loader></gantt-loader>\n }\n\n <cdk-virtual-scroll-viewport\n class=\"gantt-virtual-scroll-viewport\"\n [ngClass]=\"{\n 'gantt-normal-viewport': !virtualScrollEnabled,\n 'gantt-scroll-container': virtualScrollEnabled,\n 'with-footer': table?.tableFooterTemplate || footerTemplate\n }\"\n [style.top.px]=\"styles.headerHeight\"\n [itemSize]=\"styles.lineHeight\"\n [minBufferPx]=\"styles.lineHeight * 10\"\n [maxBufferPx]=\"styles.lineHeight * 20\"\n (scrolledIndexChange)=\"scrolledIndexChange($event)\"\n >\n <ng-container *cdkVirtualFor=\"let item of flatItems; trackBy: trackBy\"></ng-container>\n <div class=\"gantt-side\" [style.width.px]=\"tableHeader.tableWidth + 1\" [style.padding-bottom.px]=\"ganttRoot.horizontalScrollbarHeight\">\n <div class=\"gantt-side-container\">\n <div class=\"gantt-table\">\n <gantt-table-body\n [flatItems]=\"flatItems\"\n [viewportItems]=\"viewportItems\"\n [columns]=\"columns\"\n [groupTemplate]=\"groupTemplate\"\n [emptyTemplate]=\"table.tableEmptyTemplate || tableEmptyTemplate\"\n [rowBeforeTemplate]=\"table?.rowBeforeTemplate\"\n [rowAfterTemplate]=\"table?.rowAfterTemplate\"\n [draggable]=\"table.draggable\"\n [dropEnterPredicate]=\"table.dropEnterPredicate\"\n (dragDropped)=\"table.dragDropped.emit($event)\"\n (dragStarted)=\"itemDragStarted($event)\"\n (dragEnded)=\"itemDragEnded($event)\"\n (itemClick)=\"selectItem($event)\"\n >\n </gantt-table-body>\n </div>\n </div>\n </div>\n <div class=\"gantt-container\">\n <gantt-calendar-grid\n [style.padding-right.px]=\"ganttRoot.verticalScrollbarWidth\"\n [style.padding-bottom.px]=\"ganttRoot.horizontalScrollbarHeight\"\n ></gantt-calendar-grid>\n <div class=\"gantt-main\">\n <gantt-main\n [ganttRoot]=\"ganttRoot\"\n [flatItems]=\"flatItems\"\n [viewportItems]=\"viewportItems\"\n [groupHeaderTemplate]=\"groupHeaderTemplate\"\n [itemTemplate]=\"itemTemplate\"\n [barTemplate]=\"barTemplate\"\n [rangeTemplate]=\"rangeTemplate\"\n [baselineTemplate]=\"baselineTemplate\"\n [quickTimeFocus]=\"quickTimeFocus\"\n (barClick)=\"barClick.emit($event)\"\n (lineClick)=\"lineClick.emit($event)\"\n >\n </gantt-main>\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n\n <gantt-drag-backdrop [style.left.px]=\"tableHeader.tableWidth + 1\"></gantt-drag-backdrop>\n\n <gantt-scrollbar\n [ganttRoot]=\"ganttRoot\"\n [hasFooter]=\"!!table?.tableFooterTemplate\"\n [tableWidth]=\"tableHeader.tableWidth\"\n ></gantt-scrollbar>\n\n @if (table?.tableFooterTemplate || footerTemplate) {\n <div
|
|
4780
|
+
], queries: [{ propertyName: "table", first: true, predicate: NgxGanttTableComponent, descendants: true }, { propertyName: "tableEmptyTemplate", first: true, predicate: ["tableEmpty"], descendants: true, static: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true, static: true }, { propertyName: "columns", predicate: NgxGanttTableColumnComponent, descendants: true }], viewQueries: [{ propertyName: "ganttRoot", first: true, predicate: ["ganttRoot"], descendants: true }, { propertyName: "virtualScroll", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ngx-gantt-root #ganttRoot>\n <div class=\"gantt-header\">\n <gantt-table-header #tableHeader [columns]=\"columns\"></gantt-table-header>\n <div class=\"gantt-container-header\">\n <gantt-calendar-header [style.padding-right.px]=\"ganttRoot.verticalScrollbarWidth\"></gantt-calendar-header>\n </div>\n </div>\n @if (loading) {\n <gantt-loader></gantt-loader>\n }\n\n <cdk-virtual-scroll-viewport\n class=\"gantt-virtual-scroll-viewport\"\n [ngClass]=\"{\n 'gantt-normal-viewport': !virtualScrollEnabled,\n 'gantt-scroll-container': virtualScrollEnabled,\n 'with-footer': table?.tableFooterTemplate || footerTemplate\n }\"\n [style.top.px]=\"styles.headerHeight\"\n [itemSize]=\"styles.lineHeight\"\n [minBufferPx]=\"styles.lineHeight * 10\"\n [maxBufferPx]=\"styles.lineHeight * 20\"\n (scrolledIndexChange)=\"scrolledIndexChange($event)\"\n >\n <ng-container *cdkVirtualFor=\"let item of flatItems; trackBy: trackBy\"></ng-container>\n <div class=\"gantt-side\" [style.width.px]=\"tableHeader.tableWidth + 1\" [style.padding-bottom.px]=\"ganttRoot.horizontalScrollbarHeight\">\n <div class=\"gantt-side-container\">\n <div class=\"gantt-table\">\n <gantt-table-body\n [flatItems]=\"flatItems\"\n [viewportItems]=\"viewportItems\"\n [columns]=\"columns\"\n [groupTemplate]=\"groupTemplate\"\n [emptyTemplate]=\"table.tableEmptyTemplate || tableEmptyTemplate\"\n [rowBeforeTemplate]=\"table?.rowBeforeTemplate\"\n [rowAfterTemplate]=\"table?.rowAfterTemplate\"\n [draggable]=\"table.draggable\"\n [dropEnterPredicate]=\"table.dropEnterPredicate\"\n (dragDropped)=\"table.dragDropped.emit($event)\"\n (dragStarted)=\"itemDragStarted($event)\"\n (dragEnded)=\"itemDragEnded($event)\"\n (itemClick)=\"selectItem($event)\"\n >\n </gantt-table-body>\n </div>\n </div>\n </div>\n <div class=\"gantt-container\">\n <gantt-calendar-grid\n [style.padding-right.px]=\"ganttRoot.verticalScrollbarWidth\"\n [style.padding-bottom.px]=\"ganttRoot.horizontalScrollbarHeight\"\n ></gantt-calendar-grid>\n <div class=\"gantt-main\">\n <gantt-main\n [ganttRoot]=\"ganttRoot\"\n [flatItems]=\"flatItems\"\n [viewportItems]=\"viewportItems\"\n [groupHeaderTemplate]=\"groupHeaderTemplate\"\n [itemTemplate]=\"itemTemplate\"\n [barTemplate]=\"barTemplate\"\n [rangeTemplate]=\"rangeTemplate\"\n [baselineTemplate]=\"baselineTemplate\"\n [quickTimeFocus]=\"quickTimeFocus\"\n (barClick)=\"barClick.emit($event)\"\n (lineClick)=\"lineClick.emit($event)\"\n >\n </gantt-main>\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n\n <gantt-drag-backdrop [style.left.px]=\"tableHeader.tableWidth + 1\"></gantt-drag-backdrop>\n\n <gantt-scrollbar\n [ganttRoot]=\"ganttRoot\"\n [hasFooter]=\"!!table?.tableFooterTemplate\"\n [tableWidth]=\"tableHeader.tableWidth\"\n ></gantt-scrollbar>\n\n @if (table?.tableFooterTemplate || footerTemplate) {\n <div\n class=\"gantt-footer\"\n cdkScrollable\n [style.right.px]=\"ganttRoot.verticalScrollbarWidth\"\n [style.bottom.px]=\"ganttRoot.horizontalScrollbarHeight\"\n >\n @if (table?.tableFooterTemplate) {\n <div class=\"gantt-table-footer\" [style.width.px]=\"tableHeader.tableWidth + 1\">\n <ng-template [ngTemplateOutlet]=\"table?.tableFooterTemplate\" [ngTemplateOutletContext]=\"{ columns: columns }\"> </ng-template>\n </div>\n }\n @if (footerTemplate) {\n <div class=\"gantt-container-footer\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"> </ng-template>\n </div>\n }\n </div>\n }\n</ngx-gantt-root>\n", dependencies: [{ kind: "component", type: NgxGanttRootComponent, selector: "ngx-gantt-root", inputs: ["sideWidth"] }, { kind: "component", type: GanttTableHeaderComponent, selector: "gantt-table-header", inputs: ["columns"] }, { kind: "component", type: GanttCalendarHeaderComponent, selector: "gantt-calendar-header" }, { kind: "component", type: GanttLoaderComponent, selector: "gantt-loader" }, { kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: GanttTableBodyComponent, selector: "gantt-table-body", inputs: ["viewportItems", "flatItems", "columns", "groupTemplate", "emptyTemplate", "rowBeforeTemplate", "rowAfterTemplate", "draggable", "dropEnterPredicate"], outputs: ["dragDropped", "dragStarted", "dragEnded", "itemClick"] }, { kind: "component", type: GanttCalendarGridComponent, selector: "gantt-calendar-grid" }, { kind: "component", type: GanttMainComponent, selector: "gantt-main", inputs: ["viewportItems", "flatItems", "groupHeaderTemplate", "itemTemplate", "barTemplate", "rangeTemplate", "baselineTemplate", "ganttRoot", "quickTimeFocus"], outputs: ["barClick", "lineClick"] }, { kind: "component", type: GanttDragBackdropComponent, selector: "gantt-drag-backdrop" }, { kind: "component", type: GanttScrollbarComponent, selector: "gantt-scrollbar", inputs: ["hasFooter", "tableWidth", "ganttRoot"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4754
4781
|
}
|
|
4755
4782
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: NgxGanttComponent, decorators: [{
|
|
4756
4783
|
type: Component,
|
|
@@ -4778,7 +4805,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
4778
4805
|
GanttDragBackdropComponent,
|
|
4779
4806
|
GanttScrollbarComponent,
|
|
4780
4807
|
NgTemplateOutlet
|
|
4781
|
-
], template: "<ngx-gantt-root #ganttRoot>\n <div class=\"gantt-header\">\n <gantt-table-header #tableHeader [columns]=\"columns\"></gantt-table-header>\n <div class=\"gantt-container-header\">\n <gantt-calendar-header [style.padding-right.px]=\"ganttRoot.verticalScrollbarWidth\"></gantt-calendar-header>\n </div>\n </div>\n @if (loading) {\n <gantt-loader></gantt-loader>\n }\n\n <cdk-virtual-scroll-viewport\n class=\"gantt-virtual-scroll-viewport\"\n [ngClass]=\"{\n 'gantt-normal-viewport': !virtualScrollEnabled,\n 'gantt-scroll-container': virtualScrollEnabled,\n 'with-footer': table?.tableFooterTemplate || footerTemplate\n }\"\n [style.top.px]=\"styles.headerHeight\"\n [itemSize]=\"styles.lineHeight\"\n [minBufferPx]=\"styles.lineHeight * 10\"\n [maxBufferPx]=\"styles.lineHeight * 20\"\n (scrolledIndexChange)=\"scrolledIndexChange($event)\"\n >\n <ng-container *cdkVirtualFor=\"let item of flatItems; trackBy: trackBy\"></ng-container>\n <div class=\"gantt-side\" [style.width.px]=\"tableHeader.tableWidth + 1\" [style.padding-bottom.px]=\"ganttRoot.horizontalScrollbarHeight\">\n <div class=\"gantt-side-container\">\n <div class=\"gantt-table\">\n <gantt-table-body\n [flatItems]=\"flatItems\"\n [viewportItems]=\"viewportItems\"\n [columns]=\"columns\"\n [groupTemplate]=\"groupTemplate\"\n [emptyTemplate]=\"table.tableEmptyTemplate || tableEmptyTemplate\"\n [rowBeforeTemplate]=\"table?.rowBeforeTemplate\"\n [rowAfterTemplate]=\"table?.rowAfterTemplate\"\n [draggable]=\"table.draggable\"\n [dropEnterPredicate]=\"table.dropEnterPredicate\"\n (dragDropped)=\"table.dragDropped.emit($event)\"\n (dragStarted)=\"itemDragStarted($event)\"\n (dragEnded)=\"itemDragEnded($event)\"\n (itemClick)=\"selectItem($event)\"\n >\n </gantt-table-body>\n </div>\n </div>\n </div>\n <div class=\"gantt-container\">\n <gantt-calendar-grid\n [style.padding-right.px]=\"ganttRoot.verticalScrollbarWidth\"\n [style.padding-bottom.px]=\"ganttRoot.horizontalScrollbarHeight\"\n ></gantt-calendar-grid>\n <div class=\"gantt-main\">\n <gantt-main\n [ganttRoot]=\"ganttRoot\"\n [flatItems]=\"flatItems\"\n [viewportItems]=\"viewportItems\"\n [groupHeaderTemplate]=\"groupHeaderTemplate\"\n [itemTemplate]=\"itemTemplate\"\n [barTemplate]=\"barTemplate\"\n [rangeTemplate]=\"rangeTemplate\"\n [baselineTemplate]=\"baselineTemplate\"\n [quickTimeFocus]=\"quickTimeFocus\"\n (barClick)=\"barClick.emit($event)\"\n (lineClick)=\"lineClick.emit($event)\"\n >\n </gantt-main>\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n\n <gantt-drag-backdrop [style.left.px]=\"tableHeader.tableWidth + 1\"></gantt-drag-backdrop>\n\n <gantt-scrollbar\n [ganttRoot]=\"ganttRoot\"\n [hasFooter]=\"!!table?.tableFooterTemplate\"\n [tableWidth]=\"tableHeader.tableWidth\"\n ></gantt-scrollbar>\n\n @if (table?.tableFooterTemplate || footerTemplate) {\n <div
|
|
4808
|
+
], template: "<ngx-gantt-root #ganttRoot>\n <div class=\"gantt-header\">\n <gantt-table-header #tableHeader [columns]=\"columns\"></gantt-table-header>\n <div class=\"gantt-container-header\">\n <gantt-calendar-header [style.padding-right.px]=\"ganttRoot.verticalScrollbarWidth\"></gantt-calendar-header>\n </div>\n </div>\n @if (loading) {\n <gantt-loader></gantt-loader>\n }\n\n <cdk-virtual-scroll-viewport\n class=\"gantt-virtual-scroll-viewport\"\n [ngClass]=\"{\n 'gantt-normal-viewport': !virtualScrollEnabled,\n 'gantt-scroll-container': virtualScrollEnabled,\n 'with-footer': table?.tableFooterTemplate || footerTemplate\n }\"\n [style.top.px]=\"styles.headerHeight\"\n [itemSize]=\"styles.lineHeight\"\n [minBufferPx]=\"styles.lineHeight * 10\"\n [maxBufferPx]=\"styles.lineHeight * 20\"\n (scrolledIndexChange)=\"scrolledIndexChange($event)\"\n >\n <ng-container *cdkVirtualFor=\"let item of flatItems; trackBy: trackBy\"></ng-container>\n <div class=\"gantt-side\" [style.width.px]=\"tableHeader.tableWidth + 1\" [style.padding-bottom.px]=\"ganttRoot.horizontalScrollbarHeight\">\n <div class=\"gantt-side-container\">\n <div class=\"gantt-table\">\n <gantt-table-body\n [flatItems]=\"flatItems\"\n [viewportItems]=\"viewportItems\"\n [columns]=\"columns\"\n [groupTemplate]=\"groupTemplate\"\n [emptyTemplate]=\"table.tableEmptyTemplate || tableEmptyTemplate\"\n [rowBeforeTemplate]=\"table?.rowBeforeTemplate\"\n [rowAfterTemplate]=\"table?.rowAfterTemplate\"\n [draggable]=\"table.draggable\"\n [dropEnterPredicate]=\"table.dropEnterPredicate\"\n (dragDropped)=\"table.dragDropped.emit($event)\"\n (dragStarted)=\"itemDragStarted($event)\"\n (dragEnded)=\"itemDragEnded($event)\"\n (itemClick)=\"selectItem($event)\"\n >\n </gantt-table-body>\n </div>\n </div>\n </div>\n <div class=\"gantt-container\">\n <gantt-calendar-grid\n [style.padding-right.px]=\"ganttRoot.verticalScrollbarWidth\"\n [style.padding-bottom.px]=\"ganttRoot.horizontalScrollbarHeight\"\n ></gantt-calendar-grid>\n <div class=\"gantt-main\">\n <gantt-main\n [ganttRoot]=\"ganttRoot\"\n [flatItems]=\"flatItems\"\n [viewportItems]=\"viewportItems\"\n [groupHeaderTemplate]=\"groupHeaderTemplate\"\n [itemTemplate]=\"itemTemplate\"\n [barTemplate]=\"barTemplate\"\n [rangeTemplate]=\"rangeTemplate\"\n [baselineTemplate]=\"baselineTemplate\"\n [quickTimeFocus]=\"quickTimeFocus\"\n (barClick)=\"barClick.emit($event)\"\n (lineClick)=\"lineClick.emit($event)\"\n >\n </gantt-main>\n </div>\n </div>\n </cdk-virtual-scroll-viewport>\n\n <gantt-drag-backdrop [style.left.px]=\"tableHeader.tableWidth + 1\"></gantt-drag-backdrop>\n\n <gantt-scrollbar\n [ganttRoot]=\"ganttRoot\"\n [hasFooter]=\"!!table?.tableFooterTemplate\"\n [tableWidth]=\"tableHeader.tableWidth\"\n ></gantt-scrollbar>\n\n @if (table?.tableFooterTemplate || footerTemplate) {\n <div\n class=\"gantt-footer\"\n cdkScrollable\n [style.right.px]=\"ganttRoot.verticalScrollbarWidth\"\n [style.bottom.px]=\"ganttRoot.horizontalScrollbarHeight\"\n >\n @if (table?.tableFooterTemplate) {\n <div class=\"gantt-table-footer\" [style.width.px]=\"tableHeader.tableWidth + 1\">\n <ng-template [ngTemplateOutlet]=\"table?.tableFooterTemplate\" [ngTemplateOutletContext]=\"{ columns: columns }\"> </ng-template>\n </div>\n }\n @if (footerTemplate) {\n <div class=\"gantt-container-footer\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"> </ng-template>\n </div>\n }\n </div>\n }\n</ngx-gantt-root>\n" }]
|
|
4782
4809
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$1.ViewportRuler }, { type: undefined, decorators: [{
|
|
4783
4810
|
type: Inject,
|
|
4784
4811
|
args: [GANTT_GLOBAL_CONFIG]
|
|
@@ -4859,8 +4886,7 @@ class NgxGanttModule {
|
|
|
4859
4886
|
IsGanttRangeItemPipe,
|
|
4860
4887
|
IsGanttBarItemPipe,
|
|
4861
4888
|
IsGanttCustomItemPipe,
|
|
4862
|
-
IsGanttGroupPipe,
|
|
4863
|
-
GanttDateFormatPipe], exports: [NgxGanttComponent,
|
|
4889
|
+
IsGanttGroupPipe], exports: [NgxGanttComponent,
|
|
4864
4890
|
NgxGanttTableComponent,
|
|
4865
4891
|
NgxGanttTableColumnComponent,
|
|
4866
4892
|
NgxGanttRootComponent,
|
|
@@ -4871,8 +4897,7 @@ class NgxGanttModule {
|
|
|
4871
4897
|
GanttCalendarHeaderComponent,
|
|
4872
4898
|
GanttCalendarGridComponent,
|
|
4873
4899
|
GanttDragBackdropComponent,
|
|
4874
|
-
GanttScrollbarComponent
|
|
4875
|
-
GanttDateFormatPipe] }); }
|
|
4900
|
+
GanttScrollbarComponent] }); }
|
|
4876
4901
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: NgxGanttModule, providers: [
|
|
4877
4902
|
CdkVirtualScrollViewport,
|
|
4878
4903
|
{
|
|
@@ -4913,8 +4938,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
4913
4938
|
IsGanttRangeItemPipe,
|
|
4914
4939
|
IsGanttBarItemPipe,
|
|
4915
4940
|
IsGanttCustomItemPipe,
|
|
4916
|
-
IsGanttGroupPipe
|
|
4917
|
-
GanttDateFormatPipe
|
|
4941
|
+
IsGanttGroupPipe
|
|
4918
4942
|
],
|
|
4919
4943
|
exports: [
|
|
4920
4944
|
NgxGanttComponent,
|
|
@@ -4928,8 +4952,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
4928
4952
|
GanttCalendarHeaderComponent,
|
|
4929
4953
|
GanttCalendarGridComponent,
|
|
4930
4954
|
GanttDragBackdropComponent,
|
|
4931
|
-
GanttScrollbarComponent
|
|
4932
|
-
GanttDateFormatPipe
|
|
4955
|
+
GanttScrollbarComponent
|
|
4933
4956
|
],
|
|
4934
4957
|
providers: [
|
|
4935
4958
|
CdkVirtualScrollViewport,
|
|
@@ -4950,5 +4973,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
4950
4973
|
* Generated bundle index. Do not edit.
|
|
4951
4974
|
*/
|
|
4952
4975
|
|
|
4953
|
-
export { GANTT_GLOBAL_CONFIG, GANTT_I18N_LOCALE_TOKEN, GANTT_UPPER_TOKEN, GanttBarClickEvent, GanttBaselineItemInternal, GanttCalendarGridComponent, GanttCalendarHeaderComponent, GanttConfigService, GanttDate,
|
|
4976
|
+
export { GANTT_GLOBAL_CONFIG, GANTT_I18N_LOCALE_TOKEN, GANTT_UPPER_TOKEN, GanttBarClickEvent, GanttBaselineItemInternal, GanttCalendarGridComponent, GanttCalendarHeaderComponent, GanttConfigService, GanttDate, GanttDatePoint, GanttDragBackdropComponent, GanttDragEvent, GanttGroupInternal, GanttI18nLocale, GanttItemInternal, GanttItemType, GanttItemUpper, GanttLineClickEvent, GanttLinkDragEvent, GanttLinkLineType, GanttLinkType, GanttLoadOnScrollEvent, GanttLoaderComponent, GanttPrintService, GanttScrollbarComponent, GanttSelectedEvent, GanttTableDragDroppedEvent, GanttTableDragEndedEvent, GanttTableDragEnterPredicateContext, GanttTableDragStartedEvent, GanttTableEvent, GanttTableItemClickEvent, GanttUpper, GanttView, GanttViewType, GanttVirtualScrolledIndexChangeEvent, IsGanttBarItemPipe, IsGanttCustomItemPipe, IsGanttGroupPipe, IsGanttRangeItemPipe, LinkColors, NgxGanttBarComponent, NgxGanttBaselineComponent, NgxGanttComponent, NgxGanttModule, NgxGanttRangeComponent, NgxGanttRootComponent, NgxGanttTableColumnComponent, NgxGanttTableComponent, NgxGanttToolbarComponent, deDeLocale, defaultConfig, enUsLocale, getDefaultTimeZone, jaJpLocale, primaryDatePointTop, registerView, ruRuLocale, secondaryDatePointTop, setDefaultTimeZone, zhHans as zhHansLocale, zhHant as zhHantLocale };
|
|
4954
4977
|
//# sourceMappingURL=worktile-gantt.mjs.map
|