@equinor/apollo-components 1.5.0 → 1.5.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 +1 -0
- package/dist/index.js +3 -2
- package/dist/index.mjs +2 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ declare type DataTableConfig<T> = {
|
|
|
52
52
|
width?: string;
|
|
53
53
|
selectColumn?: 'default' | ((options?: Record<string, any>) => ColumnDef<T, any>);
|
|
54
54
|
getSubRows?: (originalRow: T) => T[] | undefined;
|
|
55
|
+
getRowId?: (originalRow: T, index: number, parent: Row<T> | undefined) => string;
|
|
55
56
|
onRowClick?: (row: Row<T>) => void;
|
|
56
57
|
} & ExpansionConfig;
|
|
57
58
|
interface ExpansionConfig {
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
));
|
|
24
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
25
|
|
|
26
|
-
// src/index.
|
|
26
|
+
// src/index.ts
|
|
27
27
|
var src_exports = {};
|
|
28
28
|
__export(src_exports, {
|
|
29
29
|
AppShell: () => AppShell,
|
|
@@ -888,7 +888,8 @@ function DataTable({
|
|
|
888
888
|
onSortingChange: enableOrUndefined(config == null ? void 0 : config.sortable, setSorting),
|
|
889
889
|
onColumnVisibilityChange: setColumnVisibility,
|
|
890
890
|
onGlobalFilterChange: enableGlobalFilter(setGlobalFilter),
|
|
891
|
-
getSubRows: config == null ? void 0 : config.getSubRows
|
|
891
|
+
getSubRows: config == null ? void 0 : config.getSubRows,
|
|
892
|
+
getRowId: config == null ? void 0 : config.getRowId
|
|
892
893
|
});
|
|
893
894
|
(0, import_react4.useEffect)(() => {
|
|
894
895
|
if (config && config.expandAllByDefault) {
|
package/dist/index.mjs
CHANGED
|
@@ -852,7 +852,8 @@ function DataTable({
|
|
|
852
852
|
onSortingChange: enableOrUndefined(config == null ? void 0 : config.sortable, setSorting),
|
|
853
853
|
onColumnVisibilityChange: setColumnVisibility,
|
|
854
854
|
onGlobalFilterChange: enableGlobalFilter(setGlobalFilter),
|
|
855
|
-
getSubRows: config == null ? void 0 : config.getSubRows
|
|
855
|
+
getSubRows: config == null ? void 0 : config.getSubRows,
|
|
856
|
+
getRowId: config == null ? void 0 : config.getRowId
|
|
856
857
|
});
|
|
857
858
|
useEffect2(() => {
|
|
858
859
|
if (config && config.expandAllByDefault) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/apollo-components",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"dist/**"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "tsup src/index.
|
|
12
|
+
"build": "tsup src/index.ts --format esm,cjs --dts --external react",
|
|
13
13
|
"build-storybook": "storybook build",
|
|
14
14
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
15
|
-
"dev": "tsup src/index.
|
|
15
|
+
"dev": "tsup src/index.ts --format esm,cjs --watch --dts --external react",
|
|
16
16
|
"lint": "TIMING=1 eslint . --fix",
|
|
17
17
|
"storybook": "storybook dev"
|
|
18
18
|
},
|