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