@quartzio/gantt 0.0.0-stage → 0.0.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/API.md +533 -0
- package/LICENSE +21 -0
- package/README.md +83 -2
- package/dist/index.d.ts +1341 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6556 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +1299 -0
- package/package.json +51 -3
- package/src/calendar/duration.ts +42 -0
- package/src/calendar/project.ts +29 -0
- package/src/calendar/workingCalendar.ts +218 -0
- package/src/data/draft.ts +78 -0
- package/src/data/graph.ts +215 -0
- package/src/data/normalize.ts +661 -0
- package/src/data/operations.ts +112 -0
- package/src/data/project.ts +194 -0
- package/src/data/serialize.ts +26 -0
- package/src/data/transaction.ts +460 -0
- package/src/data/tree.ts +156 -0
- package/src/data/types.ts +229 -0
- package/src/index.ts +139 -0
- package/src/scheduling/schedule.ts +310 -0
- package/src/styles.css +1299 -0
- package/src/timeaxis/align.ts +120 -0
- package/src/timeaxis/format.ts +72 -0
- package/src/timeaxis/presets.ts +219 -0
- package/src/timeaxis/timeAxis.ts +205 -0
- package/src/util/civil.ts +38 -0
- package/src/util/emitter.ts +53 -0
- package/src/util/equal.ts +23 -0
- package/src/util/errors.ts +4 -0
- package/src/util/parse.ts +70 -0
- package/src/util/time.ts +18 -0
- package/src/util/zone.ts +303 -0
- package/src/view/bars.ts +63 -0
- package/src/view/binding.ts +162 -0
- package/src/view/cellEditor.ts +239 -0
- package/src/view/cells.ts +89 -0
- package/src/view/columns.ts +197 -0
- package/src/view/createGantt.ts +1164 -0
- package/src/view/dates.ts +14 -0
- package/src/view/dependencies.ts +147 -0
- package/src/view/editing.ts +303 -0
- package/src/view/history.ts +72 -0
- package/src/view/interaction.ts +671 -0
- package/src/view/keyboard.ts +149 -0
- package/src/view/listWidth.ts +201 -0
- package/src/view/menu.ts +265 -0
- package/src/view/nonWorking.ts +113 -0
- package/src/view/range.ts +41 -0
- package/src/view/rows.ts +235 -0
- package/src/view/selection.ts +156 -0
- package/src/view/taskActions.ts +71 -0
- package/src/view/taskEditor.ts +553 -0
- package/src/view/timeline.ts +155 -0
- package/src/view/tooltip.ts +117 -0
- package/src/view/types.ts +328 -0
package/API.md
ADDED
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
# API reference
|
|
2
|
+
|
|
3
|
+
The reference for `@quartzio/gantt`. The React component [`@quartzio/gantt-react`](../gantt-react) takes the same
|
|
4
|
+
options as props, so this page applies to it too. Every type named here is exported from `@quartzio/gantt`, and
|
|
5
|
+
the exported types carry the same documentation in your editor.
|
|
6
|
+
|
|
7
|
+
- [Concepts](#concepts)
|
|
8
|
+
- [Options](#options)
|
|
9
|
+
- [Project data](#project-data)
|
|
10
|
+
- [Changes](#changes)
|
|
11
|
+
- [Transactions](#transactions)
|
|
12
|
+
- [The controller](#the-controller)
|
|
13
|
+
- [Columns](#columns)
|
|
14
|
+
- [Time axis presets](#time-axis-presets)
|
|
15
|
+
- [Menus](#menus)
|
|
16
|
+
- [Validating changes](#validating-changes)
|
|
17
|
+
- [Keyboard](#keyboard)
|
|
18
|
+
- [Theming](#theming)
|
|
19
|
+
- [Utilities](#utilities)
|
|
20
|
+
- [Errors](#errors)
|
|
21
|
+
|
|
22
|
+
## Concepts
|
|
23
|
+
|
|
24
|
+
**Data in, changes out.** You give the chart a project (tasks, dependencies, calendars and settings). Every change,
|
|
25
|
+
whether made in the chart (dragging, editing, menus, the keyboard) or in code, comes out as a _patch_: a list of
|
|
26
|
+
operations and their inverse. The engine never modifies the objects you pass in.
|
|
27
|
+
|
|
28
|
+
**Controlled or uncontrolled.** Pass `defaultData` and the chart keeps the edited data itself (uncontrolled). Pass
|
|
29
|
+
`data` and you own it (controlled): edits are reported through `onChange`, and show up once you pass the new data
|
|
30
|
+
back. The mode is fixed when the chart is created.
|
|
31
|
+
|
|
32
|
+
**Scheduling writes dates back.** Automatically scheduled tasks start as soon as possible: at the project start,
|
|
33
|
+
after their predecessors, and no earlier than their constraint. Parents span their children. The computed
|
|
34
|
+
`startDate`, `endDate` and `duration` are written into the data as part of the same patch, so the data you get back
|
|
35
|
+
always holds the dates the chart shows. Loading data that wasn't scheduled yet is reported as a change with
|
|
36
|
+
`source: 'load'`.
|
|
37
|
+
|
|
38
|
+
**Working time.** A duration is working time in the project calendar (by default Monday–Friday 08:00–16:00):
|
|
39
|
+
`duration: 3, durationUnit: 'day'` is three working days, so a task starting on Friday ends on Tuesday. Days, weeks
|
|
40
|
+
and months convert to hours with `hoursPerDay`, `daysPerWeek` and `daysPerMonth`.
|
|
41
|
+
|
|
42
|
+
**Exclusive end dates.** A task covers `startDate <= t < endDate`. A one-day task on 5 October 2026 runs from
|
|
43
|
+
`2026-10-05T08:00` to `2026-10-05T16:00` in the standard calendar, and a task with `endDate: '2026-10-08'`
|
|
44
|
+
ends at the start of 8 October.
|
|
45
|
+
|
|
46
|
+
**Time zones.** Times are instants (epoch milliseconds inside the engine). Everything that depends on the wall
|
|
47
|
+
clock (working hours, midnight, week numbers, date strings without an offset) uses the project's
|
|
48
|
+
`settings.timeZone`: an IANA name like `'Europe/Oslo'`, `'UTC'`, or `'local'` (the default, the host's zone). Set
|
|
49
|
+
an explicit zone when the plan belongs to a place, and always when you render on the server.
|
|
50
|
+
|
|
51
|
+
**Treat data as immutable.** Records that didn't change keep their identity between versions of the data, and the
|
|
52
|
+
engine reuses its caches for them. Don't modify task or dependency objects in place and pass the same data again:
|
|
53
|
+
create new objects, as `applyPatch` and `change.data` do.
|
|
54
|
+
|
|
55
|
+
## Options
|
|
56
|
+
|
|
57
|
+
`createGantt(options)` and `<Gantt {...options} />` take these. All are optional.
|
|
58
|
+
|
|
59
|
+
### Data
|
|
60
|
+
|
|
61
|
+
| Option | Type | Description |
|
|
62
|
+
| ------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
63
|
+
| `data` | `ProjectInput \| undefined` | Controlled data. Having the key makes the chart controlled, even with `undefined` (shown as an empty project, e.g. while loading). |
|
|
64
|
+
| `defaultData` | `ProjectInput` | Initial data for uncontrolled usage. |
|
|
65
|
+
| `onChange` | `(change: GanttDataChange) => void` | Called with every change: the patch, the data with the change applied, and its source. See [Changes](#changes). |
|
|
66
|
+
|
|
67
|
+
### Time axis
|
|
68
|
+
|
|
69
|
+
| Option | Type | Default | Description |
|
|
70
|
+
| -------------------- | ---------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
71
|
+
| `preset` | `string \| ViewPreset` | `'weekAndDay'` | A built-in preset id or a custom preset. See [Time axis presets](#time-axis-presets). |
|
|
72
|
+
| `startDate` | `DateInput` | from the tasks | Start of the timeline. Strings without an offset are read in the project's time zone. |
|
|
73
|
+
| `endDate` | `DateInput` | from the tasks | End of the timeline. The timeline is always at least as wide as the viewport. |
|
|
74
|
+
| `locale` | `string` | the runtime's | BCP 47 locale for header labels, dates and numbers, e.g. `'nb-NO'`. |
|
|
75
|
+
| `showToday` | `boolean` | `true` | A line at the current time. |
|
|
76
|
+
| `showNonWorkingTime` | `boolean` | `true` | Shade non-working time: every interval with ticks under a day, whole days with day ticks, nothing with longer ticks. |
|
|
77
|
+
| `onPresetChange` | `(presetId: string) => void` | – | Called after every zoom (from the menu or `zoom()`). A zoom lasts until the `preset` option changes. |
|
|
78
|
+
|
|
79
|
+
Without `startDate` and `endDate`, the timeline covers the tasks' dates with some padding, or a few weeks from the
|
|
80
|
+
start of the current week when no task has dates.
|
|
81
|
+
|
|
82
|
+
### Task list
|
|
83
|
+
|
|
84
|
+
| Option | Type | Default | Description |
|
|
85
|
+
| ------------------- | --------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
86
|
+
| `columns` | `readonly ColumnInput[]` | `['name', 'startDate', 'endDate', 'duration']` | See [Columns](#columns). |
|
|
87
|
+
| `rowHeight` | `number` | `44` | Height of a task row in pixels. |
|
|
88
|
+
| `headerRowHeight` | `number` | `28` | Height of each header row in pixels. |
|
|
89
|
+
| `listWidth` | `number \| null` | `null` | Width of the task list in pixels, or `null` for automatic: as wide as the columns, up to `--qz-list-max-width` (default 60%). |
|
|
90
|
+
| `onListWidthChange` | `(width: number \| null) => void` | – | Called after the divider changed the width (`null`: back to automatic, by double-clicking it). Dragging overrides `listWidth` until the option changes. |
|
|
91
|
+
|
|
92
|
+
### Interaction
|
|
93
|
+
|
|
94
|
+
Every interaction is on by default. Set an option to `false` to turn it off.
|
|
95
|
+
|
|
96
|
+
| Option | What it turns on |
|
|
97
|
+
| ------------------ | ----------------------------------------------------------------------------------------------- |
|
|
98
|
+
| `taskDrag` | Move tasks by dragging their bars. |
|
|
99
|
+
| `taskResize` | Change a task's duration by dragging the end of its bar. |
|
|
100
|
+
| `taskDragCreate` | Give an unscheduled task dates by drawing its bar in its row. |
|
|
101
|
+
| `progressDrag` | Change the percentage done by dragging the handle at the progress. |
|
|
102
|
+
| `dependencyCreate` | Add dependencies by dragging from a handle at either end of a bar to another bar. |
|
|
103
|
+
| `cellEdit` | Edit cells in the task list (double-click, Enter or F2). |
|
|
104
|
+
| `taskEdit` | Edit tasks in a dialog (the menu's Edit, or double-clicking a bar). |
|
|
105
|
+
| `taskMenu` | A context menu on tasks (right-click, the ContextMenu key or Shift+F10). |
|
|
106
|
+
| `timeAxisMenu` | A context menu on the time axis header, for zooming. |
|
|
107
|
+
| `taskTooltip` | A tooltip for the task under the pointer. |
|
|
108
|
+
| `undoRedo` | A history of the last 100 changes, for `undo`/`redo` and Ctrl/Cmd+Z. Turning it off forgets it. |
|
|
109
|
+
| `multiSelect` | Select several tasks (Ctrl/Cmd-click, Shift-click, Shift+arrows, Ctrl/Cmd+A). |
|
|
110
|
+
| `deleteKey` | Delete the selected tasks, with their subtasks, with Delete or Backspace. |
|
|
111
|
+
|
|
112
|
+
| Option | Type | Description |
|
|
113
|
+
| ------------------- | ----------------------------------------------- | ------------------------------------------------------------------------- |
|
|
114
|
+
| `validateChange` | `(change: ProposedChange) => boolean \| string` | Refuse a drag. See [Validating changes](#validating-changes). |
|
|
115
|
+
| `onSelectionChange` | `(selection: readonly Id[]) => void` | Called with the selected ids whenever the selection changes. |
|
|
116
|
+
| `taskMenuItems` | `MenuCustomizer` | Change the task menu. See [Menus](#menus). |
|
|
117
|
+
| `timeAxisMenuItems` | `MenuCustomizer` | Change the time axis menu. |
|
|
118
|
+
| `createTaskId` | `() => Id` | Ids for tasks added from the menu. Defaults to unique ids like `task-12`. |
|
|
119
|
+
|
|
120
|
+
### Functions in options
|
|
121
|
+
|
|
122
|
+
Options are compared on every update, and unchanged ones are skipped. Columns and presets are compared by value,
|
|
123
|
+
but functions in them (`value`, label formats) and `validateChange` are compared by identity. Define those outside
|
|
124
|
+
render, or memoize them, so they don't count as a change every time.
|
|
125
|
+
|
|
126
|
+
## Project data
|
|
127
|
+
|
|
128
|
+
### Input
|
|
129
|
+
|
|
130
|
+
`ProjectInput` is what you pass in. Everything is optional.
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
const project: ProjectInput = {
|
|
134
|
+
settings: { timeZone: 'Europe/Oslo', startDate: '2026-10-05' },
|
|
135
|
+
tasks: [
|
|
136
|
+
{
|
|
137
|
+
id: 'design',
|
|
138
|
+
name: 'Design',
|
|
139
|
+
children: [
|
|
140
|
+
{ id: 'sketch', name: 'Sketches', duration: 3 },
|
|
141
|
+
{ id: 'review', name: 'Design review', duration: 0 }, // a milestone
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
{ id: 'build', name: 'Build', duration: 2, durationUnit: 'week' },
|
|
145
|
+
],
|
|
146
|
+
dependencies: [
|
|
147
|
+
{ id: 1, from: 'sketch', to: 'review' },
|
|
148
|
+
{ id: 2, from: 'review', to: 'build', type: 'FS', lag: 1 },
|
|
149
|
+
],
|
|
150
|
+
};
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Tasks can be nested with `children`, given as a flat list with `parentId`, or a mix. Ids are strings or numbers
|
|
154
|
+
and must be unique per kind.
|
|
155
|
+
|
|
156
|
+
**`TaskInput`**
|
|
157
|
+
|
|
158
|
+
| Field | Type | Default | Description |
|
|
159
|
+
| ------------------- | ------------------------------ | ---------- | ------------------------------------------------------------------------------------------------ |
|
|
160
|
+
| `id` | `Id` | (required) | |
|
|
161
|
+
| `name` | `string` | `''` | |
|
|
162
|
+
| `parentId` | `Id \| null` | `null` | Ignored for tasks nested in `children`. |
|
|
163
|
+
| `children` | `TaskInput[]` | – | |
|
|
164
|
+
| `startDate` | `DateInput \| null` | `null` | Computed for automatically scheduled tasks: pin it with `manuallyScheduled` or a constraint. |
|
|
165
|
+
| `endDate` | `DateInput \| null` | `null` | Exclusive. |
|
|
166
|
+
| `duration` | `number \| null` | `null` | Working time, in `durationUnit`. `0` makes a milestone. |
|
|
167
|
+
| `durationUnit` | `TimeUnit` | `'day'` | |
|
|
168
|
+
| `percentDone` | `number` | `0` | 0–100. |
|
|
169
|
+
| `manuallyScheduled` | `boolean` | `false` | Keeps its own dates: not moved by predecessors, and for parents not rolled up from the children. |
|
|
170
|
+
| `constraintType` | `'startnoearlierthan' \| null` | `null` | Set together with `constraintDate`. Dragging an automatically scheduled task sets it. |
|
|
171
|
+
| `constraintDate` | `DateInput \| null` | `null` | |
|
|
172
|
+
|
|
173
|
+
An automatically scheduled task is placed from its `duration` (or derives the duration from a start and an end). One
|
|
174
|
+
with only a start is zero-length, and one with no dates or duration stays unscheduled (it can be drawn in its row).
|
|
175
|
+
Tasks are placed from the project start: set `settings.startDate`, or give at least one task a date. When nothing has
|
|
176
|
+
a date, everything stays unscheduled.
|
|
177
|
+
|
|
178
|
+
**`DependencyInput`**
|
|
179
|
+
|
|
180
|
+
| Field | Type | Default | Description |
|
|
181
|
+
| --------- | ------------------------------ | ---------- | ---------------------------------------------- |
|
|
182
|
+
| `id` | `Id` | (required) | |
|
|
183
|
+
| `from` | `Id` | (required) | The predecessor. |
|
|
184
|
+
| `to` | `Id` | (required) | The successor. |
|
|
185
|
+
| `type` | `'FS' \| 'SS' \| 'FF' \| 'SF'` | `'FS'` | Finish-to-start, start-to-start, and so on. |
|
|
186
|
+
| `lag` | `number` | `0` | Working time between the two. May be negative. |
|
|
187
|
+
| `lagUnit` | `TimeUnit` | `'day'` | |
|
|
188
|
+
|
|
189
|
+
Dependencies on a parent apply to all its children. Cycles are rejected.
|
|
190
|
+
|
|
191
|
+
**`ProjectSettingsInput`**
|
|
192
|
+
|
|
193
|
+
| Field | Type | Default | Description |
|
|
194
|
+
| -------------- | ------------------- | --------- | ----------------------------------------------------------------------------------------------------- |
|
|
195
|
+
| `timeZone` | `string` | `'local'` | `'local'`, `'UTC'` or an IANA name. |
|
|
196
|
+
| `calendarId` | `Id \| null` | `null` | The project calendar. `null` uses the standard calendar, Monday–Friday 08:00–16:00. |
|
|
197
|
+
| `startDate` | `DateInput \| null` | `null` | Automatically scheduled tasks start here at the earliest. Set to the earliest task start when `null`. |
|
|
198
|
+
| `hoursPerDay` | `number` | `8` | Working hours in a day, for converting durations. |
|
|
199
|
+
| `daysPerWeek` | `number` | `5` | |
|
|
200
|
+
| `daysPerMonth` | `number` | `20` | |
|
|
201
|
+
| `weekStartsOn` | `number` | `1` | 0 = Sunday … 6 = Saturday. |
|
|
202
|
+
|
|
203
|
+
**`CalendarInput`**
|
|
204
|
+
|
|
205
|
+
```ts
|
|
206
|
+
const calendars: CalendarInput[] = [
|
|
207
|
+
{
|
|
208
|
+
id: 'site',
|
|
209
|
+
name: 'Building site',
|
|
210
|
+
// Days left out are non-working. Leave out `week` entirely for Monday–Friday 08:00–16:00.
|
|
211
|
+
week: {
|
|
212
|
+
monday: [
|
|
213
|
+
{ start: '07:00', end: '11:00' },
|
|
214
|
+
{ start: '11:30', end: '15:00' },
|
|
215
|
+
],
|
|
216
|
+
tuesday: [
|
|
217
|
+
{ start: '07:00', end: '11:00' },
|
|
218
|
+
{ start: '11:30', end: '15:00' },
|
|
219
|
+
],
|
|
220
|
+
// …
|
|
221
|
+
},
|
|
222
|
+
exceptions: [
|
|
223
|
+
{ startDate: '2026-12-24', endDate: '2026-12-26', name: 'Christmas' }, // non-working
|
|
224
|
+
{ startDate: '2026-12-28', name: 'Extra day', intervals: [{ start: '08:00', end: '12:00' }] },
|
|
225
|
+
],
|
|
226
|
+
},
|
|
227
|
+
];
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Times are `"HH:mm"` wall-clock times in the project's time zone; an interval's `end` is exclusive and may be
|
|
231
|
+
`"24:00"`. Exception dates are `"YYYY-MM-DD"`, and the `endDate` is inclusive. Later exceptions win where they
|
|
232
|
+
overlap.
|
|
233
|
+
|
|
234
|
+
**`DateInput`** is a `Date`, epoch milliseconds, or an ISO 8601 string. Strings without an offset
|
|
235
|
+
(`'2026-10-05'`, `'2026-10-05T08:00'`) are wall-clock times in the project's time zone.
|
|
236
|
+
|
|
237
|
+
### Output
|
|
238
|
+
|
|
239
|
+
`ProjectData` is what comes back (`change.data`): the same project as flat, fully normalized, JSON-serializable
|
|
240
|
+
records. Every field is present (`null` means not set), times are epoch milliseconds, and tasks are a flat list with
|
|
241
|
+
`parentId`. It is also valid input, so you can store it and load it again as it is.
|
|
242
|
+
|
|
243
|
+
```ts
|
|
244
|
+
interface Task {
|
|
245
|
+
id: Id;
|
|
246
|
+
parentId: Id | null;
|
|
247
|
+
name: string;
|
|
248
|
+
startDate: number | null;
|
|
249
|
+
endDate: number | null;
|
|
250
|
+
duration: number | null;
|
|
251
|
+
durationUnit: TimeUnit;
|
|
252
|
+
percentDone: number;
|
|
253
|
+
manuallyScheduled: boolean;
|
|
254
|
+
constraintType: ConstraintType | null;
|
|
255
|
+
constraintDate: number | null;
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
`TimeUnit` is `'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'`.
|
|
260
|
+
|
|
261
|
+
## Changes
|
|
262
|
+
|
|
263
|
+
`onChange` gets a `GanttDataChange`:
|
|
264
|
+
|
|
265
|
+
| Field | Type | Description |
|
|
266
|
+
| -------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
267
|
+
| `patch` | `Patch` | `{ operations, inverse }`: what changed, and how to revert it. |
|
|
268
|
+
| `data` | `ProjectData` | The project with the change applied. |
|
|
269
|
+
| `source` | `'load' \| 'edit' \| 'undo' \| 'redo'` | `'load'`: scheduling written back into data that was loaded. `'edit'`: an edit in the chart or `transact`. |
|
|
270
|
+
|
|
271
|
+
One user action is one change: a drop, a cell edit, a deletion of several tasks. The dates scheduling moved as a
|
|
272
|
+
result are in the same patch.
|
|
273
|
+
|
|
274
|
+
In controlled mode, keep `change.data` and pass it back:
|
|
275
|
+
|
|
276
|
+
```ts
|
|
277
|
+
onChange: (change) => setData(change.data);
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
To send changes to a server, use the patch. Each `Operation` is one of `add`, `remove`, `update` or `move` on
|
|
281
|
+
`'tasks'`, `'dependencies'` or `'calendars'`, or a `settings` change; all are plain JSON. `applyPatch(data, patch)`
|
|
282
|
+
applies a patch to `ProjectData` without modifying it, e.g. to apply changes from other users.
|
|
283
|
+
|
|
284
|
+
A `'load'` change is not an edit by the user. Use the source to, for example, not mark the plan as unsaved.
|
|
285
|
+
|
|
286
|
+
## Transactions
|
|
287
|
+
|
|
288
|
+
`controller.transact(fn)` changes the project from code. All changes in `fn` are one change: one patch, one undo
|
|
289
|
+
step, one `onChange`. If `fn` throws, nothing changes. It returns the patch, or `null` when nothing changed.
|
|
290
|
+
|
|
291
|
+
```ts
|
|
292
|
+
gantt.transact((tx) => {
|
|
293
|
+
const task = tx.tasks.add({ name: 'Inspection', duration: 1 }, { parentId: 'build' });
|
|
294
|
+
tx.dependencies.add({ from: 'build', to: task.id });
|
|
295
|
+
tx.tasks.update('sketch', { percentDone: 100 });
|
|
296
|
+
});
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
| Store | Methods |
|
|
300
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
301
|
+
| `tx.tasks` | `get(id)`, `children(parentId)`, `add(input, position?)`, `update(id, changes)`, `move(id, position)`, `remove(id)` |
|
|
302
|
+
| `tx.dependencies` | `get(id)`, `add(input)`, `update(id, changes)`, `remove(id)` |
|
|
303
|
+
| `tx.calendars` | `get(id)`, `add(input)`, `update(id, changes)`, `remove(id)` |
|
|
304
|
+
| `tx.settings` | `get()`, `update(changes)` |
|
|
305
|
+
|
|
306
|
+
- Reads see the earlier writes in the same transaction.
|
|
307
|
+
- `add` generates an id when it's left out. `position` is `{ parentId?, index? }`.
|
|
308
|
+
- `remove` on a task also removes its descendants and every dependency connected to them.
|
|
309
|
+
- `update` skips fields that equal the current value, so a no-op update adds nothing to the patch.
|
|
310
|
+
- A calendar can't be removed while it is the project calendar.
|
|
311
|
+
- Invalid changes (unknown ids, an end before the start, a dependency cycle) throw a `QuartzioError`, and nothing
|
|
312
|
+
changes.
|
|
313
|
+
|
|
314
|
+
In controlled mode, `transact` only reports the change; it shows once you pass the data back. Transactions in the
|
|
315
|
+
same synchronous run build on each other.
|
|
316
|
+
|
|
317
|
+
## The controller
|
|
318
|
+
|
|
319
|
+
`createGantt(options)` returns a `GanttController`. With React, the `ref` of `<Gantt>` gives you the same object.
|
|
320
|
+
Most methods exist for renderers (they forward DOM events); these are the ones an app calls:
|
|
321
|
+
|
|
322
|
+
| Method | Description |
|
|
323
|
+
| ------------------------------------------ | -------------------------------------------------------------------------------------- |
|
|
324
|
+
| `transact(fn)` | Change the project. See [Transactions](#transactions). |
|
|
325
|
+
| `undo()` / `redo()` | Undo or redo the last change. Returns whether there was one. |
|
|
326
|
+
| `select(ids)` / `clearSelection()` | Set the selection. Unknown ids are skipped. |
|
|
327
|
+
| `toggle(id)` / `setExpanded(id, expanded)` | Expand or collapse a parent. |
|
|
328
|
+
| `expandAll()` / `collapseAll()` | |
|
|
329
|
+
| `zoom(target)` | `'in'`, `'out'`, or a built-in preset id, keeping the middle of the view. |
|
|
330
|
+
| `openTaskEditor(id)` | Open the task editor dialog. |
|
|
331
|
+
| `startEdit(id, columnId?)` | Start editing a cell. |
|
|
332
|
+
| `getState()` | The current `ViewState`. |
|
|
333
|
+
| `subscribe(listener)` | Called with the new `ViewState` on every change. Returns a function that unsubscribes. |
|
|
334
|
+
| `setOptions(options)` | Update options. Invalid options throw and change nothing. |
|
|
335
|
+
| `destroy()` | |
|
|
336
|
+
|
|
337
|
+
### Writing a renderer
|
|
338
|
+
|
|
339
|
+
`ViewState` holds everything a renderer draws, as plain data in pixels: the time axis and header cells, the rows in
|
|
340
|
+
view (virtualized) with their bars, dependency lines, non-working time, the today line, the drag preview, the
|
|
341
|
+
tooltip, the open menu and editor, and the scroll position to go to. A renderer:
|
|
342
|
+
|
|
343
|
+
1. subscribes to the state and draws it,
|
|
344
|
+
2. reports its size and scroll position with `setViewport({ width, height, scrollLeft, scrollTop })`,
|
|
345
|
+
3. forwards input: `pointerDown`/`pointerMove`/`pointerUp`/`hover`/`doubleClick` with points in timeline
|
|
346
|
+
coordinates, `keyDown` for keys on the chart, `rowClick`, and the methods for cell editing, menus, the task
|
|
347
|
+
editor and the divider (`editKeyDown`, `menuKeyDown`, `taskEditorAction`, `resizeList`, …).
|
|
348
|
+
|
|
349
|
+
[`@quartzio/gantt-react`](../gantt-react/src) is a complete example.
|
|
350
|
+
|
|
351
|
+
## Columns
|
|
352
|
+
|
|
353
|
+
`columns` takes built-in column ids and column definitions, in order:
|
|
354
|
+
|
|
355
|
+
```ts
|
|
356
|
+
const columns: ColumnInput[] = [
|
|
357
|
+
{ id: 'code', title: 'Code', width: 70, value: ({ task }) => codes.get(task.id) ?? '' },
|
|
358
|
+
'name',
|
|
359
|
+
'startDate',
|
|
360
|
+
{ id: 'days', field: 'duration', title: 'Days', width: 80 },
|
|
361
|
+
{ id: 'cost', title: 'Cost', align: 'end', value: ({ task }) => formatCost(task.id) },
|
|
362
|
+
];
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
Built-in ids: `'name'`, `'startDate'`, `'endDate'`, `'duration'`, `'percentDone'`. The tree (indentation and
|
|
366
|
+
expand/collapse) shows in the name column.
|
|
367
|
+
|
|
368
|
+
**`ColumnDefinition`**
|
|
369
|
+
|
|
370
|
+
| Field | Type | Description |
|
|
371
|
+
| ---------- | ------------------------------- | ------------------------------------------------------------------------- |
|
|
372
|
+
| `id` | `string` | Unique among the columns. |
|
|
373
|
+
| `title` | `string` | Header text. |
|
|
374
|
+
| `width` | `number` | Pixels. |
|
|
375
|
+
| `field` | built-in id | A built-in column to base it on: its title, width, value and editing. |
|
|
376
|
+
| `align` | `'start' \| 'end'` | |
|
|
377
|
+
| `value` | `(cell: CellContext) => string` | The cell text. Must not throw; an error leaves the cell empty. |
|
|
378
|
+
| `editable` | `boolean` | Default `true` with a `field`. Columns without a `field` can't be edited. |
|
|
379
|
+
|
|
380
|
+
`CellContext` has the `task`, `isParent`, its displayed `dates` (`{ start, end }` or `null`), the project
|
|
381
|
+
`settings`, the `locale`, and the project `calendar`.
|
|
382
|
+
|
|
383
|
+
Edited cells take the format of their field: dates in native date fields, durations like `4d`, `2 weeks`, `3h` or
|
|
384
|
+
`1,5` (in the task's unit), and a percentage.
|
|
385
|
+
|
|
386
|
+
## Time axis presets
|
|
387
|
+
|
|
388
|
+
Built-in presets, from zoomed in to zoomed out (`VIEW_PRESETS`): `'hourAndDay'`, `'dayAndWeek'`, `'weekAndDay'`,
|
|
389
|
+
`'weekAndMonth'`, `'monthAndYear'`, `'quarterAndYear'`, `'manyYears'`.
|
|
390
|
+
|
|
391
|
+
A custom preset:
|
|
392
|
+
|
|
393
|
+
```ts
|
|
394
|
+
const sprints: ViewPreset = {
|
|
395
|
+
id: 'sprints',
|
|
396
|
+
tickUnit: 'day',
|
|
397
|
+
tickIncrement: 1,
|
|
398
|
+
tickWidth: 24,
|
|
399
|
+
headers: [
|
|
400
|
+
{ unit: 'week', increment: 2, format: (cell) => `Sprint ${sprintNumber(cell.start)}` },
|
|
401
|
+
{ unit: 'day', format: 'weekdayNarrow' },
|
|
402
|
+
],
|
|
403
|
+
timeResolution: { unit: 'day', increment: 1 },
|
|
404
|
+
};
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
- `tickUnit`, `tickIncrement` and `tickWidth`: the smallest column, and its width in pixels.
|
|
408
|
+
- `headers`: rows from top to bottom. `format` is a built-in format or a function of a `HeaderCellContext`
|
|
409
|
+
(`start`, `end`, `unit`, `increment`, `timeZone`, `locale`) that must not throw.
|
|
410
|
+
- `timeResolution`: what dragging and resizing snap to.
|
|
411
|
+
|
|
412
|
+
Built-in formats: `'year'`, `'quarter'`, `'quarterYear'`, `'month'`, `'monthShort'`, `'monthYear'`,
|
|
413
|
+
`'monthShortYear'`, `'week'` (ISO week number), `'day'`, `'weekdayShort'`, `'weekdayNarrow'`, `'weekdayDay'`,
|
|
414
|
+
`'dayMonth'`, `'weekdayDayMonth'`, `'hour'`, `'hourMinute'`. Names of months and weekdays follow the locale.
|
|
415
|
+
|
|
416
|
+
## Menus
|
|
417
|
+
|
|
418
|
+
`taskMenuItems` and `timeAxisMenuItems` get the built-in items and a `MenuContext`, and return the items to show:
|
|
419
|
+
|
|
420
|
+
```ts
|
|
421
|
+
const taskMenuItems: MenuCustomizer = (items, { selection }) => [
|
|
422
|
+
...items.filter((item) => item.id !== 'convertToMilestone'),
|
|
423
|
+
{ id: 'complete', label: 'Mark complete', separator: true, action: () => markComplete(selection) },
|
|
424
|
+
];
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**`MenuItem`**: `id`, `label`, and optionally `disabled`, `checked`, `separator` (a line before it), `items` (a
|
|
428
|
+
submenu, one level), and `action(context)` for your own items. Built-in items are carried out by the engine.
|
|
429
|
+
|
|
430
|
+
Built-in task menu items (`TaskMenuItemId`): `'edit'`, an `'add'` submenu with `'addTaskAbove'`,
|
|
431
|
+
`'addTaskBelow'`, `'addSubtask'`, `'addMilestone'`, `'addSuccessor'` and `'addPredecessor'`, then `'indent'`,
|
|
432
|
+
`'outdent'`, `'convertToMilestone'` and `'delete'`. To change the submenu, map over the items:
|
|
433
|
+
|
|
434
|
+
```ts
|
|
435
|
+
const taskMenuItems: MenuCustomizer = (items) =>
|
|
436
|
+
items.map((item) =>
|
|
437
|
+
item.id === 'add' ? { ...item, items: item.items?.filter((sub) => sub.id !== 'addPredecessor') } : item,
|
|
438
|
+
);
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
`MenuContext` has the `target` (`{ kind: 'task', id }` or `{ kind: 'timeAxis' }`), the `task` (or `null`), the
|
|
442
|
+
`selection`, and the current `preset`.
|
|
443
|
+
|
|
444
|
+
## Validating changes
|
|
445
|
+
|
|
446
|
+
`validateChange` is called for every change a drag proposes, while dragging and on the drop. Return `true` to allow
|
|
447
|
+
it, or `false` or a message to refuse it: the preview shows it as invalid, the message shows in the tooltip, and the
|
|
448
|
+
drop changes nothing.
|
|
449
|
+
|
|
450
|
+
```ts
|
|
451
|
+
const validateChange = (change: ProposedChange) => {
|
|
452
|
+
if (change.kind === 'link') return true;
|
|
453
|
+
return change.task.percentDone === 100 ? 'Completed work is locked' : true;
|
|
454
|
+
};
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
`ProposedChange` is one of:
|
|
458
|
+
|
|
459
|
+
- `{ kind: 'move' | 'resize' | 'create', task, start, end }`
|
|
460
|
+
- `{ kind: 'progress', task, percentDone }`
|
|
461
|
+
- `{ kind: 'link', from, to, type }`
|
|
462
|
+
|
|
463
|
+
## Keyboard
|
|
464
|
+
|
|
465
|
+
With the chart focused:
|
|
466
|
+
|
|
467
|
+
| Key | Action |
|
|
468
|
+
| ---------------------------------------- | --------------------------------------------------------- |
|
|
469
|
+
| Up, Down, Page Up, Page Down, Home, End | Move the cursor and the selection. |
|
|
470
|
+
| Shift + the keys above | Extend the selection. |
|
|
471
|
+
| Right / Left | Expand / collapse, or go to the first child / the parent. |
|
|
472
|
+
| Space | Toggle the row in the selection. |
|
|
473
|
+
| Ctrl/Cmd+A | Select all. |
|
|
474
|
+
| Escape | Clear the selection. |
|
|
475
|
+
| Enter, F2 | Edit the row's first editable cell. |
|
|
476
|
+
| ContextMenu, Shift+F10 | Open the task menu. |
|
|
477
|
+
| Delete, Backspace | Delete the selected tasks. |
|
|
478
|
+
| Ctrl/Cmd+Z, Ctrl/Cmd+Shift+Z, Ctrl/Cmd+Y | Undo, redo. |
|
|
479
|
+
|
|
480
|
+
While a cell is being edited, Enter saves, Escape cancels, and Tab and Shift+Tab save and move on.
|
|
481
|
+
|
|
482
|
+
## Theming
|
|
483
|
+
|
|
484
|
+
Import the stylesheet once: `@quartzio/gantt/styles.css` (or `@quartzio/gantt-react/styles.css`, the same file).
|
|
485
|
+
All classes start with `qz-`, and the styles are themed with CSS variables, in two levels:
|
|
486
|
+
|
|
487
|
+
1. **Design tokens**, declared with zero specificity on `:root`, so you can override them on any element:
|
|
488
|
+
`--qz-bg`, `--qz-raised`, `--qz-sunken`, `--qz-text`, `--qz-text-muted`, `--qz-line`, `--qz-primary`,
|
|
489
|
+
`--qz-accent`, `--qz-font-sans`, `--qz-radius-sm`, and more (see the top of `styles.css`).
|
|
490
|
+
2. **Component variables**, which follow the tokens until you set them: `--qz-bar-color`,
|
|
491
|
+
`--qz-bar-progress-color`, `--qz-bar-text-color`, `--qz-bar-radius`, `--qz-summary-color`,
|
|
492
|
+
`--qz-milestone-color`, `--qz-dependency-color`, `--qz-today-color`, `--qz-nonworking-color`,
|
|
493
|
+
`--qz-row-hover-color`, `--qz-row-selected-color`, `--qz-font-family`, `--qz-font-size`,
|
|
494
|
+
`--qz-list-max-width`, `--qz-tooltip-background`.
|
|
495
|
+
|
|
496
|
+
```css
|
|
497
|
+
.my-plan {
|
|
498
|
+
--qz-primary: #0b7a5c;
|
|
499
|
+
--qz-bar-color: #d6efe6;
|
|
500
|
+
--qz-list-max-width: 40%;
|
|
501
|
+
}
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
**Dark mode:** add the class `qz-dark` to the chart or any ancestor (for example `<html>`).
|
|
505
|
+
|
|
506
|
+
**Fonts:** the font stacks start with Outfit and JetBrains Mono. The package loads no fonts; without them, the
|
|
507
|
+
system fonts are used.
|
|
508
|
+
|
|
509
|
+
## Utilities
|
|
510
|
+
|
|
511
|
+
The engine's building blocks are exported for apps and custom renderers:
|
|
512
|
+
|
|
513
|
+
| Export | Description |
|
|
514
|
+
| ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
515
|
+
| `applyPatch(data, patch)` | `ProjectData` with a patch applied. The input is not modified. |
|
|
516
|
+
| `createProject(input?, options?)` | The data model on its own: `load`, `transact`, `apply`, `plan`, `toData`, `subscribe`. No scheduling unless you pass `propagate: scheduleProject`. |
|
|
517
|
+
| `scheduleProject(state, operations)` | The scheduler: the operations that write computed dates back. |
|
|
518
|
+
| `toProjectData(state)` | A `ProjectState` as `ProjectData`. |
|
|
519
|
+
| `getTreeIndex(tasks)` | Children, ancestors, descendants and depth of tasks. |
|
|
520
|
+
| `getWorkingCalendar(state, calendarId?)` | A `WorkingCalendar`: `addWorkingTime`, `workingTimeBetween`, `isWorking`, `workingIntervals`, … |
|
|
521
|
+
| `durationToWorkingMs`, `workingMsToDuration`, `workingMsPerUnit` | Convert durations with `hoursPerDay`, `daysPerWeek` and `daysPerMonth`. |
|
|
522
|
+
| `taskDates(task)` | A task's displayed start and end, or `null` when it is unscheduled. |
|
|
523
|
+
| `parseDateString(value, zone)` | An ISO 8601 string as epoch milliseconds, read in a time zone. `null` when invalid. |
|
|
524
|
+
| `toWallTime`, `fromWallTime`, `startOfUnit`, `addUnits`, `isoWeek`, `isValidTimeZone` | Time zone–aware date math. |
|
|
525
|
+
| `createTimeAxis(options)`, `VIEW_PRESETS`, `resolvePreset` | The time axis on its own. |
|
|
526
|
+
| `DEFAULT_SETTINGS`, `STANDARD_CALENDAR`, `DEFAULT_COLUMNS` | The defaults. |
|
|
527
|
+
|
|
528
|
+
## Errors
|
|
529
|
+
|
|
530
|
+
Invalid input throws a `QuartzioError` with a message that says what is wrong and where, for example
|
|
531
|
+
`Task "a": "endDate" is before "startDate".` Validation happens before anything changes, so a rejected option, load or
|
|
532
|
+
transaction leaves the chart as it was. Functions you pass in (column values, label formats) never break rendering:
|
|
533
|
+
when they throw, the cell or label is left empty.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sindre Glomnes
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,84 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @quartzio/gantt
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A headless Gantt chart engine in TypeScript, with no dependencies and no DOM. It holds the project data, schedules
|
|
4
|
+
tasks in working time, and computes everything a Gantt chart shows (rows, bars, dependency lines, the time axis)
|
|
5
|
+
as plain data in pixels. It also handles dragging, editing, selection, the keyboard and undo. A renderer only draws
|
|
6
|
+
the state and forwards input.
|
|
7
|
+
|
|
8
|
+
For React, use [`@quartzio/gantt-react`](https://www.npmjs.com/package/@quartzio/gantt-react). Use this package
|
|
9
|
+
directly to build a renderer for another framework, or to work with project data without a chart.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @quartzio/gantt
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The package is ESM only, and runs anywhere JavaScript does (browsers, Node, workers).
|
|
18
|
+
|
|
19
|
+
## What it does
|
|
20
|
+
|
|
21
|
+
- **Project data:** tasks in a tree, dependencies (FS, SS, FF, SF, with lag), calendars and settings. Every change
|
|
22
|
+
is a transaction that produces a patch with its inverse.
|
|
23
|
+
- **Scheduling:** tasks start as soon as possible after the project start and their predecessors; parents span their
|
|
24
|
+
children; manually scheduled tasks keep their dates. The computed dates are written back into the data.
|
|
25
|
+
- **Working time:** durations in working time, calendars with working hours and exceptions, in any time zone,
|
|
26
|
+
daylight saving time included.
|
|
27
|
+
- **View:** a time axis from hours to years, virtualized rows, bars, milestones, dependency lines, non-working time.
|
|
28
|
+
- **Interaction:** drag to move, resize, draw, link and set progress, with snapping and validation; cell editing, a
|
|
29
|
+
task editor, context menus, selection, keyboard navigation, undo and redo.
|
|
30
|
+
|
|
31
|
+
## A chart without a framework
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import { createGantt } from '@quartzio/gantt';
|
|
35
|
+
|
|
36
|
+
const gantt = createGantt({
|
|
37
|
+
defaultData: {
|
|
38
|
+
settings: { timeZone: 'UTC' },
|
|
39
|
+
tasks: [
|
|
40
|
+
{ id: 1, name: 'Design', startDate: '2026-10-05', duration: 3 },
|
|
41
|
+
{ id: 2, name: 'Build', duration: 5 },
|
|
42
|
+
],
|
|
43
|
+
dependencies: [{ id: 1, from: 1, to: 2 }],
|
|
44
|
+
},
|
|
45
|
+
onChange: ({ data }) => save(data),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
gantt.setViewport({ width: 800, height: 400, scrollLeft: 0, scrollTop: 0 });
|
|
49
|
+
gantt.subscribe((state) => draw(state)); // state.rows.items[i].bar, state.header.rows, …
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Working with project data
|
|
53
|
+
|
|
54
|
+
The data model and the scheduler work without a chart, for example on a server:
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { createProject, scheduleProject } from '@quartzio/gantt';
|
|
58
|
+
|
|
59
|
+
const project = createProject(input, { propagate: scheduleProject });
|
|
60
|
+
project.transact((tx) => {
|
|
61
|
+
tx.tasks.update(1, { duration: 4 }); // successors move in the same patch
|
|
62
|
+
});
|
|
63
|
+
const data = project.toData(); // plain JSON
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Changes made elsewhere arrive as patches, and `applyPatch(data, patch)` applies one without modifying `data`.
|
|
67
|
+
|
|
68
|
+
## Things to know
|
|
69
|
+
|
|
70
|
+
- **Treat data as immutable.** Pass new objects when something changes, never the same objects modified in place.
|
|
71
|
+
Records that didn't change keep their identity, and the engine reuses its caches for them.
|
|
72
|
+
- **End dates are exclusive**, and durations are working time.
|
|
73
|
+
- **Set a time zone** (`settings.timeZone`) when the plan belongs to a place. The default is the host's zone.
|
|
74
|
+
|
|
75
|
+
## Documentation
|
|
76
|
+
|
|
77
|
+
- [API reference](https://github.com/Sindreglo/quartzio/blob/main/packages/gantt/API.md): options, data model,
|
|
78
|
+
changes, transactions, the controller, columns, presets, menus, theming and utilities.
|
|
79
|
+
- [`@quartzio/gantt-react`](https://github.com/Sindreglo/quartzio/tree/main/packages/gantt-react) is a complete
|
|
80
|
+
renderer to learn from.
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
MIT
|