jbrowse-plugin-graphgenomeviewer 8.0.0 → 8.0.2
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/dist/chunks/{AddTrackWorkflow-KT6Z6PSW.js → AddTrackWorkflow-RJSOQZYQ.js} +2 -2
- package/dist/chunks/{ChooseSamplesDialog-YUH6SVEZ.js → ChooseSamplesDialog-LO7FKFSS.js} +2 -2
- package/dist/chunks/{ChooseWalksDialog-2QJKRASB.js → ChooseWalksDialog-JJSOVCEU.js} +2 -2
- package/dist/chunks/{GbzBaseSyntenyAdapter-NPEXW3Z3.js → GbzBaseSyntenyAdapter-EGNUOKB2.js} +2 -2
- package/dist/chunks/{GbzBaseSyntenyAdapter-NPEXW3Z3.js.map → GbzBaseSyntenyAdapter-EGNUOKB2.js.map} +1 -1
- package/dist/chunks/{GraphGenomeView-5LYF6LMA.js → GraphGenomeView-667ZUNDI.js} +2 -2
- package/dist/chunks/{GraphTrackSettingsDialog-T5YKMIPH.js → GraphTrackSettingsDialog-7M3Q635V.js} +2 -2
- package/dist/chunks/{GraphTrackSettingsDialog-T5YKMIPH.js.map → GraphTrackSettingsDialog-7M3Q635V.js.map} +1 -1
- package/dist/chunks/{HighlightColorDialog-UGAQFACU.js → HighlightColorDialog-4F34Q4PY.js} +2 -2
- package/dist/chunks/LinearGraphDisplay-BAEMS5WG.js +2 -0
- package/dist/chunks/LinearGraphDisplay-BAEMS5WG.js.map +7 -0
- package/dist/chunks/{MinigraphBubbleAdapter-D57ZFMKV.js → MinigraphBubbleAdapter-G25V6MZL.js} +2 -2
- package/dist/chunks/{RgfaTabixAdapter-HN2NLJJW.js → RgfaTabixAdapter-JPTUWO2Z.js} +2 -2
- package/dist/chunks/{WalkFormsAdapter-ESCQSNEJ.js → WalkFormsAdapter-PBN7BJZW.js} +2 -2
- package/dist/chunks/{WalkTabixSyntenyAdapter-62PJZBRP.js → WalkTabixSyntenyAdapter-27WDE5JF.js} +2 -2
- package/dist/chunks/{chunk-SVLBMU6I.js → chunk-2PNGGCQJ.js} +2 -2
- package/dist/chunks/{chunk-SVLBMU6I.js.map → chunk-2PNGGCQJ.js.map} +1 -1
- package/dist/chunks/{chunk-2VKDQF54.js → chunk-2V75YPTT.js} +2 -2
- package/dist/chunks/{chunk-2VKDQF54.js.map → chunk-2V75YPTT.js.map} +3 -3
- package/dist/chunks/chunk-3EQNVA3F.js +4 -0
- package/dist/chunks/{chunk-H53NTUCD.js.map → chunk-3EQNVA3F.js.map} +4 -4
- package/dist/chunks/{chunk-ON465L7Z.js → chunk-5RHNR3TH.js} +1 -1
- package/dist/chunks/{chunk-ON465L7Z.js.map → chunk-5RHNR3TH.js.map} +1 -1
- package/dist/chunks/{chunk-LR45N54F.js → chunk-CBKSPAUI.js} +2 -2
- package/dist/chunks/{chunk-VCYF5E2N.js → chunk-CJAV55QB.js} +1 -1
- package/dist/chunks/{chunk-VCYF5E2N.js.map → chunk-CJAV55QB.js.map} +1 -1
- package/dist/chunks/{chunk-DKUKQR3S.js → chunk-DG3E6BSX.js} +2 -2
- package/dist/chunks/{chunk-ZKCMVSD4.js → chunk-FY7X6253.js} +2 -2
- package/dist/chunks/{chunk-ZKCMVSD4.js.map → chunk-FY7X6253.js.map} +1 -1
- package/dist/chunks/chunk-HLAQQI6G.js +2 -0
- package/dist/chunks/chunk-HLAQQI6G.js.map +7 -0
- package/dist/chunks/{chunk-NE3OW4WX.js → chunk-I6F25EXY.js} +2 -2
- package/dist/chunks/{chunk-QGLMVXGX.js → chunk-IAXUZMOX.js} +2 -2
- package/dist/chunks/{chunk-QGLMVXGX.js.map → chunk-IAXUZMOX.js.map} +1 -1
- package/dist/chunks/{chunk-56YYNIV3.js → chunk-JMRW3IGK.js} +2 -2
- package/dist/chunks/{chunk-56YYNIV3.js.map → chunk-JMRW3IGK.js.map} +1 -1
- package/dist/chunks/chunk-JOYKGTDE.js +4 -0
- package/dist/chunks/chunk-JOYKGTDE.js.map +7 -0
- package/dist/chunks/chunk-NIEZKWQV.js +2 -0
- package/dist/chunks/{chunk-YU7T5WOQ.js.map → chunk-NIEZKWQV.js.map} +2 -2
- package/dist/chunks/chunk-NLS74JSZ.js +2 -0
- package/dist/chunks/{chunk-26SCNTI3.js.map → chunk-NLS74JSZ.js.map} +1 -1
- package/dist/chunks/{chunk-A4YQH3PN.js → chunk-O5FDMVL3.js} +2 -2
- package/dist/chunks/chunk-Q7QC2EQU.js +2 -0
- package/dist/chunks/chunk-RHYBJCA4.js +2 -0
- package/dist/chunks/chunk-RHYBJCA4.js.map +7 -0
- package/dist/chunks/chunk-X7YIGIYW.js +2 -0
- package/dist/chunks/{chunk-YXN7J6LG.js.map → chunk-X7YIGIYW.js.map} +4 -4
- package/dist/chunks/chunk-XB5KC2EZ.js +2 -0
- package/dist/chunks/{chunk-JSWEU5QG.js.map → chunk-XB5KC2EZ.js.map} +2 -2
- package/dist/chunks/chunk-XWCLYB5C.js +2 -0
- package/dist/chunks/{chunk-KQ6JJDJC.js.map → chunk-XWCLYB5C.js.map} +4 -4
- package/dist/chunks/{chunk-SD7WGQ6Y.js → chunk-ZGTG74GE.js} +3 -3
- package/dist/chunks/{chunk-SD7WGQ6Y.js.map → chunk-ZGTG74GE.js.map} +2 -2
- package/dist/chunks/renderSvg-YNA5VK6A.js +2 -0
- package/dist/chunks/renderSvg-YNA5VK6A.js.map +7 -0
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js +4 -4
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js.map +4 -4
- package/package.json +2 -2
- package/src/GraphGenomeView/components/GraphCanvas.test.tsx +1 -1
- package/src/GraphGenomeView/components/GraphCanvas.tsx +66 -18
- package/src/GraphGenomeView/components/Legend.tsx +81 -34
- package/src/GraphGenomeView/components/LegendSwatch.tsx +13 -30
- package/src/GraphGenomeView/components/PaneSvg.tsx +79 -22
- package/src/GraphGenomeView/components/SettingsMenu.tsx +1 -1
- package/src/GraphGenomeView/components/legendStyles.ts +13 -1
- package/src/GraphGenomeView/legendSections.test.ts +131 -2
- package/src/GraphGenomeView/legendSections.ts +220 -42
- package/src/GraphGenomeView/model.test.ts +7 -8
- package/src/GraphGenomeView/pane/fitViews.ts +6 -57
- package/src/GraphGenomeView/pane/graphViews.ts +23 -1
- package/src/GraphGenomeView/pane/launchActions.ts +1 -1
- package/src/LinearGraphDisplay/LinearGraphDisplay.test.ts +19 -1
- package/src/LinearGraphDisplay/components/LinearGraphDisplay.tsx +6 -6
- package/src/LinearGraphDisplay/model.ts +9 -10
- package/src/RgfaTabixAdapter/walkFiles.test.ts +36 -0
- package/src/RgfaTabixAdapter/walkReader.ts +22 -7
- package/src/version.ts +1 -1
- package/dist/chunks/LinearGraphDisplay-YTSXFZED.js +0 -2
- package/dist/chunks/LinearGraphDisplay-YTSXFZED.js.map +0 -7
- package/dist/chunks/chunk-26SCNTI3.js +0 -2
- package/dist/chunks/chunk-AZ3YVI3P.js +0 -2
- package/dist/chunks/chunk-H53NTUCD.js +0 -4
- package/dist/chunks/chunk-JSWEU5QG.js +0 -2
- package/dist/chunks/chunk-JYTZO52E.js +0 -2
- package/dist/chunks/chunk-JYTZO52E.js.map +0 -7
- package/dist/chunks/chunk-KQ6JJDJC.js +0 -2
- package/dist/chunks/chunk-KUT6FNKO.js +0 -4
- package/dist/chunks/chunk-KUT6FNKO.js.map +0 -7
- package/dist/chunks/chunk-LJAPKX5Y.js +0 -2
- package/dist/chunks/chunk-LJAPKX5Y.js.map +0 -7
- package/dist/chunks/chunk-YU7T5WOQ.js +0 -2
- package/dist/chunks/chunk-YXN7J6LG.js +0 -2
- package/dist/chunks/renderSvg-3KAQCRFY.js +0 -2
- package/dist/chunks/renderSvg-3KAQCRFY.js.map +0 -7
- package/src/LinearGraphDisplay/components/GraphStatusChrome.test.tsx +0 -182
- package/src/LinearGraphDisplay/components/GraphStatusChrome.tsx +0 -158
- /package/dist/chunks/{AddTrackWorkflow-KT6Z6PSW.js.map → AddTrackWorkflow-RJSOQZYQ.js.map} +0 -0
- /package/dist/chunks/{ChooseSamplesDialog-YUH6SVEZ.js.map → ChooseSamplesDialog-LO7FKFSS.js.map} +0 -0
- /package/dist/chunks/{ChooseWalksDialog-2QJKRASB.js.map → ChooseWalksDialog-JJSOVCEU.js.map} +0 -0
- /package/dist/chunks/{GraphGenomeView-5LYF6LMA.js.map → GraphGenomeView-667ZUNDI.js.map} +0 -0
- /package/dist/chunks/{HighlightColorDialog-UGAQFACU.js.map → HighlightColorDialog-4F34Q4PY.js.map} +0 -0
- /package/dist/chunks/{MinigraphBubbleAdapter-D57ZFMKV.js.map → MinigraphBubbleAdapter-G25V6MZL.js.map} +0 -0
- /package/dist/chunks/{RgfaTabixAdapter-HN2NLJJW.js.map → RgfaTabixAdapter-JPTUWO2Z.js.map} +0 -0
- /package/dist/chunks/{WalkFormsAdapter-ESCQSNEJ.js.map → WalkFormsAdapter-PBN7BJZW.js.map} +0 -0
- /package/dist/chunks/{WalkTabixSyntenyAdapter-62PJZBRP.js.map → WalkTabixSyntenyAdapter-27WDE5JF.js.map} +0 -0
- /package/dist/chunks/{chunk-LR45N54F.js.map → chunk-CBKSPAUI.js.map} +0 -0
- /package/dist/chunks/{chunk-DKUKQR3S.js.map → chunk-DG3E6BSX.js.map} +0 -0
- /package/dist/chunks/{chunk-NE3OW4WX.js.map → chunk-I6F25EXY.js.map} +0 -0
- /package/dist/chunks/{chunk-A4YQH3PN.js.map → chunk-O5FDMVL3.js.map} +0 -0
- /package/dist/chunks/{chunk-AZ3YVI3P.js.map → chunk-Q7QC2EQU.js.map} +0 -0
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { DisplayChromeOverlayProvider } from '@jbrowse/display-ui'
|
|
2
|
-
import { fireEvent, render, screen } from '@testing-library/react'
|
|
3
|
-
|
|
4
|
-
import GraphStatusChrome from './GraphStatusChrome'
|
|
5
|
-
|
|
6
|
-
import type { LinearGraphDisplayModel } from '../model'
|
|
7
|
-
|
|
8
|
-
function model(over: Record<string, unknown> = {}) {
|
|
9
|
-
return {
|
|
10
|
-
configuration: { displayId: 'graph-LinearGraphDisplay' },
|
|
11
|
-
height: 300,
|
|
12
|
-
error: undefined,
|
|
13
|
-
regionTooLargeReason: '',
|
|
14
|
-
zoomCanReleaseGate: true,
|
|
15
|
-
statusMessage: undefined,
|
|
16
|
-
statusProgress: undefined,
|
|
17
|
-
fetchCanceled: false,
|
|
18
|
-
reload: vi.fn(),
|
|
19
|
-
...over,
|
|
20
|
-
} as unknown as LinearGraphDisplayModel
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
test('a drawn graph sits in the chrome with its readiness attributes', () => {
|
|
24
|
-
render(
|
|
25
|
-
<GraphStatusChrome
|
|
26
|
-
model={model()}
|
|
27
|
-
phase="ready"
|
|
28
|
-
drawn
|
|
29
|
-
testid="linear-graph-display"
|
|
30
|
-
data-layout="auto"
|
|
31
|
-
>
|
|
32
|
-
<canvas data-testid="graph-canvas" />
|
|
33
|
-
</GraphStatusChrome>,
|
|
34
|
-
)
|
|
35
|
-
const chrome = screen.getByTestId('linear-graph-display')
|
|
36
|
-
expect(chrome.dataset.displayPhase).toBe('ready')
|
|
37
|
-
expect(chrome.dataset.displayDrawn).toBe('true')
|
|
38
|
-
expect(chrome.dataset.layout).toBe('auto')
|
|
39
|
-
expect(screen.getByTestId('graph-canvas')).toBeTruthy()
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
// GraphCanvas shows it, with the retry that rebuilds the backend
|
|
43
|
-
test('a render error alone is left to the canvas', () => {
|
|
44
|
-
render(
|
|
45
|
-
<GraphStatusChrome
|
|
46
|
-
model={model({ renderError: new Error('context lost') })}
|
|
47
|
-
phase="error"
|
|
48
|
-
drawn={false}
|
|
49
|
-
testid="linear-graph-display"
|
|
50
|
-
>
|
|
51
|
-
<canvas />
|
|
52
|
-
</GraphStatusChrome>,
|
|
53
|
-
)
|
|
54
|
-
expect(screen.queryByText(/context lost/)).toBeNull()
|
|
55
|
-
expect(screen.getByTestId('linear-graph-display').dataset.displayPhase).toBe(
|
|
56
|
-
'error',
|
|
57
|
-
)
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
test('a refused cut shows its notice over the graph', () => {
|
|
61
|
-
const error = Object.assign(
|
|
62
|
-
new Error('Zoom in to about 54Kbp to see the graph'),
|
|
63
|
-
{ name: 'NodeLimitError', regionTooLarge: true },
|
|
64
|
-
)
|
|
65
|
-
render(
|
|
66
|
-
<GraphStatusChrome
|
|
67
|
-
model={model({ error })}
|
|
68
|
-
phase="error"
|
|
69
|
-
drawn={false}
|
|
70
|
-
testid="linear-graph-display"
|
|
71
|
-
>
|
|
72
|
-
<canvas />
|
|
73
|
-
</GraphStatusChrome>,
|
|
74
|
-
)
|
|
75
|
-
expect(
|
|
76
|
-
screen.getByText(/Zoom in to about 54Kbp to see the graph/),
|
|
77
|
-
).toBeTruthy()
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
test('a window past the bp cap replaces the graph with the zoom-in notice', () => {
|
|
81
|
-
render(
|
|
82
|
-
<GraphStatusChrome
|
|
83
|
-
model={model({
|
|
84
|
-
regionTooLargeReason:
|
|
85
|
-
'Region too large for a graph cut (6 Mb, max 5 Mb)',
|
|
86
|
-
})}
|
|
87
|
-
phase="tooLarge"
|
|
88
|
-
drawn={false}
|
|
89
|
-
testid="linear-graph-display"
|
|
90
|
-
data-layout="auto"
|
|
91
|
-
>
|
|
92
|
-
<canvas data-testid="graph-canvas" />
|
|
93
|
-
</GraphStatusChrome>,
|
|
94
|
-
)
|
|
95
|
-
const chrome = screen.getByTestId('linear-graph-display')
|
|
96
|
-
expect(chrome.dataset.displayPhase).toBe('tooLarge')
|
|
97
|
-
expect(chrome.dataset.displayDrawn).toBe('false')
|
|
98
|
-
expect(chrome.dataset.layout).toBe('auto')
|
|
99
|
-
expect(screen.queryByTestId('graph-canvas')).toBeNull()
|
|
100
|
-
expect(screen.getByText(/Region too large for a graph cut/)).toBeTruthy()
|
|
101
|
-
expect(screen.getByText('Force load')).toBeTruthy()
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
// What a host after jbrowse-components 3a5393f5a6 provides: overlays that read
|
|
105
|
-
// plain values and callbacks, and print whatever `error` they are handed.
|
|
106
|
-
const plainOverlays = {
|
|
107
|
-
ErrorBar: ({ error, onRetry }: { error: unknown; onRetry?: () => void }) => (
|
|
108
|
-
<button onClick={onRetry} disabled={!onRetry}>
|
|
109
|
-
{`error: ${String(error)}`}
|
|
110
|
-
</button>
|
|
111
|
-
),
|
|
112
|
-
TooLarge: ({
|
|
113
|
-
message,
|
|
114
|
-
onForceLoad,
|
|
115
|
-
}: {
|
|
116
|
-
message: string
|
|
117
|
-
onForceLoad: () => void
|
|
118
|
-
}) => <button onClick={onForceLoad}>{message}</button>,
|
|
119
|
-
Loading: () => null,
|
|
120
|
-
BackgroundProgress: ({ message }: { message: string }) => <i>{message}</i>,
|
|
121
|
-
RenderError: () => null,
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function renderWithPlainOverlays(
|
|
125
|
-
m: LinearGraphDisplayModel,
|
|
126
|
-
phase: 'ready' | 'error' | 'tooLarge',
|
|
127
|
-
) {
|
|
128
|
-
render(
|
|
129
|
-
<DisplayChromeOverlayProvider value={plainOverlays as never}>
|
|
130
|
-
<GraphStatusChrome
|
|
131
|
-
model={m}
|
|
132
|
-
phase={phase}
|
|
133
|
-
drawn={phase === 'ready'}
|
|
134
|
-
testid="linear-graph-display"
|
|
135
|
-
>
|
|
136
|
-
<canvas />
|
|
137
|
-
</GraphStatusChrome>
|
|
138
|
-
</DisplayChromeOverlayProvider>,
|
|
139
|
-
)
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
test('a plain-props host sees no error bar while the graph is fine', () => {
|
|
143
|
-
renderWithPlainOverlays(model(), 'ready')
|
|
144
|
-
expect(screen.queryByText(/error:/)).toBeNull()
|
|
145
|
-
})
|
|
146
|
-
|
|
147
|
-
test('a plain-props host gets the error and a retry that reloads', () => {
|
|
148
|
-
const m = model({ error: new Error('walk fetch failed') })
|
|
149
|
-
renderWithPlainOverlays(m, 'error')
|
|
150
|
-
fireEvent.click(screen.getByText('error: Error: walk fetch failed'))
|
|
151
|
-
expect(m.reload).toHaveBeenCalledOnce()
|
|
152
|
-
})
|
|
153
|
-
|
|
154
|
-
test('a plain-props host gets no retry for a refused cut', () => {
|
|
155
|
-
const error = Object.assign(new Error('Zoom in to see the graph'), {
|
|
156
|
-
regionTooLarge: true,
|
|
157
|
-
})
|
|
158
|
-
renderWithPlainOverlays(model({ error }), 'error')
|
|
159
|
-
expect(
|
|
160
|
-
screen.getByText('error: Error: Zoom in to see the graph'),
|
|
161
|
-
).toHaveProperty('disabled', true)
|
|
162
|
-
})
|
|
163
|
-
|
|
164
|
-
test('a plain-props host gets the zoom-in notice text and a force load', () => {
|
|
165
|
-
const forceLoad = vi.fn()
|
|
166
|
-
renderWithPlainOverlays(
|
|
167
|
-
model({
|
|
168
|
-
regionTooLargeReason: 'Region too large for a graph cut (6 Mb, max 5 Mb)',
|
|
169
|
-
forceLoad,
|
|
170
|
-
}),
|
|
171
|
-
'tooLarge',
|
|
172
|
-
)
|
|
173
|
-
fireEvent.click(
|
|
174
|
-
screen.getByText(/^Region too large for a graph cut.*Zoom in/),
|
|
175
|
-
)
|
|
176
|
-
expect(forceLoad).toHaveBeenCalledOnce()
|
|
177
|
-
})
|
|
178
|
-
|
|
179
|
-
test('a plain-props host sees the background chip only with a status message', () => {
|
|
180
|
-
renderWithPlainOverlays(model({ statusMessage: 'Laying out' }), 'ready')
|
|
181
|
-
expect(screen.getByText('Laying out')).toBeTruthy()
|
|
182
|
-
})
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react'
|
|
2
|
-
import type { CSSProperties, ReactNode } from 'react'
|
|
3
|
-
|
|
4
|
-
import DisplayBackgroundProgress from '@jbrowse/display-kit/DisplayBackgroundProgress'
|
|
5
|
-
import DisplayErrorBar from '@jbrowse/display-kit/DisplayErrorBar'
|
|
6
|
-
import DisplayLoadingOverlay from '@jbrowse/display-kit/DisplayLoadingOverlay'
|
|
7
|
-
import TooLargeMessage from '@jbrowse/display-kit/TooLargeMessage'
|
|
8
|
-
import {
|
|
9
|
-
BottomRightCornerContext,
|
|
10
|
-
TrackOverlayPortal,
|
|
11
|
-
useChromeOverlayOverride,
|
|
12
|
-
} from '@jbrowse/display-ui'
|
|
13
|
-
import { observer } from 'mobx-react'
|
|
14
|
-
|
|
15
|
-
import type { LinearGraphDisplayModel } from '../model'
|
|
16
|
-
import type { DisplayStatusPhase } from '@jbrowse/render-core/displayPhase'
|
|
17
|
-
|
|
18
|
-
const muiOverlays = {
|
|
19
|
-
TooLarge: TooLargeMessage,
|
|
20
|
-
ErrorBar: DisplayErrorBar,
|
|
21
|
-
Loading: DisplayLoadingOverlay,
|
|
22
|
-
BackgroundProgress: DisplayBackgroundProgress,
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const ZOOM_IN_ADVICE =
|
|
26
|
-
'Zoom in to see features, or force load this track for the rest of the session (may be slow)'
|
|
27
|
-
const FORCE_LOAD_ADVICE =
|
|
28
|
-
'Force load this track for the rest of the session (may be slow)'
|
|
29
|
-
|
|
30
|
-
function overlayProps(model: LinearGraphDisplayModel) {
|
|
31
|
-
const { error } = model
|
|
32
|
-
const regionTooLarge =
|
|
33
|
-
error instanceof Error &&
|
|
34
|
-
(error as { regionTooLarge?: unknown }).regionTooLarge === true
|
|
35
|
-
return {
|
|
36
|
-
error: {
|
|
37
|
-
error,
|
|
38
|
-
onRetry: regionTooLarge
|
|
39
|
-
? undefined
|
|
40
|
-
: () => {
|
|
41
|
-
model.reload()
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
tooLarge: {
|
|
45
|
-
message: [
|
|
46
|
-
model.regionTooLargeReason,
|
|
47
|
-
model.zoomCanReleaseGate ? ZOOM_IN_ADVICE : FORCE_LOAD_ADVICE,
|
|
48
|
-
]
|
|
49
|
-
.filter(Boolean)
|
|
50
|
-
.join('. '),
|
|
51
|
-
onForceLoad: () => {
|
|
52
|
-
model.forceLoad()
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
loading: {
|
|
56
|
-
message: model.statusMessage,
|
|
57
|
-
progress: model.statusProgress,
|
|
58
|
-
canceled: model.fetchCanceled,
|
|
59
|
-
onCancel: () => {
|
|
60
|
-
model.cancelFetchByUser()
|
|
61
|
-
},
|
|
62
|
-
onRetry: () => {
|
|
63
|
-
model.reload()
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
background: {
|
|
67
|
-
message: model.statusMessage,
|
|
68
|
-
progress: model.statusProgress,
|
|
69
|
-
},
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* The status chrome of a display that owns its canvas: the zoom-in notice in
|
|
75
|
-
* place of the display, and the error bar, loading overlay and progress chip
|
|
76
|
-
* over it in the track's overlay layer. Core's `DisplayStatusChrome` drew this
|
|
77
|
-
* until jbrowse-web main removed it on 2026-10-08 (d8db736896), and its named
|
|
78
|
-
* import came back undefined there, failing the track with React error #130.
|
|
79
|
-
* Built here from the overlays every host from 5.0.0-beta.18 serves.
|
|
80
|
-
*/
|
|
81
|
-
export default observer(function GraphStatusChrome({
|
|
82
|
-
model,
|
|
83
|
-
phase,
|
|
84
|
-
drawn,
|
|
85
|
-
testid,
|
|
86
|
-
style,
|
|
87
|
-
children,
|
|
88
|
-
...dataProps
|
|
89
|
-
}: {
|
|
90
|
-
model: LinearGraphDisplayModel
|
|
91
|
-
phase: DisplayStatusPhase
|
|
92
|
-
drawn: boolean
|
|
93
|
-
testid: string
|
|
94
|
-
style?: CSSProperties
|
|
95
|
-
children: ReactNode
|
|
96
|
-
} & Record<`data-${string}`, unknown>) {
|
|
97
|
-
const { TooLarge, ErrorBar, Loading, BackgroundProgress } =
|
|
98
|
-
useChromeOverlayOverride() ?? muiOverlays
|
|
99
|
-
const [corner, setCorner] = useState<HTMLDivElement | null>(null)
|
|
100
|
-
const props = overlayProps(model)
|
|
101
|
-
const attributes = {
|
|
102
|
-
...dataProps,
|
|
103
|
-
'data-testid': testid,
|
|
104
|
-
'data-display-id': model.configuration.displayId,
|
|
105
|
-
'data-display-drawn': drawn,
|
|
106
|
-
'data-display-phase': phase,
|
|
107
|
-
}
|
|
108
|
-
if (phase === 'tooLarge') {
|
|
109
|
-
return (
|
|
110
|
-
<div style={{ display: 'contents' }} {...attributes}>
|
|
111
|
-
<TrackOverlayPortal>
|
|
112
|
-
<div style={{ pointerEvents: 'auto' }}>
|
|
113
|
-
<TooLarge {...props.tooLarge} />
|
|
114
|
-
</div>
|
|
115
|
-
</TrackOverlayPortal>
|
|
116
|
-
</div>
|
|
117
|
-
)
|
|
118
|
-
}
|
|
119
|
-
return (
|
|
120
|
-
<div
|
|
121
|
-
style={{ position: 'relative', height: model.height, ...style }}
|
|
122
|
-
{...attributes}
|
|
123
|
-
>
|
|
124
|
-
<BottomRightCornerContext value={corner}>
|
|
125
|
-
{children}
|
|
126
|
-
</BottomRightCornerContext>
|
|
127
|
-
<TrackOverlayPortal>
|
|
128
|
-
{/* a backend's render error is the canvas's banner, whose retry
|
|
129
|
-
rebuilds the backend */}
|
|
130
|
-
{phase === 'error' && model.error !== undefined ? (
|
|
131
|
-
<ErrorBar {...props.error} />
|
|
132
|
-
) : null}
|
|
133
|
-
<Loading
|
|
134
|
-
{...props.loading}
|
|
135
|
-
visible={phase === 'loading' || phase === 'canceled'}
|
|
136
|
-
immediate={!drawn}
|
|
137
|
-
/>
|
|
138
|
-
<div
|
|
139
|
-
ref={setCorner}
|
|
140
|
-
style={{
|
|
141
|
-
position: 'absolute',
|
|
142
|
-
bottom: 2,
|
|
143
|
-
right: 2,
|
|
144
|
-
display: 'flex',
|
|
145
|
-
flexDirection: 'column',
|
|
146
|
-
alignItems: 'flex-end',
|
|
147
|
-
gap: 4,
|
|
148
|
-
pointerEvents: 'none',
|
|
149
|
-
}}
|
|
150
|
-
>
|
|
151
|
-
{phase === 'ready' && model.statusMessage ? (
|
|
152
|
-
<BackgroundProgress {...props.background} />
|
|
153
|
-
) : null}
|
|
154
|
-
</div>
|
|
155
|
-
</TrackOverlayPortal>
|
|
156
|
-
</div>
|
|
157
|
-
)
|
|
158
|
-
})
|
|
File without changes
|
/package/dist/chunks/{ChooseSamplesDialog-YUH6SVEZ.js.map → ChooseSamplesDialog-LO7FKFSS.js.map}
RENAMED
|
File without changes
|
/package/dist/chunks/{ChooseWalksDialog-2QJKRASB.js.map → ChooseWalksDialog-JJSOVCEU.js.map}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/chunks/{HighlightColorDialog-UGAQFACU.js.map → HighlightColorDialog-4F34Q4PY.js.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|