@rivm-loculus-tools/common-frontend 0.3.0 → 0.5.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.
Files changed (72) hide show
  1. package/dist/_chunks/EmotionCacheService.js +2 -4
  2. package/dist/_chunks/EmotionCacheService.js.map +1 -1
  3. package/dist/_chunks/decorate.js +1 -2
  4. package/dist/_chunks/react.js +2 -3
  5. package/dist/_chunks/react.js.map +1 -1
  6. package/dist/classes/services/FastaDataEventBusService/index.js +1 -2
  7. package/dist/components/SearchBar/index.js +1 -2
  8. package/dist/components/app/App/index.js +38 -41
  9. package/dist/components/app/App/index.js.map +1 -1
  10. package/dist/components/fasta/FastaDataImportDialog/index.js +1 -2
  11. package/dist/components/fasta/FastaDataImportDialogLoader/FastaDataImportDialogLoader.d.ts +1 -1
  12. package/dist/components/fasta/FastaDataImportDialogLoader/index.js +1 -2
  13. package/dist/components/fasta/FastaDataImportDialogLoader/index.js.map +1 -1
  14. package/dist/components/fasta/FastaNotLoaded/index.js +1 -2
  15. package/dist/components/fasta/FastaPageHeaderCenterComponent/index.js +1 -2
  16. package/dist/components/fasta/FastaPageHeaderImportButton/index.js +1 -2
  17. package/dist/components/fasta/FastaPageHeaderResetButton/index.js +1 -2
  18. package/dist/components/ui/ButtonWithMenu/ButtonWithMenu.d.ts +12 -0
  19. package/dist/components/ui/ButtonWithMenu/index.d.ts +1 -0
  20. package/dist/components/ui/ButtonWithMenu/index.js +46 -0
  21. package/dist/components/ui/ButtonWithMenu/index.js.map +1 -0
  22. package/dist/components/ui/GenericErrorMessage/index.js +1 -2
  23. package/dist/components/ui/I18nWrapper/index.js +1 -2
  24. package/dist/components/ui/PageCommon/index.js +9 -9
  25. package/dist/components/ui/PageCommon/index.js.map +1 -1
  26. package/dist/components/ui/PageCommonDrawer/index.js +13 -13
  27. package/dist/components/ui/PageCommonDrawer/index.js.map +1 -1
  28. package/dist/components/ui/PageCommonHeader/PageCommonHeader.d.ts +1 -2
  29. package/dist/components/ui/PageCommonHeader/index.js +67 -59
  30. package/dist/components/ui/PageCommonHeader/index.js.map +1 -1
  31. package/dist/constants/config.constants.js +1 -2
  32. package/dist/constants/page.constants.js +1 -2
  33. package/dist/context/pageCommonContext/PageCommonContext.d.ts +11 -1
  34. package/dist/context/pageCommonContext/PageCommonContextProvider.d.ts +3 -2
  35. package/dist/context/pageCommonContext/index.js +19 -18
  36. package/dist/context/pageCommonContext/index.js.map +1 -1
  37. package/dist/hooks/useConfig/index.js +3 -4
  38. package/dist/hooks/useConfig/index.js.map +1 -1
  39. package/dist/hooks/useUpdateDocumentTitle/index.js +1 -2
  40. package/dist/models/config.models.d.ts +3 -6
  41. package/dist/models/fasta.models.js +1 -2
  42. package/dist/models/fasta.models.js.map +1 -1
  43. package/dist/pages/ErrorPage/index.js +1 -2
  44. package/dist/stores/fastaDataStore/index.js +1 -2
  45. package/dist/theme/index.js +18 -19
  46. package/dist/theme/index.js.map +1 -1
  47. package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +1 -1
  48. package/dist/utils/DependencyContainerUtil/index.js +3 -4
  49. package/dist/utils/DependencyContainerUtil/index.js.map +1 -1
  50. package/dist/utils/DownloadUtil/index.js +1 -2
  51. package/dist/utils/ErrorUtil/index.js +1 -2
  52. package/dist/utils/ExportUtil/ExportUtil.d.ts +6 -0
  53. package/dist/utils/ExportUtil/index.d.ts +1 -0
  54. package/dist/utils/ExportUtil/index.js +41 -0
  55. package/dist/utils/ExportUtil/index.js.map +1 -0
  56. package/dist/utils/FastaUtil/index.js +1 -2
  57. package/dist/utils/MetaDataUtil/index.js +1 -2
  58. package/dist/utils/StandardConfigUtil/StandardConfigUtil.d.ts +1 -1
  59. package/dist/utils/StandardConfigUtil/index.js +2 -2
  60. package/dist/utils/StandardConfigUtil/index.js.map +1 -1
  61. package/dist/utils/UrlUtil/index.js +1 -2
  62. package/package.json +24 -24
  63. package/dist/components/ui/PageHeaderDocumentationButton/PageHeaderDocumentationButton.d.ts +0 -1
  64. package/dist/components/ui/PageHeaderDocumentationButton/index.d.ts +0 -1
  65. package/dist/components/ui/PageHeaderDocumentationButton/index.js +0 -24
  66. package/dist/components/ui/PageHeaderDocumentationButton/index.js.map +0 -1
  67. package/dist/context/commonConfigContext/CommonConfigContext.d.ts +0 -9
  68. package/dist/context/commonConfigContext/CommonConfigContextProvider.d.ts +0 -6
  69. package/dist/context/commonConfigContext/index.d.ts +0 -3
  70. package/dist/context/commonConfigContext/index.js +0 -34
  71. package/dist/context/commonConfigContext/index.js.map +0 -1
  72. package/dist/context/commonConfigContext/useCommonConfigContext.d.ts +0 -3
