Skip to content

Commit 111af56

Browse files
authored
chore: update findable-ui to latest v21.0.0 (#4326) (#4327)
1 parent 8925ed1 commit 111af56

28 files changed

+348
-213
lines changed

app/components/Detail/components/GeneratedMatricesTables/generatedMatricesTables.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ALERT_PROPS } from "@databiosphere/findable-ui/lib/components/common/Alert/constants";
22
import { GridPaper } from "@databiosphere/findable-ui/lib/components/common/Paper/paper.styles";
33
import { Table } from "@databiosphere/findable-ui/lib/components/Detail/components/Table/table";
4+
import { COLUMN_IDENTIFIER } from "@databiosphere/findable-ui/lib/components/Table/common/columnIdentifier";
45
import { Divider } from "@mui/material";
56
import { ColumnDef } from "@tanstack/react-table";
67
import { Fragment } from "react";
@@ -36,6 +37,13 @@ export const GeneratedMatricesTables = <T extends object>({
3637
columns={columns}
3738
gridTemplateColumns={gridTemplateColumns}
3839
items={items}
40+
tableOptions={{
41+
initialState: {
42+
columnVisibility: {
43+
[COLUMN_IDENTIFIER.ROW_POSITION]: false,
44+
},
45+
},
46+
}}
3947
/>
4048
</GridPaper>
4149
</Fragment>

app/viewModelBuilders/catalog/anvil-catalog/common/viewModelBuilders.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
Value,
66
} from "@databiosphere/findable-ui/lib/components/common/KeyValuePairs/keyValuePairs";
77
import { ANCHOR_TARGET } from "@databiosphere/findable-ui/lib/components/Links/common/entities";
8+
import { COLUMN_IDENTIFIER } from "@databiosphere/findable-ui/lib/components/Table/common/columnIdentifier";
89
import { ViewContext } from "@databiosphere/findable-ui/lib/config/entities";
910
import { ColumnDef } from "@tanstack/react-table";
1011
import React, { ReactElement } from "react";
@@ -100,8 +101,12 @@ export const buildConsortiumDetailViewStudiesTable = (
100101
items: studies,
101102
noResultsTitle: "No Studies",
102103
tableOptions: {
104+
enableRowPosition: false,
103105
getRowId: (originalRow) =>
104106
(originalRow as AnVILCatalogConsortiumStudy).studyName,
107+
initialState: {
108+
columnVisibility: { [COLUMN_IDENTIFIER.ROW_POSITION]: false },
109+
},
105110
},
106111
};
107112
};
@@ -124,6 +129,9 @@ export const buildConsortiumDetailViewWorkspacesTable = (
124129
tableOptions: {
125130
getRowId: (originalRow) =>
126131
(originalRow as AnVILCatalogWorkspace).workspaceName,
132+
initialState: {
133+
columnVisibility: { [COLUMN_IDENTIFIER.ROW_POSITION]: false },
134+
},
127135
},
128136
};
129137
};
@@ -326,6 +334,9 @@ export const buildStudyDetailViewWorkspacesTable = (
326334
tableOptions: {
327335
getRowId: (originalRow) =>
328336
(originalRow as AnVILCatalogWorkspace).workspaceName,
337+
initialState: {
338+
columnVisibility: { [COLUMN_IDENTIFIER.ROW_POSITION]: false },
339+
},
329340
},
330341
};
331342
};

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"check-system-status:anvil-cmg": "esrun e2e/anvil/anvil-check-system-status.ts"
3636
},
3737
"dependencies": {
38-
"@databiosphere/findable-ui": "20.0.0",
38+
"@databiosphere/findable-ui": "21.0.0",
3939
"@emotion/react": "^11.13.3",
4040
"@emotion/styled": "^11.13.0",
4141
"@mdx-js/loader": "^3.0.1",

site-config/anvil-catalog/dev/index/consortiaEntityConfig.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
} from "../../../../app/apis/catalog/anvil-catalog/common/utils";
1414
import * as C from "../../../../app/components";
1515
import * as V from "../../../../app/viewModelBuilders/catalog/anvil-catalog/common/viewModelBuilders";
16-
import { TABLE_OPTIONS } from "../../../common/tableOptions";
1716
import {
1817
ANVIL_CATALOG_CATEGORY_KEY,
1918
ANVIL_CATALOG_CATEGORY_LABEL,
@@ -104,7 +103,6 @@ export const consortiaEntityConfig: EntityConfig<AnVILCatalogConsortium> = {
104103
width: { max: "1fr", min: "120px" },
105104
},
106105
{
107-
columnVisible: false,
108106
componentConfig: {
109107
component: C.NTagCell,
110108
viewBuilder: V.buildStudyNames,
@@ -123,7 +121,6 @@ export const consortiaEntityConfig: EntityConfig<AnVILCatalogConsortium> = {
123121
width: { max: "1fr", min: "120px" },
124122
},
125123
{
126-
columnVisible: false,
127124
componentConfig: {
128125
component: C.NTagCell,
129126
viewBuilder: V.buildTerraWorkspaceNames,
@@ -151,11 +148,20 @@ export const consortiaEntityConfig: EntityConfig<AnVILCatalogConsortium> = {
151148
width: "max-content",
152149
},
153150
],
154-
defaultSort: {
155-
desc: SORT_DIRECTION.ASCENDING,
156-
id: ANVIL_CATALOG_CATEGORY_KEY.CONSORTIUM,
151+
tableOptions: {
152+
initialState: {
153+
columnVisibility: {
154+
[ANVIL_CATALOG_CATEGORY_KEY.STUDY_NAME]: false,
155+
[ANVIL_CATALOG_CATEGORY_KEY.WORKSPACE_NAME]: false,
156+
},
157+
sorting: [
158+
{
159+
desc: SORT_DIRECTION.ASCENDING,
160+
id: ANVIL_CATALOG_CATEGORY_KEY.CONSORTIUM,
161+
},
162+
],
163+
},
157164
},
158-
tableOptions: TABLE_OPTIONS,
159165
} as ListConfig<AnVILCatalogConsortium>,
160166
listView: {
161167
disablePagination: true,

site-config/anvil-catalog/dev/index/studiesEntityConfig.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
} from "../../../../app/apis/catalog/anvil-catalog/common/utils";
1414
import * as C from "../../../../app/components";
1515
import * as V from "../../../../app/viewModelBuilders/catalog/anvil-catalog/common/viewModelBuilders";
16-
import { TABLE_OPTIONS } from "../../../common/tableOptions";
1716
import {
1817
ANVIL_CATALOG_CATEGORY_KEY,
1918
ANVIL_CATALOG_CATEGORY_LABEL,
@@ -143,11 +142,16 @@ export const studiesEntityConfig: EntityConfig<AnVILCatalogStudy> = {
143142
width: "max-content",
144143
},
145144
],
146-
defaultSort: {
147-
desc: SORT_DIRECTION.ASCENDING,
148-
id: ANVIL_CATALOG_CATEGORY_KEY.STUDY_NAME,
145+
tableOptions: {
146+
initialState: {
147+
sorting: [
148+
{
149+
desc: SORT_DIRECTION.ASCENDING,
150+
id: ANVIL_CATALOG_CATEGORY_KEY.STUDY_NAME,
151+
},
152+
],
153+
},
149154
},
150-
tableOptions: TABLE_OPTIONS,
151155
} as ListConfig<AnVILCatalogStudy>,
152156
listView: {
153157
disablePagination: true,

site-config/anvil-catalog/dev/index/workspaceEntityConfig.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
} from "../../../../app/apis/catalog/anvil-catalog/common/utils";
1313
import * as C from "../../../../app/components";
1414
import * as V from "../../../../app/viewModelBuilders/catalog/anvil-catalog/common/viewModelBuilders";
15-
import { TABLE_OPTIONS } from "../../../common/tableOptions";
1615
import {
1716
ANVIL_CATALOG_CATEGORY_KEY,
1817
ANVIL_CATALOG_CATEGORY_LABEL,
@@ -126,11 +125,16 @@ export const workspaceEntityConfig: EntityConfig<AnVILCatalogWorkspace> = {
126125
width: "max-content",
127126
},
128127
],
129-
defaultSort: {
130-
desc: SORT_DIRECTION.ASCENDING,
131-
id: ANVIL_CATALOG_CATEGORY_KEY.CONSORTIUM,
128+
tableOptions: {
129+
initialState: {
130+
sorting: [
131+
{
132+
desc: SORT_DIRECTION.ASCENDING,
133+
id: ANVIL_CATALOG_CATEGORY_KEY.CONSORTIUM,
134+
},
135+
],
136+
},
132137
},
133-
tableOptions: TABLE_OPTIONS,
134138
} as ListConfig<AnVILCatalogWorkspace>,
135139
listView: {
136140
disablePagination: true,

site-config/anvil-cmg/dev/index/activitiesEntityConfig.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { EXPLORE_MODE } from "@databiosphere/findable-ui/lib/hooks/useExploreMod
88
import { ActivitiesResponse } from "../../../../app/apis/azul/anvil-cmg/common/responses";
99
import * as C from "../../../../app/components";
1010
import * as V from "../../../../app/viewModelBuilders/azul/anvil-cmg/common/viewModelBuilders";
11-
import { TABLE_OPTIONS } from "../../../common/tableOptions";
1211
import {
1312
ANVIL_CMG_CATEGORY_KEY,
1413
ANVIL_CMG_CATEGORY_LABEL,
@@ -77,7 +76,6 @@ export const activitiesEntityConfig: EntityConfig<ActivitiesResponse> = {
7776
width: { max: "1fr", min: "200px" },
7877
},
7978
{
80-
columnVisible: false,
8179
componentConfig: {
8280
component: C.NTagCell,
8381
viewBuilder: V.buildPhenotypicSexes,
@@ -87,7 +85,6 @@ export const activitiesEntityConfig: EntityConfig<ActivitiesResponse> = {
8785
width: { max: "1fr", min: "200px" },
8886
},
8987
{
90-
columnVisible: false,
9188
componentConfig: {
9289
component: C.NTagCell,
9390
viewBuilder: V.buildReportedEthnicity,
@@ -97,7 +94,6 @@ export const activitiesEntityConfig: EntityConfig<ActivitiesResponse> = {
9794
width: { max: "1fr", min: "200px" },
9895
},
9996
{
100-
columnVisible: false,
10197
componentConfig: {
10298
component: C.NTagCell,
10399
viewBuilder: V.buildDiagnoses,
@@ -116,11 +112,21 @@ export const activitiesEntityConfig: EntityConfig<ActivitiesResponse> = {
116112
width: { max: "1fr", min: "200px" },
117113
},
118114
],
119-
defaultSort: {
120-
desc: SORT_DIRECTION.ASCENDING,
121-
id: ANVIL_CMG_CATEGORY_KEY.ACTIVITY_DOCUMENT_ID,
115+
tableOptions: {
116+
initialState: {
117+
columnVisibility: {
118+
[ANVIL_CMG_CATEGORY_LABEL.DONOR_PHENOTYPIC_SEX]: false,
119+
[ANVIL_CMG_CATEGORY_KEY.DONOR_REPORTED_ETHNICITY]: false,
120+
[ANVIL_CMG_CATEGORY_KEY.DIAGNOSE_DISEASE]: false,
121+
},
122+
sorting: [
123+
{
124+
desc: SORT_DIRECTION.ASCENDING,
125+
id: ANVIL_CMG_CATEGORY_KEY.ACTIVITY_DOCUMENT_ID,
126+
},
127+
],
128+
},
122129
},
123-
tableOptions: TABLE_OPTIONS,
124130
} as ListConfig<ActivitiesResponse>,
125131
listView: {
126132
listHero,

site-config/anvil-cmg/dev/index/biosamplesEntityConfig.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { EXPLORE_MODE } from "@databiosphere/findable-ui/lib/hooks/useExploreMod
88
import { BioSamplesResponse } from "../../../../app/apis/azul/anvil-cmg/common/responses";
99
import * as C from "../../../../app/components";
1010
import * as V from "../../../../app/viewModelBuilders/azul/anvil-cmg/common/viewModelBuilders";
11-
import { TABLE_OPTIONS } from "../../../common/tableOptions";
1211
import {
1312
ANVIL_CMG_CATEGORY_KEY,
1413
ANVIL_CMG_CATEGORY_LABEL,
@@ -68,7 +67,6 @@ export const biosamplesEntityConfig: EntityConfig<BioSamplesResponse> = {
6867
width: { max: "1fr", min: "200px" },
6968
},
7069
{
71-
columnVisible: false,
7270
componentConfig: {
7371
component: C.NTagCell,
7472
viewBuilder: V.buildPhenotypicSexes,
@@ -78,7 +76,6 @@ export const biosamplesEntityConfig: EntityConfig<BioSamplesResponse> = {
7876
width: { max: "1fr", min: "200px" },
7977
},
8078
{
81-
columnVisible: false,
8279
componentConfig: {
8380
component: C.NTagCell,
8481
viewBuilder: V.buildReportedEthnicity,
@@ -106,11 +103,20 @@ export const biosamplesEntityConfig: EntityConfig<BioSamplesResponse> = {
106103
width: { max: "1fr", min: "200px" },
107104
},
108105
],
109-
defaultSort: {
110-
desc: SORT_DIRECTION.ASCENDING,
111-
id: ANVIL_CMG_CATEGORY_KEY.BIOSAMPLE_BIOSAMPLE_ID,
106+
tableOptions: {
107+
initialState: {
108+
columnVisibility: {
109+
[ANVIL_CMG_CATEGORY_KEY.DONOR_PHENOTYPIC_SEX]: false,
110+
[ANVIL_CMG_CATEGORY_KEY.DONOR_REPORTED_ETHNICITY]: false,
111+
},
112+
sorting: [
113+
{
114+
desc: SORT_DIRECTION.ASCENDING,
115+
id: ANVIL_CMG_CATEGORY_KEY.BIOSAMPLE_BIOSAMPLE_ID,
116+
},
117+
],
118+
},
112119
},
113-
tableOptions: TABLE_OPTIONS,
114120
} as ListConfig<BioSamplesResponse>,
115121
listView: {
116122
listHero,

site-config/anvil-cmg/dev/index/datasetsEntityConfig.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { getDatasetEntryId } from "../../../../app/apis/azul/anvil-cmg/common/tr
1010
import { getTitle } from "../../../../app/apis/azul/anvil-cmg/common/utils";
1111
import * as C from "../../../../app/components";
1212
import * as V from "../../../../app/viewModelBuilders/azul/anvil-cmg/common/viewModelBuilders";
13-
import { TABLE_OPTIONS } from "../../../common/tableOptions";
1413
import {
1514
ANVIL_CMG_CATEGORY_KEY,
1615
ANVIL_CMG_CATEGORY_LABEL,
@@ -104,7 +103,6 @@ export const datasetsEntityConfig: EntityConfig<DatasetsResponse> = {
104103
width: { max: "1fr", min: "200px" },
105104
},
106105
{
107-
columnVisible: false,
108106
componentConfig: {
109107
component: C.NTagCell,
110108
viewBuilder: V.buildPhenotypicSexes,
@@ -114,7 +112,6 @@ export const datasetsEntityConfig: EntityConfig<DatasetsResponse> = {
114112
width: { max: "1fr", min: "200px" },
115113
},
116114
{
117-
columnVisible: false,
118115
componentConfig: {
119116
component: C.NTagCell,
120117
viewBuilder: V.buildReportedEthnicities,
@@ -142,11 +139,20 @@ export const datasetsEntityConfig: EntityConfig<DatasetsResponse> = {
142139
width: { max: "1fr", min: "148px" },
143140
},
144141
],
145-
defaultSort: {
146-
desc: SORT_DIRECTION.ASCENDING,
147-
id: ANVIL_CMG_CATEGORY_KEY.DATASET_TITLE,
142+
tableOptions: {
143+
initialState: {
144+
columnVisibility: {
145+
[ANVIL_CMG_CATEGORY_KEY.DONOR_PHENOTYPIC_SEX]: false,
146+
[ANVIL_CMG_CATEGORY_KEY.DONOR_REPORTED_ETHNICITY]: false,
147+
},
148+
sorting: [
149+
{
150+
desc: SORT_DIRECTION.ASCENDING,
151+
id: ANVIL_CMG_CATEGORY_KEY.DATASET_TITLE,
152+
},
153+
],
154+
},
148155
},
149-
tableOptions: TABLE_OPTIONS,
150156
} as ListConfig<DatasetsResponse>,
151157
listView: {
152158
listHero,

0 commit comments

Comments
 (0)