@jbrowse/plugin-config 2.17.0 → 2.18.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.
Files changed (90) hide show
  1. package/dist/ConfigurationEditorWidget/components/BooleanEditor.js +1 -1
  2. package/dist/ConfigurationEditorWidget/components/CallbackEditor.js +3 -8
  3. package/dist/ConfigurationEditorWidget/components/ColorEditor.js +2 -2
  4. package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +2 -2
  5. package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.js +4 -11
  6. package/dist/ConfigurationEditorWidget/components/ConfigurationTextField.d.ts +1 -1
  7. package/dist/ConfigurationEditorWidget/components/ConfigurationTextField.js +1 -3
  8. package/dist/ConfigurationEditorWidget/components/JsonEditor.js +1 -3
  9. package/dist/ConfigurationEditorWidget/components/NumberMapEditor.js +3 -4
  10. package/dist/ConfigurationEditorWidget/components/SlotEditor.d.ts +1 -1
  11. package/dist/ConfigurationEditorWidget/components/SlotEditor.js +11 -16
  12. package/dist/ConfigurationEditorWidget/components/StringArrayEditor.js +2 -3
  13. package/dist/ConfigurationEditorWidget/components/StringArrayMapEditor.js +3 -5
  14. package/dist/ConfigurationEditorWidget/components/TypeSelector.d.ts +1 -1
  15. package/dist/ConfigurationEditorWidget/index.d.ts +1 -1
  16. package/dist/ConfigurationEditorWidget/index.js +1 -1
  17. package/dist/ConfigurationEditorWidget/model.d.ts +1 -1
  18. package/dist/ConfigurationEditorWidget/model.js +1 -3
  19. package/dist/FromConfigAdapter/FromConfigAdapter.d.ts +5 -5
  20. package/dist/FromConfigAdapter/FromConfigAdapter.js +3 -4
  21. package/dist/FromConfigAdapter/configSchema.d.ts +0 -3
  22. package/dist/FromConfigAdapter/configSchema.js +1 -7
  23. package/dist/FromConfigAdapter/index.d.ts +1 -1
  24. package/dist/FromConfigRegionsAdapter/FromConfigRegionsAdapter.d.ts +5 -12
  25. package/dist/FromConfigRegionsAdapter/FromConfigRegionsAdapter.js +2 -12
  26. package/dist/FromConfigRegionsAdapter/configSchema.d.ts +0 -3
  27. package/dist/FromConfigRegionsAdapter/configSchema.js +1 -8
  28. package/dist/FromConfigRegionsAdapter/index.d.ts +1 -1
  29. package/dist/FromConfigSequenceAdapter/FromConfigSequenceAdapter.d.ts +3 -16
  30. package/dist/FromConfigSequenceAdapter/FromConfigSequenceAdapter.js +3 -18
  31. package/dist/FromConfigSequenceAdapter/configSchema.d.ts +0 -3
  32. package/dist/FromConfigSequenceAdapter/configSchema.js +1 -7
  33. package/dist/FromConfigSequenceAdapter/index.d.ts +1 -1
  34. package/dist/NcbiSequenceReportAliasAdapter/NcbiSequenceReportAliasAdapter.d.ts +2 -1
  35. package/dist/NcbiSequenceReportAliasAdapter/configSchema.d.ts +0 -3
  36. package/dist/NcbiSequenceReportAliasAdapter/configSchema.js +1 -8
  37. package/dist/NcbiSequenceReportAliasAdapter/index.d.ts +1 -1
  38. package/dist/RefNameAliasAdapter/RefNameAliasAdapter.d.ts +2 -1
  39. package/dist/RefNameAliasAdapter/configSchema.d.ts +0 -8
  40. package/dist/RefNameAliasAdapter/configSchema.js +1 -14
  41. package/dist/RefNameAliasAdapter/index.d.ts +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +2 -2
  44. package/esm/ConfigurationEditorWidget/components/BooleanEditor.js +1 -1
  45. package/esm/ConfigurationEditorWidget/components/CallbackEditor.js +3 -8
  46. package/esm/ConfigurationEditorWidget/components/ColorEditor.js +2 -2
  47. package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +2 -2
  48. package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.js +5 -12
  49. package/esm/ConfigurationEditorWidget/components/ConfigurationTextField.d.ts +1 -1
  50. package/esm/ConfigurationEditorWidget/components/ConfigurationTextField.js +1 -3
  51. package/esm/ConfigurationEditorWidget/components/HeadingComponent.js +1 -1
  52. package/esm/ConfigurationEditorWidget/components/JsonEditor.js +1 -3
  53. package/esm/ConfigurationEditorWidget/components/NumberMapEditor.js +3 -4
  54. package/esm/ConfigurationEditorWidget/components/SlotEditor.d.ts +1 -1
  55. package/esm/ConfigurationEditorWidget/components/SlotEditor.js +12 -17
  56. package/esm/ConfigurationEditorWidget/components/StringArrayEditor.js +2 -3
  57. package/esm/ConfigurationEditorWidget/components/StringArrayMapEditor.js +3 -5
  58. package/esm/ConfigurationEditorWidget/components/TypeSelector.d.ts +1 -1
  59. package/esm/ConfigurationEditorWidget/index.d.ts +1 -1
  60. package/esm/ConfigurationEditorWidget/index.js +1 -1
  61. package/esm/ConfigurationEditorWidget/model.d.ts +1 -1
  62. package/esm/ConfigurationEditorWidget/model.js +1 -3
  63. package/esm/FromConfigAdapter/FromConfigAdapter.d.ts +5 -5
  64. package/esm/FromConfigAdapter/FromConfigAdapter.js +3 -4
  65. package/esm/FromConfigAdapter/configSchema.d.ts +0 -3
  66. package/esm/FromConfigAdapter/configSchema.js +1 -7
  67. package/esm/FromConfigAdapter/index.d.ts +1 -1
  68. package/esm/FromConfigRegionsAdapter/FromConfigRegionsAdapter.d.ts +5 -12
  69. package/esm/FromConfigRegionsAdapter/FromConfigRegionsAdapter.js +3 -13
  70. package/esm/FromConfigRegionsAdapter/configSchema.d.ts +0 -3
  71. package/esm/FromConfigRegionsAdapter/configSchema.js +1 -8
  72. package/esm/FromConfigRegionsAdapter/index.d.ts +1 -1
  73. package/esm/FromConfigSequenceAdapter/FromConfigSequenceAdapter.d.ts +3 -16
  74. package/esm/FromConfigSequenceAdapter/FromConfigSequenceAdapter.js +3 -18
  75. package/esm/FromConfigSequenceAdapter/configSchema.d.ts +0 -3
  76. package/esm/FromConfigSequenceAdapter/configSchema.js +1 -7
  77. package/esm/FromConfigSequenceAdapter/index.d.ts +1 -1
  78. package/esm/NcbiSequenceReportAliasAdapter/NcbiSequenceReportAliasAdapter.d.ts +2 -1
  79. package/esm/NcbiSequenceReportAliasAdapter/NcbiSequenceReportAliasAdapter.js +1 -1
  80. package/esm/NcbiSequenceReportAliasAdapter/configSchema.d.ts +0 -3
  81. package/esm/NcbiSequenceReportAliasAdapter/configSchema.js +1 -8
  82. package/esm/NcbiSequenceReportAliasAdapter/index.d.ts +1 -1
  83. package/esm/RefNameAliasAdapter/RefNameAliasAdapter.d.ts +2 -1
  84. package/esm/RefNameAliasAdapter/RefNameAliasAdapter.js +1 -1
  85. package/esm/RefNameAliasAdapter/configSchema.d.ts +0 -8
  86. package/esm/RefNameAliasAdapter/configSchema.js +1 -14
  87. package/esm/RefNameAliasAdapter/index.d.ts +1 -1
  88. package/esm/index.d.ts +1 -1
  89. package/esm/index.js +2 -2
  90. package/package.json +2 -2
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = __importDefault(require("react"));
7
- const mobx_react_1 = require("mobx-react");
8
7
  const material_1 = require("@mui/material");
