@toclocoinc/lattice-grid 1.60.0 → 1.62.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/README.md +1 -1
- package/docs/API.html +21 -17
- package/docs/api-detail.html +863 -17
- package/lattice-grid.d.ts +22 -11
- package/lattice-grid.esm.min.js +614 -49
- package/lattice-grid.min.cjs +614 -49
- package/lattice-grid.min.css +1 -1
- package/lattice-grid.min.js +614 -49
- package/modules/ai.d.ts +11 -2
- package/modules/ai.esm.min.js +24 -4
- package/modules/ai.min.cjs +24 -4
- package/modules/ai.min.js +24 -4
- package/modules/angular.d.ts +1 -1
- package/modules/angular.esm.min.js +2 -2
- package/modules/angular.min.cjs +2 -2
- package/modules/angular.min.js +2 -2
- package/modules/chart-alluvial.d.ts +1 -1
- package/modules/chart-alluvial.esm.min.js +1 -1
- package/modules/chart-arc.d.ts +1 -1
- package/modules/chart-arc.esm.min.js +1 -1
- package/modules/chart-bubblemap.d.ts +1 -1
- package/modules/chart-bubblemap.esm.min.js +1 -1
- package/modules/chart-bump.d.ts +1 -1
- package/modules/chart-bump.esm.min.js +1 -1
- package/modules/chart-calendar.d.ts +1 -1
- package/modules/chart-calendar.esm.min.js +1 -1
- package/modules/chart-decomposition.d.ts +1 -1
- package/modules/chart-decomposition.esm.min.js +1 -1
- package/modules/chart-diverging.d.ts +1 -1
- package/modules/chart-diverging.esm.min.js +1 -1
- package/modules/chart-dumbbell.d.ts +1 -1
- package/modules/chart-dumbbell.esm.min.js +1 -1
- package/modules/chart-fan.d.ts +1 -1
- package/modules/chart-fan.esm.min.js +1 -1
- package/modules/chart-hexbin.d.ts +1 -1
- package/modules/chart-hexbin.esm.min.js +1 -1
- package/modules/chart-hexmap.d.ts +1 -1
- package/modules/chart-hexmap.esm.min.js +1 -1
- package/modules/chart-icicle.d.ts +1 -1
- package/modules/chart-icicle.esm.min.js +1 -1
- package/modules/chart-parallel.d.ts +1 -1
- package/modules/chart-parallel.esm.min.js +1 -1
- package/modules/chart-ridgeline.d.ts +1 -1
- package/modules/chart-ridgeline.esm.min.js +1 -1
- package/modules/chart-roc.d.ts +1 -1
- package/modules/chart-roc.esm.min.js +1 -1
- package/modules/chart-slope.d.ts +1 -1
- package/modules/chart-slope.esm.min.js +1 -1
- package/modules/chart-splom.d.ts +1 -1
- package/modules/chart-splom.esm.min.js +1 -1
- package/modules/chart-waffle.d.ts +1 -1
- package/modules/chart-waffle.esm.min.js +1 -1
- package/modules/charts.d.ts +1 -1
- package/modules/charts.esm.min.js +48 -15
- package/modules/charts.min.cjs +48 -15
- package/modules/charts.min.js +48 -15
- package/modules/data-router.d.ts +1 -1
- package/modules/data-router.esm.min.js +4 -4
- package/modules/data-router.min.cjs +4 -4
- package/modules/data-router.min.js +4 -4
- package/modules/devtools.d.ts +1 -1
- package/modules/devtools.esm.min.js +2 -2
- package/modules/devtools.min.cjs +2 -2
- package/modules/devtools.min.js +2 -2
- package/modules/dhtmlx-compat.d.ts +1 -1
- package/modules/dhtmlx-compat.esm.min.js +4 -4
- package/modules/dhtmlx-compat.min.cjs +4 -4
- package/modules/dhtmlx-compat.min.js +4 -4
- package/modules/gantt.d.ts +144 -12
- package/modules/gantt.esm.min.js +1070 -201
- package/modules/gantt.min.cjs +1070 -201
- package/modules/gantt.min.js +1070 -201
- package/modules/htmx.d.ts +1 -1
- package/modules/htmx.esm.min.js +614 -49
- package/modules/htmx.min.cjs +614 -49
- package/modules/htmx.min.js +614 -49
- package/modules/kanban.d.ts +1 -1
- package/modules/kanban.esm.min.js +4 -4
- package/modules/kanban.min.cjs +4 -4
- package/modules/kanban.min.js +4 -4
- package/modules/kpi.d.ts +1 -1
- package/modules/kpi.esm.min.js +19 -6
- package/modules/kpi.min.cjs +19 -6
- package/modules/kpi.min.js +19 -6
- package/modules/layout.d.ts +1 -1
- package/modules/layout.esm.min.js +4 -4
- package/modules/layout.min.cjs +4 -4
- package/modules/layout.min.js +4 -4
- package/modules/mock-socket.d.ts +1 -1
- package/modules/mock-socket.esm.min.js +2 -2
- package/modules/mock-socket.min.cjs +2 -2
- package/modules/mock-socket.min.js +2 -2
- package/modules/react.d.ts +1 -1
- package/modules/react.esm.min.js +2 -2
- package/modules/react.min.cjs +2 -2
- package/modules/react.min.js +2 -2
- package/modules/svelte.d.ts +1 -1
- package/modules/svelte.esm.min.js +2 -2
- package/modules/svelte.min.cjs +2 -2
- package/modules/svelte.min.js +2 -2
- package/modules/tabs.d.ts +1 -1
- package/modules/tabs.esm.min.js +11 -4
- package/modules/tabs.min.cjs +11 -4
- package/modules/tabs.min.js +11 -4
- package/modules/vue.d.ts +1 -1
- package/modules/vue.esm.min.js +2 -2
- package/modules/vue.min.cjs +2 -2
- package/modules/vue.min.js +2 -2
- package/modules/webcomponent.d.ts +1 -1
- package/modules/webcomponent.esm.min.js +614 -49
- package/modules/webcomponent.min.cjs +614 -49
- package/modules/webcomponent.min.js +614 -49
- package/package.json +1 -1
package/modules/gantt.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.62.0, gantt module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -48,6 +48,26 @@ export interface GanttTask {
|
|
|
48
48
|
* `units: 1`.
|
|
49
49
|
*/
|
|
50
50
|
assignments?: Array<{ resource?: string; name?: string; id?: string; units?: number }>;
|
|
51
|
+
/**
|
|
52
|
+
* The task's effort, in one of two forms (BACKLOG-0001281/1282).
|
|
53
|
+
*
|
|
54
|
+
* A **number** is the task's TOTAL hours; the workload band divides it
|
|
55
|
+
* between the assignments in proportion to their units and spreads each
|
|
56
|
+
* share evenly over the working days the task spans. (`hours` is accepted
|
|
57
|
+
* as the same field under its other common name.)
|
|
58
|
+
*
|
|
59
|
+
* An **array** is an explicit per-day contour — what a planner types into a
|
|
60
|
+
* workload cell — and states each day's hours itself: the task's total is
|
|
61
|
+
* the sum of the entries, nothing is spread, and the contour is
|
|
62
|
+
* authoritative for the span, so `applyEdit` derives the task's `start` and
|
|
63
|
+
* `duration` from its first and last day. An EMPTY array means "no hours
|
|
64
|
+
* booked", which is how clearing every bucket is expressed without reviving
|
|
65
|
+
* the even spread. A bar move re-times the contour onto the new days
|
|
66
|
+
* unchanged; a resize stretches it across the new span at the same daily
|
|
67
|
+
* levels. `date` is an ISO date, a `Date` or a plan day-number; the module
|
|
68
|
+
* writes ISO dates back.
|
|
69
|
+
*/
|
|
70
|
+
work?: number | Array<{ date: number | string | Date; hours: number }>;
|
|
51
71
|
/** Leveling priority: a higher value is delayed last (default 0). */
|
|
52
72
|
priority?: number;
|
|
53
73
|
/** An explicit row height (px) for the split view; applied to both panels. */
|
|
@@ -281,7 +301,19 @@ interface Gantt {
|
|
|
281
301
|
readonly resourceLoad: GanttResourceLoad | null;
|
|
282
302
|
setTasks(tasks: GanttTask[]): GanttSchedule;
|
|
283
303
|
setDependencies(deps: GanttDependency[]): GanttSchedule;
|
|
284
|
-
|
|
304
|
+
/**
|
|
305
|
+
* Apply one task edit and recompute — the single gated choke point every
|
|
306
|
+
* drag, keypress, table cell and workload cell commits through.
|
|
307
|
+
*
|
|
308
|
+
* A `work` ARRAY is the task's per-day contour (BACKLOG-0001282). Given
|
|
309
|
+
* without an explicit `start`/`end`/`duration` it SETS the span: the task
|
|
310
|
+
* starts on the contour's first day and runs through its last, so booking
|
|
311
|
+
* hours beyond the bar extends it and clearing an edge bucket pulls it
|
|
312
|
+
* back. Conversely, a `start` or `duration` in the patch re-times an
|
|
313
|
+
* existing contour rather than discarding it — a move keeps its shape, a
|
|
314
|
+
* resize stretches it across the new span at the same daily levels.
|
|
315
|
+
*/
|
|
316
|
+
applyEdit(patch: { id: string | number; start?: number; end?: number; duration?: number; percentComplete?: number; work?: number | Array<{ date: number | string | Date; hours: number }> }, editOpts?: { writeBack?: boolean }): GanttSchedule;
|
|
285
317
|
compute(): GanttSchedule;
|
|
286
318
|
findViolations(): GanttViolation[];
|
|
287
319
|
/**
|
|
@@ -383,11 +415,30 @@ interface Gantt {
|
|
|
383
415
|
}): unknown;
|
|
384
416
|
/**
|
|
385
417
|
* Mount the JOINED split view (BACKLOG-0000938): one continuous, row-aligned
|
|
386
|
-
* surface with a left task-grid panel
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
418
|
+
* surface with a left task-grid panel — by default the Task Name tree with
|
|
419
|
+
* expand/collapse, start, finish, duration, assignee avatars and a circular
|
|
420
|
+
* % ring (BACKLOG-0001285), plus any host columns — and the right timeline,
|
|
421
|
+
* sharing a single vertical scroll so every grid row lines up exactly with
|
|
422
|
+
* its bar row. The timeline scrolls horizontally on its own. Composes the
|
|
423
|
+
* controller's schedule; makes no change to grid core.
|
|
424
|
+
*
|
|
425
|
+
* The plan is editable from BOTH panes (BACKLOG-0001280): every gesture
|
|
426
|
+
* `mount` has — pointer drag to move, drag on the right edge to resize,
|
|
427
|
+
* arrow-key move, Shift+arrow resize, `l` to link, Delete — works on the
|
|
428
|
+
* timeline here, and a `start`/`end`/`duration`/`progress`/`name` column in
|
|
429
|
+
* the left panel is inline-editable on a double-click. Both routes commit
|
|
430
|
+
* through the same `applyEdit` choke point, so `beforeTaskMove`,
|
|
431
|
+
* `beforeTaskResize`, `beforeProgressChange` and `beforeTaskEdit` stay the
|
|
432
|
+
* single veto whichever pane the edit came from.
|
|
433
|
+
*
|
|
434
|
+
* The three switches that govern it carry the same meaning and the same
|
|
435
|
+
* defaults as `mount`'s: `editable` (default true) turns every edit on or
|
|
436
|
+
* off, both panes at once; `keyboard` (default true) turns off the
|
|
437
|
+
* focusable bars, the arrow-key gestures and the ARIA announcements while
|
|
438
|
+
* leaving pointer editing alone; and `resizeZone` (default 6) is how many
|
|
439
|
+
* pixels in from a bar's right edge begin a resize rather than a move.
|
|
440
|
+
* `workload` adds the resource band beneath the plan (BACKLOG-0001281),
|
|
441
|
+
* which is display-only — it reports hours, it does not accept them.
|
|
391
442
|
*/
|
|
392
443
|
mountSplit(container: unknown, options?: {
|
|
393
444
|
height?: number;
|
|
@@ -409,7 +460,85 @@ interface Gantt {
|
|
|
409
460
|
* overrides the status date and the cost field names.
|
|
410
461
|
*/
|
|
411
462
|
evm?: boolean | { statusDate?: number | string | Date; costField?: string; actualCostField?: string };
|
|
412
|
-
|
|
463
|
+
/**
|
|
464
|
+
* Whether the plan can be edited: pointer drags on the timeline and the
|
|
465
|
+
* left panel's inline cell editors (default true). Same meaning and
|
|
466
|
+
* default as `mount`'s.
|
|
467
|
+
*/
|
|
468
|
+
editable?: boolean;
|
|
469
|
+
/**
|
|
470
|
+
* Keyboard editing + focusable bars + ARIA announcements on the timeline
|
|
471
|
+
* (default true). Same meaning and default as `mount`'s.
|
|
472
|
+
*/
|
|
473
|
+
keyboard?: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* Pixels from a bar's right edge that begin a resize rather than a move
|
|
476
|
+
* (default 6). Same meaning and default as `mount`'s.
|
|
477
|
+
*/
|
|
478
|
+
resizeZone?: number;
|
|
479
|
+
/**
|
|
480
|
+
* A `{ t(key, params) }` resolver for the view's own text — the live
|
|
481
|
+
* region's edit announcements. Omit it and a gantt bound to a grid borrows
|
|
482
|
+
* that grid's catalogue; a standalone plan falls back to English.
|
|
483
|
+
*/
|
|
484
|
+
messages?: { t: (key: string, params?: Record<string, unknown>) => string };
|
|
485
|
+
/**
|
|
486
|
+
* The left panel's columns. `kind` decides what the cell shows and what a
|
|
487
|
+
* double-click edits: `'name'` the WBS tree (edits the name), `'assignee'`
|
|
488
|
+
* the avatars, `'progress'` the % ring (edits `percentComplete`), `'evm'`
|
|
489
|
+
* an earned-value `metric`, and `'start'`/`'end'`/`'duration'` the
|
|
490
|
+
* scheduled window — an ISO date, an ISO date, and a whole number of days,
|
|
491
|
+
* each of which edits the plan through the same path a bar drag takes
|
|
492
|
+
* (BACKLOG-0001280). A column with no `kind` shows the raw task's `key`
|
|
493
|
+
* and edits it only with `editable: true`.
|
|
494
|
+
*/
|
|
495
|
+
columns?: Array<{ key: string; title?: string; width?: number; kind?: 'name' | 'assignee' | 'progress' | 'evm' | 'start' | 'end' | 'duration' | 'number'; metric?: 'bac' | 'pv' | 'ev' | 'ac' | 'sv' | 'cv' | 'spi' | 'cpi'; digits?: number; editable?: boolean; editField?: string; render?: (task: GanttScheduledTask, ctx: { rawTask: GanttTask; depth: number }) => unknown }>;
|
|
496
|
+
/**
|
|
497
|
+
* A resource workload band beneath the split view (BACKLOG-0001281):
|
|
498
|
+
* one row per resource on the left and, on the right, that resource's
|
|
499
|
+
* hours per time bucket — aligned column-for-column with the timeline's
|
|
500
|
+
* scale header, scroll-locked to it horizontally (vertically it scrolls
|
|
501
|
+
* on its own), and redrawn in the same paint as the bars whenever the
|
|
502
|
+
* plan changes. `true` takes the defaults below; an object overrides
|
|
503
|
+
* them; omitted, no band is drawn.
|
|
504
|
+
*
|
|
505
|
+
* **Editing (BACKLOG-0001282).** A resource row expands (a disclosure
|
|
506
|
+
* button, `aria-expanded`) into one sub-row per task it carries. The
|
|
507
|
+
* resource's own cell is the read-only aggregate; a SUB-ROW cell accepts
|
|
508
|
+
* a typed number of hours on a double-click whenever the view's
|
|
509
|
+
* `editable` is on. What is typed is written to that task's `work`
|
|
510
|
+
* contour through the same `applyEdit` choke point (and the same
|
|
511
|
+
* `beforeTaskEdit` veto) a bar drag uses, so the bar, the table row and
|
|
512
|
+
* the band all move in one paint — including the span, which follows the
|
|
513
|
+
* contour: type into a column beyond the bar and the bar grows to reach
|
|
514
|
+
* it. A bucket containing no working day declines the edit and says so.
|
|
515
|
+
*
|
|
516
|
+
* **Where the hours come from.** They are DERIVED from the tasks, never
|
|
517
|
+
* supplied: a task's own `work` (or `hours`) field when it carries a
|
|
518
|
+
* finite one, otherwise `working days × hoursPerDay × units`, divided
|
|
519
|
+
* between the task's assignments in proportion to their units and spread
|
|
520
|
+
* evenly over the working days the task spans. Working days are the days
|
|
521
|
+
* this view already shades — pass the `calendar`/`nonWorking` option the
|
|
522
|
+
* plan is scheduled with. Resources, units and capacities are the gantt's
|
|
523
|
+
* existing vocabulary (`assignee`/`assignees`/`owner`/`assignments` on a
|
|
524
|
+
* task; `resources`/`defaultCapacity` on `createGantt`); a task naming no
|
|
525
|
+
* resource is carried on an "Unassigned" row rather than dropped. An
|
|
526
|
+
* empty bucket is blank, not `0`, and a bucket over
|
|
527
|
+
* `capacity × hoursPerDay × the bucket's working days` is marked with a
|
|
528
|
+
* class and an accessible label.
|
|
529
|
+
*/
|
|
530
|
+
workload?: boolean | {
|
|
531
|
+
/** Hours a full-time (`units: 1`) resource works in a working day; default 8. */
|
|
532
|
+
hoursPerDay?: number;
|
|
533
|
+
/** The band's height in pixels, taken from the view's own `height`; default 160. */
|
|
534
|
+
height?: number;
|
|
535
|
+
/** A band row's height in pixels; default 28. */
|
|
536
|
+
rowHeight?: number;
|
|
537
|
+
/** Maximum decimal places in a cell, trailing zeros dropped; default 1. */
|
|
538
|
+
decimals?: number;
|
|
539
|
+
/** Draw the totals row and totals column; default true. */
|
|
540
|
+
totals?: boolean;
|
|
541
|
+
};
|
|
413
542
|
}): unknown;
|
|
414
543
|
/**
|
|
415
544
|
* Capture a baseline (planned) snapshot of the current schedule as HOST data
|
|
@@ -471,10 +600,13 @@ export function createGantt(opts?: {
|
|
|
471
600
|
* such a plan was keyed correctly by `rows.apply` and then refused to
|
|
472
601
|
* schedule.
|
|
473
602
|
*
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
477
|
-
*
|
|
603
|
+
* A mapping to a field NAME is two-way: `applyEdit` writes back to that
|
|
604
|
+
* name, so an edit on a mapped plan lands instead of springing back
|
|
605
|
+
* (BACKLOG-0001280). A mapping to a READER FUNCTION has no inverse, so an
|
|
606
|
+
* edit to such a field writes the canonical property and says so once, and
|
|
607
|
+
* `level()` refuses a mapped `start` outright rather than writing where
|
|
608
|
+
* nothing reads. `assignee`, `cost` and `actualCost` belong to the resource
|
|
609
|
+
* and earned-value layers and are not mapped.
|
|
478
610
|
*/
|
|
479
611
|
fields?: Record<string, string | ((row: GanttTask) => unknown)>;
|
|
480
612
|
/** Auto-mount into this element at construction. */
|