@jbrowse/plugin-linear-genome-view 1.7.10 → 2.0.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 (271) hide show
  1. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +119 -139
  2. package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -0
  3. package/dist/BaseLinearDisplay/components/Block.js +53 -74
  4. package/dist/BaseLinearDisplay/components/Block.js.map +1 -0
  5. package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +11 -1
  6. package/dist/BaseLinearDisplay/components/LinearBlocks.js +64 -103
  7. package/dist/BaseLinearDisplay/components/LinearBlocks.js.map +1 -0
  8. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +145 -175
  9. package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -0
  10. package/dist/BaseLinearDisplay/components/Tooltip.js +109 -116
  11. package/dist/BaseLinearDisplay/components/Tooltip.js.map +1 -0
  12. package/dist/BaseLinearDisplay/index.js +13 -40
  13. package/dist/BaseLinearDisplay/index.js.map +1 -0
  14. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +20 -15
  15. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +605 -684
  16. package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -0
  17. package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js +15 -22
  18. package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +1 -0
  19. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +7 -8
  20. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +266 -312
  21. package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -0
  22. package/dist/LinearBareDisplay/configSchema.js +11 -17
  23. package/dist/LinearBareDisplay/configSchema.js.map +1 -0
  24. package/dist/LinearBareDisplay/index.js +7 -20
  25. package/dist/LinearBareDisplay/index.js.map +1 -0
  26. package/dist/LinearBareDisplay/model.d.ts +16 -14
  27. package/dist/LinearBareDisplay/model.js +36 -42
  28. package/dist/LinearBareDisplay/model.js.map +1 -0
  29. package/dist/LinearBasicDisplay/components/SetMaxHeight.d.ts +1 -1
  30. package/dist/LinearBasicDisplay/components/SetMaxHeight.js +76 -85
  31. package/dist/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -0
  32. package/dist/LinearBasicDisplay/configSchema.js +15 -23
  33. package/dist/LinearBasicDisplay/configSchema.js.map +1 -0
  34. package/dist/LinearBasicDisplay/index.js +10 -22
  35. package/dist/LinearBasicDisplay/index.js.map +1 -0
  36. package/dist/LinearBasicDisplay/model.d.ts +20 -15
  37. package/dist/LinearBasicDisplay/model.js +180 -159
  38. package/dist/LinearBasicDisplay/model.js.map +1 -0
  39. package/dist/LinearGenomeView/components/CenterLine.d.ts +2 -8
  40. package/dist/LinearGenomeView/components/CenterLine.js +60 -74
  41. package/dist/LinearGenomeView/components/CenterLine.js.map +1 -0
  42. package/dist/LinearGenomeView/components/ExportSvgDialog.js +141 -141
  43. package/dist/LinearGenomeView/components/ExportSvgDialog.js.map +1 -0
  44. package/dist/LinearGenomeView/components/Gridlines.d.ts +8 -0
  45. package/dist/LinearGenomeView/components/Gridlines.js +78 -0
  46. package/dist/LinearGenomeView/components/Gridlines.js.map +1 -0
  47. package/dist/LinearGenomeView/components/Header.js +70 -126
  48. package/dist/LinearGenomeView/components/Header.js.map +1 -0
  49. package/dist/LinearGenomeView/components/HelpDialog.d.ts +0 -1
  50. package/dist/LinearGenomeView/components/HelpDialog.js +62 -44
  51. package/dist/LinearGenomeView/components/HelpDialog.js.map +1 -0
  52. package/dist/LinearGenomeView/components/ImportForm.js +223 -320
  53. package/dist/LinearGenomeView/components/ImportForm.js.map +1 -0
  54. package/dist/LinearGenomeView/components/LinearGenomeView.js +64 -124
  55. package/dist/LinearGenomeView/components/LinearGenomeView.js.map +1 -0
  56. package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js +198 -337
  57. package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -0
  58. package/dist/LinearGenomeView/components/MiniControls.js +64 -78
  59. package/dist/LinearGenomeView/components/MiniControls.js.map +1 -0
  60. package/dist/LinearGenomeView/components/OverviewRubberBand.js +229 -293
  61. package/dist/LinearGenomeView/components/OverviewRubberBand.js.map +1 -0
  62. package/dist/LinearGenomeView/components/OverviewScaleBar.d.ts +24 -8
  63. package/dist/LinearGenomeView/components/OverviewScaleBar.js +277 -365
  64. package/dist/LinearGenomeView/components/OverviewScaleBar.js.map +1 -0
  65. package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +1 -1
  66. package/dist/LinearGenomeView/components/RefNameAutocomplete.js +237 -324
  67. package/dist/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -0
  68. package/dist/LinearGenomeView/components/RubberBand.js +228 -296
  69. package/dist/LinearGenomeView/components/RubberBand.js.map +1 -0
  70. package/dist/LinearGenomeView/components/Ruler.js +45 -90
  71. package/dist/LinearGenomeView/components/Ruler.js.map +1 -0
  72. package/dist/LinearGenomeView/components/ScaleBar.d.ts +8 -403
  73. package/dist/LinearGenomeView/components/ScaleBar.js +121 -172
  74. package/dist/LinearGenomeView/components/ScaleBar.js.map +1 -0
  75. package/dist/LinearGenomeView/components/SearchBox.js +158 -205
  76. package/dist/LinearGenomeView/components/SearchBox.js.map +1 -0
  77. package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +0 -1
  78. package/dist/LinearGenomeView/components/SearchResultsDialog.js +105 -150
  79. package/dist/LinearGenomeView/components/SearchResultsDialog.js.map +1 -0
  80. package/dist/LinearGenomeView/components/SequenceDialog.js +219 -272
  81. package/dist/LinearGenomeView/components/SequenceDialog.js.map +1 -0
  82. package/dist/LinearGenomeView/components/TrackContainer.js +116 -156
  83. package/dist/LinearGenomeView/components/TrackContainer.js.map +1 -0
  84. package/dist/LinearGenomeView/components/TrackLabel.d.ts +6 -42
  85. package/dist/LinearGenomeView/components/TrackLabel.js +115 -134
  86. package/dist/LinearGenomeView/components/TrackLabel.js.map +1 -0
  87. package/dist/LinearGenomeView/components/TracksContainer.d.ts +1 -1
  88. package/dist/LinearGenomeView/components/TracksContainer.js +172 -199
  89. package/dist/LinearGenomeView/components/TracksContainer.js.map +1 -0
  90. package/dist/LinearGenomeView/components/ZoomControls.js +72 -87
  91. package/dist/LinearGenomeView/components/ZoomControls.js.map +1 -0
  92. package/dist/LinearGenomeView/components/util.d.ts +12 -0
  93. package/dist/LinearGenomeView/components/util.js +95 -13
  94. package/dist/LinearGenomeView/components/util.js.map +1 -0
  95. package/dist/LinearGenomeView/index.d.ts +64 -77
  96. package/dist/LinearGenomeView/index.js +1035 -1412
  97. package/dist/LinearGenomeView/index.js.map +1 -0
  98. package/dist/LinearGenomeView/util.js +76 -83
  99. package/dist/LinearGenomeView/util.js.map +1 -0
  100. package/dist/index.d.ts +101 -51
  101. package/dist/index.js +225 -295
  102. package/dist/index.js.map +1 -0
  103. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +9 -0
  104. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js +68 -0
  105. package/esm/BaseLinearDisplay/components/BaseLinearDisplay.js.map +1 -0
  106. package/esm/BaseLinearDisplay/components/Block.d.ts +15 -0
  107. package/esm/BaseLinearDisplay/components/Block.js +46 -0
  108. package/esm/BaseLinearDisplay/components/Block.js.map +1 -0
  109. package/esm/BaseLinearDisplay/components/LinearBlocks.d.ts +22 -0
  110. package/esm/BaseLinearDisplay/components/LinearBlocks.js +62 -0
  111. package/esm/BaseLinearDisplay/components/LinearBlocks.js.map +1 -0
  112. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +4 -0
  113. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +113 -0
  114. package/esm/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js.map +1 -0
  115. package/esm/BaseLinearDisplay/components/Tooltip.d.ts +8 -0
  116. package/esm/BaseLinearDisplay/components/Tooltip.js +64 -0
  117. package/esm/BaseLinearDisplay/components/Tooltip.js.map +1 -0
  118. package/esm/BaseLinearDisplay/index.d.ts +5 -0
  119. package/esm/BaseLinearDisplay/index.js +4 -0
  120. package/esm/BaseLinearDisplay/index.js.map +1 -0
  121. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +232 -0
  122. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js +541 -0
  123. package/esm/BaseLinearDisplay/models/BaseLinearDisplayModel.js.map +1 -0
  124. package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.d.ts +1 -0
  125. package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js +14 -0
  126. package/esm/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.js.map +1 -0
  127. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +96 -0
  128. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js +225 -0
  129. package/esm/BaseLinearDisplay/models/serverSideRenderedBlock.js.map +1 -0
  130. package/esm/LinearBareDisplay/configSchema.d.ts +2 -0
  131. package/esm/LinearBareDisplay/configSchema.js +9 -0
  132. package/esm/LinearBareDisplay/configSchema.js.map +1 -0
  133. package/esm/LinearBareDisplay/index.d.ts +2 -0
  134. package/esm/LinearBareDisplay/index.js +3 -0
  135. package/esm/LinearBareDisplay/index.js.map +1 -0
  136. package/esm/LinearBareDisplay/model.d.ts +194 -0
  137. package/esm/LinearBareDisplay/model.js +28 -0
  138. package/esm/LinearBareDisplay/model.js.map +1 -0
  139. package/esm/LinearBasicDisplay/components/SetMaxHeight.d.ts +10 -0
  140. package/esm/LinearBasicDisplay/components/SetMaxHeight.js +40 -0
  141. package/esm/LinearBasicDisplay/components/SetMaxHeight.js.map +1 -0
  142. package/esm/LinearBasicDisplay/configSchema.d.ts +2 -0
  143. package/esm/LinearBasicDisplay/configSchema.js +14 -0
  144. package/esm/LinearBasicDisplay/configSchema.js.map +1 -0
  145. package/esm/LinearBasicDisplay/index.d.ts +2 -0
  146. package/esm/LinearBasicDisplay/index.js +3 -0
  147. package/esm/LinearBasicDisplay/index.js.map +1 -0
  148. package/esm/LinearBasicDisplay/model.d.ts +218 -0
  149. package/esm/LinearBasicDisplay/model.js +127 -0
  150. package/esm/LinearBasicDisplay/model.js.map +1 -0
  151. package/esm/LinearGenomeView/components/CenterLine.d.ts +8 -0
  152. package/esm/LinearGenomeView/components/CenterLine.js +40 -0
  153. package/esm/LinearGenomeView/components/CenterLine.js.map +1 -0
  154. package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +6 -0
  155. package/esm/LinearGenomeView/components/ExportSvgDialog.js +52 -0
  156. package/esm/LinearGenomeView/components/ExportSvgDialog.js.map +1 -0
  157. package/esm/LinearGenomeView/components/Gridlines.d.ts +8 -0
  158. package/esm/LinearGenomeView/components/Gridlines.js +71 -0
  159. package/esm/LinearGenomeView/components/Gridlines.js.map +1 -0
  160. package/esm/LinearGenomeView/components/Header.d.ts +7 -0
  161. package/esm/LinearGenomeView/components/Header.js +81 -0
  162. package/esm/LinearGenomeView/components/Header.js.map +1 -0
  163. package/esm/LinearGenomeView/components/HelpDialog.d.ts +4 -0
  164. package/esm/LinearGenomeView/components/HelpDialog.js +58 -0
  165. package/esm/LinearGenomeView/components/HelpDialog.js.map +1 -0
  166. package/esm/LinearGenomeView/components/ImportForm.d.ts +7 -0
  167. package/esm/LinearGenomeView/components/ImportForm.js +141 -0
  168. package/esm/LinearGenomeView/components/ImportForm.js.map +1 -0
  169. package/esm/LinearGenomeView/components/LinearGenomeView.d.ts +7 -0
  170. package/esm/LinearGenomeView/components/LinearGenomeView.js +67 -0
  171. package/esm/LinearGenomeView/components/LinearGenomeView.js.map +1 -0
  172. package/esm/LinearGenomeView/components/LinearGenomeViewSvg.d.ts +4 -0
  173. package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js +132 -0
  174. package/esm/LinearGenomeView/components/LinearGenomeViewSvg.js.map +1 -0
  175. package/esm/LinearGenomeView/components/MiniControls.d.ts +6 -0
  176. package/esm/LinearGenomeView/components/MiniControls.js +25 -0
  177. package/esm/LinearGenomeView/components/MiniControls.js.map +1 -0
  178. package/esm/LinearGenomeView/components/OverviewRubberBand.d.ts +22 -0
  179. package/esm/LinearGenomeView/components/OverviewRubberBand.js +197 -0
  180. package/esm/LinearGenomeView/components/OverviewRubberBand.js.map +1 -0
  181. package/esm/LinearGenomeView/components/OverviewScaleBar.d.ts +148 -0
  182. package/esm/LinearGenomeView/components/OverviewScaleBar.js +287 -0
  183. package/esm/LinearGenomeView/components/OverviewScaleBar.js.map +1 -0
  184. package/esm/LinearGenomeView/components/RefNameAutocomplete.d.ts +22 -0
  185. package/esm/LinearGenomeView/components/RefNameAutocomplete.js +136 -0
  186. package/esm/LinearGenomeView/components/RefNameAutocomplete.js.map +1 -0
  187. package/esm/LinearGenomeView/components/RubberBand.d.ts +9 -0
  188. package/esm/LinearGenomeView/components/RubberBand.js +197 -0
  189. package/esm/LinearGenomeView/components/RubberBand.js.map +1 -0
  190. package/esm/LinearGenomeView/components/Ruler.d.ts +27 -0
  191. package/esm/LinearGenomeView/components/Ruler.js +50 -0
  192. package/esm/LinearGenomeView/components/Ruler.js.map +1 -0
  193. package/esm/LinearGenomeView/components/ScaleBar.d.ts +10 -0
  194. package/esm/LinearGenomeView/components/ScaleBar.js +112 -0
  195. package/esm/LinearGenomeView/components/ScaleBar.js.map +1 -0
  196. package/esm/LinearGenomeView/components/SearchBox.d.ts +8 -0
  197. package/esm/LinearGenomeView/components/SearchBox.js +94 -0
  198. package/esm/LinearGenomeView/components/SearchBox.js.map +1 -0
  199. package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +7 -0
  200. package/esm/LinearGenomeView/components/SearchResultsDialog.js +107 -0
  201. package/esm/LinearGenomeView/components/SearchResultsDialog.js.map +1 -0
  202. package/esm/LinearGenomeView/components/SequenceDialog.d.ts +8 -0
  203. package/esm/LinearGenomeView/components/SequenceDialog.js +147 -0
  204. package/esm/LinearGenomeView/components/SequenceDialog.js.map +1 -0
  205. package/esm/LinearGenomeView/components/TrackContainer.d.ts +9 -0
  206. package/esm/LinearGenomeView/components/TrackContainer.js +109 -0
  207. package/esm/LinearGenomeView/components/TrackContainer.js.map +1 -0
  208. package/esm/LinearGenomeView/components/TrackLabel.d.ts +8 -0
  209. package/esm/LinearGenomeView/components/TrackLabel.js +89 -0
  210. package/esm/LinearGenomeView/components/TrackLabel.js.map +1 -0
  211. package/{dist/LinearGenomeView/components/VerticalGuides.d.ts → esm/LinearGenomeView/components/TracksContainer.d.ts} +4 -3
  212. package/esm/LinearGenomeView/components/TracksContainer.js +142 -0
  213. package/esm/LinearGenomeView/components/TracksContainer.js.map +1 -0
  214. package/esm/LinearGenomeView/components/ZoomControls.d.ts +7 -0
  215. package/esm/LinearGenomeView/components/ZoomControls.js +32 -0
  216. package/esm/LinearGenomeView/components/ZoomControls.js.map +1 -0
  217. package/esm/LinearGenomeView/components/util.d.ts +14 -0
  218. package/esm/LinearGenomeView/components/util.js +17 -0
  219. package/esm/LinearGenomeView/components/util.js.map +1 -0
  220. package/esm/LinearGenomeView/index.d.ts +275 -0
  221. package/esm/LinearGenomeView/index.js +978 -0
  222. package/esm/LinearGenomeView/index.js.map +1 -0
  223. package/esm/LinearGenomeView/util.d.ts +14 -0
  224. package/esm/LinearGenomeView/util.js +62 -0
  225. package/esm/LinearGenomeView/util.js.map +1 -0
  226. package/esm/index.d.ts +615 -0
  227. package/esm/index.js +127 -0
  228. package/esm/index.js.map +1 -0
  229. package/package.json +22 -15
  230. package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +4 -3
  231. package/src/BaseLinearDisplay/components/Block.tsx +5 -5
  232. package/src/BaseLinearDisplay/components/LinearBlocks.tsx +4 -4
  233. package/src/BaseLinearDisplay/components/ServerSideRenderedBlockContent.tsx +7 -8
  234. package/src/BaseLinearDisplay/components/Tooltip.tsx +14 -4
  235. package/src/BaseLinearDisplay/models/BaseLinearDisplayModel.tsx +6 -4
  236. package/src/BaseLinearDisplay/models/serverSideRenderedBlock.ts +1 -1
  237. package/src/LinearBasicDisplay/components/SetMaxHeight.tsx +10 -7
  238. package/src/LinearBasicDisplay/model.ts +21 -15
  239. package/src/LinearGenomeView/components/CenterLine.tsx +6 -11
  240. package/src/LinearGenomeView/components/ExportSvgDialog.tsx +5 -5
  241. package/src/LinearGenomeView/components/{VerticalGuides.tsx → Gridlines.tsx} +9 -11
  242. package/src/LinearGenomeView/components/Header.tsx +13 -18
  243. package/src/LinearGenomeView/components/HelpDialog.tsx +5 -5
  244. package/src/LinearGenomeView/components/ImportForm.tsx +24 -37
  245. package/src/LinearGenomeView/components/LinearGenomeView.test.js +16 -6
  246. package/src/LinearGenomeView/components/LinearGenomeView.tsx +4 -3
  247. package/src/LinearGenomeView/components/MiniControls.tsx +29 -40
  248. package/src/LinearGenomeView/components/OverviewRubberBand.tsx +20 -29
  249. package/src/LinearGenomeView/components/OverviewScaleBar.tsx +100 -89
  250. package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +13 -44
  251. package/src/LinearGenomeView/components/RubberBand.tsx +12 -18
  252. package/src/LinearGenomeView/components/Ruler.tsx +5 -11
  253. package/src/LinearGenomeView/components/ScaleBar.tsx +23 -27
  254. package/src/LinearGenomeView/components/SearchBox.tsx +22 -32
  255. package/src/LinearGenomeView/components/SearchResultsDialog.tsx +7 -7
  256. package/src/LinearGenomeView/components/SequenceDialog.tsx +10 -10
  257. package/src/LinearGenomeView/components/TrackContainer.tsx +12 -12
  258. package/src/LinearGenomeView/components/TrackLabel.tsx +21 -31
  259. package/src/LinearGenomeView/components/TracksContainer.tsx +10 -15
  260. package/src/LinearGenomeView/components/ZoomControls.tsx +12 -13
  261. package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +500 -547
  262. package/src/LinearGenomeView/components/util.ts +43 -0
  263. package/src/LinearGenomeView/index.test.ts +14 -36
  264. package/src/LinearGenomeView/index.tsx +390 -564
  265. package/src/index.ts +1 -1
  266. package/dist/LinearBareDisplay/index.test.js +0 -33
  267. package/dist/LinearGenomeView/components/LinearGenomeView.test.js +0 -234
  268. package/dist/LinearGenomeView/components/ScaleBar.test.js +0 -180
  269. package/dist/LinearGenomeView/components/VerticalGuides.js +0 -116
  270. package/dist/LinearGenomeView/index.test.js +0 -1187
  271. package/dist/LinearGenomeView/util.test.js +0 -78