8
+ const mobx_react_1 = require("mobx-react");
9
9
  const BooleanEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
10
10
  return (react_1.default.createElement(material_1.FormControl, null,
11
11
  react_1.default.createElement(material_1.FormControlLabel, { label: slot.name, control: react_1.default.createElement(material_1.Checkbox, { checked: slot.value, onChange: evt => {
@@ -27,16 +27,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
- const material_1 = require("@mui/material");
31
30
  const util_1 = require("@jbrowse/core/util");
32
31
  const jexlStrings_1 = require("@jbrowse/core/util/jexlStrings");
33
- const mobx_state_tree_1 = require("mobx-state-tree");
32
+ const Help_1 = __importDefault(require("@mui/icons-material/Help"));
33
+ const material_1 = require("@mui/material");
34
34
  const mobx_react_1 = require("mobx-react");
35
+ const mobx_state_tree_1 = require("mobx-state-tree");
35
36
  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
37
  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
38
  const useStyles = (0, mui_1.makeStyles)()(theme => ({
42
39
  callbackEditor: {
@@ -80,8 +77,6 @@ const CallbackEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
80
77
  setCodeError(e);
81
78
  }
82
79
  }, [debouncedCode, slot]);
83
- // if default value is a callback, will have to remove jexl:
84
- // do this last
85
80
  return (react_1.default.createElement(react_1.default.Fragment, null,
86
81
  error ? react_1.default.createElement("p", { className: classes.error }, `${error}`) : null,
87
82
  react_1.default.createElement("div", { className: classes.callbackContainer },
@@ -28,9 +28,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ColorSlot = void 0;
30
30
  const react_1 = __importStar(require("react"));
31
- const mobx_react_1 = require("mobx-react");
32
- const material_1 = require("@mui/material");
33
31
  const ColorPicker_1 = __importDefault(require("@jbrowse/core/ui/ColorPicker"));
32
+ const material_1 = require("@mui/material");
33
+ const mobx_react_1 = require("mobx-react");
34
34
  const ColorSlot = (props) => {
35
35
  const { value = '#000', label = '', TextFieldProps = {}, onChange } = props;
36
36
  const [displayed, setDisplayed] = (0, react_1.useState)(false);
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { AbstractSessionModel } from '@jbrowse/core/util';
3
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ import type { AbstractSessionModel } from '@jbrowse/core/util';
4
4
  declare const ConfigurationEditor: ({ model, }: {
5
5
  model: {
6
6
  target: AnyConfigurationModel;
@@ -4,16 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = __importDefault(require("react"));
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 SanitizedHTML_1 = __importDefault(require("@jbrowse/core/ui/SanitizedHTML"));
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 => ({
@@ -44,8 +42,6 @@ const Member = (0, mobx_react_1.observer)(function (props) {
44
42
  return react_1.default.createElement(Member, { key: key, ...props, slot: subslot, slotName: 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
46
  return (react_1.default.createElement(material_1.Accordion, { defaultExpanded: true, className: classes.accordion },
51
47
  react_1.default.createElement(material_1.AccordionSummary, { expandIcon: react_1.default.createElement(ExpandMore_1.default, { className: classes.icon }) },
@@ -72,9 +68,6 @@ const Schema = (0, mobx_react_1.observer)(function ({ schema, path = [], }) {
72
68
  });
73
69
  const ConfigurationEditor = (0, mobx_react_1.observer)(function ({ model, }) {
74
70
  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
71
  const { target } = model;
79
72
  const key = (0, configuration_1.readConfObject)(target, 'trackId');
80
73
  const name = (0, configuration_1.readConfObject)(target, 'name');
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TextFieldProps } from '@mui/material';
2
+ import type { TextFieldProps } from '@mui/material';
3
3
  export default function ConfigurationTextField(props: {
4
4
  helperText?: string;
5
5
  } & TextFieldProps): React.JSX.Element;
@@ -5,10 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = ConfigurationTextField;
7
7
  const react_1 = __importDefault(require("react"));
8
- const material_1 = require("@mui/material");
9
8
  const ui_1 = require("@jbrowse/core/ui");
10
- // adds ability to have html in helperText. note that FormHelperTextProps is
11
- // div because the default is p which does not like div children
9
+ const material_1 = require("@mui/material");
12
10
  function ConfigurationTextField(props) {
13
11
  const { helperText } = props;
14
12
  return (react_1.default.createElement(material_1.TextField, { ...props, helperText: react_1.default.createElement(ui_1.SanitizedHTML, { html: helperText || '' }), fullWidth: true, slotProps: {
@@ -25,11 +25,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  const react_1 = __importStar(require("react"));
27
27
  const material_1 = require("@mui/material");
28
- const mui_1 = require("tss-react/mui");
29
28
  const mobx_react_1 = require("mobx-react");
30
- // fontSize and fontFamily have to match between Editor and SyntaxHighlighter
29
+ const mui_1 = require("tss-react/mui");
31
30
  const fontSize = '12px';
32
- // Optimize by using system default fonts: https://css-tricks.com/snippets/css/font-stacks/
33
31
  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
32
  const useStyles = (0, mui_1.makeStyles)()(theme => ({
35
33
  error: {
@@ -27,12 +27,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
- const mobx_react_1 = require("mobx-react");
30
+ const Add_1 = __importDefault(require("@mui/icons-material/Add"));
31
+ const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
31
32
  const material_1 = require("@mui/material");
33
+ const mobx_react_1 = require("mobx-react");
32
34
  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
35
  const NumberEditor_1 = __importDefault(require("./NumberEditor"));
37
36
  const useStyles = (0, mui_1.makeStyles)()(theme => ({
38
37
  card: {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IAnyType } from 'mobx-state-tree';
2
+ import type { IAnyType } from 'mobx-state-tree';
3
3
  declare const SlotEditor: ({ slot, slotSchema, }: {
4
4
  slot: any;
5
5
  slotSchema: IAnyType;
@@ -27,24 +27,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
- const mobx_react_1 = require("mobx-react");
31
- const mobx_state_tree_1 = require("mobx-state-tree");
32
- const util_1 = require("@jbrowse/core/util");
33
30
  const ui_1 = require("@jbrowse/core/ui");
31
+ const util_1 = require("@jbrowse/core/util");
34
32
  const mst_reflection_1 = require("@jbrowse/core/util/mst-reflection");
35
- const material_1 = require("@mui/material");
36
- // icons
37
33
  const RadioButtonUnchecked_1 = __importDefault(require("@mui/icons-material/RadioButtonUnchecked"));
38
- // locals
39
- const StringArrayEditor_1 = __importDefault(require("./StringArrayEditor"));
34
+ const material_1 = require("@mui/material");
35
+ const mobx_react_1 = require("mobx-react");
36
+ const mobx_state_tree_1 = require("mobx-state-tree");
37
+ const BooleanEditor_1 = __importDefault(require("./BooleanEditor"));
40
38
  const CallbackEditor_1 = __importDefault(require("./CallbackEditor"));
41
39
  const ColorEditor_1 = __importDefault(require("./ColorEditor"));
42
- const JsonEditor_1 = __importDefault(require("./JsonEditor"));
43
- const StringArrayMapEditor_1 = __importDefault(require("./StringArrayMapEditor"));
44
40
  const ConfigurationTextField_1 = __importDefault(require("./ConfigurationTextField"));
45
- const NumberMapEditor_1 = __importDefault(require("./NumberMapEditor"));
41
+ const JsonEditor_1 = __importDefault(require("./JsonEditor"));
46
42
  const NumberEditor_1 = __importDefault(require("./NumberEditor"));
47
- const BooleanEditor_1 = __importDefault(require("./BooleanEditor"));
43
+ const NumberMapEditor_1 = __importDefault(require("./NumberMapEditor"));
44
+ const StringArrayEditor_1 = __importDefault(require("./StringArrayEditor"));
45
+ const StringArrayMapEditor_1 = __importDefault(require("./StringArrayMapEditor"));
48
46
  const useSlotEditorStyles_1 = require("./useSlotEditorStyles");
49
47
  const StringEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
50
48
  return (react_1.default.createElement(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: slot.value, onChange: evt => {
@@ -56,7 +54,6 @@ const TextEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
56
54
  slot.set(evt.target.value);
57
55
  } }));
58
56
  });
59
- // checked checkbox, looks like a styled (x)
60
57
  const SvgCheckbox = () => (react_1.default.createElement(material_1.SvgIcon, null,
61
58
  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" })));
62
59
  const IntegerEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
@@ -82,9 +79,7 @@ const FileSelectorWrapper = (0, mobx_react_1.observer)(function ({ slot, }) {
82
79
  var _a;
83
80
  return (react_1.default.createElement(ui_1.FileSelector, { location: slot.value, setLocation: location => {
84
81
  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 }));
82
+ }, name: slot.name, description: slot.description, rootModel: (_a = (0, util_1.getEnv)(slot).pluginManager) === null || _a === void 0 ? void 0 : _a.rootModel }));
88
83
  });
89
84
  const valueComponents = {
90
85
  string: StringEditor,
@@ -106,7 +101,7 @@ const SlotEditor = (0, mobx_react_1.observer)(function ({ slot, slotSchema, }) {
106
101
  const { type } = slot;
107
102
  let ValueComponent = slot.isCallback
108
103
  ? CallbackEditor_1.default
109
- : // @ts-expect-error
104
+ :
110
105
  valueComponents[type];
111
106
  if (!ValueComponent) {
112
107
  console.warn(`no slot editor defined for ${type}, editing as string`);
@@ -27,10 +27,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
- const mobx_react_1 = require("mobx-react");
31
- const material_1 = require("@mui/material");
32
- // icons
33
30
  const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
31
+ const material_1 = require("@mui/material");
32
+ const mobx_react_1 = require("mobx-react");
34
33
  const StringArrayEditor = (0, mobx_react_1.observer)(function ({ slot, }) {
35
34
  const [value, setValue] = (0, react_1.useState)('');
36
35
  const [addNew, setAddNew] = (0, react_1.useState)(false);
@@ -27,13 +27,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
- const mobx_react_1 = require("mobx-react");
30
+ const Add_1 = __importDefault(require("@mui/icons-material/Add"));
31
+ const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
31
32
  const material_1 = require("@mui/material");
33
+ const mobx_react_1 = require("mobx-react");
32
34
  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
35
  const StringArrayEditor_1 = __importDefault(require("./StringArrayEditor"));
38
36
  const useStyles = (0, mui_1.makeStyles)()(theme => ({
39
37
  card: {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
2
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
3
  declare const TypeSelector: ({ typeNameChoices, slot, slotName, onChange, }: {
4
4
  typeNameChoices: string[];
5
5
  slot: AnyConfigurationModel;
@@ -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;
@@ -30,8 +30,8 @@ exports.default = registerConfigurationEditorWidget;
30
30
  const react_1 = require("react");
31
31
  const configuration_1 = require("@jbrowse/core/configuration");
32
32
  const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
33
- const model_1 = __importDefault(require("./model"));
34
33
  const HeadingComponent_1 = __importDefault(require("./components/HeadingComponent"));
34
+ const model_1 = __importDefault(require("./model"));
35
35
  const configSchema = (0, configuration_1.ConfigurationSchema)('ConfigurationEditorWidget', {});
36
36
  const LazyConfigurationEditorComponent = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/ConfigurationEditor'))));
37
37
  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 { Feature, SimpleFeatureSerialized } from '@jbrowse/core/util/simpleFeature';
3
- import { NoAssemblyRegion } from '@jbrowse/core/util/types';
4
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
5
- import PluginManager from '@jbrowse/core/PluginManager';
6
- import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
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[]>;
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.makeFeatures = makeFeatures;
7
+ const configuration_1 = require("@jbrowse/core/configuration");
7
8
  const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
8
- const simpleFeature_1 = __importDefault(require("@jbrowse/core/util/simpleFeature"));
9
9
  const rxjs_1 = require("@jbrowse/core/util/rxjs");
10
- const configuration_1 = require("@jbrowse/core/configuration");
10
+ const simpleFeature_1 = __importDefault(require("@jbrowse/core/util/simpleFeature"));
11
11
  function makeFeatures(fdata) {
12
12
  const features = new Map();
13
13
  for (const entry of fdata) {
@@ -20,7 +20,6 @@ function makeFeatures(fdata) {
20
20
  }
21
21
  bucket.push(f);
22
22
  }
23
- // sort the features on each reference sequence by start coordinate
24
23
  for (const refFeatures of features.values()) {
25
24
  refFeatures.sort((a, b) => a.get('start') - b.get('start'));
26
25
  }
@@ -53,6 +52,6 @@ class FromConfigAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
53
52
  observer.complete();
54
53
  });
55
54
  }
56
- freeResources( /* { region } */) { }
55
+ freeResources() { }
57
56
  }
58
57
  exports.default = FromConfigAdapter;
@@ -1,7 +1,4 @@
1
1
  declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  features: {
6
3
  type: string;
7
4
  defaultValue: never[];
@@ -1,14 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const configuration_1 = require("@jbrowse/core/configuration");
4
- /**
5
- * #config FromConfigAdapter
6
- */
7
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
4
+ function x() { }
8
5
  const configSchema = (0, configuration_1.ConfigurationSchema)('FromConfigAdapter', {
9
- /**
10
- * #slot
11
- */
12
6
  features: {
13
7
  type: 'frozen',
14
8
  defaultValue: [],
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function FromConfigAdapterF(pluginManager: PluginManager): void;
@@ -1,18 +1,11 @@
1
- import { BaseAdapter, RegionsAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
- import PluginManager from '@jbrowse/core/PluginManager';
4
- import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
5
- /**
6
- * Adapter that just returns the features defined in its `features` configuration
7
- * key, like:
8
- * `"features": [ { "refName": "ctgA", "start":1, "end":20 }, ... ]`
9
- */
1
+ import { BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import type PluginManager from '@jbrowse/core/PluginManager';
3
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
4
+ import type { RegionsAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
5
+ import type { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
10
6
  export default class FromConfigRegionsAdapter extends BaseAdapter implements RegionsAdapter {
11
7
  private features;
12
8
  constructor(config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
13
- /**
14
- * Get refName, start, and end for all features after collapsing any overlaps
15
- */
16
9
  getRegions(): Promise<{
17
10
  refName: string;
18
11
  start: number;
@@ -1,25 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
4
3
  const configuration_1 = require("@jbrowse/core/configuration");
4
+ const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
5
5
  const FromConfigAdapter_1 = require("../FromConfigAdapter/FromConfigAdapter");
6
- /**
7
- * Adapter that just returns the features defined in its `features` configuration
8
- * key, like:
9
- * `"features": [ { "refName": "ctgA", "start":1, "end":20 }, ... ]`
10
- */
11
6
  class FromConfigRegionsAdapter extends BaseAdapter_1.BaseAdapter {
12
7
  constructor(config, getSubAdapter, pluginManager) {
13
8
  super(config, getSubAdapter, pluginManager);
14
9
  const f = (0, configuration_1.readConfObject)(config, 'features');
15
10
  this.features = (0, FromConfigAdapter_1.makeFeatures)(f);
16
11
  }
17
- /**
18
- * Get refName, start, and end for all features after collapsing any overlaps
19
- */
20
12
  async getRegions() {
21
13
  const regions = [];
22
- // recall: features are stored in this object sorted by start coordinate
23
14
  for (const [refName, features] of this.features) {
24
15
  let currentRegion;
25
16
  for (const feature of features) {
@@ -43,10 +34,9 @@ class FromConfigRegionsAdapter extends BaseAdapter_1.BaseAdapter {
43
34
  regions.push(currentRegion);
44
35
  }
45
36
  }
46
- // sort the regions by refName
47
37
  regions.sort((a, b) => a.refName.localeCompare(b.refName));
48
38
  return regions;
49
39
  }
50
- freeResources( /* { region } */) { }
40
+ freeResources() { }
51
41
  }
52
42
  exports.default = FromConfigRegionsAdapter;
@@ -1,7 +1,4 @@
1
1
  declare const regionsConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  features: {
6
3
  type: string;
7
4
  defaultValue: never[];
@@ -1,15 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const configuration_1 = require("@jbrowse/core/configuration");
4
- /**
5
- * #config FromConfigRegionsAdapter
6
- * used for specifying refNames+sizes of an assembly
7
- */
8
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
4
+ function x() { }
9
5
  const regionsConfigSchema = (0, configuration_1.ConfigurationSchema)('FromConfigRegionsAdapter', {
10
- /**
11
- * #slot
12
- */
13
6
  features: {
14
7
  type: 'frozen',
15
8
  defaultValue: [],
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function FromConfigRegionsAdapterF(pluginManager: PluginManager): void;
@@ -1,26 +1,13 @@
1
- import { Feature } from '@jbrowse/core/util/simpleFeature';
2
- import { NoAssemblyRegion } from '@jbrowse/core/util/types';
3
- import { RegionsAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
4
1
  import FromConfigAdapter from '../FromConfigAdapter/FromConfigAdapter';
2
+ import type { RegionsAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
3
+ import type { Feature } from '@jbrowse/core/util/simpleFeature';
4
+ import type { NoAssemblyRegion } from '@jbrowse/core/util/types';
5
5
  export default class FromConfigSequenceAdapter extends FromConfigAdapter implements RegionsAdapter {
6
- /**
7
- * Fetch features for a certain region
8
- * @param region - Region
9
- * @returns Observable of Feature objects in the region
10
- */
11
6
  getFeatures(region: NoAssemblyRegion): import("rxjs").Observable<Feature>;
12
- /**
13
- * Get refName, start, and end for all features after collapsing any overlaps
14
- */
15
7
  getRegions(): Promise<{
16
8
  start: number;
17
9
  end: number;
18
10
  refName: string;
19
11
  }[]>;
20
- /**
21
- * called to provide a hint that data tied to a certain region
22
- * will not be needed for the foreseeable future and can be purged
23
- * from caches, etc
24
- */
25
12
  freeResources(): void;
26
13
  }
@@ -3,18 +3,12 @@ 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 simpleFeature_1 = __importDefault(require("@jbrowse/core/util/simpleFeature"));
7
6
  const rxjs_1 = require("@jbrowse/core/util/rxjs");
7
+ const simpleFeature_1 = __importDefault(require("@jbrowse/core/util/simpleFeature"));
8
+ const rxjs_2 = require("rxjs");
8
9
  const operators_1 = require("rxjs/operators");
9
- // locals
10
10
  const FromConfigAdapter_1 = __importDefault(require("../FromConfigAdapter/FromConfigAdapter"));
11
- const rxjs_2 = require("rxjs");
12
11
  class FromConfigSequenceAdapter extends FromConfigAdapter_1.default {
13
- /**
14
- * Fetch features for a certain region
15
- * @param region - Region
16
- * @returns Observable of Feature objects in the region
17
- */
18
12
  getFeatures(region) {
19
13
  return (0, rxjs_1.ObservableCreate)(async (observer) => {
20
14
  const feats = await (0, rxjs_2.firstValueFrom)(super.getFeatures(region).pipe((0, operators_1.toArray)()));
@@ -31,12 +25,8 @@ class FromConfigSequenceAdapter extends FromConfigAdapter_1.default {
31
25
  observer.complete();
32
26
  });
33
27
  }
34
- /**
35
- * Get refName, start, and end for all features after collapsing any overlaps
36
- */
37
28
  async getRegions() {
38
29
  const regions = [];
39
- // recall: features are stored in this object sorted by start coordinate
40
30
  for (const [refName, features] of this.features) {
41
31
  let currentRegion;
42
32
  for (const feature of features) {
@@ -62,11 +52,6 @@ class FromConfigSequenceAdapter extends FromConfigAdapter_1.default {
62
52
  }
63
53
  return regions;
64
54
  }
65
- /**
66
- * called to provide a hint that data tied to a certain region
67
- * will not be needed for the foreseeable future and can be purged
68
- * from caches, etc
69
- */
70
- freeResources( /* { region } */) { }
55
+ freeResources() { }
71
56
  }
72
57
  exports.default = FromConfigSequenceAdapter;
@@ -1,7 +1,4 @@
1
1
  declare const sequenceConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  features: {
6
3
  type: string;
7
4
  defaultValue: never[];
@@ -1,14 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const configuration_1 = require("@jbrowse/core/configuration");
4
- /**
5
- * #config FromConfigSequenceAdapter
6
- */
7
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
4
+ function x() { }
8
5
  const sequenceConfigSchema = (0, configuration_1.ConfigurationSchema)('FromConfigSequenceAdapter', {
9
- /**
10
- * #slot
11
- */
12
6
  features: {
13
7
  type: 'frozen',
14
8
  defaultValue: [],
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function FromConfigSequenceAdapterF(pluginManager: PluginManager): void;
@@ -1,4 +1,5 @@
1
- import { BaseRefNameAliasAdapter, BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
1
+ import { BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import type { BaseRefNameAliasAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
3
  export default class NcbiSequenceReportAliasAdapter extends BaseAdapter implements BaseRefNameAliasAdapter {
3
4
  getRefNameAliases(): Promise<{
4
5
  refName: string;
@@ -1,7 +1,4 @@
1
1
  declare const NcbiSequenceReportAliasAdapterConfigSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  location: {
6
3
  type: string;
7
4
  defaultValue: {
@@ -1,15 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const configuration_1 = require("@jbrowse/core/configuration");
4
- /**
5
- * #config NcbiSequenceReportAliasAdapter
6
- * can read "sequence_report.tsv" type files from NCBI
7
- */
8
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
4
+ function x() { }
9
5
  const NcbiSequenceReportAliasAdapterConfigSchema = (0, configuration_1.ConfigurationSchema)('NcbiSequenceReportAliasAdapter', {
10
- /**
11
- * #slot
12
- */
13
6
  location: {
14
7
  type: 'fileLocation',
15
8
  defaultValue: {