apexgantt 3.8.0 → 3.9.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.
Files changed (69) hide show
  1. package/.github/workflows/publish.yml +1 -3
  2. package/README.md +117 -44
  3. package/apexgantt.d.ts +1051 -0
  4. package/apexgantt.es.min.js +1 -1
  5. package/apexgantt.min.js +1 -1
  6. package/demo/baseline.html +0 -4
  7. package/demo/selection-demo.html +492 -0
  8. package/demo/task-list-columns-demo.html +642 -0
  9. package/demo/toolbar-demo.html +633 -0
  10. package/package.json +4 -4
  11. package/apexgantt.es.js +0 -8688
  12. package/demo/basic-gantt-large-range.html +0 -46
  13. package/demo/gantt-performance.html +0 -287
  14. package/demo/import-demos.html +0 -280
  15. package/demo/issue-2.html +0 -177
  16. package/demo/issue-3.html +0 -249
  17. package/demo/issue-reset-series.html +0 -195
  18. package/demo/issue-scale.html +0 -199
  19. package/index.d.ts +0 -15
  20. package/lib/gantt.d.ts +0 -84
  21. package/lib/keyboard/KeyboardNavigationManager.d.ts +0 -41
  22. package/lib/managers/LayoutManager.d.ts +0 -46
  23. package/lib/managers/ScrollManager.d.ts +0 -84
  24. package/lib/managers/StyleManager.d.ts +0 -60
  25. package/lib/managers/ZoomManager.d.ts +0 -49
  26. package/lib/models/Annotation.d.ts +0 -56
  27. package/lib/models/ArrowLink.d.ts +0 -97
  28. package/lib/models/Bar.d.ts +0 -41
  29. package/lib/models/BarDragManager.d.ts +0 -26
  30. package/lib/models/BarResizeManager.d.ts +0 -21
  31. package/lib/models/DataManager.d.ts +0 -46
  32. package/lib/models/DataParser.d.ts +0 -62
  33. package/lib/models/DateUtils.d.ts +0 -24
  34. package/lib/models/Dialog.d.ts +0 -37
  35. package/lib/models/Options.d.ts +0 -151
  36. package/lib/models/RowVirtualizer.d.ts +0 -85
  37. package/lib/models/SplitView.d.ts +0 -29
  38. package/lib/models/StateManager.d.ts +0 -20
  39. package/lib/models/TaskForm.d.ts +0 -28
  40. package/lib/models/TaskUtils.d.ts +0 -31
  41. package/lib/models/Tasks.d.ts +0 -92
  42. package/lib/models/Theme.d.ts +0 -36
  43. package/lib/models/TimeLine.d.ts +0 -30
  44. package/lib/models/VirtualScrollCoordinator.d.ts +0 -167
  45. package/lib/styles/Dialog.style.d.ts +0 -1
  46. package/lib/styles/Dropdown.style.d.ts +0 -1
  47. package/lib/styles/Gantt.style.d.ts +0 -1
  48. package/lib/styles/Scrollbar.style.d.ts +0 -1
  49. package/lib/styles/TaskForm.style.d.ts +0 -1
  50. package/lib/styles/Tasks.style.d.ts +0 -1
  51. package/lib/styles/Timeline.style.d.ts +0 -1
  52. package/lib/styles/Toolbar.style.d.ts +0 -1
  53. package/lib/styles/Tooltip.style.d.ts +0 -1
  54. package/lib/types/events.d.ts +0 -96
  55. package/lib/util/animation.util.d.ts +0 -61
  56. package/lib/util/arrow.util.d.ts +0 -4
  57. package/lib/util/bar.util.d.ts +0 -4
  58. package/lib/util/critical-path.util.d.ts +0 -21
  59. package/lib/util/cssVars.d.ts +0 -34
  60. package/lib/util/date.util.d.ts +0 -24
  61. package/lib/util/dom-context.util.d.ts +0 -48
  62. package/lib/util/gantt-export.d.ts +0 -1
  63. package/lib/util/gantt.util.d.ts +0 -9
  64. package/lib/util/ganttExport.d.ts +0 -1
  65. package/lib/util/icon.util.d.ts +0 -7
  66. package/lib/util/logger.d.ts +0 -4
  67. package/lib/util/selectors.d.ts +0 -32
  68. package/lib/util/style-injection.util.d.ts +0 -24
  69. package/lib/util/task.util.d.ts +0 -44
