@jbrowse/app-core 3.0.1 → 3.0.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.
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const EditableTypography_1 = __importDefault(require("@jbrowse/core/ui/EditableTypography"));
8
+ const util_1 = require("@jbrowse/core/util");
8
9
  const material_1 = require("@mui/material");
9
10
  const mobx_react_1 = require("mobx-react");
10
11
  const mui_1 = require("tss-react/mui");
@@ -29,8 +30,9 @@ const useStyles = (0, mui_1.makeStyles)()(theme => ({
29
30
  const ViewContainerTitle = (0, mobx_react_1.observer)(function ({ view, }) {
30
31
  var _a;
31
32
  const { classes } = useStyles();
33
+ const { assemblyManager } = (0, util_1.getSession)(view);
32
34
  return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: "Rename view", arrow: true, children: (0, jsx_runtime_1.jsx)(EditableTypography_1.default, { value: view.displayName ||
33
- `${((_a = view.assemblyNames) === null || _a === void 0 ? void 0 : _a.join(',')) || 'Untitled view'}${view.minimized ? ' (minimized)' : ''}`, setValue: val => {
35
+ `${((_a = view.assemblyNames) === null || _a === void 0 ? void 0 : _a.map(r => { var _a; return (_a = assemblyManager.get(r)) === null || _a === void 0 ? void 0 : _a.displayName; }).join(',')) || 'Untitled view'}${view.minimized ? ' (minimized)' : ''}`, setValue: val => {
34
36
  view.setDisplayName(val);
35
37
  }, variant: "body2", classes: {
36
38
  input: classes.input,
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import EditableTypography from '@jbrowse/core/ui/EditableTypography';
3
+ import { getSession } from '@jbrowse/core/util';
3
4
  import { Tooltip } from '@mui/material';
4
5
  import { observer } from 'mobx-react';
5
6
  import { makeStyles } from 'tss-react/mui';
@@ -24,8 +25,9 @@ const useStyles = makeStyles()(theme => ({
24
25
  const ViewContainerTitle = observer(function ({ view, }) {
25
26
  var _a;
26
27
  const { classes } = useStyles();
28
+ const { assemblyManager } = getSession(view);
27
29
  return (_jsx(Tooltip, { title: "Rename view", arrow: true, children: _jsx(EditableTypography, { value: view.displayName ||
28
- `${((_a = view.assemblyNames) === null || _a === void 0 ? void 0 : _a.join(',')) || 'Untitled view'}${view.minimized ? ' (minimized)' : ''}`, setValue: val => {
30
+ `${((_a = view.assemblyNames) === null || _a === void 0 ? void 0 : _a.map(r => { var _a; return (_a = assemblyManager.get(r)) === null || _a === void 0 ? void 0 : _a.displayName; }).join(',')) || 'Untitled view'}${view.minimized ? ' (minimized)' : ''}`, setValue: val => {
29
31
  view.setDisplayName(val);
30
32
  }, variant: "body2", classes: {
31
33
  input: classes.input,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/app-core",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "JBrowse 2 code shared between the 'full featured' apps e.g. jbrowse-web and jbrowse-desktop",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@babel/runtime": "^7.16.3",
45
- "@jbrowse/product-core": "^3.0.1",
45
+ "@jbrowse/product-core": "^3.0.3",
46
46
  "@mui/icons-material": "^6.0.0",
47
47
  "@mui/material": "^6.0.0",
48
48
  "copy-to-clipboard": "^3.3.1",
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "aa2f1d1a89d2361c7fd1a93fe29506fa4554f5cc"
62
+ "gitHead": "f516540428282351d26e46743e69a724651bfb2c"
63
63
  }