@jbrowse/plugin-variants 1.7.7 → 1.7.10

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.
@@ -1,11 +1,37 @@
1
- export function stateModelFactory(pluginManager: any): import("mobx-state-tree").IModelType<{
1
+ import PluginManager from '@jbrowse/core/PluginManager';
2
+ export declare const configSchema: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
3
+ export declare function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
2
4
  id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
3
- type: import("mobx-state-tree").ISimpleType<"VariantFeatureWidget">;
4
- view: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<any>>;
5
+ type: import("mobx-state-tree").ISimpleType<"BaseFeatureWidget">;
5
6
  featureData: import("mobx-state-tree").IType<any, any, any>;
7
+ formattedFields: import("mobx-state-tree").IType<any, any, any>;
8
+ unformattedFeatureData: import("mobx-state-tree").IType<any, any, any>;
9
+ view: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
10
+ track: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
11
+ } & {
12
+ type: import("mobx-state-tree").ISimpleType<"VariantFeatureWidget">;
6
13
  descriptions: import("mobx-state-tree").IType<any, any, any>;
7
14
  }, {
8
- setFeatureData(data: any): void;
15
+ setFeatureData(featureData: Record<string, unknown>): void;
9
16
  clearFeatureData(): void;
10
- }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
11
- export const configSchema: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
17
+ setFormattedData(feat: Record<string, unknown>): void;
18
+ } & {
19
+ afterCreate(): void;
20
+ }, {
21
+ type: "BaseFeatureWidget";
22
+ } & Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
23
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
24
+ type: import("mobx-state-tree").ISimpleType<"BaseFeatureWidget">;
25
+ featureData: import("mobx-state-tree").IType<any, any, any>;
26
+ formattedFields: import("mobx-state-tree").IType<any, any, any>;
27
+ unformattedFeatureData: import("mobx-state-tree").IType<any, any, any>;
28
+ view: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
29
+ track: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
30
+ }>> & import("mobx-state-tree")._NotCustomized, {
31
+ id: string;
32
+ type: "BaseFeatureWidget";
33
+ formattedFields: any;
34
+ view: import("mobx-state-tree").ReferenceIdentifier | undefined;
35
+ track: import("mobx-state-tree").ReferenceIdentifier | undefined;
36
+ finalizedFeatureData: any;
37
+ } & import("mobx-state-tree")._NotCustomized>;
@@ -8,28 +8,17 @@ exports.stateModelFactory = stateModelFactory;
8
8
 
9
9
  var _configuration = require("@jbrowse/core/configuration");
10
10
 
11
- var _mst = require("@jbrowse/core/util/types/mst");
12
-
13
11
  var _mobxStateTree = require("mobx-state-tree");
14
12
 
13
+ var _BaseFeatureWidget = require("@jbrowse/core/BaseFeatureWidget");
14
+
15
15
  var configSchema = (0, _configuration.ConfigurationSchema)('VariantFeatureWidget', {});
16
16
  exports.configSchema = configSchema;
17
17
 
18
18
  function stateModelFactory(pluginManager) {
19
- return _mobxStateTree.types.model('VariantFeatureWidget', {
20
- id: _mst.ElementId,
19
+ var baseModel = (0, _BaseFeatureWidget.stateModelFactory)(pluginManager);
20
+ return _mobxStateTree.types.compose(baseModel, _mobxStateTree.types.model('VariantFeatureWidget', {
21
21
  type: _mobxStateTree.types.literal('VariantFeatureWidget'),
22
- view: _mobxStateTree.types.safeReference(pluginManager.pluggableMstType('view', 'stateModel')),
23
- featureData: _mobxStateTree.types.frozen(),
24
22
  descriptions: _mobxStateTree.types.frozen()
25
- }).actions(function (self) {
26
- return {
27
- setFeatureData: function setFeatureData(data) {
28
- self.featureData = data;
29
- },
30
- clearFeatureData: function clearFeatureData() {
31
- self.featureData = undefined;
32
- }
33
- };
34
- });
23
+ }));
35
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-variants",
3
- "version": "1.7.7",
3
+ "version": "1.7.10",
4
4
  "description": "JBrowse 2 variant adapters, tracks, etc.",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -57,5 +57,5 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "2c26e04ae942c380bf2f5b79ef7a49cc32b7bfed"
60
+ "gitHead": "02d8c1e88e5603ea5855faed4ccb814e28071b32"
61
61
  }
@@ -143,7 +143,7 @@ function BreakendPanel(props: {
143
143
  <li key={`${JSON.stringify(locString)}`}>
144
144
  <Link
145
145
  href="#"
146
- onClick={(event: any) => {
146
+ onClick={event => {
147
147
  event.preventDefault()
148
148
  const { view } = model
149
149
  try {
@@ -175,7 +175,7 @@ function BreakendPanel(props: {
175
175
  <li key={`${JSON.stringify(locString)}`}>
176
176
  <Link
177
177
  href="#"
178
- onClick={(event: any) => {
178
+ onClick={event => {
179
179
  event.preventDefault()
180
180
  setBreakpointDialog(true)
181
181
  }}
@@ -0,0 +1,17 @@
1
+ import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
+ import PluginManager from '@jbrowse/core/PluginManager'
3
+ import { types } from 'mobx-state-tree'
4
+ import { stateModelFactory as baseModelFactory } from '@jbrowse/core/BaseFeatureWidget'
5
+
6
+ export const configSchema = ConfigurationSchema('VariantFeatureWidget', {})
7
+
8
+ export function stateModelFactory(pluginManager: PluginManager) {
9
+ const baseModel = baseModelFactory(pluginManager)
10
+ return types.compose(
11
+ baseModel,
12
+ types.model('VariantFeatureWidget', {
13
+ type: types.literal('VariantFeatureWidget'),
14
+ descriptions: types.frozen(),
15
+ }),
16
+ )
17
+ }
@@ -1,26 +0,0 @@
1
- import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
- import { ElementId } from '@jbrowse/core/util/types/mst'
3
- import { types } from 'mobx-state-tree'
4
-
5
- export const configSchema = ConfigurationSchema('VariantFeatureWidget', {})
6
-
7
- export function stateModelFactory(pluginManager) {
8
- return types
9
- .model('VariantFeatureWidget', {
10
- id: ElementId,
11
- type: types.literal('VariantFeatureWidget'),
12
- view: types.safeReference(
13
- pluginManager.pluggableMstType('view', 'stateModel'),
14
- ),
15
- featureData: types.frozen(),
16
- descriptions: types.frozen(),
17
- })
18
- .actions(self => ({
19
- setFeatureData(data) {
20
- self.featureData = data
21
- },
22
- clearFeatureData() {
23
- self.featureData = undefined
24
- },
25
- }))
26
- }