@@ -1 +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"}
1
+ {"version":3,"file":"index.js","names":["PageCommon","DrawerComponent","HeaderComponent","useConfig","title","theme","useTheme","use","PageCommonContext","useEffect","isNoInteraction","setIsNoInteraction","Box","drawerContainerId","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 { drawerContainerId, isDrawerOpen, setIsNoInteraction } = use(PageCommonContext);\n\n useEffect(() => {\n setIsNoInteraction(!!isNoInteraction);\n }, [isNoInteraction, setIsNoInteraction]);\n\n return (\n <Box\n sx={{\n display: 'grid',\n gridTemplateRows: 'max-content auto',\n height: '100vh',\n overflow: 'hidden',\n position: 'relative',\n width: '100vw',\n }}\n >\n {HeaderComponent && <HeaderComponent />}\n <Box\n id={drawerContainerId}\n sx={{\n display: 'flex',\n flex: 1,\n height: '100%',\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,sBAAmB,iBAAc,0BAAuBC,EAAIC,CAAiB;CAMrF,OAJAC,QAAgB;EACd,EAAmB,CAAC,CAACC,CAAe;CACtC,GAAG,CAACA,GAAiBC,CAAkB,CAAC,GAGtC,kBAACC,GAAD;EACE,IAAI;GACF,SAAS;GACT,kBAAkB;GAClB,QAAQ;GACR,UAAU;GACV,UAAU;GACV,OAAO;EACT;EARF,UAAA,CAUGV,KAAmB,kBAACA,GAAD,CAAkB,CAAA,GACtC,kBAACU,GAAD;GACE,IAAIC;GACJ,IAAI;IACF,SAAS;IACT,MAAM;IACN,QAAQ;IACR,UAAU;IACV,UAAU;IACV,OAAO;GACT;GATF,UAAA,CAWGZ,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,OAAOS,IAAe,uBAAmC;IAC3D;IAEC;GACE,CAAA,CAEF;EACF,CAAA,CAAA;;AAET"}
@@ -3,27 +3,27 @@ import { PageCommonContext as e } from "../../../context/pageCommonContext/index
3
3
  import { Drawer as t } from "@mui/material";
4
4
  import { jsx as n } from "react/jsx-runtime";
5
5
  import { use as r } from "react";
6
- //#region src/components/ui/PageCommonDrawer/PageCommonDrawer.tsx
6
+ // src/components/ui/PageCommonDrawer/PageCommonDrawer.tsx
7
7
  var i = ({ children: i }) => {
8
- let { isDrawerOpen: a } = r(e);
8
+ let { drawerContainerId: a, isDrawerOpen: o } = r(e);
9
9
  return /* @__PURE__ */ n(t, {
10
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
11
+ ModalProps: {
12
+ container: () => document.getElementById(a),
13
+ style: { position: "absolute" }
21
14
  },
15
+ open: o,
16
+ sx: { "& .MuiDrawer-paper": {
17
+ flexShrink: 0,
18
+ height: "100%",
19
+ overflowY: "auto",
20
+ position: "absolute",
21
+ width: o ? 340 : 0
22
+ } },
22
23
  variant: "persistent",
23
24
  children: i
24
25
  });
25
26
  };
26
- //#endregion
27
27
  export { i as PageCommonDrawer };
28
28
 
29
29
  //# sourceMappingURL=index.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.js","names":["PageCommonDrawer","use","PageCommonContext","Drawer","drawerContainerId","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 { drawerContainerId, isDrawerOpen } = use(PageCommonContext);\n\n return (\n <Drawer\n anchor={'left'}\n ModalProps={{\n container: () => document.getElementById(drawerContainerId),\n style: { position: 'absolute' }, // Forces modal overlay to stay inside the container\n }}\n open={isDrawerOpen}\n sx={{\n '& .MuiDrawer-paper': {\n flexShrink: 0,\n height: '100%',\n overflowY: 'auto',\n position: 'absolute',\n width: isDrawerOpen ? DRAWER_WIDTH : 0,\n },\n }}\n variant={'persistent'}\n >\n {children}\n </Drawer>\n );\n};\n"],"mappings":";;;;;;AAWA,IAAaA,KAAoB,EAAE,kBAAsC;CACvE,IAAM,EAAE,sBAAmB,oBAAiBC,EAAIC,CAAiB;CAEjE,OACE,kBAACC,GAAD;EACE,QAAQ;EACR,YAAY;GACV,iBAAiB,SAAS,eAAeC,CAAiB;GAC1D,OAAO,EAAE,UAAU,WAAW;EAChC;EACA,MAAMC;EACN,IAAI,EACF,sBAAsB;GACpB,YAAY;GACZ,QAAQ;GACR,WAAW;GACX,UAAU;GACV,OAAOA,IAAA,MAA8B;EACvC,EACF;EACA,SAAS;EAER;CACK,CAAA;AAEZ"}
@@ -1,8 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  export type PageCommonHeaderProps = {
3
3
  readonly centerComponent?: ReactNode;
4
- readonly icon?: ReactNode;
5
4
  readonly rightComponent?: ReactNode;
6
5
  readonly title: string;
7
6
  };
8
- export declare const PageCommonHeader: ({ centerComponent, icon, rightComponent, title }: PageCommonHeaderProps) => import('react').JSX.Element;
7
+ export declare const PageCommonHeader: ({ centerComponent, rightComponent, title }: PageCommonHeaderProps) => import('react').JSX.Element;
@@ -1,48 +1,49 @@
1
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, {
2
+ import { AppBar as t, Box as n, IconButton as r, Toolbar as i, Typography as a, useTheme as o } from "@mui/material";
3
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ import { use as u, useCallback as d } from "react";
5
+ import f from "@mui/icons-material/Menu";
6
+ // src/components/ui/PageCommonHeader/PageCommonHeader.tsx
7
+ var p = ({ centerComponent: p, rightComponent: m, title: h }) => {
8
+ let g = o(), { afterAppBarComponent: _, afterAppBarRightComponent: v, appBarHeight: y = 48, appBarIcon: b, beforeAppBarComponent: x, beforeAppBarRightComponent: S, isDrawerOpen: C, isNoInteraction: w, setIsDrawerOpen: T } = u(e), E = d(() => {
9
+ T(!C);
10
+ }, [C, T]);
11
+ return /* @__PURE__ */ l(n, { children: [
12
+ x,
13
+ /* @__PURE__ */ c(t, {
14
+ elevation: 1,
15
+ position: "static",
22
16
  sx: {
23
- display: "flex",
24
- justifyContent: "space-between",
25
- px: 2
17
+ backgroundColor: "primary.main",
18
+ color: "#FFFFFF",
19
+ height: y,
20
+ justifyContent: "center",
21
+ zIndex: g.zIndex.drawer + 1
26
22
  },
27
- variant: "dense",
28
- children: [
29
- /* @__PURE__ */ c(n, {
23
+ children: /* @__PURE__ */ l(i, {
24
+ sx: {
25
+ display: "flex",
26
+ justifyContent: "space-between",
27
+ px: `${g.spacing(1)} !important`
28
+ },
29
+ variant: "dense",
30
+ children: [/* @__PURE__ */ l(n, {
30
31
  sx: {
31
32
  alignItems: "center",
32
33
  display: "flex",
33
34
  gap: 1.5
34
35
  },
35
36
  children: [
36
- !_ && /* @__PURE__ */ s(r, {
37
+ !w && /* @__PURE__ */ c(r, {
37
38
  "aria-label": "open drawer",
38
39
  color: "inherit",
39
40
  edge: "start",
40
- onClick: y,
41
+ onClick: E,
41
42
  size: "small",
42
- children: /* @__PURE__ */ s(d, {})
43
+ children: /* @__PURE__ */ c(f, {})
43
44
  }),
44
- p && /* @__PURE__ */ s(o, { children: p }),
45
- /* @__PURE__ */ s(a, {
45
+ b && /* @__PURE__ */ c(s, { children: b }),
46
+ /* @__PURE__ */ c(a, {
46
47
  component: "div",
47
48
  noWrap: !0,
48
49
  sx: {
@@ -53,46 +54,53 @@ var f = ({ centerComponent: f, icon: p, rightComponent: m, title: h }) => {
53
54
  },
54
55
  variant: "h6",
55
56
  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
57
  })
73
58
  ]
74
- }),
75
- /* @__PURE__ */ s(n, {
59
+ }), !w && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(n, {
76
60
  sx: {
77
61
  alignItems: "center",
78
62
  display: "flex",
79
63
  gap: 1
80
64
  },
81
- children: f
82
- }),
83
- !_ && /* @__PURE__ */ s(n, {
65
+ children: p
66
+ }), /* @__PURE__ */ l(n, {
84
67
  sx: {
85
68
  alignItems: "center",
86
69
  display: "flex",
87
70
  gap: 1
88
71
  },
89
- children: m
90
- })
91
- ]
92
- })
93
- });
72
+ children: [
73
+ S && /* @__PURE__ */ c(n, {
74
+ sx: {
75
+ alignItems: "center",
76
+ display: "flex",
77
+ gap: 1
78
+ },
79
+ children: S
80
+ }),
81
+ /* @__PURE__ */ c(n, {
82
+ sx: {
83
+ alignItems: "center",
84
+ display: "flex",
85
+ gap: 1
86
+ },
87
+ children: m
88
+ }),
89
+ v && /* @__PURE__ */ c(n, {
90
+ sx: {
91
+ alignItems: "center",
92
+ display: "flex",
93
+ gap: 1
94
+ },
95
+ children: v
96
+ })
97
+ ]
98
+ })] })]
99
+ })
100
+ }),
101
+ _
102
+ ] });
94
103
  };
