@jbrowse/plugin-linear-comparative-view 2.14.0 → 2.15.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/dist/LGVSyntenyDisplay/model.d.ts +9 -10
- package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +9 -9
- package/dist/LinearComparativeView/model.d.ts +2 -2
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +2 -3
- package/dist/LinearSyntenyDisplay/components/SyntenyTooltip.js +3 -40
- package/dist/LinearSyntenyDisplay/components/util.js +6 -5
- package/dist/LinearSyntenyDisplay/model.d.ts +9 -9
- package/dist/index.js +0 -2
- package/esm/LGVSyntenyDisplay/model.d.ts +9 -10
- package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +9 -9
- package/esm/LinearComparativeView/model.d.ts +2 -2
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +2 -3
- package/esm/LinearSyntenyDisplay/components/SyntenyTooltip.js +3 -40
- package/esm/LinearSyntenyDisplay/components/util.js +7 -6
- package/esm/LinearSyntenyDisplay/model.d.ts +9 -9
- package/esm/index.js +0 -2
- package/package.json +4 -4
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +0 -7
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +0 -65
- package/dist/SyntenyFeatureDetail/index.d.ts +0 -2
- package/dist/SyntenyFeatureDetail/index.js +0 -58
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +0 -7
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +0 -37
- package/esm/SyntenyFeatureDetail/index.d.ts +0 -2
- package/esm/SyntenyFeatureDetail/index.js +0 -29
|
@@ -37,7 +37,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
37
37
|
}, {
|
|
38
38
|
renderInProgress: AbortController | undefined;
|
|
39
39
|
filled: boolean;
|
|
40
|
-
reactElement:
|
|
40
|
+
reactElement: React.ReactElement | undefined;
|
|
41
41
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
42
42
|
layout: any;
|
|
43
43
|
status: string;
|
|
@@ -48,10 +48,10 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
48
48
|
model: {
|
|
49
49
|
error?: unknown;
|
|
50
50
|
reload: () => void;
|
|
51
|
-
message:
|
|
51
|
+
message: React.ReactNode;
|
|
52
52
|
filled?: boolean;
|
|
53
53
|
status?: string;
|
|
54
|
-
reactElement?:
|
|
54
|
+
reactElement?: React.ReactElement;
|
|
55
55
|
};
|
|
56
56
|
}) => import("react").JSX.Element | undefined;
|
|
57
57
|
renderProps: any;
|
|
@@ -62,7 +62,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
62
62
|
setLoading(abortController: AbortController): void;
|
|
63
63
|
setMessage(messageText: string): void;
|
|
64
64
|
setRendered(props: {
|
|
65
|
-
reactElement:
|
|
65
|
+
reactElement: React.ReactElement;
|
|
66
66
|
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
67
67
|
layout: any;
|
|
68
68
|
maxHeightReached: boolean;
|
|
@@ -135,7 +135,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
135
135
|
error: unknown;
|
|
136
136
|
message: string | undefined;
|
|
137
137
|
} & {
|
|
138
|
-
readonly RenderingComponent:
|
|
138
|
+
readonly RenderingComponent: React.FC<{
|
|
139
139
|
model: {
|
|
140
140
|
id: string;
|
|
141
141
|
type: string;
|
|
@@ -156,7 +156,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
156
156
|
onHorizontalScroll?: () => void;
|
|
157
157
|
blockState?: Record<string, any>;
|
|
158
158
|
}>;
|
|
159
|
-
readonly DisplayBlurb:
|
|
159
|
+
readonly DisplayBlurb: React.FC<{
|
|
160
160
|
model: {
|
|
161
161
|
id: string;
|
|
162
162
|
type: string;
|
|
@@ -179,7 +179,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
179
179
|
readonly parentTrack: any;
|
|
180
180
|
renderProps(): any;
|
|
181
181
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
182
|
-
readonly DisplayMessageComponent: undefined |
|
|
182
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
183
183
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
184
184
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
185
185
|
regionCannotBeRendered(): null;
|
|
@@ -225,13 +225,13 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
225
225
|
featureIdUnderMouse: undefined | string;
|
|
226
226
|
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
227
227
|
} & {
|
|
228
|
+
readonly DisplayMessageComponent: import("react").FC<any> | undefined;
|
|
228
229
|
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
229
230
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
230
231
|
} & {
|
|
231
232
|
readonly renderDelay: number;
|
|
232
|
-
readonly TooltipComponent: import("
|
|
233
|
+
readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
|
|
233
234
|
readonly selectedFeatureId: string | undefined;
|
|
234
|
-
readonly DisplayMessageComponent: undefined | import("react").FC<any>;
|
|
235
235
|
} & {
|
|
236
236
|
readonly features: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/core/util").Feature>;
|
|
237
237
|
readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
|
|
@@ -329,7 +329,6 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
329
329
|
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
330
330
|
muiName: string;
|
|
331
331
|
};
|
|
332
|
-
priority: number;
|
|
333
332
|
onClick: () => void;
|
|
334
333
|
})[];
|
|
335
334
|
} & {
|
|
@@ -19,7 +19,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
19
19
|
error: unknown;
|
|
20
20
|
message: string | undefined;
|
|
21
21
|
} & {
|
|
22
|
-
readonly RenderingComponent:
|
|
22
|
+
readonly RenderingComponent: React.FC<{
|
|
23
23
|
model: {
|
|
24
24
|
id: string;
|
|
25
25
|
type: string;
|
|
@@ -42,7 +42,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
42
42
|
onHorizontalScroll?: () => void;
|
|
43
43
|
blockState?: Record<string, any>;
|
|
44
44
|
}>;
|
|
45
|
-
readonly DisplayBlurb:
|
|
45
|
+
readonly DisplayBlurb: React.FC<{
|
|
46
46
|
model: {
|
|
47
47
|
id: string;
|
|
48
48
|
type: string;
|
|
@@ -65,7 +65,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
65
65
|
readonly parentTrack: any;
|
|
66
66
|
renderProps(): any;
|
|
67
67
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
68
|
-
readonly DisplayMessageComponent: undefined |
|
|
68
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
69
69
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
70
70
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
71
71
|
regionCannotBeRendered(): null;
|
|
@@ -105,7 +105,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
105
105
|
error: unknown;
|
|
106
106
|
message: string | undefined;
|
|
107
107
|
} & {
|
|
108
|
-
readonly RenderingComponent:
|
|
108
|
+
readonly RenderingComponent: React.FC<{
|
|
109
109
|
model: {
|
|
110
110
|
id: string;
|
|
111
111
|
type: string;
|
|
@@ -128,7 +128,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
128
128
|
onHorizontalScroll?: () => void;
|
|
129
129
|
blockState?: Record<string, any>;
|
|
130
130
|
}>;
|
|
131
|
-
readonly DisplayBlurb:
|
|
131
|
+
readonly DisplayBlurb: React.FC<{
|
|
132
132
|
model: {
|
|
133
133
|
id: string;
|
|
134
134
|
type: string;
|
|
@@ -151,7 +151,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
151
151
|
readonly parentTrack: any;
|
|
152
152
|
renderProps(): any;
|
|
153
153
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
154
|
-
readonly DisplayMessageComponent: undefined |
|
|
154
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
155
155
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
156
156
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
157
157
|
regionCannotBeRendered(): null;
|
|
@@ -177,7 +177,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
177
177
|
error: unknown;
|
|
178
178
|
message: string | undefined;
|
|
179
179
|
} & {
|
|
180
|
-
readonly RenderingComponent:
|
|
180
|
+
readonly RenderingComponent: React.FC<{
|
|
181
181
|
model: {
|
|
182
182
|
id: string;
|
|
183
183
|
type: string;
|
|
@@ -198,7 +198,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
198
198
|
onHorizontalScroll?: () => void;
|
|
199
199
|
blockState?: Record<string, any>;
|
|
200
200
|
}>;
|
|
201
|
-
readonly DisplayBlurb:
|
|
201
|
+
readonly DisplayBlurb: React.FC<{
|
|
202
202
|
model: {
|
|
203
203
|
id: string;
|
|
204
204
|
type: string;
|
|
@@ -221,7 +221,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
221
221
|
readonly parentTrack: any;
|
|
222
222
|
renderProps(): any;
|
|
223
223
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
224
|
-
readonly DisplayMessageComponent: undefined |
|
|
224
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
225
225
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
226
226
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
227
227
|
regionCannotBeRendered(): null;
|
|
@@ -68,8 +68,8 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
68
68
|
readonly assemblyNames: string[];
|
|
69
69
|
} & {
|
|
70
70
|
scaleBarDisplayPrefix(): string | undefined;
|
|
71
|
-
MiniControlsComponent():
|
|
72
|
-
HeaderComponent():
|
|
71
|
+
MiniControlsComponent(): React.FC<any>;
|
|
72
|
+
HeaderComponent(): React.FC<any>;
|
|
73
73
|
readonly assemblyErrors: string;
|
|
74
74
|
readonly assembliesInitialized: boolean;
|
|
75
75
|
readonly initialized: boolean;
|
|
@@ -31,11 +31,10 @@ const mobx_react_1 = require("mobx-react");
|
|
|
31
31
|
const util_1 = require("@jbrowse/core/util");
|
|
32
32
|
const mobx_1 = require("mobx");
|
|
33
33
|
const mui_1 = require("tss-react/mui");
|
|
34
|
-
// locals
|
|
35
|
-
const SyntenyTooltip_1 = __importDefault(require("./SyntenyTooltip"));
|
|
36
34
|
const drawSynteny_1 = require("../drawSynteny");
|
|
37
35
|
const SyntenyContextMenu_1 = __importDefault(require("./SyntenyContextMenu"));
|
|
38
36
|
const util_2 = require("./util");
|
|
37
|
+
const SyntenyTooltip = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./SyntenyTooltip'))));
|
|
39
38
|
const useStyles = (0, mui_1.makeStyles)()({
|
|
40
39
|
pix: {
|
|
41
40
|
imageRendering: 'pixelated',
|
|
@@ -208,7 +207,7 @@ const LinearSyntenyRendering = (0, mobx_react_1.observer)(function ({ model, })
|
|
|
208
207
|
}, "data-testid": "synteny_canvas", className: classes.abs, width: width, height: height }),
|
|
209
208
|
react_1.default.createElement("canvas", { ref: k3, className: classes.pix, width: width, height: height }),
|
|
210
209
|
react_1.default.createElement("canvas", { ref: k4, className: classes.pix, width: width, height: height }),
|
|
211
|
-
mouseoverId && tooltip && currX && currY ? (react_1.default.createElement(
|
|
210
|
+
mouseoverId && tooltip && currX && currY ? (react_1.default.createElement(SyntenyTooltip, { title: tooltip })) : null,
|
|
212
211
|
anchorEl ? (react_1.default.createElement(SyntenyContextMenu_1.default, { model: model, anchorEl: anchorEl, onClose: () => {
|
|
213
212
|
setAnchorEl(undefined);
|
|
214
213
|
} })) : null));
|
|
@@ -5,47 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const mobx_react_1 = require("mobx-react");
|
|
8
|
-
const material_1 = require("@mui/material");
|
|
9
|
-
const mui_1 = require("tss-react/mui");
|
|
10
|
-
const react_2 = require("@floating-ui/react");
|
|
11
8
|
const ui_1 = require("@jbrowse/core/ui");
|
|
12
|
-
|
|
13
|
-
return Math.round(value * 1e5) / 1e5;
|
|
14
|
-
}
|
|
15
|
-
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
16
|
-
// these styles come from
|
|
17
|
-
// https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Tooltip/Tooltip.js
|
|
18
|
-
tooltip: {
|
|
19
|
-
position: 'absolute',
|
|
20
|
-
pointerEvents: 'none',
|
|
21
|
-
backgroundColor: (0, material_1.alpha)(theme.palette.grey[700], 0.9),
|
|
22
|
-
borderRadius: theme.shape.borderRadius,
|
|
23
|
-
color: theme.palette.common.white,
|
|
24
|
-
fontFamily: theme.typography.fontFamily,
|
|
25
|
-
padding: '4px 8px',
|
|
26
|
-
fontSize: theme.typography.pxToRem(12),
|
|
27
|
-
lineHeight: `${round(14 / 10)}em`,
|
|
28
|
-
maxWidth: 300,
|
|
29
|
-
wordWrap: 'break-word',
|
|
30
|
-
},
|
|
31
|
-
}));
|
|
9
|
+
const BaseTooltip_1 = __importDefault(require("@jbrowse/core/ui/BaseTooltip"));
|
|
32
10
|
const SyntenyTooltip = (0, mobx_react_1.observer)(function ({ title }) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const { classes } = useStyles();
|
|
36
|
-
const { refs, floatingStyles, context } = (0, react_2.useFloating)({
|
|
37
|
-
placement: 'right',
|
|
38
|
-
strategy: 'fixed',
|
|
39
|
-
});
|
|
40
|
-
const clientPoint = (0, react_2.useClientPoint)(context);
|
|
41
|
-
const { getFloatingProps } = (0, react_2.useInteractions)([clientPoint]);
|
|
42
|
-
const popperTheme = (_a = theme.components) === null || _a === void 0 ? void 0 : _a.MuiPopper;
|
|
43
|
-
return title ? (react_1.default.createElement(material_1.Portal, { container: (_b = popperTheme === null || popperTheme === void 0 ? void 0 : popperTheme.defaultProps) === null || _b === void 0 ? void 0 : _b.container },
|
|
44
|
-
react_1.default.createElement("div", { className: classes.tooltip, ref: refs.setFloating, style: {
|
|
45
|
-
...floatingStyles,
|
|
46
|
-
zIndex: 100000,
|
|
47
|
-
pointerEvents: 'none',
|
|
48
|
-
}, ...getFloatingProps() },
|
|
49
|
-
react_1.default.createElement(ui_1.SanitizedHTML, { html: title })))) : null;
|
|
11
|
+
return title ? (react_1.default.createElement(BaseTooltip_1.default, null,
|
|
12
|
+
react_1.default.createElement(ui_1.SanitizedHTML, { html: title }))) : null;
|
|
50
13
|
});
|
|
51
14
|
exports.default = SyntenyTooltip;
|
|
@@ -86,6 +86,8 @@ function drawBezierBox(ctx, x1, x2, y1, x3, x4, y2, mid) {
|
|
|
86
86
|
ctx.fill();
|
|
87
87
|
}
|
|
88
88
|
function onSynClick(event, model) {
|
|
89
|
+
const view = (0, util_1.getContainingView)(model);
|
|
90
|
+
const track = (0, util_1.getContainingTrack)(model);
|
|
89
91
|
const ref1 = model.clickMapCanvas;
|
|
90
92
|
const ref2 = model.cigarClickMapCanvas;
|
|
91
93
|
if (!ref1 || !ref2) {
|
|
@@ -108,11 +110,10 @@ function onSynClick(event, model) {
|
|
|
108
110
|
model.setClickId(f.id());
|
|
109
111
|
const session = (0, util_1.getSession)(model);
|
|
110
112
|
if ((0, util_1.isSessionModelWithWidgets)(session)) {
|
|
111
|
-
session.showWidget(session.addWidget('
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
},
|
|
113
|
+
session.showWidget(session.addWidget('BaseFeatureWidget', 'baseFeature', {
|
|
114
|
+
view,
|
|
115
|
+
track,
|
|
116
|
+
featureData: f.toJSON(),
|
|
116
117
|
}));
|
|
117
118
|
}
|
|
118
119
|
}
|
|
@@ -39,7 +39,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
39
39
|
error: unknown;
|
|
40
40
|
message: string | undefined;
|
|
41
41
|
} & {
|
|
42
|
-
readonly RenderingComponent:
|
|
42
|
+
readonly RenderingComponent: React.FC<{
|
|
43
43
|
model: {
|
|
44
44
|
id: string;
|
|
45
45
|
type: string;
|
|
@@ -60,7 +60,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
60
60
|
onHorizontalScroll?: () => void;
|
|
61
61
|
blockState?: Record<string, any>;
|
|
62
62
|
}>;
|
|
63
|
-
readonly DisplayBlurb:
|
|
63
|
+
readonly DisplayBlurb: React.FC<{
|
|
64
64
|
model: {
|
|
65
65
|
id: string;
|
|
66
66
|
type: string;
|
|
@@ -85,7 +85,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
85
85
|
readonly parentTrack: any;
|
|
86
86
|
renderProps(): any;
|
|
87
87
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
88
|
-
readonly DisplayMessageComponent: undefined |
|
|
88
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
89
89
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
90
90
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
91
91
|
regionCannotBeRendered(): null;
|
|
@@ -122,7 +122,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
122
122
|
error: unknown;
|
|
123
123
|
message: string | undefined;
|
|
124
124
|
} & {
|
|
125
|
-
readonly RenderingComponent:
|
|
125
|
+
readonly RenderingComponent: React.FC<{
|
|
126
126
|
model: {
|
|
127
127
|
id: string;
|
|
128
128
|
type: string;
|
|
@@ -143,7 +143,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
143
143
|
onHorizontalScroll?: () => void;
|
|
144
144
|
blockState?: Record<string, any>;
|
|
145
145
|
}>;
|
|
146
|
-
readonly DisplayBlurb:
|
|
146
|
+
readonly DisplayBlurb: React.FC<{
|
|
147
147
|
model: {
|
|
148
148
|
id: string;
|
|
149
149
|
type: string;
|
|
@@ -168,7 +168,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
168
168
|
readonly parentTrack: any;
|
|
169
169
|
renderProps(): any;
|
|
170
170
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
171
|
-
readonly DisplayMessageComponent: undefined |
|
|
171
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
172
172
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
173
173
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
174
174
|
regionCannotBeRendered(): null;
|
|
@@ -194,7 +194,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
194
194
|
error: unknown;
|
|
195
195
|
message: string | undefined;
|
|
196
196
|
} & {
|
|
197
|
-
readonly RenderingComponent:
|
|
197
|
+
readonly RenderingComponent: React.FC<{
|
|
198
198
|
model: {
|
|
199
199
|
id: string;
|
|
200
200
|
type: string;
|
|
@@ -215,7 +215,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
215
215
|
onHorizontalScroll?: () => void;
|
|
216
216
|
blockState?: Record<string, any>;
|
|
217
217
|
}>;
|
|
218
|
-
readonly DisplayBlurb:
|
|
218
|
+
readonly DisplayBlurb: React.FC<{
|
|
219
219
|
model: {
|
|
220
220
|
id: string;
|
|
221
221
|
type: string;
|
|
@@ -238,7 +238,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
238
238
|
readonly parentTrack: any;
|
|
239
239
|
renderProps(): any;
|
|
240
240
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
241
|
-
readonly DisplayMessageComponent: undefined |
|
|
241
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
242
242
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
243
243
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
244
244
|
regionCannotBeRendered(): null;
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,6 @@ const LGVSyntenyDisplay_1 = __importDefault(require("./LGVSyntenyDisplay"));
|
|
|
13
13
|
const LinearSyntenyView_1 = __importDefault(require("./LinearSyntenyView"));
|
|
14
14
|
const LaunchLinearSyntenyView_1 = __importDefault(require("./LaunchLinearSyntenyView"));
|
|
15
15
|
const SyntenyTrack_1 = __importDefault(require("./SyntenyTrack"));
|
|
16
|
-
const SyntenyFeatureDetail_1 = __importDefault(require("./SyntenyFeatureDetail"));
|
|
17
16
|
const LinearReadVsRef_1 = __importDefault(require("./LinearReadVsRef"));
|
|
18
17
|
class LinearComparativeViewPlugin extends Plugin_1.default {
|
|
19
18
|
constructor() {
|
|
@@ -28,7 +27,6 @@ class LinearComparativeViewPlugin extends Plugin_1.default {
|
|
|
28
27
|
(0, LGVSyntenyDisplay_1.default)(pluginManager);
|
|
29
28
|
(0, LaunchLinearSyntenyView_1.default)(pluginManager);
|
|
30
29
|
(0, SyntenyTrack_1.default)(pluginManager);
|
|
31
|
-
(0, SyntenyFeatureDetail_1.default)(pluginManager);
|
|
32
30
|
(0, LinearReadVsRef_1.default)(pluginManager);
|
|
33
31
|
}
|
|
34
32
|
configure(pluginManager) {
|
|
@@ -37,7 +37,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
37
37
|
}, {
|
|
38
38
|
renderInProgress: AbortController | undefined;
|
|
39
39
|
filled: boolean;
|
|
40
|
-
reactElement:
|
|
40
|
+
reactElement: React.ReactElement | undefined;
|
|
41
41
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
42
42
|
layout: any;
|
|
43
43
|
status: string;
|
|
@@ -48,10 +48,10 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
48
48
|
model: {
|
|
49
49
|
error?: unknown;
|
|
50
50
|
reload: () => void;
|
|
51
|
-
message:
|
|
51
|
+
message: React.ReactNode;
|
|
52
52
|
filled?: boolean;
|
|
53
53
|
status?: string;
|
|
54
|
-
reactElement?:
|
|
54
|
+
reactElement?: React.ReactElement;
|
|
55
55
|
};
|
|
56
56
|
}) => import("react").JSX.Element | undefined;
|
|
57
57
|
renderProps: any;
|
|
@@ -62,7 +62,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
62
62
|
setLoading(abortController: AbortController): void;
|
|
63
63
|
setMessage(messageText: string): void;
|
|
64
64
|
setRendered(props: {
|
|
65
|
-
reactElement:
|
|
65
|
+
reactElement: React.ReactElement;
|
|
66
66
|
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
67
67
|
layout: any;
|
|
68
68
|
maxHeightReached: boolean;
|
|
@@ -135,7 +135,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
135
135
|
error: unknown;
|
|
136
136
|
message: string | undefined;
|
|
137
137
|
} & {
|
|
138
|
-
readonly RenderingComponent:
|
|
138
|
+
readonly RenderingComponent: React.FC<{
|
|
139
139
|
model: {
|
|
140
140
|
id: string;
|
|
141
141
|
type: string;
|
|
@@ -156,7 +156,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
156
156
|
onHorizontalScroll?: () => void;
|
|
157
157
|
blockState?: Record<string, any>;
|
|
158
158
|
}>;
|
|
159
|
-
readonly DisplayBlurb:
|
|
159
|
+
readonly DisplayBlurb: React.FC<{
|
|
160
160
|
model: {
|
|
161
161
|
id: string;
|
|
162
162
|
type: string;
|
|
@@ -179,7 +179,7 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
179
179
|
readonly parentTrack: any;
|
|
180
180
|
renderProps(): any;
|
|
181
181
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
182
|
-
readonly DisplayMessageComponent: undefined |
|
|
182
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
183
183
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
184
184
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
185
185
|
regionCannotBeRendered(): null;
|
|
@@ -225,13 +225,13 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
225
225
|
featureIdUnderMouse: undefined | string;
|
|
226
226
|
contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
|
|
227
227
|
} & {
|
|
228
|
+
readonly DisplayMessageComponent: import("react").FC<any> | undefined;
|
|
228
229
|
readonly blockType: "dynamicBlocks" | "staticBlocks";
|
|
229
230
|
readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
230
231
|
} & {
|
|
231
232
|
readonly renderDelay: number;
|
|
232
|
-
readonly TooltipComponent: import("
|
|
233
|
+
readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
|
|
233
234
|
readonly selectedFeatureId: string | undefined;
|
|
234
|
-
readonly DisplayMessageComponent: undefined | import("react").FC<any>;
|
|
235
235
|
} & {
|
|
236
236
|
readonly features: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/core/util").Feature>;
|
|
237
237
|
readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
|
|
@@ -329,7 +329,6 @@ declare function stateModelFactory(schema: AnyConfigurationSchemaType): import("
|
|
|
329
329
|
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
330
330
|
muiName: string;
|
|
331
331
|
};
|
|
332
|
-
priority: number;
|
|
333
332
|
onClick: () => void;
|
|
334
333
|
})[];
|
|
335
334
|
} & {
|
|
@@ -19,7 +19,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
19
19
|
error: unknown;
|
|
20
20
|
message: string | undefined;
|
|
21
21
|
} & {
|
|
22
|
-
readonly RenderingComponent:
|
|
22
|
+
readonly RenderingComponent: React.FC<{
|
|
23
23
|
model: {
|
|
24
24
|
id: string;
|
|
25
25
|
type: string;
|
|
@@ -42,7 +42,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
42
42
|
onHorizontalScroll?: () => void;
|
|
43
43
|
blockState?: Record<string, any>;
|
|
44
44
|
}>;
|
|
45
|
-
readonly DisplayBlurb:
|
|
45
|
+
readonly DisplayBlurb: React.FC<{
|
|
46
46
|
model: {
|
|
47
47
|
id: string;
|
|
48
48
|
type: string;
|
|
@@ -65,7 +65,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
65
65
|
readonly parentTrack: any;
|
|
66
66
|
renderProps(): any;
|
|
67
67
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
68
|
-
readonly DisplayMessageComponent: undefined |
|
|
68
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
69
69
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
70
70
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
71
71
|
regionCannotBeRendered(): null;
|
|
@@ -105,7 +105,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
105
105
|
error: unknown;
|
|
106
106
|
message: string | undefined;
|
|
107
107
|
} & {
|
|
108
|
-
readonly RenderingComponent:
|
|
108
|
+
readonly RenderingComponent: React.FC<{
|
|
109
109
|
model: {
|
|
110
110
|
id: string;
|
|
111
111
|
type: string;
|
|
@@ -128,7 +128,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
128
128
|
onHorizontalScroll?: () => void;
|
|
129
129
|
blockState?: Record<string, any>;
|
|
130
130
|
}>;
|
|
131
|
-
readonly DisplayBlurb:
|
|
131
|
+
readonly DisplayBlurb: React.FC<{
|
|
132
132
|
model: {
|
|
133
133
|
id: string;
|
|
134
134
|
type: string;
|
|
@@ -151,7 +151,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
151
151
|
readonly parentTrack: any;
|
|
152
152
|
renderProps(): any;
|
|
153
153
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
154
|
-
readonly DisplayMessageComponent: undefined |
|
|
154
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
155
155
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
156
156
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
157
157
|
regionCannotBeRendered(): null;
|
|
@@ -177,7 +177,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
177
177
|
error: unknown;
|
|
178
178
|
message: string | undefined;
|
|
179
179
|
} & {
|
|
180
|
-
readonly RenderingComponent:
|
|
180
|
+
readonly RenderingComponent: React.FC<{
|
|
181
181
|
model: {
|
|
182
182
|
id: string;
|
|
183
183
|
type: string;
|
|
@@ -198,7 +198,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
198
198
|
onHorizontalScroll?: () => void;
|
|
199
199
|
blockState?: Record<string, any>;
|
|
200
200
|
}>;
|
|
201
|
-
readonly DisplayBlurb:
|
|
201
|
+
readonly DisplayBlurb: React.FC<{
|
|
202
202
|
model: {
|
|
203
203
|
id: string;
|
|
204
204
|
type: string;
|
|
@@ -221,7 +221,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
221
221
|
readonly parentTrack: any;
|
|
222
222
|
renderProps(): any;
|
|
223
223
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
224
|
-
readonly DisplayMessageComponent: undefined |
|
|
224
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
225
225
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
226
226
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
227
227
|
regionCannotBeRendered(): null;
|
|
@@ -68,8 +68,8 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
68
68
|
readonly assemblyNames: string[];
|
|
69
69
|
} & {
|
|
70
70
|
scaleBarDisplayPrefix(): string | undefined;
|
|
71
|
-
MiniControlsComponent():
|
|
72
|
-
HeaderComponent():
|
|
71
|
+
MiniControlsComponent(): React.FC<any>;
|
|
72
|
+
HeaderComponent(): React.FC<any>;
|
|
73
73
|
readonly assemblyErrors: string;
|
|
74
74
|
readonly assembliesInitialized: boolean;
|
|
75
75
|
readonly initialized: boolean;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import React, { useState, useCallback, useRef } from 'react';
|
|
1
|
+
import React, { useState, useCallback, useRef, lazy } from 'react';
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
3
|
import { getContainingView } from '@jbrowse/core/util';
|
|
4
4
|
import { transaction } from 'mobx';
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
|
-
// locals
|
|
7
|
-
import SyntenyTooltip from './SyntenyTooltip';
|
|
8
6
|
import { getId, MAX_COLOR_RANGE } from '../drawSynteny';
|
|
9
7
|
import SyntenyContextMenu from './SyntenyContextMenu';
|
|
10
8
|
import { getTooltip, onSynClick, onSynContextClick } from './util';
|
|
9
|
+
const SyntenyTooltip = lazy(() => import('./SyntenyTooltip'));
|
|
11
10
|
const useStyles = makeStyles()({
|
|
12
11
|
pix: {
|
|
13
12
|
imageRendering: 'pixelated',
|
|
@@ -1,46 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
|
-
import { Portal, useTheme, alpha } from '@mui/material';
|
|
4
|
-
import { makeStyles } from 'tss-react/mui';
|
|
5
|
-
import { useClientPoint, useFloating, useInteractions, } from '@floating-ui/react';
|
|
6
3
|
import { SanitizedHTML } from '@jbrowse/core/ui';
|
|
7
|
-
|
|
8
|
-
return Math.round(value * 1e5) / 1e5;
|
|
9
|
-
}
|
|
10
|
-
const useStyles = makeStyles()(theme => ({
|
|
11
|
-
// these styles come from
|
|
12
|
-
// https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Tooltip/Tooltip.js
|
|
13
|
-
tooltip: {
|
|
14
|
-
position: 'absolute',
|
|
15
|
-
pointerEvents: 'none',
|
|
16
|
-
backgroundColor: alpha(theme.palette.grey[700], 0.9),
|
|
17
|
-
borderRadius: theme.shape.borderRadius,
|
|
18
|
-
color: theme.palette.common.white,
|
|
19
|
-
fontFamily: theme.typography.fontFamily,
|
|
20
|
-
padding: '4px 8px',
|
|
21
|
-
fontSize: theme.typography.pxToRem(12),
|
|
22
|
-
lineHeight: `${round(14 / 10)}em`,
|
|
23
|
-
maxWidth: 300,
|
|
24
|
-
wordWrap: 'break-word',
|
|
25
|
-
},
|
|
26
|
-
}));
|
|
4
|
+
import BaseTooltip from '@jbrowse/core/ui/BaseTooltip';
|
|
27
5
|
const SyntenyTooltip = observer(function ({ title }) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const { classes } = useStyles();
|
|
31
|
-
const { refs, floatingStyles, context } = useFloating({
|
|
32
|
-
placement: 'right',
|
|
33
|
-
strategy: 'fixed',
|
|
34
|
-
});
|
|
35
|
-
const clientPoint = useClientPoint(context);
|
|
36
|
-
const { getFloatingProps } = useInteractions([clientPoint]);
|
|
37
|
-
const popperTheme = (_a = theme.components) === null || _a === void 0 ? void 0 : _a.MuiPopper;
|
|
38
|
-
return title ? (React.createElement(Portal, { container: (_b = popperTheme === null || popperTheme === void 0 ? void 0 : popperTheme.defaultProps) === null || _b === void 0 ? void 0 : _b.container },
|
|
39
|
-
React.createElement("div", { className: classes.tooltip, ref: refs.setFloating, style: {
|
|
40
|
-
...floatingStyles,
|
|
41
|
-
zIndex: 100000,
|
|
42
|
-
pointerEvents: 'none',
|
|
43
|
-
}, ...getFloatingProps() },
|
|
44
|
-
React.createElement(SanitizedHTML, { html: title })))) : null;
|
|
6
|
+
return title ? (React.createElement(BaseTooltip, null,
|
|
7
|
+
React.createElement(SanitizedHTML, { html: title }))) : null;
|
|
45
8
|
});
|
|
46
9
|
export default SyntenyTooltip;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { assembleLocString, doesIntersect2, getSession, isSessionModelWithWidgets, } from '@jbrowse/core/util';
|
|
1
|
+
import { assembleLocString, doesIntersect2, getSession, isSessionModelWithWidgets, getContainingTrack, getContainingView, } from '@jbrowse/core/util';
|
|
2
2
|
// locals
|
|
3
3
|
import { getId, MAX_COLOR_RANGE } from '../drawSynteny';
|
|
4
4
|
export function drawMatchSimple({ feature, ctx, offsets, cb, height, drawCurves, oobLimit, viewWidth, hideTiny, }) {
|
|
@@ -77,6 +77,8 @@ export function drawBezierBox(ctx, x1, x2, y1, x3, x4, y2, mid) {
|
|
|
77
77
|
ctx.fill();
|
|
78
78
|
}
|
|
79
79
|
export function onSynClick(event, model) {
|
|
80
|
+
const view = getContainingView(model);
|
|
81
|
+
const track = getContainingTrack(model);
|
|
80
82
|
const ref1 = model.clickMapCanvas;
|
|
81
83
|
const ref2 = model.cigarClickMapCanvas;
|
|
82
84
|
if (!ref1 || !ref2) {
|
|
@@ -99,11 +101,10 @@ export function onSynClick(event, model) {
|
|
|
99
101
|
model.setClickId(f.id());
|
|
100
102
|
const session = getSession(model);
|
|
101
103
|
if (isSessionModelWithWidgets(session)) {
|
|
102
|
-
session.showWidget(session.addWidget('
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
},
|
|
104
|
+
session.showWidget(session.addWidget('BaseFeatureWidget', 'baseFeature', {
|
|
105
|
+
view,
|
|
106
|
+
track,
|
|
107
|
+
featureData: f.toJSON(),
|
|
107
108
|
}));
|
|
108
109
|
}
|
|
109
110
|
}
|
|
@@ -39,7 +39,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
39
39
|
error: unknown;
|
|
40
40
|
message: string | undefined;
|
|
41
41
|
} & {
|
|
42
|
-
readonly RenderingComponent:
|
|
42
|
+
readonly RenderingComponent: React.FC<{
|
|
43
43
|
model: {
|
|
44
44
|
id: string;
|
|
45
45
|
type: string;
|
|
@@ -60,7 +60,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
60
60
|
onHorizontalScroll?: () => void;
|
|
61
61
|
blockState?: Record<string, any>;
|
|
62
62
|
}>;
|
|
63
|
-
readonly DisplayBlurb:
|
|
63
|
+
readonly DisplayBlurb: React.FC<{
|
|
64
64
|
model: {
|
|
65
65
|
id: string;
|
|
66
66
|
type: string;
|
|
@@ -85,7 +85,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
85
85
|
readonly parentTrack: any;
|
|
86
86
|
renderProps(): any;
|
|
87
87
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
88
|
-
readonly DisplayMessageComponent: undefined |
|
|
88
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
89
89
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
90
90
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
91
91
|
regionCannotBeRendered(): null;
|
|
@@ -122,7 +122,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
122
122
|
error: unknown;
|
|
123
123
|
message: string | undefined;
|
|
124
124
|
} & {
|
|
125
|
-
readonly RenderingComponent:
|
|
125
|
+
readonly RenderingComponent: React.FC<{
|
|
126
126
|
model: {
|
|
127
127
|
id: string;
|
|
128
128
|
type: string;
|
|
@@ -143,7 +143,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
143
143
|
onHorizontalScroll?: () => void;
|
|
144
144
|
blockState?: Record<string, any>;
|
|
145
145
|
}>;
|
|
146
|
-
readonly DisplayBlurb:
|
|
146
|
+
readonly DisplayBlurb: React.FC<{
|
|
147
147
|
model: {
|
|
148
148
|
id: string;
|
|
149
149
|
type: string;
|
|
@@ -168,7 +168,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
168
168
|
readonly parentTrack: any;
|
|
169
169
|
renderProps(): any;
|
|
170
170
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
171
|
-
readonly DisplayMessageComponent: undefined |
|
|
171
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
172
172
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
173
173
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
174
174
|
regionCannotBeRendered(): null;
|
|
@@ -194,7 +194,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
194
194
|
error: unknown;
|
|
195
195
|
message: string | undefined;
|
|
196
196
|
} & {
|
|
197
|
-
readonly RenderingComponent:
|
|
197
|
+
readonly RenderingComponent: React.FC<{
|
|
198
198
|
model: {
|
|
199
199
|
id: string;
|
|
200
200
|
type: string;
|
|
@@ -215,7 +215,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
215
215
|
onHorizontalScroll?: () => void;
|
|
216
216
|
blockState?: Record<string, any>;
|
|
217
217
|
}>;
|
|
218
|
-
readonly DisplayBlurb:
|
|
218
|
+
readonly DisplayBlurb: React.FC<{
|
|
219
219
|
model: {
|
|
220
220
|
id: string;
|
|
221
221
|
type: string;
|
|
@@ -238,7 +238,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
238
238
|
readonly parentTrack: any;
|
|
239
239
|
renderProps(): any;
|
|
240
240
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
241
|
-
readonly DisplayMessageComponent: undefined |
|
|
241
|
+
readonly DisplayMessageComponent: undefined | React.FC<any>;
|
|
242
242
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
243
243
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
244
244
|
regionCannotBeRendered(): null;
|
package/esm/index.js
CHANGED
|
@@ -8,7 +8,6 @@ import LGVSyntenyDisplayF from './LGVSyntenyDisplay';
|
|
|
8
8
|
import LinearSyntenyViewF from './LinearSyntenyView';
|
|
9
9
|
import LaunchLinearSyntenyViewF from './LaunchLinearSyntenyView';
|
|
10
10
|
import SyntenyTrackF from './SyntenyTrack';
|
|
11
|
-
import SyntenyFeatureWidgetF from './SyntenyFeatureDetail';
|
|
12
11
|
import LinearReadVsRefMenuItemF from './LinearReadVsRef';
|
|
13
12
|
export default class LinearComparativeViewPlugin extends Plugin {
|
|
14
13
|
constructor() {
|
|
@@ -23,7 +22,6 @@ export default class LinearComparativeViewPlugin extends Plugin {
|
|
|
23
22
|
LGVSyntenyDisplayF(pluginManager);
|
|
24
23
|
LaunchLinearSyntenyViewF(pluginManager);
|
|
25
24
|
SyntenyTrackF(pluginManager);
|
|
26
|
-
SyntenyFeatureWidgetF(pluginManager);
|
|
27
25
|
LinearReadVsRefMenuItemF(pluginManager);
|
|
28
26
|
}
|
|
29
27
|
configure(pluginManager) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-linear-comparative-view",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.1",
|
|
4
4
|
"description": "JBrowse 2 linear comparative view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@floating-ui/react": "^0.26.3",
|
|
40
|
-
"@mui/icons-material": "^
|
|
40
|
+
"@mui/icons-material": "^6.0.0",
|
|
41
41
|
"clone": "^2.1.2",
|
|
42
42
|
"copy-to-clipboard": "^3.3.1",
|
|
43
43
|
"file-saver": "^2.0.0"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@jbrowse/core": "^2.0.0",
|
|
47
47
|
"@jbrowse/plugin-alignments": "^2.0.0",
|
|
48
48
|
"@jbrowse/plugin-linear-genome-view": "^2.0.0",
|
|
49
|
-
"@mui/material": "^
|
|
49
|
+
"@mui/material": "^6.0.0",
|
|
50
50
|
"mobx": "^6.0.0",
|
|
51
51
|
"mobx-react": "^9.0.0",
|
|
52
52
|
"mobx-state-tree": "^5.0.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "86ed70124fc5a0b1161266659d1ca9f8796bf3fe"
|
|
65
65
|
}
|
|
@@ -1,65 +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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const react_1 = __importStar(require("react"));
|
|
30
|
-
const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
|
|
31
|
-
const material_1 = require("@mui/material");
|
|
32
|
-
const mobx_react_1 = require("mobx-react");
|
|
33
|
-
const BaseFeatureDetail_1 = require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail");
|
|
34
|
-
function Formatter({ value }) {
|
|
35
|
-
const [show, setShow] = (0, react_1.useState)(false);
|
|
36
|
-
const [copied, setCopied] = (0, react_1.useState)(false);
|
|
37
|
-
const display = String(value);
|
|
38
|
-
if (display.length > 100) {
|
|
39
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
40
|
-
react_1.default.createElement("button", { type: "button", onClick: () => {
|
|
41
|
-
(0, copy_to_clipboard_1.default)(display);
|
|
42
|
-
setCopied(true);
|
|
43
|
-
setTimeout(() => {
|
|
44
|
-
setCopied(false);
|
|
45
|
-
}, 700);
|
|
46
|
-
} }, copied ? 'Copied to clipboard' : 'Copy'),
|
|
47
|
-
react_1.default.createElement("button", { type: "button", onClick: () => {
|
|
48
|
-
setShow(val => !val);
|
|
49
|
-
} }, show ? 'Show less' : 'Show more'),
|
|
50
|
-
react_1.default.createElement("div", null, show ? display : `${display.slice(0, 100)}...`)));
|
|
51
|
-
}
|
|
52
|
-
return react_1.default.createElement("div", null, display);
|
|
53
|
-
}
|
|
54
|
-
function CustomFeatureDetails(props) {
|
|
55
|
-
return (react_1.default.createElement(BaseFeatureDetail_1.BaseAttributes, { ...props, formatter: (value) => react_1.default.createElement(Formatter, { value: value }) }));
|
|
56
|
-
}
|
|
57
|
-
const SyntenyFeatureDetail = (0, mobx_react_1.observer)(function ({ model, }) {
|
|
58
|
-
const { feature1, feature2 } = JSON.parse(JSON.stringify(model.featureData));
|
|
59
|
-
return (react_1.default.createElement(material_1.Paper, { "data-testid": "alignment-side-drawer" },
|
|
60
|
-
react_1.default.createElement(BaseFeatureDetail_1.BaseCoreDetails, { title: "Feature 1", feature: feature1 }),
|
|
61
|
-
react_1.default.createElement(BaseFeatureDetail_1.BaseCoreDetails, { title: "Feature 2", feature: feature2 }),
|
|
62
|
-
react_1.default.createElement(CustomFeatureDetails, { feature: feature1 }),
|
|
63
|
-
react_1.default.createElement(CustomFeatureDetails, { feature: feature2 })));
|
|
64
|
-
});
|
|
65
|
-
exports.default = SyntenyFeatureDetail;
|
|
@@ -1,58 +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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.default = SyntenyFeatureWidgetF;
|
|
30
|
-
const react_1 = require("react");
|
|
31
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
32
|
-
const WidgetType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/WidgetType"));
|
|
33
|
-
const mst_1 = require("@jbrowse/core/util/types/mst");
|
|
34
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
35
|
-
const configSchema = (0, configuration_1.ConfigurationSchema)('SyntenyFeatureWidget', {});
|
|
36
|
-
const stateModel = mobx_state_tree_1.types
|
|
37
|
-
.model('SyntenyFeatureWidget', {
|
|
38
|
-
id: mst_1.ElementId,
|
|
39
|
-
type: mobx_state_tree_1.types.literal('SyntenyFeatureWidget'),
|
|
40
|
-
featureData: mobx_state_tree_1.types.frozen(),
|
|
41
|
-
})
|
|
42
|
-
.actions(self => ({
|
|
43
|
-
setFeatureData(data) {
|
|
44
|
-
self.featureData = data;
|
|
45
|
-
},
|
|
46
|
-
clearFeatureData() {
|
|
47
|
-
self.featureData = undefined;
|
|
48
|
-
},
|
|
49
|
-
}));
|
|
50
|
-
function SyntenyFeatureWidgetF(pluginManager) {
|
|
51
|
-
pluginManager.addWidgetType(() => new WidgetType_1.default({
|
|
52
|
-
name: 'SyntenyFeatureWidget',
|
|
53
|
-
heading: 'Synteny feature details',
|
|
54
|
-
configSchema,
|
|
55
|
-
stateModel,
|
|
56
|
-
ReactComponent: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./SyntenyFeatureDetail')))),
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import copy from 'copy-to-clipboard';
|
|
3
|
-
import { Paper } from '@mui/material';
|
|
4
|
-
import { observer } from 'mobx-react';
|
|
5
|
-
import { BaseCoreDetails, BaseAttributes, } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
|
|
6
|
-
function Formatter({ value }) {
|
|
7
|
-
const [show, setShow] = useState(false);
|
|
8
|
-
const [copied, setCopied] = useState(false);
|
|
9
|
-
const display = String(value);
|
|
10
|
-
if (display.length > 100) {
|
|
11
|
-
return (React.createElement(React.Fragment, null,
|
|
12
|
-
React.createElement("button", { type: "button", onClick: () => {
|
|
13
|
-
copy(display);
|
|
14
|
-
setCopied(true);
|
|
15
|
-
setTimeout(() => {
|
|
16
|
-
setCopied(false);
|
|
17
|
-
}, 700);
|
|
18
|
-
} }, copied ? 'Copied to clipboard' : 'Copy'),
|
|
19
|
-
React.createElement("button", { type: "button", onClick: () => {
|
|
20
|
-
setShow(val => !val);
|
|
21
|
-
} }, show ? 'Show less' : 'Show more'),
|
|
22
|
-
React.createElement("div", null, show ? display : `${display.slice(0, 100)}...`)));
|
|
23
|
-
}
|
|
24
|
-
return React.createElement("div", null, display);
|
|
25
|
-
}
|
|
26
|
-
function CustomFeatureDetails(props) {
|
|
27
|
-
return (React.createElement(BaseAttributes, { ...props, formatter: (value) => React.createElement(Formatter, { value: value }) }));
|
|
28
|
-
}
|
|
29
|
-
const SyntenyFeatureDetail = observer(function ({ model, }) {
|
|
30
|
-
const { feature1, feature2 } = JSON.parse(JSON.stringify(model.featureData));
|
|
31
|
-
return (React.createElement(Paper, { "data-testid": "alignment-side-drawer" },
|
|
32
|
-
React.createElement(BaseCoreDetails, { title: "Feature 1", feature: feature1 }),
|
|
33
|
-
React.createElement(BaseCoreDetails, { title: "Feature 2", feature: feature2 }),
|
|
34
|
-
React.createElement(CustomFeatureDetails, { feature: feature1 }),
|
|
35
|
-
React.createElement(CustomFeatureDetails, { feature: feature2 })));
|
|
36
|
-
});
|
|
37
|
-
export default SyntenyFeatureDetail;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { lazy } from 'react';
|
|
2
|
-
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
3
|
-
import WidgetType from '@jbrowse/core/pluggableElementTypes/WidgetType';
|
|
4
|
-
import { ElementId } from '@jbrowse/core/util/types/mst';
|
|
5
|
-
import { types } from 'mobx-state-tree';
|
|
6
|
-
const configSchema = ConfigurationSchema('SyntenyFeatureWidget', {});
|
|
7
|
-
const stateModel = types
|
|
8
|
-
.model('SyntenyFeatureWidget', {
|
|
9
|
-
id: ElementId,
|
|
10
|
-
type: types.literal('SyntenyFeatureWidget'),
|
|
11
|
-
featureData: types.frozen(),
|
|
12
|
-
})
|
|
13
|
-
.actions(self => ({
|
|
14
|
-
setFeatureData(data) {
|
|
15
|
-
self.featureData = data;
|
|
16
|
-
},
|
|
17
|
-
clearFeatureData() {
|
|
18
|
-
self.featureData = undefined;
|
|
19
|
-
},
|
|
20
|
-
}));
|
|
21
|
-
export default function SyntenyFeatureWidgetF(pluginManager) {
|
|
22
|
-
pluginManager.addWidgetType(() => new WidgetType({
|
|
23
|
-
name: 'SyntenyFeatureWidget',
|
|
24
|
-
heading: 'Synteny feature details',
|
|
25
|
-
configSchema,
|
|
26
|
-
stateModel,
|
|
27
|
-
ReactComponent: lazy(() => import('./SyntenyFeatureDetail')),
|
|
28
|
-
}));
|
|
29
|
-
}
|