@jbrowse/app-core 2.6.1 → 2.6.3

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 (36) hide show
  1. package/dist/HistoryManagement/index.js +5 -2
  2. package/dist/JBrowseConfig/index.d.ts +29 -18
  3. package/dist/JBrowseConfig/index.js +8 -47
  4. package/dist/JBrowseModel/index.d.ts +38 -9
  5. package/dist/ui/App/DrawerHeader.d.ts +7 -0
  6. package/dist/ui/App/DrawerHeader.js +114 -0
  7. package/dist/ui/App/DrawerWidget.js +2 -76
  8. package/esm/HistoryManagement/index.js +5 -2
  9. package/esm/JBrowseConfig/index.d.ts +29 -18
  10. package/esm/JBrowseConfig/index.js +8 -47
  11. package/esm/JBrowseModel/index.d.ts +38 -9
  12. package/esm/ui/App/DrawerHeader.d.ts +7 -0
  13. package/esm/ui/App/DrawerHeader.js +86 -0
  14. package/esm/ui/App/DrawerWidget.js +1 -75
  15. package/package.json +6 -7
  16. package/src/Assemblies/SessionAssembliesMixin.ts +0 -50
  17. package/src/Assemblies/TemporaryAssembliesMixin.ts +0 -51
  18. package/src/Assemblies/index.ts +0 -2
  19. package/src/HistoryManagement/index.ts +0 -56
  20. package/src/JBrowseConfig/index.ts +0 -173
  21. package/src/JBrowseModel/index.ts +0 -150
  22. package/src/RootMenu/index.ts +0 -157
  23. package/src/index.ts +0 -6
  24. package/src/ui/App/App.tsx +0 -117
  25. package/src/ui/App/AppFab.tsx +0 -45
  26. package/src/ui/App/AppToolbar.tsx +0 -89
  27. package/src/ui/App/DialogQueue.tsx +0 -22
  28. package/src/ui/App/Drawer.tsx +0 -56
  29. package/src/ui/App/DrawerWidget.tsx +0 -238
  30. package/src/ui/App/ViewContainer.tsx +0 -76
  31. package/src/ui/App/ViewContainerTitle.tsx +0 -55
  32. package/src/ui/App/ViewLauncher.tsx +0 -64
  33. package/src/ui/App/ViewMenu.tsx +0 -54
  34. package/src/ui/App/ViewPanel.tsx +0 -63
  35. package/src/ui/App/index.ts +0 -1
  36. package/src/ui/index.ts +0 -1
@@ -23,18 +23,21 @@ function HistoryManagementMixin() {
23
23
  .actions(self => ({
24
24
  afterCreate() {
25
25
  document.addEventListener('keydown', e => {
26
+ var _a, _b;
26
27
  if (self.history.canRedo &&
27
28
  // ctrl+shift+z or cmd+shift+z
28
29
  (((e.ctrlKey || e.metaKey) && e.shiftKey && e.code === 'KeyZ') ||
29
30
  // ctrl+y
30
- (e.ctrlKey && !e.shiftKey && e.code === 'KeyY'))) {
31
+ (e.ctrlKey && !e.shiftKey && e.code === 'KeyY')) &&
32
+ ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName.toUpperCase()) !== 'INPUT') {
31
33
  self.history.redo();
32
34
  }
33
35
  if (self.history.canUndo &&
34
36
  // ctrl+z or cmd+z
35
37
  (e.ctrlKey || e.metaKey) &&
36
38
  !e.shiftKey &&
37
- e.code === 'KeyZ') {
39
+ e.code === 'KeyZ' &&
40
+ ((_b = document.activeElement) === null || _b === void 0 ? void 0 : _b.tagName.toUpperCase()) !== 'INPUT') {
38
41
  self.history.undo();
39
42
  }
40
43
  });
@@ -17,9 +17,7 @@ export declare function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }:
17
17
  rpc: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
18
18
  defaultDriver: {
19
19
  type: string;
20
- description: string; /**
21
- * #slot configuration.formatDetails.feature
22
- */
20
+ description: string;
23
21
  defaultValue: string;
24
22
  };
25
23
  drivers: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IMapType<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined, import("mobx-state-tree").ModelSnapshotType<Record<string, any>>, (Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> & import("mobx-state-tree/dist/internal").NonEmptyObject) | undefined>>, [undefined]>;
@@ -32,27 +30,18 @@ export declare function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }:
32
30
  defaultValue: number;
33
31
  };
