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.
- package/.github/workflows/publish.yml +1 -3
- package/README.md +117 -44
- package/apexgantt.d.ts +1051 -0
- package/apexgantt.es.min.js +1 -1
- package/apexgantt.min.js +1 -1
- package/demo/baseline.html +0 -4
- package/demo/selection-demo.html +492 -0
- package/demo/task-list-columns-demo.html +642 -0
- package/demo/toolbar-demo.html +633 -0
- package/package.json +4 -4
- package/apexgantt.es.js +0 -8688
- package/demo/basic-gantt-large-range.html +0 -46
- package/demo/gantt-performance.html +0 -287
- package/demo/import-demos.html +0 -280
- package/demo/issue-2.html +0 -177
- package/demo/issue-3.html +0 -249
- package/demo/issue-reset-series.html +0 -195
- package/demo/issue-scale.html +0 -199
- package/index.d.ts +0 -15
- package/lib/gantt.d.ts +0 -84
- package/lib/keyboard/KeyboardNavigationManager.d.ts +0 -41
- package/lib/managers/LayoutManager.d.ts +0 -46
- package/lib/managers/ScrollManager.d.ts +0 -84
- package/lib/managers/StyleManager.d.ts +0 -60
- package/lib/managers/ZoomManager.d.ts +0 -49
- package/lib/models/Annotation.d.ts +0 -56
- package/lib/models/ArrowLink.d.ts +0 -97
- package/lib/models/Bar.d.ts +0 -41
- package/lib/models/BarDragManager.d.ts +0 -26
- package/lib/models/BarResizeManager.d.ts +0 -21
- package/lib/models/DataManager.d.ts +0 -46
- package/lib/models/DataParser.d.ts +0 -62
- package/lib/models/DateUtils.d.ts +0 -24
- package/lib/models/Dialog.d.ts +0 -37
- package/lib/models/Options.d.ts +0 -151
- package/lib/models/RowVirtualizer.d.ts +0 -85
- package/lib/models/SplitView.d.ts +0 -29
- package/lib/models/StateManager.d.ts +0 -20
- package/lib/models/TaskForm.d.ts +0 -28
- package/lib/models/TaskUtils.d.ts +0 -31
- package/lib/models/Tasks.d.ts +0 -92
- package/lib/models/Theme.d.ts +0 -36
- package/lib/models/TimeLine.d.ts +0 -30
- package/lib/models/VirtualScrollCoordinator.d.ts +0 -167
- package/lib/styles/Dialog.style.d.ts +0 -1
- package/lib/styles/Dropdown.style.d.ts +0 -1
- package/lib/styles/Gantt.style.d.ts +0 -1
- package/lib/styles/Scrollbar.style.d.ts +0 -1
- package/lib/styles/TaskForm.style.d.ts +0 -1
- package/lib/styles/Tasks.style.d.ts +0 -1
- package/lib/styles/Timeline.style.d.ts +0 -1
- package/lib/styles/Toolbar.style.d.ts +0 -1
- package/lib/styles/Tooltip.style.d.ts +0 -1
- package/lib/types/events.d.ts +0 -96
- package/lib/util/animation.util.d.ts +0 -61
- package/lib/util/arrow.util.d.ts +0 -4
- package/lib/util/bar.util.d.ts +0 -4
- package/lib/util/critical-path.util.d.ts +0 -21
- package/lib/util/cssVars.d.ts +0 -34
- package/lib/util/date.util.d.ts +0 -24
- package/lib/util/dom-context.util.d.ts +0 -48
- package/lib/util/gantt-export.d.ts +0 -1
- package/lib/util/gantt.util.d.ts +0 -9
- package/lib/util/ganttExport.d.ts +0 -1
- package/lib/util/icon.util.d.ts +0 -7
- package/lib/util/logger.d.ts +0 -4
- package/lib/util/selectors.d.ts +0 -32
- package/lib/util/style-injection.util.d.ts +0 -24
- 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
|
|
66
|
-
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
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
|
|
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.
|