@svgrid/grid 3.0.8 → 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/dist/GridMenus.svelte +3 -2
- package/dist/SvGrid.controller.svelte.d.ts +60 -8
- package/dist/SvGrid.controller.svelte.js +475 -110
- package/dist/SvGrid.css +186 -3
- package/dist/SvGrid.svelte +281 -163
- package/dist/SvGrid.types.d.ts +24 -7
- package/dist/cdn/{GridMenus-D15bhpX5.js → GridMenus-B1sipj6y.js} +165 -165
- package/dist/cdn/{GridMenus-B8-Gbfq2.js → GridMenus-DlAzfHLk.js} +201 -201
- package/dist/cdn/server-block-cache-Dj-KPqEQ.js +1289 -0
- package/dist/cdn/{src-Dz625Fhx.js → src-BYsa66I0.js} +9738 -10174
- package/dist/cdn/{src-CleI0g9l.js → src-pA4RroLV.js} +10702 -11138
- package/dist/cdn/svgrid.js +27 -27
- package/dist/cdn/svgrid.svelte-external.js +27 -27
- package/dist/cdn/{validate-GEs4ZPSW.js → validate-XuMe4_KR.js} +2 -2
- 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 -52
- package/dist/filtering/excel-filters.js +41 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/selection.d.ts +2 -2
- package/dist/selection.js +32 -8
- 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/validate.js +3 -11
- 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 +469 -114
- package/src/SvGrid.css +186 -3
- package/src/SvGrid.svelte +281 -163
- 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 -52
- package/src/counting-cell.test.svelte +11 -0
- package/src/filtering/excel-filters.ts +39 -6
- package/src/headless.reactivity.svelte.test.ts +1 -1
- package/src/index.ts +6 -0
- package/src/new-features.test.ts +24 -0
- package/src/selection.test.ts +14 -0
- package/src/selection.ts +31 -8
- 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/svgrid.behavior.test.ts +29 -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 +4 -4
- package/src/validate.ts +3 -14
- 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/GridMenus.svelte
CHANGED
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
const unpinColumn = $derived(ctrl.unpinColumn);
|
|
50
50
|
const sortDirectionByColumn = $derived(ctrl.sortDirectionByColumn);
|
|
51
51
|
const groupingColumns = $derived(ctrl.groupingColumns);
|
|
52
|
-
const columnVirtualizationEnabled = $derived(ctrl.columnVirtualizationEnabled);
|
|
53
52
|
const updateFilterOperator = $derived(ctrl.updateFilterOperator);
|
|
54
53
|
const updateFilterMenuValue = $derived(ctrl.updateFilterMenuValue);
|
|
55
54
|
const updateFilterMenuValueTo = $derived(ctrl.updateFilterMenuValueTo);
|
|
@@ -644,7 +643,9 @@
|
|
|
644
643
|
<span class="sv-grid-header-icon">{@render icon("x")}</span> Remove sort
|
|
645
644
|
</button>
|
|
646
645
|
{/if}
|
|
647
|
-
|
|
646
|
+
<!-- Pinning works with column virtualization on: the pinned columns render
|
|
647
|
+
as their own runs either side of the virtual window. -->
|
|
648
|
+
{#if menuColumnId}
|
|
648
649
|
{@const menuPinSide = isColumnPinned(menuColumnId)}
|
|
649
650
|
<div class="sv-grid-menu-sep"></div>
|
|
650
651
|
<button
|
|
@@ -103,6 +103,8 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
103
103
|
columnWidths: Record<string, number>;
|
|
104
104
|
readonly collapsedColumns: Record<string, boolean>;
|
|
105
105
|
readonly mergeIndex: import("./merges.js").MergeIndex | null;
|
|
106
|
+
readonly flexRows: boolean;
|
|
107
|
+
readonly flexLayoutActive: boolean;
|
|
106
108
|
readonly setColumnCollapsed: (columnId: string, collapsed: boolean) => void;
|
|
107
109
|
readonly MIN_COLUMN_WIDTH: number;
|
|
108
110
|
columnPinning: {
|
|
@@ -217,6 +219,10 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
217
219
|
groupId?: string;
|
|
218
220
|
collapsible: boolean;
|
|
219
221
|
collapsed: boolean;
|
|
222
|
+
/** Width of the unrendered columns before this cell when column
|
|
223
|
+
* virtualization splits the window into pinned and centre runs; the
|
|
224
|
+
* template draws a spacer of this width first. */
|
|
225
|
+
gapBefore?: number;
|
|
220
226
|
}[];
|
|
221
227
|
}[];
|
|
222
228
|
readonly groupHeaderRowsWindowed: {
|
|
@@ -237,6 +243,10 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
237
243
|
groupId?: string;
|
|
238
244
|
collapsible: boolean;
|
|
239
245
|
collapsed: boolean;
|
|
246
|
+
/** Width of the unrendered columns before this cell when column
|
|
247
|
+
* virtualization splits the window into pinned and centre runs; the
|
|
248
|
+
* template draws a spacer of this width first. */
|
|
249
|
+
gapBefore?: number;
|
|
240
250
|
}[];
|
|
241
251
|
}[];
|
|
242
252
|
readonly pinnedOffsets: {
|
|
@@ -308,8 +318,8 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
308
318
|
};
|
|
309
319
|
readonly selectionBarCount: number;
|
|
310
320
|
readonly selectionBarVisible: boolean;
|
|
311
|
-
lastSelectionSerialized: string;
|
|
312
|
-
lastCellRangeSerialized: string;
|
|
321
|
+
lastSelectionSerialized: string | null;
|
|
322
|
+
lastCellRangeSerialized: string | null;
|
|
313
323
|
readonly statusBarEnabled: boolean;
|
|
314
324
|
readonly statusBarAggregates: readonly ("sum" | "avg" | "min" | "max" | "count" | "numericCount")[];
|
|
315
325
|
readonly statusBarStats: {
|
|
@@ -566,13 +576,25 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
566
576
|
readonly logicalToDomRowOffset: (logical: number) => number;
|
|
567
577
|
readonly virtualColumns: import("./index.js").VirtualItem[];
|
|
568
578
|
readonly virtualColumnTotalSize: number;
|
|
569
|
-
readonly renderedColumnItems:
|
|
579
|
+
readonly renderedColumnItems: {
|
|
570
580
|
index: number;
|
|
571
581
|
key: number;
|
|
572
582
|
size: any;
|
|
573
583
|
start: number;
|
|
574
584
|
end: any;
|
|
575
|
-
}[]
|
|
585
|
+
}[] | (import("./index.js").VirtualItem | {
|
|
586
|
+
index: number;
|
|
587
|
+
key: number;
|
|
588
|
+
size: number;
|
|
589
|
+
start: number;
|
|
590
|
+
end: number;
|
|
591
|
+
} | {
|
|
592
|
+
index: number;
|
|
593
|
+
key: number;
|
|
594
|
+
size: number;
|
|
595
|
+
start: number;
|
|
596
|
+
end: number;
|
|
597
|
+
})[];
|
|
576
598
|
readonly hasRenderedColumn: (entry: {
|
|
577
599
|
item: any;
|
|
578
600
|
column: any | undefined;
|
|
@@ -581,9 +603,39 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
581
603
|
column: any;
|
|
582
604
|
};
|
|
583
605
|
readonly renderedColumns: {
|
|
584
|
-
item:
|
|
585
|
-
|
|
606
|
+
item: import("./index.js").VirtualItem | {
|
|
607
|
+
index: number;
|
|
608
|
+
key: number;
|
|
609
|
+
size: any;
|
|
610
|
+
start: number;
|
|
611
|
+
end: any;
|
|
612
|
+
} | {
|
|
613
|
+
index: number;
|
|
614
|
+
key: number;
|
|
615
|
+
size: number;
|
|
616
|
+
start: number;
|
|
617
|
+
end: number;
|
|
618
|
+
} | {
|
|
619
|
+
index: number;
|
|
620
|
+
key: number;
|
|
621
|
+
size: number;
|
|
622
|
+
start: number;
|
|
623
|
+
end: number;
|
|
624
|
+
};
|
|
625
|
+
column: NonNullable<Column<TData>>;
|
|
626
|
+
gap: number;
|
|
627
|
+
key: string;
|
|
628
|
+
pinned: "left" | "right" | null;
|
|
629
|
+
}[];
|
|
630
|
+
readonly renderedColumnRuns: {
|
|
631
|
+
first: number;
|
|
632
|
+
last: number;
|
|
633
|
+
gap: number;
|
|
586
634
|
}[];
|
|
635
|
+
readonly columnRunOf: (colIndex: number) => {
|
|
636
|
+
firstCol: number;
|
|
637
|
+
lastCol: number;
|
|
638
|
+
};
|
|
587
639
|
readonly totalColumnWidth: number;
|
|
588
640
|
readonly hasHorizontalOverflow: boolean;
|
|
589
641
|
readonly columnWindowStart: number;
|
|
@@ -620,8 +672,8 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
620
672
|
readonly getPinnedCellValue: typeof getPinnedCellValue;
|
|
621
673
|
readonly formatPinnedValue: (column: Column<TData>, value: unknown) => string;
|
|
622
674
|
readonly computePinnedCellClass: (rowData: TData, column: Column<TData>) => string;
|
|
623
|
-
readonly isRowSelected: (rowId: string) => any;
|
|
624
|
-
readonly toggleRowSelectionById: (rowId: string) => void;
|
|
675
|
+
readonly isRowSelected: (rowId: string, original?: unknown) => any;
|
|
676
|
+
readonly toggleRowSelectionById: (rowId: string, original?: unknown) => void;
|
|
625
677
|
readonly headerSelectionState: "some" | "none" | "all";
|
|
626
678
|
readonly visibleRowRange: {
|
|
627
679
|
startIndex: number;
|