@revolist/react-datagrid 4.21.11 → 4.22.2

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
@@ -13,12 +13,21 @@
13
13
  <img src="https://badgen.net/bundlephobia/tree-shaking/@revolist/revogrid" alt="Tree shaking"/>
14
14
  <img src="https://img.shields.io/bundlephobia/min/@revolist/revogrid" alt="Bundle size"/>
15
15
  <img src="https://sonarcloud.io/api/project_badges/measure?project=revolist_revogrid&metric=alert_status" alt="Sonar Quality Gate"/>
16
+ <a href="https://github.com/revolist/revogrid/actions/workflows/unit.yml">
17
+ <img src="https://github.com/revolist/revogrid/actions/workflows/unit.yml/badge.svg" alt="Workflow status badge" loading="lazy" height="20">
18
+ </a>
19
+ <a href="https://github.com/revolist/revogrid/actions/workflows/e2e.yml">
20
+ <img src="https://github.com/revolist/revogrid/actions/workflows/e2e.yml/badge.svg" alt="Workflow status badge" loading="lazy" height="20">
21
+ </a>
16
22
  </p>
17
23
 
18
24
 
19
25
  <h3 align="center">Powerful React Data Grid component built on top of <a href="https://github.com/revolist/revogrid" target="_blank">RevoGrid</a>.</h3>
20
26
  <p align="center">
21
- Support Millions of cells and thousands of columns easy and efficiently for fast data rendering. Easy to use.
27
+ Render 1M+ rows, millions of cells, and thousands of columns efficiently with no hard row limit in the grid.
28
+ </p>
29
+ <p align="center">
30
+ Used by some of the largest companies in Europe and the United States.
22
31
  </p>
23
32
 
24
33
  <p align="center">
@@ -37,7 +46,7 @@ Support Millions of cells and thousands of columns easy and efficiently for fast
37
46
 
38
47
  ## Key Features
39
48
 
40
- - **High Performance**: Handles millions of cells in the viewport with a powerful core built by default.
49
+ - **High Performance**: Render 1M+ rows and millions of cells with no hard row limit in the grid. Virtualization keeps the DOM focused on the visible viewport.
41
50
 
