@jbrowse/plugin-variants 1.7.11 → 2.0.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.
Files changed (107) hide show
  1. package/dist/ChordVariantDisplay/index.d.ts +2 -1
  2. package/dist/ChordVariantDisplay/index.js +19 -31
  3. package/dist/ChordVariantDisplay/index.js.map +1 -0
  4. package/dist/ChordVariantDisplay/models/ChordVariantDisplay.d.ts +94 -2
  5. package/dist/ChordVariantDisplay/models/ChordVariantDisplay.js +39 -71
  6. package/dist/ChordVariantDisplay/models/ChordVariantDisplay.js.map +1 -0
  7. package/dist/LinearVariantDisplay/configSchema.js +9 -16
  8. package/dist/LinearVariantDisplay/configSchema.js.map +1 -0
  9. package/dist/LinearVariantDisplay/index.js +10 -22
  10. package/dist/LinearVariantDisplay/index.js.map +1 -0
  11. package/dist/LinearVariantDisplay/model.d.ts +17 -12
  12. package/dist/LinearVariantDisplay/model.js +83 -73
  13. package/dist/LinearVariantDisplay/model.js.map +1 -0
  14. package/dist/StructuralVariantChordRenderer/ReactComponent.js +193 -214
  15. package/dist/StructuralVariantChordRenderer/ReactComponent.js.map +1 -0
  16. package/dist/StructuralVariantChordRenderer/index.js +36 -46
  17. package/dist/StructuralVariantChordRenderer/index.js.map +1 -0
  18. package/dist/VariantFeatureWidget/BreakendOptionDialog.d.ts +1 -1
  19. package/dist/VariantFeatureWidget/BreakendOptionDialog.js +95 -119
  20. package/dist/VariantFeatureWidget/BreakendOptionDialog.js.map +1 -0
  21. package/dist/VariantFeatureWidget/VariantFeatureWidget.js +193 -240
  22. package/dist/VariantFeatureWidget/VariantFeatureWidget.js.map +1 -0
  23. package/dist/VariantFeatureWidget/index.d.ts +3 -3
  24. package/dist/VariantFeatureWidget/index.js +14 -22
  25. package/dist/VariantFeatureWidget/index.js.map +1 -0
  26. package/dist/VcfAdapter/VcfAdapter.js +232 -372
  27. package/dist/VcfAdapter/VcfAdapter.js.map +1 -0
  28. package/dist/VcfAdapter/configSchema.js +9 -21
  29. package/dist/VcfAdapter/configSchema.js.map +1 -0
  30. package/dist/VcfAdapter/index.js +8 -14
  31. package/dist/VcfAdapter/index.js.map +1 -0
  32. package/dist/VcfTabixAdapter/VcfFeature.js +203 -246
  33. package/dist/VcfTabixAdapter/VcfFeature.js.map +1 -0
  34. package/dist/VcfTabixAdapter/VcfTabixAdapter.js +237 -374
  35. package/dist/VcfTabixAdapter/VcfTabixAdapter.js.map +1 -0
  36. package/dist/VcfTabixAdapter/configSchema.js +23 -36
  37. package/dist/VcfTabixAdapter/configSchema.js.map +1 -0
  38. package/dist/VcfTabixAdapter/index.js +8 -14
  39. package/dist/VcfTabixAdapter/index.js.map +1 -0
  40. package/dist/index.js +160 -203
  41. package/dist/index.js.map +1 -0
  42. package/esm/ChordVariantDisplay/index.d.ts +4 -0
  43. package/esm/ChordVariantDisplay/index.js +16 -0
  44. package/esm/ChordVariantDisplay/index.js.map +1 -0
  45. package/esm/ChordVariantDisplay/models/ChordVariantDisplay.d.ts +97 -0
  46. package/esm/ChordVariantDisplay/models/ChordVariantDisplay.js +40 -0
  47. package/esm/ChordVariantDisplay/models/ChordVariantDisplay.js.map +1 -0
  48. package/esm/LinearVariantDisplay/configSchema.d.ts +5 -0
  49. package/esm/LinearVariantDisplay/configSchema.js +7 -0
  50. package/esm/LinearVariantDisplay/configSchema.js.map +1 -0
  51. package/esm/LinearVariantDisplay/index.d.ts +2 -0
  52. package/esm/LinearVariantDisplay/index.js +3 -0
  53. package/esm/LinearVariantDisplay/index.js.map +1 -0
  54. package/esm/LinearVariantDisplay/model.d.ts +212 -0
  55. package/esm/LinearVariantDisplay/model.js +34 -0
  56. package/esm/LinearVariantDisplay/model.js.map +1 -0
  57. package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +24 -0
  58. package/esm/StructuralVariantChordRenderer/ReactComponent.js +133 -0
  59. package/esm/StructuralVariantChordRenderer/ReactComponent.js.map +1 -0
  60. package/esm/StructuralVariantChordRenderer/index.d.ts +3 -0
  61. package/esm/StructuralVariantChordRenderer/index.js +33 -0
  62. package/esm/StructuralVariantChordRenderer/index.js.map +1 -0
  63. package/esm/VariantFeatureWidget/BreakendOptionDialog.d.ts +10 -0
  64. package/esm/VariantFeatureWidget/BreakendOptionDialog.js +58 -0
  65. package/esm/VariantFeatureWidget/BreakendOptionDialog.js.map +1 -0
  66. package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +4 -0
  67. package/esm/VariantFeatureWidget/VariantFeatureWidget.js +129 -0
  68. package/esm/VariantFeatureWidget/VariantFeatureWidget.js.map +1 -0
  69. package/esm/VariantFeatureWidget/index.d.ts +37 -0
  70. package/esm/VariantFeatureWidget/index.js +12 -0
  71. package/esm/VariantFeatureWidget/index.js.map +1 -0
  72. package/esm/VcfAdapter/VcfAdapter.d.ts +24 -0
  73. package/esm/VcfAdapter/VcfAdapter.js +99 -0
  74. package/esm/VcfAdapter/VcfAdapter.js.map +1 -0
  75. package/esm/VcfAdapter/configSchema.d.ts +2 -0
  76. package/esm/VcfAdapter/configSchema.js +8 -0
  77. package/esm/VcfAdapter/configSchema.js.map +1 -0
  78. package/esm/VcfAdapter/index.d.ts +1 -0
  79. package/esm/VcfAdapter/index.js +2 -0
  80. package/esm/VcfAdapter/index.js.map +1 -0
  81. package/esm/VcfTabixAdapter/VcfFeature.d.ts +59 -0
  82. package/esm/VcfTabixAdapter/VcfFeature.js +184 -0
  83. package/esm/VcfTabixAdapter/VcfFeature.js.map +1 -0
  84. package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +35 -0
  85. package/esm/VcfTabixAdapter/VcfTabixAdapter.js +112 -0
  86. package/esm/VcfTabixAdapter/VcfTabixAdapter.js.map +1 -0
  87. package/esm/VcfTabixAdapter/configSchema.d.ts +2 -0
  88. package/esm/VcfTabixAdapter/configSchema.js +23 -0
  89. package/esm/VcfTabixAdapter/configSchema.js.map +1 -0
  90. package/esm/VcfTabixAdapter/index.d.ts +1 -0
  91. package/esm/VcfTabixAdapter/index.js +2 -0
  92. package/esm/VcfTabixAdapter/index.js.map +1 -0
  93. package/esm/index.d.ts +7 -0
  94. package/esm/index.js +110 -0
  95. package/esm/index.js.map +1 -0
  96. package/package.json +20 -11
  97. package/src/ChordVariantDisplay/index.ts +4 -4
  98. package/src/ChordVariantDisplay/models/ChordVariantDisplay.js +7 -8
  99. package/src/VariantFeatureWidget/BreakendOptionDialog.tsx +8 -9
  100. package/src/VariantFeatureWidget/VariantFeatureWidget.tsx +2 -3
  101. package/src/VariantFeatureWidget/__snapshots__/VariantFeatureWidget.test.js.snap +52 -57
  102. package/dist/LinearVariantDisplay/configSchema.test.js +0 -92
  103. package/dist/VariantFeatureWidget/VariantFeatureWidget.test.js +0 -56
  104. package/dist/VcfAdapter/VcfAdapter.test.js +0 -55
  105. package/dist/VcfTabixAdapter/VcfFeature.test.js +0 -106
  106. package/dist/VcfTabixAdapter/VcfTabixAdapter.test.js +0 -99
  107. package/dist/index.test.js +0 -37
