@rivm-loculus-tools/sequence-editor 1.9.0 → 1.11.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/dist/_chunks/EngineErrorUtil.js.map +1 -1
- package/dist/_chunks/EngineWorker.js +1 -1
- package/dist/_chunks/EngineWorker.js.map +1 -1
- package/dist/_chunks/SequenceEditor.js +520 -488
- package/dist/_chunks/SequenceEditor.js.map +1 -1
- package/dist/_chunks/SequenceEditorEventBusService.js +5 -5
- package/dist/_chunks/SequenceEditorEventBusService.js.map +1 -1
- package/dist/_chunks/SequenceEditorPageDrawer.js +462 -693
- package/dist/_chunks/SequenceEditorPageDrawer.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/sequenceEditorStore.js +84 -85
- package/dist/_chunks/sequenceEditorStore.js.map +1 -1
- package/dist/_chunks/sequence_editor.js +131 -104
- package/dist/_chunks/sequence_editor.js.map +1 -1
- package/dist/assets/AlignerWorker-DkAbHwjR.js +8 -0
- package/dist/assets/AlignerWorker-DkAbHwjR.js.map +1 -0
- package/dist/assets/index-CKWZNkQe.js +8 -0
- package/dist/assets/index-CKWZNkQe.js.map +1 -0
- package/dist/classes/services/EditorWorkerService/EditorWorkerService.d.ts +18 -19
- package/dist/classes/services/EditorWorkerService/index.js +76 -99
- package/dist/classes/services/EditorWorkerService/index.js.map +1 -1
- package/dist/classes/services/SequenceEditorEventBusService/SequenceEditorEventBusService.d.ts +2 -0
- package/dist/classes/workers/AlignerWorker/index.js.map +1 -1
- package/dist/classes/workers/EngineWorker/EngineWorker.d.ts +19 -17
- package/dist/classes/workers/EngineWorker/index.js +78 -30
- package/dist/classes/workers/EngineWorker/index.js.map +1 -1
- package/dist/components/app/SequenceEditorApp/index.js +10 -10
- package/dist/components/app/SequenceEditorApp/index.js.map +1 -1
- package/dist/components/ui/SequenceActionsBar/SequenceActionsBar.d.ts +1 -0
- package/dist/components/ui/SequenceActionsBar/index.d.ts +1 -0
- package/dist/components/ui/SequenceActionsBar/index.js +113 -0
- package/dist/components/ui/SequenceActionsBar/index.js.map +1 -0
- package/dist/components/ui/SequenceEditorMenu/SequenceEditorMenu.d.ts +1 -0
- package/dist/components/ui/SequenceEditorMenu/index.d.ts +1 -0
- package/dist/components/ui/SequenceEditorMenu/index.js +198 -0
- package/dist/components/ui/SequenceEditorMenu/index.js.map +1 -0
- package/dist/components/ui/SequenceEditorPageHeader/index.js +86 -1
- package/dist/components/ui/SequenceEditorPageHeader/index.js.map +1 -0
- package/dist/components/ui/SequenceEditorRealignModal/index.js +13 -13
- package/dist/components/ui/SequenceEditorRealignModal/index.js.map +1 -1
- package/dist/components/ui/SequenceEditorSearchBar/index.js +25 -21
- package/dist/components/ui/SequenceEditorSearchBar/index.js.map +1 -1
- package/dist/constants/keyboard.js +26 -26
- package/dist/constants/keyboard.js.map +1 -1
- package/dist/constants/palette.js +147 -147
- package/dist/constants/palette.js.map +1 -1
- package/dist/models/config.models.d.ts +1 -0
- package/dist/models/editor.models.d.ts +34 -26
- package/dist/models/editor.models.js +3 -1
- package/dist/models/editor.models.js.map +1 -1
- package/dist/models/palette.models.js.map +1 -1
- package/dist/pages/SequenceEditorMainPage/index.js +20 -20
- package/dist/pages/SequenceEditorMainPage/index.js.map +1 -1
- package/dist/stores/sequenceEditorStore/sequenceEditorStore.d.ts +4 -2
- package/dist/theme/demoTheme/index.js +5 -5
- package/dist/theme/demoTheme/index.js.map +1 -1
- package/dist/utils/EditorUtil/EditorUtil.d.ts +10 -3
- package/dist/utils/EditorUtil/index.js +360 -275
- package/dist/utils/EditorUtil/index.js.map +1 -1
- package/dist/utils/PaletteUtil/index.js.map +1 -1
- package/dist/utils/SequenceEditorStandardConfigUtil/index.js +6 -6
- package/dist/utils/SequenceEditorStandardConfigUtil/index.js.map +1 -1
- package/dist/vite/paletteSchemaPlugin/index.js.map +1 -1
- package/package.json +22 -22
- package/dist/_chunks/SequenceEditorPageHeader.js +0 -123
- package/dist/_chunks/SequenceEditorPageHeader.js.map +0 -1
- package/dist/assets/AlignerWorker-cbSDVRKB.js +0 -8
- package/dist/assets/AlignerWorker-cbSDVRKB.js.map +0 -1
- package/dist/assets/index--BqOy4u7.js +0 -8
- package/dist/assets/index--BqOy4u7.js.map +0 -1
- package/dist/components/ui/SequenceEditorPageDrawer/SequenceEditorPageDrawerKeyboardShortcuts.d.ts +0 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { NestedDropdown as e } from "@gen-epix/ui-core-components/components/NestedMenu";
|
|
2
|
+
import { container as t } from "tsyringe";
|
|
3
|
+
import { useMemo as n } from "react";
|
|
4
|
+
import { Box as r } from "@mui/material";
|
|
5
|
+
import { KeyboardArrowDown as i, KeyboardArrowLeft as a, KeyboardArrowRight as o, KeyboardArrowUp as s, KeyboardCommandKey as c, KeyboardControlKey as l, KeyboardOptionKey as u, SpaceBar as d } from "@mui/icons-material";
|
|
6
|
+
import { t as f } from "../../../_chunks/SequenceEditorEventBusService.js";
|
|
7
|
+
import { KEYBOARD_SHORTCUTS as p } from "../../../constants/keyboard.js";
|
|
8
|
+
import "../../../constants/index.js";
|
|
9
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
10
|
+
// src/components/ui/SequenceEditorMenu/SequenceEditorMenu.tsx
|
|
11
|
+
var h = /* @__PURE__ */ new Map([
|
|
12
|
+
["Alt", "Alt"],
|
|
13
|
+
["AltGraph", "AltGr"],
|
|
14
|
+
["Control", "Ctrl"],
|
|
15
|
+
["Meta", "Cmd"],
|
|
16
|
+
["Shift", "Shift"]
|
|
17
|
+
]), g = /* @__PURE__ */ new Map([
|
|
18
|
+
["Alt", u],
|
|
19
|
+
["Control", l],
|
|
20
|
+
["Meta", c]
|
|
21
|
+
]), _ = /* @__PURE__ */ new Map([
|
|
22
|
+
["ArrowDown", {
|
|
23
|
+
icon: i,
|
|
24
|
+
label: "Arrow down"
|
|
25
|
+
}],
|
|
26
|
+
["ArrowLeft", {
|
|
27
|
+
icon: a,
|
|
28
|
+
label: "Arrow left"
|
|
29
|
+
}],
|
|
30
|
+
["ArrowRight", {
|
|
31
|
+
icon: o,
|
|
32
|
+
label: "Arrow right"
|
|
33
|
+
}],
|
|
34
|
+
["ArrowUp", {
|
|
35
|
+
icon: s,
|
|
36
|
+
label: "Arrow up"
|
|
37
|
+
}],
|
|
38
|
+
["Backspace", { label: "Backspace" }],
|
|
39
|
+
["Delete", { label: "Delete" }],
|
|
40
|
+
["End", { label: "End" }],
|
|
41
|
+
["Home", { label: "Home" }],
|
|
42
|
+
["PageDown", { label: "Page down" }],
|
|
43
|
+
["PageUp", { label: "Page up" }],
|
|
44
|
+
["Space", {
|
|
45
|
+
icon: d,
|
|
46
|
+
label: "Space"
|
|
47
|
+
}]
|
|
48
|
+
]), v = typeof navigator < "u" && /^(Mac|iPhone|iPad|iPod)/i.test(navigator.userAgentData?.platform ?? navigator.platform), y = (e) => {
|
|
49
|
+
let t = v ? "Meta" : "Control";
|
|
50
|
+
return e.find((e) => e.includes(t)) ?? e[0] ?? [];
|
|
51
|
+
}, b = (e) => {
|
|
52
|
+
let { code: t, key: n, modifiers: r = [] } = e.shortcut, i = t ? _.get(t) ?? { label: t } : { label: n?.toUpperCase() ?? "" };
|
|
53
|
+
return [...y(r).map((e) => ({
|
|
54
|
+
icon: g.get(e),
|
|
55
|
+
label: v && e === "Alt" ? "Option" : h.get(e) ?? e
|
|
56
|
+
})), i];
|
|
57
|
+
}, x = (e) => {
|
|
58
|
+
let t = b(e);
|
|
59
|
+
return /* @__PURE__ */ m(r, {
|
|
60
|
+
"aria-label": t.map(({ label: e }) => e).join(" "),
|
|
61
|
+
sx: {
|
|
62
|
+
alignItems: "center",
|
|
63
|
+
display: "flex",
|
|
64
|
+
flexShrink: 0,
|
|
65
|
+
gap: .5
|
|
66
|
+
},
|
|
67
|
+
children: t.map((e) => {
|
|
68
|
+
let t = e.icon;
|
|
69
|
+
return /* @__PURE__ */ m(r, {
|
|
70
|
+
"aria-label": e.label,
|
|
71
|
+
component: "kbd",
|
|
72
|
+
sx: {
|
|
73
|
+
alignItems: "center",
|
|
74
|
+
backgroundColor: "action.hover",
|
|
75
|
+
border: "1px solid",
|
|
76
|
+
borderColor: "divider",
|
|
77
|
+
borderRadius: .75,
|
|
78
|
+
boxShadow: "0 1px 0 rgba(0, 0, 0, 0.2)",
|
|
79
|
+
color: "text.primary",
|
|
80
|
+
display: "flex",
|
|
81
|
+
fontFamily: "monospace",
|
|
82
|
+
fontSize: "0.5rem",
|
|
83
|
+
justifyContent: "center",
|
|
84
|
+
lineHeight: 1,
|
|
85
|
+
minWidth: e.label.length === 1 ? 24 : "auto",
|
|
86
|
+
px: .75,
|
|
87
|
+
py: .5,
|
|
88
|
+
textAlign: "center"
|
|
89
|
+
},
|
|
90
|
+
children: t ? /* @__PURE__ */ m(t, {
|
|
91
|
+
"aria-hidden": !0,
|
|
92
|
+
fontSize: "inherit"
|
|
93
|
+
}) : e.label
|
|
94
|
+
}, e.label);
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
}, S = (e, t = !1) => {
|
|
98
|
+
let { code: n, key: r, modifiers: i = [] } = e.shortcut, a = y(i);
|
|
99
|
+
return {
|
|
100
|
+
callback: () => e.callback(new KeyboardEvent("keydown", {
|
|
101
|
+
altKey: a.includes("Alt"),
|
|
102
|
+
code: n ?? "",
|
|
103
|
+
ctrlKey: a.includes("Control"),
|
|
104
|
+
key: r ?? n ?? "",
|
|
105
|
+
metaKey: a.includes("Meta"),
|
|
106
|
+
shiftKey: a.includes("Shift")
|
|
107
|
+
})),
|
|
108
|
+
divider: t,
|
|
109
|
+
label: e.description,
|
|
110
|
+
rightIcon: x(e)
|
|
111
|
+
};
|
|
112
|
+
}, C = (...e) => e.filter((e) => (!e.macOnly || v) && (!e.nonMacOnly || !v)).map((e) => S(e)), w = () => {
|
|
113
|
+
let i = n(() => ({ width: "350px" }), []), a = n(() => [
|
|
114
|
+
{
|
|
115
|
+
items: [
|
|
116
|
+
S(p.undo),
|
|
117
|
+
S(p.redo, !0),
|
|
118
|
+
S(p.copySelection),
|
|
119
|
+
S(p.pasteFasta, !0),
|
|
120
|
+
...C(p.deleteRows, p.deleteRowsMac)
|
|
121
|
+
],
|
|
122
|
+
label: "Edit"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
items: [
|
|
126
|
+
{
|
|
127
|
+
callback: () => t.resolve(f).emit("onDeselect"),
|
|
128
|
+
divider: !0,
|
|
129
|
+
label: "Deselect"
|
|
130
|
+
},
|
|
131
|
+
S(p.moveSelectionLeft),
|
|
132
|
+
S(p.moveSelectionRight),
|
|
133
|
+
S(p.moveSelectionUp),
|
|
134
|
+
S(p.moveSelectionDown, !0),
|
|
135
|
+
S(p.expandSelectionRight),
|
|
136
|
+
S(p.expandSelectionLeft),
|
|
137
|
+
S(p.expandSelectionDown),
|
|
138
|
+
S(p.expandSelectionUp, !0),
|
|
139
|
+
S(p.moveCellLeft),
|
|
140
|
+
S(p.moveCellRight, !0),
|
|
141
|
+
S(p.moveRowUp),
|
|
142
|
+
S(p.moveRowDown),
|
|
143
|
+
S(p.moveRowToStart),
|
|
144
|
+
S(p.moveRowToEnd)
|
|
145
|
+
],
|
|
146
|
+
label: "Selection"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
items: [
|
|
150
|
+
S(p.scrollToLineStart),
|
|
151
|
+
S(p.scrollToLineEnd),
|
|
152
|
+
S(p.scrollPageUp),
|
|
153
|
+
S(p.scrollPageDown, !0),
|
|
154
|
+
S(p.gotoPosition)
|
|
155
|
+
],
|
|
156
|
+
label: "View"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
items: [
|
|
160
|
+
{
|
|
161
|
+
callback: () => t.resolve(f).emit("onRealign"),
|
|
162
|
+
divider: !0,
|
|
163
|
+
label: "Re-align all sequences"
|
|
164
|
+
},
|
|
165
|
+
S(p.insertGap),
|
|
166
|
+
S(p.deleteBackward),
|
|
167
|
+
S(p.deleteSelection),
|
|
168
|
+
S(p.deleteBase)
|
|
169
|
+
],
|
|
170
|
+
label: "Align"
|
|
171
|
+
}
|
|
172
|
+
].map((e) => e.items ? {
|
|
173
|
+
...e,
|
|
174
|
+
items: e.items.map((e) => ({
|
|
175
|
+
...e,
|
|
176
|
+
sx: i
|
|
177
|
+
}))
|
|
178
|
+
} : e), [i]);
|
|
179
|
+
return /* @__PURE__ */ m(r, {
|
|
180
|
+
sx: {
|
|
181
|
+
display: "flex",
|
|
182
|
+
gap: 1
|
|
183
|
+
},
|
|
184
|
+
children: a.map((t) => /* @__PURE__ */ m(e, {
|
|
185
|
+
ButtonProps: {
|
|
186
|
+
color: "inherit",
|
|
187
|
+
disabled: t.disabled,
|
|
188
|
+
size: "small",
|
|
189
|
+
variant: "text"
|
|
190
|
+
},
|
|
191
|
+
menuItemsData: t,
|
|
192
|
+
MenuProps: { elevation: 3 }
|
|
193
|
+
}, t.label))
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
export { w as SequenceEditorMenu };
|
|
197
|
+
|
|
198
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_jsx","NestedDropdown","container","useMemo","Box","KeyboardArrowDown","KeyboardArrowLeft","KeyboardArrowRight","KeyboardArrowUp","KeyboardCommandKey","KeyboardControlKey","KeyboardOptionKey","SpaceBar","SequenceEditorEventBusService","KEYBOARD_SHORTCUTS","jsx","MODIFIER_LABELS","MODIFIER_ICONS","CODE_KEYS","isMacOs","getActiveModifierGroup","modifierGroups","preferredModifier","modifierGroup","getShortcutKeys","shortcut","code","key","modifiers","keyLabel","modifier","renderShortcutKeys","keyGroups","label","keyItem","KeyIcon","createShortcutItem","divider","activeModifiers","createOsSpecificShortcutItems","shortcuts","SequenceEditorMenu","subItemSx","menuData","x","item"],"sources":["../../../../src/components/ui/SequenceEditorMenu/SequenceEditorMenu.tsx"],"sourcesContent":["import type { MenuItemData } from '@gen-epix/ui-core-components/models/nested-menu.models';\nimport { NestedDropdown } from '@gen-epix/ui-core-components/components/NestedMenu';\nimport { container } from 'tsyringe';\nimport { useMemo } from 'react';\nimport { Box } from '@mui/material';\nimport {\n KeyboardArrowDown,\n KeyboardArrowLeft,\n KeyboardArrowRight,\n KeyboardArrowUp,\n KeyboardCommandKey,\n KeyboardControlKey,\n KeyboardOptionKey,\n SpaceBar,\n} from '@mui/icons-material';\nimport type { SxProps } from '@mui/material';\nimport type { SvgIconProps } from '@mui/material/SvgIcon';\nimport type { ComponentType } from 'react';\nimport type { KeyboardModifier } from '@gen-epix/ui-core/classes/services/KeyboardShortcutService';\n\nimport { SequenceEditorEventBusService } from '../../../classes/services/SequenceEditorEventBusService';\nimport { KEYBOARD_SHORTCUTS } from '../../../constants';\n\ntype ShortcutKey = {\n icon?: ComponentType<SvgIconProps>;\n label: string;\n};\n\nconst MODIFIER_LABELS = new Map<KeyboardModifier, string>([\n ['Alt', 'Alt'],\n ['AltGraph', 'AltGr'],\n ['Control', 'Ctrl'],\n ['Meta', 'Cmd'],\n ['Shift', 'Shift'],\n]);\n\nconst MODIFIER_ICONS = new Map<KeyboardModifier, ComponentType<SvgIconProps>>([\n ['Alt', KeyboardOptionKey],\n ['Control', KeyboardControlKey],\n ['Meta', KeyboardCommandKey],\n]);\n\nconst CODE_KEYS = new Map<string, ShortcutKey>([\n ['ArrowDown', { icon: KeyboardArrowDown, label: 'Arrow down' }],\n ['ArrowLeft', { icon: KeyboardArrowLeft, label: 'Arrow left' }],\n ['ArrowRight', { icon: KeyboardArrowRight, label: 'Arrow right' }],\n ['ArrowUp', { icon: KeyboardArrowUp, label: 'Arrow up' }],\n ['Backspace', { label: 'Backspace' }],\n ['Delete', { label: 'Delete' }],\n ['End', { label: 'End' }],\n ['Home', { label: 'Home' }],\n ['PageDown', { label: 'Page down' }],\n ['PageUp', { label: 'Page up' }],\n ['Space', { icon: SpaceBar, label: 'Space' }],\n]);\n\ntype Shortcut = typeof KEYBOARD_SHORTCUTS[string];\n\nconst isMacOs = typeof navigator !== 'undefined' && /^(Mac|iPhone|iPad|iPod)/i.test(\n (navigator as { userAgentData?: { platform?: string } } & Navigator).userAgentData?.platform ?? navigator.platform,\n);\n\nconst getActiveModifierGroup = (modifierGroups: KeyboardModifier[][]): KeyboardModifier[] => {\n const preferredModifier = isMacOs ? 'Meta' : 'Control';\n return modifierGroups.find((modifierGroup) => modifierGroup.includes(preferredModifier)) ?? modifierGroups[0] ?? [];\n};\n\nconst getShortcutKeys = (shortcut: Shortcut): ShortcutKey[] => {\n const { code, key, modifiers = [] } = shortcut.shortcut;\n const keyLabel = code ? (CODE_KEYS.get(code) ?? { label: code }) : { label: key?.toUpperCase() ?? '' };\n const modifierGroup = getActiveModifierGroup(modifiers);\n return [\n ...modifierGroup.map((modifier) => ({\n icon: MODIFIER_ICONS.get(modifier),\n label: isMacOs && modifier === 'Alt' ? 'Option' : MODIFIER_LABELS.get(modifier) ?? modifier,\n })),\n keyLabel,\n ];\n};\n\nconst renderShortcutKeys = (shortcut: Shortcut) => {\n const keyGroups = getShortcutKeys(shortcut);\n\n return (\n <Box\n aria-label={keyGroups.map(({ label }) => label).join(' ')}\n sx={{ alignItems: 'center', display: 'flex', flexShrink: 0, gap: 0.5 }}\n >\n {keyGroups.map((keyItem) => {\n const KeyIcon = keyItem.icon;\n return (\n <Box\n aria-label={keyItem.label}\n component={'kbd'}\n key={keyItem.label}\n sx={{\n alignItems: 'center',\n backgroundColor: 'action.hover',\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: 0.75,\n boxShadow: '0 1px 0 rgba(0, 0, 0, 0.2)',\n color: 'text.primary',\n display: 'flex',\n fontFamily: 'monospace',\n fontSize: '0.5rem',\n justifyContent: 'center',\n lineHeight: 1,\n minWidth: keyItem.label.length === 1 ? 24 : 'auto',\n px: 0.75,\n py: 0.5,\n textAlign: 'center',\n }}\n >\n {KeyIcon ? (\n <KeyIcon\n aria-hidden\n fontSize={'inherit'}\n />\n ) : keyItem.label}\n </Box>\n );\n })}\n </Box>\n );\n};\n\nconst createShortcutItem = (shortcut: Shortcut, divider = false): MenuItemData => {\n const { code, key, modifiers = [] } = shortcut.shortcut;\n const activeModifiers = getActiveModifierGroup(modifiers);\n\n return {\n callback: () => shortcut.callback(new KeyboardEvent('keydown', {\n altKey: activeModifiers.includes('Alt'),\n code: code ?? '',\n ctrlKey: activeModifiers.includes('Control'),\n key: key ?? code ?? '',\n metaKey: activeModifiers.includes('Meta'),\n shiftKey: activeModifiers.includes('Shift'),\n })),\n divider,\n label: shortcut.description,\n rightIcon: renderShortcutKeys(shortcut),\n };\n};\n\nconst createOsSpecificShortcutItems = (...shortcuts: Shortcut[]): MenuItemData[] => shortcuts\n .filter(shortcut => (!shortcut.macOnly || isMacOs) && (!shortcut.nonMacOnly || !isMacOs))\n .map(shortcut => createShortcutItem(shortcut));\n\nexport const SequenceEditorMenu = () => {\n const subItemSx = useMemo<SxProps>(() => ({\n width: '350px',\n }), []);\n\n const menuData = useMemo<MenuItemData[]>(() => {\n return ([\n {\n items: [\n createShortcutItem(KEYBOARD_SHORTCUTS.undo),\n createShortcutItem(KEYBOARD_SHORTCUTS.redo, true),\n createShortcutItem(KEYBOARD_SHORTCUTS.copySelection),\n createShortcutItem(KEYBOARD_SHORTCUTS.pasteFasta, true),\n ...createOsSpecificShortcutItems(\n KEYBOARD_SHORTCUTS.deleteRows,\n KEYBOARD_SHORTCUTS.deleteRowsMac,\n ),\n ],\n label: 'Edit',\n },\n {\n items: [\n {\n callback: () => container.resolve(SequenceEditorEventBusService).emit('onDeselect'),\n divider: true,\n label: 'Deselect',\n },\n createShortcutItem(KEYBOARD_SHORTCUTS.moveSelectionLeft),\n createShortcutItem(KEYBOARD_SHORTCUTS.moveSelectionRight),\n createShortcutItem(KEYBOARD_SHORTCUTS.moveSelectionUp),\n createShortcutItem(KEYBOARD_SHORTCUTS.moveSelectionDown, true),\n\n createShortcutItem(KEYBOARD_SHORTCUTS.expandSelectionRight),\n createShortcutItem(KEYBOARD_SHORTCUTS.expandSelectionLeft),\n createShortcutItem(KEYBOARD_SHORTCUTS.expandSelectionDown),\n createShortcutItem(KEYBOARD_SHORTCUTS.expandSelectionUp, true),\n\n createShortcutItem(KEYBOARD_SHORTCUTS.moveCellLeft),\n createShortcutItem(KEYBOARD_SHORTCUTS.moveCellRight, true),\n\n createShortcutItem(KEYBOARD_SHORTCUTS.moveRowUp),\n createShortcutItem(KEYBOARD_SHORTCUTS.moveRowDown),\n createShortcutItem(KEYBOARD_SHORTCUTS.moveRowToStart),\n createShortcutItem(KEYBOARD_SHORTCUTS.moveRowToEnd),\n ],\n label: 'Selection',\n },\n {\n items: [\n createShortcutItem(KEYBOARD_SHORTCUTS.scrollToLineStart),\n createShortcutItem(KEYBOARD_SHORTCUTS.scrollToLineEnd),\n createShortcutItem(KEYBOARD_SHORTCUTS.scrollPageUp),\n createShortcutItem(KEYBOARD_SHORTCUTS.scrollPageDown, true),\n createShortcutItem(KEYBOARD_SHORTCUTS.gotoPosition),\n ],\n label: 'View',\n },\n {\n items: [\n {\n callback: () => container.resolve(SequenceEditorEventBusService).emit('onRealign'),\n divider: true,\n label: 'Re-align all sequences',\n },\n createShortcutItem(KEYBOARD_SHORTCUTS.insertGap),\n createShortcutItem(KEYBOARD_SHORTCUTS.deleteBackward),\n createShortcutItem(KEYBOARD_SHORTCUTS.deleteSelection),\n createShortcutItem(KEYBOARD_SHORTCUTS.deleteBase),\n ],\n label: 'Align',\n },\n ] satisfies MenuItemData[]).map(x => x.items ? { ...x, items: x.items.map(item => ({ ...item, sx: subItemSx })) } : x);\n }, [subItemSx]);\n\n return (\n <Box\n sx={{\n display: 'flex',\n gap: 1,\n }}\n >\n {menuData.map((item) => (\n <NestedDropdown\n ButtonProps={{\n color: 'inherit',\n disabled: item.disabled,\n size: 'small',\n variant: 'text',\n }}\n key={item.label}\n menuItemsData={item}\n MenuProps={{ elevation: 3 }}\n />\n ))}\n\n </Box>\n );\n};\n"],"mappings":";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cAAc;IACpDsB,EAAmBtB,EAAmB,YAAY;GACpD;GACA,OAAO;EACT;EACA;GACE,OAAO;IACLsB,EAAmBtB,EAAmB,iBAAiB;IACvDsB,EAAmBtB,EAAmB,eAAe;IACrDsB,EAAmBtB,EAAmB,YAAY;IAClDsB,EAAmBtB,EAAmB,gBAAgB,EAAI;IAC1DsB,EAAmBtB,EAAmB,YAAY;GACpD;GACA,OAAO;EACT;EACA;GACE,OAAO;IACL;KACE,gBAAgBZ,EAAU,QAAQW,CAA6B,CAAC,CAAC,KAAK,WAAW;KACjF,SAAS;KACT,OAAO;IACT;IACAuB,EAAmBtB,EAAmB,SAAS;IAC/CsB,EAAmBtB,EAAmB,cAAc;IACpDsB,EAAmBtB,EAAmB,eAAe;IACrDsB,EAAmBtB,EAAmB,UAAU;GAClD;GACA,OAAO;EACT;CACF,CAAC,CAA2B,KAAI8B,MAAKA,EAAE,QAAQ;EAAE,GAAGA;EAAG,OAAOA,EAAE,MAAM,KAAIC,OAAS;GAAE,GAAGA;GAAM,IAAIH;EAAU,EAAE;CAAE,IAAIE,CAAC,GACpH,CAACF,CAAS,CAAC;CAEd,OACE1C,kBAACI,GAAD;EACE,IAAI;GACF,SAAS;GACT,KAAK;EACP;EAEC,UAAAuC,EAAS,KAAKE,MACb7C,kBAACC,GAAD;GACE,aAAa;IACX,OAAO;IACP,UAAU4C,EAAK;IACf,MAAM;IACN,SAAS;GACX;GAEA,eAAeA;GACf,WAAW,EAAE,WAAW,EAAE;EAC3B,GAHMA,EAAK,KAGX,CACF;CAEE,CAAA;AAET"}
|
|
@@ -1 +1,86 @@
|
|
|
1
|
-
|
|
1
|
+
import { container as e } from "tsyringe";
|
|
2
|
+
import { FastaPageHeaderCenterComponent as t } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderCenterComponent";
|
|
3
|
+
import { FastaPageHeaderImportButton as n } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderImportButton";
|
|
4
|
+
import { FastaPageHeaderResetButton as r } from "@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderResetButton";
|
|
5
|
+
import { PageCommonHeader as i } from "@rivm-loculus-tools/common-frontend/components/ui/PageCommonHeader";
|
|
6
|
+
import { useCallback as a, useMemo as o, useSyncExternalStore as s } from "react";
|
|
7
|
+
import { UrlService as c } from "@rivm-loculus-tools/common-frontend/classes/services/UrlService";
|
|
8
|
+
import l from "@mui/icons-material/ImportExport";
|
|
9
|
+
import u from "@mui/icons-material/Code";
|
|
10
|
+
import d from "@mui/icons-material/Publish";
|
|
11
|
+
import { t as f } from "../../../_chunks/react.js";
|
|
12
|
+
import { ButtonWithMenu as p } from "@rivm-loculus-tools/common-frontend/components/ui/ButtonWithMenu";
|
|
13
|
+
import m from "@mui/icons-material/FileDownloadOutlined";
|
|
14
|
+
import { LoculusService as h } from "@rivm-loculus-tools/common-frontend/classes/services/LoculusService";
|
|
15
|
+
import { useConfig as g } from "@rivm-loculus-tools/common-frontend/hooks/useConfig";
|
|
16
|
+
import { t as _ } from "../../../_chunks/sequenceEditorStore.js";
|
|
17
|
+
import { t as v } from "../../../_chunks/SequenceEditorEventBusService.js";
|
|
18
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
19
|
+
// src/components/ui/SequenceEditorPageHeader/SequenceEditorPageHeader.tsx
|
|
20
|
+
var S = () => {
|
|
21
|
+
let S = o(() => e.resolve(h), []), C = o(() => e.resolve(c), []), w = g(), T = s(a((e) => S.subscribe(e), [S]), a(() => S.data.authenticated, [S]), () => !1), E = s(a((e) => C.subscribe(e), [C]), a(() => C.hasReturnParams(), [C]), () => !1), D = f(_, (e) => e.resetDataset), O = f(_, (e) => e.engineMeta?.sequenceCount ?? 0), k = f(_, (e) => e.parsedMetadata), A = f(_, (e) => !!e.rawFasta), j = a(() => {
|
|
22
|
+
D();
|
|
23
|
+
}, [D]), M = a(() => {
|
|
24
|
+
e.resolve(v).emit("onExportUngappedFasta");
|
|
25
|
+
}, []), N = a(() => {
|
|
26
|
+
e.resolve(v).emit("onExportGappedFasta");
|
|
27
|
+
}, []), P = a(() => {
|
|
28
|
+
e.resolve(v).emit("onExportToLoculus");
|
|
29
|
+
}, []), F = a(() => {
|
|
30
|
+
e.resolve(v).emit("onOpenInPhylogenyViewer");
|
|
31
|
+
}, []), I = o(() => [
|
|
32
|
+
{
|
|
33
|
+
disabled: !T || !A || !E || !k,
|
|
34
|
+
icon: /* @__PURE__ */ b(d, { fontSize: "small" }),
|
|
35
|
+
label: "Export to loculus",
|
|
36
|
+
onClick: P
|
|
37
|
+
},
|
|
38
|
+
w.phylogenyViewerUrl && {
|
|
39
|
+
disabled: !A,
|
|
40
|
+
icon: /* @__PURE__ */ b(l, { fontSize: "small" }),
|
|
41
|
+
label: "Open in Phylogeny Viewer",
|
|
42
|
+
onClick: F
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
disabled: !A,
|
|
46
|
+
icon: /* @__PURE__ */ b(u, { fontSize: "small" }),
|
|
47
|
+
label: "Save as Ungapped Fasta (.fasta)",
|
|
48
|
+
onClick: M
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
disabled: !A,
|
|
52
|
+
icon: /* @__PURE__ */ b(u, { fontSize: "small" }),
|
|
53
|
+
label: "Save as Gapped Fasta (.fasta)",
|
|
54
|
+
onClick: N
|
|
55
|
+
}
|
|
56
|
+
].filter(Boolean), [
|
|
57
|
+
T,
|
|
58
|
+
A,
|
|
59
|
+
E,
|
|
60
|
+
k,
|
|
61
|
+
P,
|
|
62
|
+
w.phylogenyViewerUrl,
|
|
63
|
+
F,
|
|
64
|
+
M,
|
|
65
|
+
N
|
|
66
|
+
]), L = k?.records?.length || 0;
|
|
67
|
+
return /* @__PURE__ */ b(i, {
|
|
68
|
+
centerComponent: /* @__PURE__ */ b(t, {
|
|
69
|
+
metaDataCount: L,
|
|
70
|
+
sequenceCount: O
|
|
71
|
+
}),
|
|
72
|
+
rightComponent: /* @__PURE__ */ x(y, { children: [
|
|
73
|
+
/* @__PURE__ */ b(r, { onReset: j }),
|
|
74
|
+
/* @__PURE__ */ b(n, {}),
|
|
75
|
+
/* @__PURE__ */ b(p, {
|
|
76
|
+
items: I,
|
|
77
|
+
label: "Export",
|
|
78
|
+
startIcon: /* @__PURE__ */ b(m, {})
|
|
79
|
+
})
|
|
80
|
+
] }),
|
|
81
|
+
title: "Sequence Editor"
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
export { S as SequenceEditorPageHeader };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_jsx","_jsxs","_Fragment","container","FastaPageHeaderCenterComponent","FastaPageHeaderImportButton","FastaPageHeaderResetButton","PageCommonHeader","useCallback","useMemo","useSyncExternalStore","UrlService","ImportExportIcon","CodeIcon","PublishIcon","useStore","ButtonWithMenu","FileDownloadOutlinedIcon","LoculusService","useConfig","sequenceEditorStore","SequenceEditorEventBusService","Fragment","jsx","jsxs","SequenceEditorPageHeader","loculusService","urlService","config","isAuthenticated","onStoreChange","hasReturnParams","resetDataset","state","sequenceCount","parsedMetadata","hasFasta","onReset","onClickExportFasta","onClickExportGappedFasta","onClickUploadToLoculus","onClickOpenInPhylogenyViewer","exportExportMenuItems","metaDataCount"],"sources":["../../../../src/components/ui/SequenceEditorPageHeader/SequenceEditorPageHeader.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport { FastaPageHeaderCenterComponent } from '@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderCenterComponent';\nimport { FastaPageHeaderImportButton } from '@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderImportButton';\nimport { FastaPageHeaderResetButton } from '@rivm-loculus-tools/common-frontend/components/fasta/FastaPageHeaderResetButton';\nimport { PageCommonHeader } from '@rivm-loculus-tools/common-frontend/components/ui/PageCommonHeader';\nimport {\n useCallback,\n useMemo,\n useSyncExternalStore,\n} from 'react';\nimport { UrlService } from '@rivm-loculus-tools/common-frontend/classes/services/UrlService';\nimport ImportExportIcon from '@mui/icons-material/ImportExport';\nimport CodeIcon from '@mui/icons-material/Code';\nimport PublishIcon from '@mui/icons-material/Publish';\nimport { useStore } from 'zustand';\nimport { ButtonWithMenu } from '@rivm-loculus-tools/common-frontend/components/ui/ButtonWithMenu';\nimport type { ButtonWithMenuProps } from '@rivm-loculus-tools/common-frontend/components/ui/ButtonWithMenu';\nimport FileDownloadOutlinedIcon from '@mui/icons-material/FileDownloadOutlined';\nimport { LoculusService } from '@rivm-loculus-tools/common-frontend/classes/services/LoculusService';\nimport { useConfig } from '@rivm-loculus-tools/common-frontend/hooks/useConfig';\n\nimport { sequenceEditorStore } from '../../../stores/sequenceEditorStore';\nimport { SequenceEditorEventBusService } from '../../../classes/services/SequenceEditorEventBusService';\nimport type { SequenceEditorConfig } from '../../../models/config.models';\n\nexport const SequenceEditorPageHeader = () => {\n const loculusService = useMemo(() => container.resolve(LoculusService), []);\n const urlService = useMemo(() => container.resolve(UrlService), []);\n const config = useConfig<SequenceEditorConfig>();\n\n const isAuthenticated = useSyncExternalStore(\n useCallback((onStoreChange) => loculusService.subscribe(onStoreChange), [loculusService]),\n useCallback(() => loculusService.data.authenticated, [loculusService]),\n () => false,\n );\n\n const hasReturnParams = useSyncExternalStore(\n useCallback((onStoreChange) => urlService.subscribe(onStoreChange), [urlService]),\n useCallback(() => urlService.hasReturnParams(), [urlService]),\n () => false,\n );\n\n const resetDataset = useStore(sequenceEditorStore, (state) => state.resetDataset);\n\n const sequenceCount = useStore(sequenceEditorStore, (state) => state.engineMeta?.sequenceCount ?? 0);\n const parsedMetadata = useStore(sequenceEditorStore, (state) => state.parsedMetadata);\n const hasFasta = useStore(sequenceEditorStore, (state) => !!state.rawFasta);\n\n const onReset = useCallback(() => {\n resetDataset();\n }, [resetDataset]);\n\n const onClickExportFasta = useCallback(() => {\n container.resolve(SequenceEditorEventBusService).emit('onExportUngappedFasta');\n }, []);\n\n const onClickExportGappedFasta = useCallback(() => {\n container.resolve(SequenceEditorEventBusService).emit('onExportGappedFasta');\n }, []);\n\n const onClickUploadToLoculus = useCallback(() => {\n container.resolve(SequenceEditorEventBusService).emit('onExportToLoculus');\n }, []);\n\n const onClickOpenInPhylogenyViewer = useCallback(() => {\n container.resolve(SequenceEditorEventBusService).emit('onOpenInPhylogenyViewer');\n }, []);\n\n const exportExportMenuItems: ButtonWithMenuProps['items'] = useMemo(() => {\n return [\n {\n disabled: !isAuthenticated || !hasFasta || !hasReturnParams || !parsedMetadata,\n icon: <PublishIcon fontSize={'small'} />,\n label: 'Export to loculus',\n onClick: onClickUploadToLoculus,\n },\n config.phylogenyViewerUrl && {\n disabled: !hasFasta,\n icon: <ImportExportIcon fontSize={'small'} />,\n label: 'Open in Phylogeny Viewer',\n onClick: onClickOpenInPhylogenyViewer,\n },\n {\n disabled: !hasFasta,\n icon: <CodeIcon fontSize={'small'} />,\n label: 'Save as Ungapped Fasta (.fasta)',\n onClick: onClickExportFasta,\n },\n {\n disabled: !hasFasta,\n icon: <CodeIcon fontSize={'small'} />,\n label: 'Save as Gapped Fasta (.fasta)',\n onClick: onClickExportGappedFasta,\n },\n ].filter(Boolean) as ButtonWithMenuProps['items'];\n }, [isAuthenticated, hasFasta, hasReturnParams, parsedMetadata, onClickUploadToLoculus, config.phylogenyViewerUrl, onClickOpenInPhylogenyViewer, onClickExportFasta, onClickExportGappedFasta]);\n\n const metaDataCount = parsedMetadata?.records?.length || 0;\n\n return (\n <PageCommonHeader\n centerComponent={(\n <FastaPageHeaderCenterComponent\n metaDataCount={metaDataCount}\n sequenceCount={sequenceCount}\n />\n )}\n rightComponent={(\n <>\n <FastaPageHeaderResetButton onReset={onReset} />\n <FastaPageHeaderImportButton />\n <ButtonWithMenu\n items={exportExportMenuItems}\n label={'Export'}\n startIcon={<FileDownloadOutlinedIcon />}\n />\n </>\n )}\n title={'Sequence Editor'}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;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U,CAACoB,KAAmB,CAACO,KAAY,CAACL,KAAmB,CAACI;GAChE,MAAMnC,kBAACc,GAAD,EAAa,UAAU,QAAU,CAAA;GACvC,OAAO;GACP,SAAS0B;EACX;EACAZ,EAAO,sBAAsB;GAC3B,UAAU,CAACQ;GACX,MAAMpC,kBAACY,GAAD,EAAkB,UAAU,QAAU,CAAA;GAC5C,OAAO;GACP,SAAS6B;EACX;EACA;GACE,UAAU,CAACL;GACX,MAAMpC,kBAACa,GAAD,EAAU,UAAU,QAAU,CAAA;GACpC,OAAO;GACP,SAASyB;EACX;EACA;GACE,UAAU,CAACF;GACX,MAAMpC,kBAACa,GAAD,EAAU,UAAU,QAAU,CAAA;GACpC,OAAO;GACP,SAAS0B;EACX;CACF,CAAC,CAAC,OAAO,OAAO,GACf;EAACV;EAAiBO;EAAUL;EAAiBI;EAAgBK;EAAwBZ,EAAO;EAAoBa;EAA8BH;EAAoBC;CAAwB,CAAC,GAExLI,IAAgBR,GAAgB,SAAS,UAAU;CAEzD,OACEnC,kBAACO,GAAD;EACE,iBACEP,kBAACI,GAAD;GACiBuC;GACAT;EAChB,CAAA;EAEH,gBACEjC,kBAAAC,GAAA,EAAA,UAAA;GACEF,kBAACM,GAAD,EAAqC+B,WAAU,CAAA;GAC/CrC,kBAACK,GAAD,CAA8B,CAAA;GAC9BL,kBAACgB,GAAD;IACE,OAAO0B;IACP,OAAO;IACP,WAAW1C,kBAACiB,GAAD,CAA2B,CAAA;GACvC,CAAA;EACD,EAAA,CAAA;EAEJ,OAAO;CACR,CAAA;AAEL"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Box as e, CircularProgress as t, Typography as n } from "@mui/material";
|
|
2
|
+
import { withDialog as r } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
3
|
+
import { useCallback as i, useEffect as a } from "react";
|
|
4
4
|
import { container as o } from "tsyringe";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { t as s } from "../../../_chunks/SequenceEditorEventBusService.js";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
7
|
// src/components/ui/SequenceEditorRealignModal/SequenceEditorRealignModal.tsx
|
|
8
|
-
var u =
|
|
9
|
-
let u =
|
|
10
|
-
o.resolve(
|
|
8
|
+
var u = r(({ onActionsChange: r }) => {
|
|
9
|
+
let u = i(() => {
|
|
10
|
+
o.resolve(s).emit("onCancelRealign");
|
|
11
11
|
}, []);
|
|
12
|
-
return
|
|
13
|
-
|
|
12
|
+
return a(() => {
|
|
13
|
+
r?.([{
|
|
14
14
|
color: "primary",
|
|
15
15
|
label: "Cancel",
|
|
16
16
|
onClick: u,
|
|
17
17
|
variant: "outlined"
|
|
18
18
|
}]);
|
|
19
|
-
}, [
|
|
19
|
+
}, [r, u]), /* @__PURE__ */ l(e, {
|
|
20
20
|
sx: {
|
|
21
21
|
alignItems: "center",
|
|
22
22
|
display: "flex",
|
|
@@ -26,10 +26,10 @@ var u = l(({ onActionsChange: l }) => {
|
|
|
26
26
|
textAlign: "center",
|
|
27
27
|
width: "100%"
|
|
28
28
|
},
|
|
29
|
-
children: [/* @__PURE__ */
|
|
29
|
+
children: [/* @__PURE__ */ c(t, {
|
|
30
30
|
color: "primary",
|
|
31
31
|
size: 36
|
|
32
|
-
}), /* @__PURE__ */
|
|
32
|
+
}), /* @__PURE__ */ c(n, {
|
|
33
33
|
color: "text.secondary",
|
|
34
34
|
variant: "body2",
|
|
35
35
|
children: "Sequence (re-)alignment in progress using MAFFT (progressive alignment with FFT-NS-1). This may take a while depending on the amount of sequences."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_jsxs","_jsx","Box","CircularProgress","Typography","withDialog","useCallback","useEffect","container","SequenceEditorEventBusService","jsx","jsxs","SequenceEditorRealignModal","onActionsChange","onCancelClick"],"sources":["../../../../src/components/ui/SequenceEditorRealignModal/SequenceEditorRealignModal.tsx"],"sourcesContent":["import {\n Box,\n CircularProgress,\n Typography,\n} from '@mui/material';\nimport type {\n WithDialogRefMethods,\n WithDialogRenderProps,\n} from '@gen-epix/ui-core-components/hoc/withDialog';\nimport { withDialog } from '@gen-epix/ui-core-components/hoc/withDialog';\nimport type { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';\nimport type { ReactElement } from 'react';\nimport {\n useCallback,\n useEffect,\n} from 'react';\nimport { container } from 'tsyringe';\n\nimport { SequenceEditorEventBusService } from '../../../classes/services/SequenceEditorEventBusService';\n\nexport interface SequenceEditorRealignModalOpenProps {\n //\n}\n\nexport interface SequenceEditorRealignModalProps extends WithDialogRenderProps<SequenceEditorRealignModalOpenProps> {\n //\n}\n\nexport type SequenceEditorRealignModalRefMethods = WithDialogRefMethods<SequenceEditorRealignModalProps, SequenceEditorRealignModalOpenProps>;\n\nexport const SequenceEditorRealignModal = withDialog<SequenceEditorRealignModalProps, SequenceEditorRealignModalOpenProps>((\n {\n onActionsChange,\n }: SequenceEditorRealignModalProps,\n): ReactElement => {\n const onCancelClick = useCallback(() => {\n container.resolve(SequenceEditorEventBusService).emit('onCancelRealign');\n }, []);\n\n useEffect(() => {\n const actions: DialogAction[] = [\n {\n color: 'primary',\n label: 'Cancel',\n onClick: onCancelClick,\n variant: 'outlined',\n },\n ];\n onActionsChange?.(actions);\n }, [onActionsChange, onCancelClick]);\n\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n gap: 2,\n p: 3,\n textAlign: 'center',\n width: '100%',\n }}\n >\n <CircularProgress\n color={'primary'}\n size={36}\n />\n <Typography\n color={'text.secondary'}\n variant={'body2'}\n >\n {'Sequence (re-)alignment in progress using MAFFT (progressive alignment with FFT-NS-1). This may take a while depending on the amount of sequences.'}\n </Typography>\n </Box>\n );\n\n}, {\n defaultTitle: 'Sequence Re-alignment',\n disableBackdropClick: true,\n fullWidth: true,\n maxWidth: 'sm',\n noCloseButton: true,\n noPadding: true,\n testId: 'SequenceEditorRealignModal',\n});\n"],"mappings":";;;;;;;AA8BA,IAAaY,IAA6BP,GACxC,EACEQ,yBAEe;CACjB,IAAMC,IAAgBR,QAAkB;EACtCE,EAAU,QAAQC,CAA6B,CAAC,CAAC,KAAK,iBAAiB;CACzE,GAAG,CAAC,CAAC;CAcL,OAZAF,QAAgB;EASdM,IAAkB,CAPhB;GACE,OAAO;GACP,OAAO;GACP,SAASC;GACT,SAAS;EACX,CAEgB,CAAO;CAC3B,GAAG,CAACD,GAAiBC,CAAa,CAAC,GAGjCd,kBAACE,GAAD;EACE,IAAI;GACF,YAAY;GACZ,SAAS;GACT,eAAe;GACf,KAAK;GACL,GAAG;GACH,WAAW;GACX,OAAO;EACT;EATF,UAAA,CAWED,kBAACE,GAAD;GACE,OAAO;GACP,MAAM;EACP,CAAA,GACDF,kBAACG,GAAD;GACE,OAAO;GACP,SAAS;GAER,UAAA;EACS,CAAA,CACT;;AAGT,GAAG;CACD,cAAc;CACd,sBAAsB;CACtB,WAAW;CACX,UAAU;CACV,eAAe;CACf,WAAW;CACX,QAAQ;AACV,CAAC"}
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "
|
|
3
|
-
import {
|
|
1
|
+
import { container as e } from "tsyringe";
|
|
2
|
+
import { Box as t } from "@mui/material";
|
|
3
|
+
import { SearchBar as n } from "@rivm-loculus-tools/common-frontend/components/ui/SearchBar";
|
|
4
4
|
import { useCallback as r } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { t as i } from "../../../_chunks/react.js";
|
|
6
|
+
import { t as a } from "../../../_chunks/sequenceEditorStore.js";
|
|
7
|
+
import { t as o } from "../../../_chunks/SequenceEditorEventBusService.js";
|
|
8
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
8
9
|
// src/components/ui/SequenceEditorSearchBar/SequenceEditorSearchBar.tsx
|
|
9
|
-
var
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
}, [
|
|
13
|
-
|
|
14
|
-
}, [
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
var c = () => {
|
|
11
|
+
let c = i(a, (e) => e.setSearchQuery), l = i(a, (e) => e.setSearchResultHighlightedIndex), u = i(a, (e) => e.searchQuery), d = i(a, (e) => e.searchResult), f = i(a, (e) => e.searchResultHighlightedIndex), p = r((t) => {
|
|
12
|
+
c(t), e.resolve(o).emit("onSearch", t);
|
|
13
|
+
}, [c]), m = r((e) => {
|
|
14
|
+
l(e);
|
|
15
|
+
}, [l]);
|
|
16
|
+
return /* @__PURE__ */ s(t, {
|
|
17
|
+
sx: { marginRight: 1 },
|
|
18
|
+
children: /* @__PURE__ */ s(n, {
|
|
19
|
+
allowNavigation: !0,
|
|
20
|
+
highlightedIndex: f,
|
|
21
|
+
numResults: d?.num_matches,
|
|
22
|
+
onHighlightedIndexChange: m,
|
|
23
|
+
onSearchQueryChange: p,
|
|
24
|
+
searchQuery: u,
|
|
25
|
+
truncated: d?.truncated
|
|
26
|
+
})
|
|
23
27
|
});
|
|
24
28
|
};
|
|
25
|
-
export {
|
|
29
|
+
export { c as SequenceEditorSearchBar };
|
|
26
30
|
|
|
27
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["sequenceEditorStore","SequenceEditorEventBusService","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_jsx","container","Box","SearchBar","useCallback","useStore","sequenceEditorStore","SequenceEditorEventBusService","jsx","SequenceEditorSearchBar","setSearchQuery","state","setSearchHighlightedIndex","searchQuery","searchResults","searchHighlightedIndex","onSearchQueryChange","query","onHighlightedIndexChange","index"],"sources":["../../../../src/components/ui/SequenceEditorSearchBar/SequenceEditorSearchBar.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport { Box } from '@mui/material';\nimport { SearchBar } from '@rivm-loculus-tools/common-frontend/components/ui/SearchBar';\nimport { useCallback } from 'react';\nimport { useStore } from 'zustand';\n\nimport { sequenceEditorStore } from '../../../stores/sequenceEditorStore';\nimport { SequenceEditorEventBusService } from '../../../classes/services/SequenceEditorEventBusService';\n\nexport const SequenceEditorSearchBar = () => {\n const setSearchQuery = useStore(sequenceEditorStore, (state) => state.setSearchQuery);\n const setSearchHighlightedIndex = useStore(sequenceEditorStore, (state) => state.setSearchResultHighlightedIndex);\n const searchQuery = useStore(sequenceEditorStore, (state) => state.searchQuery);\n const searchResults = useStore(sequenceEditorStore, (state) => state.searchResult);\n const searchHighlightedIndex = useStore(sequenceEditorStore, (state) => state.searchResultHighlightedIndex);\n\n const onSearchQueryChange = useCallback((query: string) => {\n setSearchQuery(query);\n container.resolve(SequenceEditorEventBusService).emit('onSearch', query);\n }, [setSearchQuery]);\n\n const onHighlightedIndexChange = useCallback((index: number) => {\n setSearchHighlightedIndex(index);\n }, [setSearchHighlightedIndex]);\n\n return (\n <Box sx={{ marginRight: 1 }}>\n <SearchBar\n allowNavigation\n highlightedIndex={searchHighlightedIndex}\n numResults={searchResults?.num_matches}\n onHighlightedIndexChange={onHighlightedIndexChange}\n onSearchQueryChange={onSearchQueryChange}\n searchQuery={searchQuery}\n truncated={searchResults?.truncated}\n />\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;AASA,IAAaS,UAAgC;CAC3C,IAAMC,IAAiBL,EAASC,IAAsBK,MAAUA,EAAM,cAAc,GAC9EC,IAA4BP,EAASC,IAAsBK,MAAUA,EAAM,+BAA+B,GAC1GE,IAAcR,EAASC,IAAsBK,MAAUA,EAAM,WAAW,GACxEG,IAAgBT,EAASC,IAAsBK,MAAUA,EAAM,YAAY,GAC3EI,IAAyBV,EAASC,IAAsBK,MAAUA,EAAM,4BAA4B,GAEpGK,IAAsBZ,GAAaa,MAAkB;EACzDP,EAAeO,CAAK,GACpBhB,EAAU,QAAQM,CAA6B,CAAC,CAAC,KAAK,YAAYU,CAAK;CACzE,GAAG,CAACP,CAAc,CAAC,GAEbQ,IAA2Bd,GAAae,MAAkB;EAC9DP,EAA0BO,CAAK;CACjC,GAAG,CAACP,CAAyB,CAAC;CAE9B,OACEZ,kBAACE,GAAD;EAAK,IAAI,EAAE,aAAa,EAAE;EACxB,UAAAF,kBAACG,GAAD;GACE,iBAAA;GACA,kBAAkBY;GAClB,YAAYD,GAAe;GACDI;GACLF;GACRH;GACb,WAAWC,GAAe;EAC3B,CAAA;CACE,CAAA;AAET"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { container as e } from "tsyringe";
|
|
2
|
+
import { t } from "../_chunks/SequenceEditorEventBusService.js";
|
|
3
|
+
import { EDITOR_DIRECTION as n } from "../models/editor.models.js";
|
|
4
4
|
// src/constants/keyboard.ts
|
|
5
|
-
var r = (
|
|
6
|
-
i.preventDefault(),
|
|
7
|
-
}, i = (
|
|
8
|
-
r.preventDefault(),
|
|
9
|
-
}, a = () => (
|
|
10
|
-
let r =
|
|
11
|
-
r instanceof HTMLElement && (r.isContentEditable || r.closest("input, textarea, select")) || (
|
|
12
|
-
}, o = (
|
|
13
|
-
r.preventDefault(),
|
|
5
|
+
var r = (n, r) => (i) => {
|
|
6
|
+
i.preventDefault(), e.resolve(t).emit(n, r);
|
|
7
|
+
}, i = (n) => (r) => {
|
|
8
|
+
r.preventDefault(), e.resolve(t).emit(n);
|
|
9
|
+
}, a = () => (n) => {
|
|
10
|
+
let r = n.target;
|
|
11
|
+
r instanceof HTMLElement && (r.isContentEditable || r.closest("input, textarea, select")) || (n.preventDefault(), e.resolve(t).emit("onPasteFasta"));
|
|
12
|
+
}, o = (n) => (r) => {
|
|
13
|
+
r.preventDefault(), e.resolve(t).emit("onMutateSelection", n);
|
|
14
14
|
}, s = {
|
|
15
15
|
copySelection: {
|
|
16
16
|
callback: i("onCopySelection"),
|
|
@@ -54,7 +54,7 @@ var r = (t, r) => (i) => {
|
|
|
54
54
|
shortcut: { code: "Delete" }
|
|
55
55
|
},
|
|
56
56
|
expandSelectionDown: {
|
|
57
|
-
callback: r("onExpandSelection",
|
|
57
|
+
callback: r("onExpandSelection", n.DOWN),
|
|
58
58
|
description: "Expand selection down",
|
|
59
59
|
shortcut: {
|
|
60
60
|
code: "ArrowDown",
|
|
@@ -62,7 +62,7 @@ var r = (t, r) => (i) => {
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
expandSelectionLeft: {
|
|
65
|
-
callback: r("onExpandSelection",
|
|
65
|
+
callback: r("onExpandSelection", n.LEFT),
|
|
66
66
|
description: "Expand selection left",
|
|
67
67
|
shortcut: {
|
|
68
68
|
code: "ArrowLeft",
|
|
@@ -70,7 +70,7 @@ var r = (t, r) => (i) => {
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
expandSelectionRight: {
|
|
73
|
-
callback: r("onExpandSelection",
|
|
73
|
+
callback: r("onExpandSelection", n.RIGHT),
|
|
74
74
|
description: "Expand selection right",
|
|
75
75
|
shortcut: {
|
|
76
76
|
code: "ArrowRight",
|
|
@@ -78,7 +78,7 @@ var r = (t, r) => (i) => {
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
expandSelectionUp: {
|
|
81
|
-
callback: r("onExpandSelection",
|
|
81
|
+
callback: r("onExpandSelection", n.UP),
|
|
82
82
|
description: "Expand selection up",
|
|
83
83
|
shortcut: {
|
|
84
84
|
code: "ArrowUp",
|
|
@@ -99,7 +99,7 @@ var r = (t, r) => (i) => {
|
|
|
99
99
|
shortcut: { code: "Space" }
|
|
100
100
|
},
|
|
101
101
|
moveCellLeft: {
|
|
102
|
-
callback: r("onMoveCells",
|
|
102
|
+
callback: r("onMoveCells", n.LEFT),
|
|
103
103
|
description: "Move cell left",
|
|
104
104
|
shortcut: {
|
|
105
105
|
code: "ArrowLeft",
|
|
@@ -107,7 +107,7 @@ var r = (t, r) => (i) => {
|
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
moveCellRight: {
|
|
110
|
-
callback: r("onMoveCells",
|
|
110
|
+
callback: r("onMoveCells", n.RIGHT),
|
|
111
111
|
description: "Move cell right",
|
|
112
112
|
shortcut: {
|
|
113
113
|
code: "ArrowRight",
|
|
@@ -115,7 +115,7 @@ var r = (t, r) => (i) => {
|
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
moveRowDown: {
|
|
118
|
-
callback: r("onMoveRows",
|
|
118
|
+
callback: r("onMoveRows", n.DOWN),
|
|
119
119
|
description: "Move row down",
|
|
120
120
|
shortcut: {
|
|
121
121
|
code: "ArrowDown",
|
|
@@ -123,7 +123,7 @@ var r = (t, r) => (i) => {
|
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
moveRowToEnd: {
|
|
126
|
-
callback: r("onMoveRowsEnd",
|
|
126
|
+
callback: r("onMoveRowsEnd", n.DOWN),
|
|
127
127
|
description: "Move row to end",
|
|
128
128
|
shortcut: {
|
|
129
129
|
code: "ArrowDown",
|
|
@@ -131,7 +131,7 @@ var r = (t, r) => (i) => {
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
moveRowToStart: {
|
|
134
|
-
callback: r("onMoveRowsEnd",
|
|
134
|
+
callback: r("onMoveRowsEnd", n.UP),
|
|
135
135
|
description: "Move row to start",
|
|
136
136
|
shortcut: {
|
|
137
137
|
code: "ArrowUp",
|
|
@@ -139,7 +139,7 @@ var r = (t, r) => (i) => {
|
|
|
139
139
|
}
|
|
140
140
|
},
|
|
141
141
|
moveRowUp: {
|
|
142
|
-
callback: r("onMoveRows",
|
|
142
|
+
callback: r("onMoveRows", n.UP),
|
|
143
143
|
description: "Move row up",
|
|
144
144
|
shortcut: {
|
|
145
145
|
code: "ArrowUp",
|
|
@@ -147,22 +147,22 @@ var r = (t, r) => (i) => {
|
|
|
147
147
|
}
|
|
148
148
|
},
|
|
149
149
|
moveSelectionDown: {
|
|
150
|
-
callback: r("onMoveSelection",
|
|
150
|
+
callback: r("onMoveSelection", n.DOWN),
|
|
151
151
|
description: "Move selection down",
|
|
152
152
|
shortcut: { code: "ArrowDown" }
|
|
153
153
|
},
|
|
154
154
|
moveSelectionLeft: {
|
|
155
|
-
callback: r("onMoveSelection",
|
|
155
|
+
callback: r("onMoveSelection", n.LEFT),
|
|
156
156
|
description: "Move selection left",
|
|
157
157
|
shortcut: { code: "ArrowLeft" }
|
|
158
158
|
},
|
|
159
159
|
moveSelectionRight: {
|
|
160
|
-
callback: r("onMoveSelection",
|
|
160
|
+
callback: r("onMoveSelection", n.RIGHT),
|
|
161
161
|
description: "Move selection right",
|
|
162
162
|
shortcut: { code: "ArrowRight" }
|
|
163
163
|
},
|
|
164
164
|
moveSelectionUp: {
|
|
165
|
-
callback: r("onMoveSelection",
|
|
165
|
+
callback: r("onMoveSelection", n.UP),
|
|
166
166
|
description: "Move selection up",
|
|
167
167
|
shortcut: { code: "ArrowUp" }
|
|
168
168
|
},
|