@kanunilabs/pivotgrid-react 1.1.0 → 1.2.1
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/LICENSE +3 -3
- package/README.md +147 -147
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +49 -8
- package/dist/index.d.ts +49 -8
- package/dist/index.js +2 -2
- package/dist/styles.css +1416 -1306
- package/package.json +5 -4
package/LICENSE
CHANGED
|
@@ -33,9 +33,9 @@ Software you agree to these terms.
|
|
|
33
33
|
|
|
34
34
|
4. ENTERPRISE FEATURES
|
|
35
35
|
Certain features require a separate paid license
|
|
36
|
-
(@kanunilabs/pivotgrid-react-enterprise, @kanunilabs/
|
|
37
|
-
or @kanunilabs/datagrid-enterprise).
|
|
38
|
-
features.
|
|
36
|
+
(@kanunilabs/pivotgrid-react-enterprise, @kanunilabs/pivotgrid-enterprise,
|
|
37
|
+
@kanunilabs/datagrid-react-enterprise or @kanunilabs/datagrid-enterprise).
|
|
38
|
+
This license grants no right to those features.
|
|
39
39
|
|
|
40
40
|
5. NO WARRANTY
|
|
41
41
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
package/README.md
CHANGED
|
@@ -1,147 +1,147 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="https://www.kanunilabs.com"><img src="https://www.kanunilabs.com/logo.png" width="84" alt="KanuniLabs" /></a>
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<h1 align="center">KanuniLabs PivotGrid for React</h1>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
A high-performance React pivot table with a Web Worker engine —<br />
|
|
9
|
-
pivot, filter, and analyze millions of rows without freezing the UI.
|
|
10
|
-
</p>
|
|
11
|
-
|
|
12
|
-
<p align="center">
|
|
13
|
-
<a href="https://www.kanunilabs.com">Website</a> ·
|
|
14
|
-
<a href="https://www.kanunilabs.com/playground/pivotgrid">Live Demos</a> ·
|
|
15
|
-
<a href="https://www.kanunilabs.com/docs/pivotgrid">Documentation</a> ·
|
|
16
|
-
<a href="https://www.kanunilabs.com/docs/pivotgrid/api">API Reference</a> ·
|
|
17
|
-
<a href="https://www.kanunilabs.com/pricing">Pricing</a> ·
|
|
18
|
-
<a href="https://www.kanunilabs.com/contact">Support</a>
|
|
19
|
-
</p>
|
|
20
|
-
|
|
21
|
-
<p align="center">
|
|
22
|
-
<a href="https://www.npmjs.com/package/@kanunilabs/pivotgrid-react"><img src="https://img.shields.io/npm/v/%40kanunilabs%2Fpivotgrid-react.svg?label=npm" alt="npm version" /></a>
|
|
23
|
-
<a href="https://www.npmjs.com/package/@kanunilabs/pivotgrid-react"><img src="https://img.shields.io/npm/dm/%40kanunilabs%2Fpivotgrid-react.svg" alt="npm downloads" /></a>
|
|
24
|
-
<img src="https://img.shields.io/badge/TypeScript-included-3178c6.svg" alt="TypeScript types included" />
|
|
25
|
-
<img src="https://img.shields.io/badge/license-Community%20(free)-2ea44f.svg" alt="KanuniLabs Community License" />
|
|
26
|
-
</p>
|
|
27
|
-
|
|
28
|
-
<p align="center">
|
|
29
|
-
<a href="https://www.kanunilabs.com/playground/pivotgrid">
|
|
30
|
-
<img src="https://www.kanunilabs.com/npm/pivotgrid-react.gif" alt="KanuniLabs PivotGrid for React in action — drag-and-drop pivoting with Web Worker aggregation" width="100%" />
|
|
31
|
-
</a>
|
|
32
|
-
</p>
|
|
33
|
-
|
|
34
|
-
<p align="center">
|
|
35
|
-
<a href="https://www.kanunilabs.com/playground/pivotgrid">Try it live in the interactive playground</a> — pivot
|
|
36
|
-
</p>
|
|
37
|
-
|
|
38
|
-
## Why KanuniLabs PivotGrid?
|
|
39
|
-
|
|
40
|
-
- **Web Worker engine** — columnar storage, dictionary encoding and trie-based grouping run entirely off the main thread. Initial load is pipelined and incremental; re-pivoting (drag a field) reuses the encoded data instead of re-processing it, so even multi-million-row datasets stay interactive.
|
|
41
|
-
- **Virtualized rendering** — row and column virtualization keep the DOM small no matter how large the result matrix gets.
|
|
42
|
-
- **Drag & drop layout** — a familiar field panel plus in-grid area strips: drag fields between Row, Column, Data and Filter areas.
|
|
43
|
-
- **Filtering & sorting** — header filter popups with search, multi-level sorting, custom sort orders. The filter popup is fully keyboard-driven: type to search, arrow keys to move through values, <kbd>Space</kbd> to toggle, <kbd>Backspace</kbd> to jump straight back into the search box, <kbd>Enter</kbd> to apply — no mouse needed.
|
|
44
|
-
- **Summary display modes** — % of grand total / row / column, running totals, rank, index and more, per measure.
|
|
45
|
-
- **Import & export** — CSV, JSON and XML export, clipboard copy, print and PNG snapshot out of the box; file and clipboard import with type detection. (Styled Excel & PDF export ship in the [Enterprise edition](#enterprise-edition).)
|
|
46
|
-
- **Saved views** — capture and restore complete layouts through the built-in report manager.
|
|
47
|
-
- **12 locales + RTL** — en, tr, de, fr, es, it, pt, ru, ar, zh-CN, ja, ko — including full right-to-left support.
|
|
48
|
-
- **Themeable** — CSS-variable driven theming with preset themes and zebra striping. Styles are scoped under `.kanuni-pivot-root`, so nothing leaks into your app (with or without Tailwind).
|
|
49
|
-
- **TypeScript-first & CSP-safe** — complete type definitions; no `eval`, no `new Function`.
|
|
50
|
-
|
|
51
|
-
## Quick start
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npm install @kanunilabs/pivotgrid-react
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
`@kanunilabs/pivotgrid-core` (the engine) is installed automatically.
|
|
58
|
-
|
|
59
|
-
```tsx
|
|
60
|
-
import { BasePivotGrid } from '@kanunilabs/pivotgrid-react';
|
|
61
|
-
import '@kanunilabs/pivotgrid-react/styles.css';
|
|
62
|
-
|
|
63
|
-
function App() {
|
|
64
|
-
return (
|
|
65
|
-
<BasePivotGrid
|
|
66
|
-
data={rows}
|
|
67
|
-
initialFields={[
|
|
68
|
-
{ id: 'region', dataField: 'region', caption: 'Region', dataType: 'string', area: 'row' },
|
|
69
|
-
{ id: 'product', dataField: 'product', caption: 'Product', dataType: 'string', area: 'column' },
|
|
70
|
-
{ id: 'amount', dataField: 'amount', caption: 'Amount', dataType: 'number', area: 'data', summaryType: 'sum' },
|
|
71
|
-
]}
|
|
72
|
-
/>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
That's it — aggregation starts in a Web Worker and the grid renders with drag-and-drop, filtering, sorting and export enabled.
|
|
78
|
-
|
|
79
|
-
### The Web Worker: nothing to configure
|
|
80
|
-
|
|
81
|
-
The engine aggregates in a Web Worker. The worker is compiled into the package
|
|
82
|
-
and started from a Blob URL, so there is no file to copy, no bundler recipe and
|
|
83
|
-
nothing to import — Vite, webpack, Next.js and Parcel all just work. The import
|
|
84
|
-
and export workers behave the same way.
|
|
85
|
-
|
|
86
|
-
**Strict Content-Security-Policy.** A Blob worker needs `worker-src 'self' blob:`.
|
|
87
|
-
If your CSP forbids it, the grid falls back to loading the worker file from
|
|
88
|
-
`node_modules`; where that fails too, serve the file yourself and point at it:
|
|
89
|
-
|
|
90
|
-
```jsx
|
|
91
|
-
import workerUrl from '@kanunilabs/pivotgrid-core/dist/pivot.worker.js?url';
|
|
92
|
-
|
|
93
|
-
<BasePivotGrid workerUrl={workerUrl} /* ... */ />
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
The same escape hatch is there if you would rather serve the worker from a CDN
|
|
97
|
-
so it caches separately from your app bundle. `pivot.worker.js` ships in the
|
|
98
|
-
package either way.
|
|
99
|
-
|
|
100
|
-
## Enterprise edition
|
|
101
|
-
|
|
102
|
-
Advanced analytics ship in `@kanunilabs/pivotgrid-react-enterprise` — a drop-in
|
|
103
|
-
replacement for `BasePivotGrid` that adds:
|
|
104
|
-
|
|
105
|
-
| Feature | |
|
|
106
|
-
| --- | --- |
|
|
107
|
-
| **Calculated fields** | No-code formula editor with live preview (CSP-safe, no `eval`) |
|
|
108
|
-
| **Chart integration** | Sync any pivot view to charts — column, bar, line, area, pie, scatter & more |
|
|
109
|
-
| **Drill-down** | Open the source records behind any aggregated cell |
|
|
110
|
-
| **Prefilter builder** | Visual condition builder applied inside the worker |
|
|
111
|
-
| **Node context menu** | Right-click bulk expand/collapse on any row or column node |
|
|
112
|
-
| **Styled Excel & PDF export** | Formatted, streaming Excel export and print-ready PDF |
|
|
113
|
-
|
|
114
|
-
See [Pricing](https://www.kanunilabs.com/pricing) for licenses — this community
|
|
115
|
-
package stays free either way.
|
|
116
|
-
|
|
117
|
-
## Compatibility
|
|
118
|
-
|
|
119
|
-
- React 18 and React 19
|
|
120
|
-
- TypeScript types included (strict-mode clean)
|
|
121
|
-
- All evergreen browsers (Chrome, Edge, Firefox, Safari)
|
|
122
|
-
- Works with Vite, Next.js (App Router), CRA and plain Webpack/Rollup setups
|
|
123
|
-
|
|
124
|
-
## Resources
|
|
125
|
-
|
|
126
|
-
- [Live demos & playground](https://www.kanunilabs.com/playground/pivotgrid)
|
|
127
|
-
- [Documentation](https://www.kanunilabs.com/docs/pivotgrid) · [Installation](https://www.kanunilabs.com/docs/pivotgrid/installation) · [Features guide](https://www.kanunilabs.com/docs/pivotgrid/features) · [FAQ](https://www.kanunilabs.com/docs/pivotgrid/faq)
|
|
128
|
-
- [API reference](https://www.kanunilabs.com/docs/pivotgrid/api)
|
|
129
|
-
- [Changelog](https://www.kanunilabs.com/changelog)
|
|
130
|
-
- Questions? [Contact us](https://www.kanunilabs.com/contact) — <hello@kanunilabs.com>
|
|
131
|
-
|
|
132
|
-
**Have an idea, feature request or bug report?** We want to hear it — the grid
|
|
133
|
-
is shaped by real-world feedback, and every message gets read and answered.
|
|
134
|
-
Write to <hello@kanunilabs.com> or use the
|
|
135
|
-
[contact form](https://www.kanunilabs.com/contact).
|
|
136
|
-
|
|
137
|
-
## License
|
|
138
|
-
|
|
139
|
-
**KanuniLabs Community License v1.0** — free to use in commercial and
|
|
140
|
-
non-commercial applications; the source code is proprietary (no
|
|
141
|
-
redistribution/modification of the package itself). See [LICENSE](./LICENSE)
|
|
142
|
-
for the full terms. Enterprise features are licensed separately — see
|
|
143
|
-
[kanunilabs.com/pricing](https://www.kanunilabs.com/pricing).
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
<p align="center">© 2026 KanuniLabs · <a href="https://www.kanunilabs.com">kanunilabs.com</a> · <a href="mailto:hello@kanunilabs.com">hello@kanunilabs.com</a></p>
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://www.kanunilabs.com"><img src="https://www.kanunilabs.com/logo.png" width="84" alt="KanuniLabs" /></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">KanuniLabs PivotGrid for React</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
A high-performance React pivot table with a Web Worker engine —<br />
|
|
9
|
+
pivot, filter, and analyze millions of rows without freezing the UI.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.kanunilabs.com">Website</a> ·
|
|
14
|
+
<a href="https://www.kanunilabs.com/playground/pivotgrid">Live Demos</a> ·
|
|
15
|
+
<a href="https://www.kanunilabs.com/docs/pivotgrid">Documentation</a> ·
|
|
16
|
+
<a href="https://www.kanunilabs.com/docs/pivotgrid/api">API Reference</a> ·
|
|
17
|
+
<a href="https://www.kanunilabs.com/pricing">Pricing</a> ·
|
|
18
|
+
<a href="https://www.kanunilabs.com/contact">Support</a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<a href="https://www.npmjs.com/package/@kanunilabs/pivotgrid-react"><img src="https://img.shields.io/npm/v/%40kanunilabs%2Fpivotgrid-react.svg?label=npm" alt="npm version" /></a>
|
|
23
|
+
<a href="https://www.npmjs.com/package/@kanunilabs/pivotgrid-react"><img src="https://img.shields.io/npm/dm/%40kanunilabs%2Fpivotgrid-react.svg" alt="npm downloads" /></a>
|
|
24
|
+
<img src="https://img.shields.io/badge/TypeScript-included-3178c6.svg" alt="TypeScript types included" />
|
|
25
|
+
<img src="https://img.shields.io/badge/license-Community%20(free)-2ea44f.svg" alt="KanuniLabs Community License" />
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
<a href="https://www.kanunilabs.com/playground/pivotgrid">
|
|
30
|
+
<img src="https://www.kanunilabs.com/npm/pivotgrid-react.gif" alt="KanuniLabs PivotGrid for React in action — drag-and-drop pivoting with Web Worker aggregation" width="100%" />
|
|
31
|
+
</a>
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<a href="https://www.kanunilabs.com/playground/pivotgrid">Try it live in the interactive playground</a> — pivot a million rows of sales data right in your browser. No signup, no install.
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
## Why KanuniLabs PivotGrid?
|
|
39
|
+
|
|
40
|
+
- **Web Worker engine** — columnar storage, dictionary encoding and trie-based grouping run entirely off the main thread. Initial load is pipelined and incremental; re-pivoting (drag a field) reuses the encoded data instead of re-processing it, so even multi-million-row datasets stay interactive.
|
|
41
|
+
- **Virtualized rendering** — row and column virtualization keep the DOM small no matter how large the result matrix gets.
|
|
42
|
+
- **Drag & drop layout** — a familiar field panel plus in-grid area strips: drag fields between Row, Column, Data and Filter areas.
|
|
43
|
+
- **Filtering & sorting** — header filter popups with search, multi-level sorting, custom sort orders. The filter popup is fully keyboard-driven: type to search, arrow keys to move through values, <kbd>Space</kbd> to toggle, <kbd>Backspace</kbd> to jump straight back into the search box, <kbd>Enter</kbd> to apply — no mouse needed.
|
|
44
|
+
- **Summary display modes** — % of grand total / row / column, running totals, rank, index and more, per measure.
|
|
45
|
+
- **Import & export** — CSV, JSON and XML export, clipboard copy, print and PNG snapshot out of the box; file and clipboard import with type detection. (Styled Excel & PDF export ship in the [Enterprise edition](#enterprise-edition).)
|
|
46
|
+
- **Saved views** — capture and restore complete layouts through the built-in report manager.
|
|
47
|
+
- **12 locales + RTL** — en, tr, de, fr, es, it, pt, ru, ar, zh-CN, ja, ko — including full right-to-left support.
|
|
48
|
+
- **Themeable** — CSS-variable driven theming with preset themes and zebra striping. Styles are scoped under `.kanuni-pivot-root`, so nothing leaks into your app (with or without Tailwind).
|
|
49
|
+
- **TypeScript-first & CSP-safe** — complete type definitions; no `eval`, no `new Function`.
|
|
50
|
+
|
|
51
|
+
## Quick start
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install @kanunilabs/pivotgrid-react
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`@kanunilabs/pivotgrid-core` (the engine) is installed automatically.
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import { BasePivotGrid } from '@kanunilabs/pivotgrid-react';
|
|
61
|
+
import '@kanunilabs/pivotgrid-react/styles.css';
|
|
62
|
+
|
|
63
|
+
function App() {
|
|
64
|
+
return (
|
|
65
|
+
<BasePivotGrid
|
|
66
|
+
data={rows}
|
|
67
|
+
initialFields={[
|
|
68
|
+
{ id: 'region', dataField: 'region', caption: 'Region', dataType: 'string', area: 'row' },
|
|
69
|
+
{ id: 'product', dataField: 'product', caption: 'Product', dataType: 'string', area: 'column' },
|
|
70
|
+
{ id: 'amount', dataField: 'amount', caption: 'Amount', dataType: 'number', area: 'data', summaryType: 'sum' },
|
|
71
|
+
]}
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
That's it — aggregation starts in a Web Worker and the grid renders with drag-and-drop, filtering, sorting and export enabled.
|
|
78
|
+
|
|
79
|
+
### The Web Worker: nothing to configure
|
|
80
|
+
|
|
81
|
+
The engine aggregates in a Web Worker. The worker is compiled into the package
|
|
82
|
+
and started from a Blob URL, so there is no file to copy, no bundler recipe and
|
|
83
|
+
nothing to import — Vite, webpack, Next.js and Parcel all just work. The import
|
|
84
|
+
and export workers behave the same way.
|
|
85
|
+
|
|
86
|
+
**Strict Content-Security-Policy.** A Blob worker needs `worker-src 'self' blob:`.
|
|
87
|
+
If your CSP forbids it, the grid falls back to loading the worker file from
|
|
88
|
+
`node_modules`; where that fails too, serve the file yourself and point at it:
|
|
89
|
+
|
|
90
|
+
```jsx
|
|
91
|
+
import workerUrl from '@kanunilabs/pivotgrid-core/dist/pivot.worker.js?url';
|
|
92
|
+
|
|
93
|
+
<BasePivotGrid workerUrl={workerUrl} /* ... */ />
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The same escape hatch is there if you would rather serve the worker from a CDN
|
|
97
|
+
so it caches separately from your app bundle. `pivot.worker.js` ships in the
|
|
98
|
+
package either way.
|
|
99
|
+
|
|
100
|
+
## Enterprise edition
|
|
101
|
+
|
|
102
|
+
Advanced analytics ship in `@kanunilabs/pivotgrid-react-enterprise` — a drop-in
|
|
103
|
+
replacement for `BasePivotGrid` that adds:
|
|
104
|
+
|
|
105
|
+
| Feature | |
|
|
106
|
+
| --- | --- |
|
|
107
|
+
| **Calculated fields** | No-code formula editor with live preview (CSP-safe, no `eval`) |
|
|
108
|
+
| **Chart integration** | Sync any pivot view to charts — column, bar, line, area, pie, scatter & more |
|
|
109
|
+
| **Drill-down** | Open the source records behind any aggregated cell |
|
|
110
|
+
| **Prefilter builder** | Visual condition builder applied inside the worker |
|
|
111
|
+
| **Node context menu** | Right-click bulk expand/collapse on any row or column node |
|
|
112
|
+
| **Styled Excel & PDF export** | Formatted, streaming Excel export and print-ready PDF |
|
|
113
|
+
|
|
114
|
+
See [Pricing](https://www.kanunilabs.com/pricing) for licenses — this community
|
|
115
|
+
package stays free either way.
|
|
116
|
+
|
|
117
|
+
## Compatibility
|
|
118
|
+
|
|
119
|
+
- React 18 and React 19
|
|
120
|
+
- TypeScript types included (strict-mode clean)
|
|
121
|
+
- All evergreen browsers (Chrome, Edge, Firefox, Safari)
|
|
122
|
+
- Works with Vite, Next.js (App Router), CRA and plain Webpack/Rollup setups
|
|
123
|
+
|
|
124
|
+
## Resources
|
|
125
|
+
|
|
126
|
+
- [Live demos & playground](https://www.kanunilabs.com/playground/pivotgrid)
|
|
127
|
+
- [Documentation](https://www.kanunilabs.com/docs/pivotgrid) · [Installation](https://www.kanunilabs.com/docs/pivotgrid/installation) · [Features guide](https://www.kanunilabs.com/docs/pivotgrid/features) · [FAQ](https://www.kanunilabs.com/docs/pivotgrid/faq)
|
|
128
|
+
- [API reference](https://www.kanunilabs.com/docs/pivotgrid/api)
|
|
129
|
+
- [Changelog](https://www.kanunilabs.com/changelog)
|
|
130
|
+
- Questions? [Contact us](https://www.kanunilabs.com/contact) — <hello@kanunilabs.com>
|
|
131
|
+
|
|
132
|
+
**Have an idea, feature request or bug report?** We want to hear it — the grid
|
|
133
|
+
is shaped by real-world feedback, and every message gets read and answered.
|
|
134
|
+
Write to <hello@kanunilabs.com> or use the
|
|
135
|
+
[contact form](https://www.kanunilabs.com/contact).
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
**KanuniLabs Community License v1.0** — free to use in commercial and
|
|
140
|
+
non-commercial applications; the source code is proprietary (no
|
|
141
|
+
redistribution/modification of the package itself). See [LICENSE](./LICENSE)
|
|
142
|
+
for the full terms. Enterprise features are licensed separately — see
|
|
143
|
+
[kanunilabs.com/pricing](https://www.kanunilabs.com/pricing).
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
<p align="center">© 2026 KanuniLabs · <a href="https://www.kanunilabs.com">kanunilabs.com</a> · <a href="mailto:hello@kanunilabs.com">hello@kanunilabs.com</a></p>
|