@worktile/gantt 19.0.0 → 19.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/class/item.d.ts CHANGED
@@ -28,6 +28,7 @@ export interface GanttItem<T = unknown> {
28
28
  children?: GanttItem[];
29
29
  color?: string;
30
30
  barStyle?: Partial<CSSStyleDeclaration>;
31
+ laneStyle?: Partial<CSSStyleDeclaration>;
31
32
  origin?: T;
32
33
  type?: GanttItemType;
33
34
  progress?: number;
@@ -41,6 +42,7 @@ export declare class GanttItemInternal {
41
42
  links: GanttLink[];
42
43
  color?: string;
43
44
  barStyle?: Partial<CSSStyleDeclaration>;
45
+ laneStyle?: Partial<CSSStyleDeclaration>;
44
46
  draggable?: boolean;
45
47
  itemDraggable?: boolean;
46
48
  linkable?: boolean;
@@ -1,15 +1,16 @@
1
- import { TemplateRef, QueryList, OnInit, EventEmitter, OnDestroy, ChangeDetectorRef, AfterViewInit } from '@angular/core';
2
- import { GanttItemInternal, GanttGroupInternal, GanttSelectedEvent, GanttTableDragEnterPredicateContext, GanttTableDragDroppedEvent, GanttTableDragStartedEvent, GanttTableDragEndedEvent } from '../../../class';
3
- import { NgxGanttTableColumnComponent } from '../../../table/gantt-column.component';
1
+ import { CdkDrag, CdkDragDrop, CdkDragEnd, CdkDragMove, CdkDragStart } from '@angular/cdk/drag-drop';
2
+ import { AfterViewInit, ChangeDetectorRef, EventEmitter, NgZone, OnDestroy, OnInit, QueryList, TemplateRef } from '@angular/core';
3
+ import { GanttGroupInternal, GanttItemInternal, GanttSelectedEvent, GanttTableDragDroppedEvent, GanttTableDragEndedEvent, GanttTableDragEnterPredicateContext, GanttTableDragStartedEvent } from '../../../class';
4
4
  import { GanttAbstractComponent } from '../../../gantt-abstract';
5
5
  import { GanttUpper } from '../../../gantt-upper';
6
- import { CdkDrag, CdkDragDrop, CdkDragEnd, CdkDragMove, CdkDragStart } from '@angular/cdk/drag-drop';
6
+ import { NgxGanttTableColumnComponent } from '../../../table/gantt-column.component';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class GanttTableBodyComponent implements OnInit, OnDestroy, AfterViewInit {
9
9
  gantt: GanttAbstractComponent;
10
10
  ganttUpper: GanttUpper;
11
11
  private cdr;
12
12
  private document;
13
+ private ngZone;
13
14
  private _viewportItems;
14
15
  set viewportItems(data: (GanttGroupInternal | GanttItemInternal)[]);
15
16
  get viewportItems(): (GanttGroupInternal | GanttItemInternal)[];
@@ -35,9 +36,14 @@ export declare class GanttTableBodyComponent implements OnInit, OnDestroy, After
35
36
  private itemDragMoved;
36
37
  private itemDropTarget;
37
38
  private destroy$;
38
- constructor(gantt: GanttAbstractComponent, ganttUpper: GanttUpper, cdr: ChangeDetectorRef, document: Document);
39
+ sideContainer: Element;
40
+ headerContainer: Element;
41
+ footerContainer: Element;
42
+ constructor(gantt: GanttAbstractComponent, ganttUpper: GanttUpper, cdr: ChangeDetectorRef, document: Document, ngZone: NgZone);
39
43
  ngOnInit(): void;
40
44
  ngAfterViewInit(): void;
45
+ initialize(): void;
46
+ private monitorScrollChange;
41
47
  expandGroup(group: GanttGroupInternal): void;
42
48
  expandChildren(event: MouseEvent, item: GanttItemInternal): void;
43
49
  onItemDragStarted(event: CdkDragStart<GanttItemInternal>): void;
@@ -10,8 +10,15 @@
10
10
  border-right: 1px solid variables.$gantt-border-color;
11
11
  box-sizing: border-box;
12
12
  position: relative;
13
+ flex-shrink: 0;
14
+
15
+ &:nth-last-child(2) {
16
+ border-right: none;
17
+ }
13
18
 
14
19
  &:last-child {
20
+ padding: 0;
21
+ border: 1px solid variables.$gantt-border-color;
15
22
  border-right: none;
16
23
  }
17
24
  }
@@ -60,7 +67,12 @@
60
67
  display: flex;
61
68
  padding: variables.$gantt-table-td-padding;
62
69
 
70
+ &:nth-last-child(2) {
71
+ border-right: none;
72
+ }
63
73
  &:last-child {
74
+ padding: 0;
75
+ border: 1px solid variables.$gantt-border-color;
64
76
  border-right: none;
65
77
  }
66
78
  }
@@ -174,6 +186,13 @@
174
186
 
175
187
  .gantt-table-header-container {
176
188
  display: flex;
189
+ overflow-x: auto;
190
+ overflow-y: hidden;
191
+ white-space: nowrap;
192
+
193
+ &::-webkit-scrollbar {
194
+ display: none;
195
+ }
177
196
  }
178
197
 
179
198
  @include gantt-table-item();
@@ -247,6 +266,7 @@
247
266
  bottom: 0;
248
267
  cursor: ew-resize;
249
268
  height: 5000px;
269
+ z-index: 2;
250
270
 
251
271
  &:hover {
252
272
  background: variables.$gantt-table-header-drag-line-color;
@@ -255,7 +275,7 @@
255
275
 
256
276
  .column-resize-handle {
257
277
  height: unset;
258
- z-index: 1;
278
+ z-index: 2;
259
279
  }
260
280
 
261
281
  .table-resize-auxiliary-line {
@@ -1,16 +1,17 @@
1
- import { QueryList, OnInit, ElementRef, OnDestroy, ChangeDetectorRef } from '@angular/core';
2
- import { NgxGanttTableColumnComponent } from '../../../table/gantt-column.component';
3
1
  import { CdkDragEnd, CdkDragMove, CdkDragStart } from '@angular/cdk/drag-drop';
2
+ import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList } from '@angular/core';
4
3
  import { GanttAbstractComponent } from '../../../gantt-abstract';
4
+ import { NgxGanttTableColumnComponent } from '../../../table/gantt-column.component';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare const defaultColumnWidth = 100;
7
7
  export declare const minColumnWidth = 80;
8
8
  export declare class GanttTableHeaderComponent implements OnInit, OnDestroy {
9
9
  private elementRef;
10
- private gantt;
10
+ gantt: GanttAbstractComponent;
11
11
  private cdr;
12
12
  dragStartLeft: number;
13
13
  tableWidth: number;
14
+ customWidth: number;
14
15
  private unsubscribe$;
15
16
  columns: QueryList<NgxGanttTableColumnComponent>;
16
17
  resizeLineElementRef: ElementRef<HTMLElement>;
@@ -27,6 +28,7 @@ export declare class GanttTableHeaderComponent implements OnInit, OnDestroy {
27
28
  onOverallResizeEnded(event: CdkDragEnd): void;
28
29
  private showAuxiliaryLine;
29
30
  private hideAuxiliaryLine;
31
+ private getCalcWidth;
30
32
  ngOnDestroy(): void;
31
33
  static ɵfac: i0.ɵɵFactoryDeclaration<GanttTableHeaderComponent, never>;
32
34
  static ɵcmp: i0.ɵɵComponentDeclaration<GanttTableHeaderComponent, "gantt-table-header", never, { "columns": { "alias": "columns"; "required": false; }; }, {}, never, never, true, never>;