Skip to content

Commit bc9c523

Browse files
authored
chore: update findable-ui to latest v19.0.0 (#4319) (#4320)
1 parent e8c34c6 commit bc9c523

File tree

11 files changed

+65
-30
lines changed

11 files changed

+65
-30
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ export const buildConsortiumDetailViewStudiesTable = (
9999
gridTemplateColumns: "auto 1fr 1fr 1fr 1fr 1fr 1fr auto",
100100
items: studies,
101101
noResultsTitle: "No Studies",
102+
tableOptions: {
103+
getRowId: (originalRow) =>
104+
(originalRow as AnVILCatalogConsortiumStudy).studyName,
105+
},
102106
};
103107
};
104108

@@ -117,6 +121,10 @@ export const buildConsortiumDetailViewWorkspacesTable = (
117121
gridTemplateColumns: "auto 1fr 1fr 1fr 1fr 1fr auto",
118122
items: workspaces,
119123
noResultsTitle: "No Workspaces",
124+
tableOptions: {
125+
getRowId: (originalRow) =>
126+
(originalRow as AnVILCatalogWorkspace).workspaceName,
127+
},
120128
};
121129
};
122130

@@ -315,6 +323,10 @@ export const buildStudyDetailViewWorkspacesTable = (
315323
gridTemplateColumns: "auto 1fr 1fr 1fr 1fr 1fr auto",
316324
items: workspaces,
317325
noResultsTitle: "No Workspaces",
326+
tableOptions: {
327+
getRowId: (originalRow) =>
328+
(originalRow as AnVILCatalogWorkspace).workspaceName,
329+
},
318330
};
319331
};
320332

