@jbrowse/app-core 3.7.0 → 4.0.1
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/esm/AppFocus/index.d.ts +3 -3
- package/esm/AppFocus/index.js +1 -1
- package/esm/Assemblies/SessionAssembliesMixin.d.ts +47 -22
- package/esm/Assemblies/SessionAssembliesMixin.js +11 -1
- package/esm/Assemblies/TemporaryAssembliesMixin.d.ts +5 -3
- package/esm/Assemblies/TemporaryAssembliesMixin.js +11 -1
- package/esm/Assemblies/index.d.ts +2 -2
- package/esm/Assemblies/index.js +2 -2
- package/esm/DockviewLayout/index.d.ts +26 -0
- package/esm/DockviewLayout/index.js +107 -0
- package/esm/HistoryManagement/index.d.ts +7 -7
- package/esm/HistoryManagement/index.js +5 -6
- package/esm/JBrowseConfig/RootConfiguration.d.ts +15 -15
- package/esm/JBrowseConfig/index.d.ts +35 -25
- package/esm/JBrowseConfig/index.js +3 -3
- package/esm/JBrowseModel/index.d.ts +52 -34
- package/esm/JBrowseModel/index.js +15 -6
- package/esm/RootMenu/index.d.ts +3 -3
- package/esm/RootMenu/index.js +1 -1
- package/esm/index.d.ts +9 -8
- package/esm/index.js +9 -8
- package/esm/ui/App/App.d.ts +1 -1
- package/esm/ui/App/App.js +8 -8
- package/esm/ui/App/AppFab.js +2 -2
- package/esm/ui/App/AppToolbar.d.ts +1 -1
- package/esm/ui/App/AppToolbar.js +17 -3
- package/esm/ui/App/ClassicViewsContainer.d.ts +12 -0
- package/esm/ui/App/ClassicViewsContainer.js +21 -0
- package/esm/ui/App/DialogQueue.d.ts +2 -2
- package/esm/ui/App/DialogQueue.js +1 -1
- package/esm/ui/App/DockviewContext.d.ts +15 -0
- package/esm/ui/App/DockviewContext.js +21 -0
- package/esm/ui/App/DockviewLeftHeaderActions.d.ts +2 -0
- package/esm/ui/App/DockviewLeftHeaderActions.js +58 -0
- package/esm/ui/App/DockviewRightHeaderActions.d.ts +2 -0
- package/esm/ui/App/DockviewRightHeaderActions.js +100 -0
- package/esm/ui/App/Drawer.js +4 -5
- package/esm/ui/App/DrawerControls.js +1 -1
- package/esm/ui/App/DrawerHeader.js +16 -8
- package/{dist/ui/App/Drawer.d.ts → esm/ui/App/DrawerHeaderHelpButton.d.ts} +3 -3
- package/esm/ui/App/DrawerHeaderHelpButton.js +18 -0
- package/esm/ui/App/DrawerHeaderHelpDialog.d.ts +4 -0
- package/esm/ui/App/DrawerHeaderHelpDialog.js +15 -0
- package/esm/ui/App/DrawerWidget.js +4 -4
- package/esm/ui/App/DrawerWidgetSelector.js +3 -3
- package/esm/ui/App/JBrowseTabMenu.d.ts +5 -0
- package/esm/ui/App/JBrowseTabMenu.js +39 -0
- package/esm/ui/App/JBrowseViewPanel.d.ts +8 -0
- package/esm/ui/App/JBrowseViewPanel.js +49 -0
- package/esm/ui/App/JBrowseViewTab.d.ts +8 -0
- package/esm/ui/App/JBrowseViewTab.js +106 -0
- package/esm/ui/App/ModalWidget.js +3 -3
- package/esm/ui/App/TiledViewsContainer.d.ts +7 -0
- package/esm/ui/App/TiledViewsContainer.js +251 -0
- package/{dist/ui/App/ViewHeader.d.ts → esm/ui/App/ViewButtons.d.ts} +2 -3
- package/esm/ui/App/ViewButtons.js +17 -0
- package/esm/ui/App/ViewContainer.js +7 -8
- package/esm/ui/App/ViewContainerTitle.js +3 -4
- package/esm/ui/App/ViewHeader.js +7 -16
- package/esm/ui/App/ViewLauncher.d.ts +1 -1
- package/esm/ui/App/ViewLauncher.js +3 -4
- package/esm/ui/App/ViewMenu.d.ts +1 -1
- package/esm/ui/App/ViewMenu.js +113 -54
- package/esm/ui/App/ViewWrapper.js +1 -1
- package/esm/ui/App/ViewsContainer.d.ts +2 -2
- package/esm/ui/App/ViewsContainer.js +8 -6
- package/esm/ui/App/copyView.d.ts +1 -0
- package/esm/ui/App/copyView.js +29 -0
- package/esm/ui/App/dockviewUtils.d.ts +44 -0
- package/esm/ui/App/dockviewUtils.js +45 -0
- package/esm/ui/App/index.d.ts +2 -1
- package/esm/ui/App/index.js +2 -1
- package/esm/ui/App/types.d.ts +7 -0
- package/esm/ui/App/types.js +1 -0
- package/esm/ui/index.d.ts +1 -1
- package/esm/ui/index.js +1 -1
- package/package.json +27 -32
- package/dist/AppFocus/index.d.ts +0 -5
- package/dist/AppFocus/index.js +0 -15
- package/dist/Assemblies/SessionAssembliesMixin.d.ts +0 -67
- package/dist/Assemblies/SessionAssembliesMixin.js +0 -46
- package/dist/Assemblies/TemporaryAssembliesMixin.d.ts +0 -8
- package/dist/Assemblies/TemporaryAssembliesMixin.js +0 -30
- package/dist/Assemblies/index.d.ts +0 -2
- package/dist/Assemblies/index.js +0 -18
- package/dist/HistoryManagement/index.d.ts +0 -23
- package/dist/HistoryManagement/index.js +0 -47
- package/dist/JBrowseConfig/RootConfiguration.d.ts +0 -102
- package/dist/JBrowseConfig/RootConfiguration.js +0 -46
- package/dist/JBrowseConfig/index.d.ts +0 -115
- package/dist/JBrowseConfig/index.js +0 -26
- package/dist/JBrowseModel/index.d.ts +0 -142
- package/dist/JBrowseModel/index.js +0 -101
- package/dist/RootMenu/index.d.ts +0 -13
- package/dist/RootMenu/index.js +0 -74
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -24
- package/dist/menus.d.ts +0 -74
- package/dist/menus.js +0 -108
- package/dist/ui/App/App.d.ts +0 -18
- package/dist/ui/App/App.js +0 -82
- package/dist/ui/App/AppFab.d.ts +0 -5
- package/dist/ui/App/AppFab.js +0 -32
- package/dist/ui/App/AppToolbar.d.ts +0 -18
- package/dist/ui/App/AppToolbar.js +0 -44
- package/dist/ui/App/DialogQueue.d.ts +0 -5
- package/dist/ui/App/DialogQueue.js +0 -10
- package/dist/ui/App/Drawer.js +0 -51
- package/dist/ui/App/DrawerControls.d.ts +0 -5
- package/dist/ui/App/DrawerControls.js +0 -30
- package/dist/ui/App/DrawerHeader.d.ts +0 -7
- package/dist/ui/App/DrawerHeader.js +0 -37
- package/dist/ui/App/DrawerWidget.d.ts +0 -5
- package/dist/ui/App/DrawerWidget.js +0 -65
- package/dist/ui/App/DrawerWidgetSelector.d.ts +0 -5
- package/dist/ui/App/DrawerWidgetSelector.js +0 -52
- package/dist/ui/App/ModalWidget.d.ts +0 -6
- package/dist/ui/App/ModalWidget.js +0 -53
- package/dist/ui/App/ViewContainer.d.ts +0 -6
- package/dist/ui/App/ViewContainer.js +0 -55
- package/dist/ui/App/ViewContainerTitle.d.ts +0 -5
- package/dist/ui/App/ViewContainerTitle.js +0 -44
- package/dist/ui/App/ViewHeader.js +0 -60
- package/dist/ui/App/ViewLauncher.d.ts +0 -11
- package/dist/ui/App/ViewLauncher.js +0 -29
- package/dist/ui/App/ViewMenu.d.ts +0 -8
- package/dist/ui/App/ViewMenu.js +0 -74
- package/dist/ui/App/ViewWrapper.d.ts +0 -6
- package/dist/ui/App/ViewWrapper.js +0 -23
- package/dist/ui/App/ViewsContainer.d.ts +0 -12
- package/dist/ui/App/ViewsContainer.js +0 -57
- package/dist/ui/App/index.d.ts +0 -1
- package/dist/ui/App/index.js +0 -17
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.js +0 -17
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense, lazy } from 'react';
|
|
3
|
+
import { makeStyles } from '@jbrowse/core/util/tss-react';
|
|
3
4
|
import { observer } from 'mobx-react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const ViewLauncher = lazy(() => import(
|
|
5
|
+
const ClassicViewsContainer = lazy(() => import("./ClassicViewsContainer.js"));
|
|
6
|
+
const TiledViewsContainer = lazy(() => import("./TiledViewsContainer.js"));
|
|
7
|
+
const ViewLauncher = lazy(() => import("./ViewLauncher.js"));
|
|
7
8
|
const useStyles = makeStyles()({
|
|
8
9
|
viewsContainer: {
|
|
9
|
-
overflowY: 'auto',
|
|
10
10
|
gridRow: 'components',
|
|
11
|
+
overflow: 'hidden',
|
|
11
12
|
},
|
|
12
13
|
});
|
|
13
14
|
const ViewsContainer = observer(function ViewsContainer(props) {
|
|
14
15
|
const { session } = props;
|
|
15
16
|
const { views } = session;
|
|
16
17
|
const { classes } = useStyles();
|
|
17
|
-
|
|
18
|
+
const useWorkspaces = 'useWorkspaces' in session ? session.useWorkspaces : true;
|
|
19
|
+
return (_jsx("div", { className: classes.viewsContainer, children: views.length > 0 ? (_jsx(Suspense, { fallback: null, children: useWorkspaces ? (_jsx(TiledViewsContainer, { session: session })) : (_jsx(ClassicViewsContainer, { session: session })) })) : (_jsx(Suspense, { fallback: null, children: _jsx(ViewLauncher, { ...props }) })) }));
|
|
18
20
|
});
|
|
19
21
|
export default ViewsContainer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function renameIds(obj: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { nanoid } from '@jbrowse/core/util/nanoid';
|
|
2
|
+
export function renameIds(obj) {
|
|
3
|
+
const idMap = new Map();
|
|
4
|
+
function transformIds(value) {
|
|
5
|
+
if (value === null || value === undefined) {
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
if (Array.isArray(value)) {
|
|
9
|
+
return value.map(transformIds);
|
|
10
|
+
}
|
|
11
|
+
if (typeof value === 'object') {
|
|
12
|
+
const result = {};
|
|
13
|
+
for (const [key, val] of Object.entries(value)) {
|
|
14
|
+
if (key === 'id' && typeof val === 'string') {
|
|
15
|
+
if (!idMap.has(val)) {
|
|
16
|
+
idMap.set(val, nanoid());
|
|
17
|
+
}
|
|
18
|
+
result[key] = `${val}-${idMap.get(val)}`;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
result[key] = transformIds(val);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
return transformIds(obj);
|
|
29
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { DockviewSessionType } from './types.ts';
|
|
2
|
+
import type { DockviewApi } from 'dockview-react';
|
|
3
|
+
export declare function createPanelConfig(panelId: string, session: DockviewSessionType, title?: string): {
|
|
4
|
+
id: string;
|
|
5
|
+
component: "jbrowseView";
|
|
6
|
+
tabComponent: "jbrowseTab";
|
|
7
|
+
title: string;
|
|
8
|
+
params: {
|
|
9
|
+
panelId: string;
|
|
10
|
+
session: DockviewSessionType;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare function cleanLayoutForStorage(layout: ReturnType<DockviewApi['toJSON']>): {
|
|
14
|
+
panels: {
|
|
15
|
+
[k: string]: {
|
|
16
|
+
params: {};
|
|
17
|
+
id: string;
|
|
18
|
+
contentComponent?: string;
|
|
19
|
+
tabComponent?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
renderer?: import("dockview-core").DockviewPanelRenderer;
|
|
22
|
+
minimumWidth?: number;
|
|
23
|
+
minimumHeight?: number;
|
|
24
|
+
maximumWidth?: number;
|
|
25
|
+
maximumHeight?: number;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
grid: {
|
|
29
|
+
root: import("dockview-core").SerializedGridObject<import("dockview-core/dist/cjs/dockview/dockviewGroupPanelModel").GroupPanelViewState>;
|
|
30
|
+
height: number;
|
|
31
|
+
width: number;
|
|
32
|
+
orientation: import("dockview-core").Orientation;
|
|
33
|
+
};
|
|
34
|
+
activeGroup?: string;
|
|
35
|
+
floatingGroups?: import("dockview-core").SerializedFloatingGroup[];
|
|
36
|
+
popoutGroups?: import("dockview-core").SerializedPopoutGroup[];
|
|
37
|
+
};
|
|
38
|
+
export declare function updatePanelParams(api: DockviewApi, session: DockviewSessionType): void;
|
|
39
|
+
export declare function rearrangePanelsWithDirection(api: DockviewApi, getPosition: (idx: number, panelStates: {
|
|
40
|
+
id: string;
|
|
41
|
+
}[]) => {
|
|
42
|
+
referencePanel: string;
|
|
43
|
+
direction: 'right' | 'below' | 'within';
|
|
44
|
+
} | undefined): void;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export function createPanelConfig(panelId, session, title = 'Main') {
|
|
2
|
+
return {
|
|
3
|
+
id: panelId,
|
|
4
|
+
component: 'jbrowseView',
|
|
5
|
+
tabComponent: 'jbrowseTab',
|
|
6
|
+
title,
|
|
7
|
+
params: { panelId, session },
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export function cleanLayoutForStorage(layout) {
|
|
11
|
+
return {
|
|
12
|
+
...layout,
|
|
13
|
+
panels: Object.fromEntries(Object.entries(layout.panels).map(([id, panel]) => [
|
|
14
|
+
id,
|
|
15
|
+
{ ...panel, params: {} },
|
|
16
|
+
])),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function updatePanelParams(api, session) {
|
|
20
|
+
for (const panel of api.panels) {
|
|
21
|
+
panel.update({ params: { panelId: panel.id, session } });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export function rearrangePanelsWithDirection(api, getPosition) {
|
|
25
|
+
const panels = api.panels;
|
|
26
|
+
if (panels.length <= 1) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const panelStates = panels.map(p => ({
|
|
30
|
+
id: p.id,
|
|
31
|
+
component: 'jbrowseView',
|
|
32
|
+
tabComponent: 'jbrowseTab',
|
|
33
|
+
title: p.title,
|
|
34
|
+
params: p.params,
|
|
35
|
+
}));
|
|
36
|
+
for (const p of panels) {
|
|
37
|
+
api.removePanel(p);
|
|
38
|
+
}
|
|
39
|
+
for (const [idx, state] of panelStates.entries()) {
|
|
40
|
+
api.addPanel({
|
|
41
|
+
...state,
|
|
42
|
+
position: getPosition(idx, panelStates),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
package/esm/ui/App/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './App';
|
|
1
|
+
export * from './App.tsx';
|
|
2
|
+
export { default as DialogQueue } from './DialogQueue.tsx';
|
package/esm/ui/App/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./App.js";
|
|
2
|
+
export { default as DialogQueue } from "./DialogQueue.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SnackbarMessage } from '@jbrowse/core/ui/SnackbarModel';
|
|
2
|
+
import type { AbstractViewContainer, SessionWithFocusedViewAndDrawerWidgets } from '@jbrowse/core/util';
|
|
3
|
+
export type DockviewSessionType = SessionWithFocusedViewAndDrawerWidgets & AbstractViewContainer & {
|
|
4
|
+
renameCurrentSession: (arg: string) => void;
|
|
5
|
+
snackbarMessages: SnackbarMessage[];
|
|
6
|
+
popSnackbarMessage: () => unknown;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/ui/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './App';
|
|
1
|
+
export * from './App/index.ts';
|
package/esm/ui/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./App/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/app-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "JBrowse 2 code shared between the 'full featured' apps e.g. jbrowse-web and jbrowse-desktop",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -18,39 +18,20 @@
|
|
|
18
18
|
"directory": "packages/app-core"
|
|
19
19
|
},
|
|
20
20
|
"author": "JBrowse Team",
|
|
21
|
-
"
|
|
22
|
-
"distModule": "esm/index.js",
|
|
23
|
-
"srcMain": "src/index.ts",
|
|
24
|
-
"srcModule": "src/index.ts",
|
|
25
|
-
"main": "dist/index.js",
|
|
26
|
-
"module": "esm/index.js",
|
|
21
|
+
"main": "esm/index.js",
|
|
27
22
|
"files": [
|
|
28
|
-
"dist",
|
|
29
23
|
"esm"
|
|
30
24
|
],
|
|
31
|
-
"scripts": {
|
|
32
|
-
"build:esm": "tsc --build tsconfig.build.esm.json",
|
|
33
|
-
"build:commonjs": "tsc --build tsconfig.build.commonjs.json",
|
|
34
|
-
"build": "npm run build:esm && npm run build:commonjs",
|
|
35
|
-
"test": "cd ../..; jest --passWithNoTests packages/app-core",
|
|
36
|
-
"clean": "rimraf dist esm *.tsbuildinfo",
|
|
37
|
-
"prebuild": "yarn clean",
|
|
38
|
-
"prepack": "yarn build && yarn useDist",
|
|
39
|
-
"postpack": "yarn useSrc",
|
|
40
|
-
"useDist": "node ../../scripts/useDist.js",
|
|
41
|
-
"useSrc": "node ../../scripts/useSrc.js"
|
|
42
|
-
},
|
|
43
25
|
"dependencies": {
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@mui/
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"mobx": "^6.
|
|
50
|
-
"mobx-react": "^9.
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"tss-react": "^4.0.0"
|
|
26
|
+
"@jbrowse/mobx-state-tree": "^5.5.0",
|
|
27
|
+
"@mui/icons-material": "^7.3.6",
|
|
28
|
+
"@mui/material": "^7.3.6",
|
|
29
|
+
"dockview-core": "^4.13.1",
|
|
30
|
+
"dockview-react": "^4.13.1",
|
|
31
|
+
"mobx": "^6.15.0",
|
|
32
|
+
"mobx-react": "^9.2.1",
|
|
33
|
+
"@jbrowse/core": "^4.0.1",
|
|
34
|
+
"@jbrowse/product-core": "^4.0.1"
|
|
54
35
|
},
|
|
55
36
|
"peerDependencies": {
|
|
56
37
|
"react": ">=18.0.0",
|
|
@@ -59,5 +40,19 @@
|
|
|
59
40
|
"publishConfig": {
|
|
60
41
|
"access": "public"
|
|
61
42
|
},
|
|
62
|
-
"
|
|
63
|
-
|
|
43
|
+
"sideEffects": false,
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build:esm": "tsc -p tsconfig.build.esm.json",
|
|
46
|
+
"build": "pnpm build:esm",
|
|
47
|
+
"test": "cd ../..; jest --passWithNoTests packages/app-core",
|
|
48
|
+
"clean": "rimraf esm *.tsbuildinfo",
|
|
49
|
+
"prebuild": "pnpm clean"
|
|
50
|
+
},
|
|
51
|
+
"types": "esm/index.d.ts",
|
|
52
|
+
"exports": {
|
|
53
|
+
".": {
|
|
54
|
+
"types": "./esm/index.d.ts",
|
|
55
|
+
"import": "./esm/index.js"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
package/dist/AppFocus/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function AppFocusMixin(): import("mobx-state-tree").IModelType<{
|
|
2
|
-
focusedViewId: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
3
|
-
}, {
|
|
4
|
-
setFocusedViewId(viewId: string): void;
|
|
5
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
package/dist/AppFocus/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppFocusMixin = AppFocusMixin;
|
|
4
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
-
function AppFocusMixin() {
|
|
6
|
-
return mobx_state_tree_1.types
|
|
7
|
-
.model({
|
|
8
|
-
focusedViewId: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
9
|
-
})
|
|
10
|
-
.actions(self => ({
|
|
11
|
-
setFocusedViewId(viewId) {
|
|
12
|
-
self.focusedViewId = viewId;
|
|
13
|
-
},
|
|
14
|
-
}));
|
|
15
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
import type { BaseAssemblyConfigSchema } from '@jbrowse/core/assemblyManager';
|
|
3
|
-
import type { AnyConfiguration } from '@jbrowse/core/configuration';
|
|
4
|
-
export declare function SessionAssembliesMixin(pluginManager: PluginManager, assemblyConfigSchemasType: BaseAssemblyConfigSchema): import("mobx-state-tree").IModelType<{
|
|
5
|
-
sessionAssemblies: import("mobx-state-tree").IArrayType<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
|
-
aliases: {
|
|
7
|
-
type: string;
|
|
8
|
-
defaultValue: never[];
|
|
9
|
-
description: string;
|
|
10
|
-
};
|
|
11
|
-
sequence: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
12
|
-
refNameColors: {
|
|
13
|
-
type: string;
|
|
14
|
-
defaultValue: never[];
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
refNameAliases: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
18
|
-
adapter: import("mobx-state-tree").IAnyModelType;
|
|
19
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
20
|
-
cytobands: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
21
|
-
adapter: import("mobx-state-tree").IAnyModelType;
|
|
22
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
23
|
-
displayName: {
|
|
24
|
-
type: string;
|
|
25
|
-
defaultValue: string;
|
|
26
|
-
description: string;
|
|
27
|
-
};
|
|
28
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "name">>>;
|
|
29
|
-
}, {
|
|
30
|
-
addSessionAssembly(conf: AnyConfiguration): ({
|
|
31
|
-
[x: string]: any;
|
|
32
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
33
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
34
|
-
[x: string]: any;
|
|
35
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
36
|
-
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
|
|
37
|
-
[x: string]: any;
|
|
38
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
39
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
|
|
40
|
-
} & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
41
|
-
aliases: {
|
|
42
|
-
type: string;
|
|
43
|
-
defaultValue: never[];
|
|
44
|
-
description: string;
|
|
45
|
-
};
|
|
46
|
-
sequence: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
47
|
-
refNameColors: {
|
|
48
|
-
type: string;
|
|
49
|
-
defaultValue: never[];
|
|
50
|
-
description: string;
|
|
51
|
-
};
|
|
52
|
-
refNameAliases: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
53
|
-
adapter: import("mobx-state-tree").IAnyModelType;
|
|
54
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
55
|
-
cytobands: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
56
|
-
adapter: import("mobx-state-tree").IAnyModelType;
|
|
57
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
58
|
-
displayName: {
|
|
59
|
-
type: string;
|
|
60
|
-
defaultValue: string;
|
|
61
|
-
description: string;
|
|
62
|
-
};
|
|
63
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "name">>>) | undefined;
|
|
64
|
-
addAssembly(conf: AnyConfiguration): void;
|
|
65
|
-
removeAssembly(name: string): void;
|
|
66
|
-
removeSessionAssembly(assemblyName: string): void;
|
|
67
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SessionAssembliesMixin = SessionAssembliesMixin;
|
|
4
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
-
function SessionAssembliesMixin(pluginManager, assemblyConfigSchemasType) {
|
|
6
|
-
return mobx_state_tree_1.types
|
|
7
|
-
.model({
|
|
8
|
-
sessionAssemblies: mobx_state_tree_1.types.array(assemblyConfigSchemasType),
|
|
9
|
-
})
|
|
10
|
-
.actions(s => {
|
|
11
|
-
const self = s;
|
|
12
|
-
return {
|
|
13
|
-
addSessionAssembly(conf) {
|
|
14
|
-
const asm = self.sessionAssemblies.find(f => f.name === conf.name);
|
|
15
|
-
if (asm) {
|
|
16
|
-
console.warn(`Assembly ${conf.name} already exists`);
|
|
17
|
-
return asm;
|
|
18
|
-
}
|
|
19
|
-
const length = self.sessionAssemblies.push(conf);
|
|
20
|
-
return self.sessionAssemblies[length - 1];
|
|
21
|
-
},
|
|
22
|
-
addAssembly(conf) {
|
|
23
|
-
if (self.adminMode) {
|
|
24
|
-
self.jbrowse.addAssemblyConf(conf);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
this.addSessionAssembly(conf);
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
removeAssembly(name) {
|
|
31
|
-
if (self.adminMode) {
|
|
32
|
-
self.jbrowse.removeAssemblyConf(name);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
this.removeSessionAssembly(name);
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
removeSessionAssembly(assemblyName) {
|
|
39
|
-
const elt = self.sessionAssemblies.find(a => a.name === assemblyName);
|
|
40
|
-
if (elt) {
|
|
41
|
-
self.sessionAssemblies.remove(elt);
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
import type { AnyConfiguration } from '@jbrowse/core/configuration';
|
|
3
|
-
export declare function TemporaryAssembliesMixin(pluginManager: PluginManager, assemblyConfigSchemasType?: import("mobx-state-tree").IType<any, any, any>): import("mobx-state-tree").IModelType<{
|
|
4
|
-
temporaryAssemblies: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<any, any, any>>;
|
|
5
|
-
}, {
|
|
6
|
-
addTemporaryAssembly(conf: AnyConfiguration): any;
|
|
7
|
-
removeTemporaryAssembly(name: string): void;
|
|
8
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TemporaryAssembliesMixin = TemporaryAssembliesMixin;
|
|
4
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
-
function TemporaryAssembliesMixin(pluginManager, assemblyConfigSchemasType = mobx_state_tree_1.types.frozen()) {
|
|
6
|
-
return mobx_state_tree_1.types
|
|
7
|
-
.model({
|
|
8
|
-
temporaryAssemblies: mobx_state_tree_1.types.array(assemblyConfigSchemasType),
|
|
9
|
-
})
|
|
10
|
-
.actions(s => {
|
|
11
|
-
const self = s;
|
|
12
|
-
return {
|
|
13
|
-
addTemporaryAssembly(conf) {
|
|
14
|
-
const asm = self.temporaryAssemblies.find(f => f.name === conf.name);
|
|
15
|
-
if (asm) {
|
|
16
|
-
console.warn(`Assembly ${conf.name} was already existing`);
|
|
17
|
-
return asm;
|
|
18
|
-
}
|
|
19
|
-
const length = self.temporaryAssemblies.push(conf);
|
|
20
|
-
return self.temporaryAssemblies[length - 1];
|
|
21
|
-
},
|
|
22
|
-
removeTemporaryAssembly(name) {
|
|
23
|
-
const elt = self.temporaryAssemblies.find(a => a.name === name);
|
|
24
|
-
if (elt) {
|
|
25
|
-
self.temporaryAssemblies.remove(elt);
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
}
|
package/dist/Assemblies/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./SessionAssembliesMixin"), exports);
|
|
18
|
-
__exportStar(require("./TemporaryAssembliesMixin"), exports);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare function HistoryManagementMixin(): import("mobx-state-tree").IModelType<{
|
|
2
|
-
history: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
|
|
3
|
-
undoIdx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
4
|
-
targetPath: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
5
|
-
}, {
|
|
6
|
-
history: unknown[];
|
|
7
|
-
notTrackingUndo: boolean;
|
|
8
|
-
} & {
|
|
9
|
-
readonly canUndo: boolean;
|
|
10
|
-
readonly canRedo: boolean;
|
|
11
|
-
} & {
|
|
12
|
-
stopTrackingUndo(): void;
|
|
13
|
-
resumeTrackingUndo(): void;
|
|
14
|
-
addUndoState(todos: unknown): void;
|
|
15
|
-
beforeDestroy(): void;
|
|
16
|
-
initialize(): void;
|
|
17
|
-
undo(): void;
|
|
18
|
-
redo(): void;
|
|
19
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
20
|
-
}, {
|
|
21
|
-
afterCreate(): void;
|
|
22
|
-
beforeDestroy(): void;
|
|
23
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.HistoryManagementMixin = HistoryManagementMixin;
|
|
7
|
-
const TimeTraveller_1 = __importDefault(require("@jbrowse/core/util/TimeTraveller"));
|
|
8
|
-
const mobx_1 = require("mobx");
|
|
9
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
10
|
-
function HistoryManagementMixin() {
|
|
11
|
-
return mobx_state_tree_1.types
|
|
12
|
-
.model({
|
|
13
|
-
history: mobx_state_tree_1.types.optional(TimeTraveller_1.default, { targetPath: '../session' }),
|
|
14
|
-
})
|
|
15
|
-
.actions(self => {
|
|
16
|
-
const keydownListener = (e) => {
|
|
17
|
-
var _a, _b;
|
|
18
|
-
if (self.history.canRedo &&
|
|
19
|
-
(((e.ctrlKey || e.metaKey) && e.shiftKey && e.code === 'KeyZ') ||
|
|
20
|
-
(e.ctrlKey && !e.shiftKey && e.code === 'KeyY')) &&
|
|
21
|
-
((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName.toUpperCase()) !== 'INPUT') {
|
|
22
|
-
self.history.redo();
|
|
23
|
-
}
|
|
24
|
-
if (self.history.canUndo &&
|
|
25
|
-
(e.ctrlKey || e.metaKey) &&
|
|
26
|
-
!e.shiftKey &&
|
|
27
|
-
e.code === 'KeyZ' &&
|
|
28
|
-
((_b = document.activeElement) === null || _b === void 0 ? void 0 : _b.tagName.toUpperCase()) !== 'INPUT') {
|
|
29
|
-
self.history.undo();
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
return {
|
|
33
|
-
afterCreate() {
|
|
34
|
-
document.addEventListener('keydown', keydownListener);
|
|
35
|
-
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.autorun)(() => {
|
|
36
|
-
const { session } = self;
|
|
37
|
-
if (session) {
|
|
38
|
-
self.history.initialize();
|
|
39
|
-
}
|
|
40
|
-
}));
|
|
41
|
-
},
|
|
42
|
-
beforeDestroy() {
|
|
43
|
-
document.removeEventListener('keydown', keydownListener);
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
});
|
|
47
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
export default function RootConfiguration({ pluginManager, }: {
|
|
3
|
-
pluginManager: PluginManager;
|
|
4
|
-
}): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
5
|
-
rpc: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
|
-
defaultDriver: {
|
|
7
|
-
type: string;
|
|
8
|
-
description: string;
|
|
9
|
-
defaultValue: string;
|
|
10
|
-
};
|
|
11
|
-
drivers: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IMapType<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined, import("mobx-state-tree").ModelSnapshotType<Record<string, any>>, ({} & Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> & import("mobx-state-tree/dist/internal").NonEmptyObject) | undefined>>, [undefined]>;
|
|
12
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
13
|
-
highResolutionScaling: {
|
|
14
|
-
type: string;
|
|
15
|
-
defaultValue: number;
|
|
16
|
-
};
|
|
17
|
-
formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
18
|
-
feature: {
|
|
19
|
-
type: string;
|
|
20
|
-
description: string;
|
|
21
|
-
defaultValue: {};
|
|
22
|
-
contextVariable: string[];
|
|
23
|
-
};
|
|
24
|
-
subfeatures: {
|
|
25
|
-
type: string;
|
|
26
|
-
description: string;
|
|
27
|
-
defaultValue: {};
|
|
28
|
-
contextVariable: string[];
|
|
29
|
-
};
|
|
30
|
-
depth: {
|
|
31
|
-
type: string;
|
|
32
|
-
defaultValue: number;
|
|
33
|
-
description: string;
|
|
34
|
-
};
|
|
35
|
-
maxDepth: {
|
|
36
|
-
type: string;
|
|
37
|
-
defaultValue: number;
|
|
38
|
-
description: string;
|
|
39
|
-
};
|
|
40
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
41
|
-
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
42
|
-
config: {
|
|
43
|
-
type: string;
|
|
44
|
-
description: string;
|
|
45
|
-
defaultValue: {};
|
|
46
|
-
contextVariable: string[];
|
|
47
|
-
};
|
|
48
|
-
hideUris: {
|
|
49
|
-
type: string;
|
|
50
|
-
defaultValue: boolean;
|
|
51
|
-
};
|
|
52
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
53
|
-
shareURL: {
|
|
54
|
-
type: string;
|
|
55
|
-
defaultValue: string;
|
|
56
|
-
};
|
|
57
|
-
disableAnalytics: {
|
|
58
|
-
type: string;
|
|
59
|
-
defaultValue: boolean;
|
|
60
|
-
};
|
|
61
|
-
hierarchical: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
62
|
-
sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
63
|
-
trackNames: {
|
|
64
|
-
type: string;
|
|
65
|
-
defaultValue: boolean;
|
|
66
|
-
};
|
|
67
|
-
categories: {
|
|
68
|
-
type: string;
|
|
69
|
-
defaultValue: boolean;
|
|
70
|
-
};
|
|
71
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
72
|
-
defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
73
|
-
categoryNames: {
|
|
74
|
-
type: string;
|
|
75
|
-
defaultValue: never[];
|
|
76
|
-
};
|
|
77
|
-
topLevelCategories: {
|
|
78
|
-
type: string;
|
|
79
|
-
defaultValue: boolean;
|
|
80
|
-
};
|
|
81
|
-
subCategories: {
|
|
82
|
-
type: string;
|
|
83
|
-
defaultValue: boolean;
|
|
84
|
-
};
|
|
85
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
86
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
87
|
-
theme: {
|
|
88
|
-
type: string;
|
|
89
|
-
defaultValue: {};
|
|
90
|
-
};
|
|
91
|
-
extraThemes: {
|
|
92
|
-
type: string;
|
|
93
|
-
defaultValue: {};
|
|
94
|
-
};
|
|
95
|
-
logoPath: {
|
|
96
|
-
type: string;
|
|
97
|
-
defaultValue: {
|
|
98
|
-
uri: string;
|
|
99
|
-
locationType: string;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|