@@ -378,15 +378,55 @@ export const CalendarConfigSchema = lazySchema(() => z.object({
378378 colorField : z . string ( ) . optional ( ) ,
379379} ) ) ;
380380
381+ /**
382+ * Quick filter dimension for the Gantt toolbar.
383+ */
384+ export const GanttQuickFilterSchema = lazySchema ( ( ) => z . object ( {
385+ field : z . string ( ) . describe ( 'Record field / dot-path the dimension filters on' ) ,
386+ label : z . string ( ) . optional ( ) . describe ( 'Trigger label (falls back to the field label)' ) ,
387+ options : z . array ( z . union ( [
388+ z . string ( ) ,
389+ z . object ( {
390+ value : z . union ( [ z . string ( ) , z . number ( ) ] ) ,
391+ label : z . string ( ) . optional ( ) ,
392+ } ) ,
393+ ] ) ) . optional ( ) . describe ( 'Explicit option override for fixed enums' ) ,
394+ } ) ) ;
395+
381396/**
382397 * Gantt Settings
398+ *
399+ * Beyond the core timeline fields, the renderer supports a two-level
400+ * parent/child hierarchy (parentField/typeField), planned-vs-actual baselines,
401+ * dynamic grouping, a resource/workload view, hover tooltips and quick filters.
383402 */
384403export const GanttConfigSchema = lazySchema ( ( ) => z . object ( {
385404 startDateField : z . string ( ) ,
386405 endDateField : z . string ( ) ,
387406 titleField : z . string ( ) ,
388407 progressField : z . string ( ) . optional ( ) ,
389408 dependenciesField : z . string ( ) . optional ( ) ,
409+ colorField : z . string ( ) . optional ( ) . describe ( 'Field that drives the bar color' ) ,
410+ // Two-level hierarchy: a parent task id (summary bar) and a row type.
411+ parentField : z . string ( ) . optional ( ) . describe ( 'Field holding the parent task id (builds the summary → step tree)' ) ,
412+ typeField : z . string ( ) . optional ( ) . describe ( 'Field whose value maps to task/summary/milestone' ) ,
413+ // Planned-vs-actual reference bars.
414+ baselineStartField : z . string ( ) . optional ( ) . describe ( 'Baseline (planned) start field' ) ,
415+ baselineEndField : z . string ( ) . optional ( ) . describe ( 'Baseline (planned) end field' ) ,
416+ // Dynamic grouping: bucket leaf tasks under one synthesized summary per value.
417+ groupByField : z . string ( ) . optional ( ) . describe ( 'Field to group leaf tasks by (synthesized summary rows)' ) ,
418+ // Resource / workload view.
419+ resourceView : z . boolean ( ) . optional ( ) . describe ( 'Render a per-resource workload histogram instead of the timeline' ) ,
420+ assigneeField : z . string ( ) . optional ( ) . describe ( 'Resource field to bucket load by (resource view)' ) ,
421+ effortField : z . string ( ) . optional ( ) . describe ( 'Per-task load units (resource view; default 1)' ) ,
422+ capacity : z . number ( ) . optional ( ) . describe ( 'Per-resource capacity ceiling; loads above this flag overload' ) ,
423+ // Hover tooltip + quick filters.
424+ tooltipFields : z . array ( z . union ( [
425+ z . string ( ) ,
426+ z . object ( { field : z . string ( ) , label : z . string ( ) . optional ( ) } ) ,
427+ ] ) ) . optional ( ) . describe ( 'Fields to surface in the hover tooltip, in display order' ) ,
428+ quickFilters : z . array ( GanttQuickFilterSchema ) . optional ( ) . describe ( 'Multi-select filter dropdowns rendered above the chart' ) ,
429+ autoZoomToFilter : z . boolean ( ) . optional ( ) . describe ( 'When true (default), filtering zooms the range to the filtered tasks' ) ,
390430} ) ) ;
391431
392432/**
0 commit comments