@jbrowse/plugin-data-management 1.5.2 → 1.5.6

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.
@@ -10,11 +10,10 @@ import { openLocation } from '@jbrowse/core/util/io';
10
10
  import { generateUnknownTrackConf, generateUnsupportedTrackConf, guessAdapter, getFileName, UNSUPPORTED, guessTrackType, UNKNOWN } from '@jbrowse/core/util/tracks';
11
11
  import { ElementId } from '@jbrowse/core/util/types/mst';
12
12
  import { observer, PropTypes } from 'mobx-react';
13
- import { ListItem, IconButton, Typography, Tooltip, Dialog, DialogTitle, DialogContent, DialogActions, Button, List, Card, CardContent, Link, CardActions, makeStyles as makeStyles$1, DialogContentText, TextField, Collapse, InputAdornment, Accordion, AccordionSummary, TableRow, TableCell, TableContainer, Paper, Table, TableHead, TableBody, Grid, MenuItem, Fab, Menu, FormControlLabel, Checkbox, ListSubheader, Stepper, Step, StepLabel, StepContent } from '@material-ui/core';
13
+ import { ListItem, IconButton, Typography, Tooltip, Dialog, DialogTitle, DialogContent, DialogActions, Button, makeStyles, List, Card, CardContent, Link, CardActions, DialogContentText, TextField, Collapse, InputAdornment, Accordion, AccordionSummary, TableRow, TableCell, TableContainer, Paper, Table, TableHead, TableBody, Grid, MenuItem, Fab, Menu, FormControlLabel, Checkbox, ListSubheader, Stepper, Step, StepLabel, StepContent } from '@material-ui/core';
14
14
  import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
15
15
  import ClearIcon from '@material-ui/icons/Clear';
16
16
  import InfoOutlinedIcon from '@material-ui/icons/InfoOutlined';
17
- import { makeStyles } from '@material-ui/core/styles';
18
17
  import CloseIcon from '@material-ui/icons/Close';
19
18
  import LockIcon from '@material-ui/icons/Lock';
20
19
  import { isSessionWithSessionPlugins } from '@jbrowse/core/util/types';
@@ -23,6 +22,7 @@ import AddIcon from '@material-ui/icons/Add';
23
22
  import CheckIcon from '@material-ui/icons/Check';
24
23
  import clsx from 'clsx';
25
24
  import IconButton$1 from '@material-ui/core/IconButton';
25
+ import { makeStyles as makeStyles$1 } from '@material-ui/core/styles';
26
26
  import ArrowBackIosIcon from '@material-ui/icons/ArrowBackIos';
27
27
  import CreateIcon from '@material-ui/icons/Create';
28
28
  import DeleteIcon from '@material-ui/icons/Delete';
@@ -53,14 +53,9 @@ function ownKeys(object, enumerableOnly) {
53
53
 
54
54
  if (Object.getOwnPropertySymbols) {
55
55
  var symbols = Object.getOwnPropertySymbols(object);
56
-
57
- if (enumerableOnly) {
58
- symbols = symbols.filter(function (sym) {
59
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
60
- });
61
- }
62
-
63
- keys.push.apply(keys, symbols);
56
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
57
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
58
+ })), keys.push.apply(keys, symbols);
64
59
  }
65
60
 
66
61
  return keys;
@@ -68,19 +63,12 @@ function ownKeys(object, enumerableOnly) {
68
63
 
69
64
  function _objectSpread2(target) {
70
65
  for (var i = 1; i < arguments.length; i++) {
71
- var source = arguments[i] != null ? arguments[i] : {};
72
-
73
- if (i % 2) {
74
- ownKeys(Object(source), true).forEach(function (key) {
75
- _defineProperty(target, key, source[key]);
76
- });
77
- } else if (Object.getOwnPropertyDescriptors) {
78
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
79
- } else {
80
- ownKeys(Object(source)).forEach(function (key) {
81
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
82
- });
83
- }
66
+ var source = null != arguments[i] ? arguments[i] : {};
67
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
68
+ _defineProperty(target, key, source[key]);
69
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
70
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
71
+ });
84
72
  }
85
73
 
86
74
  return target;
@@ -89,17 +77,11 @@ function _objectSpread2(target) {
89
77
  function _typeof(obj) {
90
78
  "@babel/helpers - typeof";
91
79
 
92
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
93
- _typeof = function (obj) {
94
- return typeof obj;
95
- };
96
- } else {
97
- _typeof = function (obj) {
98
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
99
- };
100
- }
101
-
102
- return _typeof(obj);
80
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
81
+ return typeof obj;
82
+ } : function (obj) {
83
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
84
+ }, _typeof(obj);
103
85
  }
104
86
 
