@jbrowse/core 1.5.9 → 1.6.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/BaseFeatureWidget/BaseFeatureDetail.js +91 -78
- package/BaseFeatureWidget/SequenceFeatureDetails.js +64 -56
- package/BaseFeatureWidget/SequenceFeatureDetails.test.js +9 -9
- package/BaseFeatureWidget/index.js +1 -1
- package/BaseFeatureWidget/index.test.js +4 -4
- package/BaseFeatureWidget/util.js +13 -9
- package/CorePlugin.js +32 -20
- package/Plugin.js +13 -11
- package/PluginLoader.js +37 -32
- package/PluginManager.d.ts +8 -5
- package/PluginManager.js +142 -53
- package/ReExports/index.js +4 -4
- package/ReExports/list.js +2 -2
- package/ReExports/material-ui-colors.js +20 -20
- package/ReExports/modules.d.ts +7 -5
- package/ReExports/modules.js +51 -47
- package/TextSearch/BaseResults.js +34 -24
- package/TextSearch/BaseResults.test.js +7 -3
- package/TextSearch/TextSearchManager.js +16 -14
- package/assemblyManager/assembly.js +38 -33
- package/assemblyManager/assemblyConfigSchema.js +2 -2
- package/assemblyManager/assemblyManager.js +19 -15
- package/assemblyManager/index.js +3 -3
- package/babel.config.d.ts +15 -0
- package/babel.config.js +19 -0
- package/configuration/configurationSchema.js +19 -17
- package/configuration/configurationSlot.js +11 -11
- package/configuration/configurationSlot.test.js +5 -5
- package/configuration/index.d.ts +1 -0
- package/configuration/util.js +5 -5
- package/data_adapters/BaseAdapter.d.ts +15 -3
- package/data_adapters/BaseAdapter.js +215 -61
- package/data_adapters/BaseAdapter.test.js +29 -23
- package/data_adapters/CytobandAdapter.d.ts +1 -1
- package/data_adapters/CytobandAdapter.js +24 -18
- package/data_adapters/dataAdapterCache.js +8 -8
- package/package.json +3 -3
- package/pluggableElementTypes/AdapterType.js +30 -21
- package/pluggableElementTypes/ConnectionType.js +28 -18
- package/pluggableElementTypes/DisplayType.js +27 -17
- package/pluggableElementTypes/InternetAccountType.js +24 -14
- package/pluggableElementTypes/PluggableElementBase.js +10 -8
- package/pluggableElementTypes/RpcMethodType.d.ts +1 -1
- package/pluggableElementTypes/RpcMethodType.js +140 -117
- package/pluggableElementTypes/RpcMethodType.test.js +22 -16
- package/pluggableElementTypes/TextSearchAdapterType.js +25 -15
- package/pluggableElementTypes/TrackType.js +25 -15
- package/pluggableElementTypes/ViewType.js +25 -15
- package/pluggableElementTypes/WidgetType.js +27 -17
- package/pluggableElementTypes/index.js +11 -11
- package/pluggableElementTypes/models/BaseConnectionModelFactory.js +5 -5
- package/pluggableElementTypes/models/BaseDisplayModel.js +8 -5
- package/pluggableElementTypes/models/BaseTrackModel.js +11 -8
- package/pluggableElementTypes/models/BaseViewModel.js +3 -3
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +1 -1
- package/pluggableElementTypes/models/InternetAccountModel.js +4 -4
- package/pluggableElementTypes/models/baseConnectionConfig.js +2 -2
- package/pluggableElementTypes/models/baseTrackConfig.js +7 -4
- package/pluggableElementTypes/models/index.js +4 -4
- package/pluggableElementTypes/renderers/BoxRendererType.js +48 -38
- package/pluggableElementTypes/renderers/CircularChordRendererType.js +18 -12
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +34 -26
- package/pluggableElementTypes/renderers/FeatureRendererType.js +45 -35
- package/pluggableElementTypes/renderers/RendererType.js +30 -20
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +12 -8
- package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/ServerSideRendererType.js +44 -32
- package/pluggableElementTypes/renderers/index.js +8 -8
- package/pluggableElementTypes/renderers/util/serializableFilterChain.js +10 -8
- package/pluggableElementTypes/renderers/util/serializableFilterChain.test.js +2 -2
- package/rpc/BaseRpcDriver.js +42 -37
- package/rpc/BaseRpcDriver.test.js +62 -48
- package/rpc/MainThreadRpcDriver.js +31 -21
- package/rpc/RpcManager.js +18 -16
- package/rpc/WebWorkerRpcDriver.js +37 -27
- package/rpc/configSchema.js +2 -2
- package/rpc/coreRpcMethods.d.ts +16 -0
- package/rpc/coreRpcMethods.js +247 -120
- package/rpc/remoteAbortSignals.js +3 -3
- package/ui/AboutDialog.js +20 -16
- package/ui/App.js +42 -38
- package/ui/AssemblySelector.d.ts +1 -1
- package/ui/AssemblySelector.js +6 -6
- package/ui/Drawer.js +7 -7
- package/ui/DrawerWidget.d.ts +1 -1
- package/ui/DrawerWidget.js +37 -33
- package/ui/DropDownMenu.js +21 -9
- package/ui/EditableTypography.js +30 -19
- package/ui/ErrorMessage.js +5 -5
- package/ui/FactoryResetDialog.js +8 -8
- package/ui/FatalErrorDialog.js +29 -12
- package/ui/FatalErrorDialog.test.js +10 -10
- package/ui/FileSelector/FileSelector.js +42 -32
- 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 +46 -35
- package/ui/NewSessionCards.js +29 -19
- package/ui/PrerenderedCanvas.js +27 -10
- package/ui/ResizeHandle.js +17 -10
- package/ui/SanitizedHTML.js +5 -5
- package/ui/SanitizedHTML.test.js +4 -4
- package/ui/Snackbar.js +16 -12
- package/ui/SnackbarModel.js +1 -1
- package/ui/Tooltip.js +11 -7
- package/ui/ViewContainer.d.ts +2 -5
- package/ui/ViewContainer.js +44 -49
- package/ui/index.d.ts +1 -0
- package/ui/index.js +26 -13
- package/ui/theme.js +15 -11
- package/util/Base1DViewModel.d.ts +14 -12
- package/util/Base1DViewModel.js +51 -55
- package/util/Base1DViewModel.test.js +5 -5
- package/util/QuickLRU.js +30 -26
- package/util/aborting.js +25 -15
- package/util/analytics.d.ts +1 -0
- package/util/analytics.js +14 -6
- package/util/blockTypes.js +48 -36
- package/util/calculateDynamicBlocks.js +4 -4
- package/util/calculateDynamicBlocks.test.js +14 -10
- package/util/calculateStaticBlocks.js +1 -1
- package/util/calculateStaticBlocks.test.js +15 -15
- package/util/compositeMap.js +30 -26
- package/util/idMaker.js +4 -4
- package/util/index.d.ts +23 -1
- package/util/index.js +130 -36
- package/util/index.test.js +11 -7
- package/util/io/RemoteFileWithRangeCache.js +40 -28
- package/util/io/index.js +5 -5
- package/util/jexl.js +5 -5
- package/util/jexlStrings.js +2 -2
- package/util/jexlStrings.test.js +2 -2
- package/util/layouts/GranularRectLayout.js +33 -27
- package/util/layouts/GranularRectLayout.test.js +10 -10
- package/util/layouts/MultiLayout.js +19 -13
- package/util/layouts/PrecomputedLayout.js +16 -14
- package/util/layouts/PrecomputedMultiLayout.js +23 -17
- package/util/layouts/SceneGraph.js +18 -12
- package/util/layouts/index.js +6 -6
- package/util/offscreenCanvasPonyfill.js +30 -28
- package/util/offscreenCanvasUtils.js +5 -5
- package/util/range.test.js +20 -20
- package/util/rxjs.js +2 -2
- package/util/simpleFeature.js +23 -18
- package/util/simpleFeature.test.js +3 -3
- package/util/stats.d.ts +1 -1
- package/util/stats.js +10 -6
- package/util/stats.test.js +15 -15
- package/util/tracks.js +1 -3
- package/util/types/index.d.ts +1 -1
- package/util/types/index.js +36 -31
- package/util/types/mst.js +19 -15
- package/util/when.js +5 -5
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
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,
|
package/util/compositeMap.js
CHANGED
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
17
|
+
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
+
|
|
20
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
17
21
|
|
|
18
22
|
// takes an array or Map or Set (anything iterable with values()) of Maps
|
|
19
23
|
// and lets you query them as one Map
|
|
20
24
|
var CompositeMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
21
25
|
function CompositeMap(submaps) {
|
|
22
|
-
(0, _classCallCheck2
|
|
26
|
+
(0, _classCallCheck2.default)(this, CompositeMap);
|
|
23
27
|
this.submaps = submaps;
|
|
24
28
|
}
|
|
25
29
|
|
|
26
|
-
(0, _createClass2
|
|
30
|
+
(0, _createClass2.default)(CompositeMap, [{
|
|
27
31
|
key: "has",
|
|
28
32
|
value: function has(id) {
|
|
29
|
-
var _iterator = (
|
|
33
|
+
var _iterator = _createForOfIteratorHelper(this.submaps.values()),
|
|
30
34
|
_step;
|
|
31
35
|
|
|
32
36
|
try {
|
|
@@ -48,7 +52,7 @@ var CompositeMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
|
48
52
|
}, {
|
|
49
53
|
key: "get",
|
|
50
54
|
value: function get(id) {
|
|
51
|
-
var _iterator2 = (
|
|
55
|
+
var _iterator2 = _createForOfIteratorHelper(this.submaps.values()),
|
|
52
56
|
_step2;
|
|
53
57
|
|
|
54
58
|
try {
|
|
@@ -69,14 +73,14 @@ var CompositeMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
|
69
73
|
}
|
|
70
74
|
}, {
|
|
71
75
|
key: "values",
|
|
72
|
-
value: /*#__PURE__*/_regenerator
|
|
76
|
+
value: /*#__PURE__*/_regenerator.default.mark(function values() {
|
|
73
77
|
var _iterator3, _step3, key;
|
|
74
78
|
|
|
75
|
-
return _regenerator
|
|
79
|
+
return _regenerator.default.wrap(function values$(_context) {
|
|
76
80
|
while (1) {
|
|
77
81
|
switch (_context.prev = _context.next) {
|
|
78
82
|
case 0:
|
|
79
|
-
_iterator3 = (
|
|
83
|
+
_iterator3 = _createForOfIteratorHelper(this.keys());
|
|
80
84
|
_context.prev = 1;
|
|
81
85
|
|
|
82
86
|
_iterator3.s();
|
|
@@ -121,20 +125,20 @@ var CompositeMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
|
121
125
|
})
|
|
122
126
|
}, {
|
|
123
127
|
key: "keys",
|
|
124
|
-
value: /*#__PURE__*/_regenerator
|
|
128
|
+
value: /*#__PURE__*/_regenerator.default.mark(function keys() {
|
|
125
129
|
var keys, _iterator4, _step4, submap, _iterator6, _step6, key, _iterator5, _step5, _key;
|
|
126
130
|
|
|
127
|
-
return _regenerator
|
|
131
|
+
return _regenerator.default.wrap(function keys$(_context2) {
|
|
128
132
|
while (1) {
|
|
129
133
|
switch (_context2.prev = _context2.next) {
|
|
130
134
|
case 0:
|
|
131
135
|
keys = new Set();
|
|
132
|
-
_iterator4 = (
|
|
136
|
+
_iterator4 = _createForOfIteratorHelper(this.submaps.values());
|
|
133
137
|
|
|
134
138
|
try {
|
|
135
139
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
136
140
|
submap = _step4.value;
|
|
137
|
-
_iterator6 = (
|
|
141
|
+
_iterator6 = _createForOfIteratorHelper(submap.keys());
|
|
138
142
|
|
|
139
143
|
try {
|
|
140
144
|
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
@@ -153,7 +157,7 @@ var CompositeMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
|
153
157
|
_iterator4.f();
|
|
154
158
|
}
|
|
155
159
|
|
|
156
|
-
_iterator5 = (
|
|
160
|
+
_iterator5 = _createForOfIteratorHelper(keys);
|
|
157
161
|
_context2.prev = 4;
|
|
158
162
|
|
|
159
163
|
_iterator5.s();
|
|
@@ -199,14 +203,14 @@ var CompositeMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
|
199
203
|
}, {
|
|
200
204
|
key: "find",
|
|
201
205
|
value: function find(f) {
|
|
202
|
-
var _iterator7 = (
|
|
206
|
+
var _iterator7 = _createForOfIteratorHelper(this.submaps.values()),
|
|
203
207
|
_step7;
|
|
204
208
|
|
|
205
209
|
try {
|
|
206
210
|
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
207
211
|
var submap = _step7.value;
|
|
208
212
|
|
|
209
|
-
var _iterator8 = (
|
|
213
|
+
var _iterator8 = _createForOfIteratorHelper(submap.values()),
|
|
210
214
|
_step8;
|
|
211
215
|
|
|
212
216
|
try {
|
|
@@ -234,14 +238,14 @@ var CompositeMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
|
234
238
|
}
|
|
235
239
|
}, {
|
|
236
240
|
key: _Symbol$iterator,
|
|
237
|
-
value: /*#__PURE__*/_regenerator
|
|
241
|
+
value: /*#__PURE__*/_regenerator.default.mark(function value() {
|
|
238
242
|
var _iterator9, _step9, key;
|
|
239
243
|
|
|
240
|
-
return _regenerator
|
|
244
|
+
return _regenerator.default.wrap(function value$(_context3) {
|
|
241
245
|
while (1) {
|
|
242
246
|
switch (_context3.prev = _context3.next) {
|
|
243
247
|
case 0:
|
|
244
|
-
_iterator9 = (
|
|
248
|
+
_iterator9 = _createForOfIteratorHelper(this.keys());
|
|
245
249
|
_context3.prev = 1;
|
|
246
250
|
|
|
247
251
|
_iterator9.s();
|
|
@@ -286,14 +290,14 @@ var CompositeMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
|
286
290
|
})
|
|
287
291
|
}, {
|
|
288
292
|
key: "entries",
|
|
289
|
-
value: /*#__PURE__*/_regenerator
|
|
293
|
+
value: /*#__PURE__*/_regenerator.default.mark(function entries() {
|
|
290
294
|
var _iterator10, _step10, k;
|
|
291
295
|
|
|
292
|
-
return _regenerator
|
|
296
|
+
return _regenerator.default.wrap(function entries$(_context4) {
|
|
293
297
|
while (1) {
|
|
294
298
|
switch (_context4.prev = _context4.next) {
|
|
295
299
|
case 0:
|
|
296
|
-
_iterator10 = (
|
|
300
|
+
_iterator10 = _createForOfIteratorHelper(this.keys());
|
|
297
301
|
_context4.prev = 1;
|
|
298
302
|
|
|
299
303
|
_iterator10.s();
|
|
@@ -340,4 +344,4 @@ var CompositeMap = /*#__PURE__*/function (_Symbol$iterator) {
|
|
|
340
344
|
return CompositeMap;
|
|
341
345
|
}(Symbol.iterator);
|
|
342
346
|
|
|
343
|
-
exports
|
|
347
|
+
exports.default = CompositeMap;
|
package/util/idMaker.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports.default = idMaker;
|
|
9
9
|
|
|
10
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
10
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
11
|
|
|
12
12
|
var _ = require("./");
|
|
13
13
|
|
|
@@ -26,7 +26,7 @@ function idMaker(args) {
|
|
|
26
26
|
break;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
if ((0, _typeof2
|
|
29
|
+
if ((0, _typeof2.default)(args[key]) === 'object' && args[key]) {
|
|
30
30
|
id += idMaker(args[key], id);
|
|
31
31
|
} else {
|
|
32
32
|
id += "".concat(key, "-").concat(args[key], ";");
|
package/util/index.d.ts
CHANGED
|
@@ -304,6 +304,28 @@ export declare const defaultCodonTable: {
|
|
|
304
304
|
export declare function generateCodonTable(table: any): {
|
|
305
305
|
[key: string]: string;
|
|
306
306
|
};
|
|
307
|
-
export declare function updateStatus(statusMsg: string, statusCallback:
|
|
307
|
+
export declare function updateStatus<U>(statusMsg: string, statusCallback: (arg: string) => void, fn: () => U): Promise<U>;
|
|
308
308
|
export declare function hashCode(str: string): number;
|
|
309
309
|
export declare function objectHash(obj: Record<string, any>): string;
|
|
310
|
+
export declare function bytesForRegions(regions: Region[], index: any): Promise<number>;
|
|
311
|
+
export declare type ViewSnap = {
|
|
312
|
+
bpPerPx: number;
|
|
313
|
+
interRegionPaddingWidth: number;
|
|
314
|
+
minimumBlockWidth: number;
|
|
315
|
+
width: number;
|
|
316
|
+
displayedRegions: {
|
|
317
|
+
start: number;
|
|
318
|
+
end: number;
|
|
319
|
+
refName: string;
|
|
320
|
+
reversed: boolean;
|
|
321
|
+
}[];
|
|
322
|
+
};
|
|
323
|
+
export declare function viewBpToPx({ refName, coord, regionNumber, self, }: {
|
|
324
|
+
refName: string;
|
|
325
|
+
coord: number;
|
|
326
|
+
regionNumber?: number;
|
|
327
|
+
self: ViewSnap;
|
|
328
|
+
}): {
|
|
329
|
+
index: number;
|
|
330
|
+
offsetPx: number;
|
|
331
|
+
} | undefined;
|