@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,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
|
|
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 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,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 util_1 = require("@jbrowse/core/util");
|
|
31
9
|
const jexlStrings_1 = require("@jbrowse/core/util/jexlStrings");
|
|
32
10
|
const Help_1 = __importDefault(require("@mui/icons-material/Help"));
|
|
@@ -77,30 +55,19 @@ const CallbackEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
|
77
55
|
setCodeError(e);
|
|
78
56
|
}
|
|
79
57
|
}, [debouncedCode, slot]);
|
|
80
|
-
return (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"Callbacks are written in Jexl format. Click to learn more.",
|
|
95
|
-
react_1.default.createElement("br", null),
|
|
96
|
-
" Names of available context items: ",
|
|
97
|
-
slot.contextVariable), arrow: true },
|
|
98
|
-
react_1.default.createElement(material_1.IconButton, { color: "primary", onClick: () => {
|
|
99
|
-
const newWindow = window.open('https://github.com/TomFrost/Jexl', '_blank', 'noopener,noreferrer');
|
|
100
|
-
if (newWindow) {
|
|
101
|
-
newWindow.opener = null;
|
|
102
|
-
}
|
|
103
|
-
} },
|
|
104
|
-
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, {}) }) })] })] }));
|
|
105
72
|
});
|
|
106
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
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
31
9
|
const ColorPicker_1 = __importDefault(require("@jbrowse/core/ui/ColorPicker"));
|
|
32
10
|
const material_1 = require("@mui/material");
|
|
33
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,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
2
|
import type { AbstractSessionModel } from '@jbrowse/core/util';
|
|
4
3
|
declare const ConfigurationEditor: ({ model, }: {
|
|
@@ -6,5 +5,5 @@ declare const ConfigurationEditor: ({ 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,7 +3,7 @@ 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
7
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
8
8
|
const SanitizedHTML_1 = __importDefault(require("@jbrowse/core/ui/SanitizedHTML"));
|
|
9
9
|
const ExpandMore_1 = __importDefault(require("@mui/icons-material/ExpandMore"));
|
|
@@ -39,24 +39,18 @@ const Member = (0, mobx_react_1.observer)(function (props) {
|
|
|
39
39
|
const key = subslot.type
|
|
40
40
|
? `${(0, pluralize_1.singular)(slotName)} ${subslot.type}`
|
|
41
41
|
: `${(0, pluralize_1.singular)(slotName)} ${slotIndex + 1}`;
|
|
42
|
-
return
|
|
42
|
+
return (0, jsx_runtime_1.jsx)(Member, { ...props, slot: subslot, slotName: key }, key);
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
const typeNameChoices = (0, configuration_1.getTypeNamesFromExplicitlyTypedUnion)(slotSchema);
|
|
46
|
-
return (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (evt.target.value !== slot.type) {
|
|
52
|
-
schema.setSubschema(slotName, { type: evt.target.value });
|
|
53
|
-
}
|
|
54
|
-
} })) : null,
|
|
55
|
-
react_1.default.createElement(material_1.FormGroup, { className: classes.noOverflow },
|
|
56
|
-
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] }) })] })] }));
|
|
57
51
|
}
|
|
58
52
|
else if ((0, configuration_1.isConfigurationSlotType)(slotSchema)) {
|
|
59
|
-
return
|
|
53
|
+
return (0, jsx_runtime_1.jsx)(SlotEditor_1.default, { slot: slot, slotSchema: slotSchema }, slotName);
|
|
60
54
|
}
|
|
61
55
|
else {
|
|
62
56
|
return null;
|
|
@@ -64,18 +58,13 @@ const Member = (0, mobx_react_1.observer)(function (props) {
|
|
|
64
58
|
});
|
|
65
59
|
const Schema = (0, mobx_react_1.observer)(function ({ schema, path = [], }) {
|
|
66
60
|
const properties = (0, mobx_state_tree_1.getMembers)(schema).properties;
|
|
67
|
-
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))) }));
|
|
68
62
|
});
|
|
69
63
|
const ConfigurationEditor = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
70
64
|
const { classes } = useStyles();
|
|
71
65
|
const { target } = model;
|
|
72
66
|
const key = (0, configuration_1.readConfObject)(target, 'trackId');
|
|
73
67
|
const name = (0, configuration_1.readConfObject)(target, 'name');
|
|
74
|
-
return (
|
|
75
|
-
react_1.default.createElement(material_1.AccordionSummary, { expandIcon: react_1.default.createElement(ExpandMore_1.default, { className: classes.icon }) },
|
|
76
|
-
react_1.default.createElement(material_1.Typography, null,
|
|
77
|
-
react_1.default.createElement(SanitizedHTML_1.default, { html: name !== null && name !== void 0 ? name : 'Configuration' }))),
|
|
78
|
-
react_1.default.createElement(material_1.AccordionDetails, { className: classes.expansionPanelDetails, "data-testid": "configEditor" },
|
|
79
|
-
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));
|
|
80
69
|
});
|
|
81
70
|
exports.default = ConfigurationEditor;
|
|
@@ -1,15 +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
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const ui_1 = require("@jbrowse/core/ui");
|
|
9
6
|
const material_1 = require("@mui/material");
|
|
10
7
|
function ConfigurationTextField(props) {
|
|
11
8
|
const { helperText } = props;
|
|
12
|
-
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: {
|
|
13
10
|
formHelperText: {
|
|
14
11
|
component: 'div',
|
|
15
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,29 +1,7 @@
|
|
|
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
6
|
const mobx_react_1 = require("mobx-react");
|
|
29
7
|
const mui_1 = require("tss-react/mui");
|
|
@@ -64,18 +42,14 @@ const JsonEditor = (0, mobx_react_1.observer)(function JsonEditor({ slot, }) {
|
|
|
64
42
|
setError(e);
|
|
65
43
|
}
|
|
66
44
|
}, [contents, slot]);
|
|
67
|
-
return (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
input: classes.textAreaFont,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
} }))));
|
|
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
|
+
} })] })] }));
|
|
80
54
|
});
|
|
81
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;
|
|
@@ -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 Add_1 = __importDefault(require("@mui/icons-material/Add"));
|
|
31
9
|
const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
|
|
32
10
|
const material_1 = require("@mui/material");
|
|
@@ -41,33 +19,22 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
|
41
19
|
const NumberMapEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
|
|
42
20
|
const { classes } = useStyles();
|
|
43
21
|
const [value, setValue] = (0, react_1.useState)('');
|
|
44
|
-
return (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, slotProps: {
|
|
62
|
-
input: {
|
|
63
|
-
endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
|
|
64
|
-
react_1.default.createElement(material_1.IconButton, { disabled: value === '', onClick: () => {
|
|
65
|
-
slot.add(value, 0);
|
|
66
|
-
setValue('');
|
|
67
|
-
} },
|
|
68
|
-
react_1.default.createElement(Add_1.default, null)))),
|
|
69
|
-
},
|
|
70
|
-
} }) })),
|
|
71
|
-
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 })] }));
|
|
72
39
|
});
|
|
73
40
|
exports.default = NumberMapEditor;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
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;
|