@svgrid/grid 3.0.5 → 3.0.7
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/README.md +28 -7
- package/dist/GridMenus.svelte +34 -4
- package/dist/SvGrid.controller.svelte.d.ts +23 -3
- package/dist/SvGrid.controller.svelte.js +235 -54
- package/dist/SvGrid.css +143 -7
- package/dist/SvGrid.helpers.js +2 -4
- package/dist/SvGrid.svelte +223 -38
- package/dist/SvGrid.types.d.ts +77 -4
- package/dist/SvGridDropdown.svelte +20 -0
- package/dist/SvGridDropdown.svelte.d.ts +12 -0
- package/dist/SvModal.svelte +22 -0
- package/dist/SvModal.svelte.d.ts +7 -0
- package/dist/a11y/dismissable.d.ts +10 -0
- package/dist/a11y/dismissable.js +24 -2
- package/dist/build-api.js +81 -31
- package/dist/cdn/{GridMenus-CID62rlI.js → GridMenus-BgUS-W3o.js} +151 -142
- package/dist/cdn/GridMenus-CcwU8I4t.js +644 -0
- package/dist/cdn/{SvChartMenu-FBSMINA6.js → SvChartMenu-BFSTpvB-.js} +1 -1
- package/dist/cdn/{SvChartMenu-Bl6PBbkT.js → SvChartMenu-BZ1Iwv0y.js} +1 -1
- package/dist/cdn/{SvDateTimePicker-DQwt4UAs.js → SvDateTimePicker-D9u_cOf8.js} +1 -1
- package/dist/cdn/{SvDateTimePicker-vNU6bZ-q.js → SvDateTimePicker-s_6IUpI7.js} +1 -1
- package/dist/cdn/{SvGridCellEditor-B1p-vCK5.js → SvGridCellEditor-9yz-SbdZ.js} +2 -2
- package/dist/cdn/{SvGridCellEditor-D_0q4xAu.js → SvGridCellEditor-D7-ql1Hd.js} +2 -2
- package/dist/cdn/{SvGridChart-C3EWAZaM.js → SvGridChart-DMUOFxOe.js} +4 -4
- package/dist/cdn/{SvGridChart-DzLkSwCH.js → SvGridChart-N7ik0oWy.js} +4 -4
- package/dist/cdn/{SvGridChartBuilder-CfII62sZ.js → SvGridChartBuilder-CB_Jnm2k.js} +4 -4
- package/dist/cdn/{SvGridChartBuilder-BE2T1ykB.js → SvGridChartBuilder-Ca7gF8ZK.js} +4 -4
- package/dist/cdn/{SvGridChartPanel-xf4sWVTo.js → SvGridChartPanel-9GOJRHP7.js} +5 -5
- package/dist/cdn/{SvGridChartPanel-CCX5_Wgd.js → SvGridChartPanel-Dl-FujN8.js} +5 -5
- package/dist/cdn/{SvGridChartView-CfuXmY5I.js → SvGridChartView-B1LFgoPP.js} +2 -2
- package/dist/cdn/{SvGridChartView-DYwabQWj.js → SvGridChartView-By3n7DGZ.js} +2 -2
- package/dist/cdn/{SvGridDropdown-D0VdjeR8.js → SvGridDropdown-BWeM3lMe.js} +46 -46
- package/dist/cdn/{SvGridDropdown-D13MtJ2j.js → SvGridDropdown-CJ6QqTxu.js} +67 -67
- package/dist/cdn/{SvModal-CIZWCcad.js → SvModal-ClxGmpAc.js} +187 -186
- package/dist/cdn/{SvModal-BAE-pjZX.js → SvModal-DhB_VMFR.js} +148 -147
- package/dist/cdn/{cell-formatting-C2Hf5gqd.js → cell-formatting-Mnv84zoE.js} +28 -6
- package/dist/cdn/{chart-Dz7SqMXH.js → chart-By7h2Guv.js} +1 -1
- package/dist/cdn/{chart-panel-messages-CUbf2R4i.js → chart-panel-messages-BC-tOgFY.js} +1 -1
- package/dist/cdn/{chart-panel-messages-CmNrMdsr.js → chart-panel-messages-DUaXr-sb.js} +1 -1
- package/dist/cdn/{chart-summary-BJW_tg_X.js → chart-summary-BDtrNEiA.js} +1 -1
- package/dist/cdn/{chart-trend-CaN9mDEV.js → chart-trend-C1aOAPBZ.js} +1 -1
- package/dist/cdn/{dismissable-DAHetSNk.js → dismissable-Brc4EZU1.js} +5 -1
- package/dist/cdn/{editor-registry-BhgE3S84.js → editor-registry-BVeHvlZR.js} +49 -50
- package/dist/cdn/{export-format-CUDLy2yn.js → export-format-y1wdyCcv.js} +93 -97
- package/dist/cdn/{row-resize-niQCp040.js → row-resize-DtOS1KG6.js} +41 -32
- package/dist/cdn/{server-block-cache-CGoWz-87.js → server-block-cache-DIqb3VZn.js} +4 -0
- package/dist/cdn/{src-jcFMkBnN.js → src-25JmJ_7g.js} +4768 -4149
- package/dist/cdn/{src-Bklofsad.js → src-kE9B98r6.js} +4796 -4177
- package/dist/cdn/svgrid.js +18 -18
- package/dist/cdn/svgrid.svelte-external.js +18 -18
- package/dist/cdn/{validate-C7Rn_Bns.js → validate-AZoD8BoR.js} +6 -2
- package/dist/cell-formatting.d.ts +9 -0
- package/dist/cell-formatting.js +52 -1
- package/dist/cell-render.js +25 -6
- package/dist/clipboard.d.ts +2 -2
- package/dist/clipboard.js +72 -23
- package/dist/columns.js +7 -2
- package/dist/conditional-formatting.d.ts +2 -0
- package/dist/conditional-formatting.js +2 -0
- package/dist/core.d.ts +22 -6
- package/dist/core.js +478 -40
- package/dist/editing.js +24 -0
- package/dist/export-format.d.ts +8 -0
- package/dist/export-format.js +23 -16
- package/dist/grid-messages.d.ts +4 -0
- package/dist/grid-messages.js +4 -0
- package/dist/headless.d.ts +5 -0
- package/dist/headless.js +12 -0
- package/dist/history.d.ts +21 -0
- package/dist/history.js +34 -4
- package/dist/index.d.ts +1 -1
- package/dist/keyboard-handlers.js +24 -1
- package/dist/keyboard.js +4 -0
- package/dist/row-drag-touch.d.ts +1 -1
- package/dist/row-drag.js +35 -1
- package/dist/row-model.d.ts +6 -0
- package/dist/row-resize.js +22 -1
- package/dist/selection.js +1 -1
- package/dist/server-block-cache.d.ts +5 -0
- package/dist/server-block-cache.js +8 -0
- package/dist/server-data-source.d.ts +35 -3
- package/dist/server-data-source.js +11 -2
- package/dist/server.d.ts +1 -1
- package/dist/sparkline.js +7 -5
- package/dist/svgrid-wrapper.types.d.ts +33 -0
- package/dist/validate.js +9 -1
- package/dist/virtualization/column-virtualizer.d.ts +1 -0
- package/dist/virtualization/svelte-virtualizer.svelte.d.ts +1 -0
- package/dist/virtualization/svelte-virtualizer.svelte.js +1 -0
- package/dist/virtualization/virtualizer.d.ts +3 -0
- package/dist/virtualization/virtualizer.js +14 -1
- package/package.json +6 -1
- package/src/GridMenus.svelte +34 -4
- package/src/SvGrid.controller.svelte.ts +236 -57
- package/src/SvGrid.css +143 -7
- package/src/SvGrid.helpers.ts +2 -4
- package/src/SvGrid.svelte +223 -38
- package/src/SvGrid.types.ts +77 -4
- package/src/SvGridDropdown.svelte +20 -0
- package/src/SvModal.svelte +22 -0
- package/src/SvModal.test.ts +30 -1
- package/src/a11y/dismissable.test.ts +10 -1
- package/src/a11y/dismissable.ts +22 -2
- package/src/build-api.ts +85 -27
- package/src/cell-formatting.test.ts +17 -0
- package/src/cell-formatting.ts +49 -1
- package/src/cell-render.test.ts +24 -2
- package/src/cell-render.ts +24 -8
- package/src/clipboard.test.ts +107 -0
- package/src/clipboard.ts +62 -23
- package/src/columns.test.ts +4 -4
- package/src/columns.ts +7 -2
- package/src/conditional-formatting.test.ts +8 -0
- package/src/conditional-formatting.ts +3 -0
- package/src/core.sort.test.ts +86 -0
- package/src/core.tick-repair.test.ts +287 -0
- package/src/core.ts +478 -40
- package/src/editing.test.ts +52 -0
- package/src/editing.ts +25 -0
- package/src/export-dates.test.ts +114 -0
- package/src/export-format.ts +26 -14
- package/src/grid-messages.test.ts +7 -0
- package/src/grid-messages.ts +10 -0
- package/src/headless.ts +24 -0
- package/src/history.test.ts +49 -1
- package/src/history.ts +48 -2
- package/src/index.ts +2 -0
- package/src/keyboard-handlers.coverage.test.ts +65 -0
- package/src/keyboard-handlers.ts +26 -1
- package/src/keyboard.ts +3 -0
- package/src/row-drag-touch.ts +2 -2
- package/src/row-drag.test.ts +51 -0
- package/src/row-drag.ts +35 -2
- package/src/row-model.ts +6 -0
- package/src/row-resize.ts +24 -1
- package/src/selection.ts +1 -1
- package/src/server-block-cache.test.ts +27 -0
- package/src/server-block-cache.ts +13 -0
- package/src/server-data-source.infinite.test.ts +62 -0
- package/src/server-data-source.test.ts +19 -0
- package/src/server-data-source.ts +48 -4
- package/src/server.ts +2 -0
- package/src/sparkline.test.ts +7 -0
- package/src/sparkline.ts +6 -4
- package/src/svgrid-wrapper.types.ts +32 -0
- package/src/svgrid.api.test.ts +21 -0
- package/src/svgrid.charting.test.ts +12 -4
- package/src/svgrid.context-menu.test.ts +12 -0
- package/src/svgrid.data-push.svelte.test.ts +94 -0
- package/src/svgrid.detail-rows.svelte.test.ts +187 -0
- package/src/svgrid.filter-menu-scroll.test.ts +9 -0
- package/src/svgrid.gantt-seam.test.ts +1 -1
- package/src/svgrid.live-update-paths.svelte.test.ts +186 -0
- package/src/svgrid.menu-scroll-close.test.ts +10 -0
- package/src/svgrid.row-model-seam.svelte.test.ts +16 -0
- package/src/svgrid.row-pinning.test.ts +15 -1
- package/src/svgrid.selection-bar-seam.test.ts +1 -1
- package/src/svgrid.sticky-groups.svelte.test.ts +145 -0
- package/src/svgrid.upsell-license.test.ts +1 -1
- package/src/test-setup.ts +12 -0
- package/src/transaction.test.ts +58 -0
- package/src/validate.ts +7 -1
- package/src/virtualization/svelte-virtualizer.svelte.ts +1 -0
- package/src/virtualization/virtualizer.test.ts +44 -0
- package/src/virtualization/virtualizer.ts +13 -1
- package/dist/cdn/GridMenus-DLL-qZeu.js +0 -635
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<p align="center">
|
|
18
18
|
<a href="https://svgrid.com">Website</a> ·
|
|
19
19
|
<a href="https://svgrid.com/docs/">Docs</a> ·
|
|
20
|
-
<a href="https://svgrid.com/demos/">
|
|
20
|
+
<a href="https://svgrid.com/demos/">400+ Demos</a> ·
|
|
21
21
|
<a href="https://svgrid.com/pricing/">Pricing</a> ·
|
|
22
22
|
<a href="https://svgrid.com/roadmap/">Roadmap</a>
|
|
23
23
|
</p>
|
|
@@ -78,7 +78,7 @@ all wire up the moment you turn on the matching prop.
|
|
|
78
78
|
|---|---|
|
|
79
79
|
| **License** | MIT, free for commercial use |
|
|
80
80
|
| **Requires** | `svelte@^5` (peer dependency), Node 16+ |
|
|
81
|
-
| **Bundle (gzip)** | ~2 KB headless core, ~
|
|
81
|
+
| **Bundle (gzip)** | ~2.7 KB headless core, ~98 KB full `<SvGrid>` + ~10 KB CSS; charts, date pickers, menus and export load as separate chunks on first use |
|
|
82
82
|
| **Types** | Bundled, no `@types/` package needed |
|
|
83
83
|
| **Module format** | ESM, plus a CDN build at `@svgrid/grid/cdn` |
|
|
84
84
|
| **SSR** | Works under SvelteKit SSR and static builds |
|
|
@@ -90,7 +90,10 @@ all wire up the moment you turn on the matching prop.
|
|
|
90
90
|
- **Filtering** - Excel-style filter menu, inline filter row, set / value-list filter, locale-aware matching, between operators.
|
|
91
91
|
- **Editing** - 15 built-in `editorType`s (text, number, date, datetime, time, select, rich-select with typeahead, autocomplete, textarea, color, checkbox, list, chips, rating, password), plus `date-native` / `datetime-native` / `time-native` to opt out of the rich pickers, and a `cellEditor` snippet slot for anything custom.
|
|
92
92
|
- **Selection** - cell-range click+drag and Shift+arrows, copy/paste as TSV, Excel-style fill handle, row selection.
|
|
93
|
-
- **Views** - row grouping with aggregation, tree data, master/detail, full-width detail rows,
|
|
93
|
+
- **Views** - row grouping with aggregation, tree data, master/detail, full-width detail rows, and a
|
|
94
|
+
spreadsheet layout mode (merged cells, per-cell borders). Formula cells here go through an adapter
|
|
95
|
+
seam you point at your own `hyperformula` install; the built-in formula engine and `<SvSheet>` are
|
|
96
|
+
in the Suite edition of `@svgrid/enterprise`.
|
|
94
97
|
- **Layout** - row + column pinning, sticky header + first column, header drag-to-reorder, autosize, keyboard-accessible column sizing, zebra rows, responsive mode.
|
|
95
98
|
- **Data operations** - find in grid (Ctrl+F), undo / redo, transaction API, optimistic updates, server-side data with sort / filter / paging / infinite-scroll pushdown (lazy grouping, tree, pivot and transactions on the server are in `@svgrid/enterprise`).
|
|
96
99
|
- **AI helpers, free** - natural-language filter, smart fill, summarize, classify, anomaly detection, and "chart this". Model-agnostic: register one provider, nothing is bundled.
|
|
@@ -131,7 +134,7 @@ import {
|
|
|
131
134
|
```
|
|
132
135
|
|
|
133
136
|
- **Headless** - drive `createSvGrid` and the row-model factories, render your own markup.
|
|
134
|
-
`getGrid*A11yProps` helpers keep custom markup accessible. About 2 KB gzipped.
|
|
137
|
+
`getGrid*A11yProps` helpers keep custom markup accessible. About 2.7 KB gzipped.
|
|
135
138
|
- **Render-ready** - `<SvGrid />` is a complete, accessible, themeable grid you configure with props.
|
|
136
139
|
|
|
137
140
|
Compatibility aliases are provided for the framework-neutral names: `createGrid`, `createGridState`,
|
|
@@ -141,7 +144,7 @@ Compatibility aliases are provided for the framework-neutral names: `createGrid`
|
|
|
141
144
|
|
|
142
145
|
SvGrid publishes an [MCP server](https://www.npmjs.com/package/@svgrid/mcp) plus
|
|
143
146
|
[llms.txt](https://svgrid.com/llms.txt) and [llms-full.txt](https://svgrid.com/llms-full.txt), so Claude,
|
|
144
|
-
Cursor, and Zed answer with accurate, version-pinned APIs and all
|
|
147
|
+
Cursor, and Zed answer with accurate, version-pinned APIs and all 400+ demo sources as context rather
|
|
145
148
|
than hallucinated methods.
|
|
146
149
|
|
|
147
150
|
```bash
|
|
@@ -158,12 +161,30 @@ editing, virtualization, **server-side data** (paging, infinite block scroll, so
|
|
|
158
161
|
**AI helpers** all ship in the free package. The optional [`@svgrid/enterprise`](https://www.npmjs.com/package/@svgrid/enterprise) pack layers
|
|
159
162
|
on the export- and analytics-heavy features teams tend to need last:
|
|
160
163
|
|
|
164
|
+
The pack sells in two editions, both covering unlimited production apps.
|
|
165
|
+
|
|
166
|
+
**Grid edition:**
|
|
167
|
+
|
|
161
168
|
- **Excel / PDF / CSV / TSV / HTML export** plus paginated print.
|
|
162
169
|
- **Excel / CSV / TSV / JSON import** with auto-mapping and per-row validation.
|
|
163
170
|
- **Pivot tables** with a drag-and-drop pivot Designer.
|
|
164
171
|
- **Kanban board, scheduler / calendar and Gantt renderers** for the `board`, `scheduler` and `gantt` props.
|
|
172
|
+
- **Server-side row model** for lazy grouping, tree, pivot and transactions.
|
|
173
|
+
|
|
174
|
+
**Suite edition** adds everything above plus:
|
|
175
|
+
|
|
176
|
+
- **A real spreadsheet.** `<SvSheet>` and the `<sv-sheet>` element over a built-in formula engine
|
|
177
|
+
with cross-sheet references, named ranges, dynamic arrays and spill, iterative calculation, and
|
|
178
|
+
dependency-graph recalculation. No `hyperformula` needed, and no runtime dependency.
|
|
179
|
+
- **Spreadsheet file formats.** Read and write `.xlsx`, `.xls`, `.ods` and `.csv`, with formulas,
|
|
180
|
+
merges, frozen panes, named ranges and charts surviving the round trip.
|
|
181
|
+
- **SvGrid Studio.** The designer, the code generator and the SQL data sources.
|
|
182
|
+
|
|
183
|
+
Both editions come with a 30-day evaluation period: every feature runs without a key, and under a
|
|
184
|
+
key that does not cover it, with a watermark and a console message about the Enterprise package. `licenseCovers('spreadsheet')` tells you which
|
|
185
|
+
side of the line the current key is on, if you would rather hide an entry point than let it nudge.
|
|
165
186
|
|
|
166
|
-
OSS projects receive
|
|
187
|
+
OSS projects receive a Suite key free. See [Pricing](https://svgrid.com/pricing/).
|
|
167
188
|
|
|
168
189
|
## Also in the box
|
|
169
190
|
|
|
@@ -203,7 +224,7 @@ Full detail: [SvGrid vs AG Grid vs TanStack Table](https://svgrid.com/docs/help/
|
|
|
203
224
|
## Documentation
|
|
204
225
|
|
|
205
226
|
- [Getting started](https://svgrid.com/docs/getting-started/) - end-to-end walkthrough.
|
|
206
|
-
- [
|
|
227
|
+
- [400+ live demos](https://svgrid.com/demos/) - copy-paste recipes for every feature.
|
|
207
228
|
- [Why headless?](https://svgrid.com/docs/why-headless/) - when to compose vs. drop in.
|
|
208
229
|
- [Theming and Tailwind](https://svgrid.com/docs/help/tailwind/) - re-skin via `--sg-*` tokens and dark mode.
|
|
209
230
|
- [Accessibility](https://svgrid.com/docs/help/accessibility/) - the WAI-ARIA grid pattern as implemented.
|
package/dist/GridMenus.svelte
CHANGED
|
@@ -214,6 +214,19 @@
|
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
+
/**
|
|
218
|
+
* Whether a column's active filter operator is one of the set operators,
|
|
219
|
+
* read at event time from component state: the condition input's focus
|
|
220
|
+
* and blur handlers cannot depend on a template `@const`, because blur
|
|
221
|
+
* also fires while the popover is being torn down, after that const's
|
|
222
|
+
* effect is gone.
|
|
223
|
+
*/
|
|
224
|
+
function isSetOperatorFor(colId: string): boolean {
|
|
225
|
+
const column = allColumns.find((c) => c.id === colId);
|
|
226
|
+
const op = filterMenuValues[colId]?.operator ?? defaultOperatorFor(column);
|
|
227
|
+
return op === "in" || op === "notIn";
|
|
228
|
+
}
|
|
229
|
+
|
|
217
230
|
/** Enter anywhere in the panel means "done" - filtering is already live. */
|
|
218
231
|
function onFilterPanelKeydown(event: KeyboardEvent) {
|
|
219
232
|
if (event.key !== "Enter" || event.shiftKey) return;
|
|
@@ -286,8 +299,23 @@
|
|
|
286
299
|
const saveComment = $derived(ctrl.saveComment);
|
|
287
300
|
const removeComment = $derived(ctrl.removeComment);
|
|
288
301
|
const closeCommentEditor = $derived(ctrl.closeCommentEditor);
|
|
302
|
+
|
|
303
|
+
function onContextMenuKeydown(event: KeyboardEvent) {
|
|
304
|
+
// Escape closes the context menu, the way every spreadsheet and desktop
|
|
305
|
+
// app does. The backdrop closes it on a click, but a keyboard user who
|
|
306
|
+
// opened it (Shift+F10, the Menu key) otherwise has no way out, and the
|
|
307
|
+
// menu sits over the sheet swallowing every other key. Handled at the
|
|
308
|
+
// window so it works whatever holds focus while the menu is open.
|
|
309
|
+
if (contextMenuFor && (event.key === "Escape" || event.key === "Esc")) {
|
|
310
|
+
event.preventDefault();
|
|
311
|
+
event.stopPropagation();
|
|
312
|
+
closeContextMenu();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
289
315
|
</script>
|
|
290
316
|
|
|
317
|
+
<svelte:window onkeydown={onContextMenuKeydown} />
|
|
318
|
+
|
|
291
319
|
{#if tooltip}
|
|
292
320
|
<!-- Custom hover tooltip. Floats above the grid; positioned by
|
|
293
321
|
showTooltipFor(). Notes and column tooltips both surface here. -->
|
|
@@ -396,10 +424,12 @@
|
|
|
396
424
|
: menuActiveOperator === "regex"
|
|
397
425
|
? "Pattern..."
|
|
398
426
|
: "Filter value..."}
|
|
399
|
-
onfocus={
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
onblur={
|
|
427
|
+
onfocus={(event) => {
|
|
428
|
+
if (isSetOperatorFor(colId)) onSetOpFilterFocus(event.currentTarget as HTMLInputElement, colId);
|
|
429
|
+
}}
|
|
430
|
+
onblur={() => {
|
|
431
|
+
if (isSetOperatorFor(colId)) closeInSuggest();
|
|
432
|
+
}}
|
|
403
433
|
oninput={(event) => {
|
|
404
434
|
const input = event.currentTarget as HTMLInputElement;
|
|
405
435
|
updateFilterMenuValue(colId, input.value);
|
|
@@ -78,6 +78,7 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
78
78
|
history: SharedHistoryStep[];
|
|
79
79
|
historyPtr: number;
|
|
80
80
|
historyGroupId: string | undefined;
|
|
81
|
+
historyTag: unknown;
|
|
81
82
|
historyVersion: number;
|
|
82
83
|
tooltip: {
|
|
83
84
|
text: string;
|
|
@@ -116,6 +117,14 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
116
117
|
columnVirtualizerVersion: number;
|
|
117
118
|
gridStateVersion: number;
|
|
118
119
|
readonly selectionColumnWidth: number;
|
|
120
|
+
readonly detailToggleColumnWidth: number;
|
|
121
|
+
readonly detailToggleColumnLeft: number;
|
|
122
|
+
readonly showDetailToggleEffective: boolean;
|
|
123
|
+
readonly systemColumnsWidth: number;
|
|
124
|
+
readonly detailToggleOf: (row: Row<TData>, rowIndex: number) => {
|
|
125
|
+
open: boolean;
|
|
126
|
+
toggle: () => void;
|
|
127
|
+
} | null;
|
|
119
128
|
readonly rowNumberColumnWidth: number;
|
|
120
129
|
readonly showRowNumbersEffective: boolean;
|
|
121
130
|
readonly filterOperatorOptions: import("./SvGrid.types.js").FilterOption[];
|
|
@@ -241,7 +250,7 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
241
250
|
colDropSide: "before" | "after" | null;
|
|
242
251
|
rowDragActive: boolean;
|
|
243
252
|
rowDropIndex: number | null;
|
|
244
|
-
rowDropSide: "before" | "after" | null;
|
|
253
|
+
rowDropSide: "before" | "after" | "into" | null;
|
|
245
254
|
readonly onRowDragStart: (e: DragEvent, rowIndex: number) => void;
|
|
246
255
|
readonly onRowDragOver: (e: DragEvent, rowIndex: number) => void;
|
|
247
256
|
readonly onRowDragLeave: (rowIndex: number) => void;
|
|
@@ -484,6 +493,7 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
484
493
|
readonly virtualizer: {
|
|
485
494
|
readonly version: number;
|
|
486
495
|
setOptions: (next: Partial<import("./index.js").VirtualizerOptions>) => void;
|
|
496
|
+
measure: () => void;
|
|
487
497
|
setScrollOffset: (scrollOffset: number) => void;
|
|
488
498
|
setViewportHeight: (viewportHeight: number) => void;
|
|
489
499
|
scrollToIndex: (index: number) => void;
|
|
@@ -497,6 +507,7 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
497
507
|
setViewportWidth(viewportWidth: number): void;
|
|
498
508
|
setHorizontalOffset(scrollOffset: number): void;
|
|
499
509
|
setOptions(next: Partial<import("./index.js").VirtualizerOptions>): void;
|
|
510
|
+
measure(): void;
|
|
500
511
|
setScrollOffset(scrollOffset: number): void;
|
|
501
512
|
setViewportHeight(viewportHeight: number): void;
|
|
502
513
|
scrollToIndex(index: number): void;
|
|
@@ -525,6 +536,13 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
525
536
|
readonly frozenRowList: Row<TData>[];
|
|
526
537
|
readonly frozenBandHeight: number;
|
|
527
538
|
readonly frozenRowTop: (i: number) => number;
|
|
539
|
+
readonly stickyGroupRows: {
|
|
540
|
+
row: Row<TData>;
|
|
541
|
+
rowIndex: number;
|
|
542
|
+
top: number;
|
|
543
|
+
size: number;
|
|
544
|
+
}[];
|
|
545
|
+
readonly stickyTopOfRow: (rowIndex: number) => number | undefined;
|
|
528
546
|
/** Record the height the user dragged a row to. */
|
|
529
547
|
readonly setRowResizeHeight: (index: number, height: number | null) => void;
|
|
530
548
|
readonly isRowCollapsed: (index: number) => boolean;
|
|
@@ -534,6 +552,8 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
534
552
|
readonly autosizeColumnByUser: (columnId: string) => void;
|
|
535
553
|
/** A row's dragged height, or undefined when it has not been resized. */
|
|
536
554
|
readonly rowResizeHeightPx: (index: number) => number | undefined;
|
|
555
|
+
/** The height row i is drawn at: dragged, measured, detail, declared or default. */
|
|
556
|
+
readonly rowSizePxOf: (i: number) => number;
|
|
537
557
|
readonly virtualRowTotalSize: number;
|
|
538
558
|
readonly virtualRowStart: number;
|
|
539
559
|
readonly virtualRowEnd: number;
|
|
@@ -672,11 +692,11 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
672
692
|
columnResizable(columnId: string): boolean;
|
|
673
693
|
readonly readCellRaw: (rowIndex: number, columnId: string) => unknown;
|
|
674
694
|
readonly writeCellRaw: (rowIndex: number, columnId: string, value: unknown) => void;
|
|
675
|
-
readonly applyFillPattern: () => void;
|
|
695
|
+
readonly applyFillPattern: (toggled?: boolean) => void;
|
|
676
696
|
readonly clearSelectedCellValues: () => void;
|
|
677
697
|
readonly startFillDrag: (event: PointerEvent, rowIndex: number, colIndex: number) => void;
|
|
678
698
|
readonly onFillPointerMove: (event: PointerEvent) => void;
|
|
679
|
-
readonly onFillPointerUp: () => void;
|
|
699
|
+
readonly onFillPointerUp: (event?: PointerEvent) => void;
|
|
680
700
|
readonly fillDownToNeighbour: () => void;
|
|
681
701
|
readonly isOnMoveGrabStrip: (cell: HTMLElement, rowIndex: number, colIndex: number, clientX: number, clientY: number) => boolean;
|
|
682
702
|
readonly startMoveDrag: (event: PointerEvent, rowIndex: number, colIndex: number) => boolean;
|