react-msaview 8.3.0 → 8.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/bundle/index.js +499 -295
  2. package/bundle/index.js.map +4 -4
  3. package/dist/blockFasta.d.ts +6 -0
  4. package/dist/blockFasta.js +12 -0
  5. package/dist/blockFasta.js.map +1 -0
  6. package/dist/colorSchemes.d.ts +7 -0
  7. package/dist/colorSchemes.js +15 -0
  8. package/dist/colorSchemes.js.map +1 -1
  9. package/dist/components/MSAView.js +15 -9
  10. package/dist/components/MSAView.js.map +1 -1
  11. package/dist/components/MSAViewer.d.ts +28 -7
  12. package/dist/components/MSAViewer.js +61 -22
  13. package/dist/components/MSAViewer.js.map +1 -1
  14. package/dist/components/MetadataTable.d.ts +5 -0
  15. package/dist/components/MetadataTable.js +29 -0
  16. package/dist/components/MetadataTable.js.map +1 -0
  17. package/dist/components/Track.js +11 -2
  18. package/dist/components/Track.js.map +1 -1
  19. package/dist/components/dialogs/MetadataDialog.js +5 -6
  20. package/dist/components/dialogs/MetadataDialog.js.map +1 -1
  21. package/dist/components/header/ColorSchemeMenu.d.ts +6 -0
  22. package/dist/components/header/ColorSchemeMenu.js +23 -5
  23. package/dist/components/header/ColorSchemeMenu.js.map +1 -1
  24. package/dist/components/header/GoToBox.d.ts +338 -0
  25. package/dist/components/header/GoToBox.js +31 -0
  26. package/dist/components/header/GoToBox.js.map +1 -0
  27. package/dist/components/header/Header.js +4 -2
  28. package/dist/components/header/Header.js.map +1 -1
  29. package/dist/components/header/SelectionMenu.d.ts +12 -0
  30. package/dist/components/header/SelectionMenu.js +72 -0
  31. package/dist/components/header/SelectionMenu.js.map +1 -0
  32. package/dist/components/header/goTo.d.ts +20 -0
  33. package/dist/components/header/goTo.js +69 -0
  34. package/dist/components/header/goTo.js.map +1 -0
  35. package/dist/components/msa/MSACanvas.js +13 -2
  36. package/dist/components/msa/MSACanvas.js.map +1 -1
  37. package/dist/components/msa/MSACanvasBlock.js +5 -1
  38. package/dist/components/msa/MSACanvasBlock.js.map +1 -1
  39. package/dist/components/msa/msaKeys.js +6 -0
  40. package/dist/components/msa/msaKeys.js.map +1 -1
  41. package/dist/components/msa/msaRaster.js +1 -0
  42. package/dist/components/msa/msaRaster.js.map +1 -1
  43. package/dist/components/msa/renderHighlights.d.ts +14 -3
  44. package/dist/components/msa/renderHighlights.js +29 -4
  45. package/dist/components/msa/renderHighlights.js.map +1 -1
  46. package/dist/components/msa/tileColor.js +9 -8
  47. package/dist/components/msa/tileColor.js.map +1 -1
  48. package/dist/components/msa/useMsaBlockMouse.d.ts +1 -1
  49. package/dist/components/msa/useMsaBlockMouse.js +18 -11
  50. package/dist/components/msa/useMsaBlockMouse.js.map +1 -1
  51. package/dist/components/overlayColors.d.ts +2 -0
  52. package/dist/components/overlayColors.js +3 -0
  53. package/dist/components/overlayColors.js.map +1 -1
  54. package/dist/components/selectionDrag.d.ts +17 -0
  55. package/dist/components/selectionDrag.js +30 -0
  56. package/dist/components/selectionDrag.js.map +1 -0
  57. package/dist/components/tracks/useTrackHover.d.ts +3 -1
  58. package/dist/components/tracks/useTrackHover.js +26 -6
  59. package/dist/components/tracks/useTrackHover.js.map +1 -1
  60. package/dist/components/tree/dialogs/TreeNodeInfoDialog.js +9 -8
  61. package/dist/components/tree/dialogs/TreeNodeInfoDialog.js.map +1 -1
  62. package/dist/constants.d.ts +1 -1
  63. package/dist/constants.js +6 -6
  64. package/dist/constants.js.map +1 -1
  65. package/dist/element.d.ts +7 -3
  66. package/dist/element.js +32 -4
  67. package/dist/element.js.map +1 -1
  68. package/dist/featuresLayer.d.ts +8 -0
  69. package/dist/featuresLayer.js +42 -0
  70. package/dist/featuresLayer.js.map +1 -0
  71. package/dist/index.d.ts +1 -1
  72. package/dist/model/DataModel.d.ts +1 -1
  73. package/dist/model/DataModel.js +3 -3
  74. package/dist/model/DataModel.js.map +1 -1
  75. package/dist/model/msaModel.d.ts +14 -1
  76. package/dist/model/msaModel.js +17 -1
  77. package/dist/model/msaModel.js.map +1 -1
  78. package/dist/model.d.ts +242 -187
  79. package/dist/model.js +264 -45
  80. package/dist/model.js.map +1 -1
  81. package/dist/svgTestUtil.d.ts +284 -336
  82. package/dist/types.d.ts +50 -0
  83. package/dist/version.d.ts +1 -1
  84. package/dist/version.js +1 -1
  85. package/package.json +6 -6
  86. package/src/blockFasta.ts +18 -0
  87. package/src/colorSchemes.ts +20 -0
  88. package/src/components/MSAView.tsx +16 -9
  89. package/src/components/MSAViewer.tsx +95 -26
  90. package/src/components/MetadataTable.tsx +55 -0
  91. package/src/components/Track.tsx +14 -1
  92. package/src/components/dialogs/MetadataDialog.tsx +9 -8
  93. package/src/components/header/ColorSchemeMenu.tsx +31 -12
  94. package/src/components/header/GoToBox.tsx +64 -0
  95. package/src/components/header/Header.tsx +6 -2
  96. package/src/components/header/SelectionMenu.tsx +117 -0
  97. package/src/components/header/goTo.ts +75 -0
  98. package/src/components/msa/MSACanvas.tsx +12 -2
  99. package/src/components/msa/MSACanvasBlock.tsx +5 -1
  100. package/src/components/msa/msaKeys.ts +6 -0
  101. package/src/components/msa/msaRaster.ts +1 -0
  102. package/src/components/msa/renderHighlights.ts +46 -4
  103. package/src/components/msa/tileColor.ts +9 -8
  104. package/src/components/msa/useMsaBlockMouse.ts +24 -27
  105. package/src/components/overlayColors.ts +4 -0
  106. package/src/components/selectionDrag.ts +42 -0
  107. package/src/components/tracks/useTrackHover.ts +28 -6
  108. package/src/components/tree/dialogs/TreeNodeInfoDialog.tsx +14 -16
  109. package/src/constants.ts +6 -6
  110. package/src/element.ts +45 -5
  111. package/src/featuresLayer.ts +48 -0
  112. package/src/index.ts +5 -0
  113. package/src/model/DataModel.ts +3 -3
  114. package/src/model/msaModel.ts +19 -1
  115. package/src/model.ts +313 -55
  116. package/src/types.ts +58 -0
  117. package/src/version.ts +1 -1
  118. package/dist/components/header/RowSearch.d.ts +0 -6
  119. package/dist/components/header/RowSearch.js +0 -15
  120. package/dist/components/header/RowSearch.js.map +0 -1
  121. package/dist/components/header/revealRow.d.ts +0 -3
  122. package/dist/components/header/revealRow.js +0 -15
  123. package/dist/components/header/revealRow.js.map +0 -1
  124. package/src/components/header/RowSearch.tsx +0 -34
  125. package/src/components/header/revealRow.ts +0 -17
