@fusion.dev/helix-headless 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +236 -29
- package/dist/data-table/root/data-table-root.d.ts +138 -28
- package/dist/data-table/root/data-table-root.js +110 -21
- package/dist/data-table/root/order.d.ts +25 -0
- package/dist/data-table/root/order.js +6 -3
- package/package.json +5 -5
- package/types/jsx.d.ts +154 -50
- package/types/vue.d.ts +40 -14
package/types/vue.d.ts
CHANGED
|
@@ -1985,6 +1985,20 @@ export type HelixHeadlessDataTableVueProps = {
|
|
|
1985
1985
|
"default-sort"?: (HelixHeadlessDataTable["defaultSort"]) | undefined;
|
|
1986
1986
|
/** Order to open on, where nothing declared one. */
|
|
1987
1987
|
defaultSort?: (HelixHeadlessDataTable["defaultSort"]) | undefined;
|
|
1988
|
+
/** How tall a row is taken to be before it has been drawn, in pixels.
|
|
1989
|
+
|
|
1990
|
+
Only read while `windowed`, and a starting guess rather than a claim: a
|
|
1991
|
+
cell that wraps makes its row taller than its neighbors, and the window
|
|
1992
|
+
replaces this with what each row came to as it draws. It still has to be
|
|
1993
|
+
close, because it is what the scrollbar is built from before anything has
|
|
1994
|
+
been measured. */
|
|
1995
|
+
estimate?: (HelixHeadlessDataTable["estimate"]) | undefined;
|
|
1996
|
+
/** The order, as `field:direction`.
|
|
1997
|
+
|
|
1998
|
+
Set it and this element defers: a reader's click fires `helix-sort` and
|
|
1999
|
+
changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
2000
|
+
element then owns. */
|
|
2001
|
+
sort?: (HelixHeadlessDataTable["sort"]) | undefined;
|
|
1988
2002
|
/** The field naming a row's stable identity.
|
|
1989
2003
|
|
|
1990
2004
|
**Needed before selection exists, not after.** Lit keys the rendered rows by
|
|
@@ -1994,20 +2008,20 @@ attached to the row it belongs to. Left unset the index is the key, which is
|
|
|
1994
2008
|
correct only while nothing reorders: it is why this defaults to something
|
|
1995
2009
|
that works and is worth setting anyway. */
|
|
1996
2010
|
key?: (HelixHeadlessDataTable["key"]) | undefined;
|
|
1997
|
-
/** The order, as `field:direction`.
|
|
1998
|
-
|
|
1999
|
-
Set it and this element defers: a reader's click fires `helix-sort` and
|
|
2000
|
-
changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
2001
|
-
element then owns. */
|
|
2002
|
-
sort?: (HelixHeadlessDataTable["sort"]) | undefined;
|
|
2003
|
-
/** Accessible name for the grid. */
|
|
2004
|
-
label?: (HelixHeadlessDataTable["label"]) | undefined;
|
|
2005
2011
|
/** What the rows are narrowed to, as one query across every column.
|
|
2006
2012
|
|
|
2007
2013
|
One query rather than a predicate per column, which is what a reader means
|
|
2008
2014
|
by a search box above a table. It matches on each column's ordering value,
|
|
2009
2015
|
so search and sort cannot disagree about what a column holds. */
|
|
2010
2016
|
filter?: (HelixHeadlessDataTable["filter"]) | undefined;
|
|
2017
|
+
/** Accessible name for the grid. */
|
|
2018
|
+
label?: (HelixHeadlessDataTable["label"]) | undefined;
|
|
2019
|
+
/** The page on show, from 1.
|
|
2020
|
+
|
|
2021
|
+
Clamped on the way out, so what this reports is the page it drew: a
|
|
2022
|
+
bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
2023
|
+
the last page rather than as 99. */
|
|
2024
|
+
page?: (HelixHeadlessDataTable["page"]) | undefined;
|
|
2011
2025
|
/** Whether this element does the work or asks the consumer to.
|
|
2012
2026
|
|
|
2013
2027
|
`client` filters, sorts and pages `rows` itself. `server` applies none of
|
|
@@ -2017,12 +2031,6 @@ the client cannot hold the data, so this is not an optimization, it is the
|
|
|
2017
2031
|
only mode that works, and it is here from the start because adding it later
|
|
2018
2032
|
inverts the data flow. */
|
|
2019
2033
|
mode?: (HelixHeadlessDataTable["mode"]) | undefined;
|
|
2020
|
-
/** The page on show, from 1.
|
|
2021
|
-
|
|
2022
|
-
Clamped on the way out, so what this reports is the page it drew: a
|
|
2023
|
-
bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
2024
|
-
the last page rather than as 99. */
|
|
2025
|
-
page?: (HelixHeadlessDataTable["page"]) | undefined;
|
|
2026
2034
|
/** How many rows a page holds. Zero is every row, which is what "no paging" means.
|
|
2027
2035
|
|
|
2028
2036
|
**It announces nothing, and that is not an omission.** Nothing in this
|
|
@@ -2046,6 +2054,24 @@ nothing about the result. Ignored in `client` mode rather than trusted,
|
|
|
2046
2054
|
because two sources for one count is the mistake, and here the array is the
|
|
2047
2055
|
one that cannot be stale. */
|
|
2048
2056
|
total?: (HelixHeadlessDataTable["total"]) | undefined;
|
|
2057
|
+
/** Draws the rows in view and stands empty space in for the rest.
|
|
2058
|
+
|
|
2059
|
+
**Not a `mode`.** `mode` says where the rows come from and who filtered
|
|
2060
|
+
them; this says how many of the ones we hold get drawn. They are
|
|
2061
|
+
independent: a consumer fetching five thousand rows a chunk at a time wants
|
|
2062
|
+
`mode="server"` and this at once, and folding this into `mode` would be an
|
|
2063
|
+
API that forbids that combination for no reason.
|
|
2064
|
+
|
|
2065
|
+
**Composes with `paginated` rather than excluding it.** A window over a
|
|
2066
|
+
page is coherent -- the page is the slice of the result, the window is the
|
|
2067
|
+
part of that slice on screen -- and the arithmetic is the same either way,
|
|
2068
|
+
so there is nothing to forbid. Together they suit a table paging at a
|
|
2069
|
+
thousand rows, where the page is a reasonable fetch and a poor render.
|
|
2070
|
+
|
|
2071
|
+
Off by default. Windowing costs a scroll listener, a measurement per row
|
|
2072
|
+
drawn, and a `block-size` on the scrolling box, and a table of twenty rows
|
|
2073
|
+
should pay none of them. */
|
|
2074
|
+
windowed?: (HelixHeadlessDataTable["windowed"]) | undefined;
|
|
2049
2075
|
/** Whether to draw a pagination under the grid.
|
|
2050
2076
|
|
|
2051
2077
|
On by default once a page size is set, because a paged table with no way to
|