95
- //#endregion
96
- export { f as PageCommonHeader };
104
+ export { p as PageCommonHeader };
97
105
 
98
106
  //# sourceMappingURL=index.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.js","names":["_Fragment","MenuIcon","PageCommonHeader","theme","useTheme","use","PageCommonContext","onToggleDrawerButtonClick","useCallback","isDrawerOpen","setIsDrawerOpen","Box","beforeAppBarComponent","AppBar","appBarHeight","Toolbar","isNoInteraction","IconButton","appBarIcon","Fragment","Typography","title","centerComponent","beforeAppBarRightComponent","rightComponent","afterAppBarRightComponent","afterAppBarComponent"],"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 useTheme,\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 rightComponent?: ReactNode;\n readonly title: string;\n};\n\nexport const PageCommonHeader = ({ centerComponent, rightComponent, title }: PageCommonHeaderProps) => {\n const theme = useTheme();\n const { afterAppBarComponent, afterAppBarRightComponent, appBarHeight = 48, appBarIcon, beforeAppBarComponent, beforeAppBarRightComponent, isDrawerOpen, isNoInteraction, setIsDrawerOpen } = use(PageCommonContext);\n\n const onToggleDrawerButtonClick = useCallback(() => {\n setIsDrawerOpen(!isDrawerOpen);\n }, [isDrawerOpen, setIsDrawerOpen]);\n\n return (\n <Box>\n {beforeAppBarComponent}\n <AppBar\n elevation={1}\n position={'static'}\n sx={{\n backgroundColor: 'primary.main',\n color: '#FFFFFF',\n height: appBarHeight,\n justifyContent: 'center',\n zIndex: theme.zIndex.drawer + 1,\n }}\n >\n <Toolbar\n sx={{\n display: 'flex',\n justifyContent: 'space-between',\n px: `${theme.spacing(1)} !important`, // using !important to override media queries\n }}\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 {appBarIcon && (\n <>\n {appBarIcon}\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 </Box>\n {!isNoInteraction && (\n <>\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1 }}>\n {centerComponent}\n </Box>\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1 }}>\n {beforeAppBarRightComponent && (\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1 }}>\n {beforeAppBarRightComponent}\n </Box>\n )}\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1 }}>\n {rightComponent}\n </Box>\n {afterAppBarRightComponent && (\n <Box sx={{ alignItems: 'center', display: 'flex', gap: 1 }}>\n {afterAppBarRightComponent}\n </Box>\n )}\n </Box>\n </>\n )}\n </Toolbar>\n </AppBar>\n {afterAppBarComponent}\n </Box>\n );\n};\n"],"mappings":";;;;;;AAwBA,IAAaE,KAAoB,EAAE,oBAAiB,mBAAgB,eAAmC;CACrG,IAAMC,IAAQC,EAAS,GACjB,EAAE,yBAAsB,8BAA2B,kBAAe,IAAI,eAAY,0BAAuB,+BAA4B,iBAAc,oBAAiB,uBAAoBC,EAAIC,CAAiB,GAE7MC,IAA4BC,QAAkB;EAClD,EAAgB,CAACC,CAAY;CAC/B,GAAG,CAACA,GAAcC,CAAe,CAAC;CAElC,OACE,kBAACC,GAAD,EAAA,UAAA;EACGC;EACD,kBAACC,GAAD;GACE,WAAW;GACX,UAAU;GACV,IAAI;IACF,iBAAiB;IACjB,OAAO;IACP,QAAQC;IACR,gBAAgB;IAChB,QAAQX,EAAM,OAAO,SAAS;GAChC;GAEA,UAAA,kBAACY,GAAD;IACE,IAAI;KACF,SAAS;KACT,gBAAgB;KAChB,IAAI,GAAGZ,EAAM,QAAQ,CAAC,EAAE;IAC1B;IACA,SAAS;IANX,UAAA,CASE,kBAACQ,GAAD;KAAK,IAAI;MAAE,YAAY;MAAU,SAAS;MAAQ,KAAK;KAAI;KAA3D,UAAA;MACG,CAACK,KACA,kBAACC,GAAD;OACE,cAAY;OACZ,OAAO;OACP,MAAM;OACN,SAASV;OACT,MAAM;OAEN,UAAA,kBAACN,GAAD,CAAW,CAAA;MACD,CAAA;MAEbiB,KACC,kBAAAlB,GAAA,EAAA,UACGkB,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;KACT;IACJ,CAAA,GAAA,CAACL,KACA,kBAAAhB,GAAA,EAAA,UAAA,CACE,kBAACW,GAAD;KAAK,IAAI;MAAE,YAAY;MAAU,SAAS;MAAQ,KAAK;KAAE;KACtD,UAAAW;IACE,CAAA,GACL,kBAACX,GAAD;KAAK,IAAI;MAAE,YAAY;MAAU,SAAS;MAAQ,KAAK;KAAE;KAAzD,UAAA;MACGY,KACC,kBAACZ,GAAD;OAAK,IAAI;QAAE,YAAY;QAAU,SAAS;QAAQ,KAAK;OAAE;OACtD,UAAAY;MACE,CAAA;MAEP,kBAACZ,GAAD;OAAK,IAAI;QAAE,YAAY;QAAU,SAAS;QAAQ,KAAK;OAAE;OACtD,UAAAa;MACE,CAAA;MACJC,KACC,kBAACd,GAAD;OAAK,IAAI;QAAE,YAAY;QAAU,SAAS;QAAQ,KAAK;OAAE;OACtD,UAAAc;MACE,CAAA;KAEJ;IACL,CAAA,CAAA,EAAA,CAAA,CAEG;;EACH,CAAA;EACPC;CACE,EAAA,CAAA;AAET"}
