@rivm-loculus-tools/common-frontend 0.1.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/EmotionCacheService.js +33 -0
- package/dist/_chunks/EmotionCacheService.js.map +1 -0
- package/dist/_chunks/decorate.js +9 -0
- package/dist/_chunks/react.js.map +1 -1
- package/dist/classes/services/EmotionCacheService/EmotionCacheService.d.ts +7 -0
- package/dist/classes/services/EmotionCacheService/index.d.ts +1 -0
- package/dist/classes/services/EmotionCacheService/index.js +1 -0
- package/dist/classes/services/FastaDataEventBusService/FastaDataEventBusService.d.ts +1 -3
- package/dist/classes/services/FastaDataEventBusService/index.js +6 -8
- package/dist/classes/services/FastaDataEventBusService/index.js.map +1 -1
- package/dist/components/SearchBar/index.js.map +1 -1
- package/dist/components/app/App/App.d.ts +6 -0
- package/dist/components/app/App/index.d.ts +1 -0
- package/dist/components/app/App/index.js +101 -0
- package/dist/components/app/App/index.js.map +1 -0
- package/dist/{_chunks/FastaDataImportDialog.js → components/fasta/FastaDataImportDialog/index.js} +3 -3
- package/dist/components/fasta/FastaDataImportDialog/index.js.map +1 -0
- package/dist/components/{FastaDataImportDialogLoader → fasta/FastaDataImportDialogLoader}/FastaDataImportDialogLoader.d.ts +1 -1
- package/dist/components/fasta/FastaDataImportDialogLoader/index.js +71 -0
- package/dist/components/fasta/FastaDataImportDialogLoader/index.js.map +1 -0
- package/dist/components/fasta/FastaNotLoaded/index.js +54 -0
- package/dist/components/fasta/FastaNotLoaded/index.js.map +1 -0
- package/dist/components/{FastaPageHeaderCenterComponent → fasta/FastaPageHeaderCenterComponent}/FastaPageHeaderCenterComponent.d.ts +1 -1
- package/dist/components/{FastaPageHeaderCenterComponent → fasta/FastaPageHeaderCenterComponent}/index.js +2 -2
- package/dist/components/fasta/FastaPageHeaderCenterComponent/index.js.map +1 -0
- package/dist/components/fasta/FastaPageHeaderImportButton/index.js +27 -0
- package/dist/components/fasta/FastaPageHeaderImportButton/index.js.map +1 -0
- package/dist/components/{FastaPageHeaderResetButton → fasta/FastaPageHeaderResetButton}/index.js +1 -1
- package/dist/components/fasta/FastaPageHeaderResetButton/index.js.map +1 -0
- package/dist/components/ui/GenericErrorMessage/GenericErrorMessage.d.ts +4 -0
- package/dist/components/ui/GenericErrorMessage/index.d.ts +1 -0
- package/dist/components/ui/GenericErrorMessage/index.js +44 -0
- package/dist/components/ui/GenericErrorMessage/index.js.map +1 -0
- package/dist/components/ui/I18nWrapper/index.js +21 -0
- package/dist/components/ui/I18nWrapper/index.js.map +1 -0
- package/dist/components/ui/PageCommon/PageCommon.d.ts +7 -0
- package/dist/components/ui/PageCommon/index.d.ts +1 -0
- package/dist/components/ui/PageCommon/index.js +54 -0
- package/dist/components/ui/PageCommon/index.js.map +1 -0
- package/dist/components/ui/PageCommonDrawer/index.d.ts +1 -0
- package/dist/components/ui/PageCommonDrawer/index.js +29 -0
- package/dist/components/ui/PageCommonDrawer/index.js.map +1 -0
- package/dist/components/ui/PageCommonHeader/index.d.ts +1 -0
- package/dist/components/ui/PageCommonHeader/index.js +98 -0
- package/dist/components/ui/PageCommonHeader/index.js.map +1 -0
- package/dist/components/{PageHeaderDocumentationButton → ui/PageHeaderDocumentationButton}/index.js +1 -1
- package/dist/components/ui/PageHeaderDocumentationButton/index.js.map +1 -0
- package/dist/constants/config.constants.d.ts +9 -0
- package/dist/constants/config.constants.js +6 -0
- package/dist/constants/config.constants.js.map +1 -0
- package/dist/constants/page.constants.js +6 -0
- package/dist/constants/page.constants.js.map +1 -0
- package/dist/context/commonConfigContext/CommonConfigContext.d.ts +9 -0
- package/dist/context/commonConfigContext/CommonConfigContextProvider.d.ts +6 -0
- package/dist/context/commonConfigContext/index.d.ts +3 -0
- package/dist/context/commonConfigContext/index.js +34 -0
- package/dist/context/commonConfigContext/index.js.map +1 -0
- package/dist/context/commonConfigContext/useCommonConfigContext.d.ts +3 -0
- package/dist/context/pageCommonContext/index.d.ts +2 -0
- package/dist/context/pageCommonContext/index.js +24 -0
- package/dist/context/pageCommonContext/index.js.map +1 -0
- package/dist/hooks/useConfig/index.d.ts +1 -0
- package/dist/hooks/useConfig/index.js +7 -0
- package/dist/hooks/useConfig/index.js.map +1 -0
- package/dist/hooks/useConfig/useConfig.d.ts +2 -0
- package/dist/hooks/useUpdateDocumentTitle/index.d.ts +1 -0
- package/dist/hooks/useUpdateDocumentTitle/index.js +13 -0
- package/dist/hooks/useUpdateDocumentTitle/index.js.map +1 -0
- package/dist/hooks/useUpdateDocumentTitle/useUpdateDocumentTitle.d.ts +1 -0
- package/dist/models/config.models.d.ts +19 -0
- package/dist/models/{fasta.js → fasta.models.js} +2 -2
- package/dist/models/fasta.models.js.map +1 -0
- package/dist/models/metadata.models.js +0 -0
- package/dist/pages/ErrorPage/ErrorPage.d.ts +4 -0
- package/dist/pages/ErrorPage/index.d.ts +1 -0
- package/dist/pages/ErrorPage/index.js +17 -0
- package/dist/pages/ErrorPage/index.js.map +1 -0
- package/dist/stores/fastaDataStore/fastaDataStore.d.ts +2 -2
- package/dist/stores/fastaDataStore/index.js +17 -15
- package/dist/stores/fastaDataStore/index.js.map +1 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +6 -0
- package/dist/utils/DependencyContainerUtil/index.d.ts +1 -0
- package/dist/utils/DependencyContainerUtil/index.js +18 -0
- package/dist/utils/DependencyContainerUtil/index.js.map +1 -0
- package/dist/utils/DownloadUtil/index.js.map +1 -1
- package/dist/utils/ErrorUtil/index.js.map +1 -1
- package/dist/utils/FastaUtil/FastaUtil.d.ts +1 -1
- package/dist/utils/FastaUtil/index.js +12 -19
- package/dist/utils/FastaUtil/index.js.map +1 -1
- package/dist/utils/MetaDataUtil/MetaDataUtil.d.ts +1 -1
- package/dist/utils/MetaDataUtil/index.js.map +1 -1
- package/dist/utils/StandardConfigUtil/StandardConfigUtil.d.ts +4 -0
- package/dist/utils/StandardConfigUtil/index.d.ts +1 -0
- package/dist/utils/StandardConfigUtil/index.js +17 -0
- package/dist/utils/StandardConfigUtil/index.js.map +1 -0
- package/dist/utils/UrlUtil/index.js +6 -5
- package/dist/utils/UrlUtil/index.js.map +1 -1
- package/package.json +122 -62
- package/dist/_chunks/FastaDataImportDialog.js.map +0 -1
- package/dist/components/FastaDataImportDialog/index.js +0 -2
- package/dist/components/FastaDataImportDialogLoader/index.js +0 -70
- package/dist/components/FastaDataImportDialogLoader/index.js.map +0 -1
- package/dist/components/FastaNotLoaded/index.js +0 -53
- package/dist/components/FastaNotLoaded/index.js.map +0 -1
- package/dist/components/FastaPageHeaderCenterComponent/index.js.map +0 -1
- package/dist/components/FastaPageHeaderImportButton/index.js +0 -26
- package/dist/components/FastaPageHeaderImportButton/index.js.map +0 -1
- package/dist/components/FastaPageHeaderResetButton/index.js.map +0 -1
- package/dist/components/I18nWrapper/index.js +0 -21
- package/dist/components/I18nWrapper/index.js.map +0 -1
- package/dist/components/PageHeaderDocumentationButton/index.js.map +0 -1
- package/dist/components/page/ErrorPageCommon.d.ts +0 -4
- package/dist/components/page/PageCommon.d.ts +0 -8
- package/dist/components/page/index.d.ts +0 -6
- package/dist/components/page/index.js +0 -207
- package/dist/components/page/index.js.map +0 -1
- package/dist/constants/page.js +0 -6
- package/dist/constants/page.js.map +0 -1
- package/dist/models/fasta.js.map +0 -1
- /package/dist/components/{FastaDataImportDialog → fasta/FastaDataImportDialog}/FastaDataImportDialog.d.ts +0 -0
- /package/dist/components/{FastaDataImportDialog → fasta/FastaDataImportDialog}/index.d.ts +0 -0
- /package/dist/components/{FastaDataImportDialogLoader → fasta/FastaDataImportDialogLoader}/index.d.ts +0 -0
- /package/dist/components/{FastaNotLoaded → fasta/FastaNotLoaded}/FastaNotLoaded.d.ts +0 -0
- /package/dist/components/{FastaNotLoaded → fasta/FastaNotLoaded}/index.d.ts +0 -0
- /package/dist/components/{FastaPageHeaderCenterComponent → fasta/FastaPageHeaderCenterComponent}/index.d.ts +0 -0
- /package/dist/components/{FastaPageHeaderImportButton → fasta/FastaPageHeaderImportButton}/FastaPageHeaderImportButton.d.ts +0 -0
- /package/dist/components/{FastaPageHeaderImportButton → fasta/FastaPageHeaderImportButton}/index.d.ts +0 -0
- /package/dist/components/{FastaPageHeaderResetButton → fasta/FastaPageHeaderResetButton}/FastaPageHeaderResetButton.d.ts +0 -0
- /package/dist/components/{FastaPageHeaderResetButton → fasta/FastaPageHeaderResetButton}/index.d.ts +0 -0
- /package/dist/components/{I18nWrapper → ui/I18nWrapper}/I18nWrapper.d.ts +0 -0
- /package/dist/components/{I18nWrapper → ui/I18nWrapper}/index.d.ts +0 -0
- /package/dist/components/{page → ui/PageCommonDrawer}/PageCommonDrawer.d.ts +0 -0
- /package/dist/components/{page → ui/PageCommonHeader}/PageCommonHeader.d.ts +0 -0
- /package/dist/components/{PageHeaderDocumentationButton → ui/PageHeaderDocumentationButton}/PageHeaderDocumentationButton.d.ts +0 -0
- /package/dist/components/{PageHeaderDocumentationButton → ui/PageHeaderDocumentationButton}/index.d.ts +0 -0
- /package/dist/constants/{page.d.ts → page.constants.d.ts} +0 -0
- /package/dist/{components/page → context/pageCommonContext}/PageCommonContext.d.ts +0 -0
- /package/dist/{components/page → context/pageCommonContext}/PageCommonContextProvider.d.ts +0 -0
- /package/dist/models/{metadata.js → config.models.js} +0 -0
- /package/dist/models/{fasta.d.ts → fasta.models.d.ts} +0 -0
- /package/dist/models/{metadata.d.ts → metadata.models.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Fragment","RestartAltIcon","FastaPageHeaderResetButton","confirmationRef","useRef","onClickResetSession","useCallback","onConfirm","onReset","Fragment","Tooltip","IconButton","Confirmation"],"sources":["../../../../src/components/fasta/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,IAAaE,KAA8B,EAAE,iBAA+C;CAC1F,IAAMC,IAAkBC,EAA+B,IAAI,GACrDC,IAAsBC,QAAkB;EAC5C,EAAgB,SAAS,KAAK;CAChC,GAAG,CAAC,CAAC,GAECC,IAAYD,QAAkB;EAClC,EAAQ;CACV,GAAG,CAACE,CAAO,CAAC;CAEZ,OACE,kBAAAR,GAAA,EAAA,UAAA,CACE,kBAACU,GAAD;EAAS,OAAO;EACd,UAAA,kBAACC,GAAD;GACE,OAAO;GACP,SAASN;GACT,MAAM;GACN,IAAI,EAAE,SAAS,IAAK;GAEpB,UAAA,kBAACJ,GAAD,EAAgB,UAAU,QAAU,CAAA;EAC1B,CAAA;CACL,CAAA,GACT,kBAACW,GAAD;EACE,MAAM,CAAC;EACP,aAAa,CAAC;EACd,cAAc,CAAC;EACJ;EACX,KAAKT;EACL,OAAO,CAAC;CACT,CAAA,CACD,EAAA,CAAA;AAEN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GenericErrorMessage';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Box as e, Typography as t } from "@mui/material";
|
|
2
|
+
import { t as n } from "i18next";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ui/GenericErrorMessage/GenericErrorMessage.tsx
|
|
5
|
+
var a = ({ error: a }) => /* @__PURE__ */ i(e, {
|
|
6
|
+
sx: {
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexDirection: "column",
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
width: "100%"
|
|
12
|
+
},
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ r(e, {
|
|
15
|
+
sx: { padding: 1 },
|
|
16
|
+
children: /* @__PURE__ */ r(t, {
|
|
17
|
+
variant: "h1",
|
|
18
|
+
children: n`Something went wrong`
|
|
19
|
+
})
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ r(e, {
|
|
22
|
+
sx: { padding: 1 },
|
|
23
|
+
children: /* @__PURE__ */ r(t, {
|
|
24
|
+
variant: "body2",
|
|
25
|
+
children: a instanceof Error ? a.message : n`An unexpected error occurred.`
|
|
26
|
+
})
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ i(e, {
|
|
29
|
+
sx: { padding: 1 },
|
|
30
|
+
children: [/* @__PURE__ */ r(t, {
|
|
31
|
+
variant: "h6",
|
|
32
|
+
children: n`Details for our technicians`
|
|
33
|
+
}), /* @__PURE__ */ r(e, {
|
|
34
|
+
component: "pre",
|
|
35
|
+
sx: { fontSize: "0.8rem" },
|
|
36
|
+
children: a?.stack
|
|
37
|
+
})]
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
});
|
|
41
|
+
//#endregion
|
|
42
|
+
export { a as GenericErrorMessage };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["GenericErrorMessage","Box","Typography","error"],"sources":["../../../../src/components/ui/GenericErrorMessage/GenericErrorMessage.tsx"],"sourcesContent":["import {\n Box,\n Typography,\n} from '@mui/material';\nimport { t } from 'i18next';\n\nexport type GenericErrorMessageProps = {\n error: unknown;\n};\n\nexport const GenericErrorMessage = ({ error }: GenericErrorMessageProps) => {\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"],"mappings":";;;;AAUA,IAAaA,KAAuB,EAAE,eAElC,kBAACC,GAAD;CACE,IAAI;EACF,YAAY;EACZ,SAAS;EACT,eAAe;EACf,gBAAgB;EAChB,OAAO;CACT;CAPF,UAAA;EASE,kBAACA,GAAD;GAAK,IAAI,EAAE,SAAS,EAAE;GACpB,UAAA,kBAACC,GAAD;IACE,SAAS;IAER,UAAA,CAAC;GACQ,CAAA;EACT,CAAA;EACL,kBAACD,GAAD;GAAK,IAAI,EAAE,SAAS,EAAE;GACpB,UAAA,kBAACC,GAAD;IACE,SAAS;IAER,UAAAC,aAAiB,QAAQA,EAAM,UAAU,CAAC;GACjC,CAAA;EACT,CAAA;EACL,kBAACF,GAAD;GAAK,IAAI,EAAE,SAAS,EAAE;GAAtB,UAAA,CACE,kBAACC,GAAD;IAAY,SAAS;IAClB,UAAA,CAAC;GACQ,CAAA,GACZ,kBAACD,GAAD;IACE,WAAW;IACX,IAAI,EACF,UAAU,SACZ;IAEE,UAAAE,GAAiB;GAChB,CAAA,CACF;;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { initReactI18next as e } from "react-i18next";
|
|
2
|
+
import t from "i18next";
|
|
3
|
+
import { Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
4
|
+
import { useEffect as i, useState as a } from "react";
|
|
5
|
+
//#region src/components/ui/I18nWrapper/I18nWrapper.tsx
|
|
6
|
+
var o = ({ children: o }) => {
|
|
7
|
+
let [s, c] = a(!1);
|
|
8
|
+
return i(() => {
|
|
9
|
+
(async () => {
|
|
10
|
+
await t.use(e).init({
|
|
11
|
+
interpolation: { escapeValue: !1 },
|
|
12
|
+
lng: "en",
|
|
13
|
+
resources: { en: { translation: {} } }
|
|
14
|
+
}), c(!0);
|
|
15
|
+
})();
|
|
16
|
+
}, []), /* @__PURE__ */ r(n, { 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":["_Fragment","i18n","I18nWrapper","isInitialized","setIsInitialized","useState","useEffect","initReactI18next","Fragment","children"],"sources":["../../../../src/components/ui/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,IAAaE,KAAe,EAAE,kBAAwC;CACpE,IAAM,CAACC,GAAeC,KAAoBC,EAAS,EAAK;CAwBxD,OAtBAC,QAAgB;EAkBd,aAjB0C;GAexC,AAdA,MAAML,EACH,IAAIM,CAAgB,CAAC,CACrB,KAAK;IACJ,eAAe,EACb,aAAa,GACf;IACA,KAAK;IACL,WAAW,EACT,IAAI,EACF,aAAa,CACb,EACF,EACF;GACF,CAAC,GACHH,EAAiB,EAAI;EACvB,EACK,CAAsB;CAC7B,GAAG,CAAC,CAAC,GAIH,kBAAAJ,GAAA,EAAA,UACGG,IAAgBM,IAAW,KAC5B,CAAA;AAEN"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type PageCommonProps = {
|
|
3
|
+
readonly children: ReactNode;
|
|
4
|
+
readonly isNoInteraction?: boolean;
|
|
5
|
+
readonly title: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const PageCommon: ({ children, isNoInteraction, title }: PageCommonProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageCommon';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import "../../../constants/page.constants.js";
|
|
2
|
+
import { PageCommonContext as e } from "../../../context/pageCommonContext/index.js";
|
|
3
|
+
import { useConfig as t } from "../../../hooks/useConfig/index.js";
|
|
4
|
+
import { useUpdateDocumentTitle as n } from "../../../hooks/useUpdateDocumentTitle/index.js";
|
|
5
|
+
import { Box as r, useTheme as i } from "@mui/material";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
import { use as s, useEffect as c } from "react";
|
|
8
|
+
//#region src/components/ui/PageCommon/PageCommon.tsx
|
|
9
|
+
var l = ({ children: l, isNoInteraction: u, title: d }) => {
|
|
10
|
+
let { drawerComponent: f, headerComponent: p } = t();
|
|
11
|
+
n(d);
|
|
12
|
+
let m = i(), { isDrawerOpen: h, setIsNoInteraction: g } = s(e);
|
|
13
|
+
return c(() => {
|
|
14
|
+
g(!!u);
|
|
15
|
+
}, [u, g]), /* @__PURE__ */ o(r, {
|
|
16
|
+
sx: {
|
|
17
|
+
display: "flex",
|
|
18
|
+
flexDirection: "column",
|
|
19
|
+
height: "100vh",
|
|
20
|
+
overflow: "hidden",
|
|
21
|
+
position: "relative",
|
|
22
|
+
width: "100vw"
|
|
23
|
+
},
|
|
24
|
+
children: [p && /* @__PURE__ */ a(p, {}), /* @__PURE__ */ o(r, {
|
|
25
|
+
sx: {
|
|
26
|
+
display: "flex",
|
|
27
|
+
flex: 1,
|
|
28
|
+
height: "calc(100vh - 56px)",
|
|
29
|
+
overflow: "hidden",
|
|
30
|
+
position: "relative",
|
|
31
|
+
width: "100%"
|
|
32
|
+
},
|
|
33
|
+
children: [f && /* @__PURE__ */ a(f, {}), /* @__PURE__ */ a(r, {
|
|
34
|
+
component: "main",
|
|
35
|
+
sx: {
|
|
36
|
+
flexGrow: 1,
|
|
37
|
+
height: "100%",
|
|
38
|
+
overflow: "hidden",
|
|
39
|
+
position: "relative",
|
|
40
|
+
transition: () => m.transitions.create(["margin", "width"], {
|
|
41
|
+
duration: m.transitions.duration.leavingScreen,
|
|
42
|
+
easing: m.transitions.easing.sharp
|
|
43
|
+
}),
|
|
44
|
+
width: h ? "calc(100% - 340px)" : "100%"
|
|
45
|
+
},
|
|
46
|
+
children: l
|
|
47
|
+
})]
|
|
48
|
+
})]
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { l as PageCommon };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["PageCommon","DrawerComponent","HeaderComponent","useConfig","title","theme","useTheme","use","PageCommonContext","useEffect","isNoInteraction","setIsNoInteraction","Box","isDrawerOpen"],"sources":["../../../../src/components/ui/PageCommon/PageCommon.tsx"],"sourcesContent":["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.constants';\nimport { PageCommonContext } from '../../../context/pageCommonContext';\nimport { useUpdateDocumentTitle } from '../../../hooks/useUpdateDocumentTitle';\nimport { useConfig } from '../../../hooks/useConfig';\n\nexport type PageCommonProps = {\n readonly children: ReactNode;\n readonly isNoInteraction?: boolean;\n readonly title: string;\n};\n\n\nexport const PageCommon = ({ children, isNoInteraction, title }: PageCommonProps) => {\n const { drawerComponent: DrawerComponent, headerComponent: HeaderComponent } = useConfig();\n\n useUpdateDocumentTitle(title);\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 && <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 && <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"],"mappings":";;;;;;;;AAsBA,IAAaA,KAAc,EAAE,aAAU,oBAAiB,eAA6B;CACnF,IAAM,EAAE,iBAAiBC,GAAiB,iBAAiBC,MAAoBC,EAAU;CAEzF,EAAuBC,CAAK;CAC5B,IAAMC,IAAQC,EAAS,GACjB,EAAE,iBAAc,0BAAuBC,EAAIC,CAAiB;CAMlE,OAJAC,QAAgB;EACd,EAAmB,CAAC,CAACC,CAAe;CACtC,GAAG,CAACA,GAAiBC,CAAkB,CAAC,GAGtC,kBAACC,GAAD;EACE,IAAI;GACF,SAAS;GACT,eAAe;GACf,QAAQ;GACR,UAAU;GACV,UAAU;GACV,OAAO;EACT;EARF,UAAA,CAUGV,KAAmB,kBAACA,GAAD,CAAkB,CAAA,GAEtC,kBAACU,GAAD;GACE,IAAI;IACF,SAAS;IACT,MAAM;IACN,QAAQ;IACR,UAAU;IACV,UAAU;IACV,OAAO;GACT;GARF,UAAA,CAUGX,KAAmB,kBAACA,GAAD,CAAkB,CAAA,GACtC,kBAACW,GAAD;IACE,WAAW;IACX,IAAI;KACF,UAAU;KACV,QAAQ;KACR,UAAU;KACV,UAAU;KACV,kBACEP,EAAM,YAAY,OAAO,CAAC,UAAU,OAAO,GAAG;MAC5C,UAAUA,EAAM,YAAY,SAAS;MACrC,QAAQA,EAAM,YAAY,OAAO;KACnC,CAAC;KACH,OAAOQ,IAAe,uBAAmC;IAC3D;IAEC;GACE,CAAA,CAEF;EACF,CAAA,CAAA;;AAET"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageCommonDrawer';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import "../../../constants/page.constants.js";
|
|
2
|
+
import { PageCommonContext as e } from "../../../context/pageCommonContext/index.js";
|
|
3
|
+
import { Drawer as t } from "@mui/material";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { use as r } from "react";
|
|
6
|
+
//#region src/components/ui/PageCommonDrawer/PageCommonDrawer.tsx
|
|
7
|
+
var i = ({ children: i }) => {
|
|
8
|
+
let { isDrawerOpen: a } = r(e);
|
|
9
|
+
return /* @__PURE__ */ n(t, {
|
|
10
|
+
anchor: "left",
|
|
11
|
+
open: a,
|
|
12
|
+
sx: {
|
|
13
|
+
"& .MuiDrawer-paper": {
|
|
14
|
+
height: "calc(100% - 56px)",
|
|
15
|
+
overflowY: "auto",
|
|
16
|
+
top: "56px",
|
|
17
|
+
width: 340
|
|
18
|
+
},
|
|
19
|
+
flexShrink: 0,
|
|
20
|
+
width: a ? 340 : 0
|
|
21
|
+
},
|
|
22
|
+
variant: "persistent",
|
|
23
|
+
children: i
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { i as PageCommonDrawer };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["PageCommonDrawer","use","PageCommonContext","Drawer","isDrawerOpen"],"sources":["../../../../src/components/ui/PageCommonDrawer/PageCommonDrawer.tsx"],"sourcesContent":["import { Drawer } from '@mui/material';\nimport { use } from 'react';\nimport type { ReactNode } from 'react';\n\nimport { DRAWER_WIDTH } from '../../../constants/page.constants';\nimport { PageCommonContext } from '../../../context/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"],"mappings":";;;;;;AAWA,IAAaA,KAAoB,EAAE,kBAAsC;CACvE,IAAM,EAAE,oBAAiBC,EAAIC,CAAiB;CAE9C,OACE,kBAACC,GAAD;EACE,QAAQ;EACR,MAAMC;EACN,IAAI;GACF,sBAAsB;IACpB,QAAQ;IACR,WAAW;IACX,KAAK;IACL,OAAA;GACF;GACA,YAAY;GACZ,OAAOA,IAAA,MAA8B;EACvC;EACA,SAAS;EAER;CACK,CAAA;AAEZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageCommonHeader';
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { PageCommonContext as e } from "../../../context/pageCommonContext/index.js";
|
|
2
|
+
import { AppBar as t, Box as n, IconButton as r, Toolbar as i, Typography as a } from "@mui/material";
|
|
3
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
|
+
import { use as l, useCallback as u } from "react";
|
|
5
|
+
import d from "@mui/icons-material/Menu";
|
|
6
|
+
//#region src/components/ui/PageCommonHeader/PageCommonHeader.tsx
|
|
7
|
+
var f = ({ centerComponent: f, icon: p, rightComponent: m, title: h }) => {
|
|
8
|
+
let { isDrawerOpen: g, isNoInteraction: _, setIsDrawerOpen: v } = l(e), y = u(() => {
|
|
9
|
+
v(!g);
|
|
10
|
+
}, [g, v]);
|
|
11
|
+
return /* @__PURE__ */ s(t, {
|
|
12
|
+
elevation: 1,
|
|
13
|
+
position: "static",
|
|
14
|
+
sx: {
|
|
15
|
+
backgroundColor: "primary.main",
|
|
16
|
+
color: "#FFFFFF",
|
|
17
|
+
height: 56,
|
|
18
|
+
justifyContent: "center",
|
|
19
|
+
zIndex: (e) => e.zIndex.drawer + 1
|
|
20
|
+
},
|
|
21
|
+
children: /* @__PURE__ */ c(i, {
|
|
22
|
+
sx: {
|
|
23
|
+
display: "flex",
|
|
24
|
+
justifyContent: "space-between",
|
|
25
|
+
px: 2
|
|
26
|
+
},
|
|
27
|
+
variant: "dense",
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ c(n, {
|
|
30
|
+
sx: {
|
|
31
|
+
alignItems: "center",
|
|
32
|
+
display: "flex",
|
|
33
|
+
gap: 1.5
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
!_ && /* @__PURE__ */ s(r, {
|
|
37
|
+
"aria-label": "open drawer",
|
|
38
|
+
color: "inherit",
|
|
39
|
+
edge: "start",
|
|
40
|
+
onClick: y,
|
|
41
|
+
size: "small",
|
|
42
|
+
children: /* @__PURE__ */ s(d, {})
|
|
43
|
+
}),
|
|
44
|
+
p && /* @__PURE__ */ s(o, { children: p }),
|
|
45
|
+
/* @__PURE__ */ s(a, {
|
|
46
|
+
component: "div",
|
|
47
|
+
noWrap: !0,
|
|
48
|
+
sx: {
|
|
49
|
+
color: "inherit",
|
|
50
|
+
fontSize: "1.05rem",
|
|
51
|
+
fontWeight: 700,
|
|
52
|
+
letterSpacing: "-0.01em"
|
|
53
|
+
},
|
|
54
|
+
variant: "h6",
|
|
55
|
+
children: h
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ s(a, {
|
|
58
|
+
sx: {
|
|
59
|
+
backgroundColor: "rgba(255, 255, 255, 0.15)",
|
|
60
|
+
borderRadius: 1,
|
|
61
|
+
display: {
|
|
62
|
+
sm: "inline-block",
|
|
63
|
+
xs: "none"
|
|
64
|
+
},
|
|
65
|
+
fontSize: "0.7rem",
|
|
66
|
+
fontWeight: 600,
|
|
67
|
+
px: 1,
|
|
68
|
+
py: .25
|
|
69
|
+
},
|
|
70
|
+
variant: "caption",
|
|
71
|
+
children: "Loculus Tool"
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ s(n, {
|
|
76
|
+
sx: {
|
|
77
|
+
alignItems: "center",
|
|
78
|
+
display: "flex",
|
|
79
|
+
gap: 1
|
|
80
|
+
},
|
|
81
|
+
children: f
|
|
82
|
+
}),
|
|
83
|
+
!_ && /* @__PURE__ */ s(n, {
|
|
84
|
+
sx: {
|
|
85
|
+
alignItems: "center",
|
|
86
|
+
display: "flex",
|
|
87
|
+
gap: 1
|
|
88
|
+
},
|
|
89
|
+
children: m
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
export { f as PageCommonHeader };
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Fragment","MenuIcon","PageCommonHeader","use","PageCommonContext","onToggleDrawerButtonClick","useCallback","isDrawerOpen","setIsDrawerOpen","AppBar","theme","Toolbar","Box","isNoInteraction","IconButton","icon","Fragment","Typography","title","centerComponent","rightComponent"],"sources":["../../../../src/components/ui/PageCommonHeader/PageCommonHeader.tsx"],"sourcesContent":["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 '../../../context/pageCommonContext';\n\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":";;;;;;AAwBA,IAAaE,KAAoB,EAAE,oBAAiB,SAAM,mBAAgB,eAAmC;CAC3G,IAAM,EAAE,iBAAc,oBAAiB,uBAAoBC,EAAIC,CAAiB,GAE1EC,IAA4BC,QAAkB;EAClD,EAAgB,CAACC,CAAY;CAC/B,GAAG,CAACA,GAAcC,CAAe,CAAC;CAElC,OACE,kBAACC,GAAD;EACE,WAAW;EACX,UAAU;EACV,IAAI;GACF,iBAAiB;GACjB,OAAO;GACP,QAAQ;GACR,gBAAgB;GAChB,SAAS,MAAUC,EAAM,OAAO,SAAS;EAC3C;EAEA,UAAA,kBAACC,GAAD;GACE,IAAI;IAAE,SAAS;IAAQ,gBAAgB;IAAiB,IAAI;GAAE;GAC9D,SAAS;GAFX,UAAA;IAKE,kBAACC,GAAD;KAAK,IAAI;MAAE,YAAY;MAAU,SAAS;MAAQ,KAAK;KAAI;KAA3D,UAAA;MACG,CAACC,KACA,kBAACC,GAAD;OACE,cAAY;OACZ,OAAO;OACP,MAAM;OACN,SAAST;OACT,MAAM;OAEN,UAAA,kBAACJ,GAAD,CAAW,CAAA;MACD,CAAA;MAEbc,KACC,kBAAAf,GAAA,EAAA,UACGe,EACD,CAAA;MAEJ,kBAACE,GAAD;OACE,WAAW;OACX,QAAA;OACA,IAAI;QAAE,OAAO;QAAW,UAAU;QAAW,YAAY;QAAK,eAAe;OAAU;OACvF,SAAS;OAER,UAAAC;MACS,CAAA;MACZ,kBAACD,GAAD;OACE,IAAI;QACF,iBAAiB;QACjB,cAAc;QACd,SAAS;SAAE,IAAI;SAAgB,IAAI;QAAO;QAC1C,UAAU;QACV,YAAY;QACZ,IAAI;QACJ,IAAI;OACN;OACA,SAAS;OAER,UAAA;MACS,CAAA;KACT;;IACL,kBAACL,GAAD;KAAK,IAAI;MAAE,YAAY;MAAU,SAAS;MAAQ,KAAK;KAAE;KACtD,UAAAO;IACE,CAAA;IACJ,CAACN,KACA,kBAACD,GAAD;KAAK,IAAI;MAAE,YAAY;MAAU,SAAS;MAAQ,KAAK;KAAE;KACtD,UAAAQ;IACE,CAAA;GAEA;;CACH,CAAA;AAEZ"}
|
package/dist/components/{PageHeaderDocumentationButton → ui/PageHeaderDocumentationButton}/index.js
RENAMED
|
@@ -2,7 +2,7 @@ import { IconButton as e, Tooltip as t } from "@mui/material";
|
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback as r } from "react";
|
|
4
4
|
import i from "@mui/icons-material/HelpOutlineOutlined";
|
|
5
|
-
//#region src/components/PageHeaderDocumentationButton/PageHeaderDocumentationButton.tsx
|
|
5
|
+
//#region src/components/ui/PageHeaderDocumentationButton/PageHeaderDocumentationButton.tsx
|
|
6
6
|
var a = () => {
|
|
7
7
|
let a = r(() => {
|
|
8
8
|
window.open("https://github.com/RIVM-bioinformatics/loculus-tools", "_blank");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["HelpOutlineIcon","PageHeaderDocumentationButton","onDocumentationButtonClick","useCallback","Tooltip","IconButton"],"sources":["../../../../src/components/ui/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,IAAaC,UAAsC;CACjD,IAAMC,IAA6BC,QAAkB;EACnD,OAAO,KAAK,wDAAwD,QAAQ;CAC9E,GAAG,CAAC,CAAC;CAEL,OACE,kBAACC,GAAD;EAAS,OAAO;EACd,UAAA,kBAACC,GAAD;GACE,OAAO;GACP,SAASH;GACT,MAAM;GACN,IAAI,EAAE,SAAS,IAAK;GAEpB,UAAA,kBAACF,GAAD,EAAiB,UAAU,QAAU,CAAA;EAC3B,CAAA;CACL,CAAA;AAEb"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InjectionToken } from 'tsyringe';
|
|
2
|
+
import { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';
|
|
3
|
+
import { DevicePixelRatioService } from '@gen-epix/ui-core/classes/services/DevicePixelRatioService';
|
|
4
|
+
import { KeyboardShortcutService } from '@gen-epix/ui-core/classes/services/KeyboardShortcutService';
|
|
5
|
+
import { ConfigBase } from '../models/config.models';
|
|
6
|
+
export declare const CONFIG_TOKEN: InjectionToken<ConfigBase>;
|
|
7
|
+
export declare const WINDOW_SERVICE_TOKEN: InjectionToken<WindowService>;
|
|
8
|
+
export declare const DEVICE_PIXEL_RATIO_SERVICE_TOKEN: InjectionToken<DevicePixelRatioService>;
|
|
9
|
+
export declare const KEYBOARD_SHORTCUT_SERVICE_TOKEN: InjectionToken<KeyboardShortcutService>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/constants/config.constants.ts
|
|
2
|
+
var e = Symbol("CONFIG_TOKEN"), t = Symbol("WINDOW_SERVICE_TOKEN"), n = Symbol("DEVICE_PIXEL_RATIO_SERVICE_TOKEN"), r = Symbol("KEYBOARD_SHORTCUT_SERVICE_TOKEN");
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as CONFIG_TOKEN, n as DEVICE_PIXEL_RATIO_SERVICE_TOKEN, r as KEYBOARD_SHORTCUT_SERVICE_TOKEN, t as WINDOW_SERVICE_TOKEN };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=config.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.constants.js","names":["CONFIG_TOKEN","WINDOW_SERVICE_TOKEN","DEVICE_PIXEL_RATIO_SERVICE_TOKEN","KEYBOARD_SHORTCUT_SERVICE_TOKEN"],"sources":["../../src/constants/config.constants.ts"],"sourcesContent":["import type { InjectionToken } from 'tsyringe';\nimport type { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\nimport type { DevicePixelRatioService } from '@gen-epix/ui-core/classes/services/DevicePixelRatioService';\nimport type { KeyboardShortcutService } from '@gen-epix/ui-core/classes/services/KeyboardShortcutService';\n\nimport type { ConfigBase } from '../models/config.models';\n\nexport const CONFIG_TOKEN: InjectionToken<ConfigBase> = Symbol('CONFIG_TOKEN');\nexport const WINDOW_SERVICE_TOKEN: InjectionToken<WindowService> = Symbol('WINDOW_SERVICE_TOKEN');\nexport const DEVICE_PIXEL_RATIO_SERVICE_TOKEN: InjectionToken<DevicePixelRatioService> = Symbol('DEVICE_PIXEL_RATIO_SERVICE_TOKEN');\nexport const KEYBOARD_SHORTCUT_SERVICE_TOKEN: InjectionToken<KeyboardShortcutService> = Symbol('KEYBOARD_SHORTCUT_SERVICE_TOKEN');\n"],"mappings":";AAOA,IAAaA,IAA2C,OAAO,cAAc,GAChEC,IAAsD,OAAO,sBAAsB,GACnFC,IAA4E,OAAO,kCAAkC,GACrHC,IAA2E,OAAO,iCAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.constants.js","names":["DRAWER_WIDTH"],"sources":["../../src/constants/page.constants.ts"],"sourcesContent":["export const DRAWER_WIDTH = 340;\n"],"mappings":";AAAA,IAAaA,IAAe"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CoreComponentsConfig } from '@gen-epix/ui-core-components/context/CoreComponentsConfigContext';
|
|
2
|
+
import { DependencyContainer } from 'tsyringe';
|
|
3
|
+
import { ConfigBase } from '../../models/config.models';
|
|
4
|
+
export type CommonConfig<TConfig extends ConfigBase = ConfigBase> = {
|
|
5
|
+
config: TConfig;
|
|
6
|
+
container: DependencyContainer;
|
|
7
|
+
genEpixCoreComponentsConfig: CoreComponentsConfig;
|
|
8
|
+
};
|
|
9
|
+
export declare const CommonConfigContext: import('react').Context<CommonConfig<ConfigBase> | null>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { DependencyContainer } from 'tsyringe';
|
|
3
|
+
export type CommonConfigContextProviderProps = PropsWithChildren<{
|
|
4
|
+
readonly container: DependencyContainer;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const CommonConfigContextProvider: (props: CommonConfigContextProviderProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DependencyContainerUtil as e } from "../../utils/DependencyContainerUtil/index.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as n, use as r, useMemo as i } from "react";
|
|
4
|
+
import { CoreComponentsConfigContext as a } from "@gen-epix/ui-core-components/context/CoreComponentsConfigContext";
|
|
5
|
+
//#region src/context/commonConfigContext/CommonConfigContext.tsx
|
|
6
|
+
var o = n(null), s = (n) => {
|
|
7
|
+
let { children: r, container: s } = n, c = e.resolveConfig(s), l = i(() => ({ spinner: {
|
|
8
|
+
defaultCircularProgressSize: c.spinner.DEFAULT_CIRCULAR_PROGRESS_SIZE,
|
|
9
|
+
defaultTakingLongerTimeoutMs: c.spinner.DEFAULT_TAKING_LONGER_TIMEOUT_MS
|
|
10
|
+
} }), [c.spinner]), u = i(() => ({
|
|
11
|
+
config: c,
|
|
12
|
+
container: s,
|
|
13
|
+
genEpixCoreComponentsConfig: l
|
|
14
|
+
}), [
|
|
15
|
+
c,
|
|
16
|
+
s,
|
|
17
|
+
l
|
|
18
|
+
]);
|
|
19
|
+
return /* @__PURE__ */ t(a, {
|
|
20
|
+
value: l,
|
|
21
|
+
children: /* @__PURE__ */ t(o, {
|
|
22
|
+
value: u,
|
|
23
|
+
children: r
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
}, c = () => {
|
|
27
|
+
let e = r(o);
|
|
28
|
+
if (!e) throw Error("CommonConfigContext is not available");
|
|
29
|
+
return e;
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { o as CommonConfigContext, s as CommonConfigContextProvider, c as useCommonConfigContext };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["CommonConfigContext","createContext","CommonConfigContextProvider","props","config","DependencyContainerUtil","container","genEpixCoreComponentsConfig","useMemo","CommonConfig","CoreComponentsConfigContext","useCommonConfigContext","use"],"sources":["../../../src/context/commonConfigContext/CommonConfigContext.tsx","../../../src/context/commonConfigContext/CommonConfigContextProvider.tsx","../../../src/context/commonConfigContext/useCommonConfigContext.tsx"],"sourcesContent":["import type { CoreComponentsConfig } from '@gen-epix/ui-core-components/context/CoreComponentsConfigContext';\nimport { createContext } from 'react';\nimport type { DependencyContainer } from 'tsyringe';\n\nimport type { ConfigBase } from '../../models/config.models';\n\nexport type CommonConfig<TConfig extends ConfigBase = ConfigBase> = {\n config: TConfig;\n container: DependencyContainer;\n genEpixCoreComponentsConfig: CoreComponentsConfig;\n};\n\nexport const CommonConfigContext = createContext<CommonConfig | null>(null);\n","import { useMemo } from 'react';\nimport type { PropsWithChildren } from 'react';\nimport { CoreComponentsConfigContext } from '@gen-epix/ui-core-components/context/CoreComponentsConfigContext';\nimport type { DependencyContainer } from 'tsyringe';\n\nimport { DependencyContainerUtil } from '../../utils/DependencyContainerUtil';\nimport type { ConfigBase } from '../../models/config.models';\n\nimport type { CommonConfig } from './CommonConfigContext';\nimport { CommonConfigContext } from './CommonConfigContext';\n\n\nexport type CommonConfigContextProviderProps = PropsWithChildren<{\n readonly container: DependencyContainer;\n}>;\n\nexport const CommonConfigContextProvider = (\n props: CommonConfigContextProviderProps,\n) => {\n const { children, container } = props;\n const config = DependencyContainerUtil.resolveConfig<ConfigBase>(container);\n const genEpixCoreComponentsConfig = useMemo<CommonConfig['genEpixCoreComponentsConfig']>(() => ({\n spinner: {\n defaultCircularProgressSize: config.spinner.DEFAULT_CIRCULAR_PROGRESS_SIZE!,\n defaultTakingLongerTimeoutMs: config.spinner.DEFAULT_TAKING_LONGER_TIMEOUT_MS,\n },\n }), [config.spinner]);\n const CommonConfig = useMemo(() => ({ config, container, genEpixCoreComponentsConfig }), [config, container, genEpixCoreComponentsConfig]);\n\n return (\n <CoreComponentsConfigContext value={genEpixCoreComponentsConfig}>\n <CommonConfigContext value={CommonConfig}>\n {children}\n </CommonConfigContext>\n </CoreComponentsConfigContext>\n );\n};\n","import { use } from 'react';\n\nimport type { ConfigBase } from '../../models/config.models';\n\nimport type { CommonConfig } from './CommonConfigContext';\nimport { CommonConfigContext } from './CommonConfigContext';\n\nexport const useCommonConfigContext = <TConfig extends ConfigBase = ConfigBase>(): CommonConfig<TConfig> => {\n const config = use(CommonConfigContext);\n if (!config) {\n throw new Error('CommonConfigContext is not available');\n }\n return config as CommonConfig<TConfig>;\n};\n"],"mappings":";;;;;AAYA,IAAaA,IAAsBC,EAAmC,IAAI,GCI7DC,KACX,MACG;CACH,IAAM,EAAE,aAAU,iBAAcC,GAC1BC,IAASC,EAAwB,cAA0BC,CAAS,GACpEC,IAA8BC,SAA4D,EAC9F,SAAS;EACP,6BAA6BJ,EAAO,QAAQ;EAC5C,8BAA8BA,EAAO,QAAQ;CAC/C,EACF,IAAI,CAACA,EAAO,OAAO,CAAC,GACdK,IAAeD,SAAe;EAAE;EAAQ;EAAW;CAA4B,IAAI;EAACJ;EAAQE;EAAWC;CAA2B,CAAC;CAEzI,OACE,kBAACG,GAAD;EAA6B,OAAOH;EAClC,UAAA,kBAACP,GAAD;GAAqB,OAAOS;GACzB;EACkB,CAAA;CACM,CAAA;AAEjC,GC7BaE,UAA+F;CAC1G,IAAMP,IAASQ,EAAIZ,CAAmB;CACtC,IAAI,CAACI,GACH,MAAU,MAAM,sCAAsC;CAExD,OAAOA;AACT"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as t, useMemo as n, useState as r } from "react";
|
|
3
|
+
//#region src/context/pageCommonContext/PageCommonContext.ts
|
|
4
|
+
var i = t({
|
|
5
|
+
isDrawerOpen: !1,
|
|
6
|
+
isNoInteraction: !1,
|
|
7
|
+
setIsDrawerOpen: () => null,
|
|
8
|
+
setIsNoInteraction: () => null
|
|
9
|
+
}), a = ({ children: t }) => {
|
|
10
|
+
let [a, o] = r(!1), [s, c] = r(!1), l = n(() => ({
|
|
11
|
+
isDrawerOpen: a,
|
|
12
|
+
isNoInteraction: s,
|
|
13
|
+
setIsDrawerOpen: o,
|
|
14
|
+
setIsNoInteraction: c
|
|
15
|
+
}), [a, s]);
|
|
16
|
+
return /* @__PURE__ */ e(i, {
|
|
17
|
+
value: l,
|
|
18
|
+
children: t
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as PageCommonContext, a as PageCommonContextProvider };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["PageCommonContext","createContext","PageCommonContextProvider","isDrawerOpen","setIsDrawerOpen","useState","isNoInteraction","setIsNoInteraction","contextValue","useMemo"],"sources":["../../../src/context/pageCommonContext/PageCommonContext.ts","../../../src/context/pageCommonContext/PageCommonContextProvider.tsx"],"sourcesContent":["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 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"],"mappings":";;;AASA,IAAaA,IAAoBC,EAAqC;CACpE,cAAc;CACd,iBAAiB;CACjB,uBAAuB;CACvB,0BAA0B;AAC5B,CAAC,GCHYC,KAA6B,EAAE,kBAA+C;CACzF,IAAM,CAACC,GAAcC,KAAmBC,EAAS,EAAK,GAChD,CAACC,GAAiBC,KAAsBF,EAAS,EAAK,GAEtDG,IAAeC,SACZ;EACL;EACA;EACA;EACA;CACF,IACC,CAACN,GAAcG,CAAe,CAAC;CAElC,OACE,kBAACN,GAAD;EAAmB,OAAOQ;EACtB;CACe,CAAA;AAEvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useConfig';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["useConfig","useCommonConfigContext"],"sources":["../../../src/hooks/useConfig/useConfig.ts"],"sourcesContent":["import type { ConfigBase } from '../../models/config.models';\nimport { useCommonConfigContext } from '../../context/commonConfigContext';\n\nexport const useConfig = <TConfig extends ConfigBase = ConfigBase>(): TConfig => {\n return useCommonConfigContext<TConfig>().config;\n};\n"],"mappings":";;AAGA,IAAaA,UACJC,EAAgC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useUpdateDocumentTitle';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useConfig as e } from "../useConfig/index.js";
|
|
2
|
+
import { useEffect as t } from "react";
|
|
3
|
+
//#region src/hooks/useUpdateDocumentTitle/useUpdateDocumentTitle.ts
|
|
4
|
+
var n = (n) => {
|
|
5
|
+
let r = e();
|
|
6
|
+
t(() => {
|
|
7
|
+
document.title = `${r.applicationName} - ${n}`;
|
|
8
|
+
}, [r.applicationName, n]);
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { n as useUpdateDocumentTitle };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["useUpdateDocumentTitle","config","useConfig","title"],"sources":["../../../src/hooks/useUpdateDocumentTitle/useUpdateDocumentTitle.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useConfig } from '../useConfig';\n\n\nexport const useUpdateDocumentTitle = (title: string) => {\n const config = useConfig();\n\n useEffect(() => {\n document.title = `${config.applicationName} - ${title}`;\n }, [config.applicationName, title]);\n};\n"],"mappings":";;;AAKA,IAAaA,KAA0B,MAAkB;CACvD,IAAMC,IAASC,EAAU;CAEzB,QAAgB;EACd,SAAS,QAAQ,GAAGD,EAAO,gBAAgB,KAAKE;CAClD,GAAG,CAACF,EAAO,iBAAiBE,CAAK,CAAC;AACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useUpdateDocumentTitle: (title: string) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { CircularProgressProps, Theme } from '@mui/material';
|
|
3
|
+
export type ApplicationHeaderProps = {
|
|
4
|
+
readonly fullHeight?: boolean;
|
|
5
|
+
readonly fullWidth?: boolean;
|
|
6
|
+
readonly singleAction?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export interface ConfigBase {
|
|
9
|
+
applicationName: string;
|
|
10
|
+
readonly drawerComponent?: () => ReactElement;
|
|
11
|
+
getTouchIconUrl: () => string | undefined;
|
|
12
|
+
readonly headerComponent?: () => ReactElement;
|
|
13
|
+
nonce?: string;
|
|
14
|
+
spinner: {
|
|
15
|
+
DEFAULT_CIRCULAR_PROGRESS_SIZE: CircularProgressProps['size'];
|
|
16
|
+
DEFAULT_TAKING_LONGER_TIMEOUT_MS: number;
|
|
17
|
+
};
|
|
18
|
+
theme: Theme;
|
|
19
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
//#region src/models/fasta.ts
|
|
1
|
+
//#region src/models/fasta.models.ts
|
|
2
2
|
var e = /* @__PURE__ */ function(e) {
|
|
3
3
|
return e.ERROR = "ERROR", e.IDLE = "IDLE", e.LOADING = "LOADING", e.SUCCESS = "SUCCESS", e;
|
|
4
4
|
}({});
|
|
5
5
|
//#endregion
|
|
6
6
|
export { e as LOADING_STATUS };
|
|
7
7
|
|
|
8
|
-
//# sourceMappingURL=fasta.js.map
|
|
8
|
+
//# sourceMappingURL=fasta.models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fasta.models.js","names":["LOADING_STATUS","\"ERROR\"","\"IDLE\"","\"LOADING\"","\"SUCCESS\""],"sources":["../../src/models/fasta.models.ts"],"sourcesContent":["export enum LOADING_STATUS {\n ERROR = 'ERROR',\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n SUCCESS = 'SUCCESS',\n}\n\nexport type FastaParseResult = {\n error?: string;\n expectedLength: number;\n invalidSequences?: { id: string; length: number }[];\n isAligned: boolean;\n sequences: FastaSequence[];\n};\n\nexport type FastaSequence = {\n accessionVersion: string;\n header: string;\n id: string;\n length: number;\n sequence: string;\n};\n"],"mappings":";AAAA,IAAYA,IAAL,yBAAA,GAAA;QACL,EAAAC,QAAA,SACA,EAAAC,OAAA,QACA,EAAAC,UAAA,WACA,EAAAC,UAAA;AACF,EAAA,CAAA,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ErrorPage';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GenericErrorMessage as e } from "../../components/ui/GenericErrorMessage/index.js";
|
|
2
|
+
import { PageCommon as t } from "../../components/ui/PageCommon/index.js";
|
|
3
|
+
import { useTranslation as n } from "react-i18next";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/pages/ErrorPage/ErrorPage.tsx
|
|
6
|
+
var i = ({ error: i }) => {
|
|
7
|
+
let { t: a } = n();
|
|
8
|
+
return /* @__PURE__ */ r(t, {
|
|
9
|
+
isNoInteraction: !0,
|
|
10
|
+
title: a`Error`,
|
|
11
|
+
children: /* @__PURE__ */ r(e, { error: i })
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as ErrorPage };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ErrorPage","useTranslation","PageCommon","GenericErrorMessage"],"sources":["../../../src/pages/ErrorPage/ErrorPage.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next';\n\nimport { GenericErrorMessage } from '../../components/ui/GenericErrorMessage';\nimport { PageCommon } from '../../components/ui/PageCommon';\n\nexport type ErrorPageProps = {\n readonly error?: unknown;\n};\n\nexport const ErrorPage = ({ error }: ErrorPageProps) => {\n const { t } = useTranslation();\n\n return (\n <PageCommon\n isNoInteraction\n title={t`Error`}\n >\n <GenericErrorMessage\n error={error}\n />\n </PageCommon>\n );\n};\n"],"mappings":";;;;;AASA,IAAaA,KAAa,EAAE,eAA4B;CACtD,IAAM,EAAE,SAAMC,EAAe;CAE7B,OACE,kBAACC,GAAD;EACE,iBAAA;EACA,OAAO,CAAC;EAER,UAAA,kBAACC,GAAD,EACS,SACR,CAAA;CACS,CAAA;AAEhB"}
|