@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.
- package/dist/_chunks/EmotionCacheService.js +2 -4
- package/dist/_chunks/EmotionCacheService.js.map +1 -1
- package/dist/_chunks/decorate.js +1 -2
- package/dist/_chunks/react.js +2 -3
- package/dist/_chunks/react.js.map +1 -1
- package/dist/classes/services/FastaDataEventBusService/index.js +1 -2
- package/dist/components/SearchBar/index.js +1 -2
- package/dist/components/app/App/index.js +38 -41
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/fasta/FastaDataImportDialog/index.js +1 -2
- package/dist/components/fasta/FastaDataImportDialogLoader/FastaDataImportDialogLoader.d.ts +1 -1
- package/dist/components/fasta/FastaDataImportDialogLoader/index.js +1 -2
- package/dist/components/fasta/FastaDataImportDialogLoader/index.js.map +1 -1
- package/dist/components/fasta/FastaNotLoaded/index.js +1 -2
- package/dist/components/fasta/FastaPageHeaderCenterComponent/index.js +1 -2
- package/dist/components/fasta/FastaPageHeaderImportButton/index.js +1 -2
- package/dist/components/fasta/FastaPageHeaderResetButton/index.js +1 -2
- package/dist/components/ui/ButtonWithMenu/ButtonWithMenu.d.ts +12 -0
- package/dist/components/ui/ButtonWithMenu/index.d.ts +1 -0
- package/dist/components/ui/ButtonWithMenu/index.js +46 -0
- package/dist/components/ui/ButtonWithMenu/index.js.map +1 -0
- package/dist/components/ui/GenericErrorMessage/index.js +1 -2
- package/dist/components/ui/I18nWrapper/index.js +1 -2
- package/dist/components/ui/PageCommon/index.js +9 -9
- package/dist/components/ui/PageCommon/index.js.map +1 -1
- package/dist/components/ui/PageCommonDrawer/index.js +13 -13
- package/dist/components/ui/PageCommonDrawer/index.js.map +1 -1
- package/dist/components/ui/PageCommonHeader/PageCommonHeader.d.ts +1 -2
- package/dist/components/ui/PageCommonHeader/index.js +67 -59
- package/dist/components/ui/PageCommonHeader/index.js.map +1 -1
- package/dist/constants/config.constants.js +1 -2
- package/dist/constants/page.constants.js +1 -2
- package/dist/context/pageCommonContext/PageCommonContext.d.ts +11 -1
- package/dist/context/pageCommonContext/PageCommonContextProvider.d.ts +3 -2
- package/dist/context/pageCommonContext/index.js +19 -18
- package/dist/context/pageCommonContext/index.js.map +1 -1
- package/dist/hooks/useConfig/index.js +3 -4
- package/dist/hooks/useConfig/index.js.map +1 -1
- package/dist/hooks/useUpdateDocumentTitle/index.js +1 -2
- package/dist/models/config.models.d.ts +3 -6
- package/dist/models/fasta.models.js +1 -2
- package/dist/models/fasta.models.js.map +1 -1
- package/dist/pages/ErrorPage/index.js +1 -2
- package/dist/stores/fastaDataStore/index.js +1 -2
- package/dist/theme/index.js +18 -19
- package/dist/theme/index.js.map +1 -1
- package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +1 -1
- package/dist/utils/DependencyContainerUtil/index.js +3 -4
- package/dist/utils/DependencyContainerUtil/index.js.map +1 -1
- package/dist/utils/DownloadUtil/index.js +1 -2
- package/dist/utils/ErrorUtil/index.js +1 -2
- package/dist/utils/ExportUtil/ExportUtil.d.ts +6 -0
- package/dist/utils/ExportUtil/index.d.ts +1 -0
- package/dist/utils/ExportUtil/index.js +41 -0
- package/dist/utils/ExportUtil/index.js.map +1 -0
- package/dist/utils/FastaUtil/index.js +1 -2
- package/dist/utils/MetaDataUtil/index.js +1 -2
- package/dist/utils/StandardConfigUtil/StandardConfigUtil.d.ts +1 -1
- package/dist/utils/StandardConfigUtil/index.js +2 -2
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/dist/utils/UrlUtil/index.js +1 -2
- package/package.json +24 -24
- package/dist/components/ui/PageHeaderDocumentationButton/PageHeaderDocumentationButton.d.ts +0 -1
- package/dist/components/ui/PageHeaderDocumentationButton/index.d.ts +0 -1
- package/dist/components/ui/PageHeaderDocumentationButton/index.js +0 -24
- package/dist/components/ui/PageHeaderDocumentationButton/index.js.map +0 -1
- package/dist/context/commonConfigContext/CommonConfigContext.d.ts +0 -9
- package/dist/context/commonConfigContext/CommonConfigContextProvider.d.ts +0 -6
- package/dist/context/commonConfigContext/index.d.ts +0 -3
- package/dist/context/commonConfigContext/index.js +0 -34
- package/dist/context/commonConfigContext/index.js.map +0 -1
- package/dist/context/commonConfigContext/useCommonConfigContext.d.ts +0 -3
|
@@ -2,14 +2,13 @@ import { CONFIG_TOKEN as e, WINDOW_SERVICE_TOKEN as t } from "../constants/confi
|
|
|
2
2
|
import { t as n } from "./decorate.js";
|
|
3
3
|
import { inject as r, singleton as i } from "tsyringe";
|
|
4
4
|
import a from "@emotion/cache";
|
|
5
|
-
|
|
5
|
+
// \0@oxc-project+runtime@0.155.0/helpers/esm/decorateParam.js
|
|
6
6
|
function o(e, t) {
|
|
7
7
|
return function(n, r) {
|
|
8
8
|
t(n, r, e);
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
//#region src/classes/services/EmotionCacheService/EmotionCacheService.ts
|
|
11
|
+
// src/classes/services/EmotionCacheService/EmotionCacheService.ts
|
|
13
12
|
var s = class {
|
|
14
13
|
emotionCache;
|
|
15
14
|
constructor(e, t) {
|
|
@@ -27,7 +26,6 @@ s = n([
|
|
|
27
26
|
o(0, r(e)),
|
|
28
27
|
o(1, r(t))
|
|
29
28
|
], s);
|
|
30
|
-
//#endregion
|
|
31
29
|
export { s as t };
|
|
32
30
|
|
|
33
31
|
//# sourceMappingURL=EmotionCacheService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmotionCacheService.js","names":["_decorate","_decorateParam","__decorate","createCache","__decorateParam","target","key","paramIndex","EmotionCacheService","windowService","config","singleton","inject","CONFIG_TOKEN","WINDOW_SERVICE_TOKEN"],"sources":["../../src/classes/services/EmotionCacheService/EmotionCacheService.ts"],"sourcesContent":["import type { EmotionCache } from '@emotion/cache';\nimport createCache from '@emotion/cache';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\nimport type { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport {\n CONFIG_TOKEN,\n WINDOW_SERVICE_TOKEN,\n} from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\n\n@singleton()\nexport class EmotionCacheService {\n public readonly emotionCache: EmotionCache;\n\n public constructor(\n @inject(CONFIG_TOKEN) config: ConfigBase,\n @inject(WINDOW_SERVICE_TOKEN) windowService: WindowService,\n ) {\n this.emotionCache = createCache({\n container: windowService.document.head,\n key: 'loculus-tools',\n nonce: config.nonce,\n prepend: !!config.nonce,\n stylisPlugins: [],\n });\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmotionCacheService.js","names":["_decorate","_decorateParam","__decorate","createCache","__decorateParam","target","key","paramIndex","EmotionCacheService","windowService","config","singleton","inject","CONFIG_TOKEN","WINDOW_SERVICE_TOKEN"],"sources":["../../src/classes/services/EmotionCacheService/EmotionCacheService.ts"],"sourcesContent":["import type { EmotionCache } from '@emotion/cache';\nimport createCache from '@emotion/cache';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\nimport type { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport {\n CONFIG_TOKEN,\n WINDOW_SERVICE_TOKEN,\n} from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\n\n@singleton()\nexport class EmotionCacheService {\n public readonly emotionCache: EmotionCache;\n\n public constructor(\n @inject(CONFIG_TOKEN) config: ConfigBase,\n @inject(WINDOW_SERVICE_TOKEN) windowService: WindowService,\n ) {\n this.emotionCache = createCache({\n container: windowService.document.head,\n key: 'loculus-tools',\n nonce: config.nonce,\n prepend: !!config.nonce,\n stylisPlugins: [],\n });\n }\n}\n"],"mappings":";;;;;;;;;;;AAgBO,IAAMQ,IAAN,MAA0B;CAC/B;CAEA,YACE,GACA,GACA;EACA,KAAK,eAAeL,EAAY;GAC9B,WAAWM,EAAc,SAAS;GAClC,KAAK;GACL,OAAOC,EAAO;GACd,SAAS,CAAC,CAACA,EAAO;GAClB,eAAe,CAAC;EAClB,CAAC;CACH;AACF;;CAhBCC,EAAU;CAKNV,EAAA,GAAAW,EAAOC,CAAY,CAAA;CACnBZ,EAAA,GAAAW,EAAOE,CAAoB,CAAA"}
|
package/dist/_chunks/decorate.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// \0@oxc-project+runtime@0.155.0/helpers/esm/decorate.js
|
|
2
2
|
function e(e, t, n, r) {
|
|
3
3
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
4
4
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
5
5
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
6
6
|
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { e as t };
|
package/dist/_chunks/react.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import e from "react";
|
|
2
|
-
|
|
2
|
+
// ../../../node_modules/.pnpm/zustand@5.0.16_@types+react@19.3.0_react@19.3.1_use-sync-external-store@1.7.0_react@19.3.1_/node_modules/zustand/esm/react.mjs
|
|
3
3
|
var t = (e) => e;
|
|
4
4
|
function n(n, r = t) {
|
|
5
|
-
let i = e.useSyncExternalStore(n.subscribe, e.useCallback(() => r(n.getState()), [n, r]),
|
|
5
|
+
let i = e.useSyncExternalStore(n.subscribe, e.useCallback(() => r(n.getState()), [n, r]), () => r(n.getInitialState()));
|
|
6
6
|
return e.useDebugValue(i), i;
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { n as t };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=react.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","names":["React","identity","arg","useStore","slice","api","selector"],"sources":["../../../../../node_modules/.pnpm/zustand@5.0.
|
|
1
|
+
{"version":3,"file":"react.js","names":["React","identity","arg","useStore","slice","api","selector"],"sources":["../../../../../node_modules/.pnpm/zustand@5.0.16_@types+react@19.3.0_react@19.3.1_use-sync-external-store@1.7.0_react@19.3.1_/node_modules/zustand/esm/react.mjs"],"sourcesContent":["import React from 'react';\nimport { createStore } from 'zustand/vanilla';\n\nconst identity = (arg) => arg;\nfunction useStore(api, selector = identity) {\n const slice = React.useSyncExternalStore(\n api.subscribe,\n React.useCallback(() => selector(api.getState()), [api, selector]),\n () => selector(api.getInitialState())\n );\n React.useDebugValue(slice);\n return slice;\n}\nconst createImpl = (createState) => {\n const api = createStore(createState);\n const useBoundStore = (selector) => useStore(api, selector);\n Object.assign(useBoundStore, api);\n return useBoundStore;\n};\nconst create = ((createState) => createState ? createImpl(createState) : createImpl);\n\nexport { create, useStore };\n"],"ignoreList":[0],"mappings":";;AAGA,IAAMC,KAAY,MAAQC;AAC1B,SAASC,EAAS,GAAK,IAAWF,GAAU;CAC1C,IAAMG,IAAQJ,EAAM,qBAClBK,EAAI,WACJL,EAAM,kBAAkBM,EAASD,EAAI,SAAS,CAAC,GAAG,CAACA,GAAKC,CAAQ,CAAC,SAC3DA,EAASD,EAAI,gBAAgB,CAAC,CACtC;CAEA,OADAL,EAAM,cAAcI,CAAK,GAClBA;AACT"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { t as e } from "../../../_chunks/decorate.js";
|
|
2
2
|
import { singleton as t } from "tsyringe";
|
|
3
3
|
import { EventBusAbstract as n } from "@gen-epix/ui-core/classes/abstracts/EventBusAbstract";
|
|
4
|
-
|
|
4
|
+
// src/classes/services/FastaDataEventBusService/FastaDataEventBusService.ts
|
|
5
5
|
var r = class extends n {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
10
|
r = e([t()], r);
|
|
11
|
-
//#endregion
|
|
12
11
|
export { r as FastaDataEventBusService };
|
|
13
12
|
|
|
14
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,7 +5,7 @@ import d from "@mui/icons-material/Search";
|
|
|
5
5
|
import f from "@mui/icons-material/KeyboardArrowUp";
|
|
6
6
|
import p from "@mui/icons-material/KeyboardArrowDown";
|
|
7
7
|
import m from "@mui/icons-material/Close";
|
|
8
|
-
|
|
8
|
+
// src/components/SearchBar/SearchBar.tsx
|
|
9
9
|
var h = ({ allowNavigation: h, highlightedIndex: g, numResults: _ = 0, onHighlightedIndexChange: v, onSearchQueryChange: y, searchQuery: b, truncated: x }) => {
|
|
10
10
|
let S = i(), C = u(null), w = u(null), T = u(null), E = c((e) => {
|
|
11
11
|
let t = e.target.value;
|
|
@@ -123,7 +123,6 @@ var h = ({ allowNavigation: h, highlightedIndex: g, numResults: _ = 0, onHighlig
|
|
|
123
123
|
value: b
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
|
-
//#endregion
|
|
127
126
|
export { h as SearchBar };
|
|
128
127
|
|
|
129
128
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { DependencyContainerUtil as e } from "../../../utils/DependencyContainerUtil/index.js";
|
|
2
2
|
import { PageCommonContextProvider as t } from "../../../context/pageCommonContext/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
let i = p(() => ({
|
|
3
|
+
import { ErrorPage as n } from "../../../pages/ErrorPage/index.js";
|
|
4
|
+
import { I18nWrapper as r } from "../../ui/I18nWrapper/index.js";
|
|
5
|
+
import { t as i } from "../../../_chunks/EmotionCacheService.js";
|
|
6
|
+
import { CssBaseline as a, ThemeProvider as o } from "@mui/material";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { Component as l, createContext as u, createElement as d, useMemo as f } from "react";
|
|
9
|
+
import { CacheProvider as p } from "@emotion/react";
|
|
10
|
+
// ../../../node_modules/.pnpm/react-error-boundary@6.1.6_@types+react@19.3.0_react@19.3.1/node_modules/react-error-boundary/dist/react-error-boundary.js
|
|
11
|
+
var m = u(null);
|
|
12
|
+
function h({ children: e, didCatch: t, error: n, resetErrorBoundary: r }) {
|
|
13
|
+
let i = f(() => ({
|
|
15
14
|
didCatch: t,
|
|
16
15
|
error: n,
|
|
17
16
|
resetErrorBoundary: r
|
|
@@ -20,14 +19,14 @@ function g({ children: e, didCatch: t, error: n, resetErrorBoundary: r }) {
|
|
|
20
19
|
n,
|
|
21
20
|
r
|
|
22
21
|
]);
|
|
23
|
-
return
|
|
22
|
+
return d(m.Provider, { value: i }, e);
|
|
24
23
|
}
|
|
25
|
-
var
|
|
24
|
+
var g = {
|
|
26
25
|
didCatch: !1,
|
|
27
26
|
error: null
|
|
28
|
-
},
|
|
27
|
+
}, _ = class extends l {
|
|
29
28
|
constructor(e) {
|
|
30
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
29
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = g;
|
|
31
30
|
}
|
|
32
31
|
static getDerivedStateFromError(e) {
|
|
33
32
|
return {
|
|
@@ -40,18 +39,18 @@ var _ = {
|
|
|
40
39
|
t && (this.props.onReset?.({
|
|
41
40
|
args: e,
|
|
42
41
|
reason: "imperative-api"
|
|
43
|
-
}), this.setState(
|
|
42
|
+
}), this.setState(g));
|
|
44
43
|
}
|
|
45
44
|
componentDidCatch(e, t) {
|
|
46
45
|
this.props.onError?.(e, t);
|
|
47
46
|
}
|
|
48
47
|
componentDidUpdate(e, t) {
|
|
49
48
|
let { didCatch: n } = this.state, { resetKeys: r } = this.props;
|
|
50
|
-
n && t.didCatch &&
|
|
49
|
+
n && t.didCatch && v(e.resetKeys, r) && (this.props.onReset?.({
|
|
51
50
|
next: r,
|
|
52
51
|
prev: e.resetKeys,
|
|
53
52
|
reason: "keys"
|
|
54
|
-
}), this.setState(
|
|
53
|
+
}), this.setState(g));
|
|
55
54
|
}
|
|
56
55
|
render() {
|
|
57
56
|
let { children: e, fallbackRender: t, FallbackComponent: n, fallback: r } = this.props, { didCatch: i, error: a } = this.state, o = e;
|
|
@@ -61,41 +60,39 @@ var _ = {
|
|
|
61
60
|
resetErrorBoundary: this.resetErrorBoundary
|
|
62
61
|
};
|
|
63
62
|
if (typeof t == "function") o = t(e);
|
|
64
|
-
else if (n) o =
|
|
63
|
+
else if (n) o = d(n, e);
|
|
65
64
|
else if ("fallback" in this.props) o = r;
|
|
66
65
|
else throw a;
|
|
67
66
|
}
|
|
68
|
-
return
|
|
67
|
+
return d(h, {
|
|
69
68
|
didCatch: i,
|
|
70
69
|
error: a,
|
|
71
70
|
resetErrorBoundary: this.resetErrorBoundary
|
|
72
71
|
}, o);
|
|
73
72
|
}
|
|
74
73
|
};
|
|
75
|
-
function
|
|
74
|
+
function v(e = [], t = []) {
|
|
76
75
|
return e.length !== t.length || e.some((e, n) => !Object.is(e, t[n]));
|
|
77
76
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
})
|
|
77
|
+
// src/components/app/App/App.tsx
|
|
78
|
+
var y = ({ children: l, container: u }) => {
|
|
79
|
+
let d = e.resolveConfig(u), { pageConfig: f } = d, m = d.getTouchIconUrl?.();
|
|
80
|
+
m && document.querySelector("link[rel=\"icon\"]")?.setAttribute("href", m);
|
|
81
|
+
let h = u.resolve(i).emotionCache;
|
|
82
|
+
return /* @__PURE__ */ s(p, {
|
|
83
|
+
value: h,
|
|
84
|
+
children: /* @__PURE__ */ c(o, {
|
|
85
|
+
theme: d.theme,
|
|
86
|
+
children: [/* @__PURE__ */ s(a, {}), /* @__PURE__ */ s(_, {
|
|
87
|
+
FallbackComponent: n,
|
|
88
|
+
children: /* @__PURE__ */ s(r, { children: /* @__PURE__ */ s(t, {
|
|
89
|
+
...f,
|
|
90
|
+
children: l
|
|
91
|
+
}) })
|
|
92
|
+
})]
|
|
95
93
|
})
|
|
96
94
|
});
|
|
97
95
|
};
|
|
98
|
-
|
|
99
|
-
export { b as App };
|
|
96
|
+
export { y as App };
|
|
100
97
|
|
|
101
98
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["l","h","i","y","ErrorBoundary","EmotionCacheService","f","createContext","m","r","e","t","o","n","useMemo","createElement","d","C","Component","g","s","c","u","App","config","DependencyContainerUtil","container","touchIconUrl","emotionCache","
|
|
1
|
+
{"version":3,"file":"index.js","names":["l","h","i","y","ErrorBoundary","EmotionCacheService","f","createContext","m","r","e","t","o","n","useMemo","createElement","d","C","Component","g","s","c","u","App","config","DependencyContainerUtil","container","touchIconUrl","emotionCache","CacheProvider","ThemeProvider","CssBaseline","ErrorPage","I18nWrapper","PageCommonContextProvider","pageConfig"],"sources":["../../../../../../../node_modules/.pnpm/react-error-boundary@6.1.6_@types+react@19.3.0_react@19.3.1/node_modules/react-error-boundary/dist/react-error-boundary.js","../../../../src/components/app/App/App.tsx"],"sourcesContent":["\"use client\";\nimport { createContext as l, useMemo as h, createElement as i, Component as y, useContext as p, useState as E, forwardRef as B } from \"react\";\nconst f = l(null);\nfunction m({\n children: r,\n didCatch: e,\n error: t,\n resetErrorBoundary: o\n}) {\n const n = h(\n () => ({ didCatch: e, error: t, resetErrorBoundary: o }),\n [e, t, o]\n );\n return i(f.Provider, { value: n }, r);\n}\nconst d = {\n didCatch: !1,\n error: null\n};\nclass C extends y {\n constructor(e) {\n super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = d;\n }\n static getDerivedStateFromError(e) {\n return { didCatch: !0, error: e };\n }\n resetErrorBoundary(...e) {\n const { didCatch: t } = this.state;\n t && (this.props.onReset?.({\n args: e,\n reason: \"imperative-api\"\n }), this.setState(d));\n }\n componentDidCatch(e, t) {\n this.props.onError?.(e, t);\n }\n componentDidUpdate(e, t) {\n const { didCatch: o } = this.state, { resetKeys: n } = this.props;\n o && t.didCatch && g(e.resetKeys, n) && (this.props.onReset?.({\n next: n,\n prev: e.resetKeys,\n reason: \"keys\"\n }), this.setState(d));\n }\n render() {\n const { children: e, fallbackRender: t, FallbackComponent: o, fallback: n } = this.props, { didCatch: s, error: a } = this.state;\n let c = e;\n if (s) {\n const u = {\n error: a,\n resetErrorBoundary: this.resetErrorBoundary\n };\n if (typeof t == \"function\")\n c = t(u);\n else if (o)\n c = i(o, u);\n else if (\"fallback\" in this.props)\n c = n;\n else\n throw a;\n }\n return i(\n m,\n {\n didCatch: s,\n error: a,\n resetErrorBoundary: this.resetErrorBoundary\n },\n c\n );\n }\n}\nfunction g(r = [], e = []) {\n return r.length !== e.length || r.some((t, o) => !Object.is(t, e[o]));\n}\nfunction x(r) {\n return r !== null && typeof r == \"object\" && \"didCatch\" in r && typeof r.didCatch == \"boolean\" && \"error\" in r && \"resetErrorBoundary\" in r && typeof r.resetErrorBoundary == \"function\";\n}\nfunction b(r) {\n if (!x(r))\n throw new Error(\"ErrorBoundaryContext not found\");\n}\nfunction S() {\n const r = p(f);\n b(r);\n const { error: e, resetErrorBoundary: t } = r, [o, n] = E({\n error: null,\n hasError: !1\n }), s = h(\n () => ({\n error: e,\n resetBoundary: () => {\n t(), n({ error: null, hasError: !1 });\n },\n showBoundary: (a) => n({\n error: a,\n hasError: !0\n })\n }),\n [e, t]\n );\n if (o.hasError)\n throw o.error;\n return s;\n}\nfunction w(r) {\n switch (typeof r) {\n case \"object\": {\n if (r !== null && \"message\" in r && typeof r.message == \"string\")\n return r.message;\n break;\n }\n case \"string\":\n return r;\n }\n}\nfunction R(r, e) {\n const t = B(\n (n, s) => i(\n C,\n e,\n i(r, { ...n, ref: s })\n )\n ), o = r.displayName || r.name || \"Unknown\";\n return t.displayName = `withErrorBoundary(${o})`, t;\n}\nexport {\n C as ErrorBoundary,\n f as ErrorBoundaryContext,\n w as getErrorMessage,\n S as useErrorBoundary,\n R as withErrorBoundary\n};\n//# sourceMappingURL=react-error-boundary.js.map\n","import type { DependencyContainer } from 'tsyringe';\nimport { CacheProvider } from '@emotion/react';\nimport {\n CssBaseline,\n ThemeProvider,\n} from '@mui/material';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport type { PropsWithChildren } from 'react';\n\nimport { EmotionCacheService } from '../../../classes/services/EmotionCacheService';\nimport type { ConfigBase } from '../../../models/config.models';\nimport { DependencyContainerUtil } from '../../../utils/DependencyContainerUtil';\nimport { ErrorPage } from '../../../pages/ErrorPage';\nimport { I18nWrapper } from '../../ui/I18nWrapper';\nimport { PageCommonContextProvider } from '../../../context/pageCommonContext';\n\nexport type AppProps = PropsWithChildren<{\n readonly container: DependencyContainer;\n}>;\n\nexport const App = ({ children, container }: AppProps) => {\n const config = DependencyContainerUtil.resolveConfig<ConfigBase>(container);\n const { pageConfig } = config;\n const touchIconUrl = config.getTouchIconUrl?.();\n if (touchIconUrl) {\n document.querySelector('link[rel=\"icon\"]')?.setAttribute('href', touchIconUrl);\n }\n\n const emotionCache = container.resolve(EmotionCacheService).emotionCache;\n\n return (\n <CacheProvider value={emotionCache}>\n <ThemeProvider theme={config.theme}>\n <CssBaseline />\n <ErrorBoundary FallbackComponent={ErrorPage}>\n <I18nWrapper>\n <PageCommonContextProvider {...pageConfig}>\n {children}\n </PageCommonContextProvider>\n </I18nWrapper>\n </ErrorBoundary>\n </ThemeProvider>\n </CacheProvider>\n );\n};\n"],"ignoreList":[0],"mappings":";;;;;;;;;;AAEA,IAAMM,IAAIN,EAAE,IAAI;AAChB,SAASQ,EAAE,EACT,UAAUC,GACV,UAAUC,GACV,OAAOC,GACP,oBAAoBC,KACnB;CACD,IAAMC,IAAIZ,SACD;EAAE,UAAUS;EAAG,OAAOC;EAAG,oBAAoBC;CAAE,IACtD;EAACF;EAAGC;EAAGC;CAAC,CACV;CACA,OAAOV,EAAEI,EAAE,UAAU,EAAE,OAAOO,EAAE,GAAGJ,CAAC;AACtC;AACA,IAAMO,IAAI;CACR,UAAU,CAAC;CACX,OAAO;AACT,GACMC,IAAN,cAAgBd,EAAE;CAChB,YAAY,GAAG;EACb,MAAM,CAAC,GAAG,KAAK,qBAAqB,KAAK,mBAAmB,KAAK,IAAI,GAAG,KAAK,QAAQa;CACvF;CACA,OAAO,yBAAyB,GAAG;EACjC,OAAO;GAAE,UAAU,CAAC;GAAG,OAAO;EAAE;CAClC;CACA,mBAAmB,GAAG,GAAG;EACvB,IAAM,EAAE,UAAU,MAAM,KAAK;EAC7B,MAAM,KAAK,MAAM,UAAU;GACzB,MAAM;GACN,QAAQ;EACV,CAAC,GAAG,KAAK,SAASA,CAAC;CACrB;CACA,kBAAkB,GAAG,GAAG;EACtB,KAAK,MAAM,UAAU,GAAG,CAAC;CAC3B;CACA,mBAAmB,GAAG,GAAG;EACvB,IAAM,EAAE,UAAUJ,MAAM,KAAK,OAAO,EAAE,WAAWC,MAAM,KAAK;EAC5D,KAAK,EAAE,YAAYM,EAAE,EAAE,WAAWN,CAAC,MAAM,KAAK,MAAM,UAAU;GAC5D,MAAMA;GACN,MAAM,EAAE;GACR,QAAQ;EACV,CAAC,GAAG,KAAK,SAASG,CAAC;CACrB;CACA,SAAS;EACP,IAAM,EAAE,UAAU,GAAG,gBAAgB,GAAG,mBAAmBJ,GAAG,UAAUC,MAAM,KAAK,OAAO,EAAE,UAAUO,GAAG,OAAO,MAAM,KAAK,OACvHC,IAAI;EACR,IAAID,GAAG;GACL,IAAME,IAAI;IACR,OAAO;IACP,oBAAoB,KAAK;GAC3B;GACA,IAAI,OAAO,KAAK,YACd,IAAI,EAAEA,CAAC;QACJ,IAAIV,GACP,IAAIV,EAAEU,GAAGU,CAAC;QACP,IAAI,cAAc,KAAK,OAC1B,IAAIT;QAEJ,MAAM;EACV;EACA,OAAOX,EACLM,GACA;GACE,UAAUY;GACV,OAAO;GACP,oBAAoB,KAAK;EAC3B,GACAC,CACF;CACF;AACF;AACA,SAASF,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG;CACzB,OAAOV,EAAE,WAAWC,EAAE,UAAUD,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,GAAGE,GAAGD,EAAEE,EAAE,CAAC;AACtE;;ACtDA,IAAaW,KAAO,EAAE,aAAU,mBAA0B;CACxD,IAAMC,IAASC,EAAwB,cAA0BC,CAAS,GACpE,EAAE,kBAAeF,GACjBG,IAAeH,EAAO,kBAAkB;CAC9C,AAAIG,KACF,SAAS,cAAc,oBAAkB,CAAC,EAAE,aAAa,QAAQA,CAAY;CAG/E,IAAMC,IAAeF,EAAU,QAAQrB,CAAmB,CAAC,CAAC;CAE5D,OACE,kBAACwB,GAAD;EAAe,OAAOD;EACpB,UAAA,kBAACE,GAAD;GAAe,OAAON,EAAO;GAA7B,UAAA,CACE,kBAACO,GAAD,CAAc,CAAA,GACd,kBAAC3B,GAAD;IAAe,mBAAmB4B;IAChC,UAAA,kBAACC,GAAD,EAAA,UACE,kBAACC,GAAD;KAA2B,GAAIC;KAC5B;IACwB,CAAA,EAChB,CAAA;GACA,CAAA,CACF;;CACF,CAAA;AAEnB"}
|
|
@@ -5,7 +5,7 @@ import m from "@mui/icons-material/Biotech";
|
|
|
5
5
|
import h from "@mui/icons-material/TableChart";
|
|
6
6
|
import { FileDropZone as g } from "@gen-epix/ui-core-components/components/FileDropZone";
|
|
7
7
|
import { withDialog as _ } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
8
|
-
|
|
8
|
+
// src/components/fasta/FastaDataImportDialog/FastaDataImportDialog.tsx
|
|
9
9
|
var v = _(({ extraActions: _, onActionsChange: v, onClose: y, onDataChange: b, onDisableBackdropClickChange: x, onError: S, onNoCloseButtonChange: C, openProps: w }) => {
|
|
10
10
|
let [T, E] = p(0), [D, O] = p(null), [k, A] = p(""), [j, M] = p(""), [N, ee] = p(0), [P, F] = p(null), [I, L] = p(""), [R, z] = p(""), [B, V] = p(!1), [H, U] = p(null);
|
|
11
11
|
f(() => {
|
|
@@ -303,7 +303,6 @@ var v = _(({ extraActions: _, onActionsChange: v, onClose: y, onDataChange: b, o
|
|
|
303
303
|
maxWidth: "xl",
|
|
304
304
|
testId: "FastaDataImportDialog"
|
|
305
305
|
});
|
|
306
|
-
//#endregion
|
|
307
306
|
export { v as FastaDataImportDialog };
|
|
308
307
|
|
|
309
308
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,7 +2,7 @@ import { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';
|
|
|
2
2
|
import { StoreApi } from 'zustand';
|
|
3
3
|
import { FastaDataStore } from '../../../stores/fastaDataStore';
|
|
4
4
|
export type FastaDataImportDialogLoaderProps = {
|
|
5
|
-
extraActions
|
|
5
|
+
extraActions?: DialogAction[];
|
|
6
6
|
store: StoreApi<FastaDataStore>;
|
|
7
7
|
};
|
|
8
8
|
export declare const FastaDataImportDialogLoader: ({ extraActions, store }: FastaDataImportDialogLoaderProps) => import('react').JSX.Element;
|
|
@@ -7,7 +7,7 @@ import { FastaDataImportDialog as a } from "../FastaDataImportDialog/index.js";
|
|
|
7
7
|
import { container as o } from "tsyringe";
|
|
8
8
|
import { Fragment as s, jsx as c } from "react/jsx-runtime";
|
|
9
9
|
import { useCallback as l, useEffect as u, useRef as d } from "react";
|
|
10
|
-
|
|
10
|
+
// src/components/fasta/FastaDataImportDialogLoader/FastaDataImportDialogLoader.tsx
|
|
11
11
|
var f = ({ extraActions: f, store: p }) => {
|
|
12
12
|
let m = i(p, (e) => e.setData), h = i(p, (e) => e.setLoadingStatus), g = d(null);
|
|
13
13
|
u(() => {
|
|
@@ -65,7 +65,6 @@ var f = ({ extraActions: f, store: p }) => {
|
|
|
65
65
|
ref: g
|
|
66
66
|
}) });
|
|
67
67
|
};
|
|
68
|
-
//#endregion
|
|
69
68
|
export { f as FastaDataImportDialogLoader };
|
|
70
69
|
|
|
71
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_Fragment","useStore","FastaDataImportDialogLoader","setData","store","state","setLoadingStatus","fastaDataImportDialogRef","useRef","useEffect","removers","container","FastaDataEventBusService","initialErrorMessage","remove","urlParams","inputFastaUrl","inputMetadataUrl","LOADING_STATUS","fastaRes","fastaText","metaText","metaRes","metaErr","fastaErr","message","handleError","useCallback","errorMessage","onDataChange","fastaContent","metadataContent","ErrorUtil","onError","Fragment","FastaDataImportDialog"],"sources":["../../../../src/components/fasta/FastaDataImportDialogLoader/FastaDataImportDialogLoader.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport type { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';\nimport {\n useCallback,\n useEffect,\n useRef,\n} from 'react';\nimport type { StoreApi } from 'zustand';\nimport { useStore } from 'zustand';\n\nimport { FastaDataEventBusService } from '../../../classes/services/FastaDataEventBusService';\nimport { LOADING_STATUS } from '../../../models/fasta.models';\nimport type { FastaDataStore } from '../../../stores/fastaDataStore';\nimport { UrlUtil } from '../../../utils/UrlUtil';\nimport type { FastaDataImportDialogRefMethods } from '../FastaDataImportDialog';\nimport { FastaDataImportDialog } from '../FastaDataImportDialog';\nimport { ErrorUtil } from '../../../utils/ErrorUtil';\n\n\nexport type FastaDataImportDialogLoaderProps = {\n extraActions
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Fragment","useStore","FastaDataImportDialogLoader","setData","store","state","setLoadingStatus","fastaDataImportDialogRef","useRef","useEffect","removers","container","FastaDataEventBusService","initialErrorMessage","remove","urlParams","inputFastaUrl","inputMetadataUrl","LOADING_STATUS","fastaRes","fastaText","metaText","metaRes","metaErr","fastaErr","message","handleError","useCallback","errorMessage","onDataChange","fastaContent","metadataContent","ErrorUtil","onError","Fragment","FastaDataImportDialog"],"sources":["../../../../src/components/fasta/FastaDataImportDialogLoader/FastaDataImportDialogLoader.tsx"],"sourcesContent":["import { container } from 'tsyringe';\nimport type { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';\nimport {\n useCallback,\n useEffect,\n useRef,\n} from 'react';\nimport type { StoreApi } from 'zustand';\nimport { useStore } from 'zustand';\n\nimport { FastaDataEventBusService } from '../../../classes/services/FastaDataEventBusService';\nimport { LOADING_STATUS } from '../../../models/fasta.models';\nimport type { FastaDataStore } from '../../../stores/fastaDataStore';\nimport { UrlUtil } from '../../../utils/UrlUtil';\nimport type { FastaDataImportDialogRefMethods } from '../FastaDataImportDialog';\nimport { FastaDataImportDialog } from '../FastaDataImportDialog';\nimport { ErrorUtil } from '../../../utils/ErrorUtil';\n\n\nexport type FastaDataImportDialogLoaderProps = {\n extraActions?: DialogAction[];\n store: StoreApi<FastaDataStore>;\n};\n\nexport const FastaDataImportDialogLoader = ({ extraActions, store }: FastaDataImportDialogLoaderProps) => {\n const setData = useStore(store, (state) => state.setData);\n const setLoadingStatus = useStore(store, (state) => state.setLoadingStatus);\n const fastaDataImportDialogRef = useRef<FastaDataImportDialogRefMethods>(null);\n\n useEffect(() => {\n const removers = [\n // eslint-disable-next-line @eslint-react/web-api-no-leaked-event-listener\n container.resolve(FastaDataEventBusService).addEventListener('onShowImportDialog', (initialErrorMessage?: string) => {\n fastaDataImportDialogRef.current?.open(initialErrorMessage ? { initialErrorMessage } : undefined);\n }),\n // eslint-disable-next-line @eslint-react/web-api-no-leaked-event-listener\n container.resolve(FastaDataEventBusService).addEventListener('onCloseImportDialog', () => {\n fastaDataImportDialogRef.current?.close();\n }),\n ];\n return () => {\n removers.forEach((remove) => remove());\n };\n }, []);\n\n useEffect(() => {\n // Scan URL parameters for deep-linking\n const urlParams = new URLSearchParams(window.location.search);\n const inputFastaUrl = urlParams.get('input-fasta');\n const inputMetadataUrl = urlParams.get('input-metadata');\n\n const handleDeepLinking = async () => {\n if (inputFastaUrl) {\n setLoadingStatus(LOADING_STATUS.LOADING);\n try {\n const fastaRes = await fetch(inputFastaUrl);\n if (!fastaRes.ok) {\n throw new Error(`FASTA fetch failed (${fastaRes.status})`);\n }\n const fastaText = await fastaRes.text();\n\n if (!fastaText.trim()) {\n setLoadingStatus(LOADING_STATUS.ERROR);\n throw new Error('The input-fasta URL returned no sequence data. Check that the URL and requested accession(s) are correct.');\n }\n\n let metaText: string | undefined;\n if (inputMetadataUrl) {\n try {\n const metaRes = await fetch(inputMetadataUrl);\n if (metaRes.ok) {\n metaText = await metaRes.text();\n }\n } catch (metaErr) {\n console.warn('[App] Failed to auto-fetch metadata:', metaErr);\n }\n }\n\n await setData(fastaText, metaText);\n } catch (fastaErr) {\n console.error('[App] Failed to auto-load FASTA:', fastaErr);\n const message = fastaErr instanceof Error ? fastaErr.message : 'Failed to auto-load FASTA from the provided URL.';\n container.resolve(FastaDataEventBusService).emit('onShowImportDialog', message);\n }\n } else {\n // PV1-02: Show data loading modal if no data provided via URL query params\n container.resolve(FastaDataEventBusService).emit('onShowImportDialog');\n }\n };\n\n void handleDeepLinking();\n }, [setData, setLoadingStatus]);\n\n const handleError = useCallback((errorMessage: string) => {\n fastaDataImportDialogRef.current?.close();\n container.resolve(FastaDataEventBusService).emit('onShowImportDialog', errorMessage);\n }, []);\n\n const onDataChange = useCallback(async (fastaContent: string, metadataContent?: string) => {\n try {\n await setData(fastaContent, metadataContent);\n fastaDataImportDialogRef.current?.close();\n } catch (e) {\n handleError(ErrorUtil.getErrorMessage(e, 'Unknown error'));\n } finally {\n // clear any search params from the URL\n UrlUtil.clearSearchParams();\n }\n }, [handleError, setData]);\n\n const onError = useCallback((errorMessage: unknown) => {\n handleError(ErrorUtil.getErrorMessage(errorMessage, 'Unknown error'));\n }, [handleError]);\n\n return (\n <>\n <FastaDataImportDialog\n extraActions={extraActions}\n onDataChange={onDataChange}\n onError={onError}\n ref={fastaDataImportDialogRef}\n />\n </>\n );\n};\n"],"mappings":";;;;;;;;;;AAwBA,IAAaE,KAA+B,EAAE,iBAAc,eAA8C;CACxG,IAAMC,IAAUF,EAASG,IAAQ,MAAUC,EAAM,OAAO,GAClDC,IAAmBL,EAASG,IAAQ,MAAUC,EAAM,gBAAgB,GACpEE,IAA2BC,EAAwC,IAAI;CAkB7E,AAhBAC,QAAgB;EACd,IAAMC,IAAW,CAEfC,EAAU,QAAQC,CAAwB,CAAC,CAAC,iBAAiB,uBAAuB,MAAiC;GACnH,EAAyB,SAAS,KAAKC,IAAsB,EAAE,uBAAoB,IAAI,KAAA,CAAS;EAClG,CAAC,GAEDF,EAAU,QAAQC,CAAwB,CAAC,CAAC,iBAAiB,6BAA6B;GACxF,EAAyB,SAAS,MAAM;EAC1C,CAAC,CACH;EACA,aAAa;GACX,EAAS,SAAS,MAAWE,EAAO,CAAC;EACvC;CACF,GAAG,CAAC,CAAC,GAELL,QAAgB;EAEd,IAAMM,IAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM,GACtDC,IAAgBD,EAAU,IAAI,aAAa,GAC3CE,IAAmBF,EAAU,IAAI,gBAAgB;EAyCvD,aAvCsC;GACpC,IAAIC,GAAe;IACjB,EAAiBE,EAAe,OAAO;IACvC,IAAI;KACF,IAAMC,IAAW,MAAM,MAAMH,CAAa;KAC1C,IAAI,CAACG,EAAS,IACZ,MAAU,MAAM,uBAAuBA,EAAS,OAAO,EAAE;KAE3D,IAAMC,IAAY,MAAMD,EAAS,KAAK;KAEtC,IAAI,CAACC,EAAU,KAAK,GAElB,MADAd,EAAiBY,EAAe,KAAK,GAC3B,MAAM,2GAA2G;KAG7H,IAAIG;KACJ,IAAIJ,GACF,IAAI;MACF,IAAMK,IAAU,MAAM,MAAML,CAAgB;MAC5C,AAAIK,EAAQ,OACV,IAAW,MAAMA,EAAQ,KAAK;KAElC,SAASC,GAAS;MAChB,QAAQ,KAAK,wCAAwCA,CAAO;KAC9D;KAGF,MAAMpB,EAAQiB,GAAWC,CAAQ;IACnC,SAASG,GAAU;KACjB,QAAQ,MAAM,oCAAoCA,CAAQ;KAC1D,IAAMC,IAAUD,aAAoB,QAAQA,EAAS,UAAU;KAC/D,EAAU,QAAQZ,CAAwB,CAAC,CAAC,KAAK,sBAAsBa,CAAO;IAChF;GACF,OAEE,EAAU,QAAQb,CAAwB,CAAC,CAAC,KAAK,oBAAoB;EAEzE,EAEK,CAAkB;CACzB,GAAG,CAACT,GAASG,CAAgB,CAAC;CAE9B,IAAMoB,IAAcC,GAAa,MAAyB;EAExD,AADApB,EAAyB,SAAS,MAAM,GACxCI,EAAU,QAAQC,CAAwB,CAAC,CAAC,KAAK,sBAAsBgB,CAAY;CACrF,GAAG,CAAC,CAAC,GAECC,IAAeF,EAAY,OAAO,GAAsB,MAA6B;EACzF,IAAI;GAEF,AADA,MAAMxB,EAAQ2B,GAAcC,CAAe,GAC3CxB,EAAyB,SAAS,MAAM;EAC1C,SAAS,GAAG;GACV,EAAYyB,EAAU,gBAAgB,GAAG,eAAe,CAAC;EAC3D,UAAU;GAER,EAAQ,kBAAkB;EAC5B;CACF,GAAG,CAACN,GAAavB,CAAO,CAAC,GAEnB8B,IAAUN,GAAa,MAA0B;EACrD,EAAYK,EAAU,gBAAgBJ,GAAc,eAAe,CAAC;CACtE,GAAG,CAACF,CAAW,CAAC;CAEhB,OACE,kBAAA1B,GAAA,EAAA,UACE,kBAACmC,GAAD;EACgB;EACA;EACL;EACT,KAAK5B;CACN,CAAA,EACD,CAAA;AAEN"}
|
|
@@ -4,7 +4,7 @@ import { Box as n, Button as r, Typography as i } from "@mui/material";
|
|
|
4
4
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
5
|
import { useCallback as s } from "react";
|
|
6
6
|
import c from "@mui/icons-material/FileUploadOutlined";
|
|
7
|
-
|
|
7
|
+
// src/components/fasta/FastaNotLoaded/FastaNotLoaded.tsx
|
|
8
8
|
var l = ({ description: l, icon: u, title: d }) => {
|
|
9
9
|
let f = s(() => {
|
|
10
10
|
t.resolve(e).emit("onShowImportDialog");
|
|
@@ -48,7 +48,6 @@ var l = ({ description: l, icon: u, title: d }) => {
|
|
|
48
48
|
]
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
//#endregion
|
|
52
51
|
export { l as FastaNotLoaded };
|
|
53
52
|
|
|
54
53
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "../../../_chunks/react.js";
|
|
2
2
|
import { Box as t, Chip as n } from "@mui/material";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/fasta/FastaPageHeaderCenterComponent/FastaPageHeaderCenterComponent.tsx
|
|
5
5
|
var a = ({ store: a }) => {
|
|
6
6
|
let o = e(a, (e) => e.parsedFasta), s = e(a, (e) => e.parsedMetadata), c = o?.sequences?.length || 0, l = s?.records?.length || 0;
|
|
7
7
|
return /* @__PURE__ */ i(t, {
|
|
@@ -31,7 +31,6 @@ var a = ({ store: a }) => {
|
|
|
31
31
|
})]
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
-
//#endregion
|
|
35
34
|
export { a as FastaPageHeaderCenterComponent };
|
|
36
35
|
|
|
37
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,7 +4,7 @@ import { Button as n } from "@mui/material";
|
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
import { useCallback as i } from "react";
|
|
6
6
|
import a from "@mui/icons-material/FileUploadOutlined";
|
|
7
|
-
|
|
7
|
+
// src/components/fasta/FastaPageHeaderImportButton/FastaPageHeaderImportButton.tsx
|
|
8
8
|
var o = () => {
|
|
9
9
|
let o = i(() => t.resolve(e).emit("onShowImportDialog"), []);
|
|
10
10
|
return /* @__PURE__ */ r(n, {
|
|
@@ -21,7 +21,6 @@ var o = () => {
|
|
|
21
21
|
children: "Import Data"
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { o as FastaPageHeaderImportButton };
|
|
26
25
|
|
|
27
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,7 +4,7 @@ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
|
4
4
|
import { useCallback as o, useRef as s } from "react";
|
|
5
5
|
import c from "@mui/icons-material/RestartAlt";
|
|
6
6
|
import { Confirmation as l } from "@gen-epix/ui-core-components/components/Confirmation";
|
|
7
|
-
|
|
7
|
+
// src/components/fasta/FastaPageHeaderResetButton/FastaPageHeaderResetButton.tsx
|
|
8
8
|
var u = ({ onReset: u }) => {
|
|
9
9
|
let d = s(null), f = o(() => {
|
|
10
10
|
d.current?.open();
|
|
@@ -29,7 +29,6 @@ var u = ({ onReset: u }) => {
|
|
|
29
29
|
title: n`Reset current session and dataset?`
|
|
30
30
|
})] });
|
|
31
31
|
};
|
|
32
|
-
//#endregion
|
|
33
32
|
export { u as FastaPageHeaderResetButton };
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export type ButtonWithMenuProps = {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
items: Array<{
|
|
5
|
+
icon: ReactElement;
|
|
6
|
+
label: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
}>;
|
|
9
|
+
label: string;
|
|
10
|
+
startIcon?: ReactElement;
|
|
11
|
+
};
|
|
12
|
+
export declare const ButtonWithMenu: ({ disabled, items, label, startIcon }: ButtonWithMenuProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ButtonWithMenu';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Button as e, ListItemIcon as t, ListItemText as n, Menu as r, MenuItem as i } from "@mui/material";
|
|
2
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback as c, useState as l } from "react";
|
|
4
|
+
// src/components/ui/ButtonWithMenu/ButtonWithMenu.tsx
|
|
5
|
+
var u = ({ disabled: u, items: d, label: f, startIcon: p }) => {
|
|
6
|
+
let [m, h] = l(null), g = !!m, _ = c((e) => {
|
|
7
|
+
h(e.currentTarget);
|
|
8
|
+
}, []), v = c(() => {
|
|
9
|
+
h(null);
|
|
10
|
+
}, []);
|
|
11
|
+
return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(e, {
|
|
12
|
+
color: "inherit",
|
|
13
|
+
disabled: u,
|
|
14
|
+
onClick: _,
|
|
15
|
+
size: "small",
|
|
16
|
+
startIcon: p,
|
|
17
|
+
sx: {
|
|
18
|
+
"&:hover": { backgroundColor: "rgba(255, 255, 255, 0.25)" },
|
|
19
|
+
backgroundColor: "rgba(255, 255, 255, 0.15)",
|
|
20
|
+
color: "#FFFFFF"
|
|
21
|
+
},
|
|
22
|
+
variant: "contained",
|
|
23
|
+
children: f
|
|
24
|
+
}), /* @__PURE__ */ o(r, {
|
|
25
|
+
anchorEl: m,
|
|
26
|
+
anchorOrigin: {
|
|
27
|
+
horizontal: "right",
|
|
28
|
+
vertical: "bottom"
|
|
29
|
+
},
|
|
30
|
+
onClose: v,
|
|
31
|
+
open: g,
|
|
32
|
+
transformOrigin: {
|
|
33
|
+
horizontal: "right",
|
|
34
|
+
vertical: "top"
|
|
35
|
+
},
|
|
36
|
+
children: d.map(({ icon: e, label: r, onClick: a }) => /* @__PURE__ */ s(i, {
|
|
37
|
+
onClick: () => {
|
|
38
|
+
v(), a();
|
|
39
|
+
},
|
|
40
|
+
children: [/* @__PURE__ */ o(t, { children: e }), /* @__PURE__ */ o(n, { primary: r })]
|
|
41
|
+
}, r))
|
|
42
|
+
})] });
|
|
43
|
+
};
|
|
44
|
+
export { u as ButtonWithMenu };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Fragment","ButtonWithMenu","anchorElement","setAnchorElement","useState","isMenuOpen","onClickMenu","useCallback","event","onCloseMenu","Fragment","Button","label","Menu","items","itemLabel","MenuItem","onClick","ListItemIcon","icon","ListItemText"],"sources":["../../../../src/components/ui/ButtonWithMenu/ButtonWithMenu.tsx"],"sourcesContent":["import {\n Button,\n ListItemIcon,\n ListItemText,\n Menu,\n MenuItem,\n} from '@mui/material';\nimport {\n useCallback,\n useState,\n} from 'react';\nimport type {\n MouseEvent,\n ReactElement,\n} from 'react';\n\nexport type ButtonWithMenuProps = {\n disabled?: boolean;\n items: Array<{\n icon: ReactElement;\n label: string;\n onClick: () => void;\n }>;\n label: string;\n startIcon?: ReactElement;\n};\n\nexport const ButtonWithMenu = ({ disabled, items, label, startIcon }: ButtonWithMenuProps) => {\n const [anchorElement, setAnchorElement] = useState<HTMLElement | null>(null);\n const isMenuOpen = Boolean(anchorElement);\n\n const onClickMenu = useCallback((event: MouseEvent<HTMLButtonElement>) => {\n setAnchorElement(event.currentTarget);\n }, []);\n\n const onCloseMenu = useCallback(() => {\n setAnchorElement(null);\n }, []);\n\n return (\n <>\n <Button\n color={'inherit'}\n disabled={disabled}\n onClick={onClickMenu}\n size={'small'}\n startIcon={startIcon}\n sx={{\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.25)',\n },\n backgroundColor: 'rgba(255, 255, 255, 0.15)',\n color: '#FFFFFF',\n }}\n variant={'contained'}\n >\n {label}\n </Button>\n <Menu\n anchorEl={anchorElement}\n anchorOrigin={{ horizontal: 'right', vertical: 'bottom' }}\n onClose={onCloseMenu}\n open={isMenuOpen}\n transformOrigin={{ horizontal: 'right', vertical: 'top' }}\n >\n {items.map(({ icon, label: itemLabel, onClick }) => (\n <MenuItem\n key={itemLabel}\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={() => {\n onCloseMenu();\n onClick();\n }}\n >\n <ListItemIcon>\n {icon}\n </ListItemIcon>\n <ListItemText primary={itemLabel} />\n </MenuItem>\n ))}\n </Menu>\n </>\n );\n};\n"],"mappings":";;;;AA2BA,IAAaC,KAAkB,EAAE,aAAU,UAAO,UAAO,mBAAqC;CAC5F,IAAM,CAACC,GAAeC,KAAoBC,EAA6B,IAAI,GACrEC,IAAa,EAAQH,GAErBI,IAAcC,GAAa,MAAyC;EACxE,EAAiBC,EAAM,aAAa;CACtC,GAAG,CAAC,CAAC,GAECC,IAAcF,QAAkB;EACpC,EAAiB,IAAI;CACvB,GAAG,CAAC,CAAC;CAEL,OACE,kBAAAP,GAAA,EAAA,UAAA,CACE,kBAACW,GAAD;EACE,OAAO;EACG;EACV,SAASL;EACT,MAAM;EACK;EACX,IAAI;GACF,WAAW,EACT,iBAAiB,4BACnB;GACA,iBAAiB;GACjB,OAAO;EACT;EACA,SAAS;EAER,UAAAM;CACK,CAAA,GACR,kBAACC,GAAD;EACE,UAAUX;EACV,cAAc;GAAE,YAAY;GAAS,UAAU;EAAS;EACxD,SAASO;EACT,MAAMJ;EACN,iBAAiB;GAAE,YAAY;GAAS,UAAU;EAAM;EAEvD,UAAAS,EAAM,KAAK,EAAE,SAAM,OAAOC,GAAW,iBACpC,kBAACC,GAAD;GAGE,eAAe;IAEb,AADAP,EAAY,GACZQ,EAAQ;GACV;GANF,UAAA,CAQE,kBAACC,GAAD,EAAA,UACGC,EACW,CAAA,GACd,kBAACC,GAAD,EAAc,SAASL,EAAY,CAAA,CAC3B;EAXH,GAAAA,CAWG,CACX;CACG,CAAA,CACN,EAAA,CAAA;AAEN"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Box as e, Typography as t } from "@mui/material";
|
|
2
2
|
import { t as n } from "i18next";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/ui/GenericErrorMessage/GenericErrorMessage.tsx
|
|
5
5
|
var a = ({ error: a }) => /* @__PURE__ */ i(e, {
|
|
6
6
|
sx: {
|
|
7
7
|
alignItems: "center",
|
|
@@ -38,7 +38,6 @@ var a = ({ error: a }) => /* @__PURE__ */ i(e, {
|
|
|
38
38
|
})
|
|
39
39
|
]
|
|
40
40
|
});
|
|
41
|
-
//#endregion
|
|
42
41
|
export { a as GenericErrorMessage };
|
|
43
42
|
|
|
44
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,7 +2,7 @@ import { initReactI18next as e } from "react-i18next";
|
|
|
2
2
|
import t from "i18next";
|
|
3
3
|
import { Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
4
4
|
import { useEffect as i, useState as a } from "react";
|
|
5
|
-
|
|
5
|
+
// src/components/ui/I18nWrapper/I18nWrapper.tsx
|
|
6
6
|
var o = ({ children: o }) => {
|
|
7
7
|
let [s, c] = a(!1);
|
|
8
8
|
return i(() => {
|
|
@@ -15,7 +15,6 @@ var o = ({ children: o }) => {
|
|
|
15
15
|
})();
|
|
16
16
|
}, []), /* @__PURE__ */ r(n, { children: s ? o : null });
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
export { o as I18nWrapper };
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,27 +5,28 @@ import { useUpdateDocumentTitle as n } from "../../../hooks/useUpdateDocumentTit
|
|
|
5
5
|
import { Box as r, useTheme as i } from "@mui/material";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
import { use as s, useEffect as c } from "react";
|
|
8
|
-
|
|
8
|
+
// src/components/ui/PageCommon/PageCommon.tsx
|
|
9
9
|
var l = ({ children: l, isNoInteraction: u, title: d }) => {
|
|
10
10
|
let { drawerComponent: f, headerComponent: p } = t();
|
|
11
11
|
n(d);
|
|
12
|
-
let m = i(), {
|
|
12
|
+
let m = i(), { drawerContainerId: h, isDrawerOpen: g, setIsNoInteraction: _ } = s(e);
|
|
13
13
|
return c(() => {
|
|
14
|
-
|
|
15
|
-
}, [u,
|
|
14
|
+
_(!!u);
|
|
15
|
+
}, [u, _]), /* @__PURE__ */ o(r, {
|
|
16
16
|
sx: {
|
|
17
|
-
display: "
|
|
18
|
-
|
|
17
|
+
display: "grid",
|
|
18
|
+
gridTemplateRows: "max-content auto",
|
|
19
19
|
height: "100vh",
|
|
20
20
|
overflow: "hidden",
|
|
21
21
|
position: "relative",
|
|
22
22
|
width: "100vw"
|
|
23
23
|
},
|
|
24
24
|
children: [p && /* @__PURE__ */ a(p, {}), /* @__PURE__ */ o(r, {
|
|
25
|
+
id: h,
|
|
25
26
|
sx: {
|
|
26
27
|
display: "flex",
|
|
27
28
|
flex: 1,
|
|
28
|
-
height: "
|
|
29
|
+
height: "100%",
|
|
29
30
|
overflow: "hidden",
|
|
30
31
|
position: "relative",
|
|
31
32
|
width: "100%"
|
|
@@ -41,14 +42,13 @@ var l = ({ children: l, isNoInteraction: u, title: d }) => {
|
|
|
41
42
|
duration: m.transitions.duration.leavingScreen,
|
|
42
43
|
easing: m.transitions.easing.sharp
|
|
43
44
|
}),
|
|
44
|
-
width:
|
|
45
|
+
width: g ? "calc(100% - 340px)" : "100%"
|
|
45
46
|
},
|
|
46
47
|
children: l
|
|
47
48
|
})]
|
|
48
49
|
})]
|
|
49
50
|
});
|
|
50
51
|
};
|
|
51
|
-
//#endregion
|
|
52
52
|
export { l as PageCommon };
|
|
53
53
|
|
|
54
54
|
//# sourceMappingURL=index.js.map
|