@jbrowse/plugin-data-management 1.5.1 → 1.5.5
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.
- package/dist/AssemblyManager/AssemblyTable.d.ts +8 -2
- package/dist/PluginStoreWidget/components/CustomPluginForm.d.ts +1 -1
- package/dist/plugin-data-management.cjs.development.js +190 -99
- package/dist/plugin-data-management.cjs.development.js.map +1 -1
- package/dist/plugin-data-management.cjs.production.min.js +1 -1
- package/dist/plugin-data-management.cjs.production.min.js.map +1 -1
- package/dist/plugin-data-management.esm.js +202 -111
- package/dist/plugin-data-management.esm.js.map +1 -1
- package/package.json +3 -2
- package/src/AssemblyManager/AssemblyManager.tsx +3 -1
- package/src/AssemblyManager/AssemblyTable.tsx +40 -39
- package/src/HierarchicalTrackSelectorWidget/model.js +3 -2
- package/src/PluginStoreWidget/components/CustomPluginForm.tsx +151 -43
- package/src/PluginStoreWidget/components/InstalledPlugin.tsx +11 -10
- package/src/PluginStoreWidget/components/PluginStoreWidget.test.js +7 -6
- package/src/PluginStoreWidget/components/PluginStoreWidget.tsx +16 -7
- package/src/PluginStoreWidget/components/__snapshots__/PluginStoreWidget.test.js.snap +20 -0
|
@@ -10,18 +10,19 @@ 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,
|
|
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';
|
|
21
20
|
import PersonIcon from '@material-ui/icons/Person';
|
|
22
21
|
import AddIcon from '@material-ui/icons/Add';
|
|
23
22
|
import CheckIcon from '@material-ui/icons/Check';
|
|
23
|
+
import clsx from 'clsx';
|
|
24
24
|
import IconButton$1 from '@material-ui/core/IconButton';
|
|
25
|
+
import { makeStyles as makeStyles$1 } from '@material-ui/core/styles';
|
|
25
26
|
import ArrowBackIosIcon from '@material-ui/icons/ArrowBackIos';
|
|
26
27
|
import CreateIcon from '@material-ui/icons/Create';
|
|
27
28
|
import DeleteIcon from '@material-ui/icons/Delete';
|
|
@@ -52,14 +53,9 @@ function ownKeys(object, enumerableOnly) {
|
|
|
52
53
|
|
|
53
54
|
if (Object.getOwnPropertySymbols) {
|
|
54
55
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
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);
|
|
63
59
|
}
|
|
64
60
|
|
|
65
61
|
return keys;
|
|
@@ -67,19 +63,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
67
63
|
|
|
68
64
|
function _objectSpread2(target) {
|
|
69
65
|
for (var i = 1; i < arguments.length; i++) {
|
|
70
|
-
var source = arguments[i]
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
77
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
78
|
-
} else {
|
|
79
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
80
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
81
|
-
});
|
|
82
|
-
}
|
|
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
|
+
});
|
|
83
72
|
}
|
|
84
73
|
|
|
85
74
|
return target;
|
|
@@ -88,17 +77,11 @@ function _objectSpread2(target) {
|
|
|
88
77
|
function _typeof(obj) {
|
|
89
78
|
"@babel/helpers - typeof";
|
|
90
79
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
_typeof = function (obj) {
|
|
97
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
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);
|
|
102
85
|
}
|
|
103
86
|
|
|
104
87
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -156,6 +139,9 @@ function _defineProperties(target, props) {
|
|
|
156
139
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
157
140
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
158
141
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
142
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
143
|
+
writable: false
|
|
144
|
+
});
|
|
159
145
|
return Constructor;
|
|
160
146
|
}
|
|
161
147
|
|
|
@@ -179,12 +165,15 @@ function _inherits(subClass, superClass) {
|
|
|
179
165
|
throw new TypeError("Super expression must either be null or a function");
|
|
180
166
|
}
|
|
181
167
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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
|
|
188
177
|
});
|
|
189
178
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
190
179
|
}
|
|
@@ -1773,7 +1762,8 @@ function f(pluginManager) {
|
|
|
1773
1762
|
|
|
1774
1763
|
var track = self.trackData,
|
|
1775
1764
|
index = self.indexTrackData;
|
|
1776
|
-
return !!(
|
|
1765
|
+
return !!( // @ts-ignore
|
|
1766
|
+
index !== null && index !== void 0 && (_index$uri = index.uri) !== null && _index$uri !== void 0 && _index$uri.startsWith('ftp://') || track !== null && track !== void 0 && (_track$uri = track.uri) !== null && _track$uri !== void 0 && _track$uri.startsWith('ftp://'));
|
|
1777
1767
|
},
|
|
1778
1768
|
|
|
1779
1769
|
get isRelativeTrackUrl() {
|
|
@@ -1869,9 +1859,9 @@ var hasAnyOverlap = function hasAnyOverlap() {
|
|
|
1869
1859
|
function passesFilter(filter, config) {
|
|
1870
1860
|
var name = getTrackName(config);
|
|
1871
1861
|
var categories = readConfObject(config, 'category') || [];
|
|
1872
|
-
var
|
|
1873
|
-
return !!name.
|
|
1874
|
-
return !!cat.
|
|
1862
|
+
var filterLower = filter.toLowerCase();
|
|
1863
|
+
return !!name.toLowerCase().includes(filterLower) || categories.filter(function (cat) {
|
|
1864
|
+
return !!cat.toLowerCase().includes(filterLower);
|
|
1875
1865
|
}).length;
|
|
1876
1866
|
}
|
|
1877
1867
|
|
|
@@ -2176,7 +2166,7 @@ function PluginDialog(_ref) {
|
|
|
2176
2166
|
onClick: function onClick() {
|
|
2177
2167
|
return _onClose();
|
|
2178
2168
|
}
|
|
2179
|
-
}, /*#__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, {
|
|
2180
2170
|
variant: "contained",
|
|
2181
2171
|
color: "primary",
|
|
2182
2172
|
onClick: function onClick() {
|
|
@@ -2204,8 +2194,7 @@ function InstalledPlugin(_ref2) {
|
|
|
2204
2194
|
dialogPlugin = _useState2[0],
|
|
2205
2195
|
setDialogPlugin = _useState2[1];
|
|
2206
2196
|
|
|
2207
|
-
var session = getSession(model);
|
|
2208
|
-
|
|
2197
|
+
var session = getSession(model);
|
|
2209
2198
|
var sessionPlugins = session.sessionPlugins;
|
|
2210
2199
|
var isSessionPlugin = sessionPlugins === null || sessionPlugins === void 0 ? void 0 : sessionPlugins.some(function (p) {
|
|
2211
2200
|
return pluginManager.pluginMetadata[plugin.name].url === p.url;
|
|
@@ -2218,12 +2207,11 @@ function InstalledPlugin(_ref2) {
|
|
|
2218
2207
|
onClose: function onClose(name) {
|
|
2219
2208
|
if (name) {
|
|
2220
2209
|
var pluginMetadata = pluginManager.pluginMetadata[plugin.name];
|
|
2221
|
-
var pluginUrl = pluginMetadata.url;
|
|
2222
2210
|
|
|
2223
2211
|
if (adminMode) {
|
|
2224
|
-
jbrowse.removePlugin(
|
|
2212
|
+
jbrowse.removePlugin(pluginMetadata);
|
|
2225
2213
|
} else if (isSessionWithSessionPlugins(session)) {
|
|
2226
|
-
session.removeSessionPlugin(
|
|
2214
|
+
session.removeSessionPlugin(pluginMetadata);
|
|
2227
2215
|
}
|
|
2228
2216
|
}
|
|
2229
2217
|
|
|
@@ -2270,7 +2258,7 @@ function InstalledPluginsList(_ref) {
|
|
|
2270
2258
|
|
|
2271
2259
|
var InstalledPluginsList$1 = /*#__PURE__*/observer(InstalledPluginsList);
|
|
2272
2260
|
|
|
2273
|
-
var useStyles$1 = /*#__PURE__*/makeStyles
|
|
2261
|
+
var useStyles$1 = /*#__PURE__*/makeStyles(function () {
|
|
2274
2262
|
return {
|
|
2275
2263
|
card: {
|
|
2276
2264
|
margin: '1em'
|
|
@@ -2354,92 +2342,187 @@ function PluginCard(_ref) {
|
|
|
2354
2342
|
|
|
2355
2343
|
var PluginCard$1 = /*#__PURE__*/observer(PluginCard);
|
|
2356
2344
|
|
|
2357
|
-
var useStyles$2 = /*#__PURE__*/makeStyles
|
|
2345
|
+
var useStyles$2 = /*#__PURE__*/makeStyles(function (theme) {
|
|
2358
2346
|
return {
|
|
2359
|
-
|
|
2347
|
+
closeButton: {
|
|
2360
2348
|
position: 'absolute',
|
|
2361
|
-
right:
|
|
2362
|
-
top:
|
|
2349
|
+
right: theme.spacing(1),
|
|
2350
|
+
top: theme.spacing(1)
|
|
2363
2351
|
},
|
|
2364
|
-
|
|
2365
|
-
margin: 15,
|
|
2352
|
+
dialogContent: {
|
|
2366
2353
|
display: 'flex',
|
|
2367
2354
|
flexDirection: 'column'
|
|
2355
|
+
},
|
|
2356
|
+
expand: {
|
|
2357
|
+
transform: 'rotate(0deg)',
|
|
2358
|
+
marginLeft: 'auto',
|
|
2359
|
+
transition: theme.transitions.create('transform', {
|
|
2360
|
+
duration: theme.transitions.duration.shortest
|
|
2361
|
+
})
|
|
2362
|
+
},
|
|
2363
|
+
expandOpen: {
|
|
2364
|
+
transform: 'rotate(180deg)'
|
|
2368
2365
|
}
|
|
2369
2366
|
};
|
|
2370
2367
|
});
|
|
2371
2368
|
|
|
2372
2369
|
function CustomPluginForm(_ref) {
|
|
2373
2370
|
var open = _ref.open,
|
|
2374
|
-
|
|
2371
|
+
onClose = _ref.onClose,
|
|
2375
2372
|
model = _ref.model;
|
|
2376
2373
|
var classes = useStyles$2();
|
|
2377
2374
|
|
|
2378
2375
|
var _useState = useState(''),
|
|
2379
2376
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2380
|
-
|
|
2381
|
-
|
|
2377
|
+
umdPluginName = _useState2[0],
|
|
2378
|
+
setUMDPluginName = _useState2[1];
|
|
2382
2379
|
|
|
2383
2380
|
var _useState3 = useState(''),
|
|
2384
2381
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
2385
|
-
|
|
2386
|
-
|
|
2382
|
+
umdPluginUrl = _useState4[0],
|
|
2383
|
+
setUMDPluginUrl = _useState4[1];
|
|
2384
|
+
|
|
2385
|
+
var _useState5 = useState(''),
|
|
2386
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
2387
|
+
esmPluginUrl = _useState6[0],
|
|
2388
|
+
setESMPluginUrl = _useState6[1];
|
|
2389
|
+
|
|
2390
|
+
var _useState7 = useState(''),
|
|
2391
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
2392
|
+
cjsPluginUrl = _useState8[0],
|
|
2393
|
+
setCJSPluginUrl = _useState8[1];
|
|
2394
|
+
|
|
2395
|
+
var _useState9 = useState(false),
|
|
2396
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
2397
|
+
advancedOptionsOpen = _useState10[0],
|
|
2398
|
+
setAdvancedOptionsOpen = _useState10[1];
|
|
2399
|
+
|
|
2400
|
+
function handleChange(event) {
|
|
2401
|
+
var _event$target = event.target,
|
|
2402
|
+
name = _event$target.name,
|
|
2403
|
+
value = _event$target.value;
|
|
2404
|
+
|
|
2405
|
+
if (name === 'umdName') {
|
|
2406
|
+
setUMDPluginName(value);
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
if (name === 'umdUrl') {
|
|
2410
|
+
setUMDPluginUrl(value);
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
if (name === 'esmUrl') {
|
|
2414
|
+
setESMPluginUrl(value);
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
if (name === 'cjsUrl') {
|
|
2418
|
+
setCJSPluginUrl(value);
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
function handleOpenAdvancedOptions() {
|
|
2423
|
+
setAdvancedOptionsOpen(!advancedOptionsOpen);
|
|
2424
|
+
}
|
|
2387
2425
|
|
|
2388
2426
|
var rootModel = getRoot(model);
|
|
2389
2427
|
var jbrowse = rootModel.jbrowse;
|
|
2428
|
+
var ready = Boolean(umdPluginName && umdPluginUrl || esmPluginUrl || cjsPluginUrl);
|
|
2429
|
+
|
|
2430
|
+
function handleSubmit() {
|
|
2431
|
+
if (!ready) {
|
|
2432
|
+
return;
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
var pluginDefinition = {};
|
|
2436
|
+
|
|
2437
|
+
if (umdPluginName && umdPluginUrl) {
|
|
2438
|
+
pluginDefinition.name = umdPluginName;
|
|
2439
|
+
pluginDefinition.umdUrl = umdPluginUrl;
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
if (esmPluginUrl) {
|
|
2443
|
+
pluginDefinition.esmUrl = esmPluginUrl;
|
|
2444
|
+
}
|
|
2445
|
+
|
|
2446
|
+
if (cjsPluginUrl) {
|
|
2447
|
+
pluginDefinition.cjsUrl = cjsPluginUrl;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
jbrowse.addPlugin(pluginDefinition);
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
function handleClose() {
|
|
2454
|
+
setUMDPluginName('');
|
|
2455
|
+
setUMDPluginUrl('');
|
|
2456
|
+
setESMPluginUrl('');
|
|
2457
|
+
setCJSPluginUrl('');
|
|
2458
|
+
onClose();
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2390
2461
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
2391
2462
|
open: open,
|
|
2392
|
-
onClose:
|
|
2393
|
-
return _onClose();
|
|
2394
|
-
}
|
|
2463
|
+
onClose: handleClose
|
|
2395
2464
|
}, /*#__PURE__*/React.createElement(DialogTitle, null, "Add custom plugin", /*#__PURE__*/React.createElement(IconButton$1, {
|
|
2396
|
-
|
|
2465
|
+
size: "medium",
|
|
2466
|
+
className: classes.closeButton,
|
|
2397
2467
|
onClick: function onClick() {
|
|
2398
|
-
return
|
|
2468
|
+
return onClose();
|
|
2399
2469
|
}
|
|
2400
|
-
}, /*#__PURE__*/React.createElement(CloseIcon, null))), /*#__PURE__*/React.createElement(
|
|
2401
|
-
|
|
2402
|
-
}, /*#__PURE__*/React.createElement(
|
|
2403
|
-
|
|
2404
|
-
|
|
2470
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, null))), /*#__PURE__*/React.createElement("form", {
|
|
2471
|
+
onSubmit: handleSubmit
|
|
2472
|
+
}, /*#__PURE__*/React.createElement(DialogContent, {
|
|
2473
|
+
className: classes.dialogContent
|
|
2474
|
+
}, /*#__PURE__*/React.createElement(DialogContentText, null, "Enter the name of the plugin and its URL. The name should match what is defined in the plugin's build."), /*#__PURE__*/React.createElement(TextField, {
|
|
2475
|
+
id: "umd-name-input",
|
|
2476
|
+
name: "umdName",
|
|
2405
2477
|
label: "Plugin name",
|
|
2406
2478
|
variant: "outlined",
|
|
2407
|
-
value:
|
|
2408
|
-
onChange:
|
|
2409
|
-
return setFormName(event.target.value);
|
|
2410
|
-
}
|
|
2479
|
+
value: umdPluginName,
|
|
2480
|
+
onChange: handleChange
|
|
2411
2481
|
}), /*#__PURE__*/React.createElement(TextField, {
|
|
2412
|
-
id: "url-input",
|
|
2413
|
-
name: "
|
|
2482
|
+
id: "umd-url-input",
|
|
2483
|
+
name: "umdUrl",
|
|
2414
2484
|
label: "Plugin URL",
|
|
2415
2485
|
variant: "outlined",
|
|
2416
|
-
value:
|
|
2417
|
-
onChange:
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
}
|
|
2486
|
+
value: umdPluginUrl,
|
|
2487
|
+
onChange: handleChange
|
|
2488
|
+
}), /*#__PURE__*/React.createElement(DialogContentText, {
|
|
2489
|
+
onClick: handleOpenAdvancedOptions
|
|
2490
|
+
}, /*#__PURE__*/React.createElement(IconButton$1, {
|
|
2491
|
+
className: clsx(classes.expand, _defineProperty({}, classes.expandOpen, advancedOptionsOpen)),
|
|
2492
|
+
"aria-expanded": advancedOptionsOpen,
|
|
2493
|
+
"aria-label": "show more"
|
|
2494
|
+
}, /*#__PURE__*/React.createElement(ExpandMoreIcon, null)), "Advanced options"), /*#__PURE__*/React.createElement(Collapse, {
|
|
2495
|
+
"in": advancedOptionsOpen
|
|
2496
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2497
|
+
className: classes.dialogContent
|
|
2498
|
+
}, /*#__PURE__*/React.createElement(DialogContentText, null, "The above fields assume that the plugin is built in UMD format. If your plugin is in another format, or you have additional builds you want to add (such as a CJS build for using NodeJS APIs in desktop), you can enter the URLs for those builds below."), /*#__PURE__*/React.createElement(TextField, {
|
|
2499
|
+
id: "esm-url-input",
|
|
2500
|
+
name: "esmUrl",
|
|
2501
|
+
label: "ESM build URL",
|
|
2502
|
+
variant: "outlined",
|
|
2503
|
+
value: esmPluginUrl,
|
|
2504
|
+
onChange: handleChange
|
|
2505
|
+
}), /*#__PURE__*/React.createElement(TextField, {
|
|
2506
|
+
id: "cjs-url-input",
|
|
2507
|
+
name: "cjsUrl",
|
|
2508
|
+
label: "CJS build URL",
|
|
2509
|
+
variant: "outlined",
|
|
2510
|
+
value: cjsPluginUrl,
|
|
2511
|
+
onChange: handleChange
|
|
2512
|
+
})))), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(Button, {
|
|
2421
2513
|
variant: "contained",
|
|
2422
|
-
|
|
2423
|
-
onClick: function onClick() {
|
|
2424
|
-
return _onClose();
|
|
2425
|
-
}
|
|
2514
|
+
onClick: handleClose
|
|
2426
2515
|
}, "Cancel"), /*#__PURE__*/React.createElement(Button, {
|
|
2427
2516
|
variant: "contained",
|
|
2428
2517
|
color: "primary",
|
|
2429
|
-
onClick:
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
url: formUrl
|
|
2433
|
-
});
|
|
2434
|
-
|
|
2435
|
-
_onClose();
|
|
2436
|
-
}
|
|
2437
|
-
}, "Submit")));
|
|
2518
|
+
onClick: handleSubmit,
|
|
2519
|
+
disabled: !ready
|
|
2520
|
+
}, "Submit"))));
|
|
2438
2521
|
}
|
|
2439
2522
|
|
|
2440
2523
|
var CustomPluginForm$1 = /*#__PURE__*/observer(CustomPluginForm);
|
|
2441
2524
|
|
|
2442
|
-
var useStyles$3 = /*#__PURE__*/makeStyles
|
|
2525
|
+
var useStyles$3 = /*#__PURE__*/makeStyles(function (theme) {
|
|
2443
2526
|
return {
|
|
2444
2527
|
root: {
|
|
2445
2528
|
margin: theme.spacing(1)
|
|
@@ -2490,7 +2573,8 @@ function PluginStoreWidget(_ref) {
|
|
|
2490
2573
|
pluginManager = _getEnv.pluginManager;
|
|
2491
2574
|
|
|
2492
2575
|
useEffect(function () {
|
|
2493
|
-
var
|
|
2576
|
+
var controller = new AbortController();
|
|
2577
|
+
var signal = controller.signal;
|
|
2494
2578
|
|
|
2495
2579
|
_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
2496
2580
|
var response, err, array;
|
|
@@ -2500,7 +2584,9 @@ function PluginStoreWidget(_ref) {
|
|
|
2500
2584
|
case 0:
|
|
2501
2585
|
_context.prev = 0;
|
|
2502
2586
|
_context.next = 3;
|
|
2503
|
-
return fetch('https://jbrowse.org/plugin-store/plugins.json'
|
|
2587
|
+
return fetch('https://jbrowse.org/plugin-store/plugins.json', {
|
|
2588
|
+
signal: signal
|
|
2589
|
+
});
|
|
2504
2590
|
|
|
2505
2591
|
case 3:
|
|
2506
2592
|
response = _context.sent;
|
|
@@ -2524,7 +2610,7 @@ function PluginStoreWidget(_ref) {
|
|
|
2524
2610
|
case 11:
|
|
2525
2611
|
array = _context.sent;
|
|
2526
2612
|
|
|
2527
|
-
if (!
|
|
2613
|
+
if (!signal.aborted) {
|
|
2528
2614
|
setPluginArray(array.plugins);
|
|
2529
2615
|
}
|
|
2530
2616
|
|
|
@@ -2546,7 +2632,7 @@ function PluginStoreWidget(_ref) {
|
|
|
2546
2632
|
}))();
|
|
2547
2633
|
|
|
2548
2634
|
return function () {
|
|
2549
|
-
|
|
2635
|
+
controller.abort();
|
|
2550
2636
|
};
|
|
2551
2637
|
}, []);
|
|
2552
2638
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -2614,6 +2700,11 @@ function PluginStoreWidget(_ref) {
|
|
|
2614
2700
|
}, "Available plugins")), error ? /*#__PURE__*/React.createElement(Typography, {
|
|
2615
2701
|
color: "error"
|
|
2616
2702
|
}, "".concat(error)) : pluginArray ? pluginArray.filter(function (plugin) {
|
|
2703
|
+
// If pugin only has cjsUrl, don't display outside desktop
|
|
2704
|
+
if (!isElectron && !(plugin.esmUrl || plugin.url || plugin.umdUrl)) {
|
|
2705
|
+
return false;
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2617
2708
|
return plugin.name.toLowerCase().includes(model.filterText.toLowerCase());
|
|
2618
2709
|
}).map(function (plugin) {
|
|
2619
2710
|
return /*#__PURE__*/React.createElement(PluginCard$1, {
|
|
@@ -2797,7 +2888,7 @@ var index = {
|
|
|
2797
2888
|
'default': SetDefaultSession$1
|
|
2798
2889
|
};
|
|
2799
2890
|
|
|
2800
|
-
var useStyles$4 = /*#__PURE__*/makeStyles
|
|
2891
|
+
var useStyles$4 = /*#__PURE__*/makeStyles(function () {
|
|
2801
2892
|
return {
|
|
2802
2893
|
table: {
|
|
2803
2894
|
minWidth: 500,
|
|
@@ -2866,7 +2957,7 @@ var AssemblyTable = /*#__PURE__*/observer(function (_ref) {
|
|
|
2866
2957
|
}, "Actions")))), /*#__PURE__*/React.createElement(TableBody, null, rows)));
|
|
2867
2958
|
});
|
|
2868
2959
|
|
|
2869
|
-
var useStyles$5 = /*#__PURE__*/makeStyles
|
|
2960
|
+
var useStyles$5 = /*#__PURE__*/makeStyles(function (theme) {
|
|
2870
2961
|
return {
|
|
2871
2962
|
root: {
|
|
2872
2963
|
flexGrow: 1,
|
|
@@ -3146,7 +3237,7 @@ var AssemblyEditor = /*#__PURE__*/observer(function (_ref) {
|
|
|
3146
3237
|
});
|
|
3147
3238
|
});
|
|
3148
3239
|
|
|
3149
|
-
var useStyles$6 = /*#__PURE__*/makeStyles(function (theme) {
|
|
3240
|
+
var useStyles$6 = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
3150
3241
|
return {
|
|
3151
3242
|
titleBox: {
|
|
3152
3243
|
color: '#fff',
|
|
@@ -3270,7 +3361,7 @@ var ManageConnectionsDialog = /*#__PURE__*/lazy(function () {
|
|
|
3270
3361
|
var ToggleConnectionsDialog = /*#__PURE__*/lazy(function () {
|
|
3271
3362
|
return Promise.resolve().then(function () { return ToggleConnectionsDialog$2; });
|
|
3272
3363
|
});
|
|
3273
|
-
var useStyles$7 = /*#__PURE__*/makeStyles
|
|
3364
|
+
var useStyles$7 = /*#__PURE__*/makeStyles(function (theme) {
|
|
3274
3365
|
var _theme$palette$tertia, _theme$palette$tertia2;
|
|
3275
3366
|
|
|
3276
3367
|
return {
|
|
@@ -3837,7 +3928,7 @@ var HierarchicalTrackSelector$1 = {
|
|
|
3837
3928
|
'default': HierarchicalTrackSelectorContainer
|
|
3838
3929
|
};
|
|
3839
3930
|
|
|
3840
|
-
var useStyles$8 = /*#__PURE__*/makeStyles
|
|
3931
|
+
var useStyles$8 = /*#__PURE__*/makeStyles(function (theme) {
|
|
3841
3932
|
return {
|
|
3842
3933
|
spacing: {
|
|
3843
3934
|
marginBottom: theme.spacing(3)
|
|
@@ -4090,7 +4181,7 @@ function ConfirmTrack(_ref7) {
|
|
|
4090
4181
|
|
|
4091
4182
|
var ConfirmTrack$1 = /*#__PURE__*/observer(ConfirmTrack);
|
|
4092
4183
|
|
|
4093
|
-
var useStyles$9 = /*#__PURE__*/makeStyles
|
|
4184
|
+
var useStyles$9 = /*#__PURE__*/makeStyles(function (theme) {
|
|
4094
4185
|
return {
|
|
4095
4186
|
paper: {
|
|
4096
4187
|
display: 'flex',
|
|
@@ -4130,7 +4221,7 @@ function TrackSourceSelect(_ref) {
|
|
|
4130
4221
|
|
|
4131
4222
|
var TrackSourceSelect$1 = /*#__PURE__*/observer(TrackSourceSelect);
|
|
4132
4223
|
|
|
4133
|
-
var useStyles$a = /*#__PURE__*/makeStyles
|
|
4224
|
+
var useStyles$a = /*#__PURE__*/makeStyles(function (theme) {
|
|
4134
4225
|
return {
|
|
4135
4226
|
root: {
|
|
4136
4227
|
marginTop: theme.spacing(1)
|
|
@@ -4364,7 +4455,7 @@ function ConnectionTypeSelect(props) {
|
|
|
4364
4455
|
})));
|
|
4365
4456
|
}
|
|
4366
4457
|
|
|
4367
|
-
var useStyles$b = /*#__PURE__*/makeStyles(function (theme) {
|
|
4458
|
+
var useStyles$b = /*#__PURE__*/makeStyles$1(function (theme) {
|
|
4368
4459
|
return {
|
|
4369
4460
|
root: {
|
|
4370
4461
|
marginTop: theme.spacing(1)
|
|
@@ -4579,7 +4670,7 @@ var DeleteConnectionDialog$3 = {
|
|
|
4579
4670
|
'default': DeleteConnectionDialog$2
|
|
4580
4671
|
};
|
|
4581
4672
|
|
|
4582
|
-
var useStyles$c = /*#__PURE__*/makeStyles
|
|
4673
|
+
var useStyles$c = /*#__PURE__*/makeStyles(function (theme) {
|
|
4583
4674
|
return {
|
|
4584
4675
|
closeButton: {
|
|
4585
4676
|
position: 'absolute',
|
|
@@ -4644,7 +4735,7 @@ var ManageConnectionsDialog$2 = {
|
|
|
4644
4735
|
'default': ManageConnectionsDialog$1
|
|
4645
4736
|
};
|
|
4646
4737
|
|
|
4647
|
-
var useStyles$d = /*#__PURE__*/makeStyles
|
|
4738
|
+
var useStyles$d = /*#__PURE__*/makeStyles(function (theme) {
|
|
4648
4739
|
return {
|
|
4649
4740
|
closeButton: {
|
|
4650
4741
|
position: 'absolute',
|