@jbrowse/core 1.5.3 → 1.5.7
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.d.ts +4 -2
- package/BaseFeatureWidget/BaseFeatureDetail.js +113 -100
- package/BaseFeatureWidget/SequenceFeatureDetails.js +59 -66
- 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.d.ts +5 -5
- package/PluginManager.js +55 -60
- 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.d.ts +1 -1
- package/TextSearch/TextSearchManager.js +15 -18
- 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.d.ts +4 -4
- package/data_adapters/BaseAdapter.js +36 -47
- 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 +7 -7
- package/pluggableElementTypes/AdapterType.js +22 -29
- package/pluggableElementTypes/ConnectionType.js +18 -26
- package/pluggableElementTypes/DisplayType.js +17 -25
- package/pluggableElementTypes/InternetAccountType.js +14 -22
- package/pluggableElementTypes/PluggableElementBase.js +9 -10
- package/pluggableElementTypes/RpcMethodType.js +40 -56
- package/pluggableElementTypes/RpcMethodType.test.js +17 -23
- package/pluggableElementTypes/TextSearchAdapterType.js +15 -23
- package/pluggableElementTypes/TrackType.js +15 -25
- package/pluggableElementTypes/ViewType.js +15 -25
- package/pluggableElementTypes/WidgetType.js +17 -25
- 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 -16
- 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.d.ts +1 -1
- package/rpc/BaseRpcDriver.js +37 -42
- package/rpc/BaseRpcDriver.test.js +49 -63
- package/rpc/MainThreadRpcDriver.js +22 -32
- package/rpc/RpcManager.d.ts +2 -2
- package/rpc/RpcManager.js +20 -25
- package/rpc/WebWorkerRpcDriver.d.ts +2 -2
- package/rpc/WebWorkerRpcDriver.js +29 -40
- 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 -24
- package/util/analytics.js +7 -7
- package/util/blockTypes.js +36 -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 +30 -41
- 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 +28 -34
- package/util/layouts/GranularRectLayout.test.js +10 -10
- package/util/layouts/MultiLayout.d.ts +1 -1
- package/util/layouts/MultiLayout.js +14 -21
- package/util/layouts/PrecomputedLayout.js +14 -16
- package/util/layouts/PrecomputedMultiLayout.js +18 -22
- package/util/layouts/SceneGraph.d.ts +3 -3
- package/util/layouts/SceneGraph.js +17 -31
- package/util/layouts/index.js +6 -6
- package/util/mst-reflection.d.ts +3 -3
- 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.d.ts +2 -0
- package/util/types/index.js +29 -36
- 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,51 +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
|
|
18
|
+
var _createClass2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/createClass.js"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _classCallCheck2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/classCallCheck.js"));
|
|
21
21
|
|
|
22
|
-
var _inherits2 = _interopRequireDefault(require("
|
|
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 _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
29
|
-
|
|
30
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
26
|
+
var _wrapNativeSuper2 = _interopRequireDefault(require("/data/jbrowse-components2/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js"));
|
|
31
27
|
|
|
32
28
|
var _rxjs = require("rxjs");
|
|
33
29
|
|
|
34
|
-
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); }; }
|
|
35
|
-
|
|
36
|
-
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; } }
|
|
37
|
-
|
|
38
30
|
var AbortError = /*#__PURE__*/function (_Error) {
|
|
39
|
-
(0, _inherits2
|
|
31
|
+
(0, _inherits2["default"])(AbortError, _Error);
|
|
40
32
|
|
|
41
|
-
var _super =
|
|
33
|
+
var _super = (0, _createSuper2["default"])(AbortError);
|
|
42
34
|
|
|
43
35
|
function AbortError() {
|
|
44
36
|
var _this;
|
|
45
37
|
|
|
46
|
-
(0, _classCallCheck2
|
|
38
|
+
(0, _classCallCheck2["default"])(this, AbortError);
|
|
47
39
|
|
|
48
40
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
49
41
|
args[_key] = arguments[_key];
|
|
50
42
|
}
|
|
51
43
|
|
|
52
44
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
53
|
-
|
|
45
|
+
_this.code = void 0;
|
|
54
46
|
return _this;
|
|
55
47
|
}
|
|
56
48
|
|
|
57
|
-
return AbortError;
|
|
58
|
-
}( /*#__PURE__*/(0, _wrapNativeSuper2
|
|
49
|
+
return (0, _createClass2["default"])(AbortError);
|
|
50
|
+
}( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(Error));
|
|
59
51
|
/**
|
|
60
52
|
* properly check if the given AbortSignal is aborted.
|
|
61
53
|
* per the standard, if the signal reads as aborted,
|
|
@@ -100,8 +92,8 @@ function abortBreakPoint(_x) {
|
|
|
100
92
|
}
|
|
101
93
|
|
|
102
94
|
function _abortBreakPoint() {
|
|
103
|
-
_abortBreakPoint = (0, _asyncToGenerator2
|
|
104
|
-
return
|
|
95
|
+
_abortBreakPoint = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_index["default"].mark(function _callee(signal) {
|
|
96
|
+
return _index["default"].wrap(function _callee$(_context) {
|
|
105
97
|
while (1) {
|
|
106
98
|
switch (_context.prev = _context.next) {
|
|
107
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,43 +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 _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
21
|
-
|
|
22
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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
21
|
function BlockSet() {
|
|
34
22
|
var blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
35
|
-
(0, _classCallCheck2
|
|
36
|
-
(0, _defineProperty2.default)(this, "blocks", []);
|
|
23
|
+
(0, _classCallCheck2["default"])(this, BlockSet);
|
|
37
24
|
this.blocks = blocks;
|
|
38
25
|
}
|
|
39
26
|
|
|
40
|
-
(0, _createClass2
|
|
27
|
+
(0, _createClass2["default"])(BlockSet, [{
|
|
41
28
|
key: "push",
|
|
42
29
|
value: function push(block) {
|
|
43
30
|
if (block instanceof ElidedBlock) {
|
|
@@ -133,18 +120,18 @@ var BaseBlock = /*#__PURE__*/function () {
|
|
|
133
120
|
*/
|
|
134
121
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
135
122
|
function BaseBlock(data) {
|
|
136
|
-
(0, _classCallCheck2
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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;
|
|
148
135
|
Object.assign(this, data);
|
|
149
136
|
this.assemblyName = data.assemblyName;
|
|
150
137
|
this.refName = data.refName;
|
|
@@ -162,12 +149,12 @@ var BaseBlock = /*#__PURE__*/function () {
|
|
|
162
149
|
*/
|
|
163
150
|
|
|
164
151
|
|
|
165
|
-
(0, _createClass2
|
|
152
|
+
(0, _createClass2["default"])(BaseBlock, [{
|
|
166
153
|
key: "renameReference",
|
|
167
154
|
value: function renameReference(refName) {
|
|
168
155
|
if (this.refName && refName !== this.refName) {
|
|
169
156
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
170
|
-
return new this.constructor(
|
|
157
|
+
return new this.constructor((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, this), {}, {
|
|
171
158
|
refName: refName
|
|
172
159
|
}));
|
|
173
160
|
}
|
|
@@ -192,16 +179,16 @@ var BaseBlock = /*#__PURE__*/function () {
|
|
|
192
179
|
exports.BaseBlock = BaseBlock;
|
|
193
180
|
|
|
194
181
|
var ContentBlock = /*#__PURE__*/function (_BaseBlock) {
|
|
195
|
-
(0, _inherits2
|
|
182
|
+
(0, _inherits2["default"])(ContentBlock, _BaseBlock);
|
|
196
183
|
|
|
197
|
-
var _super =
|
|
184
|
+
var _super = (0, _createSuper2["default"])(ContentBlock);
|
|
198
185
|
|
|
199
186
|
function ContentBlock() {
|
|
200
|
-
(0, _classCallCheck2
|
|
187
|
+
(0, _classCallCheck2["default"])(this, ContentBlock);
|
|
201
188
|
return _super.apply(this, arguments);
|
|
202
189
|
}
|
|
203
190
|
|
|
204
|
-
return ContentBlock;
|
|
191
|
+
return (0, _createClass2["default"])(ContentBlock);
|
|
205
192
|
}(BaseBlock);
|
|
206
193
|
/**
|
|
207
194
|
* marker block representing one or more blocks that are
|
|
@@ -212,23 +199,23 @@ var ContentBlock = /*#__PURE__*/function (_BaseBlock) {
|
|
|
212
199
|
exports.ContentBlock = ContentBlock;
|
|
213
200
|
|
|
214
201
|
var ElidedBlock = /*#__PURE__*/function (_BaseBlock2) {
|
|
215
|
-
(0, _inherits2
|
|
202
|
+
(0, _inherits2["default"])(ElidedBlock, _BaseBlock2);
|
|
216
203
|
|
|
217
|
-
var _super2 =
|
|
204
|
+
var _super2 = (0, _createSuper2["default"])(ElidedBlock);
|
|
218
205
|
|
|
219
206
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
220
207
|
function ElidedBlock(data) {
|
|
221
208
|
var _this;
|
|
222
209
|
|
|
223
|
-
(0, _classCallCheck2
|
|
210
|
+
(0, _classCallCheck2["default"])(this, ElidedBlock);
|
|
224
211
|
_this = _super2.call(this, data);
|
|
225
|
-
|
|
226
|
-
|
|
212
|
+
_this.widthPx = void 0;
|
|
213
|
+
_this.elidedBlockCount = 0;
|
|
227
214
|
_this.widthPx = data.widthPx;
|
|
228
215
|
return _this;
|
|
229
216
|
}
|
|
230
217
|
|
|
231
|
-
(0, _createClass2
|
|
218
|
+
(0, _createClass2["default"])(ElidedBlock, [{
|
|
232
219
|
key: "push",
|
|
233
220
|
value: function push(otherBlock) {
|
|
234
221
|
this.elidedBlockCount += 1;
|
|
@@ -252,16 +239,16 @@ var ElidedBlock = /*#__PURE__*/function (_BaseBlock2) {
|
|
|
252
239
|
exports.ElidedBlock = ElidedBlock;
|
|
253
240
|
|
|
254
241
|
var InterRegionPaddingBlock = /*#__PURE__*/function (_BaseBlock3) {
|
|
255
|
-
(0, _inherits2
|
|
242
|
+
(0, _inherits2["default"])(InterRegionPaddingBlock, _BaseBlock3);
|
|
256
243
|
|
|
257
|
-
var _super3 =
|
|
244
|
+
var _super3 = (0, _createSuper2["default"])(InterRegionPaddingBlock);
|
|
258
245
|
|
|
259
246
|
function InterRegionPaddingBlock() {
|
|
260
|
-
(0, _classCallCheck2
|
|
247
|
+
(0, _classCallCheck2["default"])(this, InterRegionPaddingBlock);
|
|
261
248
|
return _super3.apply(this, arguments);
|
|
262
249
|
}
|
|
263
250
|
|
|
264
|
-
return InterRegionPaddingBlock;
|
|
251
|
+
return (0, _createClass2["default"])(InterRegionPaddingBlock);
|
|
265
252
|
}(BaseBlock);
|
|
266
253
|
|
|
267
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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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,
|