@svgrid/grid 3.0.7 → 3.0.9
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 +1 -1
- package/dist/GridMenus.svelte +3 -2
- package/dist/SvGrid.controller.svelte.d.ts +60 -8
- package/dist/SvGrid.controller.svelte.js +490 -114
- package/dist/SvGrid.css +186 -3
- package/dist/SvGrid.svelte +285 -164
- package/dist/SvGrid.types.d.ts +24 -7
- package/dist/cdn/{GridMenus-CcwU8I4t.js → GridMenus-B1sipj6y.js} +165 -165
- package/dist/cdn/{GridMenus-BgUS-W3o.js → GridMenus-DlAzfHLk.js} +201 -201
- package/dist/cdn/server-block-cache-Dj-KPqEQ.js +1289 -0
- package/dist/cdn/{src-kE9B98r6.js → src-BYsa66I0.js} +9747 -10178
- package/dist/cdn/{src-25JmJ_7g.js → src-pA4RroLV.js} +10709 -11140
- package/dist/cdn/svgrid.js +27 -27
- package/dist/cdn/svgrid.svelte-external.js +27 -27
- package/dist/cdn/validate-XuMe4_KR.js +80 -0
- package/dist/cell-render.js +25 -3
- package/dist/columns.js +16 -1
- package/dist/conditional-formatting.js +9 -2
- package/dist/core.d.ts +93 -0
- package/dist/core.js +313 -47
- package/dist/filtering/excel-filters.js +41 -6
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/keyboard-handlers.js +5 -1
- package/dist/selection.d.ts +2 -2
- package/dist/selection.js +46 -12
- package/dist/server-block-cache.d.ts +7 -32
- package/dist/server-block-cache.js +21 -12
- package/dist/server-data-source.js +3 -1
- package/dist/server.d.ts +1 -0
- package/dist/server.js +1 -0
- package/dist/spreadsheet.js +7 -0
- package/dist/{subscribe.js → subscribe.svelte.js} +5 -1
- package/dist/validate.js +13 -14
- package/dist/virtualization/column-virtualizer.d.ts +4 -0
- package/dist/virtualization/column-virtualizer.js +2 -0
- package/dist/virtualization/types.d.ts +20 -0
- package/dist/virtualization/virtualizer.js +90 -24
- package/dist/windowed-brand.d.ts +22 -0
- package/dist/windowed-brand.js +60 -0
- package/dist/windowed-data.d.ts +6 -0
- package/dist/windowed-data.js +34 -0
- package/dist/windowed-row-model.d.ts +1 -0
- package/dist/windowed-row-model.js +97 -0
- package/package.json +1 -1
- package/src/GridMenus.svelte +3 -2
- package/src/SvGrid.controller.svelte.ts +483 -122
- package/src/SvGrid.css +186 -3
- package/src/SvGrid.svelte +285 -164
- package/src/SvGrid.types.ts +24 -7
- package/src/cell-render.ts +24 -2
- package/src/columns.ts +16 -1
- package/src/conditional-formatting.ts +6 -4
- package/src/core.sort.test.ts +61 -0
- package/src/core.ts +309 -49
- package/src/counting-cell.test.svelte +11 -0
- package/src/filtering/excel-filters.ts +39 -6
- package/src/headless.reactivity.svelte.test.ts +89 -0
- package/src/headless.ts +1 -1
- package/src/index.ts +7 -1
- package/src/keyboard-handlers.ts +5 -1
- package/src/new-features.test.ts +24 -0
- package/src/selection.test.ts +51 -0
- package/src/selection.ts +47 -14
- package/src/server-block-cache.ts +27 -10
- package/src/server-data-source.ts +3 -1
- package/src/server.ts +6 -0
- package/src/spreadsheet.ts +6 -0
- package/src/{subscribe.test.ts → subscribe.svelte.test.ts} +1 -1
- package/src/{subscribe.ts → subscribe.svelte.ts} +5 -1
- package/src/svgrid.behavior.test.ts +58 -0
- package/src/svgrid.column-cell-recycling.test.ts +120 -0
- package/src/svgrid.interaction.test.ts +4 -1
- package/src/svgrid.new-features.wrapper.test.ts +5 -4
- package/src/svgrid.pinned-column-virtualization.test.ts +162 -0
- package/src/svgrid.row-model-prop.svelte.test.ts +15 -3
- package/src/validate.test.ts +20 -4
- package/src/validate.ts +13 -16
- package/src/virtualization/column-virtualizer.ts +6 -0
- package/src/virtualization/types.ts +20 -0
- package/src/virtualization/virtualizer.test.ts +152 -0
- package/src/virtualization/virtualizer.ts +93 -27
- package/src/windowed-brand.ts +67 -0
- package/src/windowed-data.test.ts +105 -0
- package/src/windowed-data.ts +36 -0
- package/src/windowed-row-model.ts +113 -0
- package/dist/cdn/server-block-cache-DIqb3VZn.js +0 -241
- package/dist/cdn/validate-AZoD8BoR.js +0 -80
- /package/dist/{subscribe.d.ts → subscribe.svelte.d.ts} +0 -0
package/dist/SvGrid.types.d.ts
CHANGED
|
@@ -1793,13 +1793,17 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
|
|
|
1793
1793
|
* `virtualization`. **On by default**, which is what makes a 100-column grid
|
|
1794
1794
|
* scroll smoothly.
|
|
1795
1795
|
*
|
|
1796
|
-
*
|
|
1797
|
-
*
|
|
1796
|
+
* Pinned columns stay rendered while it is on: the pinned-left and
|
|
1797
|
+
* pinned-right columns are drawn as their own runs either side of the
|
|
1798
|
+
* virtual window, so a wide grid with pinned edges still renders only the
|
|
1799
|
+
* columns in view plus the pinned ones.
|
|
1798
1800
|
*/
|
|
1799
1801
|
columnVirtualization?: boolean;
|
|
1800
1802
|
/**
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
1803
|
+
* Columns kept rendered beyond the viewport when `columnVirtualization`
|
|
1804
|
+
* is on: this many ahead of a horizontal scroll at all times, one behind
|
|
1805
|
+
* it. The rendered columns move three at a time, so right after a move up
|
|
1806
|
+
* to `columnOverscan + 2` are rendered ahead. Defaults to 3.
|
|
1803
1807
|
*/
|
|
1804
1808
|
columnOverscan?: number;
|
|
1805
1809
|
/**
|
|
@@ -1812,9 +1816,7 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
|
|
|
1812
1816
|
* column id (matches `ColumnDef.field` when no explicit id is set).
|
|
1813
1817
|
* The internal pinning state is seeded once at mount; user-driven
|
|
1814
1818
|
* pinning via the column menu still works and overrides this default.
|
|
1815
|
-
*
|
|
1816
|
-
* UI (sticky positioning can't co-exist with column virtualization
|
|
1817
|
-
* since the virtualizer recycles DOM nodes).
|
|
1819
|
+
* Works with column virtualization on (the default).
|
|
1818
1820
|
*/
|
|
1819
1821
|
initialColumnPinning?: {
|
|
1820
1822
|
left?: ReadonlyArray<string>;
|
|
@@ -2261,6 +2263,12 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
|
|
|
2261
2263
|
* triangles by threshold), and `rule` (apply a style when a predicate
|
|
2262
2264
|
* matches). Scope a format to specific columns with `columns: [...]`,
|
|
2263
2265
|
* or omit it to apply to every column. Later entries win on conflict.
|
|
2266
|
+
*
|
|
2267
|
+
* `colorScale` and `dataBar` apply to data rows only: group, footer and
|
|
2268
|
+
* grand-total rows carry subtotals on a different scale, so they keep the
|
|
2269
|
+
* `rule` and `iconSet` formats and drop the scaled ones. On a server row
|
|
2270
|
+
* model, give scaled formats `minValue` / `maxValue`; the grid does not
|
|
2271
|
+
* scan rows it has not loaded for a range.
|
|
2264
2272
|
*/
|
|
2265
2273
|
conditionalFormats?: ReadonlyArray<ConditionalFormat<TData>>;
|
|
2266
2274
|
/**
|
|
@@ -2567,6 +2575,15 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
|
|
|
2567
2575
|
rowSpan: number;
|
|
2568
2576
|
colSpan: number;
|
|
2569
2577
|
}>;
|
|
2578
|
+
/**
|
|
2579
|
+
* How rows are laid out. `'flex'` (the default) draws each row as a line
|
|
2580
|
+
* of fixed-width cells, so adding or removing cells in one row - what a
|
|
2581
|
+
* horizontal scroll does every frame - lays out that row only. `'table'`
|
|
2582
|
+
* uses the HTML table algorithm, which re-lays every row on such a change
|
|
2583
|
+
* but can draw a merged cell spanning rows; the grid switches to it on its
|
|
2584
|
+
* own when `mergedCells` has one.
|
|
2585
|
+
*/
|
|
2586
|
+
rowLayout?: "flex" | "table";
|
|
2570
2587
|
/**
|
|
2571
2588
|
* Rows to pin to the BOTTOM of the grid - rendered below the regular
|
|
2572
2589
|
* rows and sticky-positioned (sticks to the bottom of the viewport
|