gantt-lib 0.118.2 → 0.120.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/dist/core/scheduling/index.d.mts +1 -1
- package/dist/core/scheduling/index.d.ts +1 -1
- package/dist/{index-DpZmO95L.d.mts → index-OZVb2o_D.d.mts} +6 -0
- package/dist/{index-DpZmO95L.d.ts → index-OZVb2o_D.d.ts} +6 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -13
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +8 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React$1, { ReactNode } from 'react';
|
|
2
|
-
import { T as Task$1, R as ResourceTimelineItem, V as ValidationResult, a as TimelineMarker, b as TaskDateChangeMode, c as ResourcePlannerChartProps, d as ResourceTimelineResource } from './index-
|
|
3
|
-
export { B as BuiltInResourceTableColumnId, D as DAY_MS, e as DependencyError, G as GanttChartMode, f as GanttDateRange, g as GridConfig, h as GridLine, L as LinkType, M as MonthSpan, i as ResourceTableColumnId, j as ResourceTableColumnWidthMap, k as ResourceTimelineMove, l as ResourceTimelineResourceMenuCommand, m as TaskBarGeometry, W as WeekendBlock, n as alignToWorkingDay, o as areTasksHierarchicallyRelated, p as buildAdjacencyList, q as buildTaskRangeFromEnd, r as buildTaskRangeFromStart, s as calculateSuccessorDate, t as cascadeByLinks, u as clampTaskRangeForIncomingFS, v as computeLagFromDates, w as computeParentDates, x as computeParentProgress, y as detectCycles, z as findParentId, A as getAllDependencyEdges, C as getAllDescendants, E as getBusinessDayOffset, F as getChildren, H as getDependencyLag, I as getSuccessorChain, J as getTaskDuration, K as getTransitiveCascadeChain, N as isAncestorTask, O as isTaskParent, P as moveTaskRange, Q as moveTaskWithCascade, S as normalizeDependencyLag, U as normalizePredecessorDates, X as normalizeTaskDependencyLags, Y as normalizeUTCDate, Z as parseDateOnly, _ as recalculateIncomingLags, $ as recalculateProjectSchedule, a0 as recalculateTaskFromDependencies, a1 as reflowTasksOnModeSwitch, a2 as removeDependenciesBetweenTasks, a3 as resizeTaskWithCascade, a4 as shiftBusinessDayOffset, a5 as universalCascade, a6 as validateDependencies } from './index-
|
|
2
|
+
import { T as Task$1, R as ResourceTimelineItem, V as ValidationResult, a as TimelineMarker, b as TaskDateChangeMode, c as ResourcePlannerChartProps, d as ResourceTimelineResource } from './index-OZVb2o_D.mjs';
|
|
3
|
+
export { B as BuiltInResourceTableColumnId, D as DAY_MS, e as DependencyError, G as GanttChartMode, f as GanttDateRange, g as GridConfig, h as GridLine, L as LinkType, M as MonthSpan, i as ResourceTableColumnId, j as ResourceTableColumnWidthMap, k as ResourceTimelineMove, l as ResourceTimelineResourceMenuCommand, m as TaskBarGeometry, W as WeekendBlock, n as alignToWorkingDay, o as areTasksHierarchicallyRelated, p as buildAdjacencyList, q as buildTaskRangeFromEnd, r as buildTaskRangeFromStart, s as calculateSuccessorDate, t as cascadeByLinks, u as clampTaskRangeForIncomingFS, v as computeLagFromDates, w as computeParentDates, x as computeParentProgress, y as detectCycles, z as findParentId, A as getAllDependencyEdges, C as getAllDescendants, E as getBusinessDayOffset, F as getChildren, H as getDependencyLag, I as getSuccessorChain, J as getTaskDuration, K as getTransitiveCascadeChain, N as isAncestorTask, O as isTaskParent, P as moveTaskRange, Q as moveTaskWithCascade, S as normalizeDependencyLag, U as normalizePredecessorDates, X as normalizeTaskDependencyLags, Y as normalizeUTCDate, Z as parseDateOnly, _ as recalculateIncomingLags, $ as recalculateProjectSchedule, a0 as recalculateTaskFromDependencies, a1 as reflowTasksOnModeSwitch, a2 as removeDependenciesBetweenTasks, a3 as resizeTaskWithCascade, a4 as shiftBusinessDayOffset, a5 as universalCascade, a6 as validateDependencies } from './index-OZVb2o_D.mjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
6
6
|
|
|
@@ -486,6 +486,8 @@ interface Task {
|
|
|
486
486
|
* The line spans the full grid width.
|
|
487
487
|
*/
|
|
488
488
|
divider?: 'top' | 'bottom';
|
|
489
|
+
/** Whether task dates match the linked work template (visual indicator only) */
|
|
490
|
+
synced?: boolean;
|
|
489
491
|
}
|
|
490
492
|
/**
|
|
491
493
|
* Task dependency definition
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React$1, { ReactNode } from 'react';
|
|
2
|
-
import { T as Task$1, R as ResourceTimelineItem, V as ValidationResult, a as TimelineMarker, b as TaskDateChangeMode, c as ResourcePlannerChartProps, d as ResourceTimelineResource } from './index-
|
|
3
|
-
export { B as BuiltInResourceTableColumnId, D as DAY_MS, e as DependencyError, G as GanttChartMode, f as GanttDateRange, g as GridConfig, h as GridLine, L as LinkType, M as MonthSpan, i as ResourceTableColumnId, j as ResourceTableColumnWidthMap, k as ResourceTimelineMove, l as ResourceTimelineResourceMenuCommand, m as TaskBarGeometry, W as WeekendBlock, n as alignToWorkingDay, o as areTasksHierarchicallyRelated, p as buildAdjacencyList, q as buildTaskRangeFromEnd, r as buildTaskRangeFromStart, s as calculateSuccessorDate, t as cascadeByLinks, u as clampTaskRangeForIncomingFS, v as computeLagFromDates, w as computeParentDates, x as computeParentProgress, y as detectCycles, z as findParentId, A as getAllDependencyEdges, C as getAllDescendants, E as getBusinessDayOffset, F as getChildren, H as getDependencyLag, I as getSuccessorChain, J as getTaskDuration, K as getTransitiveCascadeChain, N as isAncestorTask, O as isTaskParent, P as moveTaskRange, Q as moveTaskWithCascade, S as normalizeDependencyLag, U as normalizePredecessorDates, X as normalizeTaskDependencyLags, Y as normalizeUTCDate, Z as parseDateOnly, _ as recalculateIncomingLags, $ as recalculateProjectSchedule, a0 as recalculateTaskFromDependencies, a1 as reflowTasksOnModeSwitch, a2 as removeDependenciesBetweenTasks, a3 as resizeTaskWithCascade, a4 as shiftBusinessDayOffset, a5 as universalCascade, a6 as validateDependencies } from './index-
|
|
2
|
+
import { T as Task$1, R as ResourceTimelineItem, V as ValidationResult, a as TimelineMarker, b as TaskDateChangeMode, c as ResourcePlannerChartProps, d as ResourceTimelineResource } from './index-OZVb2o_D.js';
|
|
3
|
+
export { B as BuiltInResourceTableColumnId, D as DAY_MS, e as DependencyError, G as GanttChartMode, f as GanttDateRange, g as GridConfig, h as GridLine, L as LinkType, M as MonthSpan, i as ResourceTableColumnId, j as ResourceTableColumnWidthMap, k as ResourceTimelineMove, l as ResourceTimelineResourceMenuCommand, m as TaskBarGeometry, W as WeekendBlock, n as alignToWorkingDay, o as areTasksHierarchicallyRelated, p as buildAdjacencyList, q as buildTaskRangeFromEnd, r as buildTaskRangeFromStart, s as calculateSuccessorDate, t as cascadeByLinks, u as clampTaskRangeForIncomingFS, v as computeLagFromDates, w as computeParentDates, x as computeParentProgress, y as detectCycles, z as findParentId, A as getAllDependencyEdges, C as getAllDescendants, E as getBusinessDayOffset, F as getChildren, H as getDependencyLag, I as getSuccessorChain, J as getTaskDuration, K as getTransitiveCascadeChain, N as isAncestorTask, O as isTaskParent, P as moveTaskRange, Q as moveTaskWithCascade, S as normalizeDependencyLag, U as normalizePredecessorDates, X as normalizeTaskDependencyLags, Y as normalizeUTCDate, Z as parseDateOnly, _ as recalculateIncomingLags, $ as recalculateProjectSchedule, a0 as recalculateTaskFromDependencies, a1 as reflowTasksOnModeSwitch, a2 as removeDependenciesBetweenTasks, a3 as resizeTaskWithCascade, a4 as shiftBusinessDayOffset, a5 as universalCascade, a6 as validateDependencies } from './index-OZVb2o_D.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
6
6
|
|
|
@@ -486,6 +486,8 @@ interface Task {
|
|
|
486
486
|
* The line spans the full grid width.
|
|
487
487
|
*/
|
|
488
488
|
divider?: 'top' | 'bottom';
|
|
489
|
+
/** Whether task dates match the linked work template (visual indicator only) */
|
|
490
|
+
synced?: boolean;
|
|
489
491
|
}
|
|
490
492
|
/**
|
|
491
493
|
* Task dependency definition
|
package/dist/index.js
CHANGED
|
@@ -2980,7 +2980,7 @@ var useTaskDrag = (options) => {
|
|
|
2980
2980
|
// src/components/TaskRow/TaskRow.tsx
|
|
2981
2981
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
2982
2982
|
var arePropsEqual = (prevProps, nextProps) => {
|
|
2983
|
-
return prevProps.task.id === nextProps.task.id && prevProps.task.name === nextProps.task.name && prevProps.task.startDate === nextProps.task.startDate && prevProps.task.endDate === nextProps.task.endDate && prevProps.task.baselineStartDate === nextProps.task.baselineStartDate && prevProps.task.baselineEndDate === nextProps.task.baselineEndDate && prevProps.task.type === nextProps.task.type && prevProps.task.color === nextProps.task.color && prevProps.task.progress === nextProps.task.progress && prevProps.task.accepted === nextProps.task.accepted && prevProps.monthStart.getTime() === nextProps.monthStart.getTime() && prevProps.dayWidth === nextProps.dayWidth && prevProps.rowHeight === nextProps.rowHeight && prevProps.overridePosition?.left === nextProps.overridePosition?.left && prevProps.overridePosition?.width === nextProps.overridePosition?.width && prevProps.previewPositionStore === nextProps.previewPositionStore && prevProps.allTasks === nextProps.allTasks && prevProps.disableConstraints === nextProps.disableConstraints && prevProps.task.locked === nextProps.task.locked && prevProps.task.divider === nextProps.task.divider && prevProps.highlightExpiredTasks === nextProps.highlightExpiredTasks && prevProps.showBaseline === nextProps.showBaseline && prevProps.isFilterMatch === nextProps.isFilterMatch && prevProps.businessDays === nextProps.businessDays && prevProps.customDays === nextProps.customDays && prevProps.isWeekend === nextProps.isWeekend && prevProps.disableTaskDrag === nextProps.disableTaskDrag && prevProps.viewMode === nextProps.viewMode;
|
|
2983
|
+
return prevProps.task.id === nextProps.task.id && prevProps.task.name === nextProps.task.name && prevProps.task.startDate === nextProps.task.startDate && prevProps.task.endDate === nextProps.task.endDate && prevProps.task.baselineStartDate === nextProps.task.baselineStartDate && prevProps.task.baselineEndDate === nextProps.task.baselineEndDate && prevProps.task.type === nextProps.task.type && prevProps.task.color === nextProps.task.color && prevProps.task.progress === nextProps.task.progress && prevProps.task.accepted === nextProps.task.accepted && prevProps.monthStart.getTime() === nextProps.monthStart.getTime() && prevProps.dayWidth === nextProps.dayWidth && prevProps.rowHeight === nextProps.rowHeight && prevProps.overridePosition?.left === nextProps.overridePosition?.left && prevProps.overridePosition?.width === nextProps.overridePosition?.width && prevProps.previewPositionStore === nextProps.previewPositionStore && prevProps.allTasks === nextProps.allTasks && prevProps.disableConstraints === nextProps.disableConstraints && prevProps.task.locked === nextProps.task.locked && prevProps.task.synced === nextProps.task.synced && prevProps.task.divider === nextProps.task.divider && prevProps.highlightExpiredTasks === nextProps.highlightExpiredTasks && prevProps.showBaseline === nextProps.showBaseline && prevProps.isFilterMatch === nextProps.isFilterMatch && prevProps.businessDays === nextProps.businessDays && prevProps.customDays === nextProps.customDays && prevProps.isWeekend === nextProps.isWeekend && prevProps.disableTaskDrag === nextProps.disableTaskDrag && prevProps.viewMode === nextProps.viewMode;
|
|
2984
2984
|
};
|
|
2985
2985
|
var TaskRow = import_react3.default.memo(
|
|
2986
2986
|
({ task, monthStart, dayWidth, rowHeight, onTasksChange, onDragStateChange, rowIndex, allTasks, enableAutoSchedule, disableConstraints, overridePosition, previewPositionStore, onCascadeProgress, onCascade, divider, highlightExpiredTasks, showBaseline = false, isFilterMatch = false, businessDays, customDays, isWeekend: isWeekend3, disableTaskDrag = false, viewMode = "day" }) => {
|
|
@@ -3137,13 +3137,13 @@ var TaskRow = import_react3.default.memo(
|
|
|
3137
3137
|
(currentEndDate.getTime() - currentStartDate.getTime()) / (1e3 * 60 * 60 * 24)
|
|
3138
3138
|
) + 1;
|
|
3139
3139
|
const getChildCountLabel = (count) => {
|
|
3140
|
-
if (count === 1) return "1 \
|
|
3140
|
+
if (count === 1) return "1 \u0440\u0430\u0431\u043E\u0442\u0430";
|
|
3141
3141
|
const lastTwoDigits = count % 100;
|
|
3142
3142
|
const lastDigit = count % 10;
|
|
3143
|
-
if (lastTwoDigits >= 11 && lastTwoDigits <= 14) return `${count} \
|
|
3144
|
-
if (lastDigit === 1) return `${count} \
|
|
3145
|
-
if (lastDigit >= 2 && lastDigit <= 4) return `${count} \
|
|
3146
|
-
return `${count} \
|
|
3143
|
+
if (lastTwoDigits >= 11 && lastTwoDigits <= 14) return `${count} \u0440\u0430\u0431\u043E\u0442`;
|
|
3144
|
+
if (lastDigit === 1) return `${count} \u0440\u0430\u0431\u043E\u0442\u0430`;
|
|
3145
|
+
if (lastDigit >= 2 && lastDigit <= 4) return `${count} \u0440\u0430\u0431\u043E\u0442\u044B`;
|
|
3146
|
+
return `${count} \u0440\u0430\u0431\u043E\u0442`;
|
|
3147
3147
|
};
|
|
3148
3148
|
const estimatedTextWidth = isParent ? 120 : durationDays >= 10 ? 76 : 62;
|
|
3149
3149
|
const showProgressInside = !milestone && progressWidth > 0 && displayWidth > estimatedTextWidth;
|
|
@@ -3173,7 +3173,7 @@ var TaskRow = import_react3.default.memo(
|
|
|
3173
3173
|
"div",
|
|
3174
3174
|
{
|
|
3175
3175
|
"data-taskbar": true,
|
|
3176
|
-
className: `gantt-tr-taskBar ${isDragging ? "gantt-tr-dragging" : ""} ${task.locked ? "gantt-tr-locked" : ""} ${isParent ? "gantt-tr-parentBar" : ""} ${milestone ? "gantt-tr-milestone" : ""}`,
|
|
3176
|
+
className: `gantt-tr-taskBar ${isDragging ? "gantt-tr-dragging" : ""} ${task.locked ? "gantt-tr-locked" : ""} ${task.synced === false ? "gantt-tr-unsynced" : ""} ${isParent ? "gantt-tr-parentBar" : ""} ${milestone ? "gantt-tr-milestone" : ""}`,
|
|
3177
3177
|
style: {
|
|
3178
3178
|
left: `${visualLeft}px`,
|
|
3179
3179
|
...barStyle,
|
|
@@ -6017,7 +6017,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6017
6017
|
{
|
|
6018
6018
|
type: "checkbox",
|
|
6019
6019
|
className: "gantt-tl-selection-checkbox",
|
|
6020
|
-
"aria-label": `\u0412\u044B\u0431\u0440\u0430\u0442\u044C \
|
|
6020
|
+
"aria-label": `\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443 ${taskNumber ? `${taskNumber}. ` : ""}${task.name}`,
|
|
6021
6021
|
checked: isTaskSelected,
|
|
6022
6022
|
onChange: (event) => onTaskSelectionChange?.(task.id, event.target.checked)
|
|
6023
6023
|
}
|
|
@@ -6262,14 +6262,14 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6262
6262
|
});
|
|
6263
6263
|
const newTask = {
|
|
6264
6264
|
id: crypto.randomUUID(),
|
|
6265
|
-
name: "\u041D\u043E\u0432\u0430\u044F \
|
|
6265
|
+
name: "\u041D\u043E\u0432\u0430\u044F \u0440\u0430\u0431\u043E\u0442\u0430",
|
|
6266
6266
|
startDate: range.startDate,
|
|
6267
6267
|
endDate: range.endDate,
|
|
6268
6268
|
parentId: task.parentId
|
|
6269
6269
|
};
|
|
6270
6270
|
onInsertAfter(task.id, newTask);
|
|
6271
6271
|
},
|
|
6272
|
-
"aria-label": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \
|
|
6272
|
+
"aria-label": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443 \u043F\u043E\u0441\u043B\u0435 \u044D\u0442\u043E\u0439",
|
|
6273
6273
|
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PlusIcon, {})
|
|
6274
6274
|
}
|
|
6275
6275
|
),
|
|
@@ -6431,7 +6431,7 @@ var TaskListRow = import_react11.default.memo(
|
|
|
6431
6431
|
},
|
|
6432
6432
|
children: [
|
|
6433
6433
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TrashIcon, {}),
|
|
6434
|
-
"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \
|
|
6434
|
+
"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443"
|
|
6435
6435
|
]
|
|
6436
6436
|
}
|
|
6437
6437
|
)
|
|
@@ -7297,7 +7297,7 @@ var SelectAllCheckbox = ({
|
|
|
7297
7297
|
ref,
|
|
7298
7298
|
type: "checkbox",
|
|
7299
7299
|
className: "gantt-tl-selection-checkbox",
|
|
7300
|
-
"aria-label": "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435 \u0432\u0438\u0434\u0438\u043C\u044B\u0435 \
|
|
7300
|
+
"aria-label": "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435 \u0432\u0438\u0434\u0438\u043C\u044B\u0435 \u0440\u0430\u0431\u043E\u0442\u044B",
|
|
7301
7301
|
checked,
|
|
7302
7302
|
onChange: (event) => onChange(event.target.checked),
|
|
7303
7303
|
onClick: (event) => event.stopPropagation()
|
|
@@ -8378,7 +8378,7 @@ var TaskList = ({
|
|
|
8378
8378
|
handleDrop(visibleTasks.length, e);
|
|
8379
8379
|
},
|
|
8380
8380
|
type: "button",
|
|
8381
|
-
children: "+ \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \
|
|
8381
|
+
children: "+ \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443"
|
|
8382
8382
|
}
|
|
8383
8383
|
)
|
|
8384
8384
|
] })
|