@jbrowse/plugin-alignments 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.
Files changed (66) hide show
  1. package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +29 -3
  2. package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.d.ts +1 -0
  3. package/dist/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +6 -0
  4. package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.d.ts +1 -0
  5. package/dist/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +6 -0
  6. package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +9 -0
  7. package/dist/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +92 -0
  8. package/dist/AlignmentsFeatureDetail/{LaunchBreakpointSplitViewPanel.js → LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js} +43 -18
  9. package/dist/AlignmentsFeatureDetail/{SuppAlignments.d.ts → LinkedPairedAlignments.d.ts} +0 -1
  10. package/dist/AlignmentsFeatureDetail/{SuppAlignments.js → LinkedPairedAlignments.js} +3 -6
  11. package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +8 -0
  12. package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.js +26 -0
  13. package/{esm/AlignmentsFeatureDetail/SuppAlignmentsLocStrings.d.ts → dist/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts} +1 -1
  14. package/dist/AlignmentsFeatureDetail/{SuppAlignmentsLocStrings.js → SupplementaryAlignmentsLocStrings.js} +2 -2
  15. package/dist/LinearAlignmentsDisplay/models/alignmentsModel.js +1 -2
  16. package/dist/LinearAlignmentsDisplay/models/util.js +2 -4
  17. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +20 -19
  18. package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +35 -19
  19. package/dist/LinearPileupDisplay/components/SetMaxHeightDialog.js +2 -2
  20. package/dist/LinearPileupDisplay/model.d.ts +29 -26
  21. package/dist/LinearPileupDisplay/model.js +33 -28
  22. package/dist/LinearReadArcsDisplay/index.js +25 -2
  23. package/dist/LinearReadCloudDisplay/index.js +25 -2
  24. package/dist/LinearSNPCoverageDisplay/models/model.d.ts +4 -4
  25. package/dist/LinearSNPCoverageDisplay/models/model.js +27 -2
  26. package/dist/MismatchParser/index.js +1 -1
  27. package/dist/PileupRenderer/PileupRenderer.d.ts +1 -1
  28. package/dist/shared/color.d.ts +3 -0
  29. package/dist/shared/color.js +21 -10
  30. package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +6 -3
  31. package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.d.ts +1 -0
  32. package/esm/AlignmentsFeatureDetail/BreakendMultiLevelOptionDialog.js +2 -0
  33. package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.d.ts +1 -0
  34. package/esm/AlignmentsFeatureDetail/BreakendSingleLevelOptionDialog.js +2 -0
  35. package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.d.ts +9 -0
  36. package/esm/AlignmentsFeatureDetail/LaunchPairedEndBreakpointSplitViewPanel.js +66 -0
  37. package/esm/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.js +84 -0
  38. package/esm/AlignmentsFeatureDetail/{SuppAlignments.d.ts → LinkedPairedAlignments.d.ts} +0 -1
  39. package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.js +17 -0
  40. package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.d.ts +8 -0
  41. package/esm/AlignmentsFeatureDetail/{SuppAlignments.js → SupplementaryAlignments.js} +4 -4
  42. package/{dist/AlignmentsFeatureDetail/SuppAlignmentsLocStrings.d.ts → esm/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.d.ts} +1 -1
  43. package/esm/AlignmentsFeatureDetail/{SuppAlignmentsLocStrings.js → SupplementaryAlignmentsLocStrings.js} +1 -1
  44. package/esm/LinearAlignmentsDisplay/models/alignmentsModel.js +1 -2
  45. package/esm/LinearAlignmentsDisplay/models/util.js +2 -4
  46. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +20 -19
  47. package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +36 -20
  48. package/esm/LinearPileupDisplay/components/SetMaxHeightDialog.js +2 -2
  49. package/esm/LinearPileupDisplay/model.d.ts +29 -26
  50. package/esm/LinearPileupDisplay/model.js +33 -28
  51. package/esm/LinearReadArcsDisplay/index.js +2 -2
  52. package/esm/LinearReadCloudDisplay/index.js +2 -2
  53. package/esm/LinearSNPCoverageDisplay/models/model.d.ts +4 -4
  54. package/esm/LinearSNPCoverageDisplay/models/model.js +3 -1
  55. package/esm/MismatchParser/index.js +1 -1
  56. package/esm/PileupRenderer/PileupRenderer.d.ts +1 -1
  57. package/esm/shared/color.d.ts +3 -0
  58. package/esm/shared/color.js +20 -10
  59. package/package.json +5 -4
  60. package/dist/AlignmentsFeatureDetail/BreakendOptionDialog.d.ts +0 -12
  61. package/dist/AlignmentsFeatureDetail/BreakendOptionDialog.js +0 -97
  62. package/esm/AlignmentsFeatureDetail/BreakendOptionDialog.d.ts +0 -12
  63. package/esm/AlignmentsFeatureDetail/BreakendOptionDialog.js +0 -72
  64. package/esm/AlignmentsFeatureDetail/LaunchBreakpointSplitViewPanel.js +0 -59
  65. /package/dist/AlignmentsFeatureDetail/{LaunchBreakpointSplitViewPanel.d.ts → LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts} +0 -0
  66. /package/esm/AlignmentsFeatureDetail/{LaunchBreakpointSplitViewPanel.d.ts → LaunchSupplementaryAlignmentBreakpointSplitViewPanel.d.ts} +0 -0
