@jbrowse/plugin-config 2.13.1 → 2.14.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 +3 -1
- package/dist/ConfigurationEditorWidget/components/CallbackEditor.js +3 -1
- package/dist/ConfigurationEditorWidget/components/ColorEditor.js +11 -3
- package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.js +23 -25
- package/dist/ConfigurationEditorWidget/components/HeadingComponent.js +1 -1
- package/dist/ConfigurationEditorWidget/components/JsonEditor.js +3 -1
- package/dist/ConfigurationEditorWidget/components/NumberEditor.js +3 -1
- package/dist/ConfigurationEditorWidget/components/NumberMapEditor.js +9 -3
- package/dist/ConfigurationEditorWidget/components/SlotEditor.js +17 -5
- package/dist/ConfigurationEditorWidget/components/StringArrayEditor.d.ts +3 -3
- package/dist/ConfigurationEditorWidget/components/StringArrayEditor.js +13 -5
- package/dist/ConfigurationEditorWidget/components/StringArrayMapEditor.js +15 -5
- package/dist/ConfigurationEditorWidget/model.js +0 -1
- package/dist/FromConfigAdapter/FromConfigAdapter.js +8 -10
- package/dist/FromConfigRegionsAdapter/FromConfigRegionsAdapter.js +1 -1
- package/dist/FromConfigSequenceAdapter/FromConfigSequenceAdapter.d.ts +1 -1
- package/dist/NcbiSequenceReportAliasAdapter/NcbiSequenceReportAliasAdapter.d.ts +9 -0
- package/dist/NcbiSequenceReportAliasAdapter/NcbiSequenceReportAliasAdapter.js +27 -0
- package/dist/NcbiSequenceReportAliasAdapter/configSchema.d.ts +18 -0
- package/dist/NcbiSequenceReportAliasAdapter/configSchema.js +26 -0
- package/dist/NcbiSequenceReportAliasAdapter/index.d.ts +2 -0
- package/dist/NcbiSequenceReportAliasAdapter/index.js +43 -0
- package/dist/RefNameAliasAdapter/RefNameAliasAdapter.js +4 -1
- package/dist/index.js +2 -0
- package/esm/ConfigurationEditorWidget/components/BooleanEditor.js +3 -1
- package/esm/ConfigurationEditorWidget/components/CallbackEditor.js +3 -1
- package/esm/ConfigurationEditorWidget/components/ColorEditor.js +11 -3
- package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.js +23 -25
- package/esm/ConfigurationEditorWidget/components/HeadingComponent.js +1 -1
- package/esm/ConfigurationEditorWidget/components/JsonEditor.js +3 -1
- package/esm/ConfigurationEditorWidget/components/NumberEditor.js +3 -1
- package/esm/ConfigurationEditorWidget/components/NumberMapEditor.js +9 -3
- package/esm/ConfigurationEditorWidget/components/SlotEditor.js +17 -5
- package/esm/ConfigurationEditorWidget/components/StringArrayEditor.d.ts +3 -3
- package/esm/ConfigurationEditorWidget/components/StringArrayEditor.js +13 -5
- package/esm/ConfigurationEditorWidget/components/StringArrayMapEditor.js +15 -5
- package/esm/ConfigurationEditorWidget/model.js +0 -1
- package/esm/FromConfigAdapter/FromConfigAdapter.js +8 -10
- package/esm/FromConfigRegionsAdapter/FromConfigRegionsAdapter.js +1 -1
- package/esm/FromConfigSequenceAdapter/FromConfigSequenceAdapter.d.ts +1 -1
- package/esm/NcbiSequenceReportAliasAdapter/NcbiSequenceReportAliasAdapter.d.ts +9 -0
- package/esm/NcbiSequenceReportAliasAdapter/NcbiSequenceReportAliasAdapter.js +24 -0
- package/esm/NcbiSequenceReportAliasAdapter/configSchema.d.ts +18 -0
- package/esm/NcbiSequenceReportAliasAdapter/configSchema.js +24 -0
- package/esm/NcbiSequenceReportAliasAdapter/index.d.ts +2 -0
- package/esm/NcbiSequenceReportAliasAdapter/index.js +14 -0
- package/esm/RefNameAliasAdapter/RefNameAliasAdapter.js +4 -1
- package/esm/index.js +2 -0
- package/package.json +3 -3
|
@@ -8,7 +8,9 @@ const mobx_react_1 = require("mobx-react");
|
|
|
8
8
|
const material_1 = require("@mui/material");
|
|
9
9
|
const BooleanEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
10
10
|
return (react_1.default.createElement(material_1.FormControl, null,
|
|
11
|
-
react_1.default.createElement(material_1.FormControlLabel, { label: slot.name, control: react_1.default.createElement(material_1.Checkbox, { checked: slot.value, onChange: evt =>
|
|
11
|
+
react_1.default.createElement(material_1.FormControlLabel, { label: slot.name, control: react_1.default.createElement(material_1.Checkbox, { checked: slot.value, onChange: evt => {
|
|
12
|
+
slot.set(evt.target.checked);
|
|
13
|
+
} }) }),
|
|
12
14
|
react_1.default.createElement(material_1.FormHelperText, null, slot.description)));
|
|
13
15
|
});
|
|
14
16
|
exports.default = BooleanEditor;
|
|
@@ -85,7 +85,9 @@ const CallbackEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
|
85
85
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
86
86
|
error ? react_1.default.createElement("p", { className: classes.error }, `${error}`) : null,
|
|
87
87
|
react_1.default.createElement("div", { className: classes.callbackContainer },
|
|
88
|
-
react_1.default.createElement(material_1.TextField, { multiline: true, className: classes.callbackEditor, value: code.startsWith('jexl:') ? code.split('jexl:')[1] : code, onChange: event =>
|
|
88
|
+
react_1.default.createElement(material_1.TextField, { multiline: true, className: classes.callbackEditor, value: code.startsWith('jexl:') ? code.split('jexl:')[1] : code, onChange: event => {
|
|
89
|
+
setCode(event.target.value);
|
|
90
|
+
}, style: { background: error ? '#fdd' : undefined }, InputProps: {
|
|
89
91
|
classes: {
|
|
90
92
|
input: classes.textAreaFont,
|
|
91
93
|
},
|
|
@@ -35,15 +35,23 @@ const ColorSlot = (props) => {
|
|
|
35
35
|
const { value = '#000', label = '', TextFieldProps = {}, onChange } = props;
|
|
36
36
|
const [displayed, setDisplayed] = (0, react_1.useState)(false);
|
|
37
37
|
return (react_1.default.createElement("div", { style: { display: 'flex' } },
|
|
38
|
-
react_1.default.createElement(material_1.TextField, { value: value, label: label, onClick: () =>
|
|
38
|
+
react_1.default.createElement(material_1.TextField, { value: value, label: label, onClick: () => {
|
|
39
|
+
setDisplayed(!displayed);
|
|
40
|
+
}, onChange: event => {
|
|
41
|
+
onChange(event.target.value);
|
|
42
|
+
}, ...TextFieldProps }),
|
|
39
43
|
react_1.default.createElement("div", { style: { marginTop: 10 } },
|
|
40
44
|
react_1.default.createElement(react_1.default.Suspense, { fallback: null },
|
|
41
|
-
react_1.default.createElement(ColorPicker_1.default, { color: value, onChange: event =>
|
|
45
|
+
react_1.default.createElement(ColorPicker_1.default, { color: value, onChange: event => {
|
|
46
|
+
onChange(event);
|
|
47
|
+
} })))));
|
|
42
48
|
};
|
|
43
49
|
exports.ColorSlot = ColorSlot;
|
|
44
50
|
const ColorEditor = (0, mobx_react_1.observer)(function (props) {
|
|
45
51
|
const { slot } = props;
|
|
46
|
-
return (react_1.default.createElement(exports.ColorSlot, { label: slot.name, value: slot.value, onChange: color =>
|
|
52
|
+
return (react_1.default.createElement(exports.ColorSlot, { label: slot.name, value: slot.value, onChange: color => {
|
|
53
|
+
slot.set(color);
|
|
54
|
+
}, TextFieldProps: {
|
|
47
55
|
helperText: slot.description,
|
|
48
56
|
fullWidth: true,
|
|
49
57
|
} }));
|
|
@@ -16,25 +16,22 @@ const ExpandMore_1 = __importDefault(require("@mui/icons-material/ExpandMore"));
|
|
|
16
16
|
// locals
|
|
17
17
|
const SlotEditor_1 = __importDefault(require("./SlotEditor"));
|
|
18
18
|
const TypeSelector_1 = __importDefault(require("./TypeSelector"));
|
|
19
|
-
const useStyles = (0, mui_1.makeStyles)()(theme => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
});
|
|
19
|
+
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
20
|
+
icon: {
|
|
21
|
+
color: theme.palette.tertiary.contrastText || '#fff',
|
|
22
|
+
},
|
|
23
|
+
expansionPanelDetails: {
|
|
24
|
+
display: 'block',
|
|
25
|
+
padding: theme.spacing(1),
|
|
26
|
+
},
|
|
27
|
+
accordion: {
|
|
28
|
+
border: `1px solid ${theme.palette.text.primary}`,
|
|
29
|
+
},
|
|
30
|
+
noOverflow: {
|
|
31
|
+
width: '100%',
|
|
32
|
+
overflowX: 'auto',
|
|
33
|
+
},
|
|
34
|
+
}));
|
|
38
35
|
const Member = (0, mobx_react_1.observer)(function (props) {
|
|
39
36
|
const { classes } = useStyles();
|
|
40
37
|
const { slotName, slotSchema, schema, slot = schema[slotName], path = [], } = props;
|
|
@@ -75,16 +72,17 @@ const Schema = (0, mobx_react_1.observer)(function ({ schema, path = [], }) {
|
|
|
75
72
|
});
|
|
76
73
|
const ConfigurationEditor = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
77
74
|
const { classes } = useStyles();
|
|
78
|
-
// key forces a re-render, otherwise the same field can end up being used
|
|
79
|
-
//
|
|
80
|
-
//
|
|
75
|
+
// key forces a re-render, otherwise the same field can end up being used for
|
|
76
|
+
// different tracks since only the backing model changes for example see pr
|
|
77
|
+
// #804
|
|
81
78
|
const { target } = model;
|
|
82
|
-
const key =
|
|
83
|
-
const name =
|
|
79
|
+
const key = (0, configuration_1.readConfObject)(target, 'trackId');
|
|
80
|
+
const name = (0, configuration_1.readConfObject)(target, 'name');
|
|
84
81
|
return (react_1.default.createElement(material_1.Accordion, { key: key, defaultExpanded: true, className: classes.accordion },
|
|
85
82
|
react_1.default.createElement(material_1.AccordionSummary, { expandIcon: react_1.default.createElement(ExpandMore_1.default, { className: classes.icon }) },
|
|
86
83
|
react_1.default.createElement(material_1.Typography, null,
|
|
87
84
|
react_1.default.createElement(SanitizedHTML_1.default, { html: name !== null && name !== void 0 ? name : 'Configuration' }))),
|
|
88
|
-
react_1.default.createElement(material_1.AccordionDetails, { className: classes.expansionPanelDetails, "data-testid": "configEditor" },
|
|
85
|
+
react_1.default.createElement(material_1.AccordionDetails, { className: classes.expansionPanelDetails, "data-testid": "configEditor" },
|
|
86
|
+
react_1.default.createElement(Schema, { schema: target }))));
|
|
89
87
|
});
|
|
90
88
|
exports.default = ConfigurationEditor;
|
|
@@ -13,7 +13,7 @@ const HeadingComponent = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
13
13
|
}
|
|
14
14
|
if ((0, mobx_state_tree_1.isStateTreeNode)(model.target)) {
|
|
15
15
|
const type = (0, mobx_state_tree_1.getType)(model.target);
|
|
16
|
-
if (type
|
|
16
|
+
if (type.name) {
|
|
17
17
|
return `${type.name.replace('ConfigurationSchema', '')} settings`;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -70,7 +70,9 @@ const JsonEditor = (0, mobx_react_1.observer)(function JsonEditor({ slot, }) {
|
|
|
70
70
|
error ? react_1.default.createElement("p", { className: classes.error }, `${error}`) : null,
|
|
71
71
|
react_1.default.createElement("div", { className: classes.callbackContainer },
|
|
72
72
|
react_1.default.createElement(material_1.InputLabel, { shrink: true, htmlFor: "json-editor" }, slot.name),
|
|
73
|
-
react_1.default.createElement(material_1.TextField, { id: "json-editor", className: classes.callbackEditor, value: contents, helperText: slot.description, multiline: true, onChange: event =>
|
|
73
|
+
react_1.default.createElement(material_1.TextField, { id: "json-editor", className: classes.callbackEditor, value: contents, helperText: slot.description, multiline: true, onChange: event => {
|
|
74
|
+
setContents(event.target.value);
|
|
75
|
+
}, style: { background: error ? '#fdd' : undefined }, InputProps: {
|
|
74
76
|
classes: {
|
|
75
77
|
input: classes.textAreaFont,
|
|
76
78
|
},
|
|
@@ -41,6 +41,8 @@ const NumberEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
|
41
41
|
slot.set(num);
|
|
42
42
|
}
|
|
43
43
|
}, [slot, val]);
|
|
44
|
-
return (react_1.default.createElement(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt =>
|
|
44
|
+
return (react_1.default.createElement(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt => {
|
|
45
|
+
setVal(evt.target.value);
|
|
46
|
+
} }));
|
|
45
47
|
});
|
|
46
48
|
exports.default = NumberEditor;
|
|
@@ -45,15 +45,21 @@ const NumberMapEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
|
45
45
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
46
46
|
react_1.default.createElement(material_1.InputLabel, null, slot.name),
|
|
47
47
|
[...slot.value].map(([key, val]) => (react_1.default.createElement(material_1.Card, { raised: true, key: key, className: classes.card },
|
|
48
|
-
react_1.default.createElement(material_1.CardHeader, { title: key, action: react_1.default.createElement(material_1.IconButton, { onClick: () =>
|
|
48
|
+
react_1.default.createElement(material_1.CardHeader, { title: key, action: react_1.default.createElement(material_1.IconButton, { onClick: () => {
|
|
49
|
+
slot.remove(key);
|
|
50
|
+
} },
|
|
49
51
|
react_1.default.createElement(Delete_1.default, null)) }),
|
|
50
52
|
react_1.default.createElement(material_1.CardContent, null,
|
|
51
53
|
react_1.default.createElement(NumberEditor_1.default, { slot: {
|
|
52
54
|
value: val,
|
|
53
|
-
set: (val) =>
|
|
55
|
+
set: (val) => {
|
|
56
|
+
slot.add(key, val);
|
|
57
|
+
},
|
|
54
58
|
} }))))),
|
|
55
59
|
react_1.default.createElement(material_1.Card, { raised: true, className: classes.card },
|
|
56
|
-
react_1.default.createElement(material_1.CardHeader, { disableTypography: true, title: react_1.default.createElement(material_1.TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event =>
|
|
60
|
+
react_1.default.createElement(material_1.CardHeader, { disableTypography: true, title: react_1.default.createElement(material_1.TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event => {
|
|
61
|
+
setValue(event.target.value);
|
|
62
|
+
}, InputProps: {
|
|
57
63
|
endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
|
|
58
64
|
react_1.default.createElement(material_1.IconButton, { disabled: value === '', onClick: () => {
|
|
59
65
|
slot.add(value, 0);
|
|
@@ -47,10 +47,14 @@ const NumberEditor_1 = __importDefault(require("./NumberEditor"));
|
|
|
47
47
|
const BooleanEditor_1 = __importDefault(require("./BooleanEditor"));
|
|
48
48
|
const useSlotEditorStyles_1 = require("./useSlotEditorStyles");
|
|
49
49
|
const StringEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
50
|
-
return (react_1.default.createElement(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: slot.value, onChange: evt =>
|
|
50
|
+
return (react_1.default.createElement(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: slot.value, onChange: evt => {
|
|
51
|
+
slot.set(evt.target.value);
|
|
52
|
+
} }));
|
|
51
53
|
});
|
|
52
54
|
const TextEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
53
|
-
return (react_1.default.createElement(material_1.TextField, { label: slot.name, helperText: slot.description, multiline: true, value: slot.value, onChange: evt =>
|
|
55
|
+
return (react_1.default.createElement(material_1.TextField, { label: slot.name, helperText: slot.description, multiline: true, value: slot.value, onChange: evt => {
|
|
56
|
+
slot.set(evt.target.value);
|
|
57
|
+
} }));
|
|
54
58
|
});
|
|
55
59
|
// checked checkbox, looks like a styled (x)
|
|
56
60
|
const SvgCheckbox = () => (react_1.default.createElement(material_1.SvgIcon, null,
|
|
@@ -63,16 +67,24 @@ const IntegerEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
|
63
67
|
slot.set(num);
|
|
64
68
|
}
|
|
65
69
|
}, [slot, val]);
|
|
66
|
-
return (react_1.default.createElement(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt =>
|
|
70
|
+
return (react_1.default.createElement(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt => {
|
|
71
|
+
setVal(evt.target.value);
|
|
72
|
+
} }));
|
|
67
73
|
});
|
|
68
74
|
const StringEnumEditor = (0, mobx_react_1.observer)(function ({ slot, slotSchema, }) {
|
|
69
75
|
const p = (0, mobx_state_tree_1.getPropertyMembers)((0, mst_reflection_1.getSubType)(slotSchema));
|
|
70
76
|
const choices = (0, mst_reflection_1.getUnionSubTypes)((0, mst_reflection_1.getUnionSubTypes)((0, mst_reflection_1.getSubType)(p.properties.value))[1]).map(t => t.value);
|
|
71
|
-
return (react_1.default.createElement(ConfigurationTextField_1.default, { value: slot.value, label: slot.name, select: true, helperText: slot.description, onChange: evt =>
|
|
77
|
+
return (react_1.default.createElement(ConfigurationTextField_1.default, { value: slot.value, label: slot.name, select: true, helperText: slot.description, onChange: evt => {
|
|
78
|
+
slot.set(evt.target.value);
|
|
79
|
+
} }, choices.map(str => (react_1.default.createElement(material_1.MenuItem, { key: str, value: str }, str)))));
|
|
72
80
|
});
|
|
73
81
|
const FileSelectorWrapper = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
74
82
|
var _a;
|
|
75
|
-
return (react_1.default.createElement(ui_1.FileSelector, { location: slot.value, setLocation: location =>
|
|
83
|
+
return (react_1.default.createElement(ui_1.FileSelector, { location: slot.value, setLocation: location => {
|
|
84
|
+
slot.set(location);
|
|
85
|
+
}, name: slot.name, description: slot.description,
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
87
|
+
rootModel: (_a = (0, util_1.getEnv)(slot).pluginManager) === null || _a === void 0 ? void 0 : _a.rootModel }));
|
|
76
88
|
});
|
|
77
89
|
const valueComponents = {
|
|
78
90
|
string: StringEditor,
|
|
@@ -3,9 +3,9 @@ declare const StringArrayEditor: ({ slot, }: {
|
|
|
3
3
|
slot: {
|
|
4
4
|
name: string;
|
|
5
5
|
value: string[];
|
|
6
|
-
setAtIndex:
|
|
7
|
-
removeAtIndex:
|
|
8
|
-
add:
|
|
6
|
+
setAtIndex: (arg: number, arg2: string) => void;
|
|
7
|
+
removeAtIndex: (arg: number) => void;
|
|
8
|
+
add: (arg: string) => void;
|
|
9
9
|
description: string;
|
|
10
10
|
};
|
|
11
11
|
}) => React.JSX.Element;
|
|
@@ -37,14 +37,20 @@ const StringArrayEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
|
37
37
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
38
38
|
slot.name ? react_1.default.createElement(material_1.InputLabel, null, slot.name) : null,
|
|
39
39
|
react_1.default.createElement(material_1.List, { disablePadding: true },
|
|
40
|
-
slot.value.map((val, idx) => (react_1.default.createElement(material_1.ListItem, { key: idx
|
|
41
|
-
react_1.default.createElement(material_1.TextField, { value: val, onChange: evt =>
|
|
40
|
+
slot.value.map((val, idx) => (react_1.default.createElement(material_1.ListItem, { key: `${JSON.stringify(val)}-${idx}`, disableGutters: true },
|
|
41
|
+
react_1.default.createElement(material_1.TextField, { value: val, onChange: evt => {
|
|
42
|
+
slot.setAtIndex(idx, evt.target.value);
|
|
43
|
+
}, InputProps: {
|
|
42
44
|
endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
|
|
43
|
-
react_1.default.createElement(material_1.IconButton, { onClick: () =>
|
|
45
|
+
react_1.default.createElement(material_1.IconButton, { onClick: () => {
|
|
46
|
+
slot.removeAtIndex(idx);
|
|
47
|
+
} },
|
|
44
48
|
react_1.default.createElement(Delete_1.default, null)))),
|
|
45
49
|
} })))),
|
|
46
50
|
addNew ? (react_1.default.createElement(material_1.ListItem, { disableGutters: true },
|
|
47
|
-
react_1.default.createElement(material_1.TextField, { value: value, placeholder: "add new", onChange: event =>
|
|
51
|
+
react_1.default.createElement(material_1.TextField, { value: value, placeholder: "add new", onChange: event => {
|
|
52
|
+
setValue(event.target.value);
|
|
53
|
+
}, InputProps: {
|
|
48
54
|
endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
|
|
49
55
|
react_1.default.createElement(react_1.default.Fragment, null,
|
|
50
56
|
react_1.default.createElement(material_1.Button, { color: "primary", variant: "contained", style: { margin: 2 }, "data-testid": `stringArrayAdd-${slot.name}`, onClick: () => {
|
|
@@ -57,7 +63,9 @@ const StringArrayEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
|
57
63
|
setValue('');
|
|
58
64
|
} }, "Cancel")))),
|
|
59
65
|
} }))) : null,
|
|
60
|
-
react_1.default.createElement(material_1.Button, { color: "primary", variant: "contained", style: { margin: 4 }, disabled: addNew, onClick: () =>
|
|
66
|
+
react_1.default.createElement(material_1.Button, { color: "primary", variant: "contained", style: { margin: 4 }, disabled: addNew, onClick: () => {
|
|
67
|
+
setAddNew(true);
|
|
68
|
+
} }, "Add item")),
|
|
61
69
|
react_1.default.createElement(material_1.FormHelperText, null, slot.description)));
|
|
62
70
|
});
|
|
63
71
|
exports.default = StringArrayEditor;
|
|
@@ -46,19 +46,29 @@ const StringArrayMapEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
|
46
46
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
47
47
|
react_1.default.createElement(material_1.InputLabel, null, slot.name),
|
|
48
48
|
[...slot.value].map(([key, val]) => (react_1.default.createElement(material_1.Card, { raised: true, key: key, className: classes.card },
|
|
49
|
-
react_1.default.createElement(material_1.CardHeader, { title: key, action: react_1.default.createElement(material_1.IconButton, { onClick: () =>
|
|
49
|
+
react_1.default.createElement(material_1.CardHeader, { title: key, action: react_1.default.createElement(material_1.IconButton, { onClick: () => {
|
|
50
|
+
slot.remove(key);
|
|
51
|
+
} },
|
|
50
52
|
react_1.default.createElement(Delete_1.default, null)) }),
|
|
51
53
|
react_1.default.createElement(material_1.CardContent, null,
|
|
52
54
|
react_1.default.createElement(StringArrayEditor_1.default, { slot: {
|
|
53
55
|
name: slot.name,
|
|
54
56
|
value: val,
|
|
55
57
|
description: `Values associated with entry ${key}`,
|
|
56
|
-
setAtIndex: (idx, val) =>
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
setAtIndex: (idx, val) => {
|
|
59
|
+
slot.setAtKeyIndex(key, idx, val);
|
|
60
|
+
},
|
|
61
|
+
removeAtIndex: (idx) => {
|
|
62
|
+
slot.removeAtKeyIndex(key, idx);
|
|
63
|
+
},
|
|
64
|
+
add: (val) => {
|
|
65
|
+
slot.addToKey(key, val);
|
|
66
|
+
},
|
|
59
67
|
} }))))),
|
|
60
68
|
react_1.default.createElement(material_1.Card, { raised: true, className: classes.card },
|
|
61
|
-
react_1.default.createElement(material_1.CardHeader, { disableTypography: true, title: react_1.default.createElement(material_1.TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event =>
|
|
69
|
+
react_1.default.createElement(material_1.CardHeader, { disableTypography: true, title: react_1.default.createElement(material_1.TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event => {
|
|
70
|
+
setValue(event.target.value);
|
|
71
|
+
}, InputProps: {
|
|
62
72
|
endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
|
|
63
73
|
react_1.default.createElement(material_1.IconButton, { disabled: value === '', onClick: () => {
|
|
64
74
|
slot.add(value, []);
|
|
@@ -13,7 +13,6 @@ function stateModelFactory(pluginManager) {
|
|
|
13
13
|
target: mobx_state_tree_1.types.safeReference(pluginManager.pluggableConfigSchemaType('track')),
|
|
14
14
|
})
|
|
15
15
|
.actions(self => ({
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
16
|
setTarget(newTarget) {
|
|
18
17
|
self.target = newTarget;
|
|
19
18
|
},
|
|
@@ -11,16 +11,14 @@ const configuration_1 = require("@jbrowse/core/configuration");
|
|
|
11
11
|
function makeFeatures(fdata) {
|
|
12
12
|
const features = new Map();
|
|
13
13
|
for (const entry of fdata) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
features.set(refName, bucket);
|
|
21
|
-
}
|
|
22
|
-
bucket.push(f);
|
|
14
|
+
const f = new simpleFeature_1.default(entry);
|
|
15
|
+
const refName = f.get('refName');
|
|
16
|
+
let bucket = features.get(refName);
|
|
17
|
+
if (!bucket) {
|
|
18
|
+
bucket = [];
|
|
19
|
+
features.set(refName, bucket);
|
|
23
20
|
}
|
|
21
|
+
bucket.push(f);
|
|
24
22
|
}
|
|
25
23
|
// sort the features on each reference sequence by start coordinate
|
|
26
24
|
for (const refFeatures of features.values()) {
|
|
@@ -32,7 +30,7 @@ class FromConfigAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
32
30
|
constructor(conf, getSubAdapter, pluginManager) {
|
|
33
31
|
super(conf, getSubAdapter, pluginManager);
|
|
34
32
|
const feats = (0, configuration_1.readConfObject)(conf, 'features');
|
|
35
|
-
this.features = makeFeatures(feats
|
|
33
|
+
this.features = makeFeatures(feats);
|
|
36
34
|
}
|
|
37
35
|
async getRefNames() {
|
|
38
36
|
return [...this.features.keys()];
|
|
@@ -12,7 +12,7 @@ class FromConfigRegionsAdapter extends BaseAdapter_1.BaseAdapter {
|
|
|
12
12
|
constructor(config, getSubAdapter, pluginManager) {
|
|
13
13
|
super(config, getSubAdapter, pluginManager);
|
|
14
14
|
const f = (0, configuration_1.readConfObject)(config, 'features');
|
|
15
|
-
this.features = (0, FromConfigAdapter_1.makeFeatures)(f
|
|
15
|
+
this.features = (0, FromConfigAdapter_1.makeFeatures)(f);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Get refName, start, and end for all features after collapsing any overlaps
|
|
@@ -13,9 +13,9 @@ export default class FromConfigSequenceAdapter extends FromConfigAdapter impleme
|
|
|
13
13
|
* Get refName, start, and end for all features after collapsing any overlaps
|
|
14
14
|
*/
|
|
15
15
|
getRegions(): Promise<{
|
|
16
|
-
refName: string;
|
|
17
16
|
start: number;
|
|
18
17
|
end: number;
|
|
18
|
+
refName: string;
|
|
19
19
|
}[]>;
|
|
20
20
|
/**
|
|
21
21
|
* called to provide a hint that data tied to a certain region
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseRefNameAliasAdapter, BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
export default class NcbiSequenceReportAliasAdapter extends BaseAdapter implements BaseRefNameAliasAdapter {
|
|
3
|
+
getRefNameAliases(): Promise<{
|
|
4
|
+
refName: string;
|
|
5
|
+
aliases: string[];
|
|
6
|
+
override: any;
|
|
7
|
+
}[]>;
|
|
8
|
+
freeResources(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
4
|
+
const io_1 = require("@jbrowse/core/util/io");
|
|
5
|
+
class NcbiSequenceReportAliasAdapter extends BaseAdapter_1.BaseAdapter {
|
|
6
|
+
async getRefNameAliases() {
|
|
7
|
+
const loc = this.getConf('location');
|
|
8
|
+
if (loc.uri === '' || loc.uri === '/path/to/my/sequence_report.tsv') {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
const override = this.getConf('useUcscNameOverride');
|
|
12
|
+
const results = await (0, io_1.openLocation)(loc, this.pluginManager).readFile('utf8');
|
|
13
|
+
return results
|
|
14
|
+
.split(/\n|\r\n|\r/)
|
|
15
|
+
.slice(1)
|
|
16
|
+
.filter(f => !!f.trim())
|
|
17
|
+
.map(row => row.split('\t'))
|
|
18
|
+
.map(cols => ({
|
|
19
|
+
refName: cols[12],
|
|
20
|
+
aliases: [cols[9], cols[6]].filter((f) => !!f),
|
|
21
|
+
override,
|
|
22
|
+
}))
|
|
23
|
+
.filter(f => !!f.refName);
|
|
24
|
+
}
|
|
25
|
+
async freeResources() { }
|
|
26
|
+
}
|
|
27
|
+
exports.default = NcbiSequenceReportAliasAdapter;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const NcbiSequenceReportAliasAdapterConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
+
/**
|
|
3
|
+
* #slot
|
|
4
|
+
*/
|
|
5
|
+
location: {
|
|
6
|
+
type: string;
|
|
7
|
+
defaultValue: {
|
|
8
|
+
uri: string;
|
|
9
|
+
locationType: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
useUcscNameOverride: {
|
|
13
|
+
type: string;
|
|
14
|
+
defaultValue: boolean;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
18
|
+
export default NcbiSequenceReportAliasAdapterConfigSchema;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
+
/**
|
|
5
|
+
* #config NcbiSequenceReportAliasAdapter
|
|
6
|
+
* can read "sequence_report.tsv" type files from NCBI
|
|
7
|
+
*/
|
|
8
|
+
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
9
|
+
const NcbiSequenceReportAliasAdapterConfigSchema = (0, configuration_1.ConfigurationSchema)('NcbiSequenceReportAliasAdapter', {
|
|
10
|
+
/**
|
|
11
|
+
* #slot
|
|
12
|
+
*/
|
|
13
|
+
location: {
|
|
14
|
+
type: 'fileLocation',
|
|
15
|
+
defaultValue: {
|
|
16
|
+
uri: '/path/to/my/sequence_report.tsv',
|
|
17
|
+
locationType: 'UriLocation',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
useUcscNameOverride: {
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
defaultValue: true,
|
|
23
|
+
description: 'forces usage of the UCSC names over the NCBI style names from a FASTA',
|
|
24
|
+
},
|
|
25
|
+
}, { explicitlyTyped: true });
|
|
26
|
+
exports.default = NcbiSequenceReportAliasAdapterConfigSchema;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.default = NcbiSequenceReportAliasAdapterF;
|
|
30
|
+
const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
31
|
+
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
32
|
+
function NcbiSequenceReportAliasAdapterF(pluginManager) {
|
|
33
|
+
pluginManager.addAdapterType(() => {
|
|
34
|
+
return new pluggableElementTypes_1.AdapterType({
|
|
35
|
+
name: 'NcbiSequenceReportAliasAdapter',
|
|
36
|
+
configSchema: configSchema_1.default,
|
|
37
|
+
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./NcbiSequenceReportAliasAdapter'))).then(r => r.default),
|
|
38
|
+
adapterMetadata: {
|
|
39
|
+
hiddenFromGUI: true,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
@@ -17,7 +17,10 @@ class RefNameAliasAdapter extends BaseAdapter_1.BaseAdapter {
|
|
|
17
17
|
.map(row => {
|
|
18
18
|
const aliases = row.split('\t');
|
|
19
19
|
const [refName] = aliases.splice(refColumn, 1);
|
|
20
|
-
return {
|
|
20
|
+
return {
|
|
21
|
+
refName: refName,
|
|
22
|
+
aliases: aliases.filter(f => !!f.trim()),
|
|
23
|
+
};
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
26
|
async freeResources() { }
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ const FromConfigRegionsAdapter_1 = __importDefault(require("./FromConfigRegionsA
|
|
|
34
34
|
const FromConfigSequenceAdapter_1 = __importDefault(require("./FromConfigSequenceAdapter"));
|
|
35
35
|
const RefNameAliasAdapter_1 = __importDefault(require("./RefNameAliasAdapter"));
|
|
36
36
|
const ConfigurationEditorWidget_1 = __importDefault(require("./ConfigurationEditorWidget"));
|
|
37
|
+
const NcbiSequenceReportAliasAdapter_1 = __importDefault(require("./NcbiSequenceReportAliasAdapter"));
|
|
37
38
|
const LazyConfigurationEditorComponent = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./ConfigurationEditorWidget/components/ConfigurationEditor'))));
|
|
38
39
|
exports.ConfigurationEditor = LazyConfigurationEditorComponent;
|
|
39
40
|
class ConfigurationPlugin extends Plugin_1.default {
|
|
@@ -47,6 +48,7 @@ class ConfigurationPlugin extends Plugin_1.default {
|
|
|
47
48
|
(0, FromConfigSequenceAdapter_1.default)(pluginManager);
|
|
48
49
|
(0, RefNameAliasAdapter_1.default)(pluginManager);
|
|
49
50
|
(0, ConfigurationEditorWidget_1.default)(pluginManager);
|
|
51
|
+
(0, NcbiSequenceReportAliasAdapter_1.default)(pluginManager);
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
exports.default = ConfigurationPlugin;
|
|
@@ -3,7 +3,9 @@ import { observer } from 'mobx-react';
|
|
|
3
3
|
import { Checkbox, FormControl, FormControlLabel, FormHelperText, } from '@mui/material';
|
|
4
4
|
const BooleanEditor = observer(function ({ slot, }) {
|
|
5
5
|
return (React.createElement(FormControl, null,
|
|
6
|
-
React.createElement(FormControlLabel, { label: slot.name, control: React.createElement(Checkbox, { checked: slot.value, onChange: evt =>
|
|
6
|
+
React.createElement(FormControlLabel, { label: slot.name, control: React.createElement(Checkbox, { checked: slot.value, onChange: evt => {
|
|
7
|
+
slot.set(evt.target.checked);
|
|
8
|
+
} }) }),
|
|
7
9
|
React.createElement(FormHelperText, null, slot.description)));
|
|
8
10
|
});
|
|
9
11
|
export default BooleanEditor;
|
|
@@ -57,7 +57,9 @@ const CallbackEditor = observer(function ({ slot, }) {
|
|
|
57
57
|
return (React.createElement(React.Fragment, null,
|
|
58
58
|
error ? React.createElement("p", { className: classes.error }, `${error}`) : null,
|
|
59
59
|
React.createElement("div", { className: classes.callbackContainer },
|
|
60
|
-
React.createElement(TextField, { multiline: true, className: classes.callbackEditor, value: code.startsWith('jexl:') ? code.split('jexl:')[1] : code, onChange: event =>
|
|
60
|
+
React.createElement(TextField, { multiline: true, className: classes.callbackEditor, value: code.startsWith('jexl:') ? code.split('jexl:')[1] : code, onChange: event => {
|
|
61
|
+
setCode(event.target.value);
|
|
62
|
+
}, style: { background: error ? '#fdd' : undefined }, InputProps: {
|
|
61
63
|
classes: {
|
|
62
64
|
input: classes.textAreaFont,
|
|
63
65
|
},
|
|
@@ -6,14 +6,22 @@ export const ColorSlot = (props) => {
|
|
|
6
6
|
const { value = '#000', label = '', TextFieldProps = {}, onChange } = props;
|
|
7
7
|
const [displayed, setDisplayed] = useState(false);
|
|
8
8
|
return (React.createElement("div", { style: { display: 'flex' } },
|
|
9
|
-
React.createElement(TextField, { value: value, label: label, onClick: () =>
|
|
9
|
+
React.createElement(TextField, { value: value, label: label, onClick: () => {
|
|
10
|
+
setDisplayed(!displayed);
|
|
11
|
+
}, onChange: event => {
|
|
12
|
+
onChange(event.target.value);
|
|
13
|
+
}, ...TextFieldProps }),
|
|
10
14
|
React.createElement("div", { style: { marginTop: 10 } },
|
|
11
15
|
React.createElement(React.Suspense, { fallback: null },
|
|
12
|
-
React.createElement(ColorPicker, { color: value, onChange: event =>
|
|
16
|
+
React.createElement(ColorPicker, { color: value, onChange: event => {
|
|
17
|
+
onChange(event);
|
|
18
|
+
} })))));
|
|
13
19
|
};
|
|
14
20
|
const ColorEditor = observer(function (props) {
|
|
15
21
|
const { slot } = props;
|
|
16
|
-
return (React.createElement(ColorSlot, { label: slot.name, value: slot.value, onChange: color =>
|
|
22
|
+
return (React.createElement(ColorSlot, { label: slot.name, value: slot.value, onChange: color => {
|
|
23
|
+
slot.set(color);
|
|
24
|
+
}, TextFieldProps: {
|
|
17
25
|
helperText: slot.description,
|
|
18
26
|
fullWidth: true,
|
|
19
27
|
} }));
|
|
@@ -11,25 +11,22 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
|
11
11
|
// locals
|
|
12
12
|
import SlotEditor from './SlotEditor';
|
|
13
13
|
import TypeSelector from './TypeSelector';
|
|
14
|
-
const useStyles = makeStyles()(theme => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
});
|
|
14
|
+
const useStyles = makeStyles()(theme => ({
|
|
15
|
+
icon: {
|
|
16
|
+
color: theme.palette.tertiary.contrastText || '#fff',
|
|
17
|
+
},
|
|
18
|
+
expansionPanelDetails: {
|
|
19
|
+
display: 'block',
|
|
20
|
+
padding: theme.spacing(1),
|
|
21
|
+
},
|
|
22
|
+
accordion: {
|
|
23
|
+
border: `1px solid ${theme.palette.text.primary}`,
|
|
24
|
+
},
|
|
25
|
+
noOverflow: {
|
|
26
|
+
width: '100%',
|
|
27
|
+
overflowX: 'auto',
|
|
28
|
+
},
|
|
29
|
+
}));
|
|
33
30
|
const Member = observer(function (props) {
|
|
34
31
|
const { classes } = useStyles();
|
|
35
32
|
const { slotName, slotSchema, schema, slot = schema[slotName], path = [], } = props;
|
|
@@ -70,16 +67,17 @@ const Schema = observer(function ({ schema, path = [], }) {
|
|
|
70
67
|
});
|
|
71
68
|
const ConfigurationEditor = observer(function ({ model, }) {
|
|
72
69
|
const { classes } = useStyles();
|
|
73
|
-
// key forces a re-render, otherwise the same field can end up being used
|
|
74
|
-
//
|
|
75
|
-
//
|
|
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
|
|
76
73
|
const { target } = model;
|
|
77
|
-
const key =
|
|
78
|
-
const name =
|
|
74
|
+
const key = readConfObject(target, 'trackId');
|
|
75
|
+
const name = readConfObject(target, 'name');
|
|
79
76
|
return (React.createElement(Accordion, { key: key, defaultExpanded: true, className: classes.accordion },
|
|
80
77
|
React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, { className: classes.icon }) },
|
|
81
78
|
React.createElement(Typography, null,
|
|
82
79
|
React.createElement(SanitizedHTML, { html: name !== null && name !== void 0 ? name : 'Configuration' }))),
|
|
83
|
-
React.createElement(AccordionDetails, { className: classes.expansionPanelDetails, "data-testid": "configEditor" },
|
|
80
|
+
React.createElement(AccordionDetails, { className: classes.expansionPanelDetails, "data-testid": "configEditor" },
|
|
81
|
+
React.createElement(Schema, { schema: target }))));
|
|
84
82
|
});
|
|
85
83
|
export default ConfigurationEditor;
|
|
@@ -8,7 +8,7 @@ const HeadingComponent = observer(function ({ model, }) {
|
|
|
8
8
|
}
|
|
9
9
|
if (isStateTreeNode(model.target)) {
|
|
10
10
|
const type = getType(model.target);
|
|
11
|
-
if (type
|
|
11
|
+
if (type.name) {
|
|
12
12
|
return `${type.name.replace('ConfigurationSchema', '')} settings`;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -45,7 +45,9 @@ const JsonEditor = observer(function JsonEditor({ slot, }) {
|
|
|
45
45
|
error ? React.createElement("p", { className: classes.error }, `${error}`) : null,
|
|
46
46
|
React.createElement("div", { className: classes.callbackContainer },
|
|
47
47
|
React.createElement(InputLabel, { shrink: true, htmlFor: "json-editor" }, slot.name),
|
|
48
|
-
React.createElement(TextField, { id: "json-editor", className: classes.callbackEditor, value: contents, helperText: slot.description, multiline: true, onChange: event =>
|
|
48
|
+
React.createElement(TextField, { id: "json-editor", className: classes.callbackEditor, value: contents, helperText: slot.description, multiline: true, onChange: event => {
|
|
49
|
+
setContents(event.target.value);
|
|
50
|
+
}, style: { background: error ? '#fdd' : undefined }, InputProps: {
|
|
49
51
|
classes: {
|
|
50
52
|
input: classes.textAreaFont,
|
|
51
53
|
},
|
|
@@ -13,6 +13,8 @@ const NumberEditor = observer(function ({ slot, }) {
|
|
|
13
13
|
slot.set(num);
|
|
14
14
|
}
|
|
15
15
|
}, [slot, val]);
|
|
16
|
-
return (React.createElement(ConfigurationTextField, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt =>
|
|
16
|
+
return (React.createElement(ConfigurationTextField, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt => {
|
|
17
|
+
setVal(evt.target.value);
|
|
18
|
+
} }));
|
|
17
19
|
});
|
|
18
20
|
export default NumberEditor;
|
|
@@ -17,15 +17,21 @@ const NumberMapEditor = observer(function ({ slot, }) {
|
|
|
17
17
|
return (React.createElement(React.Fragment, null,
|
|
18
18
|
React.createElement(InputLabel, null, slot.name),
|
|
19
19
|
[...slot.value].map(([key, val]) => (React.createElement(Card, { raised: true, key: key, className: classes.card },
|
|
20
|
-
React.createElement(CardHeader, { title: key, action: React.createElement(IconButton, { onClick: () =>
|
|
20
|
+
React.createElement(CardHeader, { title: key, action: React.createElement(IconButton, { onClick: () => {
|
|
21
|
+
slot.remove(key);
|
|
22
|
+
} },
|
|
21
23
|
React.createElement(DeleteIcon, null)) }),
|
|
22
24
|
React.createElement(CardContent, null,
|
|
23
25
|
React.createElement(NumberEditor, { slot: {
|
|
24
26
|
value: val,
|
|
25
|
-
set: (val) =>
|
|
27
|
+
set: (val) => {
|
|
28
|
+
slot.add(key, val);
|
|
29
|
+
},
|
|
26
30
|
} }))))),
|
|
27
31
|
React.createElement(Card, { raised: true, className: classes.card },
|
|
28
|
-
React.createElement(CardHeader, { disableTypography: true, title: React.createElement(TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event =>
|
|
32
|
+
React.createElement(CardHeader, { disableTypography: true, title: React.createElement(TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event => {
|
|
33
|
+
setValue(event.target.value);
|
|
34
|
+
}, InputProps: {
|
|
29
35
|
endAdornment: (React.createElement(InputAdornment, { position: "end" },
|
|
30
36
|
React.createElement(IconButton, { disabled: value === '', onClick: () => {
|
|
31
37
|
slot.add(value, 0);
|
|
@@ -19,10 +19,14 @@ import NumberEditor from './NumberEditor';
|
|
|
19
19
|
import BooleanEditor from './BooleanEditor';
|
|
20
20
|
import { useSlotEditorStyles } from './useSlotEditorStyles';
|
|
21
21
|
const StringEditor = observer(function ({ slot, }) {
|
|
22
|
-
return (React.createElement(ConfigurationTextField, { label: slot.name, helperText: slot.description, value: slot.value, onChange: evt =>
|
|
22
|
+
return (React.createElement(ConfigurationTextField, { label: slot.name, helperText: slot.description, value: slot.value, onChange: evt => {
|
|
23
|
+
slot.set(evt.target.value);
|
|
24
|
+
} }));
|
|
23
25
|
});
|
|
24
26
|
const TextEditor = observer(function ({ slot, }) {
|
|
25
|
-
return (React.createElement(TextField, { label: slot.name, helperText: slot.description, multiline: true, value: slot.value, onChange: evt =>
|
|
27
|
+
return (React.createElement(TextField, { label: slot.name, helperText: slot.description, multiline: true, value: slot.value, onChange: evt => {
|
|
28
|
+
slot.set(evt.target.value);
|
|
29
|
+
} }));
|
|
26
30
|
});
|
|
27
31
|
// checked checkbox, looks like a styled (x)
|
|
28
32
|
const SvgCheckbox = () => (React.createElement(SvgIcon, null,
|
|
@@ -35,16 +39,24 @@ const IntegerEditor = observer(function ({ slot, }) {
|
|
|
35
39
|
slot.set(num);
|
|
36
40
|
}
|
|
37
41
|
}, [slot, val]);
|
|
38
|
-
return (React.createElement(ConfigurationTextField, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt =>
|
|
42
|
+
return (React.createElement(ConfigurationTextField, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt => {
|
|
43
|
+
setVal(evt.target.value);
|
|
44
|
+
} }));
|
|
39
45
|
});
|
|
40
46
|
const StringEnumEditor = observer(function ({ slot, slotSchema, }) {
|
|
41
47
|
const p = getPropertyMembers(getSubType(slotSchema));
|
|
42
48
|
const choices = getUnionSubTypes(getUnionSubTypes(getSubType(p.properties.value))[1]).map(t => t.value);
|
|
43
|
-
return (React.createElement(ConfigurationTextField, { value: slot.value, label: slot.name, select: true, helperText: slot.description, onChange: evt =>
|
|
49
|
+
return (React.createElement(ConfigurationTextField, { value: slot.value, label: slot.name, select: true, helperText: slot.description, onChange: evt => {
|
|
50
|
+
slot.set(evt.target.value);
|
|
51
|
+
} }, choices.map(str => (React.createElement(MenuItem, { key: str, value: str }, str)))));
|
|
44
52
|
});
|
|
45
53
|
const FileSelectorWrapper = observer(function ({ slot, }) {
|
|
46
54
|
var _a;
|
|
47
|
-
return (React.createElement(FileSelector, { location: slot.value, setLocation: location =>
|
|
55
|
+
return (React.createElement(FileSelector, { location: slot.value, setLocation: location => {
|
|
56
|
+
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 }));
|
|
48
60
|
});
|
|
49
61
|
const valueComponents = {
|
|
50
62
|
string: StringEditor,
|
|
@@ -3,9 +3,9 @@ declare const StringArrayEditor: ({ slot, }: {
|
|
|
3
3
|
slot: {
|
|
4
4
|
name: string;
|
|
5
5
|
value: string[];
|
|
6
|
-
setAtIndex:
|
|
7
|
-
removeAtIndex:
|
|
8
|
-
add:
|
|
6
|
+
setAtIndex: (arg: number, arg2: string) => void;
|
|
7
|
+
removeAtIndex: (arg: number) => void;
|
|
8
|
+
add: (arg: string) => void;
|
|
9
9
|
description: string;
|
|
10
10
|
};
|
|
11
11
|
}) => React.JSX.Element;
|
|
@@ -9,14 +9,20 @@ const StringArrayEditor = observer(function ({ slot, }) {
|
|
|
9
9
|
return (React.createElement(React.Fragment, null,
|
|
10
10
|
slot.name ? React.createElement(InputLabel, null, slot.name) : null,
|
|
11
11
|
React.createElement(List, { disablePadding: true },
|
|
12
|
-
slot.value.map((val, idx) => (React.createElement(ListItem, { key: idx
|
|
13
|
-
React.createElement(TextField, { value: val, onChange: evt =>
|
|
12
|
+
slot.value.map((val, idx) => (React.createElement(ListItem, { key: `${JSON.stringify(val)}-${idx}`, disableGutters: true },
|
|
13
|
+
React.createElement(TextField, { value: val, onChange: evt => {
|
|
14
|
+
slot.setAtIndex(idx, evt.target.value);
|
|
15
|
+
}, InputProps: {
|
|
14
16
|
endAdornment: (React.createElement(InputAdornment, { position: "end" },
|
|
15
|
-
React.createElement(IconButton, { onClick: () =>
|
|
17
|
+
React.createElement(IconButton, { onClick: () => {
|
|
18
|
+
slot.removeAtIndex(idx);
|
|
19
|
+
} },
|
|
16
20
|
React.createElement(DeleteIcon, null)))),
|
|
17
21
|
} })))),
|
|
18
22
|
addNew ? (React.createElement(ListItem, { disableGutters: true },
|
|
19
|
-
React.createElement(TextField, { value: value, placeholder: "add new", onChange: event =>
|
|
23
|
+
React.createElement(TextField, { value: value, placeholder: "add new", onChange: event => {
|
|
24
|
+
setValue(event.target.value);
|
|
25
|
+
}, InputProps: {
|
|
20
26
|
endAdornment: (React.createElement(InputAdornment, { position: "end" },
|
|
21
27
|
React.createElement(React.Fragment, null,
|
|
22
28
|
React.createElement(Button, { color: "primary", variant: "contained", style: { margin: 2 }, "data-testid": `stringArrayAdd-${slot.name}`, onClick: () => {
|
|
@@ -29,7 +35,9 @@ const StringArrayEditor = observer(function ({ slot, }) {
|
|
|
29
35
|
setValue('');
|
|
30
36
|
} }, "Cancel")))),
|
|
31
37
|
} }))) : null,
|
|
32
|
-
React.createElement(Button, { color: "primary", variant: "contained", style: { margin: 4 }, disabled: addNew, onClick: () =>
|
|
38
|
+
React.createElement(Button, { color: "primary", variant: "contained", style: { margin: 4 }, disabled: addNew, onClick: () => {
|
|
39
|
+
setAddNew(true);
|
|
40
|
+
} }, "Add item")),
|
|
33
41
|
React.createElement(FormHelperText, null, slot.description)));
|
|
34
42
|
});
|
|
35
43
|
export default StringArrayEditor;
|
|
@@ -18,19 +18,29 @@ const StringArrayMapEditor = observer(function ({ slot, }) {
|
|
|
18
18
|
return (React.createElement(React.Fragment, null,
|
|
19
19
|
React.createElement(InputLabel, null, slot.name),
|
|
20
20
|
[...slot.value].map(([key, val]) => (React.createElement(Card, { raised: true, key: key, className: classes.card },
|
|
21
|
-
React.createElement(CardHeader, { title: key, action: React.createElement(IconButton, { onClick: () =>
|
|
21
|
+
React.createElement(CardHeader, { title: key, action: React.createElement(IconButton, { onClick: () => {
|
|
22
|
+
slot.remove(key);
|
|
23
|
+
} },
|
|
22
24
|
React.createElement(DeleteIcon, null)) }),
|
|
23
25
|
React.createElement(CardContent, null,
|
|
24
26
|
React.createElement(StringArrayEditor, { slot: {
|
|
25
27
|
name: slot.name,
|
|
26
28
|
value: val,
|
|
27
29
|
description: `Values associated with entry ${key}`,
|
|
28
|
-
setAtIndex: (idx, val) =>
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
setAtIndex: (idx, val) => {
|
|
31
|
+
slot.setAtKeyIndex(key, idx, val);
|
|
32
|
+
},
|
|
33
|
+
removeAtIndex: (idx) => {
|
|
34
|
+
slot.removeAtKeyIndex(key, idx);
|
|
35
|
+
},
|
|
36
|
+
add: (val) => {
|
|
37
|
+
slot.addToKey(key, val);
|
|
38
|
+
},
|
|
31
39
|
} }))))),
|
|
32
40
|
React.createElement(Card, { raised: true, className: classes.card },
|
|
33
|
-
React.createElement(CardHeader, { disableTypography: true, title: React.createElement(TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event =>
|
|
41
|
+
React.createElement(CardHeader, { disableTypography: true, title: React.createElement(TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event => {
|
|
42
|
+
setValue(event.target.value);
|
|
43
|
+
}, InputProps: {
|
|
34
44
|
endAdornment: (React.createElement(InputAdornment, { position: "end" },
|
|
35
45
|
React.createElement(IconButton, { disabled: value === '', onClick: () => {
|
|
36
46
|
slot.add(value, []);
|
|
@@ -10,7 +10,6 @@ export default function stateModelFactory(pluginManager) {
|
|
|
10
10
|
target: types.safeReference(pluginManager.pluggableConfigSchemaType('track')),
|
|
11
11
|
})
|
|
12
12
|
.actions(self => ({
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
13
|
setTarget(newTarget) {
|
|
15
14
|
self.target = newTarget;
|
|
16
15
|
},
|
|
@@ -5,16 +5,14 @@ import { readConfObject, } from '@jbrowse/core/configuration';
|
|
|
5
5
|
export function makeFeatures(fdata) {
|
|
6
6
|
const features = new Map();
|
|
7
7
|
for (const entry of fdata) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
features.set(refName, bucket);
|
|
15
|
-
}
|
|
16
|
-
bucket.push(f);
|
|
8
|
+
const f = new SimpleFeature(entry);
|
|
9
|
+
const refName = f.get('refName');
|
|
10
|
+
let bucket = features.get(refName);
|
|
11
|
+
if (!bucket) {
|
|
12
|
+
bucket = [];
|
|
13
|
+
features.set(refName, bucket);
|
|
17
14
|
}
|
|
15
|
+
bucket.push(f);
|
|
18
16
|
}
|
|
19
17
|
// sort the features on each reference sequence by start coordinate
|
|
20
18
|
for (const refFeatures of features.values()) {
|
|
@@ -26,7 +24,7 @@ export default class FromConfigAdapter extends BaseFeatureDataAdapter {
|
|
|
26
24
|
constructor(conf, getSubAdapter, pluginManager) {
|
|
27
25
|
super(conf, getSubAdapter, pluginManager);
|
|
28
26
|
const feats = readConfObject(conf, 'features');
|
|
29
|
-
this.features = makeFeatures(feats
|
|
27
|
+
this.features = makeFeatures(feats);
|
|
30
28
|
}
|
|
31
29
|
async getRefNames() {
|
|
32
30
|
return [...this.features.keys()];
|
|
@@ -10,7 +10,7 @@ export default class FromConfigRegionsAdapter extends BaseAdapter {
|
|
|
10
10
|
constructor(config, getSubAdapter, pluginManager) {
|
|
11
11
|
super(config, getSubAdapter, pluginManager);
|
|
12
12
|
const f = readConfObject(config, 'features');
|
|
13
|
-
this.features = makeFeatures(f
|
|
13
|
+
this.features = makeFeatures(f);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Get refName, start, and end for all features after collapsing any overlaps
|
|
@@ -13,9 +13,9 @@ export default class FromConfigSequenceAdapter extends FromConfigAdapter impleme
|
|
|
13
13
|
* Get refName, start, and end for all features after collapsing any overlaps
|
|
14
14
|
*/
|
|
15
15
|
getRegions(): Promise<{
|
|
16
|
-
refName: string;
|
|
17
16
|
start: number;
|
|
18
17
|
end: number;
|
|
18
|
+
refName: string;
|
|
19
19
|
}[]>;
|
|
20
20
|
/**
|
|
21
21
|
* called to provide a hint that data tied to a certain region
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseRefNameAliasAdapter, BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
export default class NcbiSequenceReportAliasAdapter extends BaseAdapter implements BaseRefNameAliasAdapter {
|
|
3
|
+
getRefNameAliases(): Promise<{
|
|
4
|
+
refName: string;
|
|
5
|
+
aliases: string[];
|
|
6
|
+
override: any;
|
|
7
|
+
}[]>;
|
|
8
|
+
freeResources(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import { openLocation } from '@jbrowse/core/util/io';
|
|
3
|
+
export default class NcbiSequenceReportAliasAdapter extends BaseAdapter {
|
|
4
|
+
async getRefNameAliases() {
|
|
5
|
+
const loc = this.getConf('location');
|
|
6
|
+
if (loc.uri === '' || loc.uri === '/path/to/my/sequence_report.tsv') {
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
const override = this.getConf('useUcscNameOverride');
|
|
10
|
+
const results = await openLocation(loc, this.pluginManager).readFile('utf8');
|
|
11
|
+
return results
|
|
12
|
+
.split(/\n|\r\n|\r/)
|
|
13
|
+
.slice(1)
|
|
14
|
+
.filter(f => !!f.trim())
|
|
15
|
+
.map(row => row.split('\t'))
|
|
16
|
+
.map(cols => ({
|
|
17
|
+
refName: cols[12],
|
|
18
|
+
aliases: [cols[9], cols[6]].filter((f) => !!f),
|
|
19
|
+
override,
|
|
20
|
+
}))
|
|
21
|
+
.filter(f => !!f.refName);
|
|
22
|
+
}
|
|
23
|
+
async freeResources() { }
|
|
24
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const NcbiSequenceReportAliasAdapterConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
+
/**
|
|
3
|
+
* #slot
|
|
4
|
+
*/
|
|
5
|
+
location: {
|
|
6
|
+
type: string;
|
|
7
|
+
defaultValue: {
|
|
8
|
+
uri: string;
|
|
9
|
+
locationType: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
useUcscNameOverride: {
|
|
13
|
+
type: string;
|
|
14
|
+
defaultValue: boolean;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
18
|
+
export default NcbiSequenceReportAliasAdapterConfigSchema;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
+
/**
|
|
3
|
+
* #config NcbiSequenceReportAliasAdapter
|
|
4
|
+
* can read "sequence_report.tsv" type files from NCBI
|
|
5
|
+
*/
|
|
6
|
+
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
7
|
+
const NcbiSequenceReportAliasAdapterConfigSchema = ConfigurationSchema('NcbiSequenceReportAliasAdapter', {
|
|
8
|
+
/**
|
|
9
|
+
* #slot
|
|
10
|
+
*/
|
|
11
|
+
location: {
|
|
12
|
+
type: 'fileLocation',
|
|
13
|
+
defaultValue: {
|
|
14
|
+
uri: '/path/to/my/sequence_report.tsv',
|
|
15
|
+
locationType: 'UriLocation',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
useUcscNameOverride: {
|
|
19
|
+
type: 'boolean',
|
|
20
|
+
defaultValue: true,
|
|
21
|
+
description: 'forces usage of the UCSC names over the NCBI style names from a FASTA',
|
|
22
|
+
},
|
|
23
|
+
}, { explicitlyTyped: true });
|
|
24
|
+
export default NcbiSequenceReportAliasAdapterConfigSchema;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AdapterType } from '@jbrowse/core/pluggableElementTypes';
|
|
2
|
+
import configSchema from './configSchema';
|
|
3
|
+
export default function NcbiSequenceReportAliasAdapterF(pluginManager) {
|
|
4
|
+
pluginManager.addAdapterType(() => {
|
|
5
|
+
return new AdapterType({
|
|
6
|
+
name: 'NcbiSequenceReportAliasAdapter',
|
|
7
|
+
configSchema,
|
|
8
|
+
getAdapterClass: () => import('./NcbiSequenceReportAliasAdapter').then(r => r.default),
|
|
9
|
+
adapterMetadata: {
|
|
10
|
+
hiddenFromGUI: true,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -15,7 +15,10 @@ export default class RefNameAliasAdapter extends BaseAdapter {
|
|
|
15
15
|
.map(row => {
|
|
16
16
|
const aliases = row.split('\t');
|
|
17
17
|
const [refName] = aliases.splice(refColumn, 1);
|
|
18
|
-
return {
|
|
18
|
+
return {
|
|
19
|
+
refName: refName,
|
|
20
|
+
aliases: aliases.filter(f => !!f.trim()),
|
|
21
|
+
};
|
|
19
22
|
});
|
|
20
23
|
}
|
|
21
24
|
async freeResources() { }
|
package/esm/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import FromConfigRegionsAdapterF from './FromConfigRegionsAdapter';
|
|
|
5
5
|
import FromConfigSequenceAdapterF from './FromConfigSequenceAdapter';
|
|
6
6
|
import RefNameAliasAdapterF from './RefNameAliasAdapter';
|
|
7
7
|
import ConfigurationEditorWidgetF from './ConfigurationEditorWidget';
|
|
8
|
+
import NcbiSequenceReportAliasAdapterF from './NcbiSequenceReportAliasAdapter';
|
|
8
9
|
const LazyConfigurationEditorComponent = lazy(() => import('./ConfigurationEditorWidget/components/ConfigurationEditor'));
|
|
9
10
|
export default class ConfigurationPlugin extends Plugin {
|
|
10
11
|
constructor() {
|
|
@@ -17,6 +18,7 @@ export default class ConfigurationPlugin extends Plugin {
|
|
|
17
18
|
FromConfigSequenceAdapterF(pluginManager);
|
|
18
19
|
RefNameAliasAdapterF(pluginManager);
|
|
19
20
|
ConfigurationEditorWidgetF(pluginManager);
|
|
21
|
+
NcbiSequenceReportAliasAdapterF(pluginManager);
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
export { default as JsonEditor } from './ConfigurationEditorWidget/components/JsonEditor';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "JBrowse 2 config utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "npm-run-all build:*",
|
|
27
|
-
"test": "cd ../..; jest plugins/config",
|
|
27
|
+
"test": "cd ../..; jest --passWithNoTests plugins/config",
|
|
28
28
|
"prepublishOnly": "yarn test",
|
|
29
29
|
"prepack": "yarn build && yarn useDist",
|
|
30
30
|
"postpack": "yarn useSrc",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"distModule": "esm/index.js",
|
|
57
57
|
"srcModule": "src/index.ts",
|
|
58
58
|
"module": "esm/index.js",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "9fb8231d932db40adf0a283081765431756c66ff"
|
|
60
60
|
}
|