34
32
  formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
35
- /**
36
- * #slot configuration.formatDetails.feature
37
- */
38
33
  feature: {
39
34
  type: string;
40
35
  description: string;
41
36
  defaultValue: {};
42
37
  contextVariable: string[];
43
38
  };
44
- /**
45
- * #slot configuration.formatDetails.subfeatures
46
- */
47
39
  subfeatures: {
48
40
  type: string;
49
41
  description: string;
50
42
  defaultValue: {};
51
43
  contextVariable: string[];
52
44
  };
53
- /**
54
- * #slot configuration.formatDetails.depth
55
- */
56
45
  depth: {
57
46
  type: string;
58
47
  defaultValue: number;
@@ -60,18 +49,12 @@ export declare function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }:
60
49
  };
61
50
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
62
51
  formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
63
- /**
64
- * #slot configuration.formatAbout.config
65
- */
66
52
  config: {
67
53
  type: string;
68
54
  description: string;
69
55
  defaultValue: {};
70
56
  contextVariable: string[];
71
57
  };
72
- /**
73
- * #slot configuration.formatAbout.hideUris
74
- */
75
58
  hideUris: {
76
59
  type: string;
77
60
  defaultValue: boolean;
@@ -88,6 +71,34 @@ export declare function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }:
88
71
  type: string;
89
72
  defaultValue: boolean;
90
73
  };
74
+ hierarchical: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
75
+ sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
76
+ trackNames: {
77
+ type: string;
78
+ defaultValue: boolean;
79
+ };
80
+ categories: {
81
+ type: string;
82
+ defaultValue: boolean;
83
+ };
84
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
85
+ defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
86
+ categoryNames: {
87
+ type: string;
88
+ defaultValue: never[]; /**
89
+ * #slot configuration.highResolutionScaling
90
+ */
91
+ };
92
+ topLevelCategories: {
93
+ type: string;
94
+ defaultValue: boolean;
95
+ };
96
+ subCategories: {
97
+ type: string;
98
+ defaultValue: boolean;
99
+ };
100
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
101
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
91
102
  /**
92
103
  * #slot configuration.theme
93
104
  */
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.JBrowseConfigF = void 0;
7
7
  const configuration_1 = require("@jbrowse/core/configuration");
8
8
  const RpcManager_1 = __importDefault(require("@jbrowse/core/rpc/RpcManager"));
9
+ const product_core_1 = require("@jbrowse/product-core");
9
10
  const mobx_state_tree_1 = require("mobx-state-tree");
10
11
  /**
11
12
  * #config JBrowseRootConfig
@@ -26,52 +27,8 @@ function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }) {
26
27
  type: 'number',
27
28
  defaultValue: 2,
28
29
  },
29
- formatDetails: (0, configuration_1.ConfigurationSchema)('FormatDetails', {
30
- /**
31
- * #slot configuration.formatDetails.feature
32
- */
33
- feature: {
34
- type: 'frozen',
35
- description: 'adds extra fields to the feature details',
36
- defaultValue: {},
37
- contextVariable: ['feature'],
38
- },
39
- /**
40
- * #slot configuration.formatDetails.subfeatures
41
- */
42
- subfeatures: {
43
- type: 'frozen',
44
- description: 'adds extra fields to the subfeatures of a feature',
45
- defaultValue: {},
46
- contextVariable: ['feature'],
47
- },
48
- /**
49
- * #slot configuration.formatDetails.depth
50
- */
51
- depth: {
52
- type: 'number',
53
- defaultValue: 2,
54
- description: 'depth to iterate on subfeatures',
55
- },
56
- }),
57
- formatAbout: (0, configuration_1.ConfigurationSchema)('FormatAbout', {
58
- /**
59
- * #slot configuration.formatAbout.config
60
- */
61
- config: {
62
- type: 'frozen',
63
- description: 'formats configuration object in about dialog',
64
- defaultValue: {},
65
- contextVariable: ['config'],
66
- },
67
- /**
68
- * #slot configuration.formatAbout.hideUris
69
- */
70
- hideUris: {
71
- type: 'boolean',
72
- defaultValue: false,
73
- },
74
- }),
30
+ formatDetails: (0, product_core_1.FormatDetailsConfigSchemaFactory)(),
31
+ formatAbout: (0, product_core_1.FormatAboutConfigSchemaFactory)(),
75
32
  /*
76
33
  * #slot configuration.shareURL
77
34
  */
