@equinor/apollo-components 3.3.0-beta.2 → 3.4.0-beta.0
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 +3 -4
- package/dist/index.js +9 -4
- package/dist/index.mjs +9 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IconData } from '@equinor/eds-icons';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import { ReactNode, ReactElement, HTMLProps, MutableRefObject, Dispatch, SetStateAction, SyntheticEvent } from 'react';
|
|
3
|
+
import { ReactNode, ReactElement, MouseEvent, HTMLProps, MutableRefObject, Dispatch, SetStateAction, SyntheticEvent } from 'react';
|
|
4
4
|
import { CellContext, Cell, Header, Table, Row, SortingState, OnChangeFn, ColumnDef, RowSelectionState, ExpandedState, VisibilityState, HeaderContext } from '@tanstack/react-table';
|
|
5
5
|
import * as styled_components from 'styled-components';
|
|
6
6
|
import * as _equinor_eds_core_react from '@equinor/eds-core-react';
|
|
@@ -83,7 +83,7 @@ interface RowConfig<T> {
|
|
|
83
83
|
*/
|
|
84
84
|
rowWrapper?: TableRowWrapper<T>;
|
|
85
85
|
getRowBackground?: (row: Row<T>) => string | undefined;
|
|
86
|
-
onClick?: (row: Row<T
|
|
86
|
+
onClick?: (row: Row<T>, e: MouseEvent) => void;
|
|
87
87
|
onMouseEnter?: (row: Row<T>) => void;
|
|
88
88
|
onMouseLeave?: (row: Row<T>) => void;
|
|
89
89
|
}
|
|
@@ -262,8 +262,7 @@ interface GetHelperTextProps {
|
|
|
262
262
|
}
|
|
263
263
|
interface EditableCellBaseProps<T extends FormMeta, Value> extends CellContext<T, Value> {
|
|
264
264
|
/**
|
|
265
|
-
* FieldError object used to overwrite react-hook-form validation result. It is prioritized over
|
|
266
|
-
* react-hook-form's validation.
|
|
265
|
+
* FieldError object used to overwrite react-hook-form validation result. It is prioritized over react-hook-form's validation. If prefixed with the exported `WARNING_PREFIX` it will be displayed as an warning.
|
|
267
266
|
*/
|
|
268
267
|
error?: FieldError;
|
|
269
268
|
/**
|
package/dist/index.js
CHANGED
|
@@ -3045,9 +3045,14 @@ var TableBody = (0, import_styled_components12.default)(import_eds_core_react13.
|
|
|
3045
3045
|
var import_eds_core_react14 = require("@equinor/eds-core-react");
|
|
3046
3046
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
3047
3047
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3048
|
-
function TableRow(
|
|
3048
|
+
function TableRow({
|
|
3049
|
+
row,
|
|
3050
|
+
rowConfig,
|
|
3051
|
+
cellConfig,
|
|
3052
|
+
measureElement,
|
|
3053
|
+
index
|
|
3054
|
+
}) {
|
|
3049
3055
|
var _a;
|
|
3050
|
-
const { row, rowConfig, cellConfig, measureElement, index } = props;
|
|
3051
3056
|
const rowWrapper = rowConfig == null ? void 0 : rowConfig.rowWrapper;
|
|
3052
3057
|
const tableRowContent = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3053
3058
|
StyledTableRow,
|
|
@@ -3059,9 +3064,9 @@ function TableRow(props) {
|
|
|
3059
3064
|
cursor: (rowConfig == null ? void 0 : rowConfig.onClick) ? "pointer" : "initial",
|
|
3060
3065
|
backgroundColor: (_a = rowConfig == null ? void 0 : rowConfig.getRowBackground) == null ? void 0 : _a.call(rowConfig, row)
|
|
3061
3066
|
},
|
|
3062
|
-
onClick: () => {
|
|
3067
|
+
onClick: (e) => {
|
|
3063
3068
|
var _a2;
|
|
3064
|
-
return (_a2 = rowConfig == null ? void 0 : rowConfig.onClick) == null ? void 0 : _a2.call(rowConfig, row);
|
|
3069
|
+
return (_a2 = rowConfig == null ? void 0 : rowConfig.onClick) == null ? void 0 : _a2.call(rowConfig, row, e);
|
|
3065
3070
|
},
|
|
3066
3071
|
onMouseEnter: handleRowEvent(row, rowConfig == null ? void 0 : rowConfig.onMouseEnter),
|
|
3067
3072
|
onMouseLeave: handleRowEvent(row, rowConfig == null ? void 0 : rowConfig.onMouseLeave),
|
package/dist/index.mjs
CHANGED
|
@@ -3006,9 +3006,14 @@ var TableBody = styled12(Table6.Body)`
|
|
|
3006
3006
|
import { Table as Table7 } from "@equinor/eds-core-react";
|
|
3007
3007
|
import styled13 from "styled-components";
|
|
3008
3008
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
3009
|
-
function TableRow(
|
|
3009
|
+
function TableRow({
|
|
3010
|
+
row,
|
|
3011
|
+
rowConfig,
|
|
3012
|
+
cellConfig,
|
|
3013
|
+
measureElement,
|
|
3014
|
+
index
|
|
3015
|
+
}) {
|
|
3010
3016
|
var _a;
|
|
3011
|
-
const { row, rowConfig, cellConfig, measureElement, index } = props;
|
|
3012
3017
|
const rowWrapper = rowConfig == null ? void 0 : rowConfig.rowWrapper;
|
|
3013
3018
|
const tableRowContent = /* @__PURE__ */ jsx14(
|
|
3014
3019
|
StyledTableRow,
|
|
@@ -3020,9 +3025,9 @@ function TableRow(props) {
|
|
|
3020
3025
|
cursor: (rowConfig == null ? void 0 : rowConfig.onClick) ? "pointer" : "initial",
|
|
3021
3026
|
backgroundColor: (_a = rowConfig == null ? void 0 : rowConfig.getRowBackground) == null ? void 0 : _a.call(rowConfig, row)
|
|
3022
3027
|
},
|
|
3023
|
-
onClick: () => {
|
|
3028
|
+
onClick: (e) => {
|
|
3024
3029
|
var _a2;
|
|
3025
|
-
return (_a2 = rowConfig == null ? void 0 : rowConfig.onClick) == null ? void 0 : _a2.call(rowConfig, row);
|
|
3030
|
+
return (_a2 = rowConfig == null ? void 0 : rowConfig.onClick) == null ? void 0 : _a2.call(rowConfig, row, e);
|
|
3026
3031
|
},
|
|
3027
3032
|
onMouseEnter: handleRowEvent(row, rowConfig == null ? void 0 : rowConfig.onMouseEnter),
|
|
3028
3033
|
onMouseLeave: handleRowEvent(row, rowConfig == null ? void 0 : rowConfig.onMouseLeave),
|