Repository navigation
v1.4.0
Adds TreeGrid, an editable tree grid and matrix, and core helpers for relation-aware graph walks, keyed graph expansion, structure diffs, row-tree projections and time bucket tables, plus entity-initiated linked selection for views of your own. The examples, showcases and API reference move to a new bilingual documentation site (English and Japanese) at https://eightkk.github.io/vue-weave/. Every change is backward compatible.
Added
TreeGrid, an opt-in controlled tree grid and matrix: a row tree against columns, with cells from column accessors (value(row)) or a sparsecellslist. Cells keep a value (including 0), known none, unknown, not applicable and not loaded apart (missingCell, cellstatus). Rows and columns are virtualized together, the focused cell stays rendered and focused outside the window, and the ARIA treegrid keys reach every cell. Children can load on demand (childStatus,expand-request, a status line). Expansion and the active cell are controlled (v-model:expanded-ids,v-model:active-cell).row-activateandcell-activatereport entities, for linking throughuseLinkedSelection().selectEntitiesandmatchTreeGridEntities. Opt-in editing proposescell-editwith typed editors (text, number, select, checkbox, date and time; IME-safe),spreadsheetproposes onesheet-editper paste, fill (Ctrl+D or the fill handle), clear or cut, androwsEditableproposesrow-create,row-deleteandrow-move(keyboard and pointer). Each proposal has a synchronous validator,-rejectedevents andedit-cancel. Core helperscreateTreeGridIndex,flattenTreeGrid,applyTreeGridEdits,insertTreeGridRow,deleteTreeGridRowsand the window and key functions, the--vw-tree-grid-*theme variables, right-to-left, forced-colors and print support, server rendering, and a "Tree grid" demo.useLinkedSelectiongainsselectEntities(entities, { source }?)andselectionSource, so views without aLinkedViewName(an application's own table or list) can start a linked selection through entity references. The selection has no owner, every view only highlights the bound targets,selectedEntitieskeeps the given entities in input order (unbound ones included, listed inunknown), and repeating the same entities from the same source is a no-op that does not callonSelect.ViewTargetandLinkedViewNameare unchanged. The linked planning demo has an external task list.- Core:
diffStructure(before, after, { key, fields?, parentKey?, equals? })compares two versions of a flat or tree-shaped keyed collection, such as two revisions of a bill of materials, a WBS or a product hierarchy. It returnsaddedkeys (in after order),removedkeys andchangeditems with each changed field'sbeforeandaftervalues, and, withparentKey, themoveditems whose parent differs (in before order).keyandparentKeytake a property name or a function. The default fields are the own properties of both items, without the key and parent properties; values compare withObject.isunless you passequals. Keys follow the shared ID rule (Duplicate item ID: a (before)); unknown parents and cycles throw an Error. It uses loops only and never changes its inputs. New types:StructureDiffOptions,StructureKeyAccessor,StructureDiff,StructureChange,StructureFieldChangeandStructureMove. - Core:
projectTimelineRows(input, state)is the row part ofprojectTimelineView, for applications that show rows in their own tree table. It applies the search and column filters (matches keep their ancestors), sorts siblings stably by sort rules or columns, and drops collapsed IDs that name no row. It returnsrows,matchedRowIds,wbs,collapsedIdsand the row diagnostics (unknown-row,unknown-column,unknown-sort-rule).barsare optional: with them, the search reads bar labels and columns receive row summaries.projectTimelineViewnow uses it, and its output is unchanged. New types:TimelineRowsInput,TimelineRowViewStateandTimelineRowsProjection. traverseGraphtakes opt-inedgeFilter(edge, direction)to follow only some relations (it is told the walk direction),maxNodesto cap the result nearest first (starts count and are always kept; with'both'the two walks advance hop by hop together and a node counts once), andpaths. With any of them the result addstruncated({ nodeId, direction, reason: 'max-hops' | 'max-nodes' }[], where a limit stopped a walk); withpaths: trueit addsvia(oneMapper walk from each reached node to its first step{ edgeId, previousId }) andmultiplyReachedIds. Without the new options results are unchanged. New types:GraphWalkDirection,GraphTraversalTruncation,GraphTraversalStep,GraphTraversalVia,GraphTracedPath.graphTracePath(result, nodeId, { direction }?)rebuilds the nodes and edges from a start to a node from atraverseGraphresult made withpaths: true, using the fewest-hops path within one walk.resolveTimeRangeTargetsanduseLinkedSelectiontimeRange.traversalaccept the newedgeFilterandmaxNodes.- Keyed graph expansion:
beginGraphExpansion,cancelGraphExpansion,mergeGraphExpansionPageandgraphExpansionViewtake an optional{ key }(GraphExpansionKeyOptions), for example'forward','backward'or a relation name, kept in the new optional state fieldsexpandedIdsByKeyandpendingIdsByKey.graphExpansionView(state, { key })returns the frontier of that key. An unkeyed merge still marks a node expanded for every key, and calls without a key behave as before. - Time bucket tables in the core:
createTimeBucketColumnsturns sorted, non-overlapping half-open periods (gaps allowed;calendarBandsdays or weeks in an IANA zone work as they are) into column descriptors{ id, label, width, start, end }with deterministic IDs, andaggregateTimeBucketsaggregates time-stamped instants or intervals (placed by start, overlap or prorated share) into one sparse cell{ rowId, columnId, value, status, count }per row and bucket, with the rulessum,count,min,max,first,last,ratio(numerator and denominator, never averaged percentages),precomputed(server values as-is) or a custom reducer, per row. Buckets outside an optionalloadedcoverage (ranges, or a function such aswindowedCoverage) areunloadedwith a null value instead of 0, loaded buckets without items areloaded-empty, andcarryForwardoptslastrows into running balances.timeBucketIndexandtimeBucketIndexRangefind buckets by binary search, so a period table can follow GanttChart'sTimelineVisibleWindow. See Time bucket tables. - Core
treeGridCellsFromTimeBuckets(cells)andtreeGridCellContentFromTimeBucket(cell, extra?)turnaggregateTimeBucketscells into TreeGrid cells: a loaded value stays a value (asumof nothing is 0), a loaded bucket without a value isnone, and buckets that are not loaded keep theirunloaded,loadingorfailedstatus instead of showing 0.
Fixed
- A server-rendered
EventCalendarhydrates without a mismatch: Node.js formats the week title (Intl.DateTimeFormat#formatRange) with thin spaces around the dash where browsers write plain spaces. Formatted dates and times in the library (theEventCalendartitle and event names,intlTimeFormatter,calendarZoomPresetsand locale-awarecalendarBandslabels) now write thin, narrow no-break and no-break spaces (U+2009, U+202F, U+00A0) as plain spaces, so the server and the browser render the same text. The default English output is unchanged apart from those spaces. - Documentation: types and placeholders with angle brackets in
docs/(such asReadonlySet<string>orEdit <column> for <row>) are in code spans, so GitHub and npm show them instead of dropping them as HTML tags.
Demo
- New "Tree grid" demo: about 3,000 products against 30 columns with editing, spreadsheet operations, row structure editing, a lazily loaded group, undo and redo, linked to a NetworkGraph through
selectEntities. - New "Period table" demo: a TreeGrid of sites, items and measures against day or week columns (
calendarBands,createTimeBucketColumns,aggregateTimeBucketswithsum,last+carryForward,minandratio). Days that are not loaded show their load state, never 0, and a mid-week shortage is marked inside a positive week. Columns follow a GanttChart's visible window (timeBucketIndexRange), demand cells are editable with undo, and selecting a cell highlights the orders that feed it. - The example gallery (
gallery.html) is retired: every example and showcase is on the documentation site, andgallery.htmlforwards old links (?demo=<id>,#<id>) to the matching page, or to the example index. The production demo links to the example index. - The Calendar views showcase marks Ascension Day (Berlin) and Corpus Christi (Lisbon) instead of a Labour Day closure, whose header label was drawn over the Golden Week label.
- A new design gallery showcase, BOM editor: a multi-level bill of materials with shared subassemblies, edited in
TreeGridand linked to an item graph, with where-used walks (traverseGraphwithedgeFilter,maxNodesandgraphTracePath), a revision comparison withdiffStructure, search withprojectTimelineRowsand a quantity rollup.
Documentation
- A documentation website built with VitePress, in English with a Japanese version under
/ja/: getting started, an examples index by category with a page per example (live demo, source code tabs, related API), a showcase gallery, and an API reference whose pages are built fromdocs/*.md(overviews in both languages, detail tables in English) plus a type reference generated with TypeDoc for both entry points. Every example and showcase shows its own text and the components' labels in Japanese on Japanese pages. The site replaces the demo homepage and the example gallery; the production planning app stays at/vue-weave/demo/. - README.md and README.ja.md are shorter and point to the website.
Development
npm run build:demobuilds the site (with the generated type reference) intopreview/and checks every internal link and anchor;npm run devstarts the site's dev server andnpm run dev:demothe standalone demo. The site build (about 2,000 pages with the type reference in both languages) needs more than Node's default heap on machines with little memory, sobuild:demoanddevrun VitePress with a 6 GiB heap limit.scripts/serve.mjs,npm start,Start.cmd, the Playwright tests and the offline demo archive serve the site under/vue-weave/. New development dependencies:vitepress(2.0 prerelease, which uses Vite 8),typedoc,typedoc-plugin-markdownandtypedoc-vitepress-theme, with an npmoverridesentry for TypeDoc'sminimatch. The package contents and runtime dependencies are unchanged.