gantt-lib 0.136.1 → 0.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -0
- package/dist/core/scheduling/index.d.mts +1 -1
- package/dist/core/scheduling/index.d.ts +1 -1
- package/dist/core/scheduling/index.js +40 -3
- package/dist/core/scheduling/index.js.map +1 -1
- package/dist/core/scheduling/index.mjs +40 -3
- package/dist/core/scheduling/index.mjs.map +1 -1
- package/dist/{index-D99kbU4p.d.mts → index-C3mZqSTf.d.mts} +67 -1
- package/dist/{index-D99kbU4p.d.ts → index-C3mZqSTf.d.ts} +67 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +258 -3
- package/dist/index.d.ts +258 -3
- package/dist/index.js +2389 -1331
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2376 -1331
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +176 -1
- package/package.json +1 -1
|
@@ -159,6 +159,57 @@ interface ValidationResult {
|
|
|
159
159
|
/** Array of errors/warnings (empty if valid) */
|
|
160
160
|
errors: DependencyError[];
|
|
161
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* A single work bar rendered inside a multi-activity task row.
|
|
164
|
+
* Activities are visual bars packed into sub-lanes of one row — no hierarchy,
|
|
165
|
+
* no dependencies, no progress of their own.
|
|
166
|
+
*/
|
|
167
|
+
interface TaskActivityTooltipField {
|
|
168
|
+
/** Field caption, e.g. "Подрядчик" */
|
|
169
|
+
label: string;
|
|
170
|
+
/** Field value — any renderable content (string, badge, icon, JSX) */
|
|
171
|
+
value: ReactNode;
|
|
172
|
+
}
|
|
173
|
+
interface TaskActivity {
|
|
174
|
+
/** Unique identifier within the host task */
|
|
175
|
+
id: string;
|
|
176
|
+
/** Display name rendered inside the activity bar */
|
|
177
|
+
name: string;
|
|
178
|
+
/** Activity start date (ISO string or Date object) */
|
|
179
|
+
startDate: string | Date;
|
|
180
|
+
/** Activity end date (ISO string or Date object) */
|
|
181
|
+
endDate: string | Date;
|
|
182
|
+
/** Optional color; falls back to the default task bar color */
|
|
183
|
+
color?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Обязательный зазор в днях между концом предыдущей работы этой же строки
|
|
186
|
+
* (этажа) и началом этой (например технологическая выдержка). Задан — зазор
|
|
187
|
+
* постоянный; не задан — последователь подтягивается вплотную («как можно
|
|
188
|
+
* раньше»), а зазор тянется, пока его держит другая связь. На вертикальную
|
|
189
|
+
* связь «та же работа этажом выше» лаг не переносится.
|
|
190
|
+
*/
|
|
191
|
+
lag?: number;
|
|
192
|
+
/** Extra rows rendered in the hover tooltip under the header (e.g. contractor). */
|
|
193
|
+
tooltipFields?: TaskActivityTooltipField[];
|
|
194
|
+
/**
|
|
195
|
+
* Прогресс работы 0–100 (визуальное заполнение полосы слева направо и строка
|
|
196
|
+
* «Готовность» в подсказке). Как и у Task.progress — только визуал.
|
|
197
|
+
*/
|
|
198
|
+
progress?: number;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Context handed to the `activityTooltip` render prop: everything needed to
|
|
202
|
+
* compose a custom activity tooltip (dates, duration, host task, work).
|
|
203
|
+
*/
|
|
204
|
+
interface ActivityTooltipContext {
|
|
205
|
+
task: Task;
|
|
206
|
+
activity: TaskActivity;
|
|
207
|
+
startDate: Date;
|
|
208
|
+
endDate: Date;
|
|
209
|
+
durationDays: number;
|
|
210
|
+
/** Прогресс работы 0–100, если задан. */
|
|
211
|
+
progress?: number;
|
|
212
|
+
}
|
|
162
213
|
/**
|
|
163
214
|
* Task data structure for Gantt chart
|
|
164
215
|
*/
|
|
@@ -221,6 +272,21 @@ interface Task {
|
|
|
221
272
|
planByDate?: Record<string, number>;
|
|
222
273
|
/** Optional actual quantities keyed by ISO date (YYYY-MM-DD), used by plan-fact mode. */
|
|
223
274
|
factByDate?: Record<string, number>;
|
|
275
|
+
/**
|
|
276
|
+
* Optional list of works rendered as bars packed into sub-lanes of this row
|
|
277
|
+
* (e.g. finishing works on one floor). Replaces the main bar for the row and
|
|
278
|
+
* grows the row height to fit concurrent activities. Works in gantt mode only.
|
|
279
|
+
*/
|
|
280
|
+
activities?: TaskActivity[];
|
|
281
|
+
/**
|
|
282
|
+
* ОН-конвейер (finish-to-start chain) for row activities. Inside the row every
|
|
283
|
+
* work follows the previous one; identical works of consecutive chained rows
|
|
284
|
+
* (floors) are linked too. `true` — жёсткий конвейер: перетаскивание сдвигает
|
|
285
|
+
* всю цепочку ниже на ту же дельту. `'push'` — режим «выталкивания» (ASAP):
|
|
286
|
+
* промежутки заполняются при движении вверх по потоку, вниз последователь
|
|
287
|
+
* сдвигается только после коллизии; лаг работы держит зазор постоянным.
|
|
288
|
+
*/
|
|
289
|
+
activityChain?: boolean | 'push';
|
|
224
290
|
}
|
|
225
291
|
/**
|
|
226
292
|
* Date range for Gantt chart display
|
|
@@ -772,4 +838,4 @@ type ScaleTaskSubtreeResult = {
|
|
|
772
838
|
*/
|
|
773
839
|
declare function scaleTaskSubtreeDuration(parentId: string, targetDuration: number, snapshot: Task[], options?: ScaleTaskSubtreeOptions): ScaleTaskSubtreeResult;
|
|
774
840
|
|
|
775
|
-
export {
|
|
841
|
+
export { getSuccessorChain as $, type ActivityTooltipContext as A, type BuiltInResourceTableColumnId as B, type CriticalPathOptions as C, DAY_MS as D, calculateSuccessorDate as E, cascadeByLinks as F, type GanttScheduleIntent as G, clampTaskRangeForIncomingFS as H, computeCriticalPath as I, computeLagFromDates as J, computeParentDates as K, type LinkType as L, type MonthSpan as M, computeParentProgress as N, detectCycles as O, extendCriticalIdsToParents as P, findParentId as Q, type ResourceTimelineItem as R, type ScaleTaskSubtreeResult as S, type Task as T, getAllDependencyEdges as U, type ValidationResult as V, type WeekendBlock as W, getAllDescendants as X, getBusinessDayOffset as Y, getChildren as Z, getDependencyLag as _, type GanttDateRange as a, getTaskDuration as a0, getTransitiveCascadeChain as a1, isAncestorTask as a2, isTaskParent as a3, moveTaskRange as a4, moveTaskWithCascade as a5, normalizeDependencyLag as a6, normalizePredecessorDates as a7, normalizeTaskDependencyLags as a8, normalizeUTCDate as a9, parseDateOnly as aa, recalculateIncomingLags as ab, recalculateProjectSchedule as ac, recalculateTaskFromDependencies as ad, reflowTasksOnModeSwitch as ae, removeDependenciesBetweenTasks as af, resizeTaskWithCascade as ag, scaleTaskSubtreeDuration as ah, shiftBusinessDayOffset as ai, universalCascade as aj, validateDependencies as ak, type CascadeContext as al, type ScheduleCommandOptions as am, type ScheduleCommandResult as an, type ScheduleDependency as ao, type ScheduleTask as ap, type ScheduleTaskUpdate as aq, type TaskDependency as ar, addBusinessDays as as, cascadeTaskProgress as at, createCascadeContext as au, getBusinessDaysCount as av, subtractBusinessDays as aw, type TimelineMarker as b, type TaskDateChangeMode as c, type ResourcePlannerChartProps as d, type TaskActivity as e, type ResourceTimelineResource as f, type DependencyError as g, type GanttChartMode as h, type GridConfig as i, type GridLine as j, type ResourceTableColumnId as k, type ResourceTableColumnWidthMap as l, type ResourceTimelineMove as m, type ResourceTimelineResourceMenuCommand as n, type ScaleTaskSubtreeAnchor as o, type ScaleTaskSubtreeErrorCode as p, type ScaleTaskSubtreeExternalPolicy as q, type ScaleTaskSubtreeOptions as r, type ScaleTaskSubtreeWarning as s, type TaskActivityTooltipField as t, type TaskBarGeometry as u, alignToWorkingDay as v, areTasksHierarchicallyRelated as w, buildAdjacencyList as x, buildTaskRangeFromEnd as y, buildTaskRangeFromStart as z };
|
|
@@ -159,6 +159,57 @@ interface ValidationResult {
|
|
|
159
159
|
/** Array of errors/warnings (empty if valid) */
|
|
160
160
|
errors: DependencyError[];
|
|
161
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* A single work bar rendered inside a multi-activity task row.
|
|
164
|
+
* Activities are visual bars packed into sub-lanes of one row — no hierarchy,
|
|
165
|
+
* no dependencies, no progress of their own.
|
|
166
|
+
*/
|
|
167
|
+
interface TaskActivityTooltipField {
|
|
168
|
+
/** Field caption, e.g. "Подрядчик" */
|
|
169
|
+
label: string;
|
|
170
|
+
/** Field value — any renderable content (string, badge, icon, JSX) */
|
|
171
|
+
value: ReactNode;
|
|
172
|
+
}
|
|
173
|
+
interface TaskActivity {
|
|
174
|
+
/** Unique identifier within the host task */
|
|
175
|
+
id: string;
|
|
176
|
+
/** Display name rendered inside the activity bar */
|
|
177
|
+
name: string;
|
|
178
|
+
/** Activity start date (ISO string or Date object) */
|
|
179
|
+
startDate: string | Date;
|
|
180
|
+
/** Activity end date (ISO string or Date object) */
|
|
181
|
+
endDate: string | Date;
|
|
182
|
+
/** Optional color; falls back to the default task bar color */
|
|
183
|
+
color?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Обязательный зазор в днях между концом предыдущей работы этой же строки
|
|
186
|
+
* (этажа) и началом этой (например технологическая выдержка). Задан — зазор
|
|
187
|
+
* постоянный; не задан — последователь подтягивается вплотную («как можно
|
|
188
|
+
* раньше»), а зазор тянется, пока его держит другая связь. На вертикальную
|
|
189
|
+
* связь «та же работа этажом выше» лаг не переносится.
|
|
190
|
+
*/
|
|
191
|
+
lag?: number;
|
|
192
|
+
/** Extra rows rendered in the hover tooltip under the header (e.g. contractor). */
|
|
193
|
+
tooltipFields?: TaskActivityTooltipField[];
|
|
194
|
+
/**
|
|
195
|
+
* Прогресс работы 0–100 (визуальное заполнение полосы слева направо и строка
|
|
196
|
+
* «Готовность» в подсказке). Как и у Task.progress — только визуал.
|
|
197
|
+
*/
|
|
198
|
+
progress?: number;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Context handed to the `activityTooltip` render prop: everything needed to
|
|
202
|
+
* compose a custom activity tooltip (dates, duration, host task, work).
|
|
203
|
+
*/
|
|
204
|
+
interface ActivityTooltipContext {
|
|
205
|
+
task: Task;
|
|
206
|
+
activity: TaskActivity;
|
|
207
|
+
startDate: Date;
|
|
208
|
+
endDate: Date;
|
|
209
|
+
durationDays: number;
|
|
210
|
+
/** Прогресс работы 0–100, если задан. */
|
|
211
|
+
progress?: number;
|
|
212
|
+
}
|
|
162
213
|
/**
|
|
163
214
|
* Task data structure for Gantt chart
|
|
164
215
|
*/
|
|
@@ -221,6 +272,21 @@ interface Task {
|
|
|
221
272
|
planByDate?: Record<string, number>;
|
|
222
273
|
/** Optional actual quantities keyed by ISO date (YYYY-MM-DD), used by plan-fact mode. */
|
|
223
274
|
factByDate?: Record<string, number>;
|
|
275
|
+
/**
|
|
276
|
+
* Optional list of works rendered as bars packed into sub-lanes of this row
|
|
277
|
+
* (e.g. finishing works on one floor). Replaces the main bar for the row and
|
|
278
|
+
* grows the row height to fit concurrent activities. Works in gantt mode only.
|
|
279
|
+
*/
|
|
280
|
+
activities?: TaskActivity[];
|
|
281
|
+
/**
|
|
282
|
+
* ОН-конвейер (finish-to-start chain) for row activities. Inside the row every
|
|
283
|
+
* work follows the previous one; identical works of consecutive chained rows
|
|
284
|
+
* (floors) are linked too. `true` — жёсткий конвейер: перетаскивание сдвигает
|
|
285
|
+
* всю цепочку ниже на ту же дельту. `'push'` — режим «выталкивания» (ASAP):
|
|
286
|
+
* промежутки заполняются при движении вверх по потоку, вниз последователь
|
|
287
|
+
* сдвигается только после коллизии; лаг работы держит зазор постоянным.
|
|
288
|
+
*/
|
|
289
|
+
activityChain?: boolean | 'push';
|
|
224
290
|
}
|
|
225
291
|
/**
|
|
226
292
|
* Date range for Gantt chart display
|
|
@@ -772,4 +838,4 @@ type ScaleTaskSubtreeResult = {
|
|
|
772
838
|
*/
|
|
773
839
|
declare function scaleTaskSubtreeDuration(parentId: string, targetDuration: number, snapshot: Task[], options?: ScaleTaskSubtreeOptions): ScaleTaskSubtreeResult;
|
|
774
840
|
|
|
775
|
-
export {
|
|
841
|
+
export { getSuccessorChain as $, type ActivityTooltipContext as A, type BuiltInResourceTableColumnId as B, type CriticalPathOptions as C, DAY_MS as D, calculateSuccessorDate as E, cascadeByLinks as F, type GanttScheduleIntent as G, clampTaskRangeForIncomingFS as H, computeCriticalPath as I, computeLagFromDates as J, computeParentDates as K, type LinkType as L, type MonthSpan as M, computeParentProgress as N, detectCycles as O, extendCriticalIdsToParents as P, findParentId as Q, type ResourceTimelineItem as R, type ScaleTaskSubtreeResult as S, type Task as T, getAllDependencyEdges as U, type ValidationResult as V, type WeekendBlock as W, getAllDescendants as X, getBusinessDayOffset as Y, getChildren as Z, getDependencyLag as _, type GanttDateRange as a, getTaskDuration as a0, getTransitiveCascadeChain as a1, isAncestorTask as a2, isTaskParent as a3, moveTaskRange as a4, moveTaskWithCascade as a5, normalizeDependencyLag as a6, normalizePredecessorDates as a7, normalizeTaskDependencyLags as a8, normalizeUTCDate as a9, parseDateOnly as aa, recalculateIncomingLags as ab, recalculateProjectSchedule as ac, recalculateTaskFromDependencies as ad, reflowTasksOnModeSwitch as ae, removeDependenciesBetweenTasks as af, resizeTaskWithCascade as ag, scaleTaskSubtreeDuration as ah, shiftBusinessDayOffset as ai, universalCascade as aj, validateDependencies as ak, type CascadeContext as al, type ScheduleCommandOptions as am, type ScheduleCommandResult as an, type ScheduleDependency as ao, type ScheduleTask as ap, type ScheduleTaskUpdate as aq, type TaskDependency as ar, addBusinessDays as as, cascadeTaskProgress as at, createCascadeContext as au, getBusinessDaysCount as av, subtractBusinessDays as aw, type TimelineMarker as b, type TaskDateChangeMode as c, type ResourcePlannerChartProps as d, type TaskActivity as e, type ResourceTimelineResource as f, type DependencyError as g, type GanttChartMode as h, type GridConfig as i, type GridLine as j, type ResourceTableColumnId as k, type ResourceTableColumnWidthMap as l, type ResourceTimelineMove as m, type ResourceTimelineResourceMenuCommand as n, type ScaleTaskSubtreeAnchor as o, type ScaleTaskSubtreeErrorCode as p, type ScaleTaskSubtreeExternalPolicy as q, type ScaleTaskSubtreeOptions as r, type ScaleTaskSubtreeWarning as s, type TaskActivityTooltipField as t, type TaskBarGeometry as u, alignToWorkingDay as v, areTasksHierarchicallyRelated as w, buildAdjacencyList as x, buildTaskRangeFromEnd as y, buildTaskRangeFromStart as z };
|