@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,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare const BooleanEditor: ({ slot, }: {
|
|
3
2
|
slot: {
|
|
4
3
|
name: string;
|
|
@@ -6,5 +5,5 @@ declare const BooleanEditor: ({ slot, }: {
|
|
|
6
5
|
set: (arg: boolean) => void;
|
|
7
6
|
description: string;
|
|
8
7
|
};
|
|
9
|
-
}) =>
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export default BooleanEditor;
|
|
@@ -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
|
|
7
|
-
const mobx_react_1 = require("mobx-react");
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
4
|
const material_1 = require("@mui/material");
|
|
5
|
+
const mobx_react_1 = require("mobx-react");
|
|
9
6
|
const BooleanEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
10
|
-
return (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} }) }),
|
|
14
|
-
react_1.default.createElement(material_1.FormHelperText, null, slot.description)));
|
|
7
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.FormControl, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { label: slot.name, control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: slot.value, onChange: evt => {
|
|
8
|
+
slot.set(evt.target.checked);
|
|
9
|
+
} }) }), (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { children: slot.description })] }));
|
|
15
10
|
});
|
|
16
11
|
exports.default = BooleanEditor;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare const CallbackEditor: ({ slot, }: {
|
|
3
2
|
slot: {
|
|
4
3
|
set: (arg: string) => void;
|
|
@@ -7,5 +6,5 @@ declare const CallbackEditor: ({ slot, }: {
|
|
|
7
6
|
value: string;
|
|
8
7
|
contextVariable: string;
|
|
9
8
|
};
|
|
10
|
-
}) =>
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export default CallbackEditor;
|
|
@@ -1,42 +1,17 @@
|
|
|
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");
|
|
31
8
|
const util_1 = require("@jbrowse/core/util");
|
|
32
9
|
const jexlStrings_1 = require("@jbrowse/core/util/jexlStrings");
|
|
33
|
-
const
|
|
10
|
+
const Help_1 = __importDefault(require("@mui/icons-material/Help"));
|
|
11
|
+
const material_1 = require("@mui/material");
|
|
34
12
|
const mobx_react_1 = require("mobx-react");
|
|
13
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
35
14
|
const mui_1 = require("tss-react/mui");
|
|
36
|
-
// icons
|
|
37
|
-
const Help_1 = __importDefault(require("@mui/icons-material/Help"));
|
|
38
|
-
// Optimize by using system default fonts:
|
|
39
|
-
// https://css-tricks.com/snippets/css/font-stacks/
|
|
40
15
|
const fontFamily = 'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace';
|
|
41
16
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
42
17
|
callbackEditor: {
|
|
@@ -80,32 +55,19 @@ const CallbackEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
|
80
55
|
setCodeError(e);
|
|
81
56
|
}
|
|
82
57
|
}, [debouncedCode, slot]);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
react_1.default.createElement("p", null, slot.description),
|
|
98
|
-
react_1.default.createElement(material_1.Tooltip, { title: react_1.default.createElement("div", null,
|
|
99
|
-
"Callbacks are written in Jexl format. Click to learn more.",
|
|
100
|
-
react_1.default.createElement("br", null),
|
|
101
|
-
" Names of available context items: ",
|
|
102
|
-
slot.contextVariable), arrow: true },
|
|
103
|
-
react_1.default.createElement(material_1.IconButton, { color: "primary", onClick: () => {
|
|
104
|
-
const newWindow = window.open('https://github.com/TomFrost/Jexl', '_blank', 'noopener,noreferrer');
|
|
105
|
-
if (newWindow) {
|
|
106
|
-
newWindow.opener = null;
|
|
107
|
-
}
|
|
108
|
-
} },
|
|
109
|
-
react_1.default.createElement(Help_1.default, null))))));
|
|
58
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [error ? (0, jsx_runtime_1.jsx)("p", { className: classes.error, children: `${error}` }) : null, (0, jsx_runtime_1.jsxs)("div", { className: classes.callbackContainer, children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { multiline: true, className: classes.callbackEditor, value: code.startsWith('jexl:') ? code.split('jexl:')[1] : code, onChange: event => {
|
|
59
|
+
setCode(event.target.value);
|
|
60
|
+
}, style: { background: error ? '#fdd' : undefined }, slotProps: {
|
|
61
|
+
input: {
|
|
62
|
+
classes: {
|
|
63
|
+
input: classes.textAreaFont,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
} }), (0, jsx_runtime_1.jsx)("p", { children: slot.description }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: (0, jsx_runtime_1.jsxs)("div", { children: ["Callbacks are written in Jexl format. Click to learn more.", (0, jsx_runtime_1.jsx)("br", {}), " Names of available context items: ", slot.contextVariable] }), arrow: true, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { color: "primary", onClick: () => {
|
|
67
|
+
const newWindow = window.open('https://github.com/TomFrost/Jexl', '_blank', 'noopener,noreferrer');
|
|
68
|
+
if (newWindow) {
|
|
69
|
+
newWindow.opener = null;
|
|
70
|
+
}
|
|
71
|
+
}, children: (0, jsx_runtime_1.jsx)(Help_1.default, {}) }) })] })] }));
|
|
110
72
|
});
|
|
111
73
|
exports.default = CallbackEditor;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export declare const ColorSlot: (props: {
|
|
3
2
|
value: string;
|
|
4
3
|
label?: string;
|
|
@@ -7,7 +6,7 @@ export declare const ColorSlot: (props: {
|
|
|
7
6
|
fullWidth: boolean;
|
|
8
7
|
};
|
|
9
8
|
onChange: (arg: string) => void;
|
|
10
|
-
}) =>
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
declare const ColorEditor: (props: {
|
|
12
11
|
slot: {
|
|
13
12
|
name: string;
|
|
@@ -15,5 +14,5 @@ declare const ColorEditor: (props: {
|
|
|
15
14
|
description: string;
|
|
16
15
|
set: (arg: string) => void;
|
|
17
16
|
};
|
|
18
|
-
}) =>
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
18
|
export default ColorEditor;
|
|
@@ -1,55 +1,29 @@
|
|
|
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
6
|
exports.ColorSlot = void 0;
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const material_1 = require("@mui/material");
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
33
9
|
const ColorPicker_1 = __importDefault(require("@jbrowse/core/ui/ColorPicker"));
|
|
10
|
+
const material_1 = require("@mui/material");
|
|
11
|
+
const mobx_react_1 = require("mobx-react");
|
|
34
12
|
const ColorSlot = (props) => {
|
|
35
13
|
const { value = '#000', label = '', TextFieldProps = {}, onChange } = props;
|
|
36
14
|
const [displayed, setDisplayed] = (0, react_1.useState)(false);
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
react_1.default.createElement(react_1.default.Suspense, { fallback: null },
|
|
45
|
-
react_1.default.createElement(ColorPicker_1.default, { color: value, onChange: event => {
|
|
46
|
-
onChange(event);
|
|
47
|
-
} })))));
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex' }, children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { value: value, label: label, onClick: () => {
|
|
16
|
+
setDisplayed(!displayed);
|
|
17
|
+
}, onChange: event => {
|
|
18
|
+
onChange(event.target.value);
|
|
19
|
+
}, ...TextFieldProps }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: 10 }, children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)(ColorPicker_1.default, { color: value, onChange: event => {
|
|
20
|
+
onChange(event);
|
|
21
|
+
} }) }) })] }));
|
|
48
22
|
};
|
|
49
23
|
exports.ColorSlot = ColorSlot;
|
|
50
24
|
const ColorEditor = (0, mobx_react_1.observer)(function (props) {
|
|
51
25
|
const { slot } = props;
|
|
52
|
-
return (
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(exports.ColorSlot, { label: slot.name, value: slot.value, onChange: color => {
|
|
53
27
|
slot.set(color);
|
|
54
28
|
}, TextFieldProps: {
|
|
55
29
|
helperText: slot.description,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AbstractSessionModel } from '@jbrowse/core/util';
|
|
3
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { AbstractSessionModel } from '@jbrowse/core/util';
|
|
4
3
|
declare const ConfigurationEditor: ({ model, }: {
|
|
5
4
|
model: {
|
|
6
5
|
target: AnyConfigurationModel;
|
|
7
6
|
};
|
|
8
7
|
session?: AbstractSessionModel;
|
|
9
|
-
}) =>
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export default ConfigurationEditor;
|
|
@@ -3,17 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
8
|
+
const SanitizedHTML_1 = __importDefault(require("@jbrowse/core/ui/SanitizedHTML"));
|
|
9
|
+
const ExpandMore_1 = __importDefault(require("@mui/icons-material/ExpandMore"));
|
|
7
10
|
const material_1 = require("@mui/material");
|
|
8
|
-
const mui_1 = require("tss-react/mui");
|
|
9
11
|
const mobx_react_1 = require("mobx-react");
|
|
10
12
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
11
13
|
const pluralize_1 = require("pluralize");
|
|
12
|
-
const
|
|
13
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
14
|
-
// icons
|
|
15
|
-
const ExpandMore_1 = __importDefault(require("@mui/icons-material/ExpandMore"));
|
|
16
|
-
// locals
|
|
14
|
+
const mui_1 = require("tss-react/mui");
|
|
17
15
|
const SlotEditor_1 = __importDefault(require("./SlotEditor"));
|
|
18
16
|
const TypeSelector_1 = __importDefault(require("./TypeSelector"));
|
|
19
17
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
@@ -41,26 +39,18 @@ const Member = (0, mobx_react_1.observer)(function (props) {
|
|
|
41
39
|
const key = subslot.type
|
|
42
40
|
? `${(0, pluralize_1.singular)(slotName)} ${subslot.type}`
|
|
43
41
|
: `${(0, pluralize_1.singular)(slotName)} ${slotIndex + 1}`;
|
|
44
|
-
return
|
|
42
|
+
return (0, jsx_runtime_1.jsx)(Member, { ...props, slot: subslot, slotName: key }, key);
|
|
45
43
|
});
|
|
46
44
|
}
|
|
47
|
-
// if this is an explicitly typed schema, make a type-selecting dropdown
|
|
48
|
-
// that can be used to change its type
|
|
49
45
|
const typeNameChoices = (0, configuration_1.getTypeNamesFromExplicitlyTypedUnion)(slotSchema);
|
|
50
|
-
return (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (evt.target.value !== slot.type) {
|
|
56
|
-
schema.setSubschema(slotName, { type: evt.target.value });
|
|
57
|
-
}
|
|
58
|
-
} })) : null,
|
|
59
|
-
react_1.default.createElement(material_1.FormGroup, { className: classes.noOverflow },
|
|
60
|
-
react_1.default.createElement(Schema, { schema: slot, path: [...path, slotName] })))));
|
|
46
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Accordion, { defaultExpanded: true, className: classes.accordion, children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, { expandIcon: (0, jsx_runtime_1.jsx)(ExpandMore_1.default, { className: classes.icon }), children: (0, jsx_runtime_1.jsx)(material_1.Typography, { children: [...path, slotName].join('➔') }) }), (0, jsx_runtime_1.jsxs)(material_1.AccordionDetails, { className: classes.expansionPanelDetails, children: [typeNameChoices.length ? ((0, jsx_runtime_1.jsx)(TypeSelector_1.default, { typeNameChoices: typeNameChoices, slotName: slotName, slot: slot, onChange: evt => {
|
|
47
|
+
if (evt.target.value !== slot.type) {
|
|
48
|
+
schema.setSubschema(slotName, { type: evt.target.value });
|
|
49
|
+
}
|
|
50
|
+
} })) : null, (0, jsx_runtime_1.jsx)(material_1.FormGroup, { className: classes.noOverflow, children: (0, jsx_runtime_1.jsx)(Schema, { schema: slot, path: [...path, slotName] }) })] })] }));
|
|
61
51
|
}
|
|
62
52
|
else if ((0, configuration_1.isConfigurationSlotType)(slotSchema)) {
|
|
63
|
-
return
|
|
53
|
+
return (0, jsx_runtime_1.jsx)(SlotEditor_1.default, { slot: slot, slotSchema: slotSchema }, slotName);
|
|
64
54
|
}
|
|
65
55
|
else {
|
|
66
56
|
return null;
|
|
@@ -68,21 +58,13 @@ const Member = (0, mobx_react_1.observer)(function (props) {
|
|
|
68
58
|
});
|
|
69
59
|
const Schema = (0, mobx_react_1.observer)(function ({ schema, path = [], }) {
|
|
70
60
|
const properties = (0, mobx_state_tree_1.getMembers)(schema).properties;
|
|
71
|
-
return (
|
|
61
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: Object.entries(properties).map(([slotName, slotSchema]) => ((0, jsx_runtime_1.jsx)(Member, { slotName: slotName, slotSchema: slotSchema, path: path, schema: schema }, slotName))) }));
|
|
72
62
|
});
|
|
73
63
|
const ConfigurationEditor = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
74
64
|
const { classes } = useStyles();
|
|
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
|
|
78
65
|
const { target } = model;
|
|
79
66
|
const key = (0, configuration_1.readConfObject)(target, 'trackId');
|
|
80
67
|
const name = (0, configuration_1.readConfObject)(target, 'name');
|
|
81
|
-
return (
|
|
82
|
-
react_1.default.createElement(material_1.AccordionSummary, { expandIcon: react_1.default.createElement(ExpandMore_1.default, { className: classes.icon }) },
|
|
83
|
-
react_1.default.createElement(material_1.Typography, null,
|
|
84
|
-
react_1.default.createElement(SanitizedHTML_1.default, { html: name !== null && name !== void 0 ? name : 'Configuration' }))),
|
|
85
|
-
react_1.default.createElement(material_1.AccordionDetails, { className: classes.expansionPanelDetails, "data-testid": "configEditor" },
|
|
86
|
-
react_1.default.createElement(Schema, { schema: target }))));
|
|
68
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Accordion, { defaultExpanded: true, className: classes.accordion, children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, { expandIcon: (0, jsx_runtime_1.jsx)(ExpandMore_1.default, { className: classes.icon }), children: (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(SanitizedHTML_1.default, { html: name !== null && name !== void 0 ? name : 'Configuration' }) }) }), (0, jsx_runtime_1.jsx)(material_1.AccordionDetails, { className: classes.expansionPanelDetails, "data-testid": "configEditor", children: (0, jsx_runtime_1.jsx)(Schema, { schema: target }) })] }, key));
|
|
87
69
|
});
|
|
88
70
|
exports.default = ConfigurationEditor;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TextFieldProps } from '@mui/material';
|
|
1
|
+
import type { TextFieldProps } from '@mui/material';
|
|
3
2
|
export default function ConfigurationTextField(props: {
|
|
4
3
|
helperText?: string;
|
|
5
|
-
} & TextFieldProps):
|
|
4
|
+
} & TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,12 @@
|
|
|
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
3
|
exports.default = ConfigurationTextField;
|
|
7
|
-
const
|
|
8
|
-
const material_1 = require("@mui/material");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
5
|
const ui_1 = require("@jbrowse/core/ui");
|
|
10
|
-
|
|
11
|
-
// div because the default is p which does not like div children
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
12
7
|
function ConfigurationTextField(props) {
|
|
13
8
|
const { helperText } = props;
|
|
14
|
-
return (
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(material_1.TextField, { ...props, helperText: (0, jsx_runtime_1.jsx)(ui_1.SanitizedHTML, { html: helperText || '' }), fullWidth: true, slotProps: {
|
|
15
10
|
formHelperText: {
|
|
16
11
|
component: 'div',
|
|
17
12
|
},
|
|
@@ -1,9 +1,6 @@
|
|
|
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 mobx_react_1 = require("mobx-react");
|
|
8
5
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
9
6
|
const HeadingComponent = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
@@ -18,6 +15,6 @@ const HeadingComponent = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
17
|
}
|
|
21
|
-
return
|
|
18
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Settings" });
|
|
22
19
|
});
|
|
23
20
|
exports.default = HeadingComponent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare const JsonEditor: ({ slot, }: {
|
|
3
2
|
slot: {
|
|
4
3
|
name: string;
|
|
@@ -6,5 +5,5 @@ declare const JsonEditor: ({ slot, }: {
|
|
|
6
5
|
value: unknown;
|
|
7
6
|
set: (arg: unknown) => void;
|
|
8
7
|
};
|
|
9
|
-
}) =>
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export default JsonEditor;
|
|
@@ -1,35 +1,11 @@
|
|
|
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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
27
5
|
const material_1 = require("@mui/material");
|
|
28
|
-
const mui_1 = require("tss-react/mui");
|
|
29
6
|
const mobx_react_1 = require("mobx-react");
|
|
30
|
-
|
|
7
|
+
const mui_1 = require("tss-react/mui");
|
|
31
8
|
const fontSize = '12px';
|
|
32
|
-
// Optimize by using system default fonts: https://css-tricks.com/snippets/css/font-stacks/
|
|
33
9
|
const fontFamily = 'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace';
|
|
34
10
|
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
35
11
|
error: {
|
|
@@ -66,18 +42,14 @@ const JsonEditor = (0, mobx_react_1.observer)(function JsonEditor({ slot, }) {
|
|
|
66
42
|
setError(e);
|
|
67
43
|
}
|
|
68
44
|
}, [contents, slot]);
|
|
69
|
-
return (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
input: classes.textAreaFont,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
} }))));
|
|
45
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [error ? (0, jsx_runtime_1.jsx)("p", { className: classes.error, children: `${error}` }) : null, (0, jsx_runtime_1.jsxs)("div", { className: classes.callbackContainer, children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { shrink: true, htmlFor: "json-editor", children: slot.name }), (0, jsx_runtime_1.jsx)(material_1.TextField, { id: "json-editor", className: classes.callbackEditor, value: contents, helperText: slot.description, multiline: true, onChange: event => {
|
|
46
|
+
setContents(event.target.value);
|
|
47
|
+
}, style: { background: error ? '#fdd' : undefined }, slotProps: {
|
|
48
|
+
input: {
|
|
49
|
+
classes: {
|
|
50
|
+
input: classes.textAreaFont,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
} })] })] }));
|
|
82
54
|
});
|
|
83
55
|
exports.default = JsonEditor;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare const NumberEditor: ({ slot, }: {
|
|
3
2
|
slot: {
|
|
4
3
|
name?: string;
|
|
@@ -7,5 +6,5 @@ declare const NumberEditor: ({ slot, }: {
|
|
|
7
6
|
set: (val: number) => void;
|
|
8
7
|
reset?: () => void;
|
|
9
8
|
};
|
|
10
|
-
}) =>
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export default NumberEditor;
|
|
@@ -1,32 +1,10 @@
|
|
|
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
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
30
8
|
const mobx_react_1 = require("mobx-react");
|
|
31
9
|
const ConfigurationTextField_1 = __importDefault(require("./ConfigurationTextField"));
|
|
32
10
|
const NumberEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
@@ -41,7 +19,7 @@ const NumberEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
|
41
19
|
slot.set(num);
|
|
42
20
|
}
|
|
43
21
|
}, [slot, val]);
|
|
44
|
-
return (
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt => {
|
|
45
23
|
setVal(evt.target.value);
|
|
46
24
|
} }));
|
|
47
25
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare const NumberMapEditor: ({ slot, }: {
|
|
3
2
|
slot: {
|
|
4
3
|
name: string;
|
|
@@ -7,5 +6,5 @@ declare const NumberMapEditor: ({ slot, }: {
|
|
|
7
6
|
add: (key: string, val: number) => void;
|
|
8
7
|
description: string;
|
|
9
8
|
};
|
|
10
|
-
}) =>
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export default NumberMapEditor;
|