@rivm-loculus-tools/sequence-editor 0.1.5 → 0.1.7
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/EditorWorkerService.js +12 -11
- package/dist/_chunks/EditorWorkerService.js.map +1 -1
- package/dist/_chunks/SequenceEditor.js +362 -489
- package/dist/_chunks/SequenceEditor.js.map +1 -1
- package/dist/_chunks/SequenceEditorPageDrawer.js +160 -49577
- package/dist/_chunks/SequenceEditorPageDrawer.js.map +1 -1
- package/dist/_chunks/comlink.js +228 -0
- package/dist/_chunks/comlink.js.map +1 -0
- package/dist/_chunks/react.js +11 -0
- package/dist/_chunks/react.js.map +1 -0
- package/dist/_chunks/sequenceEditorStore.js +40 -273
- package/dist/_chunks/sequenceEditorStore.js.map +1 -1
- package/dist/assets/index-Dn92arD_.js +8 -0
- package/dist/assets/index-Dn92arD_.js.map +1 -0
- package/dist/classes/services/SequenceEditorEventBusService/index.js +16 -2
- package/dist/classes/services/SequenceEditorEventBusService/index.js.map +1 -0
- package/dist/classes/workers/EngineWorker/index.js +3 -2
- package/dist/classes/workers/EngineWorker/index.js.map +1 -1
- package/dist/components/app/App/index.js +15 -951
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/pages/SequenceEditorErrorPage/index.js +6 -6
- package/dist/components/pages/SequenceEditorErrorPage/index.js.map +1 -1
- package/dist/components/pages/SequenceEditorMainPage/index.js +61 -2
- package/dist/components/pages/SequenceEditorMainPage/index.js.map +1 -0
- package/dist/components/ui/SequenceEditorPage/index.js +8 -8
- package/dist/components/ui/SequenceEditorPage/index.js.map +1 -1
- package/dist/components/ui/SequenceEditorPageHeader/index.js +60 -2
- package/dist/components/ui/SequenceEditorPageHeader/index.js.map +1 -0
- package/dist/components/ui/SequenceEditorSearchBar/index.js +27 -2
- package/dist/components/ui/SequenceEditorSearchBar/index.js.map +1 -0
- package/dist/constants/keyboard.js +1 -1
- package/dist/utils/EditorUtil/index.js +158 -150
- package/dist/utils/EditorUtil/index.js.map +1 -1
- package/package.json +44 -21
- package/dist/_chunks/Box.js +0 -6737
- package/dist/_chunks/Box.js.map +0 -1
- package/dist/_chunks/Close.js +0 -7
- package/dist/_chunks/Close.js.map +0 -1
- package/dist/_chunks/KeyboardArrowDown.js +0 -1023
- package/dist/_chunks/KeyboardArrowDown.js.map +0 -1
- package/dist/_chunks/Redo.js +0 -2559
- package/dist/_chunks/Redo.js.map +0 -1
- package/dist/_chunks/SequenceEditorEventBusService.js +0 -102
- package/dist/_chunks/SequenceEditorEventBusService.js.map +0 -1
- package/dist/_chunks/SequenceEditorMainPage.js +0 -552
- package/dist/_chunks/SequenceEditorMainPage.js.map +0 -1
- package/dist/_chunks/SequenceEditorPageHeader.js +0 -236
- package/dist/_chunks/SequenceEditorPageHeader.js.map +0 -1
- package/dist/_chunks/SequenceEditorSearchBar.js +0 -143
- package/dist/_chunks/SequenceEditorSearchBar.js.map +0 -1
- package/dist/_chunks/TestIdUtil.js +0 -4695
- package/dist/_chunks/TestIdUtil.js.map +0 -1
- package/dist/_chunks/TextField.js +0 -3083
- package/dist/_chunks/TextField.js.map +0 -1
- package/dist/_chunks/rolldown-runtime.js +0 -13
- package/dist/_chunks/sequence_editor.js +0 -517
- package/dist/_chunks/sequence_editor.js.map +0 -1
- package/dist/_chunks/withDialog.js +0 -289
- package/dist/_chunks/withDialog.js.map +0 -1
- package/dist/assets/index-C5rc-pJV.js +0 -8
- package/dist/assets/index-C5rc-pJV.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SequenceEditorMainPage.js","names":["r","e","t","n","o","e","t","r","i","l","a","n","t","e"],"sources":["../../../../../../node_modules/.pnpm/@mui+icons-material@9.4.0_@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3._9ea641d093c8d4a6ca4517c9b0071d29/node_modules/@mui/icons-material/Biotech.mjs","../../../../../../node_modules/.pnpm/@mui+icons-material@9.4.0_@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3._9ea641d093c8d4a6ca4517c9b0071d29/node_modules/@mui/icons-material/TableChart.mjs","../../../../../common/frontend/src/utils/ErrorUtil/ErrorUtil.ts","../../../../../common/frontend/src/utils/UrlUtil/UrlUtil.ts","../../../../../common/frontend/src/components/FastaDataImportDialog/FastaDataImportDialog.tsx","../../../../../common/frontend/src/components/FastaDataImportDialogLoader/FastaDataImportDialogLoader.tsx","../../../../../../node_modules/.pnpm/@gen-epix+ui-core-components@4.3.1_042ffd1b957752b43692251051b5ea4b/node_modules/@gen-epix/ui-core-components/dist/context/uiCoreComponentsConfigContext/index.js","../../../../../../node_modules/.pnpm/@gen-epix+ui-core-components@4.3.1_042ffd1b957752b43692251051b5ea4b/node_modules/@gen-epix/ui-core-components/dist/components/Spinner/index.js","../../../../../../node_modules/.pnpm/@gen-epix+ui-core-components@4.3.1_042ffd1b957752b43692251051b5ea4b/node_modules/@gen-epix/ui-core-components/dist/components/BackdropSpinner/index.js","../../../../../common/frontend/src/components/FastaNotLoaded/FastaNotLoaded.tsx","../../src/components/pages/SequenceEditorMainPage/SequenceEditorMainPage.tsx"],"sourcesContent":["\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon([/*#__PURE__*/_jsx(\"path\", {\n d: \"M7 19c-1.1 0-2 .9-2 2h14c0-1.1-.9-2-2-2h-4v-2h3c1.1 0 2-.9 2-2h-8c-1.66 0-3-1.34-3-3 0-1.09.59-2.04 1.46-2.56C8.17 9.03 8 8.54 8 8c0-.21.04-.42.09-.62C6.28 8.13 5 9.92 5 12c0 2.76 2.24 5 5 5v2z\"\n}, \"0\"), /*#__PURE__*/_jsx(\"path\", {\n d: \"M10.56 5.51C11.91 5.54 13 6.64 13 8c0 .75-.33 1.41-.85 1.87l.59 1.62.94-.34.34.94 1.88-.68-.34-.94.94-.34-2.74-7.53-.94.34-.34-.94-1.88.68.34.94-.94.35z\"\n}, \"1\"), /*#__PURE__*/_jsx(\"circle\", {\n cx: \"10.5\",\n cy: \"8\",\n r: \"1.5\"\n}, \"2\")], 'Biotech');","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2M3 19c0 1.1.9 2 2 2h3V10H3z\"\n}), 'TableChart');","export class ErrorUtil {\n public static getErrorMessage(error: unknown, fallback: string): string {\n return error instanceof Error ? error.message : fallback;\n }\n}\n","import { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nexport class UrlUtil {\n public static clearSearchParams(): void {\n const url = new URL(WindowService.getInstance().window.location.href);\n url.search = '';\n WindowService.getInstance().window.history.replaceState(null, '', url.toString());\n }\n\n public static fastaLabelFromUrl(url: string): string {\n try {\n const urlObject = new URL(url);\n const segment = urlObject.pathname.split('/').filter(Boolean).pop();\n if (segment) {\n return decodeURIComponent(segment);\n }\n return `${urlObject.hostname}.fasta`;\n } catch {\n return 'remote-alignment.fasta';\n }\n }\n\n public static validateFastaUrl(url: string): string {\n let urlObject: URL;\n try {\n urlObject = new URL(url.trim());\n } catch {\n throw new Error('Enter a valid FASTA URL.');\n }\n if (urlObject.protocol !== 'http:' && urlObject.protocol !== 'https:') {\n throw new Error('FASTA URLs must use HTTP or HTTPS.');\n }\n return urlObject.href;\n }\n}\n","import type {\n ChangeEvent,\n ReactElement,\n SyntheticEvent,\n} from 'react';\nimport {\n useCallback,\n useEffect,\n useState,\n} from 'react';\nimport {\n Alert,\n Box,\n CircularProgress,\n Paper,\n Tab,\n Tabs,\n TextField,\n Typography,\n} from '@mui/material';\nimport DnaIcon from '@mui/icons-material/Biotech';\nimport TableChartIcon from '@mui/icons-material/TableChart';\nimport { FileDropZone } from '@gen-epix/ui-core-components/components/FileDropZone';\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';\n\n\nenum FASTA_TAB {\n DROP = 0,\n URL = 1,\n PASTE = 2,\n}\n\nenum META_DATA_TAB {\n DROP = 0,\n URL = 1,\n PASTE = 2,\n}\n\nexport interface FastaDataImportDialogOpenProps {\n initialErrorMessage?: string;\n}\n\nexport interface FastaDataImportDialogProps extends WithDialogRenderProps<FastaDataImportDialogOpenProps> {\n extraActions?: DialogAction[];\n onDataChange: (fasta: string, metaData?: string) => void;\n onError: (error: unknown) => void;\n}\n\nexport type FastaDataImportDialogRefMethods = WithDialogRefMethods<FastaDataImportDialogProps, FastaDataImportDialogOpenProps>;\n\nexport const FastaDataImportDialog = withDialog<FastaDataImportDialogProps, FastaDataImportDialogOpenProps>((\n {\n extraActions,\n onActionsChange,\n onClose,\n onDataChange,\n onDisableBackdropClickChange,\n onError,\n onNoCloseButtonChange,\n openProps,\n }: FastaDataImportDialogProps,\n): ReactElement => {\n // FASTA state\n const [fastaTab, setFastaTab] = useState(FASTA_TAB.DROP);\n const [fastaFile, setFastaFile] = useState<FileList | null>(null);\n const [fastaUrl, setFastaUrl] = useState('');\n const [fastaText, setFastaText] = useState('');\n\n // Metadata state\n const [metadataTab, setMetadataTab] = useState(META_DATA_TAB.DROP);\n const [metadataFile, setMetadataFile] = useState<FileList | null>(null);\n const [metadataUrl, setMetadataUrl] = useState('');\n const [metadataText, setMetadataText] = useState('');\n\n const [isLoading, setIsLoading] = useState(false);\n const [errorMsg, setErrorMsg] = useState<null | string>(null);\n\n useEffect(() => {\n setErrorMsg(openProps?.initialErrorMessage ?? null);\n }, [openProps]);\n\n useEffect(() => {\n if (onNoCloseButtonChange) {\n onNoCloseButtonChange(!!openProps?.initialErrorMessage);\n }\n if (onDisableBackdropClickChange) {\n onDisableBackdropClickChange(!!openProps?.initialErrorMessage);\n }\n }, [onDisableBackdropClickChange, onNoCloseButtonChange, openProps?.initialErrorMessage]);\n\n const onCloseError = useCallback(() => setErrorMsg(null), []);\n const onChangeFastaTab = useCallback((_event: SyntheticEvent, value: number) => {\n setFastaTab(value);\n }, []);\n const onChangeMetadataTab = useCallback((_event: SyntheticEvent, value: number) => {\n setMetadataTab(value);\n }, []);\n const onFileSelectedFasta = useCallback((file: FileList) => setFastaFile(file), []);\n const onFileSelectedMetadata = useCallback((file: FileList) => setMetadataFile(file), []);\n const onChangeFastaUrl = useCallback((event: ChangeEvent<HTMLInputElement>) => {\n setFastaUrl(event.target.value);\n }, []);\n const onChangeFastaText = useCallback((event: ChangeEvent<HTMLInputElement>) => {\n setFastaText(event.target.value);\n }, []);\n const onChangeMetadataUrl = useCallback((event: ChangeEvent<HTMLInputElement>) => {\n setMetadataUrl(event.target.value);\n }, []);\n const onChangeMetadataText = useCallback((event: ChangeEvent<HTMLInputElement>) => {\n setMetadataText(event.target.value);\n }, []);\n\n const onClickLoadData = useCallback(async () => {\n setErrorMsg(null);\n setIsLoading(true);\n\n try {\n // 1. Resolve FASTA content\n let fastaContent = '';\n if (fastaTab === FASTA_TAB.DROP && fastaFile) {\n fastaContent = await fastaFile[0].text();\n } else if (fastaTab === FASTA_TAB.URL && fastaUrl.trim()) {\n const res = await fetch(fastaUrl.trim());\n if (!res.ok) {\n throw new Error(`Failed to fetch FASTA from URL (${res.status} ${res.statusText})`);\n }\n fastaContent = await res.text();\n } else if (fastaTab === FASTA_TAB.PASTE && fastaText.trim()) {\n fastaContent = fastaText.trim();\n }\n\n if (!fastaContent?.trim()) {\n throw new Error('Please provide FASTA sequence data via file, URL, or paste.');\n }\n\n // 2. Resolve Metadata content (optional)\n let metadataContent = '';\n if (metadataTab === META_DATA_TAB.DROP && metadataFile) {\n metadataContent = await metadataFile[0].text();\n } else if (metadataTab === META_DATA_TAB.URL && metadataUrl.trim()) {\n const res = await fetch(metadataUrl.trim());\n if (!res.ok) {\n throw new Error(`Failed to fetch Metadata from URL (${res.status} ${res.statusText})`);\n }\n metadataContent = await res.text();\n } else if (metadataTab === META_DATA_TAB.PASTE && metadataText.trim()) {\n metadataContent = metadataText.trim();\n }\n onDataChange(fastaContent, metadataContent);\n if (onClose) {\n onClose();\n }\n } catch (err: unknown) {\n console.error('Data import failed:', err);\n onError(err);\n } finally {\n setIsLoading(false);\n }\n }, [fastaFile, fastaTab, fastaText, fastaUrl, metadataFile, metadataTab, metadataText, metadataUrl, onClose, onDataChange, onError]);\n\n\n useEffect(() => {\n const actions: DialogAction[] = [\n {\n disabled: isLoading,\n label: isLoading ? 'Processing...' : 'Load & Calculate',\n onClick: onClickLoadData,\n startIcon: isLoading ? (\n <CircularProgress\n color={'inherit'}\n size={18}\n />\n ) : undefined,\n variant: 'contained',\n },\n ];\n if (extraActions?.length) {\n actions.unshift(...extraActions);\n }\n if (onActionsChange) {\n onActionsChange(actions);\n }\n }, [onActionsChange, onClickLoadData, isLoading, extraActions]);\n\n return (\n <>\n {errorMsg && (\n <Alert\n onClose={onCloseError}\n severity={'error'}\n sx={{\n marginBottom: 2,\n }}\n >\n {errorMsg}\n </Alert>\n )}\n <Box sx={{ display: 'grid', gap: 3, gridTemplateColumns: { md: '1fr 1fr', xs: '1fr' } }}>\n {/* FASTA Sequences Group */}\n <Paper\n sx={{ borderRadius: 2, p: 2.5 }}\n variant={'outlined'}\n >\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1, mb: 1.5 }}>\n <DnaIcon color={'primary'} />\n <Typography\n sx={{ fontWeight: 700 }}\n variant={'subtitle1'}\n >\n {'1. FASTA Sequences (Required)'}\n </Typography>\n </Box>\n <Typography\n color={'text.secondary'}\n sx={{ display: 'block', mb: 2 }}\n variant={'caption'}\n >\n {'Pre-aligned nucleotide or amino-acid sequence data.'}\n </Typography>\n <Tabs\n onChange={onChangeFastaTab}\n sx={{ mb: 2, minHeight: 36 }}\n value={fastaTab}\n >\n <Tab\n label={'File Upload'}\n sx={{ fontSize: '0.85rem', py: 0.5 }}\n />\n <Tab\n label={'Public URL'}\n sx={{ fontSize: '0.85rem', py: 0.5 }}\n />\n <Tab\n label={'Direct Paste'}\n sx={{ fontSize: '0.85rem', py: 0.5 }}\n />\n </Tabs>\n {fastaTab === FASTA_TAB.DROP && (\n <FileDropZone\n accept={'.fasta,.fa,.fna,.aln'}\n files={fastaFile}\n helperText={'Drag & drop .fasta / .fa alignment file'}\n onFilesSelected={onFileSelectedFasta}\n />\n )}\n {fastaTab === FASTA_TAB.URL && (\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1.5, justifyContent: 'center', minHeight: 180 }}>\n <TextField\n fullWidth\n helperText={'Enter a publicly accessible URL to a FASTA alignment'}\n label={'FASTA URL'}\n onChange={onChangeFastaUrl}\n placeholder={'https://example.com/sequences.fasta'}\n value={fastaUrl}\n variant={'outlined'}\n />\n </Box>\n )}\n {fastaTab === FASTA_TAB.PASTE && (\n <Box sx={{ minHeight: 180 }}>\n <TextField\n fullWidth\n label={'Paste FASTA Content'}\n multiline\n onChange={onChangeFastaText}\n placeholder={'>seq1 ACTG... >seq2 ACTG...'}\n rows={6}\n sx={{ fontFamily: 'monospace' }}\n value={fastaText}\n variant={'outlined'}\n />\n </Box>\n )}\n </Paper>\n {/* TSV Metadata Group */}\n <Paper\n sx={{ borderRadius: 2, p: 2.5 }}\n variant={'outlined'}\n >\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1, mb: 1.5 }}>\n <TableChartIcon color={'primary'} />\n <Typography\n sx={{ fontWeight: 700 }}\n variant={'subtitle1'}\n >\n {'2. TSV Metadata (Optional)'}\n </Typography>\n </Box>\n <Typography\n color={'text.primary'}\n sx={{ display: 'block', mb: 2 }}\n variant={'caption'}\n >\n {'Sample attributes for coloring, search & custom leaf labels.'}\n </Typography>\n <Tabs\n onChange={onChangeMetadataTab}\n sx={{ mb: 2, minHeight: 36 }}\n value={metadataTab}\n >\n <Tab\n label={'File Upload'}\n sx={{ fontSize: '0.85rem', py: 0.5 }}\n />\n <Tab\n label={'Public URL'}\n sx={{ fontSize: '0.85rem', py: 0.5 }}\n />\n <Tab\n label={'Direct Paste'}\n sx={{ fontSize: '0.85rem', py: 0.5 }}\n />\n </Tabs>\n {metadataTab === META_DATA_TAB.DROP && (\n <FileDropZone\n accept={'.tsv,.txt,.csv'}\n files={metadataFile}\n label={'TSV Metadata File'}\n onFilesSelected={onFileSelectedMetadata}\n />\n )}\n {metadataTab === META_DATA_TAB.URL && (\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1.5, justifyContent: 'center', minHeight: 180 }}>\n <TextField\n fullWidth\n helperText={'Enter a publicly accessible URL to a TSV metadata file'}\n label={'Metadata TSV URL'}\n onChange={onChangeMetadataUrl}\n placeholder={'https://example.com/metadata.tsv'}\n value={metadataUrl}\n variant={'outlined'}\n />\n </Box>\n )}\n {metadataTab === META_DATA_TAB.PASTE && (\n <Box sx={{ minHeight: 180 }}>\n <TextField\n fullWidth\n label={'Paste TSV Content'}\n multiline\n onChange={onChangeMetadataText}\n placeholder={'SampleID	Country	Date Sample1	NL	2024-01-01'}\n rows={6}\n sx={{ fontFamily: 'monospace' }}\n value={metadataText}\n variant={'outlined'}\n />\n </Box>\n )}\n </Paper>\n </Box>\n </>\n );\n}, {\n defaultTitle: 'Load Phylogenetic Data',\n fullWidth: true,\n maxWidth: 'xl',\n testId: 'FastaDataImportDialog',\n});\n","import type { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';\nimport {\n useCallback,\n useEffect,\n useRef,\n} from 'react';\nimport type { StoreApi } from 'zustand';\nimport { useStore } from 'zustand';\n\nimport { FastaDataEventBusService } from '../../classes/services/FastaDataEventBusService';\nimport { LOADING_STATUS } from '../../models/fasta';\nimport type { FastaDataStore } from '../../stores/fastaDataStore';\nimport { UrlUtil } from '../../utils/UrlUtil';\nimport type { FastaDataImportDialogRefMethods } from '../FastaDataImportDialog/FastaDataImportDialog';\nimport { FastaDataImportDialog } from '../FastaDataImportDialog/FastaDataImportDialog';\nimport { ErrorUtil } from '../../utils/ErrorUtil';\n\n\nexport type FastaDataImportDialogLoaderProps = {\n extraActions: DialogAction[];\n store: StoreApi<FastaDataStore>;\n};\n\nexport const FastaDataImportDialogLoader = ({ extraActions, store }: FastaDataImportDialogLoaderProps) => {\n const setData = useStore(store, (state) => state.setData);\n const setLoadingStatus = useStore(store, (state) => state.setLoadingStatus);\n const fastaDataImportDialogRef = useRef<FastaDataImportDialogRefMethods>(null);\n\n useEffect(() => {\n const removers = [\n // eslint-disable-next-line @eslint-react/web-api-no-leaked-event-listener\n FastaDataEventBusService.getInstance().addEventListener('onShowImportDialog', (initialErrorMessage?: string) => {\n fastaDataImportDialogRef.current?.open(initialErrorMessage ? { initialErrorMessage } : undefined);\n }),\n // eslint-disable-next-line @eslint-react/web-api-no-leaked-event-listener\n FastaDataEventBusService.getInstance().addEventListener('onCloseImportDialog', () => {\n fastaDataImportDialogRef.current?.close();\n }),\n ];\n return () => {\n removers.forEach((remove) => remove());\n };\n }, []);\n\n useEffect(() => {\n // Scan URL parameters for deep-linking\n const urlParams = new URLSearchParams(window.location.search);\n const inputFastaUrl = urlParams.get('input-fasta');\n const inputMetadataUrl = urlParams.get('input-metadata');\n\n const handleDeepLinking = async () => {\n if (inputFastaUrl) {\n setLoadingStatus(LOADING_STATUS.LOADING);\n try {\n const fastaRes = await fetch(inputFastaUrl);\n if (!fastaRes.ok) {\n throw new Error(`FASTA fetch failed (${fastaRes.status})`);\n }\n const fastaText = await fastaRes.text();\n\n if (!fastaText.trim()) {\n setLoadingStatus(LOADING_STATUS.ERROR);\n throw new Error('The input-fasta URL returned no sequence data. Check that the URL and requested accession(s) are correct.');\n }\n\n let metaText: string | undefined;\n if (inputMetadataUrl) {\n try {\n const metaRes = await fetch(inputMetadataUrl);\n if (metaRes.ok) {\n metaText = await metaRes.text();\n }\n } catch (metaErr) {\n console.warn('[App] Failed to auto-fetch metadata:', metaErr);\n }\n }\n\n await setData(fastaText, metaText);\n } catch (fastaErr) {\n console.error('[App] Failed to auto-load FASTA:', fastaErr);\n const message = fastaErr instanceof Error ? fastaErr.message : 'Failed to auto-load FASTA from the provided URL.';\n FastaDataEventBusService.getInstance().emit('onShowImportDialog', message);\n }\n } else {\n // PV1-02: Show data loading modal if no data provided via URL query params\n FastaDataEventBusService.getInstance().emit('onShowImportDialog');\n }\n };\n\n void handleDeepLinking();\n }, [setData, setLoadingStatus]);\n\n const handleError = useCallback((errorMessage: string) => {\n fastaDataImportDialogRef.current?.close();\n FastaDataEventBusService.getInstance().emit('onShowImportDialog', errorMessage);\n }, []);\n\n const onDataChange = useCallback(async (fastaContent: string, metadataContent?: string) => {\n try {\n await setData(fastaContent, metadataContent);\n fastaDataImportDialogRef.current?.close();\n } catch (e) {\n handleError(ErrorUtil.getErrorMessage(e, 'Unknown error'));\n } finally {\n // clear any search params from the URL\n UrlUtil.clearSearchParams();\n }\n }, [handleError, setData]);\n\n const onError = useCallback((errorMessage: unknown) => {\n handleError(ErrorUtil.getErrorMessage(errorMessage, 'Unknown error'));\n }, [handleError]);\n\n return (\n <>\n <FastaDataImportDialog\n extraActions={extraActions}\n onDataChange={onDataChange}\n onError={onError}\n ref={fastaDataImportDialogRef}\n />\n </>\n );\n};\n","import { createContext as e, use as t } from \"react\";\nimport { jsx as n } from \"react/jsx-runtime\";\n//#region src/context/uiCoreComponentsConfigContext/uiCoreComponentsConfigContext.tsx\nvar r = e(null), i = (e) => {\n\tlet { children: t, config: i } = e;\n\treturn /* @__PURE__ */ n(r, {\n\t\tvalue: i,\n\t\tchildren: t\n\t});\n}, a = () => t(r);\n//#endregion\nexport { r as UiCoreComponentsConfigContext, i as UiCoreComponentsContextProvider, a as useUiCoreComponentsConfigContext };\n\n//# sourceMappingURL=index.js.map","import { useUiCoreComponentsConfigContext as e } from \"../../context/uiCoreComponentsConfigContext/index.js\";\nimport { useEffect as t, useState as n } from \"react\";\nimport { Box as r, CircularProgress as i, Typography as a } from \"@mui/material\";\nimport { useTranslation as o } from \"react-i18next\";\nimport { jsx as s, jsxs as c } from \"react/jsx-runtime\";\nimport { visuallyHidden as l } from \"@mui/utils\";\n//#region src/components/Spinner/Spinner.tsx\nvar u = 5e3, d = 40, f = ({ color: f = \"primary\", inline: p, label: m, size: h, takingLongerLabel: g, takingLongerTimeoutMs: _, textColor: v }) => {\n\tlet [y, b] = n(!1), { t: x } = o(), S = e();\n\treturn t(() => {\n\t\tlet e = setTimeout(() => {\n\t\t\tb(!0);\n\t\t}, _ ?? S?.spinner?.defaultTakingLongerTimeoutMs ?? u);\n\t\treturn () => {\n\t\t\tclearTimeout(e);\n\t\t};\n\t}, [_, S?.spinner?.defaultTakingLongerTimeoutMs]), /* @__PURE__ */ c(r, {\n\t\t\"aria-busy\": \"true\",\n\t\trole: \"status\",\n\t\tsx: {\n\t\t\talignItems: \"center\",\n\t\t\tbottom: p ? \"auto\" : 0,\n\t\t\tdisplay: \"flex\",\n\t\t\tflexDirection: \"column\",\n\t\t\tjustifyContent: \"center\",\n\t\t\tleft: p ? \"auto\" : 0,\n\t\t\tposition: p ? \"relative\" : \"absolute\",\n\t\t\tright: p ? \"auto\" : 0,\n\t\t\ttop: p ? \"auto\" : 0,\n\t\t\twidth: p ? \"100%\" : \"auto\"\n\t\t},\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ s(r, {\n\t\t\t\tsx: { margin: 1 },\n\t\t\t\tchildren: /* @__PURE__ */ s(i, {\n\t\t\t\t\tcolor: f,\n\t\t\t\t\tsize: h ?? S?.spinner?.defaultCircularProgressSize ?? d\n\t\t\t\t})\n\t\t\t}),\n\t\t\t/* @__PURE__ */ s(r, {\n\t\t\t\tsx: {\n\t\t\t\t\t...m ? void 0 : l,\n\t\t\t\t\tcolor: v ?? \"inherit\",\n\t\t\t\t\tmargin: 1\n\t\t\t\t},\n\t\t\t\tchildren: /* @__PURE__ */ s(a, {\n\t\t\t\t\t\"aria-live\": \"polite\",\n\t\t\t\t\tchildren: m ?? x`Loading`\n\t\t\t\t})\n\t\t\t}),\n\t\t\ty && /* @__PURE__ */ s(r, {\n\t\t\t\tsx: {\n\t\t\t\t\tcolor: v ?? \"inherit\",\n\t\t\t\t\tmargin: 1\n\t\t\t\t},\n\t\t\t\tchildren: /* @__PURE__ */ s(a, {\n\t\t\t\t\t\"aria-live\": \"polite\",\n\t\t\t\t\tchildren: g || x`This is taking longer than expected. We are still trying.`\n\t\t\t\t})\n\t\t\t})\n\t\t]\n\t});\n};\n//#endregion\nexport { f as Spinner };\n\n//# sourceMappingURL=index.js.map","import { Spinner as e } from \"../Spinner/index.js\";\nimport { Backdrop as t, useTheme as n } from \"@mui/material\";\nimport { jsx as r } from \"react/jsx-runtime\";\n//#region src/components/BackdropSpinner/BackdropSpinner.tsx\nvar i = ({ backgroundColor: i, open: a, ...o }) => {\n\tlet s = n();\n\treturn /* @__PURE__ */ r(t, {\n\t\topen: a,\n\t\tsx: {\n\t\t\tbackdropFilter: \"blur(3px)\",\n\t\t\tbackgroundColor: i ?? (s.palette.mode === \"light\" ? \"rgba(255, 255, 255, 0.6)\" : \"rgba(0, 0, 0, 0.6)\"),\n\t\t\tzIndex: s.zIndex.drawer + 1\n\t\t},\n\t\tchildren: a && /* @__PURE__ */ r(e, { ...o })\n\t});\n};\n//#endregion\nexport { i as BackdropSpinner };\n\n//# sourceMappingURL=index.js.map","import {\n Box,\n Button,\n Typography,\n} from '@mui/material';\nimport FileUploadOutlinedIcon from '@mui/icons-material/FileUploadOutlined';\nimport type { ReactNode } from 'react';\nimport { useCallback } from 'react';\n\nimport { FastaDataEventBusService } from '../../classes/services/FastaDataEventBusService';\n\nexport type FastaNotLoadedProps = {\n description: ReactNode;\n icon: ReactNode;\n title: ReactNode;\n};\n\nexport const FastaNotLoaded = ({ description, icon, title }: FastaNotLoadedProps) => {\n const onClickLoadData = useCallback(() => {\n FastaDataEventBusService.getInstance().emit('onShowImportDialog');\n }, []);\n\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n gap: 2,\n height: '100%',\n justifyContent: 'center',\n p: 3,\n width: '100%',\n }}\n >\n {icon}\n <Typography\n color={'text.secondary'}\n sx={{ fontWeight: 600 }}\n variant={'h6'}\n >\n {title}\n </Typography>\n <Typography\n color={'text.secondary'}\n sx={{ maxWidth: 450, textAlign: 'center' }}\n variant={'body2'}\n >\n {description}\n </Typography>\n <Button\n color={'primary'}\n onClick={onClickLoadData}\n startIcon={<FileUploadOutlinedIcon />}\n sx={{ mt: 1 }}\n variant={'contained'}\n >\n {'Load Data'}\n </Button>\n </Box>\n );\n};\n","import { useStore } from 'zustand';\nimport {\n useCallback,\n useMemo,\n} from 'react';\nimport { FastaDataEventBusService } from '@rivm-loculus-tools/common-frontend/classes/services/FastaDataEventBusService';\nimport { ErrorUtil } from '@rivm-loculus-tools/common-frontend/utils/ErrorUtil';\nimport { UrlUtil } from '@rivm-loculus-tools/common-frontend/utils/UrlUtil';\nimport type { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';\nimport { FastaDataImportDialogLoader } from '@rivm-loculus-tools/common-frontend/components/FastaDataImportDialogLoader';\nimport { BackdropSpinner } from '@gen-epix/ui-core-components/components/BackdropSpinner';\nimport { FastaNotLoaded } from '@rivm-loculus-tools/common-frontend/components/FastaNotLoaded';\nimport BiotechOutlinedIcon from '@mui/icons-material/BiotechOutlined';\nimport { LOADING_STATUS } from '@rivm-loculus-tools/common-frontend/models/fasta';\n\nimport { sequenceEditorStore } from '../../../stores/sequenceEditorStore';\nimport { SequenceEditor } from '../../ui/SequenceEditor';\nimport { SequenceEditorPage } from '../../ui/SequenceEditorPage';\n\n\nexport const SequenceEditorMainPage = () => {\n const loadingStatus = useStore(sequenceEditorStore, (state) => state.loadingStatus);\n const setData = useStore(sequenceEditorStore, (state) => state.setData);\n const rawFasta = useStore(sequenceEditorStore, (state) => state.rawFasta);\n\n const onClickLoadDemoData = useCallback(async () => {\n try {\n const fastaRes = await fetch('/sample-data/sarscov2_demo.fasta');\n const demoFastaText = await fastaRes.text();\n\n await setData(demoFastaText);\n FastaDataEventBusService.getInstance().emit('onCloseImportDialog');\n } catch (err: unknown) {\n FastaDataEventBusService.getInstance().emit('onCloseImportDialog');\n const errorMessage = `Failed to load demo dataset: ${ErrorUtil.getErrorMessage(err, 'Unknown error')}`;\n FastaDataEventBusService.getInstance().emit('onShowImportDialog', errorMessage);\n } finally {\n UrlUtil.clearSearchParams();\n }\n }, [setData]);\n\n const extraFastaDataImportDialogLoaderActions = useMemo<DialogAction[]>(() => [\n {\n autoFocus: true,\n color: 'secondary',\n label: 'Demo (SARS-CoV-2)',\n onClick: onClickLoadDemoData,\n variant: 'contained',\n },\n ], [onClickLoadDemoData]);\n\n return (\n <SequenceEditorPage\n isNoInteraction={false}\n >\n {rawFasta && (\n <SequenceEditor />\n )}\n {!rawFasta && (\n <FastaNotLoaded\n description={'Load a FASTA sequence file to enable the editor.'}\n icon={<BiotechOutlinedIcon sx={{ color: 'text.disabled', fontSize: 72 }} />}\n title={'No FASTA Sequence Loaded'}\n />\n )}\n <FastaDataImportDialogLoader\n extraActions={extraFastaDataImportDialogLoaderActions}\n store={sequenceEditorStore}\n />\n <BackdropSpinner\n label={`Computing phylogenetic tree`}\n open={loadingStatus === LOADING_STATUS.LOADING}\n />\n </SequenceEditorPage>\n );\n};\n"],"x_google_ignoreList":[0,1,6,7,8],"mappings":";;;;;;;;;;;4CAIA,IAAe,EAAc;CAAc,eAAA,GAAA,EAAA,IAAA,CAAK,QAAQ,EACtD,GAAG,oMACL,GAAG,GAAG;CAAgB,eAAA,GAAA,EAAA,IAAA,CAAK,QAAQ,EACjC,GAAG,2JACL,GAAG,GAAG;CAAgB,eAAA,GAAA,EAAA,IAAA,CAAK,UAAU;EACnC,IAAI;EACJ,IAAI;EACJ,GAAG;CACL,GAAG,GAAG;AAAC,GAAG,SAAS,GCRnB,IAAe,EAA2B,eAAA,GAAA,EAAA,IAAA,CAAK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GAAA,EAAA,IAAA,CAAC,GAAD;IACE,aAAa;IACb,MAAM,iBAAA,GAAA,EAAA,IAAA,CAAC,GAAD,EAAqB,IAAI;KAAE,OAAO;KAAiB,UAAU;IAAG,EAAI,CAAA;IAC1E,OAAO;GACR,CAAA;GAEH,iBAAA,GAAA,EAAA,IAAA,CAAC,GAAD;IACE,cAAc;IACd,OAAO;GACR,CAAA;GACD,iBAAA,GAAA,EAAA,IAAA,CAAC,GAAD;IACE,OAAO;IACP,MAAM,MAAkB,EAAe;GACxC,CAAA;EACiB;;AAExB"}
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime.js";
|
|
2
|
-
import { n as t, r as n, t as r } from "./SequenceEditorEventBusService.js";
|
|
3
|
-
import { t as i } from "./sequenceEditorStore.js";
|
|
4
|
-
import { Dt as a, It as o, Lt as s, M as c, Ot as l, Q as u, dt as d, ft as f, g as p, i as m, j as h, k as g, n as _, t as v, ut as y } from "./Box.js";
|
|
5
|
-
import { b, i as x, s as S, t as C } from "./TestIdUtil.js";
|
|
6
|
-
import { l as w, n as T, r as E, t as D, u as O } from "./Redo.js";
|
|
7
|
-
import { t as k } from "./withDialog.js";
|
|
8
|
-
//#region ../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/DialogContentText/dialogContentTextClasses.mjs
|
|
9
|
-
var A = /* @__PURE__ */ e(s(), 1), j = /* @__PURE__ */ e(l(), 1);
|
|
10
|
-
function M(e) {
|
|
11
|
-
return d("MuiDialogContentText", e);
|
|
12
|
-
}
|
|
13
|
-
y("MuiDialogContentText", ["root"]);
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region ../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/DialogContentText/DialogContentText.mjs
|
|
16
|
-
var N = a(), P = (e) => {
|
|
17
|
-
let { classes: t } = e, n = u({ root: ["root"] }, M, t);
|
|
18
|
-
return {
|
|
19
|
-
...t,
|
|
20
|
-
...n
|
|
21
|
-
};
|
|
22
|
-
}, F = h(_, {
|
|
23
|
-
shouldForwardProp: (e) => c(e) || e === "classes",
|
|
24
|
-
name: "MuiDialogContentText",
|
|
25
|
-
slot: "Root"
|
|
26
|
-
})({}), I = /*#__PURE__*/ A.forwardRef(function(e, t) {
|
|
27
|
-
let n = g({
|
|
28
|
-
props: e,
|
|
29
|
-
name: "MuiDialogContentText"
|
|
30
|
-
}), { children: r, className: i, ...a } = n, o = P(a);
|
|
31
|
-
return /*#__PURE__*/ (0, N.jsx)(F, {
|
|
32
|
-
component: "p",
|
|
33
|
-
variant: "body1",
|
|
34
|
-
color: "textSecondary",
|
|
35
|
-
ref: t,
|
|
36
|
-
ownerState: a,
|
|
37
|
-
className: f(o.root, i),
|
|
38
|
-
...n,
|
|
39
|
-
classes: o
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
process.env.NODE_ENV !== "production" && (I.propTypes = {
|
|
43
|
-
children: j.default.node,
|
|
44
|
-
classes: j.default.object,
|
|
45
|
-
className: j.default.string,
|
|
46
|
-
sx: j.default.oneOfType([
|
|
47
|
-
j.default.arrayOf(j.default.oneOfType([
|
|
48
|
-
j.default.func,
|
|
49
|
-
j.default.object,
|
|
50
|
-
j.default.bool
|
|
51
|
-
])),
|
|
52
|
-
j.default.func,
|
|
53
|
-
j.default.object
|
|
54
|
-
])
|
|
55
|
-
});
|
|
56
|
-
//#endregion
|
|
57
|
-
//#region ../../../common/frontend/src/components/FastaPageHeaderCenterComponent/FastaPageHeaderCenterComponent.tsx
|
|
58
|
-
var L = ({ store: e }) => {
|
|
59
|
-
let t = o(e, (e) => e.parsedFasta), n = o(e, (e) => e.parsedMetadata), r = t?.sequences?.length || 0, i = n?.records?.length || 0;
|
|
60
|
-
return /* @__PURE__ */ (0, N.jsxs)(v, {
|
|
61
|
-
sx: {
|
|
62
|
-
alignItems: "center",
|
|
63
|
-
display: "flex",
|
|
64
|
-
gap: 1
|
|
65
|
-
},
|
|
66
|
-
children: [r > 0 && /* @__PURE__ */ (0, N.jsx)(O, {
|
|
67
|
-
label: `${r} Sequences`,
|
|
68
|
-
size: "small",
|
|
69
|
-
sx: {
|
|
70
|
-
backgroundColor: "rgba(255, 255, 255, 0.2)",
|
|
71
|
-
color: "#FFFFFF",
|
|
72
|
-
fontSize: "0.75rem",
|
|
73
|
-
fontWeight: 600
|
|
74
|
-
}
|
|
75
|
-
}), i > 0 && /* @__PURE__ */ (0, N.jsx)(O, {
|
|
76
|
-
label: `${i} Metadata Records`,
|
|
77
|
-
size: "small",
|
|
78
|
-
sx: {
|
|
79
|
-
backgroundColor: "rgba(255, 255, 255, 0.2)",
|
|
80
|
-
color: "#FFFFFF",
|
|
81
|
-
fontSize: "0.75rem",
|
|
82
|
-
fontWeight: 600
|
|
83
|
-
}
|
|
84
|
-
})]
|
|
85
|
-
});
|
|
86
|
-
}, R = p(/*#__PURE__*/ (0, N.jsx)("path", { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z" }), "FileUploadOutlined"), z = class e extends n {
|
|
87
|
-
static __instance;
|
|
88
|
-
constructor() {
|
|
89
|
-
super();
|
|
90
|
-
}
|
|
91
|
-
static getInstance() {
|
|
92
|
-
return e.__instance = t.getHmrSingleton("fastaDataEventBusService", e.__instance, () => new e()), e.__instance;
|
|
93
|
-
}
|
|
94
|
-
}, B = () => {
|
|
95
|
-
let e = (0, A.useCallback)(() => z.getInstance().emit("onShowImportDialog"), []);
|
|
96
|
-
return /* @__PURE__ */ (0, N.jsx)(b, {
|
|
97
|
-
color: "inherit",
|
|
98
|
-
onClick: e,
|
|
99
|
-
size: "small",
|
|
100
|
-
startIcon: /* @__PURE__ */ (0, N.jsx)(R, {}),
|
|
101
|
-
sx: {
|
|
102
|
-
"&:hover": { backgroundColor: "rgba(255, 255, 255, 0.25)" },
|
|
103
|
-
backgroundColor: "rgba(255, 255, 255, 0.15)",
|
|
104
|
-
color: "#FFFFFF"
|
|
105
|
-
},
|
|
106
|
-
variant: "contained",
|
|
107
|
-
children: "Import Data"
|
|
108
|
-
});
|
|
109
|
-
}, V = p(/*#__PURE__*/ (0, N.jsx)("path", { d: "M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91" }), "RestartAlt"), H = k(({ body: e, cancelLabel: t, confirmLabel: n, onActionsChange: r, onCancel: i, onClose: a, onConfirm: o, openProps: s }) => {
|
|
110
|
-
let { t: c } = x(), l = (0, A.useCallback)(() => {
|
|
111
|
-
i && i(s), a();
|
|
112
|
-
}, [
|
|
113
|
-
i,
|
|
114
|
-
a,
|
|
115
|
-
s
|
|
116
|
-
]), u = (0, A.useCallback)(() => {
|
|
117
|
-
o(s), a();
|
|
118
|
-
}, [
|
|
119
|
-
o,
|
|
120
|
-
s,
|
|
121
|
-
a
|
|
122
|
-
]);
|
|
123
|
-
return (0, A.useEffect)(() => {
|
|
124
|
-
let e = [];
|
|
125
|
-
t && e.push({
|
|
126
|
-
...C.createAttributes("Confirmation-cancelButton"),
|
|
127
|
-
color: "primary",
|
|
128
|
-
label: t ?? c`Cancel`,
|
|
129
|
-
onClick: l,
|
|
130
|
-
variant: "outlined"
|
|
131
|
-
}), e.push({
|
|
132
|
-
...C.createAttributes("Confirmation-confirmButton"),
|
|
133
|
-
autoFocus: !0,
|
|
134
|
-
color: "secondary",
|
|
135
|
-
label: n ?? c`OK`,
|
|
136
|
-
onClick: u,
|
|
137
|
-
variant: "contained"
|
|
138
|
-
}), r(e);
|
|
139
|
-
}, [
|
|
140
|
-
t,
|
|
141
|
-
l,
|
|
142
|
-
n,
|
|
143
|
-
u,
|
|
144
|
-
r,
|
|
145
|
-
i,
|
|
146
|
-
c
|
|
147
|
-
]), e ? /* @__PURE__ */ (0, N.jsx)(I, {
|
|
148
|
-
...C.createAttributes("Confirmation-textContent"),
|
|
149
|
-
children: e
|
|
150
|
-
}) : null;
|
|
151
|
-
}, {
|
|
152
|
-
fullWidth: !0,
|
|
153
|
-
maxWidth: "sm",
|
|
154
|
-
testId: "Confirmation"
|
|
155
|
-
}), U = ({ onReset: e }) => {
|
|
156
|
-
let t = (0, A.useRef)(null), n = (0, A.useCallback)(() => {
|
|
157
|
-
t.current?.open();
|
|
158
|
-
}, []), r = (0, A.useCallback)(() => {
|
|
159
|
-
e();
|
|
160
|
-
}, [e]);
|
|
161
|
-
return /* @__PURE__ */ (0, N.jsxs)(N.Fragment, { children: [/* @__PURE__ */ (0, N.jsx)(S, {
|
|
162
|
-
title: "Reset current session and dataset",
|
|
163
|
-
children: /* @__PURE__ */ (0, N.jsx)(m, {
|
|
164
|
-
color: "inherit",
|
|
165
|
-
onClick: n,
|
|
166
|
-
size: "small",
|
|
167
|
-
sx: { opacity: .85 },
|
|
168
|
-
children: /* @__PURE__ */ (0, N.jsx)(V, { fontSize: "small" })
|
|
169
|
-
})
|
|
170
|
-
}), /* @__PURE__ */ (0, N.jsx)(H, {
|
|
171
|
-
body: w`Are you sure you want to reset the current session and dataset?`,
|
|
172
|
-
cancelLabel: w`Cancel`,
|
|
173
|
-
confirmLabel: w`Reset`,
|
|
174
|
-
onConfirm: r,
|
|
175
|
-
ref: t,
|
|
176
|
-
title: w`Reset current session and dataset?`
|
|
177
|
-
})] });
|
|
178
|
-
}, W = p(/*#__PURE__*/ (0, N.jsx)("path", { d: "M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4" }), "HelpOutlineOutlined"), G = () => {
|
|
179
|
-
let e = (0, A.useCallback)(() => {
|
|
180
|
-
window.open("https://github.com/RIVM-bioinformatics/loculus-tools", "_blank");
|
|
181
|
-
}, []);
|
|
182
|
-
return /* @__PURE__ */ (0, N.jsx)(S, {
|
|
183
|
-
title: "Documentation & Specifications",
|
|
184
|
-
children: /* @__PURE__ */ (0, N.jsx)(m, {
|
|
185
|
-
color: "inherit",
|
|
186
|
-
onClick: e,
|
|
187
|
-
size: "small",
|
|
188
|
-
sx: { opacity: .85 },
|
|
189
|
-
children: /* @__PURE__ */ (0, N.jsx)(W, { fontSize: "small" })
|
|
190
|
-
})
|
|
191
|
-
});
|
|
192
|
-
}, K = p(/*#__PURE__*/ (0, N.jsx)("path", { d: "M7 19c-1.1 0-2 .9-2 2h14c0-1.1-.9-2-2-2h-4v-2h3c1.1 0 2-.9 2-2h-8c-1.66 0-3-1.34-3-3 0-1.09.59-2.04 1.47-2.57.41.59 1.06 1 1.83 1.06.7.06 1.36-.19 1.85-.62l.59 1.61.94-.34.34.94 1.88-.68-.34-.94.94-.34-2.74-7.52-.94.34-.34-.94-1.88.68.34.94-.94.35.56 1.55c-1.17-.04-2.19.75-2.48 1.86C6.27 8.14 5 9.92 5 12c0 2.76 2.24 5 5 5v2zm5.86-14.48 1.71 4.7-.94.34-1.71-4.7zM10.5 7c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1" }), "BiotechOutlined"), q = () => {
|
|
193
|
-
let e = o(i, (e) => e.resetDataset), t = o(i, (e) => e.meta), n = (0, A.useCallback)(() => {
|
|
194
|
-
e();
|
|
195
|
-
}, [e]), a = (0, A.useCallback)(() => {
|
|
196
|
-
r.getInstance().emit("onUndo");
|
|
197
|
-
}, []), s = (0, A.useCallback)(() => {
|
|
198
|
-
r.getInstance().emit("onRedo");
|
|
199
|
-
}, []);
|
|
200
|
-
return /* @__PURE__ */ (0, N.jsx)(E, {
|
|
201
|
-
centerComponent: /* @__PURE__ */ (0, N.jsx)(L, { store: i }),
|
|
202
|
-
icon: /* @__PURE__ */ (0, N.jsx)(K, { sx: { fontSize: 24 } }),
|
|
203
|
-
rightComponent: /* @__PURE__ */ (0, N.jsxs)(N.Fragment, { children: [
|
|
204
|
-
/* @__PURE__ */ (0, N.jsx)(B, {}),
|
|
205
|
-
/* @__PURE__ */ (0, N.jsx)(S, {
|
|
206
|
-
title: "Undo last action",
|
|
207
|
-
children: /* @__PURE__ */ (0, N.jsx)(m, {
|
|
208
|
-
color: "inherit",
|
|
209
|
-
disabled: t?.undoDepth === 0,
|
|
210
|
-
onClick: a,
|
|
211
|
-
size: "small",
|
|
212
|
-
sx: { opacity: .85 },
|
|
213
|
-
children: /* @__PURE__ */ (0, N.jsx)(T, { fontSize: "small" })
|
|
214
|
-
})
|
|
215
|
-
}),
|
|
216
|
-
/* @__PURE__ */ (0, N.jsx)(S, {
|
|
217
|
-
title: "Redo last action",
|
|
218
|
-
children: /* @__PURE__ */ (0, N.jsx)(m, {
|
|
219
|
-
color: "inherit",
|
|
220
|
-
disabled: t?.redoDepth === 0,
|
|
221
|
-
onClick: s,
|
|
222
|
-
size: "small",
|
|
223
|
-
sx: { opacity: .85 },
|
|
224
|
-
children: /* @__PURE__ */ (0, N.jsx)(D, { fontSize: "small" })
|
|
225
|
-
})
|
|
226
|
-
}),
|
|
227
|
-
/* @__PURE__ */ (0, N.jsx)(U, { onReset: n }),
|
|
228
|
-
/* @__PURE__ */ (0, N.jsx)(G, {})
|
|
229
|
-
] }),
|
|
230
|
-
title: "Sequence Editor"
|
|
231
|
-
});
|
|
232
|
-
};
|
|
233
|
-
//#endregion
|
|
234
|
-
export { R as i, K as n, z as r, q as t };
|
|
235
|
-
|
|
236
|
-
//# sourceMappingURL=SequenceEditorPageHeader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SequenceEditorPageHeader.js","names":["PropTypes","i","t","n","a","r","e"],"sources":["../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/DialogContentText/dialogContentTextClasses.mjs","../../../../../../node_modules/.pnpm/@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3.0_react@19.3.0_supports-co_876c01243dbcdb7de27cf1bcc84db747/node_modules/@mui/material/DialogContentText/DialogContentText.mjs","../../../../../common/frontend/src/components/FastaPageHeaderCenterComponent/FastaPageHeaderCenterComponent.tsx","../../../../../../node_modules/.pnpm/@mui+icons-material@9.4.0_@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3._9ea641d093c8d4a6ca4517c9b0071d29/node_modules/@mui/icons-material/FileUploadOutlined.mjs","../../../../../common/frontend/src/classes/services/FastaDataEventBusService/FastaDataEventBusService.ts","../../../../../common/frontend/src/components/FastaPageHeaderImportButton/FastaPageHeaderImportButton.tsx","../../../../../../node_modules/.pnpm/@mui+icons-material@9.4.0_@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3._9ea641d093c8d4a6ca4517c9b0071d29/node_modules/@mui/icons-material/RestartAlt.mjs","../../../../../../node_modules/.pnpm/@gen-epix+ui-core-components@4.3.1_042ffd1b957752b43692251051b5ea4b/node_modules/@gen-epix/ui-core-components/dist/components/Confirmation/index.js","../../../../../common/frontend/src/components/FastaPageHeaderResetButton/FastaPageHeaderResetButton.tsx","../../../../../../node_modules/.pnpm/@mui+icons-material@9.4.0_@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3._9ea641d093c8d4a6ca4517c9b0071d29/node_modules/@mui/icons-material/HelpOutlineOutlined.mjs","../../../../../common/frontend/src/components/PageHeaderDocumentationButton/PageHeaderDocumentationButton.tsx","../../../../../../node_modules/.pnpm/@mui+icons-material@9.4.0_@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3._9ea641d093c8d4a6ca4517c9b0071d29/node_modules/@mui/icons-material/BiotechOutlined.mjs","../../src/components/ui/SequenceEditorPageHeader/SequenceEditorPageHeader.tsx"],"sourcesContent":["import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getDialogContentTextUtilityClass(slot) {\n return generateUtilityClass('MuiDialogContentText', slot);\n}\nconst dialogContentTextClasses = generateUtilityClasses('MuiDialogContentText', ['root']);\nexport default dialogContentTextClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.mjs\";\nimport { styled } from \"../zero-styled/index.mjs\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.mjs\";\nimport Typography from \"../Typography/index.mjs\";\nimport { getDialogContentTextUtilityClass } from \"./dialogContentTextClasses.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n const composedClasses = composeClasses(slots, getDialogContentTextUtilityClass, classes);\n return {\n ...classes,\n // forward classes to the Typography\n ...composedClasses\n };\n};\nconst DialogContentTextRoot = styled(Typography, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiDialogContentText',\n slot: 'Root'\n})({});\nconst DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentText(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiDialogContentText'\n });\n const {\n children,\n className,\n ...ownerState\n } = props;\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DialogContentTextRoot, {\n component: \"p\",\n variant: \"body1\",\n color: \"textSecondary\",\n ref: ref,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ...props,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContentText.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default DialogContentText;","import {\n Box,\n Chip,\n} from '@mui/material';\nimport type { StoreApi } from 'zustand';\nimport { useStore } from 'zustand';\n\nimport type { FastaDataStore } from '../../stores/fastaDataStore';\n\n\nexport type FastaPageHeaderCenterComponentProps = {\n store: StoreApi<FastaDataStore>;\n};\n\nexport const FastaPageHeaderCenterComponent = ({ store }: FastaPageHeaderCenterComponentProps) => {\n const parsedFasta = useStore(store, (state) => state.parsedFasta);\n const parsedMetadata = useStore(store, (state) => state.parsedMetadata);\n\n const seqCount = parsedFasta?.sequences?.length || 0;\n const metaCount = parsedMetadata?.records?.length || 0;\n\n return (\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1 }}>\n {seqCount > 0 && (\n <Chip\n label={`${seqCount} Sequences`}\n size={'small'}\n sx={{\n backgroundColor: 'rgba(255, 255, 255, 0.2)',\n color: '#FFFFFF',\n fontSize: '0.75rem',\n fontWeight: 600,\n }}\n />\n )}\n {metaCount > 0 && (\n <Chip\n label={`${metaCount} Metadata Records`}\n size={'small'}\n sx={{\n backgroundColor: 'rgba(255, 255, 255, 0.2)',\n color: '#FFFFFF',\n fontSize: '0.75rem',\n fontWeight: 600,\n }}\n />\n )}\n </Box>\n );\n};\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z\"\n}), 'FileUploadOutlined');","import { EventBusAbstract } from '@gen-epix/ui-core/classes/abstracts/EventBusAbstract';\nimport { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\n\n\nexport type Event = {\n onCloseImportDialog: undefined;\n onShowImportDialog: string | undefined;\n};\n\nexport class FastaDataEventBusService extends EventBusAbstract<Event> {\n private static __instance: FastaDataEventBusService;\n\n\n private constructor() {\n super();\n }\n\n public static getInstance(): FastaDataEventBusService {\n FastaDataEventBusService.__instance = HmrUtil.getHmrSingleton('fastaDataEventBusService', FastaDataEventBusService.__instance, () => new FastaDataEventBusService());\n return FastaDataEventBusService.__instance;\n }\n}\n","import FileUploadOutlinedIcon from '@mui/icons-material/FileUploadOutlined';\nimport { Button } from '@mui/material';\nimport { useCallback } from 'react';\n\nimport { FastaDataEventBusService } from '../../classes/services/FastaDataEventBusService';\n\nexport const FastaPageHeaderImportButton = () => {\n const onImportDataButtonClick = useCallback(() => FastaDataEventBusService.getInstance().emit('onShowImportDialog'), []);\n\n return (\n <Button\n color={'inherit'}\n onClick={onImportDataButtonClick}\n size={'small'}\n startIcon={<FileUploadOutlinedIcon />}\n sx={{\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\n },\n backgroundColor: 'rgba(255, 255, 255, 0.15)',\n color: '#FFFFFF',\n }}\n variant={'contained'}\n >\n {'Import Data'}\n </Button>\n );\n};\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91\"\n}), 'RestartAlt');","import { withDialog as e } from \"../../hoc/withDialog/index.js\";\nimport { useCallback as t, useEffect as n } from \"react\";\nimport { DialogContentText as r } from \"@mui/material\";\nimport { useTranslation as i } from \"react-i18next\";\nimport { TestIdUtil as a } from \"@gen-epix/ui-core/utils/TestIdUtil\";\nimport { jsx as o } from \"react/jsx-runtime\";\n//#region src/components/Confirmation/ConfirmationRender.tsx\nvar s = ({ body: e, cancelLabel: s, confirmLabel: c, onActionsChange: l, onCancel: u, onClose: d, onConfirm: f, openProps: p }) => {\n\tlet { t: m } = i(), h = t(() => {\n\t\tu && u(p), d();\n\t}, [\n\t\tu,\n\t\td,\n\t\tp\n\t]), g = t(() => {\n\t\tf(p), d();\n\t}, [\n\t\tf,\n\t\tp,\n\t\td\n\t]);\n\treturn n(() => {\n\t\tlet e = [];\n\t\ts && e.push({\n\t\t\t...a.createAttributes(\"Confirmation-cancelButton\"),\n\t\t\tcolor: \"primary\",\n\t\t\tlabel: s ?? m`Cancel`,\n\t\t\tonClick: h,\n\t\t\tvariant: \"outlined\"\n\t\t}), e.push({\n\t\t\t...a.createAttributes(\"Confirmation-confirmButton\"),\n\t\t\tautoFocus: !0,\n\t\t\tcolor: \"secondary\",\n\t\t\tlabel: c ?? m`OK`,\n\t\t\tonClick: g,\n\t\t\tvariant: \"contained\"\n\t\t}), l(e);\n\t}, [\n\t\ts,\n\t\th,\n\t\tc,\n\t\tg,\n\t\tl,\n\t\tu,\n\t\tm\n\t]), e ? /* @__PURE__ */ o(r, {\n\t\t...a.createAttributes(\"Confirmation-textContent\"),\n\t\tchildren: e\n\t}) : null;\n}, c = e(s, {\n\tfullWidth: !0,\n\tmaxWidth: \"sm\",\n\ttestId: \"Confirmation\"\n});\n//#endregion\nexport { c as Confirmation, s as ConfirmationRender };\n\n//# sourceMappingURL=index.js.map","import RestartAltIcon from '@mui/icons-material/RestartAlt';\nimport {\n IconButton,\n Tooltip,\n} from '@mui/material';\nimport {\n useCallback,\n useRef,\n} from 'react';\nimport { Confirmation } from '@gen-epix/ui-core-components/components/Confirmation';\nimport type { ConfirmationRefMethods } from '@gen-epix/ui-core-components/components/Confirmation';\nimport { t } from 'i18next';\n\nexport type FastaPageHeaderResetButtonProps = {\n onReset: () => void;\n};\n\nexport const FastaPageHeaderResetButton = ({ onReset }: FastaPageHeaderResetButtonProps) => {\n const confirmationRef = useRef<ConfirmationRefMethods>(null);\n const onClickResetSession = useCallback(() => {\n confirmationRef.current?.open();\n }, []);\n\n const onConfirm = useCallback(() => {\n onReset();\n }, [onReset]);\n\n return (\n <>\n <Tooltip title={'Reset current session and dataset'}>\n <IconButton\n color={'inherit'}\n onClick={onClickResetSession}\n size={'small'}\n sx={{ opacity: 0.85 }}\n >\n <RestartAltIcon fontSize={'small'} />\n </IconButton>\n </Tooltip>\n <Confirmation\n body={t`Are you sure you want to reset the current session and dataset?`}\n cancelLabel={t`Cancel`}\n confirmLabel={t`Reset`}\n onConfirm={onConfirm}\n ref={confirmationRef}\n title={t`Reset current session and dataset?`}\n />\n </>\n );\n};\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4\"\n}), 'HelpOutlineOutlined');","import { useCallback } from 'react';\nimport {\n IconButton,\n Tooltip,\n} from '@mui/material';\nimport HelpOutlineIcon from '@mui/icons-material/HelpOutlineOutlined';\n\nexport const PageHeaderDocumentationButton = () => {\n const onDocumentationButtonClick = useCallback(() => {\n window.open('https://github.com/RIVM-bioinformatics/loculus-tools', '_blank');\n }, []);\n\n return (\n <Tooltip title={'Documentation & Specifications'}>\n <IconButton\n color={'inherit'}\n onClick={onDocumentationButtonClick}\n size={'small'}\n sx={{ opacity: 0.85 }}\n >\n <HelpOutlineIcon fontSize={'small'} />\n </IconButton>\n </Tooltip>\n );\n};\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M7 19c-1.1 0-2 .9-2 2h14c0-1.1-.9-2-2-2h-4v-2h3c1.1 0 2-.9 2-2h-8c-1.66 0-3-1.34-3-3 0-1.09.59-2.04 1.47-2.57.41.59 1.06 1 1.83 1.06.7.06 1.36-.19 1.85-.62l.59 1.61.94-.34.34.94 1.88-.68-.34-.94.94-.34-2.74-7.52-.94.34-.34-.94-1.88.68.34.94-.94.35.56 1.55c-1.17-.04-2.19.75-2.48 1.86C6.27 8.14 5 9.92 5 12c0 2.76 2.24 5 5 5v2zm5.86-14.48 1.71 4.7-.94.34-1.71-4.7zM10.5 7c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1\"\n}), 'BiotechOutlined');","import { FastaPageHeaderCenterComponent } from '@rivm-loculus-tools/common-frontend/components/FastaPageHeaderCenterComponent';\nimport { FastaPageHeaderImportButton } from '@rivm-loculus-tools/common-frontend/components/FastaPageHeaderImportButton';\nimport { FastaPageHeaderResetButton } from '@rivm-loculus-tools/common-frontend/components/FastaPageHeaderResetButton';\nimport { PageCommonHeader } from '@rivm-loculus-tools/common-frontend/components/page';\nimport { PageHeaderDocumentationButton } from '@rivm-loculus-tools/common-frontend/components/PageHeaderDocumentationButton';\nimport { useCallback } from 'react';\nimport { useStore } from 'zustand';\nimport BiotechOutlinedIcon from '@mui/icons-material/BiotechOutlined';\nimport UndoIcon from '@mui/icons-material/Undo';\nimport RedoIcon from '@mui/icons-material/Redo';\nimport {\n IconButton,\n Tooltip,\n} from '@mui/material';\n\nimport { sequenceEditorStore } from '../../../stores/sequenceEditorStore';\nimport { SequenceEditorEventBusService } from '../../../classes/services/SequenceEditorEventBusService';\n\nexport const SequenceEditorPageHeader = () => {\n const resetDataset = useStore(sequenceEditorStore, (state) => state.resetDataset);\n const meta = useStore(sequenceEditorStore, (state) => state.meta);\n\n const onReset = useCallback(() => {\n resetDataset();\n }, [resetDataset]);\n\n const onUndoButtonClick = useCallback(() => {\n SequenceEditorEventBusService.getInstance().emit('onUndo');\n }, []);\n\n const onRedoButtonClick = useCallback(() => {\n SequenceEditorEventBusService.getInstance().emit('onRedo');\n }, []);\n\n return (\n <PageCommonHeader\n centerComponent={<FastaPageHeaderCenterComponent store={sequenceEditorStore} />}\n icon={<BiotechOutlinedIcon sx={{ fontSize: 24 }} />}\n rightComponent={(\n <>\n <FastaPageHeaderImportButton />\n <Tooltip title={'Undo last action'}>\n <IconButton\n color={'inherit'}\n disabled={meta?.undoDepth === 0}\n onClick={onUndoButtonClick}\n size={'small'}\n sx={{ opacity: 0.85 }}\n >\n <UndoIcon fontSize={'small'} />\n </IconButton>\n </Tooltip>\n <Tooltip title={'Redo last action'}>\n <IconButton\n color={'inherit'}\n disabled={meta?.redoDepth === 0}\n onClick={onRedoButtonClick}\n size={'small'}\n sx={{ opacity: 0.85 }}\n >\n <RedoIcon fontSize={'small'} />\n </IconButton>\n </Tooltip>\n <FastaPageHeaderResetButton onReset={onReset} />\n <PageHeaderDocumentationButton />\n </>\n )}\n title={'Sequence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AAA;GACL,CAAA;GACT,iBAAA,GAAA,EAAA,IAAA,CAAC,GAAD,EAAqC,WAAU,CAAA;GAC/C,iBAAA,GAAA,EAAA,IAAA,CAAC,GAAD,CAAgC,CAAA;EAChC,EAAA,CAAA;EAEJ,OAAO;CACR,CAAA;AAEL"}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime.js";
|
|
2
|
-
import { t } from "./SequenceEditorEventBusService.js";
|
|
3
|
-
import { t as n } from "./sequenceEditorStore.js";
|
|
4
|
-
import { Dt as r, It as i, Lt as a, P as o, g as s, i as c, t as l } from "./Box.js";
|
|
5
|
-
import { a as u, n as d, r as f, t as p } from "./KeyboardArrowDown.js";
|
|
6
|
-
import { t as m } from "./Close.js";
|
|
7
|
-
//#region ../../../../node_modules/.pnpm/@mui+icons-material@9.4.0_@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3._9ea641d093c8d4a6ca4517c9b0071d29/node_modules/@mui/icons-material/Search.mjs
|
|
8
|
-
var h = /* @__PURE__ */ e(a(), 1), g = r(), _ = s(/*#__PURE__*/ (0, g.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }), "Search"), v = ({ allowNavigation: e, highlightedIndex: t, numResults: n = 0, onHighlightedIndexChange: r, onSearchQueryChange: i, searchQuery: a, truncated: s }) => {
|
|
9
|
-
let v = o(), y = (0, h.useRef)(null), b = (0, h.useRef)(null), x = (0, h.useRef)(null), S = (0, h.useCallback)((e) => {
|
|
10
|
-
let t = e.target.value;
|
|
11
|
-
i(t);
|
|
12
|
-
}, [i]), C = (0, h.useCallback)(() => {
|
|
13
|
-
i(""), y.current?.focus();
|
|
14
|
-
}, [i]), w = (0, h.useCallback)((e) => {
|
|
15
|
-
if (e.key === "Enter") {
|
|
16
|
-
if (!n) return;
|
|
17
|
-
e.preventDefault(), r?.(0), x.current?.focus();
|
|
18
|
-
}
|
|
19
|
-
}, [n, r]), T = (0, h.useCallback)(() => {
|
|
20
|
-
if (!n) return;
|
|
21
|
-
let e = t == null || Number.isNaN(t) || t <= 0 ? n - 1 : t - 1;
|
|
22
|
-
r?.(e);
|
|
23
|
-
}, [
|
|
24
|
-
n,
|
|
25
|
-
t,
|
|
26
|
-
r
|
|
27
|
-
]), E = (0, h.useCallback)(() => {
|
|
28
|
-
if (!n) return;
|
|
29
|
-
let e = t == null || Number.isNaN(t) || t >= n - 1 ? 0 : t + 1;
|
|
30
|
-
r?.(e);
|
|
31
|
-
}, [
|
|
32
|
-
n,
|
|
33
|
-
t,
|
|
34
|
-
r
|
|
35
|
-
]), D = (0, h.useCallback)((e) => {
|
|
36
|
-
if (e.key === "ArrowRight") {
|
|
37
|
-
e.preventDefault();
|
|
38
|
-
let t = e.currentTarget.nextElementSibling;
|
|
39
|
-
t && t.focus();
|
|
40
|
-
}
|
|
41
|
-
if (e.key === "ArrowLeft") {
|
|
42
|
-
if (e.preventDefault(), e.target === b.current) {
|
|
43
|
-
y.current?.focus();
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
let t = e.currentTarget.previousElementSibling;
|
|
47
|
-
t && t.focus();
|
|
48
|
-
}
|
|
49
|
-
}, []), O = (0, h.useMemo)(() => a ? a && (Number.isNaN(n) || n <= 0) ? "No results" : t == null || Number.isNaN(t) || t < 0 || !e ? `${n}${s ? "+" : ""} results` : e ? `${t + 1}/${n}${s ? "+" : ""} results` : "" : "", [
|
|
50
|
-
a,
|
|
51
|
-
n,
|
|
52
|
-
t,
|
|
53
|
-
e,
|
|
54
|
-
s
|
|
55
|
-
]);
|
|
56
|
-
return /* @__PURE__ */ (0, g.jsx)(u, {
|
|
57
|
-
endAdornment: /* @__PURE__ */ (0, g.jsxs)(f, {
|
|
58
|
-
position: "end",
|
|
59
|
-
children: [
|
|
60
|
-
O && /* @__PURE__ */ (0, g.jsx)(l, {
|
|
61
|
-
"aria-atomic": "true",
|
|
62
|
-
"aria-live": "polite",
|
|
63
|
-
role: "status",
|
|
64
|
-
sx: { fontSize: "1rem" },
|
|
65
|
-
children: O
|
|
66
|
-
}),
|
|
67
|
-
n > 0 && e && /* @__PURE__ */ (0, g.jsxs)(g.Fragment, { children: [/* @__PURE__ */ (0, g.jsx)(c, {
|
|
68
|
-
"aria-label": "Goto previous search result",
|
|
69
|
-
disabled: !n,
|
|
70
|
-
edge: "end",
|
|
71
|
-
onClick: T,
|
|
72
|
-
onKeyDown: D,
|
|
73
|
-
ref: b,
|
|
74
|
-
sx: { color: v.palette.primary.main },
|
|
75
|
-
children: /* @__PURE__ */ (0, g.jsx)(d, {})
|
|
76
|
-
}), /* @__PURE__ */ (0, g.jsx)(c, {
|
|
77
|
-
"aria-label": "Goto next search result",
|
|
78
|
-
disabled: !n,
|
|
79
|
-
edge: "end",
|
|
80
|
-
onClick: E,
|
|
81
|
-
onKeyDown: D,
|
|
82
|
-
ref: x,
|
|
83
|
-
sx: { color: v.palette.primary.main },
|
|
84
|
-
children: /* @__PURE__ */ (0, g.jsx)(p, {})
|
|
85
|
-
})] }),
|
|
86
|
-
a && /* @__PURE__ */ (0, g.jsx)(c, {
|
|
87
|
-
"aria-label": "Clear",
|
|
88
|
-
edge: "end",
|
|
89
|
-
onClick: C,
|
|
90
|
-
onKeyDown: D,
|
|
91
|
-
children: /* @__PURE__ */ (0, g.jsx)(m, {})
|
|
92
|
-
})
|
|
93
|
-
]
|
|
94
|
-
}),
|
|
95
|
-
fullWidth: !0,
|
|
96
|
-
inputRef: y,
|
|
97
|
-
name: "Search",
|
|
98
|
-
onChange: S,
|
|
99
|
-
onKeyDown: w,
|
|
100
|
-
placeholder: "Search",
|
|
101
|
-
size: "small",
|
|
102
|
-
slotProps: { input: {
|
|
103
|
-
"aria-label": "Search",
|
|
104
|
-
sx: {
|
|
105
|
-
"&::-webkit-search-cancel-button": { display: "none" },
|
|
106
|
-
fontSize: "1rem",
|
|
107
|
-
height: v.spacing(4),
|
|
108
|
-
outline: "none !important",
|
|
109
|
-
paddingBottom: "0 !important",
|
|
110
|
-
paddingTop: "0 !important"
|
|
111
|
-
}
|
|
112
|
-
} },
|
|
113
|
-
startAdornment: /* @__PURE__ */ (0, g.jsx)(f, {
|
|
114
|
-
position: "start",
|
|
115
|
-
children: /* @__PURE__ */ (0, g.jsx)(_, { fontSize: "small" })
|
|
116
|
-
}),
|
|
117
|
-
sx: {
|
|
118
|
-
backgroundColor: v.palette.background.paper,
|
|
119
|
-
height: v.spacing(4)
|
|
120
|
-
},
|
|
121
|
-
type: "search",
|
|
122
|
-
value: a
|
|
123
|
-
});
|
|
124
|
-
}, y = () => {
|
|
125
|
-
let e = i(n, (e) => e.setSearchQuery), r = i(n, (e) => e.setSearchResultHighlightedIndex), a = i(n, (e) => e.searchQuery), o = i(n, (e) => e.searchResult), s = i(n, (e) => e.searchResultHighlightedIndex), c = (0, h.useCallback)((n) => {
|
|
126
|
-
e(n), t.getInstance().emit("onSearch", n);
|
|
127
|
-
}, [e]), l = (0, h.useCallback)((e) => {
|
|
128
|
-
r(e);
|
|
129
|
-
}, [r]);
|
|
130
|
-
return /* @__PURE__ */ (0, g.jsx)(v, {
|
|
131
|
-
allowNavigation: !0,
|
|
132
|
-
highlightedIndex: s,
|
|
133
|
-
numResults: o?.num_matches,
|
|
134
|
-
onHighlightedIndexChange: l,
|
|
135
|
-
onSearchQueryChange: c,
|
|
136
|
-
searchQuery: a,
|
|
137
|
-
truncated: o?.truncated
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
//#endregion
|
|
141
|
-
export { y as t };
|
|
142
|
-
|
|
143
|
-
//# sourceMappingURL=SequenceEditorSearchBar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SequenceEditorSearchBar.js","names":[],"sources":["../../../../../../node_modules/.pnpm/@mui+icons-material@9.4.0_@mui+material@9.4.0_@emotion+react@11.14.0_@types+react@19.3._9ea641d093c8d4a6ca4517c9b0071d29/node_modules/@mui/icons-material/Search.mjs","../../../../../common/frontend/src/components/SearchBar/SearchBar.tsx","../../src/components/ui/SequenceEditorSearchBar/SequenceEditorSearchBar.tsx"],"sourcesContent":["\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14\"\n}), 'Search');","import type {\n ChangeEvent,\n KeyboardEvent,\n} from 'react';\nimport {\n useCallback,\n useMemo,\n useRef,\n} from 'react';\nimport {\n Box,\n FilledInput,\n IconButton,\n InputAdornment,\n useTheme,\n} from '@mui/material';\nimport SearchIcon from '@mui/icons-material/Search';\nimport KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';\nimport KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';\nimport CloseIcon from '@mui/icons-material/Close';\n\n\nexport type SearchBarProps = {\n allowNavigation?: boolean;\n highlightedIndex?: null | number;\n numResults?: number;\n onHighlightedIndexChange?: (index: number) => void;\n onSearchQueryChange: (query: string) => void;\n searchQuery: string;\n truncated?: boolean;\n};\n\nexport const SearchBar = ({ allowNavigation, highlightedIndex, numResults = 0, onHighlightedIndexChange, onSearchQueryChange, searchQuery, truncated }: SearchBarProps) => {\n const theme = useTheme();\n const inputRef = useRef<HTMLInputElement>(null);\n const arrowUpButtonRef = useRef<HTMLButtonElement>(null);\n const arrowDownButtonRef = useRef<HTMLButtonElement>(null);\n\n const onTextInputChange = useCallback((event: ChangeEvent<HTMLInputElement>) => {\n const nextSearchText = event.target.value;\n onSearchQueryChange(nextSearchText);\n }, [onSearchQueryChange]);\n\n const onClearButtonClick = useCallback(() => {\n onSearchQueryChange('');\n inputRef.current?.focus();\n }, [onSearchQueryChange]);\n\n const onTextInputKeyDown = useCallback((event: KeyboardEvent<HTMLInputElement>) => {\n // on enter press, highlight the first result and focus the down arrow button\n if (event.key === 'Enter') {\n if (!numResults) {\n return;\n }\n event.preventDefault();\n onHighlightedIndexChange?.(0);\n arrowDownButtonRef.current?.focus();\n }\n }, [numResults, onHighlightedIndexChange]);\n\n const onUpArrowButtonClick = useCallback(() => {\n // goto previous result\n if (!numResults) {\n return;\n }\n const newHighlightedIndex = highlightedIndex === null || highlightedIndex === undefined || Number.isNaN(highlightedIndex) || highlightedIndex <= 0 ? numResults - 1 : highlightedIndex - 1;\n\n onHighlightedIndexChange?.(newHighlightedIndex);\n }, [numResults, highlightedIndex, onHighlightedIndexChange]);\n\n const onDownArrowButtonClick = useCallback(() => {\n // goto next result\n if (!numResults) {\n return;\n }\n const newHighlightedIndex = highlightedIndex === null || highlightedIndex === undefined || Number.isNaN(highlightedIndex) || highlightedIndex >= numResults - 1 ? 0 : highlightedIndex + 1;\n onHighlightedIndexChange?.(newHighlightedIndex);\n }, [numResults, highlightedIndex, onHighlightedIndexChange]);\n\n const onGenericKeyDown = useCallback((event: KeyboardEvent<HTMLButtonElement>) => {\n // arrow right, focus the next focusable element\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n const nextFocusableElement = event.currentTarget.nextElementSibling as HTMLElement;\n if (nextFocusableElement) {\n nextFocusableElement.focus();\n }\n }\n // arrow left, focus the previous focusable element\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n if (event.target === arrowUpButtonRef.current) {\n inputRef.current?.focus();\n return;\n }\n const previousFocusableElement = event.currentTarget.previousElementSibling as HTMLElement;\n if (previousFocusableElement) {\n previousFocusableElement.focus();\n }\n }\n }, []);\n\n const searchResultStatusText = useMemo(() => {\n if (!searchQuery) {\n return '';\n }\n if (searchQuery && (Number.isNaN(numResults) || numResults <= 0)) {\n return 'No results';\n } else if (highlightedIndex === null || highlightedIndex === undefined || Number.isNaN(highlightedIndex) || highlightedIndex < 0 || !allowNavigation) {\n return `${numResults}${truncated ? '+' : ''} results`;\n } else if (allowNavigation) {\n return `${highlightedIndex + 1}/${numResults}${truncated ? '+' : ''} results`;\n }\n return '';\n }, [searchQuery, numResults, highlightedIndex, allowNavigation, truncated]);\n\n\n return (\n <FilledInput\n endAdornment={(\n <InputAdornment position={'end'}>\n {searchResultStatusText && (\n <Box\n aria-atomic={'true'}\n aria-live={'polite'}\n role={'status'}\n sx={{\n fontSize: '1rem',\n }}\n >\n {searchResultStatusText}\n </Box>\n )}\n {numResults > 0 && allowNavigation && (\n <>\n <IconButton\n aria-label={'Goto previous search result'}\n disabled={!numResults}\n edge={'end'}\n onClick={onUpArrowButtonClick}\n onKeyDown={onGenericKeyDown}\n ref={arrowUpButtonRef}\n sx={{ color: theme.palette.primary.main }}\n >\n <KeyboardArrowUpIcon />\n </IconButton>\n <IconButton\n aria-label={'Goto next search result'}\n disabled={!numResults}\n edge={'end'}\n onClick={onDownArrowButtonClick}\n onKeyDown={onGenericKeyDown}\n ref={arrowDownButtonRef}\n sx={{ color: theme.palette.primary.main }}\n >\n <KeyboardArrowDownIcon />\n </IconButton>\n </>\n )}\n {searchQuery && (\n <IconButton\n aria-label={'Clear'}\n edge={'end'}\n onClick={onClearButtonClick}\n onKeyDown={onGenericKeyDown}\n >\n <CloseIcon />\n </IconButton>\n )}\n </InputAdornment>\n )}\n fullWidth\n inputRef={inputRef}\n name={'Search'}\n onChange={onTextInputChange}\n onKeyDown={onTextInputKeyDown}\n placeholder={'Search'}\n size={'small'}\n slotProps={{\n input: {\n 'aria-label': 'Search',\n sx: {\n '&::-webkit-search-cancel-button': {\n display: 'none',\n },\n fontSize: '1rem',\n height: theme.spacing(4),\n outline: 'none !important',\n paddingBottom: '0 !important',\n paddingTop: '0 !important',\n },\n },\n }}\n startAdornment={(\n <InputAdornment position={'start'}>\n <SearchIcon fontSize={'small'} />\n </InputAdornment>\n )}\n sx={{\n backgroundColor: theme.palette.background.paper,\n height: theme.spacing(4),\n }}\n type={'search'}\n value={searchQuery}\n />\n );\n};\n","import { SearchBar } from '@rivm-loculus-tools/common-frontend/components/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 SequenceEditorEventBusService.getInstance().emit('onSearch', query);\n }, [setSearchQuery]);\n\n const onHighlightedIndexChange = useCallback((index: number) => {\n setSearchHighlightedIndex(index);\n }, [setSearchHighlightedIndex]);\n\n return (\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 );\n};\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;4CAIA,IAAe,EAA2B,eAAA,GAAA,EAAA,IAAA,CAAK,QAAQ,EACrD,GAAG,oOACL,CAAC,GAAG,QAAQ,GC0BC,KAAa,EAAE,oBAAiB,qBAAkB,gBAAa,GAAG,6BAA0B,wBAA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