@@ -1,3 +1,4 @@
1
1
  import PluginManager from '@jbrowse/core/PluginManager';
2
- declare const _default: (pluginManager: PluginManager) => import("@jbrowse/core/pluggableElementTypes").DisplayType;
2
+ import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
3
+ declare const _default: (pluginManager: PluginManager) => DisplayType;
3
4
  export default _default;
@@ -1,33 +1,21 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _pluginCircularView = require("@jbrowse/plugin-circular-view");
11
-
12
- var _ChordVariantDisplay = _interopRequireDefault(require("./models/ChordVariantDisplay"));
13
-
14
- var _default = function _default(pluginManager) {
15
- var lib = pluginManager.lib,
16
- load = pluginManager.load;
17
- var DisplayType = lib['@jbrowse/core/pluggableElementTypes/DisplayType'];
18
-
19
- var _load = load(_ChordVariantDisplay.default),
20
- stateModel = _load.stateModel,
21
- configSchema = _load.configSchema;
22
-
23
- return new DisplayType({
24
- name: 'ChordVariantDisplay',
25
- configSchema: configSchema,
26
- stateModel: stateModel,
27
- trackType: 'VariantTrack',
28
- viewType: 'CircularView',
29
- ReactComponent: (0, _pluginCircularView.BaseChordDisplayComponentFactory)(pluginManager)
30
- });
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
31
4
  };
