@jbrowse/plugin-config 2.18.0 → 3.0.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.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/BooleanEditor.js +4 -9
- package/dist/ConfigurationEditorWidget/components/CallbackEditor.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/CallbackEditor.js +16 -49
- package/dist/ConfigurationEditorWidget/components/ColorEditor.d.ts +2 -3
- package/dist/ConfigurationEditorWidget/components/ColorEditor.js +10 -36
- package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.js +10 -21
- package/dist/ConfigurationEditorWidget/components/ConfigurationTextField.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/ConfigurationTextField.js +2 -5
- package/dist/ConfigurationEditorWidget/components/HeadingComponent.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/HeadingComponent.js +2 -5
- package/dist/ConfigurationEditorWidget/components/JsonEditor.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/JsonEditor.js +11 -37
- package/dist/ConfigurationEditorWidget/components/NumberEditor.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/NumberEditor.js +3 -25
- package/dist/ConfigurationEditorWidget/components/NumberMapEditor.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/NumberMapEditor.js +19 -52
- package/dist/ConfigurationEditorWidget/components/SlotEditor.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/SlotEditor.js +10 -36
- package/dist/ConfigurationEditorWidget/components/StringArrayEditor.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/StringArrayEditor.js +26 -61
- package/dist/ConfigurationEditorWidget/components/StringArrayMapEditor.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/StringArrayMapEditor.js +27 -60
- package/dist/ConfigurationEditorWidget/components/TypeSelector.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/TypeSelector.js +2 -7
- package/dist/ConfigurationEditorWidget/index.js +17 -7
- package/dist/FromConfigAdapter/index.js +17 -7
- package/dist/FromConfigRegionsAdapter/index.js +17 -7
- package/dist/FromConfigSequenceAdapter/index.js +17 -7
- package/dist/NcbiSequenceReportAliasAdapter/index.js +17 -7
- package/dist/RefNameAliasAdapter/index.js +17 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -7
- package/esm/ConfigurationEditorWidget/components/BooleanEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/BooleanEditor.js +4 -6
- package/esm/ConfigurationEditorWidget/components/CallbackEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/CallbackEditor.js +16 -26
- package/esm/ConfigurationEditorWidget/components/ColorEditor.d.ts +2 -3
- package/esm/ConfigurationEditorWidget/components/ColorEditor.js +10 -13
- package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.js +10 -21
- package/esm/ConfigurationEditorWidget/components/ConfigurationTextField.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/ConfigurationTextField.js +2 -2
- package/esm/ConfigurationEditorWidget/components/HeadingComponent.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/HeadingComponent.js +2 -2
- package/esm/ConfigurationEditorWidget/components/JsonEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/JsonEditor.js +11 -14
- package/esm/ConfigurationEditorWidget/components/NumberEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/NumberEditor.js +3 -2
- package/esm/ConfigurationEditorWidget/components/NumberMapEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/NumberMapEditor.js +19 -29
- package/esm/ConfigurationEditorWidget/components/SlotEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/SlotEditor.js +10 -13
- package/esm/ConfigurationEditorWidget/components/StringArrayEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/StringArrayEditor.js +26 -38
- package/esm/ConfigurationEditorWidget/components/StringArrayMapEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/StringArrayMapEditor.js +27 -37
- package/esm/ConfigurationEditorWidget/components/TypeSelector.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/TypeSelector.js +2 -4
- package/esm/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import AddIcon from '@mui/icons-material/Add';
|
|
3
4
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
4
5
|
import { Card, CardContent, CardHeader, FormHelperText, IconButton, InputAdornment, InputLabel, TextField, } from '@mui/material';
|
|
@@ -13,41 +14,30 @@ const useStyles = makeStyles()(theme => ({
|
|
|
13
14
|
const StringArrayMapEditor = observer(function ({ slot, }) {
|
|
14
15
|
const { classes } = useStyles();
|
|
15
16
|
const [value, setValue] = useState('');
|
|
16
|
-
return (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, slotProps: {
|
|
42
|
-
input: {
|
|
43
|
-
endAdornment: (React.createElement(InputAdornment, { position: "end" },
|
|
44
|
-
React.createElement(IconButton, { disabled: value === '', onClick: () => {
|
|
45
|
-
slot.add(value, []);
|
|
46
|
-
setValue('');
|
|
47
|
-
} },
|
|
48
|
-
React.createElement(AddIcon, null)))),
|
|
49
|
-
},
|
|
50
|
-
} }) })),
|
|
51
|
-
React.createElement(FormHelperText, null, slot.description)));
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(InputLabel, { children: slot.name }), [...slot.value].map(([key, val]) => (_jsxs(Card, { raised: true, className: classes.card, children: [_jsx(CardHeader, { title: key, action: _jsx(IconButton, { onClick: () => {
|
|
18
|
+
slot.remove(key);
|
|
19
|
+
}, children: _jsx(DeleteIcon, {}) }) }), _jsx(CardContent, { children: _jsx(StringArrayEditor, { slot: {
|
|
20
|
+
name: slot.name,
|
|
21
|
+
value: val,
|
|
22
|
+
description: `Values associated with entry ${key}`,
|
|
23
|
+
setAtIndex: (idx, val) => {
|
|
24
|
+
slot.setAtKeyIndex(key, idx, val);
|
|
25
|
+
},
|
|
26
|
+
removeAtIndex: (idx) => {
|
|
27
|
+
slot.removeAtKeyIndex(key, idx);
|
|
28
|
+
},
|
|
29
|
+
add: (val) => {
|
|
30
|
+
slot.addToKey(key, val);
|
|
31
|
+
},
|
|
32
|
+
} }) })] }, key))), _jsx(Card, { raised: true, className: classes.card, children: _jsx(CardHeader, { disableTypography: true, title: _jsx(TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event => {
|
|
33
|
+
setValue(event.target.value);
|
|
34
|
+
}, slotProps: {
|
|
35
|
+
input: {
|
|
36
|
+
endAdornment: (_jsx(InputAdornment, { position: "end", children: _jsx(IconButton, { disabled: value === '', onClick: () => {
|
|
37
|
+
slot.add(value, []);
|
|
38
|
+
setValue('');
|
|
39
|
+
}, children: _jsx(AddIcon, {}) }) })),
|
|
40
|
+
},
|
|
41
|
+
} }) }) }), _jsx(FormHelperText, { children: slot.description })] }));
|
|
52
42
|
});
|
|
53
43
|
export default StringArrayMapEditor;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
2
|
declare const TypeSelector: ({ typeNameChoices, slot, slotName, onChange, }: {
|
|
4
3
|
typeNameChoices: string[];
|
|
5
4
|
slot: AnyConfigurationModel;
|
|
6
5
|
slotName: string;
|
|
7
6
|
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
-
}) =>
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default TypeSelector;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { MenuItem, Paper, TextField } from '@mui/material';
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
import { useSlotEditorStyles } from './useSlotEditorStyles';
|
|
5
5
|
const TypeSelector = observer(function ({ typeNameChoices, slot, slotName, onChange, }) {
|
|
6
6
|
const { classes } = useSlotEditorStyles();
|
|
7
|
-
return (
|
|
8
|
-
React.createElement("div", { className: classes.paperContent },
|
|
9
|
-
React.createElement(TextField, { value: slot.type, label: "Type", select: true, helperText: `Type of ${slotName} to use`, fullWidth: true, onChange: onChange }, typeNameChoices.map(str => (React.createElement(MenuItem, { key: str, value: str }, str)))))));
|
|
7
|
+
return (_jsx(Paper, { className: classes.paper, children: _jsx("div", { className: classes.paperContent, children: _jsx(TextField, { value: slot.type, label: "Type", select: true, helperText: `Type of ${slotName} to use`, fullWidth: true, onChange: onChange, children: typeNameChoices.map(str => (_jsx(MenuItem, { value: str, children: str }, str))) }) }) }));
|
|
10
8
|
});
|
|
11
9
|
export default TypeSelector;
|
package/esm/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare const LazyConfigurationEditorComponent: import("react").LazyExoticCompon
|
|
|
5
5
|
target: import("@jbrowse/core/configuration").AnyConfigurationModel;
|
|
6
6
|
};
|
|
7
7
|
session?: import("@jbrowse/core/util").AbstractSessionModel;
|
|
8
|
-
}) => import("react").JSX.Element>;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
9
9
|
export default class ConfigurationPlugin extends Plugin {
|
|
10
10
|
name: string;
|
|
11
11
|
install(pluginManager: PluginManager): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "JBrowse 2 config utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -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": "2c6897f1fa732b1db5b094d1dca197e333e95319"
|
|
60
60
|
}
|