@svgrid/enterprise 3.1.32 → 3.1.33

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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>SvGrid Studio - Designer</title>
7
- <script type="module" crossorigin src="./assets/index-DhrdEVEn.js"></script>
7
+ <script type="module" crossorigin src="./assets/index-C7j33Duo.js"></script>
8
8
  <link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-Dd_uD5pT.js">
9
9
  <link rel="modulepreload" crossorigin href="./assets/disclose-version-CIm4S9xS.js">
10
10
  <link rel="modulepreload" crossorigin href="./assets/cell-formatting-CDP4IvHm.js">
@@ -16526,7 +16526,7 @@ function hasFieldConditions(schema) {
16526
16526
  *
16527
16527
  * `version.test.ts` asserts this matches `package.json`, so the two cannot drift.
16528
16528
  */
16529
- var SVGRID_VERSION = "3.1.32";
16529
+ var SVGRID_VERSION = "3.1.33";
16530
16530
  /**
16531
16531
  * The version of `@svgrid/grid`, which releases on its own line: enterprise is
16532
16532
  * on 3.1.x while the grid is on 3.0.x.
@@ -16539,7 +16539,7 @@ var SVGRID_VERSION = "3.1.32";
16539
16539
  *
16540
16540
  * `version.test.ts` asserts this matches packages/grid/package.json.
16541
16541
  */
16542
- var GRID_VERSION = "3.0.29";
16542
+ var GRID_VERSION = "3.0.30";
16543
16543
  //#endregion
16544
16544
  //#region src/studio/emit-project.ts
16545
16545
  var has = (blocks, kind) => blocks.some((b) => b.config.kind === kind);
@@ -21,7 +21,7 @@
21
21
  * `createServerGroupModel` (the previous model, block-append with a "Load N
22
22
  * more" button) is still exported for anyone on it; this one supersedes it.
23
23
  */
24
- import { createBlockCache, createRowPlaceholder, createWindowedData, isWindowedData, rowPlaceholderState, toServerFilterColumns,
24
+ import { createBlockCache, createRowPlaceholder, createWindowedData, isWindowedData, rowPlaceholderState, toServerFilterColumns, windowedSourceOf,
25
25
  // The subpath, not the root: the root re-exports SvGrid.svelte, which
26
26
  // would land in every bundle and test that touches this model.
27
27
  } from '@svgrid/grid/server';
@@ -709,9 +709,28 @@ export function createServerRowModel(source, options) {
709
709
  return { d: p.display[offset], g: p.grid[offset] };
710
710
  return lazyLeafAt(p.store, p.from + offset);
711
711
  };
712
+ // The indexes with a real row: every row of an explicit piece, and the
713
+ // loaded rows of a lazy one, so the grid's select all and header
714
+ // checkbox skip the placeholders instead of reading all `total` rows.
715
+ const loaded = () => {
716
+ const out = [];
717
+ for (const p of pieces) {
718
+ const inStore = p.store && windowedSourceOf(p.store.cache.windowedRows())?.loaded?.();
719
+ if (!inStore) {
720
+ for (let i = 0; i < p.length; i += 1)
721
+ out.push(p.start + i);
722
+ continue;
723
+ }
724
+ for (const i of inStore) {
725
+ if (i >= p.from && i < p.from + p.length)
726
+ out.push(p.start + i - p.from);
727
+ }
728
+ }
729
+ return out;
730
+ };
712
731
  return {
713
- display: createWindowedData(total, (i) => entryAt(i)?.d),
714
- grid: createWindowedData(total, (i) => entryAt(i)?.g),
732
+ display: createWindowedData(total, (i) => entryAt(i)?.d, loaded),
733
+ grid: createWindowedData(total, (i) => entryAt(i)?.g, loaded),
715
734
  };
716
735
  }
717
736
  function pagination() {
@@ -833,8 +852,10 @@ export function createServerRowModel(source, options) {
833
852
  }
834
853
  current = {
835
854
  ...current,
836
- displayRows: createWindowedData(n, (i) => display.get(i) ?? LOADING_ROW),
837
- gridRows: createWindowedData(n, (i) => grid.get(i) ?? toGridRow(LOADING_ROW)),
855
+ // The snapshot holds rows only around the viewport; the rest read as
856
+ // loading. Copied in index order, so its keys are already ascending.
857
+ displayRows: createWindowedData(n, (i) => display.get(i) ?? LOADING_ROW, () => [...display.keys()]),
858
+ gridRows: createWindowedData(n, (i) => grid.get(i) ?? toGridRow(LOADING_ROW), () => [...grid.keys()]),
838
859
  };
839
860
  for (const notify of subscribers)
840
861
  notify();
package/dist/version.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * `version.test.ts` asserts this matches `package.json`, so the two cannot drift.
12
12
  */
13
- export declare const SVGRID_VERSION = "3.1.32";
13
+ export declare const SVGRID_VERSION = "3.1.33";
14
14
  /**
15
15
  * The version of `@svgrid/grid`, which releases on its own line: enterprise is
16
16
  * on 3.1.x while the grid is on 3.0.x.
@@ -23,4 +23,4 @@ export declare const SVGRID_VERSION = "3.1.32";
23
23
  *
24
24
  * `version.test.ts` asserts this matches packages/grid/package.json.
25
25
  */
26
- export declare const GRID_VERSION = "3.0.29";
26
+ export declare const GRID_VERSION = "3.0.30";
package/dist/version.js CHANGED
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * `version.test.ts` asserts this matches `package.json`, so the two cannot drift.
12
12
  */
13
- export const SVGRID_VERSION = '3.1.32';
13
+ export const SVGRID_VERSION = '3.1.33';
14
14
  /**
15
15
  * The version of `@svgrid/grid`, which releases on its own line: enterprise is
16
16
  * on 3.1.x while the grid is on 3.0.x.
@@ -23,4 +23,4 @@ export const SVGRID_VERSION = '3.1.32';
23
23
  *
24
24
  * `version.test.ts` asserts this matches packages/grid/package.json.
25
25
  */
26
- export const GRID_VERSION = '3.0.29';
26
+ export const GRID_VERSION = '3.0.30';