synapse-react-client 4.0.11 → 4.0.12
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/SWC.index.d.ts +1 -1
- package/dist/SWC.index.js +1 -1
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.d.ts +44 -0
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.d.ts.map +1 -0
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.js +46 -0
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.js.map +1 -0
- package/dist/components/DownloadCart/DownloadCartPage.d.ts.map +1 -1
- package/dist/components/DownloadCart/DownloadCartPage.js +183 -185
- package/dist/components/DownloadCart/DownloadCartPage.js.map +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.d.ts.map +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js.map +1 -1
- package/dist/components/EntityAclEditor/EntityAclEditor.js +8 -8
- package/dist/components/EntityAclEditor/EntityAclEditor.js.map +1 -1
- package/dist/components/EntityAclEditor/InheritanceMessage.d.ts.map +1 -1
- package/dist/components/EntityAclEditor/InheritanceMessage.js +1 -2
- package/dist/components/EntityAclEditor/InheritanceMessage.js.map +1 -1
- package/dist/components/FullTextSearch/FullTextSearch.d.ts.map +1 -1
- package/dist/components/FullTextSearch/FullTextSearch.js +86 -47
- package/dist/components/FullTextSearch/FullTextSearch.js.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.d.ts.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.js +157 -157
- package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
- package/dist/components/HeaderCard.d.ts.map +1 -1
- package/dist/components/HeaderCard.js +131 -130
- package/dist/components/HeaderCard.js.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.d.ts +4 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.d.ts.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.js +3 -2
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.js.map +1 -1
- package/dist/components/QueryContext/QueryContext.d.ts +6 -0
- package/dist/components/QueryContext/QueryContext.d.ts.map +1 -1
- package/dist/components/QueryContext/QueryContext.js.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js +12 -11
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +5 -0
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +32 -29
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/UseRowSet.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/UseRowSet.js +4 -1
- package/dist/components/QueryWrapperPlotNav/UseRowSet.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts +59 -0
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -0
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +174 -0
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts +40 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts.map +1 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js +100 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js.map +1 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts +56 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts.map +1 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js +73 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js.map +1 -0
- package/dist/components/ShareThisPage/ShareThisPage.js +1 -1
- package/dist/components/ShareThisPage/ShareThisPage.js.map +1 -1
- package/dist/components/SynapseChat/GridAgentChat.d.ts.map +1 -1
- package/dist/components/SynapseChat/GridAgentChat.js +20 -14
- package/dist/components/SynapseChat/GridAgentChat.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts +3 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.js +51 -36
- package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.css +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js +8 -7
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js.map +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.scss +16 -0
- package/dist/components/SynapseHomepageV2/WordPressNews.d.ts +3 -1
- package/dist/components/SynapseHomepageV2/WordPressNews.d.ts.map +1 -1
- package/dist/components/SynapseHomepageV2/WordPressNews.js +9 -8
- package/dist/components/SynapseHomepageV2/WordPressNews.js.map +1 -1
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.d.ts +2 -1
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.d.ts.map +1 -1
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.js +2 -2
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.js.map +1 -1
- package/dist/components/SynapseTable/SearchV2.d.ts +7 -0
- package/dist/components/SynapseTable/SearchV2.d.ts.map +1 -1
- package/dist/components/SynapseTable/SearchV2.js.map +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.d.ts.map +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.js +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.js.map +1 -1
- package/dist/components/SynapseTable/usePrefetchTableData.d.ts.map +1 -1
- package/dist/components/SynapseTable/usePrefetchTableData.js +6 -5
- package/dist/components/SynapseTable/usePrefetchTableData.js.map +1 -1
- package/dist/components/ToastMessage/ToastMessage.d.ts +1 -1
- package/dist/components/ToastMessage/ToastMessage.d.ts.map +1 -1
- package/dist/components/ToastMessage/ToastMessage.js +2 -2
- package/dist/components/ToastMessage/ToastMessage.js.map +1 -1
- package/dist/components/error/ErrorPage.d.ts +0 -4
- package/dist/components/error/ErrorPage.d.ts.map +1 -1
- package/dist/components/error/ErrorPage.js +25 -30
- package/dist/components/error/ErrorPage.js.map +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +41 -39
- package/dist/components/widgets/query-filter/FacetFilterControls.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/FacetFilterControls.js +2 -2
- package/dist/components/widgets/query-filter/FacetFilterControls.js.map +1 -1
- package/dist/index.js +52 -50
- package/dist/index.js.map +1 -1
- package/dist/mocks/entity/index.d.ts.map +1 -1
- package/dist/mocks/entity/index.js +18 -16
- package/dist/mocks/entity/index.js.map +1 -1
- package/dist/mocks/mockSearchQueryData.d.ts +14 -0
- package/dist/mocks/mockSearchQueryData.d.ts.map +1 -0
- package/dist/mocks/mockSearchQueryData.js +564 -0
- package/dist/mocks/mockSearchQueryData.js.map +1 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.d.ts +22 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.d.ts.map +1 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.js +63 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.js.map +1 -0
- package/dist/mocks/msw/handlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers.js +9 -7
- package/dist/mocks/msw/handlers.js.map +1 -1
- package/dist/style/components/_cards.scss +15 -0
- package/dist/style/main.css +1 -1
- package/dist/synapse-client/SynapseClient.d.ts +7 -1
- package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
- package/dist/synapse-client/SynapseClient.js +422 -417
- package/dist/synapse-client/SynapseClient.js.map +1 -1
- package/dist/synapse-client/index.js +3 -3
- package/dist/synapse-queries/KeyFactory.d.ts +2 -0
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +3 -0
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/APIConstants.d.ts +2 -0
- package/dist/utils/APIConstants.d.ts.map +1 -1
- package/dist/utils/APIConstants.js +2 -2
- package/dist/utils/APIConstants.js.map +1 -1
- package/dist/utils/functions/calculateFriendlyFileSize.d.ts.map +1 -1
- package/dist/utils/functions/calculateFriendlyFileSize.js +3 -3
- package/dist/utils/functions/calculateFriendlyFileSize.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
//#region src/mocks/mockSearchQueryData.ts
|
|
2
|
+
var e = "syn60001", t = "syn60000", n = {
|
|
3
|
+
id: e,
|
|
4
|
+
name: "Mock Search Index",
|
|
5
|
+
concreteType: "org.sagebionetworks.repo.model.search.table.SearchIndex",
|
|
6
|
+
definingSQL: `SELECT * FROM ${t}`
|
|
7
|
+
}, r = {
|
|
8
|
+
id: e,
|
|
9
|
+
name: n.name,
|
|
10
|
+
entity: n
|
|
11
|
+
}, i = {
|
|
12
|
+
concreteType: "org.sagebionetworks.repo.model.search.table.SearchIndexQuery",
|
|
13
|
+
searchQuery: {
|
|
14
|
+
limit: 25,
|
|
15
|
+
offset: 0
|
|
16
|
+
}
|
|
17
|
+
}, a = {
|
|
18
|
+
concreteType: "org.sagebionetworks.repo.model.table.QueryResultBundle",
|
|
19
|
+
queryCount: 53,
|
|
20
|
+
selectColumns: [
|
|
21
|
+
{
|
|
22
|
+
name: "mature",
|
|
23
|
+
columnType: "STRING"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "acronym",
|
|
27
|
+
columnType: "STRING"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "name",
|
|
31
|
+
columnType: "STRING"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "category",
|
|
35
|
+
columnType: "STRING"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "collections",
|
|
39
|
+
columnType: "STRING_LIST"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "topic",
|
|
43
|
+
columnType: "STRING_LIST"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "dataTypes",
|
|
47
|
+
columnType: "STRING_LIST"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "isOpen",
|
|
51
|
+
columnType: "STRING"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "registration",
|
|
55
|
+
columnType: "STRING"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
columnModels: [
|
|
59
|
+
{
|
|
60
|
+
id: "245711",
|
|
61
|
+
name: "mature",
|
|
62
|
+
columnType: "STRING",
|
|
63
|
+
maximumSize: 50,
|
|
64
|
+
facetType: "enumeration"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: "240032",
|
|
68
|
+
name: "acronym",
|
|
69
|
+
columnType: "STRING",
|
|
70
|
+
maximumSize: 100
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "244787",
|
|
74
|
+
name: "name",
|
|
75
|
+
columnType: "STRING",
|
|
76
|
+
maximumSize: 256
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "245706",
|
|
80
|
+
name: "category",
|
|
81
|
+
columnType: "STRING",
|
|
82
|
+
maximumSize: 100,
|
|
83
|
+
facetType: "enumeration"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "245526",
|
|
87
|
+
name: "collections",
|
|
88
|
+
columnType: "STRING_LIST",
|
|
89
|
+
maximumListLength: 100,
|
|
90
|
+
facetType: "enumeration"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: "243320",
|
|
94
|
+
name: "topic",
|
|
95
|
+
columnType: "STRING_LIST",
|
|
96
|
+
maximumListLength: 100,
|
|
97
|
+
facetType: "enumeration"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "240611",
|
|
101
|
+
name: "dataTypes",
|
|
102
|
+
columnType: "STRING_LIST",
|
|
103
|
+
maximumListLength: 100,
|
|
104
|
+
facetType: "enumeration"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "245712",
|
|
108
|
+
name: "isOpen",
|
|
109
|
+
columnType: "STRING",
|
|
110
|
+
maximumSize: 10,
|
|
111
|
+
facetType: "enumeration"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "245713",
|
|
115
|
+
name: "registration",
|
|
116
|
+
columnType: "STRING",
|
|
117
|
+
maximumSize: 10,
|
|
118
|
+
facetType: "enumeration"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
facets: [
|
|
122
|
+
{
|
|
123
|
+
concreteType: "org.sagebionetworks.repo.model.table.FacetColumnResultValues",
|
|
124
|
+
columnName: "collections",
|
|
125
|
+
facetType: "enumeration",
|
|
126
|
+
facetValues: [
|
|
127
|
+
{
|
|
128
|
+
value: "Machine Learning Framework",
|
|
129
|
+
count: 11,
|
|
130
|
+
isSelected: !1
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
value: "File Format",
|
|
134
|
+
count: 8,
|
|
135
|
+
isSelected: !1
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
value: "OBO Foundry",
|
|
139
|
+
count: 6,
|
|
140
|
+
isSelected: !1
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
value: "Implementation Maturity Production",
|
|
144
|
+
count: 5,
|
|
145
|
+
isSelected: !1
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
value: "Standards Process Maturity Final",
|
|
149
|
+
count: 4,
|
|
150
|
+
isSelected: !1
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
value: "Cloud Platform",
|
|
154
|
+
count: 3,
|
|
155
|
+
isSelected: !1
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
value: "Graph Data Platform",
|
|
159
|
+
count: 3,
|
|
160
|
+
isSelected: !1
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
value: "Notebook Platform",
|
|
164
|
+
count: 3,
|
|
165
|
+
isSelected: !1
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
value: "Cloud Service",
|
|
169
|
+
count: 1,
|
|
170
|
+
isSelected: !1
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
value: "Data Model",
|
|
174
|
+
count: 1,
|
|
175
|
+
isSelected: !1
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
concreteType: "org.sagebionetworks.repo.model.table.FacetColumnResultValues",
|
|
181
|
+
columnName: "category",
|
|
182
|
+
facetType: "enumeration",
|
|
183
|
+
facetValues: [
|
|
184
|
+
{
|
|
185
|
+
value: "Software or Tool",
|
|
186
|
+
count: 33,
|
|
187
|
+
isSelected: !1
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
value: "Biomedical Standard",
|
|
191
|
+
count: 8,
|
|
192
|
+
isSelected: !1
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
value: "Ontology or Vocabulary",
|
|
196
|
+
count: 8,
|
|
197
|
+
isSelected: !1
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
value: "Data Standard",
|
|
201
|
+
count: 2,
|
|
202
|
+
isSelected: !1
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
value: "Training Program",
|
|
206
|
+
count: 2,
|
|
207
|
+
isSelected: !1
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
concreteType: "org.sagebionetworks.repo.model.table.FacetColumnResultValues",
|
|
213
|
+
columnName: "topic",
|
|
214
|
+
facetType: "enumeration",
|
|
215
|
+
facetValues: [
|
|
216
|
+
{
|
|
217
|
+
value: "Data",
|
|
218
|
+
count: 27,
|
|
219
|
+
isSelected: !1
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
value: "Genome",
|
|
223
|
+
count: 6,
|
|
224
|
+
isSelected: !1
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
value: "Clinical Observations",
|
|
228
|
+
count: 4,
|
|
229
|
+
isSelected: !1
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
value: "Image",
|
|
233
|
+
count: 3,
|
|
234
|
+
isSelected: !1
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
value: "Networks And Pathways",
|
|
238
|
+
count: 3,
|
|
239
|
+
isSelected: !1
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
value: "EHR",
|
|
243
|
+
count: 2,
|
|
244
|
+
isSelected: !1
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
value: "Gene",
|
|
248
|
+
count: 2,
|
|
249
|
+
isSelected: !1
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
value: "Training",
|
|
253
|
+
count: 2,
|
|
254
|
+
isSelected: !1
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
concreteType: "org.sagebionetworks.repo.model.table.FacetColumnResultValues",
|
|
260
|
+
columnName: "dataTypes",
|
|
261
|
+
facetType: "enumeration",
|
|
262
|
+
facetValues: [
|
|
263
|
+
{
|
|
264
|
+
value: "PyTorch Tensor",
|
|
265
|
+
count: 3,
|
|
266
|
+
isSelected: !1
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
value: "Array",
|
|
270
|
+
count: 2,
|
|
271
|
+
isSelected: !1
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
value: "Database",
|
|
275
|
+
count: 2,
|
|
276
|
+
isSelected: !1
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
value: "Graph",
|
|
280
|
+
count: 2,
|
|
281
|
+
isSelected: !1
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
value: "Graph Database",
|
|
285
|
+
count: 2,
|
|
286
|
+
isSelected: !1
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
value: "BED",
|
|
290
|
+
count: 1,
|
|
291
|
+
isSelected: !1
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
value: "DICOM",
|
|
295
|
+
count: 1,
|
|
296
|
+
isSelected: !1
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
value: "Neo4j",
|
|
300
|
+
count: 1,
|
|
301
|
+
isSelected: !1
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
value: "ONNX",
|
|
305
|
+
count: 1,
|
|
306
|
+
isSelected: !1
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
concreteType: "org.sagebionetworks.repo.model.table.FacetColumnResultValues",
|
|
312
|
+
columnName: "isOpen",
|
|
313
|
+
facetType: "enumeration",
|
|
314
|
+
facetValues: [{
|
|
315
|
+
value: "Yes",
|
|
316
|
+
count: 50,
|
|
317
|
+
isSelected: !1
|
|
318
|
+
}, {
|
|
319
|
+
value: "No",
|
|
320
|
+
count: 3,
|
|
321
|
+
isSelected: !1
|
|
322
|
+
}]
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
concreteType: "org.sagebionetworks.repo.model.table.FacetColumnResultValues",
|
|
326
|
+
columnName: "mature",
|
|
327
|
+
facetType: "enumeration",
|
|
328
|
+
facetValues: [{
|
|
329
|
+
value: "Is Not Mature",
|
|
330
|
+
count: 48,
|
|
331
|
+
isSelected: !1
|
|
332
|
+
}, {
|
|
333
|
+
value: "Is Mature",
|
|
334
|
+
count: 5,
|
|
335
|
+
isSelected: !1
|
|
336
|
+
}]
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
concreteType: "org.sagebionetworks.repo.model.table.FacetColumnResultValues",
|
|
340
|
+
columnName: "registration",
|
|
341
|
+
facetType: "enumeration",
|
|
342
|
+
facetValues: [{
|
|
343
|
+
value: "No",
|
|
344
|
+
count: 44,
|
|
345
|
+
isSelected: !1
|
|
346
|
+
}, {
|
|
347
|
+
value: "Yes",
|
|
348
|
+
count: 9,
|
|
349
|
+
isSelected: !1
|
|
350
|
+
}]
|
|
351
|
+
}
|
|
352
|
+
],
|
|
353
|
+
queryResult: {
|
|
354
|
+
concreteType: "org.sagebionetworks.repo.model.table.QueryResult",
|
|
355
|
+
queryResults: {
|
|
356
|
+
concreteType: "org.sagebionetworks.repo.model.table.RowSet",
|
|
357
|
+
tableId: e,
|
|
358
|
+
etag: "search-mock-etag",
|
|
359
|
+
headers: [
|
|
360
|
+
{
|
|
361
|
+
name: "mature",
|
|
362
|
+
columnType: "STRING",
|
|
363
|
+
id: "245711"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
name: "acronym",
|
|
367
|
+
columnType: "STRING",
|
|
368
|
+
id: "240032"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
name: "name",
|
|
372
|
+
columnType: "STRING",
|
|
373
|
+
id: "244787"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
name: "category",
|
|
377
|
+
columnType: "STRING",
|
|
378
|
+
id: "245706"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
name: "collections",
|
|
382
|
+
columnType: "STRING_LIST",
|
|
383
|
+
id: "245526"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
name: "topic",
|
|
387
|
+
columnType: "STRING_LIST",
|
|
388
|
+
id: "243320"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
name: "dataTypes",
|
|
392
|
+
columnType: "STRING_LIST",
|
|
393
|
+
id: "240611"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
name: "isOpen",
|
|
397
|
+
columnType: "STRING",
|
|
398
|
+
id: "245712"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
name: "registration",
|
|
402
|
+
columnType: "STRING",
|
|
403
|
+
id: "245713"
|
|
404
|
+
}
|
|
405
|
+
],
|
|
406
|
+
rows: [
|
|
407
|
+
{
|
|
408
|
+
rowId: 1,
|
|
409
|
+
versionNumber: 1,
|
|
410
|
+
values: [
|
|
411
|
+
"Is Not Mature",
|
|
412
|
+
"PyTorch",
|
|
413
|
+
"PyTorch",
|
|
414
|
+
"Software or Tool",
|
|
415
|
+
"[\"Machine Learning Framework\"]",
|
|
416
|
+
"[\"Data\"]",
|
|
417
|
+
"[\"PyTorch Tensor\"]",
|
|
418
|
+
"Yes",
|
|
419
|
+
"No"
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
rowId: 2,
|
|
424
|
+
versionNumber: 1,
|
|
425
|
+
values: [
|
|
426
|
+
"Is Mature",
|
|
427
|
+
"TF",
|
|
428
|
+
"TensorFlow",
|
|
429
|
+
"Software or Tool",
|
|
430
|
+
"[\"Machine Learning Framework\"]",
|
|
431
|
+
"[\"Data\"]",
|
|
432
|
+
"[\"Tensor\"]",
|
|
433
|
+
"Yes",
|
|
434
|
+
"No"
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
rowId: 3,
|
|
439
|
+
versionNumber: 1,
|
|
440
|
+
values: [
|
|
441
|
+
"Is Not Mature",
|
|
442
|
+
"HDF5",
|
|
443
|
+
"Hierarchical Data Format 5",
|
|
444
|
+
"Data Standard",
|
|
445
|
+
"[\"File Format\"]",
|
|
446
|
+
"[\"Data\"]",
|
|
447
|
+
"[\"Array\"]",
|
|
448
|
+
"Yes",
|
|
449
|
+
"No"
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
rowId: 4,
|
|
454
|
+
versionNumber: 1,
|
|
455
|
+
values: [
|
|
456
|
+
"Is Mature",
|
|
457
|
+
"DICOM",
|
|
458
|
+
"Digital Imaging and Communications in Medicine",
|
|
459
|
+
"Biomedical Standard",
|
|
460
|
+
"[\"File Format\"]",
|
|
461
|
+
"[\"Image\"]",
|
|
462
|
+
"[\"DICOM\"]",
|
|
463
|
+
"Yes",
|
|
464
|
+
"No"
|
|
465
|
+
]
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
rowId: 5,
|
|
469
|
+
versionNumber: 1,
|
|
470
|
+
values: [
|
|
471
|
+
"Is Not Mature",
|
|
472
|
+
"Neo4j",
|
|
473
|
+
"Neo4j Graph Database",
|
|
474
|
+
"Software or Tool",
|
|
475
|
+
"[\"Graph Data Platform\"]",
|
|
476
|
+
"[\"Data\"]",
|
|
477
|
+
"[\"Neo4j\"]",
|
|
478
|
+
"Yes",
|
|
479
|
+
"No"
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
rowId: 6,
|
|
484
|
+
versionNumber: 1,
|
|
485
|
+
values: [
|
|
486
|
+
"Is Mature",
|
|
487
|
+
"GO",
|
|
488
|
+
"Gene Ontology",
|
|
489
|
+
"Ontology or Vocabulary",
|
|
490
|
+
"[\"OBO Foundry\"]",
|
|
491
|
+
"[\"Gene\"]",
|
|
492
|
+
null,
|
|
493
|
+
"Yes",
|
|
494
|
+
"No"
|
|
495
|
+
]
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
rowId: 7,
|
|
499
|
+
versionNumber: 1,
|
|
500
|
+
values: [
|
|
501
|
+
"Is Not Mature",
|
|
502
|
+
"ONNX",
|
|
503
|
+
"Open Neural Network Exchange",
|
|
504
|
+
"Data Standard",
|
|
505
|
+
"[\"Machine Learning Framework\"]",
|
|
506
|
+
"[\"Data\"]",
|
|
507
|
+
"[\"ONNX\"]",
|
|
508
|
+
"Yes",
|
|
509
|
+
"No"
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
rowId: 8,
|
|
514
|
+
versionNumber: 1,
|
|
515
|
+
values: [
|
|
516
|
+
"Is Not Mature",
|
|
517
|
+
"Jupyter",
|
|
518
|
+
"JupyterHub",
|
|
519
|
+
"Software or Tool",
|
|
520
|
+
"[\"Notebook Platform\"]",
|
|
521
|
+
"[\"Training\"]",
|
|
522
|
+
null,
|
|
523
|
+
"Yes",
|
|
524
|
+
"No"
|
|
525
|
+
]
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
rowId: 9,
|
|
529
|
+
versionNumber: 1,
|
|
530
|
+
values: [
|
|
531
|
+
"Is Not Mature",
|
|
532
|
+
"AWS",
|
|
533
|
+
"Amazon Web Services",
|
|
534
|
+
"Software or Tool",
|
|
535
|
+
"[\"Cloud Platform\"]",
|
|
536
|
+
"[\"Data\"]",
|
|
537
|
+
null,
|
|
538
|
+
"Yes",
|
|
539
|
+
"Yes"
|
|
540
|
+
]
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
rowId: 10,
|
|
544
|
+
versionNumber: 1,
|
|
545
|
+
values: [
|
|
546
|
+
"Is Not Mature",
|
|
547
|
+
"HPO",
|
|
548
|
+
"Human Phenotype Ontology",
|
|
549
|
+
"Ontology or Vocabulary",
|
|
550
|
+
"[\"OBO Foundry\"]",
|
|
551
|
+
"[\"Clinical Observations\"]",
|
|
552
|
+
null,
|
|
553
|
+
"Yes",
|
|
554
|
+
"No"
|
|
555
|
+
]
|
|
556
|
+
}
|
|
557
|
+
]
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
//#endregion
|
|
562
|
+
export { e as MOCK_SEARCH_INDEX_ENTITY_ID, t as MOCK_SEARCH_UNDERLYING_TABLE_ENTITY_ID, n as mockSearchIndexEntity, r as mockSearchIndexEntityData, i as mockSearchIndexQuery, a as mockSearchQueryResultBundle };
|
|
563
|
+
|
|
564
|
+
//# sourceMappingURL=mockSearchQueryData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockSearchQueryData.js","names":[],"sources":["../../src/mocks/mockSearchQueryData.ts"],"sourcesContent":["import { QueryResultBundle } from '@sage-bionetworks/synapse-types'\nimport { SearchIndex, SearchIndexQuery } from '@sage-bionetworks/synapse-client'\nimport { MockEntityData } from '@/mocks/entity/MockEntityData'\nimport { Entity } from '@sage-bionetworks/synapse-types'\n\n/** The SearchIndex entity that accepts search API calls and has a definingSql. */\nexport const MOCK_SEARCH_INDEX_ENTITY_ID = 'syn60001'\n/** The underlying Table/View whose schema (column models) backs the search index. */\nexport const MOCK_SEARCH_UNDERLYING_TABLE_ENTITY_ID = 'syn60000'\n\n/** Mock SearchIndex entity whose definingSQL references the underlying table. */\nexport const mockSearchIndexEntity: SearchIndex = {\n id: MOCK_SEARCH_INDEX_ENTITY_ID,\n name: 'Mock Search Index',\n concreteType: 'org.sagebionetworks.repo.model.search.table.SearchIndex',\n definingSQL: `SELECT * FROM ${MOCK_SEARCH_UNDERLYING_TABLE_ENTITY_ID}`,\n}\n\n/** MockEntityData wrapper so the default entity GET handler can serve syn60001. */\nexport const mockSearchIndexEntityData: MockEntityData = {\n id: MOCK_SEARCH_INDEX_ENTITY_ID,\n name: mockSearchIndexEntity.name!,\n entity: mockSearchIndexEntity as unknown as Entity,\n}\n\nexport const mockSearchIndexQuery: SearchIndexQuery = {\n concreteType: 'org.sagebionetworks.repo.model.search.table.SearchIndexQuery',\n searchQuery: {\n limit: 25,\n offset: 0,\n },\n}\n\nexport const mockSearchQueryResultBundle: QueryResultBundle = {\n concreteType: 'org.sagebionetworks.repo.model.table.QueryResultBundle',\n queryCount: 53,\n selectColumns: [\n { name: 'mature', columnType: 'STRING' },\n { name: 'acronym', columnType: 'STRING' },\n { name: 'name', columnType: 'STRING' },\n { name: 'category', columnType: 'STRING' },\n { name: 'collections', columnType: 'STRING_LIST' },\n { name: 'topic', columnType: 'STRING_LIST' },\n { name: 'dataTypes', columnType: 'STRING_LIST' },\n { name: 'isOpen', columnType: 'STRING' },\n { name: 'registration', columnType: 'STRING' },\n ],\n columnModels: [\n {\n id: '245711',\n name: 'mature',\n columnType: 'STRING',\n maximumSize: 50,\n facetType: 'enumeration',\n },\n { id: '240032', name: 'acronym', columnType: 'STRING', maximumSize: 100 },\n { id: '244787', name: 'name', columnType: 'STRING', maximumSize: 256 },\n {\n id: '245706',\n name: 'category',\n columnType: 'STRING',\n maximumSize: 100,\n facetType: 'enumeration',\n },\n {\n id: '245526',\n name: 'collections',\n columnType: 'STRING_LIST',\n maximumListLength: 100,\n facetType: 'enumeration',\n },\n {\n id: '243320',\n name: 'topic',\n columnType: 'STRING_LIST',\n maximumListLength: 100,\n facetType: 'enumeration',\n },\n {\n id: '240611',\n name: 'dataTypes',\n columnType: 'STRING_LIST',\n maximumListLength: 100,\n facetType: 'enumeration',\n },\n {\n id: '245712',\n name: 'isOpen',\n columnType: 'STRING',\n maximumSize: 10,\n facetType: 'enumeration',\n },\n {\n id: '245713',\n name: 'registration',\n columnType: 'STRING',\n maximumSize: 10,\n facetType: 'enumeration',\n },\n ],\n facets: [\n {\n concreteType:\n 'org.sagebionetworks.repo.model.table.FacetColumnResultValues',\n columnName: 'collections',\n facetType: 'enumeration',\n facetValues: [\n { value: 'Machine Learning Framework', count: 11, isSelected: false },\n { value: 'File Format', count: 8, isSelected: false },\n { value: 'OBO Foundry', count: 6, isSelected: false },\n {\n value: 'Implementation Maturity Production',\n count: 5,\n isSelected: false,\n },\n {\n value: 'Standards Process Maturity Final',\n count: 4,\n isSelected: false,\n },\n { value: 'Cloud Platform', count: 3, isSelected: false },\n { value: 'Graph Data Platform', count: 3, isSelected: false },\n { value: 'Notebook Platform', count: 3, isSelected: false },\n { value: 'Cloud Service', count: 1, isSelected: false },\n { value: 'Data Model', count: 1, isSelected: false },\n ],\n },\n {\n concreteType:\n 'org.sagebionetworks.repo.model.table.FacetColumnResultValues',\n columnName: 'category',\n facetType: 'enumeration',\n facetValues: [\n { value: 'Software or Tool', count: 33, isSelected: false },\n { value: 'Biomedical Standard', count: 8, isSelected: false },\n { value: 'Ontology or Vocabulary', count: 8, isSelected: false },\n { value: 'Data Standard', count: 2, isSelected: false },\n { value: 'Training Program', count: 2, isSelected: false },\n ],\n },\n {\n concreteType:\n 'org.sagebionetworks.repo.model.table.FacetColumnResultValues',\n columnName: 'topic',\n facetType: 'enumeration',\n facetValues: [\n { value: 'Data', count: 27, isSelected: false },\n { value: 'Genome', count: 6, isSelected: false },\n { value: 'Clinical Observations', count: 4, isSelected: false },\n { value: 'Image', count: 3, isSelected: false },\n { value: 'Networks And Pathways', count: 3, isSelected: false },\n { value: 'EHR', count: 2, isSelected: false },\n { value: 'Gene', count: 2, isSelected: false },\n { value: 'Training', count: 2, isSelected: false },\n ],\n },\n {\n concreteType:\n 'org.sagebionetworks.repo.model.table.FacetColumnResultValues',\n columnName: 'dataTypes',\n facetType: 'enumeration',\n facetValues: [\n { value: 'PyTorch Tensor', count: 3, isSelected: false },\n { value: 'Array', count: 2, isSelected: false },\n { value: 'Database', count: 2, isSelected: false },\n { value: 'Graph', count: 2, isSelected: false },\n { value: 'Graph Database', count: 2, isSelected: false },\n { value: 'BED', count: 1, isSelected: false },\n { value: 'DICOM', count: 1, isSelected: false },\n { value: 'Neo4j', count: 1, isSelected: false },\n { value: 'ONNX', count: 1, isSelected: false },\n ],\n },\n {\n concreteType:\n 'org.sagebionetworks.repo.model.table.FacetColumnResultValues',\n columnName: 'isOpen',\n facetType: 'enumeration',\n facetValues: [\n { value: 'Yes', count: 50, isSelected: false },\n { value: 'No', count: 3, isSelected: false },\n ],\n },\n {\n concreteType:\n 'org.sagebionetworks.repo.model.table.FacetColumnResultValues',\n columnName: 'mature',\n facetType: 'enumeration',\n facetValues: [\n { value: 'Is Not Mature', count: 48, isSelected: false },\n { value: 'Is Mature', count: 5, isSelected: false },\n ],\n },\n {\n concreteType:\n 'org.sagebionetworks.repo.model.table.FacetColumnResultValues',\n columnName: 'registration',\n facetType: 'enumeration',\n facetValues: [\n { value: 'No', count: 44, isSelected: false },\n { value: 'Yes', count: 9, isSelected: false },\n ],\n },\n ],\n queryResult: {\n concreteType: 'org.sagebionetworks.repo.model.table.QueryResult',\n queryResults: {\n concreteType: 'org.sagebionetworks.repo.model.table.RowSet',\n tableId: MOCK_SEARCH_INDEX_ENTITY_ID,\n etag: 'search-mock-etag',\n headers: [\n { name: 'mature', columnType: 'STRING', id: '245711' },\n { name: 'acronym', columnType: 'STRING', id: '240032' },\n { name: 'name', columnType: 'STRING', id: '244787' },\n { name: 'category', columnType: 'STRING', id: '245706' },\n { name: 'collections', columnType: 'STRING_LIST', id: '245526' },\n { name: 'topic', columnType: 'STRING_LIST', id: '243320' },\n { name: 'dataTypes', columnType: 'STRING_LIST', id: '240611' },\n { name: 'isOpen', columnType: 'STRING', id: '245712' },\n { name: 'registration', columnType: 'STRING', id: '245713' },\n ],\n rows: [\n {\n rowId: 1,\n versionNumber: 1,\n values: [\n 'Is Not Mature',\n 'PyTorch',\n 'PyTorch',\n 'Software or Tool',\n '[\"Machine Learning Framework\"]',\n '[\"Data\"]',\n '[\"PyTorch Tensor\"]',\n 'Yes',\n 'No',\n ],\n },\n {\n rowId: 2,\n versionNumber: 1,\n values: [\n 'Is Mature',\n 'TF',\n 'TensorFlow',\n 'Software or Tool',\n '[\"Machine Learning Framework\"]',\n '[\"Data\"]',\n '[\"Tensor\"]',\n 'Yes',\n 'No',\n ],\n },\n {\n rowId: 3,\n versionNumber: 1,\n values: [\n 'Is Not Mature',\n 'HDF5',\n 'Hierarchical Data Format 5',\n 'Data Standard',\n '[\"File Format\"]',\n '[\"Data\"]',\n '[\"Array\"]',\n 'Yes',\n 'No',\n ],\n },\n {\n rowId: 4,\n versionNumber: 1,\n values: [\n 'Is Mature',\n 'DICOM',\n 'Digital Imaging and Communications in Medicine',\n 'Biomedical Standard',\n '[\"File Format\"]',\n '[\"Image\"]',\n '[\"DICOM\"]',\n 'Yes',\n 'No',\n ],\n },\n {\n rowId: 5,\n versionNumber: 1,\n values: [\n 'Is Not Mature',\n 'Neo4j',\n 'Neo4j Graph Database',\n 'Software or Tool',\n '[\"Graph Data Platform\"]',\n '[\"Data\"]',\n '[\"Neo4j\"]',\n 'Yes',\n 'No',\n ],\n },\n {\n rowId: 6,\n versionNumber: 1,\n values: [\n 'Is Mature',\n 'GO',\n 'Gene Ontology',\n 'Ontology or Vocabulary',\n '[\"OBO Foundry\"]',\n '[\"Gene\"]',\n null,\n 'Yes',\n 'No',\n ],\n },\n {\n rowId: 7,\n versionNumber: 1,\n values: [\n 'Is Not Mature',\n 'ONNX',\n 'Open Neural Network Exchange',\n 'Data Standard',\n '[\"Machine Learning Framework\"]',\n '[\"Data\"]',\n '[\"ONNX\"]',\n 'Yes',\n 'No',\n ],\n },\n {\n rowId: 8,\n versionNumber: 1,\n values: [\n 'Is Not Mature',\n 'Jupyter',\n 'JupyterHub',\n 'Software or Tool',\n '[\"Notebook Platform\"]',\n '[\"Training\"]',\n null,\n 'Yes',\n 'No',\n ],\n },\n {\n rowId: 9,\n versionNumber: 1,\n values: [\n 'Is Not Mature',\n 'AWS',\n 'Amazon Web Services',\n 'Software or Tool',\n '[\"Cloud Platform\"]',\n '[\"Data\"]',\n null,\n 'Yes',\n 'Yes',\n ],\n },\n {\n rowId: 10,\n versionNumber: 1,\n values: [\n 'Is Not Mature',\n 'HPO',\n 'Human Phenotype Ontology',\n 'Ontology or Vocabulary',\n '[\"OBO Foundry\"]',\n '[\"Clinical Observations\"]',\n null,\n 'Yes',\n 'No',\n ],\n },\n ],\n },\n },\n}\n"],"mappings":";AAMA,IAAa,IAA8B,YAE9B,IAAyC,YAGzC,IAAqC;CAChD,IAAI;CACJ,MAAM;CACN,cAAc;CACd,aAAa,iBAAiB;CAC/B,EAGY,IA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MAAM;KAAe,YAAY;KAAe,IAAI;KAAU;IAChE;KAAE,MAAM;KAAS,YAAY;KAAe,IAAI;KAAU;IAC1D;KAAE,MAAM;KAAa,YAAY;KAAe,IAAI;KAAU;IAC9D;KAAE,MAAM;KAAU,YAAY;KAAU,IAAI;KAAU;IACtD;KAAE,MAAM;KAAgB,YAAY;KAAU,IAAI;KAAU;IAC7D;GACD,MAAM;IACJ;KACE,OAAO;KACP,eAAe;KACf,QAAQ;MACN;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACD;KACE,OAAO;KACP,eAAe;KACf,QAAQ;MACN;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACD;KACE,OAAO;KACP,eAAe;KACf,QAAQ;MACN;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACD;KACE,OAAO;KACP,eAAe;KACf,QAAQ;MACN;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACD;KACE,OAAO;KACP,eAAe;KACf,QAAQ;MACN;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACD;KACE,OAAO;KACP,eAAe;KACf,QAAQ;MACN;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACD;KACE,OAAO;KACP,eAAe;KACf,QAAQ;MACN;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACD;KACE,OAAO;KACP,eAAe;KACf,QAAQ;MACN;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACD;KACE,OAAO;KACP,eAAe;KACf,QAAQ;MACN;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACD;KACE,OAAO;KACP,eAAe;KACf,QAAQ;MACN;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACD;KACF;IACF;GACF;EACF;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { QueryResultBundle } from '@sage-bionetworks/synapse-types';
|
|
2
|
+
import { SearchIndexQuery, SearchSearchQuery } from '@sage-bionetworks/synapse-client';
|
|
3
|
+
import { HttpHandler } from 'msw';
|
|
4
|
+
/**
|
|
5
|
+
* A key derived from a SearchIndexQuery, excluding pagination fields.
|
|
6
|
+
* Used to match registered bindings against incoming requests.
|
|
7
|
+
*/
|
|
8
|
+
type SearchIndexQueryKey = Omit<SearchIndexQuery, 'searchQuery'> & {
|
|
9
|
+
searchQuery?: Omit<SearchSearchQuery, 'limit' | 'offset'>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Register a specific query binding for the mock search service.
|
|
13
|
+
* If a binding for the same query key (ignoring limit/offset) already exists, it is updated.
|
|
14
|
+
*/
|
|
15
|
+
export declare function registerSearchQueryResult(queryKey: SearchIndexQueryKey, result: QueryResultBundle): void;
|
|
16
|
+
/**
|
|
17
|
+
* Returns MSW handlers for the SearchQueryServicesApi endpoints.
|
|
18
|
+
* Uses the default mock data from mockSearchQueryData.ts unless overridden via registerSearchQueryResult().
|
|
19
|
+
*/
|
|
20
|
+
export declare function getHandlersForSearchQuery(backendOrigin?: string): HttpHandler[];
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=searchQueryHandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchQueryHandlers.d.ts","sourceRoot":"","sources":["../../../../src/mocks/msw/handlers/searchQueryHandlers.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EACL,gBAAgB,EAEhB,iBAAiB,EAClB,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAKjC;;;GAGG;AACH,KAAK,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,EAAE,aAAa,CAAC,GAAG;IACjE,WAAW,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAA;CAC1D,CAAA;AAwCD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,mBAAmB,EAC7B,MAAM,EAAE,iBAAiB,QAQ1B;AAiDD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,aAAa,SAAoD,GAChE,WAAW,EAAE,CAOf"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { BackendDestinationEnum as e, getEndpoint as t } from "../../../utils/functions/getEndpoint.js";
|
|
2
|
+
import { SEARCH_QUERY_ASYNC_GET as n, SEARCH_QUERY_ASYNC_START as r } from "../../../utils/APIConstants.js";
|
|
3
|
+
import { mockSearchQueryResultBundle as i } from "../../mockSearchQueryData.js";
|
|
4
|
+
import a from "../util/BasicMockedCrudService.js";
|
|
5
|
+
import { generateAsyncJobHandlers as o } from "./asyncJobHandlers.js";
|
|
6
|
+
import { cloneDeep as s } from "lodash-es";
|
|
7
|
+
//#region src/mocks/msw/handlers/searchQueryHandlers.ts
|
|
8
|
+
var c = new a({
|
|
9
|
+
idField: "id",
|
|
10
|
+
autoGenerateId: !0
|
|
11
|
+
});
|
|
12
|
+
function l(e, t = 25, n = 0) {
|
|
13
|
+
let r = s(e);
|
|
14
|
+
return r.queryResult?.queryResults.rows && (r.queryResult.queryResults.rows = r.queryResult.queryResults.rows.slice(n, n + t)), r;
|
|
15
|
+
}
|
|
16
|
+
function u(e, t) {
|
|
17
|
+
return l(t, e.searchQuery?.limit, e.searchQuery?.offset);
|
|
18
|
+
}
|
|
19
|
+
function d(e, t) {
|
|
20
|
+
let n = c.getOneByField("queryKey", e);
|
|
21
|
+
n ? c.update(n.id, {
|
|
22
|
+
...n,
|
|
23
|
+
result: t
|
|
24
|
+
}) : c.create({
|
|
25
|
+
queryKey: e,
|
|
26
|
+
result: t
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function f(e) {
|
|
30
|
+
let t = s(e);
|
|
31
|
+
t.searchQuery && (delete t.searchQuery.limit, delete t.searchQuery.offset);
|
|
32
|
+
let n = t;
|
|
33
|
+
return u(e, c.getOneByField("queryKey", n)?.result ?? i);
|
|
34
|
+
}
|
|
35
|
+
function p(e) {
|
|
36
|
+
let t = e.queryResult?.queryResults.headers ?? [], n = (e.queryResult?.queryResults.rows ?? []).map((e) => ({
|
|
37
|
+
rowId: e.rowId,
|
|
38
|
+
rowVersion: e.versionNumber,
|
|
39
|
+
fields: t.map((t, n) => ({
|
|
40
|
+
name: t.name,
|
|
41
|
+
value: e.values[n] ?? void 0
|
|
42
|
+
}))
|
|
43
|
+
})), r = t.map((e) => ({
|
|
44
|
+
name: e.name,
|
|
45
|
+
columnType: e.columnType,
|
|
46
|
+
id: e.id
|
|
47
|
+
}));
|
|
48
|
+
return {
|
|
49
|
+
concreteType: "org.sagebionetworks.repo.model.search.SearchQueryResults",
|
|
50
|
+
totalHits: e.queryCount,
|
|
51
|
+
hits: n,
|
|
52
|
+
selectColumns: r,
|
|
53
|
+
facets: e.facets,
|
|
54
|
+
offset: e.queryResult?.queryResults.rows?.length ? 0 : void 0
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function m(i = t(e.REPO_ENDPOINT)) {
|
|
58
|
+
return o(r, (e) => n(e), (e) => p(f(e)), i);
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { m as getHandlersForSearchQuery, d as registerSearchQueryResult };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=searchQueryHandlers.js.map
|