higlass 1.13.5 → 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 (392) hide show
  1. package/README.md +48 -54
  2. package/app/globals.d.ts +1 -1
  3. package/app/missing-types.d.ts +4 -1
  4. package/app/scripts/AddTrackDialog.jsx +11 -4
  5. package/app/scripts/AddTrackPositionMenu.jsx +28 -7
  6. package/app/scripts/Annotations1dTrack.js +90 -251
  7. package/app/scripts/Annotations2dTrack.js +12 -7
  8. package/app/scripts/Autocomplete.jsx +13 -28
  9. package/app/scripts/AxisPixi.js +6 -10
  10. package/app/scripts/BarTrack.js +3 -3
  11. package/app/scripts/BedLikeTrack.js +556 -449
  12. package/app/scripts/Button.jsx +1 -1
  13. package/app/scripts/CNVIntervalTrack.js +1 -1
  14. package/app/scripts/CenterTrack.jsx +8 -7
  15. package/app/scripts/Chromosome2DAnnotations.js +1 -1
  16. package/app/scripts/Chromosome2DLabels.js +1 -1
  17. package/app/scripts/ChromosomeGrid.js +49 -38
  18. package/app/scripts/ChromosomeInfo.js +1 -1
  19. package/app/scripts/CombinedTrack.js +3 -1
  20. package/app/scripts/ConfigTrackMenu.jsx +1 -1
  21. package/app/scripts/ConfigViewMenu.jsx +2 -2
  22. package/app/scripts/ContextMenuContainer.jsx +4 -2
  23. package/app/scripts/ContextMenuItem.jsx +14 -2
  24. package/app/scripts/CrossRule.js +1 -1
  25. package/app/scripts/CustomTrackDialog.jsx +2 -2
  26. package/app/scripts/Dialog.jsx +2 -2
  27. package/app/scripts/DragListeningDiv.jsx +1 -1
  28. package/app/scripts/DraggableDiv.jsx +2 -3
  29. package/app/scripts/ExportLinkDialog.jsx +1 -1
  30. package/app/scripts/FilledLine.js +349 -0
  31. package/app/scripts/GalleryTracks.jsx +77 -78
  32. package/app/scripts/GenomePositionSearchBox.jsx +184 -482
  33. package/app/scripts/HeatmapOptions.jsx +4 -2
  34. package/app/scripts/HeatmapTiledPixiTrack.js +23 -32
  35. package/app/scripts/HiGlassComponent.jsx +515 -444
  36. package/app/scripts/HiGlassComponentContext.js +5 -0
  37. package/app/scripts/Horizontal1dHeatmapTrack.js +1 -1
  38. package/app/scripts/Horizontal2DDomainsTrack.js +1 -1
  39. package/app/scripts/HorizontalChromosomeLabels.js +28 -22
  40. package/app/scripts/HorizontalGeneAnnotationsTrack.js +1 -1
  41. package/app/scripts/HorizontalHeatmapTrack.js +2 -2
  42. package/app/scripts/HorizontalMultivecTrack.js +6 -7
  43. package/app/scripts/HorizontalRule.js +1 -2
  44. package/app/scripts/HorizontalTiled1DPixiTrack.js +4 -4
  45. package/app/scripts/HorizontalTiledPlot.jsx +9 -9
  46. package/app/scripts/LeftTrackModifier.js +4 -0
  47. package/app/scripts/ListWrapper.jsx +1 -2
  48. package/app/scripts/MapboxTilesTrack.js +1 -2
  49. package/app/scripts/Modal.jsx +2 -2
  50. package/app/scripts/MoveableTrack.jsx +10 -12
  51. package/app/scripts/NestedContextMenu.jsx +2 -1
  52. package/app/scripts/OSMTileIdsTrack.js +1 -1
  53. package/app/scripts/OverlayTrack.js +4 -4
  54. package/app/scripts/PixiTrack.js +27 -13
  55. package/app/scripts/PlotTypeChooser.jsx +3 -4
  56. package/app/scripts/SearchField.js +5 -5
  57. package/app/scripts/SeriesListItems.jsx +3 -4
  58. package/app/scripts/SeriesListMenu.jsx +95 -53
  59. package/app/scripts/SeriesListSubmenuMixin.jsx +2 -1
  60. package/app/scripts/SketchInlinePicker.jsx +2 -2
  61. package/app/scripts/SortableList.jsx +1 -1
  62. package/app/scripts/Tiled1DPixiTrack.js +4 -1
  63. package/app/scripts/TiledPixiTrack.js +244 -102
  64. package/app/scripts/TiledPlot.jsx +565 -118
  65. package/app/scripts/TilesetFinder.jsx +12 -4
  66. package/app/scripts/Track.js +1 -1
  67. package/app/scripts/TrackArea.jsx +4 -0
  68. package/app/scripts/TrackControl.jsx +2 -2
  69. package/app/scripts/TrackRenderer.jsx +32 -33
  70. package/app/scripts/ValueIntervalTrack.js +1 -1
  71. package/app/scripts/VerticalRule.js +2 -2
  72. package/app/scripts/VerticalTiledPlot.jsx +7 -7
  73. package/app/scripts/ViewConfigEditor.jsx +1 -1
  74. package/app/scripts/ViewContextMenu.jsx +53 -5
  75. package/app/scripts/ViewHeader.jsx +9 -9
  76. package/app/scripts/ViewportTracker2D.js +1 -1
  77. package/app/scripts/api.js +92 -12
  78. package/app/scripts/configs/available-track-types.js +1 -1
  79. package/app/scripts/configs/index.js +6 -1
  80. package/app/scripts/configs/positions-by-datatype.js +2 -2
  81. package/app/scripts/configs/primitives.js +2 -0
  82. package/app/scripts/configs/themes.js +0 -1
  83. package/app/scripts/configs/tracks-info-by-type.js +11 -8
  84. package/app/scripts/configs/tracks-info.js +3 -2
  85. package/app/scripts/d3-context-menu.js +3 -4
  86. package/app/scripts/data-fetchers/DataFetcher.js +35 -36
  87. package/app/scripts/data-fetchers/genbank-fetcher.js +13 -22
  88. package/app/scripts/data-fetchers/local-tile-fetcher.js +10 -8
  89. package/app/scripts/hglib.jsx +62 -71
  90. package/app/scripts/hocs/with-modal.jsx +32 -10
  91. package/app/scripts/hocs/with-pub-sub.js +12 -3
  92. package/app/scripts/hocs/with-theme.jsx +21 -14
  93. package/app/scripts/icons.jsx +3 -2
  94. package/app/scripts/mixwith.js +2 -2
  95. package/app/scripts/options-info.js +49 -11
  96. package/app/scripts/plugins/get-data-fetcher.js +2 -3
  97. package/app/scripts/services/chrom-info.js +32 -4
  98. package/app/scripts/services/element-resize-listener.js +2 -2
  99. package/app/scripts/services/index.js +0 -1
  100. package/app/scripts/services/tile-proxy.js +368 -285
  101. package/app/scripts/services/worker.js +31 -28
  102. package/app/scripts/test-helpers/index.js +2 -1
  103. package/app/scripts/test-helpers/test-helpers.jsx +157 -69
  104. package/app/scripts/types.ts +118 -47
  105. package/app/scripts/utils/LruCache.js +3 -2
  106. package/app/scripts/utils/assert.js +19 -0
  107. package/app/scripts/utils/background-task-scheduler.js +2 -0
  108. package/app/scripts/utils/color-domain-to-rgba-array.js +13 -3
  109. package/app/scripts/utils/copy-text-to-clipboard.js +36 -0
  110. package/app/scripts/utils/decompress.js +33 -0
  111. package/app/scripts/utils/default-tracks.js +46 -0
  112. package/app/scripts/utils/dict-items.js +1 -0
  113. package/app/scripts/utils/dict-keys.js +1 -0
  114. package/app/scripts/utils/dict-values.js +1 -0
  115. package/app/scripts/utils/expand-combined-tracks.js +11 -7
  116. package/app/scripts/utils/fill-in-min-widths.js +47 -21
  117. package/app/scripts/utils/flatten.js +0 -1
  118. package/app/scripts/utils/get-aggregation-function.js +1 -1
  119. package/app/scripts/utils/get-default-track-for-datatype.js +37 -10
  120. package/app/scripts/utils/get-default-tracks-for-datatype.ts +46 -0
  121. package/app/scripts/utils/get-higlass-components.js +27 -3
  122. package/app/scripts/utils/get-track-position-by-uid.js +8 -1
  123. package/app/scripts/utils/get-xylofon.js +12 -9
  124. package/app/scripts/utils/has-parent.js +5 -5
  125. package/app/scripts/utils/hex-string-to-int.js +1 -1
  126. package/app/scripts/utils/index.js +1 -0
  127. package/app/scripts/utils/interval-tree.js +222 -177
  128. package/app/scripts/utils/load-chrom-infos.js +4 -1
  129. package/app/scripts/utils/pixi-text-to-svg.js +5 -9
  130. package/app/scripts/utils/positioned-tracks-to-all-tracks.js +55 -0
  131. package/app/scripts/utils/range-query-2d.js +3 -3
  132. package/app/scripts/utils/reduce.js +12 -5
  133. package/app/scripts/utils/segments-to-rows.js +14 -11
  134. package/app/scripts/utils/svg-line.js +7 -8
  135. package/app/scripts/utils/type-guards.js +16 -7
  136. package/app/scripts/utils/visit-positioned-tracks.js +9 -4
  137. package/app/styles/AddTrackPositionMenu.module.scss +37 -0
  138. package/app/styles/HiGlass.module.scss +3 -1
  139. package/app/styles/d3-context-menu.css +0 -1
  140. package/app/styles/prism.css +1 -0
  141. package/dist/app/schema.json +525 -0
  142. package/dist/app/scripts/AddTrackDialog.d.ts +64 -0
  143. package/dist/app/scripts/AddTrackPositionMenu.d.ts +5 -0
  144. package/dist/app/scripts/Annotations1dTrack.d.ts +15 -0
  145. package/dist/app/scripts/Annotations2dTrack.d.ts +95 -0
  146. package/dist/app/scripts/ArrowheadDomainsTrack.d.ts +36 -0
  147. package/dist/app/scripts/Autocomplete.d.ts +102 -0
  148. package/dist/app/scripts/AxisPixi.d.ts +25 -0
  149. package/dist/app/scripts/BarTrack.d.ts +28 -0
  150. package/dist/app/scripts/BedLikeTrack.d.ts +84 -0
  151. package/dist/app/scripts/Button.d.ts +3 -0
  152. package/dist/app/scripts/CNVIntervalTrack.d.ts +12 -0
  153. package/dist/app/scripts/CenterTiledPlot.d.ts +3 -0
  154. package/dist/app/scripts/CenterTrack.d.ts +92 -0
  155. package/dist/app/scripts/Chromosome2DAnnotations.d.ts +10 -0
  156. package/dist/app/scripts/Chromosome2DLabels.d.ts +13 -0
  157. package/dist/app/scripts/ChromosomeGrid.d.ts +24 -0
  158. package/dist/app/scripts/ChromosomeInfo.d.ts +14 -0
  159. package/dist/app/scripts/CloseTrackMenu.d.ts +10 -0
  160. package/dist/app/scripts/CombinedTrack.d.ts +32 -0
  161. package/dist/app/scripts/ConfigTrackMenu.d.ts +10 -0
  162. package/dist/app/scripts/ConfigViewMenu.d.ts +34 -0
  163. package/dist/app/scripts/ConfigureSeriesMenu.d.ts +3 -0
  164. package/dist/app/scripts/ContextMenuContainer.d.ts +36 -0
  165. package/dist/app/scripts/ContextMenuItem.d.ts +34 -0
  166. package/dist/app/scripts/Cross.d.ts +3 -0
  167. package/dist/app/scripts/CrossRule.d.ts +24 -0
  168. package/dist/app/scripts/CustomTrackDialog.d.ts +17 -0
  169. package/dist/app/scripts/Dialog.d.ts +5 -0
  170. package/dist/app/scripts/DivergentBarTrack.d.ts +4 -0
  171. package/dist/app/scripts/DragListeningDiv.d.ts +32 -0
  172. package/dist/app/scripts/DraggableDiv.d.ts +63 -0
  173. package/dist/app/scripts/ExportLinkDialog.d.ts +21 -0
  174. package/dist/app/scripts/FilledLine.d.ts +5 -0
  175. package/dist/app/scripts/FixedTrack.d.ts +5 -0
  176. package/dist/app/scripts/GalleryTracks.d.ts +20 -0
  177. package/dist/app/scripts/GenomePositionSearchBox.d.ts +95 -0
  178. package/dist/app/scripts/HeatmapOptions.d.ts +30 -0
  179. package/dist/app/scripts/HeatmapTiledPixiTrack.d.ts +184 -0
  180. package/dist/app/scripts/HiGlassComponent.d.ts +762 -0
  181. package/dist/app/scripts/HiGlassComponentContext.d.ts +3 -0
  182. package/dist/app/scripts/HiGlassTrackComponent.d.ts +37 -0
  183. package/dist/app/scripts/Horizontal1dHeatmapTrack.d.ts +9 -0
  184. package/dist/app/scripts/Horizontal2DDomainsTrack.d.ts +21 -0
  185. package/dist/app/scripts/HorizontalChromosomeLabels.d.ts +47 -0
  186. package/dist/app/scripts/HorizontalGeneAnnotationsTrack.d.ts +25 -0
  187. package/dist/app/scripts/HorizontalHeatmapTrack.d.ts +12 -0
  188. package/dist/app/scripts/HorizontalItem.d.ts +3 -0
  189. package/dist/app/scripts/HorizontalLine1DPixiTrack.d.ts +23 -0
  190. package/dist/app/scripts/HorizontalMultivecTrack.d.ts +50 -0
  191. package/dist/app/scripts/HorizontalPoint1DPixiTrack.d.ts +5 -0
  192. package/dist/app/scripts/HorizontalRule.d.ts +22 -0
  193. package/dist/app/scripts/HorizontalTiled1DPixiTrack.d.ts +26 -0
  194. package/dist/app/scripts/HorizontalTiledPlot.d.ts +49 -0
  195. package/dist/app/scripts/HorizontalTrack.d.ts +6 -0
  196. package/dist/app/scripts/Id2DTiledPixiTrack.d.ts +10 -0
  197. package/dist/app/scripts/IdHorizontal1DTiledPixiTrack.d.ts +6 -0
  198. package/dist/app/scripts/IdVertical1DTiledPixiTrack.d.ts +7 -0
  199. package/dist/app/scripts/LeftAxisTrack.d.ts +9 -0
  200. package/dist/app/scripts/LeftTrackModifier.d.ts +29 -0
  201. package/dist/app/scripts/ListWrapper.d.ts +64 -0
  202. package/dist/app/scripts/MapboxTilesTrack.d.ts +9 -0
  203. package/dist/app/scripts/Modal.d.ts +5 -0
  204. package/dist/app/scripts/MoveableTrack.d.ts +18 -0
  205. package/dist/app/scripts/NestedContextMenu.d.ts +7 -0
  206. package/dist/app/scripts/OSMTileIdsTrack.d.ts +5 -0
  207. package/dist/app/scripts/OSMTilesTrack.d.ts +129 -0
  208. package/dist/app/scripts/OverlayTrack.d.ts +13 -0
  209. package/dist/app/scripts/PixiTrack.d.ts +174 -0
  210. package/dist/app/scripts/PlotTypeChooser.d.ts +25 -0
  211. package/dist/app/scripts/PopupMenu.d.ts +28 -0
  212. package/dist/app/scripts/RasterTilesTrack.d.ts +9 -0
  213. package/dist/app/scripts/RuleMixin.d.ts +2 -0
  214. package/dist/app/scripts/SVGTrack.d.ts +15 -0
  215. package/dist/app/scripts/SearchField.d.ts +13 -0
  216. package/dist/app/scripts/SeriesListItems.d.ts +2 -0
  217. package/dist/app/scripts/SeriesListMenu.d.ts +51 -0
  218. package/dist/app/scripts/SeriesListSubmenuMixin.d.ts +2 -0
  219. package/dist/app/scripts/SketchInlinePicker.d.ts +25 -0
  220. package/dist/app/scripts/SortableList.d.ts +22 -0
  221. package/dist/app/scripts/SquareMarkersTrack.d.ts +22 -0
  222. package/dist/app/scripts/Tiled1DPixiTrack.d.ts +60 -0
  223. package/dist/app/scripts/TiledPixiTrack.d.ts +369 -0
  224. package/dist/app/scripts/TiledPlot.d.ts +313 -0
  225. package/dist/app/scripts/TilesetFinder.d.ts +65 -0
  226. package/dist/app/scripts/TopAxisTrack.d.ts +9 -0
  227. package/dist/app/scripts/Track.d.ts +196 -0
  228. package/dist/app/scripts/TrackArea.d.ts +26 -0
  229. package/dist/app/scripts/TrackControl.d.ts +5 -0
  230. package/dist/app/scripts/TrackRenderer.d.ts +724 -0
  231. package/dist/app/scripts/UnknownPixiTrack.d.ts +7 -0
  232. package/dist/app/scripts/ValueIntervalTrack.d.ts +6 -0
  233. package/dist/app/scripts/VerticalItem.d.ts +3 -0
  234. package/dist/app/scripts/VerticalRule.d.ts +21 -0
  235. package/dist/app/scripts/VerticalTiled1DPixiTrack.d.ts +6 -0
  236. package/dist/app/scripts/VerticalTiledPlot.d.ts +50 -0
  237. package/dist/app/scripts/VerticalTrack.d.ts +6 -0
  238. package/dist/app/scripts/ViewConfigEditor.d.ts +53 -0
  239. package/dist/app/scripts/ViewContextMenu.d.ts +17 -0
  240. package/dist/app/scripts/ViewHeader.d.ts +75 -0
  241. package/dist/app/scripts/ViewportTracker2D.d.ts +17 -0
  242. package/dist/app/scripts/ViewportTracker2DPixi.d.ts +11 -0
  243. package/dist/app/scripts/ViewportTrackerHorizontal.d.ts +17 -0
  244. package/dist/app/scripts/ViewportTrackerVertical.d.ts +17 -0
  245. package/dist/app/scripts/api.d.ts +640 -0
  246. package/dist/app/scripts/configs/available-track-types.d.ts +2 -0
  247. package/dist/app/scripts/configs/colormaps.d.ts +2 -0
  248. package/dist/app/scripts/configs/datatype-to-track-type.d.ts +4 -0
  249. package/dist/app/scripts/configs/default-tracks-for-datatype.d.ts +38 -0
  250. package/dist/app/scripts/configs/dense-data-extrema-config.d.ts +2 -0
  251. package/dist/app/scripts/configs/globals.d.ts +5 -0
  252. package/dist/app/scripts/configs/index.d.ts +16 -0
  253. package/dist/app/scripts/configs/positions-by-datatype.d.ts +2 -0
  254. package/dist/app/scripts/configs/primitives.d.ts +20 -0
  255. package/dist/app/scripts/configs/themes.d.ts +3 -0
  256. package/dist/app/scripts/configs/tracks-info-by-type.d.ts +4 -0
  257. package/dist/app/scripts/configs/tracks-info.d.ts +24 -0
  258. package/dist/app/scripts/d3-context-menu.d.ts +2 -0
  259. package/dist/app/scripts/data-fetchers/DataFetcher.d.ts +151 -0
  260. package/dist/app/scripts/data-fetchers/genbank-fetcher.d.ts +86 -0
  261. package/dist/app/scripts/data-fetchers/index.d.ts +3 -0
  262. package/dist/app/scripts/data-fetchers/local-tile-fetcher.d.ts +47 -0
  263. package/dist/app/scripts/gosling-exports.d.ts +17 -0
  264. package/dist/app/scripts/hglib.d.ts +24 -0
  265. package/dist/app/scripts/hocs/with-modal.d.ts +19 -0
  266. package/dist/app/scripts/hocs/with-pub-sub.d.ts +22 -0
  267. package/dist/app/scripts/hocs/with-theme.d.ts +13 -0
  268. package/dist/app/scripts/icons.d.ts +161 -0
  269. package/dist/app/scripts/mixwith.d.ts +27 -0
  270. package/dist/app/scripts/options-info.d.ts +1355 -0
  271. package/dist/app/scripts/plugins/available-for-plugins.d.ts +2338 -0
  272. package/dist/app/scripts/plugins/get-data-fetcher.d.ts +2 -0
  273. package/dist/app/scripts/plugins/index.d.ts +2 -0
  274. package/dist/app/scripts/services/chrom-info.d.ts +10 -0
  275. package/dist/app/scripts/services/dom-event.d.ts +7 -0
  276. package/dist/app/scripts/services/element-resize-listener.d.ts +5 -0
  277. package/dist/app/scripts/services/index.d.ts +5 -0
  278. package/dist/app/scripts/services/tile-proxy.d.ts +180 -0
  279. package/dist/app/scripts/services/worker.d.ts +157 -0
  280. package/dist/app/scripts/symbol.d.ts +13 -0
  281. package/dist/app/scripts/test-helpers/index.d.ts +1 -0
  282. package/dist/app/scripts/test-helpers/test-helpers.d.ts +33 -0
  283. package/dist/app/scripts/track-utils.d.ts +73 -0
  284. package/dist/app/scripts/types.d.ts +199 -0
  285. package/dist/app/scripts/utils/DenseDataExtrema1D.d.ts +88 -0
  286. package/dist/app/scripts/utils/DenseDataExtrema2D.d.ts +97 -0
  287. package/dist/app/scripts/utils/LruCache.d.ts +44 -0
  288. package/dist/app/scripts/utils/abs-to-chr.d.ts +14 -0
  289. package/dist/app/scripts/utils/accessor-transposition.d.ts +14 -0
  290. package/dist/app/scripts/utils/add-arrays.d.ts +18 -0
  291. package/dist/app/scripts/utils/add-class.d.ts +8 -0
  292. package/dist/app/scripts/utils/add-event-listener-once.d.ts +11 -0
  293. package/dist/app/scripts/utils/assert.d.ts +17 -0
  294. package/dist/app/scripts/utils/background-task-scheduler.d.ts +47 -0
  295. package/dist/app/scripts/utils/base64-to-canvas.d.ts +9 -0
  296. package/dist/app/scripts/utils/chr-to-abs.d.ts +10 -0
  297. package/dist/app/scripts/utils/chrom-info-bisector.d.ts +4 -0
  298. package/dist/app/scripts/utils/clone-event.d.ts +12 -0
  299. package/dist/app/scripts/utils/color-domain-to-rgba-array.d.ts +13 -0
  300. package/dist/app/scripts/utils/color-to-hex.d.ts +9 -0
  301. package/dist/app/scripts/utils/color-to-rgba.d.ts +9 -0
  302. package/dist/app/scripts/utils/copy-text-to-clipboard.d.ts +2 -0
  303. package/dist/app/scripts/utils/data-to-genomic-loci.d.ts +11 -0
  304. package/dist/app/scripts/utils/debounce.d.ts +5 -0
  305. package/dist/app/scripts/utils/dec-to-hex-str.d.ts +8 -0
  306. package/dist/app/scripts/utils/decompress.d.ts +27 -0
  307. package/dist/app/scripts/utils/default-tracks.d.ts +3 -0
  308. package/dist/app/scripts/utils/dict-from-tuples.d.ts +11 -0
  309. package/dist/app/scripts/utils/dict-items.d.ts +18 -0
  310. package/dist/app/scripts/utils/dict-keys.d.ts +10 -0
  311. package/dist/app/scripts/utils/dict-values.d.ts +8 -0
  312. package/dist/app/scripts/utils/download.d.ts +7 -0
  313. package/dist/app/scripts/utils/expand-combined-tracks.d.ts +11 -0
  314. package/dist/app/scripts/utils/fake-pub-sub.d.ts +11 -0
  315. package/dist/app/scripts/utils/fill-in-min-widths.d.ts +44 -0
  316. package/dist/app/scripts/utils/flatten.d.ts +9 -0
  317. package/dist/app/scripts/utils/for-each.d.ts +9 -0
  318. package/dist/app/scripts/utils/forward-event.d.ts +7 -0
  319. package/dist/app/scripts/utils/genome-loci-to-pixels.d.ts +9 -0
  320. package/dist/app/scripts/utils/genomic-range-to-chromosome-chunks.d.ts +21 -0
  321. package/dist/app/scripts/utils/get-aggregation-function.d.ts +10 -0
  322. package/dist/app/scripts/utils/get-default-track-for-datatype.d.ts +21 -0
  323. package/dist/app/scripts/utils/get-default-tracks-for-datatype.d.ts +3 -0
  324. package/dist/app/scripts/utils/get-element-dim.d.ts +7 -0
  325. package/dist/app/scripts/utils/get-higlass-components.d.ts +7 -0
  326. package/dist/app/scripts/utils/get-track-by-uid.d.ts +7 -0
  327. package/dist/app/scripts/utils/get-track-conf-from-hgc.d.ts +10 -0
  328. package/dist/app/scripts/utils/get-track-obj-by-id.d.ts +2 -0
  329. package/dist/app/scripts/utils/get-track-position-by-uid.d.ts +13 -0
  330. package/dist/app/scripts/utils/get-xylofon.d.ts +2 -0
  331. package/dist/app/scripts/utils/gradient.d.ts +14 -0
  332. package/dist/app/scripts/utils/has-class.d.ts +8 -0
  333. package/dist/app/scripts/utils/has-parent.d.ts +9 -0
  334. package/dist/app/scripts/utils/hex-string-to-int.d.ts +14 -0
  335. package/dist/app/scripts/utils/index.d.ts +89 -0
  336. package/dist/app/scripts/utils/interval-tree.d.ts +109 -0
  337. package/dist/app/scripts/utils/into-the-void.d.ts +6 -0
  338. package/dist/app/scripts/utils/is-track-or-child-track.d.ts +7 -0
  339. package/dist/app/scripts/utils/is-track-range-selectable.d.ts +2 -0
  340. package/dist/app/scripts/utils/is-within.d.ts +12 -0
  341. package/dist/app/scripts/utils/lat-to-y.d.ts +9 -0
  342. package/dist/app/scripts/utils/lng-to-x.d.ts +8 -0
  343. package/dist/app/scripts/utils/load-chrom-infos.d.ts +8 -0
  344. package/dist/app/scripts/utils/map.d.ts +13 -0
  345. package/dist/app/scripts/utils/max-non-zero.d.ts +6 -0
  346. package/dist/app/scripts/utils/max.d.ts +10 -0
  347. package/dist/app/scripts/utils/min-non-zero.d.ts +6 -0
  348. package/dist/app/scripts/utils/min.d.ts +10 -0
  349. package/dist/app/scripts/utils/mod.d.ts +9 -0
  350. package/dist/app/scripts/utils/ndarray-assign.d.ts +2 -0
  351. package/dist/app/scripts/utils/ndarray-flatten.d.ts +2 -0
  352. package/dist/app/scripts/utils/ndarray-to-list.d.ts +2 -0
  353. package/dist/app/scripts/utils/numericify-version.d.ts +6 -0
  354. package/dist/app/scripts/utils/obj-vals.d.ts +8 -0
  355. package/dist/app/scripts/utils/or.d.ts +8 -0
  356. package/dist/app/scripts/utils/parse-chromsizes-rows.d.ts +34 -0
  357. package/dist/app/scripts/utils/pixi-text-to-svg.d.ts +2 -0
  358. package/dist/app/scripts/utils/positioned-tracks-to-all-tracks.d.ts +26 -0
  359. package/dist/app/scripts/utils/q.d.ts +18 -0
  360. package/dist/app/scripts/utils/rad-to-deg.d.ts +7 -0
  361. package/dist/app/scripts/utils/range-query-2d.d.ts +17 -0
  362. package/dist/app/scripts/utils/reduce.d.ts +14 -0
  363. package/dist/app/scripts/utils/rel-to-abs-chrom-pos.d.ts +10 -0
  364. package/dist/app/scripts/utils/remove-class.d.ts +7 -0
  365. package/dist/app/scripts/utils/reset-d3-brush-style.d.ts +10 -0
  366. package/dist/app/scripts/utils/rgb-to-hex.d.ts +8 -0
  367. package/dist/app/scripts/utils/scales-center-and-k.d.ts +12 -0
  368. package/dist/app/scripts/utils/scales-to-genome-loci.d.ts +3 -0
  369. package/dist/app/scripts/utils/segments-to-rows.d.ts +15 -0
  370. package/dist/app/scripts/utils/selected-items-to-cum-weights.d.ts +12 -0
  371. package/dist/app/scripts/utils/selected-items-to-size.d.ts +13 -0
  372. package/dist/app/scripts/utils/show-mouse-position.d.ts +54 -0
  373. package/dist/app/scripts/utils/some.d.ts +10 -0
  374. package/dist/app/scripts/utils/sum.d.ts +8 -0
  375. package/dist/app/scripts/utils/svg-line.d.ts +2 -0
  376. package/dist/app/scripts/utils/throttle-and-debounce.d.ts +33 -0
  377. package/dist/app/scripts/utils/tile-to-canvas.d.ts +9 -0
  378. package/dist/app/scripts/utils/timeout.d.ts +3 -0
  379. package/dist/app/scripts/utils/to-void.d.ts +3 -0
  380. package/dist/app/scripts/utils/total-track-pixel-height.d.ts +27 -0
  381. package/dist/app/scripts/utils/trim-trailing-slash.d.ts +7 -0
  382. package/dist/app/scripts/utils/type-guards.d.ts +36 -0
  383. package/dist/app/scripts/utils/value-to-color.d.ts +12 -0
  384. package/dist/app/scripts/utils/visit-positioned-tracks.d.ts +18 -0
  385. package/dist/app/scripts/utils/visit-tracks.d.ts +9 -0
  386. package/dist/esm.html +1 -3
  387. package/dist/hglib.js +86315 -100592
  388. package/dist/hglib.min.js +123 -131
  389. package/dist/higlass.mjs +88861 -103138
  390. package/dist/index.html +1 -3
  391. package/dist/package.json +134 -0
  392. package/package.json +25 -27