32
-
33
- exports.default = _default;
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var plugin_circular_view_1 = require("@jbrowse/plugin-circular-view");
7
+ var ChordVariantDisplay_1 = __importDefault(require("./models/ChordVariantDisplay"));
8
+ var DisplayType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/DisplayType"));
9
+ exports.default = (function (pluginManager) {
10
+ var load = pluginManager.load;
11
+ var _a = load(ChordVariantDisplay_1.default), stateModel = _a.stateModel, configSchema = _a.configSchema;
12
+ return new DisplayType_1.default({
13
+ name: 'ChordVariantDisplay',
14
+ configSchema: configSchema,
15
+ stateModel: stateModel,
16
+ trackType: 'VariantTrack',
17
+ viewType: 'CircularView',
18
+ ReactComponent: plugin_circular_view_1.BaseChordDisplayComponent,
19
+ });
20
+ });
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ChordVariantDisplay/index.ts"],"names":[],"mappings":";;;;;AACA,sEAAyE;AACzE,qFAA8D;AAC9D,gGAAyE;AAEzE,mBAAe,UAAC,aAA4B;IAClC,IAAA,IAAI,GAAK,aAAa,KAAlB,CAAkB;IAExB,IAAA,KAA+B,IAAI,CAAC,6BAAmB,CAAC,EAAtD,UAAU,gBAAA,EAAE,YAAY,kBAA8B,CAAA;IAE9D,OAAO,IAAI,qBAAW,CAAC;QACrB,IAAI,EAAE,qBAAqB;QAC3B,YAAY,cAAA;QACZ,UAAU,YAAA;QACV,SAAS,EAAE,cAAc;QACzB,QAAQ,EAAE,cAAc;QACxB,cAAc,EAAE,gDAAyB;KAC1C,CAAC,CAAA;AACJ,CAAC,EAAA"}
@@ -1,5 +1,97 @@
1
1
  export default ChordVariantDisplayF;
