@jbrowse/plugin-config 2.17.0 → 2.18.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/dist/ConfigurationEditorWidget/components/BooleanEditor.js +1 -1
- package/dist/ConfigurationEditorWidget/components/CallbackEditor.js +3 -8
- package/dist/ConfigurationEditorWidget/components/ColorEditor.js +2 -2
- package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +2 -2
- package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.js +4 -11
- package/dist/ConfigurationEditorWidget/components/ConfigurationTextField.d.ts +1 -1
- package/dist/ConfigurationEditorWidget/components/ConfigurationTextField.js +1 -3
- package/dist/ConfigurationEditorWidget/components/JsonEditor.js +1 -3
- package/dist/ConfigurationEditorWidget/components/NumberMapEditor.js +3 -4
- package/dist/ConfigurationEditorWidget/components/SlotEditor.d.ts +1 -1
- package/dist/ConfigurationEditorWidget/components/SlotEditor.js +11 -16
- package/dist/ConfigurationEditorWidget/components/StringArrayEditor.js +2 -3
- package/dist/ConfigurationEditorWidget/components/StringArrayMapEditor.js +3 -5
- package/dist/ConfigurationEditorWidget/components/TypeSelector.d.ts +1 -1
- package/dist/ConfigurationEditorWidget/index.d.ts +1 -1
- package/dist/ConfigurationEditorWidget/index.js +1 -1
- package/dist/ConfigurationEditorWidget/model.d.ts +1 -1
- package/dist/ConfigurationEditorWidget/model.js +1 -3
- package/dist/FromConfigAdapter/FromConfigAdapter.d.ts +5 -5
- package/dist/FromConfigAdapter/FromConfigAdapter.js +3 -4
- package/dist/FromConfigAdapter/configSchema.d.ts +0 -3
- package/dist/FromConfigAdapter/configSchema.js +1 -7
- package/dist/FromConfigAdapter/index.d.ts +1 -1
- package/dist/FromConfigRegionsAdapter/FromConfigRegionsAdapter.d.ts +5 -12
- package/dist/FromConfigRegionsAdapter/FromConfigRegionsAdapter.js +2 -12
- package/dist/FromConfigRegionsAdapter/configSchema.d.ts +0 -3
- package/dist/FromConfigRegionsAdapter/configSchema.js +1 -8
- package/dist/FromConfigRegionsAdapter/index.d.ts +1 -1
- package/dist/FromConfigSequenceAdapter/FromConfigSequenceAdapter.d.ts +3 -16
- package/dist/FromConfigSequenceAdapter/FromConfigSequenceAdapter.js +3 -18
- package/dist/FromConfigSequenceAdapter/configSchema.d.ts +0 -3
- package/dist/FromConfigSequenceAdapter/configSchema.js +1 -7
- package/dist/FromConfigSequenceAdapter/index.d.ts +1 -1
- package/dist/NcbiSequenceReportAliasAdapter/NcbiSequenceReportAliasAdapter.d.ts +2 -1
- package/dist/NcbiSequenceReportAliasAdapter/configSchema.d.ts +0 -3
- package/dist/NcbiSequenceReportAliasAdapter/configSchema.js +1 -8
- package/dist/NcbiSequenceReportAliasAdapter/index.d.ts +1 -1
- package/dist/RefNameAliasAdapter/RefNameAliasAdapter.d.ts +2 -1
- package/dist/RefNameAliasAdapter/configSchema.d.ts +0 -8
- package/dist/RefNameAliasAdapter/configSchema.js +1 -14
- package/dist/RefNameAliasAdapter/index.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/esm/ConfigurationEditorWidget/components/BooleanEditor.js +1 -1
- package/esm/ConfigurationEditorWidget/components/CallbackEditor.js +3 -8
- package/esm/ConfigurationEditorWidget/components/ColorEditor.js +2 -2
- package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +2 -2
- package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.js +5 -12
- package/esm/ConfigurationEditorWidget/components/ConfigurationTextField.d.ts +1 -1
- package/esm/ConfigurationEditorWidget/components/ConfigurationTextField.js +1 -3
- package/esm/ConfigurationEditorWidget/components/HeadingComponent.js +1 -1
- package/esm/ConfigurationEditorWidget/components/JsonEditor.js +1 -3
- package/esm/ConfigurationEditorWidget/components/NumberMapEditor.js +3 -4
- package/esm/ConfigurationEditorWidget/components/SlotEditor.d.ts +1 -1
- package/esm/ConfigurationEditorWidget/components/SlotEditor.js +12 -17
- package/esm/ConfigurationEditorWidget/components/StringArrayEditor.js +2 -3
- package/esm/ConfigurationEditorWidget/components/StringArrayMapEditor.js +3 -5
- package/esm/ConfigurationEditorWidget/components/TypeSelector.d.ts +1 -1
- package/esm/ConfigurationEditorWidget/index.d.ts +1 -1
- package/esm/ConfigurationEditorWidget/index.js +1 -1
- package/esm/ConfigurationEditorWidget/model.d.ts +1 -1
- package/esm/ConfigurationEditorWidget/model.js +1 -3
- package/esm/FromConfigAdapter/FromConfigAdapter.d.ts +5 -5
- package/esm/FromConfigAdapter/FromConfigAdapter.js +3 -4
- package/esm/FromConfigAdapter/configSchema.d.ts +0 -3
- package/esm/FromConfigAdapter/configSchema.js +1 -7
- package/esm/FromConfigAdapter/index.d.ts +1 -1
- package/esm/FromConfigRegionsAdapter/FromConfigRegionsAdapter.d.ts +5 -12
- package/esm/FromConfigRegionsAdapter/FromConfigRegionsAdapter.js +3 -13
- package/esm/FromConfigRegionsAdapter/configSchema.d.ts +0 -3
- package/esm/FromConfigRegionsAdapter/configSchema.js +1 -8
- package/esm/FromConfigRegionsAdapter/index.d.ts +1 -1
- package/esm/FromConfigSequenceAdapter/FromConfigSequenceAdapter.d.ts +3 -16
- package/esm/FromConfigSequenceAdapter/FromConfigSequenceAdapter.js +3 -18
- package/esm/FromConfigSequenceAdapter/configSchema.d.ts +0 -3
- package/esm/FromConfigSequenceAdapter/configSchema.js +1 -7
- package/esm/FromConfigSequenceAdapter/index.d.ts +1 -1
- package/esm/NcbiSequenceReportAliasAdapter/NcbiSequenceReportAliasAdapter.d.ts +2 -1
- package/esm/NcbiSequenceReportAliasAdapter/NcbiSequenceReportAliasAdapter.js +1 -1
- package/esm/NcbiSequenceReportAliasAdapter/configSchema.d.ts +0 -3
- package/esm/NcbiSequenceReportAliasAdapter/configSchema.js +1 -8
- package/esm/NcbiSequenceReportAliasAdapter/index.d.ts +1 -1
- package/esm/RefNameAliasAdapter/RefNameAliasAdapter.d.ts +2 -1
- package/esm/RefNameAliasAdapter/RefNameAliasAdapter.js +1 -1
- package/esm/RefNameAliasAdapter/configSchema.d.ts +0 -8
- package/esm/RefNameAliasAdapter/configSchema.js +1 -14
- package/esm/RefNameAliasAdapter/index.d.ts +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +2 -2
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function NcbiSequenceReportAliasAdapterF(pluginManager: PluginManager): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import type { BaseRefNameAliasAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
3
|
export default class RefNameAliasAdapter extends BaseAdapter implements BaseRefNameAliasAdapter {
|
|
3
4
|
getRefNameAliases(): Promise<{
|
|
4
5
|
refName: string;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
declare const RefNameAliasAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
location: {
|
|
6
3
|
type: string;
|
|
7
4
|
defaultValue: {
|
|
@@ -9,11 +6,6 @@ declare const RefNameAliasAdapter: import("@jbrowse/core/configuration/configura
|
|
|
9
6
|
locationType: string;
|
|
10
7
|
};
|
|
11
8
|
};
|
|
12
|
-
/**
|
|
13
|
-
* #slot
|
|
14
|
-
* by default, the "ref names that match the fasta" are assumed to be in the
|
|
15
|
-
* first column (0), change this variable if needed
|
|
16
|
-
*/
|
|
17
9
|
refNameColumn: {
|
|
18
10
|
type: string;
|
|
19
11
|
defaultValue: number;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
|
|
5
|
-
* #config RefNameAliasAdapter
|
|
6
|
-
* can read "chromAliases" type files from UCSC or any tab separated file of
|
|
7
|
-
* refName aliases
|
|
8
|
-
*/
|
|
9
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
10
5
|
const RefNameAliasAdapter = (0, configuration_1.ConfigurationSchema)('RefNameAliasAdapter', {
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
*/
|
|
14
6
|
location: {
|
|
15
7
|
type: 'fileLocation',
|
|
16
8
|
defaultValue: {
|
|
@@ -18,11 +10,6 @@ const RefNameAliasAdapter = (0, configuration_1.ConfigurationSchema)('RefNameAli
|
|
|
18
10
|
locationType: 'UriLocation',
|
|
19
11
|
},
|
|
20
12
|
},
|
|
21
|
-
/**
|
|
22
|
-
* #slot
|
|
23
|
-
* by default, the "ref names that match the fasta" are assumed to be in the
|
|
24
|
-
* first column (0), change this variable if needed
|
|
25
|
-
*/
|
|
26
13
|
refNameColumn: {
|
|
27
14
|
type: 'number',
|
|
28
15
|
defaultValue: 0,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function RefNameAliasAdapterF(pluginManager: PluginManager): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
3
|
declare const LazyConfigurationEditorComponent: import("react").LazyExoticComponent<({ model, }: {
|
|
4
4
|
model: {
|
|
5
5
|
target: import("@jbrowse/core/configuration").AnyConfigurationModel;
|
package/dist/index.js
CHANGED
|
@@ -29,12 +29,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.ConfigurationEditor = void 0;
|
|
30
30
|
const react_1 = require("react");
|
|
31
31
|
const Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
|
|
32
|
+
const ConfigurationEditorWidget_1 = __importDefault(require("./ConfigurationEditorWidget"));
|
|
32
33
|
const FromConfigAdapter_1 = __importDefault(require("./FromConfigAdapter"));
|
|
33
34
|
const FromConfigRegionsAdapter_1 = __importDefault(require("./FromConfigRegionsAdapter"));
|
|
34
35
|
const FromConfigSequenceAdapter_1 = __importDefault(require("./FromConfigSequenceAdapter"));
|
|
35
|
-
const RefNameAliasAdapter_1 = __importDefault(require("./RefNameAliasAdapter"));
|
|
36
|
-
const ConfigurationEditorWidget_1 = __importDefault(require("./ConfigurationEditorWidget"));
|
|
37
36
|
const NcbiSequenceReportAliasAdapter_1 = __importDefault(require("./NcbiSequenceReportAliasAdapter"));
|
|
37
|
+
const RefNameAliasAdapter_1 = __importDefault(require("./RefNameAliasAdapter"));
|
|
38
38
|
const LazyConfigurationEditorComponent = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./ConfigurationEditorWidget/components/ConfigurationEditor'))));
|
|
39
39
|
exports.ConfigurationEditor = LazyConfigurationEditorComponent;
|
|
40
40
|
class ConfigurationPlugin extends Plugin_1.default {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
2
|
import { Checkbox, FormControl, FormControlLabel, FormHelperText, } from '@mui/material';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
4
|
const BooleanEditor = observer(function ({ slot, }) {
|
|
5
5
|
return (React.createElement(FormControl, null,
|
|
6
6
|
React.createElement(FormControlLabel, { label: slot.name, control: React.createElement(Checkbox, { checked: slot.value, onChange: evt => {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { Tooltip, IconButton, TextField } from '@mui/material';
|
|
3
2
|
import { useDebounce } from '@jbrowse/core/util';
|
|
4
3
|
import { stringToJexlExpression } from '@jbrowse/core/util/jexlStrings';
|
|
5
|
-
import
|
|
4
|
+
import HelpIcon from '@mui/icons-material/Help';
|
|
5
|
+
import { IconButton, TextField, Tooltip } from '@mui/material';
|
|
6
6
|
import { observer } from 'mobx-react';
|
|
7
|
+
import { getEnv } from 'mobx-state-tree';
|
|
7
8
|
import { makeStyles } from 'tss-react/mui';
|
|
8
|
-
// icons
|
|
9
|
-
import HelpIcon from '@mui/icons-material/Help';
|
|
10
|
-
// Optimize by using system default fonts:
|
|
11
|
-
// https://css-tricks.com/snippets/css/font-stacks/
|
|
12
9
|
const fontFamily = 'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace';
|
|
13
10
|
const useStyles = makeStyles()(theme => ({
|
|
14
11
|
callbackEditor: {
|
|
@@ -52,8 +49,6 @@ const CallbackEditor = observer(function ({ slot, }) {
|
|
|
52
49
|
setCodeError(e);
|
|
53
50
|
}
|
|
54
51
|
}, [debouncedCode, slot]);
|
|
55
|
-
// if default value is a callback, will have to remove jexl:
|
|
56
|
-
// do this last
|
|
57
52
|
return (React.createElement(React.Fragment, null,
|
|
58
53
|
error ? React.createElement("p", { className: classes.error }, `${error}`) : null,
|
|
59
54
|
React.createElement("div", { className: classes.callbackContainer },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
|
-
import { TextField } from '@mui/material';
|
|
4
2
|
import ColorPicker from '@jbrowse/core/ui/ColorPicker';
|
|
3
|
+
import { TextField } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
5
|
export const ColorSlot = (props) => {
|
|
6
6
|
const { value = '#000', label = '', TextFieldProps = {}, onChange } = props;
|
|
7
7
|
const [displayed, setDisplayed] = useState(false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { AbstractSessionModel } from '@jbrowse/core/util';
|
|
4
4
|
declare const ConfigurationEditor: ({ model, }: {
|
|
5
5
|
model: {
|
|
6
6
|
target: AnyConfigurationModel;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { getTypeNamesFromExplicitlyTypedUnion, isConfigurationSchemaType, isConfigurationSlotType, readConfObject, } from '@jbrowse/core/configuration';
|
|
3
|
+
import SanitizedHTML from '@jbrowse/core/ui/SanitizedHTML';
|
|
4
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
5
|
+
import { Accordion, AccordionDetails, AccordionSummary, FormGroup, Typography, } from '@mui/material';
|
|
4
6
|
import { observer } from 'mobx-react';
|
|
5
7
|
import { getMembers } from 'mobx-state-tree';
|
|
6
8
|
import { singular } from 'pluralize';
|
|
7
|
-
import
|
|
8
|
-
import { readConfObject, getTypeNamesFromExplicitlyTypedUnion, isConfigurationSchemaType, isConfigurationSlotType, } from '@jbrowse/core/configuration';
|
|
9
|
-
// icons
|
|
10
|
-
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
11
|
-
// locals
|
|
9
|
+
import { makeStyles } from 'tss-react/mui';
|
|
12
10
|
import SlotEditor from './SlotEditor';
|
|
13
11
|
import TypeSelector from './TypeSelector';
|
|
14
12
|
const useStyles = makeStyles()(theme => ({
|
|
@@ -39,8 +37,6 @@ const Member = observer(function (props) {
|
|
|
39
37
|
return React.createElement(Member, { key: key, ...props, slot: subslot, slotName: key });
|
|
40
38
|
});
|
|
41
39
|
}
|
|
42
|
-
// if this is an explicitly typed schema, make a type-selecting dropdown
|
|
43
|
-
// that can be used to change its type
|
|
44
40
|
const typeNameChoices = getTypeNamesFromExplicitlyTypedUnion(slotSchema);
|
|
45
41
|
return (React.createElement(Accordion, { defaultExpanded: true, className: classes.accordion },
|
|
46
42
|
React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, { className: classes.icon }) },
|
|
@@ -67,9 +63,6 @@ const Schema = observer(function ({ schema, path = [], }) {
|
|
|
67
63
|
});
|
|
68
64
|
const ConfigurationEditor = observer(function ({ model, }) {
|
|
69
65
|
const { classes } = useStyles();
|
|
70
|
-
// key forces a re-render, otherwise the same field can end up being used for
|
|
71
|
-
// different tracks since only the backing model changes for example see pr
|
|
72
|
-
// #804
|
|
73
66
|
const { target } = model;
|
|
74
67
|
const key = readConfObject(target, 'trackId');
|
|
75
68
|
const name = readConfObject(target, 'name');
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TextField } from '@mui/material';
|
|
3
2
|
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
4
|
-
|
|
5
|
-
// div because the default is p which does not like div children
|
|
3
|
+
import { TextField } from '@mui/material';
|
|
6
4
|
export default function ConfigurationTextField(props) {
|
|
7
5
|
const { helperText } = props;
|
|
8
6
|
return (React.createElement(TextField, { ...props, helperText: React.createElement(SanitizedHTML, { html: helperText || '' }), fullWidth: true, slotProps: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
|
-
import {
|
|
3
|
+
import { getType, isStateTreeNode } from 'mobx-state-tree';
|
|
4
4
|
const HeadingComponent = observer(function ({ model, }) {
|
|
5
5
|
if (model === null || model === void 0 ? void 0 : model.target) {
|
|
6
6
|
if (model.target.type) {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { InputLabel, TextField } from '@mui/material';
|
|
3
|
-
import { makeStyles } from 'tss-react/mui';
|
|
4
3
|
import { observer } from 'mobx-react';
|
|
5
|
-
|
|
4
|
+
import { makeStyles } from 'tss-react/mui';
|
|
6
5
|
const fontSize = '12px';
|
|
7
|
-
// Optimize by using system default fonts: https://css-tricks.com/snippets/css/font-stacks/
|
|
8
6
|
const fontFamily = 'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace';
|
|
9
7
|
const useStyles = makeStyles()(theme => ({
|
|
10
8
|
error: {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
3
|
+
import DeleteIcon from '@mui/icons-material/Delete';
|
|
3
4
|
import { Card, CardContent, CardHeader, FormHelperText, IconButton, InputAdornment, InputLabel, TextField, } from '@mui/material';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
4
6
|
import { makeStyles } from 'tss-react/mui';
|
|
5
|
-
// icons
|
|
6
|
-
import DeleteIcon from '@mui/icons-material/Delete';
|
|
7
|
-
import AddIcon from '@mui/icons-material/Add';
|
|
8
7
|
import NumberEditor from './NumberEditor';
|
|
9
8
|
const useStyles = makeStyles()(theme => ({
|
|
10
9
|
card: {
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
|
-
import { getPropertyMembers } from 'mobx-state-tree';
|
|
4
|
-
import { getEnv } from '@jbrowse/core/util';
|
|
5
2
|
import { FileSelector } from '@jbrowse/core/ui';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
// icons
|
|
3
|
+
import { getEnv } from '@jbrowse/core/util';
|
|
4
|
+
import { getSubType, getUnionSubTypes } from '@jbrowse/core/util/mst-reflection';
|
|
9
5
|
import RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';
|
|
10
|
-
|
|
11
|
-
import
|
|
6
|
+
import { IconButton, MenuItem, Paper, SvgIcon, TextField } from '@mui/material';
|
|
7
|
+
import { observer } from 'mobx-react';
|
|
8
|
+
import { getPropertyMembers } from 'mobx-state-tree';
|
|
9
|
+
import BooleanEditor from './BooleanEditor';
|
|
12
10
|
import CallbackEditor from './CallbackEditor';
|
|
13
11
|
import ColorEditor from './ColorEditor';
|
|
14
|
-
import JsonEditor from './JsonEditor';
|
|
15
|
-
import StringArrayMapEditor from './StringArrayMapEditor';
|
|
16
12
|
import ConfigurationTextField from './ConfigurationTextField';
|
|
17
|
-
import
|
|
13
|
+
import JsonEditor from './JsonEditor';
|
|
18
14
|
import NumberEditor from './NumberEditor';
|
|
19
|
-
import
|
|
15
|
+
import NumberMapEditor from './NumberMapEditor';
|
|
16
|
+
import StringArrayEditor from './StringArrayEditor';
|
|
17
|
+
import StringArrayMapEditor from './StringArrayMapEditor';
|
|
20
18
|
import { useSlotEditorStyles } from './useSlotEditorStyles';
|
|
21
19
|
const StringEditor = observer(function ({ slot, }) {
|
|
22
20
|
return (React.createElement(ConfigurationTextField, { label: slot.name, helperText: slot.description, value: slot.value, onChange: evt => {
|
|
@@ -28,7 +26,6 @@ const TextEditor = observer(function ({ slot, }) {
|
|
|
28
26
|
slot.set(evt.target.value);
|
|
29
27
|
} }));
|
|
30
28
|
});
|
|
31
|
-
// checked checkbox, looks like a styled (x)
|
|
32
29
|
const SvgCheckbox = () => (React.createElement(SvgIcon, null,
|
|
33
30
|
React.createElement("path", { d: "M20.41,3C21.8,5.71 22.35,8.84 22,12C21.8,15.16 20.7,18.29 18.83,21L17.3,20C18.91,17.57 19.85,14.8 20,12C20.34,9.2 19.89,6.43 18.7,4L20.41,3M5.17,3L6.7,4C5.09,6.43 4.15,9.2 4,12C3.66,14.8 4.12,17.57 5.3,20L3.61,21C2.21,18.29 1.65,15.17 2,12C2.2,8.84 3.3,5.71 5.17,3M12.08,10.68L14.4,7.45H16.93L13.15,12.45L15.35,17.37H13.09L11.71,14L9.28,17.33H6.76L10.66,12.21L8.53,7.45H10.8L12.08,10.68Z" })));
|
|
34
31
|
const IntegerEditor = observer(function ({ slot, }) {
|
|
@@ -54,9 +51,7 @@ const FileSelectorWrapper = observer(function ({ slot, }) {
|
|
|
54
51
|
var _a;
|
|
55
52
|
return (React.createElement(FileSelector, { location: slot.value, setLocation: location => {
|
|
56
53
|
slot.set(location);
|
|
57
|
-
}, name: slot.name, description: slot.description,
|
|
58
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
59
|
-
rootModel: (_a = getEnv(slot).pluginManager) === null || _a === void 0 ? void 0 : _a.rootModel }));
|
|
54
|
+
}, name: slot.name, description: slot.description, rootModel: (_a = getEnv(slot).pluginManager) === null || _a === void 0 ? void 0 : _a.rootModel }));
|
|
60
55
|
});
|
|
61
56
|
const valueComponents = {
|
|
62
57
|
string: StringEditor,
|
|
@@ -78,7 +73,7 @@ const SlotEditor = observer(function ({ slot, slotSchema, }) {
|
|
|
78
73
|
const { type } = slot;
|
|
79
74
|
let ValueComponent = slot.isCallback
|
|
80
75
|
? CallbackEditor
|
|
81
|
-
:
|
|
76
|
+
:
|
|
82
77
|
valueComponents[type];
|
|
83
78
|
if (!ValueComponent) {
|
|
84
79
|
console.warn(`no slot editor defined for ${type}, editing as string`);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
|
-
import { Button, FormHelperText, IconButton, InputAdornment, InputLabel, List, ListItem, TextField, } from '@mui/material';
|
|
4
|
-
// icons
|
|
5
2
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
3
|
+
import { Button, FormHelperText, IconButton, InputAdornment, InputLabel, List, ListItem, TextField, } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
6
5
|
const StringArrayEditor = observer(function ({ slot, }) {
|
|
7
6
|
const [value, setValue] = useState('');
|
|
8
7
|
const [addNew, setAddNew] = useState(false);
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import AddIcon from '@mui/icons-material/Add';
|
|
3
|
+
import DeleteIcon from '@mui/icons-material/Delete';
|
|
3
4
|
import { Card, CardContent, CardHeader, FormHelperText, IconButton, InputAdornment, InputLabel, TextField, } from '@mui/material';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
4
6
|
import { makeStyles } from 'tss-react/mui';
|
|
5
|
-
// icons
|
|
6
|
-
import DeleteIcon from '@mui/icons-material/Delete';
|
|
7
|
-
import AddIcon from '@mui/icons-material/Add';
|
|
8
|
-
// locals
|
|
9
7
|
import StringArrayEditor from './StringArrayEditor';
|
|
10
8
|
const useStyles = makeStyles()(theme => ({
|
|
11
9
|
card: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
3
|
declare const TypeSelector: ({ typeNameChoices, slot, slotName, onChange, }: {
|
|
4
4
|
typeNameChoices: string[];
|
|
5
5
|
slot: AnyConfigurationModel;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function registerConfigurationEditorWidget(pluginManager: PluginManager): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
2
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
3
3
|
import { WidgetType } from '@jbrowse/core/pluggableElementTypes';
|
|
4
|
-
import stateModelFactory from './model';
|
|
5
4
|
import HeadingComponent from './components/HeadingComponent';
|
|
5
|
+
import stateModelFactory from './model';
|
|
6
6
|
const configSchema = ConfigurationSchema('ConfigurationEditorWidget', {});
|
|
7
7
|
const LazyConfigurationEditorComponent = lazy(() => import('./components/ConfigurationEditor'));
|
|
8
8
|
export default function registerConfigurationEditorWidget(pluginManager) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
3
3
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
4
4
|
type: import("mobx-state-tree").ISimpleType<"ConfigurationEditorWidget">;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { types } from 'mobx-state-tree';
|
|
2
1
|
import { ElementId } from '@jbrowse/core/util/types/mst';
|
|
2
|
+
import { types } from 'mobx-state-tree';
|
|
3
3
|
export default function stateModelFactory(pluginManager) {
|
|
4
4
|
return types
|
|
5
5
|
.model('ConfigurationEditorWidget', {
|
|
6
6
|
id: ElementId,
|
|
7
7
|
type: types.literal('ConfigurationEditorWidget'),
|
|
8
|
-
// If you add different types of targets, don't forget to account for that
|
|
9
|
-
// in the key of ./components/ConfigurationEditor.js
|
|
10
8
|
target: types.safeReference(pluginManager.pluggableConfigSchemaType('track')),
|
|
11
9
|
})
|
|
12
10
|
.actions(self => ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
2
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
|
+
import type { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
5
|
+
import type { Feature, SimpleFeatureSerialized } from '@jbrowse/core/util/simpleFeature';
|
|
6
|
+
import type { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
7
7
|
export declare function makeFeatures(fdata: SimpleFeatureSerialized[]): Map<string, Feature[]>;
|
|
8
8
|
export default class FromConfigAdapter extends BaseFeatureDataAdapter {
|
|
9
9
|
protected features: Map<string, Feature[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
1
2
|
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
-
import SimpleFeature from '@jbrowse/core/util/simpleFeature';
|
|
3
3
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
4
|
-
import
|
|
4
|
+
import SimpleFeature from '@jbrowse/core/util/simpleFeature';
|
|
5
5
|
export function makeFeatures(fdata) {
|
|
6
6
|
const features = new Map();
|
|
7
7
|
for (const entry of fdata) {
|
|
@@ -14,7 +14,6 @@ export function makeFeatures(fdata) {
|
|
|
14
14
|
}
|
|
15
15
|
bucket.push(f);
|
|
16
16
|
}
|
|
17
|
-
// sort the features on each reference sequence by start coordinate
|
|
18
17
|
for (const refFeatures of features.values()) {
|
|
19
18
|
refFeatures.sort((a, b) => a.get('start') - b.get('start'));
|
|
20
19
|
}
|
|
@@ -47,5 +46,5 @@ export default class FromConfigAdapter extends BaseFeatureDataAdapter {
|
|
|
47
46
|
observer.complete();
|
|
48
47
|
});
|
|
49
48
|
}
|
|
50
|
-
freeResources(
|
|
49
|
+
freeResources() { }
|
|
51
50
|
}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
|
|
3
|
-
* #config FromConfigAdapter
|
|
4
|
-
*/
|
|
5
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
function x() { }
|
|
6
3
|
const configSchema = ConfigurationSchema('FromConfigAdapter', {
|
|
7
|
-
/**
|
|
8
|
-
* #slot
|
|
9
|
-
*/
|
|
10
4
|
features: {
|
|
11
5
|
type: 'frozen',
|
|
12
6
|
defaultValue: [],
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function FromConfigAdapterF(pluginManager: PluginManager): void;
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import { BaseAdapter
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
* Adapter that just returns the features defined in its `features` configuration
|
|
7
|
-
* key, like:
|
|
8
|
-
* `"features": [ { "refName": "ctgA", "start":1, "end":20 }, ... ]`
|
|
9
|
-
*/
|
|
1
|
+
import { BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
|
+
import type { RegionsAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
5
|
+
import type { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
10
6
|
export default class FromConfigRegionsAdapter extends BaseAdapter implements RegionsAdapter {
|
|
11
7
|
private features;
|
|
12
8
|
constructor(config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
|
|
13
|
-
/**
|
|
14
|
-
* Get refName, start, and end for all features after collapsing any overlaps
|
|
15
|
-
*/
|
|
16
9
|
getRegions(): Promise<{
|
|
17
10
|
refName: string;
|
|
18
11
|
start: number;
|
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
|
+
import { BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
3
|
import { makeFeatures } from '../FromConfigAdapter/FromConfigAdapter';
|
|
4
|
-
/**
|
|
5
|
-
* Adapter that just returns the features defined in its `features` configuration
|
|
6
|
-
* key, like:
|
|
7
|
-
* `"features": [ { "refName": "ctgA", "start":1, "end":20 }, ... ]`
|
|
8
|
-
*/
|
|
9
4
|
export default class FromConfigRegionsAdapter extends BaseAdapter {
|
|
10
5
|
constructor(config, getSubAdapter, pluginManager) {
|
|
11
6
|
super(config, getSubAdapter, pluginManager);
|
|
12
7
|
const f = readConfObject(config, 'features');
|
|
13
8
|
this.features = makeFeatures(f);
|
|
14
9
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Get refName, start, and end for all features after collapsing any overlaps
|
|
17
|
-
*/
|
|
18
10
|
async getRegions() {
|
|
19
11
|
const regions = [];
|
|
20
|
-
// recall: features are stored in this object sorted by start coordinate
|
|
21
12
|
for (const [refName, features] of this.features) {
|
|
22
13
|
let currentRegion;
|
|
23
14
|
for (const feature of features) {
|
|
@@ -41,9 +32,8 @@ export default class FromConfigRegionsAdapter extends BaseAdapter {
|
|
|
41
32
|
regions.push(currentRegion);
|
|
42
33
|
}
|
|
43
34
|
}
|
|
44
|
-
// sort the regions by refName
|
|
45
35
|
regions.sort((a, b) => a.refName.localeCompare(b.refName));
|
|
46
36
|
return regions;
|
|
47
37
|
}
|
|
48
|
-
freeResources(
|
|
38
|
+
freeResources() { }
|
|
49
39
|
}
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
|
|
3
|
-
* #config FromConfigRegionsAdapter
|
|
4
|
-
* used for specifying refNames+sizes of an assembly
|
|
5
|
-
*/
|
|
6
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
function x() { }
|
|
7
3
|
const regionsConfigSchema = ConfigurationSchema('FromConfigRegionsAdapter', {
|
|
8
|
-
/**
|
|
9
|
-
* #slot
|
|
10
|
-
*/
|
|
11
4
|
features: {
|
|
12
5
|
type: 'frozen',
|
|
13
6
|
defaultValue: [],
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function FromConfigRegionsAdapterF(pluginManager: PluginManager): void;
|
|
@@ -1,26 +1,13 @@
|
|
|
1
|
-
import { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
2
|
-
import { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
3
|
-
import { RegionsAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
4
1
|
import FromConfigAdapter from '../FromConfigAdapter/FromConfigAdapter';
|
|
2
|
+
import type { RegionsAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
4
|
+
import type { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
5
5
|
export default class FromConfigSequenceAdapter extends FromConfigAdapter implements RegionsAdapter {
|
|
6
|
-
/**
|
|
7
|
-
* Fetch features for a certain region
|
|
8
|
-
* @param region - Region
|
|
9
|
-
* @returns Observable of Feature objects in the region
|
|
10
|
-
*/
|
|
11
6
|
getFeatures(region: NoAssemblyRegion): import("rxjs").Observable<Feature>;
|
|
12
|
-
/**
|
|
13
|
-
* Get refName, start, and end for all features after collapsing any overlaps
|
|
14
|
-
*/
|
|
15
7
|
getRegions(): Promise<{
|
|
16
8
|
start: number;
|
|
17
9
|
end: number;
|
|
18
10
|
refName: string;
|
|
19
11
|
}[]>;
|
|
20
|
-
/**
|
|
21
|
-
* called to provide a hint that data tied to a certain region
|
|
22
|
-
* will not be needed for the foreseeable future and can be purged
|
|
23
|
-
* from caches, etc
|
|
24
|
-
*/
|
|
25
12
|
freeResources(): void;
|
|
26
13
|
}
|