@kanunilabs/pivotgrid-react 1.0.1 → 1.0.3

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.
Files changed (2) hide show
  1. package/README.md +107 -22
  2. package/package.json +34 -8
package/README.md CHANGED
@@ -1,18 +1,60 @@
1
- # @kanunilabs/pivotgrid-react
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>
2
4
 
3
- React components for KanuniLabs PivotGrid drag-and-drop field areas, virtualized grid body, header filters, context menus, and theming.
5
+ <h1 align="center">KanuniLabs PivotGrid for React</h1>
4
6
 
5
- ## Installation
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.png" alt="KanuniLabs PivotGrid for React — drag-and-drop pivot table 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 2,000,000 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.
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
6
52
 
7
53
  ```bash
8
54
  npm install @kanunilabs/pivotgrid-react
9
55
  ```
10
56
 
11
- (or `yarn add` / `pnpm add` any package manager works.)
12
-
13
- `@kanunilabs/pivotgrid-core` is installed automatically as a dependency.
14
-
15
- ## Usage
57
+ `@kanunilabs/pivotgrid-core` (the engine) is installed automatically.
16
58
 
17
59
  ```tsx
18
60
  import { BasePivotGrid } from '@kanunilabs/pivotgrid-react';
@@ -32,25 +74,68 @@ function App() {
32
74
  }
33
75
  ```
34
76
 