2
2
  declare function ChordVariantDisplayF(pluginManager: any): {
3
- stateModel: any;
4
- configSchema: any;
3
+ stateModel: import("mobx-state-tree").IModelType<{
4
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
5
+ type: import("mobx-state-tree").ISimpleType<string>;
6
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
7
+ } & {
8
+ bezierRadiusRatio: import("mobx-state-tree").IType<number | undefined, number, number>;
9
+ assemblyName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
10
+ } & {
11
+ type: import("mobx-state-tree").ISimpleType<"ChordVariantDisplay">;
12
+ configuration: import("mobx-state-tree").ITypeUnion<any, any, any>;
13
+ }, {
14
+ rendererTypeName: string;
15
+ error: unknown;
16
+ } & {
17
+ readonly RenderingComponent: import("react").FC<{
18
+ model: {
19
+ id: string;
20
+ type: string;
21
+ rpcDriverName: string | undefined;
22
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
23
+ rendererTypeName: string;
24
+ error: unknown;
25
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
26
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
27
+ type: import("mobx-state-tree").ISimpleType<string>;
28
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
29
+ }, {
30
+ rendererTypeName: string;
31
+ error: unknown;
32
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
33
+ onHorizontalScroll?: Function | undefined;
34
+ blockState?: Record<string, any> | undefined;
35
+ }>;
36
+ readonly DisplayBlurb: import("react").FC<{
37
+ model: {
38
+ id: string;
39
+ type: string;
40
+ rpcDriverName: string | undefined;
41
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
42
+ rendererTypeName: string;
43
+ error: unknown;
44
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
45
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
46
+ type: import("mobx-state-tree").ISimpleType<string>;
47
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
48
+ }, {
49
+ rendererTypeName: string;
50
+ error: unknown;
51
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
52
+ }> | null;
53
+ readonly adapterConfig: any;
54
+ readonly parentTrack: any;
55
+ renderProps(): any;
56
+ readonly rendererType: any;
57
+ readonly DisplayMessageComponent: import("react").FC<any> | undefined;
58
+ trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
59
+ readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
60
+ regionCannotBeRendered(): undefined;
61
+ } & {
62
+ setError(error?: unknown): void;
63
+ setRpcDriverName(rpcDriverName: string): void;
64
+ reload(): void;
65
+ } & {
66
+ filled: boolean;
67
+ reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
68
+ data: undefined;
69
+ message: string;
70
+ renderingComponent: import("@jbrowse/core/util").AnyReactComponentType | undefined;
71
+ refNameMap: Record<string, string> | undefined;
72
+ } & {
73
+ onChordClick(feature: import("@jbrowse/core/util").Feature): void;
74
+ } & {
75
+ readonly blockDefinitions: any;
76
+ renderProps(): any;
77
+ readonly rendererType: any;
78
+ isCompatibleWithRenderer(renderer: import("@jbrowse/core/pluggableElementTypes").RendererType): boolean;
79
+ readonly selectedFeatureId: string | undefined;
80
+ } & {
81
+ renderStarted(): void;
82
+ renderSuccess({ message, data, reactElement, renderingComponent, }: {
83
+ message: string;
84
+ data: any;
85
+ reactElement: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
86
+ renderingComponent: import("@jbrowse/core/util").AnyReactComponentType;
87
+ }): void;
88
+ renderError(error: unknown): void;
89
+ setRefNameMap(refNameMap: Record<string, string>): void;
90
+ } & {
91
+ afterAttach(): void;
92
+ } & {
93
+ readonly rendererTypeName: any;
94
+ renderProps(): any;
95
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
96
+ configSchema: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
5
97
  };
@@ -1,76 +1,44 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
- var _pluginCircularView = require("@jbrowse/plugin-circular-view");
13
-
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
-
16
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
-
18
- var ChordVariantDisplayF = function ChordVariantDisplayF(pluginManager) {
19
- var jbrequire = pluginManager.jbrequire;
20
-
21
- var _jbrequire = jbrequire('mobx-state-tree'),
22
- types = _jbrequire.types;
23
-
24
- var _jbrequire2 = jbrequire('@jbrowse/core/configuration'),
25
- ConfigurationSchema = _jbrequire2.ConfigurationSchema,
26
- ConfigurationReference = _jbrequire2.ConfigurationReference;
27
-
28
- var _jbrequire3 = jbrequire('@jbrowse/core/util'),
29
- getContainingView = _jbrequire3.getContainingView;
30
-
31
- var _jbrequire4 = jbrequire('@jbrowse/core/util/tracks'),
32
- getParentRenderProps = _jbrequire4.getParentRenderProps;
33
-
34
- var configSchema = ConfigurationSchema('ChordVariantDisplay', {
35
- renderer: types.optional(pluginManager.pluggableConfigSchemaType('renderer'), {
36
- type: 'StructuralVariantChordRenderer'
37
- })
38
- }, {
39
- baseConfiguration: _pluginCircularView.baseChordDisplayConfig,
40
- explicitlyTyped: true
41
- });
42
- var stateModel = types.compose('ChordVariantDisplay', _pluginCircularView.BaseChordDisplayModel, types.model({
43
- type: types.literal('ChordVariantDisplay'),
44
- configuration: ConfigurationReference(configSchema)
45
- })).views(function (self) {
46
- return {
47
- get rendererTypeName() {
48
- return self.configuration.renderer.type;
49
- },
50
-
51
- renderProps: function renderProps() {
52
- var view = getContainingView(self);
53
- return _objectSpread(_objectSpread({}, getParentRenderProps(self)), {}, {
54
- rpcDriverName: self.rpcDriverName,
55
- displayModel: self,
56
- bezierRadius: view.radiusPx * self.bezierRadiusRatio,
57
- radius: view.radiusPx,
58
- blockDefinitions: this.blockDefinitions,
59
- config: self.configuration.renderer,
60
- onChordClick: self.onChordClick
61
- });
62
- }
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
63
10
  };
64
- });
65
- return {
66
- stateModel: stateModel,
67
- configSchema: configSchema
68
- };
69
- }; // http://localhost:3000/test_data/hs37d5.HG002-SequelII-CCS.sv.vcf.gz.tbi
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var plugin_circular_view_1 = require("@jbrowse/plugin-circular-view");
15
+ var configuration_1 = require("@jbrowse/core/configuration");
16
+ var mobx_state_tree_1 = require("mobx-state-tree");
17
+ var util_1 = require("@jbrowse/core/util");
18
+ var tracks_1 = require("@jbrowse/core/util/tracks");
19
+ var ChordVariantDisplayF = function (pluginManager) {
20
+ var configSchema = (0, configuration_1.ConfigurationSchema)('ChordVariantDisplay', {
21
+ renderer: mobx_state_tree_1.types.optional(pluginManager.pluggableConfigSchemaType('renderer'), { type: 'StructuralVariantChordRenderer' }),
22
+ }, { baseConfiguration: plugin_circular_view_1.baseChordDisplayConfig, explicitlyTyped: true });
23
+ var stateModel = mobx_state_tree_1.types
24
+ .compose('ChordVariantDisplay', plugin_circular_view_1.BaseChordDisplayModel, mobx_state_tree_1.types.model({
25
+ type: mobx_state_tree_1.types.literal('ChordVariantDisplay'),
26
+ configuration: (0, configuration_1.ConfigurationReference)(configSchema),
27
+ }))
28
+ .views(function (self) { return ({
29
+ get rendererTypeName() {
30
+ return self.configuration.renderer.type;
31
+ },
32
+ renderProps: function () {
33
+ var view = (0, util_1.getContainingView)(self);
34
+ return __assign(__assign({}, (0, tracks_1.getParentRenderProps)(self)), { rpcDriverName: self.rpcDriverName, displayModel: self, bezierRadius: view.radiusPx * self.bezierRadiusRatio, radius: view.radiusPx, blockDefinitions: this.blockDefinitions, config: self.configuration.renderer, onChordClick: self.onChordClick });
35
+ },
36
+ }); });
37
+ return { stateModel: stateModel, configSchema: configSchema };
38
+ };
39
+ // http://localhost:3000/test_data/hs37d5.HG002-SequelII-CCS.sv.vcf.gz.tbi
70
40
  // render request is for 1.5x the current viewing window
71
41
  // tracks all have a height
72
42
  //
73
-
74
-
75
- var _default = ChordVariantDisplayF;
76
- exports.default = _default;
43
+ exports.default = ChordVariantDisplayF;
44
+ //# sourceMappingURL=ChordVariantDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChordVariantDisplay.js","sourceRoot":"","sources":["../../../src/ChordVariantDisplay/models/ChordVariantDisplay.js"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,sEAGsC;AACtC,6DAGoC;AACpC,mDAAuC;AACvC,2CAAsD;AACtD,oDAAgE;AAEhE,IAAM,oBAAoB,GAAG,UAAA,aAAa;IACxC,IAAM,YAAY,GAAG,IAAA,mCAAmB,EACtC,qBAAqB,EACrB;QACE,QAAQ,EAAE,uBAAK,CAAC,QAAQ,CACtB,aAAa,CAAC,yBAAyB,CAAC,UAAU,CAAC,EACnD,EAAE,IAAI,EAAE,gCAAgC,EAAE,CAC3C;KACF,EACD,EAAE,iBAAiB,EAAE,6CAAsB,EAAE,eAAe,EAAE,IAAI,EAAE,CACrE,CAAA;IAED,IAAM,UAAU,GAAG,uBAAK;SACrB,OAAO,CACN,qBAAqB,EACrB,4CAAqB,EACrB,uBAAK,CAAC,KAAK,CAAC;QACV,IAAI,EAAE,uBAAK,CAAC,OAAO,CAAC,qBAAqB,CAAC;QAC1C,aAAa,EAAE,IAAA,sCAAsB,EAAC,YAAY,CAAC;KACpD,CAAC,CACH;SACA,KAAK,CAAC,UAAA,IAAI,IAAI,OAAA,CAAC;QACd,IAAI,gBAAgB;YAClB,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAA;QACzC,CAAC;QAED,WAAW;YACT,IAAM,IAAI,GAAG,IAAA,wBAAiB,EAAC,IAAI,CAAC,CAAA;YACpC,6BACK,IAAA,6BAAoB,EAAC,IAAI,CAAC,KAC7B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,YAAY,EAAE,IAAI,EAClB,YAAY,EAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,iBAAiB,EACpD,MAAM,EAAE,IAAI,CAAC,QAAQ,EACrB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,EACnC,YAAY,EAAE,IAAI,CAAC,YAAY,IAChC;QACH,CAAC;KACF,CAAC,EAlBa,CAkBb,CAAC,CAAA;IAEL,OAAO,EAAE,UAAU,YAAA,EAAE,YAAY,cAAA,EAAE,CAAA;AACrC,CAAC,CAAA;AAED,0EAA0E;AAE1E,wDAAwD;AAExD,2BAA2B;AAC3B,EAAE;AACF,kBAAe,oBAAoB,CAAA"}
@@ -1,18 +1,11 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.LinearVariantDisplayConfigFactory = LinearVariantDisplayConfigFactory;
7
-
8
- var _configuration = require("@jbrowse/core/configuration");
9
-
10
- var _pluginLinearGenomeView = require("@jbrowse/plugin-linear-genome-view");
11
-
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LinearVariantDisplayConfigFactory = void 0;
4
+ var configuration_1 = require("@jbrowse/core/configuration");
5
+ var plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
12
6
  function LinearVariantDisplayConfigFactory(pluginManager) {
13
- var configSchema = (0, _pluginLinearGenomeView.linearBasicDisplayConfigSchemaFactory)(pluginManager);
14
- return (0, _configuration.ConfigurationSchema)('LinearVariantDisplay', {}, {
15
- baseConfiguration: configSchema,
16
- explicitlyTyped: true
17
- });
18
- }
7
+ var configSchema = (0, plugin_linear_genome_view_1.linearBasicDisplayConfigSchemaFactory)(pluginManager);
8
+ return (0, configuration_1.ConfigurationSchema)('LinearVariantDisplay', {}, { baseConfiguration: configSchema, explicitlyTyped: true });
9
+ }
10
+ exports.LinearVariantDisplayConfigFactory = LinearVariantDisplayConfigFactory;
11
+ //# sourceMappingURL=configSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configSchema.js","sourceRoot":"","sources":["../../src/LinearVariantDisplay/configSchema.ts"],"names":[],"mappings":";;;AAAA,6DAAiE;AAGjE,gFAA0F;AAE1F,SAAgB,iCAAiC,CAC/C,aAA4B;IAE5B,IAAM,YAAY,GAAG,IAAA,iEAAqC,EAAC,aAAa,CAAC,CAAA;IAEzE,OAAO,IAAA,mCAAmB,EACxB,sBAAsB,EACtB,EAAE,EACF,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,IAAI,EAAE,CAC3D,CAAA;AACH,CAAC;AAVD,8EAUC"}
@@ -1,23 +1,11 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "configSchemaFactory", {
9
- enumerable: true,
10
- get: function get() {
11
- return _configSchema.LinearVariantDisplayConfigFactory;
12
- }
13
- });
14
- Object.defineProperty(exports, "modelFactory", {
15
- enumerable: true,
16
- get: function get() {
17
- return _model.default;
18
- }
19
- });
20
-
21
- var _configSchema = require("./configSchema");
22
-
23
- var _model = _interopRequireDefault(require("./model"));
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.modelFactory = exports.configSchemaFactory = void 0;
7
+ var configSchema_1 = require("./configSchema");
8
+ Object.defineProperty(exports, "configSchemaFactory", { enumerable: true, get: function () { return configSchema_1.LinearVariantDisplayConfigFactory; } });
9
+ var model_1 = require("./model");
10
+ Object.defineProperty(exports, "modelFactory", { enumerable: true, get: function () { return __importDefault(model_1).default; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/LinearVariantDisplay/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyF;AAAhF,mHAAA,iCAAiC,OAAuB;AACjE,iCAAiD;AAAxC,sHAAA,OAAO,OAAgB"}
@@ -70,11 +70,11 @@ export default function (configSchema: LinearVariantDisplayConfigModel): import(
70
70
  error: unknown;
71
71
  } & {
72
72
  readonly RenderingComponent: import("react").FC<{
73
- model: import("mobx-state-tree").ModelInstanceTypeProps<{
74
- id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
75
- type: import("mobx-state-tree").ISimpleType<string>;
76
- rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
77
- }> & {
73
+ model: {
74
+ id: string;
75
+ type: string;
76
+ rpcDriverName: string | undefined;
77
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
78
78
  rendererTypeName: string;
79
79
  error: unknown;
80
80
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
@@ -89,11 +89,11 @@ export default function (configSchema: LinearVariantDisplayConfigModel): import(
89
89
  blockState?: Record<string, any> | undefined;
90
90
  }>;
91
91
  readonly DisplayBlurb: import("react").FC<{
92
- model: import("mobx-state-tree").ModelInstanceTypeProps<{
93
- id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
94
- type: import("mobx-state-tree").ISimpleType<string>;
95
- rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
96
- }> & {
92
+ model: {
93
+ id: string;
94
+ type: string;
95
+ rpcDriverName: string | undefined;
96
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
97
97
  rendererTypeName: string;
98
98
  error: unknown;
99
99
  } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
@@ -179,7 +179,9 @@ export default function (configSchema: LinearVariantDisplayConfigModel): import(
179
179
  trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
180
180
  contextMenuItems(): {
181
181
  label: string;
182
- icon: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
182
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
183
+ muiName: string;
184
+ };
183
185
  onClick: () => void;
184
186
  }[];
185
187
  renderProps(): any;
@@ -193,6 +195,7 @@ export default function (configSchema: LinearVariantDisplayConfigModel): import(
193
195
  readonly showDescriptions: any;
194
196
  readonly maxHeight: any;
195
197
  readonly displayMode: any;
198
+ } & {
196
199
  readonly rendererConfig: any;
197
200
  } & {
198
201
  toggleShowLabels(): void;
@@ -200,7 +203,9 @@ export default function (configSchema: LinearVariantDisplayConfigModel): import(
200
203
  setDisplayMode(val: string): void;
201
204
  setMaxHeight(val: number): void;
202
205
  } & {
203
- renderProps(): any;
206
+ renderProps(): {
207
+ config: any;
208
+ };
204
209
  trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
205
210
  } & {
206
211
  selectFeature(feature: Feature): Promise<void>;
@@ -1,75 +1,85 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = _default;
9
-
10
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
-
12
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
-
14
- var _configuration = require("@jbrowse/core/configuration");
15
-
16
- var _tracks = require("@jbrowse/core/util/tracks");
17
-
18
- var _util = require("@jbrowse/core/util");
19
-
20
- var _pluginLinearGenomeView = require("@jbrowse/plugin-linear-genome-view");
21
-
22
- var _mobxStateTree = require("mobx-state-tree");
23
-
24
- function _default(configSchema) {
25
- return _mobxStateTree.types.compose('LinearVariantDisplay', (0, _pluginLinearGenomeView.linearBasicDisplayModelFactory)(configSchema), _mobxStateTree.types.model({
26
- type: _mobxStateTree.types.literal('LinearVariantDisplay'),
27
- configuration: (0, _configuration.ConfigurationReference)(configSchema)
28
- })).actions(function (self) {
29
- return {
30
- selectFeature: function selectFeature(feature) {
31
- return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
32
- var session, rpcManager, sessionId, track, adapterConfig, header, featureWidget;
33
- return _regenerator.default.wrap(function _callee$(_context) {
34
- while (1) {
35
- switch (_context.prev = _context.next) {
36
- case 0:
37
- session = (0, _util.getSession)(self);
38
-
39
- if (!(0, _util.isSessionModelWithWidgets)(session)) {
40
- _context.next = 11;
41
- break;
42
- }
43
-
44
- rpcManager = session.rpcManager;
45
- sessionId = (0, _tracks.getRpcSessionId)(self);
46
- track = (0, _util.getContainingTrack)(self);
47
- adapterConfig = (0, _configuration.getConf)(track, 'adapter');
48
- _context.next = 8;
49
- return rpcManager.call(sessionId, 'CoreGetMetadata', {
50
- adapterConfig: adapterConfig
51
- });
52
-
53
- case 8:
54
- header = _context.sent;
55
- featureWidget = session.addWidget('VariantFeatureWidget', 'variantFeature', {
56
- featureData: feature.toJSON(),
57
- view: (0, _util.getContainingView)(self),
58
- descriptions: header
59
- });
60
- session.showWidget(featureWidget);
61
-
62
- case 11:
63
- session.setSelection(feature);
64
-
65
- case 12:
66
- case "end":
67
- return _context.stop();
68
- }
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
69
32
  }
70
- }, _callee);
71
- }))();
72
- }
73
- };
74
- });
75
- }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ var configuration_1 = require("@jbrowse/core/configuration");
40
+ var tracks_1 = require("@jbrowse/core/util/tracks");
41
+ var util_1 = require("@jbrowse/core/util");
42
+ var plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
43
+ var mobx_state_tree_1 = require("mobx-state-tree");
44
+ function default_1(configSchema) {
45
+ return mobx_state_tree_1.types
46
+ .compose('LinearVariantDisplay', (0, plugin_linear_genome_view_1.linearBasicDisplayModelFactory)(configSchema), mobx_state_tree_1.types.model({
47
+ type: mobx_state_tree_1.types.literal('LinearVariantDisplay'),
48
+ configuration: (0, configuration_1.ConfigurationReference)(configSchema),
49
+ }))
50
+ .actions(function (self) { return ({
51
+ selectFeature: function (feature) {
52
+ return __awaiter(this, void 0, void 0, function () {
53
+ var session, rpcManager, sessionId, track, adapterConfig, header, featureWidget;
54
+ return __generator(this, function (_a) {
55
+ switch (_a.label) {
56
+ case 0:
57
+ session = (0, util_1.getSession)(self);
58
+ if (!(0, util_1.isSessionModelWithWidgets)(session)) return [3 /*break*/, 2];
59
+ rpcManager = session.rpcManager;
60
+ sessionId = (0, tracks_1.getRpcSessionId)(self);
61
+ track = (0, util_1.getContainingTrack)(self);
62
+ adapterConfig = (0, configuration_1.getConf)(track, 'adapter');
63
+ return [4 /*yield*/, rpcManager.call(sessionId, 'CoreGetMetadata', {
64
+ adapterConfig: adapterConfig,
65
+ })];
66
+ case 1:
67
+ header = _a.sent();
68
+ featureWidget = session.addWidget('VariantFeatureWidget', 'variantFeature', {
69
+ featureData: feature.toJSON(),
70
+ view: (0, util_1.getContainingView)(self),
71
+ descriptions: header,
72
+ });
73
+ session.showWidget(featureWidget);
74
+ _a.label = 2;
75
+ case 2:
76
+ session.setSelection(feature);
77
+ return [2 /*return*/];
78
+ }
79
+ });
80
+ });
81
+ },
82
+ }); });
83
+ }
84
+ exports.default = default_1;
85
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/LinearVariantDisplay/model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA6E;AAC7E,oDAA2D;AAC3D,2CAK2B;AAG3B,gFAAmF;AACnF,mDAAuC;AAGvC,mBAAyB,YAA6C;IACpE,OAAO,uBAAK;SACT,OAAO,CACN,sBAAsB,EACtB,IAAA,0DAA8B,EAAC,YAAY,CAAC,EAC5C,uBAAK,CAAC,KAAK,CAAC;QACV,IAAI,EAAE,uBAAK,CAAC,OAAO,CAAC,sBAAsB,CAAC;QAC3C,aAAa,EAAE,IAAA,sCAAsB,EAAC,YAAY,CAAC;KACpD,CAAC,CACH;SACA,OAAO,CAAC,UAAA,IAAI,IAAI,OAAA,CAAC;QACV,aAAa,EAAnB,UAAoB,OAAgB;;;;;;4BAC5B,OAAO,GAAG,IAAA,iBAAU,EAAC,IAAI,CAAC,CAAA;iCAC5B,IAAA,gCAAyB,EAAC,OAAO,CAAC,EAAlC,wBAAkC;4BAC5B,UAAU,GAAK,OAAO,WAAZ,CAAY;4BACxB,SAAS,GAAG,IAAA,wBAAe,EAAC,IAAI,CAAC,CAAA;4BACjC,KAAK,GAAG,IAAA,yBAAkB,EAAC,IAAI,CAAC,CAAA;4BAChC,aAAa,GAAG,IAAA,uBAAO,EAAC,KAAK,EAAE,SAAS,CAAC,CAAA;4BAChC,qBAAM,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,EAAE;oCACjE,aAAa,eAAA;iCACd,CAAC,EAAA;;4BAFI,MAAM,GAAG,SAEb;4BACI,aAAa,GAAG,OAAO,CAAC,SAAS,CACrC,sBAAsB,EACtB,gBAAgB,EAChB;gCACE,WAAW,EAAE,OAAO,CAAC,MAAM,EAAE;gCAC7B,IAAI,EAAE,IAAA,wBAAiB,EAAC,IAAI,CAAC;gCAC7B,YAAY,EAAE,MAAM;6BACrB,CACF,CAAA;4BACD,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;;;4BAGnC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;;;;;SAC9B;KACF,CAAC,EAzBe,CAyBf,CAAC,CAAA;AACP,CAAC;AApCD,4BAoCC"}