@@ -1,6 +1,5 @@
1
- //#region src/constants/config.constants.ts
1
+ // src/constants/config.constants.ts
2
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
3
  export { e as CONFIG_TOKEN, n as DEVICE_PIXEL_RATIO_SERVICE_TOKEN, r as KEYBOARD_SHORTCUT_SERVICE_TOKEN, t as WINDOW_SERVICE_TOKEN };
5
4
 
6
5
  //# sourceMappingURL=config.constants.js.map
@@ -1,6 +1,5 @@
1
- //#region src/constants/page.constants.ts
1
+ // src/constants/page.constants.ts
2
2
  var e = 340;
3
- //#endregion
4
3
  export { e as DRAWER_WIDTH };
5
4
 
6
5
  //# sourceMappingURL=page.constants.js.map
@@ -1,7 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ export type PageCommonConfig = {
3
+ readonly afterAppBarComponent?: ReactNode;
4
+ readonly afterAppBarRightComponent?: ReactNode;
5
+ readonly appBarHeight?: number;
6
+ readonly appBarIcon?: ReactNode;
7
+ readonly beforeAppBarComponent?: ReactNode;
8
+ readonly beforeAppBarRightComponent?: ReactNode;
9
+ };
1
10
  export type PageCommonContextData = {
11
+ readonly drawerContainerId: string;
2
12
  readonly isDrawerOpen: boolean;
3
13
  readonly isNoInteraction: boolean;
4
14
  readonly setIsDrawerOpen: (open: boolean) => void;
5
15
  readonly setIsNoInteraction: (open: boolean) => void;
6
- };
16
+ } & PageCommonConfig;
7
17
  export declare const PageCommonContext: import('react').Context<PageCommonContextData>;
