@libxai/board 1.4.27 → 1.5.1

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.cts CHANGED
@@ -215,6 +215,8 @@ interface GanttPermissions {
215
215
  canExport?: boolean;
216
216
  canToggleExpansion?: boolean;
217
217
  canPerformAction?: (task: Task, action: 'create' | 'update' | 'delete' | 'assign' | 'progress') => boolean;
218
+ /** v4.1.0: Per-task edit check — when provided, each task bar uses this to determine read-only state */
219
+ canEditTask?: (task: Task) => boolean;
218
220
  }
219
221
  /**
220
222
  * Scroll behavior configuration for timeline interactions
@@ -361,6 +363,7 @@ interface GanttConfig {
361
363
  rowDensity?: RowDensity;
362
364
  showThemeSelector?: boolean;
363
365
  showExportButton?: boolean;
366
+ projectName?: string;
364
367
  availableUsers?: Array<{
365
368
  id: string;
366
369
  name: string;
@@ -449,6 +452,29 @@ interface GanttConfig {
449
452
  * @default false
450
453
  */
451
454
  autoExpandSubtasks?: boolean;
455
+ /**
456
+ * Show task name labels inside task bars
457
+ * @default true
458
+ */
459
+ showTaskBarLabels?: boolean;
460
+ /**
461
+ * Show/hide critical path highlighting (red border + glow on critical tasks)
462
+ * @default true
463
+ */
464
+ showCriticalPath?: boolean;
465
+ onShowCriticalPathChange?: (show: boolean) => void;
466
+ /**
467
+ * Show/hide dependency connector arrows between tasks
468
+ * @default true
469
+ */
470
+ showDependencies?: boolean;
471
+ onShowDependenciesChange?: (show: boolean) => void;
472
+ /**
473
+ * Highlight weekend columns with shading/hatch pattern
474
+ * @default true
475
+ */
476
+ highlightWeekends?: boolean;
477
+ onHighlightWeekendsChange?: (show: boolean) => void;
452
478
  /**
453
479
  * v3.0.0: Show baseline ghost bars behind actual bars (Oracle view)
454
480
  * When true, tasks with baselineStartDate/baselineEndDate show a dashed outline behind the actual bar
@@ -467,6 +493,11 @@ interface GanttConfig {
467
493
  * When provided, replaces hardcoded placeholder values with real metrics
468
494
  */
469
495
  projectForecast?: ProjectForecast;
496
+ /**
497
+ * Callback for "Copy Snapshot Link" in the Share dropdown
498
+ * When provided, shows the option in the export/share menu
499
+ */
500
+ onCopySnapshotLink?: () => void;
470
501
  onThemeChange?: (theme: Theme$1) => void;
471
502
  onTimeScaleChange?: (timeScale: TimeScale) => void;
472
503
  onZoomChange?: (zoom: number) => void;
@@ -1724,6 +1755,8 @@ interface ColumnProps {
1724
1755
  className?: string;
1725
1756
  /** v2.0.0: Custom metrics renderer below column header */
1726
1757
  renderMetrics?: (column: Column$1, cards: Card$1[]) => React.ReactNode;
1758
+ /** Locale for i18n */
1759
+ locale?: 'en' | 'es';
1727
1760
  }
