@rivm-loculus-tools/common-frontend 0.1.0 → 0.1.4
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/FastaDataImportDialog.js +309 -0
- package/dist/_chunks/FastaDataImportDialog.js.map +1 -0
- package/dist/_chunks/react.js +11 -0
- package/dist/_chunks/react.js.map +1 -0
- package/dist/classes/services/FastaDataEventBusService/FastaDataEventBusService.d.ts +10 -0
- package/dist/classes/services/FastaDataEventBusService/index.js +16 -0
- package/dist/classes/services/FastaDataEventBusService/index.js.map +1 -0
- package/dist/components/FastaDataImportDialog/FastaDataImportDialog.d.ts +12 -0
- package/dist/components/FastaDataImportDialog/index.js +2 -0
- package/dist/components/FastaDataImportDialogLoader/FastaDataImportDialogLoader.d.ts +8 -0
- package/dist/components/FastaDataImportDialogLoader/index.js +70 -0
- package/dist/components/FastaDataImportDialogLoader/index.js.map +1 -0
- package/dist/components/FastaNotLoaded/FastaNotLoaded.d.ts +7 -0
- package/dist/components/FastaNotLoaded/index.js +53 -0
- package/dist/components/FastaNotLoaded/index.js.map +1 -0
- package/dist/components/FastaPageHeaderCenterComponent/FastaPageHeaderCenterComponent.d.ts +6 -0
- package/dist/components/FastaPageHeaderCenterComponent/index.js +37 -0
- package/dist/components/FastaPageHeaderCenterComponent/index.js.map +1 -0
- package/dist/components/FastaPageHeaderImportButton/FastaPageHeaderImportButton.d.ts +1 -0
- package/dist/components/FastaPageHeaderImportButton/index.js +26 -0
- package/dist/components/FastaPageHeaderImportButton/index.js.map +1 -0
- package/dist/components/FastaPageHeaderResetButton/FastaPageHeaderResetButton.d.ts +4 -0
- package/dist/components/FastaPageHeaderResetButton/index.js +35 -0
- package/dist/components/FastaPageHeaderResetButton/index.js.map +1 -0
- package/dist/components/I18nWrapper/I18nWrapper.d.ts +4 -0
- package/dist/components/I18nWrapper/index.js +21 -0
- package/dist/components/I18nWrapper/index.js.map +1 -0
- package/dist/components/PageHeaderDocumentationButton/PageHeaderDocumentationButton.d.ts +1 -0
- package/dist/components/PageHeaderDocumentationButton/index.js +24 -0
- package/dist/components/PageHeaderDocumentationButton/index.js.map +1 -0
- package/dist/components/SearchBar/SearchBar.d.ts +10 -0
- package/dist/components/SearchBar/SearchBarNodeCounter.d.ts +4 -0
- package/dist/components/SearchBar/index.js +129 -0
- package/dist/components/SearchBar/index.js.map +1 -0
- package/dist/components/page/ErrorPageCommon.d.ts +4 -0
- package/dist/components/page/PageCommon.d.ts +8 -0
- package/dist/components/page/PageCommonContext.d.ts +7 -0
- package/dist/components/page/PageCommonContextProvider.d.ts +3 -0
- package/dist/components/page/PageCommonDrawer.d.ts +5 -0
- package/dist/components/page/PageCommonHeader.d.ts +8 -0
- package/dist/components/page/index.js +207 -0
- package/dist/components/page/index.js.map +1 -0
- package/dist/constants/page.d.ts +1 -0
- package/dist/constants/page.js +6 -0
- package/dist/constants/page.js.map +1 -0
- package/dist/models/fasta.d.ts +23 -0
- package/dist/models/fasta.js +8 -0
- package/dist/models/fasta.js.map +1 -0
- package/dist/models/metadata.d.ts +9 -0
- package/dist/stores/fastaDataStore/fastaDataStore.d.ts +32 -0
- package/dist/stores/fastaDataStore/index.js +57 -0
- package/dist/stores/fastaDataStore/index.js.map +1 -0
- package/dist/theme/index.js +257 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/theme.d.ts +1 -0
- package/dist/utils/DownloadUtil/DownloadUtil.d.ts +3 -0
- package/dist/utils/DownloadUtil/index.js +10 -0
- package/dist/utils/DownloadUtil/index.js.map +1 -0
- package/dist/utils/ErrorUtil/ErrorUtil.d.ts +3 -0
- package/dist/utils/ErrorUtil/index.js +10 -0
- package/dist/utils/ErrorUtil/index.js.map +1 -0
- package/dist/utils/FastaUtil/FastaUtil.d.ts +6 -0
- package/dist/utils/FastaUtil/index.js +63 -0
- package/dist/utils/FastaUtil/index.js.map +1 -0
- package/dist/utils/MetaDataUtil/MetaDataUtil.d.ts +20 -0
- package/dist/utils/MetaDataUtil/index.js +133 -0
- package/dist/utils/MetaDataUtil/index.js.map +1 -0
- package/dist/utils/UrlUtil/UrlUtil.d.ts +5 -0
- package/dist/utils/UrlUtil/index.js +30 -0
- package/dist/utils/UrlUtil/index.js.map +1 -0
- package/package.json +10 -7
- package/CHANGELOG.md +0 -8
- package/eslint.config.js +0 -16
- package/scripts/update-exports.js +0 -9
- package/src/classes/services/FastaDataEventBusService/FastaDataEventBusService.ts +0 -22
- package/src/components/FastaDataImportDialog/FastaDataImportDialog.tsx +0 -364
- package/src/components/FastaDataImportDialogLoader/FastaDataImportDialogLoader.tsx +0 -124
- package/src/components/FastaNotLoaded/FastaNotLoaded.tsx +0 -62
- package/src/components/FastaPageHeaderCenterComponent/FastaPageHeaderCenterComponent.tsx +0 -50
- package/src/components/FastaPageHeaderImportButton/FastaPageHeaderImportButton.tsx +0 -28
- package/src/components/FastaPageHeaderResetButton/FastaPageHeaderResetButton.tsx +0 -50
- package/src/components/I18nWrapper/I18nWrapper.tsx +0 -39
- package/src/components/PageHeaderDocumentationButton/PageHeaderDocumentationButton.tsx +0 -25
- package/src/components/SearchBar/SearchBar.tsx +0 -207
- package/src/components/SearchBar/SearchBarNodeCounter.tsx +0 -23
- package/src/components/page/ErrorPageCommon.tsx +0 -51
- package/src/components/page/PageCommon.tsx +0 -76
- package/src/components/page/PageCommonContext.ts +0 -15
- package/src/components/page/PageCommonContextProvider.tsx +0 -30
- package/src/components/page/PageCommonDrawer.tsx +0 -35
- package/src/components/page/PageCommonHeader.tsx +0 -99
- package/src/constants/page.ts +0 -1
- package/src/index.ts +0 -21
- package/src/models/fasta.ts +0 -22
- package/src/models/metadata.ts +0 -10
- package/src/stores/fastaDataStore/fastaDataStore.ts +0 -103
- package/src/theme/fonts/RobotoFlex.woff2 +0 -0
- package/src/theme/theme.ts +0 -368
- package/src/utils/DownloadUtil/DownloadUtil.ts +0 -10
- package/src/utils/ErrorUtil/ErrorUtil.ts +0 -5
- package/src/utils/FastaUtil/FastaUtil.ts +0 -109
- package/src/utils/MetaDataUtil/MetaDataUtil.ts +0 -292
- package/src/utils/UrlUtil/UrlUtil.ts +0 -35
- package/tsconfig.build.json +0 -14
- package/tsconfig.json +0 -32
- package/vite.config.ts +0 -137
- /package/{src → dist}/@types/vite-env.d.ts +0 -0
- /package/{src/classes/services/FastaDataEventBusService/index.ts → dist/classes/services/FastaDataEventBusService/index.d.ts} +0 -0
- /package/{src/components/FastaDataImportDialog/index.ts → dist/components/FastaDataImportDialog/index.d.ts} +0 -0
- /package/{src/components/FastaDataImportDialogLoader/index.ts → dist/components/FastaDataImportDialogLoader/index.d.ts} +0 -0
- /package/{src/components/FastaNotLoaded/index.ts → dist/components/FastaNotLoaded/index.d.ts} +0 -0
- /package/{src/components/FastaPageHeaderCenterComponent/index.ts → dist/components/FastaPageHeaderCenterComponent/index.d.ts} +0 -0
- /package/{src/components/FastaPageHeaderImportButton/index.ts → dist/components/FastaPageHeaderImportButton/index.d.ts} +0 -0
- /package/{src/components/FastaPageHeaderResetButton/index.ts → dist/components/FastaPageHeaderResetButton/index.d.ts} +0 -0
- /package/{src/components/I18nWrapper/index.ts → dist/components/I18nWrapper/index.d.ts} +0 -0
- /package/{src/components/PageHeaderDocumentationButton/index.ts → dist/components/PageHeaderDocumentationButton/index.d.ts} +0 -0
- /package/{src/components/SearchBar/index.ts → dist/components/SearchBar/index.d.ts} +0 -0
- /package/{src/components/page/index.ts → dist/components/page/index.d.ts} +0 -0
- /package/{src/.gitkeep → dist/models/metadata.js} +0 -0
- /package/{src/stores/fastaDataStore/index.ts → dist/stores/fastaDataStore/index.d.ts} +0 -0
- /package/{src/theme/index.ts → dist/theme/index.d.ts} +0 -0
- /package/{src/utils/DownloadUtil/index.ts → dist/utils/DownloadUtil/index.d.ts} +0 -0
- /package/{src/utils/ErrorUtil/index.ts → dist/utils/ErrorUtil/index.d.ts} +0 -0
- /package/{src/utils/FastaUtil/index.ts → dist/utils/FastaUtil/index.d.ts} +0 -0
- /package/{src/utils/MetaDataUtil/index.ts → dist/utils/MetaDataUtil/index.d.ts} +0 -0
- /package/{src/utils/UrlUtil/index.ts → dist/utils/UrlUtil/index.d.ts} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FastaDataEventBusService as e } from "../../classes/services/FastaDataEventBusService/index.js";
|
|
2
|
+
import { Button as t } from "@mui/material";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { useCallback as r } from "react";
|
|
5
|
+
import i from "@mui/icons-material/FileUploadOutlined";
|
|
6
|
+
//#region src/components/FastaPageHeaderImportButton/FastaPageHeaderImportButton.tsx
|
|
7
|
+
var a = () => {
|
|
8
|
+
let a = r(() => e.getInstance().emit("onShowImportDialog"), []);
|
|
9
|
+
return /* @__PURE__ */ n(t, {
|
|
10
|
+
color: "inherit",
|
|
11
|
+
onClick: a,
|
|
12
|
+
size: "small",
|
|
13
|
+
startIcon: /* @__PURE__ */ n(i, {}),
|
|
14
|
+
sx: {
|
|
15
|
+
"&:hover": { backgroundColor: "rgba(255, 255, 255, 0.25)" },
|
|
16
|
+
backgroundColor: "rgba(255, 255, 255, 0.15)",
|
|
17
|
+
color: "#FFFFFF"
|
|
18
|
+
},
|
|
19
|
+
variant: "contained",
|
|
20
|
+
children: "Import Data"
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as FastaPageHeaderImportButton };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/FastaPageHeaderImportButton/FastaPageHeaderImportButton.tsx"],"sourcesContent":["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"],"mappings":";;;;;;AAMA,IAAa,UAAoC;CAC/C,IAAM,IAA0B,QAAkB,EAAyB,YAAY,CAAC,CAAC,KAAK,oBAAoB,GAAG,CAAC,CAAC;CAEvH,OACE,kBAAC,GAAD;EACE,OAAO;EACP,SAAS;EACT,MAAM;EACN,WAAW,kBAAC,GAAD,CAAyB,CAAA;EACpC,IAAI;GACF,WAAW,EACT,iBAAiB,4BACnB;GACA,iBAAiB;GACjB,OAAO;EACT;EACA,SAAS;EAER,UAAA;CACK,CAAA;AAEZ"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IconButton as e, Tooltip as t } from "@mui/material";
|
|
2
|
+
import { t as n } from "i18next";
|
|
3
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
+
import { useCallback as o, useRef as s } from "react";
|
|
5
|
+
import c from "@mui/icons-material/RestartAlt";
|
|
6
|
+
import { Confirmation as l } from "@gen-epix/ui-core-components/components/Confirmation";
|
|
7
|
+
//#region src/components/FastaPageHeaderResetButton/FastaPageHeaderResetButton.tsx
|
|
8
|
+
var u = ({ onReset: u }) => {
|
|
9
|
+
let d = s(null), f = o(() => {
|
|
10
|
+
d.current?.open();
|
|
11
|
+
}, []), p = o(() => {
|
|
12
|
+
u();
|
|
13
|
+
}, [u]);
|
|
14
|
+
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(t, {
|
|
15
|
+
title: "Reset current session and dataset",
|
|
16
|
+
children: /* @__PURE__ */ i(e, {
|
|
17
|
+
color: "inherit",
|
|
18
|
+
onClick: f,
|
|
19
|
+
size: "small",
|
|
20
|
+
sx: { opacity: .85 },
|
|
21
|
+
children: /* @__PURE__ */ i(c, { fontSize: "small" })
|
|
22
|
+
})
|
|
23
|
+
}), /* @__PURE__ */ i(l, {
|
|
24
|
+
body: n`Are you sure you want to reset the current session and dataset?`,
|
|
25
|
+
cancelLabel: n`Cancel`,
|
|
26
|
+
confirmLabel: n`Reset`,
|
|
27
|
+
onConfirm: p,
|
|
28
|
+
ref: d,
|
|
29
|
+
title: n`Reset current session and dataset?`
|
|
30
|
+
})] });
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { u as FastaPageHeaderResetButton };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/FastaPageHeaderResetButton/FastaPageHeaderResetButton.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;AAiBA,IAAa,KAA8B,EAAE,iBAA+C;CAC1F,IAAM,IAAkB,EAA+B,IAAI,GACrD,IAAsB,QAAkB;EAC5C,EAAgB,SAAS,KAAK;CAChC,GAAG,CAAC,CAAC,GAEC,IAAY,QAAkB;EAClC,EAAQ;CACV,GAAG,CAAC,CAAO,CAAC;CAEZ,OACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EAAS,OAAO;EACd,UAAA,kBAAC,GAAD;GACE,OAAO;GACP,SAAS;GACT,MAAM;GACN,IAAI,EAAE,SAAS,IAAK;GAEpB,UAAA,kBAAC,GAAD,EAAgB,UAAU,QAAU,CAAA;EAC1B,CAAA;CACL,CAAA,GACT,kBAAC,GAAD;EACE,MAAM,CAAC;EACP,aAAa,CAAC;EACd,cAAc,CAAC;EACJ;EACX,KAAK;EACL,OAAO,CAAC;CACT,CAAA,CACD,EAAA,CAAA;AAEN"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import e from "i18next";
|
|
2
|
+
import { Fragment as t, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect as r, useState as i } from "react";
|
|
4
|
+
import { initReactI18next as a } from "react-i18next";
|
|
5
|
+
//#region src/components/I18nWrapper/I18nWrapper.tsx
|
|
6
|
+
var o = ({ children: o }) => {
|
|
7
|
+
let [s, c] = i(!1);
|
|
8
|
+
return r(() => {
|
|
9
|
+
(async () => {
|
|
10
|
+
await e.use(a).init({
|
|
11
|
+
interpolation: { escapeValue: !1 },
|
|
12
|
+
lng: "en",
|
|
13
|
+
resources: { en: { translation: {} } }
|
|
14
|
+
}), c(!0);
|
|
15
|
+
})();
|
|
16
|
+
}, []), /* @__PURE__ */ n(t, { children: s ? o : null });
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { o as I18nWrapper };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/I18nWrapper/I18nWrapper.tsx"],"sourcesContent":["import {\n useEffect,\n useState,\n} from 'react';\nimport type { ReactNode } from 'react';\nimport i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\n\nexport const I18nWrapper = ({ children }: { children: ReactNode }) => {\n const [isInitialized, setIsInitialized] = useState(false);\n\n useEffect(() => {\n const performInitialization = async () => {\n await i18n\n .use(initReactI18next) // passes i18n down to react-i18next\n .init({\n interpolation: {\n escapeValue: false, // react already safes from xss\n },\n lng: 'en',\n resources: {\n en: {\n translation: {\n },\n },\n },\n });\n setIsInitialized(true);\n };\n void performInitialization();\n }, []);\n\n\n return (\n <>\n {isInitialized ? children : null}\n </>\n );\n};\n"],"mappings":";;;;;AAQA,IAAa,KAAe,EAAE,kBAAwC;CACpE,IAAM,CAAC,GAAe,KAAoB,EAAS,EAAK;CAwBxD,OAtBA,QAAgB;EAkBd,aAjB0C;GAexC,AAdA,MAAM,EACH,IAAI,CAAgB,CAAC,CACrB,KAAK;IACJ,eAAe,EACb,aAAa,GACf;IACA,KAAK;IACL,WAAW,EACT,IAAI,EACF,aAAa,CACb,EACF,EACF;GACF,CAAC,GACH,EAAiB,EAAI;EACvB,EACK,CAAsB;CAC7B,GAAG,CAAC,CAAC,GAIH,kBAAA,GAAA,EAAA,UACG,IAAgB,IAAW,KAC5B,CAAA;AAEN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PageHeaderDocumentationButton: () => import('react').JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IconButton as e, Tooltip as t } from "@mui/material";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback as r } from "react";
|
|
4
|
+
import i from "@mui/icons-material/HelpOutlineOutlined";
|
|
5
|
+
//#region src/components/PageHeaderDocumentationButton/PageHeaderDocumentationButton.tsx
|
|
6
|
+
var a = () => {
|
|
7
|
+
let a = r(() => {
|
|
8
|
+
window.open("https://github.com/RIVM-bioinformatics/loculus-tools", "_blank");
|
|
9
|
+
}, []);
|
|
10
|
+
return /* @__PURE__ */ n(t, {
|
|
11
|
+
title: "Documentation & Specifications",
|
|
12
|
+
children: /* @__PURE__ */ n(e, {
|
|
13
|
+
color: "inherit",
|
|
14
|
+
onClick: a,
|
|
15
|
+
size: "small",
|
|
16
|
+
sx: { opacity: .85 },
|
|
17
|
+
children: /* @__PURE__ */ n(i, { fontSize: "small" })
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { a as PageHeaderDocumentationButton };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/PageHeaderDocumentationButton/PageHeaderDocumentationButton.tsx"],"sourcesContent":["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"],"mappings":";;;;;AAOA,IAAa,UAAsC;CACjD,IAAM,IAA6B,QAAkB;EACnD,OAAO,KAAK,wDAAwD,QAAQ;CAC9E,GAAG,CAAC,CAAC;CAEL,OACE,kBAAC,GAAD;EAAS,OAAO;EACd,UAAA,kBAAC,GAAD;GACE,OAAO;GACP,SAAS;GACT,MAAM;GACN,IAAI,EAAE,SAAS,IAAK;GAEpB,UAAA,kBAAC,GAAD,EAAiB,UAAU,QAAU,CAAA;EAC3B,CAAA;CACL,CAAA;AAEb"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type SearchBarProps = {
|
|
2
|
+
allowNavigation?: boolean;
|
|
3
|
+
highlightedIndex?: null | number;
|
|
4
|
+
numResults?: number;
|
|
5
|
+
onHighlightedIndexChange?: (index: number) => void;
|
|
6
|
+
onSearchQueryChange: (query: string) => void;
|
|
7
|
+
searchQuery: string;
|
|
8
|
+
truncated?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const SearchBar: ({ allowNavigation, highlightedIndex, numResults, onHighlightedIndexChange, onSearchQueryChange, searchQuery, truncated }: SearchBarProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Box as e, FilledInput as t, IconButton as n, InputAdornment as r, useTheme as i } from "@mui/material";
|
|
2
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback as c, useMemo as l, useRef as u } from "react";
|
|
4
|
+
import d from "@mui/icons-material/Search";
|
|
5
|
+
import f from "@mui/icons-material/KeyboardArrowUp";
|
|
6
|
+
import p from "@mui/icons-material/KeyboardArrowDown";
|
|
7
|
+
import m from "@mui/icons-material/Close";
|
|
8
|
+
//#region src/components/SearchBar/SearchBar.tsx
|
|
9
|
+
var h = ({ allowNavigation: h, highlightedIndex: g, numResults: _ = 0, onHighlightedIndexChange: v, onSearchQueryChange: y, searchQuery: b, truncated: x }) => {
|
|
10
|
+
let S = i(), C = u(null), w = u(null), T = u(null), E = c((e) => {
|
|
11
|
+
let t = e.target.value;
|
|
12
|
+
y(t);
|
|
13
|
+
}, [y]), D = c(() => {
|
|
14
|
+
y(""), C.current?.focus();
|
|
15
|
+
}, [y]), O = c((e) => {
|
|
16
|
+
if (e.key === "Enter") {
|
|
17
|
+
if (!_) return;
|
|
18
|
+
e.preventDefault(), v?.(0), T.current?.focus();
|
|
19
|
+
}
|
|
20
|
+
}, [_, v]), k = c(() => {
|
|
21
|
+
if (!_) return;
|
|
22
|
+
let e = g == null || Number.isNaN(g) || g <= 0 ? _ - 1 : g - 1;
|
|
23
|
+
v?.(e);
|
|
24
|
+
}, [
|
|
25
|
+
_,
|
|
26
|
+
g,
|
|
27
|
+
v
|
|
28
|
+
]), A = c(() => {
|
|
29
|
+
if (!_) return;
|
|
30
|
+
let e = g == null || Number.isNaN(g) || g >= _ - 1 ? 0 : g + 1;
|
|
31
|
+
v?.(e);
|
|
32
|
+
}, [
|
|
33
|
+
_,
|
|
34
|
+
g,
|
|
35
|
+
v
|
|
36
|
+
]), j = c((e) => {
|
|
37
|
+
if (e.key === "ArrowRight") {
|
|
38
|
+
e.preventDefault();
|
|
39
|
+
let t = e.currentTarget.nextElementSibling;
|
|
40
|
+
t && t.focus();
|
|
41
|
+
}
|
|
42
|
+
if (e.key === "ArrowLeft") {
|
|
43
|
+
if (e.preventDefault(), e.target === w.current) {
|
|
44
|
+
C.current?.focus();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
let t = e.currentTarget.previousElementSibling;
|
|
48
|
+
t && t.focus();
|
|
49
|
+
}
|
|
50
|
+
}, []), M = l(() => b ? b && (Number.isNaN(_) || _ <= 0) ? "No results" : g == null || Number.isNaN(g) || g < 0 || !h ? `${_}${x ? "+" : ""} results` : h ? `${g + 1}/${_}${x ? "+" : ""} results` : "" : "", [
|
|
51
|
+
b,
|
|
52
|
+
_,
|
|
53
|
+
g,
|
|
54
|
+
h,
|
|
55
|
+
x
|
|
56
|
+
]);
|
|
57
|
+
return /* @__PURE__ */ o(t, {
|
|
58
|
+
endAdornment: /* @__PURE__ */ s(r, {
|
|
59
|
+
position: "end",
|
|
60
|
+
children: [
|
|
61
|
+
M && /* @__PURE__ */ o(e, {
|
|
62
|
+
"aria-atomic": "true",
|
|
63
|
+
"aria-live": "polite",
|
|
64
|
+
role: "status",
|
|
65
|
+
sx: { fontSize: "1rem" },
|
|
66
|
+
children: M
|
|
67
|
+
}),
|
|
68
|
+
_ > 0 && h && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(n, {
|
|
69
|
+
"aria-label": "Goto previous search result",
|
|
70
|
+
disabled: !_,
|
|
71
|
+
edge: "end",
|
|
72
|
+
onClick: k,
|
|
73
|
+
onKeyDown: j,
|
|
74
|
+
ref: w,
|
|
75
|
+
sx: { color: S.palette.primary.main },
|
|
76
|
+
children: /* @__PURE__ */ o(f, {})
|
|
77
|
+
}), /* @__PURE__ */ o(n, {
|
|
78
|
+
"aria-label": "Goto next search result",
|
|
79
|
+
disabled: !_,
|
|
80
|
+
edge: "end",
|
|
81
|
+
onClick: A,
|
|
82
|
+
onKeyDown: j,
|
|
83
|
+
ref: T,
|
|
84
|
+
sx: { color: S.palette.primary.main },
|
|
85
|
+
children: /* @__PURE__ */ o(p, {})
|
|
86
|
+
})] }),
|
|
87
|
+
b && /* @__PURE__ */ o(n, {
|
|
88
|
+
"aria-label": "Clear",
|
|
89
|
+
edge: "end",
|
|
90
|
+
onClick: D,
|
|
91
|
+
onKeyDown: j,
|
|
92
|
+
children: /* @__PURE__ */ o(m, {})
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
}),
|
|
96
|
+
fullWidth: !0,
|
|
97
|
+
inputRef: C,
|
|
98
|
+
name: "Search",
|
|
99
|
+
onChange: E,
|
|
100
|
+
onKeyDown: O,
|
|
101
|
+
placeholder: "Search",
|
|
102
|
+
size: "small",
|
|
103
|
+
slotProps: { input: {
|
|
104
|
+
"aria-label": "Search",
|
|
105
|
+
sx: {
|
|
106
|
+
"&::-webkit-search-cancel-button": { display: "none" },
|
|
107
|
+
fontSize: "1rem",
|
|
108
|
+
height: S.spacing(4),
|
|
109
|
+
outline: "none !important",
|
|
110
|
+
paddingBottom: "0 !important",
|
|
111
|
+
paddingTop: "0 !important"
|
|
112
|
+
}
|
|
113
|
+
} },
|
|
114
|
+
startAdornment: /* @__PURE__ */ o(r, {
|
|
115
|
+
position: "start",
|
|
116
|
+
children: /* @__PURE__ */ o(d, { fontSize: "small" })
|
|
117
|
+
}),
|
|
118
|
+
sx: {
|
|
119
|
+
backgroundColor: S.palette.background.paper,
|
|
120
|
+
height: S.spacing(4)
|
|
121
|
+
},
|
|
122
|
+
type: "search",
|
|
123
|
+
value: b
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
//#endregion
|
|
127
|
+
export { h as SearchBar };
|
|
128
|
+
|
|
129
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/SearchBar/SearchBar.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;;AAgCA,IAAa,KAAa,EAAE,oBAAiB,qBAAkB,gBAAa,GAAG,6BAA0B,wBAAqB,gBAAa,mBAAgC;CACzK,IAAM,IAAQ,EAAS,GACjB,IAAW,EAAyB,IAAI,GACxC,IAAmB,EAA0B,IAAI,GACjD,IAAqB,EAA0B,IAAI,GAEnD,IAAoB,GAAa,MAAyC;EAC9E,IAAM,IAAiB,EAAM,OAAO;EACpC,EAAoB,CAAc;CACpC,GAAG,CAAC,CAAmB,CAAC,GAElB,IAAqB,QAAkB;EAE3C,AADA,EAAoB,EAAE,GACtB,EAAS,SAAS,MAAM;CAC1B,GAAG,CAAC,CAAmB,CAAC,GAElB,IAAqB,GAAa,MAA2C;EAEjF,IAAI,EAAM,QAAQ,SAAS;GACzB,IAAI,CAAC,GACH;GAIF,AAFA,EAAM,eAAe,GACrB,IAA2B,CAAC,GAC5B,EAAmB,SAAS,MAAM;EACpC;CACF,GAAG,CAAC,GAAY,CAAwB,CAAC,GAEnC,IAAuB,QAAkB;EAE7C,IAAI,CAAC,GACH;EAEF,IAAM,IAAsB,KAAqB,QAA0C,OAAO,MAAM,CAAgB,KAAK,KAAoB,IAAI,IAAa,IAAI,IAAmB;EAEzL,IAA2B,CAAmB;CAChD,GAAG;EAAC;EAAY;EAAkB;CAAwB,CAAC,GAErD,IAAyB,QAAkB;EAE/C,IAAI,CAAC,GACH;EAEF,IAAM,IAAsB,KAAqB,QAA0C,OAAO,MAAM,CAAgB,KAAK,KAAoB,IAAa,IAAI,IAAI,IAAmB;EACzL,IAA2B,CAAmB;CAChD,GAAG;EAAC;EAAY;EAAkB;CAAwB,CAAC,GAErD,IAAmB,GAAa,MAA4C;EAEhF,IAAI,EAAM,QAAQ,cAAc;GAC9B,EAAM,eAAe;GACrB,IAAM,IAAuB,EAAM,cAAc;GACjD,AAAI,KACF,EAAqB,MAAM;EAE/B;EAEA,IAAI,EAAM,QAAQ,aAAa;GAE7B,IADA,EAAM,eAAe,GACjB,EAAM,WAAW,EAAiB,SAAS;IAC7C,EAAS,SAAS,MAAM;IACxB;GACF;GACA,IAAM,IAA2B,EAAM,cAAc;GACrD,AAAI,KACF,EAAyB,MAAM;EAEnC;CACF,GAAG,CAAC,CAAC,GAEC,IAAyB,QACxB,IAGD,MAAgB,OAAO,MAAM,CAAU,KAAK,KAAc,KACrD,eACE,KAAqB,QAA0C,OAAO,MAAM,CAAgB,KAAK,IAAmB,KAAK,CAAC,IAC5H,GAAG,IAAa,IAAY,MAAM,GAAG,YACnC,IACF,GAAG,IAAmB,EAAE,GAAG,IAAa,IAAY,MAAM,GAAG,YAE/D,KATE,IAUR;EAAC;EAAa;EAAY;EAAkB;EAAiB;CAAS,CAAC;CAG1E,OACE,kBAAC,GAAD;EACE,cACE,kBAAC,GAAD;GAAgB,UAAU;GAA1B,UAAA;IACG,KACC,kBAAC,GAAD;KACE,eAAa;KACb,aAAW;KACX,MAAM;KACN,IAAI,EACF,UAAU,OACZ;KAEC,UAAA;IACE,CAAA;IAEN,IAAa,KAAK,KACjB,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;KACE,cAAY;KACZ,UAAU,CAAC;KACX,MAAM;KACN,SAAS;KACT,WAAW;KACX,KAAK;KACL,IAAI,EAAE,OAAO,EAAM,QAAQ,QAAQ,KAAK;KAExC,UAAA,kBAAC,GAAD,CAAsB,CAAA;IACZ,CAAA,GACZ,kBAAC,GAAD;KACE,cAAY;KACZ,UAAU,CAAC;KACX,MAAM;KACN,SAAS;KACT,WAAW;KACX,KAAK;KACL,IAAI,EAAE,OAAO,EAAM,QAAQ,QAAQ,KAAK;KAExC,UAAA,kBAAC,GAAD,CAAwB,CAAA;IACd,CAAA,CACZ,EAAA,CAAA;IAEH,KACC,kBAAC,GAAD;KACE,cAAY;KACZ,MAAM;KACN,SAAS;KACT,WAAW;KAEX,UAAA,kBAAC,GAAD,CAAY,CAAA;IACF,CAAA;GAEA;;EAElB,WAAA;EACU;EACV,MAAM;EACN,UAAU;EACV,WAAW;EACX,aAAa;EACb,MAAM;EACN,WAAW,EACT,OAAO;GACL,cAAc;GACd,IAAI;IACF,mCAAmC,EACjC,SAAS,OACX;IACA,UAAU;IACV,QAAQ,EAAM,QAAQ,CAAC;IACvB,SAAS;IACT,eAAe;IACf,YAAY;GACd;EACF,EACF;EACA,gBACE,kBAAC,GAAD;GAAgB,UAAU;GACxB,UAAA,kBAAC,GAAD,EAAY,UAAU,QAAU,CAAA;EAClB,CAAA;EAElB,IAAI;GACF,iBAAiB,EAAM,QAAQ,WAAW;GAC1C,QAAQ,EAAM,QAAQ,CAAC;EACzB;EACA,MAAM;EACN,OAAO;CACR,CAAA;AAEL"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type PageCommonProps = {
|
|
3
|
+
readonly children: ReactNode;
|
|
4
|
+
readonly drawerComponent?: ReactNode;
|
|
5
|
+
readonly headerComponent?: ReactNode;
|
|
6
|
+
readonly isNoInteraction?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const PageCommon: ({ children, drawerComponent, headerComponent, isNoInteraction }: PageCommonProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type PageCommonContextData = {
|
|
2
|
+
readonly isDrawerOpen: boolean;
|
|
3
|
+
readonly isNoInteraction: boolean;
|
|
4
|
+
readonly setIsDrawerOpen: (open: boolean) => void;
|
|
5
|
+
readonly setIsNoInteraction: (open: boolean) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const PageCommonContext: import('react').Context<PageCommonContextData>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type PageCommonHeaderProps = {
|
|
3
|
+
readonly centerComponent?: ReactNode;
|
|
4
|
+
readonly icon?: ReactNode;
|
|
5
|
+
readonly rightComponent?: ReactNode;
|
|
6
|
+
readonly title: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const PageCommonHeader: ({ centerComponent, icon, rightComponent, title }: PageCommonHeaderProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import "../../constants/page.js";
|
|
2
|
+
import { AppBar as e, Box as t, Drawer as n, IconButton as r, Toolbar as i, Typography as a, useTheme as o } from "@mui/material";
|
|
3
|
+
import { t as s } from "i18next";
|
|
4
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
import { createContext as d, use as f, useCallback as p, useEffect as m, useMemo as h, useState as g } from "react";
|
|
6
|
+
import _ from "@mui/icons-material/Menu";
|
|
7
|
+
//#region src/components/page/ErrorPageCommon.tsx
|
|
8
|
+
var v = ({ error: e }) => /* @__PURE__ */ u(t, {
|
|
9
|
+
sx: {
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexDirection: "column",
|
|
13
|
+
justifyContent: "center",
|
|
14
|
+
width: "100%"
|
|
15
|
+
},
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ l(t, {
|
|
18
|
+
sx: { padding: 1 },
|
|
19
|
+
children: /* @__PURE__ */ l(a, {
|
|
20
|
+
variant: "h1",
|
|
21
|
+
children: s`Something went wrong`
|
|
22
|
+
})
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ l(t, {
|
|
25
|
+
sx: { padding: 1 },
|
|
26
|
+
children: /* @__PURE__ */ l(a, {
|
|
27
|
+
variant: "body2",
|
|
28
|
+
children: e instanceof Error ? e.message : s`An unexpected error occurred.`
|
|
29
|
+
})
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ u(t, {
|
|
32
|
+
sx: { padding: 1 },
|
|
33
|
+
children: [/* @__PURE__ */ l(a, {
|
|
34
|
+
variant: "h6",
|
|
35
|
+
children: s`Details for our technicians`
|
|
36
|
+
}), /* @__PURE__ */ l(t, {
|
|
37
|
+
component: "pre",
|
|
38
|
+
sx: { fontSize: "0.8rem" },
|
|
39
|
+
children: e?.stack
|
|
40
|
+
})]
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
}), y = d({
|
|
44
|
+
isDrawerOpen: !1,
|
|
45
|
+
isNoInteraction: !1,
|
|
46
|
+
setIsDrawerOpen: () => null,
|
|
47
|
+
setIsNoInteraction: () => null
|
|
48
|
+
}), b = ({ children: e, drawerComponent: n, headerComponent: r, isNoInteraction: i }) => {
|
|
49
|
+
let a = o(), { isDrawerOpen: s, setIsNoInteraction: c } = f(y);
|
|
50
|
+
return m(() => {
|
|
51
|
+
c(!!i);
|
|
52
|
+
}, [i, c]), /* @__PURE__ */ u(t, {
|
|
53
|
+
sx: {
|
|
54
|
+
display: "flex",
|
|
55
|
+
flexDirection: "column",
|
|
56
|
+
height: "100vh",
|
|
57
|
+
overflow: "hidden",
|
|
58
|
+
position: "relative",
|
|
59
|
+
width: "100vw"
|
|
60
|
+
},
|
|
61
|
+
children: [r, /* @__PURE__ */ u(t, {
|
|
62
|
+
sx: {
|
|
63
|
+
display: "flex",
|
|
64
|
+
flex: 1,
|
|
65
|
+
height: "calc(100vh - 56px)",
|
|
66
|
+
overflow: "hidden",
|
|
67
|
+
position: "relative",
|
|
68
|
+
width: "100%"
|
|
69
|
+
},
|
|
70
|
+
children: [n, /* @__PURE__ */ l(t, {
|
|
71
|
+
component: "main",
|
|
72
|
+
sx: {
|
|
73
|
+
flexGrow: 1,
|
|
74
|
+
height: "100%",
|
|
75
|
+
overflow: "hidden",
|
|
76
|
+
position: "relative",
|
|
77
|
+
transition: () => a.transitions.create(["margin", "width"], {
|
|
78
|
+
duration: a.transitions.duration.leavingScreen,
|
|
79
|
+
easing: a.transitions.easing.sharp
|
|
80
|
+
}),
|
|
81
|
+
width: s ? "calc(100% - 340px)" : "100%"
|
|
82
|
+
},
|
|
83
|
+
children: e
|
|
84
|
+
})]
|
|
85
|
+
})]
|
|
86
|
+
});
|
|
87
|
+
}, x = ({ children: e }) => {
|
|
88
|
+
let [t, n] = g(!1), [r, i] = g(!1), a = h(() => ({
|
|
89
|
+
isDrawerOpen: t,
|
|
90
|
+
isNoInteraction: r,
|
|
91
|
+
setIsDrawerOpen: n,
|
|
92
|
+
setIsNoInteraction: i
|
|
93
|
+
}), [t, r]);
|
|
94
|
+
return /* @__PURE__ */ l(y, {
|
|
95
|
+
value: a,
|
|
96
|
+
children: e
|
|
97
|
+
});
|
|
98
|
+
}, S = ({ children: e }) => {
|
|
99
|
+
let { isDrawerOpen: t } = f(y);
|
|
100
|
+
return /* @__PURE__ */ l(n, {
|
|
101
|
+
anchor: "left",
|
|
102
|
+
open: t,
|
|
103
|
+
sx: {
|
|
104
|
+
"& .MuiDrawer-paper": {
|
|
105
|
+
height: "calc(100% - 56px)",
|
|
106
|
+
overflowY: "auto",
|
|
107
|
+
top: "56px",
|
|
108
|
+
width: 340
|
|
109
|
+
},
|
|
110
|
+
flexShrink: 0,
|
|
111
|
+
width: t ? 340 : 0
|
|
112
|
+
},
|
|
113
|
+
variant: "persistent",
|
|
114
|
+
children: e
|
|
115
|
+
});
|
|
116
|
+
}, C = ({ centerComponent: n, icon: o, rightComponent: s, title: d }) => {
|
|
117
|
+
let { isDrawerOpen: m, isNoInteraction: h, setIsDrawerOpen: g } = f(y), v = p(() => {
|
|
118
|
+
g(!m);
|
|
119
|
+
}, [m, g]);
|
|
120
|
+
return /* @__PURE__ */ l(e, {
|
|
121
|
+
elevation: 1,
|
|
122
|
+
position: "static",
|
|
123
|
+
sx: {
|
|
124
|
+
backgroundColor: "primary.main",
|
|
125
|
+
color: "#FFFFFF",
|
|
126
|
+
height: 56,
|
|
127
|
+
justifyContent: "center",
|
|
128
|
+
zIndex: (e) => e.zIndex.drawer + 1
|
|
129
|
+
},
|
|
130
|
+
children: /* @__PURE__ */ u(i, {
|
|
131
|
+
sx: {
|
|
132
|
+
display: "flex",
|
|
133
|
+
justifyContent: "space-between",
|
|
134
|
+
px: 2
|
|
135
|
+
},
|
|
136
|
+
variant: "dense",
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ u(t, {
|
|
139
|
+
sx: {
|
|
140
|
+
alignItems: "center",
|
|
141
|
+
display: "flex",
|
|
142
|
+
gap: 1.5
|
|
143
|
+
},
|
|
144
|
+
children: [
|
|
145
|
+
!h && /* @__PURE__ */ l(r, {
|
|
146
|
+
"aria-label": "open drawer",
|
|
147
|
+
color: "inherit",
|
|
148
|
+
edge: "start",
|
|
149
|
+
onClick: v,
|
|
150
|
+
size: "small",
|
|
151
|
+
children: /* @__PURE__ */ l(_, {})
|
|
152
|
+
}),
|
|
153
|
+
o && /* @__PURE__ */ l(c, { children: o }),
|
|
154
|
+
/* @__PURE__ */ l(a, {
|
|
155
|
+
component: "div",
|
|
156
|
+
noWrap: !0,
|
|
157
|
+
sx: {
|
|
158
|
+
color: "inherit",
|
|
159
|
+
fontSize: "1.05rem",
|
|
160
|
+
fontWeight: 700,
|
|
161
|
+
letterSpacing: "-0.01em"
|
|
162
|
+
},
|
|
163
|
+
variant: "h6",
|
|
164
|
+
children: d
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ l(a, {
|
|
167
|
+
sx: {
|
|
168
|
+
backgroundColor: "rgba(255, 255, 255, 0.15)",
|
|
169
|
+
borderRadius: 1,
|
|
170
|
+
display: {
|
|
171
|
+
sm: "inline-block",
|
|
172
|
+
xs: "none"
|
|
173
|
+
},
|
|
174
|
+
fontSize: "0.7rem",
|
|
175
|
+
fontWeight: 600,
|
|
176
|
+
px: 1,
|
|
177
|
+
py: .25
|
|
178
|
+
},
|
|
179
|
+
variant: "caption",
|
|
180
|
+
children: "Loculus Tool"
|
|
181
|
+
})
|
|
182
|
+
]
|
|
183
|
+
}),
|
|
184
|
+
/* @__PURE__ */ l(t, {
|
|
185
|
+
sx: {
|
|
186
|
+
alignItems: "center",
|
|
187
|
+
display: "flex",
|
|
188
|
+
gap: 1
|
|
189
|
+
},
|
|
190
|
+
children: n
|
|
191
|
+
}),
|
|
192
|
+
!h && /* @__PURE__ */ l(t, {
|
|
193
|
+
sx: {
|
|
194
|
+
alignItems: "center",
|
|
195
|
+
display: "flex",
|
|
196
|
+
gap: 1
|
|
197
|
+
},
|
|
198
|
+
children: s
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
})
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
//#endregion
|
|
205
|
+
export { v as ErrorPageCommon, b as PageCommon, y as PageCommonContext, x as PageCommonContextProvider, S as PageCommonDrawer, C as PageCommonHeader };
|
|
206
|
+
|
|
207
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/page/ErrorPageCommon.tsx","../../../src/components/page/PageCommonContext.ts","../../../src/components/page/PageCommon.tsx","../../../src/components/page/PageCommonContextProvider.tsx","../../../src/components/page/PageCommonDrawer.tsx","../../../src/components/page/PageCommonHeader.tsx"],"sourcesContent":["import {\n Box,\n Typography,\n} from '@mui/material';\nimport { t } from 'i18next';\n\nexport type ErrorPageCommonProps = {\n error: unknown;\n};\n\nexport const ErrorPageCommon = ({ error }: ErrorPageCommonProps) => {\n return (\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n width: '100%',\n }}\n >\n <Box sx={{ padding: 1 }}>\n <Typography\n variant={'h1'}\n >\n {t`Something went wrong`}\n </Typography>\n </Box>\n <Box sx={{ padding: 1 }}>\n <Typography\n variant={'body2'}\n >\n {error instanceof Error ? error.message : t`An unexpected error occurred.`}\n </Typography>\n </Box>\n <Box sx={{ padding: 1 }}>\n <Typography variant={'h6'}>\n {t`Details for our technicians`}\n </Typography>\n <Box\n component={'pre'}\n sx={{\n fontSize: '0.8rem',\n }}\n >\n {(error as Error)?.stack}\n </Box>\n </Box>\n </Box>\n );\n};\n","import { createContext } from 'react';\n\nexport type PageCommonContextData = {\n readonly isDrawerOpen: boolean;\n readonly isNoInteraction: boolean;\n readonly setIsDrawerOpen: (open: boolean) => void;\n readonly setIsNoInteraction: (open: boolean) => void;\n};\n\nexport const PageCommonContext = createContext<PageCommonContextData>({\n isDrawerOpen: false,\n isNoInteraction: false,\n setIsDrawerOpen: () => null,\n setIsNoInteraction: () => null,\n});\n","import {\n Box,\n useTheme,\n} from '@mui/material';\nimport {\n use,\n useEffect,\n} from 'react';\nimport type { ReactNode } from 'react';\n\nimport { DRAWER_WIDTH } from '../../constants/page';\n\nimport { PageCommonContext } from './PageCommonContext';\n\nexport type PageCommonProps = {\n readonly children: ReactNode;\n readonly drawerComponent?: ReactNode;\n readonly headerComponent?: ReactNode;\n readonly isNoInteraction?: boolean;\n};\n\n\nexport const PageCommon = ({ children, drawerComponent, headerComponent, isNoInteraction }: PageCommonProps) => {\n const theme = useTheme();\n const { isDrawerOpen, setIsNoInteraction } = use(PageCommonContext);\n\n useEffect(() => {\n setIsNoInteraction(!!isNoInteraction);\n }, [isNoInteraction, setIsNoInteraction]);\n\n return (\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n height: '100vh',\n overflow: 'hidden',\n position: 'relative',\n width: '100vw',\n }}\n >\n {headerComponent}\n {/* Main Body */}\n <Box\n sx={{\n display: 'flex',\n flex: 1,\n height: 'calc(100vh - 56px)',\n overflow: 'hidden',\n position: 'relative',\n width: '100%',\n }}\n >\n {drawerComponent}\n <Box\n component={'main'}\n sx={{\n flexGrow: 1,\n height: '100%',\n overflow: 'hidden',\n position: 'relative',\n transition: () =>\n theme.transitions.create(['margin', 'width'], {\n duration: theme.transitions.duration.leavingScreen,\n easing: theme.transitions.easing.sharp,\n }),\n width: isDrawerOpen ? `calc(100% - ${DRAWER_WIDTH}px)` : '100%',\n }}\n >\n {children}\n </Box>\n\n </Box>\n </Box>\n );\n};\n","import {\n useMemo,\n useState,\n} from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport type { PageCommonContextData } from './PageCommonContext';\nimport { PageCommonContext } from './PageCommonContext';\n\nexport type PageCommonContextProviderProps = PropsWithChildren;\n\nexport const PageCommonContextProvider = ({ children }: PageCommonContextProviderProps) => {\n const [isDrawerOpen, setIsDrawerOpen] = useState(false);\n const [isNoInteraction, setIsNoInteraction] = useState(false);\n\n const contextValue = useMemo<PageCommonContextData>(() => {\n return {\n isDrawerOpen,\n isNoInteraction,\n setIsDrawerOpen,\n setIsNoInteraction,\n };\n }, [isDrawerOpen, isNoInteraction]);\n\n return (\n <PageCommonContext value={contextValue}>\n { children }\n </PageCommonContext>\n );\n};\n","import { Drawer } from '@mui/material';\nimport { use } from 'react';\nimport type { ReactNode } from 'react';\n\nimport { DRAWER_WIDTH } from '../../constants/page';\n\nimport { PageCommonContext } from './PageCommonContext';\n\nexport type PageCommonDrawerProps = {\n readonly children: ReactNode;\n};\n\nexport const PageCommonDrawer = ({ children }: PageCommonDrawerProps) => {\n const { isDrawerOpen } = use(PageCommonContext);\n\n return (\n <Drawer\n anchor={'left'}\n open={isDrawerOpen}\n sx={{\n '& .MuiDrawer-paper': {\n height: 'calc(100% - 56px)',\n overflowY: 'auto',\n top: '56px',\n width: DRAWER_WIDTH,\n },\n flexShrink: 0,\n width: isDrawerOpen ? DRAWER_WIDTH : 0,\n }}\n variant={'persistent'}\n >\n {children}\n </Drawer>\n );\n};\n","import type { ReactNode } from 'react';\nimport {\n use,\n useCallback,\n} from 'react';\nimport {\n AppBar,\n Box,\n IconButton,\n Toolbar,\n Typography,\n} from '@mui/material';\nimport MenuIcon from '@mui/icons-material/Menu';\n\nimport { PageCommonContext } from './PageCommonContext';\n\nexport type PageCommonHeaderProps = {\n readonly centerComponent?: ReactNode;\n readonly icon?: ReactNode;\n readonly rightComponent?: ReactNode;\n readonly title: string;\n};\n\nexport const PageCommonHeader = ({ centerComponent, icon, rightComponent, title }: PageCommonHeaderProps) => {\n const { isDrawerOpen, isNoInteraction, setIsDrawerOpen } = use(PageCommonContext);\n\n const onToggleDrawerButtonClick = useCallback(() => {\n setIsDrawerOpen(!isDrawerOpen);\n }, [isDrawerOpen, setIsDrawerOpen]);\n\n return (\n <AppBar\n elevation={1}\n position={'static'}\n sx={{\n backgroundColor: 'primary.main',\n color: '#FFFFFF',\n height: 56,\n justifyContent: 'center',\n zIndex: (theme) => theme.zIndex.drawer + 1,\n }}\n >\n <Toolbar\n sx={{ display: 'flex', justifyContent: 'space-between', px: 2 }}\n variant={'dense'}\n >\n {/* Left: Menu toggle and App Branding */}\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1.5 }}>\n {!isNoInteraction && (\n <IconButton\n aria-label={'open drawer'}\n color={'inherit'}\n edge={'start'}\n onClick={onToggleDrawerButtonClick}\n size={'small'}\n >\n <MenuIcon />\n </IconButton>\n )}\n {icon && (\n <>\n {icon}\n </>\n )}\n <Typography\n component={'div'}\n noWrap\n sx={{ color: 'inherit', fontSize: '1.05rem', fontWeight: 700, letterSpacing: '-0.01em' }}\n variant={'h6'}\n >\n {title}\n </Typography>\n <Typography\n sx={{\n backgroundColor: 'rgba(255, 255, 255, 0.15)',\n borderRadius: 1,\n display: { sm: 'inline-block', xs: 'none' },\n fontSize: '0.7rem',\n fontWeight: 600,\n px: 1,\n py: 0.25,\n }}\n variant={'caption'}\n >\n {'Loculus Tool'}\n </Typography>\n </Box>\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1 }}>\n {centerComponent}\n </Box>\n {!isNoInteraction && (\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1 }}>\n {rightComponent}\n </Box>\n )}\n </Toolbar>\n </AppBar>\n );\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DRAWER_WIDTH = 340;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","names":[],"sources":["../../src/constants/page.ts"],"sourcesContent":["export const DRAWER_WIDTH = 340;\n"],"mappings":";AAAA,IAAa,IAAe"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum LOADING_STATUS {
|
|
2
|
+
ERROR = "ERROR",
|
|
3
|
+
IDLE = "IDLE",
|
|
4
|
+
LOADING = "LOADING",
|
|
5
|
+
SUCCESS = "SUCCESS"
|
|
6
|
+
}
|
|
7
|
+
export type FastaParseResult = {
|
|
8
|
+
error?: string;
|
|
9
|
+
expectedLength: number;
|
|
10
|
+
invalidSequences?: {
|
|
11
|
+
id: string;
|
|
12
|
+
length: number;
|
|
13
|
+
}[];
|
|
14
|
+
isAligned: boolean;
|
|
15
|
+
sequences: FastaSequence[];
|
|
16
|
+
};
|
|
17
|
+
export type FastaSequence = {
|
|
18
|
+
accessionVersion: string;
|
|
19
|
+
header: string;
|
|
20
|
+
id: string;
|
|
21
|
+
length: number;
|
|
22
|
+
sequence: string;
|
|
23
|
+
};
|