@casoon/opengrid 0.8.0 → 0.9.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/CHANGELOG.md CHANGED
@@ -18,6 +18,63 @@ Two things belong in every release entry and are easy to leave out:
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [0.9.0] — 2026-10-01
22
+
23
+ **Screen-reader pairings tested: none yet** ([issue #5](https://github.com/casoon/opengrid/issues/5)).
24
+ **Browsers:** Chromium (the whole e2e suite, 1053 passed) and WebKit (Playwright's, not Safari:
25
+ 519 passed, 10 skipped). Firefox: **not run**.
26
+
27
+ The pivot grows: two column dimensions with a named header, and limits set by a measurement of
28
+ what a browser draws as a table in about a second.
29
+
30
+ **What breaks:**
31
+ - A pivot over the new budget of 131 072 cells is an error now, though its rows and columns are
32
+ each inside their limits — 2 000 rows × 256 columns was allowed before (E39).
33
+ - Rust: `PivotLimits` has a new field, `max_cells`.
34
+
35
+ **Module sizes** (brotli, `just measure-modules`): the elements 224.0 → 224.8 KiB, the engine
36
+ 118.8 KiB, both inside their bounds.
37
+
38
+ ### Fixed
39
+
40
+ - **An answer no longer takes the focus away in `<opengrid-pivot>`** ([#124](https://github.com/casoon/opengrid/issues/124)).
41
+ Every answer redraws the pivot; a reader on a toolbar control, a sort or fold button, or
42
+ typing into the filter field lost the focus and the typed text. The focused control is found
43
+ again after a redraw, and the field keeps its text — until the expression is added.
44
+
45
+ ### Changed
46
+
47
+ - **The pivot's limits follow a measurement** ([#122](https://github.com/casoon/opengrid/issues/122), E39).
48
+ A browser draws a native table in time proportional to its cells, whatever their shape
49
+ (`just measure-pivot`: 128 000 cells in 0.7 s in Chromium, 1.0 s in WebKit; 512 000 in 3.1 s
50
+ and 4.7 s). So a pivot now has a budget of **131 072 cells** (rows × generated columns,
51
+ `PivotLimits::max_cells`, reported by `GET /source`), the row limit rises from 2 000 to
52
+ **10 000** and the column limit stays 256. **What breaks:** a pivot wider than the budget —
53
+ 2 000 rows × 256 columns was allowed — is an error with a sentence now. Rust: `PivotLimits` has
54
+ a new field.
55
+
56
+ ### Added
57
+
58
+ - **Two column dimensions in `<opengrid-pivot>`** ([#120](https://github.com/casoon/opengrid/issues/120)).
59
+ `columns="ordered_year,status"` gives a header row per dimension, the outer value spanning its
60
+ inner ones, then the measures. With two, the pivot is a complex table: every header cell has an
61
+ `id` and every value cell `headers` naming its row and column headers. The engine's limit
62
+ (`PivotLimits::max_column_dimensions`, reported by `GET /source`) is 2 now; three is an error
63
+ with a sentence. The toolbar offers "+ Column" until there are two; `columnFull` reads "Two
64
+ column fields already". Conformance cases with two column dimensions run on every path.
65
+
66
+ ## [0.8.1] — 2026-09-30
67
+
68
+ **Screen-reader pairings tested: none yet** ([issue #5](https://github.com/casoon/opengrid/issues/5)).
69
+ **Browsers:** Chromium, the whole e2e suite. A fix to the types; nothing breaks.
70
+
71
+ ### Fixed
72
+
73
+ - **`get_view` no longer widens a grid's view** ([#117](https://github.com/casoon/opengrid/issues/117)).
74
+ 0.8.0 made it generic, and where its result flowed into a typed place TypeScript inferred
75
+ `View | PivotView`. It is two overloads now: without a type argument the grid's `View`,
76
+ with one (`get_view<PivotView>(pivot)`) the pivot's.
77
+
21
78
  ## [0.8.0] — 2026-09-30
22
79
 
23
80
  **Screen-reader pairings tested: none yet** ([issue #5](https://github.com/casoon/opengrid/issues/5)).
Binary file
package/loader.d.ts CHANGED
@@ -44,11 +44,13 @@ export interface OpengridModule {
44
44
  set_formats(host: HTMLElement, formats: Formats): void;
45
45
  /** Per-column editor choices: `{ customer: ["Alpha", "Beta"] }`. */
46
46
  set_choices(host: HTMLElement, choices: Choices): void;
47
+ /** The whole view as one value; `null` before the element is connected. */
48
+ get_view(host: HTMLElement): View | null;
47
49
  /**
48
- * The whole view as one value; `null` before the element is connected. A
49
- * pivot's is a {@link PivotView}: `get_view<PivotView>(pivot)`.
50
+ * A pivot's view: `get_view<PivotView>(pivot)`. An overload of its own, so
51
+ * a grid's view is never widened to either kind.
50
52
  */
51
- get_view<V extends View | PivotView = View>(host: HTMLElement): V | null;
53
+ get_view<V extends PivotView>(host: HTMLElement): V | null;
52
54
  /** Applies a view in one step and one query. Parts left out keep their default. */
53
55
  set_view(host: HTMLElement, view: ViewInput): void;
54
56
  /** A pivot's view: `rows`, `columns` and `values` at once, one query. */
@@ -825,7 +827,7 @@ export interface OpengridPivotAttributes {
825
827
  datasource?: string;
826
828
  /** Comma-separated row dimensions, outermost first. */
827
829
  rows?: string;
828
- /** Comma-separated column dimensions; V1 allows one. */
830
+ /** Comma-separated column dimensions, outermost first; V1 allows two. */
829
831
  columns?: string;
830
832
  /** The measures as the contract's JSON: `[{"field":"qty","fn":"sum","as":"total"}]`. */
831
833
  values?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@casoon/opengrid",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "description": "Accessible data grid, table and pivot as web components, driven by a portable Rust/WASM query engine — with React, Vue and Svelte components.",
6
6
  "keywords": [
@@ -1,8 +1,8 @@
1
1
  /* @ts-self-types="./opengrid_web_components.d.ts" */
2
- import { __opengrid_define_element } from './snippets/opengrid-web-core-e69c5e78cdf8dd2b/inline1.js';
3
- import * as import1 from "./snippets/opengrid-web-core-e69c5e78cdf8dd2b/inline0.js"
4
- import * as import2 from "./snippets/opengrid-web-core-e69c5e78cdf8dd2b/inline0.js"
5
- import * as import3 from "./snippets/opengrid-web-core-e69c5e78cdf8dd2b/inline0.js"
2
+ import { __opengrid_define_element } from './snippets/opengrid-web-core-d5d58f1d0dc955ad/inline1.js';
3
+ import * as import1 from "./snippets/opengrid-web-core-d5d58f1d0dc955ad/inline0.js"
4
+ import * as import2 from "./snippets/opengrid-web-core-d5d58f1d0dc955ad/inline0.js"
5
+ import * as import3 from "./snippets/opengrid-web-core-d5d58f1d0dc955ad/inline0.js"
6
6
 
7
7
 
8
8
  /**
@@ -272,7 +272,7 @@ function __wbg_get_imports() {
272
272
  const ret = Error(getStringFromWasm0(arg0, arg1));
273
273
  return ret;
274
274
  },
275
- __wbg___opengrid_define_element_240632039493c3d3: function(arg0, arg1, arg2, arg3, arg4, arg5) {
275
+ __wbg___opengrid_define_element_60dafd856d3181c6: function(arg0, arg1, arg2, arg3, arg4, arg5) {
276
276
  __opengrid_define_element(getStringFromWasm0(arg0, arg1), arg2, arg3, arg4, arg5);
277
277
  },
278
278
  __wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
@@ -1014,9 +1014,9 @@ function __wbg_get_imports() {
1014
1014
  return {
1015
1015
  __proto__: null,
1016
1016
  "./opengrid_web_components_bg.js": import0,
1017
- "./snippets/opengrid-web-core-e69c5e78cdf8dd2b/inline0.js": import1,
1018
- "./snippets/opengrid-web-core-e69c5e78cdf8dd2b/inline0.js": import2,
1019
- "./snippets/opengrid-web-core-e69c5e78cdf8dd2b/inline0.js": import3,
1017
+ "./snippets/opengrid-web-core-d5d58f1d0dc955ad/inline0.js": import1,
1018
+ "./snippets/opengrid-web-core-d5d58f1d0dc955ad/inline0.js": import2,
1019
+ "./snippets/opengrid-web-core-d5d58f1d0dc955ad/inline0.js": import3,
1020
1020
  };
1021
1021
  }
1022
1022
 
Binary file
package/react/index.d.ts CHANGED
@@ -73,7 +73,7 @@ export interface OpengridPivotProps extends PivotConnectOptions, ElementProps {
73
73
  datasource?: string;
74
74
  /** Comma-separated row dimensions, outermost first. */
75
75
  rows?: string;
76
- /** Comma-separated column dimensions; V1 allows one. */
76
+ /** Comma-separated column dimensions, outermost first; V1 allows two. */
77
77
  columns?: string;
78
78
  /** The measures as the contract's JSON. */
79
79
  values?: string;
package/svelte/index.d.ts CHANGED
@@ -87,7 +87,7 @@ export interface OpengridPivotProps extends PivotOptions, ElementProps {
87
87
  datasource?: string;
88
88
  /** Comma-separated row dimensions, outermost first. */
89
89
  rows?: string;
90
- /** Comma-separated column dimensions; V1 allows one. */
90
+ /** Comma-separated column dimensions, outermost first; V1 allows two. */
91
91
  columns?: string;
92
92
  /** The measures as the contract's JSON. */
93
93
  values?: string;
package/vue/index.d.ts CHANGED
@@ -73,7 +73,7 @@ export interface OpengridPivotProps
73
73
  datasource?: string;
74
74
  /** Comma-separated row dimensions, outermost first. */
75
75
  rows?: string;
76
- /** Comma-separated column dimensions; V1 allows one. */
76
+ /** Comma-separated column dimensions, outermost first; V1 allows two. */
77
77
  columns?: string;
78
78
  /** The measures as the contract's JSON. */
79
79
  values?: string;