Add pure filter/lock logic with Vitest tests

Adds src/app/table-filters.ts (DataRow type, FilterType, distinctValues,
inferFilterType, matchesFilter, nextLockedRow) with 16 Vitest tests covering
type inference thresholds, date-range encoding, and row-lock toggling.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-06-18 09:42:18 +08:00
parent f8dcc268c6
commit 4faa960591
5 changed files with 993 additions and 3 deletions

View File

@@ -6,7 +6,9 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint"
"lint": "eslint",
"test": "vitest run",
"test:watch": "vitest"
},
"dependencies": {
"@ant-design/icons": "^6.2.5",
@@ -29,6 +31,7 @@
"eslint": "^9",
"eslint-config-next": "16.2.9",
"tailwindcss": "^4",
"typescript": "^5"
"typescript": "^5",
"vitest": "^4.1.9"
}
}