@jbrowse/core 2.10.2 → 2.10.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.
@@ -88,6 +88,30 @@ function stripMessage(trace, error) {
88
88
  return trace;
89
89
  }
90
90
  }
91
+ function Contents({ text }) {
92
+ const err = encodeURIComponent('I got this error from JBrowse, here is the stack trace:\n\n```\n' +
93
+ text +
94
+ '\n```\n');
95
+ const githubLink = `https://github.com/GMOD/jbrowse-components/issues/new?labels=bug&title=JBrowse+issue&body=${err}`;
96
+ const emailLink = `mailto:jbrowse2dev@gmail.com?subject=JBrowse%202%20error&body=${err}`;
97
+ return (react_1.default.createElement(react_1.default.Fragment, null,
98
+ react_1.default.createElement(material_1.Typography, null,
99
+ "Post a new issue at",
100
+ ' ',
101
+ react_1.default.createElement(material_1.Link, { href: githubLink, target: "_blank" }, "GitHub"),
102
+ ' ',
103
+ "or send an email to",
104
+ ' ',
105
+ react_1.default.createElement(material_1.Link, { href: emailLink, target: "_blank" }, "jbrowse2dev@gmail.com"),
106
+ ' '),
107
+ react_1.default.createElement("pre", { style: {
108
+ background: 'lightgrey',
109
+ border: '1px solid black',
110
+ overflow: 'auto',
111
+ margin: 20,
112
+ maxHeight: 300,
113
+ } }, text)));
114
+ }
91
115
  function ErrorMessageStackTraceDialog({ error, onClose, }) {
92
116
  const [mappedStackTrace, setMappedStackTrace] = (0, react_1.useState)();
93
117
  const [secondaryError, setSecondaryError] = (0, react_1.useState)();
@@ -121,29 +145,8 @@ function ErrorMessageStackTraceDialog({ error, onClose, }) {
121
145
  // @ts-expect-error add version info at bottom if we are in jbrowse-web
122
146
  window.JBrowseSession ? `JBrowse ${window.JBrowseSession.version}` : '',
123
147
  ].join('\n');
124
- const err = encodeURIComponent('I got this error from JBrowse, here is the stack trace:\n\n```\n' +
125
- errorBoxText +
126
- '\n```\n');
127
- const githubLink = `https://github.com/GMOD/jbrowse-components/issues/new?labels=bug&title=JBrowse+issue&body=${err}`;
128
- const emailLink = `mailto:jbrowse2dev@gmail.com?subject=JBrowse%202%20error&body=${err}`;
129
148
  return (react_1.default.createElement(Dialog_1.default, { open: true, onClose: onClose, title: "Stack trace", maxWidth: "xl" },
130
- react_1.default.createElement(material_1.DialogContent, null, mappedStackTrace === undefined ? (react_1.default.createElement(LoadingEllipses_1.default, { variant: "h6" })) : (react_1.default.createElement(react_1.default.Fragment, null,
131
- react_1.default.createElement(material_1.Typography, null,
132
- "Post a new issue at",
133
- ' ',
134
- react_1.default.createElement(material_1.Link, { href: githubLink, target: "_blank" }, "GitHub"),
135
- ' ',
136
- "or send an email to",
137
- ' ',
138
- react_1.default.createElement(material_1.Link, { href: emailLink, target: "_blank" }, "jbrowse2dev@gmail.com"),
139
- ' '),
140
- react_1.default.createElement("pre", { style: {
141
- background: 'lightgrey',
142
- border: '1px solid black',
143
- overflow: 'auto',
144
- margin: 20,
145
- maxHeight: 300,
146
- } }, errorBoxText)))),
149
+ react_1.default.createElement(material_1.DialogContent, null, mappedStackTrace === undefined ? (react_1.default.createElement(LoadingEllipses_1.default, { variant: "h6" })) : (react_1.default.createElement(Contents, { text: errorBoxText }))),
147
150
  react_1.default.createElement(material_1.DialogActions, null,
148
151
  react_1.default.createElement(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
149
152
  (0, copy_to_clipboard_1.default)(errorBoxText);
package/util/tracks.js CHANGED
@@ -119,7 +119,7 @@ function getFileName(track) {
119
119
  const blob = 'blobId' in track ? track : undefined;
120
120
  return ((blob === null || blob === void 0 ? void 0 : blob.name) ||
121
121
  (uri === null || uri === void 0 ? void 0 : uri.slice(uri.lastIndexOf('/') + 1)) ||
122
- (localPath === null || localPath === void 0 ? void 0 : localPath.slice(localPath.lastIndexOf('/') + 1)) ||
122
+ (localPath === null || localPath === void 0 ? void 0 : localPath.slice((localPath === null || localPath === void 0 ? void 0 : localPath.replace(/\\/g, '/').lastIndexOf('/')) + 1)) ||
123
123
  '');
124
124
  }
125
125
  exports.getFileName = getFileName;
@@ -203,10 +203,6 @@ export interface AbstractRootModel {
203
203
  }
204
204
  /** root model with more included for the heavier JBrowse web and desktop app */
205
205
  export interface AppRootModel extends AbstractRootModel {
206
- isAssemblyEditing: boolean;
207
- isDefaultSessionEditing: boolean;
208
- setAssemblyEditing: (arg: boolean) => boolean;
209
- setDefaultSessionEditing: (arg: boolean) => boolean;
210
206
  internetAccounts: BaseInternetAccountModel[];
211
207
  findAppropriateInternetAccount(location: UriLocation): BaseInternetAccountModel | undefined;
212
208
  }
@@ -101,7 +101,6 @@ exports.isTrackViewModel = isTrackViewModel;
101
101
  function isAppRootModel(thing) {
102
102
  return (typeof thing === 'object' &&
103
103
  thing !== null &&
104
- 'isAssemblyEditing' in thing &&
105
104
  'findAppropriateInternetAccount' in thing);
106
105
  }
107
106
  exports.isAppRootModel = isAppRootModel;