@@ -1,3 +1,4 @@
1
1
  import { PropsWithChildren } from 'react';
2
- export type PageCommonContextProviderProps = PropsWithChildren;
3
- export declare const PageCommonContextProvider: ({ children }: PageCommonContextProviderProps) => import('react').JSX.Element;
2
+ import { PageCommonConfig } from './PageCommonContext';
3
+ export type PageCommonContextProviderProps = PropsWithChildren<PageCommonConfig>;
4
+ export declare const PageCommonContextProvider: ({ children, ...props }: PageCommonContextProviderProps) => import('react').JSX.Element;
@@ -1,24 +1,25 @@
1
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,
2
+ import { createContext as t, useId as n, useMemo as r, useState as i } from "react";
3
+ // src/context/pageCommonContext/PageCommonContext.ts
4
+ var a = t({}), o = ({ children: t, ...o }) => {
5
+ let [s, c] = i(!1), [l, u] = i(!1), d = n(), f = r(() => ({
6
+ ...o,
7
+ drawerContainerId: d,
8
+ isDrawerOpen: s,
9
+ isNoInteraction: l,
10
+ setIsDrawerOpen: c,
11
+ setIsNoInteraction: u
12
+ }), [
13
+ s,
14
+ l,
15
+ d,
16
+ o
17
+ ]);
18
+ return /* @__PURE__ */ e(a, {
19
+ value: f,
18
20
  children: t
19
21
  });
20
22
  };
