react-msaview 5.10.0 → 6.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.
- package/bundle/index.js +99 -99
- package/bundle/index.js.map +4 -4
- package/dist/clustalX.js +22 -22
- package/dist/clustalX.js.map +1 -1
- package/dist/components/CopyButton.d.ts +9 -0
- package/dist/components/CopyButton.js +23 -0
- package/dist/components/CopyButton.js.map +1 -0
- package/dist/components/Loading.js +2 -2
- package/dist/components/Loading.js.map +1 -1
- package/dist/components/MSAView.js +2 -2
- package/dist/components/MSAView.js.map +1 -1
- package/dist/components/ResizeHandles.js +24 -40
- package/dist/components/ResizeHandles.js.map +1 -1
- package/dist/components/ScrollbarThumb.d.ts +14 -0
- package/dist/components/ScrollbarThumb.js +28 -0
- package/dist/components/ScrollbarThumb.js.map +1 -0
- package/dist/components/SequenceTextArea.js +3 -10
- package/dist/components/SequenceTextArea.js.map +1 -1
- package/dist/components/VerticalScrollbar.js +11 -25
- package/dist/components/VerticalScrollbar.js.map +1 -1
- package/dist/components/dialogs/FeatureDialog.js +3 -3
- package/dist/components/dialogs/FeatureDialog.js.map +1 -1
- package/dist/components/dialogs/{UserProvidedDomainsDialog.d.ts → InterProScanFileDialog.d.ts} +2 -2
- package/dist/components/dialogs/{UserProvidedDomainsDialog.js → InterProScanFileDialog.js} +6 -10
- package/dist/components/dialogs/InterProScanFileDialog.js.map +1 -0
- package/dist/components/dialogs/TrackInfoDialog.d.ts +2 -4
- package/dist/components/dialogs/TrackInfoDialog.js +8 -14
- package/dist/components/dialogs/TrackInfoDialog.js.map +1 -1
- package/dist/components/header/FileMenu.js +3 -3
- package/dist/components/header/FileMenu.js.map +1 -1
- package/dist/components/header/GappynessSlider.js +1 -1
- package/dist/components/header/GappynessSlider.js.map +1 -1
- package/dist/components/header/{getDomainsMenu.d.ts → getAnnotationsMenu.d.ts} +1 -1
- package/dist/components/header/{getDomainsMenu.js → getAnnotationsMenu.js} +10 -9
- package/dist/components/header/getAnnotationsMenu.js.map +1 -0
- package/dist/components/import/ImportForm.js +1 -1
- package/dist/components/import/ImportForm.js.map +1 -1
- package/dist/components/import/ImportFormExamples.js +66 -57
- package/dist/components/import/ImportFormExamples.js.map +1 -1
- package/dist/components/minimap/Minimap.js +11 -22
- package/dist/components/minimap/Minimap.js.map +1 -1
- package/dist/components/minimap/MinimapSVG.d.ts +2 -1
- package/dist/components/minimap/MinimapSVG.js +3 -4
- package/dist/components/minimap/MinimapSVG.js.map +1 -1
- package/dist/components/minimap/minimapLayout.d.ts +10 -1
- package/dist/components/minimap/minimapLayout.js +15 -10
- package/dist/components/minimap/minimapLayout.js.map +1 -1
- package/dist/components/msa/{DomainLegend.d.ts → AnnotationLegend.d.ts} +2 -2
- package/dist/components/msa/{DomainLegend.js → AnnotationLegend.js} +4 -4
- package/dist/components/msa/AnnotationLegend.js.map +1 -0
- package/dist/components/msa/MSACanvas.js +2 -2
- package/dist/components/msa/MSACanvas.js.map +1 -1
- package/dist/components/msa/MSAMouseoverCanvas.js +1 -2
- package/dist/components/msa/MSAMouseoverCanvas.js.map +1 -1
- package/dist/components/msa/MSAPanel.js +2 -2
- package/dist/components/msa/MSAPanel.js.map +1 -1
- package/dist/components/msa/domainBandCursor.d.ts +17 -0
- package/dist/components/msa/domainBandCursor.js +39 -0
- package/dist/components/msa/domainBandCursor.js.map +1 -0
- package/dist/components/msa/renderMSABlock.js +14 -20
- package/dist/components/msa/renderMSABlock.js.map +1 -1
- package/dist/components/msa/renderMSAMouseover.js +1 -2
- package/dist/components/msa/renderMSAMouseover.js.map +1 -1
- package/dist/components/tree/TreeRuler.js +5 -2
- package/dist/components/tree/TreeRuler.js.map +1 -1
- package/dist/ggplotPalettes.d.ts +0 -1
- package/dist/ggplotPalettes.js +0 -3
- package/dist/ggplotPalettes.js.map +1 -1
- package/dist/hierarchy.d.ts +2 -6
- package/dist/hierarchy.js +4 -6
- package/dist/hierarchy.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/launchInterProScan.d.ts +0 -23
- package/dist/launchInterProScan.js +2 -5
- package/dist/launchInterProScan.js.map +1 -1
- package/dist/measureTextCanvas.js +21 -6
- package/dist/measureTextCanvas.js.map +1 -1
- package/dist/model.d.ts +50 -100
- package/dist/model.js +128 -107
- package/dist/model.js.map +1 -1
- package/dist/renderToSvg.js +2 -2
- package/dist/renderToSvg.js.map +1 -1
- package/dist/rowCoordinateCalculations.d.ts +13 -17
- package/dist/rowCoordinateCalculations.js +45 -39
- package/dist/rowCoordinateCalculations.js.map +1 -1
- package/dist/types.d.ts +4 -11
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +5 -5
- package/src/clustalX.ts +22 -22
- package/src/colSpace.test.ts +27 -0
- package/src/components/CopyButton.tsx +44 -0
- package/src/components/Loading.tsx +10 -1
- package/src/components/MSAView.tsx +2 -3
- package/src/components/ResizeHandles.tsx +60 -69
- package/src/components/ScrollbarThumb.tsx +48 -0
- package/src/components/SequenceTextArea.tsx +3 -16
- package/src/components/VerticalScrollbar.tsx +19 -33
- package/src/components/dialogs/FeatureDialog.tsx +3 -4
- package/src/components/dialogs/{UserProvidedDomainsDialog.tsx → InterProScanFileDialog.tsx} +6 -14
- package/src/components/dialogs/TrackInfoDialog.tsx +18 -20
- package/src/components/header/FileMenu.tsx +3 -3
- package/src/components/header/GappynessSlider.tsx +4 -1
- package/src/components/header/{getDomainsMenu.ts → getAnnotationsMenu.ts} +10 -9
- package/src/components/import/ImportForm.tsx +1 -1
- package/src/components/import/ImportFormExamples.tsx +82 -133
- package/src/components/minimap/Minimap.tsx +23 -31
- package/src/components/minimap/MinimapSVG.tsx +32 -31
- package/src/components/minimap/minimapLayout.test.ts +60 -0
- package/src/components/minimap/minimapLayout.ts +15 -10
- package/src/components/msa/{DomainLegend.tsx → AnnotationLegend.tsx} +7 -3
- package/src/components/msa/MSACanvas.tsx +3 -10
- package/src/components/msa/MSAMouseoverCanvas.tsx +1 -3
- package/src/components/msa/MSAPanel.tsx +2 -2
- package/src/components/msa/domainBandCursor.ts +41 -0
- package/src/components/msa/renderMSABlock.ts +19 -23
- package/src/components/msa/renderMSAMouseover.ts +1 -3
- package/src/components/tree/TreeRuler.tsx +7 -2
- package/src/components/tree/renderTreeCanvas.test.ts +15 -7
- package/src/domainBands.test.ts +24 -0
- package/src/domainLetterColor.test.ts +80 -0
- package/src/ggplotPalettes.ts +0 -4
- package/src/hierarchy.test.ts +7 -7
- package/src/hierarchy.ts +6 -9
- package/src/index.ts +4 -1
- package/src/largeTree.test.ts +23 -2
- package/src/launchInterProScan.ts +3 -30
- package/src/loadErrorDisplay.test.tsx +102 -0
- package/src/measureTextCanvas.ts +22 -6
- package/src/model.ts +137 -115
- package/src/renderMinimapSvg.test.tsx +109 -0
- package/src/renderToSvg.tsx +2 -2
- package/src/rowCoordinateCalculations.ts +48 -44
- package/src/types.ts +10 -15
- package/src/version.ts +1 -1
- package/src/viewChrome.test.tsx +134 -0
- package/dist/components/dialogs/DomainDialog.d.ts +0 -6
- package/dist/components/dialogs/DomainDialog.js +0 -19
- package/dist/components/dialogs/DomainDialog.js.map +0 -1
- package/dist/components/dialogs/UserProvidedDomainsDialog.js.map +0 -1
- package/dist/components/header/SettingsMenu.d.ts +0 -6
- package/dist/components/header/SettingsMenu.js +0 -40
- package/dist/components/header/SettingsMenu.js.map +0 -1
- package/dist/components/header/getDomainsMenu.js.map +0 -1
- package/dist/components/msa/DomainLegend.js.map +0 -1
- package/src/components/dialogs/DomainDialog.tsx +0 -45
- package/src/components/header/SettingsMenu.tsx +0 -57
|
@@ -18,6 +18,25 @@ import { isBlank } from './util.ts'
|
|
|
18
18
|
* Each row can have different seqPos values for the same globalCol due to gaps.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Index of the first element in `[0, len)` for which `pred` holds, over a range
|
|
23
|
+
* where `pred` is false up to some point and true from there on. Both
|
|
24
|
+
* conversions below are that shape, since `blanks` is sorted ascending.
|
|
25
|
+
*/
|
|
26
|
+
function partitionPoint(len: number, pred: (i: number) => boolean) {
|
|
27
|
+
let left = 0
|
|
28
|
+
let right = len
|
|
29
|
+
while (left < right) {
|
|
30
|
+
const mid = (left + right) >>> 1
|
|
31
|
+
if (pred(mid)) {
|
|
32
|
+
right = mid
|
|
33
|
+
} else {
|
|
34
|
+
left = mid + 1
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return left
|
|
38
|
+
}
|
|
39
|
+
|
|
21
40
|
/**
|
|
22
41
|
* Convert a visible column index to a global column index.
|
|
23
42
|
* This is used when translating mouse/screen coordinates to MSA coordinates.
|
|
@@ -27,32 +46,12 @@ import { isBlank } from './util.ts'
|
|
|
27
46
|
* @returns The corresponding global column index in the full MSA
|
|
28
47
|
*/
|
|
29
48
|
export function visibleColToGlobalCol(blanks: number[], visibleCol: number) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
while (blankArrayIndex < blanksLen && blanks[blankArrayIndex] === globalCol) {
|
|
37
|
-
blankArrayIndex++
|
|
38
|
-
globalCol++
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
while (currentVisibleCol < visibleCol) {
|
|
42
|
-
currentVisibleCol++
|
|
43
|
-
globalCol++
|
|
44
|
-
|
|
45
|
-
// Skip any blank columns after incrementing
|
|
46
|
-
while (
|
|
47
|
-
blankArrayIndex < blanksLen &&
|
|
48
|
-
blanks[blankArrayIndex] === globalCol
|
|
49
|
-
) {
|
|
50
|
-
blankArrayIndex++
|
|
51
|
-
globalCol++
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return globalCol
|
|
49
|
+
// `blanks[i] - i` counts the visible columns before the i-th blank, so the
|
|
50
|
+
// first blank with more than visibleCol of them in front of it is the first
|
|
51
|
+
// one sitting past this column. Its index is how many blanks shift it right.
|
|
52
|
+
return (
|
|
53
|
+
visibleCol + partitionPoint(blanks.length, i => blanks[i]! - i > visibleCol)
|
|
54
|
+
)
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
/**
|
|
@@ -67,25 +66,30 @@ export function globalColToVisibleCol(
|
|
|
67
66
|
blanks: number[],
|
|
68
67
|
globalCol: number,
|
|
69
68
|
): number | undefined {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const mid = Math.floor((left + right) / 2)
|
|
76
|
-
if (blanks[mid] === globalCol) {
|
|
77
|
-
return undefined // Column is hidden
|
|
78
|
-
}
|
|
79
|
-
if (blanks[mid]! < globalCol) {
|
|
80
|
-
left = mid + 1
|
|
81
|
-
} else {
|
|
82
|
-
right = mid - 1
|
|
83
|
-
}
|
|
84
|
-
}
|
|
69
|
+
const blanksBefore = countBlanksBefore(blanks, globalCol)
|
|
70
|
+
return blanks[blanksBefore] === globalCol
|
|
71
|
+
? undefined // Column is hidden
|
|
72
|
+
: globalCol - blanksBefore
|
|
73
|
+
}
|
|
85
74
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
75
|
+
function countBlanksBefore(blanks: number[], globalCol: number) {
|
|
76
|
+
return partitionPoint(blanks.length, i => blanks[i]! >= globalCol)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* How many visible columns come before a global column. For a visible column
|
|
81
|
+
* that is its own visible index; for a hidden one it is the index of the next
|
|
82
|
+
* visible column, i.e. where the hidden column collapses to.
|
|
83
|
+
*
|
|
84
|
+
* That total answer is what spans want: resolving both ends of a span through
|
|
85
|
+
* globalColToVisibleCol instead loses the whole span whenever either end lands
|
|
86
|
+
* in a hidden column.
|
|
87
|
+
*
|
|
88
|
+
* @param blanks - Sorted array of global column indices that are hidden
|
|
89
|
+
* @param globalCol - The global column index in the full MSA
|
|
90
|
+
*/
|
|
91
|
+
export function visibleColsBefore(blanks: number[], globalCol: number) {
|
|
92
|
+
return globalCol - countBlanksBefore(blanks, globalCol)
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
/**
|
package/src/types.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Annotation } from 'msa-parsers'
|
|
2
|
+
|
|
1
3
|
export interface Accession {
|
|
2
4
|
accession: string
|
|
3
5
|
name: string
|
|
@@ -26,24 +28,17 @@ export interface BasicTrack {
|
|
|
26
28
|
model: TextTrackModel & BarTrackModel
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
accession: string
|
|
35
|
-
description: string
|
|
36
|
-
featureType?: string
|
|
37
|
-
start: number
|
|
38
|
-
end: number
|
|
39
|
-
strand?: number
|
|
40
|
-
}
|
|
31
|
+
// the overlay annotation itself lives in msa-parsers, alongside the adapters
|
|
32
|
+
// that build it. TidyDomainAnnotation is its former name, kept because
|
|
33
|
+
// downstream plugins name it in their emitted declarations.
|
|
34
|
+
export type { Annotation }
|
|
35
|
+
export type TidyDomainAnnotation = Annotation
|
|
41
36
|
|
|
42
|
-
//
|
|
43
|
-
// stackIndex is its position
|
|
37
|
+
// an annotation resolved to the visible column span it is drawn across.
|
|
38
|
+
// stackIndex is its position among the bands its row actually draws, which the
|
|
44
39
|
// sub-row layout uses to stack boxes.
|
|
45
40
|
export interface DomainBand {
|
|
46
|
-
annotation:
|
|
41
|
+
annotation: Annotation
|
|
47
42
|
startCol: number
|
|
48
43
|
endCol: number
|
|
49
44
|
stackIndex: number
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '
|
|
1
|
+
export const version = '6.0.0'
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
//
|
|
3
|
+
// The chrome around the alignment -- the tree/height resize handles, the
|
|
4
|
+
// minimap and the vertical scrollbar -- is all built from the same
|
|
5
|
+
// mousedown-then-drag hook, and none of it is exercised by the render tests.
|
|
6
|
+
// This mounts the real view and drives one handle of each kind.
|
|
7
|
+
import React, { act } from 'react'
|
|
8
|
+
|
|
9
|
+
import { createRoot } from 'react-dom/client'
|
|
10
|
+
import { afterEach, beforeAll, beforeEach, expect, test } from 'vitest'
|
|
11
|
+
|
|
12
|
+
import MSAView from './components/Loading.tsx'
|
|
13
|
+
import MSAModelF from './model.ts'
|
|
14
|
+
|
|
15
|
+
import type { MsaViewModel } from './model.ts'
|
|
16
|
+
import type { Root } from 'react-dom/client'
|
|
17
|
+
|
|
18
|
+
Reflect.set(globalThis, 'IS_REACT_ACT_ENVIRONMENT', true)
|
|
19
|
+
|
|
20
|
+
beforeAll(() => {
|
|
21
|
+
HTMLCanvasElement.prototype.getContext = function (this: HTMLCanvasElement) {
|
|
22
|
+
return {
|
|
23
|
+
canvas: this,
|
|
24
|
+
font: '12px sans-serif',
|
|
25
|
+
measureText: (t: string) => ({ width: t.length * 7 }),
|
|
26
|
+
arc() {},
|
|
27
|
+
beginPath() {},
|
|
28
|
+
clearRect() {},
|
|
29
|
+
closePath() {},
|
|
30
|
+
fill() {},
|
|
31
|
+
fillRect() {},
|
|
32
|
+
fillText() {},
|
|
33
|
+
lineTo() {},
|
|
34
|
+
moveTo() {},
|
|
35
|
+
resetTransform() {},
|
|
36
|
+
scale() {},
|
|
37
|
+
setLineDash() {},
|
|
38
|
+
stroke() {},
|
|
39
|
+
strokeRect() {},
|
|
40
|
+
translate() {},
|
|
41
|
+
} as unknown as CanvasRenderingContext2D
|
|
42
|
+
} as unknown as typeof HTMLCanvasElement.prototype.getContext
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
// tall and wide enough that both scrollbars are on screen
|
|
46
|
+
const names = Array.from({ length: 20 }, (_, i) => `seq${i}`)
|
|
47
|
+
const msa = names.map(name => `>${name}\n${'ACGT'.repeat(25)}`).join('\n')
|
|
48
|
+
const tree = `(${names.map(n => `${n}:0.1`).join(',')});`
|
|
49
|
+
|
|
50
|
+
let container: HTMLDivElement
|
|
51
|
+
let root: Root
|
|
52
|
+
let model: MsaViewModel
|
|
53
|
+
|
|
54
|
+
beforeEach(() => {
|
|
55
|
+
container = document.createElement('div')
|
|
56
|
+
document.body.append(container)
|
|
57
|
+
root = createRoot(container)
|
|
58
|
+
model = MSAModelF().create({
|
|
59
|
+
type: 'MsaView',
|
|
60
|
+
msaFormat: 'fasta',
|
|
61
|
+
height: 200,
|
|
62
|
+
data: { msa, tree },
|
|
63
|
+
})
|
|
64
|
+
model.setWidth(800)
|
|
65
|
+
act(() => {
|
|
66
|
+
root.render(<MSAView model={model} />)
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
afterEach(() => {
|
|
71
|
+
act(() => {
|
|
72
|
+
root.unmount()
|
|
73
|
+
})
|
|
74
|
+
container.remove()
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
function byCursor(cursor: string) {
|
|
78
|
+
return [...container.querySelectorAll<HTMLElement>('div')].filter(
|
|
79
|
+
el => el.style.cursor === cursor,
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// useDragScroll defers each move to an animation frame, so a drag needs one
|
|
84
|
+
// flushed frame before the model has moved
|
|
85
|
+
async function drag(el: HTMLElement, { x = 0, y = 0 }) {
|
|
86
|
+
await act(async () => {
|
|
87
|
+
el.dispatchEvent(
|
|
88
|
+
new MouseEvent('mousedown', { bubbles: true, clientX: 0, clientY: 0 }),
|
|
89
|
+
)
|
|
90
|
+
})
|
|
91
|
+
await act(async () => {
|
|
92
|
+
document.dispatchEvent(
|
|
93
|
+
new MouseEvent('mousemove', { bubbles: true, clientX: x, clientY: y }),
|
|
94
|
+
)
|
|
95
|
+
await new Promise(resolve => {
|
|
96
|
+
requestAnimationFrame(resolve)
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
await act(async () => {
|
|
100
|
+
document.dispatchEvent(new MouseEvent('mouseup', { bubbles: true }))
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
test('the view mounts with both scrollbars', () => {
|
|
105
|
+
expect(container.querySelector('[data-testid="msa_canvas"]')).toBeTruthy()
|
|
106
|
+
expect(model.showVerticalScrollbar).toBe(true)
|
|
107
|
+
expect(model.showHorizontalScrollbar).toBe(true)
|
|
108
|
+
// one horizontal divider (tree/msa), two vertical (view height, and the
|
|
109
|
+
// conservation track's own)
|
|
110
|
+
expect(byCursor('ew-resize')).toHaveLength(1)
|
|
111
|
+
expect(byCursor('ns-resize')).toHaveLength(2)
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
test('dragging the tree divider widens the tree area', async () => {
|
|
115
|
+
const before = model.treeAreaWidth
|
|
116
|
+
await drag(byCursor('ew-resize')[0]!, { x: 60 })
|
|
117
|
+
expect(model.treeAreaWidth).toBe(before + 60)
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
test('dragging the view divider grows the view', async () => {
|
|
121
|
+
const before = model.height
|
|
122
|
+
// the last ns-resize handle is the one below the whole view
|
|
123
|
+
await drag(byCursor('ns-resize').at(-1)!, { y: 50 })
|
|
124
|
+
expect(model.height).toBe(before + 50)
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
test('dragging the scrollbar thumb scrolls the alignment', async () => {
|
|
128
|
+
const thumb = container.querySelector<HTMLElement>(
|
|
129
|
+
'div[style*="cursor: pointer"]',
|
|
130
|
+
)!
|
|
131
|
+
expect(model.scrollX).toBe(0)
|
|
132
|
+
await drag(thumb, { x: 40 })
|
|
133
|
+
expect(model.scrollX).toBeLessThan(0)
|
|
134
|
+
})
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Dialog } from '@jbrowse/core/ui';
|
|
3
|
-
import { Tab, Tabs } from '@mui/material';
|
|
4
|
-
import InterProScanPanel from './InterProScanDialog.js';
|
|
5
|
-
import UserProvidedResultPanel from './UserProvidedDomainsDialog.js';
|
|
6
|
-
export default function LaunchDomainViewDialog({ handleClose, model, }) {
|
|
7
|
-
const [choice, setChoice] = useState(0);
|
|
8
|
-
return (React.createElement(Dialog, { maxWidth: "xl", title: "Launch protein view", onClose: () => {
|
|
9
|
-
handleClose();
|
|
10
|
-
}, open: true },
|
|
11
|
-
React.createElement(Tabs, { value: choice, onChange: (_, val) => {
|
|
12
|
-
setChoice(val);
|
|
13
|
-
} },
|
|
14
|
-
React.createElement(Tab, { value: 0, label: "Automatic lookup" }),
|
|
15
|
-
React.createElement(Tab, { value: 1, label: "Manual" })),
|
|
16
|
-
choice === 0 ? (React.createElement(InterProScanPanel, { model: model, handleClose: handleClose })) : null,
|
|
17
|
-
choice === 1 ? (React.createElement(UserProvidedResultPanel, { model: model, handleClose: handleClose })) : null));
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=DomainDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DomainDialog.js","sourceRoot":"","sources":["../../../src/components/dialogs/DomainDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEzC,OAAO,iBAAiB,MAAM,yBAA0B,CAAA;AACxD,OAAO,uBAAuB,MAAM,gCAAiC,CAAA;AAIrE,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAC7C,WAAW,EACX,KAAK,GAIN;IACC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IACvC,OAAO,CACL,oBAAC,MAAM,IACL,QAAQ,EAAC,IAAI,EACb,KAAK,EAAC,qBAAqB,EAC3B,OAAO,EAAE,GAAG,EAAE;YACZ,WAAW,EAAE,CAAA;QACf,CAAC,EACD,IAAI;QAEJ,oBAAC,IAAI,IACH,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;gBACnB,SAAS,CAAC,GAAG,CAAC,CAAA;YAChB,CAAC;YAED,oBAAC,GAAG,IAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAC,kBAAkB,GAAG;YAC1C,oBAAC,GAAG,IAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAC,QAAQ,GAAG,CAC3B;QACN,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACd,oBAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,GAAI,CAC9D,CAAC,CAAC,CAAC,IAAI;QACP,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACd,oBAAC,uBAAuB,IAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,GAAI,CACpE,CAAC,CAAC,CAAC,IAAI,CACD,CACV,CAAA;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserProvidedDomainsDialog.js","sourceRoot":"","sources":["../../../src/components/dialogs/UserProvidedDomainsDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EACL,MAAM,EACN,aAAa,EACb,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,KAAK,EACL,UAAU,EACV,SAAS,EACT,UAAU,GACX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAK/C,MAAM,yBAAyB,GAAG,QAAQ,CAAC,UAAU,EACnD,WAAW,EACX,KAAK,GAIN;IACC,MAAM,CAAC,IAAI,E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K,CAAC,CAAC,MAAM,CACtB,6BAA6B,EAC7B,SAAS,CACV,CAAA;wBACH,CAAC;wBAAC,OAAO,CAAC,EAAE,CAAC;4BACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;4BAChB,UAAU,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;wBAC1C,CAAC;gCAAS,CAAC;4BACT,KAAK,CAAC,SAAS,EAAE,CAAA;wBACnB,CAAC;oBACH,CAAC,CAAC,EAAE,CAAA;oBACJ,WAAW,EAAE,CAAA;gBACf,CAAC,mBAGM,CACK,CACT,CACV,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,yBAAyB,CAAA"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
3
|
-
import AccountTree from '@mui/icons-material/AccountTree';
|
|
4
|
-
import Palette from '@mui/icons-material/Palette';
|
|
5
|
-
import Settings from '@mui/icons-material/Settings';
|
|
6
|
-
import { observer } from 'mobx-react';
|
|
7
|
-
import colorSchemes from '../../colorSchemes.js';
|
|
8
|
-
import { msaSettingsMenuItems, treeSettingsMenuItems, } from './settingsMenuItems.js';
|
|
9
|
-
const SettingsMenu = observer(function ({ model }) {
|
|
10
|
-
const { colorSchemeName } = model;
|
|
11
|
-
return (React.createElement(CascadingMenuButton, { closeAfterItemClick: false, menuItems: [
|
|
12
|
-
{
|
|
13
|
-
label: 'Color scheme',
|
|
14
|
-
icon: Palette,
|
|
15
|
-
type: 'subMenu',
|
|
16
|
-
subMenu: Object.keys(colorSchemes).map(option => ({
|
|
17
|
-
label: option,
|
|
18
|
-
type: 'radio',
|
|
19
|
-
checked: colorSchemeName === option,
|
|
20
|
-
onClick: () => {
|
|
21
|
-
model.setColorSchemeName(option);
|
|
22
|
-
},
|
|
23
|
-
})),
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
label: 'MSA settings',
|
|
27
|
-
type: 'subMenu',
|
|
28
|
-
subMenu: msaSettingsMenuItems(model),
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
label: 'Tree settings',
|
|
32
|
-
type: 'subMenu',
|
|
33
|
-
icon: AccountTree,
|
|
34
|
-
subMenu: treeSettingsMenuItems(model),
|
|
35
|
-
},
|
|
36
|
-
] },
|
|
37
|
-
React.createElement(Settings, null)));
|
|
38
|
-
});
|
|
39
|
-
export default SettingsMenu;
|
|
40
|
-
//# sourceMappingURL=SettingsMenu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsMenu.js","sourceRoot":"","sources":["../../../src/components/header/SettingsMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,mBAAmB,MAAM,sCAAsC,CAAA;AACtE,OAAO,WAAW,MAAM,iCAAiC,CAAA;AACzD,OAAO,OAAO,MAAM,6BAA6B,CAAA;AACjD,OAAO,QAAQ,MAAM,8BAA8B,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,YAAY,MAAM,uBAAuB,CAAA;AAChD,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,wBAAwB,CAAA;AAI/B,MAAM,YAAY,GAAG,QAAQ,CAAC,UAAU,EAAE,KAAK,EAA2B;IACxE,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,CAAA;IACjC,OAAO,CACL,oBAAC,mBAAmB,IAClB,mBAAmB,EAAE,KAAK,EAC1B,SAAS,EAAE;YACT;gBACE,KAAK,EAAE,cAAc;gBACrB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,GAAG,CACpC,MAAM,CAAC,EAAE,CACP,CAAC;oBACC,KAAK,EAAE,MAAM;oBACb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browse/core/ui'
|
|
4
|
-
import { Tab, Tabs } from '@mui/material'
|
|
5
|
-
|
|
6
|
-
import InterProScanPanel from './InterProScanDialog.tsx'
|
|
7
|
-
import UserProvidedResultPanel from './UserProvidedDomainsDialog.tsx'
|
|
8
|
-
|
|
9
|
-
import type { MsaViewModel } from '../../model.ts'
|
|
10
|
-
|
|
11
|
-
export default function LaunchDomainViewDialog({
|
|
12
|
-
handleClose,
|
|
13
|
-
model,
|
|
14
|
-
}: {
|
|
15
|
-
handleClose: () => void
|
|
16
|
-
model: MsaViewModel
|
|
17
|
-
}) {
|
|
18
|
-
const [choice, setChoice] = useState(0)
|
|
19
|
-
return (
|
|
20
|
-
<Dialog
|
|
21
|
-
maxWidth="xl"
|
|
22
|
-
title="Launch protein view"
|
|
23
|
-
onClose={() => {
|
|
24
|
-
handleClose()
|
|
25
|
-
}}
|
|
26
|
-
open
|
|
27
|
-
>
|
|
28
|
-
<Tabs
|
|
29
|
-
value={choice}
|
|
30
|
-
onChange={(_, val) => {
|
|
31
|
-
setChoice(val)
|
|
32
|
-
}}
|
|
33
|
-
>
|
|
34
|
-
<Tab value={0} label="Automatic lookup" />
|
|
35
|
-
<Tab value={1} label="Manual" />
|
|
36
|
-
</Tabs>
|
|
37
|
-
{choice === 0 ? (
|
|
38
|
-
<InterProScanPanel model={model} handleClose={handleClose} />
|
|
39
|
-
) : null}
|
|
40
|
-
{choice === 1 ? (
|
|
41
|
-
<UserProvidedResultPanel model={model} handleClose={handleClose} />
|
|
42
|
-
) : null}
|
|
43
|
-
</Dialog>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton'
|
|
4
|
-
import AccountTree from '@mui/icons-material/AccountTree'
|
|
5
|
-
import Palette from '@mui/icons-material/Palette'
|
|
6
|
-
import Settings from '@mui/icons-material/Settings'
|
|
7
|
-
import { observer } from 'mobx-react'
|
|
8
|
-
|
|
9
|
-
import colorSchemes from '../../colorSchemes.ts'
|
|
10
|
-
import {
|
|
11
|
-
msaSettingsMenuItems,
|
|
12
|
-
treeSettingsMenuItems,
|
|
13
|
-
} from './settingsMenuItems.ts'
|
|
14
|
-
|
|
15
|
-
import type { MsaViewModel } from '../../model.ts'
|
|
16
|
-
|
|
17
|
-
const SettingsMenu = observer(function ({ model }: { model: MsaViewModel }) {
|
|
18
|
-
const { colorSchemeName } = model
|
|
19
|
-
return (
|
|
20
|
-
<CascadingMenuButton
|
|
21
|
-
closeAfterItemClick={false}
|
|
22
|
-
menuItems={[
|
|
23
|
-
{
|
|
24
|
-
label: 'Color scheme',
|
|
25
|
-
icon: Palette,
|
|
26
|
-
type: 'subMenu',
|
|
27
|
-
subMenu: Object.keys(colorSchemes).map(
|
|
28
|
-
option =>
|
|
29
|
-
({
|
|
30
|
-
label: option,
|
|
31
|
-
type: 'radio',
|
|
32
|
-
checked: colorSchemeName === option,
|
|
33
|
-
onClick: () => {
|
|
34
|
-
model.setColorSchemeName(option)
|
|
35
|
-
},
|
|
36
|
-
}) as const,
|
|
37
|
-
),
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
label: 'MSA settings',
|
|
41
|
-
type: 'subMenu',
|
|
42
|
-
subMenu: msaSettingsMenuItems(model),
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
label: 'Tree settings',
|
|
46
|
-
type: 'subMenu',
|
|
47
|
-
icon: AccountTree,
|
|
48
|
-
subMenu: treeSettingsMenuItems(model),
|
|
49
|
-
},
|
|
50
|
-
]}
|
|
51
|
-
>
|
|
52
|
-
<Settings />
|
|
53
|
-
</CascadingMenuButton>
|
|
54
|
-
)
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
export default SettingsMenu
|