@@ -3,16 +3,34 @@ import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
3
3
  import Palette from '@mui/icons-material/Palette';
4
4
  import { observer } from 'mobx-react';
5
5
  import colorSchemes from '../../colorSchemes.js';
6
- const ColorSchemeMenu = observer(function ({ model }) {
7
- const { colorSchemeName } = model;
8
- return (React.createElement(CascadingMenuButton, { "data-testid": "color_scheme_menu", tooltip: "Color scheme", closeAfterItemClick: true, anchorOrigin: { vertical: 'bottom', horizontal: 'left' }, transformOrigin: { vertical: 'top', horizontal: 'left' }, menuItems: Object.keys(colorSchemes).map(option => ({
6
+ // While a `customColorScheme` map is set, a checked Custom entry stands for it
7
+ // and no named scheme is checked. Picking a named scheme clears the map.
8
+ export function colorSchemeMenuItems(model) {
9
+ const { colorSchemeName, customColorScheme } = model;
10
+ const custom = customColorScheme
11
+ ? [
12
+ {
13
+ label: 'Custom',
14
+ type: 'radio',
15
+ checked: true,
16
+ onClick: () => { },
17
+ },
18
+ ]
19
+ : [];
20
+ return [
21
+ ...custom,
22
+ ...Object.keys(colorSchemes).map(option => ({
9
23
  label: option,
10
24
  type: 'radio',
11
- checked: colorSchemeName === option,
25
+ checked: !customColorScheme && colorSchemeName === option,
12
26
  onClick: () => {
13
27
  model.setColorSchemeName(option);
14
28
  },
15
- })) },
29
+ })),
30
+ ];
31
+ }
32
+ const ColorSchemeMenu = observer(function ({ model }) {
33
+ return (React.createElement(CascadingMenuButton, { "data-testid": "color_scheme_menu", tooltip: "Color scheme", closeAfterItemClick: true, anchorOrigin: { vertical: 'bottom', horizontal: 'left' }, transformOrigin: { vertical: 'top', horizontal: 'left' }, menuItems: colorSchemeMenuItems(model) },
16
34
  React.createElement(Palette, null)));
17
35
  });
18
36
  export default ColorSchemeMenu;
@@ -1 +1 @@
1
- {"version":3,"file":"ColorSchemeMenu.js","sourceRoot":"","sources":["../../../src/components/header/ColorSchemeMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,mBAAmB,MAAM,sCAAsC,CAAA;AACtE,OAAO,OAAO,MAAM,6BAA6B,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,YAAY,MAAM,uBAAuB,CAAA;AAIhD,MAAM,eAAe,GAAG,QAAQ,CAAC,UAAU,EAAE,KAAK,EAA2B;IAC3E,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,CAAA;IACjC,OAAO,CACL,oBAAC,mBAAmB,mBACN,mBAAmB,EAC/B,OAAO,EAAC,cAAc,EACtB,mBAAmB,QACnB,YAAY,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,EACxD,eAAe,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,EACxD,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,GAAG,CACtC,MAAM,CAAC,EAAE,CACP,CAAC;YACC,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,eAAe,KAAK,MAAM;YACnC,OAAO,EAAE,GAAG,EAAE;gBACZ,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;YAClC,CAAC;SACF,CAAU,CACd;QAED,oBAAC,OAAO,OAAG,CACS,CACvB,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"ColorSchemeMenu.js","sourceRoot":"","sources":["../../../src/components/header/ColorSchemeMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,mBAAmB,MA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,CAAC,CAAC,CAAA;AAEF,eAAe,eAAe,CAAA"}
@@ -0,0 +1,338 @@
1
+ import React from 'react';
2
+ import type { MsaViewModel } from '../../model.ts';
3
+ import type { AutocompleteRenderInputParams } from '@mui/material';
4
+ export declare function labelledInput(params: AutocompleteRenderInputParams): {
5
+ slotProps: {
6
+ inputLabel: ReturnType<ReturnType<typeof import("@mui/material").useAutocomplete>['getInputLabelProps']>;
7
+ input: {
8
+ ref: React.Ref<any>;
9
+ className: string;
10
+ startAdornment: React.ReactNode;
11
+ endAdornment: React.ReactNode;
12
+ onMouseDown: React.MouseEventHandler;
13
+ };
14
+ htmlInput: {
15
+ children?: React.ReactNode | undefined;
16
+ dangerouslySetInnerHTML?: {
17
+ __html: string | TrustedHTML;
18
+ } | undefined;
19
+ onCopy?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
20
+ onCopyCapture?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
21
+ onCut?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
22
+ onCutCapture?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
23
+ onPaste?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
24
+ onPasteCapture?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
25
+ onCompositionEnd?: React.CompositionEventHandler<HTMLInputElement> | undefined;
26
+ onCompositionEndCapture?: React.CompositionEventHandler<HTMLInputElement> | undefined;
27
+ onCompositionStart?: React.CompositionEventHandler<HTMLInputElement> | undefined;
28
+ onCompositionStartCapture?: React.CompositionEventHandler<HTMLInputElement> | undefined;
29
+ onCompositionUpdate?: React.CompositionEventHandler<HTMLInputElement> | undefined;
30
+ onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLInputElement> | undefined;
31
+ onFocus?: React.FocusEventHandler<HTMLInputElement> | undefined;
32
+ onFocusCapture?: React.FocusEventHandler<HTMLInputElement> | undefined;
33
+ onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
34
+ onBlurCapture?: React.FocusEventHandler<HTMLInputElement> | undefined;
35
+ onChangeCapture?: React.ChangeEventHandler<HTMLInputElement, Element> | undefined;
36
+ onBeforeInput?: React.InputEventHandler<HTMLInputElement> | undefined;
37
+ onBeforeInputCapture?: React.InputEventHandler<HTMLInputElement> | undefined;
38
+ onInput?: React.InputEventHandler<HTMLInputElement> | undefined;
39
+ onInputCapture?: React.InputEventHandler<HTMLInputElement> | undefined;
40
+ onReset?: React.ReactEventHandler<HTMLInputElement> | undefined;
41
+ onResetCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
42
+ onSubmit?: React.SubmitEventHandler<HTMLInputElement> | undefined;
43
+ onSubmitCapture?: React.SubmitEventHandler<HTMLInputElement> | undefined;
44
+ onInvalid?: React.ReactEventHandler<HTMLInputElement> | undefined;
45
+ onInvalidCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
46
+ onLoad?: React.ReactEventHandler<HTMLInputElement> | undefined;
47
+ onLoadCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
48
+ onError?: React.ReactEventHandler<HTMLInputElement> | undefined;
49
+ onErrorCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
50
+ onKeyDown?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
51
+ onKeyDownCapture?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
52
+ onKeyPress?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
53
+ onKeyPressCapture?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
54
+ onKeyUp?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
55
+ onKeyUpCapture?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
56
+ onAbort?: React.ReactEventHandler<HTMLInputElement> | undefined;
57
+ onAbortCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
58
+ onCanPlay?: React.ReactEventHandler<HTMLInputElement> | undefined;
59
+ onCanPlayCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
60
+ onCanPlayThrough?: React.ReactEventHandler<HTMLInputElement> | undefined;
61
+ onCanPlayThroughCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
62
+ onDurationChange?: React.ReactEventHandler<HTMLInputElement> | undefined;
63
+ onDurationChangeCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
64
+ onEmptied?: React.ReactEventHandler<HTMLInputElement> | undefined;
65
+ onEmptiedCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
66
+ onEncrypted?: React.ReactEventHandler<HTMLInputElement> | undefined;
67
+ onEncryptedCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
68
+ onEnded?: React.ReactEventHandler<HTMLInputElement> | undefined;
69
+ onEndedCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
70
+ onLoadedData?: React.ReactEventHandler<HTMLInputElement> | undefined;
71
+ onLoadedDataCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
72
+ onLoadedMetadata?: React.ReactEventHandler<HTMLInputElement> | undefined;
73
+ onLoadedMetadataCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
74
+ onLoadStart?: React.ReactEventHandler<HTMLInputElement> | undefined;
75
+ onLoadStartCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
76
+ onPause?: React.ReactEventHandler<HTMLInputElement> | undefined;
77
+ onPauseCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
78
+ onPlay?: React.ReactEventHandler<HTMLInputElement> | undefined;
79
+ onPlayCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
80
+ onPlaying?: React.ReactEventHandler<HTMLInputElement> | undefined;
81
+ onPlayingCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
82
+ onProgress?: React.ReactEventHandler<HTMLInputElement> | undefined;
83
+ onProgressCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
84
+ onRateChange?: React.ReactEventHandler<HTMLInputElement> | undefined;
85
+ onRateChangeCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
86
+ onSeeked?: React.ReactEventHandler<HTMLInputElement> | undefined;
87
+ onSeekedCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
88
+ onSeeking?: React.ReactEventHandler<HTMLInputElement> | undefined;
89
+ onSeekingCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
90
+ onStalled?: React.ReactEventHandler<HTMLInputElement> | undefined;
91
+ onStalledCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
92
+ onSuspend?: React.ReactEventHandler<HTMLInputElement> | undefined;
93
+ onSuspendCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
94
+ onTimeUpdate?: React.ReactEventHandler<HTMLInputElement> | undefined;
95
+ onTimeUpdateCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
96
+ onVolumeChange?: React.ReactEventHandler<HTMLInputElement> | undefined;
97
+ onVolumeChangeCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
98
+ onWaiting?: React.ReactEventHandler<HTMLInputElement> | undefined;
99
+ onWaitingCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
100
+ onAuxClick?: React.MouseEventHandler<HTMLInputElement> | undefined;
101
+ onAuxClickCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
102
+ onClick?: React.MouseEventHandler<HTMLInputElement> | undefined;
103
+ onClickCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
104
+ onContextMenu?: React.MouseEventHandler<HTMLInputElement> | undefined;
105
+ onContextMenuCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
106
+ onDoubleClick?: React.MouseEventHandler<HTMLInputElement> | undefined;
107
+ onDoubleClickCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
108
+ onDrag?: React.DragEventHandler<HTMLInputElement> | undefined;
109
+ onDragCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
110
+ onDragEnd?: React.DragEventHandler<HTMLInputElement> | undefined;
111
+ onDragEndCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
112
+ onDragEnter?: React.DragEventHandler<HTMLInputElement> | undefined;
113
+ onDragEnterCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
114
+ onDragExit?: React.DragEventHandler<HTMLInputElement> | undefined;
115
+ onDragExitCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
116
+ onDragLeave?: React.DragEventHandler<HTMLInputElement> | undefined;
117
+ onDragLeaveCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
118
+ onDragOver?: React.DragEventHandler<HTMLInputElement> | undefined;
119
+ onDragOverCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
120
+ onDragStart?: React.DragEventHandler<HTMLInputElement> | undefined;
121
+ onDragStartCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
122
+ onDrop?: React.DragEventHandler<HTMLInputElement> | undefined;
123
+ onDropCapture?: React.DragEventHandler<HTMLInputElement> | undefined;
124
+ onMouseDown?: React.MouseEventHandler<HTMLInputElement> | undefined;
125
+ onMouseDownCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
126
+ onMouseEnter?: React.MouseEventHandler<HTMLInputElement> | undefined;
127
+ onMouseLeave?: React.MouseEventHandler<HTMLInputElement> | undefined;
128
+ onMouseMove?: React.MouseEventHandler<HTMLInputElement> | undefined;
129
+ onMouseMoveCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
130
+ onMouseOut?: React.MouseEventHandler<HTMLInputElement> | undefined;
131
+ onMouseOutCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
132
+ onMouseOver?: React.MouseEventHandler<HTMLInputElement> | undefined;
133
+ onMouseOverCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
134
+ onMouseUp?: React.MouseEventHandler<HTMLInputElement> | undefined;
135
+ onMouseUpCapture?: React.MouseEventHandler<HTMLInputElement> | undefined;
136
+ onSelect?: React.ReactEventHandler<HTMLInputElement> | undefined;
137
+ onSelectCapture?: React.ReactEventHandler<HTMLInputElement> | undefined;
138
+ onTouchCancel?: React.TouchEventHandler<HTMLInputElement> | undefined;
139
+ onTouchCancelCapture?: React.TouchEventHandler<HTMLInputElement> | undefined;
140
+ onTouchEnd?: React.TouchEventHandler<HTMLInputElement> | undefined;
141
+ onTouchEndCapture?: React.TouchEventHandler<HTMLInputElement> | undefined;
142
+ onTouchMove?: React.TouchEventHandler<HTMLInputElement> | undefined;
143
+ onTouchMoveCapture?: React.TouchEventHandler<HTMLInputElement> | undefined;
144
+ onTouchStart?: React.TouchEventHandler<HTMLInputElement> | undefined;
145
+ onTouchStartCapture?: React.TouchEventHandler<HTMLInputElement> | undefined;
146
+ onPointerDown?: React.PointerEventHandler<HTMLInputElement> | undefined;
147
+ onPointerDownCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
148
+ onPointerMove?: React.PointerEventHandler<HTMLInputElement> | undefined;
149
+ onPointerMoveCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
150
+ onPointerUp?: React.PointerEventHandler<HTMLInputElement> | undefined;
151
+ onPointerUpCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
152
+ onPointerCancel?: React.PointerEventHandler<HTMLInputElement> | undefined;
153
+ onPointerCancelCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
154
+ onPointerEnter?: React.PointerEventHandler<HTMLInputElement> | undefined;
155
+ onPointerLeave?: React.PointerEventHandler<HTMLInputElement> | undefined;
156
+ onPointerOver?: React.PointerEventHandler<HTMLInputElement> | undefined;
157
+ onPointerOverCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
158
+ onPointerOut?: React.PointerEventHandler<HTMLInputElement> | undefined;
159
+ onPointerOutCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
160
+ onGotPointerCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
161
+ onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
162
+ onLostPointerCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
163
+ onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
164
+ onScroll?: React.UIEventHandler<HTMLInputElement> | undefined;
165
+ onScrollCapture?: React.UIEventHandler<HTMLInputElement> | undefined;
166
+ onScrollEnd?: React.UIEventHandler<HTMLInputElement> | undefined;
167
+ onScrollEndCapture?: React.UIEventHandler<HTMLInputElement> | undefined;
168
+ onWheel?: React.WheelEventHandler<HTMLInputElement> | undefined;
169
+ onWheelCapture?: React.WheelEventHandler<HTMLInputElement> | undefined;
170
+ onAnimationStart?: React.AnimationEventHandler<HTMLInputElement> | undefined;
171
+ onAnimationStartCapture?: React.AnimationEventHandler<HTMLInputElement> | undefined;
172
+ onAnimationEnd?: React.AnimationEventHandler<HTMLInputElement> | undefined;
173
+ onAnimationEndCapture?: React.AnimationEventHandler<HTMLInputElement> | undefined;
174
+ onAnimationIteration?: React.AnimationEventHandler<HTMLInputElement> | undefined;
175
+ onAnimationIterationCapture?: React.AnimationEventHandler<HTMLInputElement> | undefined;
176
+ onToggle?: React.ToggleEventHandler<HTMLInputElement> | undefined;
177
+ onBeforeToggle?: React.ToggleEventHandler<HTMLInputElement> | undefined;
178
+ onTransitionCancel?: React.TransitionEventHandler<HTMLInputElement> | undefined;
179
+ onTransitionCancelCapture?: React.TransitionEventHandler<HTMLInputElement> | undefined;
180
+ onTransitionEnd?: React.TransitionEventHandler<HTMLInputElement> | undefined;
181
+ onTransitionEndCapture?: React.TransitionEventHandler<HTMLInputElement> | undefined;
182
+ onTransitionRun?: React.TransitionEventHandler<HTMLInputElement> | undefined;
183
+ onTransitionRunCapture?: React.TransitionEventHandler<HTMLInputElement> | undefined;
184
+ onTransitionStart?: React.TransitionEventHandler<HTMLInputElement> | undefined;
185
+ onTransitionStartCapture?: React.TransitionEventHandler<HTMLInputElement> | undefined;
186
+ "aria-activedescendant"?: string | undefined;
187
+ "aria-atomic"?: ("false" | "true" | boolean) | undefined;
188
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
189
+ "aria-braillelabel"?: string | undefined;
190
+ "aria-brailleroledescription"?: string | undefined;
191
+ "aria-busy"?: ("false" | "true" | boolean) | undefined;
192
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
193
+ "aria-colcount"?: number | undefined;
194
+ "aria-colindex"?: number | undefined;
195
+ "aria-colindextext"?: string | undefined;
196
+ "aria-colspan"?: number | undefined;
197
+ "aria-controls"?: string | undefined;
198
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
199
+ "aria-describedby"?: string | undefined;
200
+ "aria-description"?: string | undefined;
201
+ "aria-details"?: string | undefined;
202
+ "aria-disabled"?: ("false" | "true" | boolean) | undefined;
203
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
204
+ "aria-errormessage"?: string | undefined;
205
+ "aria-expanded"?: ("false" | "true" | boolean) | undefined;
206
+ "aria-flowto"?: string | undefined;
207
+ "aria-grabbed"?: ("false" | "true" | boolean) | undefined;
208
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
209
+ "aria-hidden"?: ("false" | "true" | boolean) | undefined;
210
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
211
+ "aria-keyshortcuts"?: string | undefined;
212
+ "aria-labelledby"?: string | undefined;
213
+ "aria-level"?: number | undefined;
214
+ "aria-live"?: "off" | "assertive" | "polite" | undefined;
215
+ "aria-modal"?: ("false" | "true" | boolean) | undefined;
216
+ "aria-multiline"?: ("false" | "true" | boolean) | undefined;
217
+ "aria-multiselectable"?: ("false" | "true" | boolean) | undefined;
218
+ "aria-orientation"?: "horizontal" | "vertical" | undefined;
219
+ "aria-owns"?: string | undefined;
220
+ "aria-placeholder"?: string | undefined;
221
+ "aria-posinset"?: number | undefined;
222
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
223
+ "aria-readonly"?: ("false" | "true" | boolean) | undefined;
224
+ "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
225
+ "aria-required"?: ("false" | "true" | boolean) | undefined;
226
+ "aria-roledescription"?: string | undefined;
227
+ "aria-rowcount"?: number | undefined;
228
+ "aria-rowindex"?: number | undefined;
229
+ "aria-rowindextext"?: string | undefined;
230
+ "aria-rowspan"?: number | undefined;
231
+ "aria-selected"?: ("false" | "true" | boolean) | undefined;
232
+ "aria-setsize"?: number | undefined;
233
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
234
+ "aria-valuemax"?: number | undefined;
235
+ "aria-valuemin"?: number | undefined;
236
+ "aria-valuenow"?: number | undefined;
237
+ "aria-valuetext"?: string | undefined;
238
+ defaultChecked?: boolean | undefined;
239
+ defaultValue?: string | number | readonly string[] | undefined;
240
+ suppressContentEditableWarning?: boolean | undefined;
241
+ suppressHydrationWarning?: boolean | undefined;
242
+ accessKey?: string | undefined;
243
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
244
+ autoFocus?: boolean | undefined;
245
+ className?: string | undefined;
246
+ contentEditable?: ("false" | "true" | boolean) | "inherit" | "plaintext-only" | undefined;
247
+ contextMenu?: string | undefined;
248
+ dir?: string | undefined;
249
+ draggable?: ("false" | "true" | boolean) | undefined;
250
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
251
+ hidden?: boolean | undefined;
252
+ id?: string | undefined;
253
+ lang?: string | undefined;
254
+ nonce?: string | undefined;
255
+ slot?: string | undefined;
256
+ spellCheck?: ("false" | "true" | boolean) | undefined;
257
+ style?: React.CSSProperties | undefined;
258
+ tabIndex?: number | undefined;
259
+ title?: string | undefined;
260
+ translate?: "yes" | "no" | undefined;
261
+ radioGroup?: string | undefined;
262
+ role?: React.AriaRole | undefined;
263
+ about?: string | undefined;
264
+ content?: string | undefined;
265
+ datatype?: string | undefined;
266
+ inlist?: any;
267
+ prefix?: string | undefined;
268
+ property?: string | undefined;
269
+ rel?: string | undefined;
270
+ resource?: string | undefined;
271
+ rev?: string | undefined;
272
+ typeof?: string | undefined;
273
+ vocab?: string | undefined;
274
+ autoCorrect?: string | undefined;
275
+ autoSave?: string | undefined;
276
+ color?: string | undefined;
277
+ itemProp?: string | undefined;
278
+ itemScope?: boolean | undefined;
279
+ itemType?: string | undefined;
280
+ itemID?: string | undefined;
281
+ itemRef?: string | undefined;
282
+ results?: number | undefined;
283
+ security?: string | undefined;
284
+ unselectable?: "on" | "off" | undefined;
285
+ popover?: "" | "auto" | "manual" | "hint" | undefined;
286
+ popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
287
+ popoverTarget?: string | undefined;
288
+ inert?: boolean | undefined;
289
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
290
+ is?: string | undefined;
291
+ exportparts?: string | undefined;
292
+ part?: string | undefined;
293
+ accept?: string | undefined;
294
+ alt?: string | undefined;
295
+ autoComplete?: React.HTMLInputAutoCompleteAttribute | undefined;
296
+ capture?: boolean | "user" | "environment" | undefined;
297
+ checked?: boolean | undefined;
298
+ disabled?: boolean | undefined;
299
+ form?: string | undefined;
300
+ formAction?: string | ((formData: FormData) => void | Promise<void>) | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS] | undefined;
301
+ formEncType?: string | undefined;
302
+ formMethod?: string | undefined;
303
+ formNoValidate?: boolean | undefined;
304
+ formTarget?: string | undefined;
305
+ height?: number | string | undefined;
306
+ list?: string | undefined;
307
+ max?: number | string | undefined;
308
+ maxLength?: number | undefined;
309
+ min?: number | string | undefined;
310
+ minLength?: number | undefined;
311
+ multiple?: boolean | undefined;
312
+ name?: string | undefined;
313
+ pattern?: string | undefined;
314
+ placeholder?: string | undefined;
315
+ readOnly?: boolean | undefined;
316
+ required?: boolean | undefined;
317
+ size?: number | undefined;
318
+ src?: string | undefined;
319
+ step?: number | string | undefined;
320
+ type?: React.HTMLInputTypeAttribute | undefined;
321
+ value?: string | readonly string[] | number | undefined;
322
+ width?: number | string | undefined;
323
+ onChange?: React.ChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined;
324
+ ref: React.Ref<HTMLInputElement>;
325
+ 'aria-label': string;
326
+ };
327
+ };
328
+ inputProps?: undefined;
329
+ } | {
330
+ slotProps?: undefined;
331
+ inputProps: {
332
+ 'aria-label': string;
333
+ };
334
+ };
335
+ declare const GoToBox: ({ model }: {
336
+ model: MsaViewModel;
337
+ }) => React.JSX.Element | null;
338
+ export default GoToBox;
@@ -0,0 +1,31 @@
1
+ import React, { useState } from 'react';
2
+ import { Autocomplete, TextField } from '@mui/material';
3
+ import { observer } from 'mobx-react';
4
+ import { findableRowNames, goTo, rowNameSuggestions } from './goTo.js';
5
+ const label = 'Go to row or column';
6
+ // MUI 9 hands renderInput `slotProps`; MUI 7, which every released JBrowse host
7
+ // serves, hands it `inputProps` and no `slotProps` at all
8
+ export function labelledInput(params) {
9
+ const { slotProps, inputProps } = params;
10
+ return slotProps
11
+ ? {
12
+ slotProps: {
13
+ ...slotProps,
14
+ htmlInput: { ...slotProps.htmlInput, 'aria-label': label },
15
+ },
16
+ }
17
+ : { inputProps: { ...inputProps, 'aria-label': label } };
18
+ }
19
+ const GoToBox = observer(function ({ model }) {
20
+ const [missed, setMissed] = useState(false);
21
+ const names = findableRowNames(model);
22
+ return names.length > 1 || model.numColumns > 0 ? (React.createElement(Autocomplete, { freeSolo: true, size: "small", options: names, filterOptions: (options, { inputValue }) => rowNameSuggestions(options, inputValue), value: null, blurOnSelect: true, onInputChange: () => {
23
+ setMissed(false);
24
+ }, onChange: (_, text) => {
25
+ if (text) {
26
+ setMissed(!goTo(model, text));
27
+ }
28
+ }, style: { width: 180, margin: 'auto 8px' }, renderInput: params => (React.createElement(TextField, { ...params, error: missed, placeholder: label, title: "A row name, a column number, or name:residue", ...labelledInput(params) })) })) : null;
29
+ });
30
+ export default GoToBox;
31
+ //# sourceMappingURL=GoToBox.js.map
@@ -0,0 +1 @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,EAAE,UAAU,CAAC,EAEzC,KAAK,EAAE,IAAI,EACX,YAAY,QACZ,aAAa,EAAE,GAAG,EAAE;YAClB,SAAS,CAAC,KAAK,CAAC,CAAA;QAClB,CAAC,EACD,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;YACpB,IAAI,IAAI,EAAE,CAAC;gBACT,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAA;YAC/B,CAAC;QACH,CAAC,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,EACzC,WAAW,EAAE,MAAM,CAAC,EAAE,CAAC,CACrB,oBAAC,SAAS,OACJ,MAAM,EACV,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,KAAK,EAClB,KAAK,EAAC,8CAA8C,KAChD,aAAa,CAAC,MAAM,CAAC,GACzB,CACH,GACD,CACH,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC,CAAC,CAAA;AAEF,eAAe,OAAO,CAAA"}
@@ -7,11 +7,12 @@ import StatusMessage from '../StatusMessage.js';
7
7
  import ColorSchemeMenu from './ColorSchemeMenu.js';
8
8
  import FileMenu from './FileMenu.js';
9
9
  import GappynessSlider from './GappynessSlider.js';
10
+ import GoToBox from './GoToBox.js';
10
11
  import HeaderInfoArea from './HeaderInfoArea.js';
11
12
  import LoadWarnings from './LoadWarnings.js';
12
13
  import MSASettingsMenu from './MSASettingsMenu.js';
13
14
  import MultiAlignmentSelector from './MultiAlignmentSelector.js';
14
- import RowSearch from './RowSearch.js';
15
+ import SelectionMenu from './SelectionMenu.js';
15
16
  import TreeSettingsMenu from './TreeSettingsMenu.js';
16
17
  import UnshareableDataWarning from './UnshareableDataWarning.js';
17
18
  import ZoomControls from './ZoomControls.js';
@@ -33,10 +34,11 @@ const Header = observer(function ({ model }) {
33
34
  React.createElement(ZoomControls, { model: model }),
34
35
  React.createElement(ZoomMenu, { model: model }),
35
36
  React.createElement(GappynessSlider, { model: model }),
36
- React.createElement(RowSearch, { model: model }),
37
+ React.createElement(GoToBox, { model: model }),
37
38
  React.createElement("div", { style: { paddingLeft: 20, margin: 'auto' } },
38
39
  React.createElement(MultiAlignmentSelector, { model: model })),
39
40
  React.createElement("div", { style: { flex: '1 1 0', minWidth: 0, display: 'flex' } },
41
+ React.createElement(SelectionMenu, { model: model }),
40
42
  React.createElement(HeaderInfoArea, { model: model })),
41
43
  React.createElement(LoadWarnings, { model: model }),
42
44
  React.createElement(UnshareableDataWarning, { model: model }),
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/components/header/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE9C,OAAO,UAAU,MAAM,+BAA+B,CAAA;AACtD,OAAO,IAAI,MAAM,0BAA0B,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,aAAa,MAAM,qBAAsB,CAAA;AAChD,OAAO,eAAe,MAAM,sBAAuB,CAAA;AACnD,OAAO,QAAQ,MAAM,eAAgB,CAAA;AACrC,OAAO,eAAe,MAAM,sBAAuB,CAAA;AACnD,OAAO,cAAc,MAAM,qBAAsB,CAAA;AACjD,OAAO,YAAY,MAAM,mBAAoB,CAAA;AAC7C,OAAO,eAAe,MAAM,sBAAuB,CAAA;AACnD,OAAO,sBAAsB,MAAM,6BAA8B,CAAA;AACjE,OAAO,SAAS,MAAM,gBAAiB,CAAA;AACvC,OAAO,gBAAgB,MAAM,uBAAwB,CAAA;AACrD,OAAO,sBAAsB,MAAM,6BAA8B,CAAA;AACjE,OAAO,YAAY,MAAM,mBAAoB,CAAA;AAC7C,OAAO,QAAQ,MAAM,eAAgB,CAAA;AAIrC,MAAM,WAAW,GAAG,I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ACjC,oBAAC,OAAO,IAAC,KAAK,EAAE,KAAK,GAAI;QACzB,6BAAK,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;YAC7C,oBAAC,sBAAsB,IAAC,KAAK,EAAE,KAAK,GAAI,CACpC;QAGN,6BAAK,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE;YACzD,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,GAAI;YAC/B,oBAAC,cAAc,IAAC,KAAK,EAAE,KAAK,GAAI,CAC5B;QACN,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,GAAI;QAC9B,oBAAC,sBAAsB,IAAC,KAAK,EAAE,KAAK,GAAI;QACxC,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAC,QAAQ,GAAG;QAChD,oBAAC,OAAO,IAAC,KAAK,EAAC,OAAO;YACpB,oBAAC,UAAU,kBACE,OAAO,EAClB,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;gBAC1D,CAAC;gBAED,oBAAC,IAAI,OAAG,CACG,CACL,CACN,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,MAAM,CAAA"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { MsaViewModel } from '../../model.ts';
3
+ /**
4
+ * The selected block's size, as a button opening what to do with it. It
5
+ * renders only while there is a selection. Header.tsx puts it in the slot
6
+ * with no width of its own, so the label ellipsizes before it could wrap the
7
+ * header onto a second line.
8
+ */
9
+ declare const SelectionMenu: ({ model }: {
10
+ model: MsaViewModel;
11
+ }) => React.JSX.Element | null;
12
+ export default SelectionMenu;
@@ -0,0 +1,72 @@
1
+ import React, { useState } from 'react';
2
+ import ArrowDropDown from '@mui/icons-material/ArrowDropDown';
3
+ import Clear from '@mui/icons-material/Clear';
4
+ import ContentCopy from '@mui/icons-material/ContentCopy';
5
+ import ZoomIn from '@mui/icons-material/ZoomIn';
6
+ import { Button, ListItemIcon, ListItemText, Menu, MenuItem, Tooltip, } from '@mui/material';
7
+ import { observer } from 'mobx-react';
8
+ import copy from '../../vendor/copyToClipboard.js';
9
+ function count(n, noun) {
10
+ return `${n.toLocaleString('en-US')} ${noun}${n === 1 ? '' : 's'}`;
11
+ }
12
+ /**
13
+ * The selected block's size, as a button opening what to do with it. It
14
+ * renders only while there is a selection. Header.tsx puts it in the slot
15
+ * with no width of its own, so the label ellipsizes before it could wrap the
16
+ * header onto a second line.
17
+ */
18
+ const SelectionMenu = observer(function ({ model }) {
19
+ const [anchorEl, setAnchorEl] = useState();
20
+ const { selectionSize, selectionFileSpan } = model;
21
+ if (!selectionSize || !selectionFileSpan) {
22
+ return null;
23
+ }
24
+ const label = `${count(selectionSize.columns, 'column')} × ${count(selectionSize.rows, 'row')}`;
25
+ const items = [
26
+ {
27
+ text: 'Copy as FASTA',
28
+ Icon: ContentCopy,
29
+ act: () => {
30
+ copy(model.selectionFasta);
31
+ },
32
+ },
33
+ {
34
+ text: 'Zoom to selection',
35
+ Icon: ZoomIn,
36
+ act: () => {
37
+ model.zoomToSelection();
38
+ },
39
+ },
40
+ {
41
+ text: 'Clear selection',
42
+ Icon: Clear,
43
+ act: () => {
44
+ model.clearSelection();
45
+ },
46
+ },
47
+ ];
48
+ return (React.createElement(React.Fragment, null,
49
+ React.createElement(Tooltip, { title: `Columns ${selectionFileSpan.start}-${selectionFileSpan.end} selected. Shift-drag the alignment to select, Escape to clear` },
50
+ React.createElement(Button, { size: "small", "aria-label": `Selection: ${label}`, endIcon: React.createElement(ArrowDropDown, null), onClick: event => {
51
+ setAnchorEl(event.currentTarget);
52
+ }, style: {
53
+ margin: 'auto 0 auto 8px',
54
+ flexShrink: 0,
55
+ maxWidth: '100%',
56
+ minWidth: 0,
57
+ textTransform: 'none',
58
+ whiteSpace: 'nowrap',
59
+ } },
60
+ React.createElement("span", { style: { overflow: 'hidden', textOverflow: 'ellipsis' } }, label))),
61
+ anchorEl ? (React.createElement(Menu, { anchorEl: anchorEl, open: true, transitionDuration: 0, onClose: () => {
62
+ setAnchorEl(undefined);
63
+ } }, items.map(({ text, Icon, act }) => (React.createElement(MenuItem, { key: text, dense: true, onClick: () => {
64
+ act();
65
+ setAnchorEl(undefined);
66
+ } },
67
+ React.createElement(ListItemIcon, null,
68
+ React.createElement(Icon, { fontSize: "small" })),
69
+ React.createElement(ListItemText, null, text)))))) : null));
70
+ });
71
+ export default SelectionMenu;
72
+ //# sourceMappingURL=SelectionMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionMenu.js","sourceRoot":"","sources":["../../../src/components/header/SelectionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,aAAa,MAAM,mCAAmC,CAAA;AAC7D,OAAO,KAAK,MAAM,2BAA2B,CAAA;AAC7C,OAAO,WAAW,MAAM,iCAAiC,CAAA;AACzD,OAAO,MAAM,MAAM,4BAA4B,CAAA;AAC/C,OAAO,EACL,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,OAAO,GACR,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,IAAI,MAAM,iCAAiC,CAAA;AAIlD,SAAS,KAAK,CAAC,CAAS,EAAE,IAAY;IACpC,OAAO,GAAG,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA;AACpE,CAAC;AAED;;;;;GAKG;AACH,MAAM,aAAa,GAAG,QAAQ,CAAC,UAAU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b,QAAQ,EAAE,MAAM;oBAChB,QAAQ,EAAE,CAAC;oBACX,aAAa,EAAE,MAAM;oBACrB,UAAU,EAAE,QAAQ;iBACrB;gBAED,8BAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,IAC1D,KAAK,CACD,CACA,CACD;QACT,QAAQ,CAAC,CAAC,CAAC,CACV,oBAAC,IAAI,IACH,QAAQ,EAAE,QAAQ,EAClB,IAAI,QACJ,kBAAkB,EAAE,CAAC,EACrB,OAAO,EAAE,GAAG,EAAE;gBACZ,WAAW,CAAC,SAAS,CAAC,CAAA;YACxB,CAAC,IAEA,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAClC,oBAAC,QAAQ,IACP,GAAG,EAAE,IAAI,EACT,KAAK,QACL,OAAO,EAAE,GAAG,EAAE;gBACZ,GAAG,EAAE,CAAA;gBACL,WAAW,CAAC,SAAS,CAAC,CAAA;YACxB,CAAC;YAED,oBAAC,YAAY;gBACX,oBAAC,IAAI,IAAC,QAAQ,EAAC,OAAO,GAAG,CACZ;YACf,oBAAC,YAAY,QAAE,IAAI,CAAgB,CAC1B,CACZ,CAAC,CACG,CACR,CAAC,CAAC,CAAC,IAAI,CACP,CACJ,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,aAAa,CAAA"}
@@ -0,0 +1,20 @@
1
+ import type { MsaViewModel } from '../../model.ts';
2
+ export declare function findableRowNames(model: MsaViewModel): string[];
3
+ export declare function rowNameSuggestions(names: string[], input: string, limit?: number): string[];
4
+ /**
5
+ * The visible row and column a "Go to" entry names: a row by its name, the
6
+ * column the ruler numbers N, or residue N of a row written `name:N`. A name
7
+ * is tried whole first, so a row called `chr1:100` stays reachable.
8
+ */
9
+ export declare function resolveGoTo(model: MsaViewModel, text: string): {
10
+ row: number;
11
+ col?: undefined;
12
+ } | {
13
+ row: number | undefined;
14
+ col: number;
15
+ } | {
16
+ row?: undefined;
17
+ col: number;
18
+ } | undefined;
19
+ /** centers the view on the entry's target and lights it; false if none */
20
+ export declare function goTo(model: MsaViewModel, text: string): boolean;