42
51
  - **[Accessibility](https://rv-grid.com/guide/wcag)**: Follows WAI-ARIA best practices.
43
52
 
@@ -52,7 +61,7 @@ Support Millions of cells and thousands of columns easy and efficiently for fast
52
61
 
53
62
  - **[Intelligent Virtual DOM](https://rv-grid.com/guide/overview#VNode-Reactive-DOM)**: Smart row recombination to minimize redraws.
54
63
 
55
- - **[Virtual Scroll](https://rv-grid.com/guide/viewports)**: Handles large datasets with infinite scroll.
64
+ - **[Virtual Scroll](https://rv-grid.com/guide/viewports)**: Handles large datasets without rendering every row or column into the DOM.
56
65
 
57
66
  - **[Drag and Drop](https://rv-grid.com/guide/row/order)**: Drag and drop in [rows](https://rv-grid.com/guide/row/order) and [columns](https://rv-grid.com/guide/column/order).
58
67
 
@@ -105,20 +114,17 @@ Support Millions of cells and thousands of columns easy and efficiently for fast
105
114
 
106
115
  - **[Plugin System](https://rv-grid.com/guide/plugin/)**: Create custom plugins or extend existing ones easily.
107
116
 
108
- - **[Formula Support](https://rv-grid.com/guide/cell/formula)**: Evaluate formulas in cell data with Excel-like syntax, including basic arithmetic, statistical functions, and cell references.
109
- - **[Pivot Table](https://rv-grid.com/demo/pivot)**: Transform and analyze data dynamically with drag-and-drop field arrangement, aggregation functions, and interactive filtering capabilities.
110
-
111
- - **[Master Detail/Subtables/Forms](https://rv-grid.com/guide/row/master.pro)**: Expand rows to reveal child data.
112
- - **[Cell/Column/Row Span/Merge](https://rv-grid.com/guide/cell/merge)**: Merge cells to form groups.
113
- - **Auto Merge**: Automatically merges cells with identical values in a column.
114
- - **Form editig**: Edit forms directly within the grid, featuring all necessary fields, including custom options and markdown support for a fast and enhanced data entry experience.
115
-
116
117
  - **Customizations**:
117
118
  - [Column header template](https://rv-grid.com/guide/column/header.template).
118
119
  - [Row header template](https://rv-grid.com/guide/row/headers).
119
120
  - [Cell properties](https://rv-grid.com/guide/cell/) (define custom properties for rendered cells).
120
- - Nested grids: Build a grid inside a grid, showcasing advanced editing options and user interactions for a more dynamic data presentation.
121
- - Context Menu: Build context menus for any grid element - from cells to headers. Cut, copy, paste, add rows, modify columns, and more. Fully customizable with your own actions and behaviors.
121
+ - [Cell template](https://rv-grid.com/guide/cell/renderer) (create your own cell views).
122
+ - [Cell editor](https://rv-grid.com/guide/cell/editor) (use predefined or apply your own custom editors and cell types).
123
+
124
+ - **[AI Agents and MCP](https://rv-grid.com/guide/mcp)**: Connect Codex, Cursor, Claude Code, and VS Code to version-aware RevoGrid docs, examples, migrations, feature availability, and typed API context.
125
+
126
+ - **Rich API & Additional Improvements**: Explore hundreds of other small customizations and improvements in [RevoGrid](https://rv-grid.com/).
127
+
122
128
 
123
129
  - [Cell template](https://rv-grid.com/guide/react/renderer) (create your own cell views).
124
130
  - [Cell editor](https://rv-grid.com/guide/react/editor) (use predefined or apply your own custom editors and cell types).
@@ -321,6 +327,29 @@ If you or your company would like to support the ongoing development of RevoGrid
321
327
  Thank you for supporting RevoGrid! 🙏
322
328
 
323
329
 
330
+ ## Testing
331
+
332
+ [![Unit Tests](https://github.com/revolist/revogrid/actions/workflows/ci-unit.yml/badge.svg?branch=main)](https://github.com/revolist/revogrid/actions/workflows/ci-unit.yml)
333
+ [![E2E Tests](https://github.com/revolist/revogrid/actions/workflows/ci-e2e.yml/badge.svg?branch=main)](https://github.com/revolist/revogrid/actions/workflows/ci-e2e.yml)
334
+
335
+ RevoGrid is thoroughly tested to ensure reliability and stability.
336
+
337
+ | Suite | Command | Scope |
338
+ |---|---|---|
339
+ | Unit | `npm run test` | Services, utilities, pure logic |
340
+ | E2E (Playwright) | `npm run test:e2e` | Real browser rendering & interaction |
341
+
342
+ ### E2E Tests
343
+
344
+ End-to-end tests use [@stencil/playwright](https://www.npmjs.com/package/@stencil/playwright) to run `<revo-grid>` in a real Chromium browser. The dev server starts automatically when you run:
345
+
346
+ ```bash
347
+ npm run test:e2e
348
+ ```
349
+
350
+ Test files live in `e2e/` and share helpers from `e2e/helpers.ts`:
351
+
352
+
324
353
  ## Contributing
325
354
 
326
355
  By getting involved, you'll have the opportunity to enhance your skills, gain valuable experience, and make a significant impact on an innovative project. Your contribution, no matter how big or small, is valuable.
@@ -0,0 +1,24 @@
1
+ import { EditCell, ColumnDataSchemaModel, HyperFunc, VNode, EditorBase } from '@revolist/revogrid';
2
+ import { ReactElement } from './renderer';
3
+ import { ComponentType } from 'react';
4
+ /**
5
+ * Data passed to editor
6
+ */
7
+ export type EditorType = {
8
+ column: ColumnDataSchemaModel;
9
+ save: (value: any, preventFocus?: boolean) => void;
10
+ close: (focusNext?: boolean) => void;
11
+ } & Partial<EditCell>;
12
+ export declare class EditorAdapter implements EditorBase {
13
+ private EditorComponent;
14
+ column: ColumnDataSchemaModel;
15
+ private save;
16
+ private close;
17
+ element: ReactElement | null;
18
+ editCell?: EditCell;
19
+ private renderedComponent;
20
+ constructor(EditorComponent: ComponentType<EditorType>, column: ColumnDataSchemaModel, save: (value: any, preventFocus?: boolean) => void, close: (focusNext?: boolean) => void);
21
+ componentDidRender(): void;
22
+ disconnectedCallback(): void;
23
+ render(h: HyperFunc<VNode>): VNode;
24
+ }
@@ -0,0 +1,9 @@
1
+ import { EditorCtr } from '@revolist/revogrid';
2
+ import { ComponentType } from 'react';
3
+ import { EditorType } from './editor.adapter';
4
+ /**
5
+ * Create editor constructor.
6
+ * This function creates editor constructor by wrapping it with EditorAdapter
7
+ * which is responsible for connecting editor with grid.
8
+ */
9
+ export declare const Editor: (EditorComponent: ComponentType<EditorType>) => EditorCtr;
package/dist/index.d.ts CHANGED
@@ -1,73 +1,7 @@
1
- import { ColumnDataSchemaModel } from '@revolist/revogrid';
2
- import { ColumnTemplateProp } from '@revolist/revogrid';
3
- import { ComponentType } from 'react';
4
- import { EditCell } from '@revolist/revogrid';
5
- import { EditorBase } from '@revolist/revogrid';
6
- import { EditorCtr } from '@revolist/revogrid';
7
- import { ForwardRefExoticComponent } from 'react';
8
- import { HTMLAttributes } from 'react';
9
- import { HyperFunc } from '@revolist/revogrid';
10
- import { JSX as JSX_2 } from '@revolist/revogrid';
11
- import { RefAttributes } from 'react';
12
- import { Root } from 'react-dom/client';
13
- import { VNode } from '@revolist/revogrid';
14
-
15
- /**
16
- * Create editor constructor.
17
- * This function creates editor constructor by wrapping it with EditorAdapter
18
- * which is responsible for connecting editor with grid.
19
- */
20
- export declare const Editor: (EditorComponent: ComponentType<EditorType>) => EditorCtr;
21
-
22
- export declare class EditorAdapter implements EditorBase {
23
- private EditorComponent;
24
- column: ColumnDataSchemaModel;
25
- private save;
26
- private close;
27
- element: ReactElement | null;
28
- editCell?: EditCell;
29
- private renderedComponent;
30
- constructor(EditorComponent: ComponentType<EditorType>, column: ColumnDataSchemaModel, save: (value: any, preventFocus?: boolean) => void, close: (focusNext?: boolean) => void);
31
- componentDidRender(): void;
32
- disconnectedCallback(): void;
33
- render(h: HyperFunc<VNode>): VNode;
34
- }
35
-
36
- /**
37
- * Data passed to editor
38
- */
39
- export declare type EditorType = {
40
- column: ColumnDataSchemaModel;
41
- save: (value: any, preventFocus?: boolean) => void;
42
- close: (focusNext?: boolean) => void;
43
- } & Partial<EditCell>;
44
-
45
- export declare interface ReactElement extends HTMLElement {
46
- _root?: Root;
47
- }
48
-
49
- export declare interface RenderedComponent<T> {
50
- update: (newProps: T) => void;
51
- destroy: () => void;
52
- }
53
-
54
- export declare const RevoGrid: ForwardRefExoticComponent<JSX_2.RevoGrid & Omit<HTMLAttributes<HTMLRevoGridElement>, "style"> & StyleReactProps & RefAttributes<HTMLRevoGridElement>>;
55
-
56
- declare interface StyleReactProps {
57
- class?: string;
58
- className?: string;
59
- style?: {
60
- [key: string]: any;
61
- };
62
- }
63
-
64
- /**
65
- * Render React component in Grid column template.
66
- */
67
- export declare const Template: (ReactComponent: ComponentType<ColumnDataSchemaModel | ColumnTemplateProp>, customProps?: any) => (h: HyperFunc<VNode>, p: ColumnDataSchemaModel | ColumnTemplateProp, addition?: any) => VNode;
68
-
69
-
70
- export * from "@revolist/revogrid";
71
- export * from "@revolist/revogrid/loader";
72
-
73
- export { }
1
+ import { JSX } from '@revolist/revogrid';
2
+ export * from '@revolist/revogrid/loader';
3
+ export * from '@revolist/revogrid';
4
+ export { type EditorType, EditorAdapter } from './editor.adapter';
5
+ export declare const RevoGrid: import('react').ForwardRefExoticComponent<JSX.RevoGrid & Omit<import('react').HTMLAttributes<HTMLRevoGridElement>, "style"> & import('./react-component-lib/interfaces').StyleReactProps & import('react').RefAttributes<HTMLRevoGridElement>>;
6
+ export { Template, type ReactElement, type RenderedComponent, } from './renderer';
7
+ export { Editor } from './editor';
@@ -0,0 +1,16 @@
1
+ export declare const attachProps: (node: HTMLElement, newProps: any, oldProps?: any) => void;
2
+ export declare const getClassName: (classList: DOMTokenList, newProps: any, oldProps: any) => string;
3
+ /**
4
+ * Transforms a React event name to a browser event name.
5
+ */
6
+ export declare const transformReactEventName: (eventNameSuffix: string) => string;
7
+ /**
8
+ * Checks if an event is supported in the current execution environment.
9
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
10
+ */
11
+ export declare const isCoveredByReact: (eventNameSuffix: string) => boolean;
12
+ export declare const syncEvent: (node: Element & {
13
+ __events?: {
14
+ [key: string]: ((e: Event) => any) | undefined;
15
+ };
16
+ }, eventName: string, newEventHandler?: (e: Event) => any) => void;
@@ -0,0 +1,2 @@
1
+ export declare const dashToPascalCase: (str: string) => string;
2
+ export declare const camelToDashCase: (str: string) => string;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export interface HTMLStencilElement extends HTMLElement {
3
+ componentOnReady(): Promise<this>;
4
+ }
5
+ interface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {
6
+ forwardedRef: React.RefObject<ElementType>;
7
+ ref?: React.Ref<any>;
8
+ }
9
+ export declare const createReactComponent: <PropType, ElementType extends HTMLStencilElement, ContextStateType = {}, ExpandedPropsTypes = {}>(tagName: string, ReactComponentContext?: React.Context<ContextStateType>, manipulatePropsFunction?: (originalProps: StencilReactInternalProps<ElementType>, propsToPass: any) => ExpandedPropsTypes, defineCustomElement?: () => void) => React.ForwardRefExoticComponent<React.PropsWithoutRef<import('./utils').StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
10
+ export {};
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ import { OverlayEventDetail } from './interfaces';
3
+ import { StencilReactForwardedRef } from './utils';
4
+ interface OverlayElement extends HTMLElement {
5
+ present: () => Promise<void>;
6
+ dismiss: (data?: any, role?: string | undefined) => Promise<boolean>;
7
+ }
8
+ export interface ReactOverlayProps {
9
+ children?: React.ReactNode;
10
+ isOpen: boolean;
11
+ onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
12
+ onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
13
+ onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
14
+ onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
15
+ }
16
+ export declare const createOverlayComponent: <OverlayComponent extends object, OverlayType extends OverlayElement>(tagName: string, controller: {
17
+ create: (options: any) => Promise<OverlayType>;
18
+ }, customElement?: any) => React.ForwardRefExoticComponent<React.PropsWithoutRef<OverlayComponent & ReactOverlayProps & {
19
+ forwardedRef?: StencilReactForwardedRef<OverlayType>;
20
+ }> & React.RefAttributes<OverlayType>>;
21
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const isDevMode: () => boolean;
2
+ export declare const deprecationWarning: (key: string, message: string) => void;
@@ -0,0 +1,2 @@
1
+ export { createReactComponent } from './createComponent';
2
+ export { createOverlayComponent } from './createOverlayComponent';
@@ -0,0 +1,29 @@
1
+ export interface EventEmitter<T = any> {
2
+ emit: (data?: T) => CustomEvent<T>;
3
+ }
4
+ export interface StyleReactProps {
5
+ class?: string;
6
+ className?: string;
7
+ style?: {
8
+ [key: string]: any;
9
+ };
10
+ }
11
+ export interface OverlayEventDetail<T = any> {
12
+ data?: T;
13
+ role?: string;
14
+ }
15
+ export interface OverlayInterface {
16
+ el: HTMLElement;
17
+ animated: boolean;
18
+ keyboardClose: boolean;
19
+ overlayIndex: number;
20
+ presented: boolean;
21
+ enterAnimation?: any;
22
+ leaveAnimation?: any;
23
+ didPresent: EventEmitter<void>;
24
+ willPresent: EventEmitter<void>;
25
+ willDismiss: EventEmitter<OverlayEventDetail>;
26
+ didDismiss: EventEmitter<OverlayEventDetail>;
27
+ present(): Promise<void>;
28
+ dismiss(data?: any, role?: string): Promise<boolean>;
29
+ }
@@ -0,0 +1,16 @@
1
+ export declare const attachProps: (node: HTMLElement, newProps: any, oldProps?: any) => void;
2
+ export declare const getClassName: (classList: DOMTokenList, newProps: any, oldProps: any) => string;
3
+ /**
4
+ * Transforms a React event name to a browser event name.
5
+ */
6
+ export declare const transformReactEventName: (eventNameSuffix: string) => string;
7
+ /**
8
+ * Checks if an event is supported in the current execution environment.
9
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
10
+ */
11
+ export declare const isCoveredByReact: (eventNameSuffix: string) => boolean;
12
+ export declare const syncEvent: (node: Element & {
13
+ __events?: {
14
+ [key: string]: ((e: Event) => any) | undefined;
15
+ };
16
+ }, eventName: string, newEventHandler?: (e: Event) => any) => void;
@@ -0,0 +1,2 @@
1
+ export declare const dashToPascalCase: (str: string) => string;
2
+ export declare const camelToDashCase: (str: string) => string;
@@ -0,0 +1,2 @@
1
+ export declare const isDevMode: () => boolean;
2
+ export declare const deprecationWarning: (key: string, message: string) => void;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { StyleReactProps } from '../interfaces';
3
+ export type StencilReactExternalProps<PropType, ElementType> = PropType & Omit<React.HTMLAttributes<ElementType>, 'style'> & StyleReactProps;
4
+ export type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;
5
+ export declare const setRef: (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => void;
6
+ export declare const mergeRefs: (...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]) => React.RefCallback<any>;
7
+ export declare const createForwardRef: <PropType, ElementType>(ReactComponent: any, displayName: string) => React.ForwardRefExoticComponent<React.PropsWithoutRef<StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
8
+ export declare const defineCustomElement: (tagName: string, customElement: any) => void;
9
+ export * from './attachProps';
10
+ export * from './case';