@@ -17,9 +17,7 @@ jobs:
17
17
  - uses: actions/setup-node@v4
18
18
  with:
19
19
  node-version: "20"
20
- registry-url: "https://registry.npmjs.org"
21
20
 
21
+ - run: npm install -g npm@latest
22
22
  - run: npm install
23
23
  - run: npm publish --provenance
24
- env:
25
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/README.md CHANGED
@@ -62,49 +62,57 @@ gantt.render();
62
62
 
63
63
  ## ApexGantt Options
64
64
 
65
- The layout can be configured by either setting the properties in the table below by passing a second arg to ApexGantt with these properties set. The latter takes precedence.
66
-
67
- | Options | Default | Description |
68
- | ------------------------- | ----------------------------- | --------------------------------------------------- |
69
- | width | `100%` | The width of graph container |
70
- | height | `500px` | The height of graph container |
71
- | series, | `[]` | Data for gantt. See format below |
72
- | theme, | `light` | Built in light and dark theme for easy styling |
73
- | canvasStyle | `None` | The css styles for canvas root container |
74
- | viewMode | `ViewMode.Month` | View mode |
75
- | arrowColor | `#0D6EFD` | Color for the dependency arrows |
76
- | rowHeight | `28` | Height for timeline row |
77
- | rowBackgroundColors | `['#FFFFFF']` | Alternate row colors. |
78
- | barBackgroundColor | `#537CFA` | Background color for timeline bar |
79
- | barBorderRadius | `5px` | Border radius for timeline bar |
80
- | barMargin | `4` | Top and bottom margin for timeline bar |
81
- | barTextColor | `#FFFFFF` | Text color for timeline bar |
82
- | cellBorderColor | `#eff0f0` | Border color for all table cells and timeline cells |
83
- | cellBorderWidth | `1px` | Border width for all table cells and timeline cells |
84
- | columnConfig | `undefined` | Custom column widths |
85
- | enableToolbar | `false` | Enable/disable graph toolbar |
86
- | enableResize | `true` | Enable/disable gantt sidebar resize |
87
- | enableExport | `true` | Enable/disable gantt export options |
88
- | enableTaskDrag | `true` | Enable/disable gantt export options |
89
- | enableTaskEdit | `false` | Enable/disable gantt export options |
90
- | enableTaskResize | `true` | Enable/disable gantt export options |
91
- | headerBackground | `#f3f3f3` | Background color for header |
92
- | inputDateFormat | `MM-DD-YYYY` | Input date format |
93
- | tasksContainerWidth | `425` | Task sidebar container width |
94
- | tooltipId | `apexgantt-tooltip-container` | The tooltip HTML element id |
95
- | tooltipTemplate | `tooltipTemplate` | The HTML template for tooltip |
96
- | tooltipBorderColor | `#BCBCBC` | The border color of tooltip |
97
- | tooltipBGColor | `#FFFFFF` | The background color of tooltip |
98
- | fontSize | `14px` | The size of font of nodes |
99
- | fontFamily | `None` | The font family of nodes |
100
- | fontWeight | `400` | The font weight of nodes |
101
- | fontColor | `#000000` | The font color of nodes |
102
- | annotationBgColor | `#F9D1FC` | The backgrond color of annotation |
103
- | annotationBorderColor | `#E273EA` | The backgrond color of annotation |
104
- | annotationBorderDashArray | `[]` | The border dash array of annotation |
105
- | annotationBorderWidth | `2` | The border width of annotation |
106
- | annotationOrientation | `Orientation.Horizontal` | The orientation of annotation |
107
- | annotations | `[]` | See sample data below |
65
+ The layout can be configured by passing a second argument to `ApexGantt` with the properties listed below.
66
+
67
+ | Option | Type | Default | Description |
68
+ | --- | --- | --- | --- |
69
+ | `series` | `TaskInput[]` | **required** | Task data array. See data format below. |
70
+ | `theme` | `'light' \| 'dark'` | `'light'` | Built-in color theme preset. |
71
+ | `width` | `number \| string` | `'100%'` | Width of the chart container. |
72
+ | `height` | `number \| string` | `500` | Height of the chart container. |
73
+ | `viewMode` | `ViewMode` | `ViewMode.Month` | Timeline granularity: `Day`, `Week`, `Month`, `Quarter`, `Year`. |
74
+ | `inputDateFormat` | `string` | `'MM-DD-YYYY'` | dayjs-compatible format used to parse `startTime` / `endTime` values. |
75
+ | `canvasStyle` | `string` | `''` | Arbitrary CSS injected onto the root container element. |
76
+ | `backgroundColor` | `string` | `'#FFFFFF'` | Background color of the chart container. |
77
+ | `headerBackground` | `string` | `'#f3f3f3'` | Background color of the header row. |
78
+ | `rowHeight` | `number` | `28` | Height of each task row in pixels. |
79
+ | `rowBackgroundColors` | `string[]` | `['#FFFFFF']` | Alternating row background colors; the pattern cycles automatically. |
80
+ | `tasksContainerWidth` | `number` | `425` | Initial pixel width of the task-list panel. |
81
+ | `columnConfig` | `ColumnListItem[]` | `undefined` | Custom column definitions for the task-list panel. Controls which columns are shown, their order, titles, and widths. See [Column Configuration](#column-configuration). |
82
+ | `barBackgroundColor` | `string` | `'#537CFA'` | Default background fill color for task bars. |
83
+ | `barBorderRadius` | `string` | `'5px'` | CSS border-radius applied to task bars. |
84
+ | `barMargin` | `number` | `4` | Top and bottom margin inside each row for the task bar. |
85
+ | `barTextColor` | `string` | `'#FFFFFF'` | Text color rendered inside task bars. |
86
+ | `arrowColor` | `string` | `'#0D6EFD'` | Color of dependency arrows between tasks. |
87
+ | `borderColor` | `string` | `'#eff0f0'` | Color of cell and row divider lines. |
88
+ | `cellBorderColor` | `string` | `'#eff0f0'` | Border color for all cells in the task table and timeline grid. |
89
+ | `cellBorderWidth` | `string` | `'1px'` | CSS border-width for all cell lines. |
90
+ | `enableResize` | `boolean` | `true` | Allow the task-list panel to be resized by dragging the divider. |
91
+ | `enableExport` | `boolean` | `true` | Show the SVG export button in the toolbar. |
92
+ | `enableTaskDrag` | `boolean` | `true` | Allow tasks to be reordered by dragging rows in the task list. |
93
+ | `enableTaskEdit` | `boolean` | `false` | Show the inline task-edit form when a task row is clicked. |
94
+ | `enableTaskResize` | `boolean` | `true` | Allow task bars to be resized by dragging their handles. |
95
+ | `enableTooltip` | `boolean` | `true` | Show a tooltip on task-bar hover. |
96
+ | `enableCriticalPath` | `boolean` | `false` | Calculate and highlight the critical path through dependent tasks. |
97
+ | `criticalBarColor` | `string` | `'#e53935'` | Fill color for task bars on the critical path. |
98
+ | `criticalArrowColor` | `string` | `'#e53935'` | Stroke color for dependency arrows on the critical path. |
99
+ | `baseline` | `Partial<BaselineOptions>` | `undefined` | When `enabled: true`, renders a thin baseline bar below each task bar. |
100
+ | `tooltipId` | `string` | `'apexgantt-tooltip-container'` | HTML `id` for the tooltip container element. |
101
+ | `tooltipTemplate` | `(task, dateFormat) => string` | built-in | Custom function returning an HTML string for the task tooltip. |
102
+ | `tooltipBorderColor` | `string` | `'#BCBCBC'` | Border color of the tooltip. |
103
+ | `tooltipBGColor` | `string` | `'#FFFFFF'` | Background color of the tooltip. |
104
+ | `fontColor` | `string` | `'#000000'` | Color for all text in the chart. |
105
+ | `fontFamily` | `string` | `''` | CSS font-family for the chart. |
106
+ | `fontSize` | `string` | `'14px'` | CSS font-size for the chart. |
107
+ | `fontWeight` | `string` | `'400'` | CSS font-weight for the chart. |
108
+ | `annotationBgColor` | `string` | `'#F9D1FC'` | Background color of annotation markers. |
109
+ | `annotationBorderColor` | `string` | `'#E273EA'` | Border color of annotation markers. |
110
+ | `annotationBorderDashArray` | `number[]` | `[]` | SVG stroke-dasharray for annotation borders, e.g. `[6, 3]`. |
111
+ | `annotationBorderWidth` | `number` | `2` | Border width of annotation markers in pixels. |
112
+ | `annotationOrientation` | `Orientation` | `Orientation.Horizontal` | Whether annotation lines are drawn horizontally or vertically. |
113
+ | `annotations` | `Annotation[]` | `[]` | Array of annotation objects to overlay on the timeline. |
114
+ | `parsing` | `ParsingConfig` | `undefined` | Field-mapping config to parse non-standard task shapes. See Data Parsing below. |
115
+ | `taskListAriaLabel` | `string` | `'Task list'` | `aria-label` for the task-list table, used by screen readers. |
108
116
 
109
117
  Default tooltip template
110
118
 
@@ -202,7 +210,11 @@ Each tasks should be in below format
202
210
 
203
211
  ## Column Configuration
204
212
 
205
- Customize task table column widths:
213
+ Customize which columns appear in the task-list panel, their order, titles, and widths. When `columnConfig` is provided, **it is authoritative** — only the columns you list are rendered, in the order you specify. Omitted columns are hidden. Each entry is merged with defaults, so you only need to specify overrides.
214
+
215
+ Available column keys: `Name`, `StartTime`, `EndTime`, `Duration`, `Progress`.
216
+
217
+ ### Customize column widths
206
218
 
207
219
  ```js
208
220
  import {ColumnKey} from 'apexgantt';
@@ -238,6 +250,67 @@ const gantt = new ApexGantt(element, {
238
250
  });
239
251
  ```
240
252
 
253
+ ### Hide columns
254
+
255
+ Show only the columns you need by omitting the rest:
256
+
257
+ ```js
258
+ const gantt = new ApexGantt(element, {
259
+ series: tasks,
260
+ columnConfig: [
261
+ {key: ColumnKey.Name, title: 'Task Name'},
262
+ {key: ColumnKey.Progress, title: 'Progress'},
263
+ ],
264
+ });
265
+ ```
266
+
267
+ You can also use `visible: false` to keep a column in the config but hide it (useful for toggling at runtime via `update()`):
268
+
269
+ ```js
270
+ columnConfig: [
271
+ {key: ColumnKey.Name, title: 'Task Name'},
272
+ {key: ColumnKey.StartTime, title: 'Start'},
273
+ {key: ColumnKey.Duration, title: 'Duration', visible: false}, // hidden
274
+ {key: ColumnKey.Progress, title: 'Progress'},
275
+ ],
276
+ ```
277
+
278
+ ### Reorder columns
279
+
280
+ Change the array order to reorder the rendered columns:
281
+
282
+ ```js
283
+ columnConfig: [
284
+ {key: ColumnKey.Progress, title: 'Progress'},
285
+ {key: ColumnKey.Name, title: 'Task Name'},
286
+ {key: ColumnKey.StartTime, title: 'Start'},
287
+ ],
288
+ ```
289
+
290
+ ### Include the End Date column
291
+
292
+ The `EndTime` column is available but not shown by default. Add it to your config:
293
+
294
+ ```js
295
+ columnConfig: [
296
+ {key: ColumnKey.Name, title: 'Task Name'},
297
+ {key: ColumnKey.StartTime, title: 'Start'},
298
+ {key: ColumnKey.EndTime, title: 'End', minWidth: '70px', flexGrow: 1.5},
299
+ {key: ColumnKey.Duration, title: 'Duration'},
300
+ {key: ColumnKey.Progress, title: 'Progress'},
301
+ ],
302
+ ```
303
+
304
+ ### ColumnListItem properties
305
+
306
+ | Property | Type | Default | Description |
307
+ | ---------- | ----------- | ------------- | ------------------------------------------------- |
308
+ | `key` | `ColumnKey` | — | Which data field this column shows (required). |
309
+ | `title` | `string` | from defaults | Header text displayed for the column. |
310
+ | `minWidth` | `string` | `'30px'` | Minimum CSS width (used in `minmax()`). |
311
+ | `flexGrow` | `number` | `1` | Flex proportion (used as `fr` units in CSS Grid). |
312
+ | `visible` | `boolean` | `true` | Set to `false` to hide the column. |
313
+
241
314
  ## Data Parsing
242
315
 
243
316
  Map your existing data structure to ApexGantt format without manual transformation.