@jbrowse/plugin-linear-genome-view 1.7.10 → 2.0.1
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/BaseLinearDisplay/components/BaseLinearDisplay.js +119 -139
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -0
- package/dist/BaseLinearDisplay/components/Block.js +53 -74
- package/dist/BaseLinearDisplay/components/Block.js.map +1 -0
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +11 -1
- package/dist/BaseLinearDisplay/components/LinearBlocks.js +64 -103
- package/dist/BaseLinearDisplay/components/LinearBlocks.js.map +1 -0
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +145 -175
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -0
- package/dist/BaseLinearDisplay/components/Tooltip.js +109 -116
- package/dist/BaseLinearDisplay/components/Tooltip.js.map +1 -0
- package/dist/BaseLinearDisplay/index.js +13 -40
- package/dist/BaseLinearDisplay/index.js.map +1 -0
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +20 -15
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +605 -684
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -0
- package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js +15 -22
- package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +1 -0
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +7 -8
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +266 -312
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -0
- package/dist/LinearBareDisplay/configSchema.js +11 -17
- package/dist/LinearBareDisplay/configSchema.js.map +1 -0
- package/dist/LinearBareDisplay/index.js +7 -20
- package/dist/LinearBareDisplay/index.js.map +1 -0
- package/dist/LinearBareDisplay/model.d.ts +16 -14
- package/dist/LinearBareDisplay/model.js +36 -42
- package/dist/LinearBareDisplay/model.js.map +1 -0
- package/dist/LinearBasicDisplay/components/SetMaxHeight.d.ts +1 -1
- package/dist/LinearBasicDisplay/components/SetMaxHeight.js +76 -85
- package/dist/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -0
- package/dist/LinearBasicDisplay/configSchema.js +15 -23
- package/dist/LinearBasicDisplay/configSchema.js.map +1 -0
- package/dist/LinearBasicDisplay/index.js +10 -22
- package/dist/LinearBasicDisplay/index.js.map +1 -0
- package/dist/LinearBasicDisplay/model.d.ts +20 -15
- package/dist/LinearBasicDisplay/model.js +180 -159
- package/dist/LinearBasicDisplay/model.js.map +1 -0
- package/dist/LinearGenomeView/components/CenterLine.d.ts +2 -8
- package/dist/LinearGenomeView/components/CenterLine.js +60 -74
- package/dist/LinearGenomeView/components/CenterLine.js.map +1 -0
- package/dist/LinearGenomeView/components/ExportSvgDialog.js +141 -141
- package/dist/LinearGenomeView/components/ExportSvgDialog.js.map +1 -0
- package/dist/LinearGenomeView/components/Gridlines.d.ts +8 -0
- package/dist/LinearGenomeView/components/Gridlines.js +78 -0
- package/dist/LinearGenomeView/components/Gridlines.js.map +1 -0
- package/dist/LinearGenomeView/components/Header.js +70 -126
- package/dist/LinearGenomeView/components/Header.js.map +1 -0
- package/dist/LinearGenomeView/components/HelpDialog.d.ts +0 -1
- package/dist/LinearGenomeView/components/HelpDialog.js +62 -44
- package/dist/LinearGenomeView/components/HelpDialog.js.map +1 -0
- package/dist/LinearGenomeView/components/ImportForm.js +223 -320
- package/dist/LinearGenomeView/components/ImportForm.js.map +1 -0
- package/dist/LinearGenomeView/components/LinearGenomeView.js +64 -124
- package/dist/LinearGenomeView/components/LinearGenomeView.js.map +1 -0
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js +198 -337
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -0
- package/dist/LinearGenomeView/components/MiniControls.js +64 -78
- package/dist/LinearGenomeView/components/MiniControls.js.map +1 -0
- package/dist/LinearGenomeView/components/OverviewRubberBand.js +229 -293
- package/dist/LinearGenomeView/components/OverviewRubberBand.js.map +1 -0
- package/dist/LinearGenomeView/components/OverviewScaleBar.d.ts +24 -8
- package/dist/LinearGenomeView/components/OverviewScaleBar.js +277 -365
- package/dist/LinearGenomeView/components/OverviewScaleBar.js.map +1 -0
- package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +1 -1
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js +237 -324
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -0
- package/dist/LinearGenomeView/components/RubberBand.js +228 -296
- package/dist/LinearGenomeView/components/RubberBand.js.map +1 -0
- package/dist/LinearGenomeView/components/Ruler.js +45 -90
- package/dist/LinearGenomeView/components/Ruler.js.map +1 -0
- package/dist/LinearGenomeView/components/ScaleBar.d.ts +8 -403
- package/dist/LinearGenomeView/components/ScaleBar.js +121 -172
- package/dist/LinearGenomeView/components/ScaleBar.js.map +1 -0
- package/dist/LinearGenomeView/components/SearchBox.js +158 -205
- package/dist/LinearGenomeView/components/SearchBox.js.map +1 -0
- package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +0 -1
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +105 -150
- package/dist/LinearGenomeView/components/SearchResultsDialog.js.map +1 -0
- package/dist/LinearGenomeView/components/SequenceDialog.js +219 -272
- package/dist/LinearGenomeView/components/SequenceDialog.js.map +1 -0
- package/dist/LinearGenomeView/components/TrackContainer.js +116 -156
- package/dist/LinearGenomeView/components/TrackContainer.js.map +1 -0
- package/dist/LinearGenomeView/components/TrackLabel.d.ts +6 -42
- package/dist/LinearGenomeView/components/TrackLabel.js +115 -134
- package/dist/LinearGenomeView/components/TrackLabel.js.map +1 -0
- package/dist/LinearGenomeView/components/TracksContainer.d.ts +1 -1
- package/dist/LinearGenomeView/components/TracksContainer.js +172 -199
- package/dist/LinearGenomeView/components/TracksContainer.js.map +1 -0
- package/dist/LinearGenomeView/components/ZoomControls.js +72 -87
- package/dist/LinearGenomeView/components/ZoomControls.js.map +1 -0
- package/dist/LinearGenomeView/components/util.d.ts +12 -0
- package/dist/LinearGenomeView/components/util.js +95 -13
- package/dist/LinearGenomeView/components/util.js.map +1 -0
- package/dist/LinearGenomeView/index.d.ts +64 -77
- package/dist/LinearGenomeView/index.js +1035 -1412
- package/dist/LinearGenomeView/index.js.map +1 -0
- package/dist/LinearGenomeView/util.js +76 -83
- package/dist/LinearGenomeView/util.js.map +1 -0
- package/dist/index.d.ts +101 -51
- package/dist/index.js +225 -295
- package/dist/index.js.map +1 -0
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +9 -0
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +68 -0
- package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -0
- package/esm/BaseLinearDisplay/components/Block.d.ts +15 -0
- package/esm/BaseLinearDisplay/components/Block.js +46 -0
- package/esm/BaseLinearDisplay/components/Block.js.map +1 -0
- package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +22 -0
- package/esm/BaseLinearDisplay/components/LinearBlocks.js +62 -0
- package/esm/BaseLinearDisplay/components/LinearBlocks.js.map +1 -0
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +4 -0
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +113 -0
- package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -0
- package/esm/BaseLinearDisplay/components/Tooltip.d.ts +8 -0
- package/esm/BaseLinearDisplay/components/Tooltip.js +64 -0
- package/esm/BaseLinearDisplay/components/Tooltip.js.map +1 -0
- package/esm/BaseLinearDisplay/index.d.ts +5 -0
- package/esm/BaseLinearDisplay/index.js +4 -0
- package/esm/BaseLinearDisplay/index.js.map +1 -0
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +232 -0
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +541 -0
- package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -0
- package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.d.ts +1 -0
- package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js +14 -0
- package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +1 -0
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +96 -0
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +225 -0
- package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -0
- package/esm/LinearBareDisplay/configSchema.d.ts +2 -0
- package/esm/LinearBareDisplay/configSchema.js +9 -0
- package/esm/LinearBareDisplay/configSchema.js.map +1 -0
- package/esm/LinearBareDisplay/index.d.ts +2 -0
- package/esm/LinearBareDisplay/index.js +3 -0
- package/esm/LinearBareDisplay/index.js.map +1 -0
- package/esm/LinearBareDisplay/model.d.ts +194 -0
- package/esm/LinearBareDisplay/model.js +28 -0
- package/esm/LinearBareDisplay/model.js.map +1 -0
- package/esm/LinearBasicDisplay/components/SetMaxHeight.d.ts +10 -0
- package/esm/LinearBasicDisplay/components/SetMaxHeight.js +40 -0
- package/esm/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -0
- package/esm/LinearBasicDisplay/configSchema.d.ts +2 -0
- package/esm/LinearBasicDisplay/configSchema.js +14 -0
- package/esm/LinearBasicDisplay/configSchema.js.map +1 -0
- package/esm/LinearBasicDisplay/index.d.ts +2 -0
- package/esm/LinearBasicDisplay/index.js +3 -0
- package/esm/LinearBasicDisplay/index.js.map +1 -0
- package/esm/LinearBasicDisplay/model.d.ts +218 -0
- package/esm/LinearBasicDisplay/model.js +127 -0
- package/esm/LinearBasicDisplay/model.js.map +1 -0
- package/esm/LinearGenomeView/components/CenterLine.d.ts +8 -0
- package/esm/LinearGenomeView/components/CenterLine.js +40 -0
- package/esm/LinearGenomeView/components/CenterLine.js.map +1 -0
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +6 -0
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +52 -0
- package/esm/LinearGenomeView/components/ExportSvgDialog.js.map +1 -0
- package/esm/LinearGenomeView/components/Gridlines.d.ts +8 -0
- package/esm/LinearGenomeView/components/Gridlines.js +71 -0
- package/esm/LinearGenomeView/components/Gridlines.js.map +1 -0
- package/esm/LinearGenomeView/components/Header.d.ts +7 -0
- package/esm/LinearGenomeView/components/Header.js +81 -0
- package/esm/LinearGenomeView/components/Header.js.map +1 -0
- package/esm/LinearGenomeView/components/HelpDialog.d.ts +4 -0
- package/esm/LinearGenomeView/components/HelpDialog.js +58 -0
- package/esm/LinearGenomeView/components/HelpDialog.js.map +1 -0
- package/esm/LinearGenomeView/components/ImportForm.d.ts +7 -0
- package/esm/LinearGenomeView/components/ImportForm.js +141 -0
- package/esm/LinearGenomeView/components/ImportForm.js.map +1 -0
- package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +7 -0
- package/esm/LinearGenomeView/components/LinearGenomeView.js +67 -0
- package/esm/LinearGenomeView/components/LinearGenomeView.js.map +1 -0
- package/esm/LinearGenomeView/components/LinearGenomeViewSvg.d.ts +4 -0
- package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js +132 -0
- package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -0
- package/esm/LinearGenomeView/components/MiniControls.d.ts +6 -0
- package/esm/LinearGenomeView/components/MiniControls.js +25 -0
- package/esm/LinearGenomeView/components/MiniControls.js.map +1 -0
- package/esm/LinearGenomeView/components/OverviewRubberBand.d.ts +22 -0
- package/esm/LinearGenomeView/components/OverviewRubberBand.js +197 -0
- package/esm/LinearGenomeView/components/OverviewRubberBand.js.map +1 -0
- package/esm/LinearGenomeView/components/OverviewScaleBar.d.ts +148 -0
- package/esm/LinearGenomeView/components/OverviewScaleBar.js +287 -0
- package/esm/LinearGenomeView/components/OverviewScaleBar.js.map +1 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete.d.ts +22 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js +136 -0
- package/esm/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -0
- package/esm/LinearGenomeView/components/RubberBand.d.ts +9 -0
- package/esm/LinearGenomeView/components/RubberBand.js +197 -0
- package/esm/LinearGenomeView/components/RubberBand.js.map +1 -0
- package/esm/LinearGenomeView/components/Ruler.d.ts +27 -0
- package/esm/LinearGenomeView/components/Ruler.js +50 -0
- package/esm/LinearGenomeView/components/Ruler.js.map +1 -0
- package/esm/LinearGenomeView/components/ScaleBar.d.ts +10 -0
- package/esm/LinearGenomeView/components/ScaleBar.js +112 -0
- package/esm/LinearGenomeView/components/ScaleBar.js.map +1 -0
- package/esm/LinearGenomeView/components/SearchBox.d.ts +8 -0
- package/esm/LinearGenomeView/components/SearchBox.js +94 -0
- package/esm/LinearGenomeView/components/SearchBox.js.map +1 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +7 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +107 -0
- package/esm/LinearGenomeView/components/SearchResultsDialog.js.map +1 -0
- package/esm/LinearGenomeView/components/SequenceDialog.d.ts +8 -0
- package/esm/LinearGenomeView/components/SequenceDialog.js +147 -0
- package/esm/LinearGenomeView/components/SequenceDialog.js.map +1 -0
- package/esm/LinearGenomeView/components/TrackContainer.d.ts +9 -0
- package/esm/LinearGenomeView/components/TrackContainer.js +109 -0
- package/esm/LinearGenomeView/components/TrackContainer.js.map +1 -0
- package/esm/LinearGenomeView/components/TrackLabel.d.ts +8 -0
- package/esm/LinearGenomeView/components/TrackLabel.js +89 -0
- package/esm/LinearGenomeView/components/TrackLabel.js.map +1 -0
- package/{dist/LinearGenomeView/components/VerticalGuides.d.ts → esm/LinearGenomeView/components/TracksContainer.d.ts} +4 -3
- package/esm/LinearGenomeView/components/TracksContainer.js +142 -0
- package/esm/LinearGenomeView/components/TracksContainer.js.map +1 -0
- package/esm/LinearGenomeView/components/ZoomControls.d.ts +7 -0
- package/esm/LinearGenomeView/components/ZoomControls.js +32 -0
- package/esm/LinearGenomeView/components/ZoomControls.js.map +1 -0
- package/esm/LinearGenomeView/components/util.d.ts +14 -0
- package/esm/LinearGenomeView/components/util.js +17 -0
- package/esm/LinearGenomeView/components/util.js.map +1 -0
- package/esm/LinearGenomeView/index.d.ts +275 -0
- package/esm/LinearGenomeView/index.js +978 -0
- package/esm/LinearGenomeView/index.js.map +1 -0
- package/esm/LinearGenomeView/util.d.ts +14 -0
- package/esm/LinearGenomeView/util.js +62 -0
- package/esm/LinearGenomeView/util.js.map +1 -0
- package/esm/index.d.ts +615 -0
- package/esm/index.js +127 -0
- package/esm/index.js.map +1 -0
- package/package.json +22 -15
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +4 -3
- package/src/BaseLinearDisplay/components/Block.tsx +5 -5
- package/src/BaseLinearDisplay/components/LinearBlocks.tsx +4 -4
- package/src/BaseLinearDisplay/components/ServerSideRenderedBlockContent.tsx +7 -8
- package/src/BaseLinearDisplay/components/Tooltip.tsx +14 -4
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +6 -4
- package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +1 -1
- package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +10 -7
- package/src/LinearBasicDisplay/model.ts +21 -15
- package/src/LinearGenomeView/components/CenterLine.tsx +6 -11
- package/src/LinearGenomeView/components/ExportSvgDialog.tsx +5 -5
- package/src/LinearGenomeView/components/{VerticalGuides.tsx → Gridlines.tsx} +9 -11
- package/src/LinearGenomeView/components/Header.tsx +13 -18
- package/src/LinearGenomeView/components/HelpDialog.tsx +5 -5
- package/src/LinearGenomeView/components/ImportForm.tsx +24 -37
- package/src/LinearGenomeView/components/LinearGenomeView.test.js +16 -6
- package/src/LinearGenomeView/components/LinearGenomeView.tsx +4 -3
- package/src/LinearGenomeView/components/MiniControls.tsx +29 -40
- package/src/LinearGenomeView/components/OverviewRubberBand.tsx +20 -29
- package/src/LinearGenomeView/components/OverviewScaleBar.tsx +100 -89
- package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +13 -44
- package/src/LinearGenomeView/components/RubberBand.tsx +12 -18
- package/src/LinearGenomeView/components/Ruler.tsx +5 -11
- package/src/LinearGenomeView/components/ScaleBar.tsx +23 -27
- package/src/LinearGenomeView/components/SearchBox.tsx +22 -32
- package/src/LinearGenomeView/components/SearchResultsDialog.tsx +7 -7
- package/src/LinearGenomeView/components/SequenceDialog.tsx +10 -10
- package/src/LinearGenomeView/components/TrackContainer.tsx +12 -12
- package/src/LinearGenomeView/components/TrackLabel.tsx +21 -31
- package/src/LinearGenomeView/components/TracksContainer.tsx +10 -15
- package/src/LinearGenomeView/components/ZoomControls.tsx +12 -13
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +500 -547
- package/src/LinearGenomeView/components/util.ts +43 -0
- package/src/LinearGenomeView/index.test.ts +14 -36
- package/src/LinearGenomeView/index.tsx +390 -564
- package/src/index.ts +1 -1
- package/dist/LinearBareDisplay/index.test.js +0 -33
- package/dist/LinearGenomeView/components/LinearGenomeView.test.js +0 -234
- package/dist/LinearGenomeView/components/ScaleBar.test.js +0 -180
- package/dist/LinearGenomeView/components/VerticalGuides.js +0 -116
- package/dist/LinearGenomeView/index.test.js +0 -1187
- package/dist/LinearGenomeView/util.test.js +0 -78
|
@@ -1,330 +1,233 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
-
|
|
12
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
-
|
|
14
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
15
|
-
|
|
16
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
17
|
-
|
|
18
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
19
|
-
|
|
20
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
-
|
|
22
|
-
var _mobxReact = require("mobx-react");
|
|
23
|
-
|
|
24
|
-
var _util = require("@jbrowse/core/util");
|
|
25
|
-
|
|
26
|
-
var _core = require("@material-ui/core");
|
|
27
|
-
|
|
28
|
-
var _ErrorMessage = _interopRequireDefault(require("@jbrowse/core/ui/ErrorMessage"));
|
|
29
|
-
|
|
30
|
-
var _BaseResults = _interopRequireDefault(require("@jbrowse/core/TextSearch/BaseResults"));
|
|
31
|
-
|
|
32
|
-
var _AssemblySelector = _interopRequireDefault(require("@jbrowse/core/ui/AssemblySelector"));
|
|
33
|
-
|
|
34
|
-
var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
|
|
35
|
-
|
|
36
|
-
var _RefNameAutocomplete = _interopRequireDefault(require("./RefNameAutocomplete"));
|
|
37
|
-
|
|
38
|
-
var _ = require("..");
|
|
39
|
-
|
|
40
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
41
|
-
|
|
42
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || (0, _typeof2.default)(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
43
|
-
|
|
44
|
-
var SearchResultsDialog = /*#__PURE__*/(0, _react.lazy)(function () {
|
|
45
|
-
return Promise.resolve().then(function () {
|
|
46
|
-
return _interopRequireWildcard(require('./SearchResultsDialog'));
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
var useStyles = (0, _core.makeStyles)(function (theme) {
|
|
50
|
-
return {
|
|
51
|
-
importFormContainer: {
|
|
52
|
-
padding: theme.spacing(2)
|
|
53
|
-
},
|
|
54
|
-
button: {
|
|
55
|
-
margin: theme.spacing(2)
|
|
56
|
-
},
|
|
57
|
-
container: {
|
|
58
|
-
padding: theme.spacing(4)
|
|
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]; } };
|
|
59
7
|
}
|
|
60
|
-
|
|
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;
|
|
61
17
|
});
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
function fetchResults(_x, _x2) {
|
|
104
|
-
return _fetchResults.apply(this, arguments);
|
|
105
|
-
} // gets a string as input, or use stored option results from previous query,
|
|
106
|
-
// then re-query and
|
|
107
|
-
// 1) if it has multiple results: pop a dialog
|
|
108
|
-
// 2) if it's a single result navigate to it
|
|
109
|
-
// 3) else assume it's a locstring and navigate to it
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
function _fetchResults() {
|
|
113
|
-
_fetchResults = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(query, searchType) {
|
|
114
|
-
var _assembly$allRefNames;
|
|
115
|
-
|
|
116
|
-
var textSearchResults, refNameResults;
|
|
117
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
118
|
-
while (1) {
|
|
119
|
-
switch (_context.prev = _context.next) {
|
|
120
|
-
case 0:
|
|
121
|
-
if (!textSearchManager) {
|
|
122
|
-
console.warn('No text search manager');
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
_context.next = 3;
|
|
126
|
-
return textSearchManager === null || textSearchManager === void 0 ? void 0 : textSearchManager.search({
|
|
127
|
-
queryString: query,
|
|
128
|
-
searchType: searchType
|
|
129
|
-
}, searchScope, rankSearchResults);
|
|
130
|
-
|
|
131
|
-
case 3:
|
|
132
|
-
textSearchResults = _context.sent;
|
|
133
|
-
refNameResults = assembly === null || assembly === void 0 ? void 0 : (_assembly$allRefNames = assembly.allRefNames) === null || _assembly$allRefNames === void 0 ? void 0 : _assembly$allRefNames.filter(function (refName) {
|
|
134
|
-
return refName.startsWith(query);
|
|
135
|
-
}).map(function (r) {
|
|
136
|
-
return new _BaseResults.default({
|
|
137
|
-
label: r
|
|
138
|
-
});
|
|
139
|
-
}).slice(0, 10);
|
|
140
|
-
return _context.abrupt("return", [].concat((0, _toConsumableArray2.default)(refNameResults || []), (0, _toConsumableArray2.default)(textSearchResults || [])));
|
|
141
|
-
|
|
142
|
-
case 6:
|
|
143
|
-
case "end":
|
|
144
|
-
return _context.stop();
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}, _callee);
|
|
148
|
-
}));
|
|
149
|
-
return _fetchResults.apply(this, arguments);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function handleSelectedRegion(_x3) {
|
|
153
|
-
return _handleSelectedRegion.apply(this, arguments);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function _handleSelectedRegion() {
|
|
157
|
-
_handleSelectedRegion = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(input) {
|
|
158
|
-
var trackId, location, _location$split, _location$split2, ref, rest, allRefs, results;
|
|
159
|
-
|
|
160
|
-
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
161
|
-
while (1) {
|
|
162
|
-
switch (_context2.prev = _context2.next) {
|
|
163
|
-
case 0:
|
|
164
|
-
if (option) {
|
|
165
|
-
_context2.next = 2;
|
|
166
|
-
break;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return _context2.abrupt("return");
|
|
170
|
-
|
|
171
|
-
case 2:
|
|
172
|
-
trackId = option.getTrackId();
|
|
173
|
-
location = input || option.getLocation() || '';
|
|
174
|
-
_location$split = location.split(':'), _location$split2 = (0, _slicedToArray2.default)(_location$split, 2), ref = _location$split2[0], rest = _location$split2[1];
|
|
175
|
-
allRefs = (assembly === null || assembly === void 0 ? void 0 : assembly.allRefNames) || [];
|
|
176
|
-
_context2.prev = 6;
|
|
177
|
-
|
|
178
|
-
if (!(allRefs.includes(location) || allRefs.includes(ref) && rest !== undefined && !Number.isNaN(parseInt(rest, 10)))) {
|
|
179
|
-
_context2.next = 11;
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
model.navToLocString(location, selectedAsm);
|
|
184
|
-
_context2.next = 22;
|
|
185
|
-
break;
|
|
186
|
-
|
|
187
|
-
case 11:
|
|
188
|
-
_context2.next = 13;
|
|
189
|
-
return fetchResults(input, 'exact');
|
|
190
|
-
|
|
191
|
-
case 13:
|
|
192
|
-
results = _context2.sent;
|
|
193
|
-
|
|
194
|
-
if (!(results.length > 1)) {
|
|
195
|
-
_context2.next = 19;
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
model.setSearchResults(results, input.toLowerCase());
|
|
200
|
-
return _context2.abrupt("return");
|
|
201
|
-
|
|
202
|
-
case 19:
|
|
203
|
-
if (results.length === 1) {
|
|
204
|
-
location = results[0].getLocation();
|
|
205
|
-
trackId = results[0].getTrackId();
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
case 20:
|
|
209
|
-
model.navToLocString(location, selectedAsm);
|
|
210
|
-
|
|
211
|
-
if (trackId) {
|
|
212
|
-
model.showTrack(trackId);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
case 22:
|
|
216
|
-
_context2.next = 28;
|
|
217
|
-
break;
|
|
218
|
-
|
|
219
|
-
case 24:
|
|
220
|
-
_context2.prev = 24;
|
|
221
|
-
_context2.t0 = _context2["catch"](6);
|
|
222
|
-
console.error(_context2.t0);
|
|
223
|
-
session.notify("".concat(_context2.t0), 'warning');
|
|
224
|
-
|
|
225
|
-
case 28:
|
|
226
|
-
case "end":
|
|
227
|
-
return _context2.stop();
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}, _callee2, null, [[6, 24]]);
|
|
231
|
-
}));
|
|
232
|
-
return _handleSelectedRegion.apply(this, arguments);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
var height = _.WIDGET_HEIGHT + 5; // implementation notes:
|
|
236
|
-
// having this wrapped in a form allows intuitive use of enter key to submit
|
|
237
|
-
|
|
238
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
239
|
-
className: classes.container
|
|
240
|
-
}, err ? /*#__PURE__*/_react.default.createElement(_ErrorMessage.default, {
|
|
241
|
-
error: err
|
|
242
|
-
}) : null, /*#__PURE__*/_react.default.createElement(_core.Container, {
|
|
243
|
-
className: classes.importFormContainer
|
|
244
|
-
}, /*#__PURE__*/_react.default.createElement("form", {
|
|
245
|
-
onSubmit: function onSubmit(event) {
|
|
246
|
-
event.preventDefault();
|
|
247
|
-
model.setError(undefined);
|
|
248
|
-
|
|
249
|
-
if (value) {
|
|
250
|
-
handleSelectedRegion(value);
|
|
251
|
-
}
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
+
function step(op) {
|
|
39
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
+
while (_) try {
|
|
41
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
+
switch (op[0]) {
|
|
44
|
+
case 0: case 1: t = op; break;
|
|
45
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
+
default:
|
|
49
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
+
if (t[2]) _.ops.pop();
|
|
54
|
+
_.trys.pop(); continue;
|
|
55
|
+
}
|
|
56
|
+
op = body.call(thisArg, _);
|
|
57
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
252
59
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}, /*#__PURE__*/_react.default.createElement(_AssemblySelector.default, {
|
|
261
|
-
onChange: function onChange(val) {
|
|
262
|
-
setImportError('');
|
|
263
|
-
setSelectedAsm(val);
|
|
264
|
-
},
|
|
265
|
-
session: session,
|
|
266
|
-
selected: selectedAsm,
|
|
267
|
-
InputProps: {
|
|
268
|
-
style: {
|
|
269
|
-
height: height
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
})), /*#__PURE__*/_react.default.createElement(_core.Grid, {
|
|
273
|
-
item: true
|
|
274
|
-
}, selectedAsm ? err ? /*#__PURE__*/_react.default.createElement(_Close.default, {
|
|
275
|
-
style: {
|
|
276
|
-
color: 'red'
|
|
60
|
+
};
|
|
61
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
62
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
63
|
+
if (!m) return o;
|
|
64
|
+
var i = m.call(o), r, ar = [], e;
|
|
65
|
+
try {
|
|
66
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
277
67
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
value: value // note: minWidth 270 accomodates full width of helperText
|
|
283
|
-
,
|
|
284
|
-
minWidth: 270,
|
|
285
|
-
onChange: function onChange(str) {
|
|
286
|
-
return setValue(str);
|
|
287
|
-
},
|
|
288
|
-
TextFieldProps: {
|
|
289
|
-
variant: 'outlined',
|
|
290
|
-
helperText: 'Enter sequence name, feature name, or location',
|
|
291
|
-
style: {
|
|
292
|
-
minWidth: '175px'
|
|
293
|
-
},
|
|
294
|
-
InputProps: {
|
|
295
|
-
style: {
|
|
296
|
-
height: height
|
|
68
|
+
catch (error) { e = { error: error }; }
|
|
69
|
+
finally {
|
|
70
|
+
try {
|
|
71
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
297
72
|
}
|
|
298
|
-
|
|
73
|
+
finally { if (e) throw e.error; }
|
|
299
74
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
75
|
+
return ar;
|
|
76
|
+
};
|
|
77
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
78
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
|
+
};
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
var react_1 = __importStar(require("react"));
|
|
82
|
+
var mui_1 = require("tss-react/mui");
|
|
83
|
+
var mobx_react_1 = require("mobx-react");
|
|
84
|
+
var util_1 = require("@jbrowse/core/util");
|
|
85
|
+
var material_1 = require("@mui/material");
|
|
86
|
+
var ui_1 = require("@jbrowse/core/ui");
|
|
87
|
+
var BaseResults_1 = __importDefault(require("@jbrowse/core/TextSearch/BaseResults"));
|
|
88
|
+
var Close_1 = __importDefault(require("@mui/icons-material/Close"));
|
|
89
|
+
// locals
|
|
90
|
+
var RefNameAutocomplete_1 = __importDefault(require("./RefNameAutocomplete"));
|
|
91
|
+
var util_2 = require("./util");
|
|
92
|
+
var __1 = require("..");
|
|
93
|
+
var SearchResultsDialog = (0, react_1.lazy)(function () { return Promise.resolve().then(function () { return __importStar(require('./SearchResultsDialog')); }); });
|
|
94
|
+
var useStyles = (0, mui_1.makeStyles)()(function (theme) { return ({
|
|
95
|
+
importFormContainer: {
|
|
96
|
+
padding: theme.spacing(2),
|
|
97
|
+
},
|
|
98
|
+
button: {
|
|
99
|
+
margin: theme.spacing(2),
|
|
100
|
+
},
|
|
101
|
+
container: {
|
|
102
|
+
padding: theme.spacing(4),
|
|
318
103
|
},
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
model
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
104
|
+
}); });
|
|
105
|
+
var ImportForm = (0, mobx_react_1.observer)(function (_a) {
|
|
106
|
+
var _b;
|
|
107
|
+
var model = _a.model;
|
|
108
|
+
var classes = useStyles().classes;
|
|
109
|
+
var session = (0, util_1.getSession)(model);
|
|
110
|
+
var assemblyNames = session.assemblyNames, assemblyManager = session.assemblyManager, textSearchManager = session.textSearchManager;
|
|
111
|
+
var rankSearchResults = model.rankSearchResults, isSearchDialogDisplayed = model.isSearchDialogDisplayed, error = model.error;
|
|
112
|
+
var _c = __read((0, react_1.useState)(assemblyNames[0]), 2), selectedAsm = _c[0], setSelectedAsm = _c[1];
|
|
113
|
+
var _d = __read((0, react_1.useState)(error), 2), importError = _d[0], setImportError = _d[1];
|
|
114
|
+
var searchScope = model.searchScope(selectedAsm);
|
|
115
|
+
var assembly = assemblyManager.get(selectedAsm);
|
|
116
|
+
var assemblyError = assemblyNames.length
|
|
117
|
+
? assembly === null || assembly === void 0 ? void 0 : assembly.error
|
|
118
|
+
: 'No configured assemblies';
|
|
119
|
+
var regions = (assembly === null || assembly === void 0 ? void 0 : assembly.regions) || [];
|
|
120
|
+
var err = assemblyError || importError;
|
|
121
|
+
var _e = __read((0, react_1.useState)(''), 2), myVal = _e[0], setValue = _e[1];
|
|
122
|
+
var value = myVal || ((_b = regions[0]) === null || _b === void 0 ? void 0 : _b.refName);
|
|
123
|
+
// use this instead of useState initializer because the useState initializer
|
|
124
|
+
// won't update in response to an observable
|
|
125
|
+
var option = new BaseResults_1.default({
|
|
126
|
+
label: value,
|
|
127
|
+
});
|
|
128
|
+
// gets a string as input, or use stored option results from previous query,
|
|
129
|
+
// then re-query and
|
|
130
|
+
// 1) if it has multiple results: pop a dialog
|
|
131
|
+
// 2) if it's a single result navigate to it
|
|
132
|
+
// 3) else assume it's a locstring and navigate to it
|
|
133
|
+
function handleSelectedRegion(input) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
135
|
+
var trackId, location, _a, ref, rest, allRefs, results, e_1;
|
|
136
|
+
return __generator(this, function (_b) {
|
|
137
|
+
switch (_b.label) {
|
|
138
|
+
case 0:
|
|
139
|
+
if (!option) {
|
|
140
|
+
return [2 /*return*/];
|
|
141
|
+
}
|
|
142
|
+
trackId = option.getTrackId();
|
|
143
|
+
location = input || option.getLocation() || '';
|
|
144
|
+
_a = __read(location.split(':'), 2), ref = _a[0], rest = _a[1];
|
|
145
|
+
allRefs = (assembly === null || assembly === void 0 ? void 0 : assembly.allRefNames) || [];
|
|
146
|
+
_b.label = 1;
|
|
147
|
+
case 1:
|
|
148
|
+
_b.trys.push([1, 5, , 6]);
|
|
149
|
+
if (!(allRefs.includes(location) ||
|
|
150
|
+
(allRefs.includes(ref) &&
|
|
151
|
+
rest !== undefined &&
|
|
152
|
+
!Number.isNaN(parseInt(rest, 10))))) return [3 /*break*/, 2];
|
|
153
|
+
model.navToLocString(location, selectedAsm);
|
|
154
|
+
return [3 /*break*/, 4];
|
|
155
|
+
case 2: return [4 /*yield*/, (0, util_2.fetchResults)({
|
|
156
|
+
queryString: input,
|
|
157
|
+
searchType: 'exact',
|
|
158
|
+
searchScope: searchScope,
|
|
159
|
+
rankSearchResults: rankSearchResults,
|
|
160
|
+
textSearchManager: textSearchManager,
|
|
161
|
+
assembly: assembly,
|
|
162
|
+
})];
|
|
163
|
+
case 3:
|
|
164
|
+
results = _b.sent();
|
|
165
|
+
if (results.length > 1) {
|
|
166
|
+
model.setSearchResults(results, input.toLowerCase());
|
|
167
|
+
return [2 /*return*/];
|
|
168
|
+
}
|
|
169
|
+
else if (results.length === 1) {
|
|
170
|
+
location = results[0].getLocation();
|
|
171
|
+
trackId = results[0].getTrackId();
|
|
172
|
+
}
|
|
173
|
+
model.navToLocString(location, selectedAsm);
|
|
174
|
+
if (trackId) {
|
|
175
|
+
model.showTrack(trackId);
|
|
176
|
+
}
|
|
177
|
+
_b.label = 4;
|
|
178
|
+
case 4: return [3 /*break*/, 6];
|
|
179
|
+
case 5:
|
|
180
|
+
e_1 = _b.sent();
|
|
181
|
+
console.error(e_1);
|
|
182
|
+
session.notify("".concat(e_1), 'warning');
|
|
183
|
+
return [3 /*break*/, 6];
|
|
184
|
+
case 6: return [2 /*return*/];
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
});
|
|
326
188
|
}
|
|
327
|
-
|
|
189
|
+
var height = __1.WIDGET_HEIGHT + 5;
|
|
190
|
+
// implementation notes:
|
|
191
|
+
// having this wrapped in a form allows intuitive use of enter key to submit
|
|
192
|
+
return (react_1.default.createElement("div", { className: classes.container },
|
|
193
|
+
err ? react_1.default.createElement(ui_1.ErrorMessage, { error: err }) : null,
|
|
194
|
+
react_1.default.createElement(material_1.Container, { className: classes.importFormContainer },
|
|
195
|
+
react_1.default.createElement("form", { onSubmit: function (event) {
|
|
196
|
+
event.preventDefault();
|
|
197
|
+
model.setError(undefined);
|
|
198
|
+
if (value) {
|
|
199
|
+
handleSelectedRegion(value);
|
|
200
|
+
}
|
|
201
|
+
} },
|
|
202
|
+
react_1.default.createElement(material_1.Grid, { container: true, spacing: 1, justifyContent: "center", alignItems: "center" },
|
|
203
|
+
react_1.default.createElement(material_1.Grid, { item: true },
|
|
204
|
+
react_1.default.createElement(ui_1.AssemblySelector, { onChange: function (val) {
|
|
205
|
+
setImportError('');
|
|
206
|
+
setSelectedAsm(val);
|
|
207
|
+
}, session: session, selected: selectedAsm, InputProps: { style: { height: height } } })),
|
|
208
|
+
react_1.default.createElement(material_1.Grid, { item: true }, selectedAsm ? (err ? (react_1.default.createElement(Close_1.default, { style: { color: 'red' } })) : value ? (react_1.default.createElement(RefNameAutocomplete_1.default, { fetchResults: function (queryString) {
|
|
209
|
+
return (0, util_2.fetchResults)({
|
|
210
|
+
queryString: queryString,
|
|
211
|
+
assembly: assembly,
|
|
212
|
+
textSearchManager: textSearchManager,
|
|
213
|
+
rankSearchResults: rankSearchResults,
|
|
214
|
+
searchScope: searchScope,
|
|
215
|
+
});
|
|
216
|
+
}, model: model, assemblyName: assemblyError ? undefined : selectedAsm, value: value,
|
|
217
|
+
// note: minWidth 270 accomodates full width of helperText
|
|
218
|
+
minWidth: 270, onChange: function (str) { return setValue(str); }, TextFieldProps: {
|
|
219
|
+
variant: 'outlined',
|
|
220
|
+
helperText: 'Enter sequence name, feature name, or location',
|
|
221
|
+
style: { minWidth: '175px' },
|
|
222
|
+
InputProps: { style: { height: height } },
|
|
223
|
+
} })) : (react_1.default.createElement(material_1.CircularProgress, { role: "progressbar", size: 20, disableShrink: true }))) : null),
|
|
224
|
+
react_1.default.createElement(material_1.Grid, { item: true },
|
|
225
|
+
react_1.default.createElement(material_1.Button, { type: "submit", disabled: !value, className: classes.button, variant: "contained", color: "primary" }, "Open"),
|
|
226
|
+
react_1.default.createElement(material_1.Button, { disabled: !value, className: classes.button, onClick: function () {
|
|
227
|
+
model.setError(undefined);
|
|
228
|
+
model.showAllRegionsInAssembly(selectedAsm);
|
|
229
|
+
}, variant: "contained", color: "secondary" }, "Show all regions in assembly"))))),
|
|
230
|
+
isSearchDialogDisplayed ? (react_1.default.createElement(SearchResultsDialog, { model: model, optAssemblyName: selectedAsm, handleClose: function () { return model.setSearchResults(undefined, undefined); } })) : null));
|
|
328
231
|
});
|
|
329
|
-
|
|
330
|
-
|
|
232
|
+
exports.default = ImportForm;
|
|
233
|
+
//# sourceMappingURL=ImportForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportForm.js","sourceRoot":"","sources":["../../../src/LinearGenomeView/components/ImportForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,qCAA0C;AAC1C,yCAAqC;AACrC,2CAA+C;AAC/C,0CAAyE;AACzE,uCAAiE;AACjE,qFAA6D;AAC7D,oEAAiD;AAEjD,SA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