gantt-lib 0.132.2 → 0.132.3

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/index.d.mts CHANGED
@@ -614,6 +614,8 @@ interface TaskChartSharedProps<TTask extends Task = Task> {
614
614
  showChart?: boolean;
615
615
  /** Display-only placeholder rows appended below the currently available task rows. */
616
616
  skeletonRowCount?: number;
617
+ /** Shift skeleton chart bars by this many days relative to today (negative values start earlier). */
618
+ skeletonStartOffsetDays?: number;
617
619
  /** Optional vertical timeline markers such as deadlines and checkpoints. */
618
620
  timelineMarkers?: TimelineMarker[];
619
621
  /** Additional custom columns to render in the TaskList after built-in columns */
package/dist/index.d.ts CHANGED
@@ -614,6 +614,8 @@ interface TaskChartSharedProps<TTask extends Task = Task> {
614
614
  showChart?: boolean;
615
615
  /** Display-only placeholder rows appended below the currently available task rows. */
616
616
  skeletonRowCount?: number;
617
+ /** Shift skeleton chart bars by this many days relative to today (negative values start earlier). */
618
+ skeletonStartOffsetDays?: number;
617
619
  /** Optional vertical timeline markers such as deadlines and checkpoints. */
618
620
  timelineMarkers?: TimelineMarker[];
619
621
  /** Additional custom columns to render in the TaskList after built-in columns */
package/dist/index.js CHANGED
@@ -14037,6 +14037,7 @@ function TaskGanttChartInner(props, ref) {
14037
14037
  disableTaskDrag = false,
14038
14038
  showChart = true,
14039
14039
  skeletonRowCount = 0,
14040
+ skeletonStartOffsetDays = 0,
14040
14041
  timelineMarkers,
14041
14042
  additionalColumns,
14042
14043
  hiddenTaskListColumns,
@@ -15489,7 +15490,7 @@ function TaskGanttChartInner(props, ref) {
15489
15490
  variant: "chart",
15490
15491
  startIndex: visibleTasks.length,
15491
15492
  chartDayWidth: dayWidth,
15492
- chartStartDayOffset: todayInRange ? todayIndex : 0
15493
+ chartStartDayOffset: todayInRange ? Math.max(0, todayIndex + Math.floor(Number.isFinite(skeletonStartOffsetDays) ? skeletonStartOffsetDays : 0)) : 0
15493
15494
  }
15494
15495
  )
15495
15496
  ]