@revolist/react-datagrid 4.0.50 → 4.8.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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <a href="https://revolist.github.io/revogrid">
2
+ <a href="https://rv-grid.com">
3
3
  <img src="./assets/logo.svg" alt="RevoGrid" height="150" />
4
4
  </a>
5
5
  </p>
@@ -20,7 +20,7 @@ Support Millions of cells and thousands of columns easy and efficiently for fast
20
20
  </p>
21
21
 
22
22
  <p align="center">
23
- <a href="https://revolist.github.io/revogrid">Demo and API</a> •
23
+ <a href="https://rv-grid.com">Demo and API</a> •
24
24
  <a href="#key-features">Key Features</a> •
25
25
  <a href="#basic-usage">How To Use</a> •
26
26
  <a href="#installation">Installation</a> •
@@ -75,7 +75,7 @@ Support Millions of cells and thousands of columns easy and efficiently for fast
75
75
  - Cell editor (use predefined or apply your own custom editors and cell types).
76
76
  - Cell properties (define custom properties for rendered cells).
77
77
 
78
- - **Column Types**: [More details](https://revolist.github.io/revogrid/guide/column.types.html)
78
+ - **Column Types**: [More details](https://rv-grid.com/guide/column/#Column-Formats)
79
79
  - Text/String (default).
80
80
  - Number.
81
81
  - Select.
@@ -98,13 +98,13 @@ Support Millions of cells and thousands of columns easy and efficiently for fast
98
98
 
99
99
  - **Plugin System**: Create custom plugins or extend existing ones easily.
100
100
 
101
- - **Additional Customizations and Improvements**: Explore hundreds of other small customizations and improvements in [RevoGrid](https://revolist.github.io/revogrid).
101
+ - **Additional Customizations and Improvements**: Explore hundreds of other small customizations and improvements in [RevoGrid](https://rv-grid.com/).
102
102
 
103
103
  <br>
104
104
 
105
105
 
106
106
 
107
- ### Usage React [Example](https://codesandbox.io/s/data-vue-test-3wkzi?file=/src/App.vue)
107
+ ### Usage React
108
108
 
109
109
  With NPM:
110
110
 
@@ -120,21 +120,13 @@ yarn add @revolist/react-datagrid;
120
120
 
121
121
  ```tsx
122
122
  // App.tsx
123
- import { RevoGrid, Template, Editor, type EditorType } from '@revolist/react-datagrid';
124
- import { ColumnDataSchemaModel, Editors } from '@revolist/revogrid';
125
- import { createContext, useContext } from 'react';
126
-
127
- /**
128
- * Showcase
129
- */
130
- export const LevelContext = createContext('My custom context to pass to cell');
123
+ import { RevoGrid, Template, Editor, type EditorType, type ColumnDataSchemaModel, type Editors } from '@revolist/react-datagrid';
131
124
 
132
125
  /**
133
126
  * Custom cell component
134
127
  */
135
- const Cell = ({ model, prop }: ColumnDataSchemaModel) => {
136
- const level = useContext(LevelContext);
137
- return <div><strong title={level}>{model[prop]}</strong></div>;
128
+ const Cell = ({ model, prop, value }: ColumnDataSchemaModel) => {
129
+ return <div><strong>{value}</strong></div>;
138
130
  };
139
131
 
140
132
  /**
@@ -180,28 +172,63 @@ export default App
180
172
 
181
173
  ```
182
174
 
175
+ [Example and guide](https://rv-grid.com/guide/react/)
183
176
 
184
- ## Versions
185
177
 
186
- - **2.0+**: Introduced the plugin system, grouping, sorting, and filtering.
187
- - **3.0+**: Breaking changes introduced. See the [migration guide](./docs/guide/migration.md).
188
- This version features new component loading, ESM modules, Bootstrap support, and much [more](./docs/guide/migration.md).
189
- - **4.0+**: Breaking changes introduced. See the [migration guide](./docs/guide/migration.md). In this version, we rethought our framework approach, updated typings, fixed major issues, updated core and significantly improved overall performance. The grid is now much faster, with better plugin support and full framework support for Angular, React, and Vue, along with partial support for Ember and Svelte. Redesigned the documentation, and added more examples.
190
178
 
179
+ ## 🚨 Repository Notice 🚨
191
180
 
181
+ **TL;DR:** This repo is read-only and will be **deprecated** in v5+ in favor of monorepos. Post issues [here](https://github.com/revolist/revogrid). Happy coding! 🖥️💻
192
182
 
193
- ## Sponsors
194
183
 
195
- We would like to extend our heartfelt gratitude to our sponsor for their generous support. Their contributions help us maintain and develop RevoGrid, ensuring continuous improvements and updates. If you are using RevoGrid in your project and would like to support its development, consider becoming a sponsor.
184
+ ## Versions
196
185
 
197
- ### Our Sponsors
186
+ - **2.0+**: Introduced the plugin system, grouping, sorting, and filtering.
187
+ - **3.0+**: Breaking changes introduced:
188
+ - Removed the redundant viewport component.
189
+ - Renamed classes to support Bootstrap and other libraries:
190
+ - `row` -> `rgRow`
191
+ - `col` -> `rgCol`
192
+ - `data-cell` -> `rgCell`
193
+ - `data-header-cell` -> `rgHeaderCell`
194
+ - Migrated all method names to lowercase to align with modern event naming conventions. For example, `afterEdit` is now `afteredit`. Check the API for details.
195
+ - Added support for pure ESM modules to enable the use of the grid in all modern frontend tooling like Vite, Parcel, etc. You can now import custom elements without lazy loading. Note that you are responsible for polyfills.
196
+
197
+
198
+ - **4.0+**: Breaking changes introduced. See the [migration guide](https://rv-grid.com/guide/migration).
199
+
200
+ - Redesigned type support:
201
+ - Removed deprecated namespaces:
202
+ - **Before**: `RevoGrid.ColumnDataSchemaRegular`
203
+ - **Now**: `ColumnDataSchemaRegular`;
204
+ - Improved type import:
205
+ - **Before**: `import { RevoGrid } from '@revolist/revogrid/dist/types/interfaces'`
206
+ - **Now**: `import { ColumnDataSchemaRegular } from '@revolist/revogrid'`.
207
+ - Changed viewport type names everywhere. For example, before: `rowDefinitions: [{ type: "row", index: 0, size: 145 }]`, after: `rowDefinitions: [{ type: "rgRow", index: 0, size: 145 }]`.
208
+ - Updated [event](https://rv-grid.com/guide/api/revoGrid.html#Events) naming convention. Review your [event](https://rv-grid.com/guide/api/revoGrid.html#Events) usage. [Event names](https://rv-grid.com/guide/api/revoGrid.html#Events) are all lowercase now and are aligned with modern event naming conventions. For example, `afterEdit` -> `afteredit`.
209
+
210
+ - **Major improvements**:
211
+ - Rethought the entire framework approach. Introduced Pro version with advance support and pro features.
212
+ - Introduced slot support.
213
+ - Updated scrolling system for better mobile support.
214
+ - Advance template support. Introduced `additionalData` for templates and editors. `Prop` gives access to parent/root app context.
215
+ - Redesigned the documentation.
216
+ - Fixed major issues and significantly improved overall performance, making the grid multiple time faster.
217
+ - Enhanced plugin support - now with full access to grid providers.
218
+ - Updated documentation.
219
+ - Provided full framework support and native render for Angular, React, Svelte and Vue.
220
+
221
+
222
+ ## Our Sponsors
223
+
224
+ We would like to extend our heartfelt gratitude to our sponsors for their generous support. Their contributions help us maintain and develop RevoGrid, ensuring continuous improvements and updates.
198
225
 
199
226
  [![Altruistiq](https://cdn.prod.website-files.com/62cd69e08130a1a33f5ef900/6310b4d500e971695db5e9c3_615b5db69ce8931a276e5ed2_Social_Icons_AQ_3_32x32.png)](https://altruistiq.com)
200
227
 
201
228
 
202
229
  ### Become a Sponsor
203
230
 
204
- If you or your company would like to support the ongoing development of RevoGrid, please consider becoming a sponsor. Your support will help us continue to improve the project and provide the best possible tool for the community.
231
+ If you or your company would like to support the ongoing development of RevoGrid, please consider becoming a sponsor or use or [Pro version](https://rv-grid.com/pro/). Your support will help us continue to improve the project and provide the best possible tool for the community.
205
232
 
206
233
  [![Sponsor Us](https://img.shields.io/badge/Sponsor%20Us-%F0%9F%92%96-brightgreen)](https://opencollective.com/revogrid)
207
234
 
@@ -200,6 +200,7 @@ const Template = (ReactComponent, customProps) => {
200
200
  props.addition = addition;
201
201
  let lastEl = null;
202
202
  return h("span", {
203
+ key: `${p.prop}-${p.rowIndex}`,
203
204
  ref: (el) => {
204
205
  lastEl = TemplateConstructor(el, ReactComponent, props, lastEl);
205
206
  }
@@ -226,7 +227,9 @@ class EditorAdapter {
226
227
  this.renderedComponent = null;
227
228
  }
228
229
  render(h) {
230
+ var _a;
229
231
  return h("span", {
232
+ key: `${this.column.prop}-${((_a = this.editCell) == null ? void 0 : _a.rowIndex) || 0}`,
230
233
  ref: (el) => this.renderedComponent = TemplateConstructor(
231
234
  el,
232
235
  this.EditorComponent,
@@ -200,6 +200,7 @@ var __publicField = (obj, key, value) => {
200
200
  props.addition = addition;
201
201
  let lastEl = null;
202
202
  return h("span", {
203
+ key: `${p.prop}-${p.rowIndex}`,
203
204
  ref: (el) => {
204
205
  lastEl = TemplateConstructor(el, ReactComponent, props, lastEl);
205
206
  }
@@ -226,7 +227,9 @@ var __publicField = (obj, key, value) => {
226
227
  this.renderedComponent = null;
227
228
  }
228
229
  render(h) {
230
+ var _a;
229
231
  return h("span", {
232
+ key: `${this.column.prop}-${((_a = this.editCell) == null ? void 0 : _a.rowIndex) || 0}`,
230
233
  ref: (el) => this.renderedComponent = TemplateConstructor(
231
234
  el,
232
235
  this.EditorComponent,
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@revolist/react-datagrid",
3
3
  "sideEffects": false,
4
- "version": "4.0.50",
4
+ "version": "4.8.1",
5
5
  "description": "React DataGrid Spreadsheet component with native cell render support",
6
- "main": "./dist/react-datagrid.umd.js",
6
+ "main": "./dist/react-datagrid.umd.cjs",
7
7
  "module": "./dist/react-datagrid.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
@@ -64,7 +64,7 @@
64
64
  "homepage": "https://github.com/revolist/revogrid#readme",
65
65
  "license": "MIT",
66
66
  "dependencies": {
67
- "@revolist/revogrid": "4.0.50"
67
+ "@revolist/revogrid": "4.8.1"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@types/react": "^18.3.2",