@@ -0,0 +1,84 @@
1
+ import React, { lazy, useEffect, useState } from 'react';
2
+ import { Typography, Link } from '@mui/material';
3
+ import { SimpleFeature, getSession, toLocale, } from '@jbrowse/core/util';
4
+ import { ErrorMessage } from '@jbrowse/core/ui';
5
+ import { getSAFeatures } from './getSAFeatures';
6
+ // lazies
7
+ const BreakendMultiLevelOptionDialog = lazy(() => import('./BreakendMultiLevelOptionDialog'));
8
+ const BreakendSingleLevelOptionDialog = lazy(() => import('./BreakendSingleLevelOptionDialog'));
9
+ export default function LaunchBreakpointSplitViewPanel({ model, feature, viewType, }) {
10
+ const session = getSession(model);
11
+ const { view } = model;
12
+ const [res, setRes] = useState();
13
+ const [error, setError] = useState();
14
+ useEffect(() => {
15
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
16
+ ;
17
+ (async () => {
18
+ try {
19
+ const feats = await getSAFeatures({
20
+ view,
21
+ feature: new SimpleFeature(feature),
22
+ });
23
+ setRes(feats);
24
+ }
25
+ catch (e) {
26
+ setError(e);
27
+ console.error(e);
28
+ }
29
+ })();
30
+ }, [feature, view]);
31
+ const ret = [];
32
+ if (res) {
33
+ for (let i = 0; i < res.length - 1; i++) {
34
+ ret.push([res[i], res[i + 1]]);
35
+ }
36
+ }
37
+ return ret.length ? (React.createElement("div", null,
38
+ React.createElement(Typography, null, "Launch split view"),
39
+ error ? React.createElement(ErrorMessage, { error: error }) : null,
40
+ React.createElement("ul", null, ret.map((arg, index) => {
41
+ const [f1, f2] = arg;
42
+ return (React.createElement("li", { key: `${JSON.stringify(arg)}-${index}` },
43
+ f1.refName,
44
+ ":",
45
+ toLocale(f1.strand === 1 ? f1.end : f1.start),
46
+ " ->",
47
+ ' ',
48
+ f2.refName,
49
+ ":",
50
+ toLocale(f2.strand === 1 ? f2.start : f2.end),
51
+ ' ',
52
+ React.createElement(Link, { href: "#", onClick: event => {
53
+ event.preventDefault();
54
+ session.queueDialog(handleClose => [
55
+ BreakendMultiLevelOptionDialog,
56
+ {
57
+ handleClose,
58
+ model,
59
+ feature: new SimpleFeature({ ...f1, mate: f2 }),
60
+ // @ts-expect-error
61
+ viewType,
62
+ view: model.view,
63
+ assemblyName: model.view.displayedRegions[0].assemblyName,
64
+ },
65
+ ]);
66
+ } }, "(top/bottom)"),
67
+ ' ',
68
+ React.createElement(Link, { href: "#", onClick: event => {
69
+ event.preventDefault();
70
+ session.queueDialog(handleClose => [
71
+ BreakendSingleLevelOptionDialog,
72
+ {
73
+ handleClose,
74
+ model,
75
+ feature: new SimpleFeature({ ...f1, mate: f2 }),
76
+ // @ts-expect-error
77
+ viewType,
78
+ view: model.view,
79
+ assemblyName: model.view.displayedRegions[0].assemblyName,
80
+ },
81
+ ]);
82
+ } }, "(single row)")));
83
+ })))) : null;
84
+ }
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { SimpleFeatureSerialized } from '@jbrowse/core/util';
3
3
  import { AlignmentFeatureWidgetModel } from './stateModelFactory';
