@fusion.dev/helix 0.6.0 → 0.7.1
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 +287 -30
- package/dist/data-table/root/data-table-root.css.js +23 -0
- package/dist/data-table/root/data-table-root.d.ts +14 -0
- package/package.json +6 -6
- package/types/jsx.d.ts +172 -50
- package/types/vue.d.ts +45 -15
package/custom-elements.json
CHANGED
|
@@ -22900,9 +22900,13 @@
|
|
|
22900
22900
|
"declarations": [
|
|
22901
22901
|
{
|
|
22902
22902
|
"kind": "class",
|
|
22903
|
-
"description": "Hairline rules between rows and no fill, per the rule that depth comes from a\nsingle border rather than from elevation. A header band would be elevation\nspelled differently, so the headings are weight and color instead.\n\nThe grid scrolls its own box and the toolbar and footer sit outside it: a\nsearch field that slides sideways when a reader scrolls the columns is a\nsearch field they lose.\n\n**The cell values do not server-render**, which is the headless tier's\nlimitation and worth repeating where a consumer chooses between the two: use\n`helix-table` where the content has to be in the served HTML.",
|
|
22903
|
+
"description": "Hairline rules between rows and no fill, per the rule that depth comes from a\nsingle border rather than from elevation. A header band would be elevation\nspelled differently, so the headings are weight and color instead.\n\nThe grid scrolls its own box and the toolbar and footer sit outside it: a\nsearch field that slides sideways when a reader scrolls the columns is a\nsearch field they lose.\n\n`windowed` draws only the rows in view, for a result too long to lay out at\nonce, and the headings stay put while they scroll. It is independent of\n`paginated` and of `mode`, so a page can be windowed and a server-fed chunk\ncan be too.\n\n**The cell values do not server-render**, which is the headless tier's\nlimitation and worth repeating where a consumer chooses between the two: use\n`helix-table` where the content has to be in the served HTML.",
|
|
22904
22904
|
"name": "HelixDataTable",
|
|
22905
22905
|
"cssProperties": [
|
|
22906
|
+
{
|
|
22907
|
+
"description": "How tall the scrolling box is while `windowed`. Ignored otherwise, where the grid is as tall as its rows. A definite height rather than a maximum, so a short result under `windowed` keeps the full box with space below it: a maximum would leave the height a function of the rows drawn, and the rows drawn a function of the height, which is the loop the window controller has to guard against rather than one worth entering on purpose.",
|
|
22908
|
+
"name": "--data-table-block-size"
|
|
22909
|
+
},
|
|
22906
22910
|
{
|
|
22907
22911
|
"description": "Ink in a cell.",
|
|
22908
22912
|
"name": "--data-table-color"
|
|
@@ -22911,6 +22915,10 @@
|
|
|
22911
22915
|
"description": "Track list for the columns, which wins over the one the columns worked out.",
|
|
22912
22916
|
"name": "--data-table-columns"
|
|
22913
22917
|
},
|
|
22918
|
+
{
|
|
22919
|
+
"description": "Fill behind a heading while `windowed`. Opaque on purpose: rows scroll under a sticky heading and a transparent one lets them through. Unset otherwise, so the headings stay weight rather than a band.",
|
|
22920
|
+
"name": "--data-table-heading-background-color"
|
|
22921
|
+
},
|
|
22914
22922
|
{
|
|
22915
22923
|
"description": "Ink in a heading.",
|
|
22916
22924
|
"name": "--data-table-heading-color"
|
|
@@ -22957,6 +22965,22 @@
|
|
|
22957
22965
|
"module": "src/data-table/root/data-table-root.ts"
|
|
22958
22966
|
}
|
|
22959
22967
|
},
|
|
22968
|
+
{
|
|
22969
|
+
"description": "The room the rows below the window would have taken. Windowed only.",
|
|
22970
|
+
"name": "after",
|
|
22971
|
+
"inheritedFrom": {
|
|
22972
|
+
"name": "HelixHeadlessDataTable",
|
|
22973
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
22974
|
+
}
|
|
22975
|
+
},
|
|
22976
|
+
{
|
|
22977
|
+
"description": "The room the rows above the window would have taken. Windowed only.",
|
|
22978
|
+
"name": "before",
|
|
22979
|
+
"inheritedFrom": {
|
|
22980
|
+
"name": "HelixHeadlessDataTable",
|
|
22981
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
22982
|
+
}
|
|
22983
|
+
},
|
|
22960
22984
|
{
|
|
22961
22985
|
"description": "Shown when no rows match.",
|
|
22962
22986
|
"name": "empty",
|
|
@@ -23258,13 +23282,13 @@
|
|
|
23258
23282
|
},
|
|
23259
23283
|
{
|
|
23260
23284
|
"kind": "field",
|
|
23261
|
-
"name": "
|
|
23285
|
+
"name": "estimate",
|
|
23262
23286
|
"type": {
|
|
23263
|
-
"text": "
|
|
23287
|
+
"text": "number"
|
|
23264
23288
|
},
|
|
23265
|
-
"default": "
|
|
23266
|
-
"description": "
|
|
23267
|
-
"attribute": "
|
|
23289
|
+
"default": "32",
|
|
23290
|
+
"description": "How tall a row is taken to be before it has been drawn, in pixels.\n\nOnly read while `windowed`, and a starting guess rather than a claim: a\ncell that wraps makes its row taller than its neighbors, and the window\nreplaces this with what each row came to as it draws. It still has to be\nclose, because it is what the scrollbar is built from before anything has\nbeen measured.",
|
|
23291
|
+
"attribute": "estimate",
|
|
23268
23292
|
"inheritedFrom": {
|
|
23269
23293
|
"name": "HelixHeadlessDataTable",
|
|
23270
23294
|
"module": "src/data-table/root/data-table-root.ts"
|
|
@@ -23285,13 +23309,13 @@
|
|
|
23285
23309
|
},
|
|
23286
23310
|
{
|
|
23287
23311
|
"kind": "field",
|
|
23288
|
-
"name": "
|
|
23312
|
+
"name": "key",
|
|
23289
23313
|
"type": {
|
|
23290
23314
|
"text": "string"
|
|
23291
23315
|
},
|
|
23292
23316
|
"default": "''",
|
|
23293
|
-
"description": "
|
|
23294
|
-
"attribute": "
|
|
23317
|
+
"description": "The field naming a row's stable identity.\n\n**Needed before selection exists, not after.** Lit keys the rendered rows by\nit, so a sort moves a row's element rather than rewriting every cell in\nplace, which is what keeps focus inside a cell and keeps a CSS transition\nattached to the row it belongs to. Left unset the index is the key, which is\ncorrect only while nothing reorders: it is why this defaults to something\nthat works and is worth setting anyway.",
|
|
23318
|
+
"attribute": "key",
|
|
23295
23319
|
"inheritedFrom": {
|
|
23296
23320
|
"name": "HelixHeadlessDataTable",
|
|
23297
23321
|
"module": "src/data-table/root/data-table-root.ts"
|
|
@@ -23312,13 +23336,13 @@
|
|
|
23312
23336
|
},
|
|
23313
23337
|
{
|
|
23314
23338
|
"kind": "field",
|
|
23315
|
-
"name": "
|
|
23339
|
+
"name": "label",
|
|
23316
23340
|
"type": {
|
|
23317
|
-
"text": "
|
|
23341
|
+
"text": "string"
|
|
23318
23342
|
},
|
|
23319
|
-
"default": "'
|
|
23320
|
-
"description": "
|
|
23321
|
-
"attribute": "
|
|
23343
|
+
"default": "''",
|
|
23344
|
+
"description": "Accessible name for the grid.",
|
|
23345
|
+
"attribute": "label",
|
|
23322
23346
|
"inheritedFrom": {
|
|
23323
23347
|
"name": "HelixHeadlessDataTable",
|
|
23324
23348
|
"module": "src/data-table/root/data-table-root.ts"
|
|
@@ -23337,6 +23361,20 @@
|
|
|
23337
23361
|
"module": "src/data-table/root/data-table-root.ts"
|
|
23338
23362
|
}
|
|
23339
23363
|
},
|
|
23364
|
+
{
|
|
23365
|
+
"kind": "field",
|
|
23366
|
+
"name": "mode",
|
|
23367
|
+
"type": {
|
|
23368
|
+
"text": "'client' | 'server'"
|
|
23369
|
+
},
|
|
23370
|
+
"default": "'client'",
|
|
23371
|
+
"description": "Whether this element does the work or asks the consumer to.\n\n`client` filters, sorts and pages `rows` itself. `server` applies none of\nthem: `rows` is the page, `total` is the size of the whole result, and the\nthree events are requests the consumer answers by fetching. Past some size\nthe client cannot hold the data, so this is not an optimization, it is the\nonly mode that works, and it is here from the start because adding it later\ninverts the data flow.",
|
|
23372
|
+
"attribute": "mode",
|
|
23373
|
+
"inheritedFrom": {
|
|
23374
|
+
"name": "HelixHeadlessDataTable",
|
|
23375
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
23376
|
+
}
|
|
23377
|
+
},
|
|
23340
23378
|
{
|
|
23341
23379
|
"kind": "field",
|
|
23342
23380
|
"name": "rows",
|
|
@@ -23377,6 +23415,21 @@
|
|
|
23377
23415
|
"module": "src/data-table/root/data-table-root.ts"
|
|
23378
23416
|
}
|
|
23379
23417
|
},
|
|
23418
|
+
{
|
|
23419
|
+
"kind": "field",
|
|
23420
|
+
"name": "windowed",
|
|
23421
|
+
"type": {
|
|
23422
|
+
"text": "boolean"
|
|
23423
|
+
},
|
|
23424
|
+
"default": "false",
|
|
23425
|
+
"description": "Draws the rows in view and stands empty space in for the rest.\n\n**Not a `mode`.** `mode` says where the rows come from and who filtered\nthem; this says how many of the ones we hold get drawn. They are\nindependent: a consumer fetching five thousand rows a chunk at a time wants\n`mode=\"server\"` and this at once, and folding this into `mode` would be an\nAPI that forbids that combination for no reason.\n\n**Composes with `paginated` rather than excluding it.** A window over a\npage is coherent -- the page is the slice of the result, the window is the\npart of that slice on screen -- and the arithmetic is the same either way,\nso there is nothing to forbid. Together they suit a table paging at a\nthousand rows, where the page is a reasonable fetch and a poor render.\n\nOff by default. Windowing costs a scroll listener, a measurement per row\ndrawn, and a `block-size` on the scrolling box, and a table of twenty rows\nshould pay none of them.",
|
|
23426
|
+
"attribute": "windowed",
|
|
23427
|
+
"reflects": true,
|
|
23428
|
+
"inheritedFrom": {
|
|
23429
|
+
"name": "HelixHeadlessDataTable",
|
|
23430
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
23431
|
+
}
|
|
23432
|
+
},
|
|
23380
23433
|
{
|
|
23381
23434
|
"kind": "field",
|
|
23382
23435
|
"name": "paginated",
|
|
@@ -23455,6 +23508,96 @@
|
|
|
23455
23508
|
"module": "src/data-table/root/data-table-root.ts"
|
|
23456
23509
|
}
|
|
23457
23510
|
},
|
|
23511
|
+
{
|
|
23512
|
+
"kind": "field",
|
|
23513
|
+
"name": "virtualize",
|
|
23514
|
+
"privacy": "private",
|
|
23515
|
+
"readonly": true,
|
|
23516
|
+
"default": "new VirtualizeController(this, { /* Null while `windowed` is off, which is what keeps the controller inert rather than conditionally constructed: a controller is built once and this property can change at runtime. */ container: () => this.windowed ? this.renderRoot.querySelector<HTMLElement>('[part=\"table\"]') : null, count: () => this.available, estimate: () => this.estimate, /* Always measured when windowing at all. The uniform path converts offset to index by division and is right when rows are one height; a grid whose cells wrap is the case it is wrong for. */ measured: () => this.windowed, rows: () => (this.windowed ? this.drawn() : []), })",
|
|
23517
|
+
"inheritedFrom": {
|
|
23518
|
+
"name": "HelixHeadlessDataTable",
|
|
23519
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
23520
|
+
}
|
|
23521
|
+
},
|
|
23522
|
+
{
|
|
23523
|
+
"kind": "method",
|
|
23524
|
+
"name": "drawn",
|
|
23525
|
+
"privacy": "private",
|
|
23526
|
+
"return": {
|
|
23527
|
+
"type": {
|
|
23528
|
+
"text": "{ element: HTMLElement; index: number }[]"
|
|
23529
|
+
}
|
|
23530
|
+
},
|
|
23531
|
+
"description": "The rows in the shadow tree, each with the row of the page it drew.\n\n**Read off `data-index` rather than counted.** `hostUpdated` runs before\n`updated`, so what is in the tree when the controller asks is the previous\nwindow; counting from the current one would record the right heights\nagainst the wrong rows every time the window moved.",
|
|
23532
|
+
"inheritedFrom": {
|
|
23533
|
+
"name": "HelixHeadlessDataTable",
|
|
23534
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
23535
|
+
}
|
|
23536
|
+
},
|
|
23537
|
+
{
|
|
23538
|
+
"kind": "field",
|
|
23539
|
+
"name": "available",
|
|
23540
|
+
"type": {
|
|
23541
|
+
"text": "number"
|
|
23542
|
+
},
|
|
23543
|
+
"privacy": "private",
|
|
23544
|
+
"description": "How many rows there are to window over: the page, or the result.\n\n**Read off the held arrangement rather than counted afresh**, because the\ncontroller asks this on every scroll and `matched` walks the whole result\nwhenever a filter is on. Held, a scroll through a filtered table of five\nthousand rows costs a lookup; counted, it costs five thousand comparisons a\nframe, which is the cost windowing was added to avoid.\n\n`matched` still answers where nothing is windowing, which is the path that\nholds nothing and should not start.",
|
|
23545
|
+
"readonly": true,
|
|
23546
|
+
"inheritedFrom": {
|
|
23547
|
+
"name": "HelixHeadlessDataTable",
|
|
23548
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
23549
|
+
}
|
|
23550
|
+
},
|
|
23551
|
+
{
|
|
23552
|
+
"kind": "field",
|
|
23553
|
+
"name": "held",
|
|
23554
|
+
"type": {
|
|
23555
|
+
"text": "{ key: string; source: readonly DataRow[]; value: Arranged } | undefined"
|
|
23556
|
+
},
|
|
23557
|
+
"privacy": "private",
|
|
23558
|
+
"description": "The arranged result, kept between renders.\n\n**A window moves and the order does not.** Every scroll that reveals a row\nre-renders, and deriving that render from `rows` would filter and sort the\nwhole result again each time: 23.7ms at five thousand rows, three frames\nspent before a cell is drawn. Held against the inputs that change it, a\nscroll costs a slice.\n\nOnly the windowed path uses this. A paged table re-renders when the reader\nasks for a page, which is rare enough that holding a second copy of the\nresult to save a sort is the wrong trade.",
|
|
23559
|
+
"inheritedFrom": {
|
|
23560
|
+
"name": "HelixHeadlessDataTable",
|
|
23561
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
23562
|
+
}
|
|
23563
|
+
},
|
|
23564
|
+
{
|
|
23565
|
+
"kind": "method",
|
|
23566
|
+
"name": "arrange",
|
|
23567
|
+
"privacy": "private",
|
|
23568
|
+
"return": {
|
|
23569
|
+
"type": {
|
|
23570
|
+
"text": "Arranged"
|
|
23571
|
+
}
|
|
23572
|
+
},
|
|
23573
|
+
"inheritedFrom": {
|
|
23574
|
+
"name": "HelixHeadlessDataTable",
|
|
23575
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
23576
|
+
}
|
|
23577
|
+
},
|
|
23578
|
+
{
|
|
23579
|
+
"kind": "method",
|
|
23580
|
+
"name": "windowOf",
|
|
23581
|
+
"privacy": "private",
|
|
23582
|
+
"return": {
|
|
23583
|
+
"type": {
|
|
23584
|
+
"text": "DataRow[]"
|
|
23585
|
+
}
|
|
23586
|
+
},
|
|
23587
|
+
"parameters": [
|
|
23588
|
+
{
|
|
23589
|
+
"name": "rows",
|
|
23590
|
+
"type": {
|
|
23591
|
+
"text": "DataRow[]"
|
|
23592
|
+
}
|
|
23593
|
+
}
|
|
23594
|
+
],
|
|
23595
|
+
"description": "The part of a page the reader can see, which is every row when not windowed.",
|
|
23596
|
+
"inheritedFrom": {
|
|
23597
|
+
"name": "HelixHeadlessDataTable",
|
|
23598
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
23599
|
+
}
|
|
23600
|
+
},
|
|
23458
23601
|
{
|
|
23459
23602
|
"kind": "field",
|
|
23460
23603
|
"name": "tableColumns",
|
|
@@ -23543,7 +23686,7 @@
|
|
|
23543
23686
|
}
|
|
23544
23687
|
}
|
|
23545
23688
|
],
|
|
23546
|
-
"description": "Says so when a table is asked to draw more than it comfortably can.\n\n**The component renders every row it is given and defaults to doing so.**\n`defaultPageSize` is `0`, so `paginated` is false unless a consumer asks,\nwhich means the out-of-the-box arrangement is the unbounded one and nothing\nabout it says that a result of any size will simply be drawn.\n\n**Windowing was refused
|
|
23689
|
+
"description": "Says so when a table is asked to draw more than it comfortably can.\n\n**The component renders every row it is given and defaults to doing so.**\n`defaultPageSize` is `0`, so `paginated` is false unless a consumer asks,\nwhich means the out-of-the-box arrangement is the unbounded one and nothing\nabout it says that a result of any size will simply be drawn.\n\n**Windowing was refused here, and is now `windowed`.** The refusal is kept\nbecause most of it was right, and because what changed is not that somebody\ndisagreed with it. It rested on four claims: that a third mechanism would\nfight `paginated` and `mode=\"server\"`; that a grid has rows of different\nheights; that it needs a sticky header; and that `aria-rowindex` has to keep\ndescribing a result the element no longer holds in full.\n\nThree stopped being true. `VirtualizeController` learnt to measure each row\nand place the next by what the one above came to, which is the variable\nheights. `aria-rowindex` was already result-relative because paging needed\nit, so a window is a second offset on arithmetic that existed. And the\nsticky header is one `position: sticky` on the heading cells rather than on\n`[part=\"head\"]`, which is `display: contents` and generates no box to stick\n-- that is why it looked hard and is not.\n\nThe first was avoided rather than answered. `windowed` is not a `mode` and\ndoes not exclude `paginated`: it says how much of what we hold gets drawn,\nwhere `mode` says where it came from, so there is no third axis to fight the\nother two. What survives is the cost, which is why windowing is off by\ndefault and why this warning still fires for a table that has none of them.\n\nWarned once per element, in a browser only: a warning during a server render\nis one nobody can act on and one that would print per request.",
|
|
23547
23690
|
"inheritedFrom": {
|
|
23548
23691
|
"name": "HelixHeadlessDataTable",
|
|
23549
23692
|
"module": "src/data-table/root/data-table-root.ts"
|
|
@@ -23553,7 +23696,7 @@
|
|
|
23553
23696
|
"kind": "field",
|
|
23554
23697
|
"name": "view",
|
|
23555
23698
|
"type": {
|
|
23556
|
-
"text": "{ matched: number
|
|
23699
|
+
"text": "{\n available: number\n matched: number\n rows: DataRow[]\n total: number\n }"
|
|
23557
23700
|
},
|
|
23558
23701
|
"privacy": "private",
|
|
23559
23702
|
"description": "The rows to draw, and the counts around them.\n\nIn `server` mode this element applies nothing: `rows` is already the page,\n`total` is the result, and both counts come from the consumer. Anything else\nwould be this element filtering a page it was handed, which narrows one\nscreen and calls it a search.",
|
|
@@ -23869,7 +24012,83 @@
|
|
|
23869
24012
|
}
|
|
23870
24013
|
}
|
|
23871
24014
|
],
|
|
23872
|
-
"description": "A row's place in the whole result, counting the header as row 1.\n\n**The number describes the result and not the window**, which is the whole\nreason a virtualized or paged grid needs `aria-rowindex` at all: a screen\nreader on page three should hear row 41, and a grid whose indices restart at\nevery page tells a reader the result is twenty rows long however many it has.",
|
|
24015
|
+
"description": "A row's place in the whole result, counting the header as row 1.\n\n**The number describes the result and not the window**, which is the whole\nreason a virtualized or paged grid needs `aria-rowindex` at all: a screen\nreader on page three should hear row 41, and a grid whose indices restart at\nevery page tells a reader the result is twenty rows long however many it has.\n\nA window is the second offset and stacks on the page: with both on, row one\nof the window is the page's start plus how far down the page it begins.",
|
|
24016
|
+
"inheritedFrom": {
|
|
24017
|
+
"name": "HelixHeadlessDataTable",
|
|
24018
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
24019
|
+
}
|
|
24020
|
+
},
|
|
24021
|
+
{
|
|
24022
|
+
"kind": "field",
|
|
24023
|
+
"name": "placement",
|
|
24024
|
+
"type": {
|
|
24025
|
+
"text": "string"
|
|
24026
|
+
},
|
|
24027
|
+
"privacy": "private",
|
|
24028
|
+
"description": "What decides which row is at which index, as one comparable value.\n\nNot the rows themselves: those are compared by identity beside this, and a\nconsumer handing back an equal array is handing back the same rows in the\nsame order whatever object it is.",
|
|
24029
|
+
"readonly": true,
|
|
24030
|
+
"inheritedFrom": {
|
|
24031
|
+
"name": "HelixHeadlessDataTable",
|
|
24032
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
24033
|
+
}
|
|
24034
|
+
},
|
|
24035
|
+
{
|
|
24036
|
+
"kind": "field",
|
|
24037
|
+
"name": "measuredAgainst",
|
|
24038
|
+
"type": {
|
|
24039
|
+
"text": "string"
|
|
24040
|
+
},
|
|
24041
|
+
"privacy": "private",
|
|
24042
|
+
"default": "''",
|
|
24043
|
+
"description": "The signature the recorded heights were measured against.",
|
|
24044
|
+
"inheritedFrom": {
|
|
24045
|
+
"name": "HelixHeadlessDataTable",
|
|
24046
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
24047
|
+
}
|
|
24048
|
+
},
|
|
24049
|
+
{
|
|
24050
|
+
"kind": "field",
|
|
24051
|
+
"name": "windowStart",
|
|
24052
|
+
"type": {
|
|
24053
|
+
"text": "number"
|
|
24054
|
+
},
|
|
24055
|
+
"privacy": "private",
|
|
24056
|
+
"description": "Where the window begins in the page, which is the top when there is none.",
|
|
24057
|
+
"readonly": true,
|
|
24058
|
+
"inheritedFrom": {
|
|
24059
|
+
"name": "HelixHeadlessDataTable",
|
|
24060
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
24061
|
+
}
|
|
24062
|
+
},
|
|
24063
|
+
{
|
|
24064
|
+
"kind": "method",
|
|
24065
|
+
"name": "renderSpacer",
|
|
24066
|
+
"privacy": "private",
|
|
24067
|
+
"return": {
|
|
24068
|
+
"type": {
|
|
24069
|
+
"text": "TemplateResult | typeof nothing"
|
|
24070
|
+
}
|
|
24071
|
+
},
|
|
24072
|
+
"parameters": [
|
|
24073
|
+
{
|
|
24074
|
+
"name": "end",
|
|
24075
|
+
"type": {
|
|
24076
|
+
"text": "'after' | 'before'"
|
|
24077
|
+
}
|
|
24078
|
+
}
|
|
24079
|
+
],
|
|
24080
|
+
"description": "The room the rows outside the window would have taken.\n\n**`role=\"presentation\"`, because this is geometry standing inside a\n`rowgroup`.** A bare `div` there is a child the role does not allow, and a\nscreen reader walking the rows would meet something that is not one. The\nroom itself is what keeps the scrollbar honest: a box that scrolls twenty\nrows while claiming ten thousand gives a thumb the size of its track.",
|
|
24081
|
+
"inheritedFrom": {
|
|
24082
|
+
"name": "HelixHeadlessDataTable",
|
|
24083
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
24084
|
+
}
|
|
24085
|
+
},
|
|
24086
|
+
{
|
|
24087
|
+
"kind": "field",
|
|
24088
|
+
"name": "handleScroll",
|
|
24089
|
+
"privacy": "private",
|
|
24090
|
+
"readonly": true,
|
|
24091
|
+
"description": "The controller owns the geometry; this is only what tells it to look again.",
|
|
23873
24092
|
"inheritedFrom": {
|
|
23874
24093
|
"name": "HelixHeadlessDataTable",
|
|
23875
24094
|
"module": "src/data-table/root/data-table-root.ts"
|
|
@@ -24113,9 +24332,21 @@
|
|
|
24113
24332
|
"min": 420,
|
|
24114
24333
|
"slug": "events"
|
|
24115
24334
|
},
|
|
24335
|
+
{
|
|
24336
|
+
"description": "Eight rows at a time, with a pagination the table draws itself.",
|
|
24337
|
+
"slug": "paging"
|
|
24338
|
+
},
|
|
24116
24339
|
{
|
|
24117
24340
|
"description": "One query across every column, from a search field the page owns.",
|
|
24118
24341
|
"slug": "searching"
|
|
24342
|
+
},
|
|
24343
|
+
{
|
|
24344
|
+
"description": "Pages of five hundred, each drawn a window at a time.",
|
|
24345
|
+
"slug": "windowed-paging"
|
|
24346
|
+
},
|
|
24347
|
+
{
|
|
24348
|
+
"description": "Five thousand rows, drawing only the ones in view.",
|
|
24349
|
+
"slug": "windowing"
|
|
24119
24350
|
}
|
|
24120
24351
|
],
|
|
24121
24352
|
"source": "helix/styled/src/data-table"
|
|
@@ -24215,13 +24446,13 @@
|
|
|
24215
24446
|
}
|
|
24216
24447
|
},
|
|
24217
24448
|
{
|
|
24218
|
-
"name": "
|
|
24449
|
+
"name": "estimate",
|
|
24219
24450
|
"type": {
|
|
24220
|
-
"text": "
|
|
24451
|
+
"text": "number"
|
|
24221
24452
|
},
|
|
24222
|
-
"default": "
|
|
24223
|
-
"description": "
|
|
24224
|
-
"fieldName": "
|
|
24453
|
+
"default": "32",
|
|
24454
|
+
"description": "How tall a row is taken to be before it has been drawn, in pixels.\n\nOnly read while `windowed`, and a starting guess rather than a claim: a\ncell that wraps makes its row taller than its neighbors, and the window\nreplaces this with what each row came to as it draws. It still has to be\nclose, because it is what the scrollbar is built from before anything has\nbeen measured.",
|
|
24455
|
+
"fieldName": "estimate",
|
|
24225
24456
|
"inheritedFrom": {
|
|
24226
24457
|
"name": "HelixHeadlessDataTable",
|
|
24227
24458
|
"module": "src/data-table/root/data-table-root.ts"
|
|
@@ -24240,13 +24471,13 @@
|
|
|
24240
24471
|
}
|
|
24241
24472
|
},
|
|
24242
24473
|
{
|
|
24243
|
-
"name": "
|
|
24474
|
+
"name": "key",
|
|
24244
24475
|
"type": {
|
|
24245
24476
|
"text": "string"
|
|
24246
24477
|
},
|
|
24247
24478
|
"default": "''",
|
|
24248
|
-
"description": "
|
|
24249
|
-
"fieldName": "
|
|
24479
|
+
"description": "The field naming a row's stable identity.\n\n**Needed before selection exists, not after.** Lit keys the rendered rows by\nit, so a sort moves a row's element rather than rewriting every cell in\nplace, which is what keeps focus inside a cell and keeps a CSS transition\nattached to the row it belongs to. Left unset the index is the key, which is\ncorrect only while nothing reorders: it is why this defaults to something\nthat works and is worth setting anyway.",
|
|
24480
|
+
"fieldName": "key",
|
|
24250
24481
|
"inheritedFrom": {
|
|
24251
24482
|
"name": "HelixHeadlessDataTable",
|
|
24252
24483
|
"module": "src/data-table/root/data-table-root.ts"
|
|
@@ -24265,13 +24496,13 @@
|
|
|
24265
24496
|
}
|
|
24266
24497
|
},
|
|
24267
24498
|
{
|
|
24268
|
-
"name": "
|
|
24499
|
+
"name": "label",
|
|
24269
24500
|
"type": {
|
|
24270
|
-
"text": "
|
|
24501
|
+
"text": "string"
|
|
24271
24502
|
},
|
|
24272
|
-
"default": "'
|
|
24273
|
-
"description": "
|
|
24274
|
-
"fieldName": "
|
|
24503
|
+
"default": "''",
|
|
24504
|
+
"description": "Accessible name for the grid.",
|
|
24505
|
+
"fieldName": "label",
|
|
24275
24506
|
"inheritedFrom": {
|
|
24276
24507
|
"name": "HelixHeadlessDataTable",
|
|
24277
24508
|
"module": "src/data-table/root/data-table-root.ts"
|
|
@@ -24289,6 +24520,19 @@
|
|
|
24289
24520
|
"module": "src/data-table/root/data-table-root.ts"
|
|
24290
24521
|
}
|
|
24291
24522
|
},
|
|
24523
|
+
{
|
|
24524
|
+
"name": "mode",
|
|
24525
|
+
"type": {
|
|
24526
|
+
"text": "'client' | 'server'"
|
|
24527
|
+
},
|
|
24528
|
+
"default": "'client'",
|
|
24529
|
+
"description": "Whether this element does the work or asks the consumer to.\n\n`client` filters, sorts and pages `rows` itself. `server` applies none of\nthem: `rows` is the page, `total` is the size of the whole result, and the\nthree events are requests the consumer answers by fetching. Past some size\nthe client cannot hold the data, so this is not an optimization, it is the\nonly mode that works, and it is here from the start because adding it later\ninverts the data flow.",
|
|
24530
|
+
"fieldName": "mode",
|
|
24531
|
+
"inheritedFrom": {
|
|
24532
|
+
"name": "HelixHeadlessDataTable",
|
|
24533
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
24534
|
+
}
|
|
24535
|
+
},
|
|
24292
24536
|
{
|
|
24293
24537
|
"name": "page-size",
|
|
24294
24538
|
"type": {
|
|
@@ -24314,6 +24558,19 @@
|
|
|
24314
24558
|
"module": "src/data-table/root/data-table-root.ts"
|
|
24315
24559
|
}
|
|
24316
24560
|
},
|
|
24561
|
+
{
|
|
24562
|
+
"name": "windowed",
|
|
24563
|
+
"type": {
|
|
24564
|
+
"text": "boolean"
|
|
24565
|
+
},
|
|
24566
|
+
"default": "false",
|
|
24567
|
+
"description": "Draws the rows in view and stands empty space in for the rest.\n\n**Not a `mode`.** `mode` says where the rows come from and who filtered\nthem; this says how many of the ones we hold get drawn. They are\nindependent: a consumer fetching five thousand rows a chunk at a time wants\n`mode=\"server\"` and this at once, and folding this into `mode` would be an\nAPI that forbids that combination for no reason.\n\n**Composes with `paginated` rather than excluding it.** A window over a\npage is coherent -- the page is the slice of the result, the window is the\npart of that slice on screen -- and the arithmetic is the same either way,\nso there is nothing to forbid. Together they suit a table paging at a\nthousand rows, where the page is a reasonable fetch and a poor render.\n\nOff by default. Windowing costs a scroll listener, a measurement per row\ndrawn, and a `block-size` on the scrolling box, and a table of twenty rows\nshould pay none of them.",
|
|
24568
|
+
"fieldName": "windowed",
|
|
24569
|
+
"inheritedFrom": {
|
|
24570
|
+
"name": "HelixHeadlessDataTable",
|
|
24571
|
+
"module": "src/data-table/root/data-table-root.ts"
|
|
24572
|
+
}
|
|
24573
|
+
},
|
|
24317
24574
|
{
|
|
24318
24575
|
"name": "paginated",
|
|
24319
24576
|
"type": {
|
|
@@ -76,6 +76,24 @@ padding-inline: var(--helix-space-sm);
|
|
|
76
76
|
text-align: center;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
:host([windowed]) [part="table"] {
|
|
80
|
+
block-size: var(--data-table-block-size, 24em);
|
|
81
|
+
overflow-y: auto;
|
|
82
|
+
overscroll-behavior: contain;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host([windowed]) ::slotted(helix-table-column) {
|
|
86
|
+
background-color: var(--data-table-heading-background-color, var(--helix-color-background));
|
|
87
|
+
inset-block-start: 0;
|
|
88
|
+
position: sticky;
|
|
89
|
+
z-index: 1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[part="before"],
|
|
93
|
+
[part="after"] {
|
|
94
|
+
grid-column: 1 / -1;
|
|
95
|
+
}
|
|
96
|
+
|
|
79
97
|
:host([loading]) [part="table"] {
|
|
80
98
|
opacity: 0.5;
|
|
81
99
|
}
|
|
@@ -90,6 +108,11 @@ box-shadow: none;
|
|
|
90
108
|
overflow-x: visible;
|
|
91
109
|
}
|
|
92
110
|
|
|
111
|
+
:host([windowed]) [part="table"] {
|
|
112
|
+
block-size: auto;
|
|
113
|
+
overflow-y: visible;
|
|
114
|
+
}
|
|
115
|
+
|
|
93
116
|
[part="footer"] {
|
|
94
117
|
display: none;
|
|
95
118
|
}
|
|
@@ -14,6 +14,11 @@ import '../../table/index.js';
|
|
|
14
14
|
* search field that slides sideways when a reader scrolls the columns is a
|
|
15
15
|
* search field they lose.
|
|
16
16
|
*
|
|
17
|
+
* `windowed` draws only the rows in view, for a result too long to lay out at
|
|
18
|
+
* once, and the headings stay put while they scroll. It is independent of
|
|
19
|
+
* `paginated` and of `mode`, so a page can be windowed and a server-fed chunk
|
|
20
|
+
* can be too.
|
|
21
|
+
*
|
|
17
22
|
* **The cell values do not server-render**, which is the headless tier's
|
|
18
23
|
* limitation and worth repeating where a consumer chooses between the two: use
|
|
19
24
|
* `helix-table` where the content has to be in the served HTML.
|
|
@@ -30,8 +35,17 @@ import '../../table/index.js';
|
|
|
30
35
|
* @csspart cell - One cell.
|
|
31
36
|
* @csspart table - The grid.
|
|
32
37
|
*
|
|
38
|
+
* @cssproperty --data-table-block-size - How tall the scrolling box is while `windowed`.
|
|
39
|
+
* Ignored otherwise, where the grid is as tall as its rows. A definite height rather than a
|
|
40
|
+
* maximum, so a short result under `windowed` keeps the full box with space below it: a
|
|
41
|
+
* maximum would leave the height a function of the rows drawn, and the rows drawn a function
|
|
42
|
+
* of the height, which is the loop the window controller has to guard against rather than
|
|
43
|
+
* one worth entering on purpose.
|
|
33
44
|
* @cssproperty --data-table-color - Ink in a cell.
|
|
34
45
|
* @cssproperty --data-table-columns - Track list for the columns, which wins over the one the columns worked out.
|
|
46
|
+
* @cssproperty --data-table-heading-background-color - Fill behind a heading while `windowed`.
|
|
47
|
+
* Opaque on purpose: rows scroll under a sticky heading and a transparent one lets them
|
|
48
|
+
* through. Unset otherwise, so the headings stay weight rather than a band.
|
|
35
49
|
* @cssproperty --data-table-heading-color - Ink in a heading.
|
|
36
50
|
* @cssproperty --data-table-padding-block - Space above and below a cell's content.
|
|
37
51
|
* @cssproperty --data-table-padding-inline - Space either side of a cell's content.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix",
|
|
3
3
|
"description": "Styled component tier. Extends the headless tier with token-driven presentation.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@fusion.dev/helix-core": "0.
|
|
50
|
-
"@fusion.dev/helix-headless": "0.
|
|
51
|
-
"@fusion.dev/helix-styles": "0.
|
|
49
|
+
"@fusion.dev/helix-core": "0.7.1",
|
|
50
|
+
"@fusion.dev/helix-headless": "0.7.1",
|
|
51
|
+
"@fusion.dev/helix-styles": "0.7.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
55
|
-
"@fusion.dev/helix-cem": "0.
|
|
56
|
-
"@fusion.dev/helix-testing": "0.
|
|
55
|
+
"@fusion.dev/helix-cem": "0.7.1",
|
|
56
|
+
"@fusion.dev/helix-testing": "0.7.1",
|
|
57
57
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
58
58
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
59
59
|
"@lit-labs/ssr": "^3.3.0",
|
package/types/jsx.d.ts
CHANGED
|
@@ -4962,6 +4962,20 @@ say that without the component knowing what a row looks like. */
|
|
|
4962
4962
|
"default-sort"?: (HelixDataTable["defaultSort"]) | undefined;
|
|
4963
4963
|
/** Order to open on, where nothing declared one. */
|
|
4964
4964
|
defaultSort?: (HelixDataTable["defaultSort"]) | undefined;
|
|
4965
|
+
/** How tall a row is taken to be before it has been drawn, in pixels.
|
|
4966
|
+
|
|
4967
|
+
Only read while `windowed`, and a starting guess rather than a claim: a
|
|
4968
|
+
cell that wraps makes its row taller than its neighbors, and the window
|
|
4969
|
+
replaces this with what each row came to as it draws. It still has to be
|
|
4970
|
+
close, because it is what the scrollbar is built from before anything has
|
|
4971
|
+
been measured. */
|
|
4972
|
+
estimate?: (HelixDataTable["estimate"]) | undefined;
|
|
4973
|
+
/** The order, as `field:direction`.
|
|
4974
|
+
|
|
4975
|
+
Set it and this element defers: a reader's click fires `helix-sort` and
|
|
4976
|
+
changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
4977
|
+
element then owns. */
|
|
4978
|
+
sort?: (HelixDataTable["sort"]) | undefined;
|
|
4965
4979
|
/** The field naming a row's stable identity.
|
|
4966
4980
|
|
|
4967
4981
|
**Needed before selection exists, not after.** Lit keys the rendered rows by
|
|
@@ -4971,20 +4985,20 @@ attached to the row it belongs to. Left unset the index is the key, which is
|
|
|
4971
4985
|
correct only while nothing reorders: it is why this defaults to something
|
|
4972
4986
|
that works and is worth setting anyway. */
|
|
4973
4987
|
key?: (HelixDataTable["key"]) | undefined;
|
|
4974
|
-
/** The order, as `field:direction`.
|
|
4975
|
-
|
|
4976
|
-
Set it and this element defers: a reader's click fires `helix-sort` and
|
|
4977
|
-
changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
4978
|
-
element then owns. */
|
|
4979
|
-
sort?: (HelixDataTable["sort"]) | undefined;
|
|
4980
|
-
/** Accessible name for the grid. */
|
|
4981
|
-
label?: (HelixDataTable["label"]) | undefined;
|
|
4982
4988
|
/** What the rows are narrowed to, as one query across every column.
|
|
4983
4989
|
|
|
4984
4990
|
One query rather than a predicate per column, which is what a reader means
|
|
4985
4991
|
by a search box above a table. It matches on each column's ordering value,
|
|
4986
4992
|
so search and sort cannot disagree about what a column holds. */
|
|
4987
4993
|
filter?: (HelixDataTable["filter"]) | undefined;
|
|
4994
|
+
/** Accessible name for the grid. */
|
|
4995
|
+
label?: (HelixDataTable["label"]) | undefined;
|
|
4996
|
+
/** The page on show, from 1.
|
|
4997
|
+
|
|
4998
|
+
Clamped on the way out, so what this reports is the page it drew: a
|
|
4999
|
+
bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
5000
|
+
the last page rather than as 99. */
|
|
5001
|
+
page?: (HelixDataTable["page"]) | undefined;
|
|
4988
5002
|
/** Whether this element does the work or asks the consumer to.
|
|
4989
5003
|
|
|
4990
5004
|
`client` filters, sorts and pages `rows` itself. `server` applies none of
|
|
@@ -4994,12 +5008,6 @@ the client cannot hold the data, so this is not an optimization, it is the
|
|
|
4994
5008
|
only mode that works, and it is here from the start because adding it later
|
|
4995
5009
|
inverts the data flow. */
|
|
4996
5010
|
mode?: (HelixDataTable["mode"]) | undefined;
|
|
4997
|
-
/** The page on show, from 1.
|
|
4998
|
-
|
|
4999
|
-
Clamped on the way out, so what this reports is the page it drew: a
|
|
5000
|
-
bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
5001
|
-
the last page rather than as 99. */
|
|
5002
|
-
page?: (HelixDataTable["page"]) | undefined;
|
|
5003
5011
|
/** How many rows a page holds. Zero is every row, which is what "no paging" means.
|
|
5004
5012
|
|
|
5005
5013
|
**It announces nothing, and that is not an omission.** Nothing in this
|
|
@@ -5023,6 +5031,24 @@ nothing about the result. Ignored in `client` mode rather than trusted,
|
|
|
5023
5031
|
because two sources for one count is the mistake, and here the array is the
|
|
5024
5032
|
one that cannot be stale. */
|
|
5025
5033
|
total?: (HelixDataTable["total"]) | undefined;
|
|
5034
|
+
/** Draws the rows in view and stands empty space in for the rest.
|
|
5035
|
+
|
|
5036
|
+
**Not a `mode`.** `mode` says where the rows come from and who filtered
|
|
5037
|
+
them; this says how many of the ones we hold get drawn. They are
|
|
5038
|
+
independent: a consumer fetching five thousand rows a chunk at a time wants
|
|
5039
|
+
`mode="server"` and this at once, and folding this into `mode` would be an
|
|
5040
|
+
API that forbids that combination for no reason.
|
|
5041
|
+
|
|
5042
|
+
**Composes with `paginated` rather than excluding it.** A window over a
|
|
5043
|
+
page is coherent -- the page is the slice of the result, the window is the
|
|
5044
|
+
part of that slice on screen -- and the arithmetic is the same either way,
|
|
5045
|
+
so there is nothing to forbid. Together they suit a table paging at a
|
|
5046
|
+
thousand rows, where the page is a reasonable fetch and a poor render.
|
|
5047
|
+
|
|
5048
|
+
Off by default. Windowing costs a scroll listener, a measurement per row
|
|
5049
|
+
drawn, and a `block-size` on the scrolling box, and a table of twenty rows
|
|
5050
|
+
should pay none of them. */
|
|
5051
|
+
windowed?: (HelixDataTable["windowed"]) | undefined;
|
|
5026
5052
|
/** Whether to draw a pagination under the grid.
|
|
5027
5053
|
|
|
5028
5054
|
On by default once a page size is set, because a paged table with no way to
|
|
@@ -5080,6 +5106,20 @@ say that without the component knowing what a row looks like. */
|
|
|
5080
5106
|
"attr:default-sort"?: (HelixDataTable["defaultSort"]) | undefined;
|
|
5081
5107
|
/** Order to open on, where nothing declared one. */
|
|
5082
5108
|
"prop:defaultSort"?: (HelixDataTable["defaultSort"]) | undefined;
|
|
5109
|
+
/** How tall a row is taken to be before it has been drawn, in pixels.
|
|
5110
|
+
|
|
5111
|
+
Only read while `windowed`, and a starting guess rather than a claim: a
|
|
5112
|
+
cell that wraps makes its row taller than its neighbors, and the window
|
|
5113
|
+
replaces this with what each row came to as it draws. It still has to be
|
|
5114
|
+
close, because it is what the scrollbar is built from before anything has
|
|
5115
|
+
been measured. */
|
|
5116
|
+
"prop:estimate"?: (HelixDataTable["estimate"]) | undefined;
|
|
5117
|
+
/** The order, as `field:direction`.
|
|
5118
|
+
|
|
5119
|
+
Set it and this element defers: a reader's click fires `helix-sort` and
|
|
5120
|
+
changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
5121
|
+
element then owns. */
|
|
5122
|
+
"prop:sort"?: (HelixDataTable["sort"]) | undefined;
|
|
5083
5123
|
/** The field naming a row's stable identity.
|
|
5084
5124
|
|
|
5085
5125
|
**Needed before selection exists, not after.** Lit keys the rendered rows by
|
|
@@ -5089,20 +5129,20 @@ attached to the row it belongs to. Left unset the index is the key, which is
|
|
|
5089
5129
|
correct only while nothing reorders: it is why this defaults to something
|
|
5090
5130
|
that works and is worth setting anyway. */
|
|
5091
5131
|
"prop:key"?: (HelixDataTable["key"]) | undefined;
|
|
5092
|
-
/** The order, as `field:direction`.
|
|
5093
|
-
|
|
5094
|
-
Set it and this element defers: a reader's click fires `helix-sort` and
|
|
5095
|
-
changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
5096
|
-
element then owns. */
|
|
5097
|
-
"prop:sort"?: (HelixDataTable["sort"]) | undefined;
|
|
5098
|
-
/** Accessible name for the grid. */
|
|
5099
|
-
"prop:label"?: (HelixDataTable["label"]) | undefined;
|
|
5100
5132
|
/** What the rows are narrowed to, as one query across every column.
|
|
5101
5133
|
|
|
5102
5134
|
One query rather than a predicate per column, which is what a reader means
|
|
5103
5135
|
by a search box above a table. It matches on each column's ordering value,
|
|
5104
5136
|
so search and sort cannot disagree about what a column holds. */
|
|
5105
5137
|
"prop:filter"?: (HelixDataTable["filter"]) | undefined;
|
|
5138
|
+
/** Accessible name for the grid. */
|
|
5139
|
+
"prop:label"?: (HelixDataTable["label"]) | undefined;
|
|
5140
|
+
/** The page on show, from 1.
|
|
5141
|
+
|
|
5142
|
+
Clamped on the way out, so what this reports is the page it drew: a
|
|
5143
|
+
bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
5144
|
+
the last page rather than as 99. */
|
|
5145
|
+
"prop:page"?: (HelixDataTable["page"]) | undefined;
|
|
5106
5146
|
/** Whether this element does the work or asks the consumer to.
|
|
5107
5147
|
|
|
5108
5148
|
`client` filters, sorts and pages `rows` itself. `server` applies none of
|
|
@@ -5112,12 +5152,6 @@ the client cannot hold the data, so this is not an optimization, it is the
|
|
|
5112
5152
|
only mode that works, and it is here from the start because adding it later
|
|
5113
5153
|
inverts the data flow. */
|
|
5114
5154
|
"prop:mode"?: (HelixDataTable["mode"]) | undefined;
|
|
5115
|
-
/** The page on show, from 1.
|
|
5116
|
-
|
|
5117
|
-
Clamped on the way out, so what this reports is the page it drew: a
|
|
5118
|
-
bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
5119
|
-
the last page rather than as 99. */
|
|
5120
|
-
"prop:page"?: (HelixDataTable["page"]) | undefined;
|
|
5121
5155
|
/** How many rows a page holds. Zero is every row, which is what "no paging" means.
|
|
5122
5156
|
|
|
5123
5157
|
**It announces nothing, and that is not an omission.** Nothing in this
|
|
@@ -5141,6 +5175,24 @@ nothing about the result. Ignored in `client` mode rather than trusted,
|
|
|
5141
5175
|
because two sources for one count is the mistake, and here the array is the
|
|
5142
5176
|
one that cannot be stale. */
|
|
5143
5177
|
"prop:total"?: (HelixDataTable["total"]) | undefined;
|
|
5178
|
+
/** Draws the rows in view and stands empty space in for the rest.
|
|
5179
|
+
|
|
5180
|
+
**Not a `mode`.** `mode` says where the rows come from and who filtered
|
|
5181
|
+
them; this says how many of the ones we hold get drawn. They are
|
|
5182
|
+
independent: a consumer fetching five thousand rows a chunk at a time wants
|
|
5183
|
+
`mode="server"` and this at once, and folding this into `mode` would be an
|
|
5184
|
+
API that forbids that combination for no reason.
|
|
5185
|
+
|
|
5186
|
+
**Composes with `paginated` rather than excluding it.** A window over a
|
|
5187
|
+
page is coherent -- the page is the slice of the result, the window is the
|
|
5188
|
+
part of that slice on screen -- and the arithmetic is the same either way,
|
|
5189
|
+
so there is nothing to forbid. Together they suit a table paging at a
|
|
5190
|
+
thousand rows, where the page is a reasonable fetch and a poor render.
|
|
5191
|
+
|
|
5192
|
+
Off by default. Windowing costs a scroll listener, a measurement per row
|
|
5193
|
+
drawn, and a `block-size` on the scrolling box, and a table of twenty rows
|
|
5194
|
+
should pay none of them. */
|
|
5195
|
+
"prop:windowed"?: (HelixDataTable["windowed"]) | undefined;
|
|
5144
5196
|
/** Whether to draw a pagination under the grid.
|
|
5145
5197
|
|
|
5146
5198
|
On by default once a page size is set, because a paged table with no way to
|
|
@@ -21811,6 +21863,11 @@ export type CustomElements = {
|
|
|
21811
21863
|
* search field that slides sideways when a reader scrolls the columns is a
|
|
21812
21864
|
* search field they lose.
|
|
21813
21865
|
*
|
|
21866
|
+
* `windowed` draws only the rows in view, for a result too long to lay out at
|
|
21867
|
+
* once, and the headings stay put while they scroll. It is independent of
|
|
21868
|
+
* `paginated` and of `mode`, so a page can be windowed and a server-fed chunk
|
|
21869
|
+
* can be too.
|
|
21870
|
+
*
|
|
21814
21871
|
* **The cell values do not server-render**, which is the headless tier's
|
|
21815
21872
|
* limitation and worth repeating where a consumer chooses between the two: use
|
|
21816
21873
|
* `helix-table` where the content has to be in the served HTML.
|
|
@@ -21830,6 +21887,18 @@ export type CustomElements = {
|
|
|
21830
21887
|
* - `default-page`/`defaultPage`: Page to open on, where nothing declared one.
|
|
21831
21888
|
* - `default-page-size`/`defaultPageSize`: Page size to open with, where nothing declared one.
|
|
21832
21889
|
* - `default-sort`/`defaultSort`: Order to open on, where nothing declared one.
|
|
21890
|
+
* - `estimate`: How tall a row is taken to be before it has been drawn, in pixels.
|
|
21891
|
+
*
|
|
21892
|
+
* Only read while `windowed`, and a starting guess rather than a claim: a
|
|
21893
|
+
* cell that wraps makes its row taller than its neighbors, and the window
|
|
21894
|
+
* replaces this with what each row came to as it draws. It still has to be
|
|
21895
|
+
* close, because it is what the scrollbar is built from before anything has
|
|
21896
|
+
* been measured.
|
|
21897
|
+
* - `sort`: The order, as `field:direction`.
|
|
21898
|
+
*
|
|
21899
|
+
* Set it and this element defers: a reader's click fires `helix-sort` and
|
|
21900
|
+
* changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
21901
|
+
* element then owns.
|
|
21833
21902
|
* - `key`: The field naming a row's stable identity.
|
|
21834
21903
|
*
|
|
21835
21904
|
* **Needed before selection exists, not after.** Lit keys the rendered rows by
|
|
@@ -21838,17 +21907,17 @@ export type CustomElements = {
|
|
|
21838
21907
|
* attached to the row it belongs to. Left unset the index is the key, which is
|
|
21839
21908
|
* correct only while nothing reorders: it is why this defaults to something
|
|
21840
21909
|
* that works and is worth setting anyway.
|
|
21841
|
-
* - `sort`: The order, as `field:direction`.
|
|
21842
|
-
*
|
|
21843
|
-
* Set it and this element defers: a reader's click fires `helix-sort` and
|
|
21844
|
-
* changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
21845
|
-
* element then owns.
|
|
21846
|
-
* - `label`: Accessible name for the grid.
|
|
21847
21910
|
* - `filter`: What the rows are narrowed to, as one query across every column.
|
|
21848
21911
|
*
|
|
21849
21912
|
* One query rather than a predicate per column, which is what a reader means
|
|
21850
21913
|
* by a search box above a table. It matches on each column's ordering value,
|
|
21851
21914
|
* so search and sort cannot disagree about what a column holds.
|
|
21915
|
+
* - `label`: Accessible name for the grid.
|
|
21916
|
+
* - `page`: The page on show, from 1.
|
|
21917
|
+
*
|
|
21918
|
+
* Clamped on the way out, so what this reports is the page it drew: a
|
|
21919
|
+
* bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
21920
|
+
* the last page rather than as 99.
|
|
21852
21921
|
* - `mode`: Whether this element does the work or asks the consumer to.
|
|
21853
21922
|
*
|
|
21854
21923
|
* `client` filters, sorts and pages `rows` itself. `server` applies none of
|
|
@@ -21857,11 +21926,6 @@ export type CustomElements = {
|
|
|
21857
21926
|
* the client cannot hold the data, so this is not an optimization, it is the
|
|
21858
21927
|
* only mode that works, and it is here from the start because adding it later
|
|
21859
21928
|
* inverts the data flow.
|
|
21860
|
-
* - `page`: The page on show, from 1.
|
|
21861
|
-
*
|
|
21862
|
-
* Clamped on the way out, so what this reports is the page it drew: a
|
|
21863
|
-
* bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
21864
|
-
* the last page rather than as 99.
|
|
21865
21929
|
* - `page-size`/`pageSize`: How many rows a page holds. Zero is every row, which is what "no paging" means.
|
|
21866
21930
|
*
|
|
21867
21931
|
* **It announces nothing, and that is not an omission.** Nothing in this
|
|
@@ -21875,6 +21939,23 @@ export type CustomElements = {
|
|
|
21875
21939
|
* nothing about the result. Ignored in `client` mode rather than trusted,
|
|
21876
21940
|
* because two sources for one count is the mistake, and here the array is the
|
|
21877
21941
|
* one that cannot be stale.
|
|
21942
|
+
* - `windowed`: Draws the rows in view and stands empty space in for the rest.
|
|
21943
|
+
*
|
|
21944
|
+
* **Not a `mode`.** `mode` says where the rows come from and who filtered
|
|
21945
|
+
* them; this says how many of the ones we hold get drawn. They are
|
|
21946
|
+
* independent: a consumer fetching five thousand rows a chunk at a time wants
|
|
21947
|
+
* `mode="server"` and this at once, and folding this into `mode` would be an
|
|
21948
|
+
* API that forbids that combination for no reason.
|
|
21949
|
+
*
|
|
21950
|
+
* **Composes with `paginated` rather than excluding it.** A window over a
|
|
21951
|
+
* page is coherent -- the page is the slice of the result, the window is the
|
|
21952
|
+
* part of that slice on screen -- and the arithmetic is the same either way,
|
|
21953
|
+
* so there is nothing to forbid. Together they suit a table paging at a
|
|
21954
|
+
* thousand rows, where the page is a reasonable fetch and a poor render.
|
|
21955
|
+
*
|
|
21956
|
+
* Off by default. Windowing costs a scroll listener, a measurement per row
|
|
21957
|
+
* drawn, and a `block-size` on the scrolling box, and a table of twenty rows
|
|
21958
|
+
* should pay none of them.
|
|
21878
21959
|
* - `paginated`: Whether to draw a pagination under the grid.
|
|
21879
21960
|
*
|
|
21880
21961
|
* On by default once a page size is set, because a paged table with no way to
|
|
@@ -21944,8 +22025,10 @@ export type CustomElements = {
|
|
|
21944
22025
|
*
|
|
21945
22026
|
* CSS variables available for styling the component.
|
|
21946
22027
|
*
|
|
22028
|
+
* - `--data-table-block-size`: How tall the scrolling box is while `windowed`. Ignored otherwise, where the grid is as tall as its rows. A definite height rather than a maximum, so a short result under `windowed` keeps the full box with space below it: a maximum would leave the height a function of the rows drawn, and the rows drawn a function of the height, which is the loop the window controller has to guard against rather than one worth entering on purpose. (default: `undefined`)
|
|
21947
22029
|
* - `--data-table-color`: Ink in a cell. (default: `undefined`)
|
|
21948
22030
|
* - `--data-table-columns`: Track list for the columns, which wins over the one the columns worked out. (default: `undefined`)
|
|
22031
|
+
* - `--data-table-heading-background-color`: Fill behind a heading while `windowed`. Opaque on purpose: rows scroll under a sticky heading and a transparent one lets them through. Unset otherwise, so the headings stay weight rather than a band. (default: `undefined`)
|
|
21949
22032
|
* - `--data-table-heading-color`: Ink in a heading. (default: `undefined`)
|
|
21950
22033
|
* - `--data-table-padding-block`: Space above and below a cell's content. (default: `undefined`)
|
|
21951
22034
|
* - `--data-table-padding-inline`: Space either side of a cell's content. (default: `undefined`)
|
|
@@ -21959,6 +22042,8 @@ export type CustomElements = {
|
|
|
21959
22042
|
*
|
|
21960
22043
|
* - `cell`: One cell.
|
|
21961
22044
|
* - `table`: The grid.
|
|
22045
|
+
* - `after`: The room the rows below the window would have taken. Windowed only.
|
|
22046
|
+
* - `before`: The room the rows above the window would have taken. Windowed only.
|
|
21962
22047
|
* - `empty`: Shown when no rows match.
|
|
21963
22048
|
* - `footer`: The region below the grid.
|
|
21964
22049
|
* - `head`: The row the column headings sit in. `display: contents`, so it takes no space.
|
|
@@ -37485,6 +37570,11 @@ export type CustomElementsSolidJs = {
|
|
|
37485
37570
|
* search field that slides sideways when a reader scrolls the columns is a
|
|
37486
37571
|
* search field they lose.
|
|
37487
37572
|
*
|
|
37573
|
+
* `windowed` draws only the rows in view, for a result too long to lay out at
|
|
37574
|
+
* once, and the headings stay put while they scroll. It is independent of
|
|
37575
|
+
* `paginated` and of `mode`, so a page can be windowed and a server-fed chunk
|
|
37576
|
+
* can be too.
|
|
37577
|
+
*
|
|
37488
37578
|
* **The cell values do not server-render**, which is the headless tier's
|
|
37489
37579
|
* limitation and worth repeating where a consumer chooses between the two: use
|
|
37490
37580
|
* `helix-table` where the content has to be in the served HTML.
|
|
@@ -37504,6 +37594,18 @@ export type CustomElementsSolidJs = {
|
|
|
37504
37594
|
* - `default-page`/`defaultPage`: Page to open on, where nothing declared one.
|
|
37505
37595
|
* - `default-page-size`/`defaultPageSize`: Page size to open with, where nothing declared one.
|
|
37506
37596
|
* - `default-sort`/`defaultSort`: Order to open on, where nothing declared one.
|
|
37597
|
+
* - `estimate`: How tall a row is taken to be before it has been drawn, in pixels.
|
|
37598
|
+
*
|
|
37599
|
+
* Only read while `windowed`, and a starting guess rather than a claim: a
|
|
37600
|
+
* cell that wraps makes its row taller than its neighbors, and the window
|
|
37601
|
+
* replaces this with what each row came to as it draws. It still has to be
|
|
37602
|
+
* close, because it is what the scrollbar is built from before anything has
|
|
37603
|
+
* been measured.
|
|
37604
|
+
* - `sort`: The order, as `field:direction`.
|
|
37605
|
+
*
|
|
37606
|
+
* Set it and this element defers: a reader's click fires `helix-sort` and
|
|
37607
|
+
* changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
37608
|
+
* element then owns.
|
|
37507
37609
|
* - `key`: The field naming a row's stable identity.
|
|
37508
37610
|
*
|
|
37509
37611
|
* **Needed before selection exists, not after.** Lit keys the rendered rows by
|
|
@@ -37512,17 +37614,17 @@ export type CustomElementsSolidJs = {
|
|
|
37512
37614
|
* attached to the row it belongs to. Left unset the index is the key, which is
|
|
37513
37615
|
* correct only while nothing reorders: it is why this defaults to something
|
|
37514
37616
|
* that works and is worth setting anyway.
|
|
37515
|
-
* - `sort`: The order, as `field:direction`.
|
|
37516
|
-
*
|
|
37517
|
-
* Set it and this element defers: a reader's click fires `helix-sort` and
|
|
37518
|
-
* changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
37519
|
-
* element then owns.
|
|
37520
|
-
* - `label`: Accessible name for the grid.
|
|
37521
37617
|
* - `filter`: What the rows are narrowed to, as one query across every column.
|
|
37522
37618
|
*
|
|
37523
37619
|
* One query rather than a predicate per column, which is what a reader means
|
|
37524
37620
|
* by a search box above a table. It matches on each column's ordering value,
|
|
37525
37621
|
* so search and sort cannot disagree about what a column holds.
|
|
37622
|
+
* - `label`: Accessible name for the grid.
|
|
37623
|
+
* - `page`: The page on show, from 1.
|
|
37624
|
+
*
|
|
37625
|
+
* Clamped on the way out, so what this reports is the page it drew: a
|
|
37626
|
+
* bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
37627
|
+
* the last page rather than as 99.
|
|
37526
37628
|
* - `mode`: Whether this element does the work or asks the consumer to.
|
|
37527
37629
|
*
|
|
37528
37630
|
* `client` filters, sorts and pages `rows` itself. `server` applies none of
|
|
@@ -37531,11 +37633,6 @@ export type CustomElementsSolidJs = {
|
|
|
37531
37633
|
* the client cannot hold the data, so this is not an optimization, it is the
|
|
37532
37634
|
* only mode that works, and it is here from the start because adding it later
|
|
37533
37635
|
* inverts the data flow.
|
|
37534
|
-
* - `page`: The page on show, from 1.
|
|
37535
|
-
*
|
|
37536
|
-
* Clamped on the way out, so what this reports is the page it drew: a
|
|
37537
|
-
* bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
37538
|
-
* the last page rather than as 99.
|
|
37539
37636
|
* - `page-size`/`pageSize`: How many rows a page holds. Zero is every row, which is what "no paging" means.
|
|
37540
37637
|
*
|
|
37541
37638
|
* **It announces nothing, and that is not an omission.** Nothing in this
|
|
@@ -37549,6 +37646,23 @@ export type CustomElementsSolidJs = {
|
|
|
37549
37646
|
* nothing about the result. Ignored in `client` mode rather than trusted,
|
|
37550
37647
|
* because two sources for one count is the mistake, and here the array is the
|
|
37551
37648
|
* one that cannot be stale.
|
|
37649
|
+
* - `windowed`: Draws the rows in view and stands empty space in for the rest.
|
|
37650
|
+
*
|
|
37651
|
+
* **Not a `mode`.** `mode` says where the rows come from and who filtered
|
|
37652
|
+
* them; this says how many of the ones we hold get drawn. They are
|
|
37653
|
+
* independent: a consumer fetching five thousand rows a chunk at a time wants
|
|
37654
|
+
* `mode="server"` and this at once, and folding this into `mode` would be an
|
|
37655
|
+
* API that forbids that combination for no reason.
|
|
37656
|
+
*
|
|
37657
|
+
* **Composes with `paginated` rather than excluding it.** A window over a
|
|
37658
|
+
* page is coherent -- the page is the slice of the result, the window is the
|
|
37659
|
+
* part of that slice on screen -- and the arithmetic is the same either way,
|
|
37660
|
+
* so there is nothing to forbid. Together they suit a table paging at a
|
|
37661
|
+
* thousand rows, where the page is a reasonable fetch and a poor render.
|
|
37662
|
+
*
|
|
37663
|
+
* Off by default. Windowing costs a scroll listener, a measurement per row
|
|
37664
|
+
* drawn, and a `block-size` on the scrolling box, and a table of twenty rows
|
|
37665
|
+
* should pay none of them.
|
|
37552
37666
|
* - `paginated`: Whether to draw a pagination under the grid.
|
|
37553
37667
|
*
|
|
37554
37668
|
* On by default once a page size is set, because a paged table with no way to
|
|
@@ -37618,8 +37732,10 @@ export type CustomElementsSolidJs = {
|
|
|
37618
37732
|
*
|
|
37619
37733
|
* CSS variables available for styling the component.
|
|
37620
37734
|
*
|
|
37735
|
+
* - `--data-table-block-size`: How tall the scrolling box is while `windowed`. Ignored otherwise, where the grid is as tall as its rows. A definite height rather than a maximum, so a short result under `windowed` keeps the full box with space below it: a maximum would leave the height a function of the rows drawn, and the rows drawn a function of the height, which is the loop the window controller has to guard against rather than one worth entering on purpose. (default: `undefined`)
|
|
37621
37736
|
* - `--data-table-color`: Ink in a cell. (default: `undefined`)
|
|
37622
37737
|
* - `--data-table-columns`: Track list for the columns, which wins over the one the columns worked out. (default: `undefined`)
|
|
37738
|
+
* - `--data-table-heading-background-color`: Fill behind a heading while `windowed`. Opaque on purpose: rows scroll under a sticky heading and a transparent one lets them through. Unset otherwise, so the headings stay weight rather than a band. (default: `undefined`)
|
|
37623
37739
|
* - `--data-table-heading-color`: Ink in a heading. (default: `undefined`)
|
|
37624
37740
|
* - `--data-table-padding-block`: Space above and below a cell's content. (default: `undefined`)
|
|
37625
37741
|
* - `--data-table-padding-inline`: Space either side of a cell's content. (default: `undefined`)
|
|
@@ -37633,6 +37749,8 @@ export type CustomElementsSolidJs = {
|
|
|
37633
37749
|
*
|
|
37634
37750
|
* - `cell`: One cell.
|
|
37635
37751
|
* - `table`: The grid.
|
|
37752
|
+
* - `after`: The room the rows below the window would have taken. Windowed only.
|
|
37753
|
+
* - `before`: The room the rows above the window would have taken. Windowed only.
|
|
37636
37754
|
* - `empty`: Shown when no rows match.
|
|
37637
37755
|
* - `footer`: The region below the grid.
|
|
37638
37756
|
* - `head`: The row the column headings sit in. `display: contents`, so it takes no space.
|
|
@@ -49745,10 +49863,14 @@ export type CustomCssProperties = {
|
|
|
49745
49863
|
"--icon-button-shadow"?: (string) | undefined;
|
|
49746
49864
|
/** Edge length of the control. */
|
|
49747
49865
|
"--icon-button-size"?: (string) | undefined;
|
|
49866
|
+
/** How tall the scrolling box is while `windowed`. Ignored otherwise, where the grid is as tall as its rows. A definite height rather than a maximum, so a short result under `windowed` keeps the full box with space below it: a maximum would leave the height a function of the rows drawn, and the rows drawn a function of the height, which is the loop the window controller has to guard against rather than one worth entering on purpose. */
|
|
49867
|
+
"--data-table-block-size"?: (string) | undefined;
|
|
49748
49868
|
/** Ink in a cell. */
|
|
49749
49869
|
"--data-table-color"?: (string) | undefined;
|
|
49750
49870
|
/** Track list for the columns, which wins over the one the columns worked out. */
|
|
49751
49871
|
"--data-table-columns"?: (string) | undefined;
|
|
49872
|
+
/** Fill behind a heading while `windowed`. Opaque on purpose: rows scroll under a sticky heading and a transparent one lets them through. Unset otherwise, so the headings stay weight rather than a band. */
|
|
49873
|
+
"--data-table-heading-background-color"?: (string) | undefined;
|
|
49752
49874
|
/** Ink in a heading. */
|
|
49753
49875
|
"--data-table-heading-color"?: (string) | undefined;
|
|
49754
49876
|
/** Space above and below a cell's content. */
|
package/types/vue.d.ts
CHANGED
|
@@ -2557,6 +2557,20 @@ say that without the component knowing what a row looks like. */
|
|
|
2557
2557
|
"default-sort"?: (HelixDataTable["defaultSort"]) | undefined;
|
|
2558
2558
|
/** Order to open on, where nothing declared one. */
|
|
2559
2559
|
defaultSort?: (HelixDataTable["defaultSort"]) | undefined;
|
|
2560
|
+
/** How tall a row is taken to be before it has been drawn, in pixels.
|
|
2561
|
+
|
|
2562
|
+
Only read while `windowed`, and a starting guess rather than a claim: a
|
|
2563
|
+
cell that wraps makes its row taller than its neighbors, and the window
|
|
2564
|
+
replaces this with what each row came to as it draws. It still has to be
|
|
2565
|
+
close, because it is what the scrollbar is built from before anything has
|
|
2566
|
+
been measured. */
|
|
2567
|
+
estimate?: (HelixDataTable["estimate"]) | undefined;
|
|
2568
|
+
/** The order, as `field:direction`.
|
|
2569
|
+
|
|
2570
|
+
Set it and this element defers: a reader's click fires `helix-sort` and
|
|
2571
|
+
changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
2572
|
+
element then owns. */
|
|
2573
|
+
sort?: (HelixDataTable["sort"]) | undefined;
|
|
2560
2574
|
/** The field naming a row's stable identity.
|
|
2561
2575
|
|
|
2562
2576
|
**Needed before selection exists, not after.** Lit keys the rendered rows by
|
|
@@ -2566,20 +2580,20 @@ attached to the row it belongs to. Left unset the index is the key, which is
|
|
|
2566
2580
|
correct only while nothing reorders: it is why this defaults to something
|
|
2567
2581
|
that works and is worth setting anyway. */
|
|
2568
2582
|
key?: (HelixDataTable["key"]) | undefined;
|
|
2569
|
-
/** The order, as `field:direction`.
|
|
2570
|
-
|
|
2571
|
-
Set it and this element defers: a reader's click fires `helix-sort` and
|
|
2572
|
-
changes nothing until a new value arrives. `default-sort` seeds an order this
|
|
2573
|
-
element then owns. */
|
|
2574
|
-
sort?: (HelixDataTable["sort"]) | undefined;
|
|
2575
|
-
/** Accessible name for the grid. */
|
|
2576
|
-
label?: (HelixDataTable["label"]) | undefined;
|
|
2577
2583
|
/** What the rows are narrowed to, as one query across every column.
|
|
2578
2584
|
|
|
2579
2585
|
One query rather than a predicate per column, which is what a reader means
|
|
2580
2586
|
by a search box above a table. It matches on each column's ordering value,
|
|
2581
2587
|
so search and sort cannot disagree about what a column holds. */
|
|
2582
2588
|
filter?: (HelixDataTable["filter"]) | undefined;
|
|
2589
|
+
/** Accessible name for the grid. */
|
|
2590
|
+
label?: (HelixDataTable["label"]) | undefined;
|
|
2591
|
+
/** The page on show, from 1.
|
|
2592
|
+
|
|
2593
|
+
Clamped on the way out, so what this reports is the page it drew: a
|
|
2594
|
+
bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
2595
|
+
the last page rather than as 99. */
|
|
2596
|
+
page?: (HelixDataTable["page"]) | undefined;
|
|
2583
2597
|
/** Whether this element does the work or asks the consumer to.
|
|
2584
2598
|
|
|
2585
2599
|
`client` filters, sorts and pages `rows` itself. `server` applies none of
|
|
@@ -2589,12 +2603,6 @@ the client cannot hold the data, so this is not an optimization, it is the
|
|
|
2589
2603
|
only mode that works, and it is here from the start because adding it later
|
|
2590
2604
|
inverts the data flow. */
|
|
2591
2605
|
mode?: (HelixDataTable["mode"]) | undefined;
|
|
2592
|
-
/** The page on show, from 1.
|
|
2593
|
-
|
|
2594
|
-
Clamped on the way out, so what this reports is the page it drew: a
|
|
2595
|
-
bookmarked link to page 99 of a result that has since shrunk reads back as
|
|
2596
|
-
the last page rather than as 99. */
|
|
2597
|
-
page?: (HelixDataTable["page"]) | undefined;
|
|
2598
2606
|
/** How many rows a page holds. Zero is every row, which is what "no paging" means.
|
|
2599
2607
|
|
|
2600
2608
|
**It announces nothing, and that is not an omission.** Nothing in this
|
|
@@ -2618,6 +2626,24 @@ nothing about the result. Ignored in `client` mode rather than trusted,
|
|
|
2618
2626
|
because two sources for one count is the mistake, and here the array is the
|
|
2619
2627
|
one that cannot be stale. */
|
|
2620
2628
|
total?: (HelixDataTable["total"]) | undefined;
|
|
2629
|
+
/** Draws the rows in view and stands empty space in for the rest.
|
|
2630
|
+
|
|
2631
|
+
**Not a `mode`.** `mode` says where the rows come from and who filtered
|
|
2632
|
+
them; this says how many of the ones we hold get drawn. They are
|
|
2633
|
+
independent: a consumer fetching five thousand rows a chunk at a time wants
|
|
2634
|
+
`mode="server"` and this at once, and folding this into `mode` would be an
|
|
2635
|
+
API that forbids that combination for no reason.
|
|
2636
|
+
|
|
2637
|
+
**Composes with `paginated` rather than excluding it.** A window over a
|
|
2638
|
+
page is coherent -- the page is the slice of the result, the window is the
|
|
2639
|
+
part of that slice on screen -- and the arithmetic is the same either way,
|
|
2640
|
+
so there is nothing to forbid. Together they suit a table paging at a
|
|
2641
|
+
thousand rows, where the page is a reasonable fetch and a poor render.
|
|
2642
|
+
|
|
2643
|
+
Off by default. Windowing costs a scroll listener, a measurement per row
|
|
2644
|
+
drawn, and a `block-size` on the scrolling box, and a table of twenty rows
|
|
2645
|
+
should pay none of them. */
|
|
2646
|
+
windowed?: (HelixDataTable["windowed"]) | undefined;
|
|
2621
2647
|
/** Whether to draw a pagination under the grid.
|
|
2622
2648
|
|
|
2623
2649
|
On by default once a page size is set, because a paged table with no way to
|
|
@@ -9423,10 +9449,14 @@ export type CustomCssProperties = {
|
|
|
9423
9449
|
"--icon-button-shadow"?: (string) | undefined;
|
|
9424
9450
|
/** Edge length of the control. */
|
|
9425
9451
|
"--icon-button-size"?: (string) | undefined;
|
|
9452
|
+
/** How tall the scrolling box is while `windowed`. Ignored otherwise, where the grid is as tall as its rows. A definite height rather than a maximum, so a short result under `windowed` keeps the full box with space below it: a maximum would leave the height a function of the rows drawn, and the rows drawn a function of the height, which is the loop the window controller has to guard against rather than one worth entering on purpose. */
|
|
9453
|
+
"--data-table-block-size"?: (string) | undefined;
|
|
9426
9454
|
/** Ink in a cell. */
|
|
9427
9455
|
"--data-table-color"?: (string) | undefined;
|
|
9428
9456
|
/** Track list for the columns, which wins over the one the columns worked out. */
|
|
9429
9457
|
"--data-table-columns"?: (string) | undefined;
|
|
9458
|
+
/** Fill behind a heading while `windowed`. Opaque on purpose: rows scroll under a sticky heading and a transparent one lets them through. Unset otherwise, so the headings stay weight rather than a band. */
|
|
9459
|
+
"--data-table-heading-background-color"?: (string) | undefined;
|
|
9430
9460
|
/** Ink in a heading. */
|
|
9431
9461
|
"--data-table-heading-color"?: (string) | undefined;
|
|
9432
9462
|
/** Space above and below a cell's content. */
|
|
@@ -10271,7 +10301,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
10271
10301
|
HelixCopyButtonVueProps,
|
|
10272
10302
|
HelixCopyButtonVueEvents
|
|
10273
10303
|
>;
|
|
10274
|
-
/** Hairline rules between rows and no fill, per the rule that depth comes from a single border rather than from elevation. A header band would be elevation spelled differently, so the headings are weight and color instead. The grid scrolls its own box and the toolbar and footer sit outside it: a search field that slides sideways when a reader scrolls the columns is a search field they lose. **The cell values do not server-render**, which is the headless tier's limitation and worth repeating where a consumer chooses between the two: use 'helix-table' where the content has to be in the served HTML. */
|
|
10304
|
+
/** Hairline rules between rows and no fill, per the rule that depth comes from a single border rather than from elevation. A header band would be elevation spelled differently, so the headings are weight and color instead. The grid scrolls its own box and the toolbar and footer sit outside it: a search field that slides sideways when a reader scrolls the columns is a search field they lose. 'windowed' draws only the rows in view, for a result too long to lay out at once, and the headings stay put while they scroll. It is independent of 'paginated' and of 'mode', so a page can be windowed and a server-fed chunk can be too. **The cell values do not server-render**, which is the headless tier's limitation and worth repeating where a consumer chooses between the two: use 'helix-table' where the content has to be in the served HTML. */
|
|
10275
10305
|
"helix-data-table": DefineCustomElement<
|
|
10276
10306
|
HelixDataTable,
|
|
10277
10307
|
HelixDataTableVueProps,
|