@jbrowse/plugin-variants 2.18.0 → 3.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 (272) hide show
  1. package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +1 -1
  2. package/dist/LinearVariantDisplay/model.d.ts +5 -5
  3. package/dist/MultiLinearVariantDisplay/components/Crosshair.d.ts +7 -0
  4. package/dist/MultiLinearVariantDisplay/components/Crosshair.js +35 -0
  5. package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +1 -2
  6. package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +5 -49
  7. package/dist/MultiLinearVariantDisplay/index.js +18 -8
  8. package/dist/MultiLinearVariantDisplay/model.d.ts +113 -40
  9. package/dist/MultiLinearVariantDisplay/model.js +24 -176
  10. package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +1 -2
  11. package/dist/MultiLinearVariantDisplay/renderSvg.js +2 -5
  12. package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +7 -0
  13. package/dist/MultiLinearVariantMatrixDisplay/components/Crosshair.js +28 -0
  14. package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +1 -2
  15. package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +13 -16
  16. package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +1 -2
  17. package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +6 -56
  18. package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +109 -27
  19. package/dist/MultiLinearVariantMatrixDisplay/model.js +31 -136
  20. package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +1 -2
  21. package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +3 -7
  22. package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +4 -32
  23. package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +44 -63
  24. package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +3 -2
  25. package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +31 -5
  26. package/dist/MultiLinearVariantMatrixRenderer/index.js +2 -2
  27. package/dist/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -0
  28. package/dist/MultiLinearVariantMatrixRenderer/makeImageData.js +100 -0
  29. package/dist/MultiLinearVariantMatrixRenderer/types.d.ts +15 -0
  30. package/dist/MultiLinearVariantMatrixRenderer/types.js +2 -0
  31. package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +4 -21
  32. package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +38 -25
  33. package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +7 -3
  34. package/dist/MultiLinearVariantRenderer/MultiVariantRendering.js +36 -27
  35. package/dist/MultiLinearVariantRenderer/configSchema.d.ts +1 -33
  36. package/dist/MultiLinearVariantRenderer/configSchema.js +0 -5
  37. package/dist/MultiLinearVariantRenderer/makeImageData.d.ts +4 -0
  38. package/dist/MultiLinearVariantRenderer/makeImageData.js +67 -0
  39. package/dist/MultiLinearVariantRenderer/types.d.ts +19 -0
  40. package/dist/MultiLinearVariantRenderer/types.js +2 -0
  41. package/dist/MultiVariantBaseRenderer.d.ts +4 -4
  42. package/dist/StructuralVariantChordRenderer/Chord.d.ts +2 -19
  43. package/dist/StructuralVariantChordRenderer/Chord.js +3 -25
  44. package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +2 -3
  45. package/dist/StructuralVariantChordRenderer/ReactComponent.js +7 -29
  46. package/dist/StructuralVariantChordRenderer/types.d.ts +17 -0
  47. package/dist/StructuralVariantChordRenderer/types.js +2 -0
  48. package/dist/Tooltip.d.ts +2 -2
  49. package/dist/Tooltip.js +6 -32
  50. package/dist/VariantFeatureWidget/Checkbox2.d.ts +1 -2
  51. package/dist/VariantFeatureWidget/Checkbox2.js +2 -5
  52. package/dist/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -3
  53. package/dist/VariantFeatureWidget/LaunchBreakendPanel.js +66 -69
  54. package/dist/VariantFeatureWidget/LaunchBreakendWidgetArea.d.ts +4 -0
  55. package/dist/VariantFeatureWidget/LaunchBreakendWidgetArea.js +60 -0
  56. package/dist/VariantFeatureWidget/VariantConsequenceDataGrid.d.ts +5 -0
  57. package/dist/VariantFeatureWidget/VariantConsequenceDataGrid.js +15 -0
  58. package/dist/VariantFeatureWidget/VariantConsequenceDataGridWrapper.d.ts +5 -0
  59. package/dist/VariantFeatureWidget/VariantConsequenceDataGridWrapper.js +20 -0
  60. package/dist/VariantFeatureWidget/VariantConsequencePanel.d.ts +5 -0
  61. package/dist/VariantFeatureWidget/VariantConsequencePanel.js +15 -0
  62. package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -2
  63. package/dist/VariantFeatureWidget/VariantFeatureWidget.js +47 -36
  64. package/dist/VariantFeatureWidget/VariantSampleFilters.d.ts +9 -0
  65. package/dist/VariantFeatureWidget/VariantSampleFilters.js +10 -0
  66. package/dist/VariantFeatureWidget/VariantSampleGrid.d.ts +9 -7
  67. package/dist/VariantFeatureWidget/VariantSampleGrid.js +14 -44
  68. package/dist/VariantFeatureWidget/index.js +17 -7
  69. package/dist/VariantFeatureWidget/types.d.ts +16 -0
  70. package/dist/VariantFeatureWidget/types.js +2 -0
  71. package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +10 -27
  72. package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +12 -7
  73. package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +27 -37
  74. package/dist/VcfAdapter/VcfAdapter.d.ts +7 -0
  75. package/dist/VcfAdapter/VcfAdapter.js +29 -3
  76. package/dist/VcfAdapter/configSchema.d.ts +8 -0
  77. package/dist/VcfAdapter/configSchema.js +12 -1
  78. package/dist/VcfAdapter/index.js +17 -7
  79. package/dist/VcfFeature/index.js +2 -1
  80. package/dist/VcfFeature/util.js +3 -4
  81. package/dist/VcfTabixAdapter/VcfTabixAdapter.js +38 -12
  82. package/dist/VcfTabixAdapter/configSchema.d.ts +8 -0
  83. package/dist/VcfTabixAdapter/configSchema.js +8 -0
  84. package/dist/VcfTabixAdapter/index.js +17 -7
  85. package/dist/extensionPoints.js +21 -33
  86. package/dist/getMultiVariantFeaturesAutorun.d.ts +4 -7
  87. package/dist/getMultiVariantFeaturesAutorun.js +16 -15
  88. package/dist/getMultiVariantSourcesAutorun.d.ts +1 -6
  89. package/dist/shared/BulkEditPanel.d.ts +4 -5
  90. package/dist/shared/BulkEditPanel.js +69 -88
  91. package/dist/shared/ClusterDialog.d.ts +4 -5
  92. package/dist/shared/ClusterDialog.js +45 -86
  93. package/dist/shared/ColorLegend.d.ts +2 -3
  94. package/dist/shared/ColorLegend.js +8 -10
  95. package/dist/shared/HelpfulTips.d.ts +1 -0
  96. package/dist/shared/HelpfulTips.js +7 -0
  97. package/dist/shared/LegendBar.d.ts +3 -3
  98. package/dist/shared/LegendBar.js +6 -12
  99. package/dist/shared/MAFFilterDialog.d.ts +2 -3
  100. package/dist/shared/MAFFilterDialog.js +14 -42
  101. package/dist/shared/MultiVariantBaseModel.d.ts +341 -0
  102. package/dist/shared/MultiVariantBaseModel.js +316 -0
  103. package/dist/shared/MultiVariantTooltip.d.ts +6 -0
  104. package/dist/shared/MultiVariantTooltip.js +23 -0
  105. package/dist/shared/RectBg.d.ts +2 -3
  106. package/dist/shared/RectBg.js +3 -7
  107. package/dist/shared/RowPalettizer.d.ts +2 -3
  108. package/dist/shared/RowPalettizer.js +30 -28
  109. package/dist/shared/SetColorDialog.d.ts +2 -3
  110. package/dist/shared/SetColorDialog.js +26 -65
  111. package/dist/shared/SetMinMaxDialog.d.ts +1 -2
  112. package/dist/shared/SetMinMaxDialog.js +11 -41
  113. package/dist/shared/SetRowHeightDialog.d.ts +8 -0
  114. package/dist/shared/SetRowHeightDialog.js +18 -0
  115. package/dist/shared/SharedVariantMixin.d.ts +7 -7
  116. package/dist/shared/SourcesDataGrid.d.ts +6 -0
  117. package/dist/shared/SourcesDataGrid.js +68 -0
  118. package/dist/shared/SourcesGrid.d.ts +2 -3
  119. package/dist/shared/SourcesGrid.js +5 -134
  120. package/dist/shared/SourcesGridHeader.d.ts +7 -0
  121. package/dist/shared/SourcesGridHeader.js +41 -0
  122. package/dist/shared/multiVariantColor.d.ts +3 -0
  123. package/dist/shared/multiVariantColor.js +50 -0
  124. package/dist/types.d.ts +14 -0
  125. package/dist/types.js +2 -0
  126. package/dist/util.d.ts +6 -9
  127. package/dist/util.js +47 -14
  128. package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +1 -1
  129. package/esm/LinearVariantDisplay/model.d.ts +5 -5
  130. package/esm/MultiLinearVariantDisplay/components/Crosshair.d.ts +7 -0
  131. package/esm/MultiLinearVariantDisplay/components/Crosshair.js +30 -0
  132. package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +1 -2
  133. package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +5 -26
  134. package/esm/MultiLinearVariantDisplay/index.js +1 -1
  135. package/esm/MultiLinearVariantDisplay/model.d.ts +113 -40
  136. package/esm/MultiLinearVariantDisplay/model.js +7 -169
  137. package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +1 -2
  138. package/esm/MultiLinearVariantDisplay/renderSvg.js +2 -5
  139. package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.d.ts +7 -0
  140. package/esm/MultiLinearVariantMatrixDisplay/components/Crosshair.js +23 -0
  141. package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +1 -2
  142. package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +13 -13
  143. package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +1 -2
  144. package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +6 -33
  145. package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +109 -27
  146. package/esm/MultiLinearVariantMatrixDisplay/model.js +14 -129
  147. package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +1 -2
  148. package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +3 -7
  149. package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +4 -32
  150. package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +11 -63
  151. package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +3 -2
  152. package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +31 -2
  153. package/esm/MultiLinearVariantMatrixRenderer/index.js +1 -1
  154. package/esm/MultiLinearVariantMatrixRenderer/makeImageData.d.ts +10 -0
  155. package/esm/MultiLinearVariantMatrixRenderer/makeImageData.js +97 -0
  156. package/esm/MultiLinearVariantMatrixRenderer/types.d.ts +15 -0
  157. package/esm/MultiLinearVariantMatrixRenderer/types.js +1 -0
  158. package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +4 -21
  159. package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +6 -26
  160. package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +7 -3
  161. package/esm/MultiLinearVariantRenderer/MultiVariantRendering.js +34 -5
  162. package/esm/MultiLinearVariantRenderer/configSchema.d.ts +1 -33
  163. package/esm/MultiLinearVariantRenderer/configSchema.js +0 -2
  164. package/esm/MultiLinearVariantRenderer/makeImageData.d.ts +4 -0
  165. package/esm/MultiLinearVariantRenderer/makeImageData.js +61 -0
  166. package/esm/MultiLinearVariantRenderer/types.d.ts +19 -0
  167. package/esm/MultiLinearVariantRenderer/types.js +1 -0
  168. package/esm/MultiVariantBaseRenderer.d.ts +4 -4
  169. package/esm/StructuralVariantChordRenderer/Chord.d.ts +2 -19
  170. package/esm/StructuralVariantChordRenderer/Chord.js +3 -2
  171. package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +2 -3
  172. package/esm/StructuralVariantChordRenderer/ReactComponent.js +7 -6
  173. package/esm/StructuralVariantChordRenderer/types.d.ts +17 -0
  174. package/esm/StructuralVariantChordRenderer/types.js +1 -0
  175. package/esm/Tooltip.d.ts +2 -2
  176. package/esm/Tooltip.js +6 -9
  177. package/esm/VariantFeatureWidget/Checkbox2.d.ts +1 -2
  178. package/esm/VariantFeatureWidget/Checkbox2.js +2 -2
  179. package/esm/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -3
  180. package/esm/VariantFeatureWidget/LaunchBreakendPanel.js +48 -61
  181. package/esm/VariantFeatureWidget/LaunchBreakendWidgetArea.d.ts +4 -0
  182. package/esm/VariantFeatureWidget/LaunchBreakendWidgetArea.js +24 -0
  183. package/esm/VariantFeatureWidget/VariantConsequenceDataGrid.d.ts +5 -0
  184. package/esm/VariantFeatureWidget/VariantConsequenceDataGrid.js +9 -0
  185. package/esm/VariantFeatureWidget/VariantConsequenceDataGridWrapper.d.ts +5 -0
  186. package/esm/VariantFeatureWidget/VariantConsequenceDataGridWrapper.js +17 -0
  187. package/esm/VariantFeatureWidget/VariantConsequencePanel.d.ts +5 -0
  188. package/esm/VariantFeatureWidget/VariantConsequencePanel.js +9 -0
  189. package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -2
  190. package/esm/VariantFeatureWidget/VariantFeatureWidget.js +30 -29
  191. package/esm/VariantFeatureWidget/VariantSampleFilters.d.ts +9 -0
  192. package/esm/VariantFeatureWidget/VariantSampleFilters.js +7 -0
  193. package/esm/VariantFeatureWidget/VariantSampleGrid.d.ts +9 -7
  194. package/esm/VariantFeatureWidget/VariantSampleGrid.js +15 -22
  195. package/esm/VariantFeatureWidget/types.d.ts +16 -0
  196. package/esm/VariantFeatureWidget/types.js +1 -0
  197. package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +10 -27
  198. package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +12 -7
  199. package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +27 -37
  200. package/esm/VcfAdapter/VcfAdapter.d.ts +7 -0
  201. package/esm/VcfAdapter/VcfAdapter.js +31 -5
  202. package/esm/VcfAdapter/configSchema.d.ts +8 -0
  203. package/esm/VcfAdapter/configSchema.js +12 -1
  204. package/esm/VcfFeature/index.js +2 -1
  205. package/esm/VcfFeature/util.js +3 -4
  206. package/esm/VcfTabixAdapter/VcfTabixAdapter.js +38 -12
  207. package/esm/VcfTabixAdapter/configSchema.d.ts +8 -0
  208. package/esm/VcfTabixAdapter/configSchema.js +8 -0
  209. package/esm/extensionPoints.js +21 -33
  210. package/esm/getMultiVariantFeaturesAutorun.d.ts +4 -7
  211. package/esm/getMultiVariantFeaturesAutorun.js +16 -15
  212. package/esm/getMultiVariantSourcesAutorun.d.ts +1 -6
  213. package/esm/shared/BulkEditPanel.d.ts +4 -5
  214. package/esm/shared/BulkEditPanel.js +70 -66
  215. package/esm/shared/ClusterDialog.d.ts +4 -5
  216. package/esm/shared/ClusterDialog.js +44 -62
  217. package/esm/shared/ColorLegend.d.ts +2 -3
  218. package/esm/shared/ColorLegend.js +8 -10
  219. package/esm/shared/HelpfulTips.d.ts +1 -0
  220. package/esm/shared/HelpfulTips.js +4 -0
  221. package/esm/shared/LegendBar.d.ts +3 -3
  222. package/esm/shared/LegendBar.js +7 -13
  223. package/esm/shared/MAFFilterDialog.d.ts +2 -3
  224. package/esm/shared/MAFFilterDialog.js +14 -19
  225. package/esm/shared/MultiVariantBaseModel.d.ts +341 -0
  226. package/esm/shared/MultiVariantBaseModel.js +277 -0
  227. package/esm/shared/MultiVariantTooltip.d.ts +6 -0
  228. package/esm/shared/MultiVariantTooltip.js +17 -0
  229. package/esm/shared/RectBg.d.ts +2 -3
  230. package/esm/shared/RectBg.js +3 -4
  231. package/esm/shared/RowPalettizer.d.ts +2 -3
  232. package/esm/shared/RowPalettizer.js +30 -25
  233. package/esm/shared/SetColorDialog.d.ts +2 -3
  234. package/esm/shared/SetColorDialog.js +26 -42
  235. package/esm/shared/SetMinMaxDialog.d.ts +1 -2
  236. package/esm/shared/SetMinMaxDialog.js +11 -18
  237. package/esm/shared/SetRowHeightDialog.d.ts +8 -0
  238. package/esm/shared/SetRowHeightDialog.js +15 -0
  239. package/esm/shared/SharedVariantMixin.d.ts +7 -7
  240. package/esm/shared/SourcesDataGrid.d.ts +6 -0
  241. package/esm/shared/SourcesDataGrid.js +62 -0
  242. package/esm/shared/SourcesGrid.d.ts +2 -3
  243. package/esm/shared/SourcesGrid.js +5 -111
  244. package/esm/shared/SourcesGridHeader.d.ts +7 -0
  245. package/esm/shared/SourcesGridHeader.js +35 -0
  246. package/esm/shared/multiVariantColor.d.ts +3 -0
  247. package/esm/shared/multiVariantColor.js +45 -0
  248. package/esm/types.d.ts +14 -0
  249. package/esm/types.js +1 -0
  250. package/esm/util.d.ts +6 -9
  251. package/esm/util.js +43 -13
  252. package/package.json +6 -7
  253. package/dist/VariantFeatureWidget/AnnotGrid.d.ts +0 -6
  254. package/dist/VariantFeatureWidget/AnnotGrid.js +0 -39
  255. package/dist/VariantFeatureWidget/VariantAnnotationTable.d.ts +0 -6
  256. package/dist/VariantFeatureWidget/VariantAnnotationTable.js +0 -16
  257. package/dist/configSchema.d.ts +0 -34
  258. package/dist/configSchema.js +0 -44
  259. package/dist/shared/DraggableDialog.d.ts +0 -6
  260. package/dist/shared/DraggableDialog.js +0 -62
  261. package/dist/shared/Tooltip.d.ts +0 -18
  262. package/dist/shared/Tooltip.js +0 -38
  263. package/esm/VariantFeatureWidget/AnnotGrid.d.ts +0 -6
  264. package/esm/VariantFeatureWidget/AnnotGrid.js +0 -13
  265. package/esm/VariantFeatureWidget/VariantAnnotationTable.d.ts +0 -6
  266. package/esm/VariantFeatureWidget/VariantAnnotationTable.js +0 -10
  267. package/esm/configSchema.d.ts +0 -34
  268. package/esm/configSchema.js +0 -42
  269. package/esm/shared/DraggableDialog.d.ts +0 -6
  270. package/esm/shared/DraggableDialog.js +0 -34
  271. package/esm/shared/Tooltip.d.ts +0 -18
  272. package/esm/shared/Tooltip.js +0 -33