1728
1761
  /**
1729
1762
  * Column Component
@@ -2708,12 +2741,21 @@ interface GanttToolbarProps {
2708
2741
  onExportCSV?: () => void;
2709
2742
  onExportJSON?: () => void;
2710
2743
  onExportMSProject?: () => void;
2744
+ showCriticalPath?: boolean;
2745
+ onShowCriticalPathChange?: (show: boolean) => void;
2746
+ showDependencies?: boolean;
2747
+ onShowDependenciesChange?: (show: boolean) => void;
2748
+ highlightWeekends?: boolean;
2749
+ onHighlightWeekendsChange?: (show: boolean) => void;
2750
+ showBaseline?: boolean;
2751
+ onShowBaselineChange?: (show: boolean) => void;
2752
+ onCopySnapshotLink?: () => void;
2711
2753
  }
2712
2754
  declare function GanttToolbar({ theme, timeScale, onTimeScaleChange, zoom, onZoomChange, currentTheme, onThemeChange, rowDensity, onRowDensityChange, showThemeSelector, // v0.17.29: Default to false - themes should be in app settings
2713
2755
  showCreateTaskButton, createTaskLabel, // v0.15.0: Will use translations if not provided
2714
2756
  onCreateTask, taskFilter, // v0.17.300: Task filter
2715
2757
  onTaskFilterChange, hideCompleted, // v0.18.0: Hide completed toggle
2716
- onHideCompletedChange, toolbarRightContent, wbsLevel, onWbsLevelChange, maxWbsDepth, viewMode, onViewModeChange, projectForecast, onExportPNG, onExportPDF, onExportExcel, onExportCSV, onExportJSON, onExportMSProject, }: GanttToolbarProps): react_jsx_runtime.JSX.Element;
2758
+ onHideCompletedChange, toolbarRightContent, wbsLevel, onWbsLevelChange, maxWbsDepth, viewMode, onViewModeChange, projectForecast, onExportPNG, onExportPDF, onExportExcel, onExportCSV, onExportJSON, onExportMSProject, showCriticalPath, onShowCriticalPathChange, showDependencies, onShowDependenciesChange, highlightWeekends, onHighlightWeekendsChange, showBaseline, onShowBaselineChange, onCopySnapshotLink, }: GanttToolbarProps): react_jsx_runtime.JSX.Element;
2717
2759
 
2718
2760
  interface TaskGridProps {
2719
2761
  tasks: Task[];
@@ -2766,6 +2808,7 @@ interface TimelineProps {
2766
2808
  locale?: string;
2767
2809
  templates: Required<GanttTemplates>;
2768
2810
  dependencyLineStyle?: DependencyLineStyle;
2811
+ showTaskBarLabels?: boolean;
2769
2812
  onTaskClick?: (task: Task) => void;
2770
2813
  onTaskDblClick?: (task: Task) => void;
2771
2814
  onTaskContextMenu?: (task: Task, event: React.MouseEvent) => void;
@@ -2774,6 +2817,11 @@ interface TimelineProps {
2774
2817
  onDependencyDelete?: (taskId: string, dependencyId: string) => void;
2775
2818
  /** v3.0.0: Show baseline ghost bars behind actual bars (Oracle view) */
2776
2819
  showBaseline?: boolean;
2820
+ showCriticalPath?: boolean;
2821
+ showDependencies?: boolean;
2822
+ highlightWeekends?: boolean;
2823
+ /** v4.1.0: Per-task edit check — returns false for read-only bars */
2824
+ canEditTask?: (task: Task) => boolean;
2777
2825
  }
2778
2826
  interface TaskPosition {
2779
2827
  id: string;
@@ -2784,9 +2832,9 @@ interface TaskPosition {
2784
2832
  }
2785
2833
  declare function Timeline({ tasks, theme, rowHeight: ROW_HEIGHT, timeScale, startDate, endDate, zoom, locale, // v0.17.400: Default to English
2786
2834
  templates, dependencyLineStyle, // v0.17.310
2787
- onTaskClick, onTaskDblClick, // v0.8.0
2835
+ showTaskBarLabels, onTaskClick, onTaskDblClick, // v0.8.0
2788
2836
  onTaskContextMenu, // v0.8.0
2789
- onTaskDateChange, onDependencyCreate, onDependencyDelete, showBaseline, }: TimelineProps): react_jsx_runtime.JSX.Element;
2837
+ onTaskDateChange, onDependencyCreate, onDependencyDelete, showBaseline, showCriticalPath, showDependencies, highlightWeekends, canEditTask, }: TimelineProps): react_jsx_runtime.JSX.Element;
2790
2838
 
2791
2839
  interface TaskTooltipData {
2792
2840
  task: Task;
@@ -2814,12 +2862,16 @@ interface TaskBarProps {
2814
2862
  onDragMove?: (taskId: string, daysDelta: number, isDragging: boolean) => void;
2815
2863
  onHoverChange?: (tooltipData: TaskTooltipData | null) => void;
2816
2864
  showBaseline?: boolean;
2865
+ showTaskBarLabels?: boolean;
2866
+ showCriticalPath?: boolean;
2867
+ readOnly?: boolean;
2817
2868
  }
2818
2869
  declare function TaskBar({ task, x, y, width, theme, dayWidth, startDate, templates, onClick, onDoubleClick, // v0.8.0
2819
2870
  onContextMenu, // v0.8.0
2820
2871
  onDateChange, onDependencyCreate, allTaskPositions, onDragMove, // v0.13.0
2821
2872
  onHoverChange, // v0.17.76
2822
- showBaseline, }: TaskBarProps): react_jsx_runtime.JSX.Element;
2873
+ showBaseline, // v3.0.0
2874
+ showTaskBarLabels, showCriticalPath, readOnly, }: TaskBarProps): react_jsx_runtime.JSX.Element;
2823
2875
 
