@jbrowse/core 1.5.4 → 1.5.8
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/BaseFeatureWidget/BaseFeatureDetail.js +78 -91
- package/BaseFeatureWidget/SequenceFeatureDetails.js +57 -65
- package/BaseFeatureWidget/SequenceFeatureDetails.test.js +9 -9
- package/BaseFeatureWidget/index.js +1 -1
- package/BaseFeatureWidget/index.test.js +3 -3
- package/BaseFeatureWidget/types.js +5 -1
- package/BaseFeatureWidget/util.js +9 -13
- package/CorePlugin.js +19 -31
- package/Plugin.js +11 -13
- package/PluginLoader.js +33 -38
- package/PluginManager.js +55 -56
- package/ReExports/index.js +4 -4
- package/ReExports/list.js +2 -2
- package/ReExports/material-ui-colors.js +20 -20
- package/ReExports/modules.js +47 -51
- package/TextSearch/BaseResults.js +24 -34
- package/TextSearch/BaseResults.test.js +3 -7
- package/TextSearch/TextSearchManager.js +16 -17
- package/assemblyManager/assembly.js +34 -39
- package/assemblyManager/assemblyConfigSchema.js +2 -2
- package/assemblyManager/assemblyManager.js +16 -20
- package/assemblyManager/index.js +3 -3
- package/configuration/configurationSchema.js +17 -19
- package/configuration/configurationSlot.js +11 -11
- package/configuration/configurationSlot.test.js +5 -5
- package/configuration/util.js +5 -5
- package/data_adapters/BaseAdapter.js +38 -40
- package/data_adapters/BaseAdapter.test.js +24 -30
- package/data_adapters/CytobandAdapter.js +16 -22
- package/data_adapters/dataAdapterCache.js +9 -9
- package/package.json +3 -4
- package/pluggableElementTypes/AdapterType.js +22 -31
- package/pluggableElementTypes/ConnectionType.js +18 -28
- package/pluggableElementTypes/DisplayType.js +17 -27
- package/pluggableElementTypes/InternetAccountType.js +14 -24
- package/pluggableElementTypes/PluggableElementBase.js +8 -10
- package/pluggableElementTypes/RpcMethodType.js +41 -55
- package/pluggableElementTypes/RpcMethodType.test.js +17 -23
- package/pluggableElementTypes/TextSearchAdapterType.js +15 -25
- package/pluggableElementTypes/TrackType.js +15 -25
- package/pluggableElementTypes/ViewType.js +15 -25
- package/pluggableElementTypes/WidgetType.js +17 -27
- package/pluggableElementTypes/index.js +11 -11
- package/pluggableElementTypes/models/BaseConnectionModelFactory.js +5 -5
- package/pluggableElementTypes/models/BaseDisplayModel.js +5 -8
- package/pluggableElementTypes/models/BaseTrackModel.js +8 -11
- package/pluggableElementTypes/models/BaseViewModel.js +3 -3
- package/pluggableElementTypes/models/InternetAccountModel.js +5 -5
- package/pluggableElementTypes/models/baseConnectionConfig.js +2 -2
- package/pluggableElementTypes/models/baseTrackConfig.js +4 -7
- package/pluggableElementTypes/models/index.js +4 -4
- package/pluggableElementTypes/renderers/BoxRendererType.js +39 -49
- package/pluggableElementTypes/renderers/CircularChordRendererType.js +12 -18
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +27 -35
- package/pluggableElementTypes/renderers/FeatureRendererType.js +36 -46
- package/pluggableElementTypes/renderers/RendererType.js +21 -31
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +8 -12
- package/pluggableElementTypes/renderers/ServerSideRendererType.js +31 -44
- package/pluggableElementTypes/renderers/index.js +8 -8
- package/pluggableElementTypes/renderers/util/serializableFilterChain.js +8 -10
- package/pluggableElementTypes/renderers/util/serializableFilterChain.test.js +2 -2
- package/rpc/BaseRpcDriver.js +38 -41
- package/rpc/BaseRpcDriver.test.js +49 -63
- package/rpc/MainThreadRpcDriver.js +22 -32
- package/rpc/RpcManager.js +20 -19
- package/rpc/WebWorkerRpcDriver.js +29 -38
- package/rpc/configSchema.js +2 -2
- package/rpc/coreRpcMethods.js +72 -82
- package/rpc/remoteAbortSignals.js +3 -3
- package/ui/AboutDialog.js +17 -21
- package/ui/App.js +38 -42
- package/ui/AssemblySelector.js +5 -5
- package/ui/Drawer.js +7 -7
- package/ui/DrawerWidget.js +33 -37
- package/ui/DropDownMenu.js +9 -21
- package/ui/EditableTypography.js +19 -30
- package/ui/ErrorMessage.js +5 -5
- package/ui/FactoryResetDialog.js +8 -8
- package/ui/FatalErrorDialog.js +12 -29
- package/ui/FatalErrorDialog.test.js +11 -11
- package/ui/FileSelector/FileSelector.js +32 -42
- package/ui/FileSelector/LocalFileChooser.js +9 -9
- package/ui/FileSelector/UrlChooser.js +4 -4
- package/ui/FileSelector/index.js +4 -4
- package/ui/Icons.js +9 -9
- package/ui/Logo.js +19 -19
- package/ui/Menu.js +35 -46
- package/ui/NewSessionCards.js +19 -29
- package/ui/PrerenderedCanvas.js +10 -27
- package/ui/ResizeHandle.js +10 -17
- package/ui/SanitizedHTML.js +5 -5
- package/ui/SanitizedHTML.test.js +4 -4
- package/ui/Snackbar.js +12 -16
- package/ui/SnackbarModel.js +1 -1
- package/ui/Tooltip.js +7 -11
- package/ui/ViewContainer.js +20 -30
- package/ui/index.js +13 -17
- package/ui/theme.js +11 -15
- package/util/Base1DViewModel.js +10 -14
- package/util/Base1DViewModel.test.js +5 -5
- package/util/QuickLRU.js +27 -31
- package/util/aborting.js +16 -26
- package/util/analytics.js +7 -7
- package/util/blockTypes.js +39 -49
- package/util/calculateDynamicBlocks.js +4 -4
- package/util/calculateDynamicBlocks.test.js +10 -14
- package/util/calculateStaticBlocks.js +1 -1
- package/util/calculateStaticBlocks.test.js +15 -15
- package/util/compositeMap.js +28 -31
- package/util/idMaker.js +4 -4
- package/util/index.js +35 -48
- package/util/index.test.js +7 -11
- package/util/io/RemoteFileWithRangeCache.js +29 -41
- package/util/io/index.js +6 -6
- package/util/jexl.js +8 -5
- package/util/jexlStrings.js +2 -2
- package/util/jexlStrings.test.js +2 -2
- package/util/layouts/BaseLayout.js +5 -1
- package/util/layouts/GranularRectLayout.js +27 -33
- package/util/layouts/GranularRectLayout.test.js +10 -10
- package/util/layouts/MultiLayout.js +14 -19
- package/util/layouts/PrecomputedLayout.js +14 -16
- package/util/layouts/PrecomputedMultiLayout.js +17 -23
- package/util/layouts/SceneGraph.js +18 -18
- package/util/layouts/index.js +6 -6
- package/util/offscreenCanvasPonyfill.js +29 -31
- package/util/offscreenCanvasUtils.js +6 -6
- package/util/range.test.js +20 -20
- package/util/rxjs.js +2 -2
- package/util/simpleFeature.js +19 -24
- package/util/simpleFeature.test.js +3 -3
- package/util/stats.js +7 -11
- package/util/stats.test.js +15 -15
- package/util/types/index.js +32 -34
- package/util/types/mst.js +15 -19
- package/util/types/util.js +5 -1
- package/util/when.js +6 -6
- package/babel.config.d.ts +0 -15
- package/babel.config.js +0 -19
package/util/aborting.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"];
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -11,53 +11,43 @@ exports.isAbortException = isAbortException;
|
|
|
11
11
|
exports.makeAbortError = makeAbortError;
|
|
12
12
|
exports.observeAbortSignal = observeAbortSignal;
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _index = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/regenerator/index.js"));
|
|
15
15
|
|
|
16
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("
|
|
16
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"));
|
|
17
17
|
|
|
18
|
-
var _createClass2 = _interopRequireDefault(require("
|
|
18
|
+
var _createClass2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/createClass.js"));
|
|
19
19
|
|
|
20
|
-
var _classCallCheck2 = _interopRequireDefault(require("
|
|
20
|
+
var _classCallCheck2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/classCallCheck.js"));
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _inherits2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/inherits.js"));
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _createSuper2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/createSuper.js"));
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
29
|
-
|
|
30
|
-
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
31
|
-
|
|
32
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
26
|
+
var _wrapNativeSuper2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js"));
|
|
33
27
|
|
|
34
28
|
var _rxjs = require("rxjs");
|
|
35
29
|
|
|
36
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
37
|
-
|
|
38
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
-
|
|
40
30
|
var AbortError = /*#__PURE__*/function (_Error) {
|
|
41
|
-
(0, _inherits2
|
|
31
|
+
(0, _inherits2["default"])(AbortError, _Error);
|
|
42
32
|
|
|
43
|
-
var _super =
|
|
33
|
+
var _super = (0, _createSuper2["default"])(AbortError);
|
|
44
34
|
|
|
45
35
|
function AbortError() {
|
|
46
36
|
var _this;
|
|
47
37
|
|
|
48
|
-
(0, _classCallCheck2
|
|
38
|
+
(0, _classCallCheck2["default"])(this, AbortError);
|
|
49
39
|
|
|
50
40
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
41
|
args[_key] = arguments[_key];
|
|
52
42
|
}
|
|
53
43
|
|
|
54
44
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
55
|
-
|
|
45
|
+
_this.code = void 0;
|
|
56
46
|
return _this;
|
|
57
47
|
}
|
|
58
48
|
|
|
59
|
-
return (0, _createClass2
|
|
60
|
-
}( /*#__PURE__*/(0, _wrapNativeSuper2
|
|
49
|
+
return (0, _createClass2["default"])(AbortError);
|
|
50
|
+
}( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(Error));
|
|
61
51
|
/**
|
|
62
52
|
* properly check if the given AbortSignal is aborted.
|
|
63
53
|
* per the standard, if the signal reads as aborted,
|
|
@@ -102,8 +92,8 @@ function abortBreakPoint(_x) {
|
|
|
102
92
|
}
|
|
103
93
|
|
|
104
94
|
function _abortBreakPoint() {
|
|
105
|
-
_abortBreakPoint = (0, _asyncToGenerator2
|
|
106
|
-
return
|
|
95
|
+
_abortBreakPoint = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_index["default"].mark(function _callee(signal) {
|
|
96
|
+
return _index["default"].wrap(function _callee$(_context) {
|
|
107
97
|
while (1) {
|
|
108
98
|
switch (_context.prev = _context.next) {
|
|
109
99
|
case 0:
|
package/util/analytics.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"];
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.writeAWSAnalytics = writeAWSAnalytics;
|
|
9
9
|
exports.writeGAAnalytics = writeGAAnalytics;
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _index = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/regenerator/index.js"));
|
|
12
12
|
|
|
13
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("
|
|
13
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"));
|
|
14
14
|
|
|
15
15
|
var _configuration = require("../configuration");
|
|
16
16
|
|
|
@@ -22,9 +22,9 @@ function writeAWSAnalytics(_x, _x2, _x3) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
function _writeAWSAnalytics() {
|
|
25
|
-
_writeAWSAnalytics = (0, _asyncToGenerator2
|
|
25
|
+
_writeAWSAnalytics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_index["default"].mark(function _callee(rootModel, initialTimeStamp, sessionQuery) {
|
|
26
26
|
var url, multiAssemblyTracks, savedSessionCount, config, session, ver, tracks, assemblies, plugins, stats, qs;
|
|
27
|
-
return
|
|
27
|
+
return _index["default"].wrap(function _callee$(_context) {
|
|
28
28
|
while (1) {
|
|
29
29
|
switch (_context.prev = _context.next) {
|
|
30
30
|
case 0:
|
|
@@ -104,11 +104,11 @@ function writeGAAnalytics(_x4, _x5) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
function _writeGAAnalytics() {
|
|
107
|
-
_writeGAAnalytics = (0, _asyncToGenerator2
|
|
107
|
+
_writeGAAnalytics = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_index["default"].mark(function _callee2(rootModel, initialTimestamp) {
|
|
108
108
|
var _rootModel$jbrowse$pl;
|
|
109
109
|
|
|
110
110
|
var jbrowseUser, stats, analyticsScript, gaData, googleDimensions, analyticsScriptNode;
|
|
111
|
-
return
|
|
111
|
+
return _index["default"].wrap(function _callee2$(_context2) {
|
|
112
112
|
while (1) {
|
|
113
113
|
switch (_context2.prev = _context2.next) {
|
|
114
114
|
case 0:
|
package/util/blockTypes.js
CHANGED
|
@@ -1,40 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"];
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.InterRegionPaddingBlock = exports.ElidedBlock = exports.ContentBlock = exports.BlockSet = exports.BaseBlock = void 0;
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _inherits2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/inherits.js"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _createSuper2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/createSuper.js"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _objectSpread2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/objectSpread2.js"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _classCallCheck2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/classCallCheck.js"));
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
21
|
-
|
|
22
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
23
|
-
|
|
24
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
|
-
|
|
26
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
|
-
|
|
28
|
-
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; }
|
|
29
|
-
|
|
30
|
-
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; }
|
|
18
|
+
var _createClass2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/createClass.js"));
|
|
31
19
|
|
|
32
20
|
var BlockSet = /*#__PURE__*/function () {
|
|
33
|
-
function BlockSet(
|
|
34
|
-
|
|
21
|
+
function BlockSet() {
|
|
22
|
+
var blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
23
|
+
(0, _classCallCheck2["default"])(this, BlockSet);
|
|
24
|
+
this.blocks = blocks;
|
|
35
25
|
}
|
|
36
26
|
|
|
37
|
-
(0, _createClass2
|
|
27
|
+
(0, _createClass2["default"])(BlockSet, [{
|
|
38
28
|
key: "push",
|
|
39
29
|
value: function push(block) {
|
|
40
30
|
if (block instanceof ElidedBlock) {
|
|
@@ -130,18 +120,18 @@ var BaseBlock = /*#__PURE__*/function () {
|
|
|
130
120
|
*/
|
|
131
121
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
132
122
|
function BaseBlock(data) {
|
|
133
|
-
(0, _classCallCheck2
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
123
|
+
(0, _classCallCheck2["default"])(this, BaseBlock);
|
|
124
|
+
this.regionNumber = void 0;
|
|
125
|
+
this.reversed = void 0;
|
|
126
|
+
this.refName = void 0;
|
|
127
|
+
this.start = void 0;
|
|
128
|
+
this.end = void 0;
|
|
129
|
+
this.assemblyName = void 0;
|
|
130
|
+
this.key = void 0;
|
|
131
|
+
this.offsetPx = void 0;
|
|
132
|
+
this.widthPx = 0;
|
|
133
|
+
this.variant = void 0;
|
|
134
|
+
this.isLeftEndOfDisplayedRegion = void 0;
|
|
145
135
|
Object.assign(this, data);
|
|
146
136
|
this.assemblyName = data.assemblyName;
|
|
147
137
|
this.refName = data.refName;
|
|
@@ -159,12 +149,12 @@ var BaseBlock = /*#__PURE__*/function () {
|
|
|
159
149
|
*/
|
|
160
150
|
|
|
161
151
|
|
|
162
|
-
(0, _createClass2
|
|
152
|
+
(0, _createClass2["default"])(BaseBlock, [{
|
|
163
153
|
key: "renameReference",
|
|
164
154
|
value: function renameReference(refName) {
|
|
165
155
|
if (this.refName && refName !== this.refName) {
|
|
166
156
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
167
|
-
return new this.constructor(
|
|
157
|
+
return new this.constructor((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, this), {}, {
|
|
168
158
|
refName: refName
|
|
169
159
|
}));
|
|
170
160
|
}
|
|
@@ -189,16 +179,16 @@ var BaseBlock = /*#__PURE__*/function () {
|
|
|
189
179
|
exports.BaseBlock = BaseBlock;
|
|
190
180
|
|
|
191
181
|
var ContentBlock = /*#__PURE__*/function (_BaseBlock) {
|
|
192
|
-
(0, _inherits2
|
|
182
|
+
(0, _inherits2["default"])(ContentBlock, _BaseBlock);
|
|
193
183
|
|
|
194
|
-
var _super =
|
|
184
|
+
var _super = (0, _createSuper2["default"])(ContentBlock);
|
|
195
185
|
|
|
196
186
|
function ContentBlock() {
|
|
197
|
-
(0, _classCallCheck2
|
|
187
|
+
(0, _classCallCheck2["default"])(this, ContentBlock);
|
|
198
188
|
return _super.apply(this, arguments);
|
|
199
189
|
}
|
|
200
190
|
|
|
201
|
-
return (0, _createClass2
|
|
191
|
+
return (0, _createClass2["default"])(ContentBlock);
|
|
202
192
|
}(BaseBlock);
|
|
203
193
|
/**
|
|
204
194
|
* marker block representing one or more blocks that are
|
|
@@ -209,23 +199,23 @@ var ContentBlock = /*#__PURE__*/function (_BaseBlock) {
|
|
|
209
199
|
exports.ContentBlock = ContentBlock;
|
|
210
200
|
|
|
211
201
|
var ElidedBlock = /*#__PURE__*/function (_BaseBlock2) {
|
|
212
|
-
(0, _inherits2
|
|
202
|
+
(0, _inherits2["default"])(ElidedBlock, _BaseBlock2);
|
|
213
203
|
|
|
214
|
-
var _super2 =
|
|
204
|
+
var _super2 = (0, _createSuper2["default"])(ElidedBlock);
|
|
215
205
|
|
|
216
206
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
217
207
|
function ElidedBlock(data) {
|
|
218
208
|
var _this;
|
|
219
209
|
|
|
220
|
-
(0, _classCallCheck2
|
|
210
|
+
(0, _classCallCheck2["default"])(this, ElidedBlock);
|
|
221
211
|
_this = _super2.call(this, data);
|
|
222
|
-
|
|
223
|
-
|
|
212
|
+
_this.widthPx = void 0;
|
|
213
|
+
_this.elidedBlockCount = 0;
|
|
224
214
|
_this.widthPx = data.widthPx;
|
|
225
215
|
return _this;
|
|
226
216
|
}
|
|
227
217
|
|
|
228
|
-
(0, _createClass2
|
|
218
|
+
(0, _createClass2["default"])(ElidedBlock, [{
|
|
229
219
|
key: "push",
|
|
230
220
|
value: function push(otherBlock) {
|
|
231
221
|
this.elidedBlockCount += 1;
|
|
@@ -249,16 +239,16 @@ var ElidedBlock = /*#__PURE__*/function (_BaseBlock2) {
|
|
|
249
239
|
exports.ElidedBlock = ElidedBlock;
|
|
250
240
|
|
|
251
241
|
var InterRegionPaddingBlock = /*#__PURE__*/function (_BaseBlock3) {
|
|
252
|
-
(0, _inherits2
|
|
242
|
+
(0, _inherits2["default"])(InterRegionPaddingBlock, _BaseBlock3);
|
|
253
243
|
|
|
254
|
-
var _super3 =
|
|
244
|
+
var _super3 = (0, _createSuper2["default"])(InterRegionPaddingBlock);
|
|
255
245
|
|
|
256
246
|
function InterRegionPaddingBlock() {
|
|
257
|
-
(0, _classCallCheck2
|
|
247
|
+
(0, _classCallCheck2["default"])(this, InterRegionPaddingBlock);
|
|
258
248
|
return _super3.apply(this, arguments);
|
|
259
249
|
}
|
|
260
250
|
|
|
261
|
-
return (0, _createClass2
|
|
251
|
+
return (0, _createClass2["default"])(InterRegionPaddingBlock);
|
|
262
252
|
}(BaseBlock);
|
|
263
253
|
|
|
264
254
|
exports.InterRegionPaddingBlock = InterRegionPaddingBlock;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"];
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports["default"] = calculateDynamicBlocks;
|
|
9
9
|
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/slicedToArray.js"));
|
|
11
11
|
|
|
12
12
|
var _range = require("./range");
|
|
13
13
|
|
|
@@ -64,7 +64,7 @@ function calculateDynamicBlocks(model) {
|
|
|
64
64
|
if (displayedRegionLeftPx < windowRightPx && displayedRegionRightPx > windowLeftPx) {
|
|
65
65
|
// this displayed region overlaps the view, so make a record for it
|
|
66
66
|
var _intersection = (0, _range.intersection2)(windowLeftPx, windowRightPx, displayedRegionLeftPx, displayedRegionRightPx),
|
|
67
|
-
_intersection2 = (0, _slicedToArray2
|
|
67
|
+
_intersection2 = (0, _slicedToArray2["default"])(_intersection, 2),
|
|
68
68
|
leftPx = _intersection2[0],
|
|
69
69
|
rightPx = _intersection2[1];
|
|
70
70
|
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"];
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _objectSpread2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/objectSpread2.js"));
|
|
6
6
|
|
|
7
7
|
var _calculateDynamicBlocks = _interopRequireDefault(require("./calculateDynamicBlocks"));
|
|
8
8
|
|
|
9
|
-
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; }
|
|
10
|
-
|
|
11
|
-
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; }
|
|
12
|
-
|
|
13
9
|
var ctgA = {
|
|
14
10
|
assemblyName: 'test',
|
|
15
11
|
refName: 'ctgA',
|
|
@@ -17,7 +13,7 @@ var ctgA = {
|
|
|
17
13
|
end: 50000
|
|
18
14
|
};
|
|
19
15
|
test('one', function () {
|
|
20
|
-
expect((0, _calculateDynamicBlocks
|
|
16
|
+
expect((0, _calculateDynamicBlocks["default"])({
|
|
21
17
|
offsetPx: 0,
|
|
22
18
|
width: 200,
|
|
23
19
|
displayedRegions: [ctgA],
|
|
@@ -27,10 +23,10 @@ test('one', function () {
|
|
|
27
23
|
}).getBlocks()).toMatchSnapshot();
|
|
28
24
|
});
|
|
29
25
|
test('two', function () {
|
|
30
|
-
expect((0, _calculateDynamicBlocks
|
|
26
|
+
expect((0, _calculateDynamicBlocks["default"])({
|
|
31
27
|
offsetPx: 0,
|
|
32
28
|
width: 200,
|
|
33
|
-
displayedRegions: [
|
|
29
|
+
displayedRegions: [(0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, ctgA), {}, {
|
|
34
30
|
reversed: true
|
|
35
31
|
})],
|
|
36
32
|
bpPerPx: 1,
|
|
@@ -39,10 +35,10 @@ test('two', function () {
|
|
|
39
35
|
}).getBlocks()).toMatchSnapshot();
|
|
40
36
|
});
|
|
41
37
|
test('three', function () {
|
|
42
|
-
expect((0, _calculateDynamicBlocks
|
|
38
|
+
expect((0, _calculateDynamicBlocks["default"])({
|
|
43
39
|
offsetPx: -100,
|
|
44
40
|
width: 200,
|
|
45
|
-
displayedRegions: [
|
|
41
|
+
displayedRegions: [(0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, ctgA), {}, {
|
|
46
42
|
reversed: true
|
|
47
43
|
})],
|
|
48
44
|
bpPerPx: 1,
|
|
@@ -51,7 +47,7 @@ test('three', function () {
|
|
|
51
47
|
}).getBlocks()).toMatchSnapshot();
|
|
52
48
|
});
|
|
53
49
|
test('four', function () {
|
|
54
|
-
expect((0, _calculateDynamicBlocks
|
|
50
|
+
expect((0, _calculateDynamicBlocks["default"])({
|
|
55
51
|
offsetPx: -100,
|
|
56
52
|
width: 350,
|
|
57
53
|
displayedRegions: [ctgA],
|
|
@@ -61,10 +57,10 @@ test('four', function () {
|
|
|
61
57
|
}).getBlocks()).toMatchSnapshot();
|
|
62
58
|
});
|
|
63
59
|
test('five', function () {
|
|
64
|
-
expect((0, _calculateDynamicBlocks
|
|
60
|
+
expect((0, _calculateDynamicBlocks["default"])({
|
|
65
61
|
offsetPx: 521,
|
|
66
62
|
width: 927,
|
|
67
|
-
displayedRegions: [
|
|
63
|
+
displayedRegions: [(0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, ctgA), {}, {
|
|
68
64
|
reversed: false
|
|
69
65
|
})],
|
|
70
66
|
bpPerPx: 0.05,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("
|
|
3
|
+
var _interopRequireDefault = require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/interopRequireDefault.js")["default"];
|
|
4
4
|
|
|
5
5
|
var _calculateStaticBlocks = _interopRequireDefault(require("./calculateStaticBlocks"));
|
|
6
6
|
|
|
7
7
|
describe('block calculation', function () {
|
|
8
8
|
it('can calculate some blocks 1', function () {
|
|
9
|
-
var blocks1 = (0, _calculateStaticBlocks
|
|
9
|
+
var blocks1 = (0, _calculateStaticBlocks["default"])({
|
|
10
10
|
bpPerPx: 1,
|
|
11
11
|
width: 800,
|
|
12
12
|
offsetPx: 0,
|
|
@@ -19,7 +19,7 @@ describe('block calculation', function () {
|
|
|
19
19
|
minimumBlockWidth: 20,
|
|
20
20
|
interRegionPaddingWidth: 2
|
|
21
21
|
});
|
|
22
|
-
var blocks2 = (0, _calculateStaticBlocks
|
|
22
|
+
var blocks2 = (0, _calculateStaticBlocks["default"])({
|
|
23
23
|
bpPerPx: 1,
|
|
24
24
|
width: 800,
|
|
25
25
|
offsetPx: 0,
|
|
@@ -36,7 +36,7 @@ describe('block calculation', function () {
|
|
|
36
36
|
expect(blocks1).toEqual(blocks2);
|
|
37
37
|
});
|
|
38
38
|
it('can calculate some blocks 2', function () {
|
|
39
|
-
var blocks = (0, _calculateStaticBlocks
|
|
39
|
+
var blocks = (0, _calculateStaticBlocks["default"])({
|
|
40
40
|
bpPerPx: 1,
|
|
41
41
|
width: 800,
|
|
42
42
|
offsetPx: 30,
|
|
@@ -57,7 +57,7 @@ describe('block calculation', function () {
|
|
|
57
57
|
expect(blocks).toMatchSnapshot();
|
|
58
58
|
});
|
|
59
59
|
it('can calculate some blocks (should be empty because offscreen to the right)', function () {
|
|
60
|
-
var blockSet = (0, _calculateStaticBlocks
|
|
60
|
+
var blockSet = (0, _calculateStaticBlocks["default"])({
|
|
61
61
|
bpPerPx: 1,
|
|
62
62
|
width: 800,
|
|
63
63
|
offsetPx: 2000,
|
|
@@ -78,7 +78,7 @@ describe('block calculation', function () {
|
|
|
78
78
|
expect(blockSet.getBlocks()).toEqual([]);
|
|
79
79
|
});
|
|
80
80
|
it('can calculate some blocks (should be empty because offscreen to the left)', function () {
|
|
81
|
-
var blockSet = (0, _calculateStaticBlocks
|
|
81
|
+
var blockSet = (0, _calculateStaticBlocks["default"])({
|
|
82
82
|
bpPerPx: 1,
|
|
83
83
|
width: 800,
|
|
84
84
|
offsetPx: -2000,
|
|
@@ -99,7 +99,7 @@ describe('block calculation', function () {
|
|
|
99
99
|
expect(blockSet.getBlocks()).toEqual([]);
|
|
100
100
|
});
|
|
101
101
|
it('can calculate some blocks 5', function () {
|
|
102
|
-
var blocks = (0, _calculateStaticBlocks
|
|
102
|
+
var blocks = (0, _calculateStaticBlocks["default"])({
|
|
103
103
|
bpPerPx: 1,
|
|
104
104
|
width: 800,
|
|
105
105
|
offsetPx: 5000,
|
|
@@ -120,7 +120,7 @@ describe('block calculation', function () {
|
|
|
120
120
|
expect(blocks).toMatchSnapshot();
|
|
121
121
|
});
|
|
122
122
|
it('can calculate some blocks 6', function () {
|
|
123
|
-
var blockSet = (0, _calculateStaticBlocks
|
|
123
|
+
var blockSet = (0, _calculateStaticBlocks["default"])({
|
|
124
124
|
bpPerPx: 1,
|
|
125
125
|
width: 800,
|
|
126
126
|
offsetPx: 0,
|
|
@@ -142,7 +142,7 @@ describe('block calculation', function () {
|
|
|
142
142
|
expect(blockSet.blocks[1].offsetPx).toBe(0);
|
|
143
143
|
});
|
|
144
144
|
it('can calculate some blocks 7', function () {
|
|
145
|
-
var blocks = (0, _calculateStaticBlocks
|
|
145
|
+
var blocks = (0, _calculateStaticBlocks["default"])({
|
|
146
146
|
bpPerPx: 1,
|
|
147
147
|
width: 800,
|
|
148
148
|
offsetPx: 801,
|
|
@@ -163,7 +163,7 @@ describe('block calculation', function () {
|
|
|
163
163
|
expect(blocks).toMatchSnapshot();
|
|
164
164
|
});
|
|
165
165
|
it('can calculate some blocks 8', function () {
|
|
166
|
-
var blocks = (0, _calculateStaticBlocks
|
|
166
|
+
var blocks = (0, _calculateStaticBlocks["default"])({
|
|
167
167
|
bpPerPx: 1,
|
|
168
168
|
width: 800,
|
|
169
169
|
offsetPx: 1600,
|
|
@@ -184,7 +184,7 @@ describe('block calculation', function () {
|
|
|
184
184
|
expect(blocks).toMatchSnapshot();
|
|
185
185
|
});
|
|
186
186
|
it('can calculate some blocks 9', function () {
|
|
187
|
-
var blockSet = (0, _calculateStaticBlocks
|
|
187
|
+
var blockSet = (0, _calculateStaticBlocks["default"])({
|
|
188
188
|
width: 800,
|
|
189
189
|
offsetPx: 1069,
|
|
190
190
|
bpPerPx: 2,
|
|
@@ -205,7 +205,7 @@ describe('block calculation', function () {
|
|
|
205
205
|
expect(blockSet).toMatchSnapshot();
|
|
206
206
|
});
|
|
207
207
|
it('can calculate some blocks 10', function () {
|
|
208
|
-
var blockSet = (0, _calculateStaticBlocks
|
|
208
|
+
var blockSet = (0, _calculateStaticBlocks["default"])({
|
|
209
209
|
width: 800,
|
|
210
210
|
offsetPx: 0,
|
|
211
211
|
bpPerPx: 0.05,
|
|
@@ -230,7 +230,7 @@ describe('block calculation', function () {
|
|
|
230
230
|
});
|
|
231
231
|
describe('reverse block calculation', function () {
|
|
232
232
|
test('1', function () {
|
|
233
|
-
var blocks = (0, _calculateStaticBlocks
|
|
233
|
+
var blocks = (0, _calculateStaticBlocks["default"])({
|
|
234
234
|
bpPerPx: 1,
|
|
235
235
|
width: 800,
|
|
236
236
|
offsetPx: 0,
|
|
@@ -249,7 +249,7 @@ describe('reverse block calculation', function () {
|
|
|
249
249
|
});
|
|
250
250
|
describe('reversed displayed regions', function () {
|
|
251
251
|
test('without elided region', function () {
|
|
252
|
-
var blocks = (0, _calculateStaticBlocks
|
|
252
|
+
var blocks = (0, _calculateStaticBlocks["default"])({
|
|
253
253
|
bpPerPx: 1,
|
|
254
254
|
width: 800,
|
|
255
255
|
offsetPx: 0,
|
|
@@ -272,7 +272,7 @@ describe('reversed displayed regions', function () {
|
|
|
272
272
|
expect(blocks).toMatchSnapshot();
|
|
273
273
|
});
|
|
274
274
|
test('with elided region', function () {
|
|
275
|
-
var blocks = (0, _calculateStaticBlocks
|
|
275
|
+
var blocks = (0, _calculateStaticBlocks["default"])({
|
|
276
276
|
bpPerPx: 1,
|
|
277
277
|
width: 800,
|
|
278
278
|
offsetPx: 0,
|