1
+ import { ViewContext } from "@databiosphere/findable-ui/lib/config/entities" ;
1
2
import { ColumnDef } from "@tanstack/react-table" ;
2
3
import React from "react" ;
3
4
import {
@@ -6,11 +7,17 @@ import {
6
7
} from "../../../../../site-config/hca-dcp/category" ;
7
8
import { ProjectsResponse } from "../../../../apis/azul/hca-dcp/common/responses" ;
8
9
import * as C from "../../../../components" ;
10
+ import * as MDX from "../../../../components/common/MDXContent/lungmap" ;
11
+ import { Unused } from "../../../common/entities" ;
9
12
import {
10
13
groupProjectMatrixViewsBySpecies ,
11
14
projectMatrixMapper ,
12
15
} from "../../hca-dcp/common/projectMatrixMapper/projectMatrixMapper" ;
13
16
import {
17
+ buildDownloadCurlCommand as buildHCADownloadCurlCommand ,
18
+ buildDownloadEntityCurlCommand as buildHCADownloadEntityCurlCommand ,
19
+ buildExportToTerra as buildHCAExportToTerra ,
20
+ buildManifestDownload as buildHCAManifestDownload ,
14
21
getGeneratedMatricesActionsColumnDef ,
15
22
getGeneratedMatricesAnatomicalEntityColumnDef ,
16
23
getGeneratedMatricesContentDescriptionColumnDef ,
@@ -71,6 +78,71 @@ function buildContributorGeneratedMatricesTableColumns<T>(): ColumnDef<T>[] {
71
78
] ;
72
79
}
73
80
81
+ /**
82
+ * Build props for DownloadCurlCommand component.
83
+ * @param _ - Unused.
84
+ * @param viewContext - View context.
85
+ * @returns model to be used as props for the DownloadCurlCommand component.
86
+ */
87
+ export const buildDownloadCurlCommand = (
88
+ _ : Unused ,
89
+ viewContext ?: ViewContext
90
+ ) : React . ComponentProps < typeof C . DownloadCurlCommand > => {
91
+ return {
92
+ ...buildHCADownloadCurlCommand ( _ , viewContext as ViewContext ) ,
93
+ DownloadCurlSuccess : MDX . DownloadCurlCommandSuccess ,
94
+ } ;
95
+ } ;
96
+
97
+ /**
98
+ * Build props for DownloadCurlCommand component from the given projects response.
99
+ * @param projectsResponse - Response model return from projects API.
100
+ * @param viewContext - View context.
101
+ * @returns model to be used as props for the DownloadCurlCommand component.
102
+ */
103
+ export const buildDownloadEntityCurlCommand = (
104
+ projectsResponse : ProjectsResponse ,
105
+ viewContext : ViewContext
106
+ ) : React . ComponentProps < typeof C . DownloadCurlCommand > => {
107
+ return {
108
+ ...buildHCADownloadEntityCurlCommand ( projectsResponse , viewContext ) ,
109
+ DownloadCurlSuccess : MDX . DownloadCurlCommandSuccess ,
110
+ } ;
111
+ } ;
112
+
113
+ /**
114
+ * Build props for ExportToTerra component.
115
+ * @param _ - Unused.
116
+ * @param viewContext - View context.
117
+ * @returns model to be used as props for the ExportToTerra component.
118
+ */
119
+ export const buildExportToTerra = (
120
+ _ : Unused ,
121
+ viewContext ?: ViewContext
122
+ ) : React . ComponentProps < typeof C . ExportToTerra > => {
123
+ return {
124
+ ...buildHCAExportToTerra ( _ , viewContext as ViewContext ) ,
125
+ ExportToTerraStart : MDX . ExportToTerraStart ,
126
+ ExportToTerraSuccess : MDX . ExportToTerraSuccessWithWarning ,
127
+ } ;
128
+ } ;
129
+
130
+ /**
131
+ * Build props for ManifestDownload component.
132
+ * @param _ - Unused.
133
+ * @param viewContext - View context.
134
+ * @returns model to be used as props for the ManifestDownload component.
135
+ */
136
+ export const buildManifestDownload = (
137
+ _ : Unused ,
138
+ viewContext ?: ViewContext
139
+ ) : React . ComponentProps < typeof C . ManifestDownload > => {
140
+ return {
141
+ ...buildHCAManifestDownload ( _ , viewContext as ViewContext ) ,
142
+ ManifestDownloadSuccess : MDX . ManifestDownloadSuccess ,
143
+ } ;
144
+ } ;
145
+
74
146
/**
75
147
* Returns grid props for the Grid component.
76
148
* Views render as follows:
0 commit comments