Commit Graph

24 Commits

Author SHA1 Message Date
CentreMetre
f5833fcbf8 Fix doc typos and add Table class summary line
Correct 'A object' -> 'An object' and 'if i iss not set' -> 'if it is
not set', and add a one-line summary to the Table class JSDoc.
2026-06-15 21:15:44 +01:00
CentreMetre
95254027c4 Use a passed HTMLTableCellElement as the cell directly
When a cell value is a <td>/<th>, append it to the row as-is instead of
wrapping it in a generated <td>, which would have produced invalid nested
cells. Any other HTMLElement still gets wrapped as before.
2026-06-15 21:15:34 +01:00
CentreMetre
436217a8ff Add TypeScript build config for .d.ts declaration output
Set up tsconfig.json (declaration: true, DOM lib), package.json with
main/types/files pointing at dist, and .gitignore for node_modules/dist
so the library can be consumed with type declarations.
2026-06-15 17:30:46 +01:00
CentreMetre
8c561385b8 Add licence 2026-06-15 16:49:38 +01:00
CentreMetre
67ecf689a6 Add default css 2026-06-14 21:46:00 +01:00
CentreMetre
b0f40dea5f Reword HTMLElement cloneNode remark for clarity 2026-06-14 21:45:04 +01:00
CentreMetre
27488dd1b3 Mark internal helpers protected and document HTMLElement cell behaviour
Make createColumnsFromType, setHeaderRow and createPopulatedRow protected
to shrink the public surface, and add @remarks warning that an HTMLElement
cell value must be a unique node per row. Also fix doc typos.
2026-06-14 21:41:38 +01:00
CentreMetre
2a851983b2 Rename Column key to be clearer 2026-06-14 21:39:04 +01:00
CentreMetre
9825d25090 Add bigint handling 2026-06-14 21:38:35 +01:00
CentreMetre
4c5c444002 Add HTMLElement support 2026-06-14 21:11:09 +01:00
CentreMetre
fbaf215078 Rename Header type to Column
Rename the Header type to Column and update all references: the columns
field, the createColumnsFromType method, and the per-column loop
variables, so the naming reflects that each object describes a column.
2026-06-14 21:02:24 +01:00
CentreMetre
73f80d874b Typo fixes and minor change. 2026-06-14 20:55:04 +01:00
CentreMetre
0eb45263a4 Refactor constructor to an options object
Introduce an exported TableOptions<TRow> type and replace the trailing
positional constructor parameters (displayNamesAndOrder, messageElement,
trueSymbol, falseSymbol) with a single optional options object, so call
sites are order-independent and named.
2026-06-14 20:41:10 +01:00
CentreMetre
ccf81fa085 Add boolean symbol changing feature 2026-06-14 18:43:31 +01:00
CentreMetre
47ac4dacf8 Fix and remove unneccesary code. 2026-06-14 18:13:09 +01:00
CentreMetre
4e5428eee2 Fix and tidy TSDoc comments
Correct the constructor summary, replace stale R references with TRow,
fix {@link Header<TRow>} to {@link Header}, and fix assorted typos.
2026-06-14 18:06:44 +01:00
CentreMetre
8d8107ec49 Remove CSS handling from Table
Drop the loadCSS method and its constructor call. Styling is now the
consumer's responsibility via the emitted class names, keeping the
class self-contained and free of app-specific asset paths.
2026-06-14 18:06:44 +01:00
CentreMetre
d7c2851008 Generalise abstract Table: rename generic to TRow, add docs
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 17:28:57 +01:00
CentreMetre
026de5987b Add explanation comment 2026-06-14 17:00:35 +01:00
CentreMetre
59174d3c88 Change R generic to TRow 2026-06-14 16:31:45 +01:00
CentreMetre
071c5fc08c Fix typo 2026-06-14 16:29:53 +01:00
CentreMetre
3b0cb99334 Remove mention of Heist for User 2026-06-14 16:29:47 +01:00
CentreMetre
bc602c7bd8 Remove specific imports and specific functionality 2026-06-14 16:29:24 +01:00
CentreMetre
c8a1a69862 Init original 2026-06-14 16:28:24 +01:00