2824
2876
  interface DependencyLineProps {
2825
2877
  x1: number;
@@ -3460,9 +3512,16 @@ interface GanttTranslations {
3460
3512
  expectedFinish: string;
3461
3513
  confidence: string;
3462
3514
  costAtCompletion: string;
3515
+ delayLabel: string;
3516
+ earlyLabel: string;
3517
+ onTimeLabel: string;
3518
+ budgetOver: string;
3519
+ budgetUnder: string;
3463
3520
  baselines: string;
3464
3521
  visibility: string;
3465
3522
  share: string;
3523
+ copySnapshotLink: string;
3524
+ copied: string;
3466
3525
  };
3467
3526
  contextMenu: {
3468
3527
  editTask: string;
@@ -3776,6 +3835,9 @@ interface ProjectHealthData {
3776
3835
  color: string;
3777
3836
  utilizationPercent: number;
3778
3837
  }>;
3838
+ /** Total hours for the whole project (spent / allocated in minutes) */
3839
+ totalHoursSpentMinutes?: number;
3840
+ totalHoursAllocatedMinutes?: number;
3779
3841
  }
3780
3842
  /**
3781
3843
  * ListView configuration
@@ -3828,6 +3890,8 @@ interface ListViewConfig {
3828
3890
  enabled: boolean;
3829
3891
  data: ProjectHealthData;
3830
3892
  };
3893
+ /** Aggregate child hours into parent row hoursBar cell (default: false) */
3894
+ aggregateParentHours?: boolean;
3831
3895
  /**
3832
3896
  * Configuration for blurring financial data based on user permissions
3833
3897
  * When enabled, financial columns (soldEffortMinutes, quotedTime) will be blurred
package/dist/index.d.ts CHANGED
@@ -215,6 +215,8 @@ interface GanttPermissions {
215
215
  canExport?: boolean;
216
216
  canToggleExpansion?: boolean;
217
217
  canPerformAction?: (task: Task, action: 'create' | 'update' | 'delete' | 'assign' | 'progress') => boolean;
218
+ /** v4.1.0: Per-task edit check — when provided, each task bar uses this to determine read-only state */
219
+ canEditTask?: (task: Task) => boolean;
218
220
  }
219
221
  /**
220
222
  * Scroll behavior configuration for timeline interactions
@@ -361,6 +363,7 @@ interface GanttConfig {
361
363
  rowDensity?: RowDensity;
362
364
  showThemeSelector?: boolean;
363
365
  showExportButton?: boolean;
366
+ projectName?: string;
364
367
  availableUsers?: Array<{
365
368
  id: string;
366
369
  name: string;
@@ -449,6 +452,29 @@ interface GanttConfig {
449
452
  * @default false
450
453
  */
451
454
  autoExpandSubtasks?: boolean;
455
+ /**
456
+ * Show task name labels inside task bars
457
+ * @default true
458
+ */
459
+ showTaskBarLabels?: boolean;
460
+ /**
461
+ * Show/hide critical path highlighting (red border + glow on critical tasks)
462
+ * @default true
463
+ */
464
+ showCriticalPath?: boolean;
465
+ onShowCriticalPathChange?: (show: boolean) => void;
466
+ /**
467
+ * Show/hide dependency connector arrows between tasks
468
+ * @default true
469
+ */
470
+ showDependencies?: boolean;
471
+ onShowDependenciesChange?: (show: boolean) => void;
472
+ /**
473
+ * Highlight weekend columns with shading/hatch pattern
474
+ * @default true
475
+ */
476
+ highlightWeekends?: boolean;
477
+ onHighlightWeekendsChange?: (show: boolean) => void;
452
478
  /**
453
479
  * v3.0.0: Show baseline ghost bars behind actual bars (Oracle view)
454
480
  * When true, tasks with baselineStartDate/baselineEndDate show a dashed outline behind the actual bar
@@ -467,6 +493,11 @@ interface GanttConfig {
467
493
  * When provided, replaces hardcoded placeholder values with real metrics
468
494
  */
