@rivm-loculus-tools/common-frontend 0.9.0 → 0.10.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/LoculusService.js +1049 -0
- package/dist/_chunks/LoculusService.js.map +1 -0
- package/dist/_chunks/decorateParam.js +7 -0
- package/dist/_chunks/keycloak-dpop.js +241 -0
- package/dist/_chunks/keycloak-dpop.js.map +1 -0
- package/dist/classes/services/EmotionCacheService/index.js +27 -1
- package/dist/classes/services/EmotionCacheService/index.js.map +1 -0
- package/dist/classes/services/LoculusService/LoculusService.d.ts +26 -0
- package/dist/classes/services/LoculusService/index.d.ts +1 -0
- package/dist/classes/services/LoculusService/index.js +1 -0
- package/dist/classes/services/UrlService/UrlService.d.ts +18 -0
- package/dist/classes/services/UrlService/index.d.ts +1 -0
- package/dist/classes/services/UrlService/index.js +45 -0
- package/dist/classes/services/UrlService/index.js.map +1 -0
- package/dist/components/app/App/App.d.ts +4 -2
- package/dist/components/app/App/index.js +35 -34
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/authentication/AuthenticationLoader/AuthenticationLoader.d.ts +3 -0
- package/dist/components/authentication/AuthenticationLoader/index.d.ts +1 -0
- package/dist/components/authentication/AuthenticationLoader/index.js +31 -0
- package/dist/components/authentication/AuthenticationLoader/index.js.map +1 -0
- package/dist/components/fasta/FastaDataImportDialog/FastaDataImportDialog.d.ts +1 -0
- package/dist/components/fasta/FastaDataImportDialog/index.js +77 -77
- package/dist/components/fasta/FastaDataImportDialog/index.js.map +1 -1
- package/dist/components/fasta/FastaDataImportDialogLoader/FastaDataImportDialogLoader.d.ts +2 -1
- package/dist/components/fasta/FastaDataImportDialogLoader/index.js +61 -52
- package/dist/components/fasta/FastaDataImportDialogLoader/index.js.map +1 -1
- package/dist/components/fasta/FastaPageHeaderResetButton/index.js +27 -24
- package/dist/components/fasta/FastaPageHeaderResetButton/index.js.map +1 -1
- package/dist/components/loculus/UploadToLoculusModal/UploadToLoculusModal.d.ts +11 -0
- package/dist/components/loculus/UploadToLoculusModal/index.d.ts +1 -0
- package/dist/components/loculus/UploadToLoculusModal/index.js +159 -0
- package/dist/components/loculus/UploadToLoculusModal/index.js.map +1 -0
- package/dist/components/ui/ButtonWithMenu/ButtonWithMenu.d.ts +1 -0
- package/dist/components/ui/ButtonWithMenu/index.js +5 -4
- package/dist/components/ui/ButtonWithMenu/index.js.map +1 -1
- package/dist/components/ui/PageCommon/index.js +1 -1
- package/dist/components/ui/PageCommon/index.js.map +1 -1
- package/dist/components/ui/SearchBar/index.js +1 -0
- package/dist/components/ui/SearchBar/index.js.map +1 -1
- package/dist/models/url.models.d.ts +9 -0
- package/dist/models/url.models.js +0 -0
- package/dist/utils/MetaDataUtil/MetaDataUtil.d.ts +2 -1
- package/dist/utils/MetaDataUtil/index.js +5 -2
- package/dist/utils/MetaDataUtil/index.js.map +1 -1
- package/dist/utils/UrlUtil/UrlUtil.d.ts +1 -1
- package/dist/utils/UrlUtil/index.js +5 -6
- package/dist/utils/UrlUtil/index.js.map +1 -1
- package/package.json +23 -2
- package/dist/_chunks/EmotionCacheService.js +0 -32
- package/dist/_chunks/EmotionCacheService.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
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 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 getBaseURLWithPath(): string {\n const url = new URL(container.resolve(WindowService).window.location.href);\n return `${url.protocol}//${url.host}/${url.pathname.split('/').filter(Boolean).shift()}`;\n }\n\n public static
|
|
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 container.resolve(WindowService).window.dispatchEvent(new Event('loculus:urlparamschange'));\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 getBaseURLWithPath(): string {\n const url = new URL(container.resolve(WindowService).window.location.href);\n if (url.pathname) {\n return `${url.protocol}//${url.host}/${url.pathname.split('/').filter(Boolean).shift()}`;\n }\n return `${url.protocol}//${url.host}`;\n }\n\n\n public static isValidResourceUrl(url: string): boolean {\n let urlObject: URL;\n try {\n urlObject = new URL(url.trim());\n } catch {\n return false;\n }\n if (urlObject.protocol !== 'http:' && urlObject.protocol !== 'https:') {\n return false;\n }\n return true;\n }\n}\n"],"mappings":";;;AAIA,IAAaA,IAAb,MAAqB;CACnB,OAAc,oBAA0B;EACtC,IAAMC,IAAM,IAAI,IAAIC,EAAU,QAAQC,CAAa,CAAC,CAAC,OAAO,SAAS,IAAI;EAGzE,AAFA,EAAI,SAAS,IACbD,EAAU,QAAQC,CAAa,CAAC,CAAC,OAAO,QAAQ,aAAa,MAAM,IAAIF,EAAI,SAAS,CAAC,GACrFC,EAAU,QAAQC,CAAa,CAAC,CAAC,OAAO,cAAc,IAAI,MAAM,yBAAyB,CAAC;CAC5F;CAEA,OAAc,kBAAkB,GAAqB;EACnD,IAAI;GACF,IAAMC,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,qBAA6B;EACzC,IAAMH,IAAM,IAAI,IAAIC,EAAU,QAAQC,CAAa,CAAC,CAAC,OAAO,SAAS,IAAI;EAIzE,OAHIF,EAAI,WACC,GAAGA,EAAI,SAAS,IAAIA,EAAI,KAAK,GAAGA,EAAI,SAAS,MAAM,GAAG,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,MAEhF,GAAGA,EAAI,SAAS,IAAIA,EAAI;CACjC;CAGA,OAAc,mBAAmB,GAAsB;EACrD,IAAIG;EACJ,IAAI;GACF,IAAY,IAAI,IAAIH,EAAI,KAAK,CAAC;EAChC,QAAQ;GACN,OAAO;EACT;EAIA,OAHIG,EAAU,aAAa,WAAWA,EAAU,aAAa;CAI/D;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.10.0",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"lodash": "4.18.1",
|
|
32
|
-
"zustand": "5.0.16"
|
|
32
|
+
"zustand": "5.0.16",
|
|
33
|
+
"keycloak-js": "26.2.5"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@emotion/cache": "11.14.0",
|
|
@@ -79,10 +80,22 @@
|
|
|
79
80
|
"types": "./dist/classes/services/FastaDataEventBusService/index.d.ts",
|
|
80
81
|
"import": "./dist/classes/services/FastaDataEventBusService/index.js"
|
|
81
82
|
},
|
|
83
|
+
"./classes/services/LoculusService": {
|
|
84
|
+
"types": "./dist/classes/services/LoculusService/index.d.ts",
|
|
85
|
+
"import": "./dist/classes/services/LoculusService/index.js"
|
|
86
|
+
},
|
|
87
|
+
"./classes/services/UrlService": {
|
|
88
|
+
"types": "./dist/classes/services/UrlService/index.d.ts",
|
|
89
|
+
"import": "./dist/classes/services/UrlService/index.js"
|
|
90
|
+
},
|
|
82
91
|
"./components/app/App": {
|
|
83
92
|
"types": "./dist/components/app/App/index.d.ts",
|
|
84
93
|
"import": "./dist/components/app/App/index.js"
|
|
85
94
|
},
|
|
95
|
+
"./components/authentication/AuthenticationLoader": {
|
|
96
|
+
"types": "./dist/components/authentication/AuthenticationLoader/index.d.ts",
|
|
97
|
+
"import": "./dist/components/authentication/AuthenticationLoader/index.js"
|
|
98
|
+
},
|
|
86
99
|
"./components/fasta/FastaDataImportDialog": {
|
|
87
100
|
"types": "./dist/components/fasta/FastaDataImportDialog/index.d.ts",
|
|
88
101
|
"import": "./dist/components/fasta/FastaDataImportDialog/index.js"
|
|
@@ -107,6 +120,10 @@
|
|
|
107
120
|
"types": "./dist/components/fasta/FastaPageHeaderResetButton/index.d.ts",
|
|
108
121
|
"import": "./dist/components/fasta/FastaPageHeaderResetButton/index.js"
|
|
109
122
|
},
|
|
123
|
+
"./components/loculus/UploadToLoculusModal": {
|
|
124
|
+
"types": "./dist/components/loculus/UploadToLoculusModal/index.d.ts",
|
|
125
|
+
"import": "./dist/components/loculus/UploadToLoculusModal/index.js"
|
|
126
|
+
},
|
|
110
127
|
"./components/ui/ButtonWithMenu": {
|
|
111
128
|
"types": "./dist/components/ui/ButtonWithMenu/index.d.ts",
|
|
112
129
|
"import": "./dist/components/ui/ButtonWithMenu/index.js"
|
|
@@ -167,6 +184,10 @@
|
|
|
167
184
|
"types": "./dist/models/metadata.models.d.ts",
|
|
168
185
|
"import": "./dist/models/metadata.models.js"
|
|
169
186
|
},
|
|
187
|
+
"./models/url.models": {
|
|
188
|
+
"types": "./dist/models/url.models.d.ts",
|
|
189
|
+
"import": "./dist/models/url.models.js"
|
|
190
|
+
},
|
|
170
191
|
"./pages/ErrorPage": {
|
|
171
192
|
"types": "./dist/pages/ErrorPage/index.d.ts",
|
|
172
193
|
"import": "./dist/pages/ErrorPage/index.js"
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { CONFIG_TOKEN as e } from "../constants/config.constants.js";
|
|
2
|
-
import { t } from "./decorate.js";
|
|
3
|
-
import { inject as n, singleton as r } from "tsyringe";
|
|
4
|
-
import { WindowService as i } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
5
|
-
import a from "@emotion/cache";
|
|
6
|
-
// \0@oxc-project+runtime@0.155.0/helpers/esm/decorateParam.js
|
|
7
|
-
function o(e, t) {
|
|
8
|
-
return function(n, r) {
|
|
9
|
-
t(n, r, e);
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
// src/classes/services/EmotionCacheService/EmotionCacheService.ts
|
|
13
|
-
var s = class {
|
|
14
|
-
emotionCache;
|
|
15
|
-
constructor(e, t) {
|
|
16
|
-
this.emotionCache = a({
|
|
17
|
-
container: t.document.head,
|
|
18
|
-
key: "loculus-tools",
|
|
19
|
-
nonce: e.nonce,
|
|
20
|
-
prepend: !!e.nonce,
|
|
21
|
-
stylisPlugins: []
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
s = t([
|
|
26
|
-
r(),
|
|
27
|
-
o(0, n(e)),
|
|
28
|
-
o(1, n(i))
|
|
29
|
-
], s);
|
|
30
|
-
export { s as t };
|
|
31
|
-
|
|
32
|
-
//# sourceMappingURL=EmotionCacheService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmotionCacheService.js","names":["_decorate","_decorateParam","createCache","__decorateParam","target","key","paramIndex","EmotionCacheService","windowService","config","__decorate","singleton","inject","CONFIG_TOKEN","WindowService"],"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 { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport { CONFIG_TOKEN } 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(WindowService) 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":";;;;;;;;;;;;AAaO,IAAMO,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;;CAhBCE,EAAU;CAKNV,EAAA,GAAAW,EAAOC,CAAY,CAAA;CACnBZ,EAAA,GAAAW,EAAOE,CAAa,CAAA"}
|