@jbrowse/core 2.6.3 → 2.7.0
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/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +1 -3
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +11 -6
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +0 -9
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +2 -11
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +5 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/ProteinSequence.d.ts +1 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +1 -1
- package/BaseFeatureWidget/util.js +0 -4
- package/PluginManager.d.ts +9 -17
- package/ReExports/modules.d.ts +5 -5
- package/ReExports/modules.js +24 -18
- package/TextSearch/TextSearchManager.d.ts +1 -1
- package/assemblyManager/assembly.d.ts +2 -0
- package/assemblyManager/assembly.js +9 -4
- package/assemblyManager/assemblyManager.d.ts +123 -111
- package/assemblyManager/assemblyManager.js +1 -1
- package/configuration/configurationSchema.js +2 -2
- package/configuration/configurationSlot.js +3 -6
- package/data_adapters/BaseAdapter/index.d.ts +1 -3
- package/data_adapters/dataAdapterCache.js +2 -2
- package/package.json +5 -6
- package/pluggableElementTypes/AdapterType.d.ts +2 -2
- package/pluggableElementTypes/models/BaseTrackModel.d.ts +5 -5
- package/pluggableElementTypes/models/BaseTrackModel.js +1 -16
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +2 -2
- package/pluggableElementTypes/models/InternetAccountModel.js +2 -2
- package/pluggableElementTypes/renderers/BoxRendererType.d.ts +1 -3
- package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +3 -0
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +7 -3
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +45 -2
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +2 -2
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +49 -12
- package/pluggableElementTypes/renderers/util/serializableFilterChain.js +2 -2
- package/rpc/RpcManager.d.ts +2 -2
- package/rpc/WebWorkerRpcDriver.js +3 -3
- package/rpc/methods/CoreGetFeatureDensityStats.js +0 -1
- package/rpc/methods/CoreGetFeatureDetails.js +0 -1
- package/rpc/methods/CoreGetFeatures.js +0 -1
- package/rpc/methods/CoreRender.js +0 -1
- package/rpc/remoteAbortSignals.d.ts +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/ColorPicker.js +3 -6
- package/ui/Dialog.d.ts +2 -2
- package/ui/Dialog.js +2 -1
- package/ui/DropDownMenu.d.ts +3 -4
- package/ui/DropDownMenu.js +8 -12
- package/ui/EditableTypography.js +7 -5
- package/ui/FactoryResetDialog.d.ts +3 -4
- package/ui/FactoryResetDialog.js +3 -2
- package/ui/FileSelector/FileSelector.d.ts +2 -2
- package/ui/FileSelector/FileSelector.js +2 -1
- package/ui/FileSelector/LocalFileChooser.d.ts +2 -2
- package/ui/FileSelector/LocalFileChooser.js +4 -3
- package/ui/FileSelector/UrlChooser.d.ts +5 -5
- package/ui/FileSelector/UrlChooser.js +2 -2
- package/ui/Menu.js +1 -1
- package/ui/ResizeBar.d.ts +0 -4
- package/ui/ResizeBar.js +12 -31
- package/ui/ResizeHandle.d.ts +3 -2
- package/ui/ResizeHandle.js +10 -7
- package/ui/ReturnToImportFormDialog.d.ts +4 -5
- package/ui/ReturnToImportFormDialog.js +3 -3
- package/ui/SanitizedHTML.d.ts +0 -1
- package/ui/SanitizedHTML.js +0 -2
- package/ui/Snackbar.d.ts +2 -2
- package/ui/Snackbar.js +2 -1
- package/ui/Tooltip.d.ts +4 -7
- package/ui/Tooltip.js +3 -3
- package/ui/theme.d.ts +1 -3
- package/ui/theme.js +2 -2
- package/ui/useResizeBar.d.ts +5 -0
- package/ui/useResizeBar.js +22 -0
- package/util/Base1DUtils.js +0 -1
- package/util/blockTypes.d.ts +1 -9
- package/util/blockTypes.js +5 -21
- package/util/calculateDynamicBlocks.js +3 -2
- package/util/calculateStaticBlocks.js +3 -4
- package/util/colord.d.ts +1 -0
- package/util/colord.js +13 -0
- package/util/dedupe.js +1 -2
- package/util/index.d.ts +13 -16
- package/util/index.js +17 -10
- package/util/io/RemoteFileWithRangeCache.js +2 -2
- package/util/layouts/GranularRectLayout.js +1 -2
- package/util/map-obj.d.ts +1 -1
- package/util/nanoid.d.ts +5 -0
- package/util/nanoid.js +73 -0
- package/util/offscreenCanvasPonyfill.js +1 -2
- package/util/offscreenCanvasUtils.js +1 -0
- package/util/tracks.d.ts +2 -6
- package/util/types/index.d.ts +36 -10
- package/util/types/index.js +5 -1
- package/util/types/mst.js +2 -2
|
@@ -26,6 +26,8 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
26
26
|
[x: string]: string | undefined;
|
|
27
27
|
} | undefined;
|
|
28
28
|
cytobands: import("../util").Feature[] | undefined;
|
|
29
|
+
} & {
|
|
30
|
+
getConf(arg: string): any;
|
|
29
31
|
} & {
|
|
30
32
|
readonly initialized: boolean;
|
|
31
33
|
readonly name: string;
|
|
@@ -68,117 +70,119 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
68
70
|
}>;
|
|
69
71
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
70
72
|
}, {
|
|
71
|
-
readonly assemblyNameMap: {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
73
|
+
readonly assemblyNameMap: Record<string, ({
|
|
74
|
+
configuration: any;
|
|
75
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
76
|
+
error: unknown;
|
|
77
|
+
loaded: boolean;
|
|
78
|
+
loadingP: Promise<void> | undefined;
|
|
79
|
+
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
80
|
+
refNameAliases: {
|
|
81
|
+
[x: string]: string | undefined;
|
|
82
|
+
} | undefined;
|
|
83
|
+
lowerCaseRefNameAliases: {
|
|
84
|
+
[x: string]: string | undefined;
|
|
85
|
+
} | undefined;
|
|
86
|
+
cytobands: import("../util").Feature[] | undefined;
|
|
87
|
+
} & {
|
|
88
|
+
getConf(arg: string): any;
|
|
89
|
+
} & {
|
|
90
|
+
readonly initialized: boolean;
|
|
91
|
+
readonly name: string;
|
|
92
|
+
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
93
|
+
readonly aliases: string[];
|
|
94
|
+
readonly displayName: string | undefined;
|
|
95
|
+
hasName(name: string): boolean;
|
|
96
|
+
readonly allAliases: string[];
|
|
97
|
+
readonly allRefNames: string[] | undefined;
|
|
98
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
99
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
100
|
+
readonly rpcManager: RpcManager;
|
|
101
|
+
readonly refNameColors: string[];
|
|
102
|
+
} & {
|
|
103
|
+
readonly refNames: string[] | undefined;
|
|
104
|
+
} & {
|
|
105
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
106
|
+
getRefNameColor(refName: string): string | undefined;
|
|
107
|
+
isValidRefName(refName: string): boolean;
|
|
108
|
+
} & {
|
|
109
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
|
|
110
|
+
setError(e: unknown): void;
|
|
111
|
+
setRegions(regions: import("../util").Region[]): void;
|
|
112
|
+
setRefNameAliases(aliases: {
|
|
113
|
+
[x: string]: string | undefined;
|
|
114
|
+
}, lcAliases: {
|
|
115
|
+
[x: string]: string | undefined;
|
|
116
|
+
}): void;
|
|
117
|
+
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
118
|
+
setLoadingP(p?: Promise<void> | undefined): void;
|
|
119
|
+
load(): Promise<void>;
|
|
120
|
+
loadPre(): Promise<void>;
|
|
121
|
+
} & {
|
|
122
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("../data_adapters/BaseAdapter").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
123
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
124
|
+
[x: string]: string | undefined;
|
|
125
|
+
}>;
|
|
126
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
127
|
+
[x: string]: string | undefined;
|
|
128
|
+
}>;
|
|
129
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
130
|
+
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
131
|
+
}, {
|
|
132
|
+
error: unknown;
|
|
133
|
+
loaded: boolean;
|
|
134
|
+
loadingP: Promise<void> | undefined;
|
|
135
|
+
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
136
|
+
refNameAliases: {
|
|
137
|
+
[x: string]: string | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
lowerCaseRefNameAliases: {
|
|
140
|
+
[x: string]: string | undefined;
|
|
141
|
+
} | undefined;
|
|
142
|
+
cytobands: import("../util").Feature[] | undefined;
|
|
143
|
+
} & {
|
|
144
|
+
getConf(arg: string): any;
|
|
145
|
+
} & {
|
|
146
|
+
readonly initialized: boolean;
|
|
147
|
+
readonly name: string;
|
|
148
|
+
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
149
|
+
readonly aliases: string[];
|
|
150
|
+
readonly displayName: string | undefined;
|
|
151
|
+
hasName(name: string): boolean;
|
|
152
|
+
readonly allAliases: string[];
|
|
153
|
+
readonly allRefNames: string[] | undefined;
|
|
154
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
155
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
156
|
+
readonly rpcManager: RpcManager;
|
|
157
|
+
readonly refNameColors: string[];
|
|
158
|
+
} & {
|
|
159
|
+
readonly refNames: string[] | undefined;
|
|
160
|
+
} & {
|
|
161
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
162
|
+
getRefNameColor(refName: string): string | undefined;
|
|
163
|
+
isValidRefName(refName: string): boolean;
|
|
164
|
+
} & {
|
|
165
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
|
|
166
|
+
setError(e: unknown): void;
|
|
167
|
+
setRegions(regions: import("../util").Region[]): void;
|
|
168
|
+
setRefNameAliases(aliases: {
|
|
169
|
+
[x: string]: string | undefined;
|
|
170
|
+
}, lcAliases: {
|
|
171
|
+
[x: string]: string | undefined;
|
|
172
|
+
}): void;
|
|
173
|
+
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
174
|
+
setLoadingP(p?: Promise<void> | undefined): void;
|
|
175
|
+
load(): Promise<void>;
|
|
176
|
+
loadPre(): Promise<void>;
|
|
177
|
+
} & {
|
|
178
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("../data_adapters/BaseAdapter").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
179
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
180
|
+
[x: string]: string | undefined;
|
|
181
|
+
}>;
|
|
182
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
183
|
+
[x: string]: string | undefined;
|
|
184
|
+
}>;
|
|
185
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined>;
|
|
182
186
|
} & {
|
|
183
187
|
/**
|
|
184
188
|
* #method
|
|
@@ -197,6 +201,8 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
197
201
|
[x: string]: string | undefined;
|
|
198
202
|
} | undefined;
|
|
199
203
|
cytobands: import("../util").Feature[] | undefined;
|
|
204
|
+
} & {
|
|
205
|
+
getConf(arg: string): any;
|
|
200
206
|
} & {
|
|
201
207
|
readonly initialized: boolean;
|
|
202
208
|
readonly name: string;
|
|
@@ -251,6 +257,8 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
251
257
|
[x: string]: string | undefined;
|
|
252
258
|
} | undefined;
|
|
253
259
|
cytobands: import("../util").Feature[] | undefined;
|
|
260
|
+
} & {
|
|
261
|
+
getConf(arg: string): any;
|
|
254
262
|
} & {
|
|
255
263
|
readonly initialized: boolean;
|
|
256
264
|
readonly name: string;
|
|
@@ -327,6 +335,8 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
327
335
|
[x: string]: string | undefined;
|
|
328
336
|
} | undefined;
|
|
329
337
|
cytobands: import("../util").Feature[] | undefined;
|
|
338
|
+
} & {
|
|
339
|
+
getConf(arg: string): any;
|
|
330
340
|
} & {
|
|
331
341
|
readonly initialized: boolean;
|
|
332
342
|
readonly name: string;
|
|
@@ -381,6 +391,8 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
381
391
|
[x: string]: string | undefined;
|
|
382
392
|
} | undefined;
|
|
383
393
|
cytobands: import("../util").Feature[] | undefined;
|
|
394
|
+
} & {
|
|
395
|
+
getConf(arg: string): any;
|
|
384
396
|
} & {
|
|
385
397
|
readonly initialized: boolean;
|
|
386
398
|
readonly name: string;
|
|
@@ -127,7 +127,7 @@ function assemblyManagerFactory(conf, pm) {
|
|
|
127
127
|
if (assembly) {
|
|
128
128
|
return assembly.isValidRefName(refName);
|
|
129
129
|
}
|
|
130
|
-
throw new Error(`
|
|
130
|
+
throw new Error(`Failed to look up refName ${refName} on ${assemblyName} because assembly does not exist`);
|
|
131
131
|
},
|
|
132
132
|
}))
|
|
133
133
|
.actions(self => ({
|
|
@@ -19,6 +19,7 @@ function isEmptyArray(thing) {
|
|
|
19
19
|
return Array.isArray(thing) && thing.length === 0;
|
|
20
20
|
}
|
|
21
21
|
function preprocessConfigurationSchemaArguments(modelName, inputSchemaDefinition, inputOptions = {}) {
|
|
22
|
+
var _a;
|
|
22
23
|
if (typeof modelName !== 'string') {
|
|
23
24
|
throw new Error('first arg must be string name of the model that this config schema goes with');
|
|
24
25
|
}
|
|
@@ -26,8 +27,7 @@ function preprocessConfigurationSchemaArguments(modelName, inputSchemaDefinition
|
|
|
26
27
|
// extending, grab the slot definitions from that
|
|
27
28
|
let schemaDefinition = inputSchemaDefinition;
|
|
28
29
|
let options = inputOptions;
|
|
29
|
-
if (inputOptions.baseConfiguration
|
|
30
|
-
inputOptions.baseConfiguration.jbrowseSchemaDefinition) {
|
|
30
|
+
if ((_a = inputOptions.baseConfiguration) === null || _a === void 0 ? void 0 : _a.jbrowseSchemaDefinition) {
|
|
31
31
|
schemaDefinition = {
|
|
32
32
|
...inputOptions.baseConfiguration.jbrowseSchemaDefinition,
|
|
33
33
|
...schemaDefinition,
|
|
@@ -134,6 +134,9 @@ const typeModelExtensions = {
|
|
|
134
134
|
// str => functionRegexp.test(str),
|
|
135
135
|
// )
|
|
136
136
|
const JexlStringType = mobx_state_tree_1.types.refinement('JexlString', mobx_state_tree_1.types.string, str => str.startsWith('jexl:'));
|
|
137
|
+
function json(value) {
|
|
138
|
+
return (value === null || value === void 0 ? void 0 : value.toJSON) ? value.toJSON() : `"${value}"`;
|
|
139
|
+
}
|
|
137
140
|
/**
|
|
138
141
|
* builds a MST model for a configuration slot
|
|
139
142
|
*
|
|
@@ -192,12 +195,6 @@ function ConfigSlot(slotName, { description = '', model, type, defaultValue, con
|
|
|
192
195
|
if (self.isCallback) {
|
|
193
196
|
return undefined;
|
|
194
197
|
}
|
|
195
|
-
function json(value) {
|
|
196
|
-
if (value && value.toJSON) {
|
|
197
|
-
return value.toJSON();
|
|
198
|
-
}
|
|
199
|
-
return `"${value}"`;
|
|
200
|
-
}
|
|
201
198
|
return json(self.value);
|
|
202
199
|
},
|
|
203
200
|
}))
|
|
@@ -10,6 +10,4 @@ export { BaseSequenceAdapter } from './BaseSequenceAdapter';
|
|
|
10
10
|
export type { BaseTextSearchAdapter } from './BaseTextSearchAdapter';
|
|
11
11
|
export type { BaseRefNameAliasAdapter } from './BaseRefNameAliasAdapter';
|
|
12
12
|
export type { RegionsAdapter } from './RegionsAdapter';
|
|
13
|
-
export
|
|
14
|
-
new (config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager): AnyDataAdapter;
|
|
15
|
-
}
|
|
13
|
+
export type AnyAdapter = new (config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager) => AnyDataAdapter;
|
|
@@ -22,9 +22,9 @@ async function getAdapter(pluginManager, sessionId, adapterConfigSnapshot) {
|
|
|
22
22
|
// cache the adapter object
|
|
23
23
|
const cacheKey = adapterConfigCacheKey(adapterConfigSnapshot);
|
|
24
24
|
if (!adapterCache[cacheKey]) {
|
|
25
|
-
const adapterType =
|
|
25
|
+
const adapterType = adapterConfigSnapshot === null || adapterConfigSnapshot === void 0 ? void 0 : adapterConfigSnapshot.type;
|
|
26
26
|
if (!adapterType) {
|
|
27
|
-
throw new Error(
|
|
27
|
+
throw new Error(`could not determine adapter type from adapter config snapshot ${JSON.stringify(adapterConfigSnapshot)}`);
|
|
28
28
|
}
|
|
29
29
|
const dataAdapterType = pluginManager.getAdapterType(adapterType);
|
|
30
30
|
if (!dataAdapterType) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "JBrowse 2 core libraries used by plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"canvas-sequencer": "^3.1.0",
|
|
37
37
|
"canvas2svg": "^1.0.16",
|
|
38
38
|
"clone": "^2.1.2",
|
|
39
|
-
"clsx": "^
|
|
40
|
-
"
|
|
39
|
+
"clsx": "^2.0.0",
|
|
40
|
+
"colord": "^2.9.3",
|
|
41
41
|
"copy-to-clipboard": "^3.3.1",
|
|
42
42
|
"deepmerge": "^4.2.2",
|
|
43
43
|
"detect-node": "^2.1.0",
|
|
@@ -55,14 +55,13 @@
|
|
|
55
55
|
"rbush": "^3.0.1",
|
|
56
56
|
"react-error-boundary": "^4.0.3",
|
|
57
57
|
"serialize-error": "^8.0.0",
|
|
58
|
-
"shortid": "^2.2.13",
|
|
59
58
|
"svg-path-generator": "^1.1.0"
|
|
60
59
|
},
|
|
61
60
|
"peerDependencies": {
|
|
62
61
|
"@mui/material": "^5.0.0",
|
|
63
62
|
"@mui/x-data-grid": "^6.0.1",
|
|
64
63
|
"mobx": "^6.0.0",
|
|
65
|
-
"mobx-react": "^
|
|
64
|
+
"mobx-react": "^9.0.0",
|
|
66
65
|
"mobx-state-tree": "^5.0.0",
|
|
67
66
|
"prop-types": "^15.0.0",
|
|
68
67
|
"react": ">=16.8.0",
|
|
@@ -74,5 +73,5 @@
|
|
|
74
73
|
"access": "public",
|
|
75
74
|
"directory": "dist"
|
|
76
75
|
},
|
|
77
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "dbe7fb1af01fc89f833d2744635eb44a17365b41"
|
|
78
77
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import PluggableElementBase from './PluggableElementBase';
|
|
2
2
|
import { AnyConfigurationSchemaType } from '../configuration';
|
|
3
3
|
import { AnyAdapter } from '../data_adapters/BaseAdapter';
|
|
4
|
-
export
|
|
4
|
+
export interface AdapterMetadata {
|
|
5
5
|
category?: string;
|
|
6
6
|
hiddenFromGUI?: boolean;
|
|
7
7
|
description?: string;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
export default class AdapterType extends PluggableElementBase {
|
|
10
10
|
AdapterClass?: AnyAdapter;
|
|
11
11
|
getAdapterClass: () => Promise<AnyAdapter>;
|
|
@@ -45,16 +45,16 @@ export declare function createBaseTrackModel(pm: PluginManager, trackType: strin
|
|
|
45
45
|
/**
|
|
46
46
|
* #getter
|
|
47
47
|
*/
|
|
48
|
-
readonly canConfigure:
|
|
48
|
+
readonly canConfigure: boolean | ({
|
|
49
|
+
[x: string]: any;
|
|
50
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
51
|
+
setSubschema(slotName: string, data: unknown): any;
|
|
52
|
+
} & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>) | undefined;
|
|
49
53
|
} & {
|
|
50
54
|
/**
|
|
51
55
|
* #action
|
|
52
56
|
*/
|
|
53
57
|
setMinimized(flag: boolean): void;
|
|
54
|
-
/**
|
|
55
|
-
* #action
|
|
56
|
-
*/
|
|
57
|
-
activateConfigurationUI(): void;
|
|
58
58
|
/**
|
|
59
59
|
* #action
|
|
60
60
|
*/
|
|
@@ -97,7 +97,7 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
97
97
|
const { sessionTracks, adminMode } = session;
|
|
98
98
|
return ((0, types_1.isSessionModelWithConfigEditing)(session) &&
|
|
99
99
|
(adminMode ||
|
|
100
|
-
sessionTracks.find(
|
|
100
|
+
(sessionTracks === null || sessionTracks === void 0 ? void 0 : sessionTracks.find(track => { var _a; return track.trackId === ((_a = self.configuration) === null || _a === void 0 ? void 0 : _a.trackId); }))));
|
|
101
101
|
},
|
|
102
102
|
}))
|
|
103
103
|
.actions(self => ({
|
|
@@ -107,21 +107,6 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
107
107
|
setMinimized(flag) {
|
|
108
108
|
self.minimized = flag;
|
|
109
109
|
},
|
|
110
|
-
/**
|
|
111
|
-
* #action
|
|
112
|
-
*/
|
|
113
|
-
activateConfigurationUI() {
|
|
114
|
-
const session = (0, util_1.getSession)(self);
|
|
115
|
-
const view = (0, util_1.getContainingView)(self);
|
|
116
|
-
if ((0, types_1.isSessionModelWithConfigEditing)(session)) {
|
|
117
|
-
// @ts-expect-error
|
|
118
|
-
const trackConf = session.editTrackConfiguration(self.configuration);
|
|
119
|
-
if (trackConf && trackConf !== self.configuration) {
|
|
120
|
-
view.hideTrack(self.configuration);
|
|
121
|
-
view.showTrack(trackConf);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
110
|
/**
|
|
126
111
|
* #action
|
|
127
112
|
*/
|
|
@@ -104,7 +104,7 @@ export declare const InternetAccount: import("mobx-state-tree").IModelType<{
|
|
|
104
104
|
* @param resolve - Pass the token to this function
|
|
105
105
|
* @param reject - If there is an error getting the token, call this function
|
|
106
106
|
*/
|
|
107
|
-
getTokenFromUser(
|
|
107
|
+
getTokenFromUser(_resolve: (token: string) => void, _reject: (error: Error) => void): void;
|
|
108
108
|
/**
|
|
109
109
|
* #action
|
|
110
110
|
*/
|
|
@@ -131,7 +131,7 @@ export declare const InternetAccount: import("mobx-state-tree").IModelType<{
|
|
|
131
131
|
* @param loc - UriLocation of the resource
|
|
132
132
|
* @returns - Valid auth token
|
|
133
133
|
*/
|
|
134
|
-
validateToken(token: string,
|
|
134
|
+
validateToken(token: string, _loc: UriLocation): Promise<string>;
|
|
135
135
|
} & {
|
|
136
136
|
/**
|
|
137
137
|
* #action
|
|
@@ -114,7 +114,7 @@ exports.InternetAccount = mobx_state_tree_1.types
|
|
|
114
114
|
* @param resolve - Pass the token to this function
|
|
115
115
|
* @param reject - If there is an error getting the token, call this function
|
|
116
116
|
*/
|
|
117
|
-
getTokenFromUser(
|
|
117
|
+
getTokenFromUser(_resolve, _reject) {
|
|
118
118
|
throw new Error('getTokenFromUser must be implemented by extending model');
|
|
119
119
|
},
|
|
120
120
|
/**
|
|
@@ -149,7 +149,7 @@ exports.InternetAccount = mobx_state_tree_1.types
|
|
|
149
149
|
* @param loc - UriLocation of the resource
|
|
150
150
|
* @returns - Valid auth token
|
|
151
151
|
*/
|
|
152
|
-
async validateToken(token,
|
|
152
|
+
async validateToken(token, _loc) {
|
|
153
153
|
return token;
|
|
154
154
|
},
|
|
155
155
|
}))
|
|
@@ -56,9 +56,7 @@ export interface ResultsDeserialized extends FeatureResultsDeserialized {
|
|
|
56
56
|
layout: PrecomputedLayout<string>;
|
|
57
57
|
}
|
|
58
58
|
export default class BoxRendererType extends FeatureRendererType {
|
|
59
|
-
sessions:
|
|
60
|
-
[key: string]: LayoutSession;
|
|
61
|
-
};
|
|
59
|
+
sessions: Record<string, LayoutSession>;
|
|
62
60
|
getWorkerSession(props: LayoutSessionProps & {
|
|
63
61
|
sessionId: string;
|
|
64
62
|
layoutId: string;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SimpleFeature, SimpleFeatureSerialized } from '../../util';
|
|
3
3
|
import FeatureRenderer from './FeatureRendererType';
|
|
4
|
+
import { ThemeOptions } from '@mui/material';
|
|
4
5
|
export default class CircularChordRendererType extends FeatureRenderer {
|
|
5
6
|
supportsSVG: boolean;
|
|
6
7
|
deserializeResultsInClient(res: {
|
|
7
8
|
features: SimpleFeatureSerialized[];
|
|
8
9
|
html: string;
|
|
9
10
|
}, args: {
|
|
11
|
+
displayModel: any;
|
|
12
|
+
theme: ThemeOptions;
|
|
10
13
|
exportSVG?: {
|
|
11
14
|
rasterizeLayers?: boolean;
|
|
12
15
|
};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnyReactComponentType, Feature } from '../../util';
|
|
3
|
-
|
|
3
|
+
import { ThemeOptions } from '@mui/material';
|
|
4
|
+
interface Props {
|
|
4
5
|
html: string;
|
|
5
6
|
features: Map<string, Feature>;
|
|
7
|
+
theme: ThemeOptions;
|
|
8
|
+
displayModel: any;
|
|
6
9
|
RenderingComponent: AnyReactComponentType;
|
|
7
|
-
}
|
|
8
|
-
|
|
10
|
+
}
|
|
11
|
+
declare const RpcRenderedSvgGroup: (props: Props) => React.JSX.Element;
|
|
12
|
+
export default RpcRenderedSvgGroup;
|
|
@@ -25,9 +25,46 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
const react_1 = __importStar(require("react"));
|
|
27
27
|
const mobx_react_1 = require("mobx-react");
|
|
28
|
-
|
|
28
|
+
// locals
|
|
29
29
|
const util_1 = require("../../util");
|
|
30
|
-
|
|
30
|
+
const material_1 = require("@mui/material");
|
|
31
|
+
const ui_1 = require("../../ui");
|
|
32
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
33
|
+
// eslint-disable-next-line react/no-deprecated
|
|
34
|
+
const react_dom_1 = require("react-dom");
|
|
35
|
+
const NewHydrate = (0, mobx_react_1.observer)(function RpcRenderedSvgGroup(props) {
|
|
36
|
+
const { html, theme, RenderingComponent, ...rest } = props;
|
|
37
|
+
const ref = (0, react_1.useRef)(null);
|
|
38
|
+
// this `any` is a react-dom/client::Root
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
|
+
const rootRef = (0, react_1.useRef)();
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42
|
+
const root = (0, mobx_state_tree_1.getRoot)(props.displayModel);
|
|
43
|
+
const hydrateRoot = root.hydrateFn;
|
|
44
|
+
(0, react_1.useEffect)(() => {
|
|
45
|
+
const renderTimeout = (0, util_1.rIC)(() => {
|
|
46
|
+
var _a;
|
|
47
|
+
if (!ref.current) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const jbrowseTheme = (0, ui_1.createJBrowseTheme)(theme);
|
|
51
|
+
rootRef.current =
|
|
52
|
+
(_a = rootRef.current) !== null && _a !== void 0 ? _a : hydrateRoot(ref.current, react_1.default.createElement(material_1.ThemeProvider, { theme: jbrowseTheme },
|
|
53
|
+
react_1.default.createElement(RenderingComponent, { ...rest })));
|
|
54
|
+
});
|
|
55
|
+
return () => {
|
|
56
|
+
clearTimeout(renderTimeout);
|
|
57
|
+
const root = rootRef.current;
|
|
58
|
+
rootRef.current = undefined;
|
|
59
|
+
setTimeout(() => {
|
|
60
|
+
root === null || root === void 0 ? void 0 : root.unmount();
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
}, [html, RenderingComponent, hydrateRoot, theme, props, rest]);
|
|
64
|
+
// eslint-disable-next-line react/no-danger
|
|
65
|
+
return react_1.default.createElement("g", { ref: ref, dangerouslySetInnerHTML: { __html: html } });
|
|
66
|
+
});
|
|
67
|
+
const OldHydrate = (0, mobx_react_1.observer)(function OldHydrate(props) {
|
|
31
68
|
const { html, RenderingComponent } = props;
|
|
32
69
|
const ref = (0, react_1.useRef)(null);
|
|
33
70
|
(0, react_1.useEffect)(() => {
|
|
@@ -58,3 +95,9 @@ exports.default = (0, mobx_react_1.observer)(function (props) {
|
|
|
58
95
|
}, [html, RenderingComponent, props]);
|
|
59
96
|
return react_1.default.createElement("g", { ref: ref });
|
|
60
97
|
});
|
|
98
|
+
const RpcRenderedSvgGroup = (0, mobx_react_1.observer)(function (props) {
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
100
|
+
const root = (0, mobx_state_tree_1.getRoot)(props.displayModel);
|
|
101
|
+
return root.hydrateFn ? react_1.default.createElement(NewHydrate, { ...props }) : react_1.default.createElement(OldHydrate, { ...props });
|
|
102
|
+
});
|
|
103
|
+
exports.default = RpcRenderedSvgGroup;
|
|
@@ -3,5 +3,5 @@ import { ResultsSerialized, RenderArgs } from './ServerSideRendererType';
|
|
|
3
3
|
interface Props extends ResultsSerialized, RenderArgs {
|
|
4
4
|
RenderingComponent: React.ComponentType<any>;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
export
|
|
6
|
+
declare const ServerSideRenderedContent: (props: Props) => React.JSX.Element;
|
|
7
|
+
export default ServerSideRenderedContent;
|