@@ -658,7 +670,7 @@ function getStudyAPIKeyValue(dbGapId: string): ReactElement {
658670
/**
659671
* Returns the KeyValuePair value for the specified AnVIL entity.
660672
* @param studyAccession - Study identifier with version.
661-
* @returns the KeyValuePair value for study dbGap Id as a ReactElement.
673+
* @returns the KeyValuePair value for study dbGapId as a ReactElement.
662674
*/
663675
function getStudyDbGapIdKeyValue(studyAccession: string): ReactElement {
664676
return C.Link({

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": "17.0.0",
38+
"@databiosphere/findable-ui": "19.0.0",
3939
"@emotion/react": "^11.13.3",
4040
"@emotion/styled": "^11.13.0",
4141
"@mdx-js/loader": "^3.0.1",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const datasetsEntityConfig: EntityConfig<DatasetsResponse> = {
7070
component: C.StatusBadge,
7171
viewBuilder: V.buildDatasetAccess,
7272
} as ComponentConfig<typeof C.StatusBadge>,
73-
disableSorting: true,
73+
enableSorting: false,
7474
header: ANVIL_CMG_CATEGORY_LABEL.DATASET_ACCESSIBLE,
7575
id: ANVIL_CMG_CATEGORY_KEY.DATASET_ACCESSIBLE,
7676
width: "max-content",

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ import {
1616
import { listHero } from "../listView/listHero";
1717
import { subTitleHero } from "../listView/subTitleHero";
1818

19-
export const downloadColumn: ColumnConfig = {
19+
export const downloadColumn: ColumnConfig<FilesResponse> = {
2020
componentConfig: {
2121
component: C.AzulFileDownload,
2222
viewBuilder: V.buildFileDownload,
2323
} as ComponentConfig<typeof C.AzulFileDownload>,
2424
disableHiding: true,
25-
disableSorting: true,
25+
enableSorting: false,
2626
header: ANVIL_CMG_CATEGORY_LABEL.AZUL_FILE_DOWNLOAD,
2727
id: ANVIL_CMG_CATEGORY_KEY.AZUL_FILE_DOWNLOAD,
2828
width: { max: "auto", min: "76px" },
@@ -77,7 +77,7 @@ export const filesEntityConfig: EntityConfig<FilesResponse> = {
7777
component: C.CopyCell,
7878
viewBuilder: V.buildDRSURI,
7979
} as ComponentConfig<typeof C.CopyCell>,
80-
disableSorting: true,
80+
enableSorting: false,
8181
header: ANVIL_CMG_CATEGORY_LABEL.DRS_URI,
8282
id: ANVIL_CMG_CATEGORY_KEY.DRS_URI,
8383
width: { max: "1fr", min: "120px" },
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import {
2+
ColumnConfig,
3+
ComponentConfig,
4+
} from "@databiosphere/findable-ui/lib/config/entities";
5+
import { FilesResponse } from "../../../../../app/apis/azul/anvil-cmg/common/responses";
6+
import { ProjectsResponse } from "../../../../../app/apis/azul/hca-dcp/common/responses";
7+
import { PickSome } from "../../../../../app/common/types";
8+
import * as C from "../../../../../app/components";
9+
import * as V from "../../../../../app/viewModelBuilders/azul/hca-dcp/common/viewModelBuilders";
10+
import {
11+
HCA_DCP_CATEGORY_KEY,
12+
HCA_DCP_CATEGORY_LABEL,
13+
} from "../../../category";
14+
15+
export const COLUMN: PickSome<
16+
Record<
17+
keyof typeof HCA_DCP_CATEGORY_KEY,
18+
ColumnConfig<FilesResponse | ProjectsResponse>
19+
>,
20+
"DATA_USE_RESTRICTION"
21+
> = {
22+
DATA_USE_RESTRICTION: {
23+
componentConfig: {
24+
component: C.BasicCell,
25+
viewBuilder: V.buildDataUseRestriction,
26+
} as ComponentConfig<typeof C.BasicCell, FilesResponse | ProjectsResponse>,
27+
header: HCA_DCP_CATEGORY_LABEL.DATA_USE_RESTRICTION,
28+
id: HCA_DCP_CATEGORY_KEY.DATA_USE_RESTRICTION,
29+
width: { max: "1fr", min: "124px" },
30+
},
31+
};

site-config/hca-dcp/cc-ma-dev/index/filesEntityConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
} from "@databiosphere/findable-ui/lib/config/entities";
55
import * as C from "../../../../app/components";
66
import * as V from "../../../../app/viewModelBuilders/azul/hca-dcp/common/viewModelBuilders";
7-
import { COLUMN } from "./common/constants";
7+
import { COLUMN } from "./common/column";
88

99
/**
1010
* Returns the entity config for managed access files.

site-config/hca-dcp/cc-ma-dev/index/common/constants.ts renamed to site-config/hca-dcp/cc-ma-dev/index/projects/column.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,17 @@ import {
1212
} from "../../../category";
1313

1414
export const COLUMN: PickSome<
15-
Record<keyof typeof HCA_DCP_CATEGORY_KEY, ColumnConfig>,
16-
"ACCESSIBLE" | "DATA_USE_RESTRICTION"
15+
Record<keyof typeof HCA_DCP_CATEGORY_KEY, ColumnConfig<ProjectsResponse>>,
16+
"ACCESSIBLE"
1717
> = {
1818
ACCESSIBLE: {
1919
componentConfig: {
2020
component: C.StatusBadge,
2121
viewBuilder: V.buildProjectAccess,
2222
} as ComponentConfig<typeof C.StatusBadge, ProjectsResponse>,
23-
disableSorting: true,
23+
enableSorting: false,
2424
header: HCA_DCP_CATEGORY_LABEL.ACCESSIBLE,
2525
id: HCA_DCP_CATEGORY_KEY.ACCESSIBLE,
2626
width: "auto",
2727
},
28-
DATA_USE_RESTRICTION: {
29-
componentConfig: {
30-
component: C.BasicCell,
31-
viewBuilder: V.buildDataUseRestriction,
32-
} as ComponentConfig<typeof C.BasicCell, ProjectsResponse>,
33-
header: HCA_DCP_CATEGORY_LABEL.DATA_USE_RESTRICTION,
34-
id: HCA_DCP_CATEGORY_KEY.DATA_USE_RESTRICTION,
35-
width: { max: "1fr", min: "124px" },
36-
},
3728
};

site-config/hca-dcp/cc-ma-dev/index/projectsEntityConfig.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import { getMAProjectDetailTabs } from "../detail/project/mainColumn";
66
import { getMAProjectDetailTop } from "../detail/project/top";
77
import { listHero } from "../listView/projectsListHero";
88
import { CATEGORY_GROUPS } from "./common/category";
9-
import { COLUMN } from "./common/constants";
9+
import { COLUMN } from "./common/column";
1010
import { getMAFilesEntityConfig } from "./filesEntityConfig";
11+
import { COLUMN as PROJECTS_COLUMN } from "./projects/column";
1112

1213
/**
1314
* Returns managed access category group config.
@@ -59,7 +60,7 @@ export function getMAProjectsEntityConfig(
5960
// Clone columns.
6061
const cloneColumns = [...cloneList.columns];
6162
// Add accessible column.
62-
cloneColumns.splice(1, 0, COLUMN.ACCESSIBLE); // Accessible column.
63+
cloneColumns.splice(1, 0, PROJECTS_COLUMN.ACCESSIBLE); // Accessible column.
6364
// Add data use restriction column.
6465
cloneColumns.splice(2, 0, COLUMN.DATA_USE_RESTRICTION); // Data use restriction column.
6566
cloneList.columns = cloneColumns;

site-config/hca-dcp/dev/index/filesEntityConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const filesEntityConfig: EntityConfig<FilesResponse> = {
3232
viewBuilder: V.buildFileDownload,
3333
} as ComponentConfig<typeof C.AzulFileDownload, FilesResponse>,
3434
disableHiding: true,
35-
disableSorting: true,
35+
enableSorting: false,
3636
header: HCA_DCP_CATEGORY_LABEL.AZUL_FILE_DOWNLOAD,
3737
id: HCA_DCP_CATEGORY_KEY.AZUL_FILE_DOWNLOAD,
3838
width: { max: "auto", min: "76px" },

0 commit comments

Comments
 (0)