@jbrowse/plugin-alignments 2.10.3 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,4 +6,4 @@ export default function LaunchBreakpointSplitViewPanel({ model, feature, viewTyp
6
6
  model: AlignmentFeatureWidgetModel;
7
7
  feature: SimpleFeatureSerialized;
8
8
  viewType: ViewType;
9
- }): React.JSX.Element;
9
+ }): React.JSX.Element | null;
@@ -65,7 +65,7 @@ function LaunchBreakpointSplitViewPanel({ model, feature, viewType, }) {
65
65
  ret.push([res[i], res[i + 1]]);
66
66
  }
67
67
  }
68
- return (react_1.default.createElement(react_1.default.Fragment, null, ret.length ? (react_1.default.createElement("div", null,
68
+ return ret.length ? (react_1.default.createElement("div", null,
69
69
  react_1.default.createElement(material_1.Typography, null, "Launch split views with breakend source and target"),
70
70
  error ? react_1.default.createElement(ui_1.ErrorMessage, { error: error }) : null,
71
71
  react_1.default.createElement("ul", null, ret.map((arg, index) => {
@@ -82,11 +82,11 @@ function LaunchBreakpointSplitViewPanel({ model, feature, viewType, }) {
82
82
  f1.refName,
83
83
  ":",
84
84
  (0, util_1.toLocale)(f1.strand === 1 ? f1.end : f1.start),
85
- " ->",
86
85
  ' ',
86
+ "-> ",
87
87
  f2.refName,
88
88
  ":",
89
89
  (0, util_1.toLocale)(f2.strand === 1 ? f2.start : f2.end)))));
90
- })))) : null));
90
+ })))) : null;
91
91
  }
92
92
  exports.default = LaunchBreakpointSplitViewPanel;
@@ -538,7 +538,7 @@ function SharedLinearPileupDisplayMixin(configSchema) {
538
538
  }
539
539
  catch (e) {
540
540
  console.error(e);
541
- session.notify(`${e}`, 'error');
541
+ session.notifyError(`${e}`, e);
542
542
  }
543
543
  }));
544
544
  },
@@ -8,7 +8,7 @@ declare const ColorByModificationsDialog: ({ model, handleClose, }: {
8
8
  modificationTagMap: ObservableMap<string, string>;
9
9
  colorBy?: {
10
10
  type: string;
11
- } | undefined;
11
+ };
12
12
  };
13
13
  handleClose: () => void;
14
14
  }) => React.JSX.Element;
@@ -4,7 +4,7 @@ declare const SetFeatureHeightDialog: (props: {
4
4
  setFeatureHeight: (arg?: number) => void;
5
5
  setNoSpacing: (arg?: boolean) => void;
6
6
  featureHeightSetting: number;
7
- noSpacing?: boolean | undefined;
7
+ noSpacing?: boolean;
8
8
  };
9
9
  handleClose: () => void;
10
10
  }) => React.JSX.Element;
@@ -5,7 +5,7 @@ import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
5
5
  * #stateModel LinearPileupDisplay
6
6
  * #category display
7
7
  * extends
8
- *- [SharedLinearPileupDisplayMixin](../sharedlinearpileupdisplaymixin)
8
+ * - [SharedLinearPileupDisplayMixin](../sharedlinearpileupdisplaymixin)
9
9
  */
10
10
  declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
11
11
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
@@ -96,16 +96,15 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
96
96
  } & {
97
97
  configuration: AnyConfigurationSchemaType;
98
98
  featureHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
99
- /**
100
- * #action
101
- */
102
99
  noSpacing: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
103
100
  fadeLikelihood: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
104
101
  trackMaxHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
105
102
  colorBy: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
106
103
  type: import("mobx-state-tree").ISimpleType<string>;
107
104
  tag: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
108
- extra: import("mobx-state-tree").IType<any, any, any>;
105
+ extra: import("mobx-state-tree").IType<any, any, any>; /**
106
+ * #action
107
+ */
109
108
  }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
110
109
  filterBy: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
111
110
  flagInclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
@@ -185,9 +184,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
185
184
  readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
186
185
  regionCannotBeRendered(): null;
