@worktile/gantt 15.1.2 → 15.2.0-next.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/class/event.d.ts +8 -0
- package/esm2020/class/event.mjs +3 -1
- package/esm2020/components/table/body/gantt-table-body.component.mjs +1 -6
- package/esm2020/gantt-dom.service.mjs +32 -7
- package/esm2020/gantt.component.mjs +23 -8
- package/esm2020/table/gantt-table.component.mjs +8 -2
- package/fesm2015/worktile-gantt.mjs +63 -20
- package/fesm2015/worktile-gantt.mjs.map +1 -1
- package/fesm2020/worktile-gantt.mjs +63 -20
- package/fesm2020/worktile-gantt.mjs.map +1 -1
- package/gantt-dom.service.d.ts +2 -0
- package/gantt.component.d.ts +5 -2
- package/gantt.component.scss +55 -3
- package/package.json +1 -1
- package/styles/variables.scss +3 -0
- package/table/gantt-table.component.d.ts +3 -1
|
@@ -47,6 +47,8 @@ class GanttTableDragEndedEvent {
|
|
|
47
47
|
}
|
|
48
48
|
class GanttTableDragEnterPredicateContext {
|
|
49
49
|
}
|
|
50
|
+
class GanttVirtualScrolledIndexChangeEvent {
|
|
51
|
+
}
|
|
50
52
|
|
|
51
53
|
class GanttDate {
|
|
52
54
|
constructor(date) {
|
|
@@ -1288,7 +1290,7 @@ class NgxGanttTableComponent {
|
|
|
1288
1290
|
}
|
|
1289
1291
|
}
|
|
1290
1292
|
NgxGanttTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NgxGanttTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1291
|
-
NgxGanttTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: NgxGanttTableComponent, selector: "ngx-gantt-table", inputs: { draggable: "draggable", dropEnterPredicate: "dropEnterPredicate" }, outputs: { dragDropped: "dragDropped", dragStarted: "dragStarted", dragEnded: "dragEnded", columnChanges: "columnChanges" }, queries: [{ propertyName: "rowBeforeTemplate", first: true, predicate: ["rowBeforeSlot"], descendants: true, static: true }, { propertyName: "rowAfterTemplate", first: true, predicate: ["rowAfterSlot"], descendants: true, static: true }], ngImport: i0, template: '', isInline: true });
|
|
1293
|
+
NgxGanttTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: NgxGanttTableComponent, selector: "ngx-gantt-table", inputs: { draggable: "draggable", dropEnterPredicate: "dropEnterPredicate" }, outputs: { dragDropped: "dragDropped", dragStarted: "dragStarted", dragEnded: "dragEnded", columnChanges: "columnChanges" }, 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 });
|
|
1292
1294
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NgxGanttTableComponent, decorators: [{
|
|
1293
1295
|
type: Component,
|
|
1294
1296
|
args: [{
|
|
@@ -1313,6 +1315,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1313
1315
|
}], rowAfterTemplate: [{
|
|
1314
1316
|
type: ContentChild,
|
|
1315
1317
|
args: ['rowAfterSlot', { static: true }]
|
|
1318
|
+
}], tableEmptyTemplate: [{
|
|
1319
|
+
type: ContentChild,
|
|
1320
|
+
args: ['tableEmpty', { static: true }]
|
|
1321
|
+
}], tableFooterTemplate: [{
|
|
1322
|
+
type: ContentChild,
|
|
1323
|
+
args: ['tableFooter', { static: true }]
|
|
1316
1324
|
}] } });
|
|
1317
1325
|
|
|
1318
1326
|
const GANTT_ABSTRACT_TOKEN = new InjectionToken('gantt-abstract-token');
|
|
@@ -1757,11 +1765,6 @@ class GanttTableBodyComponent {
|
|
|
1757
1765
|
source: event.source.data?.origin,
|
|
1758
1766
|
sourceParent: this.getParentByItem(event.source.data)?.origin
|
|
1759
1767
|
});
|
|
1760
|
-
// dropEnterPredicate 方法返回值为 false 时,始终未执行 onListDropped,所以只能在 dragEnded 中移除 drag-item-hide
|
|
1761
|
-
const children = this.getChildrenElementsByElement(event.source.element.nativeElement);
|
|
1762
|
-
children.forEach((element) => {
|
|
1763
|
-
element.classList.remove('drag-item-hide');
|
|
1764
|
-
});
|
|
1765
1768
|
}
|
|
1766
1769
|
onListDropped(event) {
|
|
1767
1770
|
if (!this.itemDropTarget) {
|
|
@@ -2479,7 +2482,13 @@ class GanttDomService {
|
|
|
2479
2482
|
this.unsubscribe$ = new Subject();
|
|
2480
2483
|
}
|
|
2481
2484
|
monitorScrollChange() {
|
|
2482
|
-
|
|
2485
|
+
const scrollObservers = [
|
|
2486
|
+
fromEvent(this.mainContainer, 'scroll', passiveListenerOptions),
|
|
2487
|
+
fromEvent(this.sideContainer, 'scroll', passiveListenerOptions)
|
|
2488
|
+
];
|
|
2489
|
+
this.mainFooter && scrollObservers.push(fromEvent(this.mainFooter, 'scroll', passiveListenerOptions));
|
|
2490
|
+
this.mainScrollbar && scrollObservers.push(fromEvent(this.mainScrollbar, 'scroll', passiveListenerOptions));
|
|
2491
|
+
this.ngZone.runOutsideAngular(() => merge(...scrollObservers)
|
|
2483
2492
|
.pipe(takeUntil(this.unsubscribe$))
|
|
2484
2493
|
.subscribe((event) => {
|
|
2485
2494
|
this.syncScroll(event);
|
|
@@ -2487,10 +2496,22 @@ class GanttDomService {
|
|
|
2487
2496
|
}
|
|
2488
2497
|
syncScroll(event) {
|
|
2489
2498
|
const target = event.currentTarget;
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2499
|
+
const classList = target.classList;
|
|
2500
|
+
if (!classList.contains('gantt-side-container')) {
|
|
2501
|
+
this.mainContainer.scrollLeft = target.scrollLeft;
|
|
2502
|
+
this.calendarHeader.scrollLeft = target.scrollLeft;
|
|
2503
|
+
this.calendarOverlay.scrollLeft = target.scrollLeft;
|
|
2504
|
+
this.mainScrollbar && (this.mainScrollbar.scrollLeft = target.scrollLeft);
|
|
2505
|
+
this.mainFooter && (this.mainFooter.scrollLeft = target.scrollLeft);
|
|
2506
|
+
if (classList.contains('gantt-main-container')) {
|
|
2507
|
+
this.sideContainer.scrollTop = target.scrollTop;
|
|
2508
|
+
this.mainContainer.scrollTop = target.scrollTop;
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
else {
|
|
2512
|
+
this.sideContainer.scrollTop = target.scrollTop;
|
|
2513
|
+
this.mainContainer.scrollTop = target.scrollTop;
|
|
2514
|
+
}
|
|
2494
2515
|
}
|
|
2495
2516
|
disableBrowserWheelEvent() {
|
|
2496
2517
|
const container = this.mainContainer;
|
|
@@ -2513,6 +2534,8 @@ class GanttDomService {
|
|
|
2513
2534
|
this.container = this.root.getElementsByClassName('gantt-container')[0];
|
|
2514
2535
|
this.sideContainer = this.root.getElementsByClassName('gantt-side-container')[0];
|
|
2515
2536
|
this.mainContainer = this.root.getElementsByClassName('gantt-main-container')[0];
|
|
2537
|
+
this.mainScrollbar = this.root.getElementsByClassName('gantt-main-scrollbar')[0];
|
|
2538
|
+
this.mainFooter = this.root.getElementsByClassName('gantt-container-footer')[0];
|
|
2516
2539
|
this.verticalScrollContainer = this.root.getElementsByClassName('gantt-scroll-container')[0];
|
|
2517
2540
|
const mainItems = this.mainContainer.getElementsByClassName('gantt-main-items')[0];
|
|
2518
2541
|
const mainGroups = this.mainContainer.getElementsByClassName('gantt-main-groups')[0];
|
|
@@ -2527,7 +2550,10 @@ class GanttDomService {
|
|
|
2527
2550
|
* to run the change detection if needed.
|
|
2528
2551
|
*/
|
|
2529
2552
|
getViewerScroll(options) {
|
|
2530
|
-
|
|
2553
|
+
const scrollObservers = [fromEvent(this.mainContainer, 'scroll', options)];
|
|
2554
|
+
this.mainFooter && scrollObservers.push(fromEvent(this.mainFooter, 'scroll', options));
|
|
2555
|
+
this.mainScrollbar && scrollObservers.push(fromEvent(this.mainScrollbar, 'scroll', options));
|
|
2556
|
+
return new Observable((subscriber) => this.ngZone.runOutsideAngular(() => merge(...scrollObservers)
|
|
2531
2557
|
.pipe(map(() => this.mainContainer.scrollLeft), pairwise(), map(([previous, current]) => {
|
|
2532
2558
|
const event = {
|
|
2533
2559
|
target: this.mainContainer,
|
|
@@ -2557,6 +2583,8 @@ class GanttDomService {
|
|
|
2557
2583
|
this.mainContainer.scrollLeft = scrollLeft > scrollThreshold ? scrollLeft : 0;
|
|
2558
2584
|
this.calendarHeader.scrollLeft = this.mainContainer.scrollLeft;
|
|
2559
2585
|
this.calendarOverlay.scrollLeft = this.mainContainer.scrollLeft;
|
|
2586
|
+
this.mainScrollbar && (this.mainScrollbar.scrollLeft = this.mainContainer.scrollLeft);
|
|
2587
|
+
this.mainFooter && (this.mainFooter.scrollLeft = this.mainContainer.scrollLeft);
|
|
2560
2588
|
}
|
|
2561
2589
|
}
|
|
2562
2590
|
ngOnDestroy() {
|
|
@@ -3793,9 +3821,12 @@ class NgxGanttComponent extends GanttUpper {
|
|
|
3793
3821
|
this.linkDragEnded = new EventEmitter();
|
|
3794
3822
|
this.lineClick = new EventEmitter();
|
|
3795
3823
|
this.selectedChange = new EventEmitter();
|
|
3824
|
+
this.virtualScrolledIndexChange = new EventEmitter();
|
|
3796
3825
|
this.flatItems = [];
|
|
3797
3826
|
this.viewportItems = [];
|
|
3798
3827
|
this._loading = false;
|
|
3828
|
+
this.rangeStart = 0;
|
|
3829
|
+
this.rangeEnd = 0;
|
|
3799
3830
|
this.computeAllRefs = false;
|
|
3800
3831
|
}
|
|
3801
3832
|
ngOnInit() {
|
|
@@ -3808,9 +3839,6 @@ class NgxGanttComponent extends GanttUpper {
|
|
|
3808
3839
|
// using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.
|
|
3809
3840
|
this.ngZone.runOutsideAngular(() => {
|
|
3810
3841
|
onStable$.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
3811
|
-
// this.dragContainer.dragEnded.subscribe((event) => {
|
|
3812
|
-
// this.computeTempDataRefs();
|
|
3813
|
-
// });
|
|
3814
3842
|
this.dragContainer.linkDragStarted.pipe(takeUntil(this.unsubscribe$)).subscribe((event) => {
|
|
3815
3843
|
this.linkDragStarted.emit(event);
|
|
3816
3844
|
});
|
|
@@ -3884,7 +3912,7 @@ class NgxGanttComponent extends GanttUpper {
|
|
|
3884
3912
|
this.flatItemsMap = keyBy(this.flatItems, 'id');
|
|
3885
3913
|
if (!this.virtualScrollEnabled) {
|
|
3886
3914
|
this.rangeStart = 0;
|
|
3887
|
-
this.rangeEnd = this.flatItems.length
|
|
3915
|
+
this.rangeEnd = this.flatItems.length;
|
|
3888
3916
|
}
|
|
3889
3917
|
}
|
|
3890
3918
|
afterExpand() {
|
|
@@ -3961,6 +3989,16 @@ class NgxGanttComponent extends GanttUpper {
|
|
|
3961
3989
|
scrollToDate(date) {
|
|
3962
3990
|
this.ganttRoot.scrollToDate(date);
|
|
3963
3991
|
}
|
|
3992
|
+
scrolledIndexChange(index) {
|
|
3993
|
+
this.virtualScrolledIndexChange.emit({
|
|
3994
|
+
index,
|
|
3995
|
+
renderedRange: {
|
|
3996
|
+
start: this.rangeStart,
|
|
3997
|
+
end: this.rangeEnd
|
|
3998
|
+
},
|
|
3999
|
+
count: this.flatItems.length
|
|
4000
|
+
});
|
|
4001
|
+
}
|
|
3964
4002
|
expandGroups(expanded) {
|
|
3965
4003
|
this.groups.forEach((group) => {
|
|
3966
4004
|
group.setExpand(expanded);
|
|
@@ -3977,7 +4015,7 @@ class NgxGanttComponent extends GanttUpper {
|
|
|
3977
4015
|
}
|
|
3978
4016
|
}
|
|
3979
4017
|
NgxGanttComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NgxGanttComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$1.ViewportRuler }, { token: GANTT_GLOBAL_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
3980
|
-
NgxGanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: NgxGanttComponent, selector: "ngx-gantt", inputs: { maxLevel: "maxLevel", async: "async", childrenResolve: "childrenResolve", linkable: "linkable", loading: "loading", virtualScrollEnabled: "virtualScrollEnabled", loadingDelay: "loadingDelay" }, outputs: { linkDragStarted: "linkDragStarted", linkDragEnded: "linkDragEnded", lineClick: "lineClick", selectedChange: "selectedChange" }, providers: [
|
|
4018
|
+
NgxGanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: NgxGanttComponent, selector: "ngx-gantt", inputs: { maxLevel: "maxLevel", async: "async", childrenResolve: "childrenResolve", linkable: "linkable", loading: "loading", virtualScrollEnabled: "virtualScrollEnabled", loadingDelay: "loadingDelay" }, outputs: { linkDragStarted: "linkDragStarted", linkDragEnded: "linkDragEnded", lineClick: "lineClick", selectedChange: "selectedChange", virtualScrolledIndexChange: "virtualScrolledIndexChange" }, providers: [
|
|
3981
4019
|
{
|
|
3982
4020
|
provide: GANTT_UPPER_TOKEN,
|
|
3983
4021
|
useExisting: NgxGanttComponent
|
|
@@ -3986,7 +4024,7 @@ NgxGanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
3986
4024
|
provide: GANTT_ABSTRACT_TOKEN,
|
|
3987
4025
|
useExisting: forwardRef(() => NgxGanttComponent)
|
|
3988
4026
|
}
|
|
3989
|
-
], queries: [{ propertyName: "table", first: true, predicate: NgxGanttTableComponent, descendants: true }, { propertyName: "tableEmptyTemplate", first: true, predicate: ["tableEmpty"], 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 <gantt-loader *ngIf=\"loading\"></gantt-loader>\n\n <cdk-virtual-scroll-viewport\n class=\"gantt-virtual-scroll-viewport\"\n [ngClass]=\"{
|
|
4027
|
+
], 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 <gantt-loader *ngIf=\"loading\"></gantt-loader>\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 [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)=\"table.dragStarted.emit($event)\"\n (dragEnded)=\"table.dragEnded.emit($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 [flatItems]=\"flatItems\"\n [viewportItems]=\"viewportItems\"\n [groupHeaderTemplate]=\"groupHeaderTemplate\"\n [itemTemplate]=\"itemTemplate\"\n [barTemplate]=\"barTemplate\"\n [rangeTemplate]=\"rangeTemplate\"\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 <div\n class=\"gantt-scrollbar\"\n [style.height.px]=\"ganttRoot.horizontalScrollbarHeight + 1\"\n [style.right.px]=\"ganttRoot.verticalScrollbarWidth\"\n >\n <div\n [style.width.px]=\"tableHeader.tableWidth\"\n class=\"gantt-table-scrollbar\"\n [class.with-scrollbar]=\"ganttRoot.horizontalScrollbarHeight\"\n ></div>\n <div class=\"gantt-main-scrollbar\">\n <div class=\"h-100\" [style.width.px]=\"view.width\"></div>\n </div>\n </div>\n\n <div class=\"gantt-footer\" [style.right.px]=\"ganttRoot.verticalScrollbarWidth\" [style.bottom.px]=\"ganttRoot.horizontalScrollbarHeight\">\n <div class=\"gantt-table-footer\" [style.width.px]=\"tableHeader.tableWidth + 1\" *ngIf=\"table?.tableFooterTemplate\">\n <ng-template [ngTemplateOutlet]=\"table?.tableFooterTemplate\" [ngTemplateOutletContext]=\"{ columns: columns }\"> </ng-template>\n </div>\n <div class=\"gantt-container-footer\" *ngIf=\"footerTemplate\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"> </ng-template>\n </div>\n </div>\n</ngx-gantt-root>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: GanttTableHeaderComponent, selector: "gantt-table-header", inputs: ["columns"] }, { 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: GanttMainComponent, selector: "gantt-main", inputs: ["viewportItems", "flatItems", "groupHeaderTemplate", "itemTemplate", "barTemplate", "rangeTemplate"], outputs: ["barClick", "lineClick"] }, { kind: "component", type: GanttCalendarHeaderComponent, selector: "gantt-calendar-header" }, { kind: "component", type: GanttCalendarGridComponent, selector: "gantt-calendar-grid" }, { kind: "component", type: GanttLoaderComponent, selector: "gantt-loader" }, { kind: "component", type: GanttDragBackdropComponent, selector: "gantt-drag-backdrop" }, { kind: "component", type: NgxGanttRootComponent, selector: "ngx-gantt-root", inputs: ["sideWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3990
4028
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NgxGanttComponent, decorators: [{
|
|
3991
4029
|
type: Component,
|
|
3992
4030
|
args: [{ selector: 'ngx-gantt', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
@@ -3998,7 +4036,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
3998
4036
|
provide: GANTT_ABSTRACT_TOKEN,
|
|
3999
4037
|
useExisting: forwardRef(() => NgxGanttComponent)
|
|
4000
4038
|
}
|
|
4001
|
-
], 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 <gantt-loader *ngIf=\"loading\"></gantt-loader>\n\n <cdk-virtual-scroll-viewport\n class=\"gantt-virtual-scroll-viewport\"\n [ngClass]=\"{
|
|
4039
|
+
], 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 <gantt-loader *ngIf=\"loading\"></gantt-loader>\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 [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)=\"table.dragStarted.emit($event)\"\n (dragEnded)=\"table.dragEnded.emit($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 [flatItems]=\"flatItems\"\n [viewportItems]=\"viewportItems\"\n [groupHeaderTemplate]=\"groupHeaderTemplate\"\n [itemTemplate]=\"itemTemplate\"\n [barTemplate]=\"barTemplate\"\n [rangeTemplate]=\"rangeTemplate\"\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 <div\n class=\"gantt-scrollbar\"\n [style.height.px]=\"ganttRoot.horizontalScrollbarHeight + 1\"\n [style.right.px]=\"ganttRoot.verticalScrollbarWidth\"\n >\n <div\n [style.width.px]=\"tableHeader.tableWidth\"\n class=\"gantt-table-scrollbar\"\n [class.with-scrollbar]=\"ganttRoot.horizontalScrollbarHeight\"\n ></div>\n <div class=\"gantt-main-scrollbar\">\n <div class=\"h-100\" [style.width.px]=\"view.width\"></div>\n </div>\n </div>\n\n <div class=\"gantt-footer\" [style.right.px]=\"ganttRoot.verticalScrollbarWidth\" [style.bottom.px]=\"ganttRoot.horizontalScrollbarHeight\">\n <div class=\"gantt-table-footer\" [style.width.px]=\"tableHeader.tableWidth + 1\" *ngIf=\"table?.tableFooterTemplate\">\n <ng-template [ngTemplateOutlet]=\"table?.tableFooterTemplate\" [ngTemplateOutletContext]=\"{ columns: columns }\"> </ng-template>\n </div>\n <div class=\"gantt-container-footer\" *ngIf=\"footerTemplate\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"> </ng-template>\n </div>\n </div>\n</ngx-gantt-root>\n" }]
|
|
4002
4040
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$1.ViewportRuler }, { type: undefined, decorators: [{
|
|
4003
4041
|
type: Inject,
|
|
4004
4042
|
args: [GANTT_GLOBAL_CONFIG]
|
|
@@ -4024,6 +4062,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
4024
4062
|
type: Output
|
|
4025
4063
|
}], selectedChange: [{
|
|
4026
4064
|
type: Output
|
|
4065
|
+
}], virtualScrolledIndexChange: [{
|
|
4066
|
+
type: Output
|
|
4027
4067
|
}], table: [{
|
|
4028
4068
|
type: ContentChild,
|
|
4029
4069
|
args: [NgxGanttTableComponent]
|
|
@@ -4036,6 +4076,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
4036
4076
|
}], ganttRoot: [{
|
|
4037
4077
|
type: ViewChild,
|
|
4038
4078
|
args: ['ganttRoot']
|
|
4079
|
+
}], footerTemplate: [{
|
|
4080
|
+
type: ContentChild,
|
|
4081
|
+
args: ['footer', { static: true }]
|
|
4039
4082
|
}], virtualScroll: [{
|
|
4040
4083
|
type: ViewChild,
|
|
4041
4084
|
args: [CdkVirtualScrollViewport]
|
|
@@ -4132,5 +4175,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
4132
4175
|
* Generated bundle index. Do not edit.
|
|
4133
4176
|
*/
|
|
4134
4177
|
|
|
4135
|
-
export { GANTT_GLOBAL_CONFIG, GANTT_UPPER_TOKEN, GanttBarClickEvent, GanttBaselineItemInternal, GanttDate, GanttDatePoint, GanttDragEvent, GanttGroupInternal, GanttItemInternal, GanttItemType, GanttItemUpper, GanttLineClickEvent, GanttLinkDragEvent, GanttLinkLineType, GanttLinkType, GanttLoadOnScrollEvent, GanttLoaderComponent, GanttPrintService, GanttSelectedEvent, GanttTableDragDroppedEvent, GanttTableDragEndedEvent, GanttTableDragEnterPredicateContext, GanttTableDragStartedEvent, GanttTableEvent, GanttUpper, GanttView, GanttViewType, IsGanttBarItemPipe, IsGanttCustomItemPipe, IsGanttRangeItemPipe, LinkColors, NgxGanttBarComponent, NgxGanttBaselineComponent, NgxGanttComponent, NgxGanttModule, NgxGanttRangeComponent, NgxGanttRootComponent, NgxGanttTableColumnComponent, NgxGanttTableComponent, NgxGanttToolbarComponent, defaultConfig, ganttViews, primaryDatePointTop, registerView, secondaryDatePointTop };
|
|
4178
|
+
export { GANTT_GLOBAL_CONFIG, GANTT_UPPER_TOKEN, GanttBarClickEvent, GanttBaselineItemInternal, GanttDate, GanttDatePoint, GanttDragEvent, GanttGroupInternal, GanttItemInternal, GanttItemType, GanttItemUpper, GanttLineClickEvent, GanttLinkDragEvent, GanttLinkLineType, GanttLinkType, GanttLoadOnScrollEvent, GanttLoaderComponent, GanttPrintService, GanttSelectedEvent, GanttTableDragDroppedEvent, GanttTableDragEndedEvent, GanttTableDragEnterPredicateContext, GanttTableDragStartedEvent, GanttTableEvent, GanttUpper, GanttView, GanttViewType, GanttVirtualScrolledIndexChangeEvent, IsGanttBarItemPipe, IsGanttCustomItemPipe, IsGanttRangeItemPipe, LinkColors, NgxGanttBarComponent, NgxGanttBaselineComponent, NgxGanttComponent, NgxGanttModule, NgxGanttRangeComponent, NgxGanttRootComponent, NgxGanttTableColumnComponent, NgxGanttTableComponent, NgxGanttToolbarComponent, defaultConfig, ganttViews, primaryDatePointTop, registerView, secondaryDatePointTop };
|
|
4136
4179
|
//# sourceMappingURL=worktile-gantt.mjs.map
|