Repository navigation
Releases
v0.3.0
What changed for adopters
The local data source, for rows the application holds instead of a server.
- Its query function,
createLocalQuery, from@coding_doc/sveltedt/query: it takes the rows, a column map and a locale, and answers a query with one page of rows and the counts the pager shows. A bad query or column map is refused with a message that names it and holds no row value. The same function runs in the browser, on a Node server (plain Node imports it, with no bundler) and in tests. - Sorting in
createLocalQuery, by one column or several: each value by its own kind (numbers, dates, booleans, text), text by a collator for the given locale ("item2" before "item10", case ignored), empty values first, and tied rows in DataTables' order. A column can declare its type (number,dateorstring) for values held as text, or give asortValue. A locale the host cannot collate is refused rather than replaced by the host's own. - Filters and the global search in
createLocalQuery, as DataTables' smart search: words in any order, quoted phrases,!to exclude, case and accents ignored, the dotted and the dotless i alike. A categorical filter keeps the selected values, and its option for "no value" the rows without one. A column can give afilterValue, the text its filters and the search match, or keep the search out withsearchable: false; dates are searched asString(date), which depends on the time zone. An error the application's own column function throws is passed on as thecauseof one that names the column and the row. createLocalQueryreuses its work between the queries of one function: a column's sort values are read once, a page change reads no row, and a sort change under the same filters and search does not filter again. It keeps only integers between queries (4 bytes per row for each sorted column, the order and the filtered rows), never a copy of a row or its text.createLocalSource, from@coding_doc/sveltedt/local, the local data source's reactive wrapper: it givesDataTableandPaginationthe same props as the connection helper, without its transport, and answers each sort, filter, search and page change at once throughcreateLocalQuery. Its rows come from a function,rows: () => data.rows, read again when what it reads changes, so rows from aloadfunction, a prop or a fetch update the table; the server-rendered page shows the first page. A failure (an unknown column, a value no sort orders, rows that cannot be read) goes toonerror, or to the console without one; a refused change leaves the table as it was. New rows that leave the page past the end show the last page. Rows that arrive later (a fetch): passDataTablethestatus"loading"until they arrive, as the README shows. Stated limit: a page change, or a search, filter or sort that keeps the number of rows on the page, is not announced to screen readers.PaginationQueryProps, the pager props a helper holds, exported from the package root; the connection helper'spageruses it.DataTableQuery, the query shape that the connection helper and the local data source read, exported from the package root.ConnectionQueryis now another name for it.- On
DataTable,rowClass({ row })adds classes to a body row'strandcellClass({ row, column })to a body cell'std, after the column'sclass, from your data: each returns a string, orundefinedornullfor none, and is called again when a row is a new object or reactive state it reads changes. A hook that is not a function, returns anything else or throws shows the invalid-input alert and logsclassInvalid; "Reset table" stays there, as for the column'sclass.
Upgrade impact
Not breaking. Nothing changes for code written for 0.2.0.
Security
None.
A server route that passes a client's query to createLocalQuery should cap the length of its search and filter texts first: a search's cost grows with the rows, the searchable cells and the words of its text, about 7 ns per row, cell and word (the README gives the measurements).
All changes
Added
- the ./local and ./query exports, a plain Node import and the consumer page (package) (f429e8d)
- createLocalSource, the reactive wrapper of the local data source (local) (830d583)
- rowClass and cellClass mark rows and cells by their data (0eef3d0)
- createQuery keeps ranks, order and positions between queries (#377) (local) (2f668cf)
- text and categorical filters and the global search, as DataTables' smart search (#376) (local) (fffc894)
- order rows by each value's type, a locale collator, empties first and DataTables' ties (local) (79804ef)
- review fixes: one DataTableQuery type, the locale refused, split statements (local) (b135e06)
- the query function's page, its refusals and a plain Node load (LOCAL-01 to LOCAL-06) (local) (3f8d2cb)
Fixed
- review of createLocalSource: rows read once, reset's sort held, narrower types (local) (24055e0)
- review findings: each cache key part and a late refusal tested, texts made true (#377) (local) (aba2932)
- review findings: throwing getter wrapped, strict filter states, decomposed text (#376) (local) (225e2d4)
- re-read findings: entries read as checked, the prototype chain stated, finite numbers (local) (79fb49a)
- review findings on the order: calendar-checked dates, typed reads, row objects (local) (072e2df)
v0.2.0
What changed for adopters
A column can now carry its own classes and alignment:
classadds classes, as given, to the column's header cell and to each of its body cells;headerClassadds
classes to the header cell only, afterclass.align("start", the default,"center"or"end") sets the inline alignment of the column's header and body
cells;"start"and"end"follow the text direction. A column's filter dialog keeps its own alignment.- A
classorheaderClassthat is not a string, or analignthat is not one of the three values, shows the
table's invalid-input alert and logsclassInvalidoralignInvalid. "Reset table" stays in that alert state, as
it does for a sort or filter fault, whileonresetis given and a column is sortable or has a filter.
Upgrade impact
Not breaking. The three column properties are new and optional; a table that does not set them renders as before.
Security
None.
All changes
Added
- a column's class, headerClass and align (dab2f94)
Fixed
- an aligned column's filter dialog stays at start, and part A's tests read only what they state (4a4f1ed)
v0.1.0
What changed for adopters
The first release of SvelteDT: a server-driven, accessible data table for Svelte 5 that runs under a strict content-security policy.
- The table: columns, text or snippet cells, a caption, and the loading, failed, empty, busy and stopped states, with a progress indicator and a "Still loading" note on slow loads.
- Sorting by one or more columns, the pager with a page-size choice, the global search and the column filters.
- The connection helper, which talks to a server that answers DataTables' server-side protocol.
- One stylesheet,
@coding_doc/sveltedt/styles.css, with prefixed tokens that work with any CSS approach, Tailwind 4 included.
What this release does not do yet is listed in the README: What 0.1.0 does not do yet.
Upgrade impact
Not breaking. This release replaces the empty placeholder 0.0.0; there is nothing to migrate. Install it with npm install @coding_doc/sveltedt and follow the README's quick start.
Security
None.
All changes
Added
- describe every 0.1.0 export and fail the reference on a missing description (REF-03) (docs) (e958a39)
- the packed manifest names the repository and is not private (REL-08, #171) (release) (33369b7)
- API reference generated from the packed types with TypeDoc (#157) (docs) (d9e1f93)
- the filter dialog's look and placement, option labels, disabled pager look (filters) (6911a24)
- the controls get internal classes and a default look (THEME-50/51) (theme) (59d1f1a)
- one fixed alert for invalid input and the cause on the console (PAGE-16, PAGE-41) (pager) (9c472b4)
- the Svelte peer floor is 5.57.1 and the consumer runs at it (CON-16) (package) (023f66b)
- table.oncancel returns to the answered query or stops (CONN-33, CONN-34) (connection) (e5d03c7)
- table.onretry sends the current query again, as reload() (CONN-24) (connection) (961d8a0)
- the list page shows the token set its tokens parameter names (VIEW-01, 03, 04) (site) (7f552c1)
- Enter never submits the form; a composing Enter applies nothing (FILT-65..68) (search) (f50579a)
- table.onreset sends the starting sort with no filter or search (CONN-14) (connection) (81963a5)
- FILT-47's dialog words in three browsers; the no-match status (FILT-64) (filters) (976851b)
- a find field narrows a long categorical filter's options (FILT-52, FILT-18) (filters) (3a2f1db)
- a pressed badge moves focus to its column's filter button (FILT-24) (filters) (4946354)
- a press on the open dialog's button closes it, focus stays (FILT-63) (filters) (b03e847)
- focus leaving a filter dialog closes it (FILT-20, FILT-21, FILT-35) (filters) (6e4943e)
- Escape closes a filter dialog and stays inside it (FILT-07, FILT-36) (filters) (cc25d24)
- opening a filter dialog focuses its first field (FILT-12) (filters) (7f4ce50)
- a filter button's aria-expanded follows its dialog (FILT-11) (filters) (fd006e2)
- a categorical filter's boxes show a press until filters answers it (FILT-62, #274) (table) (5884120)
- quick presses in a categorical filter add up before filters answers (FILT-61, #274) (table) (c0774ea)
- a categorical filter can offer one more option for no value, last (FILT-53, #272) (table) (5afd743)
- each toggle of a categorical option emits the next selection (FILT-04, #272) (table) (8e7b515)
- a categorical filter offers its options as named checkboxes (FILT-17, #272) (table) (c44942a)
- a text filter's field in its dialog emits onfilter after the pause (FILT-01, #86) (table) (33a1d04)
- a press on "Filter " opens one dialog named " filter" (FILT-02, #86) (table) (4ccc391)
- under searchOnEnter the search field says "Press Enter to apply." (FILT-43, #262) (table) (d480a1d)
- refused search text is marked invalid with one message per condition (FILT-48, #262) (table) (fa817ce)
- the search field emits nothing for text it refuses after trimming (FILT-42, #262) (table) (ae245de)
- the field keeps its typed white space when search echoes it trimmed (FILT-58, #162) (table) (824f66b)
- the search field emits its text without outer white space (FILT-57, #162) (table) (a8addb4)
- the search field keeps newer typing when the applied search changes (FILT-49, #162) (table) (67aad33)
- the applied search shows in the field and is taken when it changes (FILT-44, #162) (table) (94f38f0)
- the search field emits after a pause, on Enter, or on Enter only (FILT-41, #162) (table) (d4e694e)
- the search field "Search" shows exactly while onsearch is given (FILT-40, #162) (table) (0d42aec)
- the panels snippet, after the toolbar and before the status line (EXP-04, #263) (table) (c4070a4)
- a filter on a column no map entry serves is refused (CONN-29, #158) (connection) (7761506)
- filter and search intents set the query and send one request (CONN-28, #158) (connection) (3775c3a)
- a categorical filter is sent as an escaped anchored alternation (CONN-10, #158) (connection) (0ee15a1)
- a column's text filter is sent as given in its column search (CONN-09, #158) (connection) (782155f)
- the global search is sent as given in search[value] (CONN-12, #158) (connection) (74c4a0c)
- the arrow keys scroll the focused region sideways (A11Y-08, #22) (table) (657d18c)
- the region is a Tab stop exactly while its content overflows (A11Y-12, #22) (table) (73b5cc1)
- under reduced motion the progress indicator stays still (STATE-14, #146) (table) (3b76f6b)
- a bar at the status line's foot that moves for 5 seconds (STATE-13, #146) (table) (ef5f39e)
- the stopped message in the status region is said, not shown (A11Y-32, #146) (table) (dcd07c4)
- no room for the status line before the first load (STATE-29, #146) (table) (ff056d6)
- the status line holds the status region and Cancel on one reserved line (#146) (table) (ce7642c)
- nothing changes after unmount (CONN-31, #140) (connection) (f89375b)
- a superseded or unmounted request is aborted (CONN-30, #140) (connection) (aa1da92)
- the outcome of a superseded request is dropped (CONN-22, #140) (connection) (f4fc0d8)
- the Error of an answer's failure carries the answer's code (CONN-21, #140) (connection) (49797b7)
- an answer with a true error fails, its text never shown (CONN-19, CONN-26) (connection) (3da4b6f)
- a send that rejects or throws is a failure (CONN-20, #140) (connection) (9aee684)
- a refused answer's message names the failed check (CONN-18, #140) (connection) (73f1df2)
- form dotted keeps list indexes in brackets and joins object keys with a dot (#139) (connection) (3da0874)
- form json sends the plain object a DataTables client builds (#139) (connection) (4daf7eb)
- refuse a sort that no map entry serves (#139) (connection) (c743bc7)
- reload sends the current query again (#139) (connection) (9b9b2c1)
- a page-size intent keeps the first row shown (#139) (connection) (5d2f398)
- a sort intent sets the query and sends one request (#139) (connection) (7021ef1)
- send each column's searchable and orderable flags (#139) (connection) (a8e535a)
- send receives one object { request, signal } (CONN-01, #231) (connection) (47ca9d8)
- a column's sortable takes at least one direction, as a non-empty tuple (SORT-15) (types) (d51dfef)
- getRowId receives { row }; every function and snippet of the props takes one argument (table) (b9174f5)
- a cell snippet receives { row, column } (RND-02, ruling 3 of #190) (table) (13ce902)
- a column's value receives { row } (RND-08, ruling 3 of #190) (table) (697a7d1)
- FILT-56 a column header cell is named by its label alone (table) (4826268)
- FILT-33 the filter words come from the given messages (table) (14ebd32)
- FILT-31 badges, criteria, Clear column filters and Reset table come in that order (table) (9955249)
- FILT-26 a press on "Reset table" emits onreset once (table) (1a156b7)
- FILT-30 "Reset table" shows exactly while onreset is given and a column can reset (table) (9b320ba)
- FILT-25 a press on "Clear column filters" emits onclearfilters once (table) (58a33fc)
- FILT-10 "Clear column filters" is shown exactly while a filter applies (table) (cfbdc5f)
- FILT-09 a press on a badge emits onclearfilter once with the column id (table) (b7f9ae5)
- FILT-22 a categorical badge names the selected options by label in the options' order (table) (e948b06)
- FILT-08 each applied text filter shows one badge button named by its visible words (table) (165cf03)
- FILT-29 a column with a filter shows the button "Filter " in its header cell (table) (2cf10a5)
- focus moves to the table when a focused Try again goes, without scrolling (A11Y-30) (table) (53b7f73)
- focus moves to the table when a focused Cancel goes, without scrolling (A11Y-28) (table) (100abfd)
- the ./connection export and the package step's reading of it (PKG-06, #208) (package) (8552075)
- a request is busy with the rows kept, or loading when none is on screen (CONN-23) (connection) (4fae3d1)
- an answer it cannot map fails; the pager stays at the page asked for (CONN-18, 25) (connection) (3088f1a)
- draw is 1 in the first request and one more in every later one (CONN-15) (connection) (f9f7be5)
- start and length are the offset and limit; pager.onpage sends its page (CONN-07) (connection) (ad9d8a8)
- an answer it can map gives the rows, both totals, ready and not busy (CONN-17) (connection) (01951c2)
- the status region says the stopped message once (A11Y-26) (table) (078e585)
- a press on Cancel or Try again emits its callback once (STATE-18) (table) (a31f176)
- no Try again beside the invalid-input alert (STATE-24) (table) (9853bef)
- Try again shows while stopped or failed when onretry is passed (STATE-23) (table) (7a4156a)
- Cancel shows beside the still-loading text when oncancel is passed (STATE-17) (table) (9d12e1a)
- FILT-32 invalid filter input shows the one alert and logs its code (table) (0298159)
- the status region is not atomic, so only the still-loading text is said (A11Y-20) (table) (5dd5465)
- the status region says Still loading a...
v0.1.0-rehearsal.0
What changed for adopters
The first release of SvelteDT: a server-driven, accessible data table for Svelte 5 that runs under a strict content-security policy.
- The table: columns, text or snippet cells, a caption, and the loading, failed, empty, busy and stopped states, with a progress indicator and a "Still loading" note on slow loads.
- Sorting by one or more columns, the pager with a page-size choice, the global search and the column filters.
- The connection helper, which talks to a server that answers DataTables' server-side protocol.
- One stylesheet,
@coding_doc/sveltedt/styles.css, with prefixed tokens that work with any CSS approach, Tailwind 4 included.
What this release does not do yet is listed in the README: What 0.1.0 does not do yet.
Upgrade impact
Not breaking. This release replaces the empty placeholder 0.0.0; there is nothing to migrate. Install it with npm install @coding_doc/sveltedt and follow the README's quick start.
Security
None.
All changes
Added
- describe every 0.1.0 export and fail the reference on a missing description (REF-03) (docs) (e958a39)
- the packed manifest names the repository and is not private (REL-08, #171) (release) (33369b7)
- API reference generated from the packed types with TypeDoc (#157) (docs) (d9e1f93)
- the filter dialog's look and placement, option labels, disabled pager look (filters) (6911a24)
- the controls get internal classes and a default look (THEME-50/51) (theme) (59d1f1a)
- one fixed alert for invalid input and the cause on the console (PAGE-16, PAGE-41) (pager) (9c472b4)
- the Svelte peer floor is 5.57.1 and the consumer runs at it (CON-16) (package) (023f66b)
- table.oncancel returns to the answered query or stops (CONN-33, CONN-34) (connection) (e5d03c7)
- table.onretry sends the current query again, as reload() (CONN-24) (connection) (961d8a0)
- the list page shows the token set its tokens parameter names (VIEW-01, 03, 04) (site) (7f552c1)
- Enter never submits the form; a composing Enter applies nothing (FILT-65..68) (search) (f50579a)
- table.onreset sends the starting sort with no filter or search (CONN-14) (connection) (81963a5)
- FILT-47's dialog words in three browsers; the no-match status (FILT-64) (filters) (976851b)
- a find field narrows a long categorical filter's options (FILT-52, FILT-18) (filters) (3a2f1db)
- a pressed badge moves focus to its column's filter button (FILT-24) (filters) (4946354)
- a press on the open dialog's button closes it, focus stays (FILT-63) (filters) (b03e847)
- focus leaving a filter dialog closes it (FILT-20, FILT-21, FILT-35) (filters) (6e4943e)
- Escape closes a filter dialog and stays inside it (FILT-07, FILT-36) (filters) (cc25d24)
- opening a filter dialog focuses its first field (FILT-12) (filters) (7f4ce50)
- a filter button's aria-expanded follows its dialog (FILT-11) (filters) (fd006e2)
- a categorical filter's boxes show a press until filters answers it (FILT-62, #274) (table) (5884120)
- quick presses in a categorical filter add up before filters answers (FILT-61, #274) (table) (c0774ea)
- a categorical filter can offer one more option for no value, last (FILT-53, #272) (table) (5afd743)
- each toggle of a categorical option emits the next selection (FILT-04, #272) (table) (8e7b515)
- a categorical filter offers its options as named checkboxes (FILT-17, #272) (table) (c44942a)
- a text filter's field in its dialog emits onfilter after the pause (FILT-01, #86) (table) (33a1d04)
- a press on "Filter " opens one dialog named " filter" (FILT-02, #86) (table) (4ccc391)
- under searchOnEnter the search field says "Press Enter to apply." (FILT-43, #262) (table) (d480a1d)
- refused search text is marked invalid with one message per condition (FILT-48, #262) (table) (fa817ce)
- the search field emits nothing for text it refuses after trimming (FILT-42, #262) (table) (ae245de)
- the field keeps its typed white space when search echoes it trimmed (FILT-58, #162) (table) (824f66b)
- the search field emits its text without outer white space (FILT-57, #162) (table) (a8addb4)
- the search field keeps newer typing when the applied search changes (FILT-49, #162) (table) (67aad33)
- the applied search shows in the field and is taken when it changes (FILT-44, #162) (table) (94f38f0)
- the search field emits after a pause, on Enter, or on Enter only (FILT-41, #162) (table) (d4e694e)
- the search field "Search" shows exactly while onsearch is given (FILT-40, #162) (table) (0d42aec)
- the panels snippet, after the toolbar and before the status line (EXP-04, #263) (table) (c4070a4)
- a filter on a column no map entry serves is refused (CONN-29, #158) (connection) (7761506)
- filter and search intents set the query and send one request (CONN-28, #158) (connection) (3775c3a)
- a categorical filter is sent as an escaped anchored alternation (CONN-10, #158) (connection) (0ee15a1)
- a column's text filter is sent as given in its column search (CONN-09, #158) (connection) (782155f)
- the global search is sent as given in search[value] (CONN-12, #158) (connection) (74c4a0c)
- the arrow keys scroll the focused region sideways (A11Y-08, #22) (table) (657d18c)
- the region is a Tab stop exactly while its content overflows (A11Y-12, #22) (table) (73b5cc1)
- under reduced motion the progress indicator stays still (STATE-14, #146) (table) (3b76f6b)
- a bar at the status line's foot that moves for 5 seconds (STATE-13, #146) (table) (ef5f39e)
- the stopped message in the status region is said, not shown (A11Y-32, #146) (table) (dcd07c4)
- no room for the status line before the first load (STATE-29, #146) (table) (ff056d6)
- the status line holds the status region and Cancel on one reserved line (#146) (table) (ce7642c)
- nothing changes after unmount (CONN-31, #140) (connection) (f89375b)
- a superseded or unmounted request is aborted (CONN-30, #140) (connection) (aa1da92)
- the outcome of a superseded request is dropped (CONN-22, #140) (connection) (f4fc0d8)
- the Error of an answer's failure carries the answer's code (CONN-21, #140) (connection) (49797b7)
- an answer with a true error fails, its text never shown (CONN-19, CONN-26) (connection) (3da4b6f)
- a send that rejects or throws is a failure (CONN-20, #140) (connection) (9aee684)
- a refused answer's message names the failed check (CONN-18, #140) (connection) (73f1df2)
- form dotted keeps list indexes in brackets and joins object keys with a dot (#139) (connection) (3da0874)
- form json sends the plain object a DataTables client builds (#139) (connection) (4daf7eb)
- refuse a sort that no map entry serves (#139) (connection) (c743bc7)
- reload sends the current query again (#139) (connection) (9b9b2c1)
- a page-size intent keeps the first row shown (#139) (connection) (5d2f398)
- a sort intent sets the query and sends one request (#139) (connection) (7021ef1)
- send each column's searchable and orderable flags (#139) (connection) (a8e535a)
- send receives one object { request, signal } (CONN-01, #231) (connection) (47ca9d8)
- a column's sortable takes at least one direction, as a non-empty tuple (SORT-15) (types) (d51dfef)
- getRowId receives { row }; every function and snippet of the props takes one argument (table) (b9174f5)
- a cell snippet receives { row, column } (RND-02, ruling 3 of #190) (table) (13ce902)
- a column's value receives { row } (RND-08, ruling 3 of #190) (table) (697a7d1)
- FILT-56 a column header cell is named by its label alone (table) (4826268)
- FILT-33 the filter words come from the given messages (table) (14ebd32)
- FILT-31 badges, criteria, Clear column filters and Reset table come in that order (table) (9955249)
- FILT-26 a press on "Reset table" emits onreset once (table) (1a156b7)
- FILT-30 "Reset table" shows exactly while onreset is given and a column can reset (table) (9b320ba)
- FILT-25 a press on "Clear column filters" emits onclearfilters once (table) (58a33fc)
- FILT-10 "Clear column filters" is shown exactly while a filter applies (table) (cfbdc5f)
- FILT-09 a press on a badge emits onclearfilter once with the column id (table) (b7f9ae5)
- FILT-22 a categorical badge names the selected options by label in the options' order (table) (e948b06)
- FILT-08 each applied text filter shows one badge button named by its visible words (table) (165cf03)
- FILT-29 a column with a filter shows the button "Filter " in its header cell (table) (2cf10a5)
- focus moves to the table when a focused Try again goes, without scrolling (A11Y-30) (table) (53b7f73)
- focus moves to the table when a focused Cancel goes, without scrolling (A11Y-28) (table) (100abfd)
- the ./connection export and the package step's reading of it (PKG-06, #208) (package) (8552075)
- a request is busy with the rows kept, or loading when none is on screen (CONN-23) (connection) (4fae3d1)
- an answer it cannot map fails; the pager stays at the page asked for (CONN-18, 25) (connection) (3088f1a)
- draw is 1 in the first request and one more in every later one (CONN-15) (connection) (f9f7be5)
- start and length are the offset and limit; pager.onpage sends its page (CONN-07) (connection) (ad9d8a8)
- an answer it can map gives the rows, both totals, ready and not busy (CONN-17) (connection) (01951c2)
- the status region says the stopped message once (A11Y-26) (table) (078e585)
- a press on Cancel or Try again emits its callback once (STATE-18) (table) (a31f176)
- no Try again beside the invalid-input alert (STATE-24) (table) (9853bef)
- Try again shows while stopped or failed when onretry is passed (STATE-23) (table) (7a4156a)
- Cancel shows beside the still-loading text when oncancel is passed (STATE-17) (table) (9d12e1a)
- FILT-32 invalid filter input shows the one alert and logs its code (table) (0298159)
- the status region is not atomic, so only the still-loading text is said (A11Y-20) (table) (5dd5465)
- the status region says Still loading a...