187
186
  } & {
188
- setMessage(arg?: string | undefined): void; /**
189
- * #getter
190
- */
187
+ setMessage(arg?: string | undefined): void;
191
188
  setError(error?: unknown): void;
192
189
  setRpcDriverName(rpcDriverName: string): void;
193
190
  reload(): void;
@@ -237,7 +234,9 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
237
234
  readonly DisplayMessageComponent: import("react").FC<any> | undefined;
238
235
  } & {
239
236
  readonly features: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/core/util").Feature>;
240
- readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
237
+ readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined; /**
238
+ * #getter
239
+ */
241
240
  getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
242
241
  getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
243
242
  searchFeatureByID(id: string): [number, number, number, number] | undefined;
@@ -246,7 +245,9 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
246
245
  deleteBlock(key: string): void;
247
246
  selectFeature(feature: import("@jbrowse/core/util").Feature): void;
248
247
  clearFeatureSelection(): void;
249
- setFeatureIdUnderMouse(feature?: string | undefined): void;
248
+ setFeatureIdUnderMouse(feature?: string | undefined): void; /**
249
+ * #method
250
+ */
250
251
  setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature | undefined): void;
251
252
  } & {
252
253
  reload(): Promise<void>;
@@ -375,6 +376,12 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
375
376
  * #action
376
377
  */
377
378
  setSortedBy(type: string, tag?: string): void;
379
+ /**
380
+ * #action
381
+ * overrides base from SharedLinearPileupDisplay to make sortReady false
382
+ * since changing feature height destroys the sort-induced layout
383
+ */
384
+ setFeatureHeight(n?: number): void;
378
385
  } & {
379
386
  /**
380
387
  * #action
@@ -39,14 +39,14 @@ const Sort_1 = __importDefault(require("@mui/icons-material/Sort"));
39
39
  // locals
40
40
  const SharedLinearPileupDisplayMixin_1 = require("./SharedLinearPileupDisplayMixin");
41
41
  const mobx_1 = require("mobx");
42
- // async
42
+ // lzies
43
43
  const SortByTagDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/SortByTag'))));
44
44
  const ModificationsDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/ColorByModifications'))));
45
45
  /**
46
46
  * #stateModel LinearPileupDisplay
47
47
  * #category display
48
48
  * extends
49
- *- [SharedLinearPileupDisplayMixin](../sharedlinearpileupdisplaymixin)
49
+ * - [SharedLinearPileupDisplayMixin](../sharedlinearpileupdisplaymixin)
50
50
  */
51
51
  function stateModelFactory(configSchema) {
52
52
  return mobx_state_tree_1.types
@@ -153,6 +153,15 @@ function stateModelFactory(configSchema) {
153
153
  tag,
154
154
  };
155
155
  },
156
+ /**
157
+ * #action
158
+ * overrides base from SharedLinearPileupDisplay to make sortReady false
159
+ * since changing feature height destroys the sort-induced layout
160
+ */
161
+ setFeatureHeight(n) {
162
+ self.sortReady = false;
163
+ self.featureHeight = n;
164
+ },
156
165
  }))
157
166
  .actions(self => {
158
167
  // resets the sort object and refresh whole display on reload
@@ -12,16 +12,16 @@ declare const PileupRendering: (props: {
12
12
  type: string;
13
13
  pos: number;
14
14
  refName: string;
15
- } | undefined;
15
+ };
16
16
  colorBy?: {
17
17
  type: string;
18
- tag?: string | undefined;
19
- } | undefined;
18
+ tag?: string;
19
+ };
20
20
  filterBy?: {
21
21
  tagFilter?: {
22
22
  tag: string;
23
- } | undefined;
24
- } | undefined;
25
- onMouseMove?: ((event: React.MouseEvent, featureId?: string) => void) | undefined;
23
+ };
24
+ };
25
+ onMouseMove?: (event: React.MouseEvent, featureId?: string) => void;
26
26
  }) => React.JSX.Element;
27
27
  export default PileupRendering;
