@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.
Files changed (232) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +200 -0
  3. package/dist/__tests__/calendar/sidebar/calendar-list.test.d.ts +1 -0
  4. package/dist/__tests__/calendar/sidebar/mini-calendar.test.d.ts +1 -0
  5. package/dist/__tests__/calendar/test-helpers.d.ts +169 -0
  6. package/dist/__tests__/calendar/tooltip/calendar-tooltip-renderer.test.d.ts +1 -0
  7. package/dist/__tests__/calendar/validation.test.d.ts +1 -0
  8. package/dist/__tests__/calendar/views/agenda-view.test.d.ts +1 -0
  9. package/dist/__tests__/calendar/views/day-view.test.d.ts +1 -0
  10. package/dist/__tests__/calendar/views/drag-handlers.test.d.ts +1 -0
  11. package/dist/__tests__/calendar/views/keyboard-navigation.test.d.ts +1 -0
  12. package/dist/__tests__/calendar/views/month-view.test.d.ts +1 -0
  13. package/dist/__tests__/calendar/views/swipe-navigation-handler.test.d.ts +1 -0
  14. package/dist/__tests__/calendar/views/time-grid-helper.test.d.ts +1 -0
  15. package/dist/__tests__/calendar/views/view-utils.test.d.ts +1 -0
  16. package/dist/__tests__/calendar/views/week-view.test.d.ts +1 -0
  17. package/dist/__tests__/ganttchart/model/dependency-evaluator.test.d.ts +1 -0
  18. package/dist/__tests__/ganttchart/model/task-filters.test.d.ts +1 -0
  19. package/dist/__tests__/ganttchart/model/task-link.test.d.ts +1 -0
  20. package/dist/calendar/clipboard/calendar-clipboard.d.ts +19 -0
  21. package/dist/calendar/eventcalendar-context.d.ts +157 -0
  22. package/dist/calendar/eventcalendar-engine.d.ts +80 -0
  23. package/dist/calendar/eventcalendar-events.d.ts +40 -0
  24. package/dist/calendar/eventcalendar-settings.d.ts +30 -0
  25. package/dist/calendar/export/calendar-data-exporter.d.ts +32 -0
  26. package/dist/calendar/export/calendar-icalendar-exporter.d.ts +24 -0
  27. package/dist/calendar/export/calendar-image-exporter.d.ts +17 -0
  28. package/dist/calendar/export/calendar-pdf-exporter.d.ts +30 -0
  29. package/dist/calendar/import/calendar-icalendar-importer.d.ts +30 -0
  30. package/dist/calendar/model/calendar-data.d.ts +34 -0
  31. package/dist/calendar/model/calendar-entry.d.ts +44 -0
  32. package/dist/calendar/model/calendar-item.d.ts +151 -0
  33. package/dist/calendar/model/calendar.d.ts +29 -0
  34. package/dist/calendar/model/recurrence-editor.d.ts +25 -0
  35. package/dist/calendar/model/recurrence-exception.d.ts +34 -0
  36. package/dist/calendar/model/recurrence-expander.d.ts +17 -0
  37. package/dist/calendar/model/recurrence-rule.d.ts +42 -0
  38. package/dist/calendar/sidebar/calendar-list.d.ts +13 -0
  39. package/dist/calendar/sidebar/mini-calendar.d.ts +20 -0
  40. package/dist/calendar/themes/dark-theme.d.ts +4 -0
  41. package/dist/calendar/themes/eventcalendar-theme.d.ts +156 -0
  42. package/dist/calendar/themes/light-theme.d.ts +4 -0
  43. package/dist/calendar/tooltip/calendar-tooltip-renderer.d.ts +8 -0
  44. package/dist/calendar/views/agenda-view.d.ts +12 -0
  45. package/dist/calendar/views/base-view.d.ts +23 -0
  46. package/dist/calendar/views/day-view.d.ts +11 -0
  47. package/dist/calendar/views/handlers/allday-drag-handler.d.ts +14 -0
  48. package/dist/calendar/views/handlers/allday-entry-drag-handler.d.ts +18 -0
  49. package/dist/calendar/views/handlers/month-drag-handler.d.ts +14 -0
  50. package/dist/calendar/views/handlers/month-entry-drag-handler.d.ts +18 -0
  51. package/dist/calendar/views/handlers/swipe-navigation-handler.d.ts +14 -0
  52. package/dist/calendar/views/handlers/time-grid-drag-handler.d.ts +14 -0
  53. package/dist/calendar/views/handlers/time-grid-entry-drag-handler.d.ts +18 -0
  54. package/dist/calendar/views/month-view.d.ts +13 -0
  55. package/dist/calendar/views/time-grid-helper.d.ts +36 -0
  56. package/dist/calendar/views/view-utils.d.ts +38 -0
  57. package/dist/calendar/views/week-view.d.ts +16 -0
  58. package/dist/common/base-background-renderer.d.ts +9 -6
  59. package/dist/common/base-chart-handler.d.ts +19 -13
  60. package/dist/common/base-chart-handlers.d.ts +34 -0
  61. package/dist/common/base-chart-scroll-handler.d.ts +5 -3
  62. package/dist/common/base-chart.d.ts +98 -0
  63. package/dist/common/base-divider.d.ts +2 -0
  64. package/dist/common/base-engine.d.ts +112 -0
  65. package/dist/common/base-export-renderer.d.ts +26 -0
  66. package/dist/common/base-header-renderer.d.ts +8 -6
  67. package/dist/common/base-markers-renderer.d.ts +9 -6
  68. package/dist/common/base-theme.d.ts +107 -0
  69. package/dist/common/base-tooltip-renderer.d.ts +7 -0
  70. package/dist/common/chart-time-axis.d.ts +32 -0
  71. package/dist/common/common.d.ts +12 -2
  72. package/dist/common/custom-properties-container.d.ts +14 -0
  73. package/dist/common/drawing.d.ts +8 -2
  74. package/dist/common/export-utils.d.ts +34 -7
  75. package/dist/common/functions.d.ts +1 -1
  76. package/dist/common/locale.d.ts +101 -0
  77. package/dist/common/marker.d.ts +13 -0
  78. package/dist/common/subscription-manager.d.ts +17 -0
  79. package/dist/common/text.d.ts +9 -9
  80. package/dist/common/theme-utils.d.ts +5 -0
  81. package/dist/common/timeline-theme.d.ts +107 -0
  82. package/dist/common/undo-manager.d.ts +22 -0
  83. package/dist/common/working-calendar.d.ts +57 -0
  84. package/dist/ganttchart/chart/chart-scroll-handler.d.ts +1 -1
  85. package/dist/ganttchart/chart/chart-time-axis.d.ts +2 -32
  86. package/dist/ganttchart/chart/chart.d.ts +10 -4
  87. package/dist/ganttchart/chart/handlers/add-task-part.d.ts +14 -7
  88. package/dist/ganttchart/chart/handlers/connector-dots-handler.d.ts +10 -8
  89. package/dist/ganttchart/chart/handlers/gantt-drag-handler.d.ts +32 -0
  90. package/dist/ganttchart/chart/handlers/handler.d.ts +7 -4
  91. package/dist/ganttchart/chart/handlers/handlers.d.ts +5 -10
  92. package/dist/ganttchart/chart/handlers/move-milestone.d.ts +9 -7
  93. package/dist/ganttchart/chart/handlers/move-task-part.d.ts +9 -7
  94. package/dist/ganttchart/chart/handlers/resize-task-part.d.ts +18 -7
  95. package/dist/ganttchart/chart/handlers/select-link.d.ts +8 -6
  96. package/dist/ganttchart/chart/handlers/select-task.d.ts +13 -11
  97. package/dist/ganttchart/chart/handlers/set-task-progress.d.ts +14 -7
  98. package/dist/ganttchart/chart/renderers/chart-background-renderer.d.ts +3 -2
  99. package/dist/ganttchart/chart/renderers/chart-header-renderer.d.ts +2 -2
  100. package/dist/ganttchart/chart/renderers/chart-links-renderer.d.ts +4 -3
  101. package/dist/ganttchart/chart/renderers/chart-markers-renderer.d.ts +2 -2
  102. package/dist/ganttchart/chart/renderers/chart-tasks-renderer.d.ts +9 -9
  103. package/dist/ganttchart/chart/renderers/renderer-base.d.ts +2 -1
  104. package/dist/ganttchart/chart/tooltip/chart-tooltip-renderer.d.ts +4 -6
  105. package/dist/ganttchart/clipboard.d.ts +10 -3
  106. package/dist/ganttchart/divider/divider.d.ts +1 -1
  107. package/dist/ganttchart/export/data-exporter.d.ts +12 -7
  108. package/dist/ganttchart/export/export-common.d.ts +16 -16
  109. package/dist/ganttchart/export/image-exporter.d.ts +5 -4
  110. package/dist/ganttchart/export/pdf-exporter.d.ts +7 -6
  111. package/dist/ganttchart/ganttchart-engine.d.ts +134 -40
  112. package/dist/ganttchart/locale.d.ts +2 -66
  113. package/dist/ganttchart/model/dependency-evaluator.d.ts +16 -0
  114. package/dist/ganttchart/model/lag.d.ts +11 -0
  115. package/dist/ganttchart/model/length.d.ts +13 -2
  116. package/dist/ganttchart/model/marker.d.ts +1 -7
  117. package/dist/ganttchart/model/rate.d.ts +7 -1
  118. package/dist/ganttchart/model/resource-list.d.ts +11 -0
  119. package/dist/ganttchart/model/resource.d.ts +15 -1
  120. package/dist/ganttchart/model/task-filters.d.ts +10 -0
  121. package/dist/ganttchart/model/task-link.d.ts +15 -2
  122. package/dist/ganttchart/model/task-list-adapter.d.ts +22 -0
  123. package/dist/ganttchart/model/task-list.d.ts +55 -2
  124. package/dist/ganttchart/model/task-part.d.ts +20 -0
  125. package/dist/ganttchart/model/task-parts-manager.d.ts +44 -0
  126. package/dist/ganttchart/model/task-resource.d.ts +11 -0
  127. package/dist/ganttchart/model/task-serializer.d.ts +5 -0
  128. package/dist/ganttchart/model/task-warnings.d.ts +4 -0
  129. package/dist/ganttchart/model/task.d.ts +92 -19
  130. package/dist/ganttchart/model/work.d.ts +14 -1
  131. package/dist/ganttchart/model/working-calendar.d.ts +2 -32
  132. package/dist/ganttchart/sheet/renderers/sheet-icons-cell-renderer.d.ts +2 -0
  133. package/dist/ganttchart/sheet/sheet.d.ts +12 -7
  134. package/dist/ganttchart/themes/theme.d.ts +63 -108
  135. package/dist/ganttchart/undo-manager.d.ts +1 -13
  136. package/dist/index.d.ts +77 -8
  137. package/dist/index.js +6 -1
  138. package/dist/licensing/features.d.ts +3 -1
  139. package/dist/licensing/license-key.d.ts +1 -0
  140. package/dist/licensing/license-manager.d.ts +4 -1
  141. package/dist/licensing/watermark.d.ts +1 -0
  142. package/dist/locales/cs.d.ts +1 -1
  143. package/dist/locales/cs.js +1 -0
  144. package/dist/locales/de.d.ts +1 -1
  145. package/dist/locales/de.js +1 -0
  146. package/dist/locales/es.d.ts +1 -1
  147. package/dist/locales/es.js +1 -0
  148. package/dist/locales/fr.d.ts +1 -1
  149. package/dist/locales/fr.js +1 -0
  150. package/dist/locales/it.d.ts +1 -1
  151. package/dist/locales/it.js +1 -0
  152. package/dist/locales/ja.d.ts +1 -1
  153. package/dist/locales/ja.js +1 -0
  154. package/dist/locales/ko.d.ts +1 -1
  155. package/dist/locales/ko.js +1 -0
  156. package/dist/locales/nl.d.ts +1 -1
  157. package/dist/locales/nl.js +1 -0
  158. package/dist/locales/pl.d.ts +1 -1
  159. package/dist/locales/pl.js +1 -0
  160. package/dist/locales/pt.d.ts +1 -1
  161. package/dist/locales/pt.js +1 -0
  162. package/dist/locales/ru.d.ts +1 -1
  163. package/dist/locales/ru.js +1 -0
  164. package/dist/locales/sv.d.ts +1 -1
  165. package/dist/locales/sv.js +1 -0
  166. package/dist/locales/zh.d.ts +1 -1
  167. package/dist/locales/zh.js +1 -0
  168. package/dist/resourcescheduler/chart/handlers/add-event.d.ts +15 -8
  169. package/dist/resourcescheduler/chart/handlers/move-event.d.ts +10 -8
  170. package/dist/resourcescheduler/chart/handlers/resize-event.d.ts +21 -8
  171. package/dist/resourcescheduler/chart/handlers/scheduler-drag-handler.d.ts +32 -0
  172. package/dist/resourcescheduler/chart/handlers/scheduler-handler.d.ts +5 -3
  173. package/dist/resourcescheduler/chart/handlers/scheduler-handlers.d.ts +9 -10
  174. package/dist/resourcescheduler/chart/handlers/select-event.d.ts +10 -8
  175. package/dist/resourcescheduler/chart/renderers/scheduler-background-renderer.d.ts +2 -1
  176. package/dist/resourcescheduler/chart/renderers/scheduler-events-renderer.d.ts +2 -1
  177. package/dist/resourcescheduler/chart/renderers/scheduler-renderer-base.d.ts +1 -0
  178. package/dist/resourcescheduler/chart/scheduler-chart.d.ts +9 -4
  179. package/dist/resourcescheduler/chart/tooltip/scheduler-tooltip-renderer.d.ts +2 -4
  180. package/dist/resourcescheduler/clipboard.d.ts +8 -0
  181. package/dist/resourcescheduler/export/scheduler-data-exporter.d.ts +5 -0
  182. package/dist/resourcescheduler/export/scheduler-export-common.d.ts +12 -7
  183. package/dist/resourcescheduler/export/scheduler-image-exporter.d.ts +2 -1
  184. package/dist/resourcescheduler/export/scheduler-pdf-exporter.d.ts +3 -1
  185. package/dist/resourcescheduler/model/scheduler-data-adapter.d.ts +1 -0
  186. package/dist/resourcescheduler/model/scheduler-data.d.ts +45 -2
  187. package/dist/resourcescheduler/model/scheduler-event.d.ts +22 -2
  188. package/dist/resourcescheduler/model/scheduler-layout-calculator.d.ts +18 -0
  189. package/dist/resourcescheduler/model/scheduler-resource.d.ts +21 -2
  190. package/dist/resourcescheduler/resourcescheduler-engine.d.ts +134 -42
  191. package/dist/resourcescheduler/sheet/renderers/scheduler-icon-cell-renderer.d.ts +2 -0
  192. package/dist/resourcescheduler/sheet/scheduler-sheet.d.ts +11 -6
  193. package/dist/resourcescheduler/themes/scheduler-themes.d.ts +13 -0
  194. package/dist/styles/ec.css +1 -0
  195. package/dist/styles/gc.css +1 -1
  196. package/dist/styles/index.css +1 -0
  197. package/dist/styles/rs.css +1 -0
  198. package/dist/table/editors/input-editor.d.ts +1 -0
  199. package/dist/table/table-column.d.ts +7 -1
  200. package/dist/table/table-data-source.d.ts +2 -0
  201. package/dist/table/table-rows-selection.d.ts +1 -0
  202. package/dist/table/table.d.ts +11 -0
  203. package/dist/table/tree-table.d.ts +2 -0
  204. package/package.json +24 -13
  205. package/styles/_common.scss +12 -1
  206. package/styles/ec.scss +1225 -0
  207. package/styles/index.scss +3 -0
  208. package/dist/ganttchart/model/sheet-column.d.ts +0 -27
  209. package/dist/ganttchart/sheet/editors/cell-editor.d.ts +0 -23
  210. package/dist/ganttchart/sheet/editors/currency-editor.d.ts +0 -6
  211. package/dist/ganttchart/sheet/editors/date-editor.d.ts +0 -6
  212. package/dist/ganttchart/sheet/editors/decimal-editor.d.ts +0 -6
  213. package/dist/ganttchart/sheet/editors/dialog-editor.d.ts +0 -17
  214. package/dist/ganttchart/sheet/editors/input-editor.d.ts +0 -19
  215. package/dist/ganttchart/sheet/editors/integer-editor.d.ts +0 -6
  216. package/dist/ganttchart/sheet/editors/percent-editor.d.ts +0 -6
  217. package/dist/ganttchart/sheet/editors/text-editor.d.ts +0 -5
  218. package/dist/ganttchart/sheet/sheet-keyboard-navigation.d.ts +0 -26
  219. package/dist/ganttchart/sheet/sheet-rows-selection.d.ts +0 -24
  220. /package/dist/__tests__/{critical-path-calculator.test.d.ts → calendar/calendar-clipboard.test.d.ts} +0 -0
  221. /package/dist/__tests__/{model/lag.test.d.ts → calendar/eventcalendar-engine.test.d.ts} +0 -0
  222. /package/dist/__tests__/{model/length.test.d.ts → calendar/export/calendar-data-export.test.d.ts} +0 -0
  223. /package/dist/__tests__/{model/resource-list.test.d.ts → calendar/export/calendar-export.test.d.ts} +0 -0
  224. /package/dist/__tests__/{model/resource.test.d.ts → calendar/export/calendar-icalendar.test.d.ts} +0 -0
  225. /package/dist/__tests__/{model/task-list.test.d.ts → calendar/model/calendar-data.test.d.ts} +0 -0
  226. /package/dist/__tests__/{model/task-part.test.d.ts → calendar/model/calendar-item-recurrence.test.d.ts} +0 -0
  227. /package/dist/__tests__/{model/task-resource.test.d.ts → calendar/model/calendar-item-types.test.d.ts} +0 -0
  228. /package/dist/__tests__/{model/task-warnings.test.d.ts → calendar/model/calendar-occurrence.test.d.ts} +0 -0
  229. /package/dist/__tests__/{model/task.test.d.ts → calendar/model/calendar.test.d.ts} +0 -0
  230. /package/dist/__tests__/{model/work.test.d.ts → calendar/model/recurrence-editor.test.d.ts} +0 -0
  231. /package/dist/__tests__/{model/working-calendar.test.d.ts → calendar/model/recurrence-expander.test.d.ts} +0 -0
  232. /package/dist/__tests__/{undo-manager.test.d.ts → calendar/model/recurrence-rule.test.d.ts} +0 -0
