ngx-core-components 0.1.2 → 0.1.4

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.
@@ -1,4 +1,4 @@
1
- import { GanttTask, GanttDependency, GanttConfig, ZoomLevel, GanttTaskChangeEvent, GanttTaskClickEvent, GanttDependencyClickEvent, GanttScrollEvent } from './models';
1
+ import { GanttTask, GanttSubtask, GanttDependency, GanttConfig, GanttColumnDef, ZoomLevel, GanttTaskChangeEvent, GanttTaskClickEvent, GanttDependencyClickEvent, GanttScrollEvent } from './models';
2
2
  import { FlatRow } from './services/gantt-layout.service';
3
3
  import { GanttKeyboardService } from './services/gantt-keyboard.service';
4
4
  import * as i0 from "@angular/core";
@@ -23,7 +23,9 @@ export declare class GanttChartComponent {
23
23
  scrollLeft: import("@angular/core").WritableSignal<number>;
24
24
  private scrollTop_;
25
25
  private sidebarWidthOverride;
26
+ private lastEmittedZoom;
26
27
  tooltipTask: import("@angular/core").WritableSignal<GanttTask | null>;
28
+ tooltipSubtask: import("@angular/core").WritableSignal<GanttSubtask | null>;
27
29
  tooltipX: import("@angular/core").WritableSignal<number>;
28
30
  tooltipY: import("@angular/core").WritableSignal<number>;
29
31
  rowTooltipData: import("@angular/core").WritableSignal<{
@@ -32,6 +34,7 @@ export declare class GanttChartComponent {
32
34
  rowTooltipX: import("@angular/core").WritableSignal<number>;
33
35
  rowTooltipY: import("@angular/core").WritableSignal<number>;
34
36
  mergedConfig: import("@angular/core").Signal<GanttConfig>;
37
+ sidebarColumns: import("@angular/core").Signal<GanttColumnDef[]>;
35
38
  private effectiveTasks;
36
39
  private flatRows;
37
40
  visibleRows: import("@angular/core").Signal<FlatRow[]>;
@@ -68,6 +71,7 @@ export declare class GanttChartComponent {
68
71
  path: string;
69
72
  key: string;
70
73
  }[]>;
74
+ constructor();
71
75
  onTimelineScroll(): void;
72
76
  onSplitBarDown(event: PointerEvent): void;
73
77
  onBarPointerDown(event: PointerEvent, task: GanttTask, mode: 'move' | 'resize-left' | 'resize-right'): void;
@@ -83,7 +87,12 @@ export declare class GanttChartComponent {
83
87
  collapseAll(): void;
84
88
  formatDateShort(date: Date): string;
85
89
  formatDateFull(date: Date): string;
90
+ isNameColumn(column: GanttColumnDef, index: number): boolean;
91
+ isDateColumn(column: GanttColumnDef): boolean;
92
+ isProgressColumn(column: GanttColumnDef): boolean;
93
+ getSidebarCellValue(row: FlatRow, column: GanttColumnDef): string;
86
94
  showTooltip(task: GanttTask, event: MouseEvent): void;
95
+ showSubtaskTooltip(task: GanttTask, subtask: GanttSubtask, event: MouseEvent): void;
87
96
  hideTooltip(): void;
88
97
  getRowStart(row: FlatRow): Date;
89
98
  getRowEnd(row: FlatRow): Date;
@@ -93,6 +102,16 @@ export declare class GanttChartComponent {
93
102
  key: string;
94
103
  value: string;
95
104
  }[];
105
+ /** Compute pixel positions for subtask segments within a task bar. */
106
+ getSubtaskBars(bar: {
107
+ task: GanttTask;
108
+ left: number;
109
+ width: number;
110
+ }): {
111
+ subtask: GanttSubtask;
112
+ left: number;
113
+ width: number;
114
+ }[];
96
115
  showRowTooltip(row: FlatRow, event: MouseEvent): void;
97
116
  updateRowTooltip(event: MouseEvent): void;
98
117
  hideRowTooltip(): void;
@@ -1,3 +1,13 @@
1
+ export interface GanttSubtask {
2
+ id: string;
3
+ name: string;
4
+ start: Date;
5
+ end: Date;
6
+ color: string;
7
+ description?: string;
8
+ progress?: number;
9
+ meta?: Record<string, unknown>;
10
+ }
1
11
  export interface GanttTask {
2
12
  id: string;
3
13
  name: string;
@@ -13,4 +23,6 @@ export interface GanttTask {
13
23
  cssClass?: string;
14
24
  /** Tasks sharing the same rowId (and the same parentId) are rendered in a single row. */
15
25
  rowId?: string;
26
+ /** Subtasks rendered as colored segments inside this task's bar. */
27
+ subtasks?: GanttSubtask[];
16
28
  }