@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,144 +1,124 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var _ui = require("@jbrowse/core/ui");
|
|
29
|
-
|
|
30
|
-
var _Tooltip = _interopRequireDefault(require("./Tooltip"));
|
|
31
|
-
|
|
32
|
-
var _LinearBlocks = _interopRequireDefault(require("./LinearBlocks"));
|
|
33
|
-
|
|
34
|
-
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); }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
// locals
|
|
39
|
-
var useStyles = (0, _core.makeStyles)({
|
|
40
|
-
display: {
|
|
41
|
-
position: 'relative',
|
|
42
|
-
whiteSpace: 'nowrap',
|
|
43
|
-
textAlign: 'left',
|
|
44
|
-
width: '100%',
|
|
45
|
-
minHeight: '100%'
|
|
46
|
-
}
|
|
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;
|
|
47
28
|
});
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
setOffsetMouseCoord = _useState4[1];
|
|
62
|
-
|
|
63
|
-
var _useState5 = (0, _react.useState)([0, 0]),
|
|
64
|
-
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
65
|
-
clientMouseCoord = _useState6[0],
|
|
66
|
-
setClientMouseCoord = _useState6[1];
|
|
67
|
-
|
|
68
|
-
var _useState7 = (0, _react.useState)(),
|
|
69
|
-
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
70
|
-
contextCoord = _useState8[0],
|
|
71
|
-
setContextCoord = _useState8[1];
|
|
72
|
-
|
|
73
|
-
var model = props.model,
|
|
74
|
-
children = props.children;
|
|
75
|
-
var TooltipComponent = model.TooltipComponent,
|
|
76
|
-
DisplayMessageComponent = model.DisplayMessageComponent,
|
|
77
|
-
contextMenuItems = model.contextMenuItems,
|
|
78
|
-
height = model.height,
|
|
79
|
-
setContextMenuFeature = model.setContextMenuFeature;
|
|
80
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
81
|
-
ref: ref,
|
|
82
|
-
"data-testid": "display-".concat((0, _configuration.getConf)(model, 'displayId')),
|
|
83
|
-
className: classes.display,
|
|
84
|
-
onContextMenu: function onContextMenu(event) {
|
|
85
|
-
event.preventDefault();
|
|
86
|
-
|
|
87
|
-
if (contextCoord) {
|
|
88
|
-
// There's already a context menu open, so close it
|
|
89
|
-
setContextCoord(undefined);
|
|
90
|
-
} else if (ref.current) {
|
|
91
|
-
setContextCoord([event.clientX, event.clientY]);
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
onMouseMove: function onMouseMove(event) {
|
|
95
|
-
if (!ref.current) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
var rect = ref.current.getBoundingClientRect();
|
|
100
|
-
var left = rect.left,
|
|
101
|
-
top = rect.top;
|
|
102
|
-
setOffsetMouseCoord([event.clientX - left, event.clientY - top]);
|
|
103
|
-
setClientMouseCoord([event.clientX, event.clientY]);
|
|
104
|
-
setClientRect(rect);
|
|
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);
|
|
105
42
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
zIndex: theme.zIndex.tooltip
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
53
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
54
|
+
};
|
|
55
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
+
exports.Tooltip = void 0;
|
|
57
|
+
var react_1 = __importStar(require("react"));
|
|
58
|
+
var mobx_react_1 = require("mobx-react");
|
|
59
|
+
var material_1 = require("@mui/material");
|
|
60
|
+
var mui_1 = require("tss-react/mui");
|
|
61
|
+
var configuration_1 = require("@jbrowse/core/configuration");
|
|
62
|
+
var ui_1 = require("@jbrowse/core/ui");
|
|
63
|
+
// locals
|
|
64
|
+
var Tooltip_1 = __importDefault(require("./Tooltip"));
|
|
65
|
+
exports.Tooltip = Tooltip_1.default;
|
|
66
|
+
var LinearBlocks_1 = __importDefault(require("./LinearBlocks"));
|
|
67
|
+
var useStyles = (0, mui_1.makeStyles)()({
|
|
68
|
+
display: {
|
|
69
|
+
position: 'relative',
|
|
70
|
+
whiteSpace: 'nowrap',
|
|
71
|
+
textAlign: 'left',
|
|
72
|
+
width: '100%',
|
|
73
|
+
minHeight: '100%',
|
|
138
74
|
},
|
|
139
|
-
menuItems: contextMenuItems(),
|
|
140
|
-
"data-testid": "base_linear_display_context_menu"
|
|
141
|
-
}));
|
|
142
75
|
});
|
|
143
|
-
var
|
|
144
|
-
|
|
76
|
+
var BaseLinearDisplay = (0, mobx_react_1.observer)(function (props) {
|
|
77
|
+
var classes = useStyles().classes;
|
|
78
|
+
var theme = (0, material_1.useTheme)();
|
|
79
|
+
var ref = (0, react_1.useRef)(null);
|
|
80
|
+
var _a = __read((0, react_1.useState)(), 2), clientRect = _a[0], setClientRect = _a[1];
|
|
81
|
+
var _b = __read((0, react_1.useState)([0, 0]), 2), offsetMouseCoord = _b[0], setOffsetMouseCoord = _b[1];
|
|
82
|
+
var _c = __read((0, react_1.useState)([0, 0]), 2), clientMouseCoord = _c[0], setClientMouseCoord = _c[1];
|
|
83
|
+
var _d = __read((0, react_1.useState)(), 2), contextCoord = _d[0], setContextCoord = _d[1];
|
|
84
|
+
var model = props.model, children = props.children;
|
|
85
|
+
var TooltipComponent = model.TooltipComponent, DisplayMessageComponent = model.DisplayMessageComponent, contextMenuItems = model.contextMenuItems, height = model.height, setContextMenuFeature = model.setContextMenuFeature;
|
|
86
|
+
return (react_1.default.createElement("div", { ref: ref, "data-testid": "display-".concat((0, configuration_1.getConf)(model, 'displayId')), className: classes.display, onContextMenu: function (event) {
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
if (contextCoord) {
|
|
89
|
+
// There's already a context menu open, so close it
|
|
90
|
+
setContextCoord(undefined);
|
|
91
|
+
}
|
|
92
|
+
else if (ref.current) {
|
|
93
|
+
setContextCoord([event.clientX, event.clientY]);
|
|
94
|
+
}
|
|
95
|
+
}, onMouseMove: function (event) {
|
|
96
|
+
if (!ref.current) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
var rect = ref.current.getBoundingClientRect();
|
|
100
|
+
var left = rect.left, top = rect.top;
|
|
101
|
+
setOffsetMouseCoord([event.clientX - left, event.clientY - top]);
|
|
102
|
+
setClientMouseCoord([event.clientX, event.clientY]);
|
|
103
|
+
setClientRect(rect);
|
|
104
|
+
} },
|
|
105
|
+
DisplayMessageComponent ? (react_1.default.createElement(DisplayMessageComponent, { model: model })) : (react_1.default.createElement(LinearBlocks_1.default, __assign({}, props))),
|
|
106
|
+
children,
|
|
107
|
+
react_1.default.createElement(TooltipComponent, { model: model, height: height, offsetMouseCoord: offsetMouseCoord, clientMouseCoord: clientMouseCoord, clientRect: clientRect, mouseCoord: offsetMouseCoord }),
|
|
108
|
+
react_1.default.createElement(ui_1.Menu, { open: Boolean(contextCoord) && Boolean(contextMenuItems().length), onMenuItemClick: function (_, callback) {
|
|
109
|
+
callback();
|
|
110
|
+
setContextCoord(undefined);
|
|
111
|
+
}, onClose: function () {
|
|
112
|
+
setContextCoord(undefined);
|
|
113
|
+
setContextMenuFeature(undefined);
|
|
114
|
+
}, TransitionProps: {
|
|
115
|
+
onExit: function () {
|
|
116
|
+
setContextCoord(undefined);
|
|
117
|
+
setContextMenuFeature(undefined);
|
|
118
|
+
},
|
|
119
|
+
}, anchorReference: "anchorPosition", anchorPosition: contextCoord
|
|
120
|
+
? { top: contextCoord[1], left: contextCoord[0] }
|
|
121
|
+
: undefined, style: { zIndex: theme.zIndex.tooltip }, menuItems: contextMenuItems(), "data-testid": "base_linear_display_context_menu" })));
|
|
122
|
+
});
|
|
123
|
+
exports.default = BaseLinearDisplay;
|
|
124
|
+
//# sourceMappingURL=BaseLinearDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseLinearDisplay.js","sourceRoot":"","sources":["../../../src/BaseLinearDisplay/components/BaseLinearDisplay.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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-
|
|
21
|
-
|
|
22
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
|
-
|
|
24
|
-
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
25
|
-
return {
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.InterRegionPaddingBlock = exports.ElidedBlock = exports.ContentBlock = void 0;
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var mui_1 = require("tss-react/mui");
|
|
20
|
+
var mobx_react_1 = require("mobx-react");
|
|
21
|
+
var useStyles = (0, mui_1.makeStyles)()(function (theme) { return ({
|
|
26
22
|
contentBlock: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
position: 'relative',
|
|
24
|
+
minHeight: '100%',
|
|
25
|
+
boxSizing: 'border-box',
|
|
26
|
+
whiteSpace: 'nowrap',
|
|
27
|
+
overflow: 'hidden',
|
|
32
28
|
},
|
|
33
29
|
elidedBlock: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
minHeight: '100%',
|
|
31
|
+
boxSizing: 'border-box',
|
|
32
|
+
backgroundColor: '#999',
|
|
33
|
+
backgroundImage: 'repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(255,255,255,.5) 1px, rgba(255,255,255,.5) 3px)',
|
|
38
34
|
},
|
|
39
35
|
interRegionPaddingBlock: {
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
minHeight: '100%',
|
|
37
|
+
backgroundColor: theme.palette.text.primary,
|
|
42
38
|
},
|
|
43
39
|
boundaryPaddingBlock: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
var ContentBlock = (0, _mobxReact.observer)(function (_ref) {
|
|
50
|
-
var block = _ref.block,
|
|
51
|
-
children = _ref.children;
|
|
52
|
-
var classes = useStyles();
|
|
53
|
-
var widthPx = block.widthPx;
|
|
54
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
-
style: {
|
|
56
|
-
width: widthPx
|
|
40
|
+
minHeight: '100%',
|
|
41
|
+
backgroundColor: theme.palette.action.disabledBackground,
|
|
57
42
|
},
|
|
58
|
-
|
|
59
|
-
|
|
43
|
+
}); });
|
|
44
|
+
var ContentBlock = (0, mobx_react_1.observer)(function (_a) {
|
|
45
|
+
var block = _a.block, children = _a.children;
|
|
46
|
+
var classes = useStyles().classes;
|
|
47
|
+
var widthPx = block.widthPx;
|
|
48
|
+
return (react_1.default.createElement("div", { style: { width: widthPx }, className: classes.contentBlock }, children));
|
|
60
49
|
});
|
|
61
50
|
exports.ContentBlock = ContentBlock;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
67
|
-
className: classes.elidedBlock,
|
|
68
|
-
style: {
|
|
69
|
-
width: width
|
|
70
|
-
}
|
|
71
|
-
});
|
|
51
|
+
function ElidedBlock(_a) {
|
|
52
|
+
var width = _a.width;
|
|
53
|
+
var classes = useStyles().classes;
|
|
54
|
+
return react_1.default.createElement("div", { className: classes.elidedBlock, style: { width: width } });
|
|
72
55
|
}
|
|
73
|
-
|
|
74
|
-
function InterRegionPaddingBlock(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}),
|
|
84
|
-
className: boundary ? classes.boundaryPaddingBlock : classes.interRegionPaddingBlock
|
|
85
|
-
});
|
|
86
|
-
}
|
|
56
|
+
exports.ElidedBlock = ElidedBlock;
|
|
57
|
+
function InterRegionPaddingBlock(_a) {
|
|
58
|
+
var boundary = _a.boundary, width = _a.width, _b = _a.style, style = _b === void 0 ? {} : _b;
|
|
59
|
+
var classes = useStyles().classes;
|
|
60
|
+
return (react_1.default.createElement("div", { style: __assign(__assign({}, style), { width: width }), className: boundary
|
|
61
|
+
? classes.boundaryPaddingBlock
|
|
62
|
+
: classes.interRegionPaddingBlock }));
|
|
63
|
+
}
|
|
64
|
+
exports.InterRegionPaddingBlock = InterRegionPaddingBlock;
|
|
65
|
+
//# sourceMappingURL=Block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Block.js","sourceRoot":"","sources":["../../../src/BaseLinearDisplay/components/Block.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAAyB;AAEzB,qCAA0C;AAC1C,yCAAqC;AAErC,IAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,UAAA,KAAK,IAAI,OAAA,CAAC;IACvC,YAAY,EAAE;QACZ,QAAQ,EAAE,UAAU;QACpB,SAAS,EAAE,MAAM;QACjB,SAAS,EAAE,YAAY;QACvB,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,QAAQ;KACnB;IACD,WAAW,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AO,CAAC,oBAAoB;YAC9B,CAAC,CAAC,OAAO,CAAC,uBAAuB,GAErC,CACH,CAAA;AACH,CAAC;AAEmC,0DAAuB"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseLinearDisplayModel } from '../models/BaseLinearDisplayModel';
|
|
3
|
-
declare const useStyles: (
|
|
3
|
+
declare const useStyles: (params: void, styleOverrides?: {
|
|
4
|
+
props: {
|
|
5
|
+
classes?: Record<string, string> | undefined;
|
|
6
|
+
} & Record<string, unknown>;
|
|
7
|
+
ownerState?: Record<string, unknown> | undefined;
|
|
8
|
+
} | undefined) => {
|
|
9
|
+
classes: Record<"linearBlocks" | "heightOverflowed", string>;
|
|
10
|
+
theme: import("@mui/material").Theme;
|
|
11
|
+
css: import("tss-react/types").Css;
|
|
12
|
+
cx: import("tss-react/types").Cx;
|
|
13
|
+
};
|
|
4
14
|
declare const RenderedBlocks: ({ model }: {
|
|
5
15
|
model: BaseLinearDisplayModel;
|
|
6
16
|
}) => JSX.Element;
|
|
@@ -1,110 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
position: 'absolute',
|
|
34
|
-
color: 'rgb(77,77,77)',
|
|
35
|
-
borderBottom: '2px solid rgb(77,77,77)',
|
|
36
|
-
textShadow: 'white 0px 0px 1px',
|
|
37
|
-
whiteSpace: 'nowrap',
|
|
38
|
-
width: '100%',
|
|
39
|
-
fontWeight: 'bold',
|
|
40
|
-
textAlign: 'center',
|
|
41
|
-
zIndex: 2000,
|
|
42
|
-
boxSizing: 'border-box'
|
|
43
|
-
}
|
|
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.useStyles = exports.RenderedBlocks = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var mui_1 = require("tss-react/mui");
|
|
9
|
+
var util_1 = require("@jbrowse/core/util");
|
|
10
|
+
var mobx_react_1 = require("mobx-react");
|
|
11
|
+
var blockTypes_1 = require("@jbrowse/core/util/blockTypes");
|
|
12
|
+
var Block_1 = require("./Block");
|
|
13
|
+
var useStyles = (0, mui_1.makeStyles)()({
|
|
14
|
+
linearBlocks: {
|
|
15
|
+
whiteSpace: 'nowrap',
|
|
16
|
+
textAlign: 'left',
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
minHeight: '100%',
|
|
19
|
+
display: 'flex',
|
|
20
|
+
},
|
|
21
|
+
heightOverflowed: {
|
|
22
|
+
position: 'absolute',
|
|
23
|
+
color: 'rgb(77,77,77)',
|
|
24
|
+
borderBottom: '2px solid rgb(77,77,77)',
|
|
25
|
+
textShadow: 'white 0px 0px 1px',
|
|
26
|
+
whiteSpace: 'nowrap',
|
|
27
|
+
width: '100%',
|
|
28
|
+
fontWeight: 'bold',
|
|
29
|
+
textAlign: 'center',
|
|
30
|
+
zIndex: 2000,
|
|
31
|
+
boxSizing: 'border-box',
|
|
32
|
+
},
|
|
44
33
|
});
|
|
45
34
|
exports.useStyles = useStyles;
|
|
46
|
-
var RenderedBlocks = (0,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
35
|
+
var RenderedBlocks = (0, mobx_react_1.observer)(function (_a) {
|
|
36
|
+
var model = _a.model;
|
|
37
|
+
var classes = useStyles().classes;
|
|
38
|
+
var blockDefinitions = model.blockDefinitions, blockState = model.blockState;
|
|
39
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, blockDefinitions.map(function (block) {
|
|
40
|
+
if (block instanceof blockTypes_1.ContentBlock) {
|
|
41
|
+
var state = blockState.get(block.key);
|
|
42
|
+
return (react_1.default.createElement(Block_1.ContentBlock, { block: block, key: "".concat(model.id, "-").concat(block.key) },
|
|
43
|
+
state && state.ReactComponent ? (react_1.default.createElement(state.ReactComponent, { model: state })) : null,
|
|
44
|
+
state && state.maxHeightReached ? (react_1.default.createElement("div", { className: classes.heightOverflowed, style: {
|
|
45
|
+
top: state.layout.getTotalHeight() - 16,
|
|
46
|
+
pointerEvents: 'none',
|
|
47
|
+
height: 16,
|
|
48
|
+
} }, "Max height reached")) : null));
|
|
49
|
+
}
|
|
50
|
+
if (block instanceof blockTypes_1.ElidedBlock) {
|
|
51
|
+
return (react_1.default.createElement(Block_1.ElidedBlock, { key: "".concat(model.id, "-").concat(block.key), width: block.widthPx }));
|
|
52
|
+
}
|
|
53
|
+
if (block instanceof blockTypes_1.InterRegionPaddingBlock) {
|
|
54
|
+
return (react_1.default.createElement(Block_1.InterRegionPaddingBlock, { key: block.key, width: block.widthPx, style: { background: 'none' }, boundary: block.variant === 'boundary' }));
|
|
65
55
|
}
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (block instanceof _blockTypes.ElidedBlock) {
|
|
70
|
-
return /*#__PURE__*/_react.default.createElement(_Block.ElidedBlock, {
|
|
71
|
-
key: "".concat(model.id, "-").concat(block.key),
|
|
72
|
-
width: block.widthPx
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (block instanceof _blockTypes.InterRegionPaddingBlock) {
|
|
77
|
-
return /*#__PURE__*/_react.default.createElement(_Block.InterRegionPaddingBlock, {
|
|
78
|
-
key: block.key,
|
|
79
|
-
width: block.widthPx,
|
|
80
|
-
style: {
|
|
81
|
-
background: 'none'
|
|
82
|
-
},
|
|
83
|
-
boundary: block.variant === 'boundary'
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
throw new Error("invalid block type ".concat((0, _typeof2.default)(block)));
|
|
88
|
-
}));
|
|
56
|
+
throw new Error("invalid block type ".concat(typeof block));
|
|
57
|
+
})));
|
|
89
58
|
});
|
|
90
59
|
exports.RenderedBlocks = RenderedBlocks;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
style: {
|
|
101
|
-
left: blockDefinitions.offsetPx - viewModel.offsetPx
|
|
102
|
-
}
|
|
103
|
-
}, /*#__PURE__*/_react.default.createElement(RenderedBlocks, {
|
|
104
|
-
model: model
|
|
105
|
-
}));
|
|
60
|
+
function LinearBlocks(_a) {
|
|
61
|
+
var model = _a.model;
|
|
62
|
+
var classes = useStyles().classes;
|
|
63
|
+
var blockDefinitions = model.blockDefinitions;
|
|
64
|
+
var viewModel = (0, util_1.getContainingView)(model);
|
|
65
|
+
return (react_1.default.createElement("div", { "data-testid": "Blockset", className: classes.linearBlocks, style: {
|
|
66
|
+
left: blockDefinitions.offsetPx - viewModel.offsetPx,
|
|
67
|
+
} },
|
|
68
|
+
react_1.default.createElement(RenderedBlocks, { model: model })));
|
|
106
69
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
exports.default = _default;
|
|
70
|
+
exports.default = (0, mobx_react_1.observer)(LinearBlocks);
|
|
71
|
+
//# sourceMappingURL=LinearBlocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinearBlocks.js","sourceRoot":"","sources":["../../../src/BaseLinearDisplay/components/LinearBlocks.tsx"],"names":[],"mappings":";;;;;;AAAA,gDAAyB;AACzB,qCAA0C;AAC1C,2CAAsD;AACtD,yCAAqC;AACrC,4DAIsC;AAGtC,iCAIgB;AAGhB,IAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC;IAC7B,YAAY,EAAE;QACZ,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,MAAM;QACjB,QAAQ,EAAE,UAAU;QACpB,SAAS,EAAE,MAAM;QACjB,OAAO,EAAE,MAAM;KAChB;IACD,gBAAgB,EAAE;QAChB,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,eAAe;QACtB,YAAY,EAAE,yBAAyB;QACvC,UAAU,EAAE,mBAAmB;QAC/B,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,YAAY;KACxB;CACF,CAAC,CAAA;AA2EuB,8BAAS;AA1ElC,IAAM,cAAc,GAAG,IAAA,qBAAQ,EAC7B,UAAC,EAA4C;QAA1C,KAAK,WAAA;IACE,IAAA,OAAO,GAAK,SAAS,EAAE,QAAhB,CAAgB;IACvB,IAAA,gBAAgB,GAAiB,KAAK,iBAAtB,EAAE,UAAU,GAAK,KAAK,WAAV,CAAU;IAC9C,OAAO,CACL,8DACG,gBAAgB,CAAC,GAAG,CAAC,UAAA,KAAK;QACzB,IAAI,KAAK,YAAY,yBAAY,EAAE;YACjC,IAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAEvC,OAAO,CACL,8BAAC,oBAAqB,IACpB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,UAAG,KAAK,CAAC,EA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