@@ -2,27 +2,49 @@ import { Subject } from "rxjs";
2
2
  import { TableItemEventArgs, TreeTableDataSource } from "../../table/table-data-source";
3
3
  import { Task } from "./task";
4
4
  import { TaskList } from "./task-list";
5
+ /** Adapts a TaskList to the TreeTableDataSource interface used by the sheet component. */
5
6
  export declare class TaskListAdapter implements TreeTableDataSource<Task> {
6
7
  #private;
8
+ /** Emits when a task property changes. */
7
9
  itemChanged$: Subject<TableItemEventArgs<Task>>;
10
+ /** Emits when a task is removed from the list. */
8
11
  itemRemoved$: Subject<TableItemEventArgs<Task>>;
12
+ /** Emits when a task's collapsed state changes. */
9
13
  itemCollapsedChanged$: Subject<TableItemEventArgs<Task>>;
14
+ /** Emits after a complex multi-step operation (e.g. paste) completes. */
10
15
  complexOperationFinished$: Subject<void>;
11
16
  constructor(list: TaskList);
17
+ destroy(): void;
18
+ /** Returns the underlying TaskList instance. */
12
19
  get list(): TaskList;
20
+ /** Returns the total number of tasks including empty rows. */
13
21
  get length(): number;
22
+ /** Returns the task at the given flat index. */
14
23
  getItem(index: number): Task;
24
+ /** Finds a task by its unique identifier, or returns null if not found. */
15
25
  getItemById(id: string): Task | null;
26
+ /** Returns the flat index of the given task. */
16
27
  indexOf(item: Task): number;
28
+ /** Appends an empty task row at the end of the list. */
17
29
  addEmptyItem(): Task;
30
+ /** Inserts an empty task row at the specified index. */
18
31
  insertEmptyItem(index: number): Task;
32
+ /** Removes the specified tasks from the list. */
19
33
  removeItems(items: Task[]): void;
34
+ /** Returns the display label (task number) for the given task. */
20
35
  getItemLabel(item: Task): string;
36
+ /** Returns true if the task is hidden (e.g. collapsed under a summary). */
21
37
  isItemHidden(item: Task): boolean;
38
+ /** Returns the next visible task after the given one, or null if none exists. */
22
39
  getNextVisible(item: Task): Task | null;
40
+ /** Returns the previous visible task before the given one, or null if none exists. */
23
41
  getPreviousVisible(item: Task): Task | null;
42
+ /** Increases the hierarchy level of the specified tasks by one. */
24
43
  indent(items: Task[]): void;
44
+ /** Decreases the hierarchy level of the specified tasks by one. */
25
45
  outdent(items: Task[]): void;
46
+ /** Moves the specified tasks one position up in the list. */
26
47
  moveUp(items: Task[]): void;
48
+ /** Moves the specified tasks one position down in the list. */
27
49
  moveDown(items: Task[]): void;
28
50
  }
