@gen-epix/ui-casedb 2.0.0 → 2.0.1
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/index.d.ts +2411 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,2412 @@
|
|
|
1
|
+
import { AnyObject } from 'yup';
|
|
2
|
+
import { AutoCompleteOption } from '@gen-epix/ui';
|
|
3
|
+
import { CaseDbApiPermission } from '@gen-epix/api-casedb';
|
|
4
|
+
import { CaseDbCase } from '@gen-epix/api-casedb';
|
|
5
|
+
import { CaseDbCaseBatchUploadResult } from '@gen-epix/api-casedb';
|
|
6
|
+
import { CaseDbCaseDataCollectionLink } from '@gen-epix/api-casedb';
|
|
7
|
+
import { CaseDbCaseForUpload } from '@gen-epix/api-casedb';
|
|
8
|
+
import { CaseDbCaseRights } from '@gen-epix/api-casedb';
|
|
9
|
+
import { CaseDbCaseSet } from '@gen-epix/api-casedb';
|
|
10
|
+
import { CaseDbCaseSetCategory } from '@gen-epix/api-casedb';
|
|
11
|
+
import { CaseDbCaseSetDataCollectionLink } from '@gen-epix/api-casedb';
|
|
12
|
+
import { CaseDbCaseSetRights } from '@gen-epix/api-casedb';
|
|
13
|
+
import { CaseDbCaseSetStatus } from '@gen-epix/api-casedb';
|
|
14
|
+
import { CaseDbCaseStats } from '@gen-epix/api-casedb';
|
|
15
|
+
import { CaseDbCaseType } from '@gen-epix/api-casedb';
|
|
16
|
+
import { CaseDbCaseTypeAccessAbac } from '@gen-epix/api-casedb';
|
|
17
|
+
import { CaseDbCaseTypeSet } from '@gen-epix/api-casedb';
|
|
18
|
+
import { CaseDbCaseTypeSetCategory } from '@gen-epix/api-casedb';
|
|
19
|
+
import { CaseDbCaseTypeSetCategoryPurpose } from '@gen-epix/api-casedb';
|
|
20
|
+
import { CaseDbCaseTypeSetMember } from '@gen-epix/api-casedb';
|
|
21
|
+
import { CaseDbCaseUploadResult } from '@gen-epix/api-casedb';
|
|
22
|
+
import { CaseDbCol } from '@gen-epix/api-casedb';
|
|
23
|
+
import { CaseDbColSet } from '@gen-epix/api-casedb';
|
|
24
|
+
import { CaseDbColSetMember } from '@gen-epix/api-casedb';
|
|
25
|
+
import { CaseDbColType } from '@gen-epix/api-casedb';
|
|
26
|
+
import { CaseDbCompleteCaseType } from '@gen-epix/api-casedb';
|
|
27
|
+
import { CaseDbConcept } from '@gen-epix/api-casedb';
|
|
28
|
+
import { CaseDbConceptRelationType } from '@gen-epix/api-casedb';
|
|
29
|
+
import { CaseDbConceptSet } from '@gen-epix/api-casedb';
|
|
30
|
+
import { CaseDbConceptSetType } from '@gen-epix/api-casedb';
|
|
31
|
+
import { CaseDbDataCollection } from '@gen-epix/api-casedb';
|
|
32
|
+
import { CaseDbDataCollectionSetMember } from '@gen-epix/api-casedb';
|
|
33
|
+
import { CaseDbDim } from '@gen-epix/api-casedb';
|
|
34
|
+
import { CaseDbDimType } from '@gen-epix/api-casedb';
|
|
35
|
+
import { CaseDbDisease } from '@gen-epix/api-casedb';
|
|
36
|
+
import { CaseDbEtiologicalAgent } from '@gen-epix/api-casedb';
|
|
37
|
+
import { CaseDbFileCompression } from '@gen-epix/api-casedb';
|
|
38
|
+
import { CaseDbGeneticDistanceProtocol } from '@gen-epix/api-casedb';
|
|
39
|
+
import { CaseDbOrganization } from '@gen-epix/api-casedb';
|
|
40
|
+
import { CaseDbOrganizationAccessCasePolicy } from '@gen-epix/api-casedb';
|
|
41
|
+
import { CaseDbOrganizationShareCasePolicy } from '@gen-epix/api-casedb';
|
|
42
|
+
import { CaseDbPhylogeneticTree } from '@gen-epix/api-casedb';
|
|
43
|
+
import { CaseDbProtocol } from '@gen-epix/api-casedb';
|
|
44
|
+
import { CaseDbRefCol } from '@gen-epix/api-casedb';
|
|
45
|
+
import { CaseDbRefColValidationRulesResponseBody } from '@gen-epix/api-casedb';
|
|
46
|
+
import { CaseDbRefDim } from '@gen-epix/api-casedb';
|
|
47
|
+
import { CaseDbRegion } from '@gen-epix/api-casedb';
|
|
48
|
+
import { CaseDbRegionRelationType } from '@gen-epix/api-casedb';
|
|
49
|
+
import { CaseDbRegionSet } from '@gen-epix/api-casedb';
|
|
50
|
+
import { CaseDbRetrieveCaseTypeStatsRequestBody } from '@gen-epix/api-casedb';
|
|
51
|
+
import { CaseDbTreeAlgorithm } from '@gen-epix/api-casedb';
|
|
52
|
+
import { CaseDbTreeAlgorithmType } from '@gen-epix/api-casedb';
|
|
53
|
+
import { CaseDbUser } from '@gen-epix/api-casedb';
|
|
54
|
+
import { CaseDbUserAccessCasePolicy } from '@gen-epix/api-casedb';
|
|
55
|
+
import { CaseDbUserShareCasePolicy } from '@gen-epix/api-casedb';
|
|
56
|
+
import { COMMON_QUERY_KEY } from '@gen-epix/ui';
|
|
57
|
+
import { CommonDbApiPermission } from '@gen-epix/api-commondb';
|
|
58
|
+
import { ComponentClass } from 'react';
|
|
59
|
+
import { ComponentType } from 'react';
|
|
60
|
+
import { ConfigBase } from '@gen-epix/ui';
|
|
61
|
+
import { Context } from 'react';
|
|
62
|
+
import { CreateTableStoreInitialStateKwArgs } from '@gen-epix/ui';
|
|
63
|
+
import { CreateTableStoreKwArgs } from '@gen-epix/ui';
|
|
64
|
+
import { default as default_2 } from 'decimal.js';
|
|
65
|
+
import { ECharts } from 'echarts';
|
|
66
|
+
import { EpiContactDetailsDialogOpenProps } from '@gen-epix/ui';
|
|
67
|
+
import { EventBusAbstract } from '@gen-epix/ui';
|
|
68
|
+
import { FilterDimension } from '@gen-epix/ui';
|
|
69
|
+
import { Filters } from '@gen-epix/ui';
|
|
70
|
+
import { FormFieldDefinition } from '@gen-epix/ui';
|
|
71
|
+
import { GenEpixUiTheme } from '@gen-epix/ui';
|
|
72
|
+
import { GetTableCellRowComparatorProps } from '@gen-epix/ui';
|
|
73
|
+
import { GetTableCellValueProps } from '@gen-epix/ui';
|
|
74
|
+
import { IconButtonProps } from '@mui/material';
|
|
75
|
+
import { JSX } from 'react/jsx-runtime';
|
|
76
|
+
import { MenuItemData } from '@gen-epix/ui';
|
|
77
|
+
import { MultiSelectFilter } from '@gen-epix/ui';
|
|
78
|
+
import { MyNonIndexRouteObject } from '@gen-epix/ui';
|
|
79
|
+
import { ObjectSchema } from 'yup';
|
|
80
|
+
import { OptionBase } from '@gen-epix/ui';
|
|
81
|
+
import { PaletteMode } from '@mui/material';
|
|
82
|
+
import { PersistOptions } from 'zustand/middleware';
|
|
83
|
+
import { PopoverPosition } from '@mui/material';
|
|
84
|
+
import { PropsWithChildren } from 'react';
|
|
85
|
+
import { ReactElement } from 'react';
|
|
86
|
+
import { ReactNode } from 'react';
|
|
87
|
+
import { Ref } from 'react';
|
|
88
|
+
import { StoreApi } from 'zustand';
|
|
89
|
+
import { Subject } from '@gen-epix/ui';
|
|
90
|
+
import { SubscribableAbstract } from '@gen-epix/ui';
|
|
91
|
+
import { TableColumnText } from '@gen-epix/ui';
|
|
92
|
+
import { TableStoreActions } from '@gen-epix/ui';
|
|
93
|
+
import { TableStoreState } from '@gen-epix/ui';
|
|
94
|
+
import { TextFilter } from '@gen-epix/ui';
|
|
95
|
+
import { TFunction } from 'i18next';
|
|
96
|
+
import { Theme } from '@mui/material';
|
|
97
|
+
import { TooltipProps } from '@mui/material';
|
|
98
|
+
import { UseMap } from '@gen-epix/ui';
|
|
99
|
+
import { UseNameFactory } from '@gen-epix/ui';
|
|
100
|
+
import { UseOptions } from '@gen-epix/ui';
|
|
101
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
102
|
+
import { WithDialogRefMethods } from '@gen-epix/ui';
|
|
103
|
+
import { WithDialogRenderProps } from '@gen-epix/ui';
|
|
104
|
+
import { WithDialogState } from '@gen-epix/ui';
|
|
105
|
+
|
|
106
|
+
export declare class AbacUtil {
|
|
107
|
+
static createEffectieveColumnAccessRights(caseTypeAccessAbacs: CaseDbCaseTypeAccessAbac[]): Map<string, {
|
|
108
|
+
read: boolean;
|
|
109
|
+
write: boolean;
|
|
110
|
+
}>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
declare type AssembleUserEffectiveRightsKwArgs = {
|
|
114
|
+
caseTypeSetMembers: CaseDbCaseTypeSetMember[];
|
|
115
|
+
colSetMembers: CaseDbColSetMember[];
|
|
116
|
+
organizationAccessCasePolicies: CaseDbOrganizationAccessCasePolicy[];
|
|
117
|
+
organizationShareCasePolicies: CaseDbOrganizationShareCasePolicy[];
|
|
118
|
+
user: CaseDbUser;
|
|
119
|
+
userAccessCasePolicies: CaseDbUserAccessCasePolicy[];
|
|
120
|
+
userShareCasePolicies: CaseDbUserShareCasePolicy[];
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export declare type CaseAbacContext = {
|
|
124
|
+
createdInDataCollection?: CaseDbDataCollection;
|
|
125
|
+
itemDataCollectionLinks: Array<Array<CaseDbCaseDataCollectionLink | CaseDbCaseSetDataCollectionLink>>;
|
|
126
|
+
itemDataCollectionOptions?: Array<OptionBase<string>[]>;
|
|
127
|
+
itemDataCollections?: Array<CaseDbDataCollection[]>;
|
|
128
|
+
itemSharedInDataCollections?: Array<CaseDbDataCollection[]>;
|
|
129
|
+
rights: Array<CaseDbCaseRights | CaseDbCaseSetRights>;
|
|
130
|
+
userDataCollectionOptions: OptionBase<string>[];
|
|
131
|
+
userDataCollections: CaseDbDataCollection[];
|
|
132
|
+
userDataCollectionsMap: Map<string, CaseDbDataCollection>;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export declare const CaseAbacContextProvider: (props: CaseAbacContextProviderProps) => JSX.Element;
|
|
136
|
+
|
|
137
|
+
export declare type CaseAbacContextProviderProps = PropsWithChildren<{
|
|
138
|
+
readonly caseAbac: CaseAbacContext;
|
|
139
|
+
}>;
|
|
140
|
+
|
|
141
|
+
export declare const CASEDB_QUERY_DEPENDENCIES: Record<CASEDB_QUERY_KEY, (CASEDB_QUERY_KEY | COMMON_QUERY_KEY)[]>;
|
|
142
|
+
|
|
143
|
+
export declare const CASEDB_QUERY_KEY: {
|
|
144
|
+
readonly ALLELE_PROFILES: "ALLELE_PROFILES";
|
|
145
|
+
readonly ASSEMBLY_PROTOCOLS: "ASSEMBLY_PROTOCOLS";
|
|
146
|
+
readonly CASE_DATA_COLLECTION_LINKS: "CASE_DATA_COLLECTION_LINKS";
|
|
147
|
+
readonly CASE_IDS_BY_QUERY: "CASE_IDS_BY_QUERY";
|
|
148
|
+
readonly CASE_RIGHTS: "CASE_RIGHTS";
|
|
149
|
+
readonly CASE_SET_CATEGORIES: "CASE_SET_CATEGORIES";
|
|
150
|
+
readonly CASE_SET_DATA_COLLECTION_LINKS: "CASE_SET_DATA_COLLECTION_LINKS";
|
|
151
|
+
readonly CASE_SET_MEMBERS: "CASE_SET_MEMBERS";
|
|
152
|
+
readonly CASE_SET_RIGHTS: "CASE_SET_RIGHTS";
|
|
153
|
+
readonly CASE_SET_STATS: "CASE_SET_STATS";
|
|
154
|
+
readonly CASE_SET_STATUSES: "CASE_SET_STATUSES";
|
|
155
|
+
readonly CASE_SETS: "CASE_SETS";
|
|
156
|
+
readonly CASE_TYPE_SET_CATEGORIES: "CASE_TYPE_SET_CATEGORIES";
|
|
157
|
+
readonly CASE_TYPE_SET_MEMBERS: "CASE_TYPE_SET_MEMBERS";
|
|
158
|
+
readonly CASE_TYPE_SETS: "CASE_TYPE_SETS";
|
|
159
|
+
readonly CASE_TYPE_STATS: "CASE_TYPE_STATS";
|
|
160
|
+
readonly CASE_TYPES: "CASE_TYPES";
|
|
161
|
+
readonly CASES: "CASES";
|
|
162
|
+
readonly CASES_LAZY: "CASES_LAZY";
|
|
163
|
+
readonly COL_SET_MEMBERS: "COL_SET_MEMBERS";
|
|
164
|
+
readonly COL_SETS: "COL_SETS";
|
|
165
|
+
readonly COLS: "COLS";
|
|
166
|
+
readonly COMPLETE_CASE_TYPES: "COMPLETE_CASE_TYPES";
|
|
167
|
+
readonly CONCEPT_RELATIONS: "CONCEPT_RELATIONS";
|
|
168
|
+
readonly CONCEPT_SETS: "CONCEPT_SETS";
|
|
169
|
+
readonly CONCEPTS: "CONCEPTS";
|
|
170
|
+
readonly DATA_COLLECTION_SET_MEMBERS: "DATA_COLLECTION_SET_MEMBERS";
|
|
171
|
+
readonly DATA_COLLECTION_SETS: "DATA_COLLECTION_SETS";
|
|
172
|
+
readonly DATA_COLLECTIONS: "DATA_COLLECTIONS";
|
|
173
|
+
readonly DIMS: "DIMS";
|
|
174
|
+
readonly DISEASES: "DISEASES";
|
|
175
|
+
readonly ETIOLOGICAL_AGENTS: "ETIOLOGICAL_AGENTS";
|
|
176
|
+
readonly ETIOLOGIES: "ETIOLOGIES";
|
|
177
|
+
readonly GENETIC_DISTANCE_PROTOCOLS: "GENETIC_DISTANCE_PROTOCOLS";
|
|
178
|
+
readonly GENETIC_SEQUENCES: "GENETIC_SEQUENCES";
|
|
179
|
+
readonly ORGANIZATION_ACCESS_CASE_POLICIES: "ORGANIZATION_ACCESS_CASE_POLICIES";
|
|
180
|
+
readonly ORGANIZATION_SHARE_CASE_POLICIES: "ORGANIZATION_SHARE_CASE_POLICIES";
|
|
181
|
+
readonly PHYLOGENETIC_TREE: "PHYLOGENETIC_TREE";
|
|
182
|
+
readonly REF_COLS: "REF_COLS";
|
|
183
|
+
readonly REF_COLS_VALIDATION_RULES: "REF_COLS_VALIDATION_RULES";
|
|
184
|
+
readonly REF_DIMS: "REF_DIMS";
|
|
185
|
+
readonly REGION_RELATIONS: "REGION_RELATIONS";
|
|
186
|
+
readonly REGION_SET_SHAPES: "REGION_SET_SHAPES";
|
|
187
|
+
readonly REGION_SETS: "REGION_SETS";
|
|
188
|
+
readonly REGION_SETS_LAZY: "REGION_SETS_LAZY";
|
|
189
|
+
readonly REGIONS: "REGIONS";
|
|
190
|
+
readonly REGIONS_LAZY: "REGIONS_LAZY";
|
|
191
|
+
readonly SEQUENCING_PROTOCOLS: "SEQUENCING_PROTOCOLS";
|
|
192
|
+
readonly SIMILAR_CASES: "SIMILAR_CASES";
|
|
193
|
+
readonly SUBJECTS: "SUBJECT_IDENTIFIERS";
|
|
194
|
+
readonly TREE_ALGORITHM_CLASSES: "TREE_ALGORITHM_CLASSES";
|
|
195
|
+
readonly TREE_ALGORITHMS: "TREE_ALGORITHMS";
|
|
196
|
+
readonly USER_ACCESS_CASE_POLICIES: "USER_ACCESS_CASE_POLICIES";
|
|
197
|
+
readonly USER_SHARE_CASE_POLICIES: "USER_SHARE_CASE_POLICIES";
|
|
198
|
+
readonly VALIDATE_CASES: "VALIDATE_CASES";
|
|
199
|
+
readonly XXX_CASE_ID_HAS_CASE_SET: "XXX_CASE_ID_HAS_CASE_SET";
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export declare type CASEDB_QUERY_KEY = typeof CASEDB_QUERY_KEY[keyof typeof CASEDB_QUERY_KEY];
|
|
203
|
+
|
|
204
|
+
export declare interface CaseDbConfig extends ConfigBase {
|
|
205
|
+
epi: {
|
|
206
|
+
ALLOWED_COL_TYPES_FOR_STRATIFICATION: CaseDbColType[];
|
|
207
|
+
DATA_MISSING_CHARACTER: string;
|
|
208
|
+
DOWNLOAD_SECTION_ORDER: EPI_ZONE[];
|
|
209
|
+
INITIAL_NUM_VISIBLE_ATTRIBUTES_IN_CASE_SUMMARY: number;
|
|
210
|
+
SEQDB_MAX_STORED_DISTANCE_FALLBACK: number;
|
|
211
|
+
STRATIFICATION_COLOR_ITEM_MISSING: string;
|
|
212
|
+
STRATIFICATION_COLORS: string[];
|
|
213
|
+
};
|
|
214
|
+
epiDashboard: {
|
|
215
|
+
LAYOUTS: EpiDashboardLayoutConfig[];
|
|
216
|
+
MIN_PANEL_HEIGHT: number;
|
|
217
|
+
MIN_PANEL_WIDTH: number;
|
|
218
|
+
};
|
|
219
|
+
epiLineList: {
|
|
220
|
+
CASE_SET_MEMBERS_FETCH_DEBOUNCE_DELAY_MS: number;
|
|
221
|
+
MAX_COLUMN_WIDTH: number;
|
|
222
|
+
REQUIRED_EXTRA_CELL_PADDING_TO_FIT_CONTENT: number;
|
|
223
|
+
TABLE_ROW_HEIGHT: number;
|
|
224
|
+
};
|
|
225
|
+
epiMap: {
|
|
226
|
+
MIN_PIE_CHART_RADIUS: number;
|
|
227
|
+
};
|
|
228
|
+
epiTree: {
|
|
229
|
+
ANCESTOR_DOT_RADIUS: number;
|
|
230
|
+
HEADER_HEIGHT: number;
|
|
231
|
+
INITIAL_UNLINKED_ZOOM_LEVEL: number;
|
|
232
|
+
LEAF_DOT_RADIUS: number;
|
|
233
|
+
LINKED_SCROLL_DEBOUNCE_DELAY_MS: number;
|
|
234
|
+
MAX_SCALE_WIDTH_PX: number;
|
|
235
|
+
MAX_ZOOM_LEVEL: number;
|
|
236
|
+
MAX_ZOOM_SPEED: number;
|
|
237
|
+
MIN_SCALE_WIDTH_PX: number;
|
|
238
|
+
MIN_ZOOM_LEVEL: number;
|
|
239
|
+
MIN_ZOOM_SPEED: number;
|
|
240
|
+
MINIMUM_DISTANCE_PERCENTAGE_TO_SHOW_LABEL: number;
|
|
241
|
+
PANNING_THRESHOLD: number;
|
|
242
|
+
REGULAR_FILL_COLOR_SUPPORT_LINE: string;
|
|
243
|
+
SCALE_INCREMENTS: number[];
|
|
244
|
+
TAKING_LONGER_TIMEOUT_MS: number;
|
|
245
|
+
TREE_PADDING: number;
|
|
246
|
+
};
|
|
247
|
+
trends: {
|
|
248
|
+
homePage: {
|
|
249
|
+
getSinceDate: () => string;
|
|
250
|
+
getSinceLabel: (t: TFunction<'translation', undefined>) => string;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export declare class CaseDbDataUtil {
|
|
256
|
+
static getCaseSetName(caseSet: CaseDbCaseSet): string;
|
|
257
|
+
static getColTypeOptionsForRefDimId(kwArgs: {
|
|
258
|
+
colsValidationRules: CaseDbRefColValidationRulesResponseBody['valid_col_types_by_dim_type'];
|
|
259
|
+
colTypeOptions: OptionBase<string>[];
|
|
260
|
+
refDimId: string;
|
|
261
|
+
refDimMap: Map<string, CaseDbRefDim>;
|
|
262
|
+
}): OptionBase<string>[];
|
|
263
|
+
static getDimOptionsForCaseTypeId(kwArgs: {
|
|
264
|
+
caseTypeId: string;
|
|
265
|
+
dimMap: Map<string, CaseDbDim>;
|
|
266
|
+
dimOptions: OptionBase<string>[];
|
|
267
|
+
}): OptionBase<string>[];
|
|
268
|
+
static getGeneticSequenceColOptionsForCaseTypeId(kwArgs: {
|
|
269
|
+
caseTypeId: string;
|
|
270
|
+
colMap: Map<string, CaseDbCol>;
|
|
271
|
+
colOptions: OptionBase<string>[];
|
|
272
|
+
refColMap: Map<string, CaseDbRefCol>;
|
|
273
|
+
}): OptionBase<string>[];
|
|
274
|
+
static getRefColOptionsForDimId(kwArgs: {
|
|
275
|
+
colsValidationRules: CaseDbRefColValidationRulesResponseBody['valid_col_types_by_dim_type'];
|
|
276
|
+
dimId: string;
|
|
277
|
+
dimMap: Map<string, CaseDbDim>;
|
|
278
|
+
refColMap: Map<string, CaseDbRefCol>;
|
|
279
|
+
refColOptions: OptionBase<string>[];
|
|
280
|
+
refDimMap: Map<string, CaseDbRefDim>;
|
|
281
|
+
}): OptionBase<string>[];
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export declare class CaseDbDemoConfigUtil {
|
|
285
|
+
static createConfig(): CaseDbConfig;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export declare class CaseDbDownloadUtil {
|
|
289
|
+
static downloadAsCsv(cases: CaseDbCase[], colIds: string[], completeCaseType: CaseDbCompleteCaseType, t: TFunction<'translation', undefined>): void;
|
|
290
|
+
static downloadAsExcel(cases: CaseDbCase[], colIds: string[], completeCaseType: CaseDbCompleteCaseType, t: TFunction<'translation', undefined>): Promise<void>;
|
|
291
|
+
static downloadCanvasImage(baseName: string, canvas: HTMLCanvasElement, type: 'jpeg' | 'png', completeCaseType: CaseDbCompleteCaseType, t: TFunction<'translation', undefined>): void;
|
|
292
|
+
static downloadEchartsImage(baseName: string, instance: ECharts, type: 'jpeg' | 'png', completeCaseType: CaseDbCompleteCaseType, t: TFunction<'translation', undefined>): void;
|
|
293
|
+
static downloadExcelTemplate(caseTypeId: string, t: TFunction<'translation', undefined>): Promise<void>;
|
|
294
|
+
static downloadNewick(baseName: string, newick: string, completeCaseType: CaseDbCompleteCaseType, t: TFunction<'translation', undefined>): void;
|
|
295
|
+
static getExportFileName(baseName: string, completeCaseType: CaseDbCompleteCaseType, t: TFunction<'translation', undefined>): string;
|
|
296
|
+
static getTemplateFileName(completeCaseType: CaseDbCompleteCaseType): string;
|
|
297
|
+
private static getColsForImportExport;
|
|
298
|
+
private static getColumnHeadersForExport;
|
|
299
|
+
private static getColumnHeadersForImport;
|
|
300
|
+
private static getRowsForExport;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export declare class CaseDbTableUtil {
|
|
304
|
+
static createCaseTypeCellRowComperator({ column, dataContext, direction }: GetTableCellRowComparatorProps<TableColumnText<CaseDbCase, CaseDbCompleteCaseType, CaseDbCol>, CaseDbCompleteCaseType>): (a: CaseDbCase, b: CaseDbCase) => number;
|
|
305
|
+
static getTableCaseTypeCellValue<TRowData>({ column, dataContext, row, rowIndex }: GetTableCellValueProps<TRowData, TableColumnText<TRowData, CaseDbCompleteCaseType, CaseDbCol>, CaseDbCompleteCaseType>): string;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export declare const CaseDbUsersAdminPage: () => JSX.Element;
|
|
309
|
+
|
|
310
|
+
export declare const CasesDetailPage: () => JSX.Element;
|
|
311
|
+
|
|
312
|
+
export declare class CaseSelectionUtil {
|
|
313
|
+
static addComponentCaseIdsToSelection(componentCaseIds: string[], selectedIds: string[]): string[];
|
|
314
|
+
static canAddToSelection(componentCaseIds: string[], selectedIds: string[]): boolean;
|
|
315
|
+
static canRefineSelection(componentCaseIds: string[], selectedIds: string[]): boolean;
|
|
316
|
+
static canRemoveFromSelection(componentCaseIds: string[], selectedIds: string[]): boolean;
|
|
317
|
+
static refineSelectionWithComponentCaseIds(componentCaseIds: string[], selectedIds: string[]): string[];
|
|
318
|
+
static removeComponentCaseIdsFromSelection(componentCaseIds: string[], selectedIds: string[]): string[];
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export declare const CaseSetCategoryAdminPage: () => JSX.Element;
|
|
322
|
+
|
|
323
|
+
export declare const CaseSetStatusAdminPage: () => JSX.Element;
|
|
324
|
+
|
|
325
|
+
export declare class CaseSetUtil {
|
|
326
|
+
static createCaseSetLink(caseSet: CaseDbCaseSet, full?: boolean): string;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export declare const CasesPage: () => JSX.Element;
|
|
330
|
+
|
|
331
|
+
export declare type CaseTypeAbacContext = {
|
|
332
|
+
caseTypeAccessAbacDict: {
|
|
333
|
+
[key: string]: CaseDbCaseTypeAccessAbac;
|
|
334
|
+
};
|
|
335
|
+
caseTypeAccessAbacs?: CaseDbCaseTypeAccessAbac[];
|
|
336
|
+
effectiveColumnAccessRights?: Map<string, {
|
|
337
|
+
read: boolean;
|
|
338
|
+
write: boolean;
|
|
339
|
+
}>;
|
|
340
|
+
userDataCollections: CaseDbDataCollection[];
|
|
341
|
+
userDataCollectionsMap: Map<string, CaseDbDataCollection>;
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
export declare const CaseTypeAbacContextProvider: (props: CaseTypeAbacContextProviderProps) => JSX.Element;
|
|
345
|
+
|
|
346
|
+
export declare type CaseTypeAbacContextProviderProps = PropsWithChildren<{
|
|
347
|
+
readonly caseTypeAbac: CaseTypeAbacContext;
|
|
348
|
+
}>;
|
|
349
|
+
|
|
350
|
+
export declare type CaseTypeRowValue = {
|
|
351
|
+
full: string;
|
|
352
|
+
isMissing?: boolean;
|
|
353
|
+
long: string;
|
|
354
|
+
raw: string;
|
|
355
|
+
short: string;
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
export declare const CaseTypesAdminPage: () => JSX.Element;
|
|
359
|
+
|
|
360
|
+
export declare const CaseTypeSetCategoriesAdminPage: () => JSX.Element;
|
|
361
|
+
|
|
362
|
+
export declare const caseTypeSetCategoryPurposePresentationValues: Record<CaseDbCaseTypeSetCategoryPurpose, string>;
|
|
363
|
+
|
|
364
|
+
export declare const CaseTypeSetsAdminPage: () => JSX.Element;
|
|
365
|
+
|
|
366
|
+
export declare const caseTypesQueryFn: ({ signal }: {
|
|
367
|
+
signal: AbortSignal;
|
|
368
|
+
}) => Promise<CaseDbCaseType[]>;
|
|
369
|
+
|
|
370
|
+
export declare class CaseTypeUtil {
|
|
371
|
+
static createCaseTypeLink(caseType: CaseDbCaseType | CaseDbCompleteCaseType, full?: boolean): string;
|
|
372
|
+
/**
|
|
373
|
+
* Find paired FWD/REV columns in the same dimension.
|
|
374
|
+
* @param completeCaseType The complete case type object.
|
|
375
|
+
* @returns An array of paired FWD/REV columns.
|
|
376
|
+
*/
|
|
377
|
+
static findPairedReadsCols(completeCaseType: CaseDbCompleteCaseType): {
|
|
378
|
+
fwd: CaseDbCol;
|
|
379
|
+
rev: CaseDbCol;
|
|
380
|
+
}[];
|
|
381
|
+
/**
|
|
382
|
+
* Find a unique column by its column ID or column ID.
|
|
383
|
+
* @param completeCaseType The complete case type object.
|
|
384
|
+
* @param id The ID of the column or column.
|
|
385
|
+
* @returns The unique column if found, otherwise null.
|
|
386
|
+
*/
|
|
387
|
+
static findUniqueColByColIdRefOrColId(completeCaseType: CaseDbCompleteCaseType, id: string): CaseDbCol;
|
|
388
|
+
static getCols(completeCaseType: CaseDbCompleteCaseType, dimId?: string): CaseDbCol[];
|
|
389
|
+
/**
|
|
390
|
+
* Get columns by their column type.
|
|
391
|
+
* @param completeCaseType The complete case type object.
|
|
392
|
+
* @param colType The column type to filter by.
|
|
393
|
+
* @returns An array of columns matching the specified column type.
|
|
394
|
+
*/
|
|
395
|
+
static getColsByType(completeCaseType: CaseDbCompleteCaseType, colType: CaseDbColType[]): CaseDbCol[];
|
|
396
|
+
static getDimLabel(completeCaseType: CaseDbCompleteCaseType, dimId: string): string;
|
|
397
|
+
static getDims(completeCaseType: CaseDbCompleteCaseType, dimTypes?: CaseDbDimType[]): CaseDbDim[];
|
|
398
|
+
static getInitialVisibleColIds(completeCaseType: CaseDbCompleteCaseType): string[];
|
|
399
|
+
static getPreferredColInDimHavingHighestRank(cols: CaseDbCol[], completeCaseType: CaseDbCompleteCaseType): CaseDbCol;
|
|
400
|
+
static getPreferredGEOCol(cols: CaseDbCol[]): CaseDbCol;
|
|
401
|
+
static getWritableColIds(completeCaseType: CaseDbCompleteCaseType): string[];
|
|
402
|
+
static getWritableImportExportColIds(completeCaseType: CaseDbCompleteCaseType): string[];
|
|
403
|
+
static isGeneticDistanceDim(refDim: CaseDbRefDim, refCols: CaseDbRefCol[]): boolean;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export declare type CaseUploadResultWithGeneratedId = {
|
|
407
|
+
generatedId: string;
|
|
408
|
+
} & CaseDbCaseUploadResult;
|
|
409
|
+
|
|
410
|
+
export declare class CaseUtil {
|
|
411
|
+
static applyDataCollectionLinks(kwArgs: {
|
|
412
|
+
caseIds?: string[];
|
|
413
|
+
caseSetDataCollectionIds: string[];
|
|
414
|
+
caseSetId?: string;
|
|
415
|
+
caseTypeId: string;
|
|
416
|
+
}): Promise<void>;
|
|
417
|
+
static createFormFieldDefinitions(completeCaseType: CaseDbCompleteCaseType, organizationsQueryResult: UseQueryResult<CaseDbOrganization[]>): FormFieldDefinition<CaseDbCase['content']>[];
|
|
418
|
+
static createYupSchema(completeCaseType: CaseDbCompleteCaseType): ObjectSchema<{
|
|
419
|
+
[key: string]: string;
|
|
420
|
+
}>;
|
|
421
|
+
static getMappedValue(raw: string, col: CaseDbCol, completeCaseType: CaseDbCompleteCaseType, machineReadable?: boolean): CaseTypeRowValue;
|
|
422
|
+
static getMissingRowValue(raw: string, machineReadable?: boolean): CaseTypeRowValue;
|
|
423
|
+
static getRowValue(content: {
|
|
424
|
+
[key: string]: string;
|
|
425
|
+
}, col: CaseDbCol, completeCaseType: CaseDbCompleteCaseType, machineReadable?: boolean): CaseTypeRowValue;
|
|
426
|
+
private static getConceptMappedValue;
|
|
427
|
+
private static getOrganizationMappedValue;
|
|
428
|
+
private static getRegionMappedValue;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export declare const ColsAdminPage: () => JSX.Element;
|
|
432
|
+
|
|
433
|
+
export declare const ColSetsAdminPage: () => JSX.Element;
|
|
434
|
+
|
|
435
|
+
export declare const colTypePresentationValues: Record<CaseDbColType, string>;
|
|
436
|
+
|
|
437
|
+
export declare const ConceptRelationsAdminPage: () => JSX.Element;
|
|
438
|
+
|
|
439
|
+
export declare const conceptRelationTypePresentationValues: Partial<Record<CaseDbConceptRelationType, string>>;
|
|
440
|
+
|
|
441
|
+
export declare const ConceptsAdminPage: () => JSX.Element;
|
|
442
|
+
|
|
443
|
+
export declare const ConceptSetsAdminPage: () => JSX.Element;
|
|
444
|
+
|
|
445
|
+
export declare const conceptSetTypePresentationValues: Partial<Record<CaseDbConceptSetType, string>>;
|
|
446
|
+
|
|
447
|
+
export declare const createAdminRoutes: () => MyNonIndexRouteObject<RoutePermission>[];
|
|
448
|
+
|
|
449
|
+
export declare const createCaseDbDemoTheme: (paletteMode: PaletteMode) => Theme;
|
|
450
|
+
|
|
451
|
+
export declare const createEpiDashboardStore: (kwArgs: CreateEpiDashboardStoreKwArgs) => Omit<StoreApi<EpiDashboardStore>, "persist" | "setState"> & {
|
|
452
|
+
setState(partial: EpiDashboardStore | Partial<EpiDashboardStore> | ((state: EpiDashboardStore) => EpiDashboardStore | Partial<EpiDashboardStore>), replace?: false): unknown;
|
|
453
|
+
setState(state: EpiDashboardStore | ((state: EpiDashboardStore) => EpiDashboardStore), replace: true): unknown;
|
|
454
|
+
persist: {
|
|
455
|
+
setOptions: (options: Partial<PersistOptions<EpiDashboardStore, EpiDashboardStore, unknown>>) => void;
|
|
456
|
+
clearStorage: () => void;
|
|
457
|
+
rehydrate: () => Promise<void> | void;
|
|
458
|
+
hasHydrated: () => boolean;
|
|
459
|
+
onHydrate: (fn: (state: EpiDashboardStore) => void) => () => void;
|
|
460
|
+
onFinishHydration: (fn: (state: EpiDashboardStore) => void) => () => void;
|
|
461
|
+
getOptions: () => Partial<PersistOptions<EpiDashboardStore, EpiDashboardStore, unknown>>;
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
export declare interface CreateEpiDashboardStoreInitialStateKwArgs extends CreateTableStoreInitialStateKwArgs<CaseDbCase, CaseDbCompleteCaseType> {
|
|
466
|
+
caseSetId: string;
|
|
467
|
+
completeCaseType: CaseDbCompleteCaseType;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export declare type CreateEpiDashboardStoreKwArgs = {
|
|
471
|
+
caseSetId: string;
|
|
472
|
+
completeCaseType: CaseDbCompleteCaseType;
|
|
473
|
+
} & CreateTableStoreKwArgs<CaseDbCase, CaseDbCompleteCaseType>;
|
|
474
|
+
|
|
475
|
+
export declare const createEpiUploadStore: () => StoreApi<EpiUploadStore>;
|
|
476
|
+
|
|
477
|
+
export declare const createRoutes: (adminRoutes?: MyNonIndexRouteObject<RoutePermission_2>[]) => MyNonIndexRouteObject<RoutePermission_2>[];
|
|
478
|
+
|
|
479
|
+
export declare const createUserProfileStoreInitialState: () => UserProfileStoreState;
|
|
480
|
+
|
|
481
|
+
export declare class DashboardUtil {
|
|
482
|
+
static readonly dashboardLayoutStorageKey = "GENEPIX-EpiDashboard-Layout-v1.3";
|
|
483
|
+
static createDashboardLayoutUserConfigInitialState(): EpiDashboardLayoutUserConfig;
|
|
484
|
+
static getDashboardLayout(userConfig: EpiDashboardLayoutUserConfig): EpiDashboardLayout;
|
|
485
|
+
static getDashboardLayoutConfig(userConfig: EpiDashboardLayoutUserConfig): EpiDashboardLayoutConfig;
|
|
486
|
+
static getEnabledZones(userConfig: EpiDashboardLayoutUserConfig): EPI_ZONE[];
|
|
487
|
+
static isSingleWidget(userConfig: EpiDashboardLayoutUserConfig, zone: EPI_ZONE): boolean;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export declare const DataCollectionsAdminPage: () => JSX.Element;
|
|
491
|
+
|
|
492
|
+
export declare const DataCollectionSetsAdminPage: () => JSX.Element;
|
|
493
|
+
|
|
494
|
+
export declare const DataCollectionVisualizationPage: () => JSX.Element;
|
|
495
|
+
|
|
496
|
+
export declare class DataSetUtil {
|
|
497
|
+
static getCategorizedSetMembers(kwArgs: {
|
|
498
|
+
childMemberIds: string[];
|
|
499
|
+
mappedSetMembers: Map<string, string[]>;
|
|
500
|
+
parentMemberIds: string[];
|
|
501
|
+
parentSetId: string;
|
|
502
|
+
}): {
|
|
503
|
+
categorizedMemberIds: string[];
|
|
504
|
+
setIds: string[];
|
|
505
|
+
uncategorizedMemberIds: string[];
|
|
506
|
+
};
|
|
507
|
+
static getMappedSetMembers<T>(kwArgs: {
|
|
508
|
+
items: T[];
|
|
509
|
+
memberProperty: keyof T & string;
|
|
510
|
+
setProperty: keyof T & string;
|
|
511
|
+
}): Map<string, string[]>;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export declare const DimsAdminPage: () => JSX.Element;
|
|
515
|
+
|
|
516
|
+
export declare const dimTypePresentationValues: Record<CaseDbDimType, string>;
|
|
517
|
+
|
|
518
|
+
export declare const DiseasesAdminPage: () => JSX.Element;
|
|
519
|
+
|
|
520
|
+
export declare type DownloadConfig = {
|
|
521
|
+
disabled?: boolean;
|
|
522
|
+
items: DownloadConfigItems[];
|
|
523
|
+
zone: EPI_ZONE;
|
|
524
|
+
zoneLabel: string;
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
export declare type DownloadConfigItem = {
|
|
528
|
+
callback: () => void;
|
|
529
|
+
disabled?: boolean;
|
|
530
|
+
label: string;
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
export declare type DownloadConfigItems = DownloadConfigItem | DownloadConfigSection;
|
|
534
|
+
|
|
535
|
+
export declare type DownloadConfigSection = {
|
|
536
|
+
disabled?: boolean;
|
|
537
|
+
items: DownloadConfigItem[];
|
|
538
|
+
label: string;
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
export declare class EffectiveRightsUtil {
|
|
542
|
+
static assembleUserEffectiveRights({ caseTypeSetMembers, colSetMembers, organizationAccessCasePolicies, organizationShareCasePolicies, user, userAccessCasePolicies, userShareCasePolicies, }: AssembleUserEffectiveRightsKwArgs): UserEffectiveRight[];
|
|
543
|
+
static getMatchingOrganizationShareCasePolicies(params: {
|
|
544
|
+
dataCollectionId: string;
|
|
545
|
+
organizationId: string;
|
|
546
|
+
organizationShareCasePolicies: CaseDbOrganizationShareCasePolicy[];
|
|
547
|
+
}): CaseDbOrganizationShareCasePolicy[];
|
|
548
|
+
static getOrganizationPolicyGroups({ organizationAccessCasePolicies, organizationShareCasePolicies, }: GetOrganizationPolicyGroupsKwArgs): OrganizationPolicyGroup[];
|
|
549
|
+
private static getOrganizationDataCollectionKey;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export declare enum EPI_UPLOAD_STEP {
|
|
553
|
+
SELECT_FILE = 0,
|
|
554
|
+
MAP_COLUMNS = 1,
|
|
555
|
+
VALIDATE = 2,
|
|
556
|
+
SELECT_SEQUENCE_FILES = 3,
|
|
557
|
+
MAP_SEQUENCES = 4,
|
|
558
|
+
CREATE_CASES = 5
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
export declare enum EPI_ZONE {
|
|
562
|
+
EPI_CURVE = "EPI_CURVE",
|
|
563
|
+
LEGENDA = "LEGENDA",
|
|
564
|
+
LINE_LIST = "LINE_LIST",
|
|
565
|
+
MAP = "MAP",
|
|
566
|
+
TREE = "TREE"
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export declare const EpiAddCasesToEventDialog: ComponentClass<EpiAddCasesToEventDialogProps, WithDialogState<EpiAddCasesToEventDialogOpenProps>>;
|
|
570
|
+
|
|
571
|
+
export declare interface EpiAddCasesToEventDialogOpenProps {
|
|
572
|
+
currentCaseSet: CaseDbCaseSet;
|
|
573
|
+
rows: CaseDbCase[];
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
export declare interface EpiAddCasesToEventDialogProps extends WithDialogRenderProps<EpiAddCasesToEventDialogOpenProps> {
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
export declare type EpiAddCasesToEventDialogRefMethods = WithDialogRefMethods<EpiAddCasesToEventDialogProps, EpiAddCasesToEventDialogOpenProps>;
|
|
580
|
+
|
|
581
|
+
export declare const EpiBulkEditCaseDialog: ComponentClass<EpiBulkEditCaseDialogProps, WithDialogState<EpiBulkEditCaseDialogOpenProps>>;
|
|
582
|
+
|
|
583
|
+
export declare interface EpiBulkEditCaseDialogOpenProps {
|
|
584
|
+
rows: CaseDbCase[];
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
export declare interface EpiBulkEditCaseDialogProps extends WithDialogRenderProps<EpiBulkEditCaseDialogOpenProps> {
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
export declare type EpiBulkEditCaseDialogRefMethods = WithDialogRefMethods<EpiBulkEditCaseDialogProps, EpiBulkEditCaseDialogOpenProps>;
|
|
591
|
+
|
|
592
|
+
export declare const EpiCaseAbacContext: Context<CaseAbacContext>;
|
|
593
|
+
|
|
594
|
+
export declare type EpiCaseHasCaseSet = {
|
|
595
|
+
[caseId: string]: boolean;
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
export declare const EpiCaseInfoDialog: ComponentClass<EpiCaseInfoDialogProps, WithDialogState<EpiCaseInfoDialogOpenProps>>;
|
|
599
|
+
|
|
600
|
+
export declare interface EpiCaseInfoDialogOpenProps {
|
|
601
|
+
caseId: string;
|
|
602
|
+
caseTypeId: string;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
export declare interface EpiCaseInfoDialogProps extends WithDialogRenderProps<EpiCaseInfoDialogOpenProps> {
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
export declare type EpiCaseInfoDialogRefMethods = WithDialogRefMethods<EpiCaseInfoDialogProps, EpiCaseInfoDialogOpenProps>;
|
|
609
|
+
|
|
610
|
+
export declare const EpiCasesAlreadyInCaseSetWarning: ({ cases }: EpiCasesAlreadyInCaseSetWarningProps) => JSX.Element;
|
|
611
|
+
|
|
612
|
+
export declare type EpiCasesAlreadyInCaseSetWarningProps = {
|
|
613
|
+
readonly cases: CaseDbCase[];
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
export declare const EpiCaseSetInfoDialog: ComponentClass<EpiCaseSetInfoDialogProps, WithDialogState<EpiCaseSetInfoDialogOpenProps>>;
|
|
617
|
+
|
|
618
|
+
export declare interface EpiCaseSetInfoDialogOpenProps {
|
|
619
|
+
readonly caseSetId: string;
|
|
620
|
+
readonly caseTypeId: string;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
export declare interface EpiCaseSetInfoDialogProps extends WithDialogRenderProps<EpiCaseSetInfoDialogOpenProps> {
|
|
624
|
+
readonly showNavigationButton?: boolean;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
export declare type EpiCaseSetInfoDialogRefMethods = WithDialogRefMethods<EpiCaseSetInfoDialogProps, EpiCaseSetInfoDialogOpenProps>;
|
|
628
|
+
|
|
629
|
+
export declare const EpiCaseSummary: ({ epiCase }: EpiCaseSummaryProps) => JSX.Element;
|
|
630
|
+
|
|
631
|
+
export declare type EpiCaseSummaryProps = {
|
|
632
|
+
readonly epiCase: CaseDbCase;
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
export declare const EpiCaseTypeAbacContext: Context<CaseTypeAbacContext>;
|
|
636
|
+
|
|
637
|
+
export declare const EpiCaseTypeInfoAccessRights: ({ completeCaseType }: EpiCaseTypeInfoAccessRightsProps) => JSX.Element;
|
|
638
|
+
|
|
639
|
+
export declare type EpiCaseTypeInfoAccessRightsProps = {
|
|
640
|
+
readonly completeCaseType: CaseDbCompleteCaseType;
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
export declare const EpiCaseTypeInfoColAccessRights: ({ colId }: EpiCaseTypeInfoColAccessRightsProps) => JSX.Element;
|
|
644
|
+
|
|
645
|
+
export declare type EpiCaseTypeInfoColAccessRightsProps = {
|
|
646
|
+
readonly colId: string;
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
export declare const EpiCaseTypeInfoData: ({ name, title }: EpiCaseTypeInfoDataProps) => JSX.Element;
|
|
650
|
+
|
|
651
|
+
export declare type EpiCaseTypeInfoDataProps = {
|
|
652
|
+
readonly name: string;
|
|
653
|
+
readonly title: string;
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
export declare const EpiCaseTypeInfoDialog: ComponentClass<EpiCaseTypeInfoDialogProps, WithDialogState<EpiCaseTypeInfoDialogOpenProps>>;
|
|
657
|
+
|
|
658
|
+
export declare const EpiCaseTypeInfoDialogContent: ({ onPermalinkChange, onTitleChange }: EpiCaseTypeInfoDialogContentProps) => JSX.Element;
|
|
659
|
+
|
|
660
|
+
export declare type EpiCaseTypeInfoDialogContentProps = Pick<WithDialogRenderProps, 'onPermalinkChange' | 'onTitleChange'>;
|
|
661
|
+
|
|
662
|
+
export declare interface EpiCaseTypeInfoDialogOpenProps {
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export declare interface EpiCaseTypeInfoDialogProps extends WithDialogRenderProps<EpiCaseTypeInfoDialogOpenProps> {
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
export declare type EpiCaseTypeInfoDialogRefMethods = WithDialogRefMethods<EpiCaseTypeInfoDialogProps, EpiCaseTypeInfoDialogOpenProps>;
|
|
669
|
+
|
|
670
|
+
export declare const EpiCaseTypeInfoDialogWithLoader: ComponentClass<EpiCaseTypeInfoDialogWithLoaderProps, WithDialogState<EpiCaseTypeInfoDialogWithLoaderOpenProps>>;
|
|
671
|
+
|
|
672
|
+
export declare interface EpiCaseTypeInfoDialogWithLoaderOpenProps {
|
|
673
|
+
caseTypeId: string;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
export declare interface EpiCaseTypeInfoDialogWithLoaderProps extends WithDialogRenderProps<EpiCaseTypeInfoDialogWithLoaderOpenProps> {
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
export declare type EpiCaseTypeInfoDialogWithLoaderRefMethods = WithDialogRefMethods<EpiCaseTypeInfoDialogWithLoaderProps, EpiCaseTypeInfoDialogWithLoaderOpenProps>;
|
|
680
|
+
|
|
681
|
+
export declare const EpiCaseTypeInfoRegions: ({ completeCaseType }: EpiCaseTypeInfoRegionsProps) => JSX.Element;
|
|
682
|
+
|
|
683
|
+
export declare type EpiCaseTypeInfoRegionsProps = {
|
|
684
|
+
readonly completeCaseType: CaseDbCompleteCaseType;
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
export declare const EpiCaseTypeInfoTrees: ({ completeCaseType }: EpiCaseTypeInfoTreesProps) => JSX.Element;
|
|
688
|
+
|
|
689
|
+
export declare type EpiCaseTypeInfoTreesProps = {
|
|
690
|
+
readonly completeCaseType: CaseDbCompleteCaseType;
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
export declare const EpiCaseTypeInfoValues: ({ completeCaseType }: EpiCaseTypeInfoValuesProps) => JSX.Element;
|
|
694
|
+
|
|
695
|
+
export declare type EpiCaseTypeInfoValuesProps = {
|
|
696
|
+
readonly completeCaseType: CaseDbCompleteCaseType;
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
export declare const EpiCaseTypeInfoVariableDetails: ({ completeCaseType, dim }: EpiCaseTypeInfoVariableDetailsProps) => JSX.Element;
|
|
700
|
+
|
|
701
|
+
export declare type EpiCaseTypeInfoVariableDetailsProps = {
|
|
702
|
+
readonly completeCaseType: CaseDbCompleteCaseType;
|
|
703
|
+
readonly dim: CaseDbDim;
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
export declare const EpiCompletCaseTypeLoader: ({ caseTypeId, children, onCompleteCaseTypeLoaded }: EpiCompletCaseTypeLoaderProps) => JSX.Element;
|
|
707
|
+
|
|
708
|
+
export declare type EpiCompletCaseTypeLoaderProps = PropsWithChildren<{
|
|
709
|
+
readonly caseTypeId: string;
|
|
710
|
+
readonly onCompleteCaseTypeLoaded?: (completeCaseType: CaseDbCompleteCaseType) => void;
|
|
711
|
+
}>;
|
|
712
|
+
|
|
713
|
+
export declare const EpiContextMenu: ({ config, getExtraItems, onMenuClose }: EpiContextMenuProps) => JSX.Element;
|
|
714
|
+
|
|
715
|
+
declare type EpiContextMenuConfig = EpiContextMenuConfigWithAnchor & EpiContextMenuConfigWithPosition;
|
|
716
|
+
|
|
717
|
+
export declare type EpiContextMenuConfigWithAnchor = {
|
|
718
|
+
anchorElement?: Element;
|
|
719
|
+
mouseEvent?: MouseEvent;
|
|
720
|
+
parseIdsFromAnchorElement?: (element: Element) => string[];
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
export declare type EpiContextMenuConfigWithPosition = {
|
|
724
|
+
caseIds?: string[];
|
|
725
|
+
mouseEvent?: MouseEvent;
|
|
726
|
+
position?: PopoverPosition;
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
export declare type EpiContextMenuProps = {
|
|
730
|
+
readonly config: EpiContextMenuConfig;
|
|
731
|
+
readonly getExtraItems?: (onMenuClose?: () => void) => ReactElement;
|
|
732
|
+
readonly onMenuClose: () => void;
|
|
733
|
+
};
|
|
734
|
+
|
|
735
|
+
export declare const EpiCreateEventDialog: ComponentClass<EpiCreateEventDialogProps, WithDialogState<EpiCreateEventDialogOpenProps>>;
|
|
736
|
+
|
|
737
|
+
export declare interface EpiCreateEventDialogOpenProps {
|
|
738
|
+
readonly completeCaseType?: CaseDbCompleteCaseType;
|
|
739
|
+
readonly rows?: CaseDbCase[];
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
export declare interface EpiCreateEventDialogProps extends WithDialogRenderProps<EpiCreateEventDialogOpenProps> {
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
export declare type EpiCreateEventDialogRefMethods = WithDialogRefMethods<EpiCreateEventDialogProps, EpiCreateEventDialogOpenProps>;
|
|
746
|
+
|
|
747
|
+
export declare class EpiCurveUtil {
|
|
748
|
+
static getItemsWithinInterval(items: Item[], intervals: Date[], index: number): Item[];
|
|
749
|
+
/**
|
|
750
|
+
* Finds the initial column (resolution) for the given dimensionId in the given lineList
|
|
751
|
+
* @param completeCaseType
|
|
752
|
+
* @param lineList
|
|
753
|
+
* @param cols
|
|
754
|
+
* @returns
|
|
755
|
+
*/
|
|
756
|
+
static getPreferredTimeColumn(completeCaseType: CaseDbCompleteCaseType, cases: CaseDbCase[], cols: CaseDbCol[]): CaseDbCol;
|
|
757
|
+
/**
|
|
758
|
+
* Gets rows sorted by time
|
|
759
|
+
* @param completeCaseType
|
|
760
|
+
* @param lineList
|
|
761
|
+
* @param cols
|
|
762
|
+
* @returns
|
|
763
|
+
*/
|
|
764
|
+
static getSortedItems(completeCaseType: CaseDbCompleteCaseType, cases: CaseDbCase[], cols: CaseDbCol[]): Item[];
|
|
765
|
+
static getXAxisIntervals(colType: CaseDbColType, items: Item[]): Date[];
|
|
766
|
+
static getXAxisLabel(colType: CaseDbColType, value: Date): string;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
export declare const EpiCurveWidget: () => JSX.Element;
|
|
770
|
+
|
|
771
|
+
declare interface EpiCurveWidgetData extends WidgetData {
|
|
772
|
+
columnId: string;
|
|
773
|
+
dimensionId: string;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
export declare const EpiCustomTabPanel: (props: EpiCustomTabPanelProps) => JSX.Element;
|
|
777
|
+
|
|
778
|
+
export declare type EpiCustomTabPanelProps = PropsWithChildren<{
|
|
779
|
+
readonly index: number;
|
|
780
|
+
readonly value: number;
|
|
781
|
+
}>;
|
|
782
|
+
|
|
783
|
+
export declare const EpiDashboard: ComponentType<EpiDashboardProps>;
|
|
784
|
+
|
|
785
|
+
export declare type EpiDashboardGeneralSettings = {
|
|
786
|
+
isHighlightingEnabled: boolean;
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
export declare type EpiDashboardLayout = [EpiDashboardLayoutPanelOrientation, ...EpiDashboardLayoutFirstAxisPanel[]];
|
|
790
|
+
|
|
791
|
+
export declare type EpiDashboardLayoutConfig = {
|
|
792
|
+
layouts: EpiDashboardLayout[];
|
|
793
|
+
zones: EPI_ZONE[];
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
export declare type EpiDashboardLayoutFirstAxisPanel = [100 | 30 | 50 | 70, ...EpiDashboardLayoutSecondAxisPanel[]];
|
|
797
|
+
|
|
798
|
+
export declare type EpiDashboardLayoutPanelOrientation = 'horizontal' | 'vertical';
|
|
799
|
+
|
|
800
|
+
export declare type EpiDashboardLayoutSecondAxisPanel = [100 | 30 | 50 | 70, EPI_ZONE];
|
|
801
|
+
|
|
802
|
+
export declare type EpiDashboardLayoutUserConfig = {
|
|
803
|
+
arrangement: number;
|
|
804
|
+
zones: {
|
|
805
|
+
[EPI_ZONE.EPI_CURVE]: boolean;
|
|
806
|
+
[EPI_ZONE.LINE_LIST]: boolean;
|
|
807
|
+
[EPI_ZONE.MAP]: boolean;
|
|
808
|
+
[EPI_ZONE.TREE]: boolean;
|
|
809
|
+
};
|
|
810
|
+
};
|
|
811
|
+
|
|
812
|
+
declare type EpiDashboardProps = {
|
|
813
|
+
readonly caseSet?: CaseDbCaseSet;
|
|
814
|
+
readonly caseTypeId: string;
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
export declare type EpiDashboardStore = EpiDashboardStoreActions & EpiDashboardStoreState;
|
|
818
|
+
|
|
819
|
+
declare interface EpiDashboardStoreActions extends TableStoreActions<CaseDbCase, CaseDbCompleteCaseType> {
|
|
820
|
+
addTreeFilter: (nodeId: string) => Promise<void>;
|
|
821
|
+
destroy: () => void;
|
|
822
|
+
expandZone: (zone: EPI_ZONE) => void;
|
|
823
|
+
mutateCachedCase: (caseId: string, item: CaseDbCase) => void;
|
|
824
|
+
reloadStratification: () => void;
|
|
825
|
+
reloadStratifyableColumns: () => void;
|
|
826
|
+
reloadTree: () => void;
|
|
827
|
+
removeTreeFilter: () => Promise<void>;
|
|
828
|
+
resetTreeAddresses: () => void;
|
|
829
|
+
setFindSimilarCasesResults: (findSimilarCasesResults: FindSimilarCasesResult[]) => Promise<void>;
|
|
830
|
+
setNumVisibleAttributesInSummary: (numVisibleAttributesInSummary: number) => void;
|
|
831
|
+
setPhylogeneticTreeResponse: (phylogeneticTree: CaseDbPhylogeneticTree) => void;
|
|
832
|
+
stratify: (mode: STRATIFICATION_MODE, col?: CaseDbCol) => void;
|
|
833
|
+
treeFilterStepOut: () => Promise<void>;
|
|
834
|
+
updateEpiCurveWidgetData: (data: Partial<EpiCurveWidgetData>) => void;
|
|
835
|
+
updateEpiListWidgetData: (data: Partial<EpiListWidgetData>) => void;
|
|
836
|
+
updateEpiMapWidgetData: (data: Partial<EpiMapWidgetData>) => void;
|
|
837
|
+
updateEpiTreeWidgetData: (data: Partial<EpiTreeWidgetData>) => void;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
export declare const EpiDashboardStoreContext: Context<StoreApi<EpiDashboardStore>>;
|
|
841
|
+
|
|
842
|
+
export declare const EpiDashboardStoreLoader: ({ caseSet, caseTypeId, children }: EpiDashboardStoreLoaderProps) => JSX.Element;
|
|
843
|
+
|
|
844
|
+
export declare type EpiDashboardStoreLoaderProps = PropsWithChildren<{
|
|
845
|
+
readonly caseSet?: CaseDbCaseSet;
|
|
846
|
+
readonly caseTypeId: string;
|
|
847
|
+
}>;
|
|
848
|
+
|
|
849
|
+
declare interface EpiDashboardStoreState extends TableStoreState<CaseDbCase, CaseDbCompleteCaseType> {
|
|
850
|
+
caseSetId: string;
|
|
851
|
+
completeCaseType: CaseDbCompleteCaseType;
|
|
852
|
+
epiCurveWidgetData: EpiCurveWidgetData;
|
|
853
|
+
epiListWidgetData: EpiListWidgetData;
|
|
854
|
+
epiMapWidgetData: EpiMapWidgetData;
|
|
855
|
+
epiTreeWidgetData: EpiTreeWidgetData;
|
|
856
|
+
expandedZone: EPI_ZONE;
|
|
857
|
+
findSimilarCasesResults: FindSimilarCasesResult[];
|
|
858
|
+
isMaxResultsExceeded: boolean;
|
|
859
|
+
isMaxResultsExceededDismissed: boolean;
|
|
860
|
+
newick: string;
|
|
861
|
+
numVisibleAttributesInSummary: number;
|
|
862
|
+
stratification: Stratification;
|
|
863
|
+
stratifyableColumns: StratifiableColumn[];
|
|
864
|
+
tree: TreeNode;
|
|
865
|
+
treeAddresses: {
|
|
866
|
+
[key: string]: {
|
|
867
|
+
addresses: {
|
|
868
|
+
[key: string]: string;
|
|
869
|
+
};
|
|
870
|
+
algorithmCode: string;
|
|
871
|
+
};
|
|
872
|
+
};
|
|
873
|
+
treeResponse: TreeNode;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
export declare type EpiDashboardTreeSettings = {
|
|
877
|
+
isShowDistancesEnabled: boolean;
|
|
878
|
+
isShowSupportLinesWhenUnlinkedEnabled?: boolean;
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
export declare type EpiData = {
|
|
882
|
+
conceptsById: {
|
|
883
|
+
[id: string]: CaseDbConcept;
|
|
884
|
+
};
|
|
885
|
+
conceptsBySetId: {
|
|
886
|
+
[id: string]: CaseDbConcept[];
|
|
887
|
+
};
|
|
888
|
+
conceptSets: {
|
|
889
|
+
[id: string]: CaseDbConceptSet;
|
|
890
|
+
};
|
|
891
|
+
conceptsIdsBySetId: {
|
|
892
|
+
[id: string]: string[];
|
|
893
|
+
};
|
|
894
|
+
organizations: CaseDbOrganization[];
|
|
895
|
+
organizationsById: {
|
|
896
|
+
[id: string]: CaseDbOrganization;
|
|
897
|
+
};
|
|
898
|
+
regionsById: {
|
|
899
|
+
[id: string]: CaseDbRegion;
|
|
900
|
+
};
|
|
901
|
+
regionsByRegionSetId: {
|
|
902
|
+
[id: string]: CaseDbRegion[];
|
|
903
|
+
};
|
|
904
|
+
regionSets: {
|
|
905
|
+
[id: string]: CaseDbRegionSet;
|
|
906
|
+
};
|
|
907
|
+
treeAlgorithms: CaseDbTreeAlgorithm[];
|
|
908
|
+
userDataCollections: CaseDbDataCollection[];
|
|
909
|
+
userDataCollectionsById: {
|
|
910
|
+
[id: string]: CaseDbDataCollection;
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
|
|
914
|
+
export declare const EpiDataCollectionAccessInfo: () => JSX.Element;
|
|
915
|
+
|
|
916
|
+
export declare class EpiDataManager {
|
|
917
|
+
private static __instance;
|
|
918
|
+
readonly data: EpiData;
|
|
919
|
+
private constructor();
|
|
920
|
+
static getInstance(): EpiDataManager;
|
|
921
|
+
getRegionSetIds(completeCaseType: CaseDbCompleteCaseType): string[];
|
|
922
|
+
loadConcepts(signal: AbortSignal): Promise<void>;
|
|
923
|
+
loadMissingRegions(completeCaseType: CaseDbCompleteCaseType, signal: AbortSignal): Promise<void>;
|
|
924
|
+
loadOrganizations(signal: AbortSignal): Promise<void>;
|
|
925
|
+
loadTreeAlgorithms(completeCaseType: CaseDbCompleteCaseType, signal: AbortSignal): Promise<void>;
|
|
926
|
+
private getMissingRegionSetIds;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
declare type EpiEvent = {
|
|
930
|
+
onDownloadOptionsChanged: DownloadConfig;
|
|
931
|
+
onDownloadOptionsRequested: void;
|
|
932
|
+
onEventCreated: void;
|
|
933
|
+
openAddCasesToEventDialog: EpiAddCasesToEventDialogOpenProps;
|
|
934
|
+
openBulkEditCaseDialog: EpiBulkEditCaseDialogOpenProps;
|
|
935
|
+
openCaseInfoDialog: EpiCaseInfoDialogOpenProps;
|
|
936
|
+
openContactDetailsDialog: EpiContactDetailsDialogOpenProps;
|
|
937
|
+
openCreateEventDialog: EpiCreateEventDialogOpenProps;
|
|
938
|
+
openFiltersMenu: void;
|
|
939
|
+
openFindSimilarCasesDialog: EpiFindSimilarCasesDialogOpenProps;
|
|
940
|
+
openRemoveCasesFromEventDialog: EpiRemoveCasesFromEventDialogOpenProps;
|
|
941
|
+
openRemoveFindSimilarCasesResultDialog: EpiRemoveFindSimilarCasesResultDialogOpenProps;
|
|
942
|
+
openSequenceDownloadDialog: EpiSequenceDownloadDialogOpenProps;
|
|
943
|
+
};
|
|
944
|
+
|
|
945
|
+
export declare class EpiEventBusManager extends EventBusAbstract<EpiEvent> {
|
|
946
|
+
private static __instance;
|
|
947
|
+
private constructor();
|
|
948
|
+
static getInstance(): EpiEventBusManager;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
export declare class EpiFilterUtil {
|
|
952
|
+
private static readonly colTypeBlackList;
|
|
953
|
+
static createCategoricalFilter(col: CaseDbCol, dimId: string, completeCaseType: CaseDbCompleteCaseType): MultiSelectFilter | TextFilter;
|
|
954
|
+
static createFilterDimensions(completeCaseType: CaseDbCompleteCaseType): FilterDimension[];
|
|
955
|
+
static createFilters(completeCaseType: CaseDbCompleteCaseType): Filters;
|
|
956
|
+
static getDateParser(refCol: CaseDbRefCol): (date: string) => Date;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
export declare const EpiFindSimilarCasesDialog: ComponentClass<EpiFindSimilarCasesDialogProps, WithDialogState<EpiFindSimilarCasesDialogOpenProps>>;
|
|
960
|
+
|
|
961
|
+
export declare interface EpiFindSimilarCasesDialogOpenProps {
|
|
962
|
+
allRows: CaseDbCase[];
|
|
963
|
+
completeCaseType: CaseDbCompleteCaseType;
|
|
964
|
+
selectedRows: CaseDbCase[];
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
export declare interface EpiFindSimilarCasesDialogProps extends WithDialogRenderProps<EpiFindSimilarCasesDialogOpenProps> {
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
export declare type EpiFindSimilarCasesDialogRefMethods = WithDialogRefMethods<EpiFindSimilarCasesDialogProps, EpiFindSimilarCasesDialogOpenProps>;
|
|
971
|
+
|
|
972
|
+
export declare class EpiHighlightingManager extends SubscribableAbstract<Highlighting> {
|
|
973
|
+
private static __instance;
|
|
974
|
+
protected constructor();
|
|
975
|
+
static getInstance(): EpiHighlightingManager;
|
|
976
|
+
highlight(highlighting: Highlighting): void;
|
|
977
|
+
reset(): void;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export declare const EpiLegendaItem: ({ children, item, tooltip, tooltipProps }: EpiLegendaItemProps) => JSX.Element;
|
|
981
|
+
|
|
982
|
+
export declare type EpiLegendaItemProps = {
|
|
983
|
+
readonly children?: ReactNode;
|
|
984
|
+
readonly item: StratificationLegendaItem;
|
|
985
|
+
readonly tooltip?: boolean;
|
|
986
|
+
readonly tooltipProps?: Partial<TooltipProps>;
|
|
987
|
+
};
|
|
988
|
+
|
|
989
|
+
export declare class EpiLineListCaseSetMembersManager {
|
|
990
|
+
private static __instance;
|
|
991
|
+
private readonly queuedCases;
|
|
992
|
+
private constructor();
|
|
993
|
+
static getInstance(): EpiLineListCaseSetMembersManager;
|
|
994
|
+
cleanStaleQueue(): void;
|
|
995
|
+
loadRange(caseIds: string[]): Promise<void>;
|
|
996
|
+
query(caseId: string): Promise<boolean>;
|
|
997
|
+
private createQueueItem;
|
|
998
|
+
private getItemFromCache;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
export declare type EpiLineListRangeSubjectValue = {
|
|
1002
|
+
endIndex: number;
|
|
1003
|
+
startIndex: number;
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
export declare class EpiLineListUtil {
|
|
1007
|
+
static getCaseCount(cases: CaseDbCase[]): number;
|
|
1008
|
+
static getSelectedRows(cases: CaseDbCase[], selectedIds: string[]): CaseDbCase[];
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
export declare const EpiLineListWidget: ({ caseSet, lineListRangeSubject, linkedScrollSubject, onLink }: EpiLineListWidgetProps) => JSX.Element;
|
|
1012
|
+
|
|
1013
|
+
export declare type EpiLineListWidgetProps = {
|
|
1014
|
+
readonly caseSet?: CaseDbCaseSet;
|
|
1015
|
+
readonly lineListRangeSubject: Subject<EpiLineListRangeSubjectValue>;
|
|
1016
|
+
readonly linkedScrollSubject: Subject<EpiLinkedScrollSubjectValue>;
|
|
1017
|
+
readonly onLink: () => void;
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
export declare type EpiLinkedScrollSubjectValue = {
|
|
1021
|
+
origin: HTMLElement;
|
|
1022
|
+
position: number;
|
|
1023
|
+
};
|
|
1024
|
+
|
|
1025
|
+
declare interface EpiListWidgetData extends WidgetData {
|
|
1026
|
+
visibleItemItemIndex: number;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
export declare class EpiMapUtil {
|
|
1030
|
+
static getGeoJsonAspectScale(geoJson: string): number;
|
|
1031
|
+
static getPieChartRadius(numCases: number, maxPieChartArea: number, statistics: RegionStatistics): number;
|
|
1032
|
+
static getRegionStatistics(cases: CaseDbCase[], columnId: string, regions: CaseDbRegion[]): RegionStatistics;
|
|
1033
|
+
private static createEmptyBounds;
|
|
1034
|
+
private static expandBoundsFromCoordinates;
|
|
1035
|
+
private static expandBoundsFromFeature;
|
|
1036
|
+
private static expandBoundsFromGeometry;
|
|
1037
|
+
private static getGeoJsonBounds;
|
|
1038
|
+
private static getGeoJsonObjectBounds;
|
|
1039
|
+
private static hasBounds;
|
|
1040
|
+
private static mergeBounds;
|
|
1041
|
+
private static normalizeBounds;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
export declare const EpiMapWidget: () => JSX.Element;
|
|
1045
|
+
|
|
1046
|
+
declare interface EpiMapWidgetData extends WidgetData {
|
|
1047
|
+
columnId: string;
|
|
1048
|
+
dimensionId: string;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
export declare const EpiRemoveCasesFromEventDialog: ComponentClass<EpiRemoveCasesFromEventDialogProps, WithDialogState<EpiRemoveCasesFromEventDialogOpenProps>>;
|
|
1052
|
+
|
|
1053
|
+
export declare interface EpiRemoveCasesFromEventDialogOpenProps {
|
|
1054
|
+
caseSet: CaseDbCaseSet;
|
|
1055
|
+
rows: CaseDbCase[];
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
export declare interface EpiRemoveCasesFromEventDialogProps extends WithDialogRenderProps<EpiRemoveCasesFromEventDialogOpenProps> {
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
export declare type EpiRemoveCasesFromEventDialogRefMethods = WithDialogRefMethods<EpiRemoveCasesFromEventDialogProps, EpiRemoveCasesFromEventDialogOpenProps>;
|
|
1062
|
+
|
|
1063
|
+
declare interface EpiRemoveFindSimilarCasesResultDialogOpenProps {
|
|
1064
|
+
completeCaseType: CaseDbCompleteCaseType;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
export declare const EpiSequenceDownloadDialog: ComponentClass<EpiSequenceDownloadDialogProps, WithDialogState<EpiSequenceDownloadDialogOpenProps>>;
|
|
1068
|
+
|
|
1069
|
+
export declare interface EpiSequenceDownloadDialogOpenProps {
|
|
1070
|
+
cases: CaseDbCase[];
|
|
1071
|
+
geneticSequenceColId?: string;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
export declare interface EpiSequenceDownloadDialogProps extends WithDialogRenderProps<EpiSequenceDownloadDialogOpenProps> {
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
export declare type EpiSequenceDownloadDialogRefMethods = WithDialogRefMethods<EpiSequenceDownloadDialogProps, EpiSequenceDownloadDialogOpenProps>;
|
|
1078
|
+
|
|
1079
|
+
export declare const EpiStratification: () => JSX.Element;
|
|
1080
|
+
|
|
1081
|
+
export declare const EpiTreeDescription: ({ treeConfiguration, }: EpiTreeDescriptionProps) => JSX.Element;
|
|
1082
|
+
|
|
1083
|
+
export declare type EpiTreeDescriptionProps = {
|
|
1084
|
+
readonly treeConfiguration: TreeConfiguration;
|
|
1085
|
+
};
|
|
1086
|
+
|
|
1087
|
+
export declare class EpiTreeUtil {
|
|
1088
|
+
/**
|
|
1089
|
+
* Traverses the tree and produces a {@link TreeAssembly} containing all
|
|
1090
|
+
* pre-computed `Path2D` shapes and metadata needed to render the tree.
|
|
1091
|
+
*
|
|
1092
|
+
* Leaf nodes are assembled in DFS order (incrementing `leafIndex`), which
|
|
1093
|
+
* determines their vertical position. Ancestor nodes are positioned vertically
|
|
1094
|
+
* at the midpoint of their first and last child.
|
|
1095
|
+
*
|
|
1096
|
+
* @param params.rootNode - The root of the tree to assemble.
|
|
1097
|
+
* @param params.treeCanvasWidth - Width of the tree canvas in pixels, used for support lines.
|
|
1098
|
+
* @param params.pixelToGeneticDistanceRatio - Pixels per unit of genetic distance.
|
|
1099
|
+
* @param params.itemHeight - Height of each row/item in pixels.
|
|
1100
|
+
* @param params.externalLeafSorting - Custom sorting order of leaf nodes by name, derived from external ordering (e.g. table row order). Must contain all leaf node names.
|
|
1101
|
+
* @returns A fully populated {@link TreeAssembly} ready for rendering.
|
|
1102
|
+
*/
|
|
1103
|
+
static assembleTree(params: {
|
|
1104
|
+
externalLeafSorting: string[];
|
|
1105
|
+
itemHeight: number;
|
|
1106
|
+
pixelToGeneticDistanceRatio: number;
|
|
1107
|
+
rootNode: TreeNode;
|
|
1108
|
+
treeCanvasWidth: number;
|
|
1109
|
+
}): TreeAssembly;
|
|
1110
|
+
/**
|
|
1111
|
+
* Assigns a dot-notation address to every node in the tree, representing its
|
|
1112
|
+
* position in the hierarchy (e.g. `"1.2.1"`). Zero-branch-length children are
|
|
1113
|
+
* always placed at index `1`; other children are indexed starting at `1` or
|
|
1114
|
+
* `2` depending on whether a zero-branch sibling is present.
|
|
1115
|
+
*
|
|
1116
|
+
* @param rootNode - The root of the tree to address.
|
|
1117
|
+
* @returns A map from node name to its dot-notation address string.
|
|
1118
|
+
*/
|
|
1119
|
+
static createTreeAddresses(rootNode: TreeNode): {
|
|
1120
|
+
[key: string]: string;
|
|
1121
|
+
};
|
|
1122
|
+
/**
|
|
1123
|
+
* Draws a thin horizontal divider line across the full canvas width.
|
|
1124
|
+
*
|
|
1125
|
+
* Used to visually separate the scale header from the tree body.
|
|
1126
|
+
*
|
|
1127
|
+
* @param params.canvas - The canvas element to draw onto.
|
|
1128
|
+
* @param params.y - Vertical position of the divider in logical pixels.
|
|
1129
|
+
* @param params.devicePixelRatio - Screen DPR for correct positioning.
|
|
1130
|
+
*/
|
|
1131
|
+
static drawDivider(params: {
|
|
1132
|
+
canvas: HTMLCanvasElement;
|
|
1133
|
+
devicePixelRatio: number;
|
|
1134
|
+
y: number;
|
|
1135
|
+
}): void;
|
|
1136
|
+
/**
|
|
1137
|
+
* Draws vertical dashed guide lines on the canvas at each tick mark position.
|
|
1138
|
+
*
|
|
1139
|
+
* @param params.canvas - The canvas element to draw onto.
|
|
1140
|
+
* @param params.tickerMarkScale - Scale tuple from {@link getTickMarkScale}.
|
|
1141
|
+
* @param params.geneticTreeWidth - Total genetic width of the tree.
|
|
1142
|
+
* @param params.pixelToGeneticDistanceRatio - Pixels per unit of genetic distance.
|
|
1143
|
+
* @param params.devicePixelRatio - Screen DPR.
|
|
1144
|
+
* @param params.paddingTop - Top inset in pixels to leave blank (default 0).
|
|
1145
|
+
* @param params.paddingBottom - Bottom inset in pixels to leave blank (default 0).
|
|
1146
|
+
* @param params.zoomLevel - Current zoom level.
|
|
1147
|
+
* @param params.horizontalScrollPosition - Current horizontal scroll offset in pixels.
|
|
1148
|
+
*/
|
|
1149
|
+
static drawGuides(params: {
|
|
1150
|
+
canvas: HTMLCanvasElement;
|
|
1151
|
+
devicePixelRatio: number;
|
|
1152
|
+
endY?: number;
|
|
1153
|
+
geneticTreeWidth: default_2;
|
|
1154
|
+
horizontalScrollPosition: number;
|
|
1155
|
+
paddingBottom?: number;
|
|
1156
|
+
paddingTop?: number;
|
|
1157
|
+
pixelToGeneticDistanceRatio: number;
|
|
1158
|
+
startY?: number;
|
|
1159
|
+
tickerMarkScale: TickerMarkScale;
|
|
1160
|
+
zoomLevel: number;
|
|
1161
|
+
}): void;
|
|
1162
|
+
/**
|
|
1163
|
+
* Draws the genetic distance scale labels onto the canvas header area.
|
|
1164
|
+
*
|
|
1165
|
+
* Labels are drawn in reverse order (right-to-left distance decreasing) so
|
|
1166
|
+
* the leftmost label shows the largest genetic distance.
|
|
1167
|
+
*
|
|
1168
|
+
* @param params.canvas - The canvas element to draw onto.
|
|
1169
|
+
* @param params.theme - MUI theme providing the font family.
|
|
1170
|
+
* @param params.tickerMarkScale - Scale tuple from {@link getTickMarkScale}.
|
|
1171
|
+
* @param params.geneticTreeWidth - Total genetic width of the tree.
|
|
1172
|
+
* @param params.pixelToGeneticDistanceRatio - Pixels per unit of genetic distance.
|
|
1173
|
+
* @param params.zoomLevel - Current zoom level.
|
|
1174
|
+
* @param params.devicePixelRatio - Screen DPR.
|
|
1175
|
+
* @param params.horizontalScrollPosition - Current horizontal scroll offset in pixels.
|
|
1176
|
+
*/
|
|
1177
|
+
static drawScale(params: {
|
|
1178
|
+
canvas: HTMLCanvasElement;
|
|
1179
|
+
devicePixelRatio: number;
|
|
1180
|
+
geneticTreeWidth: default_2;
|
|
1181
|
+
horizontalScrollPosition: number;
|
|
1182
|
+
pixelToGeneticDistanceRatio: number;
|
|
1183
|
+
theme: Theme;
|
|
1184
|
+
tickerMarkScale: TickerMarkScale;
|
|
1185
|
+
zoomLevel: number;
|
|
1186
|
+
}): void;
|
|
1187
|
+
/**
|
|
1188
|
+
* Renders the pre-assembled tree shapes onto a canvas using the 2D context.
|
|
1189
|
+
*
|
|
1190
|
+
* Applies a transform for zoom and scroll, then draws in order:
|
|
1191
|
+
* vertical ancestor lines → horizontal ancestor lines → (linked) support lines
|
|
1192
|
+
* → (highlighted) distance labels → ancestor dots → leaf branch lines → leaf dots.
|
|
1193
|
+
*
|
|
1194
|
+
* When nodes are highlighted, non-highlighted shapes are dimmed via the
|
|
1195
|
+
* theme's `dimFn`. Leaf dot colours come from the stratification's `caseIdColors`
|
|
1196
|
+
* when available.
|
|
1197
|
+
*
|
|
1198
|
+
* @param params.canvas - The canvas element to draw onto.
|
|
1199
|
+
* @param params.theme - MUI theme providing colours and font settings.
|
|
1200
|
+
* @param params.treeAssembly - Pre-computed tree shapes from {@link assembleTree}.
|
|
1201
|
+
* @param params.stratification - Colour mapping per case ID for leaf dots.
|
|
1202
|
+
* @param params.zoomLevel - Current zoom level applied as a canvas transform.
|
|
1203
|
+
* @param params.highlightedNodeNames - Node names to highlight; all others are dimmed.
|
|
1204
|
+
* @param params.verticalScrollPosition - Vertical scroll offset in pixels.
|
|
1205
|
+
* @param params.horizontalScrollPosition - Horizontal scroll offset in pixels.
|
|
1206
|
+
* @param params.shouldShowDistances - Whether to render branch distance labels.
|
|
1207
|
+
* @param params.devicePixelRatio - Screen DPR for crisp rendering on HiDPI displays.
|
|
1208
|
+
* @param params.isLinked - Whether to draw the dashed support lines linking leaf nodes to the table.
|
|
1209
|
+
* @param params.shouldShowSupportLinesWhenUnlinked - Whether to render support lines when unlinked.
|
|
1210
|
+
*/
|
|
1211
|
+
static drawTree(params: {
|
|
1212
|
+
canvas: HTMLCanvasElement;
|
|
1213
|
+
devicePixelRatio: number;
|
|
1214
|
+
externalRange: {
|
|
1215
|
+
endIndex: number;
|
|
1216
|
+
startIndex: number;
|
|
1217
|
+
};
|
|
1218
|
+
externalScrollPosition?: number;
|
|
1219
|
+
headerHeight?: number;
|
|
1220
|
+
highlightedNodeNames: string[];
|
|
1221
|
+
horizontalScrollPosition: number;
|
|
1222
|
+
isLinked: boolean;
|
|
1223
|
+
itemHeight: number;
|
|
1224
|
+
shouldShowDistances: boolean;
|
|
1225
|
+
shouldShowSupportLinesWhenUnlinked: boolean;
|
|
1226
|
+
stratification: Stratification;
|
|
1227
|
+
theme: Theme;
|
|
1228
|
+
treeAssembly: TreeAssembly;
|
|
1229
|
+
verticalScrollPosition: number;
|
|
1230
|
+
zoomLevel: number;
|
|
1231
|
+
}): void;
|
|
1232
|
+
/**
|
|
1233
|
+
* Fully redraws the tree canvas from scratch.
|
|
1234
|
+
*
|
|
1235
|
+
* Resets the canvas, resizes it to match its CSS layout size at the current
|
|
1236
|
+
* DPR, then sequentially calls {@link drawBackground}, {@link drawGuides},
|
|
1237
|
+
* and {@link drawTree}.
|
|
1238
|
+
*
|
|
1239
|
+
* @param params.canvas - The canvas element to draw onto.
|
|
1240
|
+
* @param params.theme - MUI theme used for colours and fonts.
|
|
1241
|
+
* @param params.treeAssembly - Pre-computed tree shapes from {@link assembleTree}.
|
|
1242
|
+
* @param params.stratification - Colour mapping per case ID.
|
|
1243
|
+
* @param params.zoomLevel - Current zoom level.
|
|
1244
|
+
* @param params.isLinked - Whether to draw dashed support lines.
|
|
1245
|
+
* @param params.highlightedNodeNames - Node names to highlight.
|
|
1246
|
+
* @param params.verticalScrollPosition - Vertical scroll offset in pixels.
|
|
1247
|
+
* @param params.horizontalScrollPosition - Horizontal scroll offset in pixels.
|
|
1248
|
+
* @param params.treeCanvasWidth - Logical canvas width in pixels.
|
|
1249
|
+
* @param params.treeCanvasHeight - Logical canvas height in pixels.
|
|
1250
|
+
* @param params.pixelToGeneticDistanceRatio - Pixels per unit of genetic distance.
|
|
1251
|
+
* @param params.tickerMarkScale - Scale tuple from {@link getTickMarkScale}.
|
|
1252
|
+
* @param params.shouldShowDistances - Whether to render branch labels.
|
|
1253
|
+
* @param params.shouldShowSupportLinesWhenUnlinked - Whether to render support lines when unlinked.
|
|
1254
|
+
* @param params.devicePixelRatio - Screen DPR for HiDPI rendering.
|
|
1255
|
+
* @param params.geneticTreeWidth - Total genetic width of the tree, used for guide lines.
|
|
1256
|
+
*/
|
|
1257
|
+
static drawTreeCanvas(params: {
|
|
1258
|
+
canvas: HTMLCanvasElement;
|
|
1259
|
+
devicePixelRatio: number;
|
|
1260
|
+
externalRange: {
|
|
1261
|
+
endIndex: number;
|
|
1262
|
+
startIndex: number;
|
|
1263
|
+
};
|
|
1264
|
+
externalScrollPosition?: number;
|
|
1265
|
+
geneticTreeWidth: default_2;
|
|
1266
|
+
headerHeight?: number;
|
|
1267
|
+
highlightedNodeNames?: string[];
|
|
1268
|
+
horizontalScrollPosition: number;
|
|
1269
|
+
isLinked: boolean;
|
|
1270
|
+
itemHeight: number;
|
|
1271
|
+
pixelToGeneticDistanceRatio: number;
|
|
1272
|
+
shouldShowDistances: boolean;
|
|
1273
|
+
shouldShowSupportLinesWhenUnlinked: boolean;
|
|
1274
|
+
stratification: Stratification;
|
|
1275
|
+
theme: Theme;
|
|
1276
|
+
tickerMarkScale: TickerMarkScale;
|
|
1277
|
+
treeAssembly: TreeAssembly;
|
|
1278
|
+
treeCanvasHeight: number;
|
|
1279
|
+
treeCanvasWidth: number;
|
|
1280
|
+
verticalScrollPosition: number;
|
|
1281
|
+
zoomLevel: number;
|
|
1282
|
+
}): void;
|
|
1283
|
+
/**
|
|
1284
|
+
* Finds and returns a new root node for re-rooting the tree.
|
|
1285
|
+
*
|
|
1286
|
+
* When `selector` is `'node'`, the node with the given name becomes the new root.
|
|
1287
|
+
* When `selector` is `'parent'`, the parent of the node with the given name is returned.
|
|
1288
|
+
*
|
|
1289
|
+
* The returned node has its `branchLength` reset to `0` and its `maxBranchLength`
|
|
1290
|
+
* adjusted by subtracting the original branch length, so the scale remains consistent.
|
|
1291
|
+
*
|
|
1292
|
+
* @param rootNode - The current root of the tree.
|
|
1293
|
+
* @param nodeName - Name of the node to search for.
|
|
1294
|
+
* @param selector - Whether to return the matching node itself (`'node'`) or its parent (`'parent'`).
|
|
1295
|
+
* @returns A shallow copy of the new root with adjusted branch length properties.
|
|
1296
|
+
*/
|
|
1297
|
+
static findNewTreeRoot(rootNode: TreeNode, nodeName: string, selector: 'node' | 'parent'): TreeNode;
|
|
1298
|
+
/**
|
|
1299
|
+
* Finds the smallest non-zero branch length among all leaf nodes in the tree.
|
|
1300
|
+
*
|
|
1301
|
+
* This value is used as the minimum scale unit when computing tick mark
|
|
1302
|
+
* intervals, ensuring the scale never subdivides below a single measurable step.
|
|
1303
|
+
*
|
|
1304
|
+
* @param tree - The root node of the tree to inspect.
|
|
1305
|
+
* @returns The minimum positive branch length found on any leaf, or `Infinity`
|
|
1306
|
+
* if the tree is empty or all leaves have zero/undefined branch lengths.
|
|
1307
|
+
*/
|
|
1308
|
+
static getMinGeneticScaleUnit(tree: TreeNode): number;
|
|
1309
|
+
/**
|
|
1310
|
+
* Calculates the new scroll position after a zoom level change so that the
|
|
1311
|
+
* point under the cursor stays in the same visual position.
|
|
1312
|
+
*
|
|
1313
|
+
* @param params.eventOffset - Pixel offset of the zoom event (e.g. mouse position) within the canvas.
|
|
1314
|
+
* @param params.scrollPosition - Current scroll position before the zoom change.
|
|
1315
|
+
* @param params.dimensionSize - Full logical size of the scrollable dimension in pixels.
|
|
1316
|
+
* @param params.currentZoomLevel - The zoom level before the change.
|
|
1317
|
+
* @param params.newZoomLevel - The zoom level after the change.
|
|
1318
|
+
* @returns The adjusted scroll position that keeps the cursor-point visually stable.
|
|
1319
|
+
*/
|
|
1320
|
+
static getNewScrollPositionForZoomLevel(params: {
|
|
1321
|
+
currentZoomLevel: number;
|
|
1322
|
+
dimensionSize: number;
|
|
1323
|
+
eventOffset: number;
|
|
1324
|
+
newZoomLevel: number;
|
|
1325
|
+
scrollPosition: number;
|
|
1326
|
+
}): number;
|
|
1327
|
+
/**
|
|
1328
|
+
* Performs a hit-test against the tree assembly's path maps to find the
|
|
1329
|
+
* tree node or line segment under the mouse cursor.
|
|
1330
|
+
*
|
|
1331
|
+
* Checks in priority order: node dots (via `isPointInPath`) → horizontal
|
|
1332
|
+
* branch lines (with ±1 px vertical tolerance) → vertical connector lines
|
|
1333
|
+
* (with ±1 px horizontal tolerance).
|
|
1334
|
+
*
|
|
1335
|
+
* @param params.canvas - The canvas element that received the mouse event.
|
|
1336
|
+
* @param params.event - The mouse event providing cursor coordinates.
|
|
1337
|
+
* @param params.treeAssembly - The assembly containing path maps to hit-test against.
|
|
1338
|
+
* @param params.devicePixelRatio - Screen DPR for correct coordinate scaling.
|
|
1339
|
+
* @returns The {@link TreePathProperties} of the hit shape, or `undefined` if nothing was hit.
|
|
1340
|
+
*/
|
|
1341
|
+
static getPathPropertiesFromCanvas(params: {
|
|
1342
|
+
canvas: HTMLCanvasElement;
|
|
1343
|
+
devicePixelRatio: number;
|
|
1344
|
+
event: MouseEvent;
|
|
1345
|
+
treeAssembly: TreeAssembly;
|
|
1346
|
+
}): TreePathProperties;
|
|
1347
|
+
/**
|
|
1348
|
+
* Clamps X and Y scroll positions to their valid ranges for the current
|
|
1349
|
+
* canvas dimensions, zoom level, and link state.
|
|
1350
|
+
*
|
|
1351
|
+
* When the tree is linked and at zoom level 1, y-scrolling is constrained
|
|
1352
|
+
* tightly to the tree's pixel height. When unlinked or zoomed, the bounds
|
|
1353
|
+
* include the full canvas extent to allow free panning.
|
|
1354
|
+
*
|
|
1355
|
+
* Also applies a device-pixel-ratio-dependent correction offset to prevent
|
|
1356
|
+
* subtle over-scroll artefacts at non-integer DPR values (e.g. browser zoom).
|
|
1357
|
+
*
|
|
1358
|
+
* @param params.positionX - Requested horizontal scroll position.
|
|
1359
|
+
* @param params.positionY - Requested vertical scroll position.
|
|
1360
|
+
* @param params.treeCanvasWidth - Logical canvas width in pixels.
|
|
1361
|
+
* @param params.treeCanvasHeight - Logical canvas height in pixels.
|
|
1362
|
+
* @param params.treeHeight - Total rendered height of the full tree in pixels.
|
|
1363
|
+
* @param params.devicePixelRatio - Current screen DPR.
|
|
1364
|
+
* @param params.internalZoomLevel - Internal zoom level of the tree canvas.
|
|
1365
|
+
* @param params.isLinked - Whether the tree is linked to the case list scroll position.
|
|
1366
|
+
* @returns Clamped `{ newPositionX, newPositionY }` values.
|
|
1367
|
+
*/
|
|
1368
|
+
static getSanitizedScrollPosition(params: {
|
|
1369
|
+
devicePixelRatio: number;
|
|
1370
|
+
internalZoomLevel: number;
|
|
1371
|
+
isLinked: boolean;
|
|
1372
|
+
positionX: number;
|
|
1373
|
+
positionY: number;
|
|
1374
|
+
treeCanvasHeight: number;
|
|
1375
|
+
treeCanvasWidth: number;
|
|
1376
|
+
treeHeight: number;
|
|
1377
|
+
}): {
|
|
1378
|
+
newPositionX: number;
|
|
1379
|
+
newPositionY: number;
|
|
1380
|
+
};
|
|
1381
|
+
/**
|
|
1382
|
+
* Calculates the vertical scroll position for a tree canvas based on the
|
|
1383
|
+
* currently visible rows in a linked table/list view.
|
|
1384
|
+
*
|
|
1385
|
+
* The goal is to keep the visible portion of the tree centered on the same
|
|
1386
|
+
* items that are currently visible in the linked view, accounting for zoom.
|
|
1387
|
+
*
|
|
1388
|
+
* @param kwArgs.treeCanvasHeight - Height of the visible tree canvas area in pixels.
|
|
1389
|
+
* @param kwArgs.treeHeight - Total rendered height of the full tree in pixels.
|
|
1390
|
+
* @param kwArgs.treeSize - Total number of leaf items (rows) in the tree.
|
|
1391
|
+
* @param kwArgs.verticalScrollPosition - Current vertical scroll position of the linked view in pixels.
|
|
1392
|
+
* @param kwArgs.zoomLevel - Current zoom level (>1 means zoomed out, items appear smaller).
|
|
1393
|
+
* @returns The new vertical scroll position for the tree canvas, clamped to [0, treeHeight - treeCanvasHeight].
|
|
1394
|
+
*/
|
|
1395
|
+
static getScrollPositionFromTreeVisibility(kwArgs: {
|
|
1396
|
+
itemHeight: number;
|
|
1397
|
+
treeCanvasHeight: number;
|
|
1398
|
+
treeHeight: number;
|
|
1399
|
+
treeSize: number;
|
|
1400
|
+
verticalScrollPosition: number;
|
|
1401
|
+
zoomLevel: number;
|
|
1402
|
+
}): number;
|
|
1403
|
+
/**
|
|
1404
|
+
* Determines the optimal tick mark scale for the genetic distance axis.
|
|
1405
|
+
*
|
|
1406
|
+
* Selects the number of scale lines and the genetic distance represented by
|
|
1407
|
+
* each interval by searching for the combination with the least leftover
|
|
1408
|
+
* (i.e. the product of `numLines × increment` closest to `geneticTreeWidth`).
|
|
1409
|
+
* Increments are drawn from `SCALE_INCREMENTS` scaled by an order-of-magnitude
|
|
1410
|
+
* multiplier derived from `geneticTreeWidth`, and those smaller than
|
|
1411
|
+
* `minGeneticScaleUnit` are skipped.
|
|
1412
|
+
*
|
|
1413
|
+
* @param params.treeWidthMinusPadding - Width of the drawable canvas area in pixels (excluding padding).
|
|
1414
|
+
* @param params.geneticTreeWidth - Total genetic distance represented by the full tree width.
|
|
1415
|
+
* @param params.minGeneticScaleUnit - The smallest meaningful genetic distance unit (see {@link getMinGeneticScaleUnit}).
|
|
1416
|
+
* @param params.zoomLevel - Current zoom level; divides the effective pixel width.
|
|
1417
|
+
* @returns A {@link TickerMarkScale} tuple: `[numberOfLines, geneticDistancePerLine, minGeneticScaleUnit]`.
|
|
1418
|
+
* Returns `[0, 0, 0]` when any required input is falsy.
|
|
1419
|
+
*/
|
|
1420
|
+
static getTickMarkScale(params: {
|
|
1421
|
+
geneticTreeWidth: default_2;
|
|
1422
|
+
minGeneticScaleUnit: number;
|
|
1423
|
+
treeWidthMinusPadding: number;
|
|
1424
|
+
zoomLevel: number;
|
|
1425
|
+
}): TickerMarkScale;
|
|
1426
|
+
/**
|
|
1427
|
+
* Produces a stable, unique string ID for a tree configuration by
|
|
1428
|
+
* concatenating the IDs of its column, reference column, genetic distance
|
|
1429
|
+
* protocol, and tree algorithm.
|
|
1430
|
+
*
|
|
1431
|
+
* @param treeConfiguration - The configuration to identify (without a pre-existing `computedId`).
|
|
1432
|
+
* @returns A string of the form `"colId_refColId_protocolId_algorithmId"`.
|
|
1433
|
+
*/
|
|
1434
|
+
static getTreeConfigurationId(treeConfiguration: Omit<TreeConfiguration, 'computedId'>): string;
|
|
1435
|
+
/**
|
|
1436
|
+
* Returns a human-readable display label for a tree configuration.
|
|
1437
|
+
*
|
|
1438
|
+
* @param config - The tree configuration to label.
|
|
1439
|
+
* @returns A string of the form `"<protocolName> - <algorithmName>"`.
|
|
1440
|
+
*/
|
|
1441
|
+
static getTreeConfigurationLabel(config: TreeConfiguration): string;
|
|
1442
|
+
/**
|
|
1443
|
+
* Derives all possible tree configurations for the given case type.
|
|
1444
|
+
*
|
|
1445
|
+
* Iterates over all columns of type `GENETIC_DISTANCE`, then for each column
|
|
1446
|
+
* produces one {@link TreeConfiguration} per available tree algorithm.
|
|
1447
|
+
* Algorithms are sorted by their canonical order from `EpiDataManager`.
|
|
1448
|
+
*
|
|
1449
|
+
* @param completeCaseType - The fully-loaded case type containing columns,
|
|
1450
|
+
* reference columns, genetic distance protocols, and tree algorithms.
|
|
1451
|
+
* @returns An array of tree configurations, one per (column × algorithm) pair.
|
|
1452
|
+
*/
|
|
1453
|
+
static getTreeConfigurations(completeCaseType: CaseDbCompleteCaseType): TreeConfiguration[];
|
|
1454
|
+
/**
|
|
1455
|
+
* Sanitizes the tree by collapsing intermediate ancestor nodes that have a
|
|
1456
|
+
* zero branch length, hoisting their children up to the parent level.
|
|
1457
|
+
*
|
|
1458
|
+
* This normalises Newick-parsed trees where polytomies or zero-distance
|
|
1459
|
+
* internal nodes would otherwise produce visually redundant branching points.
|
|
1460
|
+
*
|
|
1461
|
+
* @param rootNode - The root of the tree to sanitize. Mutated in place.
|
|
1462
|
+
* @returns The sanitized root node.
|
|
1463
|
+
*/
|
|
1464
|
+
static sanitizeTree(rootNode: TreeNode): TreeNode;
|
|
1465
|
+
/**
|
|
1466
|
+
* Assembles the visual elements for an ancestor (internal) node and appends
|
|
1467
|
+
* them to the tree assembly.
|
|
1468
|
+
*
|
|
1469
|
+
* Produces: vertical connector lines from each child toward the ancestor's
|
|
1470
|
+
* Y midpoint (split into two sorted groups above and below center to allow
|
|
1471
|
+
* per-segment highlighting), a horizontal branch line, an optional distance
|
|
1472
|
+
* label, and a filled dot when all children have positive branch lengths.
|
|
1473
|
+
*
|
|
1474
|
+
* @param treeAssemblyContext - Shared context holding the assembly target and canvas dimensions.
|
|
1475
|
+
* @param node - The ancestor tree node to assemble.
|
|
1476
|
+
* @param childRenderResults - Assembly results returned by all direct children.
|
|
1477
|
+
* @returns The pixel coordinates of the branch start and aggregated case IDs, for use by the parent.
|
|
1478
|
+
*/
|
|
1479
|
+
private static assembleAncestorNode;
|
|
1480
|
+
/**
|
|
1481
|
+
* Assembles the visual elements for a single leaf node and appends them to
|
|
1482
|
+
* the tree assembly.
|
|
1483
|
+
*
|
|
1484
|
+
* Produces: a horizontal branch line, an optional distance label, a dashed
|
|
1485
|
+
* support line extending to the canvas edge, and a filled dot.
|
|
1486
|
+
*
|
|
1487
|
+
* @param treeAssemblyContext - Shared context holding the assembly target and canvas dimensions.
|
|
1488
|
+
* @param node - The leaf tree node to assemble.
|
|
1489
|
+
* @param distance - Accumulated genetic distance from the root to the start of this node's branch.
|
|
1490
|
+
* @param leafIndex - Zero-based vertical index of this leaf, determining its Y position.
|
|
1491
|
+
* @param externalSortingIndex - External sorting index of this leaf derived from linked view order. Used to draw the support line.
|
|
1492
|
+
* @returns The pixel coordinates of the branch start and the node name, for use by the parent.
|
|
1493
|
+
*/
|
|
1494
|
+
private static assembleLeafNode;
|
|
1495
|
+
/**
|
|
1496
|
+
* Helper that wraps a canvas drawing callback with a DPR-aware scale/translate
|
|
1497
|
+
* transform, then restores the context to its pre-call state.
|
|
1498
|
+
*
|
|
1499
|
+
* @param canvas - The canvas element whose 2D context to use.
|
|
1500
|
+
* @param devicePixelRatio - Screen DPR to scale up for HiDPI rendering.
|
|
1501
|
+
* @param callback - Drawing operations to perform inside the transform.
|
|
1502
|
+
*/
|
|
1503
|
+
private static draw;
|
|
1504
|
+
/**
|
|
1505
|
+
* Fills the tree canvas background with the theme's paper colour.
|
|
1506
|
+
*
|
|
1507
|
+
* @param params.canvas - The canvas element to draw onto.
|
|
1508
|
+
* @param params.theme - MUI theme providing the background colour.
|
|
1509
|
+
* @param params.treeCanvasWidth - Width of the area to fill in pixels.
|
|
1510
|
+
* @param params.treeCanvasHeight - Height of the area to fill in pixels.
|
|
1511
|
+
* @param params.devicePixelRatio - Screen DPR for HiDPI rendering.
|
|
1512
|
+
*/
|
|
1513
|
+
private static drawBackground;
|
|
1514
|
+
/**
|
|
1515
|
+
* Iterates over each scale line position and invokes a callback with its
|
|
1516
|
+
* canvas X coordinate.
|
|
1517
|
+
*
|
|
1518
|
+
* Computes the pixel offset for each tick so that the rightmost line aligns
|
|
1519
|
+
* with the genetic tree width, accounting for the current scroll and zoom.
|
|
1520
|
+
*
|
|
1521
|
+
* @param params.tickerMarkScale - Scale tuple from {@link getTickMarkScale}.
|
|
1522
|
+
* @param params.geneticTreeWidth - Total genetic width of the tree.
|
|
1523
|
+
* @param params.pixelToGeneticDistanceRatio - Pixels per unit of genetic distance.
|
|
1524
|
+
* @param params.zoomLevel - Current zoom level.
|
|
1525
|
+
* @param params.devicePixelRatio - Screen DPR.
|
|
1526
|
+
* @param params.horizontalScrollPosition - Current horizontal scroll offset in pixels (default 0).
|
|
1527
|
+
* @param params.callback - Called for each line with `(x, index, numberOfLines)`.
|
|
1528
|
+
*/
|
|
1529
|
+
private static forEachScaleLine;
|
|
1530
|
+
private static getCanvasContext;
|
|
1531
|
+
/**
|
|
1532
|
+
* Returns a formatted distance label string for a branch, or `null` if the
|
|
1533
|
+
* label should be suppressed.
|
|
1534
|
+
*
|
|
1535
|
+
* A label is suppressed when:
|
|
1536
|
+
* - The tree has no maximum branch length, or it is zero.
|
|
1537
|
+
* - The branch length is zero or undefined.
|
|
1538
|
+
* - The branch is shorter than `MINIMUM_DISTANCE_PERCENTAGE_TO_SHOW_LABEL`
|
|
1539
|
+
* percent of the maximum branch length in the tree.
|
|
1540
|
+
*
|
|
1541
|
+
* Precision is derived from the magnitude of `maxBranchLength` to avoid
|
|
1542
|
+
* excessive decimal places for large values.
|
|
1543
|
+
*
|
|
1544
|
+
* @param treeAssemblyContext - Context containing the root node (for `maxBranchLength`).
|
|
1545
|
+
* @param branchLength - The genetic distance of the branch to label.
|
|
1546
|
+
* @returns A rounded numeric string, or `null` if the label should be hidden.
|
|
1547
|
+
*/
|
|
1548
|
+
private static getDistanceLabel;
|
|
1549
|
+
/**
|
|
1550
|
+
* Returns the fill/stroke colour for a shape, dimming it when highlighted
|
|
1551
|
+
* nodes are active and the shape is not among them.
|
|
1552
|
+
*
|
|
1553
|
+
* @param color - The full-brightness colour to use when highlighted or no highlight is active.
|
|
1554
|
+
* @param dimFn - A function that returns a dimmed version of the colour.
|
|
1555
|
+
* @param highlightedNodeNames - The currently highlighted node names.
|
|
1556
|
+
* @param nodeNames - The node name(s) associated with the shape being drawn.
|
|
1557
|
+
* @returns The resolved colour string.
|
|
1558
|
+
*/
|
|
1559
|
+
private static getFillStyle;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
export declare const EpiTreeWidget: ({ itemHeight, lineListRangeSubject, linkedScrollSubject, ref }: EpiTreeWidgetProps) => JSX.Element;
|
|
1563
|
+
|
|
1564
|
+
declare interface EpiTreeWidgetData extends WidgetData {
|
|
1565
|
+
horizontalScrollPosition: number;
|
|
1566
|
+
treeConfiguration: TreeConfiguration;
|
|
1567
|
+
verticalScrollPosition: number;
|
|
1568
|
+
zoomLevel: number;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
declare type EpiTreeWidgetProps = {
|
|
1572
|
+
readonly itemHeight: number;
|
|
1573
|
+
readonly lineListRangeSubject: Subject<EpiLineListRangeSubjectValue>;
|
|
1574
|
+
readonly linkedScrollSubject: Subject<EpiLinkedScrollSubjectValue>;
|
|
1575
|
+
readonly ref: Ref<EpiTreeWidgetRef>;
|
|
1576
|
+
};
|
|
1577
|
+
|
|
1578
|
+
export declare interface EpiTreeWidgetRef {
|
|
1579
|
+
link: () => void;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
export declare const EpiUpload: () => JSX.Element;
|
|
1583
|
+
|
|
1584
|
+
export declare type EpiUploadCompleteColStats = {
|
|
1585
|
+
readsColumns: CaseDbCol[];
|
|
1586
|
+
sampleIdColumns: CaseDbCol[];
|
|
1587
|
+
sequenceColumns: CaseDbCol[];
|
|
1588
|
+
writableColumns: CaseDbCol[];
|
|
1589
|
+
};
|
|
1590
|
+
|
|
1591
|
+
/**
|
|
1592
|
+
* File assignment result for genetic file uploads
|
|
1593
|
+
*/
|
|
1594
|
+
export declare interface EpiUploadFileColumnAssignment {
|
|
1595
|
+
col: CaseDbCol;
|
|
1596
|
+
file: File;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
export declare type EpiUploadMappedColumn = {
|
|
1600
|
+
col: CaseDbCol;
|
|
1601
|
+
isCaseIdColumn?: boolean;
|
|
1602
|
+
isCol?: boolean;
|
|
1603
|
+
isSampleIdColumn?: boolean;
|
|
1604
|
+
originalIndex: number;
|
|
1605
|
+
originalLabel: string;
|
|
1606
|
+
sampleIdentifierIssuerId?: string;
|
|
1607
|
+
};
|
|
1608
|
+
|
|
1609
|
+
export declare type EpiUploadMappedColumnsFormFields = {
|
|
1610
|
+
[key: string]: string;
|
|
1611
|
+
};
|
|
1612
|
+
|
|
1613
|
+
export declare type EpiUploadSequenceMapping = {
|
|
1614
|
+
[caseId: string]: EpiUploadSequenceMappingForCaseId;
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
export declare type EpiUploadSequenceMappingForCaseId = {
|
|
1618
|
+
readsFileNames: {
|
|
1619
|
+
[colId: string]: {
|
|
1620
|
+
fwd: string;
|
|
1621
|
+
rev: string;
|
|
1622
|
+
};
|
|
1623
|
+
};
|
|
1624
|
+
sequenceFileNames: {
|
|
1625
|
+
[colId: string]: string;
|
|
1626
|
+
};
|
|
1627
|
+
};
|
|
1628
|
+
|
|
1629
|
+
export declare type EpiUploadStore = EpiUploadStoreActions & EpiUploadStoreState;
|
|
1630
|
+
|
|
1631
|
+
export declare interface EpiUploadStoreActions {
|
|
1632
|
+
destroy: () => Promise<void>;
|
|
1633
|
+
findNextStep: (currentStep: EPI_UPLOAD_STEP) => EPI_UPLOAD_STEP;
|
|
1634
|
+
findPreviousStep: (currentStep: EPI_UPLOAD_STEP) => EPI_UPLOAD_STEP;
|
|
1635
|
+
goToNextStep: () => Promise<void>;
|
|
1636
|
+
goToPreviousStep: () => void;
|
|
1637
|
+
invalidateCaseValidationQuery: () => Promise<void>;
|
|
1638
|
+
reset: () => Promise<void>;
|
|
1639
|
+
setCaseTypeId: (caseTypeId: string) => void;
|
|
1640
|
+
setCols: (cols: CaseDbCol[]) => void;
|
|
1641
|
+
setCompleteCaseType: (completeCaseType: CaseDbCompleteCaseType) => void;
|
|
1642
|
+
setCreatedInDataCollectionId: (createdInDataCollectionId: string) => void;
|
|
1643
|
+
setDataCollectionOptions: (options: OptionBase<string>[]) => void;
|
|
1644
|
+
setFileList: (fileList: FileList) => Promise<void>;
|
|
1645
|
+
setMappedColumns: (mappedColumns: EpiUploadMappedColumn[]) => Promise<void>;
|
|
1646
|
+
setRawData: (rawData: string[][]) => Promise<void>;
|
|
1647
|
+
setSequenceFilesDataTransfer: (dataTransfer: DataTransfer) => void;
|
|
1648
|
+
setSequenceMapping: (sequenceMapping: EpiUploadSequenceMapping) => void;
|
|
1649
|
+
setSheet: (sheet: string) => Promise<void>;
|
|
1650
|
+
setSheetOptions: (sheetOptions: AutoCompleteOption<string>[]) => Promise<void>;
|
|
1651
|
+
setValidatedCases: (validatedCases: CaseDbCaseUploadResult[]) => void;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
export declare const EpiUploadStoreContext: Context<StoreApi<EpiUploadStore>>;
|
|
1655
|
+
|
|
1656
|
+
export declare interface EpiUploadStoreState {
|
|
1657
|
+
activeStep: EPI_UPLOAD_STEP;
|
|
1658
|
+
assemblyProtocolId: string;
|
|
1659
|
+
caseTypeId: string;
|
|
1660
|
+
cols: CaseDbCol[];
|
|
1661
|
+
completeCaseType: CaseDbCompleteCaseType;
|
|
1662
|
+
createdInDataCollectionId: string;
|
|
1663
|
+
createdInDataCollectionOptions: AutoCompleteOption<string>[];
|
|
1664
|
+
dataCollectionOptions: OptionBase<string>[];
|
|
1665
|
+
fileList: FileList;
|
|
1666
|
+
fileName: string;
|
|
1667
|
+
fileParsingError: string;
|
|
1668
|
+
initError: unknown;
|
|
1669
|
+
isInitLoading: boolean;
|
|
1670
|
+
mappedColumns: EpiUploadMappedColumn[];
|
|
1671
|
+
rawData: string[][];
|
|
1672
|
+
sampleIdColId: string;
|
|
1673
|
+
sequenceFilesDataTransfer: DataTransfer;
|
|
1674
|
+
sequenceMapping: EpiUploadSequenceMapping;
|
|
1675
|
+
sequencingProtocolId: string;
|
|
1676
|
+
sheet: string;
|
|
1677
|
+
sheetOptions: AutoCompleteOption<string>[];
|
|
1678
|
+
shouldResetColumnMapping: boolean;
|
|
1679
|
+
shouldResetSequenceMapping: boolean;
|
|
1680
|
+
validateCasesQueryKey: string[];
|
|
1681
|
+
validatedCases: CaseDbCaseUploadResult[];
|
|
1682
|
+
validatedCasesWithGeneratedId: CaseUploadResultWithGeneratedId[];
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
export declare type EpiUploadTableRow = {
|
|
1686
|
+
[key: string]: string;
|
|
1687
|
+
};
|
|
1688
|
+
|
|
1689
|
+
export declare class EpiUploadUtil {
|
|
1690
|
+
static readonly caseDateColumnAliases: string[];
|
|
1691
|
+
static readonly caseIdColumnAliases: string[];
|
|
1692
|
+
static readonly colAliases: string[];
|
|
1693
|
+
static areMappedColumnsEqual(a: EpiUploadMappedColumn[], b: EpiUploadMappedColumn[]): boolean;
|
|
1694
|
+
static createCases(kwArgs: {
|
|
1695
|
+
assemblyProtocolId: string;
|
|
1696
|
+
caseTypeId: string;
|
|
1697
|
+
completeCaseType: CaseDbCompleteCaseType;
|
|
1698
|
+
createdInDataCollectionId: string;
|
|
1699
|
+
mappedColumns: EpiUploadMappedColumn[];
|
|
1700
|
+
sampleIdColId: string;
|
|
1701
|
+
sequenceMapping: EpiUploadSequenceMapping;
|
|
1702
|
+
sequencingProtocolId: string;
|
|
1703
|
+
signal: AbortSignal;
|
|
1704
|
+
validatedCases: CaseDbCaseUploadResult[];
|
|
1705
|
+
validatedCasesWithGeneratedId: CaseUploadResultWithGeneratedId[];
|
|
1706
|
+
}): Promise<CaseDbCaseBatchUploadResult>;
|
|
1707
|
+
static createCasesAndUploadFiles(kwArgs: {
|
|
1708
|
+
assemblyProtocolId: string;
|
|
1709
|
+
caseTypeId: string;
|
|
1710
|
+
completeCaseType: CaseDbCompleteCaseType;
|
|
1711
|
+
createdInDataCollectionId: string;
|
|
1712
|
+
mappedColumns: EpiUploadMappedColumn[];
|
|
1713
|
+
onComplete: () => void;
|
|
1714
|
+
onError: (error: Error) => void;
|
|
1715
|
+
onProgress: (progress: number, message: string) => void;
|
|
1716
|
+
sampleIdColId: string;
|
|
1717
|
+
sequenceFilesDataTransfer: DataTransfer;
|
|
1718
|
+
sequenceMapping: EpiUploadSequenceMapping;
|
|
1719
|
+
sequencingProtocolId: string;
|
|
1720
|
+
signal: AbortSignal;
|
|
1721
|
+
validatedCases: CaseDbCaseUploadResult[];
|
|
1722
|
+
validatedCasesWithGeneratedId: CaseUploadResultWithGeneratedId[];
|
|
1723
|
+
}): Promise<void>;
|
|
1724
|
+
static getCasesForVerification(kwArgs: {
|
|
1725
|
+
caseTypeId: string;
|
|
1726
|
+
createdInDataCollectionId: string;
|
|
1727
|
+
mappedColumns: EpiUploadMappedColumn[];
|
|
1728
|
+
rawData: string[][];
|
|
1729
|
+
}): CaseDbCaseForUpload[];
|
|
1730
|
+
static getCaseTypeFromColumnLabels(cols: CaseDbCol[], columnLabels: string[]): CaseDbCaseType;
|
|
1731
|
+
static getColumnMappingFormFieldDefinitions(completeCaseType: CaseDbCompleteCaseType, rawDataHeaders: string[], _fileName: string): FormFieldDefinition<EpiUploadMappedColumnsFormFields>[];
|
|
1732
|
+
static getColumnMappingSchema(rawData: string[][], completeCaseType: CaseDbCompleteCaseType): ObjectSchema<{}, AnyObject, {}, ''>;
|
|
1733
|
+
static getCompleteCaseTypeColStats(completeCaseType: CaseDbCompleteCaseType): EpiUploadCompleteColStats;
|
|
1734
|
+
static getDefaultColumnMappingFormValues(rawDataHeaders: string[], mappedColumns: EpiUploadMappedColumn[], identifierIssuerOptions: OptionBase<string>[]): EpiUploadMappedColumnsFormFields;
|
|
1735
|
+
static getEpiUploadSequenceMapping(completeCaseType: CaseDbCompleteCaseType, validatedCases: CaseUploadResultWithGeneratedId[], sequenceFilesDataTransfer: DataTransfer): EpiUploadSequenceMapping;
|
|
1736
|
+
static getInitialMappedColumns(completeCaseType: CaseDbCompleteCaseType, rawData: string[][]): EpiUploadMappedColumn[];
|
|
1737
|
+
static getMappedColumnsFromFormData(data: EpiUploadMappedColumnsFormFields, rawData: string[][], colMap: Map<string, CaseDbCol>, completeCaseType: CaseDbCompleteCaseType): EpiUploadMappedColumn[];
|
|
1738
|
+
static getSampleIdColIds(completeCaseType: CaseDbCompleteCaseType): string[];
|
|
1739
|
+
static getSequenceMappingStats(sequenceMapping: EpiUploadSequenceMapping, sequenceFilesDataTransfer: DataTransfer): {
|
|
1740
|
+
mappedFiles: string[];
|
|
1741
|
+
mappedReadsFiles: string[];
|
|
1742
|
+
mappedSequenceFiles: string[];
|
|
1743
|
+
numberOfFilesToMap: number;
|
|
1744
|
+
unmappedFileNames: string[];
|
|
1745
|
+
unmappedReadsFiles: string[];
|
|
1746
|
+
unmappedSequenceFiles: string[];
|
|
1747
|
+
};
|
|
1748
|
+
static getSheetNameOptions(fileList: FileList): Promise<AutoCompleteOption<string>[]>;
|
|
1749
|
+
static hasReadsColumnMapped(mappedColumns: EpiUploadMappedColumn[], completeCaseTypeColStats: EpiUploadCompleteColStats): boolean;
|
|
1750
|
+
static hasSequenceColumnMapped(mappedColumns: EpiUploadMappedColumn[], completeCaseTypeColStats: EpiUploadCompleteColStats): boolean;
|
|
1751
|
+
static isCaseDateColumn(label: string): boolean;
|
|
1752
|
+
static isCaseIdColumn(label: string): boolean;
|
|
1753
|
+
static isCol(label: string): boolean;
|
|
1754
|
+
static isGenomeFile(fileName: string): boolean;
|
|
1755
|
+
static isReadsFile(fileName: string): boolean;
|
|
1756
|
+
static isSupportedGeneticFile(fileName: string): boolean;
|
|
1757
|
+
static isTextFile(fileName: string): boolean;
|
|
1758
|
+
static isXlsxFile(fileName: string): boolean;
|
|
1759
|
+
static matchColumnLabel(columnLabel: string, col: CaseDbCol): boolean;
|
|
1760
|
+
static readFileAsBase64(file: File): Promise<string>;
|
|
1761
|
+
static readRawData(fileList: FileList, sheet?: string): Promise<string[][]>;
|
|
1762
|
+
static reportFileUploadProgress(kwArgs: {
|
|
1763
|
+
endPercentage: number;
|
|
1764
|
+
fileSize: number;
|
|
1765
|
+
message: string;
|
|
1766
|
+
onProgress: (progress: number, message: string) => void;
|
|
1767
|
+
startPercentage: number;
|
|
1768
|
+
totalFileSizeToUpload: number;
|
|
1769
|
+
uploadedFileSize: number;
|
|
1770
|
+
}): void;
|
|
1771
|
+
static uploadFilesForCases(kwArgs: {
|
|
1772
|
+
assemblyProtocolId: string;
|
|
1773
|
+
caseBatchUploadResult: CaseDbCaseBatchUploadResult;
|
|
1774
|
+
caseTypeId: string;
|
|
1775
|
+
completeCaseType: CaseDbCompleteCaseType;
|
|
1776
|
+
createdInDataCollectionId: string;
|
|
1777
|
+
endPercentage: number;
|
|
1778
|
+
mappedColumns: EpiUploadMappedColumn[];
|
|
1779
|
+
onComplete: () => void;
|
|
1780
|
+
onError: (error: Error) => void;
|
|
1781
|
+
onProgress: (progress: number, message: string) => void;
|
|
1782
|
+
sampleIdColId: string;
|
|
1783
|
+
sequenceFilesDataTransfer: DataTransfer;
|
|
1784
|
+
sequenceMapping: EpiUploadSequenceMapping;
|
|
1785
|
+
sequencingProtocolId: string;
|
|
1786
|
+
signal: AbortSignal;
|
|
1787
|
+
startPercentage: number;
|
|
1788
|
+
validatedCases: CaseDbCaseUploadResult[];
|
|
1789
|
+
validatedCasesWithGeneratedId: CaseUploadResultWithGeneratedId[];
|
|
1790
|
+
}): Promise<void>;
|
|
1791
|
+
private static idToRegex;
|
|
1792
|
+
private static mapExcelCellToString;
|
|
1793
|
+
private static mapExcelSheetData;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
export declare const EpiUserRightsDialog: ComponentClass<EpiUserRightsDialogProps, WithDialogState<EpiUserRightsDialogOpenProps>>;
|
|
1797
|
+
|
|
1798
|
+
export declare interface EpiUserRightsDialogOpenProps {
|
|
1799
|
+
user: CaseDbUser;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
export declare interface EpiUserRightsDialogProps extends WithDialogRenderProps<EpiUserRightsDialogOpenProps> {
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
export declare type EpiUserRightsDialogRefMethods = WithDialogRefMethods<EpiUserRightsDialogProps, EpiUserRightsDialogOpenProps>;
|
|
1806
|
+
|
|
1807
|
+
export declare const EpiWarning: ({ warningMessage }: EpiWarningProps) => JSX.Element;
|
|
1808
|
+
|
|
1809
|
+
export declare type EpiWarningProps = {
|
|
1810
|
+
readonly warningMessage: string;
|
|
1811
|
+
};
|
|
1812
|
+
|
|
1813
|
+
export declare const EpiWidget: ({ children, expandDisabled, isLoading, primaryMenu, secondaryMenu, title, warningMessage, zone }: WidgetProps) => JSX.Element;
|
|
1814
|
+
|
|
1815
|
+
export declare const EpiWidgetMenu: ({ menu, }: EpiWidgetMenuProps) => JSX.Element;
|
|
1816
|
+
|
|
1817
|
+
export declare type EpiWidgetMenuProps = {
|
|
1818
|
+
readonly menu: MenuItemData[] | ReactNode;
|
|
1819
|
+
};
|
|
1820
|
+
|
|
1821
|
+
export declare const EpiWidgetUnavailable: ({ epiZone, widgetName }: EpiWidgetUnavailableProps) => JSX.Element;
|
|
1822
|
+
|
|
1823
|
+
export declare type EpiWidgetUnavailableProps = {
|
|
1824
|
+
readonly epiZone: EPI_ZONE;
|
|
1825
|
+
readonly widgetName: string;
|
|
1826
|
+
};
|
|
1827
|
+
|
|
1828
|
+
export declare const EtiologicalAgentsAdminPage: () => JSX.Element;
|
|
1829
|
+
|
|
1830
|
+
export declare const EtiologiesAdminPage: () => JSX.Element;
|
|
1831
|
+
|
|
1832
|
+
export declare const EventsDetailPage: () => JSX.Element;
|
|
1833
|
+
|
|
1834
|
+
export declare const EventsPage: () => JSX.Element;
|
|
1835
|
+
|
|
1836
|
+
export declare const FileSelector: ({ accept, initialDataTransfer: initialDataTransferProp, numFilesAllowed, onDataTransferChange, }: FileSelectorProps) => JSX.Element;
|
|
1837
|
+
|
|
1838
|
+
export declare type FileSelectorProps = {
|
|
1839
|
+
readonly accept: string;
|
|
1840
|
+
readonly initialDataTransfer?: DataTransfer;
|
|
1841
|
+
readonly numFilesAllowed?: number;
|
|
1842
|
+
readonly onDataTransferChange: (dataTransfer: DataTransfer) => void;
|
|
1843
|
+
};
|
|
1844
|
+
|
|
1845
|
+
export declare class FileUtil {
|
|
1846
|
+
static getFileCompressionFromFileName(fileName: string): CaseDbFileCompression;
|
|
1847
|
+
static getReadableFileSize(sizeInBytes: number): string;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
export declare enum FILTER_TYPE {
|
|
1851
|
+
DATE = "DATE",
|
|
1852
|
+
GEO = "GEO",
|
|
1853
|
+
MULTI_SELECT = "MULTI_SELECT",
|
|
1854
|
+
NUMBER = "NUMBER",
|
|
1855
|
+
STRING = "STRING"
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
export declare type FindSimilarCasesResult = {
|
|
1859
|
+
colId: string;
|
|
1860
|
+
distance: number;
|
|
1861
|
+
key: string;
|
|
1862
|
+
originalCaseIds: string[];
|
|
1863
|
+
similarCaseIds: string[];
|
|
1864
|
+
};
|
|
1865
|
+
|
|
1866
|
+
export declare interface GenEpixCaseDbUiTheme extends GenEpixUiTheme {
|
|
1867
|
+
'gen-epix-ui-casedb': {
|
|
1868
|
+
lineList: {
|
|
1869
|
+
font: string;
|
|
1870
|
+
fontVariationSettings?: string;
|
|
1871
|
+
};
|
|
1872
|
+
tree: {
|
|
1873
|
+
color: string;
|
|
1874
|
+
dimFn: (color: string) => string;
|
|
1875
|
+
font: string;
|
|
1876
|
+
fontVariationSettings?: string;
|
|
1877
|
+
supportLineColorLinked: string;
|
|
1878
|
+
supportLineColorUnlinked: string;
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
declare type GetOrganizationPolicyGroupsKwArgs = Pick<AssembleUserEffectiveRightsKwArgs, 'organizationAccessCasePolicies' | 'organizationShareCasePolicies'>;
|
|
1884
|
+
|
|
1885
|
+
export declare type Highlighting = {
|
|
1886
|
+
caseIds: string[];
|
|
1887
|
+
origin: EPI_ZONE;
|
|
1888
|
+
};
|
|
1889
|
+
|
|
1890
|
+
export declare const HomePage: () => JSX.Element;
|
|
1891
|
+
|
|
1892
|
+
export declare const HomePageTrends: {
|
|
1893
|
+
(props: Record<string, never>): JSX.Element;
|
|
1894
|
+
displayName: string;
|
|
1895
|
+
};
|
|
1896
|
+
|
|
1897
|
+
declare interface Item {
|
|
1898
|
+
date: Date;
|
|
1899
|
+
row: CaseDbCase;
|
|
1900
|
+
value: number;
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
export declare class NewickUtil {
|
|
1904
|
+
static getSortedNames(node: TreeNode): string[];
|
|
1905
|
+
static parse(newick: string): TreeNode;
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
export declare const OrganizationAccessCasePoliciesAdminPage: () => JSX.Element;
|
|
1909
|
+
|
|
1910
|
+
export declare type OrganizationPolicyGroup = {
|
|
1911
|
+
access_case_policies: CaseDbOrganizationAccessCasePolicy[];
|
|
1912
|
+
data_collection_id: string;
|
|
1913
|
+
organization_id: string;
|
|
1914
|
+
share_case_policies: CaseDbOrganizationShareCasePolicy[];
|
|
1915
|
+
};
|
|
1916
|
+
|
|
1917
|
+
export declare const OrganizationShareCasePoliciesAdminPage: () => JSX.Element;
|
|
1918
|
+
|
|
1919
|
+
export declare const PhylogeneticTreeComponent: ({ ariaLabel, externalScrollSubject, externalVisibleRangeSubject, highlightingSubject, initialViewState, itemHeight, leafOrder, onCanvasChange, onLinkStateChange, onPathClick, onViewStateChange, ref, shouldShowDistances, shouldShowSupportLinesWhenUnlinked, stratification, tree, }: PhylogeneticTreeComponentProps) => JSX.Element;
|
|
1920
|
+
|
|
1921
|
+
export declare type PhylogeneticTreeComponentPathClickEvent = {
|
|
1922
|
+
mouseEvent: MouseEvent;
|
|
1923
|
+
pathProperties: TreePathProperties;
|
|
1924
|
+
};
|
|
1925
|
+
|
|
1926
|
+
export declare type PhylogeneticTreeComponentProps = {
|
|
1927
|
+
readonly ariaLabel: string;
|
|
1928
|
+
readonly externalScrollSubject?: Subject<EpiLinkedScrollSubjectValue>;
|
|
1929
|
+
readonly externalVisibleRangeSubject?: Subject<EpiLineListRangeSubjectValue>;
|
|
1930
|
+
readonly highlightingSubject?: Subject<Highlighting>;
|
|
1931
|
+
readonly initialViewState?: Partial<PhylogeneticTreeComponentViewState>;
|
|
1932
|
+
readonly itemHeight: number;
|
|
1933
|
+
readonly leafOrder: string[];
|
|
1934
|
+
readonly onCanvasChange?: (canvas?: HTMLCanvasElement) => void;
|
|
1935
|
+
readonly onLinkStateChange?: (isLinked: boolean) => void;
|
|
1936
|
+
readonly onPathClick?: (event: PhylogeneticTreeComponentPathClickEvent) => void;
|
|
1937
|
+
readonly onViewStateChange?: (viewState: PhylogeneticTreeComponentViewState) => void;
|
|
1938
|
+
readonly ref?: Ref<PhylogeneticTreeComponentRef>;
|
|
1939
|
+
readonly shouldShowDistances: boolean;
|
|
1940
|
+
readonly shouldShowSupportLinesWhenUnlinked: boolean;
|
|
1941
|
+
readonly stratification?: Stratification;
|
|
1942
|
+
readonly tree?: TreeNode;
|
|
1943
|
+
};
|
|
1944
|
+
|
|
1945
|
+
export declare interface PhylogeneticTreeComponentRef {
|
|
1946
|
+
link: (verticalPosition?: number) => void;
|
|
1947
|
+
syncExternalScrollToVisibleTree: () => void;
|
|
1948
|
+
unlink: (viewState: {
|
|
1949
|
+
positionX: number;
|
|
1950
|
+
positionY: number;
|
|
1951
|
+
zoomLevel: number;
|
|
1952
|
+
}) => void;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
export declare type PhylogeneticTreeComponentViewState = {
|
|
1956
|
+
horizontalScrollPosition: number;
|
|
1957
|
+
verticalScrollPosition: number;
|
|
1958
|
+
zoomLevel: number;
|
|
1959
|
+
};
|
|
1960
|
+
|
|
1961
|
+
export declare const RefColsAdminPage: () => JSX.Element;
|
|
1962
|
+
|
|
1963
|
+
export declare const RefDimsAdminPage: () => JSX.Element;
|
|
1964
|
+
|
|
1965
|
+
export declare const RegionRelationsAdminPage: () => JSX.Element;
|
|
1966
|
+
|
|
1967
|
+
export declare const regionRelationTypePresentationValues: Partial<Record<CaseDbRegionRelationType, string>>;
|
|
1968
|
+
|
|
1969
|
+
export declare const RegionsAdminPage: () => JSX.Element;
|
|
1970
|
+
|
|
1971
|
+
export declare const RegionSetsAdminPage: () => JSX.Element;
|
|
1972
|
+
|
|
1973
|
+
export declare const RegionSetShapesAdminPage: () => JSX.Element;
|
|
1974
|
+
|
|
1975
|
+
export declare type RegionStatistics = {
|
|
1976
|
+
maxNumCases: number;
|
|
1977
|
+
minNumCases: number;
|
|
1978
|
+
numCases: number;
|
|
1979
|
+
statisticsPerRegion: Record<string, {
|
|
1980
|
+
numCases: number;
|
|
1981
|
+
region: CaseDbRegion;
|
|
1982
|
+
rows: CaseDbCase[];
|
|
1983
|
+
}>;
|
|
1984
|
+
};
|
|
1985
|
+
|
|
1986
|
+
declare type RoutePermission = CaseDbApiPermission | CommonDbApiPermission;
|
|
1987
|
+
|
|
1988
|
+
declare type RoutePermission_2 = CaseDbApiPermission | CommonDbApiPermission;
|
|
1989
|
+
|
|
1990
|
+
export declare const SELECTION_FILTER_GROUP = "selection";
|
|
1991
|
+
|
|
1992
|
+
export declare const setupCaseDb: () => void;
|
|
1993
|
+
|
|
1994
|
+
export declare const STEP_ORDER: EPI_UPLOAD_STEP[];
|
|
1995
|
+
|
|
1996
|
+
declare interface StratifiableColumn {
|
|
1997
|
+
col: CaseDbCol;
|
|
1998
|
+
enabled: boolean;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
export declare type Stratification = {
|
|
2002
|
+
caseIdColors: {
|
|
2003
|
+
[key: string]: string;
|
|
2004
|
+
};
|
|
2005
|
+
col?: CaseDbCol;
|
|
2006
|
+
legendaItems?: StratificationLegendaItem[];
|
|
2007
|
+
legendaItemsByColor?: {
|
|
2008
|
+
[key: string]: StratificationLegendaItem;
|
|
2009
|
+
};
|
|
2010
|
+
legendaItemsByValue?: {
|
|
2011
|
+
[key: string]: StratificationLegendaItem;
|
|
2012
|
+
};
|
|
2013
|
+
mode: STRATIFICATION_MODE;
|
|
2014
|
+
};
|
|
2015
|
+
|
|
2016
|
+
export declare enum STRATIFICATION_MODE {
|
|
2017
|
+
FIELD = "FIELD",
|
|
2018
|
+
SELECTION = "SELECTION"
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
export declare enum STRATIFICATION_SELECTED {
|
|
2022
|
+
SELECTED = "SELECTED",
|
|
2023
|
+
UNSELECTED = "UNSELECTED"
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
export declare type StratificationLegendaItem = {
|
|
2027
|
+
caseIds: string[];
|
|
2028
|
+
color: string;
|
|
2029
|
+
columnType?: CaseDbColType;
|
|
2030
|
+
rowValue: CaseTypeRowValue;
|
|
2031
|
+
};
|
|
2032
|
+
|
|
2033
|
+
declare type TickerMarkScale = [number, number, number];
|
|
2034
|
+
|
|
2035
|
+
export declare const TREE_FILTER_GROUP = "tree";
|
|
2036
|
+
|
|
2037
|
+
export declare const treeAlgorithmCodeValues: Record<CaseDbTreeAlgorithmType, string>;
|
|
2038
|
+
|
|
2039
|
+
export declare type TreeAssembly = {
|
|
2040
|
+
ancestorNodes: Array<{
|
|
2041
|
+
nodeNames: string[];
|
|
2042
|
+
shape: Path2D;
|
|
2043
|
+
}>;
|
|
2044
|
+
distanceTexts: Array<{
|
|
2045
|
+
nodeNames: string[];
|
|
2046
|
+
text: string;
|
|
2047
|
+
x: number;
|
|
2048
|
+
y: number;
|
|
2049
|
+
}>;
|
|
2050
|
+
horizontalAncestorTreeLines: Array<{
|
|
2051
|
+
nodeNames: string[];
|
|
2052
|
+
shape: Path2D;
|
|
2053
|
+
}>;
|
|
2054
|
+
horizontalLinePathPropertiesMap: TreeAssemblyPathPropertiesMap;
|
|
2055
|
+
leafNodes: Array<{
|
|
2056
|
+
nodeName: string;
|
|
2057
|
+
shape: Path2D;
|
|
2058
|
+
}>;
|
|
2059
|
+
leafTreeLines: Array<{
|
|
2060
|
+
nodeName: string;
|
|
2061
|
+
shape: Path2D;
|
|
2062
|
+
}>;
|
|
2063
|
+
nodePathPropertiesMap: TreeAssemblyPathPropertiesMap;
|
|
2064
|
+
supportLines: Array<{
|
|
2065
|
+
fromX: number;
|
|
2066
|
+
fromY: number;
|
|
2067
|
+
nodeName: string;
|
|
2068
|
+
toX: number;
|
|
2069
|
+
toY: number;
|
|
2070
|
+
}>;
|
|
2071
|
+
verticalAncestorTreeLines: Array<{
|
|
2072
|
+
nodeNames: string[];
|
|
2073
|
+
shape: Path2D;
|
|
2074
|
+
}>;
|
|
2075
|
+
verticalLinePathPropertiesMap: TreeAssemblyPathPropertiesMap;
|
|
2076
|
+
};
|
|
2077
|
+
|
|
2078
|
+
declare type TreeAssemblyPathPropertiesMap = Map<Path2D, TreePathProperties>;
|
|
2079
|
+
|
|
2080
|
+
export declare type TreeConfiguration = {
|
|
2081
|
+
col: CaseDbCol;
|
|
2082
|
+
computedId: string;
|
|
2083
|
+
geneticDistanceProtocol: CaseDbGeneticDistanceProtocol;
|
|
2084
|
+
refCol: CaseDbRefCol;
|
|
2085
|
+
treeAlgorithm: CaseDbTreeAlgorithm;
|
|
2086
|
+
};
|
|
2087
|
+
|
|
2088
|
+
export declare type TreeFocus = {
|
|
2089
|
+
leafs: string[];
|
|
2090
|
+
root: string;
|
|
2091
|
+
};
|
|
2092
|
+
|
|
2093
|
+
export declare type TreeNode = {
|
|
2094
|
+
address?: string;
|
|
2095
|
+
branchLength?: default_2;
|
|
2096
|
+
children?: TreeNode[];
|
|
2097
|
+
maxBranchLength?: default_2;
|
|
2098
|
+
name?: string;
|
|
2099
|
+
size?: number;
|
|
2100
|
+
subTreeLeaveNames?: string[];
|
|
2101
|
+
subTreeNames?: string[];
|
|
2102
|
+
};
|
|
2103
|
+
|
|
2104
|
+
export declare type TreePathProperties = {
|
|
2105
|
+
subTreeLeaveNames: string[];
|
|
2106
|
+
treeNode?: TreeNode;
|
|
2107
|
+
};
|
|
2108
|
+
|
|
2109
|
+
export declare const TrendsPage: () => JSX.Element;
|
|
2110
|
+
|
|
2111
|
+
export declare class UploadError extends Error {
|
|
2112
|
+
caseBatchUploadResult: CaseDbCaseBatchUploadResult;
|
|
2113
|
+
constructor(message: string, caseBatchUploadResult: CaseDbCaseBatchUploadResult);
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
export declare const UploadPage: () => JSX.Element;
|
|
2117
|
+
|
|
2118
|
+
export declare const useAssemblyProtocolMapQuery: () => UseMap<CaseDbProtocol>;
|
|
2119
|
+
|
|
2120
|
+
export declare const useAssemblyProtocolOptionsQuery: () => UseOptions<string>;
|
|
2121
|
+
|
|
2122
|
+
export declare const useAssemblyProtocolsQuery: () => UseQueryResult<CaseDbProtocol[]>;
|
|
2123
|
+
|
|
2124
|
+
export declare const useCaseAbacContext: () => CaseAbacContext;
|
|
2125
|
+
|
|
2126
|
+
export declare const useCaseRightsQuery: (caseIds: string[], caseTypeId: string) => UseQueryResult<CaseDbCaseRights[]>;
|
|
2127
|
+
|
|
2128
|
+
export declare const useCaseSetCategoriesQuery: () => UseQueryResult<CaseDbCaseSetCategory[]>;
|
|
2129
|
+
|
|
2130
|
+
export declare const useCaseSetCategoryMapQuery: () => UseMap<CaseDbCaseSetCategory>;
|
|
2131
|
+
|
|
2132
|
+
export declare const useCaseSetCategoryOptionsQuery: () => UseOptions<string>;
|
|
2133
|
+
|
|
2134
|
+
export declare const useCaseSetOptionsQuery: () => UseOptions<string>;
|
|
2135
|
+
|
|
2136
|
+
export declare const useCaseSetRightsQuery: (caseSetIds: string[]) => UseQueryResult<CaseDbCaseSetRights[]>;
|
|
2137
|
+
|
|
2138
|
+
export declare const useCaseSetsMapQuery: () => UseMap<CaseDbCaseSet>;
|
|
2139
|
+
|
|
2140
|
+
export declare const useCaseSetsQuery: () => UseQueryResult<CaseDbCaseSet[]>;
|
|
2141
|
+
|
|
2142
|
+
export declare const useCaseSetStatsMapQuery: (caseSetIds: string[]) => UseMap<CaseDbCaseStats>;
|
|
2143
|
+
|
|
2144
|
+
export declare const useCaseSetStatsQuery: (caseSetIds: string[]) => UseQueryResult<CaseDbCaseStats[]>;
|
|
2145
|
+
|
|
2146
|
+
export declare const useCaseSetStatusesQuery: () => UseQueryResult<CaseDbCaseSetStatus[]>;
|
|
2147
|
+
|
|
2148
|
+
export declare const useCaseSetStatusMapQuery: () => UseMap<CaseDbCaseSetStatus>;
|
|
2149
|
+
|
|
2150
|
+
export declare const useCaseSetStatusOptionsQuery: () => UseOptions<string>;
|
|
2151
|
+
|
|
2152
|
+
export declare const useCaseTypeAbacContext: () => CaseTypeAbacContext;
|
|
2153
|
+
|
|
2154
|
+
export declare const useCaseTypeMapQuery: () => UseMap<CaseDbCaseType>;
|
|
2155
|
+
|
|
2156
|
+
export declare const useCaseTypeOptionsQuery: () => UseOptions<string>;
|
|
2157
|
+
|
|
2158
|
+
export declare const useCaseTypeSetCategoriesQuery: () => UseQueryResult<CaseDbCaseTypeSetCategory[]>;
|
|
2159
|
+
|
|
2160
|
+
export declare const useCaseTypeSetCategoryMapQuery: () => UseMap<CaseDbCaseTypeSetCategory>;
|
|
2161
|
+
|
|
2162
|
+
export declare const useCaseTypeSetCategoryOptionsQuery: () => UseOptions<string>;
|
|
2163
|
+
|
|
2164
|
+
export declare const useCaseTypeSetCategoryPurposeOptionsQuery: () => UseOptions<string>;
|
|
2165
|
+
|
|
2166
|
+
export declare const useCaseTypeSetMembersQuery: () => UseQueryResult<CaseDbCaseTypeSetMember[]>;
|
|
2167
|
+
|
|
2168
|
+
export declare const useCaseTypeSetNameFactory: () => UseNameFactory<CaseDbCaseTypeSet>;
|
|
2169
|
+
|
|
2170
|
+
export declare const useCaseTypeSetOptionsQuery: () => UseOptions<string>;
|
|
2171
|
+
|
|
2172
|
+
export declare const useCaseTypeSetsMapQuery: () => UseMap<CaseDbCaseTypeSet>;
|
|
2173
|
+
|
|
2174
|
+
export declare const useCaseTypeSetsQuery: () => UseQueryResult<CaseDbCaseTypeSet[]>;
|
|
2175
|
+
|
|
2176
|
+
export declare const useCaseTypesQuery: () => UseQueryResult<CaseDbCaseType[]>;
|
|
2177
|
+
|
|
2178
|
+
export declare const useCaseTypeStatsQuery: (options?: CaseDbRetrieveCaseTypeStatsRequestBody) => UseQueryResult<CaseDbCaseStats[]>;
|
|
2179
|
+
|
|
2180
|
+
export declare const useColMapQuery: () => UseMap<CaseDbCol>;
|
|
2181
|
+
|
|
2182
|
+
export declare const useColNameFactory: () => UseNameFactory<CaseDbCol>;
|
|
2183
|
+
|
|
2184
|
+
export declare const useColOptionsQuery: () => UseOptions<string>;
|
|
2185
|
+
|
|
2186
|
+
export declare const useColSetMapQuery: () => UseMap<CaseDbColSet>;
|
|
2187
|
+
|
|
2188
|
+
export declare const useColSetMembersQuery: () => UseQueryResult<CaseDbColSetMember[]>;
|
|
2189
|
+
|
|
2190
|
+
export declare const useColSetOptionsQuery: () => UseOptions<string>;
|
|
2191
|
+
|
|
2192
|
+
export declare const useColSetsQuery: () => UseQueryResult<CaseDbColSet[]>;
|
|
2193
|
+
|
|
2194
|
+
export declare const useColsQuery: () => UseQueryResult<CaseDbCol[]>;
|
|
2195
|
+
|
|
2196
|
+
export declare const useColTypeOptionsQuery: () => UseOptions<string>;
|
|
2197
|
+
|
|
2198
|
+
export declare const useConceptMapQuery: () => UseMap<CaseDbConcept>;
|
|
2199
|
+
|
|
2200
|
+
export declare const useConceptNameFactory: () => UseNameFactory<CaseDbConcept>;
|
|
2201
|
+
|
|
2202
|
+
export declare const useConceptOptionsQuery: () => UseOptions<string>;
|
|
2203
|
+
|
|
2204
|
+
export declare const useConceptQuery: () => UseQueryResult<CaseDbConcept[]>;
|
|
2205
|
+
|
|
2206
|
+
export declare const useConceptRelationTypeOptionsQuery: () => UseOptions<string>;
|
|
2207
|
+
|
|
2208
|
+
export declare const useConceptSetMapQuery: () => UseMap<CaseDbConceptSet>;
|
|
2209
|
+
|
|
2210
|
+
export declare const useConceptSetOptionsQuery: () => UseOptions<string>;
|
|
2211
|
+
|
|
2212
|
+
export declare const useConceptSetsQuery: () => UseQueryResult<CaseDbConceptSet[]>;
|
|
2213
|
+
|
|
2214
|
+
export declare const useConceptSetTypeOptionsQuery: () => UseOptions<string>;
|
|
2215
|
+
|
|
2216
|
+
export declare const useDataCollectionOptionsQuery: (dataCollectionIds?: string[]) => UseOptions<string>;
|
|
2217
|
+
|
|
2218
|
+
export declare const useDataCollectionSetMembersQuery: () => UseQueryResult<CaseDbDataCollectionSetMember[]>;
|
|
2219
|
+
|
|
2220
|
+
export declare const useDataCollectionsMapQuery: (dataCollectionIds?: string[]) => UseMap<CaseDbDataCollection>;
|
|
2221
|
+
|
|
2222
|
+
export declare const useDataCollectionsQuery: (dataCollectionIds?: string[]) => UseQueryResult<CaseDbDataCollection[]>;
|
|
2223
|
+
|
|
2224
|
+
export declare const useDimMapQuery: () => UseMap<CaseDbDim>;
|
|
2225
|
+
|
|
2226
|
+
export declare const useDimNameFactory: () => UseNameFactory<CaseDbDim>;
|
|
2227
|
+
|
|
2228
|
+
export declare const useDimOptionsQuery: () => UseOptions<string>;
|
|
2229
|
+
|
|
2230
|
+
export declare const useDimsQuery: () => UseQueryResult<CaseDbDim[]>;
|
|
2231
|
+
|
|
2232
|
+
export declare const useDimTypeOptionsQuery: () => UseOptions<string>;
|
|
2233
|
+
|
|
2234
|
+
export declare const useDiseaseOptionsQuery: () => UseOptions<string>;
|
|
2235
|
+
|
|
2236
|
+
export declare const useDiseasesMapQuery: () => UseMap<CaseDbDisease>;
|
|
2237
|
+
|
|
2238
|
+
export declare const useDiseasesQuery: () => UseQueryResult<CaseDbDisease[]>;
|
|
2239
|
+
|
|
2240
|
+
export declare const useEtiologicalAgentOptionsQuery: () => UseOptions<string>;
|
|
2241
|
+
|
|
2242
|
+
export declare const useEtiologicalAgentsMapQuery: () => UseMap<CaseDbEtiologicalAgent>;
|
|
2243
|
+
|
|
2244
|
+
export declare const useEtiologicalAgentsQuery: () => UseQueryResult<CaseDbEtiologicalAgent[]>;
|
|
2245
|
+
|
|
2246
|
+
export declare const useGeneticDistanceProtocolOptionsQuery: () => UseOptions<string>;
|
|
2247
|
+
|
|
2248
|
+
export declare const useGeneticDistanceProtocolsQuery: () => UseQueryResult<CaseDbGeneticDistanceProtocol[]>;
|
|
2249
|
+
|
|
2250
|
+
export declare const useOrganizationAccessCasePoliciesQuery: (select?: (data: CaseDbOrganizationAccessCasePolicy[]) => CaseDbOrganizationAccessCasePolicy[]) => UseQueryResult<CaseDbOrganizationAccessCasePolicy[]>;
|
|
2251
|
+
|
|
2252
|
+
export declare const useOrganizationCasePolicyNameFactory: () => UseNameFactory<CaseDbOrganizationAccessCasePolicy | CaseDbOrganizationShareCasePolicy>;
|
|
2253
|
+
|
|
2254
|
+
export declare const useOrganizationShareCasePoliciesQuery: (select?: (data: CaseDbOrganizationShareCasePolicy[]) => CaseDbOrganizationShareCasePolicy[]) => UseQueryResult<CaseDbOrganizationShareCasePolicy[]>;
|
|
2255
|
+
|
|
2256
|
+
export declare const UserAccessCasePoliciesAdminPage: () => JSX.Element;
|
|
2257
|
+
|
|
2258
|
+
export declare const useRefColMapQuery: () => UseMap<CaseDbRefCol>;
|
|
2259
|
+
|
|
2260
|
+
export declare const useRefColOptionsQuery: () => UseOptions<string>;
|
|
2261
|
+
|
|
2262
|
+
export declare const useRefColsQuery: () => UseQueryResult<CaseDbRefCol[]>;
|
|
2263
|
+
|
|
2264
|
+
export declare const useRefColsValidationRulesQuery: () => UseQueryResult<CaseDbRefColValidationRulesResponseBody>;
|
|
2265
|
+
|
|
2266
|
+
export declare const useRefDimMapQuery: () => UseMap<CaseDbRefDim>;
|
|
2267
|
+
|
|
2268
|
+
export declare const useRefDimOptionsQuery: () => UseOptions<string>;
|
|
2269
|
+
|
|
2270
|
+
export declare const useRefDimsQuery: () => UseQueryResult<CaseDbRefDim[]>;
|
|
2271
|
+
|
|
2272
|
+
export declare type UserEffectiveRight = {
|
|
2273
|
+
readonly categorized_read_col_ids: string[];
|
|
2274
|
+
readonly categorized_write_col_ids: string[];
|
|
2275
|
+
readonly effective_share_case_rights: Array<Pick<CaseDbUserShareCasePolicy, 'add_case_set' | 'add_case' | 'from_data_collection_id' | 'remove_case_set' | 'remove_case'> & UserEffectiveRightCaseTypes>;
|
|
2276
|
+
readonly read_col_set_ids: string[];
|
|
2277
|
+
readonly uncategorized_read_col_ids: string[];
|
|
2278
|
+
readonly uncategorized_write_col_ids: string[];
|
|
2279
|
+
readonly write_col_set_ids: string[];
|
|
2280
|
+
} & Omit<CaseDbOrganizationAccessCasePolicy & CaseDbUserAccessCasePolicy, 'case_type_set_id' | 'id' | 'is_active' | 'user_id'> & UserEffectiveRightCaseTypes;
|
|
2281
|
+
|
|
2282
|
+
export declare type UserEffectiveRightCaseTypes = {
|
|
2283
|
+
readonly case_type_set_ids: string[];
|
|
2284
|
+
readonly categorized_case_type_ids: string[];
|
|
2285
|
+
readonly uncategorized_case_type_ids: string[];
|
|
2286
|
+
};
|
|
2287
|
+
|
|
2288
|
+
export declare const UserEffectiveRightsAdminPage: () => JSX.Element;
|
|
2289
|
+
|
|
2290
|
+
export declare type UserEffectiveRightsQueryResult = {
|
|
2291
|
+
caseTypeSetMembers: CaseDbCaseTypeSetMember[];
|
|
2292
|
+
colSetMembers: CaseDbColSetMember[];
|
|
2293
|
+
colSetsMap: UseMap<CaseDbColSet>['map'];
|
|
2294
|
+
effectiveRights: UserEffectiveRight[];
|
|
2295
|
+
organizationAccessCasePolicies: CaseDbOrganizationAccessCasePolicy[];
|
|
2296
|
+
organizationShareCasePolicies: CaseDbOrganizationShareCasePolicy[];
|
|
2297
|
+
user: CaseDbUser;
|
|
2298
|
+
userAccessCasePolicies: CaseDbUserAccessCasePolicy[];
|
|
2299
|
+
userShareCasePolicies: CaseDbUserShareCasePolicy[];
|
|
2300
|
+
};
|
|
2301
|
+
|
|
2302
|
+
export declare const UserEffectiveRightsTesterAdminPage: () => JSX.Element;
|
|
2303
|
+
|
|
2304
|
+
export declare const useRegionMapQuery: () => UseMap<CaseDbRegion>;
|
|
2305
|
+
|
|
2306
|
+
export declare const useRegionNameFactory: () => UseNameFactory<CaseDbRegion>;
|
|
2307
|
+
|
|
2308
|
+
export declare const useRegionOptionsQuery: () => UseOptions<string>;
|
|
2309
|
+
|
|
2310
|
+
export declare const useRegionQuery: () => UseQueryResult<CaseDbRegion[]>;
|
|
2311
|
+
|
|
2312
|
+
export declare const useRegionRelationTypeOptionsQuery: () => UseOptions<string>;
|
|
2313
|
+
|
|
2314
|
+
export declare const useRegionSetOptionsQuery: () => UseOptions<string>;
|
|
2315
|
+
|
|
2316
|
+
export declare const useRegionSetsMapQuery: () => UseMap<CaseDbRegionSet>;
|
|
2317
|
+
|
|
2318
|
+
export declare const useRegionSetsQuery: () => UseQueryResult<CaseDbRegionSet[]>;
|
|
2319
|
+
|
|
2320
|
+
export declare type UserProfileStore = UserProfileStoreActions & UserProfileStoreState;
|
|
2321
|
+
|
|
2322
|
+
export declare const userProfileStore: Omit<StoreApi<UserProfileStore>, "persist" | "setState"> & {
|
|
2323
|
+
setState(partial: UserProfileStore | Partial<UserProfileStore> | ((state: UserProfileStore) => UserProfileStore | Partial<UserProfileStore>), replace?: false): unknown;
|
|
2324
|
+
setState(state: UserProfileStore | ((state: UserProfileStore) => UserProfileStore), replace: true): unknown;
|
|
2325
|
+
persist: {
|
|
2326
|
+
setOptions: (options: Partial<PersistOptions<UserProfileStore, unknown, unknown>>) => void;
|
|
2327
|
+
clearStorage: () => void;
|
|
2328
|
+
rehydrate: () => Promise<void> | void;
|
|
2329
|
+
hasHydrated: () => boolean;
|
|
2330
|
+
onHydrate: (fn: (state: UserProfileStore) => void) => () => void;
|
|
2331
|
+
onFinishHydration: (fn: (state: UserProfileStore) => void) => () => void;
|
|
2332
|
+
getOptions: () => Partial<PersistOptions<UserProfileStore, unknown, unknown>>;
|
|
2333
|
+
};
|
|
2334
|
+
};
|
|
2335
|
+
|
|
2336
|
+
export declare interface UserProfileStoreActions {
|
|
2337
|
+
resetEpiDashboardGeneralSettings: () => void;
|
|
2338
|
+
resetEpiDashboardLayout: () => void;
|
|
2339
|
+
resetEpiDashboardTreeSettings: () => void;
|
|
2340
|
+
setEpiDashboardGeneralSettings: (settings: EpiDashboardGeneralSettings) => void;
|
|
2341
|
+
setEpiDashboardLayoutUserConfig: (config: EpiDashboardLayoutUserConfig) => void;
|
|
2342
|
+
setEpiDashboardPanelConfiguration: (id: string, configuration: string) => void;
|
|
2343
|
+
setEpiDashboardTreeSettings: (settings: EpiDashboardTreeSettings) => void;
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
export declare interface UserProfileStoreState {
|
|
2347
|
+
epiDashboardGeneralSettings: EpiDashboardGeneralSettings;
|
|
2348
|
+
epiDashboardLayoutUserConfig: EpiDashboardLayoutUserConfig;
|
|
2349
|
+
epiDashboardPanels: {
|
|
2350
|
+
[key: string]: string;
|
|
2351
|
+
};
|
|
2352
|
+
epiDashboardTreeSettings: EpiDashboardTreeSettings;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
export declare const UsersEffectiveRightsDetailsDialog: ComponentClass<UsersEffectiveRightsDetailsDialogProps, WithDialogState<UsersEffectiveRightsDetailsDialogOpenProps>>;
|
|
2356
|
+
|
|
2357
|
+
export declare interface UsersEffectiveRightsDetailsDialogOpenProps {
|
|
2358
|
+
type: 'caseTypeSets' | 'readColSets' | 'writeColSets';
|
|
2359
|
+
user: CaseDbUser;
|
|
2360
|
+
userEffectiveRight: UserEffectiveRight;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
export declare interface UsersEffectiveRightsDetailsDialogProps extends WithDialogRenderProps<UsersEffectiveRightsDetailsDialogOpenProps> {
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
export declare type UsersEffectiveRightsDetailsDialogRefMethods = WithDialogRefMethods<UsersEffectiveRightsDetailsDialogProps, UsersEffectiveRightsDetailsDialogOpenProps>;
|
|
2367
|
+
|
|
2368
|
+
export declare type UsersEffectiveRightsDetailsType = 'caseTypeSets' | 'readColSets' | 'writeColSets';
|
|
2369
|
+
|
|
2370
|
+
export declare const UserShareCasePoliciesAdminPage: () => JSX.Element;
|
|
2371
|
+
|
|
2372
|
+
export declare const useSequencingProtocolMapQuery: () => UseMap<CaseDbProtocol>;
|
|
2373
|
+
|
|
2374
|
+
export declare const useSequencingProtocolOptionsQuery: () => UseOptions<string>;
|
|
2375
|
+
|
|
2376
|
+
export declare const useSequencingProtocolsQuery: () => UseQueryResult<CaseDbProtocol[]>;
|
|
2377
|
+
|
|
2378
|
+
export declare const useTreeAlgorithmCodeOptionsQuery: () => UseOptions<string>;
|
|
2379
|
+
|
|
2380
|
+
export declare const useUserAccessCasePoliciesQuery: (select?: (data: CaseDbUserAccessCasePolicy[]) => CaseDbUserAccessCasePolicy[]) => UseQueryResult<CaseDbUserAccessCasePolicy[]>;
|
|
2381
|
+
|
|
2382
|
+
export declare const useUserCasePolicyNameFactory: () => UseNameFactory<CaseDbUserAccessCasePolicy | CaseDbUserShareCasePolicy>;
|
|
2383
|
+
|
|
2384
|
+
export declare const useUserEffectiveRightsQuery: (userId: string) => Partial<UseQueryResult<UserEffectiveRightsQueryResult>>;
|
|
2385
|
+
|
|
2386
|
+
export declare const useUserShareCasePoliciesQuery: (select?: (data: CaseDbUserShareCasePolicy[]) => CaseDbUserShareCasePolicy[]) => UseQueryResult<CaseDbUserShareCasePolicy[]>;
|
|
2387
|
+
|
|
2388
|
+
declare interface WidgetData {
|
|
2389
|
+
isUnavailable: boolean;
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
export declare const WidgetHeaderIconButton: ({ label, ...props }: WidgetHeaderIconButtonProps) => JSX.Element;
|
|
2393
|
+
|
|
2394
|
+
export declare interface WidgetHeaderIconButtonProps extends IconButtonProps {
|
|
2395
|
+
readonly label: string;
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
export declare type WidgetProps = PropsWithChildren<{
|
|
2399
|
+
readonly expandDisabled?: boolean;
|
|
2400
|
+
readonly isLoading?: boolean;
|
|
2401
|
+
readonly primaryMenu?: MenuItemData[] | ReactNode;
|
|
2402
|
+
readonly secondaryMenu?: MenuItemData[] | ReactNode;
|
|
2403
|
+
readonly title: MenuItemData | ReactNode | string;
|
|
2404
|
+
readonly warningMessage?: string;
|
|
2405
|
+
readonly zone: EPI_ZONE;
|
|
2406
|
+
}>;
|
|
2407
|
+
|
|
2408
|
+
export declare const withEpiDashboardStore: <P extends WithEpiDashboardStoreProps>(WrappedComponent: ComponentType<P>) => ComponentType<P>;
|
|
2409
|
+
|
|
2410
|
+
export declare type WithEpiDashboardStoreProps = EpiDashboardStoreLoaderProps;
|
|
2411
|
+
|
|
1
2412
|
export { }
|