@worktile/gantt 12.2.1 → 13.0.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/components/bar/bar-drag.d.ts +4 -2
- package/components/bar/bar.component.d.ts +4 -4
- package/components/bar/bar.component.scss +201 -0
- package/components/calendar/calendar.component.d.ts +3 -5
- package/components/calendar/calendar.component.scss +79 -0
- package/components/drag-backdrop/drag-backdrop.component.d.ts +1 -5
- package/components/drag-backdrop/drag-backdrop.component.scss +50 -0
- package/components/icon/icon.component.d.ts +2 -4
- package/components/icon/icon.component.scss +13 -0
- package/components/links/links.component.scss +29 -0
- package/components/main/gantt-main.component.d.ts +2 -3
- package/components/range/range.component.d.ts +2 -5
- package/components/range/range.component.scss +35 -0
- package/components/table/gantt-table.component.d.ts +2 -3
- package/components/table/gantt-table.component.scss +153 -0
- package/{esm2015/class/date-point.js → esm2020/class/date-point.mjs} +0 -0
- package/{esm2015/class/event.js → esm2020/class/event.mjs} +0 -0
- package/{esm2015/class/group.js → esm2020/class/group.mjs} +0 -0
- package/{esm2015/class/index.js → esm2020/class/index.mjs} +0 -0
- package/{esm2015/class/item.js → esm2020/class/item.mjs} +0 -0
- package/{esm2015/class/link.js → esm2020/class/link.mjs} +0 -0
- package/{esm2015/class/view-type.js → esm2020/class/view-type.mjs} +0 -0
- package/esm2020/components/bar/bar-drag.mjs +308 -0
- package/esm2020/components/bar/bar.component.mjs +101 -0
- package/esm2020/components/calendar/calendar.component.mjs +88 -0
- package/esm2020/components/drag-backdrop/drag-backdrop.component.mjs +13 -0
- package/esm2020/components/icon/icon.component.mjs +36 -0
- package/{esm2015/components/icon/icons.js → esm2020/components/icon/icons.mjs} +0 -0
- package/esm2020/components/links/lines/curve.mjs +95 -0
- package/{esm2015/components/links/lines/factory.js → esm2020/components/links/lines/factory.mjs} +0 -0
- package/{esm2015/components/links/lines/line.js → esm2020/components/links/lines/line.mjs} +0 -0
- package/{esm2015/components/links/lines/straight.js → esm2020/components/links/lines/straight.mjs} +0 -0
- package/esm2020/components/links/links.component.mjs +178 -0
- package/esm2020/components/main/gantt-main.component.mjs +49 -0
- package/esm2020/components/range/range.component.mjs +25 -0
- package/esm2020/components/table/gantt-table.component.mjs +163 -0
- package/{esm2015/gantt-abstract.js → esm2020/gantt-abstract.mjs} +0 -0
- package/esm2020/gantt-dom.service.mjs +117 -0
- package/esm2020/gantt-drag-container.mjs +78 -0
- package/esm2020/gantt-item-upper.mjs +58 -0
- package/esm2020/gantt-print.service.mjs +94 -0
- package/esm2020/gantt-upper.mjs +339 -0
- package/esm2020/gantt.component.mjs +150 -0
- package/{esm2015/gantt.config.js → esm2020/gantt.config.mjs} +0 -0
- package/{esm2015/gantt.module.js → esm2020/gantt.module.mjs} +4 -4
- package/{esm2015/gantt.pipe.js → esm2020/gantt.pipe.mjs} +9 -9
- package/{esm2015/gantt.styles.js → esm2020/gantt.styles.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/esm2020/root.component.mjs +130 -0
- package/esm2020/table/gantt-column.component.mjs +36 -0
- package/esm2020/table/gantt-table.component.mjs +25 -0
- package/{esm2015/utils/date.js → esm2020/utils/date.mjs} +0 -0
- package/{esm2015/utils/helpers.js → esm2020/utils/helpers.mjs} +0 -0
- package/esm2020/utils/passive-listeners.mjs +30 -0
- package/esm2020/utils/set-style-with-vendor-prefix.mjs +15 -0
- package/{esm2015/views/day.js → esm2020/views/day.mjs} +1 -1
- package/{esm2015/views/factory.js → esm2020/views/factory.mjs} +0 -0
- package/{esm2015/views/month.js → esm2020/views/month.mjs} +0 -0
- package/{esm2015/views/quarter.js → esm2020/views/quarter.mjs} +0 -0
- package/{esm2015/views/view.js → esm2020/views/view.mjs} +5 -5
- package/{esm2015/views/week.js → esm2020/views/week.mjs} +0 -0
- package/{esm2015/views/year.js → esm2020/views/year.mjs} +0 -0
- package/{esm2015/worktile-gantt.js → esm2020/worktile-gantt.mjs} +0 -0
- package/fesm2015/worktile-gantt.mjs +3080 -0
- package/fesm2015/worktile-gantt.mjs.map +1 -0
- package/{fesm2015/worktile-gantt.js → fesm2020/worktile-gantt.mjs} +344 -288
- package/fesm2020/worktile-gantt.mjs.map +1 -0
- package/gantt-dom.service.d.ts +11 -4
- package/gantt-drag-container.d.ts +1 -1
- package/gantt-item-upper.d.ts +6 -6
- package/gantt-print.service.d.ts +1 -1
- package/gantt-upper.d.ts +6 -6
- package/gantt.component.d.ts +2 -4
- package/gantt.component.scss +83 -0
- package/package.json +23 -9
- package/root.component.d.ts +5 -3
- package/styles/index.scss +10 -0
- package/styles/variables.scss +46 -0
- package/table/gantt-column.component.d.ts +2 -3
- package/table/gantt-table.component.d.ts +2 -4
- package/utils/passive-listeners.d.ts +13 -0
- package/utils/set-style-with-vendor-prefix.d.ts +12 -0
- package/README.md +0 -24
- package/bundles/worktile-gantt.umd.js +0 -3622
- package/bundles/worktile-gantt.umd.js.map +0 -1
- package/esm2015/components/bar/bar-drag.js +0 -295
- package/esm2015/components/bar/bar.component.js +0 -98
- package/esm2015/components/calendar/calendar.component.js +0 -86
- package/esm2015/components/drag-backdrop/drag-backdrop.component.js +0 -21
- package/esm2015/components/icon/icon.component.js +0 -38
- package/esm2015/components/links/lines/curve.js +0 -96
- package/esm2015/components/links/links.component.js +0 -173
- package/esm2015/components/main/gantt-main.component.js +0 -53
- package/esm2015/components/range/range.component.js +0 -37
- package/esm2015/components/table/gantt-table.component.js +0 -163
- package/esm2015/gantt-dom.service.js +0 -103
- package/esm2015/gantt-drag-container.js +0 -77
- package/esm2015/gantt-item-upper.js +0 -58
- package/esm2015/gantt-print.service.js +0 -94
- package/esm2015/gantt-upper.js +0 -331
- package/esm2015/gantt.component.js +0 -155
- package/esm2015/root.component.js +0 -123
- package/esm2015/table/gantt-column.component.js +0 -37
- package/esm2015/table/gantt-table.component.js +0 -26
- package/fesm2015/worktile-gantt.js.map +0 -1
- package/main.bundle.scss +0 -687
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, EventEmitter, Directive, Inject, Input, Output, ContentChild, HostBinding, Component, Pipe, ViewChild, Injectable, Optional, forwardRef, ChangeDetectionStrategy, ContentChildren, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, EventEmitter, Directive, Inject, Input, Output, ContentChild, HostBinding, Component, Pipe, ViewChild, PLATFORM_ID, Injectable, ElementRef, Optional, SkipSelf, ViewChildren, forwardRef, ChangeDetectionStrategy, ContentChildren, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { take,
|
|
6
|
-
import { BehaviorSubject, Subject, merge, fromEvent } from 'rxjs';
|
|
4
|
+
import { isPlatformServer, CommonModule } from '@angular/common';
|
|
5
|
+
import { take, takeUntil, skip, map, pairwise, auditTime, startWith, debounceTime, switchMap, finalize } from 'rxjs/operators';
|
|
6
|
+
import { BehaviorSubject, Subject, from, merge, fromEvent, Observable, EMPTY } from 'rxjs';
|
|
7
7
|
import { fromUnixTime, getWeek, getDaysInMonth, differenceInCalendarDays, setDate, addSeconds, addMinutes, addHours, addDays, addWeeks, addMonths, addQuarters, addYears, startOfDay, startOfWeek, startOfMonth, startOfQuarter, startOfYear, endOfDay, endOfWeek, endOfMonth, endOfQuarter, endOfYear, getUnixTime, format, isWeekend, isToday, differenceInDays, differenceInCalendarQuarters, eachMonthOfInterval, eachYearOfInterval, eachWeekOfInterval, eachDayOfInterval, differenceInCalendarYears } from 'date-fns';
|
|
8
8
|
export { addDays, addHours, addMinutes, addMonths, addQuarters, addSeconds, addWeeks, addYears, differenceInCalendarDays, differenceInCalendarQuarters, differenceInDays, eachDayOfInterval, eachMonthOfInterval, eachWeekOfInterval, endOfDay, endOfMonth, endOfQuarter, endOfWeek, endOfYear, format, fromUnixTime, getDaysInMonth, getUnixTime, getWeek, isToday, isWeekend, setDate, startOfDay, startOfMonth, startOfQuarter, startOfWeek, startOfYear } from 'date-fns';
|
|
9
9
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
10
10
|
import { coerceBooleanProperty, coerceCssPixelValue } from '@angular/cdk/coercion';
|
|
11
11
|
import * as i1 from '@angular/cdk/drag-drop';
|
|
12
12
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
13
|
-
import html2canvas from 'html2canvas';
|
|
14
13
|
import { __decorate, __param } from 'tslib';
|
|
15
14
|
|
|
16
15
|
class GanttDatePoint {
|
|
@@ -445,16 +444,16 @@ class GanttView {
|
|
|
445
444
|
getDateByXPoint(x) {
|
|
446
445
|
const indexOfSecondaryDate = Math.floor(x / this.getCellWidth());
|
|
447
446
|
const matchDate = this.secondaryDatePoints[indexOfSecondaryDate];
|
|
448
|
-
const dayWidth = this.getDayOccupancyWidth(matchDate
|
|
447
|
+
const dayWidth = this.getDayOccupancyWidth(matchDate?.start);
|
|
449
448
|
if (dayWidth === this.getCellWidth()) {
|
|
450
|
-
return matchDate
|
|
449
|
+
return matchDate?.start;
|
|
451
450
|
}
|
|
452
451
|
else {
|
|
453
452
|
const day = Math.floor((x % this.getCellWidth()) / dayWidth) + 1;
|
|
454
453
|
if (this.getCellWidth() / dayWidth === 7) {
|
|
455
|
-
return matchDate
|
|
454
|
+
return matchDate?.start.addDays(day);
|
|
456
455
|
}
|
|
457
|
-
return matchDate
|
|
456
|
+
return matchDate?.start.setDate(day);
|
|
458
457
|
}
|
|
459
458
|
}
|
|
460
459
|
// 获取指定时间范围的宽度
|
|
@@ -792,7 +791,9 @@ class GanttUpper {
|
|
|
792
791
|
this.cdr = cdr;
|
|
793
792
|
this.ngZone = ngZone;
|
|
794
793
|
this.config = config;
|
|
794
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
795
795
|
this.originItems = [];
|
|
796
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
796
797
|
this.originGroups = [];
|
|
797
798
|
this.viewType = GanttViewType.month;
|
|
798
799
|
this.showTodayLine = true;
|
|
@@ -820,13 +821,12 @@ class GanttUpper {
|
|
|
820
821
|
return Object.assign({}, defaultConfig.linkOptions, this.config.linkOptions, this._linkOptions);
|
|
821
822
|
}
|
|
822
823
|
set selectable(value) {
|
|
823
|
-
var _a;
|
|
824
824
|
this._selectable = coerceBooleanProperty(value);
|
|
825
825
|
if (this._selectable) {
|
|
826
826
|
this.selectionModel = this.initSelectionModel();
|
|
827
827
|
}
|
|
828
828
|
else {
|
|
829
|
-
|
|
829
|
+
this.selectionModel?.clear();
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
832
|
get selectable() {
|
|
@@ -941,7 +941,7 @@ class GanttUpper {
|
|
|
941
941
|
initSelectionModel() {
|
|
942
942
|
return new SelectionModel(this.multiple, []);
|
|
943
943
|
}
|
|
944
|
-
|
|
944
|
+
ngOnInit() {
|
|
945
945
|
this.styles = Object.assign({}, defaultStyles, this.styles);
|
|
946
946
|
this.viewOptions.dateFormat = Object.assign({}, defaultConfig.dateFormat, this.config.dateFormat, this.viewOptions.dateFormat);
|
|
947
947
|
this.createView();
|
|
@@ -950,25 +950,32 @@ class GanttUpper {
|
|
|
950
950
|
this.computeRefs();
|
|
951
951
|
this.initSelectionModel();
|
|
952
952
|
this.firstChange = false;
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
this.
|
|
953
|
+
// Note: the zone may be nooped through `BootstrapOptions` when bootstrapping the root module. This means
|
|
954
|
+
// the `onStable` will never emit any value.
|
|
955
|
+
const onStable$ = this.ngZone.isStable ? from(Promise.resolve()) : this.ngZone.onStable.pipe(take(1));
|
|
956
|
+
// Normally this isn't in the zone, but it can cause performance regressions for apps
|
|
957
|
+
// using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.
|
|
958
|
+
this.ngZone.runOutsideAngular(() => {
|
|
959
|
+
onStable$.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
960
|
+
this.element.style.opacity = '1';
|
|
961
|
+
this.dragContainer.dragStarted.pipe(takeUntil(this.unsubscribe$)).subscribe((event) => {
|
|
962
|
+
this.dragStarted.emit(event);
|
|
963
|
+
});
|
|
964
|
+
this.dragContainer.dragMoved.pipe(takeUntil(this.unsubscribe$)).subscribe((event) => {
|
|
965
|
+
this.dragMoved.emit(event);
|
|
966
|
+
});
|
|
967
|
+
this.dragContainer.dragEnded.pipe(takeUntil(this.unsubscribe$)).subscribe((event) => {
|
|
968
|
+
this.dragEnded.emit(event);
|
|
969
|
+
this.computeRefs();
|
|
970
|
+
this.detectChanges();
|
|
971
|
+
});
|
|
965
972
|
});
|
|
966
973
|
});
|
|
967
974
|
this.view.start$.pipe(skip(1), takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
968
975
|
this.computeRefs();
|
|
969
976
|
});
|
|
970
977
|
}
|
|
971
|
-
|
|
978
|
+
ngOnChanges(changes) {
|
|
972
979
|
if (!this.firstChange) {
|
|
973
980
|
if (changes.viewType && changes.viewType.currentValue) {
|
|
974
981
|
this.createView();
|
|
@@ -985,7 +992,7 @@ class GanttUpper {
|
|
|
985
992
|
}
|
|
986
993
|
}
|
|
987
994
|
}
|
|
988
|
-
|
|
995
|
+
ngOnDestroy() {
|
|
989
996
|
this.unsubscribe$.next();
|
|
990
997
|
this.unsubscribe$.complete();
|
|
991
998
|
}
|
|
@@ -1039,9 +1046,9 @@ class GanttUpper {
|
|
|
1039
1046
|
return this.selectionModel.isSelected(id);
|
|
1040
1047
|
}
|
|
1041
1048
|
}
|
|
1042
|
-
GanttUpper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1043
|
-
GanttUpper.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
1044
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1049
|
+
GanttUpper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttUpper, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: GANTT_GLOBAL_CONFIG }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1050
|
+
GanttUpper.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: GanttUpper, inputs: { originItems: ["items", "originItems"], originGroups: ["groups", "originGroups"], viewType: "viewType", start: "start", end: "end", showTodayLine: "showTodayLine", draggable: "draggable", styles: "styles", viewOptions: "viewOptions", linkOptions: "linkOptions", disabledLoadOnScroll: "disabledLoadOnScroll", selectable: "selectable", multiple: "multiple" }, outputs: { loadOnScroll: "loadOnScroll", dragStarted: "dragStarted", dragMoved: "dragMoved", dragEnded: "dragEnded", barClick: "barClick" }, host: { properties: { "class.gantt": "this.ganttClass" } }, queries: [{ propertyName: "barTemplate", first: true, predicate: ["bar"], descendants: true, static: true }, { propertyName: "rangeTemplate", first: true, predicate: ["range"], descendants: true, static: true }, { propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, static: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true, static: true }, { propertyName: "groupHeaderTemplate", first: true, predicate: ["groupHeader"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
|
|
1051
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttUpper, decorators: [{
|
|
1045
1052
|
type: Directive
|
|
1046
1053
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
1047
1054
|
type: Inject,
|
|
@@ -1112,11 +1119,10 @@ class NgxGanttTableColumnComponent {
|
|
|
1112
1119
|
set width(width) {
|
|
1113
1120
|
this.columnWidth = coerceCssPixelValue(width);
|
|
1114
1121
|
}
|
|
1115
|
-
ngOnInit() { }
|
|
1116
1122
|
}
|
|
1117
|
-
NgxGanttTableColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1118
|
-
NgxGanttTableColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1123
|
+
NgxGanttTableColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttTableColumnComponent, deps: [{ token: GANTT_UPPER_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
|
|
1124
|
+
NgxGanttTableColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: NgxGanttTableColumnComponent, selector: "ngx-gantt-column", inputs: { width: "width", name: "name" }, queries: [{ propertyName: "templateRef", first: true, predicate: ["cell"], descendants: true, static: true }, { propertyName: "headerTemplateRef", first: true, predicate: ["header"], descendants: true, static: true }], ngImport: i0, template: '', isInline: true });
|
|
1125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttTableColumnComponent, decorators: [{
|
|
1120
1126
|
type: Component,
|
|
1121
1127
|
args: [{
|
|
1122
1128
|
selector: 'ngx-gantt-column',
|
|
@@ -1141,17 +1147,16 @@ class NgxGanttTableComponent {
|
|
|
1141
1147
|
constructor() {
|
|
1142
1148
|
this.columnChanges = new EventEmitter();
|
|
1143
1149
|
}
|
|
1144
|
-
ngOnInit() { }
|
|
1145
1150
|
}
|
|
1146
|
-
NgxGanttTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1147
|
-
NgxGanttTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1151
|
+
NgxGanttTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1152
|
+
NgxGanttTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: NgxGanttTableComponent, selector: "ngx-gantt-table", outputs: { 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 });
|
|
1153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttTableComponent, decorators: [{
|
|
1149
1154
|
type: Component,
|
|
1150
1155
|
args: [{
|
|
1151
1156
|
selector: 'ngx-gantt-table',
|
|
1152
1157
|
template: ''
|
|
1153
1158
|
}]
|
|
1154
|
-
}],
|
|
1159
|
+
}], propDecorators: { columnChanges: [{
|
|
1155
1160
|
type: Output
|
|
1156
1161
|
}], rowBeforeTemplate: [{
|
|
1157
1162
|
type: ContentChild,
|
|
@@ -1163,6 +1168,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImpor
|
|
|
1163
1168
|
|
|
1164
1169
|
const GANTT_ABSTRACT_TOKEN = new InjectionToken('gantt-abstract-token');
|
|
1165
1170
|
|
|
1171
|
+
const supports = (typeof window !== 'undefined' && !!window.CSS && CSS.supports) || (() => false);
|
|
1172
|
+
/**
|
|
1173
|
+
* Note: we don't need to add vendor prefixes within `.scss` files since they're added automatically.
|
|
1174
|
+
* This function is necessary when the `element.style` is updated directly through the JavaScript.
|
|
1175
|
+
* This is not required to be used with CSS properties that don't require vendor prefixes (e.g. `opacity`).
|
|
1176
|
+
*/
|
|
1177
|
+
function setStyleWithVendorPrefix({ element, style, value }) {
|
|
1178
|
+
element.style[style] = value;
|
|
1179
|
+
if (supports(`-webkit-${style}: ${value}`)) {
|
|
1180
|
+
// Note: some browsers still require setting `-webkit` vendor prefix. E.g. Mozilla 49 has implemented
|
|
1181
|
+
// the 3D support for `transform`, but it requires setting `-webkit-` prefix.
|
|
1182
|
+
element.style[`-webkit-${style}`] = value;
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1166
1186
|
const angleRight = `<svg xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><g id="amnavigation/angle-right" stroke-width="1" fill-rule="evenodd"><path d="M7.978 11.498l-.005.005L2.3 5.831 3.13 5l4.848 4.848L12.826 5l.83.831-5.673 5.672-.005-.005z" transform="rotate(-90 7.978 8.252)"></path></g></svg>`;
|
|
1167
1187
|
const angleDown = `<svg xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><g id="aknavigation/angle-down" stroke-width="1" fill-rule="evenodd"><path d="M7.978 11.997l-.005.006L2.3 6.33l.83-.831 4.848 4.848L12.826 5.5l.83.83-5.673 5.673-.005-.006z" ></path></g></svg>`;
|
|
1168
1188
|
const plusSquare = `<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><g id="kxaction/plus-square" stroke-width="1" fill-rule="evenodd"><path d="M2 0h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm0 1.2a.8.8 0 0 0-.8.8v12a.8.8 0 0 0 .8.8h12a.8.8 0 0 0 .8-.8V2a.8.8 0 0 0-.8-.8H2zm5.45 6.2V4.75h1.2V7.4h2.65v1.2H8.65v2.65h-1.2V8.6H4.8V7.4h2.65z"></path></g></svg>`;
|
|
@@ -1258,8 +1278,6 @@ class GanttIconComponent {
|
|
|
1258
1278
|
set iconName(name) {
|
|
1259
1279
|
this.setSvg(name);
|
|
1260
1280
|
}
|
|
1261
|
-
ngOnInit() { }
|
|
1262
|
-
ngAfterViewInit() { }
|
|
1263
1281
|
setSvg(name) {
|
|
1264
1282
|
const iconSvg = icons[name];
|
|
1265
1283
|
if (iconSvg) {
|
|
@@ -1270,9 +1288,9 @@ class GanttIconComponent {
|
|
|
1270
1288
|
}
|
|
1271
1289
|
}
|
|
1272
1290
|
}
|
|
1273
|
-
GanttIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1274
|
-
GanttIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1275
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1291
|
+
GanttIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttIconComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1292
|
+
GanttIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: GanttIconComponent, selector: "gantt-icon", inputs: { iconName: "iconName" }, host: { properties: { "class.gantt-icon": "this.isIcon" } }, ngImport: i0, template: '', isInline: true });
|
|
1293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttIconComponent, decorators: [{
|
|
1276
1294
|
type: Component,
|
|
1277
1295
|
args: [{
|
|
1278
1296
|
selector: 'gantt-icon',
|
|
@@ -1290,9 +1308,9 @@ class IsGanttRangeItemPipe {
|
|
|
1290
1308
|
return value === GanttItemType.range;
|
|
1291
1309
|
}
|
|
1292
1310
|
}
|
|
1293
|
-
IsGanttRangeItemPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1294
|
-
IsGanttRangeItemPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "
|
|
1295
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1311
|
+
IsGanttRangeItemPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: IsGanttRangeItemPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1312
|
+
IsGanttRangeItemPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: IsGanttRangeItemPipe, name: "isGanttRangeItem" });
|
|
1313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: IsGanttRangeItemPipe, decorators: [{
|
|
1296
1314
|
type: Pipe,
|
|
1297
1315
|
args: [{
|
|
1298
1316
|
name: 'isGanttRangeItem'
|
|
@@ -1303,9 +1321,9 @@ class IsGanttBarItemPipe {
|
|
|
1303
1321
|
return value === GanttItemType.bar;
|
|
1304
1322
|
}
|
|
1305
1323
|
}
|
|
1306
|
-
IsGanttBarItemPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1307
|
-
IsGanttBarItemPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "
|
|
1308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1324
|
+
IsGanttBarItemPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: IsGanttBarItemPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1325
|
+
IsGanttBarItemPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: IsGanttBarItemPipe, name: "isGanttBarItem" });
|
|
1326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: IsGanttBarItemPipe, decorators: [{
|
|
1309
1327
|
type: Pipe,
|
|
1310
1328
|
args: [{
|
|
1311
1329
|
name: 'isGanttBarItem'
|
|
@@ -1316,9 +1334,9 @@ class IsGanttCustomItemPipe {
|
|
|
1316
1334
|
return value === GanttItemType.custom;
|
|
1317
1335
|
}
|
|
1318
1336
|
}
|
|
1319
|
-
IsGanttCustomItemPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1320
|
-
IsGanttCustomItemPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "
|
|
1321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1337
|
+
IsGanttCustomItemPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: IsGanttCustomItemPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1338
|
+
IsGanttCustomItemPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: IsGanttCustomItemPipe, name: "isGanttCustomItem" });
|
|
1339
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: IsGanttCustomItemPipe, decorators: [{
|
|
1322
1340
|
type: Pipe,
|
|
1323
1341
|
args: [{
|
|
1324
1342
|
name: 'isGanttCustomItem'
|
|
@@ -1344,10 +1362,8 @@ class GanttTableComponent {
|
|
|
1344
1362
|
});
|
|
1345
1363
|
this.columnList = columns;
|
|
1346
1364
|
}
|
|
1347
|
-
ngOnInit() { }
|
|
1348
1365
|
ngOnChanges(changes) {
|
|
1349
|
-
|
|
1350
|
-
if (!((_a = changes.groups.currentValue) === null || _a === void 0 ? void 0 : _a.length) && !((_b = changes.items.currentValue) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
1366
|
+
if (!changes.groups.currentValue?.length && !changes.items.currentValue?.length) {
|
|
1351
1367
|
this.ganttTableEmptyClass = true;
|
|
1352
1368
|
}
|
|
1353
1369
|
else {
|
|
@@ -1356,7 +1372,11 @@ class GanttTableComponent {
|
|
|
1356
1372
|
}
|
|
1357
1373
|
dragFixed(config) {
|
|
1358
1374
|
if (config.movedWidth < config.minWidth) {
|
|
1359
|
-
|
|
1375
|
+
setStyleWithVendorPrefix({
|
|
1376
|
+
element: config.target,
|
|
1377
|
+
style: 'transform',
|
|
1378
|
+
value: `translate3d(${config.minWidth - config.originWidth}px, 0, 0)`
|
|
1379
|
+
});
|
|
1360
1380
|
}
|
|
1361
1381
|
}
|
|
1362
1382
|
expandGroup(group) {
|
|
@@ -1437,14 +1457,11 @@ class GanttTableComponent {
|
|
|
1437
1457
|
return item.id || index;
|
|
1438
1458
|
}
|
|
1439
1459
|
}
|
|
1440
|
-
GanttTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1441
|
-
GanttTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1460
|
+
GanttTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttTableComponent, deps: [{ token: GANTT_ABSTRACT_TOKEN }, { token: GANTT_UPPER_TOKEN }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1461
|
+
GanttTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: GanttTableComponent, selector: "gantt-table", inputs: { groups: "groups", items: "items", columns: "columns", groupTemplate: "groupTemplate", emptyTemplate: "emptyTemplate", rowBeforeTemplate: "rowBeforeTemplate", rowAfterTemplate: "rowAfterTemplate" }, outputs: { itemClick: "itemClick" }, host: { properties: { "class.gantt-table": "this.ganttTableClass", "class.gantt-table-empty": "this.ganttTableEmptyClass" } }, viewQueries: [{ propertyName: "draglineElementRef", first: true, predicate: ["dragLine"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"gantt-table-header gantt-table-row\">\n <div class=\"gantt-table-column\" *ngFor=\"let column of columnList; let i = index\" [style.width]=\"column.columnWidth\">\n <ng-container *ngIf=\"column.headerTemplateRef; else default\" [ngTemplateOutlet]=\"column.headerTemplateRef\"></ng-container>\n <ng-template #default>\n {{ column.name }}\n </ng-template>\n <div\n class=\"gantt-table-drag-trigger\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"dragMoved($event, column)\"\n (cdkDragStarted)=\"dragStarted($event)\"\n (cdkDragEnded)=\"columnDragEnded($event, column)\"\n ></div>\n </div>\n</div>\n<div class=\"gantt-table-body\">\n <ng-container *ngIf=\"!groups.length && !items.length\">\n <ng-container *ngIf=\"!emptyTemplate\">\n <gantt-icon class=\"empty-icon\" iconName=\"empty\"></gantt-icon>\n <div class=\"empty-text\">\u6CA1\u6709\u6570\u636E</div>\n </ng-container>\n <ng-template [ngTemplateOutlet]=\"emptyTemplate\"></ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"groups && groups.length > 0; else itemsTemplate\">\n <ng-container *ngFor=\"let group of groups; trackBy: trackBy\">\n <div class=\"gantt-table-group\" [ngClass]=\"group.class\">\n <div class=\"gantt-table-group-title\" [class.expanded]=\"group.expanded\" (click)=\"expandGroup(group)\">\n <gantt-icon class=\"expand-icon\" [iconName]=\"group.expanded ? 'angle-down' : 'angle-right'\"></gantt-icon>\n <ng-container *ngIf=\"groupTemplate; else default\">\n <ng-template\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: group.origin, group: group.origin }\"\n ></ng-template>\n </ng-container>\n <ng-template #default>\n <span class=\"group-title\">{{ group.title }}</span>\n </ng-template>\n </div>\n </div>\n\n <ng-container *ngIf=\"group.expanded\">\n <ng-template\n [ngTemplateOutlet]=\"ganttItems\"\n [ngTemplateOutletContext]=\"{ group: group, items: group.items, level: 0 }\"\n ></ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<div\n class=\"gantt-table-drag-trigger\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"dragMoved($event)\"\n (cdkDragStarted)=\"dragStarted($event)\"\n (cdkDragEnded)=\"tableDragEnded($event)\"\n></div>\n\n<div #dragLine class=\"gantt-table-drag-auxiliary-line\"></div>\n\n<ng-template #itemsTemplate>\n <ng-template [ngTemplateOutlet]=\"ganttItems\" [ngTemplateOutletContext]=\"{ items: items, level: 0 }\"></ng-template>\n</ng-template>\n\n<ng-template #ganttItems let-group=\"group\" let-items=\"items\" let-level=\"level\">\n <ng-container *ngFor=\"let item of items; trackBy: trackBy\">\n <div\n (click)=\"itemClick.emit({ event: $event, selectedValue: this.item.origin })\"\n class=\"gantt-table-item gantt-table-row\"\n [class.gantt-table-item-first-level-group]=\"level === 0 && (item.type | isGanttRangeItem)\"\n [class.gantt-table-item-with-group]=\"group\"\n [class.gantt-table-item-active]=\"ganttUpper.isSelected(item.id)\"\n [style.height.px]=\"gantt.styles.lineHeight\"\n [style.lineHeight.px]=\"gantt.styles.lineHeight\"\n >\n <ng-template\n [ngTemplateOutlet]=\"rowBeforeTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n <div class=\"gantt-table-column\" *ngFor=\"let column of columnList; let first = first\" [style.width]=\"column.columnWidth\">\n <div *ngIf=\"first\" class=\"gantt-expand-icon\" [style.marginLeft.px]=\"level * 20\">\n <ng-container *ngIf=\"level < gantt.maxLevel - 1 && item.expandable\">\n <gantt-icon\n *ngIf=\"!item.loading\"\n class=\"expand-icon\"\n [iconName]=\"item.expanded ? 'angle-down' : 'angle-right'\"\n (click)=\"expandChildren($event, item)\"\n ></gantt-icon>\n <gantt-icon *ngIf=\"item.loading\" [iconName]=\"'loading'\"></gantt-icon>\n </ng-container>\n </div>\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 <ng-template\n [ngTemplateOutlet]=\"rowAfterTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n </div>\n <ng-template\n *ngIf=\"item.children && item.expanded\"\n [ngTemplateOutlet]=\"ganttItems\"\n [ngTemplateOutletContext]=\"{ items: item.children, level: level + 1, group: group }\"\n ></ng-template>\n </ng-container>\n</ng-template>\n", components: [{ type: GanttIconComponent, selector: "gantt-icon", inputs: ["iconName"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "isGanttRangeItem": IsGanttRangeItemPipe } });
|
|
1462
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttTableComponent, decorators: [{
|
|
1443
1463
|
type: Component,
|
|
1444
|
-
args: [{
|
|
1445
|
-
selector: 'gantt-table',
|
|
1446
|
-
templateUrl: './gantt-table.component.html'
|
|
1447
|
-
}]
|
|
1464
|
+
args: [{ selector: 'gantt-table', template: "<div class=\"gantt-table-header gantt-table-row\">\n <div class=\"gantt-table-column\" *ngFor=\"let column of columnList; let i = index\" [style.width]=\"column.columnWidth\">\n <ng-container *ngIf=\"column.headerTemplateRef; else default\" [ngTemplateOutlet]=\"column.headerTemplateRef\"></ng-container>\n <ng-template #default>\n {{ column.name }}\n </ng-template>\n <div\n class=\"gantt-table-drag-trigger\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"dragMoved($event, column)\"\n (cdkDragStarted)=\"dragStarted($event)\"\n (cdkDragEnded)=\"columnDragEnded($event, column)\"\n ></div>\n </div>\n</div>\n<div class=\"gantt-table-body\">\n <ng-container *ngIf=\"!groups.length && !items.length\">\n <ng-container *ngIf=\"!emptyTemplate\">\n <gantt-icon class=\"empty-icon\" iconName=\"empty\"></gantt-icon>\n <div class=\"empty-text\">\u6CA1\u6709\u6570\u636E</div>\n </ng-container>\n <ng-template [ngTemplateOutlet]=\"emptyTemplate\"></ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"groups && groups.length > 0; else itemsTemplate\">\n <ng-container *ngFor=\"let group of groups; trackBy: trackBy\">\n <div class=\"gantt-table-group\" [ngClass]=\"group.class\">\n <div class=\"gantt-table-group-title\" [class.expanded]=\"group.expanded\" (click)=\"expandGroup(group)\">\n <gantt-icon class=\"expand-icon\" [iconName]=\"group.expanded ? 'angle-down' : 'angle-right'\"></gantt-icon>\n <ng-container *ngIf=\"groupTemplate; else default\">\n <ng-template\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: group.origin, group: group.origin }\"\n ></ng-template>\n </ng-container>\n <ng-template #default>\n <span class=\"group-title\">{{ group.title }}</span>\n </ng-template>\n </div>\n </div>\n\n <ng-container *ngIf=\"group.expanded\">\n <ng-template\n [ngTemplateOutlet]=\"ganttItems\"\n [ngTemplateOutletContext]=\"{ group: group, items: group.items, level: 0 }\"\n ></ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<div\n class=\"gantt-table-drag-trigger\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragBoundary=\".gantt\"\n (cdkDragMoved)=\"dragMoved($event)\"\n (cdkDragStarted)=\"dragStarted($event)\"\n (cdkDragEnded)=\"tableDragEnded($event)\"\n></div>\n\n<div #dragLine class=\"gantt-table-drag-auxiliary-line\"></div>\n\n<ng-template #itemsTemplate>\n <ng-template [ngTemplateOutlet]=\"ganttItems\" [ngTemplateOutletContext]=\"{ items: items, level: 0 }\"></ng-template>\n</ng-template>\n\n<ng-template #ganttItems let-group=\"group\" let-items=\"items\" let-level=\"level\">\n <ng-container *ngFor=\"let item of items; trackBy: trackBy\">\n <div\n (click)=\"itemClick.emit({ event: $event, selectedValue: this.item.origin })\"\n class=\"gantt-table-item gantt-table-row\"\n [class.gantt-table-item-first-level-group]=\"level === 0 && (item.type | isGanttRangeItem)\"\n [class.gantt-table-item-with-group]=\"group\"\n [class.gantt-table-item-active]=\"ganttUpper.isSelected(item.id)\"\n [style.height.px]=\"gantt.styles.lineHeight\"\n [style.lineHeight.px]=\"gantt.styles.lineHeight\"\n >\n <ng-template\n [ngTemplateOutlet]=\"rowBeforeTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n <div class=\"gantt-table-column\" *ngFor=\"let column of columnList; let first = first\" [style.width]=\"column.columnWidth\">\n <div *ngIf=\"first\" class=\"gantt-expand-icon\" [style.marginLeft.px]=\"level * 20\">\n <ng-container *ngIf=\"level < gantt.maxLevel - 1 && item.expandable\">\n <gantt-icon\n *ngIf=\"!item.loading\"\n class=\"expand-icon\"\n [iconName]=\"item.expanded ? 'angle-down' : 'angle-right'\"\n (click)=\"expandChildren($event, item)\"\n ></gantt-icon>\n <gantt-icon *ngIf=\"item.loading\" [iconName]=\"'loading'\"></gantt-icon>\n </ng-container>\n </div>\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 <ng-template\n [ngTemplateOutlet]=\"rowAfterTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.origin, item: item.origin }\"\n ></ng-template>\n </div>\n <ng-template\n *ngIf=\"item.children && item.expanded\"\n [ngTemplateOutlet]=\"ganttItems\"\n [ngTemplateOutletContext]=\"{ items: item.children, level: level + 1, group: group }\"\n ></ng-template>\n </ng-container>\n</ng-template>\n" }]
|
|
1448
1465
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1449
1466
|
type: Inject,
|
|
1450
1467
|
args: [GANTT_ABSTRACT_TOKEN]
|
|
@@ -1478,6 +1495,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImpor
|
|
|
1478
1495
|
args: ['class.gantt-table-empty']
|
|
1479
1496
|
}] } });
|
|
1480
1497
|
|
|
1498
|
+
/** Cached result of whether the user's browser supports passive event listeners. */
|
|
1499
|
+
let supportsPassiveEvents;
|
|
1500
|
+
/**
|
|
1501
|
+
* Checks whether the user's browser supports passive event listeners.
|
|
1502
|
+
* See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
|
|
1503
|
+
*/
|
|
1504
|
+
function supportsPassiveEventListeners() {
|
|
1505
|
+
if (supportsPassiveEvents == null && typeof window !== 'undefined') {
|
|
1506
|
+
try {
|
|
1507
|
+
window.addEventListener('test', null, Object.defineProperty({}, 'passive', {
|
|
1508
|
+
get: () => (supportsPassiveEvents = true)
|
|
1509
|
+
}));
|
|
1510
|
+
}
|
|
1511
|
+
finally {
|
|
1512
|
+
supportsPassiveEvents = supportsPassiveEvents || false;
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
return supportsPassiveEvents;
|
|
1516
|
+
}
|
|
1517
|
+
/**
|
|
1518
|
+
* Normalizes an `AddEventListener` object to something that can be passed
|
|
1519
|
+
* to `addEventListener` on any browser, no matter whether it supports the
|
|
1520
|
+
* `options` parameter.
|
|
1521
|
+
*/
|
|
1522
|
+
function normalizePassiveListenerOptions(options) {
|
|
1523
|
+
return supportsPassiveEventListeners() ? options : !!options.capture;
|
|
1524
|
+
}
|
|
1525
|
+
/** Options used to bind passive event listeners. */
|
|
1526
|
+
const passiveListenerOptions = normalizePassiveListenerOptions({ passive: true });
|
|
1527
|
+
|
|
1481
1528
|
const scrollThreshold = 50;
|
|
1482
1529
|
var ScrollDirection;
|
|
1483
1530
|
(function (ScrollDirection) {
|
|
@@ -1486,24 +1533,26 @@ var ScrollDirection;
|
|
|
1486
1533
|
ScrollDirection[ScrollDirection["RIGHT"] = 2] = "RIGHT";
|
|
1487
1534
|
})(ScrollDirection || (ScrollDirection = {}));
|
|
1488
1535
|
class GanttDomService {
|
|
1489
|
-
constructor() {
|
|
1536
|
+
constructor(ngZone, platformId) {
|
|
1537
|
+
this.ngZone = ngZone;
|
|
1538
|
+
this.platformId = platformId;
|
|
1490
1539
|
this.unsubscribe$ = new Subject();
|
|
1491
1540
|
}
|
|
1492
1541
|
monitorScrollChange() {
|
|
1493
|
-
merge(fromEvent(this.mainContainer, 'scroll'), fromEvent(this.sideContainer, 'scroll'))
|
|
1542
|
+
this.ngZone.runOutsideAngular(() => merge(fromEvent(this.mainContainer, 'scroll', passiveListenerOptions), fromEvent(this.sideContainer, 'scroll', passiveListenerOptions))
|
|
1494
1543
|
.pipe(takeUntil(this.unsubscribe$))
|
|
1495
1544
|
.subscribe((event) => {
|
|
1496
1545
|
this.syncScroll(event);
|
|
1497
|
-
});
|
|
1498
|
-
fromEvent(this.mainContainer, 'scroll')
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
});
|
|
1546
|
+
}));
|
|
1547
|
+
// fromEvent(this.mainContainer, 'scroll')
|
|
1548
|
+
// .pipe(startWith(), takeUntil(this.unsubscribe$))
|
|
1549
|
+
// .subscribe((event) => {
|
|
1550
|
+
// // if (this.mainContainer.scrollLeft > 0) {
|
|
1551
|
+
// // this.side.classList.add('gantt-side-has-shadow');
|
|
1552
|
+
// // } else {
|
|
1553
|
+
// // this.side.classList.remove('gantt-side-has-shadow');
|
|
1554
|
+
// // }
|
|
1555
|
+
// });
|
|
1507
1556
|
}
|
|
1508
1557
|
syncScroll(event) {
|
|
1509
1558
|
const target = event.currentTarget;
|
|
@@ -1513,7 +1562,7 @@ class GanttDomService {
|
|
|
1513
1562
|
}
|
|
1514
1563
|
disableBrowserWheelEvent() {
|
|
1515
1564
|
const container = this.mainContainer;
|
|
1516
|
-
fromEvent(container, 'wheel')
|
|
1565
|
+
this.ngZone.runOutsideAngular(() => fromEvent(container, 'wheel')
|
|
1517
1566
|
.pipe(takeUntil(this.unsubscribe$))
|
|
1518
1567
|
.subscribe((event) => {
|
|
1519
1568
|
const delta = event.deltaX;
|
|
@@ -1524,7 +1573,7 @@ class GanttDomService {
|
|
|
1524
1573
|
(container.scrollLeft === 0 && delta < 0)) {
|
|
1525
1574
|
event.preventDefault();
|
|
1526
1575
|
}
|
|
1527
|
-
});
|
|
1576
|
+
}));
|
|
1528
1577
|
}
|
|
1529
1578
|
initialize(root) {
|
|
1530
1579
|
this.root = root.nativeElement;
|
|
@@ -1536,8 +1585,13 @@ class GanttDomService {
|
|
|
1536
1585
|
this.monitorScrollChange();
|
|
1537
1586
|
this.disableBrowserWheelEvent();
|
|
1538
1587
|
}
|
|
1539
|
-
|
|
1540
|
-
|
|
1588
|
+
/**
|
|
1589
|
+
* @returns An observable that will emit outside the Angular zone. Note, consumers should re-enter the Angular zone
|
|
1590
|
+
* to run the change detection if needed.
|
|
1591
|
+
*/
|
|
1592
|
+
getViewerScroll(options) {
|
|
1593
|
+
return new Observable((subscriber) => this.ngZone.runOutsideAngular(() => fromEvent(this.mainContainer, 'scroll', options)
|
|
1594
|
+
.pipe(map(() => this.mainContainer.scrollLeft), pairwise(), map(([previous, current]) => {
|
|
1541
1595
|
const event = {
|
|
1542
1596
|
target: this.mainContainer,
|
|
1543
1597
|
direction: ScrollDirection.NONE
|
|
@@ -1548,15 +1602,17 @@ class GanttDomService {
|
|
|
1548
1602
|
}
|
|
1549
1603
|
}
|
|
1550
1604
|
if (current - previous > 0) {
|
|
1551
|
-
if (this.mainContainer.scrollWidth - this.mainContainer.clientWidth - this.mainContainer.scrollLeft <
|
|
1605
|
+
if (this.mainContainer.scrollWidth - this.mainContainer.clientWidth - this.mainContainer.scrollLeft <
|
|
1606
|
+
scrollThreshold) {
|
|
1552
1607
|
event.direction = ScrollDirection.RIGHT;
|
|
1553
1608
|
}
|
|
1554
1609
|
}
|
|
1555
1610
|
return event;
|
|
1556
|
-
}))
|
|
1611
|
+
}))
|
|
1612
|
+
.subscribe(subscriber)));
|
|
1557
1613
|
}
|
|
1558
1614
|
getResize() {
|
|
1559
|
-
return fromEvent(window, 'resize').pipe(auditTime(150));
|
|
1615
|
+
return isPlatformServer(this.platformId) ? EMPTY : fromEvent(window, 'resize').pipe(auditTime(150));
|
|
1560
1616
|
}
|
|
1561
1617
|
scrollMainContainer(left) {
|
|
1562
1618
|
if (isNumber(left)) {
|
|
@@ -1570,11 +1626,14 @@ class GanttDomService {
|
|
|
1570
1626
|
this.unsubscribe$.complete();
|
|
1571
1627
|
}
|
|
1572
1628
|
}
|
|
1573
|
-
GanttDomService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1574
|
-
GanttDomService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1629
|
+
GanttDomService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttDomService, deps: [{ token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1630
|
+
GanttDomService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttDomService });
|
|
1631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttDomService, decorators: [{
|
|
1576
1632
|
type: Injectable
|
|
1577
|
-
}], ctorParameters: function () { return [
|
|
1633
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: undefined, decorators: [{
|
|
1634
|
+
type: Inject,
|
|
1635
|
+
args: [PLATFORM_ID]
|
|
1636
|
+
}] }]; } });
|
|
1578
1637
|
|
|
1579
1638
|
function getDependencyType(path, dependencyTypes) {
|
|
1580
1639
|
if (dependencyTypes.includes(GanttLinkType.ss) && path.from.pos === InBarPosition.start && path.to.pos === InBarPosition.start) {
|
|
@@ -1623,31 +1682,43 @@ class GanttDragContainer {
|
|
|
1623
1682
|
this.linkDragPath.to = null;
|
|
1624
1683
|
}
|
|
1625
1684
|
emitLinkDragEnded(to) {
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1685
|
+
if (to) {
|
|
1686
|
+
this.linkDragPath.to = to;
|
|
1687
|
+
const dependencyType = getDependencyType(this.linkDragPath, this.ganttUpper.linkOptions?.dependencyTypes);
|
|
1688
|
+
this.linkDragPath.from.item.addLink({
|
|
1689
|
+
link: this.linkDragPath.to.item.id,
|
|
1690
|
+
type: dependencyType
|
|
1691
|
+
});
|
|
1692
|
+
this.linkDragEnded.emit({
|
|
1693
|
+
source: this.linkDragPath.from.item.origin,
|
|
1694
|
+
target: this.linkDragPath.to.item.origin,
|
|
1695
|
+
type: dependencyType
|
|
1696
|
+
});
|
|
1697
|
+
}
|
|
1638
1698
|
this.linkDraggingId = null;
|
|
1639
1699
|
this.linkDragPath = { from: null, to: null };
|
|
1640
1700
|
}
|
|
1641
1701
|
}
|
|
1642
|
-
GanttDragContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1643
|
-
GanttDragContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1644
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1702
|
+
GanttDragContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttDragContainer, deps: [{ token: GANTT_UPPER_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1703
|
+
GanttDragContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttDragContainer });
|
|
1704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttDragContainer, decorators: [{
|
|
1645
1705
|
type: Injectable
|
|
1646
1706
|
}], ctorParameters: function () { return [{ type: GanttUpper, decorators: [{
|
|
1647
1707
|
type: Inject,
|
|
1648
1708
|
args: [GANTT_UPPER_TOKEN]
|
|
1649
1709
|
}] }]; } });
|
|
1650
1710
|
|
|
1711
|
+
class GanttDragBackdropComponent {
|
|
1712
|
+
}
|
|
1713
|
+
GanttDragBackdropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttDragBackdropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1714
|
+
GanttDragBackdropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: GanttDragBackdropComponent, selector: "gantt-drag-backdrop", host: { classAttribute: "gantt-drag-backdrop" }, ngImport: i0, template: "<div class=\"gantt-drag-mask\">\n <div class=\"date-range\">\n <span class=\"start\"></span>\n <span class=\"end\"></span>\n </div>\n</div>\n" });
|
|
1715
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttDragBackdropComponent, decorators: [{
|
|
1716
|
+
type: Component,
|
|
1717
|
+
args: [{ selector: 'gantt-drag-backdrop', host: {
|
|
1718
|
+
class: 'gantt-drag-backdrop'
|
|
1719
|
+
}, template: "<div class=\"gantt-drag-mask\">\n <div class=\"date-range\">\n <span class=\"start\"></span>\n <span class=\"end\"></span>\n </div>\n</div>\n" }]
|
|
1720
|
+
}] });
|
|
1721
|
+
|
|
1651
1722
|
class GanttPrintService {
|
|
1652
1723
|
constructor() { }
|
|
1653
1724
|
setInlineStyles(targetElem) {
|
|
@@ -1683,13 +1754,14 @@ class GanttPrintService {
|
|
|
1683
1754
|
this.root = root.nativeElement;
|
|
1684
1755
|
this.mainContainer = this.root.getElementsByClassName('gantt-main-container')[0];
|
|
1685
1756
|
}
|
|
1686
|
-
print(name = 'download', ignoreElementClass) {
|
|
1757
|
+
async print(name = 'download', ignoreElementClass) {
|
|
1687
1758
|
const root = this.root;
|
|
1688
1759
|
const mainContainer = this.mainContainer;
|
|
1689
1760
|
// set print width
|
|
1690
1761
|
const printWidth = root.offsetWidth;
|
|
1691
1762
|
// set print height
|
|
1692
1763
|
const printHeight = root.offsetHeight - mainContainer.offsetHeight + mainContainer.scrollHeight;
|
|
1764
|
+
const html2canvas = (await import(/* webpackChunkName: 'html2canvas' */ 'html2canvas')).default;
|
|
1693
1765
|
html2canvas(root, {
|
|
1694
1766
|
logging: false,
|
|
1695
1767
|
allowTaint: true,
|
|
@@ -1733,9 +1805,9 @@ class GanttPrintService {
|
|
|
1733
1805
|
});
|
|
1734
1806
|
}
|
|
1735
1807
|
}
|
|
1736
|
-
GanttPrintService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1737
|
-
GanttPrintService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1738
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1808
|
+
GanttPrintService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttPrintService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1809
|
+
GanttPrintService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttPrintService });
|
|
1810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttPrintService, decorators: [{
|
|
1739
1811
|
type: Injectable
|
|
1740
1812
|
}], ctorParameters: function () { return []; } });
|
|
1741
1813
|
|
|
@@ -1745,7 +1817,6 @@ class GanttCalendarComponent {
|
|
|
1745
1817
|
this.ganttUpper = ganttUpper;
|
|
1746
1818
|
this.ngZone = ngZone;
|
|
1747
1819
|
this.elementRef = elementRef;
|
|
1748
|
-
this.unsubscribe$ = new Subject();
|
|
1749
1820
|
this.headerHeight = headerHeight;
|
|
1750
1821
|
this.mainHeight = mainHeight;
|
|
1751
1822
|
this.todayHeight = todayHeight;
|
|
@@ -1753,6 +1824,7 @@ class GanttCalendarComponent {
|
|
|
1753
1824
|
this.todayBorderRadius = todayBorderRadius;
|
|
1754
1825
|
this.viewTypes = GanttViewType;
|
|
1755
1826
|
this.className = true;
|
|
1827
|
+
this.unsubscribe$ = new Subject();
|
|
1756
1828
|
}
|
|
1757
1829
|
get view() {
|
|
1758
1830
|
return this.ganttUpper.view;
|
|
@@ -1780,16 +1852,21 @@ class GanttCalendarComponent {
|
|
|
1780
1852
|
}
|
|
1781
1853
|
}
|
|
1782
1854
|
ngOnInit() {
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1855
|
+
// Note: the zone may be nooped through `BootstrapOptions` when bootstrapping the root module. This means
|
|
1856
|
+
// the `onStable` will never emit any value.
|
|
1857
|
+
const onStable$ = this.ngZone.isStable ? from(Promise.resolve()) : this.ngZone.onStable.pipe(take(1));
|
|
1858
|
+
// Normally this isn't in the zone, but it can cause performance regressions for apps
|
|
1859
|
+
// using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.
|
|
1860
|
+
this.ngZone.runOutsideAngular(() => {
|
|
1861
|
+
onStable$.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
1862
|
+
merge(this.ganttUpper.viewChange, this.ganttUpper.view.start$)
|
|
1863
|
+
.pipe(takeUntil(this.unsubscribe$))
|
|
1864
|
+
.subscribe(() => {
|
|
1865
|
+
this.setTodayPoint();
|
|
1866
|
+
});
|
|
1788
1867
|
});
|
|
1789
1868
|
});
|
|
1790
1869
|
}
|
|
1791
|
-
ngAfterViewInit() { }
|
|
1792
|
-
ngOnChanges(changes) { }
|
|
1793
1870
|
trackBy(index, point) {
|
|
1794
1871
|
return point.text || index;
|
|
1795
1872
|
}
|
|
@@ -1798,14 +1875,11 @@ class GanttCalendarComponent {
|
|
|
1798
1875
|
this.unsubscribe$.complete();
|
|
1799
1876
|
}
|
|
1800
1877
|
}
|
|
1801
|
-
GanttCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1802
|
-
GanttCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1878
|
+
GanttCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttCalendarComponent, deps: [{ token: GANTT_UPPER_TOKEN }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1879
|
+
GanttCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: GanttCalendarComponent, selector: "gantt-calendar-overlay", host: { properties: { "class.gantt-calendar-overlay": "this.className" } }, ngImport: i0, template: "<div class=\"gantt-calendar-today-overlay\" [style.width.px]=\"view.width\">\n <span class=\"today-rect\" [hidden]=\"ganttUpper.viewType !== viewTypes.day\"> </span>\n <span class=\"today-line\" *ngIf=\"ganttUpper.showTodayLine\"> </span>\n</div>\n\n<svg class=\"gantt-calendar-overlay-main\" [attr.width]=\"view.width\" [attr.height]=\"headerHeight\">\n <g>\n <text class=\"primary-text\" *ngFor=\"let point of view.primaryDatePoints; trackBy: trackBy\" [attr.x]=\"point.x\" [attr.y]=\"point.y\">\n {{ point.text }}\n </text>\n <ng-container *ngFor=\"let point of view.secondaryDatePoints; trackBy: trackBy\">\n <text class=\"secondary-text\" [class.secondary-text-weekend]=\"point.additions?.isWeekend\" [attr.x]=\"point.x\" [attr.y]=\"point.y\">\n {{ point.text }}\n </text>\n </ng-container>\n\n <g>\n <line\n *ngFor=\"let point of view.primaryDatePoints; let i = index; trackBy: trackBy\"\n [attr.x1]=\"(i + 1) * view.primaryWidth\"\n [attr.x2]=\"(i + 1) * view.primaryWidth\"\n [attr.y1]=\"0\"\n [attr.y2]=\"mainHeight\"\n class=\"primary-line\"\n ></line>\n </g>\n\n <g>\n <line [attr.x1]=\"0\" [attr.x2]=\"view.width\" [attr.y1]=\"headerHeight\" [attr.y2]=\"headerHeight\" class=\"header-line\"></line>\n </g>\n </g>\n <g>\n <g *ngIf=\"view.showTimeline\">\n <line\n *ngFor=\"let point of view.secondaryDatePoints; let i = index; trackBy: trackBy\"\n [attr.x1]=\"(i + 1) * view.cellWidth\"\n [attr.x2]=\"(i + 1) * view.cellWidth\"\n [attr.y1]=\"headerHeight\"\n [attr.y2]=\"mainHeight\"\n class=\"secondary-line\"\n ></line>\n <line\n *ngFor=\"let point of view.primaryDatePoints; let i = index; trackBy: trackBy\"\n [attr.x1]=\"(i + 1) * view.primaryWidth\"\n [attr.x2]=\"(i + 1) * view.primaryWidth\"\n [attr.y1]=\"0\"\n [attr.y2]=\"mainHeight\"\n class=\"primary-line\"\n ></line>\n </g>\n </g>\n</svg>\n", directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttCalendarComponent, decorators: [{
|
|
1804
1881
|
type: Component,
|
|
1805
|
-
args: [{
|
|
1806
|
-
selector: 'gantt-calendar-overlay',
|
|
1807
|
-
templateUrl: './calendar.component.html'
|
|
1808
|
-
}]
|
|
1882
|
+
args: [{ selector: 'gantt-calendar-overlay', template: "<div class=\"gantt-calendar-today-overlay\" [style.width.px]=\"view.width\">\n <span class=\"today-rect\" [hidden]=\"ganttUpper.viewType !== viewTypes.day\"> </span>\n <span class=\"today-line\" *ngIf=\"ganttUpper.showTodayLine\"> </span>\n</div>\n\n<svg class=\"gantt-calendar-overlay-main\" [attr.width]=\"view.width\" [attr.height]=\"headerHeight\">\n <g>\n <text class=\"primary-text\" *ngFor=\"let point of view.primaryDatePoints; trackBy: trackBy\" [attr.x]=\"point.x\" [attr.y]=\"point.y\">\n {{ point.text }}\n </text>\n <ng-container *ngFor=\"let point of view.secondaryDatePoints; trackBy: trackBy\">\n <text class=\"secondary-text\" [class.secondary-text-weekend]=\"point.additions?.isWeekend\" [attr.x]=\"point.x\" [attr.y]=\"point.y\">\n {{ point.text }}\n </text>\n </ng-container>\n\n <g>\n <line\n *ngFor=\"let point of view.primaryDatePoints; let i = index; trackBy: trackBy\"\n [attr.x1]=\"(i + 1) * view.primaryWidth\"\n [attr.x2]=\"(i + 1) * view.primaryWidth\"\n [attr.y1]=\"0\"\n [attr.y2]=\"mainHeight\"\n class=\"primary-line\"\n ></line>\n </g>\n\n <g>\n <line [attr.x1]=\"0\" [attr.x2]=\"view.width\" [attr.y1]=\"headerHeight\" [attr.y2]=\"headerHeight\" class=\"header-line\"></line>\n </g>\n </g>\n <g>\n <g *ngIf=\"view.showTimeline\">\n <line\n *ngFor=\"let point of view.secondaryDatePoints; let i = index; trackBy: trackBy\"\n [attr.x1]=\"(i + 1) * view.cellWidth\"\n [attr.x2]=\"(i + 1) * view.cellWidth\"\n [attr.y1]=\"headerHeight\"\n [attr.y2]=\"mainHeight\"\n class=\"secondary-line\"\n ></line>\n <line\n *ngFor=\"let point of view.primaryDatePoints; let i = index; trackBy: trackBy\"\n [attr.x1]=\"(i + 1) * view.primaryWidth\"\n [attr.x2]=\"(i + 1) * view.primaryWidth\"\n [attr.y1]=\"0\"\n [attr.y2]=\"mainHeight\"\n class=\"primary-line\"\n ></line>\n </g>\n </g>\n</svg>\n" }]
|
|
1809
1883
|
}], ctorParameters: function () { return [{ type: GanttUpper, decorators: [{
|
|
1810
1884
|
type: Inject,
|
|
1811
1885
|
args: [GANTT_UPPER_TOKEN]
|
|
@@ -1814,25 +1888,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImpor
|
|
|
1814
1888
|
args: ['class.gantt-calendar-overlay']
|
|
1815
1889
|
}] } });
|
|
1816
1890
|
|
|
1817
|
-
class GanttDragBackdropComponent {
|
|
1818
|
-
constructor() {
|
|
1819
|
-
this.backdropClass = true;
|
|
1820
|
-
}
|
|
1821
|
-
ngOnInit() { }
|
|
1822
|
-
}
|
|
1823
|
-
GanttDragBackdropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0, type: GanttDragBackdropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1824
|
-
GanttDragBackdropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: GanttDragBackdropComponent, selector: "gantt-drag-backdrop", host: { properties: { "class.gantt-drag-backdrop": "this.backdropClass" } }, ngImport: i0, template: "<div class=\"gantt-drag-mask\">\n <div class=\"date-range\">\n <span class=\"start\"></span>\n <span class=\"end\"></span>\n </div>\n</div>\n" });
|
|
1825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0, type: GanttDragBackdropComponent, decorators: [{
|
|
1826
|
-
type: Component,
|
|
1827
|
-
args: [{
|
|
1828
|
-
selector: 'gantt-drag-backdrop',
|
|
1829
|
-
templateUrl: `./drag-backdrop.component.html`
|
|
1830
|
-
}]
|
|
1831
|
-
}], ctorParameters: function () { return []; }, propDecorators: { backdropClass: [{
|
|
1832
|
-
type: HostBinding,
|
|
1833
|
-
args: ['class.gantt-drag-backdrop']
|
|
1834
|
-
}] } });
|
|
1835
|
-
|
|
1836
1891
|
class NgxGanttRootComponent {
|
|
1837
1892
|
constructor(elementRef, ngZone, dom, dragContainer, ganttUpper, printService) {
|
|
1838
1893
|
this.elementRef = elementRef;
|
|
@@ -1841,7 +1896,6 @@ class NgxGanttRootComponent {
|
|
|
1841
1896
|
this.dragContainer = dragContainer;
|
|
1842
1897
|
this.ganttUpper = ganttUpper;
|
|
1843
1898
|
this.printService = printService;
|
|
1844
|
-
this.ganttClass = true;
|
|
1845
1899
|
this.unsubscribe$ = new Subject();
|
|
1846
1900
|
this.ganttUpper.dragContainer = dragContainer;
|
|
1847
1901
|
}
|
|
@@ -1849,44 +1903,52 @@ class NgxGanttRootComponent {
|
|
|
1849
1903
|
return this.ganttUpper.view;
|
|
1850
1904
|
}
|
|
1851
1905
|
ngOnInit() {
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
this.
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
this.
|
|
1906
|
+
// Note: the zone may be nooped through `BootstrapOptions` when bootstrapping the root module. This means
|
|
1907
|
+
// the `onStable` will never emit any value.
|
|
1908
|
+
const onStable$ = this.ngZone.isStable ? from(Promise.resolve()) : this.ngZone.onStable.pipe(take(1));
|
|
1909
|
+
// Normally this isn't in the zone, but it can cause performance regressions for apps
|
|
1910
|
+
// using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.
|
|
1911
|
+
this.ngZone.runOutsideAngular(() => {
|
|
1912
|
+
onStable$.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
1913
|
+
this.dom.initialize(this.elementRef);
|
|
1914
|
+
if (this.printService) {
|
|
1915
|
+
this.printService.register(this.elementRef);
|
|
1916
|
+
}
|
|
1917
|
+
this.setupScrollClass();
|
|
1918
|
+
this.setupResize();
|
|
1919
|
+
this.setupViewScroll();
|
|
1920
|
+
// 优化初始化时Scroll滚动体验问题,通过透明度解决,默认透明度为0,滚动结束后恢复
|
|
1921
|
+
this.elementRef.nativeElement.style.opacity = '1';
|
|
1922
|
+
this.ganttUpper.viewChange.pipe(startWith(null), takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
1923
|
+
this.scrollToToday();
|
|
1924
|
+
});
|
|
1864
1925
|
});
|
|
1865
1926
|
});
|
|
1866
1927
|
}
|
|
1928
|
+
ngOnDestroy() {
|
|
1929
|
+
this.unsubscribe$.next();
|
|
1930
|
+
}
|
|
1867
1931
|
setupViewScroll() {
|
|
1868
1932
|
if (this.ganttUpper.disabledLoadOnScroll) {
|
|
1869
1933
|
return;
|
|
1870
1934
|
}
|
|
1871
1935
|
this.dom
|
|
1872
|
-
.getViewerScroll()
|
|
1936
|
+
.getViewerScroll(passiveListenerOptions)
|
|
1873
1937
|
.pipe(takeUntil(this.unsubscribe$))
|
|
1874
1938
|
.subscribe((event) => {
|
|
1875
1939
|
if (event.direction === ScrollDirection.LEFT) {
|
|
1876
1940
|
const dates = this.view.addStartDate();
|
|
1877
1941
|
if (dates) {
|
|
1878
1942
|
event.target.scrollLeft += this.view.getDateRangeWidth(dates.start, dates.end);
|
|
1879
|
-
this.
|
|
1880
|
-
this.ganttUpper.loadOnScroll.emit({ start: dates.start.getUnixTime(), end: dates.end.getUnixTime() });
|
|
1881
|
-
}
|
|
1943
|
+
if (this.ganttUpper.loadOnScroll.observers) {
|
|
1944
|
+
this.ngZone.run(() => this.ganttUpper.loadOnScroll.emit({ start: dates.start.getUnixTime(), end: dates.end.getUnixTime() }));
|
|
1945
|
+
}
|
|
1882
1946
|
}
|
|
1883
1947
|
}
|
|
1884
1948
|
if (event.direction === ScrollDirection.RIGHT) {
|
|
1885
1949
|
const dates = this.view.addEndDate();
|
|
1886
|
-
if (dates) {
|
|
1887
|
-
this.ngZone.run(() => {
|
|
1888
|
-
this.ganttUpper.loadOnScroll.emit({ start: dates.start.getUnixTime(), end: dates.end.getUnixTime() });
|
|
1889
|
-
});
|
|
1950
|
+
if (dates && this.ganttUpper.loadOnScroll.observers) {
|
|
1951
|
+
this.ngZone.run(() => this.ganttUpper.loadOnScroll.emit({ start: dates.start.getUnixTime(), end: dates.end.getUnixTime() }));
|
|
1890
1952
|
}
|
|
1891
1953
|
}
|
|
1892
1954
|
});
|
|
@@ -1915,15 +1977,13 @@ class NgxGanttRootComponent {
|
|
|
1915
1977
|
this.dom.scrollMainContainer(x);
|
|
1916
1978
|
}
|
|
1917
1979
|
}
|
|
1918
|
-
NgxGanttRootComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1919
|
-
NgxGanttRootComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1920
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1980
|
+
NgxGanttRootComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttRootComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: GanttDomService }, { token: GanttDragContainer }, { token: GANTT_UPPER_TOKEN }, { token: GanttPrintService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1981
|
+
NgxGanttRootComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: NgxGanttRootComponent, selector: "ngx-gantt-root", inputs: { sideWidth: "sideWidth" }, host: { classAttribute: "gantt" }, providers: [GanttDomService, GanttDragContainer], queries: [{ propertyName: "sideTemplate", first: true, predicate: ["sideTemplate"], descendants: true, static: true }, { propertyName: "mainTemplate", first: true, predicate: ["mainTemplate"], descendants: true, static: true }], viewQueries: [{ propertyName: "backdrop", first: true, predicate: GanttDragBackdropComponent, descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"gantt-side\" [style.width.px]=\"sideWidth\">\n <div class=\"gantt-side-container\">\n <ng-template [ngTemplateOutlet]=\"sideTemplate\"></ng-template>\n </div>\n</div>\n<div class=\"gantt-container\">\n <gantt-calendar-overlay></gantt-calendar-overlay>\n <gantt-drag-backdrop></gantt-drag-backdrop>\n <div class=\"gantt-main\">\n <ng-template [ngTemplateOutlet]=\"mainTemplate\"></ng-template>\n </div>\n</div>\n", components: [{ type: GanttCalendarComponent, selector: "gantt-calendar-overlay" }, { type: GanttDragBackdropComponent, selector: "gantt-drag-backdrop" }], directives: [{ type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
1982
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttRootComponent, decorators: [{
|
|
1921
1983
|
type: Component,
|
|
1922
|
-
args: [{
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
providers: [GanttDomService, GanttDragContainer]
|
|
1926
|
-
}]
|
|
1984
|
+
args: [{ selector: 'ngx-gantt-root', providers: [GanttDomService, GanttDragContainer], host: {
|
|
1985
|
+
class: 'gantt'
|
|
1986
|
+
}, template: "<div class=\"gantt-side\" [style.width.px]=\"sideWidth\">\n <div class=\"gantt-side-container\">\n <ng-template [ngTemplateOutlet]=\"sideTemplate\"></ng-template>\n </div>\n</div>\n<div class=\"gantt-container\">\n <gantt-calendar-overlay></gantt-calendar-overlay>\n <gantt-drag-backdrop></gantt-drag-backdrop>\n <div class=\"gantt-main\">\n <ng-template [ngTemplateOutlet]=\"mainTemplate\"></ng-template>\n </div>\n</div>\n" }]
|
|
1927
1987
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: GanttDomService }, { type: GanttDragContainer }, { type: GanttUpper, decorators: [{
|
|
1928
1988
|
type: Inject,
|
|
1929
1989
|
args: [GANTT_UPPER_TOKEN]
|
|
@@ -1931,15 +1991,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImpor
|
|
|
1931
1991
|
type: Optional
|
|
1932
1992
|
}] }]; }, propDecorators: { sideWidth: [{
|
|
1933
1993
|
type: Input
|
|
1934
|
-
}], ganttClass: [{
|
|
1935
|
-
type: HostBinding,
|
|
1936
|
-
args: ['class.gantt']
|
|
1937
1994
|
}], sideTemplate: [{
|
|
1938
1995
|
type: ContentChild,
|
|
1939
1996
|
args: ['sideTemplate', { static: true }]
|
|
1940
1997
|
}], mainTemplate: [{
|
|
1941
1998
|
type: ContentChild,
|
|
1942
1999
|
args: ['mainTemplate', { static: true }]
|
|
2000
|
+
}], backdrop: [{
|
|
2001
|
+
type: ViewChild,
|
|
2002
|
+
args: [GanttDragBackdropComponent, { static: true, read: ElementRef }]
|
|
1943
2003
|
}] } });
|
|
1944
2004
|
|
|
1945
2005
|
class GanttLinkLine {
|
|
@@ -2007,7 +2067,6 @@ let GanttLinkLineCurve = class GanttLinkLineCurve extends GanttLinkLine {
|
|
|
2007
2067
|
}
|
|
2008
2068
|
}
|
|
2009
2069
|
generateFSAndSFPath(source, target, type) {
|
|
2010
|
-
var _a;
|
|
2011
2070
|
let x1 = source.after.x;
|
|
2012
2071
|
let y1 = source.after.y;
|
|
2013
2072
|
let x4 = target.before.x;
|
|
@@ -2042,7 +2101,7 @@ let GanttLinkLineCurve = class GanttLinkLineCurve extends GanttLinkLine {
|
|
|
2042
2101
|
`;
|
|
2043
2102
|
}
|
|
2044
2103
|
}
|
|
2045
|
-
else if (
|
|
2104
|
+
else if (this.ganttUpper.linkOptions?.showArrow && x4 - x1 < 200) {
|
|
2046
2105
|
dx = Math.max(Math.abs(y4 - y1) * bezierWeight, 60);
|
|
2047
2106
|
x2 = x1 + dx;
|
|
2048
2107
|
x3 = x4 - dx;
|
|
@@ -2148,7 +2207,7 @@ class GanttLinksComponent {
|
|
|
2148
2207
|
this.elementRef.nativeElement.style.visibility = 'hidden';
|
|
2149
2208
|
});
|
|
2150
2209
|
merge(this.ganttUpper.viewChange, this.ganttUpper.expandChange, this.ganttUpper.view.start$, this.ganttUpper.dragEnded, this.ganttUpper.linkDragEnded)
|
|
2151
|
-
.pipe(
|
|
2210
|
+
.pipe(skip(1), debounceTime(0), takeUntil(this.unsubscribe$))
|
|
2152
2211
|
.subscribe(() => {
|
|
2153
2212
|
this.elementRef.nativeElement.style.visibility = 'visible';
|
|
2154
2213
|
this.buildLinks();
|
|
@@ -2173,13 +2232,17 @@ class GanttLinksComponent {
|
|
|
2173
2232
|
const items = recursiveItems(group.items);
|
|
2174
2233
|
items.forEach((item, itemIndex) => {
|
|
2175
2234
|
const y = (groupNum + itemNum + itemIndex) * lineHeight + item.refs.y + barHeight / 2;
|
|
2176
|
-
this.linkItems.push(
|
|
2235
|
+
this.linkItems.push({
|
|
2236
|
+
...item,
|
|
2237
|
+
before: {
|
|
2177
2238
|
x: item.refs.x,
|
|
2178
2239
|
y
|
|
2179
|
-
},
|
|
2240
|
+
},
|
|
2241
|
+
after: {
|
|
2180
2242
|
x: item.refs.x + item.refs.width,
|
|
2181
2243
|
y
|
|
2182
|
-
}
|
|
2244
|
+
}
|
|
2245
|
+
});
|
|
2183
2246
|
});
|
|
2184
2247
|
itemNum += items.length;
|
|
2185
2248
|
}
|
|
@@ -2189,13 +2252,17 @@ class GanttLinksComponent {
|
|
|
2189
2252
|
const items = recursiveItems(this.items);
|
|
2190
2253
|
items.forEach((item, itemIndex) => {
|
|
2191
2254
|
const y = itemIndex * lineHeight + item.refs.y + barHeight / 2;
|
|
2192
|
-
this.linkItems.push(
|
|
2255
|
+
this.linkItems.push({
|
|
2256
|
+
...item,
|
|
2257
|
+
before: {
|
|
2193
2258
|
x: item.refs.x,
|
|
2194
2259
|
y
|
|
2195
|
-
},
|
|
2260
|
+
},
|
|
2261
|
+
after: {
|
|
2196
2262
|
x: item.refs.x + item.refs.width,
|
|
2197
2263
|
y
|
|
2198
|
-
}
|
|
2264
|
+
}
|
|
2265
|
+
});
|
|
2199
2266
|
});
|
|
2200
2267
|
}
|
|
2201
2268
|
}
|
|
@@ -2262,14 +2329,11 @@ class GanttLinksComponent {
|
|
|
2262
2329
|
this.unsubscribe$.complete();
|
|
2263
2330
|
}
|
|
2264
2331
|
}
|
|
2265
|
-
GanttLinksComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2266
|
-
GanttLinksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
2267
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2332
|
+
GanttLinksComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttLinksComponent, deps: [{ token: GANTT_UPPER_TOKEN }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: GanttDragContainer }], target: i0.ɵɵFactoryTarget.Component });
|
|
2333
|
+
GanttLinksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: GanttLinksComponent, selector: "gantt-links-overlay", inputs: { groups: "groups", items: "items" }, outputs: { lineClick: "lineClick" }, host: { properties: { "class.gantt-links-overlay": "this.ganttLinksOverlay" } }, usesOnChanges: true, ngImport: i0, template: "<svg [attr.width]=\"ganttUpper.view.width\" class=\"gantt-links-overlay-main\">\n <ng-container *ngFor=\"let link of links; let i = index; trackBy: trackBy\">\n <path\n [attr.d]=\"link.path\"\n fill=\"transparent\"\n stroke-width=\"2\"\n [attr.stroke]=\"link.color\"\n pointer-events=\"none\"\n [attr.style]=\"link.type === ganttLinkTypes.sf ? 'marker-start: url(#triangle' + i + ')' : 'marker-end: url(#triangle' + i + ')'\"\n ></path>\n\n <g>\n <path\n class=\"link-line\"\n (click)=\"onLineClick($event, link)\"\n [attr.d]=\"link.path\"\n (mouseenter)=\"mouseEnterPath(link, i)\"\n (mouseleave)=\"mouseLeavePath(link)\"\n stroke=\"transparent\"\n stroke-width=\"9\"\n fill=\"none\"\n cursor=\"pointer\"\n ></path>\n </g>\n <defs *ngIf=\"showArrow\">\n <marker\n *ngIf=\"link.type === ganttLinkTypes.sf; else markerEnd\"\n [id]=\"'triangle' + i\"\n markerUnits=\"strokeWidth\"\n markerWidth=\"5\"\n markerHeight=\"4\"\n refX=\"5\"\n refY=\"2\"\n orient=\"180\"\n >\n <path [attr.fill]=\"link.color\" [attr.stroke]=\"link.color\" d=\"M 0 0 L 5 2 L 0 4 z\" />\n </marker>\n\n <ng-template #markerEnd>\n <marker [id]=\"'triangle' + i\" markerUnits=\"strokeWidth\" markerWidth=\"5\" markerHeight=\"4\" refX=\"5\" refY=\"2\" orient=\"auto\">\n <path [attr.fill]=\"link.color\" [attr.stroke]=\"link.color\" d=\"M 0 0 L 5 2 L 0 4 z\" />\n </marker>\n </ng-template>\n </defs>\n </ng-container>\n <line class=\"link-dragging-line\"></line>\n</svg>\n", directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttLinksComponent, decorators: [{
|
|
2268
2335
|
type: Component,
|
|
2269
|
-
args: [{
|
|
2270
|
-
selector: 'gantt-links-overlay',
|
|
2271
|
-
templateUrl: './links.component.html'
|
|
2272
|
-
}]
|
|
2336
|
+
args: [{ selector: 'gantt-links-overlay', template: "<svg [attr.width]=\"ganttUpper.view.width\" class=\"gantt-links-overlay-main\">\n <ng-container *ngFor=\"let link of links; let i = index; trackBy: trackBy\">\n <path\n [attr.d]=\"link.path\"\n fill=\"transparent\"\n stroke-width=\"2\"\n [attr.stroke]=\"link.color\"\n pointer-events=\"none\"\n [attr.style]=\"link.type === ganttLinkTypes.sf ? 'marker-start: url(#triangle' + i + ')' : 'marker-end: url(#triangle' + i + ')'\"\n ></path>\n\n <g>\n <path\n class=\"link-line\"\n (click)=\"onLineClick($event, link)\"\n [attr.d]=\"link.path\"\n (mouseenter)=\"mouseEnterPath(link, i)\"\n (mouseleave)=\"mouseLeavePath(link)\"\n stroke=\"transparent\"\n stroke-width=\"9\"\n fill=\"none\"\n cursor=\"pointer\"\n ></path>\n </g>\n <defs *ngIf=\"showArrow\">\n <marker\n *ngIf=\"link.type === ganttLinkTypes.sf; else markerEnd\"\n [id]=\"'triangle' + i\"\n markerUnits=\"strokeWidth\"\n markerWidth=\"5\"\n markerHeight=\"4\"\n refX=\"5\"\n refY=\"2\"\n orient=\"180\"\n >\n <path [attr.fill]=\"link.color\" [attr.stroke]=\"link.color\" d=\"M 0 0 L 5 2 L 0 4 z\" />\n </marker>\n\n <ng-template #markerEnd>\n <marker [id]=\"'triangle' + i\" markerUnits=\"strokeWidth\" markerWidth=\"5\" markerHeight=\"4\" refX=\"5\" refY=\"2\" orient=\"auto\">\n <path [attr.fill]=\"link.color\" [attr.stroke]=\"link.color\" d=\"M 0 0 L 5 2 L 0 4 z\" />\n </marker>\n </ng-template>\n </defs>\n </ng-container>\n <line class=\"link-dragging-line\"></line>\n</svg>\n" }]
|
|
2273
2337
|
}], ctorParameters: function () { return [{ type: GanttUpper, decorators: [{
|
|
2274
2338
|
type: Inject,
|
|
2275
2339
|
args: [GANTT_UPPER_TOKEN]
|
|
@@ -2291,13 +2355,13 @@ class GanttItemUpper {
|
|
|
2291
2355
|
this.firstChange = true;
|
|
2292
2356
|
this.unsubscribe$ = new Subject();
|
|
2293
2357
|
}
|
|
2294
|
-
|
|
2358
|
+
ngOnInit() {
|
|
2295
2359
|
this.firstChange = false;
|
|
2296
2360
|
this.item.refs$.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
2297
2361
|
this.setPositions();
|
|
2298
2362
|
});
|
|
2299
2363
|
}
|
|
2300
|
-
|
|
2364
|
+
ngOnChanges() {
|
|
2301
2365
|
if (!this.firstChange) {
|
|
2302
2366
|
this.setPositions();
|
|
2303
2367
|
}
|
|
@@ -2316,14 +2380,14 @@ class GanttItemUpper {
|
|
|
2316
2380
|
else {
|
|
2317
2381
|
}
|
|
2318
2382
|
}
|
|
2319
|
-
|
|
2383
|
+
ngOnDestroy() {
|
|
2320
2384
|
this.unsubscribe$.next();
|
|
2321
2385
|
this.unsubscribe$.complete();
|
|
2322
2386
|
}
|
|
2323
2387
|
}
|
|
2324
|
-
GanttItemUpper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2325
|
-
GanttItemUpper.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2326
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2388
|
+
GanttItemUpper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttItemUpper, deps: [{ token: i0.ElementRef }, { token: GANTT_UPPER_TOKEN }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2389
|
+
GanttItemUpper.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: GanttItemUpper, inputs: { template: "template", item: "item" }, usesOnChanges: true, ngImport: i0 });
|
|
2390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttItemUpper, decorators: [{
|
|
2327
2391
|
type: Directive
|
|
2328
2392
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: GanttUpper, decorators: [{
|
|
2329
2393
|
type: Inject,
|
|
@@ -2339,24 +2403,12 @@ class NgxGanttRangeComponent extends GanttItemUpper {
|
|
|
2339
2403
|
super(elementRef, ganttUpper);
|
|
2340
2404
|
this.ganttRangeClass = true;
|
|
2341
2405
|
}
|
|
2342
|
-
ngOnInit() {
|
|
2343
|
-
super.onInit();
|
|
2344
|
-
}
|
|
2345
|
-
ngOnChanges() {
|
|
2346
|
-
super.onChanges();
|
|
2347
|
-
}
|
|
2348
|
-
ngOnDestroy() {
|
|
2349
|
-
super.onDestroy();
|
|
2350
|
-
}
|
|
2351
2406
|
}
|
|
2352
|
-
NgxGanttRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2353
|
-
NgxGanttRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
2354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2407
|
+
NgxGanttRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttRangeComponent, deps: [{ token: i0.ElementRef }, { token: GANTT_UPPER_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
|
|
2408
|
+
NgxGanttRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: NgxGanttRangeComponent, selector: "ngx-gantt-range,gantt-range", host: { properties: { "class.gantt-range": "this.ganttRangeClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"item.start && item.end\">\n <div class=\"gantt-range-main\">\n <div class=\"gantt-range-main-progress\" *ngIf=\"item.progress >= 0\" [style.width.%]=\"item.progress * 100\"></div>\n </div>\n <div class=\"gantt-range-triangle left\"></div>\n <div class=\"gantt-range-triangle right\"></div>\n <ng-template [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item: item.origin, refs: item.refs }\"></ng-template>\n</ng-container>\n", directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
2409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttRangeComponent, decorators: [{
|
|
2355
2410
|
type: Component,
|
|
2356
|
-
args: [{
|
|
2357
|
-
selector: 'ngx-gantt-range,gantt-range',
|
|
2358
|
-
templateUrl: './range.component.html'
|
|
2359
|
-
}]
|
|
2411
|
+
args: [{ selector: 'ngx-gantt-range,gantt-range', template: "<ng-container *ngIf=\"item.start && item.end\">\n <div class=\"gantt-range-main\">\n <div class=\"gantt-range-main-progress\" *ngIf=\"item.progress >= 0\" [style.width.%]=\"item.progress * 100\"></div>\n </div>\n <div class=\"gantt-range-triangle left\"></div>\n <div class=\"gantt-range-triangle right\"></div>\n <ng-template [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item: item.origin, refs: item.refs }\"></ng-template>\n</ng-container>\n" }]
|
|
2360
2412
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: GanttUpper, decorators: [{
|
|
2361
2413
|
type: Inject,
|
|
2362
2414
|
args: [GANTT_UPPER_TOKEN]
|
|
@@ -2375,10 +2427,11 @@ function createSvgElement(qualifiedName, className) {
|
|
|
2375
2427
|
return element;
|
|
2376
2428
|
}
|
|
2377
2429
|
class GanttBarDrag {
|
|
2378
|
-
constructor(dragDrop, dom, dragContainer) {
|
|
2430
|
+
constructor(dragDrop, dom, dragContainer, root) {
|
|
2379
2431
|
this.dragDrop = dragDrop;
|
|
2380
2432
|
this.dom = dom;
|
|
2381
2433
|
this.dragContainer = dragContainer;
|
|
2434
|
+
this.root = root;
|
|
2382
2435
|
this.dragRefs = [];
|
|
2383
2436
|
this.destroy$ = new Subject();
|
|
2384
2437
|
}
|
|
@@ -2389,14 +2442,13 @@ class GanttBarDrag {
|
|
|
2389
2442
|
return !this.item.linkable || !this.ganttUpper.linkable;
|
|
2390
2443
|
}
|
|
2391
2444
|
createMouseEvents() {
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
((_c = this.ganttUpper.config.linkOptions) === null || _c === void 0 ? void 0 : _c.dependencyTypes[0]) === GanttLinkType.fs
|
|
2445
|
+
const dropClass = this.ganttUpper.config.linkOptions?.dependencyTypes?.length === 1 &&
|
|
2446
|
+
this.ganttUpper.config.linkOptions?.dependencyTypes[0] === GanttLinkType.fs
|
|
2395
2447
|
? singleDropActiveClass
|
|
2396
2448
|
: dropActiveClass;
|
|
2397
|
-
fromEvent(this.barElement, 'mouseenter')
|
|
2449
|
+
fromEvent(this.barElement, 'mouseenter', passiveListenerOptions)
|
|
2398
2450
|
.pipe(takeUntil(this.destroy$))
|
|
2399
|
-
.subscribe((
|
|
2451
|
+
.subscribe(() => {
|
|
2400
2452
|
if (this.dragContainer.linkDraggingId && this.dragContainer.linkDraggingId !== this.item.id) {
|
|
2401
2453
|
if (this.item.linkable) {
|
|
2402
2454
|
this.barElement.classList.add(dropClass);
|
|
@@ -2410,9 +2462,9 @@ class GanttBarDrag {
|
|
|
2410
2462
|
this.barElement.classList.add(activeClass);
|
|
2411
2463
|
}
|
|
2412
2464
|
});
|
|
2413
|
-
fromEvent(this.barElement, 'mouseleave')
|
|
2465
|
+
fromEvent(this.barElement, 'mouseleave', passiveListenerOptions)
|
|
2414
2466
|
.pipe(takeUntil(this.destroy$))
|
|
2415
|
-
.subscribe((
|
|
2467
|
+
.subscribe(() => {
|
|
2416
2468
|
if (!this.dragContainer.linkDraggingId) {
|
|
2417
2469
|
this.barElement.classList.remove(activeClass);
|
|
2418
2470
|
}
|
|
@@ -2473,7 +2525,7 @@ class GanttBarDrag {
|
|
|
2473
2525
|
if (width > dragMinWidth) {
|
|
2474
2526
|
this.barElement.style.width = width + 'px';
|
|
2475
2527
|
this.barElement.style.left = x + 'px';
|
|
2476
|
-
this.openDragBackdrop(this.barElement, this.ganttUpper.view.getDateByXPoint(x), this.
|
|
2528
|
+
this.openDragBackdrop(this.barElement, this.ganttUpper.view.getDateByXPoint(x), this.item.end);
|
|
2477
2529
|
this.item.updateDate(this.ganttUpper.view.getDateByXPoint(x), this.item.end);
|
|
2478
2530
|
}
|
|
2479
2531
|
}
|
|
@@ -2481,7 +2533,7 @@ class GanttBarDrag {
|
|
|
2481
2533
|
const width = this.item.refs.width + event.distance.x;
|
|
2482
2534
|
if (width > dragMinWidth) {
|
|
2483
2535
|
this.barElement.style.width = width + 'px';
|
|
2484
|
-
this.openDragBackdrop(this.barElement, this.
|
|
2536
|
+
this.openDragBackdrop(this.barElement, this.item.start, this.ganttUpper.view.getDateByXPoint(this.item.refs.x + width));
|
|
2485
2537
|
}
|
|
2486
2538
|
this.item.updateDate(this.item.start, this.ganttUpper.view.getDateByXPoint(this.item.refs.x + width));
|
|
2487
2539
|
}
|
|
@@ -2550,9 +2602,15 @@ class GanttBarDrag {
|
|
|
2550
2602
|
if (this.dragContainer.linkDragPath.to) {
|
|
2551
2603
|
const placePointX = event.source.getRootElement().getBoundingClientRect().x -
|
|
2552
2604
|
this.dragContainer.linkDragPath.to.element.getBoundingClientRect().x;
|
|
2553
|
-
this.dragContainer.emitLinkDragEnded(
|
|
2605
|
+
this.dragContainer.emitLinkDragEnded({
|
|
2606
|
+
...this.dragContainer.linkDragPath.to,
|
|
2607
|
+
pos: placePointX < this.dragContainer.linkDragPath.to.item.refs.width / 2
|
|
2554
2608
|
? InBarPosition.start
|
|
2555
|
-
: InBarPosition.finish
|
|
2609
|
+
: InBarPosition.finish
|
|
2610
|
+
});
|
|
2611
|
+
}
|
|
2612
|
+
else {
|
|
2613
|
+
this.dragContainer.emitLinkDragEnded();
|
|
2556
2614
|
}
|
|
2557
2615
|
event.source.reset();
|
|
2558
2616
|
this.barElement.classList.remove(activeClass);
|
|
@@ -2563,22 +2621,24 @@ class GanttBarDrag {
|
|
|
2563
2621
|
return dragRefs;
|
|
2564
2622
|
}
|
|
2565
2623
|
openDragBackdrop(dragElement, start, end) {
|
|
2566
|
-
const
|
|
2567
|
-
const
|
|
2624
|
+
const dragBackdropElement = this.root.backdrop.nativeElement;
|
|
2625
|
+
const dragMaskElement = dragBackdropElement.querySelector('.gantt-drag-mask');
|
|
2568
2626
|
const rootRect = this.dom.root.getBoundingClientRect();
|
|
2569
2627
|
const dragRect = dragElement.getBoundingClientRect();
|
|
2570
2628
|
const left = dragRect.left - rootRect.left - this.dom.side.clientWidth;
|
|
2571
2629
|
const width = dragRect.right - dragRect.left;
|
|
2630
|
+
// Note: updating styles will cause re-layout so we have to place them consistently one by one.
|
|
2572
2631
|
dragMaskElement.style.left = left + 'px';
|
|
2573
2632
|
dragMaskElement.style.width = width + 'px';
|
|
2574
|
-
dragMaskElement.querySelector('.start').innerHTML = start.format('MM-dd');
|
|
2575
|
-
dragMaskElement.querySelector('.end').innerHTML = end.format('MM-dd');
|
|
2576
2633
|
dragMaskElement.style.display = 'block';
|
|
2577
2634
|
dragBackdropElement.style.display = 'block';
|
|
2635
|
+
// This will invalidate the layout, but we won't need re-layout, because we set styles previously.
|
|
2636
|
+
dragMaskElement.querySelector('.start').innerHTML = start.format('MM-dd');
|
|
2637
|
+
dragMaskElement.querySelector('.end').innerHTML = end.format('MM-dd');
|
|
2578
2638
|
}
|
|
2579
2639
|
closeDragBackdrop() {
|
|
2580
|
-
const
|
|
2581
|
-
const
|
|
2640
|
+
const dragBackdropElement = this.root.backdrop.nativeElement;
|
|
2641
|
+
const dragMaskElement = dragBackdropElement.querySelector('.gantt-drag-mask');
|
|
2582
2642
|
dragMaskElement.style.display = 'none';
|
|
2583
2643
|
dragBackdropElement.style.display = 'none';
|
|
2584
2644
|
}
|
|
@@ -2621,7 +2681,8 @@ class GanttBarDrag {
|
|
|
2621
2681
|
this.item = item;
|
|
2622
2682
|
this.barElement = elementRef.nativeElement;
|
|
2623
2683
|
this.ganttUpper = ganttUpper;
|
|
2624
|
-
if (!item.draggable || (this.dragDisabled && this.linkDragDisabled)) {
|
|
2684
|
+
// if (!item.draggable || (this.dragDisabled && this.linkDragDisabled)) {
|
|
2685
|
+
if (this.dragDisabled && this.linkDragDisabled) {
|
|
2625
2686
|
return;
|
|
2626
2687
|
}
|
|
2627
2688
|
else {
|
|
@@ -2644,27 +2705,30 @@ class GanttBarDrag {
|
|
|
2644
2705
|
this.destroy$.complete();
|
|
2645
2706
|
}
|
|
2646
2707
|
}
|
|
2647
|
-
GanttBarDrag.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2648
|
-
GanttBarDrag.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2649
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2708
|
+
GanttBarDrag.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttBarDrag, deps: [{ token: i1.DragDrop }, { token: GanttDomService }, { token: GanttDragContainer }, { token: NgxGanttRootComponent, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2709
|
+
GanttBarDrag.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttBarDrag });
|
|
2710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttBarDrag, decorators: [{
|
|
2650
2711
|
type: Injectable
|
|
2651
|
-
}], ctorParameters: function () { return [{ type: i1.DragDrop }, { type: GanttDomService }, { type: GanttDragContainer }
|
|
2712
|
+
}], ctorParameters: function () { return [{ type: i1.DragDrop }, { type: GanttDomService }, { type: GanttDragContainer }, { type: NgxGanttRootComponent, decorators: [{
|
|
2713
|
+
type: SkipSelf
|
|
2714
|
+
}] }]; } });
|
|
2652
2715
|
|
|
2653
2716
|
function linearGradient(sideOrCorner, color, stop) {
|
|
2654
2717
|
return `linear-gradient(${sideOrCorner},${color} 0%,${stop} 40%)`;
|
|
2655
2718
|
}
|
|
2656
2719
|
class NgxGanttBarComponent extends GanttItemUpper {
|
|
2657
|
-
constructor(dragContainer, drag, elementRef, ganttUpper) {
|
|
2720
|
+
constructor(dragContainer, drag, elementRef, ganttUpper, ngZone) {
|
|
2658
2721
|
super(elementRef, ganttUpper);
|
|
2659
2722
|
this.dragContainer = dragContainer;
|
|
2660
2723
|
this.drag = drag;
|
|
2661
2724
|
this.ganttUpper = ganttUpper;
|
|
2725
|
+
this.ngZone = ngZone;
|
|
2662
2726
|
this.barClick = new EventEmitter();
|
|
2663
2727
|
this.ganttItemClass = true;
|
|
2664
2728
|
this.color = 'red';
|
|
2665
2729
|
}
|
|
2666
2730
|
ngOnInit() {
|
|
2667
|
-
super.
|
|
2731
|
+
super.ngOnInit();
|
|
2668
2732
|
this.dragContainer.dragEnded.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
2669
2733
|
this.setContentBackground();
|
|
2670
2734
|
});
|
|
@@ -2672,9 +2736,14 @@ class NgxGanttBarComponent extends GanttItemUpper {
|
|
|
2672
2736
|
ngAfterViewInit() {
|
|
2673
2737
|
this.drag.createDrags(this.elementRef, this.item, this.ganttUpper);
|
|
2674
2738
|
this.setContentBackground();
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2739
|
+
this.handles.changes
|
|
2740
|
+
.pipe(startWith(this.handles), switchMap(() =>
|
|
2741
|
+
// Note: we need to explicitly subscribe outside of the Angular zone since `addEventListener`
|
|
2742
|
+
// is called when the `fromEvent` is subscribed.
|
|
2743
|
+
new Observable((subscriber) => this.ngZone.runOutsideAngular(() => merge(...this.handles.toArray().map((handle) => fromEvent(handle.nativeElement, 'mousedown'))).subscribe(subscriber)))), takeUntil(this.unsubscribe$))
|
|
2744
|
+
.subscribe((event) => {
|
|
2745
|
+
event.stopPropagation();
|
|
2746
|
+
});
|
|
2678
2747
|
}
|
|
2679
2748
|
onBarClick(event) {
|
|
2680
2749
|
this.barClick.emit({ event, item: this.item.origin });
|
|
@@ -2710,23 +2779,16 @@ class NgxGanttBarComponent extends GanttItemUpper {
|
|
|
2710
2779
|
stopPropagation(event) {
|
|
2711
2780
|
event.stopPropagation();
|
|
2712
2781
|
}
|
|
2713
|
-
ngOnDestroy() {
|
|
2714
|
-
super.onDestroy();
|
|
2715
|
-
}
|
|
2716
2782
|
}
|
|
2717
|
-
NgxGanttBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2718
|
-
NgxGanttBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
2719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2783
|
+
NgxGanttBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttBarComponent, deps: [{ token: GanttDragContainer }, { token: GanttBarDrag }, { token: i0.ElementRef }, { token: GANTT_UPPER_TOKEN }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
2784
|
+
NgxGanttBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: NgxGanttBarComponent, selector: "ngx-gantt-bar,gantt-bar", outputs: { barClick: "barClick" }, host: { properties: { "class.gantt-bar": "this.ganttItemClass" } }, providers: [GanttBarDrag], viewQueries: [{ propertyName: "contentElementRef", first: true, predicate: ["content"], descendants: true }, { propertyName: "handles", predicate: ["handle"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"gantt-bar-layer\">\n <div class=\"drag-handles\">\n <ng-container *ngIf=\"item.draggable && ganttUpper.draggable\">\n <span class=\"handle\" #handle></span>\n <span class=\"handle\" #handle></span>\n </ng-container>\n </div>\n <div *ngIf=\"item.linkable && ganttUpper.linkable\" class=\"link-handles\">\n <span class=\"handle\"><span class=\"point\"></span></span>\n <span class=\"handle\"> <span class=\"point\"></span></span>\n </div>\n</div>\n<div class=\"gantt-bar-border\"></div>\n<div #content class=\"gantt-bar-content\" (click)=\"onBarClick($event)\">\n <div class=\"gantt-bar-content-progress\" *ngIf=\"item.progress >= 0\" [style.width.%]=\"item.progress * 100\"></div>\n <ng-template [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item: item.origin, refs: item.refs }\"></ng-template>\n</div>\n", directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
2785
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttBarComponent, decorators: [{
|
|
2720
2786
|
type: Component,
|
|
2721
|
-
args: [{
|
|
2722
|
-
selector: 'ngx-gantt-bar,gantt-bar',
|
|
2723
|
-
templateUrl: './bar.component.html',
|
|
2724
|
-
providers: [GanttBarDrag]
|
|
2725
|
-
}]
|
|
2787
|
+
args: [{ selector: 'ngx-gantt-bar,gantt-bar', providers: [GanttBarDrag], template: "<div class=\"gantt-bar-layer\">\n <div class=\"drag-handles\">\n <ng-container *ngIf=\"item.draggable && ganttUpper.draggable\">\n <span class=\"handle\" #handle></span>\n <span class=\"handle\" #handle></span>\n </ng-container>\n </div>\n <div *ngIf=\"item.linkable && ganttUpper.linkable\" class=\"link-handles\">\n <span class=\"handle\"><span class=\"point\"></span></span>\n <span class=\"handle\"> <span class=\"point\"></span></span>\n </div>\n</div>\n<div class=\"gantt-bar-border\"></div>\n<div #content class=\"gantt-bar-content\" (click)=\"onBarClick($event)\">\n <div class=\"gantt-bar-content-progress\" *ngIf=\"item.progress >= 0\" [style.width.%]=\"item.progress * 100\"></div>\n <ng-template [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ item: item.origin, refs: item.refs }\"></ng-template>\n</div>\n" }]
|
|
2726
2788
|
}], ctorParameters: function () { return [{ type: GanttDragContainer }, { type: GanttBarDrag }, { type: i0.ElementRef }, { type: GanttUpper, decorators: [{
|
|
2727
2789
|
type: Inject,
|
|
2728
2790
|
args: [GANTT_UPPER_TOKEN]
|
|
2729
|
-
}] }]; }, propDecorators: { barClick: [{
|
|
2791
|
+
}] }, { type: i0.NgZone }]; }, propDecorators: { barClick: [{
|
|
2730
2792
|
type: Output
|
|
2731
2793
|
}], contentElementRef: [{
|
|
2732
2794
|
type: ViewChild,
|
|
@@ -2734,6 +2796,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImpor
|
|
|
2734
2796
|
}], ganttItemClass: [{
|
|
2735
2797
|
type: HostBinding,
|
|
2736
2798
|
args: ['class.gantt-bar']
|
|
2799
|
+
}], handles: [{
|
|
2800
|
+
type: ViewChildren,
|
|
2801
|
+
args: ['handle']
|
|
2737
2802
|
}] } });
|
|
2738
2803
|
|
|
2739
2804
|
class GanttMainComponent {
|
|
@@ -2743,19 +2808,15 @@ class GanttMainComponent {
|
|
|
2743
2808
|
this.lineClick = new EventEmitter();
|
|
2744
2809
|
this.ganttMainClass = true;
|
|
2745
2810
|
}
|
|
2746
|
-
ngOnInit() { }
|
|
2747
2811
|
trackBy(index, item) {
|
|
2748
2812
|
return item.id || index;
|
|
2749
2813
|
}
|
|
2750
2814
|
}
|
|
2751
|
-
GanttMainComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2752
|
-
GanttMainComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
2753
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2815
|
+
GanttMainComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttMainComponent, deps: [{ token: GANTT_UPPER_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
|
|
2816
|
+
GanttMainComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: GanttMainComponent, selector: "gantt-main", inputs: { groups: "groups", items: "items", groupHeaderTemplate: "groupHeaderTemplate", itemTemplate: "itemTemplate", barTemplate: "barTemplate", rangeTemplate: "rangeTemplate" }, outputs: { barClick: "barClick", lineClick: "lineClick" }, host: { properties: { "class.gantt-main-container": "this.ganttMainClass" } }, ngImport: i0, template: "<gantt-links-overlay [groups]=\"groups\" [items]=\"items\" (lineClick)=\"lineClick.emit($event)\"></gantt-links-overlay>\n<!-- groups -->\n<div class=\"gantt-main-groups\" *ngIf=\"groups && groups.length > 0; else itemsTemplate\" [style.width.px]=\"ganttUpper.view.width\">\n <ng-container *ngFor=\"let group of groups; trackBy: trackBy\">\n <div class=\"gantt-group\" [ngClass]=\"group.class\">\n <ng-template [ngTemplateOutlet]=\"groupHeaderTemplate\" [ngTemplateOutletContext]=\"{ group: group }\"></ng-template>\n </div>\n <div *ngIf=\"group.expanded\" class=\"gantt-items\">\n <ng-template [ngTemplateOutlet]=\"ganttItems\" [ngTemplateOutletContext]=\"{ items: group.items }\"></ng-template>\n </div>\n </ng-container>\n</div>\n<!-- items -->\n<ng-template #itemsTemplate>\n <div class=\"gantt-main-items\" [style.width.px]=\"ganttUpper.view.width\">\n <ng-template [ngTemplateOutlet]=\"ganttItems\" [ngTemplateOutletContext]=\"{ items: items }\"></ng-template>\n </div>\n</ng-template>\n\n<ng-template #ganttItems let-items=\"items\">\n <ng-container *ngFor=\"let item of items;\">\n <div\n class=\"gantt-item\"\n [style.height.px]=\"ganttUpper.styles.lineHeight\"\n [class.gantt-main-item-active]=\"ganttUpper.isSelected(item.id)\"\n >\n <ng-container *ngIf=\"item.type | isGanttCustomItem\">\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ item: item.origin, refs: item.refs }\"></ng-template>\n </ng-container>\n <gantt-range *ngIf=\"item.type | isGanttRangeItem\" [template]=\"rangeTemplate\" [item]=\"item\"></gantt-range>\n <gantt-bar *ngIf=\"item.type | isGanttBarItem\" [item]=\"item\" [template]=\"barTemplate\" (barClick)=\"barClick.emit($event)\"></gantt-bar>\n </div>\n <ng-template\n *ngIf=\"item.children && item.expanded\"\n [ngTemplateOutlet]=\"ganttItems\"\n [ngTemplateOutletContext]=\"{ items: item.children }\"\n ></ng-template>\n </ng-container>\n</ng-template>\n", components: [{ type: GanttLinksComponent, selector: "gantt-links-overlay", inputs: ["groups", "items"], outputs: ["lineClick"] }, { type: NgxGanttRangeComponent, selector: "ngx-gantt-range,gantt-range" }, { type: NgxGanttBarComponent, selector: "ngx-gantt-bar,gantt-bar", outputs: ["barClick"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "isGanttCustomItem": IsGanttCustomItemPipe, "isGanttRangeItem": IsGanttRangeItemPipe, "isGanttBarItem": IsGanttBarItemPipe } });
|
|
2817
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: GanttMainComponent, decorators: [{
|
|
2754
2818
|
type: Component,
|
|
2755
|
-
args: [{
|
|
2756
|
-
selector: 'gantt-main',
|
|
2757
|
-
templateUrl: './gantt-main.component.html'
|
|
2758
|
-
}]
|
|
2819
|
+
args: [{ selector: 'gantt-main', template: "<gantt-links-overlay [groups]=\"groups\" [items]=\"items\" (lineClick)=\"lineClick.emit($event)\"></gantt-links-overlay>\n<!-- groups -->\n<div class=\"gantt-main-groups\" *ngIf=\"groups && groups.length > 0; else itemsTemplate\" [style.width.px]=\"ganttUpper.view.width\">\n <ng-container *ngFor=\"let group of groups; trackBy: trackBy\">\n <div class=\"gantt-group\" [ngClass]=\"group.class\">\n <ng-template [ngTemplateOutlet]=\"groupHeaderTemplate\" [ngTemplateOutletContext]=\"{ group: group }\"></ng-template>\n </div>\n <div *ngIf=\"group.expanded\" class=\"gantt-items\">\n <ng-template [ngTemplateOutlet]=\"ganttItems\" [ngTemplateOutletContext]=\"{ items: group.items }\"></ng-template>\n </div>\n </ng-container>\n</div>\n<!-- items -->\n<ng-template #itemsTemplate>\n <div class=\"gantt-main-items\" [style.width.px]=\"ganttUpper.view.width\">\n <ng-template [ngTemplateOutlet]=\"ganttItems\" [ngTemplateOutletContext]=\"{ items: items }\"></ng-template>\n </div>\n</ng-template>\n\n<ng-template #ganttItems let-items=\"items\">\n <ng-container *ngFor=\"let item of items;\">\n <div\n class=\"gantt-item\"\n [style.height.px]=\"ganttUpper.styles.lineHeight\"\n [class.gantt-main-item-active]=\"ganttUpper.isSelected(item.id)\"\n >\n <ng-container *ngIf=\"item.type | isGanttCustomItem\">\n <ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ item: item.origin, refs: item.refs }\"></ng-template>\n </ng-container>\n <gantt-range *ngIf=\"item.type | isGanttRangeItem\" [template]=\"rangeTemplate\" [item]=\"item\"></gantt-range>\n <gantt-bar *ngIf=\"item.type | isGanttBarItem\" [item]=\"item\" [template]=\"barTemplate\" (barClick)=\"barClick.emit($event)\"></gantt-bar>\n </div>\n <ng-template\n *ngIf=\"item.children && item.expanded\"\n [ngTemplateOutlet]=\"ganttItems\"\n [ngTemplateOutletContext]=\"{ items: item.children }\"\n ></ng-template>\n </ng-container>\n</ng-template>\n" }]
|
|
2759
2820
|
}], ctorParameters: function () { return [{ type: GanttUpper, decorators: [{
|
|
2760
2821
|
type: Inject,
|
|
2761
2822
|
args: [GANTT_UPPER_TOKEN]
|
|
@@ -2792,13 +2853,20 @@ class NgxGanttComponent extends GanttUpper {
|
|
|
2792
2853
|
this.sideTableWidth = sideWidth;
|
|
2793
2854
|
}
|
|
2794
2855
|
ngOnInit() {
|
|
2795
|
-
super.
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2856
|
+
super.ngOnInit();
|
|
2857
|
+
// Note: the zone may be nooped through `BootstrapOptions` when bootstrapping the root module. This means
|
|
2858
|
+
// the `onStable` will never emit any value.
|
|
2859
|
+
const onStable$ = this.ngZone.isStable ? from(Promise.resolve()) : this.ngZone.onStable.pipe(take(1));
|
|
2860
|
+
// Normally this isn't in the zone, but it can cause performance regressions for apps
|
|
2861
|
+
// using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.
|
|
2862
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2863
|
+
onStable$.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {
|
|
2864
|
+
this.dragContainer.linkDragStarted.pipe(takeUntil(this.ngUnsubscribe$)).subscribe((event) => {
|
|
2865
|
+
this.linkDragStarted.emit(event);
|
|
2866
|
+
});
|
|
2867
|
+
this.dragContainer.linkDragEnded.pipe(takeUntil(this.ngUnsubscribe$)).subscribe((event) => {
|
|
2868
|
+
this.linkDragEnded.emit(event);
|
|
2869
|
+
});
|
|
2802
2870
|
});
|
|
2803
2871
|
});
|
|
2804
2872
|
}
|
|
@@ -2812,9 +2880,6 @@ class NgxGanttComponent extends GanttUpper {
|
|
|
2812
2880
|
this.cdr.detectChanges();
|
|
2813
2881
|
});
|
|
2814
2882
|
}
|
|
2815
|
-
ngOnChanges(changes) {
|
|
2816
|
-
super.onChanges(changes);
|
|
2817
|
-
}
|
|
2818
2883
|
expandChildren(item) {
|
|
2819
2884
|
if (!item.expanded) {
|
|
2820
2885
|
item.setExpand(true);
|
|
@@ -2842,7 +2907,6 @@ class NgxGanttComponent extends GanttUpper {
|
|
|
2842
2907
|
}
|
|
2843
2908
|
}
|
|
2844
2909
|
selectItem(selectEvent) {
|
|
2845
|
-
var _a;
|
|
2846
2910
|
if (!this.selectable) {
|
|
2847
2911
|
return;
|
|
2848
2912
|
}
|
|
@@ -2854,16 +2918,13 @@ class NgxGanttComponent extends GanttUpper {
|
|
|
2854
2918
|
this.selectedChange.emit({ event, selectedValue: _selectedValue });
|
|
2855
2919
|
}
|
|
2856
2920
|
else {
|
|
2857
|
-
const _selectedValue =
|
|
2921
|
+
const _selectedValue = this.getGanttItem(selectedIds[0])?.origin;
|
|
2858
2922
|
this.selectedChange.emit({ event, selectedValue: _selectedValue });
|
|
2859
2923
|
}
|
|
2860
2924
|
}
|
|
2861
|
-
ngOnDestroy() {
|
|
2862
|
-
super.onDestroy();
|
|
2863
|
-
}
|
|
2864
2925
|
}
|
|
2865
|
-
NgxGanttComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2866
|
-
NgxGanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
2926
|
+
NgxGanttComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: GANTT_GLOBAL_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
2927
|
+
NgxGanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: NgxGanttComponent, selector: "ngx-gantt", inputs: { maxLevel: "maxLevel", async: "async", childrenResolve: "childrenResolve", linkable: "linkable" }, outputs: { linkDragStarted: "linkDragStarted", linkDragEnded: "linkDragEnded", lineClick: "lineClick", selectedChange: "selectedChange" }, providers: [
|
|
2867
2928
|
{
|
|
2868
2929
|
provide: GANTT_UPPER_TOKEN,
|
|
2869
2930
|
useExisting: NgxGanttComponent
|
|
@@ -2872,14 +2933,10 @@ NgxGanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2872
2933
|
provide: GANTT_ABSTRACT_TOKEN,
|
|
2873
2934
|
useExisting: forwardRef(() => NgxGanttComponent)
|
|
2874
2935
|
}
|
|
2875
|
-
], 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 }], usesInheritance: true,
|
|
2876
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2936
|
+
], 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 }], usesInheritance: true, ngImport: i0, template: "<ngx-gantt-root>\n <ng-template #sideTemplate>\n <gantt-table\n [groups]=\"groups\"\n [items]=\"items\"\n [columns]=\"columns\"\n [groupTemplate]=\"groupTemplate\"\n [emptyTemplate]=\"tableEmptyTemplate\"\n [rowBeforeTemplate]=\"table?.rowBeforeTemplate\"\n [rowAfterTemplate]=\"table?.rowAfterTemplate\"\n (itemClick)=\"selectItem($event)\"\n ></gantt-table>\n </ng-template>\n <ng-template #mainTemplate>\n <gantt-main\n [groups]=\"groups\"\n [items]=\"items\"\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 </ng-template>\n</ngx-gantt-root>\n", components: [{ type: NgxGanttRootComponent, selector: "ngx-gantt-root", inputs: ["sideWidth"] }, { type: GanttTableComponent, selector: "gantt-table", inputs: ["groups", "items", "columns", "groupTemplate", "emptyTemplate", "rowBeforeTemplate", "rowAfterTemplate"], outputs: ["itemClick"] }, { type: GanttMainComponent, selector: "gantt-main", inputs: ["groups", "items", "groupHeaderTemplate", "itemTemplate", "barTemplate", "rangeTemplate"], outputs: ["barClick", "lineClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2937
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttComponent, decorators: [{
|
|
2877
2938
|
type: Component,
|
|
2878
|
-
args: [{
|
|
2879
|
-
selector: 'ngx-gantt',
|
|
2880
|
-
templateUrl: './gantt.component.html',
|
|
2881
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2882
|
-
providers: [
|
|
2939
|
+
args: [{ selector: 'ngx-gantt', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2883
2940
|
{
|
|
2884
2941
|
provide: GANTT_UPPER_TOKEN,
|
|
2885
2942
|
useExisting: NgxGanttComponent
|
|
@@ -2888,8 +2945,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImpor
|
|
|
2888
2945
|
provide: GANTT_ABSTRACT_TOKEN,
|
|
2889
2946
|
useExisting: forwardRef(() => NgxGanttComponent)
|
|
2890
2947
|
}
|
|
2891
|
-
]
|
|
2892
|
-
}]
|
|
2948
|
+
], template: "<ngx-gantt-root>\n <ng-template #sideTemplate>\n <gantt-table\n [groups]=\"groups\"\n [items]=\"items\"\n [columns]=\"columns\"\n [groupTemplate]=\"groupTemplate\"\n [emptyTemplate]=\"tableEmptyTemplate\"\n [rowBeforeTemplate]=\"table?.rowBeforeTemplate\"\n [rowAfterTemplate]=\"table?.rowAfterTemplate\"\n (itemClick)=\"selectItem($event)\"\n ></gantt-table>\n </ng-template>\n <ng-template #mainTemplate>\n <gantt-main\n [groups]=\"groups\"\n [items]=\"items\"\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 </ng-template>\n</ngx-gantt-root>\n" }]
|
|
2893
2949
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
2894
2950
|
type: Inject,
|
|
2895
2951
|
args: [GANTT_GLOBAL_CONFIG]
|
|
@@ -2922,8 +2978,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImpor
|
|
|
2922
2978
|
|
|
2923
2979
|
class NgxGanttModule {
|
|
2924
2980
|
}
|
|
2925
|
-
NgxGanttModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2926
|
-
NgxGanttModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
2981
|
+
NgxGanttModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2982
|
+
NgxGanttModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttModule, declarations: [NgxGanttComponent,
|
|
2927
2983
|
NgxGanttTableComponent,
|
|
2928
2984
|
NgxGanttTableColumnComponent,
|
|
2929
2985
|
GanttTableComponent,
|
|
@@ -2943,13 +2999,13 @@ NgxGanttModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2943
2999
|
NgxGanttRootComponent,
|
|
2944
3000
|
NgxGanttBarComponent,
|
|
2945
3001
|
NgxGanttRangeComponent] });
|
|
2946
|
-
NgxGanttModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
3002
|
+
NgxGanttModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttModule, providers: [
|
|
2947
3003
|
{
|
|
2948
3004
|
provide: GANTT_GLOBAL_CONFIG,
|
|
2949
3005
|
useValue: defaultConfig
|
|
2950
3006
|
}
|
|
2951
3007
|
], imports: [[CommonModule, DragDropModule]] });
|
|
2952
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxGanttModule, decorators: [{
|
|
2953
3009
|
type: NgModule,
|
|
2954
3010
|
args: [{
|
|
2955
3011
|
imports: [CommonModule, DragDropModule],
|
|
@@ -2996,4 +3052,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImpor
|
|
|
2996
3052
|
*/
|
|
2997
3053
|
|
|
2998
3054
|
export { GANTT_GLOBAL_CONFIG, GANTT_UPPER_TOKEN, GanttBarClickEvent, GanttDate, GanttDatePoint, GanttDragEvent, GanttGroupInternal, GanttItemInternal, GanttItemType, GanttItemUpper, GanttLineClickEvent, GanttLinkDragEvent, GanttLinkLineType, GanttLinkType, GanttLoadOnScrollEvent, GanttPrintService, GanttSelectedEvent, GanttTableEvent, GanttUpper, GanttView, GanttViewType, IsGanttBarItemPipe, IsGanttCustomItemPipe, IsGanttRangeItemPipe, LinkColors, NgxGanttBarComponent, NgxGanttComponent, NgxGanttModule, NgxGanttRangeComponent, NgxGanttRootComponent, NgxGanttTableColumnComponent, NgxGanttTableComponent, defaultConfig, primaryDatePointTop, secondaryDatePointTop };
|
|
2999
|
-
//# sourceMappingURL=worktile-gantt.
|
|
3055
|
+
//# sourceMappingURL=worktile-gantt.mjs.map
|