@jbrowse/core 2.14.0 → 2.15.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/index.js +4 -35
- package/data_adapters/BaseAdapter/BaseAdapter.d.ts +2 -1
- package/data_adapters/BaseAdapter/BaseAdapter.js +2 -1
- package/package.json +4 -4
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +3 -0
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +3 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/Menu.js +10 -5
- package/ui/theme.js +5 -2
- package/util/aborting.js +1 -1
- package/util/index.js +1 -0
- package/util/rxjs.js +1 -3
package/ui/Menu.js
CHANGED
|
@@ -111,7 +111,7 @@ function findNextValidIdx(menuItems, currentIdx) {
|
|
|
111
111
|
function findPreviousValidIdx(menuItems, currentIdx) {
|
|
112
112
|
return (0, util_1.findLastIndex)(menuItems.slice(0, currentIdx), checkIfValid);
|
|
113
113
|
}
|
|
114
|
-
|
|
114
|
+
const MenuPage = react_1.default.forwardRef(function MenuPage2(props, ref) {
|
|
115
115
|
const [subMenuAnchorEl, setSubMenuAnchorEl] = (0, react_1.useState)();
|
|
116
116
|
const [openSubMenuIdx, setOpenSubMenuIdx] = (0, react_1.useState)();
|
|
117
117
|
const [isSubMenuOpen, setIsSubMenuOpen] = (0, react_1.useState)(false);
|
|
@@ -191,7 +191,9 @@ function MenuPage(props) {
|
|
|
191
191
|
menuItem.type === 'radio') {
|
|
192
192
|
endDecoration = (react_1.default.createElement(MenuItemEndDecoration, { type: menuItem.type, checked: menuItem.checked, disabled: menuItem.disabled }));
|
|
193
193
|
}
|
|
194
|
-
const onClick = 'onClick' in menuItem
|
|
194
|
+
const onClick = 'onClick' in menuItem
|
|
195
|
+
? handleClick(menuItem.onClick)
|
|
196
|
+
: undefined;
|
|
195
197
|
return (react_1.default.createElement(material_1.MenuItem, { key: menuItem.id || String(menuItem.label), style: menuItemStyle, selected: idx === selectedMenuItemIdx, onClick: onClick, onMouseMove: e => {
|
|
196
198
|
if (e.currentTarget !== document.activeElement) {
|
|
197
199
|
e.currentTarget.focus();
|
|
@@ -247,11 +249,14 @@ function MenuPage(props) {
|
|
|
247
249
|
}
|
|
248
250
|
return subMenu;
|
|
249
251
|
})));
|
|
250
|
-
return top ? (ListContents) : (
|
|
251
|
-
|
|
252
|
+
return top ? (ListContents) : (
|
|
253
|
+
// Grow is required for cascading sub-menus
|
|
254
|
+
react_1.default.createElement(material_1.Grow, { in: open, style: { transformOrigin: '0 0 0' }, ref: ref },
|
|
255
|
+
react_1.default.createElement(material_1.Paper, { elevation: 8, ref: paperRef, className: classes.paper, style: { ...position } }, ListContents)));
|
|
256
|
+
});
|
|
252
257
|
function Menu(props) {
|
|
253
258
|
const { open, onClose, menuItems, onMenuItemClick, ...other } = props;
|
|
254
|
-
return (react_1.default.createElement(material_1.Popover, { open: open, onClose: onClose,
|
|
259
|
+
return (react_1.default.createElement(material_1.Popover, { open: open, onClose: onClose, anchorOrigin: {
|
|
255
260
|
vertical: 'bottom',
|
|
256
261
|
horizontal: 'right',
|
|
257
262
|
...other.anchorOrigin,
|
package/ui/theme.js
CHANGED
|
@@ -186,8 +186,11 @@ function createJBrowseBaseTheme(theme) {
|
|
|
186
186
|
MuiAccordion: {
|
|
187
187
|
defaultProps: {
|
|
188
188
|
disableGutters: true,
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
slotProps: {
|
|
190
|
+
transition: {
|
|
191
|
+
timeout: 150,
|
|
192
|
+
unmountOnExit: true,
|
|
193
|
+
},
|
|
191
194
|
},
|
|
192
195
|
},
|
|
193
196
|
},
|
package/util/aborting.js
CHANGED
package/util/index.js
CHANGED
package/util/rxjs.js
CHANGED
|
@@ -10,10 +10,9 @@ const _1 = require(".");
|
|
|
10
10
|
* @param func - observer function, could be async
|
|
11
11
|
*/
|
|
12
12
|
function ObservableCreate(func, signal) {
|
|
13
|
-
return rxjs_1.Observable
|
|
13
|
+
return new rxjs_1.Observable((observer) => {
|
|
14
14
|
try {
|
|
15
15
|
const ret = func(observer);
|
|
16
|
-
// catch async errors
|
|
17
16
|
if (ret === null || ret === void 0 ? void 0 : ret.catch) {
|
|
18
17
|
ret.catch((error) => {
|
|
19
18
|
observer.error(error);
|
|
@@ -21,7 +20,6 @@ function ObservableCreate(func, signal) {
|
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
catch (error) {
|
|
24
|
-
// catch sync errors
|
|
25
23
|
observer.error(error);
|
|
26
24
|
}
|
|
27
25
|
}).pipe((0, operators_1.takeUntil)((0, _1.observeAbortSignal)(signal)));
|