@@ -86,6 +43,7 @@ function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }) {
86
43
  type: 'boolean',
87
44
  defaultValue: false,
88
45
  },
46
+ hierarchical: (0, product_core_1.HierarchicalConfigSchemaFactory)(),
89
47
  /**
90
48
  * #slot configuration.theme
91
49
  */
@@ -96,7 +54,10 @@ function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }) {
96
54
  /**
97
55
  * #slot configuration.extraThemes
98
56
  */
99
- extraThemes: { type: 'frozen', defaultValue: {} },
57
+ extraThemes: {
58
+ type: 'frozen',
59
+ defaultValue: {},
60
+ },
100
61
  /**
101
62
  * #slot configuration.logoPath
102
63
  */
@@ -29,12 +29,16 @@ export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, }:
29
29
  };
30
30
  subfeatures: {
31
31
  type: string;
32
- description: string;
32
+ description: string; /**
33
+ * #getter
34
+ */
33
35
  defaultValue: {};
34
36
  contextVariable: string[];
35
37
  };
36
38
  depth: {
37
- type: string;
39
+ type: string; /**
40
+ * #getter
41
+ */
38
42
  defaultValue: number;
39
43
  description: string;
40
44
  };
@@ -59,21 +63,46 @@ export declare function JBrowseModelF({ pluginManager, assemblyConfigSchema, }:
59
63
  type: string;
60
64
  defaultValue: boolean;
61
65
  };
66
+ hierarchical: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
67
+ sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
68
+ trackNames: {
69
+ type: string;
70
+ defaultValue: boolean;
71
+ };
72
+ categories: {
73
+ type: string;
74
+ defaultValue: boolean;
75
+ };
76
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
77
+ defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
78
+ categoryNames: {
79
+ type: string;
80
+ defaultValue: never[];
81
+ };
82
+ topLevelCategories: {
83
+ type: string;
84
+ defaultValue: boolean; /**
85
+ * #action
86
+ */
87
+ };
88
+ subCategories: {
89
+ type: string;
90
+ defaultValue: boolean;
91
+ };
92
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
93
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
62
94
  theme: {
63
95
  type: string;
64
- defaultValue: {}; /**
65
- * #action
66
- */
96
+ defaultValue: {};
67
97
  };
68
98
  extraThemes: {
69
- type: string;
99
+ type: string; /**
100
+ * #action
101
+ */
70
102
  defaultValue: {};
71
103
  };
