@jbrowse/core 3.6.3 → 3.6.4
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/assemblyManager/assemblyManager.d.ts +1 -0
- package/assemblyManager/assemblyManager.js +20 -2
- package/package.json +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/CascadingMenu.js +1 -7
- package/ui/hooks.js +6 -6
- package/util/parseLineByLine.d.ts +3 -0
- package/util/parseLineByLine.js +25 -0
package/ui/CascadingMenu.js
CHANGED
|
@@ -36,13 +36,7 @@ function CascadingSubmenu({ title, Icon, inset, ...props }) {
|
|
|
36
36
|
const popupState = (0, hooks_1.usePopupState)({
|
|
37
37
|
parentPopupState,
|
|
38
38
|
});
|
|
39
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, { ...(0, hooks_1.bindFocus)(popupState),
|
|
40
|
-
if (parentPopupState === null || parentPopupState === void 0 ? void 0 : parentPopupState.childHandle) {
|
|
41
|
-
parentPopupState.childHandle.close();
|
|
42
|
-
parentPopupState.setChildHandle(undefined);
|
|
43
|
-
}
|
|
44
|
-
(0, hooks_1.bindHover)(popupState).onMouseOver(event);
|
|
45
|
-
}, children: [Icon ? ((0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(Icon, {}) })) : null, (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: title, inset: inset }), (0, jsx_runtime_1.jsx)(ChevronRight_1.default, {})] }), (0, jsx_runtime_1.jsx)(CascadingSubmenuHover, { ...props, anchorOrigin: { vertical: 'top', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'left' }, popupState: popupState })] }));
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, { ...(0, hooks_1.bindFocus)(popupState), ...(0, hooks_1.bindHover)(popupState), children: [Icon ? ((0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(Icon, {}) })) : null, (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: title, inset: inset }), (0, jsx_runtime_1.jsx)(ChevronRight_1.default, {})] }), (0, jsx_runtime_1.jsx)(CascadingSubmenuHover, { ...props, anchorOrigin: { vertical: 'top', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'left' }, popupState: popupState })] }));
|
|
46
40
|
}
|
|
47
41
|
function CascadingSubmenuHover({ popupState, onMenuItemClick, menuItems, classes, ...props }) {
|
|
48
42
|
const { rootPopupState } = (0, react_1.useContext)(CascadingContext);
|
package/ui/hooks.js
CHANGED
|
@@ -79,12 +79,12 @@ function usePopupState(arg) {
|
|
|
79
79
|
if (!parentPopupState.isOpen) {
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
parentPopupState.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
if (parentPopupState.childHandle) {
|
|
83
|
+
parentPopupState.childHandle.close();
|
|
84
|
+
}
|
|
85
|
+
parentPopupState.setChildHandle({
|
|
86
|
+
popupId,
|
|
87
|
+
close,
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
setIsOpen(true);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseLineByLine = parseLineByLine;
|
|
4
|
+
const index_1 = require("./index");
|
|
5
|
+
function parseLineByLine(buffer, lineCallback, statusCallback = () => { }) {
|
|
6
|
+
const decoder = new TextDecoder('utf8');
|
|
7
|
+
let blockStart = 0;
|
|
8
|
+
let i = 0;
|
|
9
|
+
while (blockStart < buffer.length) {
|
|
10
|
+
const n = buffer.indexOf(10, blockStart);
|
|
11
|
+
const lineEnd = n === -1 ? buffer.length : n;
|
|
12
|
+
const b = buffer.subarray(blockStart, lineEnd);
|
|
13
|
+
const line = decoder.decode(b).trim();
|
|
14
|
+
if (line) {
|
|
15
|
+
const shouldContinue = lineCallback(line, i);
|
|
16
|
+
if (shouldContinue === false) {
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (i++ % 10000 === 0) {
|
|
21
|
+
statusCallback(`Loading ${(0, index_1.getProgressDisplayStr)(blockStart, buffer.length)}`);
|
|
22
|
+
}
|
|
23
|
+
blockStart = lineEnd + 1;
|
|
24
|
+
}
|
|
25
|
+
}
|