@@ -6,4 +6,4 @@ export default function LaunchBreakpointSplitViewPanel({ model, feature, viewTyp
6
6
  model: AlignmentFeatureWidgetModel;
7
7
  feature: SimpleFeatureSerialized;
8
8
  viewType: ViewType;
9
- }): React.JSX.Element;
9
+ }): React.JSX.Element | null;
@@ -40,7 +40,7 @@ export default function LaunchBreakpointSplitViewPanel({ model, feature, viewTyp
40
40
  ret.push([res[i], res[i + 1]]);
41
41
  }
42
42
  }
43
- return (React.createElement(React.Fragment, null, ret.length ? (React.createElement("div", null,
43
+ return ret.length ? (React.createElement("div", null,
44
44
  React.createElement(Typography, null, "Launch split views with breakend source and target"),
45
45
  error ? React.createElement(ErrorMessage, { error: error }) : null,
46
46
  React.createElement("ul", null, ret.map((arg, index) => {
@@ -57,10 +57,10 @@ export default function LaunchBreakpointSplitViewPanel({ model, feature, viewTyp
57
57
  f1.refName,
58
58
  ":",
59
59
  toLocale(f1.strand === 1 ? f1.end : f1.start),
60
- " ->",
61
60
  ' ',
61
+ "-> ",
62
62
  f2.refName,
63
63
  ":",
64
64
  toLocale(f2.strand === 1 ? f2.start : f2.end)))));
65
- })))) : null));
65
+ })))) : null;
66
66
  }
@@ -509,7 +509,7 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
509
509
  }
510
510
  catch (e) {
511
511
  console.error(e);
512
- session.notify(`${e}`, 'error');
512
+ session.notifyError(`${e}`, e);
513
513
  }
514
514
  }));
515
515
  },
@@ -8,7 +8,7 @@ declare const ColorByModificationsDialog: ({ model, handleClose, }: {
8
8
  modificationTagMap: ObservableMap<string, string>;
9
9
  colorBy?: {
10
10
  type: string;
11
- } | undefined;
11
+ };
12
12
  };
13
13
  handleClose: () => void;
14
14
  }) => React.JSX.Element;
@@ -4,7 +4,7 @@ declare const SetFeatureHeightDialog: (props: {
4
4
  setFeatureHeight: (arg?: number) => void;
5
5
  setNoSpacing: (arg?: boolean) => void;
6
6
  featureHeightSetting: number;
7
- noSpacing?: boolean | undefined;
7
+ noSpacing?: boolean;
8
8
  };
9
9
  handleClose: () => void;
10
10
  }) => React.JSX.Element;
@@ -5,7 +5,7 @@ import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
5
5
  * #stateModel LinearPileupDisplay
6
6
  * #category display
7
7
  * extends
8
- *- [SharedLinearPileupDisplayMixin](../sharedlinearpileupdisplaymixin)
8
+ * - [SharedLinearPileupDisplayMixin](../sharedlinearpileupdisplaymixin)
9
9
  */
10
10
  declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
11
11
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
@@ -96,16 +96,15 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
96
96
  } & {
97
97
  configuration: AnyConfigurationSchemaType;
98
98
  featureHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
99
- /**
100
- * #action
101
- */
102
99
  noSpacing: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
103
100
  fadeLikelihood: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
104
101
  trackMaxHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
105
102
  colorBy: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
106
103
  type: import("mobx-state-tree").ISimpleType<string>;
107
104
  tag: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
108
- extra: import("mobx-state-tree").IType<any, any, any>;
105
+ extra: import("mobx-state-tree").IType<any, any, any>; /**
106
+ * #action
107
+ */
109
108
  }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
110
109
  filterBy: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
111
110
  flagInclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
@@ -185,9 +184,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
185
184
  readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
186
185
  regionCannotBeRendered(): null;