@@ -4,62 +4,115 @@ import { Task, TaskEventArgs, TaskResourceAddingEventArgs, TaskTypeChangeEventAr
4
4
  import { WorkingCalendar } from "./working-calendar";
5
5
  import { TaskLink, TaskLinkEventArgs, TaskLinkType } from "./task-link";
6
6
  import { Resource } from "./resource";
7
- import { DateRange } from "../ganttchart-engine";
7
+ import { DateRange } from "../../common/common";
8
8
  import { TimelineKitLocale } from "../locale";
9
+ /** Central data store holding all tasks, links, and hierarchy for the Gantt chart. */
9
10
  export declare class TaskList {
10
11
  #private;
12
+ /** Emitted when a task is added. */
11
13
  taskAdded$: Subject<TaskEventArgs>;
14
+ /** Emitted when a task property changes. */
12
15
  taskChanged$: Subject<TaskEventArgs>;
16
+ /** Emitted when a task is removed. */
13
17
  taskRemoved$: Subject<TaskEventArgs>;
18
+ /** Emitted when a task's collapsed state changes. */
14
19
  taskCollapsedChanged$: Subject<TaskEventArgs>;
20
+ /** Emitted when a task's type changes. */
15
21
  taskTypeChanged$: Subject<TaskTypeChangeEventArgs>;
22
+ /** Emitted when a link is added. */
16
23
  linkAdded$: Subject<TaskLinkEventArgs>;
24
+ /** Emitted when a link is removed. */
17
25
  linkRemoved$: Subject<TaskLinkEventArgs>;
26
+ /** Emitted before a resource is added to a task. */
18
27
  resourceAdding$: Subject<TaskResourceAddingEventArgs>;
28
+ /** Emitted when the task filter changes. */
19
29
  filterChanged$: Subject<void>;
20
30
  constructor(calendar$: BehaviorSubject<WorkingCalendar>, projectTimeline$: BehaviorSubject<DateRange>, locale$?: BehaviorSubject<TimelineKitLocale>);
31
+ /** Total number of tasks (including Empty rows). */
21
32
  get length(): number;
33
+ /** Total number of links. */
22
34
  get linksLength(): number;
35
+ /** Whether link dependencies are currently being evaluated (prevents re-entrant updates). */
23
36
  get evaluatingDependencies(): boolean;
24
- evaluatingDependenciesFinished$: Subject<void>;
37
+ /** Emitted after dependency evaluation completes. */
38
+ get evaluatingDependenciesFinished$(): Subject<void>;
39
+ /** Emitted after a bulk operation completes. */
25
40
  complexOperationFinished$: Subject<void>;
41
+ /** Active task filter function. Set to null to show all tasks. */
26
42
  get filter(): TaskFilterFn | null;
27
43
  set filter(value: TaskFilterFn | null);
44
+ /** Get a task by index. */
28
45
  getTask(index: number): Task;
46
+ /** Find a task by ID, or null if not found. */
29
47
  getTaskById(id: string): Task | null;
48
+ /** Get a link by index. */
30
49
  getLink(index: number): TaskLink;
50
+ /** Get the index of a task in the list. */
31
51
  indexOf(task: Task): number;
52
+ /** Append an empty placeholder row at the end of the list. */
32
53
  addEmptyTask(): Task;
54
+ /** Insert an empty placeholder row at the given index. */
33
55
  insertEmptyTask(index: number): Task;
56
+ /** Add a task to the end of the list. */
34
57
  addTask(task: Task): Task;
58
+ /** Insert a task at the given index. */
35
59
  insertTask(index: number, task: Task): Task;
60
+ /** Get the lowest index among the given tasks, or null if empty. */
36
61
  getFirstTaskIndex(tasks: Task[]): number | null;
62
+ /** Get the last non-empty task in the list. */
37
63
  getLastNonEmpty(includeHidden?: boolean): Task | null;
64
+ /** Get the previous non-empty task at the given level, or any level if null. */
38
65
  getPreviousNonEmpty(task: Task, level: number | null): Task | null;
66
+ /** Get the next visible (not hidden) task after the given task. */
39
67
  getNextVisible(task: Task): Task | null;
68
+ /** Get the previous visible (not hidden) task before the given task. */
40
69
  getPreviousVisible(task: Task): Task | null;
70
+ /** Get the next non-empty task after the given task. */
41
71
  getNextNonEmpty(task: Task): Task | null;
72
+ /** Indent tasks one level deeper (make them subtasks of the previous sibling). */
42
73
  indent(tasks: Task[]): void;
74
+ /** Outdent tasks one level (move them out of their parent summary). */
43
75
  outdent(tasks: Task[]): void;
76
+ /** Get the 1-based row number of a task. */
44
77
  getTaskNumber(task: Task): number;
78
+ /** Get the next sibling at the same hierarchy level. */
45
79
  getNextSibling(task: Task): Task | null;
80
+ /** Get all subsequent siblings at the same hierarchy level. */
46
81
  getNextSiblings(task: Task): Task[];
82
+ /** Get the next non-empty task at the specified hierarchy level. */
47
83
  getNextAtLevel(task: Task, level: number): Task | null;
84
+ /** Get the deepest last descendant of a task (used for move operations). */
48
85
  getLastDescendant(task: Task): Task;
86
+ /** Check whether a link exists between two tasks (in either direction). */
49
87
  existsLinkBetween(task1: Task, task2: Task): boolean;
88
+ /** Check whether a task type supports links (only Task and Milestone). */
50
89
  isValidTypeForLink(task: Task): boolean;
90
+ /** Check whether adding a link from → to would create a dependency cycle. */
51
91
  wouldCreateCycle(from: Task, to: Task): boolean;
92
+ /** Create a dependency link between two tasks. Validates against cycles, self-links, and parent-child links. */
52
93
  addLink(from: Task, to: Task, type: TaskLinkType, lag?: Lag): TaskLink;
94
+ /** Remove a task and all its links. */
53
95
  removeTask(task: Task): void;
96
+ /** Remove multiple tasks. */
54
97
  removeTasks(tasks: Task[]): void;
98
+ /** Remove a dependency link. Restores the successor's base start time if available. */
55
99
  removeLink(link: TaskLink): void;
100
+ /** Move tasks up one position in the list. */
56
101
  moveUp(tasks: Task[]): void;
102
+ /** Move tasks down one position in the list. */
57
103
  moveDown(tasks: Task[]): void;
104
+ /** Earliest start time across all non-empty tasks, or null if no tasks exist. */
58
105
  get minStartTime(): Date | null;
106
+ /** Latest end time across all non-empty tasks, or null if no tasks exist. */
59
107
  get maxEndTime(): Date | null;
108
+ /** Remove all tasks and links. */
60
109
  clear(): void;
110
+ /** Replace all tasks and links with a new set (bulk load). */
61
111
  assign(tasks: Task[], links: TaskLink[]): void;
112
+ /** Get all tasks that have the given resource assigned. */
62
113
  getTasksUsingResource(resource: Resource): Task[];
114
+ /** Rename a custom property across all tasks. */
63
115
  renameTaskProperty(oldName: string, newName: string): void;
64
116
  }
117
+ /** Filter function that determines which tasks are visible. Return true to show, false to hide. */
65
118
  export type TaskFilterFn = (task: Task) => boolean;
@@ -2,38 +2,58 @@ import { Length } from "./length";
2
2
  import { Task } from "./task";
3
3
  import { BehaviorSubject, Subject } from "rxjs";
4
4
  import { WorkingCalendar } from "./working-calendar";
5
+ /** A contiguous time segment of a split task. */
5
6
  export declare class TaskPart {
6
7
  #private;
8
+ /** Start date/time of this part. */
7
9
  get startTime(): Date;
8
10
  set startTime(value: Date);
11
+ /** End date/time of this part. */
9
12
  get endTime(): Date;
10
13
  set endTime(value: Date);
14
+ /** Duration of this part. */
11
15
  get length(): Length;
12
16
  set length(value: Length);
17
+ /** The owning task (assigned once, read-only after). */
13
18
  get task(): Task | null;
14
19
  set task(value: Task | null);
20
+ /** Active working calendar. */
15
21
  get calendar(): WorkingCalendar;
22
+ /** Emitted before the start time changes. */
16
23
  startTimeChanging: Subject<TaskPartDateEventArgs>;
24
+ /** Emitted before the end time changes. */
17
25
  endTimeChanging: Subject<TaskPartDateEventArgs>;
26
+ /** Emitted before the length changes. */
18
27
  lengthChanging: Subject<TaskPartLengthEventArgs>;
28
+ /** Emitted after the start time changes. */
19
29
  startTimeChanged: Subject<void>;
30
+ /** Emitted after the end time changes. */
20
31
  endTimeChanged: Subject<void>;
32
+ /** Emitted after the length changes. */
21
33
  lengthChanged: Subject<void>;
34
+ /** Emitted when the part's computed progress changes. */
22
35
  progressChanged: Subject<void>;
23
36
  constructor(startTime: Date, length: Length, calendar$: BehaviorSubject<WorkingCalendar>);
37
+ /** Duration in working hours. */
24
38
  get lengthInHours(): number;
39
+ /** Computed progress percentage for this part based on the owning task's progress. */
25
40
  get progress(): number | null;
41
+ /** Serialize to a plain object. */
26
42
  toAny(): any;
43
+ /** Create a TaskPart from a plain object. */
27
44
  static fromAny(obj: any, calendar$: BehaviorSubject<WorkingCalendar>): TaskPart;
28
45
  }
46
+ /** Event args for start/end time changes. */
29
47
  export interface TaskPartDateEventArgs {
30
48
  part: TaskPart;
31
49
  value: Date;
32
50
  }
51
+ /** Event args for length changes. */
33
52
  export interface TaskPartLengthEventArgs {
34
53
  part: TaskPart;
35
54
  value: Length;
36
55
  }
56
+ /** Thrown when a task part validation fails. */
37
57
  export declare class ValidationError extends Error {
38
58
  constructor(message: string);
39
59
  }
@@ -0,0 +1,44 @@
1
+ import { TaskPart } from "./task-part";
2
+ import { WorkingCalendar } from "./working-calendar";
3
+ import { LengthUnit } from "./length";
4
+ export interface PartsChangedCallbacks {
5
+ onPartStartTimeChanged(): void;
6
+ onPartEndTimeChanged(): void;
7
+ onPartLengthChanged(): void;
8
+ }
9
+ /** Manages the array of TaskPart objects, their subscriptions, and merge/cleanup logic. */
10
+ export declare class TaskPartsManager {
11
+ #private;
12
+ constructor(callbacks: PartsChangedCallbacks);
13
+ get length(): number;
14
+ get(i: number): TaskPart;
15
+ get last(): TaskPart;
16
+ get startTime(): Date;
17
+ get endTime(): Date;
18
+ indexOf(part: TaskPart): number;
19
+ includes(part: TaskPart): boolean;
20
+ /** Length unit of the first part, or null if no parts exist. */
21
+ get lengthUnit(): LengthUnit | null;
22
+ totalLengthInHours(calendar: WorkingCalendar): number;
23
+ /** Iterate over all parts. */
24
+ forEach(fn: (part: TaskPart, index: number) => void): void;
25
+ /** Insert a part in sorted order by startTime. */
26
+ insertSorted(part: TaskPart): void;
27
+ /** Remove a part by reference. Returns the index it was at, or -1 if not found. */
28
+ remove(part: TaskPart): number;
29
+ /** Remove all parts and unsubscribe all. */
30
+ clear(): void;
31
+ /** Bulk-set parts (for deserialization). Subscribes to each part's change events. */
32
+ assign(parts: TaskPart[]): void;
33
+ /** Subscribe to a part's change events. */
34
+ subscribe(part: TaskPart): void;
35
+ /** Unsubscribe a part's change events. */
36
+ unsubscribe(part: TaskPart): void;
37
+ /** Merge overlapping or adjacent parts. Requires working calendar for zero-gap detection. */
38
+ tryCombineAdjacent(calendar: WorkingCalendar): void;
39
+ /** Remove zero-length parts. Returns whether any were removed and whether all parts are now gone. */
40
+ removeEmpty(): {
41
+ changed: boolean;
42
+ allRemoved: boolean;
43
+ };
44
+ }
@@ -1,18 +1,29 @@
1
1
  import { Subject } from "rxjs";
2
2
  import { Resource } from "./resource";
3
3
  import { ResourceList } from "./resource-list";
4
+ /** Assignment of a resource to a task with a capacity percentage. */
4
5
  export declare class TaskResource {
5
6
  #private;
7
+ /** Unique identifier (read-only). */
6
8
  get id(): string;
9
+ /** The underlying resource definition. */
7
10
  get resource(): Resource;
11
+ /** Allocation percentage (100 = full-time, 200 = double allocation). */
8
12
  get capacity(): number;
9
13
  set capacity(value: number);
14
+ /** Emitted when this assignment or its underlying resource changes. */
10
15
  changed$: Subject<TaskResourceEventArgs>;
11
16
  constructor(id: string | null, resource: Resource, capacity: number);
17
+ /** Clean up the subscription to the underlying resource. */
18
+ destroy(): void;
19
+ /** Format capacity as a display string (e.g. '1x' or '50%'). */
12
20
  formatCapacity(): string;
21
+ /** Serialize to a plain object. */
13
22
  toAny(): any;
23
+ /** Create a TaskResource from a plain object. */
14
24
  static fromAny(obj: any, resources: ResourceList): TaskResource;
15
25
  }
26
+ /** Event args emitted when a task resource changes. */
16
27
  export interface TaskResourceEventArgs {
17
28
  resource: TaskResource;
18
29
  }
@@ -0,0 +1,5 @@
1
+ import { Task } from "./task";
2
+ /** Serializes a Task to a plain object for persistence. */
3
+ export declare class TaskSerializer {
4
+ static serialize(task: Task): Record<string, any>;
5
+ }
@@ -3,13 +3,17 @@ import { TimelineKitLocale } from "../locale";
3
3
  import { Task } from "./task";
4
4
  import { TaskList } from "./task-list";
5
5
  import { WorkingCalendar } from "./working-calendar";
6
+ /** Computes and assigns warning messages to tasks (delay, constraint violations). */
6
7
  export declare class TaskWarnings {
7
8
  #private;
8
9
  get calendar(): WorkingCalendar;
9
10
  constructor(list: TaskList, calendar: BehaviorSubject<WorkingCalendar>, locale: BehaviorSubject<TimelineKitLocale>);
10
11
  private getTotalLength;
12
+ /** Calculate the date corresponding to the task's current progress. */
11
13
  getProgressTime(task: Task): Date;
14
+ /** Recompute warnings for a single task. */
12
15
  update(task: Task): void;
16
+ /** Recompute warnings for all tasks in the list. */
13
17
  updateAll(): void;
14
18
  private formatDelayedMessage;
15
19
  }
@@ -1,5 +1,4 @@
1
1
  import { TaskPart } from "./task-part";
2
- import { TaskList } from "./task-list";
3
2
  import { BehaviorSubject, Subject } from "rxjs";
4
3
  import { Length, LengthUnit } from "./length";
5
4
  import { WorkingCalendar } from "./working-calendar";
@@ -8,122 +7,196 @@ import { Resource } from "./resource";
8
7
  import { Work } from "./work";
9
8
  import { ResourceList } from "./resource-list";
10
9
  import { CustomProperty } from "./custom-property";
11
- import { DateRange } from "../ganttchart-engine";
10
+ import { DateRange } from "../../common/common";
11
+ import { ColorValue } from "../../common/base-theme";
12
+ import type { ConstraintType } from "../../common/locale";
13
+ /** A schedulable item in the Gantt chart. Can be a Task, Milestone, Summary, or Empty row. */
12
14
  export declare class Task {
13
15
  #private;
16
+ /** Unique identifier (read-only). Auto-generated if not provided in constructor. */
14
17
  get id(): string;
15
- get color(): number;
16
- set color(value: number);
18
+ /** Color index into the theme's taskColors array, or a custom color definition. */
19
+ get color(): ColorValue;
20
+ set color(value: ColorValue);
21
+ /** Display name of the task. Setting a name on an Empty row converts it to a Task. */
17
22
  get name(): string | null;
18
23
  set name(value: string | null);
24
+ /** Start date/time of the task. For Summary tasks this is computed from subtasks. */
19
25
  get startTime(): Date | null;
20
26
  set startTime(value: Date);
27
+ /** End date/time of the task. For Summary tasks this is computed from subtasks. */
21
28
  get endTime(): Date | null;
22
29
  set endTime(value: Date);
23
- get number(): number;
30
+ /** Active working calendar used for date calculations. */
24
31
  get calendar(): WorkingCalendar;
32
+ /** Computed duration of the task. Null for Empty tasks. */
25
33
  get length(): Length | null;
26
34
  set length(value: Length);
35
+ /** Override for the length display unit. When null, the calendar's default unit is used. */
27
36
  get customLengthUnit(): LengthUnit | null;
28
37
  set customLengthUnit(value: LengthUnit | null);
38
+ /** Original start time before dependency evaluation shifted it. Used for link relaxation. */
29
39
  get baseStartTime(): Date | null;
40
+ /** The last (or only) part of a split task. */
30
41
  get lastPart(): TaskPart;
42
+ /** Current type of the task. Changing type resets type-specific properties. */
31
43
  get type(): TaskType;
32
44
  set type(value: TaskType);
45
+ /** Parent summary task, or null if this is a top-level task. */
33
46
  get parent(): Task | null;
34
- get list(): TaskList | null;
35
- set list(value: TaskList | null);
47
+ /** Completion percentage (0–100). Null for Empty and Milestone tasks. Computed for Summary tasks. */
36
48
  get progress(): number | null;
37
49
  set progress(value: number);
50
+ /** Whether a Summary task's subtasks are collapsed in the view. */
38
51
  get collapsed(): boolean;
39
52
  set collapsed(value: boolean);
53
+ /** Number of resources assigned to this task. */
40
54
  get resourcesLength(): number;
55
+ /** Get a resource assignment by index. */
41
56
  getResource(i: number): TaskResource;
57
+ /** Find a resource assignment by the underlying resource's ID. */
42
58
  getResourceByResourceId(id: string): TaskResource | null;
59
+ /** Find a resource assignment by its own ID. */
43
60
  getResourceById(id: string): TaskResource | null;
61
+ /** The manually set work value, or null if work is computed from resources. */
62
+ get customWork(): Work | null;
63
+ /** Total work effort. Computed from resources and duration, or set manually when no resources are assigned. */
44
64
  get work(): Work | null;
45
65
  set work(value: Work | null);
66
+ /** The manually set cost value, or null if cost is computed from resources. */
67
+ get customCost(): number | null;
68
+ /** Total cost. Computed from resources and rates, or set manually when no resources are assigned. */
46
69
  get cost(): number | null;
47
70
  set cost(value: number | null);
71
+ /** Free-form text note attached to the task. */
48
72
  get note(): string | null;
49
73
  set note(value: string | null);
74
+ /** Active warning messages for this task (e.g. behind schedule, constraint violations). */
50
75
  warnings: string[];
76
+ /** Scheduling constraint type. Default is ASAP (As Soon As Possible). */
51
77
  get constraintType(): ConstraintType;
52
78
  set constraintType(value: ConstraintType);
79
+ /** Date associated with the scheduling constraint. Null for ASAP/ALAP. */
53
80
  get constraintDate(): Date | null;
54
81
  set constraintDate(value: Date | null);
82
+ /** Baseline start time for variance tracking. */
55
83
  get baselineStartTime(): Date | null;
56
84
  set baselineStartTime(value: Date | null);
85
+ /** Baseline end time for variance tracking. */
57
86
  get baselineEndTime(): Date | null;
58
87
  set baselineEndTime(value: Date | null);
59
- /**
60
- * Critical Path Method (CPM) computed values.
61
- * Calculated by CriticalPathCalculator when showCriticalPath is enabled.
62
- * These are not persisted — they are recalculated dynamically.
63
- */
88
+ /** CPM early start date (computed dynamically when critical path is enabled). */
64
89
  earlyStart: Date | null;
90
+ /** CPM early finish date. */
65
91
  earlyFinish: Date | null;
92
+ /** CPM late start date. */
66
93
  lateStart: Date | null;
94
+ /** CPM late finish date. */
67
95
  lateFinish: Date | null;
68
96
  /** Total float in working hours. Zero means the task is on the critical path. */
69
97
  totalFloat: number | null;
98
+ /** Free float in working hours. */
70
99
  freeFloat: number | null;
100
+ /** Whether this task is on the critical path. */
71
101
  isCritical: boolean;
102
+ /** Emitted when any property of this task changes. */
72
103
  changed$: Subject<TaskEventArgs>;
104
+ /** Emitted when the task type changes (e.g. Empty → Task). */
73
105
  typeChanged$: Subject<TaskTypeChangeEventArgs>;
106
+ /** Emitted when the start time changes. */
74
107
  startTimeChanged$: Subject<TaskEventArgs>;
108
+ /** Emitted when the end time changes. */
75
109
  endTimeChanged$: Subject<TaskEventArgs>;
110
+ /** Emitted when the collapsed state of a Summary task changes. */
76
111
  collapsedChanged$: Subject<TaskEventArgs>;
112
+ /** Emitted when a subtask is added to this Summary task. */
77
113
  subtaskAdded$: Subject<TaskEventArgs>;
114
+ /** Emitted before a resource is added to this task. */
78
115
  resourceAdding$: Subject<TaskResourceAddingEventArgs>;
79
- constructor(id: string | null, calendar: BehaviorSubject<WorkingCalendar>, projectTimeline: BehaviorSubject<DateRange>);
116
+ constructor(id: string | null, calendar: BehaviorSubject<WorkingCalendar>, projectTimeline: BehaviorSubject<DateRange>, isEvaluatingDependencies?: () => boolean);
117
+ /** Add a new time segment (part) to this task. Adjacent or overlapping parts are merged automatically. */
80
118
  addPart(startTime: Date, length: Length): TaskPart;
119
+ /** Remove a time segment from this task. If no parts remain, the task becomes a Milestone. */
81
120
  removePart(part: TaskPart): void;
121
+ /** Number of time segments (parts) in this task. */
82
122
  get partsLength(): number;
123
+ /** Get a task part by index. */
83
124
  getPart(i: number): TaskPart;
125
+ /** Number of direct subtasks (only meaningful for Summary tasks). */
84
126
  get subtasksLength(): number;
127
+ /** Get a subtask by index. */
85
128
  getSubtask(i: number): Task;
129
+ /** Add a subtask, converting this task to Summary type if needed. */
86
130
  addSubtask(task: Task): void;
131
+ /** Remove a subtask. If no subtasks remain, the Summary reverts to a regular Task. */
87
132
  removeSubtask(task: Task): void;
133
+ /** Nesting depth (0 for top-level tasks, 1 for first-level subtasks, etc.). */
88
134
  get level(): number;
89
- getNextSibling(): Task | null;
90
- getNextAtLevel(level: number): Task | null;
135
+ /** Total duration of all parts in working hours. */
91
136
  get partsLengthInHours(): number;
137
+ /** Get the index of a part within this task. */
92
138
  indexOf(part: TaskPart): number;
139
+ /** Check whether this task is a descendant (at any depth) of the given task. */
93
140
  isDescendantOf(task: Task): boolean;
141
+ /** Toggle the collapsed state of a Summary task. */
94
142
  toggleCollapsed(): void;
143
+ /** Whether this task is excluded by the active filter. */
95
144
  get filtered(): boolean;
96
145
  set filtered(value: boolean);
146
+ /** Whether this task is hidden (filtered out or inside a collapsed Summary). */
97
147
  get hidden(): boolean;
148
+ /** Whether the length can be edited (not for multi-part or Summary tasks). */
98
149
  get isLengthEditable(): boolean;
150
+ /** Whether the start time can be edited. */
99
151
  get isStartTimeEditable(): boolean;
152
+ /** Whether the end time can be edited. */
100
153
  get isEndTimeEditable(): boolean;
154
+ /** Whether progress can be edited. */
101
155
  get isProgressEditable(): boolean;
156
+ /** Whether resources can be assigned. */
102
157
  get isResourcesEditable(): boolean;
158
+ /** Whether work can be set manually (only when no resources are assigned). */
103
159
  get isWorkEditable(): boolean;
160
+ /** Whether cost can be set manually (only when no resources are assigned). */
104
161
  get isCostEditable(): boolean;
105
- serializeProperties(target: any): void;
162
+ /** Restore task properties from a plain object. */
106
163
  deserializeProperties(source: any, resources: ResourceList): void;
164
+ /** Restore parent/subtask hierarchy from a plain object (must be called after deserializeProperties). */
107
165
  deserializePropertiesHierarchy(source: any, allTasks: Task[]): void;
166
+ /** Assign a resource to this task with the given capacity percentage. */
108
167
  addResource(id: string | null, resource: Resource, capacity: number): TaskResource;
168
+ /** Remove a resource assignment from this task. */
109
169
  removeResource(resource: TaskResource): void;
170
+ /** Serialize custom properties to a plain array for persistence. */
171
+ serializeCustomProperties(): any[];
172
+ /** Add a custom property to this task. */
110
173
  addProperty(property: CustomProperty): void;
174
+ /** Remove a custom property from this task. */
111
175
  removeProperty(property: CustomProperty): void;
176
+ /** Rename a custom property across this task. */
112
177
  renameProperty(oldName: string, newName: string): void;
178
+ /** Get a custom property by name, or null if not found. */
113
179
  getPropertyByName(name: string): CustomProperty | null;
180
+ /** Get the value of a custom property by name. */
114
181
  getPropertyValue(name: string): any;
182
+ /** Set the value of a custom property by name. */
115
183
  setPropertyValue(name: string, value: any): void;
116
- private arePartsOverlappingOrAdjacent;
184
+ /** Serialize to a plain object. */
185
+ toAny(): Record<string, any>;
117
186
  }
118
- export type TaskType = 'Task' | 'Milestone' | 'Summary' | 'Empty';
119
- export type ConstraintType = 'ASAP' | 'ALAP' | 'MSO' | 'MFO' | 'SNET' | 'SNLT' | 'FNET' | 'FNLT';
187
+ /** The kind of a task row: regular Task, Milestone (zero duration), Summary (parent), or Empty (placeholder). */
188
+ export type TaskType = 'task' | 'milestone' | 'summary' | 'empty';
189
+ export type { ConstraintType } from "../../common/locale";
190
+ /** Event args emitted when a task changes. */
120
191
  export interface TaskEventArgs {
121
192
  task: Task;
122
193
  }
194
+ /** Event args emitted before a resource is added to a task. */
123
195
  export interface TaskResourceAddingEventArgs {
124
196
  task: Task;
125
197
  resource: Resource;
126
198
  }
199
+ /** Event args emitted when a task's type changes. */
127
200
  export interface TaskTypeChangeEventArgs {
128
201
  task: Task;
129
202
  oldType: TaskType;
@@ -1,17 +1,30 @@
1
1
  import { WorkingCalendar } from "./working-calendar";
2
+ /** Represents a work effort amount with a time unit (minutes, hours, or days). */
2
3
  export declare class Work {
3
4
  #private;
5
+ /** Time unit of the work amount. */
4
6
  get unit(): WorkUnit;
7
+ /** Numeric amount of work. */
5
8
  get value(): number;
6
9
  constructor(unit: WorkUnit, value: number);
10
+ /** Parse a work string (e.g. '8h', '2d', '30m'). Returns null if invalid. */
7
11
  static tryParse(value: string): Work | null;
12
+ /** Format as a display string (e.g. '8h', '2d'). */
8
13
  toString(): string;
14
+ /** Convert to hours using the given calendar for day-to-hour conversion. */
9
15
  toHours(calendar: WorkingCalendar): number;
16
+ /** Return the larger of two work units (Day > Hour > Minute). */
10
17
  static maxUnit(unit1: WorkUnit, unit2: WorkUnit): WorkUnit;
18
+ /** Create a Work value from hours, converting to the specified unit. */
11
19
  static fromHours(hours: number, unit: WorkUnit, calendar: WorkingCalendar): Work;
20
+ /** Add two Work values (must have the same unit). */
12
21
  static sum(work1: Work, work2: Work): Work;
22
+ /** Serialize to a plain object. */
13
23
  toAny(): any;
24
+ /** Create a Work from a plain object. */
14
25
  static fromAny(obj: any): Work;
26
+ /** Create a deep copy. */
15
27
  clone(): Work;
16
28
  }
17
- export type WorkUnit = 'Minute' | 'Hour' | 'Day';
29
+ /** Time unit for work effort measurement. */
30
+ export type WorkUnit = 'minute' | 'hour' | 'day';
@@ -1,32 +1,2 @@
1
- import { LengthUnit } from "./length";
2
- export declare class WorkingCalendar {
3
- #private;
4
- workingDays: DayOfWeek[];
5
- nationalHolidays: Date[];
6
- shifts: WorkingShift[];
7
- startOfWeek: DayOfWeek;
8
- defaultLengthUnit: LengthUnit;
9
- constructor();
10
- isWorkingDay(current: Date): boolean;
11
- moveToStartShift(current: Date, keepTimeIfInsideShift: boolean): Date;
12
- moveToEndShift(current: Date, keepTimeIfInsideShift: boolean): Date;
13
- getHoursPerDay(): number;
14
- isEndOfDay(current: Date): boolean;
15
- getEndOfWorkingDay(current: Date): Date;
16
- getHoursBetween(time1: Date, time2: Date): number;
17
- getStartOfWeek(current: Date): Date;
18
- addHours(current: Date, hours: number, moveToNextIfHoursZero?: boolean): Date;
19
- }
20
- export type DayOfWeek = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday';
21
- export declare class WorkingShift {
22
- start: TimeOfDay;
23
- end: TimeOfDay;
24
- constructor(start: TimeOfDay, end: TimeOfDay);
25
- contains(current: Date, excludeStart?: boolean): boolean;
26
- getLengthInMinutes(): number;
27
- }
28
- export declare class TimeOfDay {
29
- hour: number;
30
- minute: number;
31
- constructor(hour: number, minute: number);
32
- }
1
+ export { WorkingCalendar, WorkingShift, TimeOfDay } from "../../common/working-calendar";
2
+ export type { DayOfWeek, LengthUnit } from "../../common/working-calendar";
@@ -8,3 +8,5 @@ export declare class SheetIconsCellRenderer extends DefaultTableCellRenderer<Tas
8
8
  private addIconToCell;
9
9
  redraw(cell: any, valueFormatter: TableCellValueFormatter<Task>, item: Task): void;
10
10
  }
11
+ export declare function drawIconsExportHeader(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, color: string): void;
12
+ export declare function drawIconsExportCell(ctx: CanvasRenderingContext2D, task: Task, x: number, y: number, _width: number, height: number): void;