Skip to content

chore: update findable-ui to latest v21.0.0 (#4326) #4327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ALERT_PROPS } from "@databiosphere/findable-ui/lib/components/common/Alert/constants";
import { GridPaper } from "@databiosphere/findable-ui/lib/components/common/Paper/paper.styles";
import { Table } from "@databiosphere/findable-ui/lib/components/Detail/components/Table/table";
import { COLUMN_IDENTIFIER } from "@databiosphere/findable-ui/lib/components/Table/common/columnIdentifier";
import { Divider } from "@mui/material";
import { ColumnDef } from "@tanstack/react-table";
import { Fragment } from "react";
@@ -36,6 +37,13 @@ export const GeneratedMatricesTables = <T extends object>({
columns={columns}
gridTemplateColumns={gridTemplateColumns}
items={items}
tableOptions={{
initialState: {
columnVisibility: {
[COLUMN_IDENTIFIER.ROW_POSITION]: false,
},
},
}}
/>
</GridPaper>
</Fragment>
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ import {
Value,
} from "@databiosphere/findable-ui/lib/components/common/KeyValuePairs/keyValuePairs";
import { ANCHOR_TARGET } from "@databiosphere/findable-ui/lib/components/Links/common/entities";
import { COLUMN_IDENTIFIER } from "@databiosphere/findable-ui/lib/components/Table/common/columnIdentifier";
import { ViewContext } from "@databiosphere/findable-ui/lib/config/entities";
import { ColumnDef } from "@tanstack/react-table";
import React, { ReactElement } from "react";
@@ -100,8 +101,12 @@ export const buildConsortiumDetailViewStudiesTable = (
items: studies,
noResultsTitle: "No Studies",
tableOptions: {
enableRowPosition: false,
getRowId: (originalRow) =>
(originalRow as AnVILCatalogConsortiumStudy).studyName,
initialState: {
columnVisibility: { [COLUMN_IDENTIFIER.ROW_POSITION]: false },
},
},
};
};
@@ -124,6 +129,9 @@ export const buildConsortiumDetailViewWorkspacesTable = (
tableOptions: {
getRowId: (originalRow) =>
(originalRow as AnVILCatalogWorkspace).workspaceName,
initialState: {
columnVisibility: { [COLUMN_IDENTIFIER.ROW_POSITION]: false },
},
},
};
};
@@ -326,6 +334,9 @@ export const buildStudyDetailViewWorkspacesTable = (
tableOptions: {
getRowId: (originalRow) =>
(originalRow as AnVILCatalogWorkspace).workspaceName,
initialState: {
columnVisibility: { [COLUMN_IDENTIFIER.ROW_POSITION]: false },
},
},
};
};
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@
"check-system-status:anvil-cmg": "esrun e2e/anvil/anvil-check-system-status.ts"
},
"dependencies": {
"@databiosphere/findable-ui": "20.0.0",
"@databiosphere/findable-ui": "21.0.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mdx-js/loader": "^3.0.1",
20 changes: 13 additions & 7 deletions site-config/anvil-catalog/dev/index/consortiaEntityConfig.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ import {
} from "../../../../app/apis/catalog/anvil-catalog/common/utils";
import * as C from "../../../../app/components";
import * as V from "../../../../app/viewModelBuilders/catalog/anvil-catalog/common/viewModelBuilders";
import { TABLE_OPTIONS } from "../../../common/tableOptions";
import {
ANVIL_CATALOG_CATEGORY_KEY,
ANVIL_CATALOG_CATEGORY_LABEL,
@@ -104,7 +103,6 @@ export const consortiaEntityConfig: EntityConfig<AnVILCatalogConsortium> = {
width: { max: "1fr", min: "120px" },
},
{
columnVisible: false,
componentConfig: {
component: C.NTagCell,
viewBuilder: V.buildStudyNames,
@@ -123,7 +121,6 @@ export const consortiaEntityConfig: EntityConfig<AnVILCatalogConsortium> = {
width: { max: "1fr", min: "120px" },
},
{
columnVisible: false,
componentConfig: {
component: C.NTagCell,
viewBuilder: V.buildTerraWorkspaceNames,
@@ -151,11 +148,20 @@ export const consortiaEntityConfig: EntityConfig<AnVILCatalogConsortium> = {
width: "max-content",
},
],
defaultSort: {
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CATALOG_CATEGORY_KEY.CONSORTIUM,
tableOptions: {
initialState: {
columnVisibility: {
[ANVIL_CATALOG_CATEGORY_KEY.STUDY_NAME]: false,
[ANVIL_CATALOG_CATEGORY_KEY.WORKSPACE_NAME]: false,
},
sorting: [
{
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CATALOG_CATEGORY_KEY.CONSORTIUM,
},
],
},
},
tableOptions: TABLE_OPTIONS,
} as ListConfig<AnVILCatalogConsortium>,
listView: {
disablePagination: true,
14 changes: 9 additions & 5 deletions site-config/anvil-catalog/dev/index/studiesEntityConfig.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ import {
} from "../../../../app/apis/catalog/anvil-catalog/common/utils";
import * as C from "../../../../app/components";
import * as V from "../../../../app/viewModelBuilders/catalog/anvil-catalog/common/viewModelBuilders";
import { TABLE_OPTIONS } from "../../../common/tableOptions";
import {
ANVIL_CATALOG_CATEGORY_KEY,
ANVIL_CATALOG_CATEGORY_LABEL,
@@ -143,11 +142,16 @@ export const studiesEntityConfig: EntityConfig<AnVILCatalogStudy> = {
width: "max-content",
},
],
defaultSort: {
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CATALOG_CATEGORY_KEY.STUDY_NAME,
tableOptions: {
initialState: {
sorting: [
{
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CATALOG_CATEGORY_KEY.STUDY_NAME,
},
],
},
},
tableOptions: TABLE_OPTIONS,
} as ListConfig<AnVILCatalogStudy>,
listView: {
disablePagination: true,
14 changes: 9 additions & 5 deletions site-config/anvil-catalog/dev/index/workspaceEntityConfig.ts
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@ import {
} from "../../../../app/apis/catalog/anvil-catalog/common/utils";
import * as C from "../../../../app/components";
import * as V from "../../../../app/viewModelBuilders/catalog/anvil-catalog/common/viewModelBuilders";
import { TABLE_OPTIONS } from "../../../common/tableOptions";
import {
ANVIL_CATALOG_CATEGORY_KEY,
ANVIL_CATALOG_CATEGORY_LABEL,
@@ -126,11 +125,16 @@ export const workspaceEntityConfig: EntityConfig<AnVILCatalogWorkspace> = {
width: "max-content",
},
],
defaultSort: {
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CATALOG_CATEGORY_KEY.CONSORTIUM,
tableOptions: {
initialState: {
sorting: [
{
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CATALOG_CATEGORY_KEY.CONSORTIUM,
},
],
},
},
tableOptions: TABLE_OPTIONS,
} as ListConfig<AnVILCatalogWorkspace>,
listView: {
disablePagination: true,
22 changes: 14 additions & 8 deletions site-config/anvil-cmg/dev/index/activitiesEntityConfig.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ import { EXPLORE_MODE } from "@databiosphere/findable-ui/lib/hooks/useExploreMod
import { ActivitiesResponse } from "../../../../app/apis/azul/anvil-cmg/common/responses";
import * as C from "../../../../app/components";
import * as V from "../../../../app/viewModelBuilders/azul/anvil-cmg/common/viewModelBuilders";
import { TABLE_OPTIONS } from "../../../common/tableOptions";
import {
ANVIL_CMG_CATEGORY_KEY,
ANVIL_CMG_CATEGORY_LABEL,
@@ -77,7 +76,6 @@ export const activitiesEntityConfig: EntityConfig<ActivitiesResponse> = {
width: { max: "1fr", min: "200px" },
},
{
columnVisible: false,
componentConfig: {
component: C.NTagCell,
viewBuilder: V.buildPhenotypicSexes,
@@ -87,7 +85,6 @@ export const activitiesEntityConfig: EntityConfig<ActivitiesResponse> = {
width: { max: "1fr", min: "200px" },
},
{
columnVisible: false,
componentConfig: {
component: C.NTagCell,
viewBuilder: V.buildReportedEthnicity,
@@ -97,7 +94,6 @@ export const activitiesEntityConfig: EntityConfig<ActivitiesResponse> = {
width: { max: "1fr", min: "200px" },
},
{
columnVisible: false,
componentConfig: {
component: C.NTagCell,
viewBuilder: V.buildDiagnoses,
@@ -116,11 +112,21 @@ export const activitiesEntityConfig: EntityConfig<ActivitiesResponse> = {
width: { max: "1fr", min: "200px" },
},
],
defaultSort: {
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CMG_CATEGORY_KEY.ACTIVITY_DOCUMENT_ID,
tableOptions: {
initialState: {
columnVisibility: {
[ANVIL_CMG_CATEGORY_LABEL.DONOR_PHENOTYPIC_SEX]: false,
[ANVIL_CMG_CATEGORY_KEY.DONOR_REPORTED_ETHNICITY]: false,
[ANVIL_CMG_CATEGORY_KEY.DIAGNOSE_DISEASE]: false,
},
sorting: [
{
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CMG_CATEGORY_KEY.ACTIVITY_DOCUMENT_ID,
},
],
},
},
tableOptions: TABLE_OPTIONS,
} as ListConfig<ActivitiesResponse>,
listView: {
listHero,
20 changes: 13 additions & 7 deletions site-config/anvil-cmg/dev/index/biosamplesEntityConfig.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ import { EXPLORE_MODE } from "@databiosphere/findable-ui/lib/hooks/useExploreMod
import { BioSamplesResponse } from "../../../../app/apis/azul/anvil-cmg/common/responses";
import * as C from "../../../../app/components";
import * as V from "../../../../app/viewModelBuilders/azul/anvil-cmg/common/viewModelBuilders";
import { TABLE_OPTIONS } from "../../../common/tableOptions";
import {
ANVIL_CMG_CATEGORY_KEY,
ANVIL_CMG_CATEGORY_LABEL,
@@ -68,7 +67,6 @@ export const biosamplesEntityConfig: EntityConfig<BioSamplesResponse> = {
width: { max: "1fr", min: "200px" },
},
{
columnVisible: false,
componentConfig: {
component: C.NTagCell,
viewBuilder: V.buildPhenotypicSexes,
@@ -78,7 +76,6 @@ export const biosamplesEntityConfig: EntityConfig<BioSamplesResponse> = {
width: { max: "1fr", min: "200px" },
},
{
columnVisible: false,
componentConfig: {
component: C.NTagCell,
viewBuilder: V.buildReportedEthnicity,
@@ -106,11 +103,20 @@ export const biosamplesEntityConfig: EntityConfig<BioSamplesResponse> = {
width: { max: "1fr", min: "200px" },
},
],
defaultSort: {
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CMG_CATEGORY_KEY.BIOSAMPLE_BIOSAMPLE_ID,
tableOptions: {
initialState: {
columnVisibility: {
[ANVIL_CMG_CATEGORY_KEY.DONOR_PHENOTYPIC_SEX]: false,
[ANVIL_CMG_CATEGORY_KEY.DONOR_REPORTED_ETHNICITY]: false,
},
sorting: [
{
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CMG_CATEGORY_KEY.BIOSAMPLE_BIOSAMPLE_ID,
},
],
},
},
tableOptions: TABLE_OPTIONS,
} as ListConfig<BioSamplesResponse>,
listView: {
listHero,
20 changes: 13 additions & 7 deletions site-config/anvil-cmg/dev/index/datasetsEntityConfig.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ import { getDatasetEntryId } from "../../../../app/apis/azul/anvil-cmg/common/tr
import { getTitle } from "../../../../app/apis/azul/anvil-cmg/common/utils";
import * as C from "../../../../app/components";
import * as V from "../../../../app/viewModelBuilders/azul/anvil-cmg/common/viewModelBuilders";
import { TABLE_OPTIONS } from "../../../common/tableOptions";
import {
ANVIL_CMG_CATEGORY_KEY,
ANVIL_CMG_CATEGORY_LABEL,
@@ -104,7 +103,6 @@ export const datasetsEntityConfig: EntityConfig<DatasetsResponse> = {
width: { max: "1fr", min: "200px" },
},
{
columnVisible: false,
componentConfig: {
component: C.NTagCell,
viewBuilder: V.buildPhenotypicSexes,
@@ -114,7 +112,6 @@ export const datasetsEntityConfig: EntityConfig<DatasetsResponse> = {
width: { max: "1fr", min: "200px" },
},
{
columnVisible: false,
componentConfig: {
component: C.NTagCell,
viewBuilder: V.buildReportedEthnicities,
@@ -142,11 +139,20 @@ export const datasetsEntityConfig: EntityConfig<DatasetsResponse> = {
width: { max: "1fr", min: "148px" },
},
],
defaultSort: {
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CMG_CATEGORY_KEY.DATASET_TITLE,
tableOptions: {
initialState: {
columnVisibility: {
[ANVIL_CMG_CATEGORY_KEY.DONOR_PHENOTYPIC_SEX]: false,
[ANVIL_CMG_CATEGORY_KEY.DONOR_REPORTED_ETHNICITY]: false,
},
sorting: [
{
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CMG_CATEGORY_KEY.DATASET_TITLE,
},
],
},
},
tableOptions: TABLE_OPTIONS,
} as ListConfig<DatasetsResponse>,
listView: {
listHero,
14 changes: 9 additions & 5 deletions site-config/anvil-cmg/dev/index/donorsEntityConfig.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ import { EXPLORE_MODE } from "@databiosphere/findable-ui/lib/hooks/useExploreMod
import { DonorsResponse } from "../../../../app/apis/azul/anvil-cmg/common/responses";
import * as C from "../../../../app/components";
import * as V from "../../../../app/viewModelBuilders/azul/anvil-cmg/common/viewModelBuilders";
import { TABLE_OPTIONS } from "../../../common/tableOptions";
import {
ANVIL_CMG_CATEGORY_KEY,
ANVIL_CMG_CATEGORY_LABEL,
@@ -86,11 +85,16 @@ export const donorsEntityConfig: EntityConfig<DonorsResponse> = {
width: { max: "1fr", min: "200px" },
},
],
defaultSort: {
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CMG_CATEGORY_KEY.DONOR_DONOR_ID,
tableOptions: {
initialState: {
sorting: [
{
desc: SORT_DIRECTION.ASCENDING,
id: ANVIL_CMG_CATEGORY_KEY.DONOR_DONOR_ID,
},
],
},
},
tableOptions: TABLE_OPTIONS,
} as ListConfig<DonorsResponse>,
listView: {
listHero,
Loading