@timelinekit/core 1.0.0 → 1.0.5
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/LICENSE +1 -1
- package/README.md +200 -0
- package/dist/__tests__/calendar/sidebar/calendar-list.test.d.ts +1 -0
- package/dist/__tests__/calendar/sidebar/mini-calendar.test.d.ts +1 -0
- package/dist/__tests__/calendar/test-helpers.d.ts +169 -0
- package/dist/__tests__/calendar/tooltip/calendar-tooltip-renderer.test.d.ts +1 -0
- package/dist/__tests__/calendar/validation.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/agenda-view.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/day-view.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/drag-handlers.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/keyboard-navigation.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/month-view.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/swipe-navigation-handler.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/time-grid-helper.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/view-utils.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/week-view.test.d.ts +1 -0
- package/dist/__tests__/ganttchart/model/dependency-evaluator.test.d.ts +1 -0
- package/dist/__tests__/ganttchart/model/task-filters.test.d.ts +1 -0
- package/dist/__tests__/ganttchart/model/task-link.test.d.ts +1 -0
- package/dist/calendar/clipboard/calendar-clipboard.d.ts +19 -0
- package/dist/calendar/eventcalendar-context.d.ts +157 -0
- package/dist/calendar/eventcalendar-engine.d.ts +80 -0
- package/dist/calendar/eventcalendar-events.d.ts +40 -0
- package/dist/calendar/eventcalendar-settings.d.ts +30 -0
- package/dist/calendar/export/calendar-data-exporter.d.ts +32 -0
- package/dist/calendar/export/calendar-icalendar-exporter.d.ts +24 -0
- package/dist/calendar/export/calendar-image-exporter.d.ts +17 -0
- package/dist/calendar/export/calendar-pdf-exporter.d.ts +30 -0
- package/dist/calendar/import/calendar-icalendar-importer.d.ts +30 -0
- package/dist/calendar/model/calendar-data.d.ts +34 -0
- package/dist/calendar/model/calendar-entry.d.ts +44 -0
- package/dist/calendar/model/calendar-item.d.ts +151 -0
- package/dist/calendar/model/calendar.d.ts +29 -0
- package/dist/calendar/model/recurrence-editor.d.ts +25 -0
- package/dist/calendar/model/recurrence-exception.d.ts +34 -0
- package/dist/calendar/model/recurrence-expander.d.ts +17 -0
- package/dist/calendar/model/recurrence-rule.d.ts +42 -0
- package/dist/calendar/sidebar/calendar-list.d.ts +13 -0
- package/dist/calendar/sidebar/mini-calendar.d.ts +20 -0
- package/dist/calendar/themes/dark-theme.d.ts +4 -0
- package/dist/calendar/themes/eventcalendar-theme.d.ts +156 -0
- package/dist/calendar/themes/light-theme.d.ts +4 -0
- package/dist/calendar/tooltip/calendar-tooltip-renderer.d.ts +8 -0
- package/dist/calendar/views/agenda-view.d.ts +12 -0
- package/dist/calendar/views/base-view.d.ts +23 -0
- package/dist/calendar/views/day-view.d.ts +11 -0
- package/dist/calendar/views/handlers/allday-drag-handler.d.ts +14 -0
- package/dist/calendar/views/handlers/allday-entry-drag-handler.d.ts +18 -0
- package/dist/calendar/views/handlers/month-drag-handler.d.ts +14 -0
- package/dist/calendar/views/handlers/month-entry-drag-handler.d.ts +18 -0
- package/dist/calendar/views/handlers/swipe-navigation-handler.d.ts +14 -0
- package/dist/calendar/views/handlers/time-grid-drag-handler.d.ts +14 -0
- package/dist/calendar/views/handlers/time-grid-entry-drag-handler.d.ts +18 -0
- package/dist/calendar/views/month-view.d.ts +13 -0
- package/dist/calendar/views/time-grid-helper.d.ts +36 -0
- package/dist/calendar/views/view-utils.d.ts +38 -0
- package/dist/calendar/views/week-view.d.ts +16 -0
- package/dist/common/base-background-renderer.d.ts +9 -6
- package/dist/common/base-chart-handler.d.ts +19 -13
- package/dist/common/base-chart-handlers.d.ts +34 -0
- package/dist/common/base-chart-scroll-handler.d.ts +5 -3
- package/dist/common/base-chart.d.ts +98 -0
- package/dist/common/base-divider.d.ts +2 -0
- package/dist/common/base-engine.d.ts +112 -0
- package/dist/common/base-export-renderer.d.ts +26 -0
- package/dist/common/base-header-renderer.d.ts +8 -6
- package/dist/common/base-markers-renderer.d.ts +9 -6
- package/dist/common/base-theme.d.ts +107 -0
- package/dist/common/base-tooltip-renderer.d.ts +7 -0
- package/dist/common/chart-time-axis.d.ts +32 -0
- package/dist/common/common.d.ts +12 -2
- package/dist/common/custom-properties-container.d.ts +14 -0
- package/dist/common/drawing.d.ts +8 -2
- package/dist/common/export-utils.d.ts +34 -7
- package/dist/common/functions.d.ts +1 -1
- package/dist/common/locale.d.ts +101 -0
- package/dist/common/marker.d.ts +13 -0
- package/dist/common/subscription-manager.d.ts +17 -0
- package/dist/common/text.d.ts +9 -9
- package/dist/common/theme-utils.d.ts +5 -0
- package/dist/common/timeline-theme.d.ts +107 -0
- package/dist/common/undo-manager.d.ts +22 -0
- package/dist/common/working-calendar.d.ts +57 -0
- package/dist/ganttchart/chart/chart-scroll-handler.d.ts +1 -1
- package/dist/ganttchart/chart/chart-time-axis.d.ts +2 -32
- package/dist/ganttchart/chart/chart.d.ts +10 -4
- package/dist/ganttchart/chart/handlers/add-task-part.d.ts +14 -7
- package/dist/ganttchart/chart/handlers/connector-dots-handler.d.ts +10 -8
- package/dist/ganttchart/chart/handlers/gantt-drag-handler.d.ts +32 -0
- package/dist/ganttchart/chart/handlers/handler.d.ts +7 -4
- package/dist/ganttchart/chart/handlers/handlers.d.ts +5 -10
- package/dist/ganttchart/chart/handlers/move-milestone.d.ts +9 -7
- package/dist/ganttchart/chart/handlers/move-task-part.d.ts +9 -7
- package/dist/ganttchart/chart/handlers/resize-task-part.d.ts +18 -7
- package/dist/ganttchart/chart/handlers/select-link.d.ts +8 -6
- package/dist/ganttchart/chart/handlers/select-task.d.ts +13 -11
- package/dist/ganttchart/chart/handlers/set-task-progress.d.ts +14 -7
- package/dist/ganttchart/chart/renderers/chart-background-renderer.d.ts +3 -2
- package/dist/ganttchart/chart/renderers/chart-header-renderer.d.ts +2 -2
- package/dist/ganttchart/chart/renderers/chart-links-renderer.d.ts +4 -3
- package/dist/ganttchart/chart/renderers/chart-markers-renderer.d.ts +2 -2
- package/dist/ganttchart/chart/renderers/chart-tasks-renderer.d.ts +9 -9
- package/dist/ganttchart/chart/renderers/renderer-base.d.ts +2 -1
- package/dist/ganttchart/chart/tooltip/chart-tooltip-renderer.d.ts +4 -6
- package/dist/ganttchart/clipboard.d.ts +10 -3
- package/dist/ganttchart/divider/divider.d.ts +1 -1
- package/dist/ganttchart/export/data-exporter.d.ts +12 -7
- package/dist/ganttchart/export/export-common.d.ts +16 -16
- package/dist/ganttchart/export/image-exporter.d.ts +5 -4
- package/dist/ganttchart/export/pdf-exporter.d.ts +7 -6
- package/dist/ganttchart/ganttchart-engine.d.ts +134 -40
- package/dist/ganttchart/locale.d.ts +2 -66
- package/dist/ganttchart/model/dependency-evaluator.d.ts +16 -0
- package/dist/ganttchart/model/lag.d.ts +11 -0
- package/dist/ganttchart/model/length.d.ts +13 -2
- package/dist/ganttchart/model/marker.d.ts +1 -7
- package/dist/ganttchart/model/rate.d.ts +7 -1
- package/dist/ganttchart/model/resource-list.d.ts +11 -0
- package/dist/ganttchart/model/resource.d.ts +15 -1
- package/dist/ganttchart/model/task-filters.d.ts +10 -0
- package/dist/ganttchart/model/task-link.d.ts +15 -2
- package/dist/ganttchart/model/task-list-adapter.d.ts +22 -0
- package/dist/ganttchart/model/task-list.d.ts +55 -2
- package/dist/ganttchart/model/task-part.d.ts +20 -0
- package/dist/ganttchart/model/task-parts-manager.d.ts +44 -0
- package/dist/ganttchart/model/task-resource.d.ts +11 -0
- package/dist/ganttchart/model/task-serializer.d.ts +5 -0
- package/dist/ganttchart/model/task-warnings.d.ts +4 -0
- package/dist/ganttchart/model/task.d.ts +92 -19
- package/dist/ganttchart/model/work.d.ts +14 -1
- package/dist/ganttchart/model/working-calendar.d.ts +2 -32
- package/dist/ganttchart/sheet/renderers/sheet-icons-cell-renderer.d.ts +2 -0
- package/dist/ganttchart/sheet/sheet.d.ts +12 -7
- package/dist/ganttchart/themes/theme.d.ts +63 -108
- package/dist/ganttchart/undo-manager.d.ts +1 -13
- package/dist/index.d.ts +77 -8
- package/dist/index.js +6 -1
- package/dist/licensing/features.d.ts +3 -1
- package/dist/licensing/license-key.d.ts +1 -0
- package/dist/licensing/license-manager.d.ts +4 -1
- package/dist/licensing/watermark.d.ts +1 -0
- package/dist/locales/cs.d.ts +1 -1
- package/dist/locales/cs.js +1 -0
- package/dist/locales/de.d.ts +1 -1
- package/dist/locales/de.js +1 -0
- package/dist/locales/es.d.ts +1 -1
- package/dist/locales/es.js +1 -0
- package/dist/locales/fr.d.ts +1 -1
- package/dist/locales/fr.js +1 -0
- package/dist/locales/it.d.ts +1 -1
- package/dist/locales/it.js +1 -0
- package/dist/locales/ja.d.ts +1 -1
- package/dist/locales/ja.js +1 -0
- package/dist/locales/ko.d.ts +1 -1
- package/dist/locales/ko.js +1 -0
- package/dist/locales/nl.d.ts +1 -1
- package/dist/locales/nl.js +1 -0
- package/dist/locales/pl.d.ts +1 -1
- package/dist/locales/pl.js +1 -0
- package/dist/locales/pt.d.ts +1 -1
- package/dist/locales/pt.js +1 -0
- package/dist/locales/ru.d.ts +1 -1
- package/dist/locales/ru.js +1 -0
- package/dist/locales/sv.d.ts +1 -1
- package/dist/locales/sv.js +1 -0
- package/dist/locales/zh.d.ts +1 -1
- package/dist/locales/zh.js +1 -0
- package/dist/resourcescheduler/chart/handlers/add-event.d.ts +15 -8
- package/dist/resourcescheduler/chart/handlers/move-event.d.ts +10 -8
- package/dist/resourcescheduler/chart/handlers/resize-event.d.ts +21 -8
- package/dist/resourcescheduler/chart/handlers/scheduler-drag-handler.d.ts +32 -0
- package/dist/resourcescheduler/chart/handlers/scheduler-handler.d.ts +5 -3
- package/dist/resourcescheduler/chart/handlers/scheduler-handlers.d.ts +9 -10
- package/dist/resourcescheduler/chart/handlers/select-event.d.ts +10 -8
- package/dist/resourcescheduler/chart/renderers/scheduler-background-renderer.d.ts +2 -1
- package/dist/resourcescheduler/chart/renderers/scheduler-events-renderer.d.ts +2 -1
- package/dist/resourcescheduler/chart/renderers/scheduler-renderer-base.d.ts +1 -0
- package/dist/resourcescheduler/chart/scheduler-chart.d.ts +9 -4
- package/dist/resourcescheduler/chart/tooltip/scheduler-tooltip-renderer.d.ts +2 -4
- package/dist/resourcescheduler/clipboard.d.ts +8 -0
- package/dist/resourcescheduler/export/scheduler-data-exporter.d.ts +5 -0
- package/dist/resourcescheduler/export/scheduler-export-common.d.ts +12 -7
- package/dist/resourcescheduler/export/scheduler-image-exporter.d.ts +2 -1
- package/dist/resourcescheduler/export/scheduler-pdf-exporter.d.ts +3 -1
- package/dist/resourcescheduler/model/scheduler-data-adapter.d.ts +1 -0
- package/dist/resourcescheduler/model/scheduler-data.d.ts +45 -2
- package/dist/resourcescheduler/model/scheduler-event.d.ts +22 -2
- package/dist/resourcescheduler/model/scheduler-layout-calculator.d.ts +18 -0
- package/dist/resourcescheduler/model/scheduler-resource.d.ts +21 -2
- package/dist/resourcescheduler/resourcescheduler-engine.d.ts +134 -42
- package/dist/resourcescheduler/sheet/renderers/scheduler-icon-cell-renderer.d.ts +2 -0
- package/dist/resourcescheduler/sheet/scheduler-sheet.d.ts +11 -6
- package/dist/resourcescheduler/themes/scheduler-themes.d.ts +13 -0
- package/dist/styles/ec.css +1 -0
- package/dist/styles/gc.css +1 -1
- package/dist/styles/index.css +1 -0
- package/dist/styles/rs.css +1 -0
- package/dist/table/editors/input-editor.d.ts +1 -0
- package/dist/table/table-column.d.ts +7 -1
- package/dist/table/table-data-source.d.ts +2 -0
- package/dist/table/table-rows-selection.d.ts +1 -0
- package/dist/table/table.d.ts +11 -0
- package/dist/table/tree-table.d.ts +2 -0
- package/package.json +24 -13
- package/styles/_common.scss +12 -1
- package/styles/ec.scss +1225 -0
- package/styles/index.scss +3 -0
- package/dist/ganttchart/model/sheet-column.d.ts +0 -27
- package/dist/ganttchart/sheet/editors/cell-editor.d.ts +0 -23
- package/dist/ganttchart/sheet/editors/currency-editor.d.ts +0 -6
- package/dist/ganttchart/sheet/editors/date-editor.d.ts +0 -6
- package/dist/ganttchart/sheet/editors/decimal-editor.d.ts +0 -6
- package/dist/ganttchart/sheet/editors/dialog-editor.d.ts +0 -17
- package/dist/ganttchart/sheet/editors/input-editor.d.ts +0 -19
- package/dist/ganttchart/sheet/editors/integer-editor.d.ts +0 -6
- package/dist/ganttchart/sheet/editors/percent-editor.d.ts +0 -6
- package/dist/ganttchart/sheet/editors/text-editor.d.ts +0 -5
- package/dist/ganttchart/sheet/sheet-keyboard-navigation.d.ts +0 -26
- package/dist/ganttchart/sheet/sheet-rows-selection.d.ts +0 -24
- /package/dist/__tests__/{critical-path-calculator.test.d.ts → calendar/calendar-clipboard.test.d.ts} +0 -0
- /package/dist/__tests__/{model/lag.test.d.ts → calendar/eventcalendar-engine.test.d.ts} +0 -0
- /package/dist/__tests__/{model/length.test.d.ts → calendar/export/calendar-data-export.test.d.ts} +0 -0
- /package/dist/__tests__/{model/resource-list.test.d.ts → calendar/export/calendar-export.test.d.ts} +0 -0
- /package/dist/__tests__/{model/resource.test.d.ts → calendar/export/calendar-icalendar.test.d.ts} +0 -0
- /package/dist/__tests__/{model/task-list.test.d.ts → calendar/model/calendar-data.test.d.ts} +0 -0
- /package/dist/__tests__/{model/task-part.test.d.ts → calendar/model/calendar-item-recurrence.test.d.ts} +0 -0
- /package/dist/__tests__/{model/task-resource.test.d.ts → calendar/model/calendar-item-types.test.d.ts} +0 -0
- /package/dist/__tests__/{model/task-warnings.test.d.ts → calendar/model/calendar-occurrence.test.d.ts} +0 -0
- /package/dist/__tests__/{model/task.test.d.ts → calendar/model/calendar.test.d.ts} +0 -0
- /package/dist/__tests__/{model/work.test.d.ts → calendar/model/recurrence-editor.test.d.ts} +0 -0
- /package/dist/__tests__/{model/working-calendar.test.d.ts → calendar/model/recurrence-expander.test.d.ts} +0 -0
- /package/dist/__tests__/{undo-manager.test.d.ts → calendar/model/recurrence-rule.test.d.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BehaviorSubject, Subject } from "rxjs";
|
|
1
|
+
import { BehaviorSubject, Subject, Subscription } from "rxjs";
|
|
2
2
|
import { TaskList, TaskFilterFn } from "./model/task-list";
|
|
3
3
|
import { WorkingCalendar } from "./model/working-calendar";
|
|
4
4
|
import { ChartTimeline } from "./chart/chart-time-axis";
|
|
5
|
-
import {
|
|
5
|
+
import { GanttSheet } from "./sheet/sheet";
|
|
6
6
|
import { GanttChartTheme } from "./themes/theme";
|
|
7
7
|
import { Task, TaskEventArgs } from "./model/task";
|
|
8
8
|
import { ResourceList } from "./model/resource-list";
|
|
@@ -10,8 +10,8 @@ import { TaskLinkEventArgs } from "./model/task-link";
|
|
|
10
10
|
import { TaskContextMenuArgs } from "./chart/handlers/select-task";
|
|
11
11
|
import { Cursor, DateRange } from "../common/common";
|
|
12
12
|
import { CurrencySymbolDisplayMode } from "../common/functions";
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
13
|
+
import type { GanttCsvExportOptions, GanttExcelExportOptions } from "./export/data-exporter";
|
|
14
|
+
import type { GanttPdfExportOptions } from "./export/pdf-exporter";
|
|
15
15
|
import type { Marker } from "./model/marker";
|
|
16
16
|
import type { ColumnState } from "../table/table";
|
|
17
17
|
import { TableContext, TableRowContextMenuEventArgs, TableColumnHeaderEventArgs, TableColumnEventArgs, TableCellEditing, TableFocusedCell, TableRowEventArgs } from "../table/table-context";
|
|
@@ -19,154 +19,248 @@ import { DialogEditorArgs } from "../table/editors/dialog-editor";
|
|
|
19
19
|
import { InputEditorArgs } from "../table/editors/input-editor";
|
|
20
20
|
import { TimelineKitLocale } from "./locale";
|
|
21
21
|
import { TasksPastedEventArgs } from "./clipboard";
|
|
22
|
-
|
|
22
|
+
import { BaseTimelineEngine, BaseEngineContext } from "../common/base-engine";
|
|
23
|
+
/** Central engine for the Gantt chart component managing tasks, resources, rendering, and user interaction. */
|
|
24
|
+
export declare class GanttChartEngine extends BaseTimelineEngine {
|
|
23
25
|
#private;
|
|
26
|
+
protected get ctx(): BaseEngineContext;
|
|
27
|
+
protected get engineEvents(): GanttChartEvents;
|
|
28
|
+
protected getChartWidth(): number;
|
|
29
|
+
protected getChartElement(): HTMLElement;
|
|
30
|
+
protected getTheme(): GanttChartTheme;
|
|
31
|
+
protected subscribeThemeChange(cb: () => void): Subscription;
|
|
32
|
+
protected isCellEditing(): boolean;
|
|
33
|
+
protected saveColumnsImpl(): ColumnState[];
|
|
34
|
+
protected loadColumnsImpl(states: ColumnState[]): void;
|
|
35
|
+
protected hasData(): boolean;
|
|
36
|
+
protected destroyComponents(): void;
|
|
37
|
+
/** The task list containing all tasks and links. */
|
|
24
38
|
get list(): TaskList;
|
|
39
|
+
/** The resource list containing all available resources. */
|
|
25
40
|
get resources(): ResourceList;
|
|
26
|
-
|
|
27
|
-
set calendar$(value: WorkingCalendar);
|
|
41
|
+
/** Event emitters for subscribing to chart events. */
|
|
28
42
|
get events(): GanttChartEvents;
|
|
29
|
-
|
|
43
|
+
/** The sheet (table) component. */
|
|
44
|
+
get sheet(): GanttSheet;
|
|
45
|
+
/** Currently selected tasks in the sheet. */
|
|
30
46
|
get selectedTasks(): Task[];
|
|
31
|
-
|
|
32
|
-
set canEdit(value: boolean);
|
|
33
|
-
get showGridLines(): boolean;
|
|
34
|
-
set showGridLines(value: boolean);
|
|
47
|
+
/** Show or hide the critical path highlighting. */
|
|
35
48
|
get showCriticalPath(): boolean;
|
|
36
49
|
set showCriticalPath(value: boolean);
|
|
50
|
+
/** Show or hide baseline bars on the chart. */
|
|
37
51
|
get showBaseline(): boolean;
|
|
38
52
|
set showBaseline(value: boolean);
|
|
39
|
-
|
|
40
|
-
set showTodayLine(value: boolean);
|
|
41
|
-
get markers(): Marker[];
|
|
42
|
-
set markers(value: Marker[]);
|
|
43
|
-
addMarker(marker: Marker): void;
|
|
44
|
-
removeMarker(marker: Marker): void;
|
|
45
|
-
clearMarkers(): void;
|
|
53
|
+
/** Active task filter function. Set to null to show all tasks. */
|
|
46
54
|
get filter(): TaskFilterFn | null;
|
|
47
55
|
set filter(value: TaskFilterFn | null);
|
|
56
|
+
/** Clear the active task filter (show all tasks). */
|
|
48
57
|
clearFilter(): void;
|
|
58
|
+
/** Whether any task has baseline data set. */
|
|
49
59
|
get hasBaseline(): boolean;
|
|
60
|
+
/** Capture current task dates as baseline and enable baseline display. */
|
|
50
61
|
saveBaseline(): void;
|
|
62
|
+
/** Remove baseline data from all tasks and hide baseline display. */
|
|
51
63
|
clearBaseline(): void;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
get canRedo$(): BehaviorSubject<boolean>;
|
|
56
|
-
undo(): void;
|
|
57
|
-
redo(): void;
|
|
58
|
-
zoomIn(): boolean;
|
|
59
|
-
zoomOut(): boolean;
|
|
64
|
+
/** @param hostElement DOM element that will host the Gantt chart. */
|
|
65
|
+
constructor(hostElement: HTMLElement);
|
|
66
|
+
/** Indent the selected tasks one level deeper in the hierarchy. */
|
|
60
67
|
indent(): false | void;
|
|
68
|
+
/** Outdent the selected tasks one level up in the hierarchy. */
|
|
61
69
|
outdent(): false | void;
|
|
70
|
+
/** Move the selected tasks one position up in the list. */
|
|
62
71
|
moveUp(): false | void;
|
|
72
|
+
/** Move the selected tasks one position down in the list. */
|
|
63
73
|
moveDown(): false | void;
|
|
74
|
+
/** Copy selected tasks to clipboard. */
|
|
64
75
|
copy(): Promise<void>;
|
|
76
|
+
/** Cut selected tasks to clipboard (copy + remove). */
|
|
65
77
|
cut(): Promise<void>;
|
|
78
|
+
/** Paste tasks from clipboard. Returns the pasted tasks, or null if nothing to paste. */
|
|
66
79
|
paste(): Promise<TasksPastedEventArgs | null>;
|
|
67
|
-
|
|
68
|
-
scrollToDate(date: Date): void;
|
|
80
|
+
/** Scroll horizontally and vertically to make a task visible, expanding collapsed parents if needed. */
|
|
69
81
|
scrollToTask(task: Task): void;
|
|
82
|
+
/** Fit the view to show all tasks, or a specific subset. */
|
|
70
83
|
zoomToFit(tasks?: Task[]): void;
|
|
71
|
-
|
|
72
|
-
loadColumns(states: ColumnState[]): void;
|
|
73
|
-
get projectTimeline(): DateRange;
|
|
74
|
-
set projectTimeline(value: DateRange);
|
|
84
|
+
/** Settings object -- access theme, locale, and currency configuration. */
|
|
75
85
|
get settings(): GanttChartSettings;
|
|
86
|
+
/** Serialize the complete chart state to a JSON string. */
|
|
76
87
|
save(): string;
|
|
77
|
-
|
|
88
|
+
protected restoreState(text: string): void;
|
|
89
|
+
/** Export the chart as a PNG image. */
|
|
78
90
|
exportToImage(): Promise<Blob>;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
91
|
+
/** Export as a CSV string. */
|
|
92
|
+
exportToCsv(options?: GanttCsvExportOptions): string;
|
|
93
|
+
/** Export as a PDF file (requires jspdf). */
|
|
94
|
+
exportToPdf(options?: GanttPdfExportOptions): Promise<Blob>;
|
|
95
|
+
/** Export as an Excel file (requires exceljs). */
|
|
96
|
+
exportToExcel(options?: GanttExcelExportOptions): Promise<Blob>;
|
|
82
97
|
}
|
|
83
|
-
|
|
98
|
+
/** Internal shared state for the Gantt chart engine, sheet, and chart components. */
|
|
99
|
+
export declare class GanttChartContext implements BaseEngineContext {
|
|
84
100
|
#private;
|
|
101
|
+
/** Table context managing rows, selection, and cell editing. */
|
|
85
102
|
table: TableContext<Task>;
|
|
103
|
+
/** Chart settings (theme, locale, currency). */
|
|
86
104
|
settings: GanttChartSettings;
|
|
105
|
+
/** Current locale observable. */
|
|
87
106
|
locale$: BehaviorSubject<TimelineKitLocale>;
|
|
107
|
+
/** Working calendar observable. */
|
|
88
108
|
calendar$: BehaviorSubject<WorkingCalendar>;
|
|
109
|
+
/** Task list containing all tasks and links. */
|
|
89
110
|
list: TaskList;
|
|
111
|
+
/** Resource list containing all available resources. */
|
|
90
112
|
resources: ResourceList;
|
|
113
|
+
/** Timeline zoom and visible range manager. */
|
|
91
114
|
timeline: ChartTimeline;
|
|
115
|
+
/** Sheet vertical scroll offset observable. */
|
|
92
116
|
get sheetScrollTop$(): BehaviorSubject<number>;
|
|
117
|
+
/** Emitted when a new row is added to the sheet. */
|
|
93
118
|
get sheetRowAdded$(): Subject<TableRowEventArgs<Task>>;
|
|
119
|
+
/** Currently selected tasks observable. */
|
|
94
120
|
get sheetSelectedTasks$(): BehaviorSubject<Task[]>;
|
|
121
|
+
/** Currently focused cell observable. */
|
|
95
122
|
get sheetFocusedCell$(): BehaviorSubject<TableFocusedCell<Task> | null>;
|
|
123
|
+
/** Cell editing state observable. */
|
|
96
124
|
get sheetCellEditing$(): BehaviorSubject<TableCellEditing<Task> | null>;
|
|
125
|
+
/** Emitted when a cell requests a dialog editor. */
|
|
97
126
|
get sheetCellDialogEdit$(): Subject<DialogEditorArgs<Task>>;
|
|
127
|
+
/** Emitted when a cell requests an input editor. */
|
|
98
128
|
get sheetCellInputEdit$(): Subject<InputEditorArgs<Task>>;
|
|
129
|
+
/** Emitted when a cell value is rejected as invalid. */
|
|
99
130
|
get sheetCellInvalidValue$(): Subject<void>;
|
|
131
|
+
/** Emitted on right-click on a sheet row. */
|
|
100
132
|
get sheetRowContextMenu$(): Subject<TableRowContextMenuEventArgs<Task>>;
|
|
133
|
+
/** Emitted on right-click on a column header. */
|
|
101
134
|
get sheetColumnHeaderContextMenu$(): Subject<TableColumnHeaderEventArgs<Task>>;
|
|
135
|
+
/** Emitted when a column is resized. */
|
|
102
136
|
get sheetColumnResized$(): Subject<TableColumnEventArgs<Task>>;
|
|
137
|
+
/** Emitted when a column is reordered. */
|
|
103
138
|
get sheetColumnReordered$(): Subject<TableColumnEventArgs<Task>>;
|
|
139
|
+
/** Whether editing is enabled (observable). */
|
|
104
140
|
get canEdit$(): BehaviorSubject<boolean>;
|
|
141
|
+
/** Whether editing is currently enabled. */
|
|
105
142
|
get canEdit(): boolean;
|
|
143
|
+
/** Emitted when the mouse hovers over a sheet row. */
|
|
106
144
|
sheetRowMouseOver$: BehaviorSubject<TaskEventArgs | null>;
|
|
145
|
+
/** Whether the chart is currently auto-scrolling during a drag operation. */
|
|
107
146
|
autoScrolling: boolean;
|
|
108
|
-
|
|
147
|
+
/** Emitted on mouse wheel over the chart area. */
|
|
148
|
+
chartMouseWheel$: Subject<WheelEvent>;
|
|
149
|
+
/** Emitted after the chart content is redrawn. */
|
|
109
150
|
chartRedrawn$: Subject<void>;
|
|
151
|
+
/** Emitted after the chart background is redrawn. */
|
|
110
152
|
chartBackgroundRedrawn$: Subject<void>;
|
|
153
|
+
/** Emitted when the chart cursor style should change. */
|
|
111
154
|
chartCursor$: Subject<Cursor>;
|
|
155
|
+
/** Task currently hovered in the chart, or null. */
|
|
112
156
|
chartTaskHover$: BehaviorSubject<Task | null>;
|
|
157
|
+
/** Current theme observable. */
|
|
113
158
|
theme$: BehaviorSubject<GanttChartTheme>;
|
|
159
|
+
/** Whether grid lines are visible. */
|
|
114
160
|
showGridLines$: BehaviorSubject<boolean>;
|
|
161
|
+
/** Whether critical path highlighting is enabled. */
|
|
115
162
|
showCriticalPath$: BehaviorSubject<boolean>;
|
|
163
|
+
/** Whether baseline bars are visible. */
|
|
116
164
|
showBaseline$: BehaviorSubject<boolean>;
|
|
165
|
+
/** Whether the today indicator line is visible. */
|
|
117
166
|
showTodayLine$: BehaviorSubject<boolean>;
|
|
167
|
+
/** Timeline markers (vertical indicator lines). */
|
|
118
168
|
markers$: BehaviorSubject<Marker[]>;
|
|
169
|
+
/** Emitted when a task bar is double-clicked. */
|
|
119
170
|
taskDblClick$: Subject<TaskEventArgs>;
|
|
171
|
+
/** Emitted on right-click on a task bar. */
|
|
120
172
|
taskContextMenu$: Subject<TaskContextMenuArgs>;
|
|
173
|
+
/** Emitted on right-click on the chart area. */
|
|
121
174
|
chartContextMenu$: Subject<ChartContextMenuArgs>;
|
|
175
|
+
/** Project start/end date bounds observable. */
|
|
122
176
|
projectTimeline$: BehaviorSubject<DateRange>;
|
|
177
|
+
/** Emitted when the sheet/chart divider position changes. */
|
|
123
178
|
dividerPositionChanged$: Subject<void>;
|
|
179
|
+
/** Whether the divider is currently being resized. */
|
|
124
180
|
dividerResizing$: BehaviorSubject<boolean>;
|
|
125
181
|
constructor();
|
|
182
|
+
/** Calculate the bottom Y coordinate of visible content in the chart canvas. */
|
|
183
|
+
getContentBottom(canvasHeight: number): number;
|
|
184
|
+
/** Calculate the Y pixel coordinate of a task row in the chart canvas. */
|
|
126
185
|
getRowY(task: Task): number;
|
|
186
|
+
/** Current working calendar snapshot. */
|
|
127
187
|
get calendar(): WorkingCalendar;
|
|
128
188
|
}
|
|
189
|
+
/** Event emitters for subscribing to Gantt chart lifecycle and interaction events. */
|
|
129
190
|
export declare class GanttChartEvents {
|
|
191
|
+
#private;
|
|
192
|
+
/** Emitted when a task is added. */
|
|
130
193
|
taskAdded$: Subject<TaskEventArgs>;
|
|
194
|
+
/** Emitted when a task property changes. */
|
|
131
195
|
taskChanged$: Subject<TaskEventArgs>;
|
|
196
|
+
/** Emitted when a task is removed. */
|
|
132
197
|
taskRemoved$: Subject<TaskEventArgs>;
|
|
198
|
+
/** Emitted when a task bar is double-clicked. */
|
|
133
199
|
taskDblClick$: Subject<TaskEventArgs>;
|
|
200
|
+
/** Emitted on right-click on a task bar. */
|
|
134
201
|
taskContextMenu$: Subject<TaskContextMenuArgs>;
|
|
202
|
+
/** Emitted on right-click on the chart area. */
|
|
135
203
|
chartContextMenu$: Subject<ChartContextMenuArgs>;
|
|
204
|
+
/** Emitted on right-click on a sheet row. */
|
|
136
205
|
sheetRowContextMenu$: Subject<TableRowContextMenuEventArgs<Task>>;
|
|
206
|
+
/** Emitted on right-click on a column header. */
|
|
137
207
|
sheetColumnHeaderContextMenu$: Subject<TableColumnHeaderEventArgs<Task>>;
|
|
208
|
+
/** Emitted when a sheet column is resized. */
|
|
138
209
|
sheetColumnResized$: Subject<TableColumnEventArgs<Task>>;
|
|
210
|
+
/** Emitted when a sheet column is reordered. */
|
|
139
211
|
sheetColumnReordered$: Subject<TableColumnEventArgs<Task>>;
|
|
212
|
+
/** Emitted when a cell requests a dialog editor. */
|
|
140
213
|
sheetCellDialogEdit$: Subject<DialogEditorArgs<Task>>;
|
|
214
|
+
/** Emitted when a cell requests an input editor. */
|
|
141
215
|
sheetCellInputEdit$: Subject<InputEditorArgs<Task>>;
|
|
216
|
+
/** Emitted when cell editing starts or ends. */
|
|
142
217
|
sheetCellEditing$: Subject<TableCellEditing<Task> | null>;
|
|
218
|
+
/** Emitted when a cell value is rejected as invalid. */
|
|
143
219
|
sheetCellInvalidValue$: Subject<void>;
|
|
220
|
+
/** Emitted when the project timeline bounds change. */
|
|
144
221
|
projectTimeline$: Subject<DateRange>;
|
|
222
|
+
/** Emitted when a task link is added. */
|
|
145
223
|
linkAdded$: Subject<TaskLinkEventArgs>;
|
|
224
|
+
/** Emitted when a task link is removed. */
|
|
146
225
|
linkRemoved$: Subject<TaskLinkEventArgs>;
|
|
226
|
+
/** Emitted when tasks are pasted from clipboard. */
|
|
147
227
|
tasksPasted$: Subject<TasksPastedEventArgs>;
|
|
228
|
+
/** Emitted when an undo is performed. */
|
|
148
229
|
undone$: Subject<void>;
|
|
230
|
+
/** Emitted when a redo is performed. */
|
|
149
231
|
redone$: Subject<void>;
|
|
150
232
|
constructor(gc: GanttChartContext);
|
|
233
|
+
destroy(): void;
|
|
151
234
|
}
|
|
152
235
|
export { DateRange } from "../common/common";
|
|
236
|
+
/** Arguments passed when the chart area is right-clicked. */
|
|
153
237
|
export interface ChartContextMenuArgs {
|
|
238
|
+
/** Date at the click position. */
|
|
154
239
|
date: Date;
|
|
240
|
+
/** Whether the click was on the header or on the content area. */
|
|
155
241
|
area: 'header' | 'content';
|
|
242
|
+
/** Task at the click position, or null if clicking empty space. */
|
|
156
243
|
task: Task | null;
|
|
157
|
-
|
|
244
|
+
/** The native mouse event. */
|
|
245
|
+
mouseEvent: MouseEvent;
|
|
158
246
|
}
|
|
247
|
+
/** Gantt chart settings -- theme, locale, and currency configuration. */
|
|
159
248
|
export declare class GanttChartSettings {
|
|
160
249
|
#private;
|
|
161
250
|
private ctx;
|
|
251
|
+
/** Currency symbol used in cost columns. */
|
|
162
252
|
get currencySymbol(): string;
|
|
163
253
|
set currencySymbol(value: string);
|
|
254
|
+
/** How the currency symbol is positioned relative to the amount. */
|
|
164
255
|
get currencySymbolDisplayMode(): CurrencySymbolDisplayMode;
|
|
165
256
|
set currencySymbolDisplayMode(value: CurrencySymbolDisplayMode);
|
|
257
|
+
/** Current locale. */
|
|
166
258
|
get locale(): TimelineKitLocale;
|
|
167
259
|
set locale(value: TimelineKitLocale);
|
|
260
|
+
/** Current theme. */
|
|
168
261
|
get theme(): GanttChartTheme;
|
|
169
262
|
set theme(value: GanttChartTheme);
|
|
263
|
+
/** Emitted when any setting changes. */
|
|
170
264
|
changed$: Subject<void>;
|
|
171
265
|
constructor(ctx: GanttChartContext);
|
|
172
266
|
}
|
|
@@ -1,66 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface TimelineKitLocale {
|
|
4
|
-
/** BCP 47 language tag for Intl formatting (dates, numbers), e.g. 'en-US', 'cs-CZ', 'de-DE' */
|
|
5
|
-
language: string;
|
|
6
|
-
columns: {
|
|
7
|
-
name: string;
|
|
8
|
-
length: string;
|
|
9
|
-
start: string;
|
|
10
|
-
end: string;
|
|
11
|
-
progress: string;
|
|
12
|
-
resources: string;
|
|
13
|
-
work: string;
|
|
14
|
-
cost: string;
|
|
15
|
-
};
|
|
16
|
-
columnTooltips: {
|
|
17
|
-
work: string;
|
|
18
|
-
cost: string;
|
|
19
|
-
};
|
|
20
|
-
tooltips: {
|
|
21
|
-
addTask: string;
|
|
22
|
-
addTaskPart: string;
|
|
23
|
-
moveTask: string;
|
|
24
|
-
moveTaskPart: string;
|
|
25
|
-
resizeTask: string;
|
|
26
|
-
resizeTaskPart: string;
|
|
27
|
-
moveMilestone: string;
|
|
28
|
-
setProgress: string;
|
|
29
|
-
addLink: string;
|
|
30
|
-
};
|
|
31
|
-
labels: {
|
|
32
|
-
start: string;
|
|
33
|
-
end: string;
|
|
34
|
-
length: string;
|
|
35
|
-
progress: string;
|
|
36
|
-
from: string;
|
|
37
|
-
to: string;
|
|
38
|
-
type: string;
|
|
39
|
-
lag: string;
|
|
40
|
-
};
|
|
41
|
-
constraints: Record<ConstraintType, string>;
|
|
42
|
-
linkTypes: Record<TaskLinkType, string>;
|
|
43
|
-
warnings: {
|
|
44
|
-
behindSchedule: string;
|
|
45
|
-
behindScheduleByOneDay: string;
|
|
46
|
-
behindScheduleByDays: (days: number) => string;
|
|
47
|
-
constraintViolation: (constraintLabel: string, date: string) => string;
|
|
48
|
-
};
|
|
49
|
-
export: {
|
|
50
|
-
tasksSheetName: string;
|
|
51
|
-
linksSheetName: string;
|
|
52
|
-
resourcesSheetName: string;
|
|
53
|
-
eventsSheetName: string;
|
|
54
|
-
};
|
|
55
|
-
scheduler: {
|
|
56
|
-
resource: string;
|
|
57
|
-
name: string;
|
|
58
|
-
type: string;
|
|
59
|
-
addEvent: string;
|
|
60
|
-
moveEvent: string;
|
|
61
|
-
resizeEvent: string;
|
|
62
|
-
};
|
|
63
|
-
/** Optional custom date parser. Receives raw user input, returns Date or null. */
|
|
64
|
-
dateParser?: (value: string) => Date | null;
|
|
65
|
-
}
|
|
66
|
-
export declare const defaultLocale: TimelineKitLocale;
|
|
1
|
+
export { defaultLocale } from "../common/locale";
|
|
2
|
+
export type { TimelineKitLocale, ConstraintType, TaskLinkType } from "../common/locale";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BehaviorSubject, Subject } from "rxjs";
|
|
2
|
+
import { Task } from "./task";
|
|
3
|
+
import { TaskLink } from "./task-link";
|
|
4
|
+
import { WorkingCalendar } from "./working-calendar";
|
|
5
|
+
/** Evaluates link dependencies and constraint propagation between tasks. */
|
|
6
|
+
export declare class DependencyEvaluator {
|
|
7
|
+
#private;
|
|
8
|
+
/** Whether link dependencies are currently being evaluated (prevents re-entrant updates). */
|
|
9
|
+
get evaluatingDependencies(): boolean;
|
|
10
|
+
/** Emitted after dependency evaluation completes. */
|
|
11
|
+
evaluatingDependenciesFinished$: Subject<void>;
|
|
12
|
+
constructor(getLinks: () => TaskLink[], calendar: BehaviorSubject<WorkingCalendar>);
|
|
13
|
+
onTaskStartTimeChanged(task: Task): void;
|
|
14
|
+
onTaskEndTimeChanged(task: Task): void;
|
|
15
|
+
evaluateLinkDependency(link: TaskLink): void;
|
|
16
|
+
}
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { LengthUnit } from "./length";
|
|
2
2
|
import { WorkingCalendar } from "./working-calendar";
|
|
3
|
+
/** Time offset (positive or negative) applied to a dependency link. */
|
|
3
4
|
export declare class Lag {
|
|
4
5
|
#private;
|
|
6
|
+
/** Time unit of the lag. */
|
|
5
7
|
get unit(): LengthUnit;
|
|
8
|
+
/** Numeric amount (positive = lag, negative = lead). */
|
|
6
9
|
get value(): number;
|
|
7
10
|
constructor(unit: LengthUnit, value: number);
|
|
11
|
+
/** Convert to hours using the given calendar. */
|
|
8
12
|
toHours(calendar: WorkingCalendar): number;
|
|
13
|
+
/** Format as a display string (e.g. '+2d', '-1h'). */
|
|
9
14
|
toString(): string;
|
|
15
|
+
/** Check equality (same unit and value). */
|
|
10
16
|
equals(other: Lag): boolean;
|
|
17
|
+
/** Create a zero lag (0 days). */
|
|
11
18
|
static zero(): Lag;
|
|
19
|
+
/** Parse a lag string (e.g. '+2d', '-1h'). Returns null if invalid. */
|
|
12
20
|
static tryParse(value: string): Lag | null;
|
|
21
|
+
/** Parse a lag string, throwing on invalid input. */
|
|
13
22
|
static parse(value: string): Lag;
|
|
23
|
+
/** Serialize to a plain object. */
|
|
14
24
|
toAny(): any;
|
|
25
|
+
/** Create a Lag from a plain object. */
|
|
15
26
|
static fromAny(obj: any): Lag;
|
|
16
27
|
}
|
|
@@ -1,16 +1,27 @@
|
|
|
1
|
-
import { WorkingCalendar } from "
|
|
1
|
+
import { WorkingCalendar, LengthUnit } from "../../common/working-calendar";
|
|
2
|
+
/** Represents a task duration with a time unit. */
|
|
2
3
|
export declare class Length {
|
|
3
4
|
#private;
|
|
5
|
+
/** Time unit of the duration. */
|
|
4
6
|
get unit(): LengthUnit;
|
|
7
|
+
/** Numeric amount of the duration. */
|
|
5
8
|
get value(): number;
|
|
6
9
|
constructor(unit: LengthUnit, value: number);
|
|
10
|
+
/** Calculate the end time by adding this duration to a start time, respecting working hours. */
|
|
7
11
|
getEndTime(startTime: Date, calendar: WorkingCalendar): Date;
|
|
12
|
+
/** Calculate the duration between two dates in the specified unit, respecting working hours. */
|
|
8
13
|
static getLength(startTime: Date, endTime: Date, unit: LengthUnit, calendar: WorkingCalendar): Length;
|
|
14
|
+
/** Check equality (same unit and value). */
|
|
9
15
|
equals(length: Length): boolean;
|
|
16
|
+
/** Format as a display string (e.g. '5d', '2w', '1M'). */
|
|
10
17
|
toString(): string;
|
|
18
|
+
/** Parse a length string (e.g. '5d', '2w', '1M'). Returns null if invalid. */
|
|
11
19
|
static tryParse(value: string): Length | null;
|
|
20
|
+
/** Parse a length string, throwing on invalid input. */
|
|
12
21
|
static parse(value: string): Length;
|
|
22
|
+
/** Create a Length from a plain object. */
|
|
13
23
|
static fromAny(obj: any): Length;
|
|
24
|
+
/** Serialize to a plain object. */
|
|
14
25
|
toAny(): any;
|
|
15
26
|
}
|
|
16
|
-
export type LengthUnit
|
|
27
|
+
export type { LengthUnit } from "../../common/working-calendar";
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
/** Cost rate associated with a resource. */
|
|
1
2
|
export declare class Rate {
|
|
2
3
|
#private;
|
|
4
|
+
/** Monetary value of the rate. */
|
|
3
5
|
get value(): number;
|
|
6
|
+
/** Whether the rate is per-day or per-hour. */
|
|
4
7
|
get type(): RateType;
|
|
5
8
|
constructor(value: number, type: RateType);
|
|
9
|
+
/** Serialize to a plain object. */
|
|
6
10
|
toAny(): any;
|
|
11
|
+
/** Create a Rate from a plain object. */
|
|
7
12
|
static fromAny(obj: any): Rate;
|
|
8
13
|
}
|
|
9
|
-
|
|
14
|
+
/** Time basis for a resource cost rate. */
|
|
15
|
+
export type RateType = 'perDay' | 'perHour';
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { Subject } from "rxjs";
|
|
2
2
|
import { Resource, ResourceEventArgs } from "./resource";
|
|
3
|
+
/** Collection of project resources with change tracking. */
|
|
3
4
|
export declare class ResourceList {
|
|
4
5
|
#private;
|
|
6
|
+
/** Emitted when a resource property changes. */
|
|
5
7
|
resourceChanged$: Subject<ResourceEventArgs>;
|
|
8
|
+
/** Emitted after a resource is removed. */
|
|
6
9
|
resourceRemoved$: Subject<ResourceEventArgs>;
|
|
10
|
+
/** Emitted before a resource is removed (allows validation). */
|
|
7
11
|
resourceRemoving$: Subject<ResourceEventArgs>;
|
|
8
12
|
constructor();
|
|
13
|
+
/** Number of resources. */
|
|
9
14
|
get length(): number;
|
|
15
|
+
/** Get the index of a resource. */
|
|
10
16
|
indexOf(resource: Resource): number;
|
|
17
|
+
/** Get a resource by index. */
|
|
11
18
|
getResource(index: number): Resource;
|
|
19
|
+
/** Find a resource by ID, or null if not found. */
|
|
12
20
|
getResourceById(id: string): Resource | null;
|
|
21
|
+
/** Add a resource to the list. */
|
|
13
22
|
addResource(resource: Resource): Resource;
|
|
23
|
+
/** Replace all resources with a new set. */
|
|
14
24
|
assign(resources: Resource[]): void;
|
|
25
|
+
/** Remove a resource from the list. */
|
|
15
26
|
removeResource(resource: Resource): void;
|
|
16
27
|
}
|
|
@@ -1,29 +1,43 @@
|
|
|
1
1
|
import { Subject } from "rxjs";
|
|
2
2
|
import { ResourceList } from "./resource-list";
|
|
3
3
|
import { Rate } from "./rate";
|
|
4
|
+
/** A named resource (person, equipment, etc.) that can be assigned to tasks. */
|
|
4
5
|
export declare class Resource {
|
|
5
6
|
#private;
|
|
7
|
+
/** Unique identifier (read-only). */
|
|
6
8
|
get id(): string;
|
|
9
|
+
/** Display name. */
|
|
7
10
|
get name(): string;
|
|
8
11
|
set name(value: string);
|
|
12
|
+
/** Whether the resource is Unique or Generic. */
|
|
9
13
|
get type(): ResourceType;
|
|
10
14
|
set type(value: ResourceType);
|
|
15
|
+
/** Fixed cost charged each time this resource is used on a task. */
|
|
11
16
|
get fixedCostPerUse(): number;
|
|
12
17
|
set fixedCostPerUse(value: number);
|
|
18
|
+
/** Fixed cost per resource assignment. */
|
|
13
19
|
get fixedCostPerResource(): number;
|
|
14
20
|
set fixedCostPerResource(value: number);
|
|
21
|
+
/** URL to an avatar image. */
|
|
15
22
|
get avatarIconUrl(): string | null;
|
|
16
23
|
set avatarIconUrl(value: string | null);
|
|
24
|
+
/** The owning resource list (assigned once). */
|
|
17
25
|
get list(): ResourceList | null;
|
|
18
26
|
set list(value: ResourceList | null);
|
|
27
|
+
/** Hourly or daily cost rate. */
|
|
19
28
|
get rate(): Rate | null;
|
|
20
29
|
set rate(value: Rate | null);
|
|
30
|
+
/** Emitted when any property changes. */
|
|
21
31
|
changed$: Subject<ResourceEventArgs>;
|
|
22
32
|
constructor(id: string | null, name: string, type: ResourceType);
|
|
33
|
+
/** Serialize to a plain object. */
|
|
23
34
|
toAny(): any;
|
|
35
|
+
/** Deserialize from a plain object. */
|
|
24
36
|
static fromAny(obj: any): Resource;
|
|
25
37
|
}
|
|
26
|
-
|
|
38
|
+
/** Whether a resource is Unique or Generic. */
|
|
39
|
+
export type ResourceType = 'unique' | 'generic';
|
|
40
|
+
/** Event args emitted when a resource changes. */
|
|
27
41
|
export interface ResourceEventArgs {
|
|
28
42
|
resource: Resource;
|
|
29
43
|
}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { Task } from "./task";
|
|
2
2
|
import { Resource } from "./resource";
|
|
3
3
|
import { TaskFilterFn } from "./task-list";
|
|
4
|
+
/** Built-in filter functions for common task queries. */
|
|
4
5
|
export declare const TaskFilters: {
|
|
6
|
+
/** Tasks on the critical path. */
|
|
5
7
|
criticalPath: (task: Task) => boolean;
|
|
8
|
+
/** Tasks with progress below 100%. */
|
|
6
9
|
incomplete: (task: Task) => boolean;
|
|
10
|
+
/** Tasks with 100% progress. */
|
|
7
11
|
complete: (task: Task) => boolean;
|
|
12
|
+
/** Tasks past their end date with incomplete progress. */
|
|
8
13
|
behindSchedule: (task: Task) => boolean;
|
|
14
|
+
/** Milestone tasks only. */
|
|
9
15
|
milestones: (task: Task) => boolean;
|
|
16
|
+
/** Tasks assigned to a specific resource. */
|
|
10
17
|
byResource: (resource: Resource) => TaskFilterFn;
|
|
18
|
+
/** Tasks overlapping a date range. */
|
|
11
19
|
byDateRange: (start: Date, end: Date) => TaskFilterFn;
|
|
20
|
+
/** Tasks whose name contains the search string (case-insensitive). */
|
|
12
21
|
byName: (search: string) => TaskFilterFn;
|
|
22
|
+
/** Combines multiple filters with AND logic. */
|
|
13
23
|
combine: (...filters: TaskFilterFn[]) => TaskFilterFn;
|
|
14
24
|
};
|
|
@@ -1,22 +1,35 @@
|
|
|
1
|
+
import type { TaskLinkType } from "../../common/locale";
|
|
1
2
|
import { Lag } from "./lag";
|
|
2
3
|
import { Task } from "./task";
|
|
3
4
|
import { TaskList } from "./task-list";
|
|
5
|
+
/** A dependency link between two tasks. */
|
|
4
6
|
export declare class TaskLink {
|
|
5
7
|
#private;
|
|
8
|
+
/** Unique identifier (read-only). */
|
|
6
9
|
get id(): string;
|
|
10
|
+
/** Predecessor task. */
|
|
7
11
|
get from(): Task;
|
|
12
|
+
/** Successor task. */
|
|
8
13
|
get to(): Task;
|
|
14
|
+
/** Dependency type (e.g. FinishToStart). */
|
|
9
15
|
get type(): TaskLinkType;
|
|
16
|
+
/** Time offset applied to the dependency. */
|
|
10
17
|
get lag(): Lag;
|
|
18
|
+
/** The owning task list (assigned once). */
|
|
11
19
|
get list(): TaskList | null;
|
|
12
20
|
set list(value: TaskList | null);
|
|
13
21
|
constructor(id: string | null, from: Task, to: Task, type: TaskLinkType, lag?: Lag);
|
|
22
|
+
/** Serialize to a plain object. */
|
|
14
23
|
toAny(): any;
|
|
24
|
+
/** Create a TaskLink from a plain object, resolving task references from the given array. */
|
|
15
25
|
static fromAny(obj: any, tasks: Task[]): TaskLink;
|
|
16
26
|
}
|
|
17
|
-
export type TaskLinkType
|
|
18
|
-
|
|
27
|
+
export type { TaskLinkType } from "../../common/locale";
|
|
28
|
+
/** Which end of a task a link connects to. */
|
|
29
|
+
export type ConnectorSide = 'start' | 'finish';
|
|
30
|
+
/** Determine the link type from which sides of the tasks are connected. */
|
|
19
31
|
export declare function getLinkType(fromSide: ConnectorSide, toSide: ConnectorSide): TaskLinkType;
|
|
32
|
+
/** Event args emitted when a link is added or removed. */
|
|
20
33
|
export interface TaskLinkEventArgs {
|
|
21
34
|
link: TaskLink;
|
|
22
35
|
}
|