21
- //#endregion
22
- export { i as PageCommonContext, a as PageCommonContextProvider };
23
+ export { a as PageCommonContext, o as PageCommonContextProvider };
23
24
 
24
25
  //# sourceMappingURL=index.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.js","names":["PageCommonContext","createContext","PageCommonContextProvider","props","isDrawerOpen","setIsDrawerOpen","useState","isNoInteraction","setIsNoInteraction","drawerContainerId","useId","contextValue","useMemo"],"sources":["../../../src/context/pageCommonContext/PageCommonContext.ts","../../../src/context/pageCommonContext/PageCommonContextProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { createContext } from 'react';\n\nexport type PageCommonConfig = {\n readonly afterAppBarComponent?: ReactNode;\n readonly afterAppBarRightComponent?: ReactNode;\n readonly appBarHeight?: number;\n readonly appBarIcon?: ReactNode;\n readonly beforeAppBarComponent?: ReactNode;\n readonly beforeAppBarRightComponent?: ReactNode;\n};\n\nexport type PageCommonContextData = {\n readonly drawerContainerId: string;\n readonly isDrawerOpen: boolean;\n readonly isNoInteraction: boolean;\n readonly setIsDrawerOpen: (open: boolean) => void;\n readonly setIsNoInteraction: (open: boolean) => void;\n} & PageCommonConfig;\n\nexport const PageCommonContext = createContext<PageCommonContextData>({} as PageCommonContextData);\n","import {\n useId,\n useMemo,\n useState,\n} from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport type {\n PageCommonConfig,\n PageCommonContextData,\n} from './PageCommonContext';\nimport { PageCommonContext } from './PageCommonContext';\n\nexport type PageCommonContextProviderProps = PropsWithChildren<PageCommonConfig>;\n\nexport const PageCommonContextProvider = ({ children, ...props }: PageCommonContextProviderProps) => {\n const [isDrawerOpen, setIsDrawerOpen] = useState(false);\n const [isNoInteraction, setIsNoInteraction] = useState(false);\n const drawerContainerId = useId();\n\n const contextValue = useMemo<PageCommonContextData>(() => {\n return {\n ...props,\n drawerContainerId,\n isDrawerOpen,\n isNoInteraction,\n setIsDrawerOpen,\n setIsNoInteraction,\n };\n }, [isDrawerOpen, isNoInteraction, drawerContainerId, props]);\n\n return (\n <PageCommonContext value={contextValue}>\n { children }\n </PageCommonContext>\n );\n};\n"],"mappings":";;;AAoBA,IAAaA,IAAoBC,EAAqC,CAAC,CAA0B,GCLpFC,KAA6B,EAAE,aAAU,GAAGC,QAA4C;CACnG,IAAM,CAACC,GAAcC,KAAmBC,EAAS,EAAK,GAChD,CAACC,GAAiBC,KAAsBF,EAAS,EAAK,GACtDG,IAAoBC,EAAM,GAE1BC,IAAeC,SACZ;EACL,GAAGT;EACH;EACA;EACA;EACA;EACA;CACF,IACC;EAACC;EAAcG;EAAiBE;EAAmBN;CAAK,CAAC;CAE5D,OACE,kBAACH,GAAD;EAAmB,OAAOW;EACtB;CACe,CAAA;AAEvB"}
