ui-sdk-table-vue 0.2.0 → 0.2.2

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.
@@ -0,0 +1,39 @@
1
+ # Formulas
2
+
3
+ The types of the entry `ui-sdk-table-vue/formulas`.
4
+
5
+ See [Formulas](./sheet-formulas.md) for how they work together.
6
+
7
+ ## FormulaEngineOptions
8
+
9
+ What `createFormulaEngine(options)` takes.
10
+
11
+ - `timeZone?` (`string`): The zone of a date that is no reference to a column with a zone of its own (`formatOptions.timeZone`), such as a date that a function gives. Without it, local time: a result that is saved should not depend on the computer that made it, so pass one when a formula reads a moment.
12
+ - `now?` (`() => number`): The clock of `TODAY` and `NOW`, in milliseconds since 1970: `Date.now` by default. A test passes a clock of its own.
13
+ - `maxReads?` (`number`): The most cells that one change may read, 5,000,000 by default. A formula in each row that sums from the first row to its own reads the square of the rows; past the limit the change is refused with words.
14
+
15
+ ## CellFormulas
16
+
17
+ The value of `cellFormulas`.
18
+
19
+ - `columns?` (`Readonly<Record<string, string>>`): The formula of each computed column, by column id, in the stored form.
20
+ - `cells?` (`Readonly<Record<string, Readonly<Record<string, string>>>>`): The formula of each cell, by row id and column id, in the stored form.
21
+
22
+ ## FormulaBar
23
+
24
+ What `useFormulaBar(controller)` gives.
25
+
26
+ - `address` (`ComputedRef<string>`): The address of the cell, such as `D7`, or `''` without an active cell.
27
+ - `text` (`ComputedRef<string>`): The text of the field: the draft while a person types, else the formula or the value of the cell.
28
+ - `error` (`ComputedRef<string>`): Why the last commit was refused, in the words for a person, or `''`.
29
+ - `dirty` (`ComputedRef<boolean>`): Whether the text is a draft that is not saved.
30
+ - `ready` (`ComputedRef<boolean>`): Whether a cell is active, so the field can be used.
31
+ - `input` (`(text: string) => void`): The new text of the field.
32
+ - `commit` (`() => boolean`): Saves the draft into its cell, as the editor of the cell does. Returns whether it was saved.
33
+ - `cancel` (`() => void`): Drops the draft and the error.
34
+
35
+ ## FormulaFunctionInfo
36
+
37
+ - `name` (`string`): The name of the function, such as `SUM`.
38
+ - `args` (`string`): Its arguments as a person writes them, such as `number, ...`.
39
+ - `help` (`string`): One line that says what it gives.
@@ -0,0 +1,55 @@
1
+ # Messages
2
+
3
+ Every text that the table writes itself, for the `messages` prop.
4
+
5
+ Pass the texts that you change; the others keep the English words of `defaultMessages`. Each text is a function, so a language can put the parts in its own order.
6
+
7
+ ## TableMessages
8
+
9
+ - `formulaIssue?` (`(issue: FormulaIssue) => string`): The words for an issue of a formula. Without it, the words of the engine: a table without formulas carries none.
10
+ - `formulaError?` (`(code: FormulaError) => string`): Why a formula gives an error value, for the description of its cell. Without it, the words of the engine.
11
+ - `recalculated?` (`(details: { cells: number }) => string`): What the table says after `recalculate()`: how many cells got new values. Without it, the words of the engine.
12
+ - `noRows` (`() => string`): What the body says when no row passes the filters.
13
+ - `loading` (`() => string`): What the body says while the first rows are on their way.
14
+ - `expandRow` (`() => string`): The name of the button that opens a row with child rows or a detail row.
15
+ - `collapseRow` (`() => string`): The name of the button that closes such a row.
16
+ - `expandSign` (`() => string`): The sign on the button of a closed row.
17
+ - `collapseSign` (`() => string`): The sign on the button of an open row.
18
+ - `groupRow` (`(details: { text: string; count: number }) => string`): The text of a group row: the value of the group and how many rows it holds.
19
+ - `resizeColumn` (`(column: string) => string`): The name of the resize handle of a column.
20
+ - `columnResized` (`(details: { column: string; width: number }) => string`): What a screen reader says after a column gets a new width.
21
+ - `columnMoved` (`(details: ColumnReorderMessage) => string`): What a screen reader says while a column moves.
22
+ - `editCell` (`(details: { column: string }) => string`): The name of the text field that edits a cell.
23
+ - `notNumber` (`(text: string) => string`): Why a text is refused in a column of numbers.
24
+ - `notDate` (`(text: string) => string`): Why a text is refused in a cell that holds a date.
25
+ - `notBoolean` (`(text: string) => string`): Why a text is refused in a cell that holds true or false.
26
+ - `invalidValue` (`() => string`): Why a value is refused when its schema gives no message.
27
+ - `editRefused` (`() => string`): Why an edit is refused when a listener of `onCellEdit` cancels it.
28
+ - `cellsSelected` (`(details: { rows: number; columns: number }) => string`): What a screen reader says after the range of cells changed from the keyboard.
29
+ - `cellsCopied` (`(details: { cells: number }) => string`): What a screen reader says after a copy.
30
+ - `cellsPasted` (`(details: { cells: number }) => string`): What a screen reader says after a paste.
31
+ - `pasteRefused` (`(details: { column: string; text: string; message: string }) => string`): Why a paste did nothing: one of its values was refused.
32
+ - `pasteNowhere` (`() => string`): Why a paste did nothing: no cell under it can be edited.
33
+ - `pasteTooLarge` (`(details: { rows: number; columns: number }) => string`): Why a paste did nothing: the text has more rows or columns than the table has from the first cell on.
34
+ - `pasteOverRow` (`() => string`): Why a paste did nothing: a row under it is a group row or a detail row, which holds no values.
35
+ - `editRowGone` (`() => string`): Why an edit was not saved: its row left the table while the value was checked.
36
+ - `cellsCleared` (`(details: { cells: number }) => string`): What a screen reader says after Delete or `clearCells` emptied cells.
37
+ - `cellsCut` (`(details: { cells: number }) => string`): What a screen reader says after a cut.
38
+ - `clearRefused` (`(details: { column: string; message: string }) => string`): Why a clear or a cut did nothing: a column refuses an empty value.
39
+ - `clearNowhere` (`() => string`): Why a clear or a cut did nothing: no cell under it can be edited.
40
+ - `undone` (`(details: { cells: number; gone: number; hidden: number }) => string`): What a screen reader says after an undo. `cells` got their old value back, `gone` of the step are not in the table any more, and `hidden` of the cells that changed are not in view: a filter, a page or a closed row hides them.
41
+ - `redone` (`(details: { cells: number; gone: number; hidden: number }) => string`): What a screen reader says after a redo.
42
+ - `undoRefused` (`() => string`): Why an undo or a redo did nothing: a listener of `onCellEdit` refused it.
43
+ - `nothingToUndo` (`() => string`): Why an undo did nothing: the history has no step to take back.
44
+ - `nothingToRedo` (`() => string`): Why a redo did nothing: the history has no step to bring back.
45
+ - `historyBusy` (`() => string`): Why an undo or a redo must wait: the check of a new value runs.
46
+ - `historyTooLarge` (`(details: { cells: number }) => string`): What a screen reader says when one change holds more cells than the history keeps, so it cannot be undone.
47
+ - `rowNumber` (`(details: { number: number }) => string`): The name of the header of a row: its number, from 1. A screen reader says it with each cell of the row.
48
+ - `cornerCell` (`() => string`): The name of the corner cell of the row of letters, which selects every cell.
49
+ - `cellsFilled` (`(details: { cells: number }) => string`): What a screen reader says after a fill.
50
+ - `fillRefused` (`(details: { column: string; text: string; message: string }) => string`): Why a fill did nothing: a column refuses one of its values.
51
+ - `fillNowhere` (`() => string`): Why a fill did nothing: no cell under it can be edited.
52
+ - `fillOverPinned` (`() => string`): Why a fill did nothing: it would go from pinned rows to rows of the list, which are no neighbours in the data.
53
+ - `cellsFormatted` (`(details: { cells: number }) => string`): What a screen reader says after the formats of cells changed from a key or from code.
54
+ - `aggregateLabel` (`(name: string) => string`): The name of a function of the sum row, for a picker and for the name of a footer cell: `sum`, `mean`, `min`, `max`, `count`, `uniqueCount`, `first`, or `custom` for a function of the column.
55
+ - `totalLabel` (`(details: { label: string; text: string }) => string`): The name of a footer cell whose function a person chose: the function and the total.
@@ -0,0 +1,246 @@
1
+ # Table
2
+
3
+ Every prop, event and slot of `Table`, with the props that each slot gets.
4
+
5
+ Props are written in camel case here; a template takes them in kebab case (`default-sort`). Each state has three members: `<key>` controls it, `default<Key>` starts it when the table holds it, and the event `<key>Change` (`@sort-change`) reports a change that `details.cancel()` can stop. `v-model:<key>` binds the first and `update:<key>`. See [State and events](./state-and-events.md).
6
+
7
+ ## Props
8
+
9
+ - `rows?` (`readonly Row[]`): The rows of the table. Each row needs a stable id (see `getRowId`). The table never changes or copies a row.
10
+ - `columns?` (`readonly ColumnDef<Row>[]`): The columns, in the order of the definitions. A column with `columns` is a header group.
11
+ - `getRowId?` (`(row: Row, index: number, parent: DataRow<Row> | null) => string | number`): A stable id for a row. Without it, the `id` property of the row is used.
12
+ - `getChildren?` (`(row: Row) => readonly Row[] | undefined`): The child rows of a row. With it, the table is a tree.
13
+ - `locale?` (`string`): The locale of the texts that the table writes: numbers, dates, the search without case, and the signs of a formula that a person types. Without it, the formats use `en-US`. A format whose `formatOptions` has a `locale` keeps its own.
14
+ - `searchMode?` (`'contains' | 'fuzzy'`): How the search matches. `'contains'` (the default): the text of a cell holds the search, without case. `'fuzzy'`: the letters of the search are in the text in order.
15
+ - `fuzzyThreshold?` (`number`): With `searchMode: 'fuzzy'`, the score that a match must pass, from 0 to 1. Defaults to 0: every match in order passes.
16
+ - `sortChildren?` (`boolean`): Also sort the tree children of each row. Defaults to true.
17
+ - `canGroup?` (`(row: Row) => boolean`): Which rows go into groups. A row that it refuses stays out of every group and comes first, before the groups.
18
+ - `selection?` (`'single' | 'multiple'`): Row selection. Without it, rows cannot be selected.
19
+ - `canSelect?` (`(row: Row) => boolean`): Which rows can be selected. A row that it refuses has no selection, and `select` throws for it.
20
+ - `resizable?` (`boolean`): Whether a person can resize columns. A column can say otherwise. Defaults to false.
21
+ - `reorderable?` (`boolean`): Whether a person can move columns. A column can say otherwise. Defaults to false.
22
+ - `columnMinWidth?` (`number`): The smallest width of a column that has no `minWidth`, in pixels. Defaults to 48.
23
+ - `columnMaxWidth?` (`number`): The largest width of a column that has no `maxWidth`, in pixels. Without it, no limit.
24
+ - `messages?` (`Partial<TableMessages>`): Texts of the table in another language, or with other words.
25
+ - `controller?` (`TableController`): Gives the actions of the table to code outside it. Create one with `createTableController()`.
26
+ - `multiSort?` (`MultiSortMode`): Whether a press on a header can add its column to the sort. `'none'`: one column at a time, and a modifier key changes nothing. `'modifier'` (the default): a press with Shift, Control or Command adds the column. `'always'`: each press adds the column. Enter on a header follows the same rule. A `sort` that the owner sets is never cut to the mode.
27
+ - `alwaysSorted?` (`boolean`): Whether the table keeps a sort once it has one. With it, a press on the only column of the sort turns the order, ascending and descending, and never takes the sort away. Without it, the third press does. Defaults to false. It does not sort a table that starts without a sort; give `defaultSort` for that.
28
+ - `searchDebounce?` (`number`): How long the typing in a search field must pause before the table filters, in milliseconds, for a text from `inputSearch`. Defaults to 200. With 0, each text filters at once.
29
+ - `groupTotals?` (`boolean`): Whether a group row shows the total of each column in a cell under that column, as the footer does. The label of the group then covers the columns before the first total. It applies while a column in view has an `aggregate`; without one, and with `false`, a group row is one cell as wide as the table. Defaults to true.
30
+ - `totals?` (`TableTotalsSource`): Totals as the owner of the rows knows them. The footer, the group rows, `getTotals` and the totals of an export show them in place of what the rows of the table give. For rows from a server: the table has one page of them, and its own totals are of that page.
31
+ - `sort?` (`readonly SortRule[]`): The sort: the columns in the order in which they sort. Pass it to control the sort.
32
+ - `defaultSort?` (`readonly SortRule[]`): The `sort` at first, when the table holds this state itself.
33
+ - `filter?` (`FilterState`): The search and the filter of each column. Pass it to control the filter.
34
+ - `defaultFilter?` (`FilterState`): The `filter` at first, when the table holds this state itself.
35
+ - `groupBy?` (`readonly string[]`): The ids of the columns that group the rows, outermost first. Pass it to control the groups.
36
+ - `defaultGroupBy?` (`readonly string[]`): The `groupBy` at first, when the table holds this state itself.
37
+ - `page?` (`PageState`): With a page, the table shows one page of rows. Without it, all rows.
38
+ - `defaultPage?` (`PageState`): The `page` at first, when the table holds this state itself.
39
+ - `expanded?` (`readonly string[]`): The ids of the expanded tree rows and groups.
40
+ - `defaultExpanded?` (`readonly string[]`): The `expanded` at first, when the table holds this state itself.
41
+ - `selected?` (`string[]`): The ids of the selected rows.
42
+ - `defaultSelected?` (`string[]`): The `selected` at first, when the table holds this state itself.
43
+ - `columnVisibility?` (`ColumnVisibility`): Columns with `false` are hidden. The id of a header group hides all its columns.
44
+ - `defaultColumnVisibility?` (`ColumnVisibility`): The `columnVisibility` at first, when the table holds this state itself.
45
+ - `columnOrder?` (`readonly string[]`): Column ids in display order. Columns that are not listed come after, in definition order.
46
+ - `defaultColumnOrder?` (`readonly string[]`): The `columnOrder` at first, when the table holds this state itself.
47
+ - `columnWidths?` (`ColumnWidths`): Column widths in pixels, by column id. A column without an entry has the width of its definition.
48
+ - `defaultColumnWidths?` (`ColumnWidths`): The `columnWidths` at first, when the table holds this state itself.
49
+ - `columnPinning?` (`ColumnPinning`): The columns that stay at the start or the end edge while the rest scrolls.
50
+ - `defaultColumnPinning?` (`ColumnPinning`): The `columnPinning` at first, when the table holds this state itself.
51
+ - `rowWindow?` (`boolean`): Render only the rows near the scroll frame, with a spacer for the rest. The frame is the nearest parent that scrolls, or the page. Defaults to false.
52
+ - `rowHeight?` (`number`): One height for every row, in pixels. Without it, the row window measures each row. With `hasDetail` it measures too, because a detail row has a height of its own, and this height is what a row counts with before.
53
+ - `estimatedRowHeight?` (`number`): The height of a row that the row window did not measure yet, in pixels. Defaults to 36.
54
+ - `overscan?` (`number`): How many rows more than the frame shows the row window renders on each side. Defaults to 8.
55
+ - `stickyHeader?` (`boolean`): Whether the header rows stay at the top of the scroll frame. Defaults to false.
56
+ - `stickyFooter?` (`boolean`): Whether the footer row stays at the bottom of the scroll frame. Defaults to false.
57
+ - `hasDetail?` (`(row: Row) => boolean`): Which rows have a detail row: one wide row under the row, which opens and closes as a tree row does. Pass the same function while its answers are the same: a new function makes the table list its rows again.
58
+ - `rowPinning?` (`RowPinning`): The rows that stay at the top or the bottom edge. A filter or a page does not hide them. The totals are of the rows that pass the filter, so a pinned row that the filter refuses is in view and not in the totals. A row with child rows cannot be pinned.
59
+ - `defaultRowPinning?` (`RowPinning`): The `rowPinning` at first, when the table holds this state itself.
60
+ - `columnAggregates?` (`ColumnAggregates`): The function of the total of a column where a person chose one, by column id: `sum`, `mean`, `min`, `max`, `count`, `uniqueCount` or `first`. An entry wins over the `aggregate` of the column, and `null` takes the total of the column away. The footer, the group rows, `getTotals` and an export all follow it. With `totals` of the owner, the owner hears the change and gives the number of the chosen function.
61
+ - `defaultColumnAggregates?` (`ColumnAggregates`): The `columnAggregates` at first, when the table holds this state itself.
62
+ - `cellFormats?` (`CellFormats`): The formats of cells and of whole columns: how a value becomes text and how the cell looks, by row id and column id. A property of a cell wins over the same property of its column, and both win over the `format` of the column definition. The looks reach a cell as `data-align`, `data-bold`, `data-italic`, `data-color` and `data-fill`, and the style of the app gives them a meaning. The value is reported whole and shares what did not change, so an owner saves it as it is. Colour alone must not carry a meaning: a screen reader says the text of a cell, not its looks.
63
+ - `defaultCellFormats?` (`CellFormats`): The `cellFormats` at first, when the table holds this state itself.
64
+ - `formulas?` (`FormulaEngine`): Turns formulas on: the value of `createFormulaEngine()` of the entry `ui-sdk-table-core/formulas`. Pass one engine for the life of the table; a new engine at each render computes every formula again.
65
+ - `cellFormulas?` (`CellFormulas`): The formulas of the table, as data of the owner, in the stored form. `columns` makes a column computed: each row gets the value of the formula, also a row that comes later, and its cells cannot be edited. A formula that cannot be read, or column formulas that read each other in a circle, show an error in every row. Read only with `formulas`.
66
+ - `defaultCellFormulas?` (`CellFormulas`): The `cellFormulas` at first, when the table holds this state itself.
67
+ - `formatColors?` (`readonly string[]`): The names that `color` and `fill` of a cell format can have, such as `['red', 'amber', 'green']`. The table writes a name into `data-color` or `data-fill`, and the style of the app maps it to its own colours for light and dark. Without the option, a format can carry no colour.
68
+ - `sheet?` (`boolean`): The rules of a data sheet. In the editor, Enter saves and moves down (with Shift up), and an arrow key saves and moves when a character opened the editor. Inside a selected range, Enter and Tab walk the range and Tab on a cell stays in it; without a range, Tab on a cell leaves the table as before. Delete and Backspace empty the selected cells, a cut empties them too, and a paste repeats a block that fits the range a whole number of times. It is also a preset: `editable`, `cellSelection` and `history` are on unless one of them is set to false. Defaults to false.
69
+ - `history?` (`boolean | TableHistoryOptions`): Undo and redo for cell values: Control or Command with Z, and with Shift+Z or Y, on a cell, and `undo` and `redo` of the controller. A step is one report of `onCellEdit` that no listener refused. An undo reports the old values through `onCellEdit` with the reason `undo`, without `parse` and without the schema, and the owner of the rows puts them in. Rows need stable ids for it. With `manualPage`, a change of the page, the sort or the filter empties the history. Pass limits in place of `true` to change them. Defaults to the `sheet` option.
70
+ - `fillHandle?` (`boolean | 'vertical' | 'horizontal'`): The fill handle: a small part at the corner of the selected cells that a person drags to fill more cells, and with `sheet` the keys Control+D (fill down) and Control+R (fill forward). `'vertical'` and `'horizontal'` let a fill go along one axis only. Needs cell selection. Defaults to the `sheet` option.
71
+ - `editable?` (`boolean`): Whether a person can edit cells. A column can say otherwise. Defaults to the `sheet` option, else to `entry`.
72
+ - `entry?` (`boolean`): A mode for entering data, which an app can turn on and off, for example with an Edit button. While it is on, cells can be edited unless `editable` is false or a column says otherwise, one plain press on a cell opens its editor, and Tab and Shift+Tab on a cell and in the editor go to the next and the previous cell that can be edited, across the rows. From the last such cell Tab leaves the table, and from the first Shift+Tab. Inside a selected range of more than one cell, Tab keeps the rule of the range. Defaults to false.
73
+ - `cellSelection?` (`boolean`): Whether a person can select a range of cells, to copy it or to paste into it. Defaults to the `sheet` option.
74
+ - `columnLetters?` (`boolean`): A row of letters above the header rows, as a spreadsheet has: A, B, C, then AA. It is the place where a person selects whole columns, as the row numbers of `rowNumberColumn()` are for whole rows: a press on a letter selects the cells of its column, with Shift the columns from the active cell to it, and a drag over letters selects those columns. Space on a letter selects its column, and Shift with an arrow takes the next columns. The cell above the row numbers selects every cell. A column that leads the table has an empty letter cell that selects nothing. A letter is the place of the column among the columns in view. The row is grid row 0: it counts in `aria-rowindex`, `aria-rowcount` and the rows of `cellRange`, and it sticks with `stickyHeader`. An export does not hold it. Selecting needs `cellSelection`; this option is not part of `sheet`. Defaults to false.
75
+ - `cellRange?` (`CellRange | null`): The selected range of cells, from the cell where it started to the cell it reaches, or `null`. A cell is a place in the grid: `row` counts the header rows first, as `aria-rowindex` does, from 0. A range holds body rows only. It goes away when other rows or columns come to its places.
76
+ - `defaultCellRange?` (`CellRange | null`): The `cellRange` at first, when the table holds this state itself.
77
+ - `manualSort?` (`boolean`): The rows come from a server in sort order. The table does not sort them. The `sort` state still changes, so the caller knows what to ask for.
78
+ - `manualFilter?` (`boolean`): The rows come from a server with the search and the column filters applied. The table does not filter them. Facets and totals are of the rows that the table has; give `facets` for the choices of every row, and `totals` for the totals of every row.
79
+ - `facets?` (`Readonly<Record<string, ColumnFacetsSource>>`): The facets of columns as the owner of the rows knows them, by column id. `getFacets` answers with them in place of what the rows of the table hold. A server that filters knows every value of a column; the rows that it sends hold only the values that pass.
80
+ - `manualPage?` (`boolean`): The rows are one page from a server. The table shows them all, and the pages come from `rowCount`. Every other feature works on the rows that the table has: an export, the totals and "select all" are of this page. Give `totals` for the totals that the server knows.
81
+ - `rowCount?` (`number`): How many rows the server has after its filter, for `manualPage`. Without it, a full page has a next page and a page that is not full is the last. An empty page after the first then sends the table one page back, so keep the rows of the page before, or set `loading`, while a page loads. `lastPage` needs the count.
82
+ - `loading?` (`boolean`): Whether new rows are on their way. The table says so to assistive technology and keeps its rows.
83
+ - `rowAttrs?` (`(context: RowAttrsContext<Row>) => PartAttrs | undefined`): Attributes of a `tr` element.
84
+ - `cellAttrs?` (`(context: CellAttrsContext<Row>) => PartAttrs | undefined`): Attributes of a `th` or `td` element.
85
+ - `sectionAttrs?` (`{ head?: PartAttrs; body?: PartAttrs; foot?: PartAttrs }`): Attributes of the `thead`, `tbody` and `tfoot` elements.
86
+
87
+ `rowAttrs` and `cellAttrs` get a context with the `kind` of the row or the cell. [Attributes of rows and cells](./cells-and-slots.md#attributes-of-rows-and-cells) lists each kind with its fields.
88
+
89
+ ## Events
90
+
91
+ - `update:sort` (`(value: readonly SortRule[]) => void`): The new `sort`, for `v-model:sort`. It does not run when `sortChange` cancels the change.
92
+ - `update:filter` (`(value: FilterState) => void`): The new `filter`, for `v-model:filter`. It does not run when `filterChange` cancels the change.
93
+ - `update:groupBy` (`(value: readonly string[]) => void`): The new `groupBy`, for `v-model:groupBy`. It does not run when `groupByChange` cancels the change.
94
+ - `update:page` (`(value: PageState | undefined) => void`): The new `page`, for `v-model:page`. It does not run when `pageChange` cancels the change.
95
+ - `update:expanded` (`(value: readonly string[]) => void`): The new `expanded`, for `v-model:expanded`. It does not run when `expandedChange` cancels the change.
96
+ - `update:selected` (`(value: string[]) => void`): The new `selected`, for `v-model:selected`. It does not run when `selectedChange` cancels the change.
97
+ - `update:columnVisibility` (`(value: ColumnVisibility) => void`): The new `columnVisibility`, for `v-model:columnVisibility`. It does not run when `columnVisibilityChange` cancels the change.
98
+ - `update:columnOrder` (`(value: readonly string[]) => void`): The new `columnOrder`, for `v-model:columnOrder`. It does not run when `columnOrderChange` cancels the change.
99
+ - `update:columnWidths` (`(value: ColumnWidths) => void`): The new `columnWidths`, for `v-model:columnWidths`. It does not run when `columnWidthsChange` cancels the change.
100
+ - `update:columnPinning` (`(value: ColumnPinning) => void`): The new `columnPinning`, for `v-model:columnPinning`. It does not run when `columnPinningChange` cancels the change.
101
+ - `update:rowPinning` (`(value: RowPinning) => void`): The new `rowPinning`, for `v-model:rowPinning`. It does not run when `rowPinningChange` cancels the change.
102
+ - `update:columnAggregates` (`(value: ColumnAggregates) => void`): The new `columnAggregates`, for `v-model:columnAggregates`. It does not run when `columnAggregatesChange` cancels the change.
103
+ - `update:cellFormats` (`(value: CellFormats) => void`): The new `cellFormats`, for `v-model:cellFormats`. It does not run when `cellFormatsChange` cancels the change.
104
+ - `update:cellFormulas` (`(value: CellFormulas) => void`): The new `cellFormulas`, for `v-model:cellFormulas`. It does not run when `cellFormulasChange` cancels the change.
105
+ - `update:cellRange` (`(value: CellRange | null) => void`): The new `cellRange`, for `v-model:cellRange`. It does not run when `cellRangeChange` cancels the change.
106
+ - `sortChange` (`(value: readonly SortRule[], details: TableChangeDetails) => void`): Runs when `sort` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
107
+ - `filterChange` (`(value: FilterState, details: TableChangeDetails) => void`): Runs when `filter` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
108
+ - `groupByChange` (`(value: readonly string[], details: TableChangeDetails) => void`): Runs when `groupBy` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
109
+ - `pageChange` (`(value: PageState | undefined, details: TableChangeDetails) => void`): Runs when `page` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
110
+ - `expandedChange` (`(value: readonly string[], details: TableChangeDetails) => void`): Runs when `expanded` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
111
+ - `selectedChange` (`(value: string[], details: TableChangeDetails) => void`): Runs when `selected` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
112
+ - `columnVisibilityChange` (`(value: ColumnVisibility, details: TableChangeDetails) => void`): Runs when `columnVisibility` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
113
+ - `columnOrderChange` (`(value: readonly string[], details: TableChangeDetails) => void`): Runs when `columnOrder` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
114
+ - `columnWidthsChange` (`(value: ColumnWidths, details: TableChangeDetails) => void`): Runs for each step of a resize.
115
+ - `columnWidthsCommit` (`(value: ColumnWidths, details: TableCommitDetails) => void`): Runs once when a resize ends: on release of the handle, and after each key.
116
+ - `columnPinningChange` (`(value: ColumnPinning, details: TableChangeDetails) => void`): Runs when `columnPinning` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
117
+ - `rowPinningChange` (`(value: RowPinning, details: TableChangeDetails) => void`): Runs when `rowPinning` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
118
+ - `columnAggregatesChange` (`(value: ColumnAggregates, details: TableChangeDetails) => void`): Runs when `columnAggregates` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
119
+ - `cellFormatsChange` (`(value: CellFormats, details: TableChangeDetails) => void`): Runs when `cellFormats` wants to change, with the new value and its details. `details.reason` says why, and `details.cancel()` keeps the old value.
120
+ - `cellFormulasChange` (`(value: CellFormulas, details: TableChangeDetails) => void`): A formula that a person entered changes with the reason of the edit (`enter-key`, `paste`).
121
+ - `cellRangeChange` (`(value: CellRange | null, details: TableChangeDetails) => void`): Runs for each step of a drag, and for each other change of the range.
122
+ - `cellRangeCommit` (`(value: CellRange | null, details: TableCommitDetails) => void`): Runs once when a drag that changed the range ends.
123
+ - `cellEdit` (`(edits: readonly CellEdit<any>[], details: TableEditDetails) => void`): Cells got new values. Put them into the rows; `details.cancel()` refuses them.
124
+
125
+ ## Slots
126
+
127
+ A slot with a column id in its name wins over the slot without one.
128
+
129
+ - `header-{id}?` (`(props: HeaderSlotProps<Row>) => VNodeChild`): One header cell. `header-{column id}` wins over `header`.
130
+ - `col-{id}?` (`(props: CellSlotProps<Row>) => VNodeChild`): One body cell. `col-{column id}` wins over `cell`.
131
+ - `foot-{id}?` (`(props: FootSlotProps<Row>) => VNodeChild`): One total in the footer. `foot-{column id}` wins over `foot`.
132
+ - `group-total-{id}?` (`(props: GroupTotalSlotProps<Row>) => VNodeChild`): The cell of a group row under one column, which holds the total of the group for that column. `group-total-{column id}` wins over `group-total`.
133
+ - `edit-{id}?` (`(props: EditorSlotProps<Row>) => VNodeChild`): The editor of one cell, in place of the text field of the table. `edit-{column id}` wins over `editor`. The control must take focus itself.
134
+ - `editor?` (`(props: EditorSlotProps<Row>) => VNodeChild`): The editor of a cell, in place of the text field of the table. The control must take focus itself.
135
+ - `header?` (`(props: HeaderSlotProps<Row>) => VNodeChild`): One header cell, for every column without a `header-{column id}` slot.
136
+ - `cell?` (`(props: CellSlotProps<Row>) => VNodeChild`): One body cell, for every column without a `col-{column id}` slot.
137
+ - `foot?` (`(props: FootSlotProps<Row>) => VNodeChild`): One total in the footer, for every column without a `foot-{column id}` slot.
138
+ - `group?` (`(props: GroupSlotProps<Row>) => VNodeChild`): The label cell of a group row.
139
+ - `group-total?` (`(props: GroupTotalSlotProps<Row>) => VNodeChild`): The cell of a group row under one column, for every column without a `group-total-{column id}` slot.
140
+ - `row-header?` (`(props: RowHeaderSlotProps<Row>) => VNodeChild`): The cell with the number of a row, in a column with `rowHeader`.
141
+ - `letter?` (`(props: LetterSlotProps<Row>) => VNodeChild`): A cell of the row of letters, with the `columnLetters` option. Without it, the cell shows the letter.
142
+ - `detail?` (`(props: DetailSlotProps<Row>) => VNodeChild`): The detail row of a row, for the rows that `hasDetail` names.
143
+ - `empty?` (`() => VNodeChild`): Shown in place of the rows when no row passes the filters.
144
+ - `loading?` (`() => VNodeChild`): Shown in place of the rows while `loading` is set and the table has no rows.
145
+
146
+ ## Slot props
147
+
148
+ ### HeaderSlotProps
149
+
150
+ - `column` (`ColumnDef<Row>`): The definition of the column.
151
+ - `label` (`string`): The header text: `column.header`, or the column id.
152
+ - `leaf` (`boolean`): False for a header group, which holds columns and no cells.
153
+ - `sort` (`SortDirection | undefined`): The direction of the column in the sort, `'asc'` or `'desc'`, or `undefined` when it does not sort.
154
+ - `sortIndex` (`number | undefined`): The place of the column in the sort, from 1. With several columns in the sort, the first one sorts first.
155
+ - `toggleSort` (`(event?: Event) => void`): Sorts by the column as a press on the header does. Pass the event: with `multiSort`, its keys decide whether the column joins the sort.
156
+ - `pin` (`'start' | 'end' | undefined`): The edge that the column is pinned to, or `undefined`.
157
+ - `selectColumn` (`(event?: Event) => void`): Selects the cells of the column, for a control in its header. With Shift in the event, the columns from the active cell to this one. It throws for a header group and without the `cellSelection` option.
158
+ - `formula` (`string | undefined`): The formula of a computed column, as a person reads it. `undefined` for a column without one.
159
+
160
+ ### CellSlotProps
161
+
162
+ - `row` (`Row`): The row object of the data, as the owner passed it.
163
+ - `node` (`DataRow<Row>`): The node of the row in the row model: its id, its parent and its children.
164
+ - `column` (`ColumnDef<Row>`): The definition of the column.
165
+ - `value` (`unknown`): The value of the cell: `value` of the column, else the property that `key` names.
166
+ - `text` (`string`): The value as text, with the format of the cell, else of its column.
167
+ - `format` (`CellFormat | undefined`): The format that the cell has of its own, from `cellFormats`: the format of its column with the format of the cell over it. `undefined` when neither says anything. Its looks are also on the cell as `data-align`, `data-bold`, `data-italic`, `data-color` and `data-fill`.
168
+ - `selected` (`boolean`): Whether the row is selected.
169
+ - `expanded` (`boolean`): Whether the row is open: its child rows or its detail row show.
170
+ - `expandable` (`boolean`): Whether the row can open: it has child rows or a detail row.
171
+ - `level` (`number`): Tree and group levels above this row, from 0.
172
+ - `pinned` (`RowPin | undefined`): The edge that the row is pinned to.
173
+ - `toggleSelected` (`(event?: Event) => void`): Selects the row or takes it out of the selection, for a checkbox in the cell.
174
+ - `toggleExpanded` (`(event?: Event) => void`): Opens or closes the row, for a button in the cell.
175
+ - `formula` (`{ text: string; error?: { code: FormulaError; message: string } } | undefined`): With formulas: the formula of the cell as a person reads it, and the code and the words of an error value. `undefined` for a cell with neither. The error is also on the cell as `data-formula-error`.
176
+
177
+ ### EditorSlotProps
178
+
179
+ - `row` (`Row`): The row object of the data, as the owner passed it.
180
+ - `node` (`DataRow<Row>`): The node of the row in the row model: its id, its parent and its children.
181
+ - `column` (`ColumnDef<Row>`): The definition of the column.
182
+ - `value` (`unknown`): The value of the cell now.
183
+ - `text` (`string`): The value as plain text, without a format: 0.25 for a cell that shows 25 %. `save` takes a value.
184
+ - `error` (`string | undefined`): Why the last value was refused.
185
+ - `checking` (`boolean`): A check that takes time runs for a saved value. A save does nothing until it answers.
186
+ - `mode` (`'replace' | 'edit'`): How the editor was opened. `replace`: the person typed a character on the cell, which is `typed`, and means to write over the value. `edit`: Enter, F2, a double press or code opened it, to change the value.
187
+ - `typed` (`string | undefined`): The character that opened the editor, or `undefined`.
188
+ - `save` (`(value: unknown, event?: Event) => void`): Saves a value, with the check of the column, and closes the editor. A value that is refused keeps the editor open, and `error` says why.
189
+ - `cancel` (`() => void`): Closes the editor without a save. Focus goes back to the cell.
190
+ - `formula` (`string | undefined`): With formulas: the formula of the cell as a person reads it, such as `=C2*D2`. A save of a text that starts with `=` sets a formula.
191
+ - `inputMode` (`'decimal' | undefined`): `decimal` when a field of numbers should ask a phone for its number keyboard (`numberKeyboard` of the column), else `undefined`. Put it on the field as `inputmode`.
192
+
193
+ ### GroupSlotProps
194
+
195
+ - `group` (`GroupRow<Row>`): The group: its id, the column and the value that make it, and its rows.
196
+ - `column` (`ColumnDef<Row> | undefined`): The column that makes the group.
197
+ - `text` (`string`): The value of the group as text, with the format of its column.
198
+ - `expanded` (`boolean`): Whether the group is open.
199
+ - `level` (`number`): The groups above this one, from 0.
200
+ - `totals` (`Record<string, unknown>`): Column totals of the rows in the group.
201
+ - `totalTexts` (`Record<string, string>`): The totals as text, with the format of their columns, by column id.
202
+ - `path` (`readonly GroupPathEntry<Row>[]`): The groups from the outermost one down to this group, each with its column, its value and its text: "Europe", then "Finland".
203
+ - `covered` (`readonly ColumnDef<Row>[]`): The columns that this cell covers. With totals under their columns, a total of one of these columns has no cell of its own.
204
+ - `toggleExpanded` (`(event?: Event) => void`): Opens or closes the group, for a button in the cell.
205
+
206
+ ### GroupTotalSlotProps
207
+
208
+ - `group` (`GroupRow<Row>`): The group of the row.
209
+ - `column` (`ColumnDef<Row>`): The column of the cell.
210
+ - `value` (`unknown`): The total of the column over the rows of the group. `undefined` for a column without an `aggregate`.
211
+ - `text` (`string`): The total as text, with the format of the column, or an empty text.
212
+ - `totals` (`Record<string, unknown>`): The totals of every column that has one, by column id.
213
+ - `aggregate` (`AggregateName | 'custom' | undefined`): The function of the total: one of the built-in names, `custom` for a function of the column, or `undefined` without a total.
214
+ - `expanded` (`boolean`): Whether the group is open.
215
+ - `level` (`number`): The groups above this one, from 0.
216
+ - `path` (`readonly GroupPathEntry<Row>[]`): The groups from the outermost one down to this group.
217
+
218
+ ### FootSlotProps
219
+
220
+ - `column` (`ColumnDef<Row>`): The column of the cell.
221
+ - `value` (`unknown`): The total of the column, or `undefined` for a column without an `aggregate`.
222
+ - `text` (`string`): The total as text, with the format of the column, or an empty text.
223
+ - `totals` (`Record<string, unknown>`): The totals of every column that has one, by column id.
224
+ - `aggregate` (`AggregateName | 'custom' | undefined`): The function of the total: one of the built-in names, `custom` for a function of the column, or `undefined` without a total.
225
+ - `setAggregate` (`(aggregate: AggregateName | null | undefined, event?: Event) => void`): Chooses the function of the total of this column, for a picker in the footer. `null` takes the total away, and `undefined` gives the column the `aggregate` of its definition back. The group rows and an export follow.
226
+
227
+ ### RowHeaderSlotProps
228
+
229
+ - `row` (`Row`): The row object of the data, as the owner passed it.
230
+ - `node` (`DataRow<Row>`): The node of the row in the row model: its id, its parent and its children.
231
+ - `column` (`ColumnDef<Row>`): The definition of the column with `rowHeader`.
232
+ - `number` (`number`): The number of the row, from 1: its place among the rows that the table shows, counted over the pages.
233
+ - `selectRow` (`(event?: Event) => void`): Selects the cells of the row. With Shift in the event, the rows from the active cell to this one. A press on the cell does the same; this is for a control inside it. It throws without the `cellSelection` option.
234
+
235
+ ### LetterSlotProps
236
+
237
+ - `column` (`ColumnDef<Row>`): The definition of the column under the letter.
238
+ - `letter` (`string | undefined`): The letter of the column: its place among the columns in view. `undefined` for a column that leads the table.
239
+ - `corner` (`boolean`): Whether the cell is the corner, above the row numbers, which selects every cell.
240
+ - `selectColumn` (`(event?: Event) => void`): Selects what a press on the cell selects: the cells of the column, with Shift in the event from the active cell on, or every cell from the corner. A press on the cell does the same; this is for a control inside it. It throws for an empty cell of a column that leads, and without the `cellSelection` option.
241
+
242
+ ### DetailSlotProps
243
+
244
+ - `row` (`Row`): The row object of the data, as the owner passed it.
245
+ - `node` (`DataRow<Row>`): The node of the row in the row model: its id, its parent and its children.
246
+ - `toggleExpanded` (`(event?: Event) => void`): Closes the detail row.
@@ -0,0 +1,110 @@
1
+ # View
2
+
3
+ Every field of `getView()`, the plain data that the controls beside a table read.
4
+
5
+ Read the view again in `subscribe`, or with `useTableView(controller)`. See [Controller and view](./controller-and-view.md).
6
+
7
+ ## TableView
8
+
9
+ - `sort` (`readonly SortRule[]`): The sort: the columns in the order in which they sort.
10
+ - `filter` (`FilterState`): The filter: the search and the filter of each column.
11
+ - `search` (`string`): The text that a search field shows: the text that waits from `inputSearch`, else the search of the filter.
12
+ - `searchPending` (`boolean`): Whether a text from `inputSearch` waits for its pause, so the rows do not follow `search` yet.
13
+ - `groupBy` (`readonly string[]`): The ids of the columns that group the rows, in order.
14
+ - `expanded` (`readonly string[]`): The ids of the open tree rows, groups and rows with a detail row.
15
+ - `selected` (`readonly string[]`): The ids of the selected rows.
16
+ - `page` (`number`): The page in view, from 1. A table without pages has one page.
17
+ - `pageSize` (`number | undefined`): How many rows a page holds, or `undefined` for a table without pages.
18
+ - `pageCount` (`number`): How many pages there are. A table without pages has one.
19
+ - `rowCount` (`number`): How many entries the pages divide: what `pageUnit` names. With pages from a server, its `rowCount`.
20
+ - `pageUnit` (`PageUnit`): What the pages count. `rows`: each row. `groups`: each group, with its rows on the page of the group. `parents`: each top-level row, with its child rows on the same page. `mixed`: groups, and rows outside every group.
21
+ - `dataRowCount` (`number`): How many data rows pass the filters, child rows too. With `rows`, it is `rowCount`.
22
+ - `lastPageKnown` (`boolean`): Whether the last page is known. It is not for pages from a server that gave no count.
23
+ - `columns` (`readonly ColumnDef[]`): Every column that holds cells, hidden ones too, in definition order.
24
+ - `visibleColumns` (`readonly ColumnDef[]`): The columns in view, in display order.
25
+ - `selectable` (`readonly string[]`): The ids of the rows that `selectAll` selects: the rows that pass the filters and can be selected.
26
+ - `hasExpandable` (`boolean`): Whether the table has a group or a row with child rows: what `expandAll` opens.
27
+ - `hasExpanded` (`boolean`): Whether one of them is open now. An id in `expanded` that no group or row has any more does not count.
28
+ - `loading` (`boolean`): The `loading` option: whether new rows are on their way.
29
+ - `columnAggregates` (`ColumnAggregates`): The functions of the totals that were chosen at run time, by column id.
30
+ - `cellFormats` (`CellFormats`): The formats of cells and columns that were set at run time.
31
+ - `formulas` (`boolean`): Whether the table has the `formulas` option.
32
+ - `cellFormulas` (`CellFormulas`): The formulas of the table.
33
+ - `formula` (`FormulaView | null`): The formula of the active cell or of its column, for a formula bar. `null` without formulas and without an active cell.
34
+ - `canUndo` (`boolean`): Whether `undo` has a step to take back. Always false without the `history` option.
35
+ - `canRedo` (`boolean`): Whether `redo` has a step to bring back. Always false without the `history` option.
36
+ - `activeCell` (`CellRef | null`): The cell that has the tab stop, when it is a cell of a data row.
37
+ - `cellSelection` (`CellSelectionView | null`): The selected cells of a table with `cellSelection`: the range, or the active cell alone. `null` when no cell of a data row is selected.
38
+
39
+ ## CellSelectionView
40
+
41
+ - `from` (`CellRef`): The first selected cell that holds a value, at the top and the start.
42
+ - `to` (`CellRef`): The last selected cell that holds a value, at the bottom and the end.
43
+ - `rows` (`number`): How many data rows the selection covers.
44
+ - `columns` (`number`): How many columns the selection covers.
45
+
46
+ ## RangeSummary
47
+
48
+ - `cells` (`number`): How many cells of data rows the selection holds.
49
+ - `count` (`number`): How many of them hold a value.
50
+ - `numbers` (`number`): How many hold a number. The four values after it are of these cells.
51
+ - `sum` (`number`): The sum of the numbers. 0 without a number.
52
+ - `mean` (`number | undefined`): The mean of the numbers, or `undefined` without a number.
53
+ - `min` (`number | undefined`): The smallest number, or `undefined` without a number.
54
+ - `max` (`number | undefined`): The largest number, or `undefined` without a number.
55
+ - `texts` (`{ sum: string; mean: string; min: string; max: string }`): Each value as text: in the format of the column when the selection is inside one column that shows numbers, else as a plain number of the locale, where the mean has the decimals of `meanDecimals`. An empty text for a value that does not exist.
56
+
57
+ ## TableSearch
58
+
59
+ What `useTableSearch(controller)` gives.
60
+
61
+ - `text` (`WritableComputedRef<string>`): The text of the search field, for `v-model`. A new text shows at once, and the table filters when the typing pauses (`searchDebounce` of the table). A search text that the table gets from elsewhere shows here too.
62
+ - `pending` (`Readonly<ShallowRef<boolean>>`): Whether a text waits for its pause, so the rows do not follow the field yet.
63
+ - `clear` (`() => void`): Empties the search at once, for a clear button and for Escape.
64
+ - `flush` (`() => void`): Filters now by the text that waits, for Enter.
65
+
66
+ ## EditDraft
67
+
68
+ What `useEditDraft` gives.
69
+
70
+ - `rows` (`ComputedRef<Row[]>`): The rows to pass to the table: the rows of the owner with the values of the draft in them.
71
+ - `count` (`ComputedRef<number>`): How many cells hold another value than the rows of the owner.
72
+ - `changed` (`(rowId: string, columnId: string) => boolean`): Whether a cell holds another value than the rows of the owner, by the row id and the column id.
73
+ - `onCellEdit` (`(edits: readonly CellEdit<Row>[]) => void`): Pass it as the `cell-edit` listener of the table. It takes every report: an edit, a paste, a fill, a clear and an undo. It throws for an edit of a row that is not in the rows of the owner, such as a child row.
74
+ - `save` (`() => CellEdit<Row>[]`): The edits against the rows of the owner, one for each cell that differs, and an empty draft.
75
+ - `cancel` (`() => void`): Empties the draft.
76
+
77
+ ## EditDraftOptions
78
+
79
+ - `getRowId?` (`(row: Row, index: number, parent: null) => string | number`): The `getRowId` of the table, when it has one. Without it, a row is found by its `id`, else by its place.
80
+
81
+ ## Rows
82
+
83
+ ### DataRow
84
+
85
+ - `kind` (`'row'`): Always `'row'`: a row of the data.
86
+ - `id` (`string`): The id of the row, from `getRowId`.
87
+ - `row` (`Row`): The row object of the data, as the owner passed it.
88
+ - `index` (`number`): Position among its siblings in the source data.
89
+ - `depth` (`number`): Tree depth in the source data, 0 for a top-level row.
90
+ - `parentId` (`string | null`): The id of the tree row above this row, or `null`.
91
+ - `children?` (`readonly DataRow<Row>[]`): The child rows, for a tree row.
92
+
93
+ ### GroupRow
94
+
95
+ - `kind` (`'group'`): Always `'group'`: a group of rows.
96
+ - `id` (`string`): The id of the group, such as `group/team=Design`. `expanded` holds it.
97
+ - `columnId` (`string`): The id of the column that makes the group.
98
+ - `value` (`unknown`): The value of that column that the rows of the group share.
99
+ - `depth` (`number`): Grouping level, 0 for the first `groupBy` column.
100
+ - `parentId` (`string | null`): The id of the group above this one, or `null`.
101
+ - `parent` (`GroupRow<Row> | null`): The group that holds this group, or `null` for a group of the first `groupBy` column.
102
+ - `children` (`readonly TableRow<Row>[]`): The groups or the rows right under this group.
103
+ - `leaves` (`readonly DataRow<Row>[]`): Every data row under the group, in order, without their tree children.
104
+
105
+ ### GroupPathEntry
106
+
107
+ - `group` (`GroupRow<Row>`): The group.
108
+ - `column` (`ColumnDef<Row> | undefined`): The column that the group is made from. `undefined` when the table has no such column any more.
109
+ - `value` (`unknown`): The value that the rows of the group share.
110
+ - `text` (`string`): The value as text, with the format of its column.
@@ -102,9 +102,7 @@ See the [Sheet tiles of the sink](https://falldownthesystem.github.io/ui-sdk-tab
102
102
 
103
103
  ## Names
104
104
 
105
- - **Options:** `columnLetters`; column key `rowHeader`.
106
- - **Controller:** `selectCellRows`, `selectCellColumns`.
107
- - **Slots:** `#row-header`, `#letter`.
108
105
  - **Attributes:** `data-row-header`, `data-corner`, `data-kind="letters"` on a row and `data-kind="letter"` on a cell.
109
- - **Messages:** `rowNumber`, `cornerCell`.
110
- - **Exports:** `rowNumberColumn`, `columnLetter`, `lettersByColumn`, and the types `RowHeaderSlotProps`, `LetterSlotProps`.
106
+ - **Exports:** `rowNumberColumn`, `columnLetter`, `lettersByColumn`.
107
+
108
+ Every option, event, slot, controller method and view field of this page is in the reference: [Table](./reference-table.md), [Controller](./reference-controller.md) and [View](./reference-view.md).
package/docs/rows.md CHANGED
@@ -291,10 +291,8 @@ Scroll the frame, or press Row 5,000. The table renders a few dozen rows at a ti
291
291
 
292
292
  ## Names
293
293
 
294
- - **Options:** `getRowId`, `getChildren`, `sortChildren`, `hasDetail`, `expanded`, `defaultExpanded`, `rowPinning`, `defaultRowPinning`, `rowWindow`, `rowHeight`, `estimatedRowHeight`, `overscan`, `stickyHeader`, `stickyFooter`.
295
- - **Events:** `expanded-change`, `row-pinning-change`.
296
- - **Controller:** `expand`, `collapse`, `toggleExpanded`, `expandAll`, `collapseAll`, `pinRow`, `scrollToRow`.
297
- - **Slots:** `#detail`.
298
- - **Types:** `DataRow`, `TableRow`, `RowPin`, `RowPinning`, `DetailSlotProps`.
294
+ - **Types:** `TableRow`, `RowPin`.
295
+
296
+ Every option, event, slot, controller method and view field of this page is in the reference: [Table](./reference-table.md), [Controller](./reference-controller.md) and [View](./reference-view.md).
299
297
 
300
298
  See the [Rows tiles of the sink](https://falldownthesystem.github.io/ui-sdk-table/?page=sink&only=rows).
@@ -111,10 +111,6 @@ With `cellSelection`, a person selects a range of cells: Shift with an arrow, or
111
111
 
112
112
  The cells of a range have `data-selected` and `data-range-edge`. The state is `cellRange`. [Range, copy and paste](./range-copy-and-paste.md) covers the rest.
113
113
 
114
- ## Names
115
-
116
- - **Options:** `selection`, `canSelect`, `selected`, `defaultSelected`, `cellSelection`.
117
- - **Events:** `selected-change`.
118
- - **Controller:** `select`, `toggleSelected`, `selectRows`, `deselectRows`, `selectAll`, `clearSelection`, `selectCells`, `clearCellSelection`, `copyCells`.
114
+ Every option, event, slot, controller method and view field of this page is in the reference: [Table](./reference-table.md), [Controller](./reference-controller.md) and [View](./reference-view.md).
119
115
 
120
116
  See the [Rows tiles of the sink](https://falldownthesystem.github.io/ui-sdk-table/?page=sink&only=rows).
@@ -229,11 +229,13 @@ A draft stays with the cell where it started, also when the active cell moves. A
229
229
  | --- | --- |
230
230
  | Operators | `+ - * / ^`, a leading `-`, `%` after a number, `&` (joins texts), `= <> < <= > >=` |
231
231
  | Numbers | `SUM`, `AVERAGE`, `MIN`, `MAX`, `COUNT`, `COUNTA`, `ROUND`, `ROUNDUP`, `ROUNDDOWN`, `FLOOR`, `CEILING`, `ABS`, `INT`, `MOD` |
232
- | Conditions | `IF`, `IFS`, `SWITCH`, `AND`, `OR`, `NOT`, `IFERROR`, `ISBLANK`, `ISNUMBER`, `ISTEXT`, `ISERROR` |
233
- | Texts | `CONCAT`, `LEN`, `LEFT`, `RIGHT`, `MID`, `UPPER`, `LOWER`, `TRIM` |
232
+ | Conditions | `IF`, `IFS`, `SWITCH`, `AND`, `OR`, `NOT`, `IFERROR`, `IFNA`, `ISBLANK`, `ISNUMBER`, `ISTEXT`, `ISERROR` |
233
+ | Ranges with criteria | `COUNTIF`, `COUNTIFS`, `SUMIF`, `SUMIFS`, `AVERAGEIF`, `AVERAGEIFS`, `COUNTBLANK` |
234
+ | Lookups | `XLOOKUP`, `VLOOKUP`, `INDEX`, `MATCH` |
235
+ | Texts | `CONCAT`, `TEXTJOIN`, `LEN`, `LEFT`, `RIGHT`, `MID`, `UPPER`, `LOWER`, `TRIM`, `SUBSTITUTE`, `FIND`, `SEARCH`, `VALUE`, `TEXT` |
234
236
  | Periods of a date | `DAYOF`, `WEEKOF(d, [type])`, `MONTHOF`, `QUARTEROF`, `YEAROF`, `HOUROF` |
235
237
  | Parts of a date | `YEAR`, `QUARTER`, `MONTH`, `DAY`, `HOUR`, `MINUTE`, `WEEKDAY(d, [type])`, `ISOWEEKNUM`, `ISOYEAR` |
236
- | Date math | `DATE(year, month, day)`, `DAYS(end, start)`, `DATEADD(date, count, unit)` |
238
+ | Date math | `DATE(year, month, day)`, `DAYS(end, start)`, `DATEADD(date, count, unit)`, `EOMONTH(date, months)`, `TODAY()`, `NOW()` |
237
239
 
238
240
  A function whose name Excel has behaves as in Excel, with its arguments and edges: `MONTH` gives 1 to 12, `WEEKDAY` counts from Sunday by default and takes the types of Excel, `IF`, `IFS`, `SWITCH`, `AND`, `OR` and `IFERROR` read only the arguments they need. The differences:
239
241
 
@@ -241,7 +243,12 @@ A function whose name Excel has behaves as in Excel, with its arguments and edge
241
243
  - A day is a text `YYYY-MM-DD` and a moment a `Date`, not a serial number: `DATE(2026, 11, 21)` gives `2026-11-21`, and `DAYS` and the parts read both kinds. A date before 1900 gives `#NUM!`, and a year under 1900 gets 1900 added, as in Excel.
242
244
  - The date functions read the clock of a zone (above); Excel has no zone.
243
245
  - `#CYCLE!` is not in Excel: a circle that comes with the `cell-formulas` of the owner. Excel stores such a formula and warns; here an entry that makes a circle is refused.
244
- - No other sheets, names, arrays, lookups, `SUMIF`, `TODAY()` or `NOW()`.
246
+ - **Criteria** of `COUNTIF` and its family are those of Excel: `5`, `">5"`, `"<>done"`, `""` for the empty cells, `"a*"` and `"?"` as wildcards and `~` before one of them; capital and small letters are the same, and a criterion of a number takes a text of that number. A date is no number here, so a day text in a criterion (`">2026-01-31"`) compares with the days of a range, and a number never takes a date. The ranges of one call have the same rows and columns: `SUMIF` and `AVERAGEIF` give `#VALUE!` where Excel would stretch a smaller range of values.
247
+ - **Lookups** give one cell. A result that Excel spills into the cells beside it, such as `XLOOKUP` with results of two columns or `INDEX` with a row or a column 0 of a range of more than one, is `#VALUE!`. A value matches a cell of its own kind only. `MATCH` and `VLOOKUP` with an approximate match, and `XLOOKUP` with the search `2` or `-2`, give what Excel gives on sorted data; Excel searches such data in halves, and on data that is not sorted it can give another cell, where these look at every cell. A lookup of an empty value is `#N/A`.
248
+ - **`VALUE`** reads a text as a formula reads a number: `12.5`, `-3`, `1e3`, with spaces around it. It reads no comma of thousands, no currency, no percent and no date, in any locale: those are `#VALUE!`.
249
+ - **`TEXT`** knows these codes, the same in every locale. A number: `0`, `#`, the decimal point, a comma between the digits (thousands, as in `#,##0.00`) and `%`. A date: `yy`, `yyyy`, `m` to `mmmmm`, `d` to `dddd` (the months and days in English), `h`, `hh`, `m` and `mm` after an hour or before a second (the minutes), `s`, `ss` and `AM/PM`. Both take text in quotes, a character after `\`, a space and the characters `$-+()/:` (and `.` and `,` in a date); `General` gives the plain text. Any other code is `#VALUE!`: no colours, no sections with `;`, no `E+`, no comma at the end. A date with a number code and a number with a date code are `#VALUE!`, because a date is no number here. A half goes away from zero.
250
+ - **`TODAY()` and `NOW()`** hold the moment when they were computed: after an entry, after rows came or went, or at `controller.recalculate()`. Nothing computes them on a timer and a render does not. `TODAY()` is the day in the zone of the formula (`timeZone` of the engine), `NOW()` a `Date`. A test passes a clock: `createFormulaEngine({ now: () => Date.UTC(2026, 10, 22) })`.
251
+ - **Left out:** `FILTER`, `UNIQUE`, `SORT`, `SORTBY`, `SEQUENCE` and `TRANSPOSE` give a list that Excel spills into the cells beside the formula; a cell of the table holds one value and the rows belong to the owner. `SUBTOTAL` skips the rows that a filter hides; a formula reads places of the document and never the view, and the footer, `getTotals` and the selection summary already follow the filter. No other sheets, names or arrays.
245
252
 
246
253
 
247
254
  ## What a styled table needs
@@ -263,14 +270,10 @@ See the [Formula tiles of the sink](https://falldownthesystem.github.io/ui-sdk-t
263
270
 
264
271
  ## Names
265
272
 
266
- - **Options:** `formulas` (the engine), `cell-formulas` and `default-cell-formulas` (`v-model:cell-formulas`), column key `allowFormula`. `createFormulaEngine({ timeZone?, maxReads? })`: `maxReads` (5,000,000 by default) refuses one change that would read more cells, such as a running sum by ranges over 50,000 rows.
267
273
  - **Value:** `CellFormulas` is `{ columns?: { [columnId]: formula }, cells?: { [rowId]: { [columnId]: formula } } }`, in the stored form: plain data that an app saves with its document. `setFormulas`, `revertFormulas`, `pruneFormulas` and `formulaAt` of the formulas entry are the pure functions behind it.
268
- - **Events:** `cell-formulas-change` (`details.cancel()` refuses), `update:cell-formulas`; `cell-edit` with `CellEdit.formula` and the reason `recalculate` for a check.
269
- - **Controller and agent actions:** `getCellFormula`, `setCellFormula`, `getColumnFormula`, `setColumnFormula`, `getAddress`, `cellAt`, `recalculate`, `getFormulaSummary`, `evaluateFormula`, `getFormulaFunctions`. Each throws "This table has no formulas: pass `formulas`." without an engine. `getFormulaSummary(limit?)` gives each text of a column once with its count, so an agent reads 50,000 cells as one line.
270
- - **View:** `formulas` (the option is on), `cellFormulas`, `formula` (`FormulaView` of the active cell: `rowId`, `columnId`, `address`, `formula`, `text`, `value`, `error`, `ofColumn`).
271
- - **Slot props:** `formula` in `#cell` and `#col-{id}` (`{ text, error?: { code, message } }`), in `#editor` and `#edit-{id}` (the formula as a person reads it; a save of a text with `=` sets a formula), and in `#header` (the formula of a computed column).
274
+ - **Controller:** the formula methods throw "This table has no formulas: pass `formulas`." without an engine. `getFormulaSummary(limit?)` gives each text of a column once with its count, so an agent reads 50,000 cells as one line.
275
+ - **`FormulaView`**, the `formula` of the view for the active cell: `rowId`, `columnId`, `address`, `formula`, `text`, `value`, `error`, `ofColumn`.
272
276
  - **Attributes:** `data-formulas` on the table; `data-formula` on a cell with a formula of its own; `data-formula-error` (`div0`, `value`, `ref`, `name`, `num`, `na`, `cycle`) with the words of the error as `aria-description`; `data-formula-column` on the header and the cells of a computed column.
273
- - **Messages:** `formulaIssue(issue)`, `formulaError(code)`, `recalculated({ cells })`. Without them, the English words of the engine (`describeFormulaIssue`).
274
277
  - **Words of a refusal.** `editCell`, `setCellFormula` and `setColumnFormula` throw an `Error` whose `message` is for a developer or an agent: it names the column, the row and the text (`Column "total" refuses "=SUMM(B2)" for row "l2": No function …`). Its `cause` is a text with the words for a person, the words that the editor of the cell shows. A control beside the table shows the `cause`; `useFormulaBar().error` does that already.
275
278
 
276
279
  ```ts
@@ -290,3 +293,5 @@ See the [Formula tiles of the sink](https://falldownthesystem.github.io/ui-sdk-t
290
293
  }
291
294
  ```
292
295
  - **Exports of the formulas entry:** `createFormulaEngine`, `formulaColumn`, `compileRowFormula`, `parseFormula`, `printFormula`, `formulaShows`, `formulaSigns`, `describeFormulaIssue`, `FORMULA_FUNCTIONS`, `setFormulas`, `revertFormulas`, `pruneFormulas`, `formulaAt`, `excelFormulas`, `EXCEL_FUNCTIONS`, `useFormulaBar`. Of the export entry: the `formula` option of `toXlsx` and the type `XlsxFormulas`.
296
+
297
+ Every option, event, slot, controller method and view field of this page is in the reference: [Table](./reference-table.md), [Controller](./reference-controller.md) and [View](./reference-view.md).
@@ -172,11 +172,7 @@ See the [Sheet tiles of the sink](https://falldownthesystem.github.io/ui-sdk-tab
172
172
 
173
173
  ## Names
174
174
 
175
- - **Options:** `sheet`, `editable`, `cellSelection`, `history`, `fillHandle`, `columnAggregates`, `defaultColumnAggregates`; column key `numberKeyboard`.
176
- - **Events:** `column-aggregates-change`, `update:column-aggregates`.
177
- - **Controller:** `clearCells`, `cutCells` (returns the text), `selectAllCells`, `selectCellRows(from, to?)`, `selectCellColumns(from, to?)`, `setColumnAggregate`.
178
- - **View:** `canUndo`, `canRedo`, `activeCell`, `cellSelection`, `columnAggregates`.
179
- - **Slot props:** `selectColumn` in `#header`; `mode`, `typed` and `inputMode` in `#editor` and `#edit-{id}`; `aggregate` and `setAggregate` in `#foot`, `aggregate` in `#group-total`.
180
175
  - **Attributes:** `data-sheet`, `data-aggregate`.
181
- - **Messages:** `cellsCleared`, `cellsCut`, `clearRefused`, `clearNowhere`, `aggregateLabel`, `totalLabel`.
182
176
  - **Exports:** `emptyValue`, `aggregateName`, and the types `ColumnAggregates`, `AggregateName`, `TableStepReason`.
177
+
178
+ Every option, event, slot, controller method and view field of this page is in the reference: [Table](./reference-table.md), [Controller](./reference-controller.md) and [View](./reference-view.md).