@@ -0,0 +1,762 @@
1
+ export default HiGlassComponent;
2
+ declare class HiGlassComponent extends React.Component<any, any, any> {
3
+ constructor(props: any);
4
+ topDivRef: React.RefObject<any>;
5
+ pubSub: any;
6
+ domEvent: any;
7
+ pubSubs: any[];
8
+ minHorizontalHeight: number;
9
+ minVerticalWidth: number;
10
+ resizeSensor: ResizeSensor | null;
11
+ uid: string;
12
+ /** @type {Record<string, import('./TiledPlot').TiledPlot> */
13
+ tiledPlots: Record<string, import("./TiledPlot").TiledPlot>;
14
+ genomePositionSearchBoxes: {};
15
+ /** @type {Record<string, import('./TrackRenderer').Scale>} */
16
+ xScales: Record<string, import("./TrackRenderer").Scale>;
17
+ /** @type {Record<string, import('./TrackRenderer').Scale>} */
18
+ yScales: Record<string, import("./TrackRenderer").Scale>;
19
+ projectionXDomains: {};
20
+ projectionYDomains: {};
21
+ topDiv: any;
22
+ zoomToDataExtentOnInit: Set<any>;
23
+ viewTrackUidsToCombinedUid: {};
24
+ combinedUidToViewTrack: {};
25
+ scalesChangedListeners: {};
26
+ draggingChangedListeners: {};
27
+ valueScalesChangedListeners: {};
28
+ zoomLocks: {};
29
+ locationLocks: {};
30
+ locationLocksAxisWise: {
31
+ x: {};
32
+ y: {};
33
+ };
34
+ valueScaleLocks: {};
35
+ prevAuthToken: any;
36
+ setCenters: {};
37
+ plusImg: {};
38
+ configImg: {};
39
+ viewMarginTop: number;
40
+ viewMarginBottom: number;
41
+ viewMarginLeft: number;
42
+ viewMarginRight: number;
43
+ viewPaddingTop: number;
44
+ viewPaddingBottom: number;
45
+ viewPaddingLeft: number;
46
+ viewPaddingRight: number;
47
+ genomePositionSearchBox: any;
48
+ viewHeaders: {};
49
+ boundRefreshView: () => void;
50
+ unsetOnLocationChange: any[];
51
+ viewconfLoaded: boolean;
52
+ pixiRoot: PIXI.Container<PIXI.DisplayObject>;
53
+ pixiStage: PIXI.Container<PIXI.DisplayObject>;
54
+ pixiMask: PIXI.Graphics;
55
+ element: any;
56
+ scrollTop: number;
57
+ mounted: boolean;
58
+ pluginTracks: {};
59
+ pluginDataFetchers: any;
60
+ state: {
61
+ currentBreakpoint: string;
62
+ width: number;
63
+ height: number;
64
+ rowHeight: number;
65
+ svgElement: null;
66
+ canvasElement: null;
67
+ customDialog: null;
68
+ views: {};
69
+ viewConfig: any;
70
+ addTrackPositionMenuPosition: null;
71
+ typedEditable: undefined;
72
+ mouseOverOverlayUid: null;
73
+ mouseTool: string;
74
+ overTrackChooser: null;
75
+ isDarkTheme: boolean;
76
+ rangeSelection1dSize: number[];
77
+ rangeSelectionToInt: boolean;
78
+ modal: null;
79
+ sizeMode: any;
80
+ };
81
+ attachedToDOM: boolean;
82
+ api: {
83
+ readonly version: string;
84
+ setBroadcastMousePositionGlobally(isBroadcastMousePositionGlobally?: boolean): void;
85
+ setShowGlobalMousePosition(isShowGlobalMousePosition?: boolean): void;
86
+ setGlobalMousePosition(isGlobalMousePosition?: boolean): void;
87
+ setAuthHeader(newHeader: string): void;
88
+ getAuthHeader(): string | null;
89
+ getComponent(): HiGlassComponent;
90
+ reload(target: array): void;
91
+ destroy(): void;
92
+ setRangeSelectionToInt(): void;
93
+ setRangeSelectionToFloat(): void;
94
+ setRangeSelection1dSize(minSize?: number, maxSize?: number): void;
95
+ setViewConfig(newViewConfig: obj, resolveImmediately?: boolean): Promise<any>;
96
+ getViewConfig(): any;
97
+ validateViewConfig(viewConfig: any, { verbose }?: {
98
+ verbose?: boolean | undefined;
99
+ }): boolean | PromiseLike<any>;
100
+ getMinMaxValue(viewId: string, trackId: string, ignoreOffScreenValues?: bool, ignoreFixedScale?: bool): any[];
101
+ shareViewConfigAsLink(url: string): Object;
102
+ showAvailableTrackPositions(track: obj): void;
103
+ hideAvailableTrackPositions(): void;
104
+ measureSize(): void;
105
+ showTrackChooser(callback: Function): [type];
106
+ hideTrackChooser(): void;
107
+ setTrackValueScaleLimits(viewId?: string, trackId?: string, minValue: any, maxValue: any): void;
108
+ setDarkTheme(darkTheme: any): void;
109
+ setTheme(theme: any): void;
110
+ zoomTo(viewUid: string, start1Abs: number, end1Abs: number, start2Abs: number, end2Abs: number, animateTime?: number): void;
111
+ zoomToGene(viewUid: string, geneName: string, padding?: string, animateTime?: number): void;
112
+ suggestGene(viewUid: string, keyword: string, callback: Function): void;
113
+ zoomToDataExtent(viewUid: string): void;
114
+ resetViewport(viewId: string): void;
115
+ activateTool(tool: any): void;
116
+ setSizeMode(sizeMode: string): void;
117
+ exportAsPngBlobPromise(): promise;
118
+ exportAsSvg(): string;
119
+ exportAsViewConfString(): string;
120
+ getRangeSelection(): any[];
121
+ getLocation(viewId?: string): obj;
122
+ getTrackObject(viewId: string, trackId: string): obj;
123
+ option(key: string, value: any): obj;
124
+ off(event: string, listenerId: any, viewId: string): void;
125
+ on(event: string, callback: Function, viewId: string, callbackId: any): any;
126
+ };
127
+ apiDestroy: () => void;
128
+ apiPublish: any;
129
+ apiStack: any;
130
+ viewChangeListener: any[];
131
+ triggerViewChangeDb: {
132
+ (...args: any[]): void;
133
+ cancel(): void;
134
+ };
135
+ rangeSelection: null[];
136
+ prevMouseHoverTrack: any;
137
+ zooming: boolean;
138
+ appClickHandlerBound: (data: any) => void;
139
+ canvasClickHandlerBound: (evt: any) => void;
140
+ keyDownHandlerBound: (event: any) => void;
141
+ keyUpHandlerBound: (event: any) => void;
142
+ resizeHandlerBound: () => void;
143
+ dispatchEventBound: (e: any) => void;
144
+ animateOnMouseMoveHandlerBound: (active: any) => void;
145
+ zoomStartHandlerBound: () => void;
146
+ zoomEndHandlerBound: () => void;
147
+ zoomHandlerBound: (evt: any) => void;
148
+ trackDroppedHandlerBound: () => void;
149
+ trackDimensionsModifiedHandlerBound: (settings: {
150
+ viewId: string;
151
+ trackId: string;
152
+ height: number;
153
+ width: nmber;
154
+ }) => void;
155
+ animateBound: () => void;
156
+ animateOnGlobalEventBound: ({ sourceUid }?: {}) => void;
157
+ requestReceivedHandlerBound: () => void;
158
+ wheelHandlerBound: (evt: any) => void;
159
+ mouseMoveHandlerBound: (e: object) => void;
160
+ onMouseLeaveHandlerBound: () => void;
161
+ onBlurHandlerBound: () => void;
162
+ openModalBound: (modal: any) => void;
163
+ closeModalBound: () => void;
164
+ handleEditViewConfigBound: () => void;
165
+ onScrollHandlerBound: () => void;
166
+ viewUidToNameBound: (viewUid: any) => string;
167
+ typedText: string;
168
+ typedTextTimeout: NodeJS.Timeout | null;
169
+ modal: {
170
+ open: (modal: any) => void;
171
+ close: () => void;
172
+ };
173
+ UNSAFE_componentWillMount(): void;
174
+ get sizeMode(): any;
175
+ setBroadcastMousePositionGlobally(isBroadcastMousePositionGlobally?: boolean): void;
176
+ isBroadcastMousePositionGlobally: boolean | undefined;
177
+ setShowGlobalMousePosition(isShowGlobalMousePosition?: boolean): void;
178
+ isShowGlobalMousePosition: boolean | undefined;
179
+ globalMousePositionListener: createPubSub.Subscription | undefined;
180
+ zoomStartHandler(): void;
181
+ zoomEndHandler(): void;
182
+ zoomHandler(evt: any): void;
183
+ waitForDOMAttachment(callback: any): void;
184
+ componentDidMount(): void;
185
+ pixiRenderer: any;
186
+ getTrackObject(viewUid: any, trackUid: any): import("./types").TrackObject | undefined;
187
+ getTrackRenderer(viewUid: any): import("./TrackRenderer").TrackRenderer | null;
188
+ UNSAFE_componentWillReceiveProps(newProps: any): void;
189
+ UNSAFE_componentWillUpdate(): void;
190
+ reload(): void;
191
+ componentDidUpdate(): void;
192
+ componentWillUnmount(): void;
193
+ setTheme(newTheme?: any, isDarkTheme?: any): void;
194
+ theme: string | typeof THEME_LIGHT | typeof THEME_DARK | undefined;
195
+ dispatchEvent(e: any): void;
196
+ trackDroppedHandler(): void;
197
+ requestReceivedHandler(): void;
198
+ animateOnMouseMoveHandler(active: any): void;
199
+ animateOnMouseMove: any;
200
+ fitPixiToParentContainer(): void;
201
+ /**
202
+ * Add default track options. These can come from two places:
203
+ *
204
+ * 1. The track definitions (configs/tracks-info.js)
205
+ * 2. The default options passed into the component
206
+ *
207
+ * Of these, #2 takes precendence over #1.
208
+ *
209
+ * @param {array} track The track to add default options to
210
+ */
211
+ addDefaultTrackOptions(track: array): void;
212
+ toggleTypedEditable(): void;
213
+ /** Handle typed commands (e.g. e-d-i-t) */
214
+ typedTextHandler(event: any): void;
215
+ keyDownHandler(event: any): void;
216
+ keyUpHandler(event: any): void;
217
+ openModal(modal: any): void;
218
+ modalRef: any;
219
+ closeModal(): void;
220
+ handleEditViewConfig(): void;
221
+ animate(): void;
222
+ isRequestingAnimationFrame: boolean | undefined;
223
+ animateOnGlobalEvent({ sourceUid }?: {}): void;
224
+ measureSize(): void;
225
+ updateAfterResize(): void;
226
+ onBreakpointChange(breakpoint: any): void;
227
+ handleOverlayMouseEnter(uid: any): void;
228
+ handleOverlayMouseLeave(): void;
229
+ /**
230
+ * We want to lock the zoom of this view to the zoom of another view.
231
+ *
232
+ * First we pick which other view we want to lock to.
233
+ *
234
+ * The we calculate the current zoom offset and center offset. The differences
235
+ * between the center of the two views will always remain the same, as will the
236
+ * different between the zoom levels.
237
+ */
238
+ handleLockLocation(uid: any): void;
239
+ /**
240
+ * Can views be added, removed or rearranged and are the view headers
241
+ * visible?
242
+ */
243
+ isEditable(): any;
244
+ /**
245
+ * Can views be added, removed or rearranged and are the view headers
246
+ * visible?
247
+ */
248
+ isTrackMenuDisabled(): any;
249
+ /**
250
+ * Can views be added, removed or rearranged and are the view headers
251
+ * visible?
252
+ */
253
+ isViewHeaderDisabled(): any;
254
+ /**
255
+ * Iteratate over all of the views in this component
256
+ */
257
+ iterateOverViews(): string[];
258
+ iterateOverTracksInView(viewId: any): {
259
+ viewId: any;
260
+ trackId: any;
261
+ track: any;
262
+ }[];
263
+ /**
264
+ * Iterate over all the tracks in this component.
265
+ */
266
+ iterateOverTracks(): {
267
+ viewId: string;
268
+ trackId: string;
269
+ track: import("./types").UnknownTrackConfig;
270
+ }[];
271
+ setMouseTool(mouseTool: any): void;
272
+ setSizeMode(sizeMode: any): void;
273
+ /**
274
+ * Checks if a track's value scale is locked with another track
275
+ */
276
+ isValueScaleLocked(viewUid: any, trackUid: any): boolean;
277
+ /**
278
+ * Computed the minimal and maximal values of all tracks that are in the same
279
+ * lockGroup as a given track
280
+ * @param {string} viewUid The id of the view containing the track
281
+ * @param {string} trackUid The id of the track
282
+ * @return {array} Tuple [min,max] containing the overall extrema - or null.
283
+ */
284
+ getLockGroupExtrema(viewUid: string, trackUid: string): array;
285
+ /**
286
+ * Syncing the values of locked scales
287
+ *
288
+ * Arguments
289
+ * ---------
290
+ * viewUid: string
291
+ * The id of the view containing the track whose value scale initially changed
292
+ * trackUid: string
293
+ * The id of the track that whose value scale changed
294
+ *
295
+ * Returns
296
+ * -------
297
+ * Nothing
298
+ */
299
+ syncValueScales(viewUid: any, trackUid: any): void;
300
+ handleNewTilesLoaded(viewUid: any, trackUid: any): void;
301
+ notifyDragChangedListeners(dragging: any): void;
302
+ /**
303
+ * Add a listener that will be called every time the view is updated.
304
+ *
305
+ * @param viewUid: The uid of the view being observed
306
+ * @param listenerUid: The uid of the listener
307
+ * @param eventHandler: The handler to be called when the scales change
308
+ * Event handler is called with parameters (xScale, yScale)
309
+ */
310
+ addDraggingChangedListener(viewUid: any, listenerUid: any, eventHandler: any): void;
311
+ /**
312
+ * Remove a scale change event listener
313
+ *
314
+ * @param viewUid: The view that it's listening on.
315
+ * @param listenerUid: The uid of the listener itself.
316
+ */
317
+ removeDraggingChangedListener(viewUid: any, listenerUid: any): void;
318
+ /**
319
+ * Add an event listener that will be called every time the scale
320
+ * of the view with uid viewUid is changed.
321
+ *
322
+ * @param viewUid: The uid of the view being observed
323
+ * @param listenerUid: The uid of the listener
324
+ * @param eventHandler: The handler to be called when the scales change
325
+ * Event handler is called with parameters (xScale, yScale)
326
+ */
327
+ addScalesChangedListener(viewUid: any, listenerUid: any, eventHandler: any): void;
328
+ /**
329
+ * Remove a scale change event listener
330
+ *
331
+ * @param viewUid: The view that it's listening on.
332
+ * @param listenerUid: The uid of the listener itself.
333
+ */
334
+ removeScalesChangedListener(viewUid: any, listenerUid: any): void;
335
+ createSVG(): any;
336
+ createSVGString(): string;
337
+ handleExportSVG(): void;
338
+ offPostCreateSVG(): void;
339
+ postCreateSVGCallback: any;
340
+ onPostCreateSVG(callback: any): void;
341
+ createPNGBlobPromise(): Promise<any>;
342
+ handleExportPNG(): void;
343
+ handleScalesChanged(uid: any, xScale: any, yScale: any, notify?: boolean): void;
344
+ handleProjectViewport(uid: any): void;
345
+ /**
346
+ * Adjust the zoom level so that all of the data is visible
347
+ *
348
+ * @param viewUid: The view uid for which to adjust the zoom level
349
+ */
350
+ handleZoomToData(viewUid: any): void;
351
+ /**
352
+ * Reset the viewport to the initial x and y domain
353
+ * @param {number} viewId - ID of the view for which the viewport should be
354
+ * reset.
355
+ */
356
+ resetViewport(viewId: number): void;
357
+ /**
358
+ * We want to yank some attributes from another view.
359
+ *
360
+ * This will create a view selection overlay and then call the selected
361
+ * provided function.
362
+ */
363
+ handleYankFunction(uid: any, yankFunction: any): void;
364
+ /**
365
+ * We want to unlock uid from the zoom group that it's in.
366
+ *
367
+ * @param uid: The uid of a view.
368
+ */
369
+ handleUnlock(uid: any, lockGroups: any): void;
370
+ viewScalesLockData(uid: any): [xCenter: number, yCenter: number, k: number] | null;
371
+ addLock(uid1: any, uid2: any, lockGroups: any, lockData: any): void;
372
+ handleLocationLockChosen(uid1: any, uid2: any): void;
373
+ handleZoomLockChosen(uid1: any, uid2: any): void;
374
+ /**
375
+ * We want to project the viewport of fromView onto toTrack of toView.
376
+ *
377
+ * @param fromView: The uid of the view that we want to project
378
+ * @param toView: The uid of the view that we want to project to
379
+ * @param toTrack: The track we want to project to
380
+ *
381
+ * Returns
382
+ * -------
383
+ *
384
+ * newTrackUid: string
385
+ * The uid of the newly created viewport projection track
386
+ */
387
+ handleViewportProjected(fromView: any, toView: any, toTrack: any): string | null;
388
+ /**
389
+ * Uid1 is copying the center of uid2
390
+ */
391
+ handleLocationYanked(uid1: any, uid2: any): void;
392
+ /**
393
+ * Uid1 yanked the zoom of uid2, now make sure that they're synchronized.
394
+ */
395
+ handleZoomYanked(uid1: any, uid2: any): void;
396
+ /**
397
+ * The user has chosen a position for the new track. The actual
398
+ * track selection will be handled by TiledPlot
399
+ *
400
+ * We just need to close the menu here.
401
+ */
402
+ handleTrackPositionChosen(viewUid: any, position: any, extent: any): void;
403
+ /**
404
+ * Update the height of each row in the layout so that it takes up all
405
+ * of the available space in the div.
406
+ */
407
+ updateRowHeight(): void;
408
+ /**
409
+ * Notify the children that the layout has changed so that they
410
+ * know to redraw themselves
411
+ */
412
+ handleLayoutChange(layout: any): void;
413
+ /**
414
+ * Maybe somebody started dragging again before the previous drag
415
+ * timeout fired. In that case, we need to clear this timeout so
416
+ * that it doesn't override a previously set one.
417
+ */
418
+ clearDragTimeout(): void;
419
+ dragTimeout: NodeJS.Timeout | null | undefined;
420
+ getTrackInfo(trackType: any): any;
421
+ forceRefreshView(): void;
422
+ refreshView(timeout?: number): void;
423
+ handleDragStart(): void;
424
+ handleDragStop(): void;
425
+ resizeHandler(): void;
426
+ /**
427
+ * Get the dimensions for this view, counting just the tracks
428
+ * that are present in it
429
+ *
430
+ * @param view: A view containing a list of tracks as a member.
431
+ * @return: A width and a height pair (e.g. [width, height])
432
+ */
433
+ calculateViewDimensions(view: any): {
434
+ totalWidth: number;
435
+ totalHeight: number;
436
+ topHeight: number;
437
+ bottomHeight: number;
438
+ leftWidth: number;
439
+ rightWidth: number;
440
+ centerWidth: number;
441
+ centerHeight: number;
442
+ minNecessaryHeight: number;
443
+ };
444
+ calculateZoomLimits(view: any, initialXDomain: any): number[];
445
+ generateViewLayout(view: any): any;
446
+ /**
447
+ * Remove all the tracks from a view
448
+ *
449
+ * @param {viewUid} Thie view's identifier
450
+ */
451
+ handleClearView(viewUid: any): void;
452
+ /**
453
+ * A view needs to be closed. Remove it from from the viewConfig and then clean
454
+ * up all of its connections (zoom links, workers, etc...)
455
+ *
456
+ * @param {uid} This view's identifier
457
+ */
458
+ handleCloseView(uid: any): void;
459
+ /**
460
+ * We're adding a new dataset to an existing track
461
+ *
462
+ * @param newTrack: The new track to be added.
463
+ * @param position: Where the new series should be placed.
464
+ * (This could also be inferred from the hostTrack, but since
465
+ * we already have it, we might as well use it)
466
+ * @param hostTrack: The track that will host the new series.
467
+ */
468
+ handleSeriesAdded(viewId: any, newTrack: any, position: any, hostTrack: any): void;
469
+ handleNoTrackAdded(): void;
470
+ /**
471
+ * Add multiple new tracks (likely from the AddTrackModal dialog)
472
+ *
473
+ * @param trackInfo: A JSON object that can be used as a track
474
+ * definition
475
+ * @param position: The position the track is being added to
476
+ * @param host: If this track is being added to another track
477
+ */
478
+ handleTracksAdded(viewId: any, newTracks: any, position: any, extent: any, host: any): void;
479
+ /**
480
+ * Change the type of a track. For example, convert a line to a bar track.
481
+ *
482
+ * Parameters
483
+ * ----------
484
+ * viewUid: string
485
+ * The view containing the track to be changed
486
+ * trackUid: string
487
+ * The uid identifying the existin track
488
+ * newType: string
489
+ * The type to switch this track to.
490
+ */
491
+ handleChangeTrackType(viewUid: any, trackUid: any, newType: any): void;
492
+ /**
493
+ * Change the data source for a track. E.g. when adding or
494
+ * removing a divisor.
495
+ *
496
+ * Parameters
497
+ * ----------
498
+ * viewUid: string
499
+ * The view containing the track to be changed
500
+ * trackUid: string
501
+ * The uid identifying the existin track
502
+ * newData: object
503
+ * The new data source section
504
+ */
505
+ handleChangeTrackData(viewUid: any, trackUid: any, newData: any): void;
506
+ /**
507
+ * A track was added from the AddTrackModal dialog.
508
+ *
509
+ * @param trackInfo: A JSON object that can be used as a track
510
+ * definition
511
+ * @param position: The position the track is being added to
512
+ * @param host: If this track is being added to another track
513
+ *
514
+ * @returns {Object}: A trackConfig (\{ uid: "", width: x \})
515
+ * describing this track
516
+ */
517
+ handleTrackAdded(viewId: any, newTrack: any, position: any, extent?: null, host?: null): Object;
518
+ /**
519
+ * We're adding a new heatmap to a combined track. We need to make sure that
520
+ * their options are compatible.
521
+ *
522
+ * @param {object} newTrack New heatmap track
523
+ * @param {object} combinedTrack Combined track the new heatmap is added to
524
+ */
525
+ compatibilityfyStackedHeatmaps(newTrack: object, combinedTrack: object): void;
526
+ /**
527
+ * Go through each track and store its size in the viewconf.
528
+ *
529
+ * This is so that sizes don't get lost when the view is unbounded
530
+ * and new tracks are added.
531
+ *
532
+ * Parameters
533
+ * ----------
534
+ *
535
+ * viewId : string
536
+ * The id of the view whose tracks we're measuring
537
+ *
538
+ * Returns
539
+ * -------
540
+ *
541
+ * Nothing
542
+ */
543
+ storeTrackSizes(viewId: any): void;
544
+ adjustLayoutToTrackSizes(view: any): void;
545
+ handleCloseTrack(viewId: any, uid: any): {};
546
+ handleLockValueScale(fromViewUid: any, fromTrackUid: any): void;
547
+ combineViewAndTrackUid(viewUid: any, trackUid: any): any;
548
+ /**
549
+ * Update all locks involving this track to use a new track uid.
550
+ *
551
+ * @param {string} viewUid The view's uid
552
+ * @param {string} oldTrackUid The track's old uid
553
+ * @param {string} newTrackUid The track's new uid
554
+ */
555
+ updateTrackLocks(viewUid: string, oldTrackUid: string, newTrackUid: string): void;
556
+ handleUnlockValueScale(viewUid: any, trackUid: any): void;
557
+ handleValueScaleLocked(fromViewUid: any, fromTrackUid: any, toViewUid: any, toTrackUid: any): void;
558
+ /**
559
+ * Add callbacks for functions that need them
560
+ *
561
+ * Done in place.
562
+ *
563
+ * @param {string} viewUid
564
+ * @param {{
565
+ * type: string;
566
+ * uid: string;
567
+ * fromViewUid: string;
568
+ * registerViewportChanged: (string: trackId, listener: () => void) => void;
569
+ * removeViewportChanged: (string: trackId) => void;
570
+ * removeScalesChangedListener: (string: trackId) => void;
571
+ * }} track A view with tracks.
572
+ */
573
+ addCallbacks(viewUid: string, track: {
574
+ type: string;
575
+ uid: string;
576
+ fromViewUid: string;
577
+ registerViewportChanged: (string: trackId, listener: () => void) => void;
578
+ removeViewportChanged: (string: trackId) => void;
579
+ removeScalesChangedListener: (string: trackId) => void;
580
+ }): void;
581
+ validateLocks(locks: any): void;
582
+ deserializeLocationLocks(viewConfig: any): void;
583
+ deserializeZoomLocks(viewConfig: any): void;
584
+ deserializeValueScaleLocks(viewConfig: any): void;
585
+ serializeLocks(locks: any): {
586
+ locksByViewUid: {};
587
+ locksDict: {};
588
+ };
589
+ getViewsAsJson(views: any): any;
590
+ getViewsAsString(): string;
591
+ handleExportViewAsJSON(): void;
592
+ handleExportViewsAsLink(url?: any, fromApi?: boolean): Promise<{
593
+ id: any;
594
+ url: string;
595
+ }>;
596
+ handleDataDomainChanged(viewUid: any, newXDomain: any, newYDomain: any): void;
597
+ /**
598
+ * Check if we can place a view at this position
599
+ */
600
+ viewPositionAvailable(pX: any, pY: any, w: any, h: any): boolean;
601
+ /**
602
+ * User clicked on the "Add View" button. We'll duplicate the last
603
+ * view.
604
+ */
605
+ handleAddView(view: any, newViewParams: any, noUpdate: any): {
606
+ newViewUid: any;
607
+ newViewconf: any;
608
+ };
609
+ createGenomePostionSearchBoxEntry(existingGenomePositionSearchBox: any, suggestedAssembly: any): any;
610
+ handleTogglePositionSearchBox(viewUid: any): void;
611
+ handleTrackOptionsChanged(viewUid: any, trackUid: any, newOptions: any): void;
612
+ /**
613
+ * For convenience we adjust some options of split heatmap tracks when they are newly added.
614
+ * This function has no effect when we get split heatmap tracks that are already correctly configured
615
+ * (i.e. correctly set "lower-extend"/"upper-extend" options)
616
+ * @param {object} track Track whose options have changed
617
+ * @param {object} options New track options
618
+ * @param {list} allTracks All tracks
619
+ * @param {string} viewUid Related view UID
620
+ */
621
+ adjustSplitHeatmapTrackOptions(track: object, options: object, allTracks: list, viewUid: string): void;
622
+ handleViewOptionsChanged(viewUid: any, newOptions: any): void;
623
+ /**
624
+ * Determine whether a track is valid and can be displayed.
625
+ *
626
+ * Tracks can be invalid due to inconsistent input such as
627
+ * referral to views that don't exist
628
+ *
629
+ * @param track (object): A track definition
630
+ * @param viewUidsPresent (Set): The view uids which are available
631
+ */
632
+ isTrackValid(track: any, viewUidsPresent: any): boolean;
633
+ /**
634
+ * Remove tracks which can no longer be shown (possibly because the views they
635
+ * refer to no longer exist
636
+ */
637
+ removeInvalidTracks(viewsByUid: any): any;
638
+ processViewConfig(viewConfig: any): {};
639
+ handleWindowFocused(): void;
640
+ /**
641
+ * Handle range selection events.
642
+ *
643
+ * @description
644
+ * Store active range selectio and forward the range selection event to the
645
+ * API.
646
+ *
647
+ * @param {Array} range Double array of the selected range.
648
+ */
649
+ rangeSelectionHandler(range: any[]): void;
650
+ offViewChange(callback: any): void;
651
+ onViewChange(callback: any): number;
652
+ triggerViewChange(): void;
653
+ getGenomeLocation(viewId: any): Promise<[startChromName: string, startChromPos: number, endChromName: string, endChromPos: number, startChromName: string, startChromPos: number, endChromName: string, endChromPos: number] | undefined>;
654
+ offLocationChange(viewId: any, listenerId: any): void;
655
+ zoomTo(viewUid: any, start1Abs: any, end1Abs: any, start2Abs: any, end2Abs: any, animateTime: any): void;
656
+ zoomToGene(viewUid: any, geneName: any, padding: any, animateTime: any): void;
657
+ suggestGene(viewUid: any, keyword: any, callback: any): void;
658
+ onLocationChange(viewId: any, callback: any, callbackId: any): number | null;
659
+ /**
660
+ * List all the views that are at the given position view position
661
+ */
662
+ getTiledPlotAtPosition(x: any, y: any): import("./TiledPlot").TiledPlot | undefined;
663
+ /**
664
+ * Handle mousemove events by republishing the event using pubSub.
665
+ *
666
+ * @param {object} e Event object.
667
+ */
668
+ mouseMoveHandler(e: object): void;
669
+ getMinMaxValue(viewId: any, trackId: any, ignoreOffScreenValues: any, ignoreFixedScale: any): any[] | undefined;
670
+ /**
671
+ * Show a menu displaying some information about the track under it
672
+ */
673
+ showHoverMenu(evt: any): void;
674
+ /**
675
+ * Hide the hover menu when e.g. the user starts zooming
676
+ */
677
+ hideHoverMenu(): void;
678
+ /**
679
+ * Close the custom dialog (e.g. when the close button is clicked)
680
+ */
681
+ closeCustomDialog(): void;
682
+ /**
683
+ * Handle internally broadcasted click events
684
+ */
685
+ appClickHandler(data: any): void;
686
+ /** Handle click events on the canvas. The canvas is preferrable
687
+ * to the top level div because the canvas's events aren't forwarded
688
+ * so we only receive one click event
689
+ */
690
+ canvasClickHandler(evt: any): void;
691
+ /**
692
+ * Handle mousemove and zoom events.
693
+ */
694
+ mouseMoveZoomHandler(data: any): void;
695
+ /**
696
+ * Handle gene search events.
697
+ */
698
+ geneSearchHandler(data: any): void;
699
+ /**
700
+ * Handle mousedown events/
701
+ */
702
+ mouseDownHandler(evt: any): void;
703
+ onScrollHandler(): void;
704
+ setTrackValueScaleLimits(viewId: any, trackId: any, minValue: any, maxValue: any): void;
705
+ setChromInfo(chromInfoPath: any, callback: any): void;
706
+ chromInfo: any;
707
+ onMouseLeaveHandler(): void;
708
+ onBlurHandler(): void;
709
+ isZoomFixed(view: any): any;
710
+ /**
711
+ * Handle trackDimensionsModified events
712
+ * @param {Object} settings
713
+ * @param {string} settings.viewId = id of the view
714
+ * @param {string} settings.trackId = id of the track
715
+ * @param {number} settings.height = new height of the track or undefined if current height should remain
716
+ * @param {nmber} settings.width = new width of the track or undefined if current width should remain
717
+ */
718
+ trackDimensionsModifiedHandler(settings: {
719
+ viewId: string;
720
+ trackId: string;
721
+ height: number;
722
+ width: nmber;
723
+ }): void;
724
+ wheelHandler(evt: any): void;
725
+ /** Convert a viewUid to a view name so that when we create
726
+ * viewport projects, we can show which view they refer to.
727
+ * The name is usually a single letter like 'A'
728
+ * The view's name will also be visible in the header. */
729
+ viewUidToName(viewUid: any): string;
730
+ render(): React.JSX.Element;
731
+ tiledAreasDivs: {} | undefined;
732
+ tiledAreas: React.JSX.Element | React.JSX.Element[] | undefined;
733
+ gridLayout: any;
734
+ canvasElement: HTMLCanvasElement | null | undefined;
735
+ scrollContainer: HTMLDivElement | null | undefined;
736
+ divDrawingSurface: HTMLDivElement | null | undefined;
737
+ svgElement: SVGSVGElement | null | undefined;
738
+ }
739
+ declare namespace HiGlassComponent {
740
+ namespace defaultProps {
741
+ let options: {};
742
+ let zoomFixed: boolean;
743
+ let compactLayout: boolean;
744
+ }
745
+ namespace propTypes {
746
+ export let getApi: PropTypes.Requireable<(...args: any[]) => any>;
747
+ let options_1: PropTypes.Requireable<object>;
748
+ export { options_1 as options };
749
+ export let viewConfig: PropTypes.Validator<NonNullable<NonNullable<string | object | null | undefined>>>;
750
+ let zoomFixed_1: PropTypes.Requireable<boolean>;
751
+ export { zoomFixed_1 as zoomFixed };
752
+ let compactLayout_1: PropTypes.Requireable<boolean>;
753
+ export { compactLayout_1 as compactLayout };
754
+ }
755
+ }
756
+ import React from 'react';
757
+ import { ResizeSensor } from 'css-element-queries';
758
+ import * as PIXI from 'pixi.js';
759
+ import createPubSub from 'pub-sub-es';
760
+ import { THEME_LIGHT } from './configs';
761
+ import { THEME_DARK } from './configs';
762
+ import PropTypes from 'prop-types';