@equinor/eds-data-grid-react 1.2.2 → 1.2.4

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.
@@ -539,7 +539,8 @@ function TableRow({
539
539
  } catch (error) {
540
540
  // Silently catch any errors during measurement to prevent crashes
541
541
  // This can happen if the virtualizer is in an inconsistent state during unmount
542
- if (process.env.NODE_ENV === 'development') {
542
+ const g = globalThis;
543
+ if (g.process?.env?.NODE_ENV === 'development') {
543
544
  console.warn('Failed to measure element during virtualization:', error);
544
545
  }
545
546
  }
@@ -595,7 +596,8 @@ function addPxSuffixIfInputHasNoPrefix(size) {
595
596
  return size;
596
597
  }
597
598
  function logDevelopmentWarningOfPropUse(deprecatedProps) {
598
- if (process.env.NODE_ENV !== 'development') {
599
+ const g = globalThis;
600
+ if (g.process?.env?.NODE_ENV !== 'development') {
599
601
  return;
600
602
  }
601
603
  for (const [key, {
@@ -3,11 +3,11 @@ import { getSortedRowModel, getCoreRowModel, getExpandedRowModel, getFacetedRowM
3
3
  import { useVirtualizer } from '@tanstack/react-virtual';
4
4
  import { forwardRef, useState, useEffect, useMemo, useRef, useCallback } from 'react';
5
5
  import styled from 'styled-components';
6
- import { TableProvider } from './EdsDataGridContext.mjs';
7
- import { TableHeaderRow } from './components/TableHeaderRow.mjs';
8
- import { TableFooterRow } from './components/TableFooterRow.mjs';
9
- import { TableRow } from './components/TableRow.mjs';
10
- import { addPxSuffixIfInputHasNoPrefix, logDevelopmentWarningOfPropUse, getMeasureElementHandler } from './utils.mjs';
6
+ import { TableProvider } from './EdsDataGridContext.js';
7
+ import { TableHeaderRow } from './components/TableHeaderRow.js';
8
+ import { TableFooterRow } from './components/TableFooterRow.js';
9
+ import { TableRow } from './components/TableRow.js';
10
+ import { addPxSuffixIfInputHasNoPrefix, logDevelopmentWarningOfPropUse, getMeasureElementHandler } from './utils.js';
11
11
  import { mergeRefs } from '@equinor/eds-utils';
12
12
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
13
13
 
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from 'react';
2
- import { DebouncedInput } from './DebouncedInput.mjs';
2
+ import { DebouncedInput } from './DebouncedInput.js';
3
3
  import styled from 'styled-components';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
@@ -2,9 +2,9 @@ import { useState, useRef, useCallback } from 'react';
2
2
  import { Button, Icon, Popover } from '@equinor/eds-core-react';
3
3
  import { filter_alt_active, filter_alt } from '@equinor/eds-icons';
4
4
  import { tokens } from '@equinor/eds-tokens';
5
- import { Filter } from './Filter.mjs';
6
- import { useTableContext } from '../EdsDataGridContext.mjs';
7
- import { FilterVisibility } from './TableCell.mjs';
5
+ import { Filter } from './Filter.js';
6
+ import { useTableContext } from '../EdsDataGridContext.js';
7
+ import { FilterVisibility } from './TableCell.js';
8
8
  import { jsxs, jsx } from 'react/jsx-runtime';
9
9
 
10
10
  /* istanbul ignore file */
@@ -2,7 +2,7 @@ import { Table } from '@equinor/eds-core-react';
2
2
  import { flexRender } from '@tanstack/react-table';
3
3
  import { useMemo } from 'react';
4
4
  import styled from 'styled-components';
5
- import { useTableContext } from '../EdsDataGridContext.mjs';
5
+ import { useTableContext } from '../EdsDataGridContext.js';
6
6
  import { jsx } from 'react/jsx-runtime';
7
7
 
8
8
  const StyledCell = styled(Table.Cell).withConfig({
@@ -1,7 +1,7 @@
1
1
  import { Table } from '@equinor/eds-core-react';
2
2
  import { tokens } from '@equinor/eds-tokens';
3
3
  import styled from 'styled-components';
4
- import { ResizeInner } from './Resizer.mjs';
4
+ import { ResizeInner } from './Resizer.js';
5
5
 
6
6
  const FilterVisibility = styled.div.withConfig({
7
7
  displayName: "TableCell__FilterVisibility",
@@ -1,9 +1,9 @@
1
1
  import { flexRender } from '@tanstack/react-table';
2
- import { useTableContext } from '../EdsDataGridContext.mjs';
2
+ import { useTableContext } from '../EdsDataGridContext.js';
3
3
  import { useMemo } from 'react';
4
- import { SortIndicator } from './SortIndicator.mjs';
5
- import { Resizer, ResizeInner } from './Resizer.mjs';
6
- import { TableCell } from './TableCell.mjs';
4
+ import { SortIndicator } from './SortIndicator.js';
5
+ import { Resizer, ResizeInner } from './Resizer.js';
6
+ import { TableCell } from './TableCell.js';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
 
9
9
  function TableFooterCell({
@@ -1,5 +1,5 @@
1
1
  import { Table } from '@equinor/eds-core-react';
2
- import { TableFooterCell } from './TableFooterCell.mjs';
2
+ import { TableFooterCell } from './TableFooterCell.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
5
  function TableFooterRow({
@@ -1,10 +1,10 @@
1
1
  import { flexRender } from '@tanstack/react-table';
2
- import { useTableContext } from '../EdsDataGridContext.mjs';
2
+ import { useTableContext } from '../EdsDataGridContext.js';
3
3
  import { useMemo } from 'react';
4
- import { FilterWrapper } from './FilterWrapper.mjs';
5
- import { SortIndicator } from './SortIndicator.mjs';
6
- import { Resizer, ResizeInner } from './Resizer.mjs';
7
- import { TableCell, FilterVisibility } from './TableCell.mjs';
4
+ import { FilterWrapper } from './FilterWrapper.js';
5
+ import { SortIndicator } from './SortIndicator.js';
6
+ import { Resizer, ResizeInner } from './Resizer.js';
7
+ import { TableCell, FilterVisibility } from './TableCell.js';
8
8
  import styled from 'styled-components';
9
9
  import { useEds } from '@equinor/eds-core-react';
10
10
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { Table } from '@equinor/eds-core-react';
2
- import { TableHeaderCell } from './TableHeaderCell.mjs';
2
+ import { TableHeaderCell } from './TableHeaderCell.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
5
  function TableHeaderRow({
@@ -1,8 +1,8 @@
1
1
  import { Table } from '@equinor/eds-core-react';
2
2
  import { useRef, useEffect, useCallback } from 'react';
3
3
  import styled from 'styled-components';
4
- import { useTableContext } from '../EdsDataGridContext.mjs';
5
- import { TableBodyCell } from './TableBodyCell.mjs';
4
+ import { useTableContext } from '../EdsDataGridContext.js';
5
+ import { TableBodyCell } from './TableBodyCell.js';
6
6
  import { jsx } from 'react/jsx-runtime';
7
7
 
8
8
  function TableRow({
@@ -36,7 +36,8 @@ function TableRow({
36
36
  } catch (error) {
37
37
  // Silently catch any errors during measurement to prevent crashes
38
38
  // This can happen if the virtualizer is in an inconsistent state during unmount
39
- if (process.env.NODE_ENV === 'development') {
39
+ const g = globalThis;
40
+ if (g.process?.env?.NODE_ENV === 'development') {
40
41
  console.warn('Failed to measure element during virtualization:', error);
41
42
  }
42
43
  }
@@ -0,0 +1,4 @@
1
+ export { createColumnHelper } from '@tanstack/react-table';
2
+ export { EdsDataGrid } from './EdsDataGrid.js';
3
+ export { FilterWrapper } from './components/FilterWrapper.js';
4
+ export { SortIndicator } from './components/SortIndicator.js';
@@ -24,7 +24,8 @@ function addPxSuffixIfInputHasNoPrefix(size) {
24
24
  return size;
25
25
  }
26
26
  function logDevelopmentWarningOfPropUse(deprecatedProps) {
27
- if (process.env.NODE_ENV !== 'development') {
27
+ const g = globalThis;
28
+ if (g.process?.env?.NODE_ENV !== 'development') {
28
29
  return;
29
30
  }
30
31
  for (const [key, {
@@ -1,3 +1,3 @@
1
- import type { Cell, CellContext, ColumnDef, ColumnPinningState, ColumnResizeMode, ColumnSort, ExpandedState, HeaderContext, OnChangeFn, Row, RowSelectionState, SortingState, Table, VisibilityState } from '@tanstack/react-table';
1
+ import type { Cell, CellContext, ColumnDef, ColumnPinningState, ColumnResizeMode, ColumnSort, ExpandedState, HeaderContext, OnChangeFn, Row, RowModel, RowSelectionState, SortingState, Table, VisibilityState } from '@tanstack/react-table';
2
2
  import type { Virtualizer } from '@tanstack/react-virtual';
3
- export type { Cell, CellContext, ColumnDef, ColumnPinningState, ColumnResizeMode, ColumnSort, ExpandedState, HeaderContext, OnChangeFn, Row, RowSelectionState, SortingState, Table, Virtualizer, VisibilityState, };
3
+ export type { Cell, CellContext, ColumnDef, ColumnPinningState, ColumnResizeMode, ColumnSort, ExpandedState, HeaderContext, OnChangeFn, Row, RowModel, RowSelectionState, SortingState, Table, Virtualizer, VisibilityState, };
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@equinor/eds-data-grid-react",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "A feature-rich data-grid written in React, implementing the Equinor Design System",
5
5
  "license": "MIT",
6
6
  "types": "dist/types/index.d.ts",
7
7
  "main": "dist/eds-data-grid-react.cjs",
8
- "module": "./dist/esm/index.mjs",
8
+ "module": "./dist/esm/index.js",
9
9
  "exports": {
10
10
  ".": {
11
11
  "types": "./dist/types/index.d.ts",
12
- "import": "./dist/esm/index.mjs",
12
+ "import": "./dist/esm/index.js",
13
13
  "require": "./dist/eds-data-grid-react.cjs"
14
14
  }
15
15
  },
@@ -28,47 +28,47 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@tanstack/react-table": "^8.21.3",
31
- "@tanstack/react-virtual": "^3.13.12",
32
- "@equinor/eds-tokens": "^2.1.1",
33
- "@equinor/eds-icons": "^1.2.1",
34
- "@equinor/eds-utils": "^2.0.0"
31
+ "@tanstack/react-virtual": "^3.13.18",
32
+ "@equinor/eds-tokens": "^2.2.0",
33
+ "@equinor/eds-utils": "^2.0.0",
34
+ "@equinor/eds-icons": "^1.3.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@equinor/eds-core-react": "^2",
38
38
  "@rollup/plugin-babel": "^6.1.0",
39
- "@rollup/plugin-commonjs": "^28.0.8",
39
+ "@rollup/plugin-commonjs": "^29.0.0",
40
40
  "@rollup/plugin-node-resolve": "^16.0.3",
41
- "@storybook/addon-a11y": "^9.1.13",
42
- "@storybook/addon-docs": "^9.1.13",
43
- "@storybook/addon-links": "^9.1.13",
44
- "@storybook/react-vite": "^9.1.13",
41
+ "@storybook/addon-a11y": "^10.2.10",
42
+ "@storybook/addon-docs": "^10.2.10",
43
+ "@storybook/addon-links": "^10.2.10",
44
+ "@storybook/react-vite": "^10.2.10",
45
45
  "@testing-library/dom": "^10.4.1",
46
46
  "@testing-library/jest-dom": "^6.9.1",
47
- "@testing-library/react": "16.3.0",
47
+ "@testing-library/react": "16.3.2",
48
48
  "@testing-library/user-event": "^14.6.1",
49
49
  "@types/jest": "^30.0.0",
50
50
  "@types/mdx": "^2.0.13",
51
- "@types/node": "^24.9.1",
51
+ "@types/node": "^25.3.3",
52
52
  "@types/ramda": "^0.31.1",
53
- "@types/react": "^19.2.2",
54
- "@types/react-dom": "^19.2.2",
53
+ "@types/react": "^19.2.14",
54
+ "@types/react-dom": "^19.2.3",
55
55
  "babel-plugin-styled-components": "^2.1.4",
56
- "eslint-plugin-storybook": "9.1.13",
56
+ "eslint-plugin-storybook": "10.2.10",
57
57
  "jest": "30.2.0",
58
58
  "jest-environment-jsdom": "30.2.0",
59
59
  "jest-styled-components": "^7.2.0",
60
60
  "js-file-download": "^0.4.12",
61
61
  "postcss": "^8.5.6",
62
62
  "ramda": "^0.32.0",
63
- "react": "^19.2.0",
64
- "react-dom": "^19.2.0",
65
- "react-hook-form": "^7.65.0",
66
- "rollup": "^4.52.5",
67
- "rollup-plugin-delete": "^3.0.1",
63
+ "react": "^19.2.4",
64
+ "react-dom": "^19.2.4",
65
+ "react-hook-form": "^7.71.2",
66
+ "rollup": "^4.59.0",
67
+ "rollup-plugin-delete": "^3.0.2",
68
68
  "rollup-plugin-postcss": "^4.0.2",
69
- "storybook": "^9.1.13",
70
- "styled-components": "6.1.19",
71
- "ts-jest": "29.4.5",
69
+ "storybook": "^10.2.10",
70
+ "styled-components": "6.3.11",
71
+ "ts-jest": "29.4.6",
72
72
  "ts-node": "10.9.2",
73
73
  "tsc-watch": "^7.2.0",
74
74
  "typescript": "~5.9.3"
@@ -1,4 +0,0 @@
1
- export { createColumnHelper } from '@tanstack/react-table';
2
- export { EdsDataGrid } from './EdsDataGrid.mjs';
3
- export { FilterWrapper } from './components/FilterWrapper.mjs';
4
- export { SortIndicator } from './components/SortIndicator.mjs';
File without changes