@jbrowse/plugin-config 2.17.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 +5 -10
- package/dist/ConfigurationEditorWidget/components/CallbackEditor.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/CallbackEditor.js +19 -57
- package/dist/ConfigurationEditorWidget/components/ColorEditor.d.ts +2 -3
- package/dist/ConfigurationEditorWidget/components/ColorEditor.js +12 -38
- package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +3 -4
- package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.js +14 -32
- package/dist/ConfigurationEditorWidget/components/ConfigurationTextField.d.ts +2 -3
- package/dist/ConfigurationEditorWidget/components/ConfigurationTextField.js +3 -8
- 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 +12 -40
- 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 +22 -56
- package/dist/ConfigurationEditorWidget/components/SlotEditor.d.ts +2 -3
- package/dist/ConfigurationEditorWidget/components/SlotEditor.js +21 -52
- package/dist/ConfigurationEditorWidget/components/StringArrayEditor.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/StringArrayEditor.js +28 -64
- package/dist/ConfigurationEditorWidget/components/StringArrayMapEditor.d.ts +1 -2
- package/dist/ConfigurationEditorWidget/components/StringArrayMapEditor.js +30 -65
- package/dist/ConfigurationEditorWidget/components/TypeSelector.d.ts +2 -3
- package/dist/ConfigurationEditorWidget/components/TypeSelector.js +2 -7
- package/dist/ConfigurationEditorWidget/index.d.ts +1 -1
- package/dist/ConfigurationEditorWidget/index.js +18 -8
- 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/FromConfigAdapter/index.js +17 -7
- 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/FromConfigRegionsAdapter/index.js +17 -7
- 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/FromConfigSequenceAdapter/index.js +17 -7
- 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/NcbiSequenceReportAliasAdapter/index.js +17 -7
- 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/RefNameAliasAdapter/index.js +17 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +19 -9
- package/esm/ConfigurationEditorWidget/components/BooleanEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/BooleanEditor.js +5 -7
- package/esm/ConfigurationEditorWidget/components/CallbackEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/CallbackEditor.js +19 -34
- package/esm/ConfigurationEditorWidget/components/ColorEditor.d.ts +2 -3
- package/esm/ConfigurationEditorWidget/components/ColorEditor.js +12 -15
- package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +3 -4
- package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.js +15 -33
- package/esm/ConfigurationEditorWidget/components/ConfigurationTextField.d.ts +2 -3
- package/esm/ConfigurationEditorWidget/components/ConfigurationTextField.js +3 -5
- package/esm/ConfigurationEditorWidget/components/HeadingComponent.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/HeadingComponent.js +3 -3
- package/esm/ConfigurationEditorWidget/components/JsonEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/JsonEditor.js +12 -17
- 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 +22 -33
- package/esm/ConfigurationEditorWidget/components/SlotEditor.d.ts +2 -3
- package/esm/ConfigurationEditorWidget/components/SlotEditor.js +22 -30
- package/esm/ConfigurationEditorWidget/components/StringArrayEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/StringArrayEditor.js +28 -41
- package/esm/ConfigurationEditorWidget/components/StringArrayMapEditor.d.ts +1 -2
- package/esm/ConfigurationEditorWidget/components/StringArrayMapEditor.js +30 -42
- package/esm/ConfigurationEditorWidget/components/TypeSelector.d.ts +2 -3
- package/esm/ConfigurationEditorWidget/components/TypeSelector.js +2 -4
- 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 +2 -2
- package/esm/index.js +2 -2
- package/package.json +2 -2
|
@@ -1,38 +1,15 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const
|
|
30
|
-
const
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const Add_1 = __importDefault(require("@mui/icons-material/Add"));
|
|
9
|
+
const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
|
|
31
10
|
const material_1 = require("@mui/material");
|
|
11
|
+
const mobx_react_1 = require("mobx-react");
|
|
32
12
|
const mui_1 = require("tss-react/mui");
|
|
33
|
-
// icons
|
|
34
|
-
const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
|
|
35
|
-
const Add_1 = __importDefault(require("@mui/icons-material/Add"));
|
|
36
13
|
const NumberEditor_1 = __importDefault(require("./NumberEditor"));
|
|
37
14
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
38
15
|
card: {
|
|
@@ -42,33 +19,22 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
42
19
|
const NumberMapEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
43
20
|
const { classes } = useStyles();
|
|
44
21
|
const [value, setValue] = (0, react_1.useState)('');
|
|
45
|
-
return (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}, slotProps: {
|
|
63
|
-
input: {
|
|
64
|
-
endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
|
|
65
|
-
react_1.default.createElement(material_1.IconButton, { disabled: value === '', onClick: () => {
|
|
66
|
-
slot.add(value, 0);
|
|
67
|
-
setValue('');
|
|
68
|
-
} },
|
|
69
|
-
react_1.default.createElement(Add_1.default, null)))),
|
|
70
|
-
},
|
|
71
|
-
} }) })),
|
|
72
|
-
react_1.default.createElement(material_1.FormHelperText, null, slot.description)));
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { children: slot.name }), [...slot.value].map(([key, val]) => ((0, jsx_runtime_1.jsxs)(material_1.Card, { raised: true, className: classes.card, children: [(0, jsx_runtime_1.jsx)(material_1.CardHeader, { title: key, action: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
|
|
23
|
+
slot.remove(key);
|
|
24
|
+
}, children: (0, jsx_runtime_1.jsx)(Delete_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(material_1.CardContent, { children: (0, jsx_runtime_1.jsx)(NumberEditor_1.default, { slot: {
|
|
25
|
+
value: val,
|
|
26
|
+
set: (val) => {
|
|
27
|
+
slot.add(key, val);
|
|
28
|
+
},
|
|
29
|
+
} }) })] }, key))), (0, jsx_runtime_1.jsx)(material_1.Card, { raised: true, className: classes.card, children: (0, jsx_runtime_1.jsx)(material_1.CardHeader, { disableTypography: true, title: (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event => {
|
|
30
|
+
setValue(event.target.value);
|
|
31
|
+
}, slotProps: {
|
|
32
|
+
input: {
|
|
33
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { disabled: value === '', onClick: () => {
|
|
34
|
+
slot.add(value, 0);
|
|
35
|
+
setValue('');
|
|
36
|
+
}, children: (0, jsx_runtime_1.jsx)(Add_1.default, {}) }) })),
|
|
37
|
+
},
|
|
38
|
+
} }) }) }), (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { children: slot.description })] }));
|
|
73
39
|
});
|
|
74
40
|
exports.default = NumberMapEditor;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IAnyType } from 'mobx-state-tree';
|
|
1
|
+
import type { IAnyType } from 'mobx-state-tree';
|
|
3
2
|
declare const SlotEditor: ({ slot, slotSchema, }: {
|
|
4
3
|
slot: any;
|
|
5
4
|
slotSchema: IAnyType;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export default SlotEditor;
|
|
@@ -1,64 +1,38 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
32
|
-
const util_1 = require("@jbrowse/core/util");
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
33
8
|
const ui_1 = require("@jbrowse/core/ui");
|
|
9
|
+
const util_1 = require("@jbrowse/core/util");
|
|
34
10
|
const mst_reflection_1 = require("@jbrowse/core/util/mst-reflection");
|
|
35
|
-
const material_1 = require("@mui/material");
|
|
36
|
-
// icons
|
|
37
11
|
const RadioButtonUnchecked_1 = __importDefault(require("@mui/icons-material/RadioButtonUnchecked"));
|
|
38
|
-
|
|
39
|
-
const
|
|
12
|
+
const material_1 = require("@mui/material");
|
|
13
|
+
const mobx_react_1 = require("mobx-react");
|
|
14
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
15
|
+
const BooleanEditor_1 = __importDefault(require("./BooleanEditor"));
|
|
40
16
|
const CallbackEditor_1 = __importDefault(require("./CallbackEditor"));
|
|
41
17
|
const ColorEditor_1 = __importDefault(require("./ColorEditor"));
|
|
42
|
-
const JsonEditor_1 = __importDefault(require("./JsonEditor"));
|
|
43
|
-
const StringArrayMapEditor_1 = __importDefault(require("./StringArrayMapEditor"));
|
|
44
18
|
const ConfigurationTextField_1 = __importDefault(require("./ConfigurationTextField"));
|
|
45
|
-
const
|
|
19
|
+
const JsonEditor_1 = __importDefault(require("./JsonEditor"));
|
|
46
20
|
const NumberEditor_1 = __importDefault(require("./NumberEditor"));
|
|
47
|
-
const
|
|
21
|
+
const NumberMapEditor_1 = __importDefault(require("./NumberMapEditor"));
|
|
22
|
+
const StringArrayEditor_1 = __importDefault(require("./StringArrayEditor"));
|
|
23
|
+
const StringArrayMapEditor_1 = __importDefault(require("./StringArrayMapEditor"));
|
|
48
24
|
const useSlotEditorStyles_1 = require("./useSlotEditorStyles");
|
|
49
25
|
const StringEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
50
|
-
return (
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: slot.value, onChange: evt => {
|
|
51
27
|
slot.set(evt.target.value);
|
|
52
28
|
} }));
|
|
53
29
|
});
|
|
54
30
|
const TextEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
55
|
-
return (
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(material_1.TextField, { label: slot.name, helperText: slot.description, multiline: true, value: slot.value, onChange: evt => {
|
|
56
32
|
slot.set(evt.target.value);
|
|
57
33
|
} }));
|
|
58
34
|
});
|
|
59
|
-
|
|
60
|
-
const SvgCheckbox = () => (react_1.default.createElement(material_1.SvgIcon, null,
|
|
61
|
-
react_1.default.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" })));
|
|
35
|
+
const SvgCheckbox = () => ((0, jsx_runtime_1.jsx)(material_1.SvgIcon, { children: (0, jsx_runtime_1.jsx)("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" }) }));
|
|
62
36
|
const IntegerEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
63
37
|
const [val, setVal] = (0, react_1.useState)(slot.value);
|
|
64
38
|
(0, react_1.useEffect)(() => {
|
|
@@ -67,24 +41,22 @@ const IntegerEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
|
67
41
|
slot.set(num);
|
|
68
42
|
}
|
|
69
43
|
}, [slot, val]);
|
|
70
|
-
return (
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt => {
|
|
71
45
|
setVal(evt.target.value);
|
|
72
46
|
} }));
|
|
73
47
|
});
|
|
74
48
|
const StringEnumEditor = (0, mobx_react_1.observer)(function ({ slot, slotSchema, }) {
|
|
75
49
|
const p = (0, mobx_state_tree_1.getPropertyMembers)((0, mst_reflection_1.getSubType)(slotSchema));
|
|
76
50
|
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);
|
|
77
|
-
return (
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(ConfigurationTextField_1.default, { value: slot.value, label: slot.name, select: true, helperText: slot.description, onChange: evt => {
|
|
78
52
|
slot.set(evt.target.value);
|
|
79
|
-
}
|
|
53
|
+
}, children: choices.map(str => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: str, children: str }, str))) }));
|
|
80
54
|
});
|
|
81
55
|
const FileSelectorWrapper = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
82
56
|
var _a;
|
|
83
|
-
return (
|
|
57
|
+
return ((0, jsx_runtime_1.jsx)(ui_1.FileSelector, { location: slot.value, setLocation: location => {
|
|
84
58
|
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 }));
|
|
59
|
+
}, name: slot.name, description: slot.description, rootModel: (_a = (0, util_1.getEnv)(slot).pluginManager) === null || _a === void 0 ? void 0 : _a.rootModel }));
|
|
88
60
|
});
|
|
89
61
|
const valueComponents = {
|
|
90
62
|
string: StringEditor,
|
|
@@ -106,7 +78,7 @@ const SlotEditor = (0, mobx_react_1.observer)(function ({ slot, slotSchema, }) {
|
|
|
106
78
|
const { type } = slot;
|
|
107
79
|
let ValueComponent = slot.isCallback
|
|
108
80
|
? CallbackEditor_1.default
|
|
109
|
-
:
|
|
81
|
+
:
|
|
110
82
|
valueComponents[type];
|
|
111
83
|
if (!ValueComponent) {
|
|
112
84
|
console.warn(`no slot editor defined for ${type}, editing as string`);
|
|
@@ -115,9 +87,6 @@ const SlotEditor = (0, mobx_react_1.observer)(function ({ slot, slotSchema, }) {
|
|
|
115
87
|
if (!(type in valueComponents)) {
|
|
116
88
|
console.warn(`SlotEditor needs to implement ${type}`);
|
|
117
89
|
}
|
|
118
|
-
return (
|
|
119
|
-
react_1.default.createElement("div", { className: classes.paperContent },
|
|
120
|
-
react_1.default.createElement(ValueComponent, { slot: slot, slotSchema: slotSchema })),
|
|
121
|
-
react_1.default.createElement("div", { className: classes.slotModeSwitch }, slot.contextVariable.length ? (react_1.default.createElement(material_1.IconButton, { onClick: () => slot.isCallback ? slot.convertToValue() : slot.convertToCallback(), title: `convert to ${slot.isCallback ? 'regular value' : 'callback'}` }, slot.isCallback ? react_1.default.createElement(SvgCheckbox, null) : react_1.default.createElement(RadioButtonUnchecked_1.default, null))) : null)));
|
|
90
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Paper, { className: classes.paper, children: [(0, jsx_runtime_1.jsx)("div", { className: classes.paperContent, children: (0, jsx_runtime_1.jsx)(ValueComponent, { slot: slot, slotSchema: slotSchema }) }), (0, jsx_runtime_1.jsx)("div", { className: classes.slotModeSwitch, children: slot.contextVariable.length ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => slot.isCallback ? slot.convertToValue() : slot.convertToCallback(), title: `convert to ${slot.isCallback ? 'regular value' : 'callback'}`, children: slot.isCallback ? (0, jsx_runtime_1.jsx)(SvgCheckbox, {}) : (0, jsx_runtime_1.jsx)(RadioButtonUnchecked_1.default, {}) })) : null })] }));
|
|
122
91
|
});
|
|
123
92
|
exports.default = SlotEditor;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare const StringArrayEditor: ({ slot, }: {
|
|
3
2
|
slot: {
|
|
4
3
|
name: string;
|
|
@@ -8,5 +7,5 @@ declare const StringArrayEditor: ({ slot, }: {
|
|
|
8
7
|
add: (arg: string) => void;
|
|
9
8
|
description: string;
|
|
10
9
|
};
|
|
11
|
-
}) =>
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export default StringArrayEditor;
|
|
@@ -1,75 +1,39 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const material_1 = require("@mui/material");
|
|
32
|
-
// icons
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
33
8
|
const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
|
|
9
|
+
const material_1 = require("@mui/material");
|
|
10
|
+
const mobx_react_1 = require("mobx-react");
|
|
34
11
|
const StringArrayEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
35
12
|
const [value, setValue] = (0, react_1.useState)('');
|
|
36
13
|
const [addNew, setAddNew] = (0, react_1.useState)(false);
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
slot.add(value);
|
|
62
|
-
setValue('');
|
|
63
|
-
} }, "OK"),
|
|
64
|
-
react_1.default.createElement(material_1.Button, { color: "primary", variant: "contained", style: { margin: 2 }, onClick: () => {
|
|
65
|
-
setAddNew(false);
|
|
66
|
-
setValue('');
|
|
67
|
-
} }, "Cancel")))),
|
|
68
|
-
},
|
|
69
|
-
} }))) : null,
|
|
70
|
-
react_1.default.createElement(material_1.Button, { color: "primary", variant: "contained", style: { margin: 4 }, disabled: addNew, onClick: () => {
|
|
71
|
-
setAddNew(true);
|
|
72
|
-
} }, "Add item")),
|
|
73
|
-
react_1.default.createElement(material_1.FormHelperText, null, slot.description)));
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [slot.name ? (0, jsx_runtime_1.jsx)(material_1.InputLabel, { children: slot.name }) : null, (0, jsx_runtime_1.jsxs)(material_1.List, { disablePadding: true, children: [slot.value.map((val, idx) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { value: val, onChange: evt => {
|
|
15
|
+
slot.setAtIndex(idx, evt.target.value);
|
|
16
|
+
}, slotProps: {
|
|
17
|
+
input: {
|
|
18
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
|
|
19
|
+
slot.removeAtIndex(idx);
|
|
20
|
+
}, children: (0, jsx_runtime_1.jsx)(Delete_1.default, {}) }) })),
|
|
21
|
+
},
|
|
22
|
+
} }) }, `${JSON.stringify(val)}-${idx}`))), addNew ? ((0, jsx_runtime_1.jsx)(material_1.ListItem, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { value: value, placeholder: "add new", onChange: event => {
|
|
23
|
+
setValue(event.target.value);
|
|
24
|
+
}, slotProps: {
|
|
25
|
+
input: {
|
|
26
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { color: "primary", variant: "contained", style: { margin: 2 }, "data-testid": `stringArrayAdd-${slot.name}`, onClick: () => {
|
|
27
|
+
setAddNew(false);
|
|
28
|
+
slot.add(value);
|
|
29
|
+
setValue('');
|
|
30
|
+
}, children: "OK" }), (0, jsx_runtime_1.jsx)(material_1.Button, { color: "primary", variant: "contained", style: { margin: 2 }, onClick: () => {
|
|
31
|
+
setAddNew(false);
|
|
32
|
+
setValue('');
|
|
33
|
+
}, children: "Cancel" })] }) })),
|
|
34
|
+
},
|
|
35
|
+
} }) })) : null, (0, jsx_runtime_1.jsx)(material_1.Button, { color: "primary", variant: "contained", style: { margin: 4 }, disabled: addNew, onClick: () => {
|
|
36
|
+
setAddNew(true);
|
|
37
|
+
}, children: "Add item" })] }), (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { children: slot.description })] }));
|
|
74
38
|
});
|
|
75
39
|
exports.default = StringArrayEditor;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare const StringArrayMapEditor: ({ slot, }: {
|
|
3
2
|
slot: {
|
|
4
3
|
name: string;
|
|
@@ -10,5 +9,5 @@ declare const StringArrayMapEditor: ({ slot, }: {
|
|
|
10
9
|
removeAtKeyIndex: (key: string, idx: number) => void;
|
|
11
10
|
addToKey: (key: string, val: string) => void;
|
|
12
11
|
};
|
|
13
|
-
}) =>
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export default StringArrayMapEditor;
|
|
@@ -1,39 +1,15 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const
|
|
30
|
-
const
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const Add_1 = __importDefault(require("@mui/icons-material/Add"));
|
|
9
|
+
const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
|
|
31
10
|
const material_1 = require("@mui/material");
|
|
11
|
+
const mobx_react_1 = require("mobx-react");
|
|
32
12
|
const mui_1 = require("tss-react/mui");
|
|
33
|
-
// icons
|
|
34
|
-
const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
|
|
35
|
-
const Add_1 = __importDefault(require("@mui/icons-material/Add"));
|
|
36
|
-
// locals
|
|
37
13
|
const StringArrayEditor_1 = __importDefault(require("./StringArrayEditor"));
|
|
38
14
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
39
15
|
card: {
|
|
@@ -43,41 +19,30 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
43
19
|
const StringArrayMapEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
44
20
|
const { classes } = useStyles();
|
|
45
21
|
const [value, setValue] = (0, react_1.useState)('');
|
|
46
|
-
return (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}, slotProps: {
|
|
72
|
-
input: {
|
|
73
|
-
endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
|
|
74
|
-
react_1.default.createElement(material_1.IconButton, { disabled: value === '', onClick: () => {
|
|
75
|
-
slot.add(value, []);
|
|
76
|
-
setValue('');
|
|
77
|
-
} },
|
|
78
|
-
react_1.default.createElement(Add_1.default, null)))),
|
|
79
|
-
},
|
|
80
|
-
} }) })),
|
|
81
|
-
react_1.default.createElement(material_1.FormHelperText, null, slot.description)));
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { children: slot.name }), [...slot.value].map(([key, val]) => ((0, jsx_runtime_1.jsxs)(material_1.Card, { raised: true, className: classes.card, children: [(0, jsx_runtime_1.jsx)(material_1.CardHeader, { title: key, action: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => {
|
|
23
|
+
slot.remove(key);
|
|
24
|
+
}, children: (0, jsx_runtime_1.jsx)(Delete_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(material_1.CardContent, { children: (0, jsx_runtime_1.jsx)(StringArrayEditor_1.default, { slot: {
|
|
25
|
+
name: slot.name,
|
|
26
|
+
value: val,
|
|
27
|
+
description: `Values associated with entry ${key}`,
|
|
28
|
+
setAtIndex: (idx, val) => {
|
|
29
|
+
slot.setAtKeyIndex(key, idx, val);
|
|
30
|
+
},
|
|
31
|
+
removeAtIndex: (idx) => {
|
|
32
|
+
slot.removeAtKeyIndex(key, idx);
|
|
33
|
+
},
|
|
34
|
+
add: (val) => {
|
|
35
|
+
slot.addToKey(key, val);
|
|
36
|
+
},
|
|
37
|
+
} }) })] }, key))), (0, jsx_runtime_1.jsx)(material_1.Card, { raised: true, className: classes.card, children: (0, jsx_runtime_1.jsx)(material_1.CardHeader, { disableTypography: true, title: (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event => {
|
|
38
|
+
setValue(event.target.value);
|
|
39
|
+
}, slotProps: {
|
|
40
|
+
input: {
|
|
41
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { disabled: value === '', onClick: () => {
|
|
42
|
+
slot.add(value, []);
|
|
43
|
+
setValue('');
|
|
44
|
+
}, children: (0, jsx_runtime_1.jsx)(Add_1.default, {}) }) })),
|
|
45
|
+
},
|
|
46
|
+
} }) }) }), (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { children: slot.description })] }));
|
|
82
47
|
});
|
|
83
48
|
exports.default = StringArrayMapEditor;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
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,16 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
4
|
const material_1 = require("@mui/material");
|
|
8
5
|
const mobx_react_1 = require("mobx-react");
|
|
9
6
|
const useSlotEditorStyles_1 = require("./useSlotEditorStyles");
|
|
10
7
|
const TypeSelector = (0, mobx_react_1.observer)(function ({ typeNameChoices, slot, slotName, onChange, }) {
|
|
11
8
|
const { classes } = (0, useSlotEditorStyles_1.useSlotEditorStyles)();
|
|
12
|
-
return (
|
|
13
|
-
react_1.default.createElement("div", { className: classes.paperContent },
|
|
14
|
-
react_1.default.createElement(material_1.TextField, { value: slot.type, label: "Type", select: true, helperText: `Type of ${slotName} to use`, fullWidth: true, onChange: onChange }, typeNameChoices.map(str => (react_1.default.createElement(material_1.MenuItem, { key: str, value: str }, str)))))));
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Paper, { className: classes.paper, children: (0, jsx_runtime_1.jsx)("div", { className: classes.paperContent, children: (0, jsx_runtime_1.jsx)(material_1.TextField, { value: slot.type, label: "Type", select: true, helperText: `Type of ${slotName} to use`, fullWidth: true, onChange: onChange, children: typeNameChoices.map(str => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: str, children: str }, str))) }) }) }));
|
|
15
10
|
});
|
|
16
11
|
exports.default = TypeSelector;
|
|
@@ -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;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -30,8 +40,8 @@ exports.default = registerConfigurationEditorWidget;
|
|
|
30
40
|
const react_1 = require("react");
|
|
31
41
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
32
42
|
const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
33
|
-
const model_1 = __importDefault(require("./model"));
|
|
34
43
|
const HeadingComponent_1 = __importDefault(require("./components/HeadingComponent"));
|
|
44
|
+
const model_1 = __importDefault(require("./model"));
|
|
35
45
|
const configSchema = (0, configuration_1.ConfigurationSchema)('ConfigurationEditorWidget', {});
|
|
36
46
|
const LazyConfigurationEditorComponent = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/ConfigurationEditor'))));
|
|
37
47
|
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,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = stateModelFactory;
|
|
4
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
4
|
const mst_1 = require("@jbrowse/core/util/types/mst");
|
|
5
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
6
6
|
function stateModelFactory(pluginManager) {
|
|
7
7
|
return mobx_state_tree_1.types
|
|
8
8
|
.model('ConfigurationEditorWidget', {
|
|
9
9
|
id: mst_1.ElementId,
|
|
10
10
|
type: mobx_state_tree_1.types.literal('ConfigurationEditorWidget'),
|
|
11
|
-
// If you add different types of targets, don't forget to account for that
|
|
12
|
-
// in the key of ./components/ConfigurationEditor.js
|
|
13
11
|
target: mobx_state_tree_1.types.safeReference(pluginManager.pluggableConfigSchemaType('track')),
|
|
14
12
|
})
|
|
15
13
|
.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[]>;
|