187
186
  } & {
188
- setMessage(arg?: string | undefined): void; /**
189
- * #getter
190
- */
187
+ setMessage(arg?: string | undefined): void;
191
188
  setError(error?: unknown): void;
192
189
  setRpcDriverName(rpcDriverName: string): void;
193
190
  reload(): void;
@@ -237,7 +234,9 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
237
234
  readonly DisplayMessageComponent: import("react").FC<any> | undefined;
238
235
  } & {
239
236
  readonly features: import("@jbrowse/core/util/compositeMap").default<string, import("@jbrowse/core/util").Feature>;
240
- readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
237
+ readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined; /**
238
+ * #getter
239
+ */
241
240
  getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
242
241
  getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
243
242
  searchFeatureByID(id: string): [number, number, number, number] | undefined;
@@ -246,7 +245,9 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
246
245
  deleteBlock(key: string): void;
247
246
  selectFeature(feature: import("@jbrowse/core/util").Feature): void;
248
247
  clearFeatureSelection(): void;
249
- setFeatureIdUnderMouse(feature?: string | undefined): void;
248
+ setFeatureIdUnderMouse(feature?: string | undefined): void; /**
249
+ * #method
250
+ */
250
251
  setContextMenuFeature(feature?: import("@jbrowse/core/util").Feature | undefined): void;
251
252
  } & {
252
253
  reload(): Promise<void>;
@@ -375,6 +376,12 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
375
376
  * #action
376
377
  */
377
378
  setSortedBy(type: string, tag?: string): void;
379
+ /**
380
+ * #action
381
+ * overrides base from SharedLinearPileupDisplay to make sortReady false
382
+ * since changing feature height destroys the sort-induced layout
383
+ */
384
+ setFeatureHeight(n?: number): void;
378
385
  } & {
379
386
  /**
380
387
  * #action
@@ -11,14 +11,14 @@ import SortIcon from '@mui/icons-material/Sort';
11
11
  // locals
12
12
  import { SharedLinearPileupDisplayMixin } from './SharedLinearPileupDisplayMixin';
13
13
  import { observable } from 'mobx';
14
- // async
14
+ // lzies
15
15
  const SortByTagDialog = lazy(() => import('./components/SortByTag'));
16
16
  const ModificationsDialog = lazy(() => import('./components/ColorByModifications'));
17
17
  /**
18
18
  * #stateModel LinearPileupDisplay
19
19
  * #category display
20
20
  * extends
21
- *- [SharedLinearPileupDisplayMixin](../sharedlinearpileupdisplaymixin)
21
+ * - [SharedLinearPileupDisplayMixin](../sharedlinearpileupdisplaymixin)
22
22
  */
23
23
  function stateModelFactory(configSchema) {
24
24
  return types
@@ -125,6 +125,15 @@ function stateModelFactory(configSchema) {
125
125
  tag,
126
126
  };
127
127
  },
128
+ /**
129
+ * #action
130
+ * overrides base from SharedLinearPileupDisplay to make sortReady false
131
+ * since changing feature height destroys the sort-induced layout
132
+ */
133
+ setFeatureHeight(n) {
134
+ self.sortReady = false;
135
+ self.featureHeight = n;
136
+ },
128
137
  }))
129
138
  .actions(self => {
130
139
  // resets the sort object and refresh whole display on reload
@@ -12,16 +12,16 @@ declare const PileupRendering: (props: {
12
12
  type: string;
13
13
  pos: number;
14
14
  refName: string;
15
- } | undefined;
15
+ };
16
16
  colorBy?: {
17
17
  type: string;
18
- tag?: string | undefined;
19
- } | undefined;
18
+ tag?: string;
19
+ };
20
20
  filterBy?: {
21
21
  tagFilter?: {
22
22
  tag: string;
23
- } | undefined;
24
- } | undefined;
25
- onMouseMove?: ((event: React.MouseEvent, featureId?: string) => void) | undefined;
23
+ };
24
+ };
25
+ onMouseMove?: (event: React.MouseEvent, featureId?: string) => void;
26
26
  }) => React.JSX.Element;
27
27
  export default PileupRendering;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-alignments",
3
- "version": "2.10.3",
3
+ "version": "2.11.0",
4
4
  "description": "JBrowse 2 alignments adapters, tracks, etc.",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -63,5 +63,5 @@
63
63
  "distModule": "esm/index.js",
64
64
  "srcModule": "src/index.ts",
65
65
  "module": "esm/index.js",
66
- "gitHead": "c8fc800cd17decd72b2e971c7a6add3b95214e72"
66
+ "gitHead": "3d43a820b9274a6160aa4dc15616147f390d9094"
67
67
  }