@jbrowse/plugin-linear-genome-view 1.7.9 → 2.0.0
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.d.ts +1 -5
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +118 -226
- 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.d.ts +8 -0
- package/dist/BaseLinearDisplay/components/Tooltip.js +118 -0
- 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 -683
- 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/Header.js +70 -123
- 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 -45
- 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 -120
- 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 +226 -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 +229 -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 -399
- package/dist/LinearGenomeView/components/ScaleBar.js +121 -167
- 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 -150
- 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/VerticalGuides.d.ts +2 -3
- package/dist/LinearGenomeView/components/VerticalGuides.js +66 -104
- package/dist/LinearGenomeView/components/VerticalGuides.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 +6 -11
- package/dist/LinearGenomeView/index.js +1163 -1387
- 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 -284
- 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/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 +194 -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 +198 -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/esm/LinearGenomeView/components/TracksContainer.d.ts +10 -0
- package/esm/LinearGenomeView/components/TracksContainer.js +142 -0
- package/esm/LinearGenomeView/components/TracksContainer.js.map +1 -0
- package/esm/LinearGenomeView/components/VerticalGuides.d.ts +8 -0
- package/esm/LinearGenomeView/components/VerticalGuides.js +71 -0
- package/esm/LinearGenomeView/components/VerticalGuides.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 +288 -0
- package/esm/LinearGenomeView/index.js +1124 -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 +21 -13
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +6 -90
- 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 +107 -0
- package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +16 -8
- 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/Header.tsx +12 -16
- package/src/LinearGenomeView/components/HelpDialog.tsx +10 -9
- package/src/LinearGenomeView/components/ImportForm.tsx +24 -37
- package/src/LinearGenomeView/components/LinearGenomeView.test.js +18 -8
- package/src/LinearGenomeView/components/LinearGenomeView.tsx +20 -13
- package/src/LinearGenomeView/components/MiniControls.tsx +29 -40
- package/src/LinearGenomeView/components/OverviewRubberBand.tsx +6 -10
- package/src/LinearGenomeView/components/OverviewScaleBar.tsx +103 -93
- package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +13 -44
- package/src/LinearGenomeView/components/RubberBand.tsx +12 -17
- package/src/LinearGenomeView/components/Ruler.tsx +5 -11
- package/src/LinearGenomeView/components/ScaleBar.tsx +27 -34
- package/src/LinearGenomeView/components/SearchBox.tsx +22 -32
- package/src/LinearGenomeView/components/SearchResultsDialog.tsx +7 -7
- package/src/LinearGenomeView/components/SequenceDialog.tsx +9 -9
- package/src/LinearGenomeView/components/TrackContainer.tsx +12 -12
- package/src/LinearGenomeView/components/TrackLabel.tsx +37 -50
- package/src/LinearGenomeView/components/TracksContainer.tsx +8 -13
- package/src/LinearGenomeView/components/VerticalGuides.tsx +9 -11
- package/src/LinearGenomeView/components/ZoomControls.tsx +12 -13
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +504 -568
- package/src/LinearGenomeView/components/util.ts +43 -0
- package/src/LinearGenomeView/index.test.ts +21 -5
- package/src/LinearGenomeView/index.tsx +101 -88
- package/src/index.ts +36 -31
- 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/index.test.js +0 -1170
- package/dist/LinearGenomeView/util.test.js +0 -78
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
37
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
38
|
+
if (!m) return o;
|
|
39
|
+
var i = m.call(o), r, ar = [], e;
|
|
40
|
+
try {
|
|
41
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
42
|
+
}
|
|
43
|
+
catch (error) { e = { error: error }; }
|
|
44
|
+
finally {
|
|
45
|
+
try {
|
|
46
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
47
|
+
}
|
|
48
|
+
finally { if (e) throw e.error; }
|
|
49
|
+
}
|
|
50
|
+
return ar;
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
var react_1 = __importStar(require("react"));
|
|
54
|
+
var configuration_1 = require("@jbrowse/core/configuration");
|
|
55
|
+
var ui_1 = require("@jbrowse/core/ui");
|
|
56
|
+
var mobx_react_1 = require("mobx-react");
|
|
57
|
+
var material_1 = require("@mui/material");
|
|
58
|
+
var mui_1 = require("tss-react/mui");
|
|
59
|
+
var react_popper_1 = require("react-popper");
|
|
60
|
+
function round(value) {
|
|
61
|
+
return Math.round(value * 1e5) / 1e5;
|
|
62
|
+
}
|
|
63
|
+
var useStyles = (0, mui_1.makeStyles)()(function (theme) { return ({
|
|
64
|
+
// these styles come from
|
|
65
|
+
// https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Tooltip/Tooltip.js
|
|
66
|
+
tooltip: {
|
|
67
|
+
pointerEvents: 'none',
|
|
68
|
+
backgroundColor: (0, material_1.alpha)(theme.palette.grey[700], 0.9),
|
|
69
|
+
borderRadius: theme.shape.borderRadius,
|
|
70
|
+
color: theme.palette.common.white,
|
|
71
|
+
fontFamily: theme.typography.fontFamily,
|
|
72
|
+
padding: '4px 8px',
|
|
73
|
+
fontSize: theme.typography.pxToRem(12),
|
|
74
|
+
lineHeight: "".concat(round(14 / 10), "em"),
|
|
75
|
+
maxWidth: 300,
|
|
76
|
+
wordWrap: 'break-word',
|
|
77
|
+
},
|
|
78
|
+
}); });
|
|
79
|
+
var TooltipContents = react_1.default.forwardRef(function (_a, ref) {
|
|
80
|
+
var message = _a.message;
|
|
81
|
+
return (react_1.default.createElement("div", { ref: ref }, react_1.default.isValidElement(message) ? (message) : message ? (react_1.default.createElement(ui_1.SanitizedHTML, { html: String(message) })) : null));
|
|
82
|
+
});
|
|
83
|
+
var Tooltip = (0, mobx_react_1.observer)(function (_a) {
|
|
84
|
+
var model = _a.model, clientMouseCoord = _a.clientMouseCoord;
|
|
85
|
+
var classes = useStyles().classes;
|
|
86
|
+
var featureUnderMouse = model.featureUnderMouse;
|
|
87
|
+
var _b = __read((0, react_1.useState)(0), 2), width = _b[0], setWidth = _b[1];
|
|
88
|
+
var _c = __read((0, react_1.useState)(null), 2), popperElt = _c[0], setPopperElt = _c[1];
|
|
89
|
+
// must be memoized a la https://github.com/popperjs/react-popper/issues/391
|
|
90
|
+
var virtElement = (0, react_1.useMemo)(function () { return ({
|
|
91
|
+
getBoundingClientRect: function () {
|
|
92
|
+
var x = clientMouseCoord[0] + width / 2 + 20;
|
|
93
|
+
var y = clientMouseCoord[1];
|
|
94
|
+
return {
|
|
95
|
+
top: y,
|
|
96
|
+
left: x,
|
|
97
|
+
bottom: y,
|
|
98
|
+
right: x,
|
|
99
|
+
width: 0,
|
|
100
|
+
height: 0,
|
|
101
|
+
x: x,
|
|
102
|
+
y: y,
|
|
103
|
+
toJSON: function () { },
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
}); }, [clientMouseCoord, width]);
|
|
107
|
+
var _d = (0, react_popper_1.usePopper)(virtElement, popperElt), styles = _d.styles, attributes = _d.attributes;
|
|
108
|
+
var contents = featureUnderMouse
|
|
109
|
+
? (0, configuration_1.getConf)(model, 'mouseover', { feature: featureUnderMouse })
|
|
110
|
+
: undefined;
|
|
111
|
+
return featureUnderMouse && contents ? (react_1.default.createElement(material_1.Portal, null,
|
|
112
|
+
react_1.default.createElement("div", __assign({ ref: setPopperElt, className: classes.tooltip,
|
|
113
|
+
// zIndex needed to go over widget drawer
|
|
114
|
+
style: __assign(__assign({}, styles.popper), { zIndex: 100000 }) }, attributes.popper),
|
|
115
|
+
react_1.default.createElement(TooltipContents, { ref: function (elt) { return setWidth((elt === null || elt === void 0 ? void 0 : elt.getBoundingClientRect().width) || 0); }, message: contents })))) : null;
|
|
116
|
+
});
|
|
117
|
+
exports.default = Tooltip;
|
|
118
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/BaseLinearDisplay/components/Tooltip.tsx"],"names":[],"mappings":";;;;;;;;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AAA,uBAAO,EAAC,KAAK,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;QAC7D,CAAC,CAAC,SAAS,CAAA;IAEb,OAAO,iBAAiB,IAAI,QAAQ,CAAC,CAAC,CAAC,CACrC,8BAAC,iBAAM;QACL,gDACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,OAAO,CAAC,OAAO;YAC1B,yCAAyC;YACzC,KAAK,wBAAO,MAAM,CAAC,MAAM,KAAE,MAAM,EAAE,MAAM,OACrC,UAAU,CAAC,MAAM;YAErB,8BAAC,eAAe,IACd,GAAG,EAAE,UAAA,GAAG,IAAI,OAAA,QAAQ,CAAC,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,qBAAqB,GAAG,KAAK,KAAI,CAAC,CAAC,EAAjD,CAAiD,EAC7D,OAAO,EAAE,QAAQ,GACjB,CACE,CACC,CACV,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC,CACF,CAAA;AAED,kBAAe,OAAO,CAAA"}
|
|
@@ -1,41 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports, "
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function get() {
|
|
17
|
-
return _BaseLinearDisplay.default;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "Tooltip", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function get() {
|
|
23
|
-
return _BaseLinearDisplay.Tooltip;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(exports, "baseLinearDisplayConfigSchema", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function get() {
|
|
29
|
-
return _baseLinearDisplayConfigSchema.baseLinearDisplayConfigSchema;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
var _baseLinearDisplayConfigSchema = require("./models/baseLinearDisplayConfigSchema");
|
|
34
|
-
|
|
35
|
-
var _BaseLinearDisplayModel = require("./models/BaseLinearDisplayModel");
|
|
36
|
-
|
|
37
|
-
var _BaseLinearDisplay = _interopRequireWildcard(require("./components/BaseLinearDisplay"));
|
|
38
|
-
|
|
39
|
-
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); }
|
|
40
|
-
|
|
41
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(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; }
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Tooltip = exports.BaseLinearDisplayComponent = exports.BaseLinearDisplay = exports.baseLinearDisplayConfigSchema = void 0;
|
|
7
|
+
var baseLinearDisplayConfigSchema_1 = require("./models/baseLinearDisplayConfigSchema");
|
|
8
|
+
Object.defineProperty(exports, "baseLinearDisplayConfigSchema", { enumerable: true, get: function () { return baseLinearDisplayConfigSchema_1.baseLinearDisplayConfigSchema; } });
|
|
9
|
+
var BaseLinearDisplayModel_1 = require("./models/BaseLinearDisplayModel");
|
|
10
|
+
Object.defineProperty(exports, "BaseLinearDisplay", { enumerable: true, get: function () { return BaseLinearDisplayModel_1.BaseLinearDisplay; } });
|
|
11
|
+
var BaseLinearDisplay_1 = require("./components/BaseLinearDisplay");
|
|
12
|
+
Object.defineProperty(exports, "BaseLinearDisplayComponent", { enumerable: true, get: function () { return __importDefault(BaseLinearDisplay_1).default; } });
|
|
13
|
+
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return BaseLinearDisplay_1.Tooltip; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/BaseLinearDisplay/index.ts"],"names":[],"mappings":";;;;;;AAAA,wFAAsF;AAA7E,8IAAA,6BAA6B,OAAA;AACtC,0EAAmE;AAA1D,2HAAA,iBAAiB,OAAA;AAM1B,oEAGuC;AAFrC,gJAAA,OAAO,OAA8B;AACrC,4GAAA,OAAO,OAAA"}
|
|
@@ -74,11 +74,11 @@ export declare const BaseLinearDisplay: import("mobx-state-tree").IModelType<{
|
|
|
74
74
|
error: unknown;
|
|
75
75
|
} & {
|
|
76
76
|
readonly RenderingComponent: React.FC<{
|
|
77
|
-
model:
|
|
78
|
-
id:
|
|
79
|
-
type:
|
|
80
|
-
rpcDriverName:
|
|
81
|
-
}
|
|
77
|
+
model: {
|
|
78
|
+
id: string;
|
|
79
|
+
type: string;
|
|
80
|
+
rpcDriverName: string | undefined;
|
|
81
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
82
82
|
rendererTypeName: string;
|
|
83
83
|
error: unknown;
|
|
84
84
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
@@ -93,11 +93,11 @@ export declare const BaseLinearDisplay: import("mobx-state-tree").IModelType<{
|
|
|
93
93
|
blockState?: Record<string, any> | undefined;
|
|
94
94
|
}>;
|
|
95
95
|
readonly DisplayBlurb: React.FC<{
|
|
96
|
-
model:
|
|
97
|
-
id:
|
|
98
|
-
type:
|
|
99
|
-
rpcDriverName:
|
|
100
|
-
}
|
|
96
|
+
model: {
|
|
97
|
+
id: string;
|
|
98
|
+
type: string;
|
|
99
|
+
rpcDriverName: string | undefined;
|
|
100
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
101
101
|
rendererTypeName: string;
|
|
102
102
|
error: unknown;
|
|
103
103
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
@@ -116,7 +116,10 @@ export declare const BaseLinearDisplay: import("mobx-state-tree").IModelType<{
|
|
|
116
116
|
readonly DisplayMessageComponent: React.FC<any> | undefined;
|
|
117
117
|
trackMenuItems(): MenuItem[];
|
|
118
118
|
readonly viewMenuActions: MenuItem[];
|
|
119
|
-
regionCannotBeRendered(): undefined;
|
|
119
|
+
regionCannotBeRendered(): undefined; /**
|
|
120
|
+
* how many milliseconds to wait for the display to
|
|
121
|
+
* "settle" before re-rendering a block
|
|
122
|
+
*/
|
|
120
123
|
} & {
|
|
121
124
|
setError(error?: unknown): void;
|
|
122
125
|
setRpcDriverName(rpcDriverName: string): void;
|
|
@@ -130,7 +133,7 @@ export declare const BaseLinearDisplay: import("mobx-state-tree").IModelType<{
|
|
|
130
133
|
estimatedRegionStatsP: Promise<Stats> | undefined;
|
|
131
134
|
estimatedRegionStats: Stats | undefined;
|
|
132
135
|
} & {
|
|
133
|
-
readonly blockType: "
|
|
136
|
+
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
134
137
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
135
138
|
} & {
|
|
136
139
|
/**
|
|
@@ -206,7 +209,9 @@ export declare const BaseLinearDisplay: import("mobx-state-tree").IModelType<{
|
|
|
206
209
|
trackMenuItems(): MenuItem[];
|
|
207
210
|
contextMenuItems(): {
|
|
208
211
|
label: string;
|
|
209
|
-
icon: import("@material
|
|
212
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
213
|
+
muiName: string;
|
|
214
|
+
};
|
|
210
215
|
onClick: () => void;
|
|
211
216
|
}[];
|
|
212
217
|
renderProps(): any;
|
|
@@ -215,10 +220,10 @@ export declare const BaseLinearDisplay: import("mobx-state-tree").IModelType<{
|
|
|
215
220
|
overrideHeight: number;
|
|
216
221
|
}): Promise<JSX.Element>;
|
|
217
222
|
}, import("mobx-state-tree")._NotCustomized, {
|
|
218
|
-
id: string;
|
|
219
223
|
type: string;
|
|
220
|
-
rpcDriverName: string | undefined;
|
|
221
224
|
height: number;
|
|
225
|
+
id: string;
|
|
226
|
+
rpcDriverName: string | undefined;
|
|
222
227
|
userBpPerPxLimit: number | undefined;
|
|
223
228
|
userByteSizeLimit: number | undefined;
|
|
224
229
|
}>;
|