mirror of
https://github.com/hanzoai/ui.git
synced 2026-11-20 22:36:27 +00:00
Bring the Hanzo Base data-app layer to Airtable/Twenty-class polish, 100% original (no Twenty code — GPL kept at arm's length; Twenty observed as a running-UI reference only). New in pkg/data (published as @hanzo/[email protected]): - RecordsView shell: table <-> board switch, search, filter builder, sort builder, board group-by, optional saved views — one ViewConfig, applied via pure view/logic. - DataTable (Twenty-grade): click-to-sort headers, drag-resize + drag-reorder columns, row selection + select-all, inline cell editing, pagination, hover-open, honest states. - BoardView: kanban grouped by a select/status/boolean/relation field; drag-between-lanes emits the record patch (optimistic, reverts on failure). - RecordDetail: titled, inline-editable panel + related slot; RecordForm gains fieldOptions. - Field editors upgraded: searchable select dropdown w/ color chips, month-grid calendar, relation record-picker, file upload, validated JSON, sliding boolean toggle. - Pure logic (sort/filter/search/group/paginate/view) — gui-free, 37 unit tests, exported on subpaths (@hanzo/data/{table,board,view}/logic). - Self-contained primitives (Menu/CheckBox/Toggle/Calendar) on the minimal proven gui surface. - gui.config.ts + gui.d.ts so the package type-checks the v5 shorthands standalone. @hanzo/ui/primitives/bases/data re-exports @hanzo/data (the bases surface convention). tsc --noEmit clean; vitest 37/37.
12 lines
469 B
TypeScript
12 lines
469 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
|
|
/**
|
|
* Unit tests run in a plain Node env. Every suite targets the package's PURE
|
|
* logic (sort / filter / group / view state) — the modules that import only
|
|
* `type` from the field model, so no @hanzo/gui runtime is pulled in. The view
|
|
* components themselves are verified by the consuming app's build + visual e2e.
|
|
*/
|
|
export default defineConfig({
|
|
test: { environment: 'node', include: ['src/**/*.test.ts'] },
|
|
})
|