105
87
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -157,6 +139,9 @@ function _defineProperties(target, props) {
157
139
  function _createClass(Constructor, protoProps, staticProps) {
158
140
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
159
141
  if (staticProps) _defineProperties(Constructor, staticProps);
142
+ Object.defineProperty(Constructor, "prototype", {
143
+ writable: false
144
+ });
160
145
  return Constructor;
161
146
  }
162
147
 
@@ -180,12 +165,15 @@ function _inherits(subClass, superClass) {
180
165
  throw new TypeError("Super expression must either be null or a function");
181
166
  }
182
167
 
183
- subClass.prototype = Object.create(superClass && superClass.prototype, {
184
- constructor: {
185
- value: subClass,
186
- writable: true,
187
- configurable: true
188
- }
168
+ Object.defineProperty(subClass, "prototype", {
169
+ value: Object.create(superClass && superClass.prototype, {
170
+ constructor: {
171
+ value: subClass,
172
+ writable: true,
173
+ configurable: true
174
+ }
175
+ }),
176
+ writable: false
189
177
  });
190
178
  if (superClass) _setPrototypeOf(subClass, superClass);
191
179
  }
@@ -2178,7 +2166,7 @@ function PluginDialog(_ref) {
2178
2166
  onClick: function onClick() {
2179
2167
  return _onClose();
2180
2168
  }
2181
- }, /*#__PURE__*/React.createElement(CloseIcon, null))), /*#__PURE__*/React.createElement(DialogContent, null, /*#__PURE__*/React.createElement(Typography, null, "Please confirm that you want to remove ", plugin, ":"), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(Button, {
2169
+ }, /*#__PURE__*/React.createElement(CloseIcon, null))), /*#__PURE__*/React.createElement(DialogContent, null, /*#__PURE__*/React.createElement(Typography, null, "Please confirm that you want to remove ", plugin, ". Note: if any resources in this session still use this plugin, it may cause your session to crash"), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(Button, {
2182
2170
  variant: "contained",
2183
2171
  color: "primary",
2184
2172
  onClick: function onClick() {
@@ -2206,8 +2194,7 @@ function InstalledPlugin(_ref2) {
2206
2194
  dialogPlugin = _useState2[0],
2207
2195
  setDialogPlugin = _useState2[1];
2208
2196
 
2209
- var session = getSession(model); // @ts-ignore
2210
-
2197
+ var session = getSession(model);
2211
2198
  var sessionPlugins = session.sessionPlugins;
2212
2199
  var isSessionPlugin = sessionPlugins === null || sessionPlugins === void 0 ? void 0 : sessionPlugins.some(function (p) {
2213
2200
  return pluginManager.pluginMetadata[plugin.name].url === p.url;
@@ -2220,12 +2207,11 @@ function InstalledPlugin(_ref2) {
2220
2207
  onClose: function onClose(name) {
2221
2208
  if (name) {
2222
2209
  var pluginMetadata = pluginManager.pluginMetadata[plugin.name];
2223
- var pluginUrl = pluginMetadata.url || pluginMetadata.esmUrl || pluginMetadata.umdUrl || pluginMetadata.cjsUrl;
2224
2210
 
2225
2211
  if (adminMode) {
2226
- jbrowse.removePlugin(pluginUrl);
2212
+ jbrowse.removePlugin(pluginMetadata);
2227
2213
  } else if (isSessionWithSessionPlugins(session)) {
2228
- session.removeSessionPlugin(pluginUrl);
2214
+ session.removeSessionPlugin(pluginMetadata);
2229
2215
  }
2230
2216
  }
2231
2217
 
@@ -2272,7 +2258,7 @@ function InstalledPluginsList(_ref) {
2272
2258
 
2273
2259
  var InstalledPluginsList$1 = /*#__PURE__*/observer(InstalledPluginsList);
2274
2260
 
2275
- var useStyles$1 = /*#__PURE__*/makeStyles$1(function () {
2261
+ var useStyles$1 = /*#__PURE__*/makeStyles(function () {
2276
2262
  return {
2277
2263
  card: {
2278
2264
  margin: '1em'
@@ -2356,7 +2342,7 @@ function PluginCard(_ref) {
2356
2342
 
2357
2343
  var PluginCard$1 = /*#__PURE__*/observer(PluginCard);
2358
2344
 
2359
- var useStyles$2 = /*#__PURE__*/makeStyles$1(function (theme) {
2345
+ var useStyles$2 = /*#__PURE__*/makeStyles(function (theme) {
2360
2346
  return {
2361
2347
  closeButton: {
2362
2348
  position: 'absolute',
@@ -2536,7 +2522,7 @@ function CustomPluginForm(_ref) {
2536
2522
 
2537
2523
  var CustomPluginForm$1 = /*#__PURE__*/observer(CustomPluginForm);
2538
2524
 
2539
- var useStyles$3 = /*#__PURE__*/makeStyles$1(function (theme) {
2525
+ var useStyles$3 = /*#__PURE__*/makeStyles(function (theme) {
2540
2526
  return {
2541
2527
  root: {
2542
2528
  margin: theme.spacing(1)
@@ -2902,7 +2888,7 @@ var index = {
2902
2888
  'default': SetDefaultSession$1
2903
2889
  };
2904
2890
 
2905
- var useStyles$4 = /*#__PURE__*/makeStyles$1(function () {
2891
+ var useStyles$4 = /*#__PURE__*/makeStyles(function () {
2906
2892
  return {
2907
2893
  table: {
2908
2894
  minWidth: 500,
@@ -2971,7 +2957,7 @@ var AssemblyTable = /*#__PURE__*/observer(function (_ref) {
2971
2957
  }, "Actions")))), /*#__PURE__*/React.createElement(TableBody, null, rows)));
2972
2958
  });
2973
2959
 
2974
- var useStyles$5 = /*#__PURE__*/makeStyles$1(function (theme) {
2960
+ var useStyles$5 = /*#__PURE__*/makeStyles(function (theme) {
2975
2961
  return {
2976
2962
  root: {
2977
2963
  flexGrow: 1,
@@ -3251,7 +3237,7 @@ var AssemblyEditor = /*#__PURE__*/observer(function (_ref) {
3251
3237
  });
3252
3238
  });
3253
3239
 
3254
- var useStyles$6 = /*#__PURE__*/makeStyles(function (theme) {
3240
+ var useStyles$6 = /*#__PURE__*/makeStyles$1(function (theme) {
3255
3241
  return {
3256
3242
  titleBox: {
3257
3243
  color: '#fff',
@@ -3375,7 +3361,7 @@ var ManageConnectionsDialog = /*#__PURE__*/lazy(function () {
3375
3361
  var ToggleConnectionsDialog = /*#__PURE__*/lazy(function () {
3376
3362
  return Promise.resolve().then(function () { return ToggleConnectionsDialog$2; });
3377
3363
  });
3378
- var useStyles$7 = /*#__PURE__*/makeStyles$1(function (theme) {
3364
+ var useStyles$7 = /*#__PURE__*/makeStyles(function (theme) {
3379
3365
  var _theme$palette$tertia, _theme$palette$tertia2;
3380
3366
 
3381
3367
  return {
@@ -3942,7 +3928,7 @@ var HierarchicalTrackSelector$1 = {
3942
3928
  'default': HierarchicalTrackSelectorContainer
3943
3929
  };
3944
3930
 
3945
- var useStyles$8 = /*#__PURE__*/makeStyles$1(function (theme) {
3931
+ var useStyles$8 = /*#__PURE__*/makeStyles(function (theme) {
3946
3932
  return {
3947
3933
  spacing: {
3948
3934
  marginBottom: theme.spacing(3)
@@ -4195,7 +4181,7 @@ function ConfirmTrack(_ref7) {
4195
4181
 
4196
4182
  var ConfirmTrack$1 = /*#__PURE__*/observer(ConfirmTrack);
4197
4183
 
4198
- var useStyles$9 = /*#__PURE__*/makeStyles$1(function (theme) {
4184
+ var useStyles$9 = /*#__PURE__*/makeStyles(function (theme) {
4199
4185
  return {
4200
4186
  paper: {
4201
4187
  display: 'flex',
@@ -4235,7 +4221,7 @@ function TrackSourceSelect(_ref) {
4235
4221
 
4236
4222
  var TrackSourceSelect$1 = /*#__PURE__*/observer(TrackSourceSelect);
4237
4223
 
4238
- var useStyles$a = /*#__PURE__*/makeStyles$1(function (theme) {
4224
+ var useStyles$a = /*#__PURE__*/makeStyles(function (theme) {
4239
4225
  return {
4240
4226
  root: {
4241
4227
  marginTop: theme.spacing(1)
@@ -4469,7 +4455,7 @@ function ConnectionTypeSelect(props) {
4469
4455
  })));
4470
4456
  }
4471
4457
 
4472
- var useStyles$b = /*#__PURE__*/makeStyles(function (theme) {
4458
+ var useStyles$b = /*#__PURE__*/makeStyles$1(function (theme) {
4473
4459
  return {
4474
4460
  root: {
4475
4461
  marginTop: theme.spacing(1)
@@ -4684,7 +4670,7 @@ var DeleteConnectionDialog$3 = {
4684
4670
  'default': DeleteConnectionDialog$2
4685
4671
  };
4686
4672
 
4687
- var useStyles$c = /*#__PURE__*/makeStyles$1(function (theme) {
4673
+ var useStyles$c = /*#__PURE__*/makeStyles(function (theme) {
4688
4674
  return {
4689
4675
  closeButton: {
4690
4676
  position: 'absolute',
@@ -4749,7 +4735,7 @@ var ManageConnectionsDialog$2 = {
4749
4735
  'default': ManageConnectionsDialog$1
4750
4736
  };
4751
4737
 
4752
- var useStyles$d = /*#__PURE__*/makeStyles$1(function (theme) {
4738
+ var useStyles$d = /*#__PURE__*/makeStyles(function (theme) {
4753
4739
  return {
4754
4740
  closeButton: {
4755
4741
  position: 'absolute',