35
- The stylesheet is scoped under `.kanuni-pivot-root` it does not leak into
36
- your application styles and works with or without Tailwind.
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
+ ### Bundler note: the Web Worker
80
+
81
+ The engine resolves its worker via `import.meta.url`, which some bundlers can't
82
+ follow into `node_modules`. If the grid renders but never shows data, pass the
83
+ `workerUrl` prop:
84
+
85
+ **Vite** — import the worker as an asset URL (no manual copying, survives
86
+ `npm update`):
87
+
88
+ ```jsx
89
+ import workerUrl from '@kanunilabs/pivotgrid-core/dist/pivot.worker.js?url';
90
+
91
+ <BasePivotGrid workerUrl={workerUrl} /* ... */ />
92
+ ```
93
+
94
+ **Next.js / other bundlers** — copy
95
+ `@kanunilabs/pivotgrid-core/dist/pivot.worker.js` into a served path (e.g.
96
+ `public/kanunilabs/`) and pass `workerUrl="/kanunilabs/pivot.worker.js"`. See
97
+ the [Next.js setup guide](https://www.kanunilabs.com/docs/pivotgrid/nextjs).
98
+
99
+ ## Enterprise edition
37
100
 
38
- > **Next.js / bundlers that can't resolve `import.meta.url` workers:** copy
39
- > `@kanunilabs/pivotgrid-core/dist/pivot.worker.js` into a served path (e.g.
40
- > `public/kanunilabs/`) and pass it via the `workerUrl` prop.
101
+ Advanced analytics ship in `@kanunilabs/pivotgrid-react-enterprise` a drop-in
102
+ replacement for `BasePivotGrid` that adds:
41
103
 
42
- ## Peer Dependencies
104
+ | Feature | |
105
+ | --- | --- |
106
+ | **Calculated fields** | No-code formula editor with live preview (CSP-safe, no `eval`) |
107
+ | **Chart integration** | Sync any pivot view to charts — column, bar, line, area, pie, scatter & more |
108
+ | **Drill-down** | Open the source records behind any aggregated cell |
109
+ | **Prefilter builder** | Visual condition builder applied inside the worker |
110
+ | **Node context menu** | Right-click bulk expand/collapse on any row or column node |
111
+ | **Styled Excel & PDF export** | Formatted, streaming Excel export and print-ready PDF |
43
112
 
44
- - `react` / `react-dom` >= 18
45
- - `@dnd-kit/core` drag-and-drop
46
- - `lucide-react` — icons
47
- - `zustand` — state management
48
- - via core: `xlsx` (import), `file-saver` (export)
113
+ See [Pricing](https://www.kanunilabs.com/pricing) for licenses — this community
114
+ package stays free either way.
49
115
 
50
- npm ≥ 7 and pnpm install these automatically.
116
+ ## Compatibility
117
+
118
+ - React 18 and React 19
119
+ - TypeScript types included (strict-mode clean)
120
+ - All evergreen browsers (Chrome, Edge, Firefox, Safari)
121
+ - Works with Vite, Next.js (App Router), CRA and plain Webpack/Rollup setups
122
+
123
+ ## Resources
124
+
125
+ - [Live demos & playground](https://www.kanunilabs.com/playground/pivotgrid)
126
+ - [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)
127
+ - [API reference](https://www.kanunilabs.com/docs/pivotgrid/api)
128
+ - [Changelog](https://www.kanunilabs.com/changelog)
129
+ - Questions? [Contact us](https://www.kanunilabs.com/contact) — <hello@kanunilabs.com>
51
130
 
52
131
  ## License
53
132
 
54
133
  **KanuniLabs Community License v1.0** — free to use in commercial and
55
- non-commercial applications; the source code is proprietary. See
56
- [LICENSE](./LICENSE) for the full terms.
134
+ non-commercial applications; the source code is proprietary (no
135
+ redistribution/modification of the package itself). See [LICENSE](./LICENSE)
136
+ for the full terms. Enterprise features are licensed separately — see
137
+ [kanunilabs.com/pricing](https://www.kanunilabs.com/pricing).
138
+
139
+ ---
140
+
141
+ <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>
package/package.json CHANGED
@@ -1,8 +1,39 @@
1
1
  {
2
2
  "name": "@kanunilabs/pivotgrid-react",
3
- "version": "1.0.1",
4
- "description": "React components for KanuniLabs PivotGrid",
3
+ "version": "1.0.3",
4
+ "description": "High-performance React pivot table with a Web Worker engine — drag-and-drop pivoting, filtering, sorting, theming and export",
5
+ "keywords": [
6
+ "react",
7
+ "react-component",
8
+ "pivot",
9
+ "pivot-table",
10
+ "pivot-grid",
11
+ "pivotgrid",
12
+ "data-grid",
13
+ "datagrid",
14
+ "table",
15
+ "olap",
16
+ "cross-tab",
17
+ "aggregation",
18
+ "analytics",
19
+ "reporting",
20
+ "business-intelligence",
21
+ "web-worker",
22
+ "virtualized",
23
+ "drag-and-drop",
24
+ "excel",
25
+ "export",
26
+ "i18n",
27
+ "rtl",
28
+ "typescript"
29
+ ],
5
30
  "license": "SEE LICENSE IN LICENSE",
31
+ "author": "KanuniLabs <hello@kanunilabs.com> (https://www.kanunilabs.com)",
32
+ "homepage": "https://www.kanunilabs.com",
33
+ "bugs": {
34
+ "email": "hello@kanunilabs.com",
35
+ "url": "https://www.kanunilabs.com/contact"
36
+ },
6
37
  "type": "module",
7
38
  "exports": {
8
39
  ".": {
@@ -29,7 +60,7 @@
29
60
  "access": "public"
30
61
  },
31
62
  "dependencies": {
32
- "@kanunilabs/pivotgrid-core": "1.0.1"
63
+ "@kanunilabs/pivotgrid-core": "1.0.3"
33
64
  },
34
65
  "devDependencies": {
35
66
  "@tailwindcss/postcss": "^4.3.0",
@@ -44,11 +75,6 @@
44
75
  "react-dom": ">=18.0.0",
45
76
  "zustand": ">=5.0.0"
46
77
  },
47
- "repository": {
48
- "type": "git",
49
- "url": "https://github.com/kanunilabs/pivotgrid",
50
- "directory": "packages/react"
51
- },
52
78
  "scripts": {
53
79
  "build": "tsup && node scripts/build-css.mjs",
54
80
  "build:css": "node scripts/build-css.mjs",