package/dist/index.js CHANGED
@@ -1,306 +1,236 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- Object.defineProperty(exports, "BaseLinearDisplay", {
11
- enumerable: true,
12
- get: function get() {
13
- return _BaseLinearDisplay.BaseLinearDisplay;
14
- }
15
- });
16
- Object.defineProperty(exports, "BaseLinearDisplayComponent", {
17
- enumerable: true,
18
- get: function get() {
19
- return _BaseLinearDisplay.BaseLinearDisplayComponent;
20
- }
21
- });
22
- Object.defineProperty(exports, "RefNameAutocomplete", {
23
- enumerable: true,
24
- get: function get() {
25
- return _LinearGenomeView.RefNameAutocomplete;
26
- }
27
- });
28
- Object.defineProperty(exports, "SearchBox", {
29
- enumerable: true,
30
- get: function get() {
31
- return _LinearGenomeView.SearchBox;
32
- }
33
- });
34
- Object.defineProperty(exports, "baseLinearDisplayConfigSchema", {
35
- enumerable: true,
36
- get: function get() {
37
- return _BaseLinearDisplay.baseLinearDisplayConfigSchema;
38
- }
39
- });
40
- exports.default = void 0;
41
- Object.defineProperty(exports, "linearBareDisplayConfigSchemaFactory", {
42
- enumerable: true,
43
- get: function get() {
44
- return _LinearBareDisplay.configSchemaFactory;
45
- }
46
- });
47
- Object.defineProperty(exports, "linearBasicDisplayConfigSchemaFactory", {
48
- enumerable: true,
49
- get: function get() {
50
- return _LinearBasicDisplay.configSchema;
51
- }
52
- });
53
- Object.defineProperty(exports, "linearBasicDisplayModelFactory", {
54
- enumerable: true,
55
- get: function get() {
56
- return _LinearBasicDisplay.modelFactory;
57
- }
58
- });
59
- Object.defineProperty(exports, "renderToSvg", {
60
- enumerable: true,
61
- get: function get() {
62
- return _LinearGenomeView.renderToSvg;
63
- }
64
- });
65
-
66
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
67
-
68
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
69
-
70
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
71
-
72
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
73
-
74
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
75
-
76
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
77
-
78
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
79
-
80
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
81
-
82
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
83
-
84
- var _react = require("react");
85
-
86
- var _mobx = require("mobx");
87
-
88
- var _configuration = require("@jbrowse/core/configuration");
89
-
90
- var _models = require("@jbrowse/core/pluggableElementTypes/models");
91
-
92
- var _TrackType = _interopRequireDefault(require("@jbrowse/core/pluggableElementTypes/TrackType"));
93
-
94
- var _DisplayType = _interopRequireDefault(require("@jbrowse/core/pluggableElementTypes/DisplayType"));
95
-
96
- var _ViewType = _interopRequireDefault(require("@jbrowse/core/pluggableElementTypes/ViewType"));
97
-
98
- var _Plugin2 = _interopRequireDefault(require("@jbrowse/core/Plugin"));
99
-
100
- var _util = require("@jbrowse/core/util");
101
-
102
- var _LineStyle = _interopRequireDefault(require("@material-ui/icons/LineStyle"));
103
-
104
- var _BaseLinearDisplay = require("./BaseLinearDisplay");
105
-
106
- var _LinearBareDisplay = require("./LinearBareDisplay");
107
-
108
- var _LinearGenomeView = require("./LinearGenomeView");
109
-
110
- var _LinearBasicDisplay = require("./LinearBasicDisplay");
111
-
112
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
113
-
114
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
115
-
116
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
117
-
118
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
119
-
120
- var LinearGenomeViewPlugin = /*#__PURE__*/function (_Plugin) {
121
- (0, _inherits2.default)(LinearGenomeViewPlugin, _Plugin);
122
-
123
- var _super = _createSuper(LinearGenomeViewPlugin);
124
-
125
- function LinearGenomeViewPlugin() {
126
- var _this;
127
-
128
- (0, _classCallCheck2.default)(this, LinearGenomeViewPlugin);
129
-
130
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
131
- args[_key] = arguments[_key];
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
132
22
  }
133
-
134
- _this = _super.call.apply(_super, [this].concat(args));
135
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "name", 'LinearGenomeViewPlugin');
136
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "exports", {
137
- BaseLinearDisplayComponent: _BaseLinearDisplay.BaseLinearDisplayComponent,
138
- BaseLinearDisplay: _BaseLinearDisplay.BaseLinearDisplay,
139
- baseLinearDisplayConfigSchema: _BaseLinearDisplay.baseLinearDisplayConfigSchema
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
41
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
42
+ return new (P || (P = Promise))(function (resolve, reject) {
43
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
44
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
45
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
46
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
140
47
  });
141
- return _this;
142
- }
143
-
144
- (0, _createClass2.default)(LinearGenomeViewPlugin, [{
145
- key: "install",
146
- value: function install(pluginManager) {
147
- pluginManager.addTrackType(function () {
148
- var configSchema = (0, _configuration.ConfigurationSchema)('FeatureTrack', {}, {
149
- baseConfiguration: (0, _models.createBaseTrackConfig)(pluginManager),
150
- explicitIdentifier: 'trackId'
151
- });
152
- return new _TrackType.default({
153
- name: 'FeatureTrack',
154
- configSchema: configSchema,
155
- stateModel: (0, _models.createBaseTrackModel)(pluginManager, 'FeatureTrack', configSchema)
156
- });
157
- });
158
- pluginManager.addTrackType(function () {
159
- var configSchema = (0, _configuration.ConfigurationSchema)('BasicTrack', {}, {
160
- baseConfiguration: (0, _models.createBaseTrackConfig)(pluginManager),
161
- explicitIdentifier: 'trackId'
48
+ };
49
+ var __generator = (this && this.__generator) || function (thisArg, body) {
50
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
51
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
52
+ function verb(n) { return function (v) { return step([n, v]); }; }
53
+ function step(op) {
54
+ if (f) throw new TypeError("Generator is already executing.");
55
+ while (_) try {
56
+ 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;
57
+ if (y = 0, t) op = [op[0] & 2, t.value];
58
+ switch (op[0]) {
59
+ case 0: case 1: t = op; break;
60
+ case 4: _.label++; return { value: op[1], done: false };
61
+ case 5: _.label++; y = op[1]; op = [0]; continue;
62
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
63
+ default:
64
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
65
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
66
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
67
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
68
+ if (t[2]) _.ops.pop();
69
+ _.trys.pop(); continue;
70
+ }
71
+ op = body.call(thisArg, _);
72
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
73
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
74
+ }
75
+ };
76
+ var __importDefault = (this && this.__importDefault) || function (mod) {
77
+ return (mod && mod.__esModule) ? mod : { "default": mod };
78
+ };
79
+ Object.defineProperty(exports, "__esModule", { value: true });
80
+ exports.SearchBox = exports.RefNameAutocomplete = exports.BaseLinearDisplay = exports.BaseLinearDisplayComponent = exports.renderToSvg = exports.linearBasicDisplayModelFactory = exports.linearBasicDisplayConfigSchemaFactory = exports.linearBareDisplayConfigSchemaFactory = exports.baseLinearDisplayConfigSchema = void 0;
81
+ var react_1 = require("react");
82
+ var mobx_1 = require("mobx");
83
+ var configuration_1 = require("@jbrowse/core/configuration");
84
+ var models_1 = require("@jbrowse/core/pluggableElementTypes/models");
85
+ var TrackType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/TrackType"));
86
+ var DisplayType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/DisplayType"));
87
+ var ViewType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/ViewType"));
88
+ var Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
89
+ var util_1 = require("@jbrowse/core/util");
90
+ var LineStyle_1 = __importDefault(require("@mui/icons-material/LineStyle"));
91
+ var BaseLinearDisplay_1 = require("./BaseLinearDisplay");
92
+ Object.defineProperty(exports, "BaseLinearDisplay", { enumerable: true, get: function () { return BaseLinearDisplay_1.BaseLinearDisplay; } });
93
+ Object.defineProperty(exports, "BaseLinearDisplayComponent", { enumerable: true, get: function () { return BaseLinearDisplay_1.BaseLinearDisplayComponent; } });
94
+ Object.defineProperty(exports, "baseLinearDisplayConfigSchema", { enumerable: true, get: function () { return BaseLinearDisplay_1.baseLinearDisplayConfigSchema; } });
95
+ var LinearBareDisplay_1 = require("./LinearBareDisplay");
96
+ Object.defineProperty(exports, "linearBareDisplayConfigSchemaFactory", { enumerable: true, get: function () { return LinearBareDisplay_1.configSchemaFactory; } });
97
+ var LinearGenomeView_1 = require("./LinearGenomeView");
98
+ Object.defineProperty(exports, "renderToSvg", { enumerable: true, get: function () { return LinearGenomeView_1.renderToSvg; } });
99
+ Object.defineProperty(exports, "RefNameAutocomplete", { enumerable: true, get: function () { return LinearGenomeView_1.RefNameAutocomplete; } });
100
+ Object.defineProperty(exports, "SearchBox", { enumerable: true, get: function () { return LinearGenomeView_1.SearchBox; } });
101
+ var LinearBasicDisplay_1 = require("./LinearBasicDisplay");
102
+ Object.defineProperty(exports, "linearBasicDisplayConfigSchemaFactory", { enumerable: true, get: function () { return LinearBasicDisplay_1.configSchema; } });
103
+ Object.defineProperty(exports, "linearBasicDisplayModelFactory", { enumerable: true, get: function () { return LinearBasicDisplay_1.modelFactory; } });
104
+ var LinearGenomeViewPlugin = /** @class */ (function (_super) {
105
+ __extends(LinearGenomeViewPlugin, _super);
106
+ function LinearGenomeViewPlugin() {
107
+ var _this = _super !== null && _super.apply(this, arguments) || this;
108
+ _this.name = 'LinearGenomeViewPlugin';
109
+ _this.exports = {
110
+ BaseLinearDisplayComponent: BaseLinearDisplay_1.BaseLinearDisplayComponent,
111
+ BaseLinearDisplay: BaseLinearDisplay_1.BaseLinearDisplay,
112
+ baseLinearDisplayConfigSchema: BaseLinearDisplay_1.baseLinearDisplayConfigSchema,
113
+ };
114
+ return _this;
115
+ }
116
+ LinearGenomeViewPlugin.prototype.install = function (pluginManager) {
117
+ var _this = this;
118
+ pluginManager.addTrackType(function () {
119
+ var configSchema = (0, configuration_1.ConfigurationSchema)('FeatureTrack', {}, {
120
+ baseConfiguration: (0, models_1.createBaseTrackConfig)(pluginManager),
121
+ explicitIdentifier: 'trackId',
122
+ });
123
+ return new TrackType_1.default({
124
+ name: 'FeatureTrack',
125
+ configSchema: configSchema,
126
+ stateModel: (0, models_1.createBaseTrackModel)(pluginManager, 'FeatureTrack', configSchema),
127
+ });
162
128
  });
163
- return new _TrackType.default({
164
- name: 'BasicTrack',
165
- configSchema: configSchema,
166
- stateModel: (0, _models.createBaseTrackModel)(pluginManager, 'BasicTrack', configSchema)
129
+ pluginManager.addTrackType(function () {
130
+ var configSchema = (0, configuration_1.ConfigurationSchema)('BasicTrack', {}, {
131
+ baseConfiguration: (0, models_1.createBaseTrackConfig)(pluginManager),
132
+ explicitIdentifier: 'trackId',
133
+ });
134
+ return new TrackType_1.default({
135
+ name: 'BasicTrack',
136
+ configSchema: configSchema,
137
+ stateModel: (0, models_1.createBaseTrackModel)(pluginManager, 'BasicTrack', configSchema),
138
+ });
167
139
  });
168
- });
169
- pluginManager.addDisplayType(function () {
170
- var configSchema = (0, _LinearBareDisplay.configSchemaFactory)(pluginManager);
171
- return new _DisplayType.default({
172
- name: 'LinearBareDisplay',
173
- configSchema: configSchema,
174
- stateModel: (0, _LinearBareDisplay.stateModelFactory)(configSchema),
175
- trackType: 'BasicTrack',
176
- viewType: 'LinearGenomeView',
177
- ReactComponent: _BaseLinearDisplay.BaseLinearDisplayComponent
140
+ pluginManager.addDisplayType(function () {
141
+ var configSchema = (0, LinearBareDisplay_1.configSchemaFactory)(pluginManager);
142
+ return new DisplayType_1.default({
143
+ name: 'LinearBareDisplay',
144
+ configSchema: configSchema,
145
+ stateModel: (0, LinearBareDisplay_1.stateModelFactory)(configSchema),
146
+ trackType: 'BasicTrack',
147
+ viewType: 'LinearGenomeView',
148
+ ReactComponent: BaseLinearDisplay_1.BaseLinearDisplayComponent,
149
+ });
178
150
  });
179
- });
180
- pluginManager.addDisplayType(function () {
181
- var configSchema = (0, _LinearBasicDisplay.configSchema)(pluginManager);
182
- return new _DisplayType.default({
183
- name: 'LinearBasicDisplay',
184
- configSchema: configSchema,
185
- stateModel: (0, _LinearBasicDisplay.modelFactory)(configSchema),
186
- trackType: 'FeatureTrack',
187
- viewType: 'LinearGenomeView',
188
- ReactComponent: _BaseLinearDisplay.BaseLinearDisplayComponent
151
+ pluginManager.addDisplayType(function () {
152
+ var configSchema = (0, LinearBasicDisplay_1.configSchema)(pluginManager);
153
+ return new DisplayType_1.default({
154
+ name: 'LinearBasicDisplay',
155
+ configSchema: configSchema,
156
+ stateModel: (0, LinearBasicDisplay_1.modelFactory)(configSchema),
157
+ trackType: 'FeatureTrack',
158
+ viewType: 'LinearGenomeView',
159
+ ReactComponent: BaseLinearDisplay_1.BaseLinearDisplayComponent,
160
+ });
189
161
  });
190
- });
191
- pluginManager.addViewType(function () {
192
- return new _ViewType.default({
193
- name: 'LinearGenomeView',
194
- stateModel: (0, _LinearGenomeView.stateModelFactory)(pluginManager),
195
- ReactComponent: /*#__PURE__*/(0, _react.lazy)(function () {
196
- return Promise.resolve().then(function () {
197
- return _interopRequireWildcard(require('./LinearGenomeView/components/LinearGenomeView'));
162
+ pluginManager.addViewType(function () {
163
+ return new ViewType_1.default({
164
+ name: 'LinearGenomeView',
165
+ stateModel: (0, LinearGenomeView_1.stateModelFactory)(pluginManager),
166
+ ReactComponent: (0, react_1.lazy)(function () { return Promise.resolve().then(function () { return __importStar(require('./LinearGenomeView/components/LinearGenomeView')); }); }),
198
167
  });
199
- })
200
168
  });
201
- });
202
- pluginManager.addToExtensionPoint('LaunchView-LinearGenomeView',
203
- /*#__PURE__*/
204
- // @ts-ignore
205
- function () {
206
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) {
207
- var session, assembly, loc, _ref$tracks, tracks, assemblyManager, view, asm, idsNotFound;
208
-
209
- return _regenerator.default.wrap(function _callee$(_context) {
210
- while (1) {
211
- switch (_context.prev = _context.next) {
212
- case 0:
213
- session = _ref.session, assembly = _ref.assembly, loc = _ref.loc, _ref$tracks = _ref.tracks, tracks = _ref$tracks === void 0 ? [] : _ref$tracks;
214
- _context.prev = 1;
215
- assemblyManager = session.assemblyManager;
216
- view = session.addView('LinearGenomeView', {});
217
- _context.next = 6;
218
- return (0, _mobx.when)(function () {
219
- return !!view.volatileWidth;
220
- });
221
-
222
- case 6:
223
- if (assembly) {
224
- _context.next = 8;
225
- break;
226
- }
227
-
228
- throw new Error('No assembly provided when launching linear genome view');
229
-
230
- case 8:
231
- _context.next = 10;
232
- return assemblyManager.waitForAssembly(assembly);
233
-
234
- case 10:
235
- asm = _context.sent;
236
-
237
- if (asm) {
238
- _context.next = 13;
239
- break;
240
- }
241
-
242
- throw new Error("Assembly \"".concat(assembly, "\" not found when launching linear genome view"));
243
-
244
- case 13:
245
- view.navToLocString(loc, assembly);
246
- idsNotFound = [];
247
- tracks.forEach(function (track) {
248
- try {
249
- view.showTrack(track);
250
- } catch (e) {
251
- if ("".concat(e).match('Could not resolve identifier')) {
252
- idsNotFound.push(track);
253
- } else {
254
- throw e;
255
- }
169
+ pluginManager.addToExtensionPoint('LaunchView-LinearGenomeView',
170
+ // @ts-ignore
171
+ function (_a) {
172
+ var session = _a.session, assembly = _a.assembly, loc = _a.loc, _b = _a.tracks, tracks = _b === void 0 ? [] : _b;
173
+ return __awaiter(_this, void 0, void 0, function () {
174
+ var assemblyManager, view_1, asm, idsNotFound_1, e_1;
175
+ return __generator(this, function (_c) {
176
+ switch (_c.label) {
177
+ case 0:
178
+ _c.trys.push([0, 3, , 4]);
179
+ assemblyManager = session.assemblyManager;
180
+ view_1 = session.addView('LinearGenomeView', {});
181
+ return [4 /*yield*/, (0, mobx_1.when)(function () { return !!view_1.volatileWidth; })];
182
+ case 1:
183
+ _c.sent();
184
+ if (!assembly) {
185
+ throw new Error('No assembly provided when launching linear genome view');
186
+ }
187
+ return [4 /*yield*/, assemblyManager.waitForAssembly(assembly)];
188
+ case 2:
189
+ asm = _c.sent();
190
+ if (!asm) {
191
+ throw new Error("Assembly \"".concat(assembly, "\" not found when launching linear genome view"));
192
+ }
193
+ view_1.navToLocString(loc, assembly);
194
+ idsNotFound_1 = [];
195
+ tracks.forEach(function (track) {
196
+ try {
197
+ view_1.showTrack(track);
198
+ }
199
+ catch (e) {
200
+ if ("".concat(e).match('Could not resolve identifier')) {
201
+ idsNotFound_1.push(track);
202
+ }
203
+ else {
204
+ throw e;
205
+ }
206
+ }
207
+ });
208
+ if (idsNotFound_1.length) {
209
+ throw new Error("Could not resolve identifiers: ".concat(idsNotFound_1.join(',')));
210
+ }
211
+ return [3 /*break*/, 4];
212
+ case 3:
213
+ e_1 = _c.sent();
214
+ session.notify("".concat(e_1), 'error');
215
+ throw e_1;
216
+ case 4: return [2 /*return*/];
256
217
  }
257
- });
258
-
259
- if (!idsNotFound.length) {
260
- _context.next = 18;
261
- break;
262
- }
263
-
264
- throw new Error("Could not resolve identifiers: ".concat(idsNotFound.join(',')));
265
-
266
- case 18:
267
- _context.next = 24;
268
- break;
269
-
270
- case 20:
271
- _context.prev = 20;
272
- _context.t0 = _context["catch"](1);
273
- session.notify("".concat(_context.t0), 'error');
274
- throw _context.t0;
275
-
276
- case 24:
277
- case "end":
278
- return _context.stop();
279
- }
280
- }
281
- }, _callee, null, [[1, 20]]);
282
- }));
283
-
284
- return function (_x) {
285
- return _ref2.apply(this, arguments);
286
- };
287
- }());
288
- }
289
- }, {
290
- key: "configure",
291
- value: function configure(pluginManager) {
292
- if ((0, _util.isAbstractMenuManager)(pluginManager.rootModel)) {
293
- pluginManager.rootModel.appendToSubMenu(['Add'], {
294
- label: 'Linear genome view',
295
- icon: _LineStyle.default,
296
- onClick: function onClick(session) {
297
- session.addView('LinearGenomeView', {});
298
- }
218
+ });
219
+ });
299
220
  });
300
- }
301
- }
302
- }]);
303
- return LinearGenomeViewPlugin;
304
- }(_Plugin2.default);
305
-
306
- exports.default = LinearGenomeViewPlugin;
221
+ };
222
+ LinearGenomeViewPlugin.prototype.configure = function (pluginManager) {
223
+ if ((0, util_1.isAbstractMenuManager)(pluginManager.rootModel)) {
224
+ pluginManager.rootModel.appendToSubMenu(['Add'], {
225
+ label: 'Linear genome view',
226
+ icon: LineStyle_1.default,
227
+ onClick: function (session) {
228
+ session.addView('LinearGenomeView', {});
229
+ },
230
+ });
231
+ }
232
+ };
233
+ return LinearGenomeViewPlugin;
234
+ }(Plugin_1.default));
235
+ exports.default = LinearGenomeViewPlugin;
236
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA4B;AAC5B,6BAA2B;AAC3B,6DAAiE;AACjE,qEAGmD;AACnD,4FAAqE;AACrE,gGAAyE;AACzE,0FAAmE;AACnE,gEAAyC;AAEzC,2CAAgF;AAChF,4EAAyD;A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AAS,GAAT,UAAU,aAA4B;QACpC,IAAI,IAAA,4BAAqB,EAAC,aAAa,CAAC,SAAS,CAAC,EAAE;YAClD,aAAa,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,EAAE;gBAC/C,KAAK,EAAE,oBAAoB;gBAC3B,IAAI,EAAE,mBAAa;gBACnB,OAAO,EAAE,UAAC,OAA6B;oBACrC,OAAO,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAA;gBACzC,CAAC;aACF,CAAC,CAAA;SACH;IACH,CAAC;IACH,6BAAC;AAAD,CAAC,AA5JD,CAAoD,gBAAM,GA4JzD"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import Tooltip from './Tooltip';
3
+ import { BaseLinearDisplayModel } from '../models/BaseLinearDisplayModel';
4
+ declare const BaseLinearDisplay: (props: {
5
+ model: BaseLinearDisplayModel;
6
+ children?: React.ReactNode;
7
+ }) => JSX.Element;
8
+ export default BaseLinearDisplay;
9
+ export { Tooltip };
@@ -0,0 +1,68 @@
1
+ import React, { useState, useRef } from 'react';
2
+ import { observer } from 'mobx-react';
3
+ import { useTheme } from '@mui/material';
4
+ import { makeStyles } from 'tss-react/mui';
5
+ import { getConf } from '@jbrowse/core/configuration';
6
+ import { Menu } from '@jbrowse/core/ui';
7
+ // locals
8
+ import Tooltip from './Tooltip';
9
+ import LinearBlocks from './LinearBlocks';
10
+ const useStyles = makeStyles()({
11
+ display: {
12
+ position: 'relative',
13
+ whiteSpace: 'nowrap',
14
+ textAlign: 'left',
15
+ width: '100%',
16
+ minHeight: '100%',
17
+ },
18
+ });
19
+ const BaseLinearDisplay = observer((props) => {
20
+ const { classes } = useStyles();
21
+ const theme = useTheme();
22
+ const ref = useRef(null);
23
+ const [clientRect, setClientRect] = useState();
24
+ const [offsetMouseCoord, setOffsetMouseCoord] = useState([0, 0]);
25
+ const [clientMouseCoord, setClientMouseCoord] = useState([0, 0]);
26
+ const [contextCoord, setContextCoord] = useState();
27
+ const { model, children } = props;
28
+ const { TooltipComponent, DisplayMessageComponent, contextMenuItems, height, setContextMenuFeature, } = model;
29
+ return (React.createElement("div", { ref: ref, "data-testid": `display-${getConf(model, 'displayId')}`, className: classes.display, onContextMenu: event => {
30
+ event.preventDefault();
31
+ if (contextCoord) {
32
+ // There's already a context menu open, so close it
33
+ setContextCoord(undefined);
34
+ }
35
+ else if (ref.current) {
36
+ setContextCoord([event.clientX, event.clientY]);
37
+ }
38
+ }, onMouseMove: event => {
39
+ if (!ref.current) {
40
+ return;
41
+ }
42
+ const rect = ref.current.getBoundingClientRect();
43
+ const { left, top } = rect;
44
+ setOffsetMouseCoord([event.clientX - left, event.clientY - top]);
45
+ setClientMouseCoord([event.clientX, event.clientY]);
46
+ setClientRect(rect);
47
+ } },
48
+ DisplayMessageComponent ? (React.createElement(DisplayMessageComponent, { model: model })) : (React.createElement(LinearBlocks, { ...props })),
49
+ children,
50
+ React.createElement(TooltipComponent, { model: model, height: height, offsetMouseCoord: offsetMouseCoord, clientMouseCoord: clientMouseCoord, clientRect: clientRect, mouseCoord: offsetMouseCoord }),
51
+ React.createElement(Menu, { open: Boolean(contextCoord) && Boolean(contextMenuItems().length), onMenuItemClick: (_, callback) => {
52
+ callback();
53
+ setContextCoord(undefined);
54
+ }, onClose: () => {
55
+ setContextCoord(undefined);
56
+ setContextMenuFeature(undefined);
57
+ }, TransitionProps: {
58
+ onExit: () => {
59
+ setContextCoord(undefined);
60
+ setContextMenuFeature(undefined);
61
+ },
62
+ }, anchorReference: "anchorPosition", anchorPosition: contextCoord
63
+ ? { top: contextCoord[1], left: contextCoord[0] }
64
+ : undefined, style: { zIndex: theme.zIndex.tooltip }, menuItems: contextMenuItems(), "data-testid": "base_linear_display_context_menu" })));
65
+ });
66
+ export default BaseLinearDisplay;
67
+ export { Tooltip };
68
+ //# sourceMappingURL=BaseLinearDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseLinearDisplay.js","sourceRoot":"","s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