@rivm-loculus-tools/common-frontend 0.5.0 → 0.7.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 +8 -7
- package/dist/_chunks/EmotionCacheService.js.map +1 -1
- package/dist/components/app/App/App.d.ts +2 -5
- package/dist/components/app/App/index.js +31 -28
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/constants/config.constants.d.ts +0 -6
- package/dist/constants/config.constants.js +2 -2
- package/dist/constants/config.constants.js.map +1 -1
- package/dist/models/config.models.d.ts +1 -5
- package/dist/theme/demoTheme/demoTheme.d.ts +3 -0
- package/dist/theme/demoTheme/index.d.ts +1 -0
- package/dist/theme/{index.js → demoTheme/index.js} +30 -30
- package/dist/theme/demoTheme/index.js.map +1 -0
- package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +1 -1
- package/dist/utils/DependencyContainerUtil/index.js +8 -11
- package/dist/utils/DependencyContainerUtil/index.js.map +1 -1
- package/dist/utils/StandardConfigUtil/StandardConfigUtil.d.ts +1 -1
- package/dist/utils/StandardConfigUtil/index.js +1 -5
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/dist/utils/UrlUtil/index.js +4 -4
- package/dist/utils/UrlUtil/index.js.map +1 -1
- package/package.json +8 -8
- package/dist/theme/index.d.ts +0 -1
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/theme.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DependencyContainer } from 'tsyringe';
|
|
2
2
|
import { ConfigBase } from '../../models/config.models';
|
|
3
3
|
export declare class DependencyContainerUtil {
|
|
4
|
-
static
|
|
4
|
+
static registerConfig<TConfig extends ConfigBase>(config: TConfig): void;
|
|
5
5
|
static resolveConfig<TConfig extends ConfigBase = ConfigBase>(dependencyContainer?: DependencyContainer): TConfig;
|
|
6
6
|
}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { CONFIG_TOKEN as e
|
|
2
|
-
import { container as
|
|
3
|
-
import { WindowService as a } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
4
|
-
import { DevicePixelRatioService as o } from "@gen-epix/ui-core/classes/services/DevicePixelRatioService";
|
|
5
|
-
import { KeyboardShortcutService as s } from "@gen-epix/ui-core/classes/services/KeyboardShortcutService";
|
|
1
|
+
import { CONFIG_TOKEN as e } from "../../constants/config.constants.js";
|
|
2
|
+
import { container as t } from "tsyringe";
|
|
6
3
|
// src/utils/DependencyContainerUtil/DependencyContainerUtil.ts
|
|
7
|
-
var
|
|
8
|
-
static
|
|
9
|
-
|
|
4
|
+
var n = class {
|
|
5
|
+
static registerConfig(n) {
|
|
6
|
+
t.register(e, { useValue: n });
|
|
10
7
|
}
|
|
11
|
-
static resolveConfig(
|
|
12
|
-
return
|
|
8
|
+
static resolveConfig(n = t) {
|
|
9
|
+
return n.resolve(e);
|
|
13
10
|
}
|
|
14
11
|
};
|
|
15
|
-
export {
|
|
12
|
+
export { n as DependencyContainerUtil };
|
|
16
13
|
|
|
17
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DependencyContainerUtil","
|
|
1
|
+
{"version":3,"file":"index.js","names":["DependencyContainerUtil","CONFIG_TOKEN","config","container","dependencyContainer"],"sources":["../../../src/utils/DependencyContainerUtil/DependencyContainerUtil.ts"],"sourcesContent":["import { container } from 'tsyringe';\nimport type { DependencyContainer } from 'tsyringe';\n\nimport type { ConfigBase } from '../../models/config.models';\nimport { CONFIG_TOKEN } from '../../constants/config.constants';\n\nexport class DependencyContainerUtil {\n public static registerConfig<TConfig extends ConfigBase>(config: TConfig): void {\n container.register(CONFIG_TOKEN, { useValue: config });\n }\n\n public static resolveConfig<TConfig extends ConfigBase = ConfigBase>(dependencyContainer: DependencyContainer = container): TConfig {\n return dependencyContainer.resolve(CONFIG_TOKEN) as TConfig;\n }\n}\n"],"mappings":";;;AAMA,IAAaA,IAAb,MAAqC;CACnC,OAAc,eAA2C,GAAuB;EAC9E,EAAU,SAASC,GAAc,EAAE,UAAUC,EAAO,CAAC;CACvD;CAEA,OAAc,cAAuD,IAA2CC,GAAoB;EAClI,OAAOC,EAAoB,QAAQH,CAAY;CACjD;AACF"}
|
|
@@ -4,11 +4,7 @@ var t = class {
|
|
|
4
4
|
static createConfig() {
|
|
5
5
|
return {
|
|
6
6
|
nonce: e.getInstance().document.querySelector("meta[name=\"csp-nonce\"]")?.getAttribute("content") ?? void 0,
|
|
7
|
-
pageConfig: { appBarHeight: 48 }
|
|
8
|
-
spinner: {
|
|
9
|
-
DEFAULT_CIRCULAR_PROGRESS_SIZE: 40,
|
|
10
|
-
DEFAULT_TAKING_LONGER_TIMEOUT_MS: 5e3
|
|
11
|
-
}
|
|
7
|
+
pageConfig: { appBarHeight: 48 }
|
|
12
8
|
};
|
|
13
9
|
}
|
|
14
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["StandardConfigUtil","WindowService"],"sources":["../../../src/utils/StandardConfigUtil/StandardConfigUtil.ts"],"sourcesContent":["import { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport type { ConfigBase } from '../../models/config.models';\n\nexport class StandardConfigUtil {\n public static createConfig(): Pick<ConfigBase, 'nonce' | 'pageConfig'
|
|
1
|
+
{"version":3,"file":"index.js","names":["StandardConfigUtil","WindowService"],"sources":["../../../src/utils/StandardConfigUtil/StandardConfigUtil.ts"],"sourcesContent":["import { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport type { ConfigBase } from '../../models/config.models';\n\nexport class StandardConfigUtil {\n public static createConfig(): Pick<ConfigBase, 'nonce' | 'pageConfig'> {\n return {\n nonce: WindowService.getInstance().document.querySelector('meta[name=\"csp-nonce\"]')?.getAttribute('content') ?? undefined,\n pageConfig: {\n appBarHeight: 48,\n },\n };\n }\n}\n"],"mappings":";;AAIA,IAAaA,IAAb,MAAgC;CAC9B,OAAc,eAAyD;EACrE,OAAO;GACL,OAAOC,EAAc,YAAY,CAAC,CAAC,SAAS,cAAc,0BAAwB,CAAC,EAAE,aAAa,SAAS,KAAK,KAAA;GAChH,YAAY,EACV,cAAc,GAChB;EACF;CACF;AACF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { container as e } from "tsyringe";
|
|
2
|
+
import { WindowService as t } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
3
3
|
// src/utils/UrlUtil/UrlUtil.ts
|
|
4
4
|
var n = class {
|
|
5
5
|
static clearSearchParams() {
|
|
6
|
-
let n = new URL(
|
|
7
|
-
n.search = "",
|
|
6
|
+
let n = new URL(e.resolve(t).window.location.href);
|
|
7
|
+
n.search = "", e.resolve(t).window.history.replaceState(null, "", n.toString());
|
|
8
8
|
}
|
|
9
9
|
static fastaLabelFromUrl(e) {
|
|
10
10
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["UrlUtil","url","container","
|
|
1
|
+
{"version":3,"file":"index.js","names":["UrlUtil","url","container","WindowService","urlObject","segment"],"sources":["../../../src/utils/UrlUtil/UrlUtil.ts"],"sourcesContent":["import { container } from 'tsyringe';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\n\nexport class UrlUtil {\n public static clearSearchParams(): void {\n const url = new URL(container.resolve(WindowService).window.location.href);\n url.search = '';\n container.resolve(WindowService).window.history.replaceState(null, '', url.toString());\n }\n\n public static fastaLabelFromUrl(url: string): string {\n try {\n const urlObject = new URL(url);\n const segment = urlObject.pathname.split('/').filter(Boolean).pop();\n if (segment) {\n return decodeURIComponent(segment);\n }\n return `${urlObject.hostname}.fasta`;\n } catch {\n return 'remote-alignment.fasta';\n }\n }\n\n public static validateFastaUrl(url: string): string {\n let urlObject: URL;\n try {\n urlObject = new URL(url.trim());\n } catch {\n throw new Error('Enter a valid FASTA URL.');\n }\n if (urlObject.protocol !== 'http:' && urlObject.protocol !== 'https:') {\n throw new Error('FASTA URLs must use HTTP or HTTPS.');\n }\n return urlObject.href;\n }\n}\n"],"mappings":";;;AAIA,IAAaA,IAAb,MAAqB;CACnB,OAAc,oBAA0B;EACtC,IAAMC,IAAM,IAAI,IAAIC,EAAU,QAAQC,CAAa,CAAC,CAAC,OAAO,SAAS,IAAI;EAEzE,AADA,EAAI,SAAS,IACbD,EAAU,QAAQC,CAAa,CAAC,CAAC,OAAO,QAAQ,aAAa,MAAM,IAAIF,EAAI,SAAS,CAAC;CACvF;CAEA,OAAc,kBAAkB,GAAqB;EACnD,IAAI;GACF,IAAMG,IAAY,IAAI,IAAIH,CAAG,GACvBI,IAAUD,EAAU,SAAS,MAAM,GAAG,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,IAAI;GAIlE,OAHIC,IACK,mBAAmBA,CAAO,IAE5B,GAAGD,EAAU,SAAS;EAC/B,QAAQ;GACN,OAAO;EACT;CACF;CAEA,OAAc,iBAAiB,GAAqB;EAClD,IAAIA;EACJ,IAAI;GACF,IAAY,IAAI,IAAIH,EAAI,KAAK,CAAC;EAChC,QAAQ;GACN,MAAU,MAAM,0BAA0B;EAC5C;EACA,IAAIG,EAAU,aAAa,WAAWA,EAAU,aAAa,UAC3D,MAAU,MAAM,oCAAoC;EAEtD,OAAOA,EAAU;CACnB;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivm-loculus-tools/common-frontend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@emotion/react": "*",
|
|
13
13
|
"@emotion/styled": "*",
|
|
14
14
|
"@gen-epix/ui-core-components": "^4.6.0",
|
|
15
|
-
"@gen-epix/ui-core-form": "^4.5.
|
|
15
|
+
"@gen-epix/ui-core-form": "^4.5.1",
|
|
16
16
|
"@gen-epix/ui-core": "^3.10.0",
|
|
17
17
|
"@mui/icons-material": "*",
|
|
18
18
|
"@mui/material": "*",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"@emotion/cache": "11.14.0",
|
|
36
36
|
"@emotion/react": "11.14.0",
|
|
37
37
|
"@emotion/styled": "11.14.1",
|
|
38
|
-
"@gen-epix/eslint-config": "0.
|
|
38
|
+
"@gen-epix/eslint-config": "0.9.0",
|
|
39
39
|
"@gen-epix/ui-core-components": "4.6.0",
|
|
40
|
-
"@gen-epix/ui-core-form": "4.5.
|
|
40
|
+
"@gen-epix/ui-core-form": "4.5.1",
|
|
41
41
|
"@gen-epix/ui-core": "3.10.0",
|
|
42
42
|
"@mui/icons-material": "9.5.0",
|
|
43
43
|
"@mui/material": "9.5.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@mui/system": "9.5.0",
|
|
46
46
|
"@mui/utils": "9.5.0",
|
|
47
47
|
"@types/lodash": "4.17.27",
|
|
48
|
-
"@types/node": "26.6.
|
|
48
|
+
"@types/node": "26.6.6",
|
|
49
49
|
"@types/react-dom": "19.3.0",
|
|
50
50
|
"@types/react": "19.3.0",
|
|
51
51
|
"@vitejs/plugin-react": "6.1.2",
|
|
@@ -171,9 +171,9 @@
|
|
|
171
171
|
"types": "./dist/stores/fastaDataStore/index.d.ts",
|
|
172
172
|
"import": "./dist/stores/fastaDataStore/index.js"
|
|
173
173
|
},
|
|
174
|
-
"./theme": {
|
|
175
|
-
"types": "./dist/theme/index.d.ts",
|
|
176
|
-
"import": "./dist/theme/index.js"
|
|
174
|
+
"./theme/demoTheme": {
|
|
175
|
+
"types": "./dist/theme/demoTheme/index.d.ts",
|
|
176
|
+
"import": "./dist/theme/demoTheme/index.js"
|
|
177
177
|
},
|
|
178
178
|
"./utils/DependencyContainerUtil": {
|
|
179
179
|
"types": "./dist/utils/DependencyContainerUtil/index.d.ts",
|
package/dist/theme/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './theme';
|