4
4
  export default function SuppAlignments(props: {
5
- tag: string;
6
5
  model: AlignmentFeatureWidgetModel;
7
6
  feature: SimpleFeatureSerialized;
8
7
  }): React.JSX.Element;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
3
+ import { getEnv, getSession } from '@jbrowse/core/util';
4
+ import LaunchPairedEndBreakpointSplitViewPanel from './LaunchPairedEndBreakpointSplitViewPanel';
5
+ export default function SuppAlignments(props) {
6
+ const { model, feature } = props;
7
+ const session = getSession(model);
8
+ const { pluginManager } = getEnv(session);
9
+ let viewType;
10
+ try {
11
+ viewType = pluginManager.getViewType('BreakpointSplitView');
12
+ }
13
+ catch (e) {
14
+ // ignore
15
+ }
16
+ return (React.createElement(BaseCard, { ...props, title: "Supplementary alignments" }, viewType ? (React.createElement(LaunchPairedEndBreakpointSplitViewPanel, { viewType: viewType, model: model, feature: feature })) : null));
17
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { SimpleFeatureSerialized } from '@jbrowse/core/util';
3
+ import { AlignmentFeatureWidgetModel } from './stateModelFactory';
4
+ export default function SupplementaryAlignments(props: {
5
+ tag: string;
6
+ model: AlignmentFeatureWidgetModel;
7
+ feature: SimpleFeatureSerialized;
8
+ }): React.JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
3
3
  import { getEnv, getSession } from '@jbrowse/core/util';
4
- import SuppAlignmentsLocStrings from './SuppAlignmentsLocStrings';
5
- import LaunchBreakpointSplitViewPanel from './LaunchBreakpointSplitViewPanel';
6
- export default function SuppAlignments(props) {
4
+ import SupplementaryAlignmentsLocStrings from './SupplementaryAlignmentsLocStrings';
5
+ import LaunchBreakpointSplitViewPanel from './LaunchSupplementaryAlignmentBreakpointSplitViewPanel';
6
+ export default function SupplementaryAlignments(props) {
7
7
  const { model, tag, feature } = props;
8
8
  const session = getSession(model);
9
9
  const { pluginManager } = getEnv(session);
@@ -15,6 +15,6 @@ export default function SuppAlignments(props) {
15
15
  // ignore
16
16
  }
17
17
  return (React.createElement(BaseCard, { ...props, title: "Supplementary alignments" },
18
- React.createElement(SuppAlignmentsLocStrings, { model: model, tag: tag }),
18
+ React.createElement(SupplementaryAlignmentsLocStrings, { model: model, tag: tag }),
19
19
  viewType ? (React.createElement(LaunchBreakpointSplitViewPanel, { viewType: viewType, model: model, feature: feature })) : null));
20
20
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AlignmentFeatureWidgetModel } from './stateModelFactory';
3
- export default function SuppAlignmentsLocStrings({ tag, model, }: {
3
+ export default function SupplementaryAlignmentsLocStrings({ tag, model, }: {
4
4
  tag: string;
5
5
  model: AlignmentFeatureWidgetModel;
6
6
  }): React.JSX.Element;
@@ -3,7 +3,7 @@ import { Typography, Link } from '@mui/material';
3
3
  // locals
4
4
  import { getLengthOnRef } from '../MismatchParser';
5
5
  import { navToLoc } from './util';
6
- export default function SuppAlignmentsLocStrings({ tag, model, }) {
6
+ export default function SupplementaryAlignmentsLocStrings({ tag, model, }) {
7
7
  return (React.createElement("div", null,
8
8
  React.createElement(Typography, null, "List of supplementary alignment locations"),
9
9
  React.createElement("ul", null, tag
@@ -6,13 +6,12 @@ import { getLowerPanelDisplays } from './util';
6
6
  * #stateModel LinearAlignmentsDisplayMixin
7
7
  */
8
8
  export function LinearAlignmentsDisplayMixin(pluginManager, configSchema) {
9
- const lowerPanelDisplays = getLowerPanelDisplays(pluginManager).map(f => f.stateModel);
10
9
  return types.model({
11
10
  /**
12
11
  * #property
13
12
  * refers to LinearPileupDisplay sub-display model
14
13
  */
15
- PileupDisplay: types.maybe(types.union(...lowerPanelDisplays)),
14
+ PileupDisplay: types.maybe(types.union(...getLowerPanelDisplays(pluginManager).map(f => f.stateModel))),
16
15
  /**
17
16
  * #property
18
17
  * refers to LinearSNPCoverageDisplay sub-display model
@@ -1,8 +1,6 @@
1
1
  export function getLowerPanelDisplays(pluginManager) {
2
- return (pluginManager
2
+ return pluginManager
3
3
  .getDisplayElements()
4
- // @ts-expect-error
5
4
  .filter(f => { var _a; return ((_a = f.subDisplay) === null || _a === void 0 ? void 0 : _a.type) === 'LinearAlignmentsDisplay'; })
6
- // @ts-expect-error
7
- .filter(f => { var _a; return (_a = f.subDisplay) === null || _a === void 0 ? void 0 : _a.lowerPanel; }));
5
+ .filter(f => { var _a; return (_a = f.subDisplay) === null || _a === void 0 ? void 0 : _a.lowerPanel; });
8
6
  }
@@ -37,7 +37,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
37
37
  }, {
38
38
  renderInProgress: AbortController | undefined;
39
39
  filled: boolean;
40
- reactElement: import("react").ReactElement | undefined;
40
+ reactElement: React.ReactElement | undefined;
41
41
  features: Map<string, Feature> | undefined;
42
42
  layout: any;
43
43
  status: string;
@@ -48,10 +48,10 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
48
48
  model: {
49
49
  error?: unknown;
50
50
  reload: () => void;
51
- message: import("react").ReactNode;
51
+ message: React.ReactNode;
52
52
  filled?: boolean;
53
53
  status?: string;
54
- reactElement?: import("react").ReactElement;
54
+ reactElement?: React.ReactElement;
55
55
  };
56
56
  }) => import("react").JSX.Element | undefined;
57
57
  renderProps: any;
@@ -62,7 +62,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
62
62
  setLoading(abortController: AbortController): void;
63
63
  setMessage(messageText: string): void;
64
64
  setRendered(props: {
65
- reactElement: import("react").ReactElement;
65
+ reactElement: React.ReactElement;
66
66
  features: Map<string, Feature>;
67
67
  layout: any;
68
68
  maxHeightReached: boolean;
@@ -150,7 +150,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
150
150
  error: unknown;
151
151
  message: string | undefined;
152
152
  } & {
153
- readonly RenderingComponent: import("react").FC<{
153
+ readonly RenderingComponent: React.FC<{
154
154
  model: {
155
155
  id: string;
156
156
  type: string;
@@ -171,7 +171,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
171
171
  onHorizontalScroll?: () => void;
172
172
  blockState?: Record<string, any>;
173
173
  }>;
174
- readonly DisplayBlurb: import("react").FC<{
174
+ readonly DisplayBlurb: React.FC<{
175
175
  model: {
176
176
  id: string;
177
177
  type: string;
@@ -181,9 +181,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
181
181
  error: unknown;
182
182
  message: string | undefined;
183
183
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
184
- id: import("mobx-state-tree" /**
185
- * #property
186
- */).IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
184
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
187
185
  type: import("mobx-state-tree").ISimpleType<string>;
188
186
  rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
189
187
  }, {
@@ -196,7 +194,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
196
194
  readonly parentTrack: any;
197
195
  renderProps(): any;
198
196
  readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
199
- readonly DisplayMessageComponent: undefined | import("react").FC<any>;
197
+ readonly DisplayMessageComponent: undefined | React.FC<any>;
200
198
  trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
201
199
  readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
202
200
  regionCannotBeRendered(): null;
@@ -242,13 +240,13 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
242
240
  featureIdUnderMouse: undefined | string;
243
241
  contextMenuFeature: undefined | Feature;
244
242
  } & {
243
+ readonly DisplayMessageComponent: import("react").FC<any> | undefined;
245
244
  readonly blockType: "dynamicBlocks" | "staticBlocks";
246
245
  readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
247
246
  } & {
248
247
  readonly renderDelay: number;
249
- readonly TooltipComponent: import("react").FC<any>;
248
+ readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
250
249
  readonly selectedFeatureId: string | undefined;
251
- readonly DisplayMessageComponent: undefined | import("react").FC<any>;
252
250
  } & {
253
251
  readonly features: import("@jbrowse/core/util/compositeMap").default<string, Feature>;
254
252
  readonly featureUnderMouse: Feature | undefined;
@@ -345,7 +343,11 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
345
343
  setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
346
344
  [x: string]: any;
347
345
  } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
348
- } & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
346
+ } & import("mobx-state-tree" /**
347
+ * #stateModel SharedLinearPileupDisplayMixin
348
+ * #category display
349
+ * extends `BaseLinearDisplay`
350
+ */).IStateTreeNode<AnyConfigurationSchemaType>);
349
351
  } & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
350
352
  } & {
351
353
  /**
@@ -419,7 +421,6 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
419
421
  icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
420
422
  muiName: string;
421
423
  };
422
- priority: number;
423
424
  onClick: () => void;
424
425
  })[];
425
426
  } & {
@@ -456,7 +457,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
456
457
  }, {
457
458
  renderInProgress: AbortController | undefined;
458
459
  filled: boolean;
459
- reactElement: import("react").ReactElement | undefined;
460
+ reactElement: React.ReactElement | undefined;
460
461
  features: Map<string, Feature> | undefined;
461
462
  layout: any;
462
463
  status: string;
@@ -467,10 +468,10 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
467
468
  model: {
468
469
  error?: unknown;
469
470
  reload: () => void;
470
- message: import("react").ReactNode;
471
+ message: React.ReactNode;
471
472
  filled?: boolean;
472
473
  status?: string;
473
- reactElement?: import("react").ReactElement;
474
+ reactElement?: React.ReactElement;
474
475
  };
475
476
  }) => import("react").JSX.Element | undefined;
476
477
  renderProps: any;
@@ -481,7 +482,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
481
482
  setLoading(abortController: AbortController): void;
482
483
  setMessage(messageText: string): void;
483
484
  setRendered(props: {
484
- reactElement: import("react").ReactElement;
485
+ reactElement: React.ReactElement;
485
486
  features: Map<string, Feature>;
486
487
  layout: any;
487
488
  maxHeightReached: boolean;
@@ -523,8 +524,8 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
523
524
  type: string;
524
525
  id: string;
525
526
  configuration: import("mobx-state-tree").ModelSnapshotType<Record<string, any>>;
526
- rpcDriverName: string | undefined;
527
527
  heightPreConfig: number | undefined;
528
+ rpcDriverName: string | undefined;
528
529
  userBpPerPxLimit: number | undefined;
529
530
  userByteSizeLimit: number | undefined;
530
531
  } & import("mobx-state-tree")._NotCustomized>;
@@ -5,7 +5,7 @@ import copy from 'copy-to-clipboard';
5
5
  import { ConfigurationReference, readConfObject, getConf, } from '@jbrowse/core/configuration';
6
6
  import SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
7
7
  import { getRpcSessionId } from '@jbrowse/core/util/tracks';
8
- import { getEnv, getSession, isSessionModelWithWidgets, getContainingView, SimpleFeature, } from '@jbrowse/core/util';
8
+ import { getEnv, getSession, isSessionModelWithWidgets, getContainingView, SimpleFeature, getContainingTrack, } from '@jbrowse/core/util';
9
9
  import { BaseLinearDisplay, } from '@jbrowse/plugin-linear-genome-view';
10
10
  // icons
11
11
  import { ContentCopy as ContentCopyIcon } from '@jbrowse/core/ui/Icons';
@@ -153,7 +153,11 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
153
153
  selectFeature(feature) {
154
154
  const session = getSession(self);
155
155
  if (isSessionModelWithWidgets(session)) {
156
- const featureWidget = session.addWidget('AlignmentsFeatureWidget', 'alignmentFeature', { featureData: feature.toJSON(), view: getContainingView(self) });
156
+ const featureWidget = session.addWidget('AlignmentsFeatureWidget', 'alignmentFeature', {
157
+ featureData: feature.toJSON(),
158
+ view: getContainingView(self),
159
+ track: getContainingTrack(self),
160
+ });
157
161
  session.showWidget(featureWidget);
158
162
  }
159
163
  session.setSelection(feature);
@@ -399,9 +403,12 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
399
403
  {
400
404
  label: 'Color by tag...',
401
405
  onClick: () => {
402
- getSession(self).queueDialog(doneCallback => [
406
+ getSession(self).queueDialog(handleClose => [
403
407
  ColorByTagDialog,
404
- { model: self, handleClose: doneCallback },
408
+ {
409
+ model: self,
410
+ handleClose,
411
+ },
405
412
  ]);
406
413
  },
407
414
  },
@@ -413,20 +420,9 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
413
420
  trackMenuItems() {
414
421
  return [
415
422
  ...superTrackMenuItems(),
416
- {
417
- label: 'Filter by...',
418
- icon: FilterListIcon,
419
- priority: -1,
420
- onClick: () => {
421
- getSession(self).queueDialog(doneCallback => [
422
- FilterByTagDialog,
423
- { model: self, handleClose: doneCallback },
424
- ]);
425
- },
426
- },
427
423
  {
428
424
  label: 'Set feature height...',
429
- priority: -1,
425
+ priority: 1,
430
426
  subMenu: [
431
427
  {
432
428
  label: 'Normal',
@@ -445,9 +441,12 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
445
441
  {
446
442
  label: 'Manually set height',
447
443
  onClick: () => {
448
- getSession(self).queueDialog(doneCallback => [
444
+ getSession(self).queueDialog(handleClose => [
449
445
  SetFeatureHeightDialog,
450
- { model: self, handleClose: doneCallback },
446
+ {
447
+ model: self,
448
+ handleClose,
449
+ },
451
450
  ]);
452
451
  },
453
452
  },
@@ -455,10 +454,27 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
455
454
  },
456
455
  {
457
456
  label: 'Set max height...',
457
+ priority: -1,
458
458
  onClick: () => {
459
- getSession(self).queueDialog(doneCallback => [
459
+ getSession(self).queueDialog(handleClose => [
460
460
  SetMaxHeightDialog,
461
- { model: self, handleClose: doneCallback },
461
+ {
462
+ model: self,
463
+ handleClose,
464
+ },
465
+ ]);
466
+ },
467
+ },
468
+ {
469
+ label: 'Filter by...',
470
+ icon: FilterListIcon,
471
+ onClick: () => {
472
+ getSession(self).queueDialog(handleClose => [
473
+ FilterByTagDialog,
474
+ {
475
+ model: self,
476
+ handleClose,
477
+ },
462
478
  ]);
463
479
  },
464
480
  },
@@ -13,10 +13,10 @@ const SetMaxHeightDialog = observer(function (props) {
13
13
  const { classes } = useStyles();
14
14
  const { maxHeight = '' } = model;
15
15
  const [max, setMax] = useState(`${maxHeight}`);
16
- return (React.createElement(Dialog, { open: true, onClose: handleClose, title: "Filter options" },
16
+ return (React.createElement(Dialog, { open: true, onClose: handleClose, title: "Set max height" },
17
17
  React.createElement(DialogContent, { className: classes.root },
18
18
  React.createElement(Typography, null, "Set max height for the track. For example, you can increase this if the layout says \"Max height reached\""),
19
- React.createElement(TextField, { value: max, onChange: event => {
19
+ React.createElement(TextField, { value: max, autoFocus: true, onChange: event => {
20
20
  setMax(event.target.value);
21
21
  }, placeholder: "Enter max height for layout" }),
22
22
  React.createElement(DialogActions, null,
@@ -34,7 +34,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
34
34
  }, {
35
35
  renderInProgress: AbortController | undefined;
36
36
  filled: boolean;
37
- reactElement: import("react").ReactElement | undefined;
37
+ reactElement: React.ReactElement | undefined;
38
38
  features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
39
39
  layout: any;
40
40
  status: string;
@@ -45,12 +45,12 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
45
45
  model: {
46
46
  error?: unknown;
47
47
  reload: () => void;
48
- message: import("react").ReactNode;
48
+ message: React.ReactNode;
49
49
  filled?: boolean;
50
50
  status?: string;
51
51
  reactElement? /**
52
52
  * #property
53
- */: import("react").ReactElement;
53
+ */: React.ReactElement;
54
54
  };
55
55
  }) => import("react").JSX.Element | undefined;
56
56
  renderProps: any;
@@ -61,7 +61,11 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
61
61
  setLoading(abortController: AbortController): void;
62
62
  setMessage(messageText: string): void;
63
63
  setRendered(props: {
64
- reactElement: import("react").ReactElement;
64
+ reactElement: React.
65
+ /**
66
+ * #action
67
+ */
68
+ ReactElement;
65
69
  features: Map<string, import("@jbrowse/core/util").Feature>;
66
70
  layout: any;
67
71
  maxHeightReached: boolean;
@@ -137,7 +141,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
137
141
  error: unknown;
138
142
  message: string | undefined;
139
143
  } & {
140
- readonly RenderingComponent: import("react").FC<{
144
+ readonly RenderingComponent: React.FC<{
141
145
  model: {
142
146
  id: string;
143
147
  type: string;
@@ -160,7 +164,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
160
164
  onHorizontalScroll?: () => void;
161
165
  blockState?: Record<string, any>;
162
166
  }>;
163
- readonly DisplayBlurb: import("react").FC<{
167
+ readonly DisplayBlurb: React.FC<{
164
168
  model: {
165
169
  id: string;
166
170
  type: string;
@@ -185,7 +189,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
185
189
  readonly parentTrack: any;
186
190
  renderProps(): any;
187
191
  readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
188
- readonly DisplayMessageComponent: undefined | import("react").FC<any>;
192
+ readonly DisplayMessageComponent: undefined | React.FC<any>;
189
193
  trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
190
194
  readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
191
195
  regionCannotBeRendered(): null;
@@ -231,13 +235,13 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
231
235
  featureIdUnderMouse: undefined | string;
232
236
  contextMenuFeature: undefined | import("@jbrowse/core/util").Feature;
233
237
  } & {
238
+ readonly DisplayMessageComponent: import("react").FC<any> | undefined;
234
239
  readonly blockType: "dynamicBlocks" | "staticBlocks";
235
240
  readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
236
241
  } & {
237
242
  readonly renderDelay: number;
238
- readonly TooltipComponent: import("react").FC<any>;
243
+ readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
239
244
  readonly selectedFeatureId: string | undefined;
240
- readonly DisplayMessageComponent: undefined | import("react").FC<any>;
241
245
  } & {
242
246
  readonly features: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/core/util").Feature>;
243
247
  readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
@@ -335,7 +339,6 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
335
339
  icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
336
340
  muiName: string;
337
341
  };
338
- priority: number;
339
342
  onClick: () => void;
340
343
  })[];
341
344
  } & {
@@ -428,6 +431,22 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
428
431
  * #method
429
432
  */
430
433
  trackMenuItems(): readonly [...import("@jbrowse/core/ui").MenuItem[], {
434
+ readonly label: "Sort by...";
435
+ readonly icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
436
+ muiName: string;
437
+ };
438
+ readonly disabled: boolean;
439
+ readonly subMenu: readonly [...{
440
+ label: string;
441
+ onClick: () => void;
442
+ }[], {
443
+ readonly label: "Sort by tag...";
444
+ readonly onClick: () => void;
445
+ }, {
446
+ readonly label: "Clear sort";
447
+ readonly onClick: () => void;
448
+ }];
449
+ }, {
431
450
  readonly label: "Color by...";
432
451
  readonly icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
433
452
  muiName: string;
@@ -445,22 +464,6 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
445
464
  label: string;
446
465
  onClick: () => void;
447
466
  }[]];
448
- }, {
449
- readonly label: "Sort by...";
450
- readonly icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
451
- muiName: string;
452
- };
453
- readonly disabled: boolean;
454
- readonly subMenu: readonly [...{
455
- label: string;
456
- onClick: () => void;
457
- }[], {
458
- readonly label: "Sort by tag...";
459
- readonly onClick: () => void;
460
- }, {
461
- readonly label: "Clear sort";
462
- readonly onClick: () => void;
463
- }];
464
467
  }, {
465
468
  readonly label: "Group by...";
466
469
  readonly icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {