@worktile/gantt 15.1.2 → 15.2.0-next.0
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/esm2020/components/table/body/gantt-table-body.component.mjs +1 -6
- package/esm2020/gantt-dom.service.mjs +32 -7
- package/esm2020/gantt.component.mjs +6 -3
- package/esm2020/table/gantt-table.component.mjs +8 -2
- package/fesm2015/worktile-gantt.mjs +43 -14
- package/fesm2015/worktile-gantt.mjs.map +1 -1
- package/fesm2020/worktile-gantt.mjs +43 -14
- package/fesm2020/worktile-gantt.mjs.map +1 -1
- package/gantt-dom.service.d.ts +2 -0
- package/gantt.component.d.ts +2 -1
- 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
|
@@ -10,7 +10,7 @@ export class NgxGanttTableComponent {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
NgxGanttTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NgxGanttTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
-
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 });
|
|
13
|
+
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 });
|
|
14
14
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NgxGanttTableComponent, decorators: [{
|
|
15
15
|
type: Component,
|
|
16
16
|
args: [{
|
|
@@ -35,5 +35,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
35
35
|
}], rowAfterTemplate: [{
|
|
36
36
|
type: ContentChild,
|
|
37
37
|
args: ['rowAfterSlot', { static: true }]
|
|
38
|
+
}], tableEmptyTemplate: [{
|
|
39
|
+
type: ContentChild,
|
|
40
|
+
args: ['tableEmpty', { static: true }]
|
|
41
|
+
}], tableFooterTemplate: [{
|
|
42
|
+
type: ContentChild,
|
|
43
|
+
args: ['tableFooter', { static: true }]
|
|
38
44
|
}] } });
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2FudHQtdGFibGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcGFja2FnZXMvZ2FudHQvc3JjL3RhYmxlL2dhbnR0LXRhYmxlLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxZQ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yBFdmVudEVtaXR0ZXI8R2FudHRUYWJsZUV2ZW50PigpO1xuXG4gICAgQENvbnRlbnRDaGlsZCgncm93QmVmb3JlU2xvdCcsIHsgc3RhdGljOiB0cnVlIH0pIHJvd0JlZm9yZVRlbXBsYXRlOiBUZW1wbGF0ZVJlZjxhbnk+O1xuXG4gICAgQENvbnRlbnRDaGlsZCgncm93QWZ0ZXJTbG90JywgeyBzdGF0aWM6IHRydWUgfSkgcm93QWZ0ZXJUZW1wbGF0ZTogVGVtcGxhdGVSZWY8YW55PjtcblxuICAgIEBDb250ZW50Q2hpbGQoJ3RhYmxlRW1wdHknLCB7IHN0YXRpYzogdHJ1ZSB9KSB0YWJsZUVtcHR5VGVtcGxhdGU6IFRlbXBsYXRlUmVmPGFueT47XG5cbiAgICBAQ29udGVudENoaWxkKCd0YWJsZUZvb3RlcicsIHsgc3RhdGljOiB0cnVlIH0pIHRhYmxlRm9vdGVyVGVtcGxhdGU6IFRlbXBsYXRlUmVmPGFueT47XG59XG4iXX0=
|
|
@@ -1295,7 +1295,7 @@ class NgxGanttTableComponent {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
1297
|
NgxGanttTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NgxGanttTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1298
|
-
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 });
|
|
1298
|
+
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 });
|
|
1299
1299
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NgxGanttTableComponent, decorators: [{
|
|
1300
1300
|
type: Component,
|
|
1301
1301
|
args: [{
|
|
@@ -1320,6 +1320,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1320
1320
|
}], rowAfterTemplate: [{
|
|
1321
1321
|
type: ContentChild,
|
|
1322
1322
|
args: ['rowAfterSlot', { static: true }]
|
|
1323
|
+
}], tableEmptyTemplate: [{
|
|
1324
|
+
type: ContentChild,
|
|
1325
|
+
args: ['tableEmpty', { static: true }]
|
|
1326
|
+
}], tableFooterTemplate: [{
|
|
1327
|
+
type: ContentChild,
|
|
1328
|
+
args: ['tableFooter', { static: true }]
|
|
1323
1329
|
}] } });
|
|
1324
1330
|
|
|
1325
1331
|
const GANTT_ABSTRACT_TOKEN = new InjectionToken('gantt-abstract-token');
|
|
@@ -1769,11 +1775,6 @@ class GanttTableBodyComponent {
|
|
|
1769
1775
|
source: (_a = event.source.data) === null || _a === void 0 ? void 0 : _a.origin,
|
|
1770
1776
|
sourceParent: (_b = this.getParentByItem(event.source.data)) === null || _b === void 0 ? void 0 : _b.origin
|
|
1771
1777
|
});
|
|
1772
|
-
// dropEnterPredicate 方法返回值为 false 时,始终未执行 onListDropped,所以只能在 dragEnded 中移除 drag-item-hide
|
|
1773
|
-
const children = this.getChildrenElementsByElement(event.source.element.nativeElement);
|
|
1774
|
-
children.forEach((element) => {
|
|
1775
|
-
element.classList.remove('drag-item-hide');
|
|
1776
|
-
});
|
|
1777
1778
|
}
|
|
1778
1779
|
onListDropped(event) {
|
|
1779
1780
|
if (!this.itemDropTarget) {
|
|
@@ -2497,7 +2498,13 @@ class GanttDomService {
|
|
|
2497
2498
|
this.unsubscribe$ = new Subject();
|
|
2498
2499
|
}
|
|
2499
2500
|
monitorScrollChange() {
|
|
2500
|
-
|
|
2501
|
+
const scrollObservers = [
|
|
2502
|
+
fromEvent(this.mainContainer, 'scroll', passiveListenerOptions),
|
|
2503
|
+
fromEvent(this.sideContainer, 'scroll', passiveListenerOptions)
|
|
2504
|
+
];
|
|
2505
|
+
this.mainFooter && scrollObservers.push(fromEvent(this.mainFooter, 'scroll', passiveListenerOptions));
|
|
2506
|
+
this.mainScrollbar && scrollObservers.push(fromEvent(this.mainScrollbar, 'scroll', passiveListenerOptions));
|
|
2507
|
+
this.ngZone.runOutsideAngular(() => merge(...scrollObservers)
|
|
2501
2508
|
.pipe(takeUntil(this.unsubscribe$))
|
|
2502
2509
|
.subscribe((event) => {
|
|
2503
2510
|
this.syncScroll(event);
|
|
@@ -2505,10 +2512,22 @@ class GanttDomService {
|
|
|
2505
2512
|
}
|
|
2506
2513
|
syncScroll(event) {
|
|
2507
2514
|
const target = event.currentTarget;
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2515
|
+
const classList = target.classList;
|
|
2516
|
+
if (!classList.contains('gantt-side-container')) {
|
|
2517
|
+
this.mainContainer.scrollLeft = target.scrollLeft;
|
|
2518
|
+
this.calendarHeader.scrollLeft = target.scrollLeft;
|
|
2519
|
+
this.calendarOverlay.scrollLeft = target.scrollLeft;
|
|
2520
|
+
this.mainScrollbar && (this.mainScrollbar.scrollLeft = target.scrollLeft);
|
|
2521
|
+
this.mainFooter && (this.mainFooter.scrollLeft = target.scrollLeft);
|
|
2522
|
+
if (classList.contains('gantt-main-container')) {
|
|
2523
|
+
this.sideContainer.scrollTop = target.scrollTop;
|
|
2524
|
+
this.mainContainer.scrollTop = target.scrollTop;
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
else {
|
|
2528
|
+
this.sideContainer.scrollTop = target.scrollTop;
|
|
2529
|
+
this.mainContainer.scrollTop = target.scrollTop;
|
|
2530
|
+
}
|
|
2512
2531
|
}
|
|
2513
2532
|
disableBrowserWheelEvent() {
|
|
2514
2533
|
const container = this.mainContainer;
|
|
@@ -2531,6 +2550,8 @@ class GanttDomService {
|
|
|
2531
2550
|
this.container = this.root.getElementsByClassName('gantt-container')[0];
|
|
2532
2551
|
this.sideContainer = this.root.getElementsByClassName('gantt-side-container')[0];
|
|
2533
2552
|
this.mainContainer = this.root.getElementsByClassName('gantt-main-container')[0];
|
|
2553
|
+
this.mainScrollbar = this.root.getElementsByClassName('gantt-main-scrollbar')[0];
|
|
2554
|
+
this.mainFooter = this.root.getElementsByClassName('gantt-container-footer')[0];
|
|
2534
2555
|
this.verticalScrollContainer = this.root.getElementsByClassName('gantt-scroll-container')[0];
|
|
2535
2556
|
const mainItems = this.mainContainer.getElementsByClassName('gantt-main-items')[0];
|
|
2536
2557
|
const mainGroups = this.mainContainer.getElementsByClassName('gantt-main-groups')[0];
|
|
@@ -2545,7 +2566,10 @@ class GanttDomService {
|
|
|
2545
2566
|
* to run the change detection if needed.
|
|
2546
2567
|
*/
|
|
2547
2568
|
getViewerScroll(options) {
|
|
2548
|
-
|
|
2569
|
+
const scrollObservers = [fromEvent(this.mainContainer, 'scroll', options)];
|
|
2570
|
+
this.mainFooter && scrollObservers.push(fromEvent(this.mainFooter, 'scroll', options));
|
|
2571
|
+
this.mainScrollbar && scrollObservers.push(fromEvent(this.mainScrollbar, 'scroll', options));
|
|
2572
|
+
return new Observable((subscriber) => this.ngZone.runOutsideAngular(() => merge(...scrollObservers)
|
|
2549
2573
|
.pipe(map(() => this.mainContainer.scrollLeft), pairwise(), map(([previous, current]) => {
|
|
2550
2574
|
const event = {
|
|
2551
2575
|
target: this.mainContainer,
|
|
@@ -2575,6 +2599,8 @@ class GanttDomService {
|
|
|
2575
2599
|
this.mainContainer.scrollLeft = scrollLeft > scrollThreshold ? scrollLeft : 0;
|
|
2576
2600
|
this.calendarHeader.scrollLeft = this.mainContainer.scrollLeft;
|
|
2577
2601
|
this.calendarOverlay.scrollLeft = this.mainContainer.scrollLeft;
|
|
2602
|
+
this.mainScrollbar && (this.mainScrollbar.scrollLeft = this.mainContainer.scrollLeft);
|
|
2603
|
+
this.mainFooter && (this.mainFooter.scrollLeft = this.mainContainer.scrollLeft);
|
|
2578
2604
|
}
|
|
2579
2605
|
}
|
|
2580
2606
|
ngOnDestroy() {
|
|
@@ -4028,7 +4054,7 @@ NgxGanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
4028
4054
|
provide: GANTT_ABSTRACT_TOKEN,
|
|
4029
4055
|
useExisting: forwardRef(() => NgxGanttComponent)
|
|
4030
4056
|
}
|
|
4031
|
-
], 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]=\"{
|
|
4057
|
+
], 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 >\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 });
|
|
4032
4058
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NgxGanttComponent, decorators: [{
|
|
4033
4059
|
type: Component,
|
|
4034
4060
|
args: [{ selector: 'ngx-gantt', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
@@ -4040,7 +4066,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
4040
4066
|
provide: GANTT_ABSTRACT_TOKEN,
|
|
4041
4067
|
useExisting: forwardRef(() => NgxGanttComponent)
|
|
4042
4068
|
}
|
|
4043
|
-
], 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]=\"{
|
|
4069
|
+
], 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 >\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" }]
|
|
4044
4070
|
}], ctorParameters: function () {
|
|
4045
4071
|
return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$1.ViewportRuler }, { type: undefined, decorators: [{
|
|
4046
4072
|
type: Inject,
|
|
@@ -4080,6 +4106,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
4080
4106
|
}], ganttRoot: [{
|
|
4081
4107
|
type: ViewChild,
|
|
4082
4108
|
args: ['ganttRoot']
|
|
4109
|
+
}], footerTemplate: [{
|
|
4110
|
+
type: ContentChild,
|
|
4111
|
+
args: ['footer', { static: true }]
|
|
4083
4112
|
}], virtualScroll: [{
|
|
4084
4113
|
type: ViewChild,
|
|
4085
4114
|
args: [CdkVirtualScrollViewport]
|