@@ -1,7 +1,6 @@
1
- import { useCommonConfigContext as e } from "../../context/commonConfigContext/index.js";
2
- //#region src/hooks/useConfig/useConfig.ts
3
- var t = () => e().config;
4
- //#endregion
1
+ import { DependencyContainerUtil as e } from "../../utils/DependencyContainerUtil/index.js";
2
+ // src/hooks/useConfig/useConfig.ts
3
+ var t = () => e.resolveConfig();
5
4
  export { t as useConfig };
6
5
 
7
6
  //# sourceMappingURL=index.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.js","names":["useConfig","DependencyContainerUtil"],"sources":["../../../src/hooks/useConfig/useConfig.ts"],"sourcesContent":["import type { ConfigBase } from '../../models/config.models';\nimport { DependencyContainerUtil } from '../../utils/DependencyContainerUtil';\n\n// eslint-disable-next-line @eslint-react/no-unnecessary-use-prefix\nexport const useConfig = <TConfig extends ConfigBase = ConfigBase>(): TConfig => {\n return DependencyContainerUtil.resolveConfig<TConfig>();\n};\n"],"mappings":";;AAIA,IAAaA,UACJC,EAAwB,cAAuB"}
@@ -1,13 +1,12 @@
1
1
  import { useConfig as e } from "../useConfig/index.js";