469
495
  projectForecast?: ProjectForecast;
496
+ /**
497
+ * Callback for "Copy Snapshot Link" in the Share dropdown
498
+ * When provided, shows the option in the export/share menu
499
+ */
500
+ onCopySnapshotLink?: () => void;
470
501
  onThemeChange?: (theme: Theme$1) => void;
471
502
  onTimeScaleChange?: (timeScale: TimeScale) => void;
472
503
  onZoomChange?: (zoom: number) => void;
@@ -1724,6 +1755,8 @@ interface ColumnProps {
1724
1755
  className?: string;
1725
1756
  /** v2.0.0: Custom metrics renderer below column header */
1726
1757
  renderMetrics?: (column: Column$1, cards: Card$1[]) => React.ReactNode;
1758
+ /** Locale for i18n */
1759
+ locale?: 'en' | 'es';
1727
1760
  }
1728
1761
  /**
1729
1762
  * Column Component
@@ -2708,12 +2741,21 @@ interface GanttToolbarProps {
2708
2741
  onExportCSV?: () => void;
2709
2742
  onExportJSON?: () => void;
2710
2743
  onExportMSProject?: () => void;
2744
+ showCriticalPath?: boolean;
2745
+ onShowCriticalPathChange?: (show: boolean) => void;
2746
+ showDependencies?: boolean;
2747
+ onShowDependenciesChange?: (show: boolean) => void;
2748
+ highlightWeekends?: boolean;
2749
+ onHighlightWeekendsChange?: (show: boolean) => void;
2750
+ showBaseline?: boolean;
2751
+ onShowBaselineChange?: (show: boolean) => void;
2752
+ onCopySnapshotLink?: () => void;
2711
2753
  }
2712
2754
  declare function GanttToolbar({ theme, timeScale, onTimeScaleChange, zoom, onZoomChange, currentTheme, onThemeChange, rowDensity, onRowDensityChange, showThemeSelector, // v0.17.29: Default to false - themes should be in app settings
2713
2755
  showCreateTaskButton, createTaskLabel, // v0.15.0: Will use translations if not provided
2714
2756
  onCreateTask, taskFilter, // v0.17.300: Task filter
2715
2757
  onTaskFilterChange, hideCompleted, // v0.18.0: Hide completed toggle
2716
- onHideCompletedChange, toolbarRightContent, wbsLevel, onWbsLevelChange, maxWbsDepth, viewMode, onViewModeChange, projectForecast, onExportPNG, onExportPDF, onExportExcel, onExportCSV, onExportJSON, onExportMSProject, }: GanttToolbarProps): react_jsx_runtime.JSX.Element;
2758
+ onHideCompletedChange, toolbarRightContent, wbsLevel, onWbsLevelChange, maxWbsDepth, viewMode, onViewModeChange, projectForecast, onExportPNG, onExportPDF, onExportExcel, onExportCSV, onExportJSON, onExportMSProject, showCriticalPath, onShowCriticalPathChange, showDependencies, onShowDependenciesChange, highlightWeekends, onHighlightWeekendsChange, showBaseline, onShowBaselineChange, onCopySnapshotLink, }: GanttToolbarProps): react_jsx_runtime.JSX.Element;
2717
2759
 
2718
2760
  interface TaskGridProps {
2719
2761
  tasks: Task[];
@@ -2766,6 +2808,7 @@ interface TimelineProps {
2766
2808
  locale?: string;
2767
2809
  templates: Required<GanttTemplates>;
2768
2810
  dependencyLineStyle?: DependencyLineStyle;
2811
+ showTaskBarLabels?: boolean;
2769
2812
  onTaskClick?: (task: Task) => void;
2770
2813
  onTaskDblClick?: (task: Task) => void;
2771
2814
  onTaskContextMenu?: (task: Task, event: React.MouseEvent) => void;
@@ -2774,6 +2817,11 @@ interface TimelineProps {
2774
2817
  onDependencyDelete?: (taskId: string, dependencyId: string) => void;
2775
2818
  /** v3.0.0: Show baseline ghost bars behind actual bars (Oracle view) */
2776
2819
  showBaseline?: boolean;
