@equinor/apollo-components 4.0.5 → 4.0.7
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/dist/index.js +2 -2
- package/dist/index.mjs +15 -15
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -330,7 +330,7 @@ var resizeCellStyle = import_styled_components6.css`
|
|
|
330
330
|
var StickyCell2 = (0, import_styled_components6.default)(StickyHeaderCell)`
|
|
331
331
|
${resizeCellStyle}
|
|
332
332
|
`;
|
|
333
|
-
var
|
|
333
|
+
var Cell = (0, import_styled_components6.default)(import_eds_core_react6.Table.Cell)`
|
|
334
334
|
${resizeCellStyle}
|
|
335
335
|
`;
|
|
336
336
|
var HeaderCell = ({ header, table }) => {
|
|
@@ -372,7 +372,7 @@ var HeaderCell = ({ header, table }) => {
|
|
|
372
372
|
if (header.column.columnDef.meta?.sticky) {
|
|
373
373
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StickyCell2, { ...cellProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HeaderContent, { header, table }) }, header.id);
|
|
374
374
|
}
|
|
375
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Cell, { ...cellProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HeaderContent, { header, table }) }, header.id);
|
|
376
376
|
};
|
|
377
377
|
var HeaderDiv = import_styled_components6.default.div`
|
|
378
378
|
display: flex;
|
package/dist/index.mjs
CHANGED
|
@@ -252,7 +252,7 @@ var resizeCellStyle = css3`
|
|
|
252
252
|
var StickyCell2 = styled6(StickyHeaderCell)`
|
|
253
253
|
${resizeCellStyle}
|
|
254
254
|
`;
|
|
255
|
-
var
|
|
255
|
+
var Cell = styled6(EdsTable2.Cell)`
|
|
256
256
|
${resizeCellStyle}
|
|
257
257
|
`;
|
|
258
258
|
var HeaderCell = ({ header, table }) => {
|
|
@@ -294,7 +294,7 @@ var HeaderCell = ({ header, table }) => {
|
|
|
294
294
|
if (header.column.columnDef.meta?.sticky) {
|
|
295
295
|
return /* @__PURE__ */ jsx6(StickyCell2, { ...cellProps, children: /* @__PURE__ */ jsx6(HeaderContent, { header, table }) }, header.id);
|
|
296
296
|
}
|
|
297
|
-
return /* @__PURE__ */ jsx6(
|
|
297
|
+
return /* @__PURE__ */ jsx6(Cell, { ...cellProps, children: /* @__PURE__ */ jsx6(HeaderContent, { header, table }) }, header.id);
|
|
298
298
|
};
|
|
299
299
|
var HeaderDiv = styled6.div`
|
|
300
300
|
display: flex;
|
|
@@ -673,10 +673,10 @@ function ColumnSelect({ table, columnSelectPlaceholder }) {
|
|
|
673
673
|
}
|
|
674
674
|
|
|
675
675
|
// src/DataTable/components/TableHeader.tsx
|
|
676
|
-
import { Table as
|
|
676
|
+
import { Table as Table2 } from "@equinor/eds-core-react";
|
|
677
677
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
678
678
|
function TableHeader({ table, sticky }) {
|
|
679
|
-
return /* @__PURE__ */ jsx12(
|
|
679
|
+
return /* @__PURE__ */ jsx12(Table2.Head, { sticky, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx12(Table2.Row, { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx12(HeaderCell, { header, table }, header.id)) }, headerGroup.id)) });
|
|
680
680
|
}
|
|
681
681
|
|
|
682
682
|
// src/DataTable/DataTable.tsx
|
|
@@ -694,7 +694,7 @@ import styled16 from "styled-components";
|
|
|
694
694
|
import { Table as EdsTable3 } from "@equinor/eds-core-react";
|
|
695
695
|
|
|
696
696
|
// src/DataTable/components/PlaceholderRow.tsx
|
|
697
|
-
import { DotProgress, Table as
|
|
697
|
+
import { DotProgress, Table as Table3, Typography as Typography2 } from "@equinor/eds-core-react";
|
|
698
698
|
import styled11 from "styled-components";
|
|
699
699
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
700
700
|
var PlaceholderTextWrapper = styled11.div`
|
|
@@ -702,20 +702,20 @@ var PlaceholderTextWrapper = styled11.div`
|
|
|
702
702
|
justify-content: center;
|
|
703
703
|
`;
|
|
704
704
|
function PlaceholderRow({ isLoading }) {
|
|
705
|
-
return /* @__PURE__ */ jsx13(
|
|
705
|
+
return /* @__PURE__ */ jsx13(Table3.Row, { children: /* @__PURE__ */ jsx13(Table3.Cell, { colSpan: 100, children: /* @__PURE__ */ jsx13(PlaceholderTextWrapper, { children: isLoading ? /* @__PURE__ */ jsx13(DotProgress, { color: "primary" }) : /* @__PURE__ */ jsx13(Typography2, { children: "No data available" }) }) }) });
|
|
706
706
|
}
|
|
707
707
|
|
|
708
708
|
// src/DataTable/components/TableBody.tsx
|
|
709
|
-
import { Table as
|
|
709
|
+
import { Table as Table4 } from "@equinor/eds-core-react";
|
|
710
710
|
import styled12 from "styled-components";
|
|
711
|
-
var TableBody = styled12(
|
|
711
|
+
var TableBody = styled12(Table4.Body)`
|
|
712
712
|
// The following attribute are important for fixed column width
|
|
713
713
|
// CHANGE THES WITH CAUTION
|
|
714
714
|
background: inherit;
|
|
715
715
|
`;
|
|
716
716
|
|
|
717
717
|
// src/DataTable/components/TableRow.tsx
|
|
718
|
-
import { Table as
|
|
718
|
+
import { Table as Table5 } from "@equinor/eds-core-react";
|
|
719
719
|
import styled13 from "styled-components";
|
|
720
720
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
721
721
|
function TableRow({
|
|
@@ -746,7 +746,7 @@ function TableRow({
|
|
|
746
746
|
);
|
|
747
747
|
return rowWrapper ? rowWrapper({ row, children: tableRowContent }) : tableRowContent;
|
|
748
748
|
}
|
|
749
|
-
var StyledTableRow = styled13(
|
|
749
|
+
var StyledTableRow = styled13(Table5.Row)`
|
|
750
750
|
/* Background color must be inherited here. Does not work with inline styling */
|
|
751
751
|
${({ active }) => active ? "" : "background-color: inherit;"}
|
|
752
752
|
`;
|
|
@@ -888,15 +888,15 @@ function TableBanner({
|
|
|
888
888
|
}
|
|
889
889
|
|
|
890
890
|
// src/DataTable/components/VirtualTable.tsx
|
|
891
|
-
import { Table as
|
|
891
|
+
import { Table as Table7 } from "@equinor/eds-core-react";
|
|
892
892
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
893
893
|
|
|
894
894
|
// src/DataTable/components/PaddingRow.tsx
|
|
895
|
-
import { Table as
|
|
895
|
+
import { Table as Table6 } from "@equinor/eds-core-react";
|
|
896
896
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
897
897
|
var PaddingRow = (props) => {
|
|
898
898
|
if (!props.height) return null;
|
|
899
|
-
return /* @__PURE__ */ jsx18(
|
|
899
|
+
return /* @__PURE__ */ jsx18(Table6.Row, { style: { pointerEvents: "none" }, children: /* @__PURE__ */ jsx18(Table6.Cell, { style: { height: `${props.height}px` } }) });
|
|
900
900
|
};
|
|
901
901
|
|
|
902
902
|
// src/DataTable/components/VirtualTable.tsx
|
|
@@ -919,8 +919,8 @@ function VirtualTable({
|
|
|
919
919
|
const virtualRows = rowVirtualizer.getVirtualItems();
|
|
920
920
|
const paddingTop = virtualRows.length > 0 ? virtualRows?.[0]?.start || 0 : 0;
|
|
921
921
|
const paddingBottom = virtualRows.length > 0 ? rowVirtualizer.getTotalSize() - (virtualRows?.[virtualRows.length - 1]?.end || 0) : 0;
|
|
922
|
-
return /* @__PURE__ */ jsxs10(
|
|
923
|
-
/* @__PURE__ */ jsx19(
|
|
922
|
+
return /* @__PURE__ */ jsxs10(Table7, { children: [
|
|
923
|
+
/* @__PURE__ */ jsx19(Table7.Caption, { hidden: true, children: props.tableCaption }),
|
|
924
924
|
/* @__PURE__ */ jsx19(TableHeader, { sticky: props.stickyHeader, table }),
|
|
925
925
|
/* @__PURE__ */ jsxs10(TableBody, { children: [
|
|
926
926
|
/* @__PURE__ */ jsx19(PaddingRow, { height: paddingTop }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/apollo-components",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
"dist/**"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@equinor/eds-icons": "1.2.
|
|
20
|
-
"@equinor/eds-tokens": "2.
|
|
19
|
+
"@equinor/eds-icons": "1.2.2",
|
|
20
|
+
"@equinor/eds-tokens": "2.2.0",
|
|
21
21
|
"@tanstack/match-sorter-utils": "8.19.4",
|
|
22
22
|
"@tanstack/react-table": "8.21.3",
|
|
23
23
|
"@tanstack/react-virtual": "3.13.18",
|
|
24
24
|
"lodash": "4.17.23"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@equinor/eds-core-react": "2.3.
|
|
28
|
-
"@storybook/react-vite": "10.2.
|
|
27
|
+
"@equinor/eds-core-react": "2.3.5",
|
|
28
|
+
"@storybook/react-vite": "10.2.10",
|
|
29
29
|
"@types/lodash": "4.17.23",
|
|
30
|
-
"@types/react": "19.2.
|
|
30
|
+
"@types/react": "19.2.14",
|
|
31
31
|
"@types/react-dom": "19.2.3",
|
|
32
32
|
"@types/styled-components": "5.1.36",
|
|
33
33
|
"eslint": "10.0.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"styled-components": "6.3.9",
|
|
38
38
|
"tsup": "8.5.1",
|
|
39
39
|
"type-fest": "5.4.4",
|
|
40
|
-
"@equinor/cpl-eslint-config": "1.0.
|
|
40
|
+
"@equinor/cpl-eslint-config": "1.0.7",
|
|
41
41
|
"@equinor/cpl-typescript-config": "0.0.7"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|