2
2
  import { useEffect as t } from "react";
3
- //#region src/hooks/useUpdateDocumentTitle/useUpdateDocumentTitle.ts
3
+ // src/hooks/useUpdateDocumentTitle/useUpdateDocumentTitle.ts
4
4
  var n = (n) => {
5
5
  let r = e();
6
6
  t(() => {
7
7
  document.title = `${r.applicationName} - ${n}`;
8
8
  }, [r.applicationName, n]);
9
9
  };
10
- //#endregion
11
10
  export { n as useUpdateDocumentTitle };
12
11
 
13
12
  //# sourceMappingURL=index.js.map
@@ -1,16 +1,13 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { CircularProgressProps, Theme } from '@mui/material';
3
- export type ApplicationHeaderProps = {
4
- readonly fullHeight?: boolean;
5
- readonly fullWidth?: boolean;
6
- readonly singleAction?: boolean;
7
- };
3
+ import { PageCommonConfig } from '../context/pageCommonContext';
8
4
  export interface ConfigBase {
9
5
  applicationName: string;
10
6
  readonly drawerComponent?: () => ReactElement;
11
- getTouchIconUrl: () => string | undefined;
7
+ getTouchIconUrl?: () => string | undefined;
12
8
  readonly headerComponent?: () => ReactElement;
13
9
  nonce?: string;
10
+ pageConfig?: PageCommonConfig;
14
11
  spinner: {
15
12
  DEFAULT_CIRCULAR_PROGRESS_SIZE: CircularProgressProps['size'];
16
13
  DEFAULT_TAKING_LONGER_TIMEOUT_MS: number;
@@ -1,8 +1,7 @@
1
- //#region src/models/fasta.models.ts
1
+ // 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
- //#endregion
6
5
  export { e as LOADING_STATUS };
7
6
 
8
7
  //# sourceMappingURL=fasta.models.js.map
@@ -1 +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"}
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;C,OACL,EAAAC,QAAA,SACA,EAAAC,OAAA,QACA,EAAAC,UAAA,WACA,EAAAC,UAAA,W;AACF,EAAA,CAAA,CAAA"}
@@ -2,7 +2,7 @@ import { GenericErrorMessage as e } from "../../components/ui/GenericErrorMessag
2
2
  import { PageCommon as t } from "../../components/ui/PageCommon/index.js";
3
3
  import { useTranslation as n } from "react-i18next";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
- //#region src/pages/ErrorPage/ErrorPage.tsx
5
+ // src/pages/ErrorPage/ErrorPage.tsx
6
6
  var i = ({ error: i }) => {
7
7
  let { t: a } = n();
8
8
  return /* @__PURE__ */ r(t, {
@@ -11,7 +11,6 @@ var i = ({ error: i }) => {
11
11
  children: /* @__PURE__ */ r(e, { error: i })
12
12
  });
13
13
  };
14
- //#endregion
15
14
  export { i as ErrorPage };
16
15
 
17
16
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  import { MetaDataUtil as e } from "../../utils/MetaDataUtil/index.js";
2
2
  import { FastaUtil as t } from "../../utils/FastaUtil/index.js";
3
3
  import { LOADING_STATUS as n } from "../../models/fasta.models.js";
4
- //#region src/stores/fastaDataStore/fastaDataStore.ts
4
+ // src/stores/fastaDataStore/fastaDataStore.ts
5
5
  var r = () => ({
6
6
  columnMatchCounts: {},
7
7
  loadingError: null,
@@ -53,7 +53,6 @@ var r = () => ({
53
53
  setMatchKeyField: (e) => s({ matchKeyField: e })
54
54
  };
55
55
  };
56
- //#endregion
57
56
  export { i as createFastaDataStoreActions, r as createFastaDataStoreInitialState };
58
57
 
59
58
  //# sourceMappingURL=index.js.map