@jbrowse/core 3.1.0 → 3.3.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 +2 -1
- package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +4 -4
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +10 -9
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +3 -13
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +2 -1
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +2 -2
- package/CorePlugin.js +2 -2
- package/PluginLoader.js +3 -3
- package/PluginManager.d.ts +1 -1
- package/PluginManager.js +15 -14
- package/ReExports/modules.d.ts +1 -1
- package/ReExports/modules.js +1 -22
- package/assemblyManager/assemblyManager.js +1 -1
- package/configuration/configurationSchema.js +2 -2
- package/configuration/util.js +2 -2
- package/data_adapters/BaseAdapter/BaseAdapter.d.ts +2 -2
- package/data_adapters/BaseAdapter/BaseAdapter.js +1 -0
- package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +9 -2
- package/data_adapters/BaseAdapter/BaseOptions.d.ts +0 -1
- package/data_adapters/BaseAdapter/types.d.ts +1 -1
- package/data_adapters/CytobandAdapter/configSchema.js +17 -2
- package/data_adapters/dataAdapterCache.js +4 -4
- package/package.json +5 -5
- package/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.d.ts +3 -1
- package/pluggableElementTypes/models/BaseTrackModel.js +3 -1
- package/pluggableElementTypes/models/baseTrackConfig.js +2 -2
- package/pluggableElementTypes/renderers/CircularChordRendererType.js +8 -9
- package/pluggableElementTypes/renderers/FeatureRendererType.js +1 -0
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +2 -4
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +2 -30
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +1 -1
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +2 -30
- package/pluggableElementTypes/renderers/ServerSideRendererType.js +6 -7
- package/rpc/methods/CoreFreeResources.js +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/DataGridFlexContainer.d.ts +3 -0
- package/ui/DataGridFlexContainer.js +15 -0
- package/ui/theme.js +5 -5
- package/util/Base1DUtils.js +1 -1
- package/util/analytics.js +2 -2
- package/util/cluster.d.ts +17 -0
- package/util/cluster.js +96 -0
- package/util/idMaker.d.ts +1 -1
- package/util/idMaker.js +1 -1
- package/util/index.d.ts +4 -1
- package/util/index.js +41 -10
- package/util/layouts/PrecomputedMultiLayout.js +2 -2
- package/util/map-obj.js +2 -2
- package/util/offscreenCanvasUtils.d.ts +11 -11
- package/util/offscreenCanvasUtils.js +4 -1
- package/util/rxjs.d.ts +1 -1
- package/util/rxjs.js +3 -1
- package/util/stopToken.d.ts +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export default function ArrayValue({ name, value, description, prefix, }: {
|
|
1
|
+
export default function ArrayValue({ name, value, description, formatter, prefix, }: {
|
|
2
2
|
description?: React.ReactNode;
|
|
3
3
|
name: string;
|
|
4
4
|
value: unknown[];
|
|
5
|
+
formatter?: (value: unknown, key: string) => React.ReactNode;
|
|
5
6
|
prefix?: string[];
|
|
6
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -24,15 +24,15 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
24
24
|
overflow: 'auto',
|
|
25
25
|
},
|
|
26
26
|
}));
|
|
27
|
-
function ArrayValue({ name, value, description, prefix = [], }) {
|
|
27
|
+
function ArrayValue({ name, value, description, formatter, prefix = [], }) {
|
|
28
28
|
const { classes } = useStyles();
|
|
29
29
|
if (value.length === 1) {
|
|
30
|
-
return (0, util_1.isObject)(value[0]) ? ((0, jsx_runtime_1.jsx)(Attributes_1.default, { attributes: value[0], prefix: [...prefix, name] })) : ((0, jsx_runtime_1.jsxs)("div", { className: classes.field, children: [(0, jsx_runtime_1.jsx)(FieldName_1.default, { prefix: prefix, description: description, name: name }), (0, jsx_runtime_1.jsx)(BasicValue_1.default, { value: value[0] })] }));
|
|
30
|
+
return (0, util_1.isObject)(value[0]) ? ((0, jsx_runtime_1.jsx)(Attributes_1.default, { formatter: formatter, attributes: value[0], prefix: [...prefix, name] })) : ((0, jsx_runtime_1.jsxs)("div", { className: classes.field, children: [(0, jsx_runtime_1.jsx)(FieldName_1.default, { prefix: prefix, description: description, name: name }), (0, jsx_runtime_1.jsx)(BasicValue_1.default, { value: formatter ? formatter(value[0], name) : value[0] })] }));
|
|
31
31
|
}
|
|
32
32
|
else if (value.every(val => (0, util_1.isObject)(val))) {
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: value.map((val, i) => ((0, jsx_runtime_1.jsx)(Attributes_1.default, { attributes: val, prefix: [...prefix, `${name}-${i}`] }, `${JSON.stringify(val)}-${i}`))) }));
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: value.map((val, i) => ((0, jsx_runtime_1.jsx)(Attributes_1.default, { formatter: formatter, attributes: val, prefix: [...prefix, `${name}-${i}`] }, `${JSON.stringify(val)}-${i}`))) }));
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: classes.field, children: [(0, jsx_runtime_1.jsx)(FieldName_1.default, { prefix: prefix, description: description, name: name }), value.map((val, i) => ((0, jsx_runtime_1.jsx)("div", { className: classes.fieldSubvalue, children: (0, jsx_runtime_1.jsx)(BasicValue_1.default, { value: val }) }, `${JSON.stringify(val)}-${i}`)))] }));
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: classes.field, children: [(0, jsx_runtime_1.jsx)(FieldName_1.default, { prefix: prefix, description: description, name: name }), value.map((val, i) => ((0, jsx_runtime_1.jsx)("div", { className: classes.fieldSubvalue, children: (0, jsx_runtime_1.jsx)(BasicValue_1.default, { value: formatter ? formatter(val, name) : val }) }, `${JSON.stringify(val)}-${i}`)))] }));
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -24,24 +24,25 @@ const globalOmit = [
|
|
|
24
24
|
'thickEnd',
|
|
25
25
|
];
|
|
26
26
|
function Attributes(props) {
|
|
27
|
-
const { attributes, omit = [], omitSingleLevel = [], descriptions, formatter
|
|
27
|
+
const { attributes, omit = [], omitSingleLevel = [], descriptions, formatter, hideUris, prefix = [], } = props;
|
|
28
28
|
const omits = new Set([...omit, ...globalOmit, ...omitSingleLevel]);
|
|
29
29
|
const { __jbrowsefmt, ...rest } = attributes;
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
const filteredFormattedAttributes = Object.entries({
|
|
31
|
+
...rest,
|
|
32
|
+
...__jbrowsefmt,
|
|
33
|
+
}).filter(([k, v]) => v != null && !omits.has(k));
|
|
34
|
+
const maxLabelWidth = (0, util_1.generateMaxWidth)(filteredFormattedAttributes, prefix);
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: filteredFormattedAttributes.map(([key, value]) => {
|
|
35
36
|
const description = (0, util_1.accessNested)([...prefix, key], descriptions);
|
|
36
37
|
if (Array.isArray(value)) {
|
|
37
|
-
return value.length > 1 && value.every(val => (0, util_2.isObject)(val)) ? ((0, jsx_runtime_1.jsx)(DataGridDetails_1.default, { name: key, prefix: prefix, value: value }, key)) : ((0, jsx_runtime_1.jsx)(ArrayValue_1.default, { name: key, value: value, description: description, prefix: prefix }, key));
|
|
38
|
+
return value.length > 1 && value.every(val => (0, util_2.isObject)(val)) ? ((0, jsx_runtime_1.jsx)(DataGridDetails_1.default, { name: key, prefix: prefix, value: value }, key)) : ((0, jsx_runtime_1.jsx)(ArrayValue_1.default, { name: key, value: value, formatter: formatter, description: description, prefix: prefix }, key));
|
|
38
39
|
}
|
|
39
40
|
else if ((0, util_2.isObject)(value)) {
|
|
40
41
|
const { omitSingleLevel, ...rest } = props;
|
|
41
|
-
return (0, util_2.isUriLocation)(value) ? (hideUris ? null : ((0, jsx_runtime_1.jsx)(UriField_1.default, { name: key, prefix: prefix, value: value }, key))) : ((0, jsx_runtime_1.jsx)(Attributes, { ...rest, attributes: value, descriptions: descriptions, prefix: [...prefix, key] }, key));
|
|
42
|
+
return (0, util_2.isUriLocation)(value) ? (hideUris ? null : ((0, jsx_runtime_1.jsx)(UriField_1.default, { name: key, prefix: prefix, value: value }, key))) : ((0, jsx_runtime_1.jsx)(Attributes, { ...rest, formatter: formatter, attributes: value, descriptions: descriptions, prefix: [...prefix, key] }, key));
|
|
42
43
|
}
|
|
43
44
|
else {
|
|
44
|
-
return ((0, jsx_runtime_1.jsx)(SimpleField_1.default, { name: key,
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(SimpleField_1.default, { name: key, formatter: formatter, value: value, description: description, prefix: prefix, width: Math.min(maxLabelWidth, MAX_FIELD_NAME_WIDTH) }, key));
|
|
45
46
|
}
|
|
46
47
|
}) }));
|
|
47
48
|
}
|
|
@@ -11,6 +11,7 @@ const x_data_grid_1 = require("@mui/x-data-grid");
|
|
|
11
11
|
const mui_1 = require("tss-react/mui");
|
|
12
12
|
const FieldName_1 = __importDefault(require("./FieldName"));
|
|
13
13
|
const ui_1 = require("../../ui");
|
|
14
|
+
const DataGridFlexContainer_1 = __importDefault(require("../../ui/DataGridFlexContainer"));
|
|
14
15
|
const util_1 = require("../../util");
|
|
15
16
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
16
17
|
margin: {
|
|
@@ -52,21 +53,10 @@ function DataGridDetails({ value, prefix, name, }) {
|
|
|
52
53
|
if (unionKeys.size < keys.length + 5) {
|
|
53
54
|
return ((0, jsx_runtime_1.jsxs)("div", { className: classes.margin, children: [(0, jsx_runtime_1.jsx)(FieldName_1.default, { prefix: prefix, name: name }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: checked, onChange: event => {
|
|
54
55
|
setChecked(event.target.checked);
|
|
55
|
-
} }), label: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: "Show options" }) }), (0, jsx_runtime_1.jsx)(
|
|
56
|
-
toolbar: checked ? x_data_grid_1.GridToolbar : null,
|
|
57
|
-
}, slotProps: {
|
|
58
|
-
toolbar: {
|
|
59
|
-
printOptions: {
|
|
60
|
-
disableToolbarButton: true,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
}, columns: colNames.map((val, index) => ({
|
|
56
|
+
} }), label: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: "Show options" }) }), (0, jsx_runtime_1.jsx)(DataGridFlexContainer_1.default, { children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { rows: rows, rowHeight: 20, columnHeaderHeight: 35, hideFooter: rows.length < 25, showToolbar: checked, columns: colNames.map((val, index) => ({
|
|
64
57
|
field: val,
|
|
65
|
-
renderCell: params => {
|
|
66
|
-
const value = params.value;
|
|
67
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: classes.cell, children: (0, jsx_runtime_1.jsx)(ui_1.SanitizedHTML, { html: (0, util_1.getStr)(value || '') }) }));
|
|
68
|
-
},
|
|
69
58
|
width: widths[index],
|
|
59
|
+
renderCell: ({ value }) => ((0, jsx_runtime_1.jsx)("div", { className: classes.cell, children: (0, jsx_runtime_1.jsx)(ui_1.SanitizedHTML, { html: (0, util_1.getStr)(value || '') }) })),
|
|
70
60
|
})) }) })] }));
|
|
71
61
|
}
|
|
72
62
|
return null;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export default function SimpleField({ name, value, description, prefix, width, }: {
|
|
1
|
+
export default function SimpleField({ name, value, description, prefix, width, formatter, }: {
|
|
2
2
|
description?: React.ReactNode;
|
|
3
3
|
name: string;
|
|
4
4
|
value: unknown;
|
|
5
5
|
prefix?: string[];
|
|
6
6
|
width?: number;
|
|
7
|
+
formatter?: (value: unknown, key: string) => React.ReactNode;
|
|
7
8
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -14,7 +14,7 @@ const useStyles = (0, mui_1.makeStyles)()({
|
|
|
14
14
|
flexWrap: 'wrap',
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
|
-
function SimpleField({ name, value, description, prefix, width, }) {
|
|
17
|
+
function SimpleField({ name, value, description, prefix, width, formatter, }) {
|
|
18
18
|
const { classes } = useStyles();
|
|
19
|
-
return value
|
|
19
|
+
return value != null ? ((0, jsx_runtime_1.jsxs)("div", { className: classes.field, children: [(0, jsx_runtime_1.jsx)(FieldName_1.default, { prefix: prefix, description: description, name: name, width: width }), (0, jsx_runtime_1.jsx)(BasicValue_1.default, { value: formatter ? formatter(value, name) : value })] })) : null;
|
|
20
20
|
}
|
package/CorePlugin.js
CHANGED
|
@@ -48,9 +48,9 @@ class CorePlugin extends Plugin_1.default {
|
|
|
48
48
|
this.name = 'CorePlugin';
|
|
49
49
|
}
|
|
50
50
|
install(pluginManager) {
|
|
51
|
-
Object.values(coreRpcMethods)
|
|
51
|
+
for (const RpcMethod of Object.values(coreRpcMethods)) {
|
|
52
52
|
pluginManager.addRpcMethod(() => new RpcMethod(pluginManager));
|
|
53
|
-
}
|
|
53
|
+
}
|
|
54
54
|
(0, CytobandAdapter_1.default)(pluginManager);
|
|
55
55
|
pluginManager.addWidgetType(() => {
|
|
56
56
|
return new WidgetType_1.default({
|
package/PluginLoader.js
CHANGED
|
@@ -63,12 +63,12 @@ function pluginDescriptionString(d) {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
function pluginUrl(d) {
|
|
66
|
-
var _a, _b, _c;
|
|
66
|
+
var _a, _b, _c, _d, _e, _f;
|
|
67
67
|
if (isUMDPluginDefinition(d)) {
|
|
68
|
-
return (
|
|
68
|
+
return (_c = (_a = d.url) !== null && _a !== void 0 ? _a : (_b = d.umdLoc) === null || _b === void 0 ? void 0 : _b.uri) !== null && _c !== void 0 ? _c : d.umdUrl;
|
|
69
69
|
}
|
|
70
70
|
else if (isESMPluginDefinition(d)) {
|
|
71
|
-
return (
|
|
71
|
+
return (_e = (_d = d.esmUrl) !== null && _d !== void 0 ? _d : d.esmUri) !== null && _e !== void 0 ? _e : (_f = d.esmLoc) === null || _f === void 0 ? void 0 : _f.uri;
|
|
72
72
|
}
|
|
73
73
|
else if (isCJSPluginDefinition(d)) {
|
|
74
74
|
return d.cjsUrl || d.cjsLoc.uri;
|
package/PluginManager.d.ts
CHANGED
|
@@ -213,7 +213,7 @@ export default class PluginManager {
|
|
|
213
213
|
'mobx-react': typeof import("mobx-react");
|
|
214
214
|
'@mui/x-data-grid': {
|
|
215
215
|
useGridApiContext: typeof import("@mui/x-data-grid").useGridApiContext;
|
|
216
|
-
useGridApiRef: <Api extends import("@mui/x-data-grid").GridApiCommon = import("@mui/x-data-grid/internals").GridApiCommunity>() => import("@mui/x-internals/types").RefObject<Api>;
|
|
216
|
+
useGridApiRef: <Api extends import("@mui/x-data-grid").GridApiCommon = import("@mui/x-data-grid/internals").GridApiCommunity>() => import("@mui/x-internals/types").RefObject<Api | null>;
|
|
217
217
|
useGridRootProps: () => import("@mui/x-data-grid/internals").DataGridProcessedProps;
|
|
218
218
|
};
|
|
219
219
|
'@mui/material/utils': typeof import("@mui/material/utils");
|
package/PluginManager.js
CHANGED
|
@@ -37,10 +37,11 @@ class PhasedScheduler {
|
|
|
37
37
|
phaseCallbacks.push(callback);
|
|
38
38
|
}
|
|
39
39
|
run() {
|
|
40
|
-
this.phaseOrder
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
for (const phaseName of this.phaseOrder) {
|
|
41
|
+
for (const callback of this.phaseCallbacks.get(phaseName) || []) {
|
|
42
|
+
callback();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
class TypeRecord {
|
|
@@ -115,17 +116,17 @@ class PluginManager {
|
|
|
115
116
|
isCore: true,
|
|
116
117
|
},
|
|
117
118
|
});
|
|
118
|
-
|
|
119
|
+
for (const plugin of initialPlugins) {
|
|
119
120
|
this.addPlugin(plugin);
|
|
120
|
-
}
|
|
121
|
+
}
|
|
121
122
|
}
|
|
122
123
|
pluginConfigurationSchemas() {
|
|
123
124
|
const configurationSchemas = {};
|
|
124
|
-
this.plugins
|
|
125
|
+
for (const plugin of this.plugins) {
|
|
125
126
|
if (plugin.configurationSchema) {
|
|
126
127
|
configurationSchemas[plugin.name] = plugin.configurationSchema;
|
|
127
128
|
}
|
|
128
|
-
}
|
|
129
|
+
}
|
|
129
130
|
return configurationSchemas;
|
|
130
131
|
}
|
|
131
132
|
addPlugin(load) {
|
|
@@ -167,9 +168,9 @@ class PluginManager {
|
|
|
167
168
|
if (this.configured) {
|
|
168
169
|
throw new Error('already configured');
|
|
169
170
|
}
|
|
170
|
-
this.plugins
|
|
171
|
+
for (const plugin of this.plugins) {
|
|
171
172
|
plugin.configure(this);
|
|
172
|
-
}
|
|
173
|
+
}
|
|
173
174
|
this.configured = true;
|
|
174
175
|
return this;
|
|
175
176
|
}
|
|
@@ -318,12 +319,12 @@ class PluginManager {
|
|
|
318
319
|
const callback = () => {
|
|
319
320
|
const track = cb(this);
|
|
320
321
|
const displays = this.getElementTypesInGroup('display');
|
|
321
|
-
|
|
322
|
+
for (const display of displays) {
|
|
322
323
|
if (display.trackType === track.name &&
|
|
323
324
|
!track.displayTypes.includes(display)) {
|
|
324
325
|
track.addDisplayType(display);
|
|
325
326
|
}
|
|
326
|
-
}
|
|
327
|
+
}
|
|
327
328
|
return track;
|
|
328
329
|
};
|
|
329
330
|
return this.addElementType('track', callback);
|
|
@@ -335,13 +336,13 @@ class PluginManager {
|
|
|
335
336
|
const callback = () => {
|
|
336
337
|
const newView = cb(this);
|
|
337
338
|
const displays = this.getElementTypesInGroup('display');
|
|
338
|
-
|
|
339
|
+
for (const display of displays) {
|
|
339
340
|
if ((display.viewType === newView.name ||
|
|
340
341
|
display.viewType === newView.extendedName) &&
|
|
341
342
|
!newView.displayTypes.includes(display)) {
|
|
342
343
|
newView.addDisplayType(display);
|
|
343
344
|
}
|
|
344
|
-
}
|
|
345
|
+
}
|
|
345
346
|
return newView;
|
|
346
347
|
};
|
|
347
348
|
return this.addElementType('view', callback);
|
package/ReExports/modules.d.ts
CHANGED
|
@@ -133,7 +133,7 @@ declare const libs: {
|
|
|
133
133
|
'mobx-react': typeof mxreact;
|
|
134
134
|
'@mui/x-data-grid': {
|
|
135
135
|
useGridApiContext: typeof useGridApiContext;
|
|
136
|
-
useGridApiRef: <Api extends import("@mui/x-data-grid").GridApiCommon = import("@mui/x-data-grid/internals").GridApiCommunity>() => import("@mui/x-internals/types").RefObject<Api>;
|
|
136
|
+
useGridApiRef: <Api extends import("@mui/x-data-grid").GridApiCommon = import("@mui/x-data-grid/internals").GridApiCommunity>() => import("@mui/x-internals/types").RefObject<Api | null>;
|
|
137
137
|
useGridRootProps: () => import("@mui/x-data-grid/internals").DataGridProcessedProps;
|
|
138
138
|
};
|
|
139
139
|
'@mui/material/utils': typeof MUIUtils;
|
package/ReExports/modules.js
CHANGED
|
@@ -120,7 +120,7 @@ const Entries = {
|
|
|
120
120
|
FormHelperText: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/FormHelperText')))),
|
|
121
121
|
FormGroup: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/FormGroup')))),
|
|
122
122
|
Grid: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/Grid')))),
|
|
123
|
-
Grid2: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/
|
|
123
|
+
Grid2: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/Grid')))),
|
|
124
124
|
Grow: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/Grow')))),
|
|
125
125
|
Icon: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/Icon')))),
|
|
126
126
|
IconButton: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/material/IconButton')))),
|
|
@@ -312,9 +312,6 @@ const DataGridEntries = {
|
|
|
312
312
|
GridRowCount: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
313
313
|
default: module.GridRowCount,
|
|
314
314
|
}))),
|
|
315
|
-
GridSaveAltIcon: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
316
|
-
default: module.GridSaveAltIcon,
|
|
317
|
-
}))),
|
|
318
315
|
GridSearchIcon: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
319
316
|
default: module.GridSearchIcon,
|
|
320
317
|
}))),
|
|
@@ -327,27 +324,9 @@ const DataGridEntries = {
|
|
|
327
324
|
GridTableRowsIcon: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
328
325
|
default: module.GridTableRowsIcon,
|
|
329
326
|
}))),
|
|
330
|
-
GridToolbar: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
331
|
-
default: module.GridToolbar,
|
|
332
|
-
}))),
|
|
333
|
-
GridToolbarColumnsButton: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
334
|
-
default: module.GridToolbarColumnsButton,
|
|
335
|
-
}))),
|
|
336
|
-
GridToolbarContainer: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
337
|
-
default: module.GridToolbarContainer,
|
|
338
|
-
}))),
|
|
339
|
-
GridToolbarDensitySelector: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
340
|
-
default: module.GridToolbarDensitySelector,
|
|
341
|
-
}))),
|
|
342
|
-
GridToolbarExport: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
343
|
-
default: module.GridToolbarExport,
|
|
344
|
-
}))),
|
|
345
327
|
GridToolbarExportContainer: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
346
328
|
default: module.GridToolbarExportContainer,
|
|
347
329
|
}))),
|
|
348
|
-
GridToolbarFilterButton: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
349
|
-
default: module.GridToolbarFilterButton,
|
|
350
|
-
}))),
|
|
351
330
|
GridTripleDotsVerticalIcon: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
352
331
|
default: module.GridTripleDotsVerticalIcon,
|
|
353
332
|
}))),
|
|
@@ -86,7 +86,7 @@ function assemblyManagerFactory(conf, pm) {
|
|
|
86
86
|
if (assembly) {
|
|
87
87
|
return assembly.isValidRefName(refName);
|
|
88
88
|
}
|
|
89
|
-
throw new Error(`Failed to look up refName
|
|
89
|
+
throw new Error(`Failed to look up refName:${refName} on assemblyName:${assemblyName} (assembly does not exist)`);
|
|
90
90
|
},
|
|
91
91
|
}))
|
|
92
92
|
.actions(self => ({
|
|
@@ -75,7 +75,7 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
75
75
|
options,
|
|
76
76
|
},
|
|
77
77
|
};
|
|
78
|
-
|
|
78
|
+
for (const [slotName, slotDefinition] of Object.entries(schemaDefinition)) {
|
|
79
79
|
if (((0, mobx_state_tree_1.isType)(slotDefinition) && (0, mobx_state_tree_1.isLateType)(slotDefinition)) ||
|
|
80
80
|
(0, util_1.isConfigurationSchemaType)(slotDefinition)) {
|
|
81
81
|
modelDefinition[slotName] = slotDefinition;
|
|
@@ -98,7 +98,7 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
98
98
|
else {
|
|
99
99
|
throw new Error(`invalid configuration schema definition, "${slotName}" must be either a valid configuration slot definition, a constant, or a nested configuration schema`);
|
|
100
100
|
}
|
|
101
|
-
}
|
|
101
|
+
}
|
|
102
102
|
let completeModel = mobx_state_tree_1.types
|
|
103
103
|
.model(`${modelName}ConfigurationSchema`, modelDefinition)
|
|
104
104
|
.actions(self => ({
|
package/configuration/util.js
CHANGED
|
@@ -58,7 +58,7 @@ function getTypeNamesFromExplicitlyTypedUnion(maybeUnionType) {
|
|
|
58
58
|
maybeUnionType = (0, mst_reflection_1.resolveLateType)(maybeUnionType);
|
|
59
59
|
if ((0, mobx_state_tree_1.isUnionType)(maybeUnionType)) {
|
|
60
60
|
const typeNames = [];
|
|
61
|
-
(0, mst_reflection_1.getUnionSubTypes)(maybeUnionType)
|
|
61
|
+
for (let type of (0, mst_reflection_1.getUnionSubTypes)(maybeUnionType)) {
|
|
62
62
|
type = (0, mst_reflection_1.resolveLateType)(type);
|
|
63
63
|
let typeName = getTypeNamesFromExplicitlyTypedUnion(type);
|
|
64
64
|
if (!typeName.length) {
|
|
@@ -69,7 +69,7 @@ function getTypeNamesFromExplicitlyTypedUnion(maybeUnionType) {
|
|
|
69
69
|
throw new Error(`invalid config schema type ${type}`);
|
|
70
70
|
}
|
|
71
71
|
typeNames.push(...typeName);
|
|
72
|
-
}
|
|
72
|
+
}
|
|
73
73
|
return typeNames;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -2,7 +2,7 @@ import type PluginManager from '../../PluginManager';
|
|
|
2
2
|
import type { AnyConfigurationModel } from '../../configuration';
|
|
3
3
|
import type { AugmentedRegion as Region } from '../../util/types';
|
|
4
4
|
import type { getSubAdapterType } from '../dataAdapterCache';
|
|
5
|
-
export declare
|
|
5
|
+
export declare class BaseAdapter {
|
|
6
6
|
config: AnyConfigurationModel;
|
|
7
7
|
getSubAdapter?: getSubAdapterType | undefined;
|
|
8
8
|
pluginManager?: PluginManager | undefined;
|
|
@@ -10,5 +10,5 @@ export declare abstract class BaseAdapter {
|
|
|
10
10
|
static capabilities: string[];
|
|
11
11
|
constructor(config?: AnyConfigurationModel, getSubAdapter?: getSubAdapterType | undefined, pluginManager?: PluginManager | undefined);
|
|
12
12
|
getConf(arg: string | string[]): any;
|
|
13
|
-
|
|
13
|
+
freeResources(_region: Region): void;
|
|
14
14
|
}
|
|
@@ -68,9 +68,16 @@ class BaseFeatureDataAdapter extends BaseAdapter_1.BaseAdapter {
|
|
|
68
68
|
start: Math.max(0, Math.round(sampleCenter - length / 2)),
|
|
69
69
|
end: Math.min(Math.round(sampleCenter + length / 2), end),
|
|
70
70
|
}, opts).pipe((0, operators_1.toArray)()));
|
|
71
|
-
return maybeRecordStats(
|
|
71
|
+
return maybeRecordStats({
|
|
72
|
+
interval: length,
|
|
73
|
+
statsSampleFeatures: features.length,
|
|
74
|
+
expansionTime,
|
|
75
|
+
stats: {
|
|
76
|
+
featureDensity: features.length / length,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
72
79
|
};
|
|
73
|
-
const maybeRecordStats = async (interval, stats, statsSampleFeatures, expansionTime) => {
|
|
80
|
+
const maybeRecordStats = async ({ interval, stats, statsSampleFeatures, expansionTime, }) => {
|
|
74
81
|
const refLen = region.end - region.start;
|
|
75
82
|
if (statsSampleFeatures >= 70 || interval * 2 > refLen) {
|
|
76
83
|
return stats;
|
|
@@ -2,9 +2,9 @@ export interface BaseOptions {
|
|
|
2
2
|
stopToken?: string;
|
|
3
3
|
bpPerPx?: number;
|
|
4
4
|
sessionId?: string;
|
|
5
|
+
signal?: AbortSignal;
|
|
5
6
|
statusCallback?: (message: string) => void;
|
|
6
7
|
headers?: Record<string, string>;
|
|
7
|
-
[key: string]: unknown;
|
|
8
8
|
}
|
|
9
9
|
export type SearchType = 'full' | 'prefix' | 'exact';
|
|
10
10
|
export interface BaseTextSearchArgs {
|
|
@@ -5,7 +5,22 @@ function x() { }
|
|
|
5
5
|
const configSchema = (0, configuration_1.ConfigurationSchema)('CytobandAdapter', {
|
|
6
6
|
cytobandLocation: {
|
|
7
7
|
type: 'fileLocation',
|
|
8
|
-
defaultValue: {
|
|
8
|
+
defaultValue: {
|
|
9
|
+
uri: '/path/to/cytoband.txt.gz',
|
|
10
|
+
},
|
|
9
11
|
},
|
|
10
|
-
}, {
|
|
12
|
+
}, {
|
|
13
|
+
explicitlyTyped: true,
|
|
14
|
+
preProcessSnapshot: snap => {
|
|
15
|
+
return snap.uri
|
|
16
|
+
? {
|
|
17
|
+
...snap,
|
|
18
|
+
cytobandLocation: {
|
|
19
|
+
uri: snap.uri,
|
|
20
|
+
baseUri: snap.baseUri,
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
: snap;
|
|
24
|
+
},
|
|
25
|
+
});
|
|
11
26
|
exports.default = configSchema;
|
|
@@ -33,22 +33,22 @@ function freeAdapterResources(args) {
|
|
|
33
33
|
const specKeys = Object.keys(args);
|
|
34
34
|
if (specKeys.length === 1 && specKeys[0] === 'sessionId') {
|
|
35
35
|
const { sessionId } = args;
|
|
36
|
-
|
|
36
|
+
for (const [cacheKey, cacheEntry] of Object.entries(adapterCache)) {
|
|
37
37
|
cacheEntry.sessionIds.delete(sessionId);
|
|
38
38
|
if (cacheEntry.sessionIds.size === 0) {
|
|
39
39
|
delete adapterCache[cacheKey];
|
|
40
40
|
}
|
|
41
|
-
}
|
|
41
|
+
}
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
Object.values(adapterCache)
|
|
44
|
+
for (const cacheEntry of Object.values(adapterCache)) {
|
|
45
45
|
const regions = args.regions || (args.region ? [args.region] : []);
|
|
46
46
|
for (const region of regions) {
|
|
47
47
|
if (region.refName !== undefined) {
|
|
48
48
|
cacheEntry.dataAdapter.freeResources(region);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
function clearAdapterCache() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "JBrowse 2 core libraries used by plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"@gmod/abortable-promise-cache": "^2.0.0",
|
|
35
35
|
"@gmod/bgzf-filehandle": "^2.0.1",
|
|
36
36
|
"@gmod/http-range-fetcher": "^4.0.0",
|
|
37
|
-
"@mui/icons-material": "^
|
|
38
|
-
"@mui/material": "^
|
|
39
|
-
"@mui/x-data-grid": "^
|
|
37
|
+
"@mui/icons-material": "^7.0.0",
|
|
38
|
+
"@mui/material": "^7.0.0",
|
|
39
|
+
"@mui/x-data-grid": "^8.0.0",
|
|
40
40
|
"canvas-sequencer": "^3.1.0",
|
|
41
41
|
"canvas2svg": "^1.0.16",
|
|
42
42
|
"colord": "^2.9.3",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"access": "public",
|
|
70
70
|
"directory": "dist"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "0bb64d8cc7ecdd167515308b31eec3d9acbc59e4"
|
|
73
73
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import RpcMethodType from './RpcMethodType';
|
|
2
2
|
import type { RenderArgs } from '@jbrowse/core/rpc/coreRpcMethods';
|
|
3
3
|
export default abstract class RpcMethodTypeWithFiltersAndRenameRegions extends RpcMethodType {
|
|
4
|
-
deserializeArguments(args:
|
|
4
|
+
deserializeArguments<T>(args: T & {
|
|
5
|
+
filters?: any;
|
|
6
|
+
}, rpcDriverClassName: string): Promise<T>;
|
|
5
7
|
serializeArguments(args: RenderArgs & {
|
|
6
8
|
stopToken?: string;
|
|
7
9
|
statusCallback?: (arg: string) => void;
|
|
@@ -91,7 +91,9 @@ function createBaseTrackModel(pm, trackType, baseTrackConfig) {
|
|
|
91
91
|
const conf = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), displayId);
|
|
92
92
|
const t = self.displays.filter(d => d.configuration === conf);
|
|
93
93
|
(0, mobx_1.transaction)(() => {
|
|
94
|
-
|
|
94
|
+
for (const d of t) {
|
|
95
|
+
self.displays.remove(d);
|
|
96
|
+
}
|
|
95
97
|
});
|
|
96
98
|
return t.length;
|
|
97
99
|
},
|
|
@@ -87,14 +87,14 @@ function createBaseTrackConfig(pluginManager) {
|
|
|
87
87
|
const { displays = [] } = snap;
|
|
88
88
|
if (snap.trackId !== 'placeholderId') {
|
|
89
89
|
const configDisplayTypes = new Set(displays.map(d => d.type));
|
|
90
|
-
pluginManager.getTrackType(snap.type).displayTypes
|
|
90
|
+
for (const d of pluginManager.getTrackType(snap.type).displayTypes) {
|
|
91
91
|
if (!configDisplayTypes.has(d.name)) {
|
|
92
92
|
displays.push({
|
|
93
93
|
displayId: `${snap.trackId}-${d.name}`,
|
|
94
94
|
type: d.name,
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
}
|
|
97
|
+
}
|
|
98
98
|
}
|
|
99
99
|
return { ...snap, displays };
|
|
100
100
|
},
|
|
@@ -14,22 +14,21 @@ class CircularChordRendererType extends FeatureRendererType_1.default {
|
|
|
14
14
|
}
|
|
15
15
|
deserializeResultsInClient(res, args) {
|
|
16
16
|
const deserializedFeatures = new Map(res.features.map(f => util_1.SimpleFeature.fromJSON(f)).map(f => [f.id(), f]));
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
return args.exportSVG
|
|
18
|
+
? {
|
|
19
19
|
...res,
|
|
20
20
|
features: deserializedFeatures,
|
|
21
21
|
blockKey: 'circularChord',
|
|
22
22
|
html: this.supportsSVG
|
|
23
23
|
? res.html
|
|
24
24
|
: '<text y="12" fill="black">SVG export not supported for this track</text>',
|
|
25
|
+
}
|
|
26
|
+
: {
|
|
27
|
+
...res,
|
|
28
|
+
features: deserializedFeatures,
|
|
29
|
+
blockKey: 'circularChord',
|
|
30
|
+
reactElement: ((0, jsx_runtime_1.jsx)(RpcRenderedSvgGroup_1.default, { ...args, ...res, features: deserializedFeatures, RenderingComponent: this.ReactComponent })),
|
|
25
31
|
};
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
...res,
|
|
29
|
-
features: deserializedFeatures,
|
|
30
|
-
blockKey: 'circularChord',
|
|
31
|
-
reactElement: ((0, jsx_runtime_1.jsx)(RpcRenderedSvgGroup_1.default, { ...args, ...res, features: deserializedFeatures, RenderingComponent: this.ReactComponent })),
|
|
32
|
-
};
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
exports.default = CircularChordRendererType;
|
|
@@ -49,6 +49,7 @@ class FeatureRendererType extends ServerSideRendererType_1.default {
|
|
|
49
49
|
if (!(0, BaseAdapter_1.isFeatureAdapter)(dataAdapter)) {
|
|
50
50
|
throw new Error('Adapter does not support retrieving features');
|
|
51
51
|
}
|
|
52
|
+
(0, stopToken_1.checkStopToken)(stopToken);
|
|
52
53
|
const requestRegions = regions.map(r => ({
|
|
53
54
|
...r,
|
|
54
55
|
start: Math.floor(r.start),
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { AnyReactComponentType, Feature } from '../../util';
|
|
2
2
|
import type { ThemeOptions } from '@mui/material';
|
|
3
|
-
|
|
3
|
+
declare const RpcRenderedSvgGroup: (props: {
|
|
4
4
|
html: string;
|
|
5
5
|
features: Map<string, Feature>;
|
|
6
6
|
theme: ThemeOptions;
|
|
7
|
-
displayModel?: any;
|
|
8
7
|
RenderingComponent: AnyReactComponentType;
|
|
9
|
-
}
|
|
10
|
-
declare const RpcRenderedSvgGroup: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
9
|
export default RpcRenderedSvgGroup;
|