@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
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import Tooltip from './Tooltip';
|
|
2
3
|
import { BaseLinearDisplayModel } from '../models/BaseLinearDisplayModel';
|
|
3
|
-
declare const Tooltip: ({ model, clientMouseCoord, }: {
|
|
4
|
-
model: BaseLinearDisplayModel;
|
|
5
|
-
clientMouseCoord: Coord;
|
|
6
|
-
}) => JSX.Element | null;
|
|
7
|
-
declare type Coord = [number, number];
|
|
8
4
|
declare const BaseLinearDisplay: (props: {
|
|
9
5
|
model: BaseLinearDisplayModel;
|
|
10
6
|
children?: React.ReactNode;
|
|
@@ -1,232 +1,124 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.default = exports.Tooltip = void 0;
|
|
11
|
-
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
|
|
16
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
-
|
|
18
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
-
|
|
20
|
-
var _mobxReact = require("mobx-react");
|
|
21
|
-
|
|
22
|
-
var _core = require("@material-ui/core");
|
|
23
|
-
|
|
24
|
-
var _configuration = require("@jbrowse/core/configuration");
|
|
25
|
-
|
|
26
|
-
var _ui = require("@jbrowse/core/ui");
|
|
27
|
-
|
|
28
|
-
var _reactPopper = require("react-popper");
|
|
29
|
-
|
|
30
|
-
var _LinearBlocks = _interopRequireDefault(require("./LinearBlocks"));
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
|
-
function round(value) {
|
|
41
|
-
return Math.round(value * 1e5) / 1e5;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
var useStyles = (0, _core.makeStyles)(function (theme) {
|
|
45
|
-
return {
|
|
46
|
-
display: {
|
|
47
|
-
position: 'relative',
|
|
48
|
-
whiteSpace: 'nowrap',
|
|
49
|
-
textAlign: 'left',
|
|
50
|
-
width: '100%',
|
|
51
|
-
minHeight: '100%'
|
|
52
|
-
},
|
|
53
|
-
// these styles come from
|
|
54
|
-
// https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Tooltip/Tooltip.js
|
|
55
|
-
tooltip: {
|
|
56
|
-
pointerEvents: 'none',
|
|
57
|
-
backgroundColor: (0, _core.alpha)(theme.palette.grey[700], 0.9),
|
|
58
|
-
borderRadius: theme.shape.borderRadius,
|
|
59
|
-
color: theme.palette.common.white,
|
|
60
|
-
fontFamily: theme.typography.fontFamily,
|
|
61
|
-
padding: '4px 8px',
|
|
62
|
-
fontSize: theme.typography.pxToRem(12),
|
|
63
|
-
lineHeight: "".concat(round(14 / 10), "em"),
|
|
64
|
-
maxWidth: 300,
|
|
65
|
-
wordWrap: 'break-word'
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
var TooltipContents = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
71
|
-
var message = _ref.message;
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
-
ref: ref
|
|
74
|
-
}, message);
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
var Tooltip = (0, _mobxReact.observer)(function (_ref2) {
|
|
78
|
-
var model = _ref2.model,
|
|
79
|
-
clientMouseCoord = _ref2.clientMouseCoord;
|
|
80
|
-
var classes = useStyles();
|
|
81
|
-
var featureUnderMouse = model.featureUnderMouse;
|
|
82
|
-
|
|
83
|
-
var _useState = (0, _react.useState)(0),
|
|
84
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
85
|
-
width = _useState2[0],
|
|
86
|
-
setWidth = _useState2[1];
|
|
87
|
-
|
|
88
|
-
var _useState3 = (0, _react.useState)(null),
|
|
89
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
90
|
-
popperElt = _useState4[0],
|
|
91
|
-
setPopperElt = _useState4[1]; // must be memoized a la https://github.com/popperjs/react-popper/issues/391
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
var virtElement = (0, _react.useMemo)(function () {
|
|
95
|
-
return {
|
|
96
|
-
getBoundingClientRect: function getBoundingClientRect() {
|
|
97
|
-
var x = clientMouseCoord[0] + width / 2 + 20;
|
|
98
|
-
var y = clientMouseCoord[1];
|
|
99
|
-
return {
|
|
100
|
-
top: y,
|
|
101
|
-
left: x,
|
|
102
|
-
bottom: y,
|
|
103
|
-
right: x,
|
|
104
|
-
width: 0,
|
|
105
|
-
height: 0,
|
|
106
|
-
x: x,
|
|
107
|
-
y: y,
|
|
108
|
-
toJSON: function toJSON() {}
|
|
109
|
-
};
|
|
110
|
-
}
|
|
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;
|
|
111
10
|
};
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
ref: function ref(elt) {
|
|
130
|
-
return setWidth((elt === null || elt === void 0 ? void 0 : elt.getBoundingClientRect().width) || 0);
|
|
131
|
-
},
|
|
132
|
-
message: contents
|
|
133
|
-
}))) : null;
|
|
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;
|
|
134
28
|
});
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
offsetMouseCoord = _useState8[0],
|
|
149
|
-
setOffsetMouseCoord = _useState8[1];
|
|
150
|
-
|
|
151
|
-
var _useState9 = (0, _react.useState)([0, 0]),
|
|
152
|
-
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
153
|
-
clientMouseCoord = _useState10[0],
|
|
154
|
-
setClientMouseCoord = _useState10[1];
|
|
155
|
-
|
|
156
|
-
var _useState11 = (0, _react.useState)(),
|
|
157
|
-
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
158
|
-
contextCoord = _useState12[0],
|
|
159
|
-
setContextCoord = _useState12[1];
|
|
160
|
-
|
|
161
|
-
var model = props.model,
|
|
162
|
-
children = props.children;
|
|
163
|
-
var TooltipComponent = model.TooltipComponent,
|
|
164
|
-
DisplayMessageComponent = model.DisplayMessageComponent,
|
|
165
|
-
contextMenuItems = model.contextMenuItems,
|
|
166
|
-
height = model.height,
|
|
167
|
-
setContextMenuFeature = model.setContextMenuFeature;
|
|
168
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
169
|
-
ref: ref,
|
|
170
|
-
"data-testid": "display-".concat((0, _configuration.getConf)(model, 'displayId')),
|
|
171
|
-
className: classes.display,
|
|
172
|
-
onContextMenu: function onContextMenu(event) {
|
|
173
|
-
event.preventDefault();
|
|
174
|
-
|
|
175
|
-
if (contextCoord) {
|
|
176
|
-
// There's already a context menu open, so close it
|
|
177
|
-
setContextCoord(undefined);
|
|
178
|
-
} else if (ref.current) {
|
|
179
|
-
setContextCoord([event.clientX, event.clientY]);
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
onMouseMove: function onMouseMove(event) {
|
|
183
|
-
if (!ref.current) {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
var rect = ref.current.getBoundingClientRect();
|
|
188
|
-
var left = rect.left,
|
|
189
|
-
top = rect.top;
|
|
190
|
-
setOffsetMouseCoord([event.clientX - left, event.clientY - top]);
|
|
191
|
-
setClientMouseCoord([event.clientX, event.clientY]);
|
|
192
|
-
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);
|
|
193
42
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
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%',
|
|
226
74
|
},
|
|
227
|
-
menuItems: contextMenuItems(),
|
|
228
|
-
"data-testid": "base_linear_display_context_menu"
|
|
229
|
-
}));
|
|
230
75
|
});
|
|
231
|
-
var
|
|
232
|
-
|
|
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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"}
|
|
@@ -1,86 +1,65 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
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,EAAE;QACX,SAAS,EAAE,MAAM;QACjB,SAAS,EAAE,YAAY;QACvB,eAAe,EAAE,MAAM;QACvB,eAAe,EACb,oHAAoH;KACvH;IACD,uBAAuB,EAAE;QACvB,SAAS,EAAE,MAAM;QACjB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;KAC5C;IACD,oBAAoB,EAAE;QACpB,SAAS,EAAE,MAAM;QACjB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB;KACzD;CACF,CAAC,EAvBsC,CAuBtC,CAAC,CAAA;AAEH,IAAM,YAAY,GAAG,IAAA,qBAAQ,EAC3B,UAAC,EAAoE;QAAlE,KAAK,WAAA,EAAE,QAAQ,cAAA;IACR,IAAA,OAAO,GAAK,SAAS,EAAE,QAAhB,CAAgB;IACvB,IAAA,OAAO,GAAK,KAAK,QAAV,CAAU;IACzB,OAAO,CACL,uCAAK,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,YAAY,IAC5D,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAgCQ,oCAAY;AA9BrB,SAAS,WAAW,CAAC,EAA4B;QAA1B,KAAK,WAAA;IAClB,IAAA,OAAO,GAAK,SAAS,EAAE,QAAhB,CAAgB;IAC/B,OAAO,uCAAK,SAAS,EAAE,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,KAAK,OAAA,EAAE,GAAI,CAAA;AAClE,CAAC;AA2BsB,kCAAW;AAzBlC,SAAS,uBAAuB,CAAC,EAQhC;QAPC,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA;IAMF,IAAA,OAAO,GAAK,SAAS,EAAE,QAAhB,CAAgB;IAC/B,OAAO,CACL,uCACE,KAAK,wBACA,KAAK,KACR,KAAK,OAAA,KAEP,SAAS,EACP,QAAQ;YACN,CAAC,CAAC,OAAO,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;
|