@@ -0,0 +1,341 @@
1
+ import type { SampleInfo, Source } from '../types';
2
+ import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
3
+ import type { Feature } from '@jbrowse/core/util';
4
+ import type { Instance } from 'mobx-state-tree';
5
+ export default function MultiVariantBaseModelF(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
6
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
7
+ type: import("mobx-state-tree").ISimpleType<string>;
8
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
9
+ } & {
10
+ heightPreConfig: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
11
+ } & {
12
+ userBpPerPxLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
13
+ userByteSizeLimit: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
14
+ } & {
15
+ blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
16
+ key: import("mobx-state-tree").ISimpleType<string>;
17
+ region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
18
+ reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
19
+ isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
20
+ isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
21
+ }, {
22
+ stopToken: string | undefined;
23
+ filled: boolean;
24
+ reactElement: React.ReactElement | undefined;
25
+ features: Map<string, Feature> | undefined;
26
+ layout: any;
27
+ status: string;
28
+ error: unknown;
29
+ message: string | undefined;
30
+ maxHeightReached: boolean;
31
+ ReactComponent: ({ model, }: {
32
+ model: {
33
+ error?: unknown;
34
+ reload: () => void;
35
+ message: React.ReactNode;
36
+ filled?: boolean;
37
+ status?: string;
38
+ reactElement?: React.ReactElement;
39
+ };
40
+ }) => import("react/jsx-runtime").JSX.Element | undefined;
41
+ renderProps: any;
42
+ } & {
43
+ doReload(): void;
44
+ afterAttach(): void;
45
+ setStatus(message: string): void;
46
+ setLoading(newStopToken: string): void;
47
+ setMessage(messageText: string): void;
48
+ setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
49
+ setError(error: unknown): void;
50
+ reload(): void;
51
+ beforeDestroy(): void;
52
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
53
+ configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
54
+ maxFeatureScreenDensity: {
55
+ type: string;
56
+ description: string;
57
+ defaultValue: number;
58
+ };
59
+ fetchSizeLimit: {
60
+ type: string;
61
+ defaultValue: number;
62
+ description: string;
63
+ };
64
+ height: {
65
+ type: string;
66
+ defaultValue: number;
67
+ description: string;
68
+ };
69
+ mouseover: {
70
+ type: string;
71
+ description: string;
72
+ defaultValue: string;
73
+ contextVariable: string[];
74
+ };
75
+ jexlFilters: {
76
+ type: string;
77
+ description: string;
78
+ defaultValue: never[];
79
+ };
80
+ }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "displayId">>;
81
+ } & {
82
+ type: import("mobx-state-tree").ISimpleType<"LinearBareDisplay">;
83
+ configuration: AnyConfigurationSchemaType;
84
+ } & {
85
+ type: import("mobx-state-tree").ISimpleType<"LinearVariantMatrixDisplay">;
86
+ layout: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<Source[], Source[], Source[]>, [undefined]>;
87
+ configuration: AnyConfigurationSchemaType;
88
+ minorAlleleFrequencyFilter: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
89
+ showSidebarLabelsSetting: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
90
+ renderingMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
91
+ rowHeightSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
92
+ autoHeight: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
93
+ }, {
94
+ rendererTypeName: string;
95
+ error: unknown;
96
+ message: string | undefined;
97
+ } & {
98
+ readonly RenderingComponent: React.FC<{
99
+ model: {
100
+ id: string;
101
+ type: string;
102
+ rpcDriverName: string | undefined;
103
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
104
+ rendererTypeName: string;
105
+ error: unknown;
106
+ message: string | undefined;
107
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
108
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
109
+ type: import("mobx-state-tree").ISimpleType<string>;
110
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
111
+ }, {
112
+ rendererTypeName: string;
113
+ error: unknown;
114
+ message: string | undefined;
115
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
116
+ onHorizontalScroll?: () => void;
117
+ blockState?: Record<string, any>;
118
+ }>;
119
+ readonly DisplayBlurb: React.FC<{
120
+ model: {
121
+ id: string;
122
+ type: string;
123
+ rpcDriverName: string | undefined;
124
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
125
+ rendererTypeName: string;
126
+ error: unknown;
127
+ message: string | undefined;
128
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
129
+ id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
130
+ type: import("mobx-state-tree").ISimpleType<string>;
131
+ rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
132
+ }, {
133
+ rendererTypeName: string;
134
+ error: unknown;
135
+ message: string | undefined;
136
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
137
+ }> | null;
138
+ readonly adapterConfig: any;
139
+ readonly parentTrack: any;
140
+ renderProps(): any;
141
+ readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
142
+ readonly DisplayMessageComponent: undefined | React.FC<any>;
143
+ trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
144
+ readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
145
+ regionCannotBeRendered(): null;
146
+ } & {
147
+ setMessage(arg?: string): void;
148
+ setError(error?: unknown): void;
149
+ setRpcDriverName(rpcDriverName: string): void;
150
+ reload(): void;
151
+ } & {
152
+ scrollTop: number;
153
+ } & {
154
+ readonly height: number;
155
+ } & {
156
+ setScrollTop(scrollTop: number): void;
157
+ setHeight(displayHeight: number): number;
158
+ resizeHeight(distance: number): number;
159
+ } & {
160
+ featureDensityStatsP: undefined | Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats>;
161
+ featureDensityStats: undefined | import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats;
162
+ currStatsBpPerPx: number;
163
+ } & {
164
+ readonly currentBytesRequested: number;
165
+ readonly currentFeatureScreenDensity: number;
166
+ readonly maxFeatureScreenDensity: any;
167
+ readonly featureDensityStatsReady: boolean;
168
+ readonly maxAllowableBytes: number;
169
+ } & {
170
+ afterAttach(): void;
171
+ } & {
172
+ setCurrStatsBpPerPx(n: number): void;
173
+ setFeatureDensityStatsLimit(stats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats): void;
174
+ getFeatureDensityStats(): Promise<import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats>;
175
+ setFeatureDensityStatsP(arg: any): void;
176
+ setFeatureDensityStats(featureDensityStats?: import("@jbrowse/core/data_adapters/BaseAdapter").FeatureDensityStats): void;
177
+ clearFeatureDensityStats(): void;
178
+ } & {
179
+ readonly regionTooLarge: boolean;
180
+ readonly regionTooLargeReason: string;
181
+ } & {
182
+ readonly statsReadyAndRegionNotTooLarge: boolean;
183
+ regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
184
+ regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react/jsx-runtime").JSX.Element | null;
185
+ } & {
186
+ featureIdUnderMouse: undefined | string;
187
+ contextMenuFeature: undefined | Feature;
188
+ } & {
189
+ readonly DisplayMessageComponent: undefined | React.FC<any>;
190
+ readonly blockType: "staticBlocks" | "dynamicBlocks";
191
+ readonly blockDefinitions: import("@jbrowse/core/util/blockTypes").BlockSet;
192
+ } & {
193
+ readonly renderDelay: number;
194
+ readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
195
+ readonly selectedFeatureId: string | undefined;
196
+ } & {
197
+ readonly features: import("@jbrowse/core/util/compositeMap").default<string, Feature>;
198
+ readonly featureUnderMouse: Feature | undefined;
199
+ getFeatureOverlapping(blockKey: string, x: number, y: number): string | undefined;
200
+ getFeatureByID(blockKey: string, id: string): [number, number, number, number] | undefined;
201
+ searchFeatureByID(id: string): [number, number, number, number] | undefined;
202
+ } & {
203
+ addBlock(key: string, block: import("@jbrowse/core/util/blockTypes").BaseBlock): void;
204
+ deleteBlock(key: string): void;
205
+ selectFeature(feature: Feature): void;
206
+ navToFeature(feature: Feature): void;
207
+ clearFeatureSelection(): void;
208
+ setFeatureIdUnderMouse(feature?: string): void;
209
+ setContextMenuFeature(feature?: Feature): void;
210
+ } & {
211
+ reload(): Promise<void>;
212
+ } & {
213
+ trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
214
+ contextMenuItems(): import("@jbrowse/core/ui").MenuItem[];
215
+ renderProps(): any;
216
+ } & {
217
+ renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react/jsx-runtime").JSX.Element>;
218
+ afterAttach(): void;
219
+ } & {
220
+ readonly rendererConfig: {
221
+ [x: string]: any;
222
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
223
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
224
+ [x: string]: any;
225
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
226
+ setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
227
+ [x: string]: any;
228
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
229
+ } & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
230
+ } & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>;
231
+ readonly rendererTypeName: any;
232
+ } & {
233
+ renderProps(): any;
234
+ } & {
235
+ sourcesLoadingStopToken: string | undefined;
236
+ featureUnderMouseVolatile: Feature | undefined;
237
+ sourcesVolatile: Source[] | undefined;
238
+ featuresVolatile: Feature[] | undefined;
239
+ hasPhased: boolean;
240
+ sampleInfo: undefined | Record<string, SampleInfo>;
241
+ hoveredGenotype: string | undefined;
242
+ } & {
243
+ setRowHeight(arg: number): void;
244
+ setHoveredGenotype(arg: string): void;
245
+ setFeatures(f: Feature[]): void;
246
+ setLayout(layout: Source[]): void;
247
+ clearLayout(): void;
248
+ setSourcesLoading(str: string): void;
249
+ setSources(sources: Source[]): void;
250
+ setMafFilter(arg: number): void;
251
+ setShowSidebarLabels(arg: boolean): void;
252
+ setPhasedMode(arg: string): void;
253
+ setAutoHeight(arg: boolean): void;
254
+ setHasPhased(arg: boolean): void;
255
+ setSampleInfo(arg: Record<string, SampleInfo>): void;
256
+ } & {
257
+ readonly preSources: Source[] | undefined;
258
+ readonly sources: {
259
+ label: string;
260
+ id: string;
261
+ baseUri?: string;
262
+ name: string;
263
+ color?: string;
264
+ group?: string;
265
+ HP?: number;
266
+ }[] | undefined;
267
+ } & {
268
+ readonly rowHeight: number;
269
+ adapterProps(): any;
270
+ trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
271
+ label: string;
272
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
273
+ muiName: string;
274
+ };
275
+ type: string;
276
+ checked: boolean;
277
+ onClick: () => void;
278
+ subMenu?: undefined;
279
+ } | {
280
+ label: string;
281
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
282
+ muiName: string;
283
+ };
284
+ subMenu: ({
285
+ label: string;
286
+ disabled: boolean;
287
+ onClick: () => void;
288
+ type?: undefined;
289
+ checked?: undefined;
290
+ } | {
291
+ label: string;
292
+ type: string;
293
+ checked: boolean;
294
+ onClick: () => void;
295
+ disabled?: undefined;
296
+ })[];
297
+ type?: undefined;
298
+ checked?: undefined;
299
+ onClick?: undefined;
300
+ } | {
301
+ label: string;
302
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
303
+ muiName: string;
304
+ };
305
+ subMenu: ({
306
+ label: string;
307
+ type: string;
308
+ checked: boolean;
309
+ onClick: () => void;
310
+ disabled?: undefined;
311
+ } | {
312
+ label: string;
313
+ disabled: boolean;
314
+ checked: boolean;
315
+ type: string;
316
+ onClick: () => void;
317
+ })[];
318
+ type?: undefined;
319
+ checked?: undefined;
320
+ onClick?: undefined;
321
+ } | {
322
+ label: string;
323
+ icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
324
+ muiName: string;
325
+ };
326
+ subMenu: {
327
+ label: string;
328
+ onClick: () => void;
329
+ }[];
330
+ type?: undefined;
331
+ checked?: undefined;
332
+ onClick?: undefined;
333
+ })[];
334
+ } & {
335
+ readonly canDisplayLabels: boolean;
336
+ readonly totalHeight: number;
337
+ } & {
338
+ renderProps(): any;
339
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
340
+ export type MultiVariantBaseStateModel = ReturnType<typeof MultiVariantBaseModelF>;
341
+ export type MultiVariantBaseModel = Instance<MultiVariantBaseStateModel>;
@@ -0,0 +1,316 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.default = MultiVariantBaseModelF;
40
+ const react_1 = require("react");
41
+ const configuration_1 = require("@jbrowse/core/configuration");
42
+ const util_1 = require("@jbrowse/core/util");
43
+ const stopToken_1 = require("@jbrowse/core/util/stopToken");
44
+ const plugin_linear_genome_view_1 = require("@jbrowse/plugin-linear-genome-view");
45
+ const FilterList_1 = __importDefault(require("@mui/icons-material/FilterList"));
46
+ const Height_1 = __importDefault(require("@mui/icons-material/Height"));
47
+ const Splitscreen_1 = __importDefault(require("@mui/icons-material/Splitscreen"));
48
+ const Visibility_1 = __importDefault(require("@mui/icons-material/Visibility"));
49
+ const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
50
+ const mobx_state_tree_1 = require("mobx-state-tree");
51
+ const SetColorDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/SetColorDialog'))));
52
+ const MAFFilterDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/MAFFilterDialog'))));
53
+ const ClusterDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/ClusterDialog'))));
54
+ const SetRowHeightDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('../shared/SetRowHeightDialog'))));
55
+ function MultiVariantBaseModelF(configSchema) {
56
+ return mobx_state_tree_1.types
57
+ .compose('LinearVariantMatrixDisplay', (0, plugin_linear_genome_view_1.linearBareDisplayStateModelFactory)(configSchema), mobx_state_tree_1.types.model({
58
+ type: mobx_state_tree_1.types.literal('LinearVariantMatrixDisplay'),
59
+ layout: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.frozen(), []),
60
+ configuration: (0, configuration_1.ConfigurationReference)(configSchema),
61
+ minorAlleleFrequencyFilter: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 0.1),
62
+ showSidebarLabelsSetting: true,
63
+ renderingMode: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.string, 'alleleCount'),
64
+ rowHeightSetting: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 8),
65
+ autoHeight: true,
66
+ }))
67
+ .volatile(() => ({
68
+ sourcesLoadingStopToken: undefined,
69
+ featureUnderMouseVolatile: undefined,
70
+ sourcesVolatile: undefined,
71
+ featuresVolatile: undefined,
72
+ hasPhased: false,
73
+ sampleInfo: undefined,
74
+ hoveredGenotype: undefined,
75
+ }))
76
+ .actions(self => ({
77
+ setRowHeight(arg) {
78
+ self.rowHeightSetting = arg;
79
+ },
80
+ setHoveredGenotype(arg) {
81
+ self.hoveredGenotype = arg;
82
+ },
83
+ setFeatures(f) {
84
+ self.featuresVolatile = f;
85
+ },
86
+ setLayout(layout) {
87
+ self.layout = layout;
88
+ },
89
+ clearLayout() {
90
+ self.layout = [];
91
+ },
92
+ setSourcesLoading(str) {
93
+ if (self.sourcesLoadingStopToken) {
94
+ (0, stopToken_1.stopStopToken)(self.sourcesLoadingStopToken);
95
+ }
96
+ self.sourcesLoadingStopToken = str;
97
+ },
98
+ setSources(sources) {
99
+ if (!(0, fast_deep_equal_1.default)(sources, self.sourcesVolatile)) {
100
+ self.sourcesVolatile = sources;
101
+ }
102
+ },
103
+ setMafFilter(arg) {
104
+ self.minorAlleleFrequencyFilter = arg;
105
+ },
106
+ setShowSidebarLabels(arg) {
107
+ self.showSidebarLabelsSetting = arg;
108
+ },
109
+ setPhasedMode(arg) {
110
+ self.renderingMode = arg;
111
+ },
112
+ setAutoHeight(arg) {
113
+ self.autoHeight = arg;
114
+ },
115
+ setHasPhased(arg) {
116
+ self.hasPhased = arg;
117
+ },
118
+ setSampleInfo(arg) {
119
+ if (!(0, fast_deep_equal_1.default)(arg, self.sampleInfo)) {
120
+ self.sampleInfo = arg;
121
+ }
122
+ },
123
+ }))
124
+ .views(self => ({
125
+ get preSources() {
126
+ return self.layout.length ? self.layout : self.sourcesVolatile;
127
+ },
128
+ get sources() {
129
+ var _a, _b;
130
+ if (this.preSources) {
131
+ const rows = [];
132
+ const sources = Object.fromEntries(((_a = self.sourcesVolatile) === null || _a === void 0 ? void 0 : _a.map(s => [s.name, s])) || []);
133
+ for (const row of this.preSources) {
134
+ if (self.renderingMode === 'phased') {
135
+ const info = (_b = self.sampleInfo) === null || _b === void 0 ? void 0 : _b[row.name];
136
+ if (info === null || info === void 0 ? void 0 : info.isPhased) {
137
+ const ploidy = info.maxPloidy;
138
+ for (let i = 0; i < ploidy; i++) {
139
+ const id = `${row.name} HP${i}`;
140
+ rows.push({
141
+ ...sources[row.name],
142
+ ...row,
143
+ label: id,
144
+ HP: i,
145
+ id: id,
146
+ });
147
+ }
148
+ }
149
+ }
150
+ else {
151
+ rows.push({
152
+ ...sources[row.name],
153
+ ...row,
154
+ label: row.name,
155
+ id: row.name,
156
+ });
157
+ }
158
+ }
159
+ return rows;
160
+ }
161
+ return undefined;
162
+ },
163
+ }))
164
+ .views(self => {
165
+ const { trackMenuItems: superTrackMenuItems, renderProps: superRenderProps, } = self;
166
+ return {
167
+ get rowHeight() {
168
+ const { sources, autoHeight, rowHeightSetting, height } = self;
169
+ return autoHeight ? height / ((sources === null || sources === void 0 ? void 0 : sources.length) || 1) : rowHeightSetting;
170
+ },
171
+ adapterProps() {
172
+ const superProps = superRenderProps();
173
+ return {
174
+ ...superProps,
175
+ rpcDriverName: self.rpcDriverName,
176
+ displayModel: self,
177
+ config: self.rendererConfig,
178
+ };
179
+ },
180
+ trackMenuItems() {
181
+ return [
182
+ ...superTrackMenuItems(),
183
+ {
184
+ label: 'Show sidebar labels',
185
+ icon: Visibility_1.default,
186
+ type: 'checkbox',
187
+ checked: self.showSidebarLabelsSetting,
188
+ onClick: () => {
189
+ self.setShowSidebarLabels(!self.showSidebarLabelsSetting);
190
+ },
191
+ },
192
+ {
193
+ label: 'Row height',
194
+ icon: Height_1.default,
195
+ subMenu: [
196
+ {
197
+ label: 'Manually set row height',
198
+ disabled: self.autoHeight,
199
+ onClick: () => {
200
+ (0, util_1.getSession)(self).queueDialog(handleClose => [
201
+ SetRowHeightDialog,
202
+ {
203
+ model: self,
204
+ handleClose,
205
+ },
206
+ ]);
207
+ },
208
+ },
209
+ {
210
+ label: 'Auto-adjust to display height',
211
+ type: 'checkbox',
212
+ checked: self.autoHeight,
213
+ onClick: () => {
214
+ self.setAutoHeight(!self.autoHeight);
215
+ },
216
+ },
217
+ ],
218
+ },
219
+ {
220
+ label: 'Rendering mode',
221
+ icon: Splitscreen_1.default,
222
+ subMenu: [
223
+ {
224
+ label: 'Allele count',
225
+ type: 'radio',
226
+ checked: self.renderingMode === 'alleleCount',
227
+ onClick: () => {
228
+ self.setPhasedMode('alleleCount');
229
+ },
230
+ },
231
+ {
232
+ label: 'Phased' +
233
+ (!self.hasPhased
234
+ ? ' (disabled, no phased variants found)'
235
+ : ''),
236
+ disabled: !self.hasPhased,
237
+ checked: self.renderingMode === 'phased',
238
+ type: 'radio',
239
+ onClick: () => {
240
+ self.setPhasedMode('phased');
241
+ },
242
+ },
243
+ ],
244
+ },
245
+ {
246
+ label: 'Filter by',
247
+ icon: FilterList_1.default,
248
+ subMenu: [
249
+ {
250
+ label: 'Minor allele frequency',
251
+ onClick: () => {
252
+ (0, util_1.getSession)(self).queueDialog(handleClose => [
253
+ MAFFilterDialog,
254
+ {
255
+ model: self,
256
+ handleClose,
257
+ },
258
+ ]);
259
+ },
260
+ },
261
+ ],
262
+ },
263
+ {
264
+ label: 'Cluster by genotype',
265
+ onClick: () => {
266
+ (0, util_1.getSession)(self).queueDialog(handleClose => [
267
+ ClusterDialog,
268
+ {
269
+ model: self,
270
+ handleClose,
271
+ },
272
+ ]);
273
+ },
274
+ },
275
+ {
276
+ label: 'Edit group colors/arrangement...',
277
+ onClick: () => {
278
+ (0, util_1.getSession)(self).queueDialog(handleClose => [
279
+ SetColorDialog,
280
+ {
281
+ model: self,
282
+ handleClose,
283
+ },
284
+ ]);
285
+ },
286
+ },
287
+ ];
288
+ },
289
+ };
290
+ })
291
+ .views(self => ({
292
+ get canDisplayLabels() {
293
+ return self.rowHeight > 8 && self.showSidebarLabelsSetting;
294
+ },
295
+ get totalHeight() {
296
+ var _a;
297
+ return self.rowHeight * (((_a = self.sources) === null || _a === void 0 ? void 0 : _a.length) || 1);
298
+ },
299
+ }))
300
+ .views(self => ({
301
+ renderProps() {
302
+ const superProps = self.adapterProps();
303
+ return {
304
+ ...superProps,
305
+ notReady: superProps.notReady || !self.sources || !self.featuresVolatile,
306
+ height: self.height,
307
+ totalHeight: self.totalHeight,
308
+ renderingMode: self.renderingMode,
309
+ minorAlleleFrequencyFilter: self.minorAlleleFrequencyFilter,
310
+ rowHeight: self.rowHeight,
311
+ sources: self.sources,
312
+ scrollTop: self.scrollTop,
313
+ };
314
+ },
315
+ }));
316
+ }
@@ -0,0 +1,6 @@
1
+ export default function MultiVariantTooltip({ source, }: {
2
+ source: {
3
+ color?: string;
4
+ [key: string]: unknown;
5
+ };
6
+ }): import("react/jsx-runtime").JSX.Element;