72
104
  logoPath: {
73
105
  type: string;
74
- /**
75
- * #action
76
- */
77
106
  defaultValue: {
78
107
  uri: string;
79
108
  locationType: string;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { SessionWithDrawerWidgets } from '@jbrowse/core/util/types';
3
+ declare const _default: ({ session, setToolbarHeight, }: {
4
+ session: SessionWithDrawerWidgets;
5
+ setToolbarHeight: (arg: number) => void;
6
+ }) => React.JSX.Element;
7
+ export default _default;
@@ -0,0 +1,114 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const react_1 = __importStar(require("react"));
30
+ const material_1 = require("@mui/material");
31
+ const mui_1 = require("tss-react/mui");
32
+ const mobx_react_1 = require("mobx-react");
33
+ const util_1 = require("@jbrowse/core/util");
34
+ // icons
35
+ const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
36
+ const Close_1 = __importDefault(require("@mui/icons-material/Close"));
37
+ const Minimize_1 = __importDefault(require("@mui/icons-material/Minimize"));
38
+ const MoreVert_1 = __importDefault(require("@mui/icons-material/MoreVert"));
39
+ const useStyles = (0, mui_1.makeStyles)()(theme => ({
40
+ formControl: {
41
+ margin: 0,
42
+ },
43
+ spacer: {
44
+ flexGrow: 1,
45
+ },
46
+ drawerSelect: {
47
+ margin: 0,
48
+ color: theme.palette.secondary.contrastText,
49
+ },
50
+ dropDownIcon: {
51
+ color: theme.palette.secondary.contrastText,
52
+ },
53
+ header: {
54
+ background: theme.palette.secondary.main,
55
+ },
56
+ }));
57
+ exports.default = (0, mobx_react_1.observer)(function ({ session, setToolbarHeight, }) {
58
+ const { classes } = useStyles();
59
+ return (react_1.default.createElement(material_1.AppBar, { position: "sticky", className: classes.header, ref: ref => setToolbarHeight((ref === null || ref === void 0 ? void 0 : ref.getBoundingClientRect().height) || 0) },
60
+ react_1.default.createElement(material_1.Toolbar, { disableGutters: true },
61
+ react_1.default.createElement(DrawerWidgetSelector, { session: session }),
62
+ react_1.default.createElement("div", { className: classes.spacer }),
63
+ react_1.default.createElement(DrawerControls, { session: session }))));
64
+ });
65
+ const DrawerWidgetSelector = (0, mobx_react_1.observer)(function ({ session, }) {
66
+ const { visibleWidget, activeWidgets } = session;
67
+ const { classes } = useStyles();
68
+ const { pluginManager } = (0, util_1.getEnv)(session);
69
+ return (react_1.default.createElement(material_1.FormControl, { className: classes.formControl },
70
+ react_1.default.createElement(material_1.Select, { value: visibleWidget === null || visibleWidget === void 0 ? void 0 : visibleWidget.id, "data-testid": "widget-drawer-selects", className: classes.drawerSelect, classes: { icon: classes.dropDownIcon }, renderValue: widgetId => {
71
+ const widget = session.activeWidgets.get(widgetId);
72
+ if (!widget) {
73
+ return (react_1.default.createElement(material_1.Typography, { variant: "h6", color: "inherit" }, "Unknown widget"));
74
+ }
75
+ const widgetType = pluginManager.getWidgetType(widget.type);
76
+ const { HeadingComponent, heading } = widgetType;
77
+ return HeadingComponent ? (react_1.default.createElement(HeadingComponent, { model: widget })) : (react_1.default.createElement(material_1.Typography, { variant: "h6", color: "inherit" }, heading));
78
+ }, onChange: e => {
79
+ const w = session.activeWidgets.get(e.target.value);
80
+ if (w) {
81
+ session.showWidget(w);
82
+ }
83
+ else {
84
+ session.notify(`Widget not found ${e.target.value}`, 'warning');
85
+ }
86
+ } }, [...activeWidgets.values()].map(widget => {
87
+ const widgetType = pluginManager.getWidgetType(widget.type);
88
+ const { HeadingComponent, heading } = widgetType;
89
+ return (react_1.default.createElement(material_1.MenuItem, { "data-testid": `widget-drawer-selects-item-${widget.type}`, key: widget.id, value: widget.id },
90
+ HeadingComponent ? (react_1.default.createElement(HeadingComponent, { model: widget })) : (react_1.default.createElement(material_1.Typography, { variant: "h6", color: "inherit" }, heading)),
91
+ react_1.default.createElement(material_1.IconButton, { "data-testid": `${widget.type}-drawer-delete`, color: "inherit", "aria-label": "Delete", onClick: () => session.hideWidget(widget) },
92
+ react_1.default.createElement(Delete_1.default, null))));
93
+ }))));
94
+ });
95
+ const DrawerControls = (0, mobx_react_1.observer)(function ({ session, }) {
96
+ const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
97
+ const { drawerPosition, visibleWidget } = session;
98
+ return (react_1.default.createElement(react_1.default.Fragment, null,
99
+ react_1.default.createElement(material_1.IconButton, { color: "inherit", onClick: event => setAnchorEl(event.currentTarget) },
100
+ react_1.default.createElement(MoreVert_1.default, null)),
101
+ react_1.default.createElement(material_1.Tooltip, { title: "Minimize drawer" },
102
+ react_1.default.createElement(material_1.IconButton, { "data-testid": "drawer-minimize", color: "inherit", onClick: () => {
103
+ session.notify(`Drawer minimized, click button on ${drawerPosition} side of screen to re-open`, 'info');
104
+ session.minimizeWidgetDrawer();
105
+ } },
106
+ react_1.default.createElement(Minimize_1.default, null))),
107
+ react_1.default.createElement(material_1.Tooltip, { title: "Close drawer" },
108
+ react_1.default.createElement(material_1.IconButton, { color: "inherit", onClick: () => session.hideWidget(visibleWidget) },
109
+ react_1.default.createElement(Close_1.default, null))),
110
+ react_1.default.createElement(material_1.Menu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: () => setAnchorEl(null) }, ['left', 'right'].map(option => (react_1.default.createElement(material_1.MenuItem, { key: option, selected: drawerPosition === 'option', onClick: () => {
111
+ session.setDrawerPosition(option);
112
+ setAnchorEl(null);
113
+ } }, option))))));
114
+ });
@@ -28,87 +28,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
30
  const react_error_boundary_1 = require("react-error-boundary");
31
- const material_1 = require("@mui/material");
32
- const mui_1 = require("tss-react/mui");
33
31
  const mobx_react_1 = require("mobx-react");
34
32
  const util_1 = require("@jbrowse/core/util");
35
33
  const LoadingEllipses_1 = __importDefault(require("@jbrowse/core/ui/LoadingEllipses"));
36
34
  const ErrorMessage_1 = __importDefault(require("@jbrowse/core/ui/ErrorMessage"));
37
- // icons
38
- const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
39
- const Close_1 = __importDefault(require("@mui/icons-material/Close"));
40
- const Minimize_1 = __importDefault(require("@mui/icons-material/Minimize"));
41
- const MoreVert_1 = __importDefault(require("@mui/icons-material/MoreVert"));
42
35
  // locals
43
36
  const Drawer_1 = __importDefault(require("./Drawer"));
44
- const useStyles = (0, mui_1.makeStyles)()(theme => ({
45
- formControl: {
46
- margin: 0,
47
- },
48
- spacer: {
49
- flexGrow: 1,
50
- },
51
- drawerSelect: {
52
- margin: 0,
53
- color: theme.palette.secondary.contrastText,
54
- },
55
- dropDownIcon: {
56
- color: theme.palette.secondary.contrastText,
57
- },
58
- header: {
59
- background: theme.palette.secondary.main,
60
- },
61
- }));
62
- const DrawerHeader = (0, mobx_react_1.observer)(function ({ session, setToolbarHeight, }) {
63
- const { pluginManager } = (0, util_1.getEnv)(session);
64
- const { visibleWidget, activeWidgets, drawerPosition } = session;
65
- const { classes } = useStyles();
66
- const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
67
- return (react_1.default.createElement(material_1.AppBar, { position: "sticky", className: classes.header, ref: ref => setToolbarHeight((ref === null || ref === void 0 ? void 0 : ref.getBoundingClientRect().height) || 0) },
68
- react_1.default.createElement(material_1.Toolbar, { disableGutters: true },
69
- react_1.default.createElement(material_1.FormControl, { className: classes.formControl },
70
- react_1.default.createElement(material_1.Select, { value: visibleWidget === null || visibleWidget === void 0 ? void 0 : visibleWidget.id, "data-testid": "widget-drawer-selects", className: classes.drawerSelect, classes: { icon: classes.dropDownIcon }, renderValue: widgetId => {
71
- const widget = session.activeWidgets.get(widgetId);
72
- if (!widget) {
73
- return (react_1.default.createElement(material_1.Typography, { variant: "h6", color: "inherit" }, "Unknown widget"));
74
- }
75
- const widgetType = pluginManager.getWidgetType(widget.type);
76
- const { HeadingComponent, heading } = widgetType;
77
- return HeadingComponent ? (react_1.default.createElement(HeadingComponent, { model: widget })) : (react_1.default.createElement(material_1.Typography, { variant: "h6", color: "inherit" }, heading));
78
- }, onChange: e => {
79
- const w = session.activeWidgets.get(e.target.value);
80
- if (w) {
81
- session.showWidget(w);
82
- }
83
- else {
84
- session.notify(`Widget not found ${e.target.value}`, 'warning');
85
- }
86
- } }, [...activeWidgets.values()].map(widget => {
87
- const widgetType = pluginManager.getWidgetType(widget.type);
88
- const { HeadingComponent, heading } = widgetType;
89
- return (react_1.default.createElement(material_1.MenuItem, { "data-testid": `widget-drawer-selects-item-${widget.type}`, key: widget.id, value: widget.id },
90
- HeadingComponent ? (react_1.default.createElement(HeadingComponent, { model: widget })) : (react_1.default.createElement(material_1.Typography, { variant: "h6", color: "inherit" }, heading)),
91
- react_1.default.createElement(material_1.IconButton, { "data-testid": `${widget.type}-drawer-delete`, color: "inherit", "aria-label": "Delete", onClick: () => session.hideWidget(widget) },
92
- react_1.default.createElement(Delete_1.default, null))));
93
- }))),
94
- react_1.default.createElement("div", { className: classes.spacer }),
95
- react_1.default.createElement("div", null,
96
- react_1.default.createElement(material_1.IconButton, { "data-testid": "drawer-close", color: "inherit", onClick: event => setAnchorEl(event.currentTarget) },
97
- react_1.default.createElement(MoreVert_1.default, null)),
98
- react_1.default.createElement(material_1.Tooltip, { title: "Minimize drawer" },
99
- react_1.default.createElement(material_1.IconButton, { "data-testid": "drawer-minimize", color: "inherit", onClick: () => {
100
- session.notify(`Drawer minimized, click button on ${drawerPosition} side of screen to re-open`, 'info');
101
- session.minimizeWidgetDrawer();
102
- } },
103
- react_1.default.createElement(Minimize_1.default, null))),
104
- react_1.default.createElement(material_1.Tooltip, { title: "Close drawer" },
105
- react_1.default.createElement(material_1.IconButton, { "data-testid": "drawer-close", color: "inherit", onClick: () => session.hideWidget(visibleWidget) },
106
- react_1.default.createElement(Close_1.default, null))))),
107
- react_1.default.createElement(material_1.Menu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: () => setAnchorEl(null) }, ['left', 'right'].map(option => (react_1.default.createElement(material_1.MenuItem, { key: option, selected: drawerPosition === 'option', onClick: () => {
108
- session.setDrawerPosition(option);
109
- setAnchorEl(null);
110
- } }, option))))));
111
- });
37
+ const DrawerHeader_1 = __importDefault(require("./DrawerHeader"));
112
38
  const DrawerWidget = (0, mobx_react_1.observer)(function ({ session, }) {
113
39
  const { visibleWidget } = session;
114
40
  const { pluginManager } = (0, util_1.getEnv)(session);
@@ -123,7 +49,7 @@ const DrawerWidget = (0, mobx_react_1.observer)(function ({ session, }) {
123
49
  // (the position static/sticky is included in AutoSizer estimates)
124
50
  const [toolbarHeight, setToolbarHeight] = (0, react_1.useState)(0);
125
51
  return (react_1.default.createElement(Drawer_1.default, { session: session },
126
- react_1.default.createElement(DrawerHeader, { session: session, setToolbarHeight: setToolbarHeight }),
52
+ react_1.default.createElement(DrawerHeader_1.default, { session: session, setToolbarHeight: setToolbarHeight }),
127
53
  react_1.default.createElement(react_1.Suspense, { fallback: react_1.default.createElement(LoadingEllipses_1.default, null) },
128
54
  react_1.default.createElement(react_error_boundary_1.ErrorBoundary, { FallbackComponent: ({ error }) => react_1.default.createElement(ErrorMessage_1.default, { error: error }) }, DrawerComponent ? (react_1.default.createElement(react_1.default.Fragment, null,
129
55
  react_1.default.createElement(DrawerComponent, { model: visibleWidget, session: session, toolbarHeight: toolbarHeight }),
@@ -17,18 +17,21 @@ export function HistoryManagementMixin() {
17
17
  .actions(self => ({
18
18
  afterCreate() {
19
19
  document.addEventListener('keydown', e => {
20
+ var _a, _b;
20
21
  if (self.history.canRedo &&
21
22
  // ctrl+shift+z or cmd+shift+z
22
23
  (((e.ctrlKey || e.metaKey) && e.shiftKey && e.code === 'KeyZ') ||
23
24
  // ctrl+y
24
- (e.ctrlKey && !e.shiftKey && e.code === 'KeyY'))) {
25
+ (e.ctrlKey && !e.shiftKey && e.code === 'KeyY')) &&
26
+ ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName.toUpperCase()) !== 'INPUT') {
25
27
  self.history.redo();
26
28
  }
27
29
  if (self.history.canUndo &&
28
30
  // ctrl+z or cmd+z
29
31
  (e.ctrlKey || e.metaKey) &&
30
32
  !e.shiftKey &&
31
- e.code === 'KeyZ') {
33
+ e.code === 'KeyZ' &&
34
+ ((_b = document.activeElement) === null || _b === void 0 ? void 0 : _b.tagName.toUpperCase()) !== 'INPUT') {
32
35
  self.history.undo();
33
36
  }
34
37
  });
@@ -17,9 +17,7 @@ export declare function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }:
17
17
  rpc: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
18
18
  defaultDriver: {
19
19
  type: string;
20
- description: string; /**
21
- * #slot configuration.formatDetails.feature
22
- */
20
+ description: string;
23
21
  defaultValue: string;
24
22
  };
25
23
  drivers: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IMapType<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined, import("mobx-state-tree").ModelSnapshotType<Record<string, any>>, (Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> & import("mobx-state-tree/dist/internal").NonEmptyObject) | undefined>>, [undefined]>;
@@ -32,27 +30,18 @@ export declare function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }:
32
30
  defaultValue: number;
33
31
  };
34
32
  formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
35
- /**
36
- * #slot configuration.formatDetails.feature
37
- */
38
33
  feature: {
39
34
  type: string;
40
35
  description: string;
41
36
  defaultValue: {};
42
37
  contextVariable: string[];
43
38
  };
44
- /**
45
- * #slot configuration.formatDetails.subfeatures
46
- */
47
39
  subfeatures: {
48
40
  type: string;
49
41
  description: string;
50
42
  defaultValue: {};
51
43
  contextVariable: string[];
52
44
  };
53
- /**
54
- * #slot configuration.formatDetails.depth
55
- */
56
45
  depth: {
57
46
  type: string;
58
47
  defaultValue: number;
@@ -60,18 +49,12 @@ export declare function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }:
60
49
  };
61
50
  }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
62
51
  formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
63
- /**
64
- * #slot configuration.formatAbout.config
65
- */
66
52
  config: {
67
53
  type: string;
68
54
  description: string;
69
55
  defaultValue: {};
70
56
  contextVariable: string[];
71
57
  };
72
- /**
73
- * #slot configuration.formatAbout.hideUris
74
- */
75
58
  hideUris: {
76
59
  type: string;
77
60
  defaultValue: boolean;
@@ -88,6 +71,34 @@ export declare function JBrowseConfigF({ pluginManager, assemblyConfigSchema, }:
88
71
  type: string;
89
72
  defaultValue: boolean;
90
73
  };
74
+ hierarchical: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
75
+ sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
76
+ trackNames: {
77
+ type: string;
78
+ defaultValue: boolean;
79
+ };
80
+ categories: {
81
+ type: string;
82
+ defaultValue: boolean;
83
+ };
84
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
85
+ defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
86
+ categoryNames: {
87
+ type: string;
88
+ defaultValue: never[]; /**
89
+ * #slot configuration.highResolutionScaling
90
+ */
91
+ };
92
+ topLevelCategories: {
93
+ type: string;
94
+ defaultValue: boolean;
95
+ };
96
+ subCategories: {
97
+ type: string;
98
+ defaultValue: boolean;
99
+ };
100
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
101
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
91
102
  /**
92
103
  * #slot configuration.theme
93
104
  */