@equinor/apollo-components 1.10.1 → 1.11.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/dist/index.d.ts +5 -2
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconData } from '@equinor/eds-icons';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, ReactElement, ComponentProps } from 'react';
|
|
4
|
-
import { Cell, CellContext, Table, Row, ColumnDef, RowSelectionState, SortingState, HeaderContext } from '@tanstack/react-table';
|
|
4
|
+
import { Cell, CellContext, Table, Row, ColumnDef, VisibilityState, RowSelectionState, SortingState, HeaderContext } from '@tanstack/react-table';
|
|
5
5
|
import { ColumnDef as ColumnDef$1 } from '@tanstack/table-core';
|
|
6
6
|
import * as styled_components from 'styled-components';
|
|
7
7
|
import { CellProps, TypographyProps as TypographyProps$1 } from '@equinor/eds-core-react';
|
|
@@ -123,6 +123,9 @@ declare function DataTable$1<T>(props: DataTableProps<T>): JSX.Element;
|
|
|
123
123
|
declare type DataTableProviderProps = ComponentProps<typeof Provider>;
|
|
124
124
|
declare function DataTableProvider({ children, ...props }: DataTableProviderProps): JSX.Element;
|
|
125
125
|
|
|
126
|
+
declare const columnVisibilityAtom: jotai.PrimitiveAtom<VisibilityState> & {
|
|
127
|
+
init: VisibilityState;
|
|
128
|
+
};
|
|
126
129
|
declare const globalFilterAtom: jotai.PrimitiveAtom<string> & {
|
|
127
130
|
init: string;
|
|
128
131
|
};
|
|
@@ -169,4 +172,4 @@ declare type TypographyProps = {
|
|
|
169
172
|
} & TypographyProps$1;
|
|
170
173
|
declare const TypographyCustom: (props: TypographyProps) => JSX.Element;
|
|
171
174
|
|
|
172
|
-
export { AppShell, AppSidebar, CellConfig, ChipsCell, ColumnSelect, DataTable, DataTableCommonProps, DataTableConfig, DataTableProps, DataTableRawProps, DynamicCell, FilterConfig, HeaderConfig, HierarchyCell, RowConfig, RowSelectionMode, SelectColumnDef, StickyCell, TableHeader, TableLayout, TableRowWrapper, TableRowWrapperProps, TruncateMode, TypographyCustom, capitalizeHeader, globalFilterAtom, prependSelectColumn, rowSelectionAtom, tableSortingAtom };
|
|
175
|
+
export { AppShell, AppSidebar, CellConfig, ChipsCell, ColumnSelect, DataTable, DataTableCommonProps, DataTableConfig, DataTableProps, DataTableRawProps, DynamicCell, FilterConfig, HeaderConfig, HierarchyCell, RowConfig, RowSelectionMode, SelectColumnDef, StickyCell, TableHeader, TableLayout, TableRowWrapper, TableRowWrapperProps, TruncateMode, TypographyCustom, capitalizeHeader, columnVisibilityAtom, globalFilterAtom, prependSelectColumn, rowSelectionAtom, tableSortingAtom };
|
package/dist/index.js
CHANGED
|
@@ -38,6 +38,7 @@ __export(src_exports, {
|
|
|
38
38
|
TableHeader: () => TableHeader,
|
|
39
39
|
TypographyCustom: () => TypographyCustom,
|
|
40
40
|
capitalizeHeader: () => capitalizeHeader,
|
|
41
|
+
columnVisibilityAtom: () => columnVisibilityAtom,
|
|
41
42
|
globalFilterAtom: () => globalFilterAtom,
|
|
42
43
|
prependSelectColumn: () => prependSelectColumn,
|
|
43
44
|
rowSelectionAtom: () => rowSelectionAtom,
|
|
@@ -284,8 +285,6 @@ var TypographyCustom = (props) => {
|
|
|
284
285
|
});
|
|
285
286
|
};
|
|
286
287
|
var HoverCapture = import_styled_components6.default.div`
|
|
287
|
-
padding: 0.5em 0;
|
|
288
|
-
margin: -0.5em 0;
|
|
289
288
|
height: ${import_eds_tokens3.tokens.typography.table.cell_text.lineHeight};
|
|
290
289
|
background-color: inherit;
|
|
291
290
|
|
|
@@ -563,7 +562,7 @@ function TableRow({ row, rowConfig, cellConfig }) {
|
|
|
563
562
|
}
|
|
564
563
|
var StyledTableRow = (0, import_styled_components12.default)(import_eds_core_react11.Table.Row)`
|
|
565
564
|
/* Background color must be inherited here. Does not work with inline styling */
|
|
566
|
-
background-color: inherit;
|
|
565
|
+
${({ active }) => active ? "" : "background-color: inherit;"}
|
|
567
566
|
`;
|
|
568
567
|
function handleRowEvent(row, handler) {
|
|
569
568
|
if (!handler)
|
|
@@ -1071,6 +1070,7 @@ DataTable2.Provider = DataTableProvider;
|
|
|
1071
1070
|
TableHeader,
|
|
1072
1071
|
TypographyCustom,
|
|
1073
1072
|
capitalizeHeader,
|
|
1073
|
+
columnVisibilityAtom,
|
|
1074
1074
|
globalFilterAtom,
|
|
1075
1075
|
prependSelectColumn,
|
|
1076
1076
|
rowSelectionAtom,
|
package/dist/index.mjs
CHANGED
|
@@ -239,8 +239,6 @@ var TypographyCustom = (props) => {
|
|
|
239
239
|
});
|
|
240
240
|
};
|
|
241
241
|
var HoverCapture = styled6.div`
|
|
242
|
-
padding: 0.5em 0;
|
|
243
|
-
margin: -0.5em 0;
|
|
244
242
|
height: ${tokens3.typography.table.cell_text.lineHeight};
|
|
245
243
|
background-color: inherit;
|
|
246
244
|
|
|
@@ -518,7 +516,7 @@ function TableRow({ row, rowConfig, cellConfig }) {
|
|
|
518
516
|
}
|
|
519
517
|
var StyledTableRow = styled12(Table7.Row)`
|
|
520
518
|
/* Background color must be inherited here. Does not work with inline styling */
|
|
521
|
-
background-color: inherit;
|
|
519
|
+
${({ active }) => active ? "" : "background-color: inherit;"}
|
|
522
520
|
`;
|
|
523
521
|
function handleRowEvent(row, handler) {
|
|
524
522
|
if (!handler)
|
|
@@ -1031,6 +1029,7 @@ export {
|
|
|
1031
1029
|
TableHeader,
|
|
1032
1030
|
TypographyCustom,
|
|
1033
1031
|
capitalizeHeader,
|
|
1032
|
+
columnVisibilityAtom,
|
|
1034
1033
|
globalFilterAtom,
|
|
1035
1034
|
prependSelectColumn,
|
|
1036
1035
|
rowSelectionAtom,
|