@fusion.dev/helix-headless 0.239.0 → 0.240.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/column-manager/index.d.ts +1 -0
- package/dist/column-manager/index.js +1 -0
- package/dist/column-manager/root/column-manager-root.d.ts +137 -0
- package/dist/column-manager/root/column-manager-root.js +253 -0
- package/dist/data-table/binding.d.ts +85 -0
- package/dist/data-table/binding.js +58 -0
- package/dist/data-table/edit.d.ts +47 -0
- package/dist/data-table/edit.js +60 -0
- package/dist/data-table/events/before-cell-commit.d.ts +16 -0
- package/dist/data-table/events/before-cell-commit.js +11 -0
- package/dist/data-table/events/before-cell-edit.d.ts +13 -0
- package/dist/data-table/events/before-cell-edit.js +11 -0
- package/dist/data-table/events/before-export.d.ts +15 -0
- package/dist/data-table/events/before-export.js +11 -0
- package/dist/data-table/events/before-view-change.d.ts +16 -0
- package/dist/data-table/events/before-view-change.js +11 -0
- package/dist/data-table/events/cell-commit.d.ts +12 -0
- package/dist/data-table/events/cell-commit.js +11 -0
- package/dist/data-table/events/cell-edit.d.ts +11 -0
- package/dist/data-table/events/cell-edit.js +11 -0
- package/dist/data-table/events/details.d.ts +47 -0
- package/dist/data-table/events/export.d.ts +11 -0
- package/dist/data-table/events/export.js +11 -0
- package/dist/data-table/events/index.d.ts +18 -2
- package/dist/data-table/events/index.js +17 -1
- package/dist/data-table/events/view-change.d.ts +12 -0
- package/dist/data-table/events/view-change.js +11 -0
- package/dist/data-table/export.d.ts +43 -0
- package/dist/data-table/export.js +26 -0
- package/dist/data-table/index.d.ts +2 -0
- package/dist/data-table/index.js +2 -0
- package/dist/data-table/root/data-table-root.d.ts +406 -26
- package/dist/data-table/root/data-table-root.js +959 -30
- package/dist/data-table/view.d.ts +124 -0
- package/dist/data-table/view.js +249 -0
- package/dist/data-table/xlsx/index.d.ts +27 -0
- package/dist/data-table/xlsx/index.js +119 -0
- package/dist/date-input/root/date-input-root.d.ts +7 -0
- package/dist/date-input/root/date-input-root.js +9 -1
- package/dist/element-events.generated.js +9 -0
- package/dist/filter-input/root/filter-input-root.d.ts +31 -0
- package/dist/filter-input/root/filter-input-root.js +94 -12
- package/dist/filter-input/table.d.ts +64 -0
- package/dist/filter-input/table.js +76 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/input/root/input-root.d.ts +7 -0
- package/dist/input/root/input-root.js +9 -1
- package/dist/number-input/root/number-input-root.d.ts +7 -0
- package/dist/number-input/root/number-input-root.js +9 -1
- package/dist/quick-filters/events/before-view-save.d.ts +14 -0
- package/dist/quick-filters/events/before-view-save.js +11 -0
- package/dist/quick-filters/events/details.d.ts +10 -0
- package/dist/quick-filters/events/details.js +1 -0
- package/dist/quick-filters/events/index.d.ts +16 -0
- package/dist/quick-filters/events/index.js +9 -0
- package/dist/quick-filters/events/view-save.d.ts +11 -0
- package/dist/quick-filters/events/view-save.js +11 -0
- package/dist/quick-filters/filter/quick-filter.d.ts +48 -0
- package/dist/quick-filters/filter/quick-filter.js +33 -0
- package/dist/quick-filters/index.d.ts +3 -0
- package/dist/quick-filters/index.js +3 -0
- package/dist/quick-filters/root/quick-filters-root.d.ts +118 -0
- package/dist/quick-filters/root/quick-filters-root.js +183 -0
- package/dist/selection-bar/index.d.ts +1 -0
- package/dist/selection-bar/index.js +1 -0
- package/dist/selection-bar/root/selection-bar-root.d.ts +65 -0
- package/dist/selection-bar/root/selection-bar-root.js +44 -0
- package/dist/table/column/table-column.d.ts +82 -0
- package/dist/table/column/table-column.js +54 -0
- package/dist/table/column-type.d.ts +7 -0
- package/dist/table/column-type.js +1 -0
- package/dist/table-export/index.d.ts +1 -0
- package/dist/table-export/index.js +1 -0
- package/dist/table-export/root/table-export-root.d.ts +132 -0
- package/dist/table-export/root/table-export-root.js +233 -0
- package/dist/view-panel/index.d.ts +1 -0
- package/dist/view-panel/index.js +1 -0
- package/dist/view-panel/root/view-panel-root.d.ts +132 -0
- package/dist/view-panel/root/view-panel-root.js +209 -0
- package/examples.json +1 -1
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +1231 -9
- package/types/svelte.d.ts +6 -0
- package/types/vue.d.ts +605 -6
- package/types/words.d.ts +305 -5
|
@@ -2,9 +2,16 @@ import { type DataRow, HelixElement } from '@fusion.dev/helix-core';
|
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
import type { HelixHeadlessTableColumn } from '../../table/column/table-column.js';
|
|
4
4
|
import '../../checkbox/index.js';
|
|
5
|
+
import '../../date-input/index.js';
|
|
5
6
|
import '../../divider/index.js';
|
|
7
|
+
import '../../input/index.js';
|
|
6
8
|
import '../../menu/index.js';
|
|
9
|
+
import '../../number-input/index.js';
|
|
10
|
+
import '../../option/index.js';
|
|
7
11
|
import '../../pagination/index.js';
|
|
12
|
+
import '../../select/index.js';
|
|
13
|
+
import { type ExportData, type ExportOptions } from '../export.js';
|
|
14
|
+
import { type DataTableView, type Facet, type FilterOperatorInfo, type PartialView, type PinEdge } from '../view.js';
|
|
8
15
|
declare const HelixHeadlessDataTable_base: (new (...args: any[]) => import("@fusion.dev/helix-core").CollectionElement) & typeof HelixElement;
|
|
9
16
|
/**
|
|
10
17
|
* @summary A table drawn from an array of rows, with sorting, filtering, and paging.
|
|
@@ -80,6 +87,11 @@ declare const HelixHeadlessDataTable_base: (new (...args: any[]) => import("@fus
|
|
|
80
87
|
* | Control with Home or End | Moves to the first or the last cell of the grid. |
|
|
81
88
|
* | Page Down, Page Up | Moves by the rows that fit in view. |
|
|
82
89
|
* | Enter, F2 | Moves into the cell's controls. Escape moves back to the cell, and Tab moves between the controls of one cell. |
|
|
90
|
+
* | Enter, F2, or a character on an editable cell, or a double click, or a click, or a double click with `edit-on="double-click"` | Opens the cell for an edit. A character starts the field with what you typed. |
|
|
91
|
+
* | Enter in an open cell | Saves and moves down a row. |
|
|
92
|
+
* | Tab, Shift with Tab in an open cell | Saves and moves to the next or the previous cell. |
|
|
93
|
+
* | Escape in an open cell | Puts the old value back and closes the cell. |
|
|
94
|
+
* * | Space, Enter on an editable boolean cell | Toggles its checkbox in place. |
|
|
83
95
|
* | Enter, Space on a sortable heading | Sorts by the column. |
|
|
84
96
|
* | Enter, Space on the `load-more` row | Sends `helix-load-more`. |
|
|
85
97
|
* | Space on a row | Selects the row, in a `selectable` table. Under `selection-behavior="replace"`, selects it alone, and Control or Command with Space adds or takes out the row. |
|
|
@@ -87,6 +99,7 @@ declare const HelixHeadlessDataTable_base: (new (...args: any[]) => import("@fus
|
|
|
87
99
|
* | Shift with Down or Up | Selects the rows it moves across, in a `selectable` table. |
|
|
88
100
|
* | Shift with Space | Selects every row from the one last chosen, in a `selectable` table. |
|
|
89
101
|
* | Control or Command with A | Selects every row, in a `selectable` table. |
|
|
102
|
+
* | Control or Command with C | Copies the selected rows as TSV under their headings, or the value in the cell with focus where no row is selected. |
|
|
90
103
|
* | Right on a row header in a tree grid | Opens a closed row, and moves one cell along an open one. |
|
|
91
104
|
* | Left on a row header in a tree grid | Closes an open row, and moves to the parent of a closed one. |
|
|
92
105
|
* | A letter or a word | Moves to the next row whose row header starts with what you typed. |
|
|
@@ -167,6 +180,26 @@ declare const HelixHeadlessDataTable_base: (new (...args: any[]) => import("@fus
|
|
|
167
180
|
* nothing while a `sort` is set, since the sort decides the order, and a tree
|
|
168
181
|
* grid draws none.
|
|
169
182
|
*
|
|
183
|
+
* **Editable cells.** `editable` on a column lets a reader edit its cells,
|
|
184
|
+
* and `rowEditable` decides row by row. The column's `type` picks the field:
|
|
185
|
+
* text, a number, a date, or a select of an enum's values, and a boolean
|
|
186
|
+
* toggles in place. A column's `editor` draws a field of your own. The value
|
|
187
|
+
* is checked against `required`, `min`, `max`, `pattern` and `validate`, and a
|
|
188
|
+
* refused value keeps the cell open with the message. `helix-before-cell-edit`
|
|
189
|
+
* asks before a cell opens, `helix-before-cell-commit` before a value is saved,
|
|
190
|
+
* and its `waitUntil` holds the save for a check on your server while the cell
|
|
191
|
+
* shows that it is saving. Then the table writes a copy of the row into `rows`
|
|
192
|
+
* and fires `helix-cell-commit`. `batch-edits` holds the saved cells as
|
|
193
|
+
* unsaved changes, marked in their corners, until a bar under the grid saves
|
|
194
|
+
* or discards them. Editing is not offered in a tree grid.
|
|
195
|
+
*
|
|
196
|
+
* **Export.** `exportRows` writes the rows as CSV, TSV or JSON, with a choice
|
|
197
|
+
* of the selected, filtered or all rows, the visible or all columns, and the
|
|
198
|
+
* values as shown or raw. `download` saves them as a file, and asks first with
|
|
199
|
+
* `helix-before-export`, which a server can take. `TableExport` is a panel
|
|
200
|
+
* that asks a reader each choice. XLSX is its own entry, so set `xlsx` to the
|
|
201
|
+
* `toXlsx` it exports to offer it.
|
|
202
|
+
*
|
|
170
203
|
* `csv()` returns the result as text: every row that passes the filter, in the
|
|
171
204
|
* order and the columns on screen. Saving the file is up to you.
|
|
172
205
|
*
|
|
@@ -200,17 +233,25 @@ declare const HelixHeadlessDataTable_base: (new (...args: any[]) => import("@fus
|
|
|
200
233
|
* @slot error - Content shown after `error-text` while it is set, such as a button that tries again.
|
|
201
234
|
* @slot footer - Content below the grid. It replaces the built-in pagination.
|
|
202
235
|
* @slot loading - Content shown while the rows load, such as a spinner. Falls back to `loading-text`, which the live region still says.
|
|
236
|
+
* @slot selection - Content that takes the toolbar's place while rows are selected, such as a `SelectionBar` with what you can do to them.
|
|
203
237
|
* @slot toolbar - Content above the grid, such as a search field or actions.
|
|
204
238
|
*
|
|
239
|
+
* @event {HelixBeforeCellCommitEvent} helix-before-cell-commit - A cell's new value is about to be saved. Cancelable: cancel it to keep the old value, or pass a check to `detail.waitUntil`.
|
|
240
|
+
* @event {HelixBeforeCellEditEvent} helix-before-cell-edit - A cell is about to open for an edit. Cancelable: cancel it to keep the cell closed.
|
|
205
241
|
* @event {HelixBeforeColumnToggleEvent} helix-before-column-toggle - A column is about to be hidden or shown, with its `field` and `hidden`. Cancelable: cancel it to keep the column as it is.
|
|
242
|
+
* @event {HelixBeforeExportEvent} helix-before-export - A file of the rows is about to be made, from Export or `download`, with the choices, the file's name, and the view. Cancelable: cancel it to make the file on your server.
|
|
206
243
|
* @event {HelixBeforeFilterEvent} helix-before-filter - The search query is about to change. Cancelable: cancel it to keep the current query.
|
|
207
244
|
* @event {HelixBeforeFollowEvent} helix-before-follow - A press on a link in a cell is about to load its page, in this tab and on this site. Cancelable: cancel it to keep the page, and hand `detail.href` to your router.
|
|
208
245
|
* @event {HelixBeforeNavigateEvent} helix-before-navigate - Another page was requested. Cancelable: cancel it to stay on the current page.
|
|
209
246
|
* @event {HelixBeforeReorderEvent} helix-before-reorder - A row or a column is about to move. For a row, with `reorderable-rows`, the event carries every row's key in the new order; for a column, `kind` is `column` and `value` holds every field in the new order. Cancelable: cancel it to keep the row or the column where it is.
|
|
210
247
|
* @event {HelixBeforeSelectEvent} helix-before-select - The selection is about to change. The event carries every selected key, separated by commas. Cancelable: cancel it to keep the current selection.
|
|
211
248
|
* @event {HelixBeforeSortEvent} helix-before-sort - A different sort order was requested. Cancelable: cancel it to keep the current order.
|
|
249
|
+
* @event {HelixBeforeViewChangeEvent} helix-before-view-change - The view is about to change, with the whole view it would leave in `detail.view` and as JSON in `detail.value`. Sent before the event for the part that changes. Cancelable: cancel it to keep the view, and set `view`, `rows` and `total` from your server.
|
|
250
|
+
* @event {HelixCellCommitEvent} helix-cell-commit - Fired after a cell's new value is saved into a copy of its row in `rows`.
|
|
251
|
+
* @event {HelixCellEditEvent} helix-cell-edit - Fired after a cell opens for an edit.
|
|
212
252
|
* @event {HelixColumnToggleEvent} helix-column-toggle - Fired after a column is hidden or shown, with its `field` and `hidden`.
|
|
213
253
|
* @event {HelixExpandEvent} helix-expand - Fired after a row opens or closes, with every open row's key, separated by commas, which `expanded` also holds.
|
|
254
|
+
* @event {HelixExportEvent} helix-export - Fired as the browser saves a file of the rows, with the same detail.
|
|
214
255
|
* @event {HelixFilterEvent} helix-filter - Fired after the search query changes, with the new query.
|
|
215
256
|
* @event {HelixFollowEvent} helix-follow - Fired as the browser loads the page a link in a cell names, with its path.
|
|
216
257
|
* @event {HelixLoadMoreEvent} helix-load-more - Fired when a reader asks for more rows, by the `load-more` row's button or by scrolling a `windowed` table near its end.
|
|
@@ -218,12 +259,24 @@ declare const HelixHeadlessDataTable_base: (new (...args: any[]) => import("@fus
|
|
|
218
259
|
* @event {HelixReorderEvent} helix-reorder - Fired after the columns move, with `kind` set to `column` and every field in the new order. For a row, with `kind` set to `row`, it follows `helix-before-reorder`, and you set `rows` to the order in `keys`.
|
|
219
260
|
* @event {HelixSelectEvent} helix-select - Fired after the selection changes, with every selected key, separated by commas.
|
|
220
261
|
* @event {HelixSortEvent} helix-sort - Fired after the sort order changes, with the new order.
|
|
262
|
+
* @event {HelixViewChangeEvent} helix-view-change - Fired after the view changes, with the whole view in `detail.view` and as JSON in `detail.value`.
|
|
221
263
|
*
|
|
222
264
|
* @csspart after - The space that stands in for the rows below the window. Only while `windowed`.
|
|
223
265
|
* @csspart before - The space that stands in for the rows above the window. Only while `windowed`.
|
|
224
266
|
* @csspart cell - One cell.
|
|
267
|
+
* @csspart cell-boolean - Added to `cell` in an editable boolean column, which holds a checkbox that toggles in place.
|
|
268
|
+
* @csspart cell-editable - Added to `cell` in a column a reader can edit.
|
|
269
|
+
* @csspart cell-editing - Added to `cell` while it is open for an edit.
|
|
270
|
+
* @csspart cell-field - Added to `cell` in an editable column that draws its field at rest, as every one does that has no `cell` or `editor` of its own.
|
|
225
271
|
* @csspart cell-header - Added to `cell` for a cell of the row header column.
|
|
272
|
+
* @csspart cell-invalid - Added to `cell` while its value breaks a rule, beside `cell-message`.
|
|
273
|
+
* @csspart cell-message - The message for a value a rule refuses, inside the open cell. The field names it as its description.
|
|
274
|
+
* @csspart cell-pinned-end - Added to `cell` in a column the view pins to the end of the row.
|
|
275
|
+
* @csspart cell-pinned-start - Added to `cell` in a column the view pins to the start of the row.
|
|
276
|
+
* @csspart cell-saving - Added to `cell` while a check the page passed to `waitUntil` is under way.
|
|
277
|
+
* @csspart cell-saving-mark - Says a cell is saving, inside it. Read by a screen reader, and drawn as a mark in the styled tier.
|
|
226
278
|
* @csspart cell-selected - Added to `cell` in a selected row.
|
|
279
|
+
* @csspart cell-unsaved - Added to `cell` while its change is held unsaved, under `batch-edits`.
|
|
227
280
|
* @csspart checkbox - A row's checkbox, or the checkbox in the heading that selects every row.
|
|
228
281
|
* @csspart checkbox-box - The box drawn for the checkbox's input.
|
|
229
282
|
* @csspart checkbox-control - The checkbox's input.
|
|
@@ -236,6 +289,37 @@ declare const HelixHeadlessDataTable_base: (new (...args: any[]) => import("@fus
|
|
|
236
289
|
* @csspart checkbox-mark-dash - Added to `checkbox-mark` while it draws the dash, which it keeps until its box is checked.
|
|
237
290
|
* @csspart checkbox-mark-indeterminate - Added to `checkbox-mark` while only some rows are selected.
|
|
238
291
|
* @csspart drag-preview - A copy of the row a pointer drags by its grip, which follows the pointer in the top layer until the row is let go, with `reorderable-rows`. A column's grip moves the column itself. Hidden from assistive technology.
|
|
292
|
+
* @csspart editor - The field an open cell edits in: an `Input`, a `NumberInput`, a `DateInput`, or a `Select`, as the column's `type` picks.
|
|
293
|
+
* @csspart editor-feedback - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
294
|
+
* @csspart editor-hint - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
295
|
+
* @csspart editor-indicator - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
296
|
+
* @csspart editor-label - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
297
|
+
* @csspart editor-listbox - Forwarded from the select an enum cell opens in: its list.
|
|
298
|
+
* @csspart editor-listbox-empty - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
299
|
+
* @csspart editor-listbox-error - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
300
|
+
* @csspart editor-listbox-feedback - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
301
|
+
* @csspart editor-listbox-filter-icon - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.
|
|
302
|
+
* @csspart editor-listbox-filter-mark - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.
|
|
303
|
+
* @csspart editor-listbox-hint - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
304
|
+
* @csspart editor-listbox-items - Forwarded from the select an enum cell opens in: the options in its list.
|
|
305
|
+
* @csspart editor-listbox-label - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
306
|
+
* @csspart editor-listbox-live - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
307
|
+
* @csspart editor-listbox-loading - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
308
|
+
* @csspart editor-listbox-search - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.
|
|
309
|
+
* @csspart editor-listbox-search-field - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.
|
|
310
|
+
* @csspart editor-listbox-voice - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.
|
|
311
|
+
* @csspart editor-listbox-voice-level - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.
|
|
312
|
+
* @csspart editor-listbox-voice-level-canvas - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.
|
|
313
|
+
* @csspart editor-listbox-voice-listening - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.
|
|
314
|
+
* @csspart editor-listbox-voice-status - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.
|
|
315
|
+
* @csspart editor-live - Forwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.
|
|
316
|
+
* @csspart editor-surface - Forwarded from the select an enum cell opens in: the panel its list opens in.
|
|
317
|
+
* @csspart editor-trigger - Forwarded from the select an enum cell opens in: the button that opens its list.
|
|
318
|
+
* @csspart editor-value - Forwarded from the select an enum cell opens in: the value it shows.
|
|
319
|
+
* @csspart edits - The bar under the grid that saves or discards the unsaved changes, under `batch-edits`.
|
|
320
|
+
* @csspart edits-count - Says how many changes are unsaved.
|
|
321
|
+
* @csspart edits-discard - The button that drops every unsaved change.
|
|
322
|
+
* @csspart edits-save - The button that saves every unsaved change.
|
|
239
323
|
* @csspart empty - Shown when there are no rows, because none arrived or the filter matches none. While rows are loading, the `loading` part is shown in its place.
|
|
240
324
|
* @csspart error - Shown after the rows while `error-text` is set, in place of the empty and loading lines.
|
|
241
325
|
* @csspart footer - The region below the grid.
|
|
@@ -301,6 +385,7 @@ declare const HelixHeadlessDataTable_base: (new (...args: any[]) => import("@fus
|
|
|
301
385
|
* @cssproperty --data-table-cell-align - The alignment of the cell's column: `start`, `center`, or `end`. Unset when the column sets none. The component writes it on each cell it draws, and the stylesheet reads it. `Table` sets `--table-cell-align` for the same purpose.
|
|
302
386
|
* @cssproperty --data-table-cell-block-align - Where a cell's content sits from top to bottom in a row taller than it: `start`, `center` or `end`. `center` by default. Set it on the table, or on a row through `::part(row)`; a column's `vertical-align` writes it on each of that column's cells, and wins.
|
|
303
387
|
* @cssproperty --data-table-level - How deep a row is in a tree grid, from 1. The component writes it on each row header cell, and the stylesheet indents by it.
|
|
388
|
+
* @cssproperty --data-table-pin-offset - How far a pinned column's cell stays from its end of the row, in pixels: the width of the pinned columns before it. The component writes it on each cell of a pinned column, and the stylesheet reads it.
|
|
304
389
|
* @cssproperty --data-table-template - The column track list, worked out from the columns. The component writes it inline on the element that reads it, so setting it has no effect. Set a column's `width` to change it.
|
|
305
390
|
*
|
|
306
391
|
* @cssstate empty - While there are no rows to show and none are loading.
|
|
@@ -335,6 +420,12 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
335
420
|
* Removed in the next major version.
|
|
336
421
|
*/
|
|
337
422
|
ascendingLabel: string;
|
|
423
|
+
/**
|
|
424
|
+
* Holds each saved cell as an unsaved change, marked in its corner, and
|
|
425
|
+
* draws a bar under the grid that saves or discards every one at once.
|
|
426
|
+
* Off, a cell saves as you leave it.
|
|
427
|
+
*/
|
|
428
|
+
batchEdits: boolean;
|
|
338
429
|
/**
|
|
339
430
|
* What screen readers hear when a held row is put back, or a move is
|
|
340
431
|
* refused, with `reorderable-rows`.
|
|
@@ -401,6 +492,12 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
401
492
|
* The starting sort order, used until `sort` is set.
|
|
402
493
|
*/
|
|
403
494
|
defaultSort: string;
|
|
495
|
+
/**
|
|
496
|
+
* The starting view, as JSON, such as `{"sort":"due:asc","columns":{"hidden":["notes"]}}`.
|
|
497
|
+
* The parts it names are put in force once, before the table first draws,
|
|
498
|
+
* and `view` holds them after.
|
|
499
|
+
*/
|
|
500
|
+
defaultView: string;
|
|
404
501
|
/**
|
|
405
502
|
* The word for a descending sort, in a `sorted-label` that writes `{order}`.
|
|
406
503
|
*
|
|
@@ -409,8 +506,18 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
409
506
|
* Removed in the next major version.
|
|
410
507
|
*/
|
|
411
508
|
descendingLabel: string;
|
|
509
|
+
/** The words on the bar's button that discards the unsaved changes, with `batch-edits`. */
|
|
510
|
+
discardEditsLabel: string;
|
|
412
511
|
/** What screen readers hear when a row is dropped, with `reorderable-rows`. */
|
|
413
512
|
droppedLabel: string;
|
|
513
|
+
/**
|
|
514
|
+
* What opens an editable cell that draws no field at rest, because its
|
|
515
|
+
* column sets `cell` or `editor`: `click`, where a single press opens it, or
|
|
516
|
+
* `double-click`, a spreadsheet's way. Every other editable cell is its
|
|
517
|
+
* field already, which a press reaches. Enter, F2, and typing open a cell
|
|
518
|
+
* either way, and a boolean cell toggles on one press whatever this says.
|
|
519
|
+
*/
|
|
520
|
+
editOn: 'click' | 'double-click';
|
|
414
521
|
/**
|
|
415
522
|
* The text shown and announced when the rows could not load, such as "The
|
|
416
523
|
* files did not load". Set it when a fetch fails, and clear it once you try
|
|
@@ -473,6 +580,10 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
473
580
|
* language. The built-in pagination speaks it too.
|
|
474
581
|
*/
|
|
475
582
|
locale: string;
|
|
583
|
+
/** The message for an edited cell over its column's `max`. `{max}` is the largest value. */
|
|
584
|
+
maxMessage: string;
|
|
585
|
+
/** The message for an edited cell under its column's `min`. `{min}` is the smallest value. */
|
|
586
|
+
minMessage: string;
|
|
476
587
|
/**
|
|
477
588
|
* Where filtering, sorting, and paging happen. `client` does them in the
|
|
478
589
|
* table, and `server` leaves them to your code.
|
|
@@ -502,6 +613,8 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
502
613
|
moveRowLabel: string;
|
|
503
614
|
/** The built-in pagination's name for the button that moves forward a page. */
|
|
504
615
|
nextLabel: string;
|
|
616
|
+
/** The message for an edited number cell that holds something other than a number. */
|
|
617
|
+
numberMessage: string;
|
|
505
618
|
/**
|
|
506
619
|
* The column order, as field names separated by spaces.
|
|
507
620
|
*
|
|
@@ -550,6 +663,8 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
550
663
|
set paginated(next: boolean);
|
|
551
664
|
/** The name of the built-in pagination's navigation landmark. */
|
|
552
665
|
paginationLabel: string;
|
|
666
|
+
/** The message for an edited cell that does not match its column's `pattern`. */
|
|
667
|
+
patternMessage: string;
|
|
553
668
|
/**
|
|
554
669
|
* What screen readers hear when a key or a click picks up a row, with
|
|
555
670
|
* `reorderable-rows`. `{name}` is the row's name.
|
|
@@ -569,6 +684,8 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
569
684
|
* row itself: set `rows` to the order `helix-reorder` carries.
|
|
570
685
|
*/
|
|
571
686
|
reorderableRows: boolean;
|
|
687
|
+
/** The message for an edited `required` cell left empty. */
|
|
688
|
+
requiredMessage: string;
|
|
572
689
|
/**
|
|
573
690
|
* What screen readers hear when a search leaves one row, where
|
|
574
691
|
* `results-label` should not say it. `{count}` is the count.
|
|
@@ -578,10 +695,10 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
578
695
|
*/
|
|
579
696
|
resultLabel?: string;
|
|
580
697
|
/**
|
|
581
|
-
* What screen readers hear when a search narrows the rows.
|
|
582
|
-
* many rows are left
|
|
583
|
-
*
|
|
584
|
-
* {#
|
|
698
|
+
* What screen readers hear when a search or a filter narrows the rows.
|
|
699
|
+
* `{count}` is how many rows are left and `{total}` how many there are,
|
|
700
|
+
* written in the locale, and each language writes the forms it has:
|
|
701
|
+
* `{count} z {total, plural, one {# wiersza} other {# wierszy}}`.
|
|
585
702
|
*/
|
|
586
703
|
resultsLabel: string;
|
|
587
704
|
/** The name of the heading over the row grips, with `reorderable-rows`. */
|
|
@@ -630,6 +747,10 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
630
747
|
* holds and reordering it under them is a mutation they did not ask for.
|
|
631
748
|
*/
|
|
632
749
|
rows: readonly DataRow[];
|
|
750
|
+
/** The words on the bar's button that saves the unsaved changes, with `batch-edits`. */
|
|
751
|
+
saveEditsLabel: string;
|
|
752
|
+
/** What a screen reader hears beside a cell that is saving. */
|
|
753
|
+
savingLabel: string;
|
|
633
754
|
/**
|
|
634
755
|
* Adds a column of checkboxes for selecting rows.
|
|
635
756
|
*
|
|
@@ -708,38 +829,50 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
708
829
|
* one that cannot be stale.
|
|
709
830
|
*/
|
|
710
831
|
total: number;
|
|
832
|
+
/** What the bar says, with `batch-edits`. `{count}` is how many changes are unsaved. */
|
|
833
|
+
unsavedLabel: string;
|
|
711
834
|
/** What screen readers hear when the table stops being sorted. */
|
|
712
835
|
unsortedLabel: string;
|
|
713
836
|
/**
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
*
|
|
717
|
-
* them; this says how many of the ones we hold get drawn. They are
|
|
718
|
-
* independent: a consumer fetching five thousand rows a chunk at a time wants
|
|
719
|
-
* `mode="server"` and this at once, and folding this into `mode` would be an
|
|
720
|
-
* API that forbids that combination for no reason.
|
|
837
|
+
* Everything a reader can change about how the rows are shown, as one value:
|
|
838
|
+
* the search in `query`, the column `filters`, the `sort`, the `columns`'
|
|
839
|
+
* order, hidden fields, pinned ends and widths, and the `pageSize`.
|
|
721
840
|
*
|
|
722
|
-
*
|
|
723
|
-
*
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
*
|
|
841
|
+
* It round-trips as JSON, so a page can keep it in a URL or in storage and
|
|
842
|
+
* set it back. A property only, being an object: `default-view` seeds it
|
|
843
|
+
* from JSON in markup. `sort`, `filter`,
|
|
844
|
+
* `order`, `page-size` and each column's `hidden` are parts of it, and
|
|
845
|
+
* setting one changes the view.
|
|
727
846
|
*
|
|
728
|
-
*
|
|
729
|
-
*
|
|
730
|
-
*
|
|
847
|
+
* A reader's change to any part fires `helix-before-view-change` with the
|
|
848
|
+
* whole view it would leave, before the event for that part. Refuse it to
|
|
849
|
+
* keep the view, fetch the rows from a server, and set `view`, `rows` and
|
|
850
|
+
* `total` yourself. `helix-view-change` follows a change nobody refused.
|
|
851
|
+
* Setting `view` fires neither.
|
|
731
852
|
*
|
|
732
|
-
*
|
|
733
|
-
*
|
|
734
|
-
*
|
|
853
|
+
* Filters on different columns all have to match, and a filter's values
|
|
854
|
+
* are any of. A filter on a field no column declares is left out, and a
|
|
855
|
+
* tree grid filters by its search alone.
|
|
735
856
|
*/
|
|
736
|
-
|
|
857
|
+
get view(): DataTableView;
|
|
858
|
+
set view(next: DataTableView | PartialView);
|
|
737
859
|
private sortState;
|
|
738
860
|
private filterState;
|
|
739
861
|
private pageState;
|
|
740
862
|
private pageSizeState;
|
|
741
863
|
private paginatedState;
|
|
742
864
|
private orderState;
|
|
865
|
+
private filtersState;
|
|
866
|
+
/** The cell open for an edit: its row, its field, what is typed, and the message a rule gave. */
|
|
867
|
+
private editing;
|
|
868
|
+
/** The edits not yet in `rows`: saving, or held unsaved under `batch-edits`, by row and field. */
|
|
869
|
+
private edits;
|
|
870
|
+
/** Whether the next update moves focus into the open cell's field. */
|
|
871
|
+
private editFocus;
|
|
872
|
+
private pinnedState;
|
|
873
|
+
private widthsState;
|
|
874
|
+
/** The rows that passed the filters last, kept against what they were filtered by. */
|
|
875
|
+
private passed;
|
|
743
876
|
private selectedState;
|
|
744
877
|
private expandedState;
|
|
745
878
|
/**
|
|
@@ -909,6 +1042,13 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
909
1042
|
* sort, which are by field, so showing it again puts it back where it was.
|
|
910
1043
|
*/
|
|
911
1044
|
private get shownColumns();
|
|
1045
|
+
/**
|
|
1046
|
+
* The columns with the pinned ones moved to their ends: those pinned to the
|
|
1047
|
+
* start first and those pinned to the end last, each keeping its order.
|
|
1048
|
+
*/
|
|
1049
|
+
private pinColumns;
|
|
1050
|
+
/** Which end a column is pinned to, if it is. */
|
|
1051
|
+
pinOf(field: string): PinEdge | undefined;
|
|
912
1052
|
/** The table's inline size as last measured, or undefined where nothing has measured it, as on a server. */
|
|
913
1053
|
private measuredInlineSize;
|
|
914
1054
|
/** The font sizes `em` and `rem` read against, taken with the size. */
|
|
@@ -997,7 +1137,7 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
997
1137
|
* would be this element filtering a page it was handed, which narrows one
|
|
998
1138
|
* screen and calls it a search.
|
|
999
1139
|
*/
|
|
1000
|
-
private get
|
|
1140
|
+
private get result();
|
|
1001
1141
|
/** How many pages the result makes, which is at least one even when empty. */
|
|
1002
1142
|
private get pages();
|
|
1003
1143
|
/**
|
|
@@ -1007,8 +1147,8 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
1007
1147
|
* Read it after you assign `rows` or `filter`, as the count beside a search
|
|
1008
1148
|
* field. A tree grid counts the rows open now.
|
|
1009
1149
|
*
|
|
1010
|
-
* Separate from `
|
|
1011
|
-
* asking `
|
|
1150
|
+
* Separate from `result` because `pages` needs it and `page` needs `pages`:
|
|
1151
|
+
* asking `result` for it would recurse through the clamp in `page`.
|
|
1012
1152
|
*/
|
|
1013
1153
|
get matched(): number;
|
|
1014
1154
|
/**
|
|
@@ -1084,6 +1224,14 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
1084
1224
|
private requestOrder;
|
|
1085
1225
|
/** Asks for a different set of selected rows. */
|
|
1086
1226
|
private requestSelected;
|
|
1227
|
+
/** Whether the `selection` slot takes the toolbar's place: rows are selected, and something is in it. */
|
|
1228
|
+
private get selecting();
|
|
1229
|
+
/**
|
|
1230
|
+
* Selects these rows by key, and no others, as a reader's choice does: it
|
|
1231
|
+
* asks with `helix-before-select`. An empty list clears the selection, which
|
|
1232
|
+
* Clear in a `SelectionBar` does. Returns whether the selection changed.
|
|
1233
|
+
*/
|
|
1234
|
+
selectRows(keys: readonly string[]): boolean;
|
|
1087
1235
|
/** The keys selected now. */
|
|
1088
1236
|
private get chosen();
|
|
1089
1237
|
/**
|
|
@@ -1167,6 +1315,74 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
1167
1315
|
* order and nothing on screen. A hidden column keeps its place among the rest.
|
|
1168
1316
|
*/
|
|
1169
1317
|
private moveColumn;
|
|
1318
|
+
/**
|
|
1319
|
+
* Draws only the rows in view, with empty space in place of the rest.
|
|
1320
|
+
*
|
|
1321
|
+
* **Not a `mode`.** `mode` says where the rows come from and who filtered
|
|
1322
|
+
* them; this says how many of the ones we hold get drawn. They are
|
|
1323
|
+
* independent: a consumer fetching five thousand rows a chunk at a time wants
|
|
1324
|
+
* `mode="server"` and this at once, and folding this into `mode` would be an
|
|
1325
|
+
* API that forbids that combination for no reason.
|
|
1326
|
+
*
|
|
1327
|
+
* **Composes with `paginated` rather than excluding it.** A window over a
|
|
1328
|
+
* page is coherent -- the page is the slice of the result, the window is the
|
|
1329
|
+
* part of that slice on screen -- and the arithmetic is the same either way,
|
|
1330
|
+
* so there is nothing to forbid. Together they suit a table paging at a
|
|
1331
|
+
* thousand rows, where the page is a reasonable fetch and a poor render.
|
|
1332
|
+
*
|
|
1333
|
+
* Off by default. Windowing costs a scroll listener, a measurement per row
|
|
1334
|
+
* drawn, and a `block-size` on the scrolling box, and a table of twenty rows
|
|
1335
|
+
* should pay none of them.
|
|
1336
|
+
*
|
|
1337
|
+
* While windowed, the `table` part scrolls on this tier: it carries
|
|
1338
|
+
* `data-scroller`, and `core` ships `[data-scroller] { overflow: auto }` into
|
|
1339
|
+
* every shadow root. You still need to give it a block size.
|
|
1340
|
+
*/
|
|
1341
|
+
windowed: boolean;
|
|
1342
|
+
/**
|
|
1343
|
+
* The rows and columns an export holds, before they are written: the
|
|
1344
|
+
* headings, the fields, and each row's values.
|
|
1345
|
+
*
|
|
1346
|
+
* - `rows`: `filtered`, the rows that pass the search and the filters, in
|
|
1347
|
+
* order, by default; `selected`, the selected rows; or `all`.
|
|
1348
|
+
* - `columns`: `visible`, the columns not hidden, by default; or `all`. A
|
|
1349
|
+
* column left out at a narrow width is kept, so a file is the same at any
|
|
1350
|
+
* width. A column with no field has no value and is left out.
|
|
1351
|
+
* - `values`: `shown`, what a cell's `cell` reader gives where it is text or
|
|
1352
|
+
* a number, by default; or `raw`, the field's value in the row.
|
|
1353
|
+
*
|
|
1354
|
+
* In `server` mode the filtered rows are the page the table holds.
|
|
1355
|
+
*/
|
|
1356
|
+
exportData(options?: ExportOptions): ExportData;
|
|
1357
|
+
/**
|
|
1358
|
+
* Writes an export as text: CSV by default, or TSV or JSON with `format`.
|
|
1359
|
+
* See `exportData` for the rows, columns and values. XLSX is a file and not
|
|
1360
|
+
* text, which `download` writes.
|
|
1361
|
+
*/
|
|
1362
|
+
exportRows(options?: ExportOptions): string;
|
|
1363
|
+
/**
|
|
1364
|
+
* Saves an export as a file, as a reader's Export does.
|
|
1365
|
+
*
|
|
1366
|
+
* Asks first with `helix-before-export`, which carries the choices, the
|
|
1367
|
+
* name of the file and the view. Cancel it to make the file on a server, as
|
|
1368
|
+
* a table in `server` mode has to. Then the browser saves the file and
|
|
1369
|
+
* `helix-export` follows. `filename` defaults to the table's `label` and
|
|
1370
|
+
* the format's extension. XLSX needs `xlsx`. Returns whether the file was
|
|
1371
|
+
* made here.
|
|
1372
|
+
*/
|
|
1373
|
+
download(options?: ExportOptions & {
|
|
1374
|
+
filename?: string;
|
|
1375
|
+
}): boolean;
|
|
1376
|
+
/** The selected rows, in the order of the result. */
|
|
1377
|
+
private selectedRows;
|
|
1378
|
+
/**
|
|
1379
|
+
* Copies to the clipboard: the selected rows as TSV under their headings,
|
|
1380
|
+
* where some are selected, and otherwise the value in the cell that holds
|
|
1381
|
+
* focus. Control or Command with C in the grid does this.
|
|
1382
|
+
*/
|
|
1383
|
+
private copyCells;
|
|
1384
|
+
/** What a cell shows as text, where its reader gives text, and its field's value otherwise. */
|
|
1385
|
+
private shownOf;
|
|
1170
1386
|
/**
|
|
1171
1387
|
* Returns the result as CSV: every row that matches the filter, in the order
|
|
1172
1388
|
* and columns shown, under a line of the column headings.
|
|
@@ -1189,6 +1405,77 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
1189
1405
|
private requestFilter;
|
|
1190
1406
|
/** Asks for a different page. */
|
|
1191
1407
|
private requestPage;
|
|
1408
|
+
/**
|
|
1409
|
+
* A function that writes an XLSX file, which `@fusion.dev/helix/data-table/xlsx`
|
|
1410
|
+
* exports as `toXlsx`. Set it to offer XLSX in `download` and in a bound
|
|
1411
|
+
* `TableExport`. It is its own entry, so a table that never writes a
|
|
1412
|
+
* spreadsheet does not carry the writer.
|
|
1413
|
+
*/
|
|
1414
|
+
xlsx: ((data: ExportData) => Uint8Array) | undefined;
|
|
1415
|
+
/**
|
|
1416
|
+
* Asks for a different view, as a reader's change does: `helix-before-view-change`,
|
|
1417
|
+
* which can refuse it, then `helix-view-change`. The parts `next` names
|
|
1418
|
+
* replace those parts, whole, and the rest stay, so a preset can name only
|
|
1419
|
+
* its filters. Returns whether the view changed.
|
|
1420
|
+
*/
|
|
1421
|
+
requestView(next: PartialView): boolean;
|
|
1422
|
+
/** Whether `default-view` has been put in force, which it is once. */
|
|
1423
|
+
private viewSeeded;
|
|
1424
|
+
/** The hidden fields a view named before the columns were known, applied once they are. */
|
|
1425
|
+
private hiddenWanted;
|
|
1426
|
+
/** Puts every part of a view in force, firing nothing. */
|
|
1427
|
+
private applyView;
|
|
1428
|
+
/** Hides and shows the columns as the view asks, once they are known. */
|
|
1429
|
+
private hideWanted;
|
|
1430
|
+
/** Asks whether the view may become `next`. */
|
|
1431
|
+
private askView;
|
|
1432
|
+
/** Says the view changed. */
|
|
1433
|
+
private toldView;
|
|
1434
|
+
/** What narrows the rows: the search and the filters, as one text to tell a change by. */
|
|
1435
|
+
private get narrowedBy();
|
|
1436
|
+
/**
|
|
1437
|
+
* Every row before the search and the filters narrow them: the rows the
|
|
1438
|
+
* table holds, or `total` in `server` mode.
|
|
1439
|
+
*/
|
|
1440
|
+
get everyRowCount(): number;
|
|
1441
|
+
/** The fields of the columns left out at the table's width, for their `min-table-width`. */
|
|
1442
|
+
get droppedFields(): string[];
|
|
1443
|
+
/**
|
|
1444
|
+
* How many rows a view would show, counted from the rows the table holds:
|
|
1445
|
+
* the view with the parts of `part` laid over it, the way `requestView` lays
|
|
1446
|
+
* them. Quick Filters counts each preset with it. Nothing in `server` mode,
|
|
1447
|
+
* where the table holds one page, and in a tree grid.
|
|
1448
|
+
*/
|
|
1449
|
+
countView(part: PartialView): number | undefined;
|
|
1450
|
+
/** Every row before the search and the filters narrow them, for "3 of 40 rows". */
|
|
1451
|
+
private get everyRow();
|
|
1452
|
+
/** The columns a search reads, where some are marked `searchable`. */
|
|
1453
|
+
private get searchedColumns();
|
|
1454
|
+
/**
|
|
1455
|
+
* The query the ordering helpers search with: the search itself, or nothing
|
|
1456
|
+
* where `searchable` columns were searched already.
|
|
1457
|
+
*/
|
|
1458
|
+
private get query();
|
|
1459
|
+
/**
|
|
1460
|
+
* The comparisons a column's filter offers, for its `type`. Your own filter
|
|
1461
|
+
* picker can list them.
|
|
1462
|
+
*/
|
|
1463
|
+
operatorsOf(field: string): readonly FilterOperatorInfo[];
|
|
1464
|
+
/**
|
|
1465
|
+
* Every value a column holds, with how many rows hold each, most first.
|
|
1466
|
+
*
|
|
1467
|
+
* Counted over the rows that pass the search and every other column's
|
|
1468
|
+
* filter, so each count is how many rows choosing that value would show. In
|
|
1469
|
+
* `server` mode it counts the rows the table holds.
|
|
1470
|
+
*/
|
|
1471
|
+
facetsOf(field: string): Facet[];
|
|
1472
|
+
/** What the filters need of each column with a field, by field. */
|
|
1473
|
+
private get filterColumns();
|
|
1474
|
+
/**
|
|
1475
|
+
* The rows that pass the column filters, which the search and the sort
|
|
1476
|
+
* then work on. In `server` mode the rows are already the result.
|
|
1477
|
+
*/
|
|
1478
|
+
private get source();
|
|
1192
1479
|
/**
|
|
1193
1480
|
* Filters the rows by a query from your own search field.
|
|
1194
1481
|
*
|
|
@@ -1319,6 +1606,85 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
1319
1606
|
* same value to the same three.
|
|
1320
1607
|
*/
|
|
1321
1608
|
private renderCell;
|
|
1609
|
+
/**
|
|
1610
|
+
* Whether the column draws its field at rest: it is the cell, as inline text
|
|
1611
|
+
* a click turns into the field's active look. A column with its own `cell`
|
|
1612
|
+
* reader or its own `editor` draws what you gave it, and opens the field when
|
|
1613
|
+
* a reader starts an edit. A boolean draws its checkbox either way.
|
|
1614
|
+
*/
|
|
1615
|
+
private hasField;
|
|
1616
|
+
/** Every value an enum column holds, most common first, counted once for every cell that asks. */
|
|
1617
|
+
private distinctValues;
|
|
1618
|
+
private distinct;
|
|
1619
|
+
/** Whether a reader may edit this column's cell in this row. Not in a tree grid. */
|
|
1620
|
+
private canEdit;
|
|
1621
|
+
/** A row with the edits not yet in `rows` laid over it, as its cells show it. */
|
|
1622
|
+
private shownRow;
|
|
1623
|
+
/** A boolean cell, which toggles in place: a checkbox a press or Space flips. */
|
|
1624
|
+
private renderBoolean;
|
|
1625
|
+
/**
|
|
1626
|
+
* The field for the open cell: the column's own `editor`, or the field its
|
|
1627
|
+
* `type` picks, with what is typed so far and the message a rule gave.
|
|
1628
|
+
*/
|
|
1629
|
+
protected renderEditor(column: HelixHeadlessTableColumn, row: DataRow, message: string): unknown;
|
|
1630
|
+
/** The row key a cell event carries. */
|
|
1631
|
+
private editKey;
|
|
1632
|
+
/**
|
|
1633
|
+
* Opens a cell for an edit, as Enter, F2, a double click or typing does.
|
|
1634
|
+
* Asks first with `helix-before-cell-edit`. `typed` starts the field with
|
|
1635
|
+
* those characters in place of the value. Returns whether the cell opened.
|
|
1636
|
+
*/
|
|
1637
|
+
editCell(row: DataRow, field: string, typed?: string): boolean;
|
|
1638
|
+
/**
|
|
1639
|
+
* Opens the cell a reader reached with a press or a key, as `editCell` does
|
|
1640
|
+
* for a call. A cell already open is left as it is, and another open cell is
|
|
1641
|
+
* saved first, as leaving it saves it. Returns whether the cell is open.
|
|
1642
|
+
*/
|
|
1643
|
+
private beginEdit;
|
|
1644
|
+
/** Closes the open cell and puts its old value back, as Escape does. */
|
|
1645
|
+
cancelEdit(): void;
|
|
1646
|
+
/** Moves the grid's tab stop to the cell of a row and a field, by some rows and columns. */
|
|
1647
|
+
private focusCell;
|
|
1648
|
+
/** The words for the rule a value broke. */
|
|
1649
|
+
private problemSaid;
|
|
1650
|
+
/** Sets one edit's state for a row and field, or takes it away with `undefined`. */
|
|
1651
|
+
private markEdit;
|
|
1652
|
+
/**
|
|
1653
|
+
* Saves the open cell, as Enter, Tab or leaving it does, and moves the tab
|
|
1654
|
+
* stop by `rows` and `columns`. Checks `required`, `min`, `max`, `pattern`
|
|
1655
|
+
* and `validate`, asks with `helix-before-cell-commit`, waits on any check
|
|
1656
|
+
* its listener passed to `waitUntil`, then writes the value into a copy of
|
|
1657
|
+
* the row in `rows` and fires `helix-cell-commit`. Under `batch-edits` the
|
|
1658
|
+
* value is held as an unsaved change. Returns whether the value was saved.
|
|
1659
|
+
*/
|
|
1660
|
+
commitEdit(rows?: number, columns?: number, refocus?: boolean): Promise<boolean>;
|
|
1661
|
+
/** Writes a saved value into a copy of its row, and says so. */
|
|
1662
|
+
private writeEdit;
|
|
1663
|
+
/** Flips a boolean cell, asking with `helix-before-cell-commit` as an edit does. */
|
|
1664
|
+
private toggleCell;
|
|
1665
|
+
/** How many changes are held unsaved, under `batch-edits`. */
|
|
1666
|
+
get unsavedCount(): number;
|
|
1667
|
+
/** Writes every unsaved change into `rows`, as the bar's Save does, under `batch-edits`. */
|
|
1668
|
+
saveEdits(): void;
|
|
1669
|
+
/** Drops every unsaved change, as the bar's Discard does, under `batch-edits`. */
|
|
1670
|
+
discardEdits(): void;
|
|
1671
|
+
/** The bar that saves or discards every unsaved change, under `batch-edits`. */
|
|
1672
|
+
private renderEdits;
|
|
1673
|
+
/** The keys of an open cell's field: Enter and Tab save and move, Escape puts the value back. */
|
|
1674
|
+
private handleEditKey;
|
|
1675
|
+
/** The keys on an editable cell that open it, or flip a boolean. */
|
|
1676
|
+
private handleEditableKey;
|
|
1677
|
+
/** A double click on an editable cell opens it, and a single click does under `edit-on="click"`. */
|
|
1678
|
+
private readonly handleDoubleClick;
|
|
1679
|
+
private readonly handleEditClick;
|
|
1680
|
+
/** Opens the editable cell a press landed on, unless it landed on a control inside the cell. */
|
|
1681
|
+
private openFromPress;
|
|
1682
|
+
/** Focus leaving an open cell saves it, as leaving a spreadsheet's cell does. */
|
|
1683
|
+
private readonly handleEditFocusOut;
|
|
1684
|
+
/** The cell open for an edit, once it is drawn. */
|
|
1685
|
+
private openCell;
|
|
1686
|
+
/** Puts focus in the open cell's field once it is drawn. */
|
|
1687
|
+
private focusEditor;
|
|
1322
1688
|
/**
|
|
1323
1689
|
* The mark a pointer opens or closes a row of a tree grid by.
|
|
1324
1690
|
*
|
|
@@ -1428,6 +1794,20 @@ export declare class HelixHeadlessDataTable extends HelixHeadlessDataTable_base
|
|
|
1428
1794
|
/** Watches the table's own children, which the manual slots need to be told about. */
|
|
1429
1795
|
private arrivals;
|
|
1430
1796
|
disconnectedCallback(): void;
|
|
1797
|
+
/** How far each pinned column stays from its end of the row, by field, as last measured. */
|
|
1798
|
+
private pinOffsets;
|
|
1799
|
+
/**
|
|
1800
|
+
* Measures the pinned columns and works out how far each stays from its end
|
|
1801
|
+
* of the row: the width of the pinned columns before it on that end. Draws
|
|
1802
|
+
* again only when an offset moved, so it settles.
|
|
1803
|
+
*/
|
|
1804
|
+
private placePins;
|
|
1805
|
+
/**
|
|
1806
|
+
* Paints the search where it matches in the cells it reads, with the Custom
|
|
1807
|
+
* Highlight API, as Find does. Nothing is inserted into a cell, so a cell
|
|
1808
|
+
* your template drew comes back as you wrote it.
|
|
1809
|
+
*/
|
|
1810
|
+
private markSearch;
|
|
1431
1811
|
/**
|
|
1432
1812
|
* Notes whether Shift is held, before the press reaches a checkbox, whose
|
|
1433
1813
|
* request carries only the state it asks for.
|