2820
+ showCriticalPath?: boolean;
2821
+ showDependencies?: boolean;
2822
+ highlightWeekends?: boolean;
2823
+ /** v4.1.0: Per-task edit check — returns false for read-only bars */
2824
+ canEditTask?: (task: Task) => boolean;
2777
2825
  }
2778
2826
  interface TaskPosition {
2779
2827
  id: string;
@@ -2784,9 +2832,9 @@ interface TaskPosition {
2784
2832
  }
2785
2833
  declare function Timeline({ tasks, theme, rowHeight: ROW_HEIGHT, timeScale, startDate, endDate, zoom, locale, // v0.17.400: Default to English
2786
2834
  templates, dependencyLineStyle, // v0.17.310
2787
- onTaskClick, onTaskDblClick, // v0.8.0
2835
+ showTaskBarLabels, onTaskClick, onTaskDblClick, // v0.8.0
2788
2836
  onTaskContextMenu, // v0.8.0
2789
- onTaskDateChange, onDependencyCreate, onDependencyDelete, showBaseline, }: TimelineProps): react_jsx_runtime.JSX.Element;
2837
+ onTaskDateChange, onDependencyCreate, onDependencyDelete, showBaseline, showCriticalPath, showDependencies, highlightWeekends, canEditTask, }: TimelineProps): react_jsx_runtime.JSX.Element;
2790
2838
 
2791
2839
  interface TaskTooltipData {
2792
2840
  task: Task;
@@ -2814,12 +2862,16 @@ interface TaskBarProps {
2814
2862
  onDragMove?: (taskId: string, daysDelta: number, isDragging: boolean) => void;
2815
2863
  onHoverChange?: (tooltipData: TaskTooltipData | null) => void;
2816
2864
  showBaseline?: boolean;
2865
+ showTaskBarLabels?: boolean;
2866
+ showCriticalPath?: boolean;
2867
+ readOnly?: boolean;
2817
2868
  }
2818
2869
  declare function TaskBar({ task, x, y, width, theme, dayWidth, startDate, templates, onClick, onDoubleClick, // v0.8.0
2819
2870
  onContextMenu, // v0.8.0
2820
2871
  onDateChange, onDependencyCreate, allTaskPositions, onDragMove, // v0.13.0
2821
2872
  onHoverChange, // v0.17.76
2822
- showBaseline, }: TaskBarProps): react_jsx_runtime.JSX.Element;
2873
+ showBaseline, // v3.0.0
2874
+ showTaskBarLabels, showCriticalPath, readOnly, }: TaskBarProps): react_jsx_runtime.JSX.Element;
2823
2875
 
2824
2876
  interface DependencyLineProps {
2825
2877
  x1: number;
@@ -3460,9 +3512,16 @@ interface GanttTranslations {
3460
3512
  expectedFinish: string;
3461
3513
  confidence: string;
3462
3514
  costAtCompletion: string;
3515
+ delayLabel: string;
3516
+ earlyLabel: string;
3517
+ onTimeLabel: string;
3518
+ budgetOver: string;
3519
+ budgetUnder: string;
3463
3520
  baselines: string;
3464
3521
  visibility: string;
3465
3522
  share: string;
3523
+ copySnapshotLink: string;
3524
+ copied: string;
3466
3525
  };
3467
3526
  contextMenu: {
3468
3527
  editTask: string;
@@ -3776,6 +3835,9 @@ interface ProjectHealthData {
3776
3835
  color: string;
3777
3836
  utilizationPercent: number;
3778
3837
  }>;
3838
+ /** Total hours for the whole project (spent / allocated in minutes) */
3839
+ totalHoursSpentMinutes?: number;
3840
+ totalHoursAllocatedMinutes?: number;
3779
3841
  }
3780
3842
  /**
3781
3843
  * ListView configuration
@@ -3828,6 +3890,8 @@ interface ListViewConfig {
3828
3890
  enabled: boolean;
3829
3891
  data: ProjectHealthData;
3830
3892
  };
3893
+ /** Aggregate child hours into parent row hoursBar cell (default: false) */
3894
+ aggregateParentHours?: boolean;
3831
3895
  /**
3832
3896
  * Configuration for blurring financial data based on user permissions
3833
3897
  * When enabled, financial columns (soldEffortMinutes, quotedTime) will be blurred