@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,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 createContainer<TConfig extends ConfigBase>(config: TConfig): DependencyContainer;
4
+ static createContainer(): DependencyContainer;
5
5
  static resolveConfig<TConfig extends ConfigBase = ConfigBase>(dependencyContainer?: DependencyContainer): TConfig;
6
6
  }
@@ -3,16 +3,15 @@ import { container as i } from "tsyringe";
3
3
  import { WindowService as a } from "@gen-epix/ui-core/classes/services/WindowService";
4
4
  import { DevicePixelRatioService as o } from "@gen-epix/ui-core/classes/services/DevicePixelRatioService";
5
5
  import { KeyboardShortcutService as s } from "@gen-epix/ui-core/classes/services/KeyboardShortcutService";
6
- //#region src/utils/DependencyContainerUtil/DependencyContainerUtil.ts
6
+ // src/utils/DependencyContainerUtil/DependencyContainerUtil.ts
7
7
  var c = class {
8
- static createContainer(c) {
9
- return i.register(e, { useValue: c }), i.registerInstance(r, a.getInstance()), i.registerInstance(t, o.getInstance()), i.registerInstance(n, s.getInstance()), i;
8
+ static createContainer() {
9
+ return i.registerInstance(r, a.getInstance()), i.registerInstance(t, o.getInstance()), i.registerInstance(n, s.getInstance()), i;
10
10
  }
11
11
  static resolveConfig(t = i) {
12
12
  return t.resolve(e);
13
13
  }
14
14
  };
15
- //#endregion
16
15
  export { c as DependencyContainerUtil };
17
16
 
18
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DependencyContainerUtil","container","CONFIG_TOKEN","config","WINDOW_SERVICE_TOKEN","WindowService","DEVICE_PIXEL_RATIO_SERVICE_TOKEN","DevicePixelRatioService","KEYBOARD_SHORTCUT_SERVICE_TOKEN","KeyboardShortcutService","dependencyContainer"],"sources":["../../../src/utils/DependencyContainerUtil/DependencyContainerUtil.ts"],"sourcesContent":["import { container } from 'tsyringe';\nimport type { DependencyContainer } from 'tsyringe';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\nimport { DevicePixelRatioService } from '@gen-epix/ui-core/classes/services/DevicePixelRatioService';\nimport { KeyboardShortcutService } from '@gen-epix/ui-core/classes/services/KeyboardShortcutService';\n\nimport {\n CONFIG_TOKEN,\n DEVICE_PIXEL_RATIO_SERVICE_TOKEN,\n KEYBOARD_SHORTCUT_SERVICE_TOKEN,\n WINDOW_SERVICE_TOKEN,\n} from '../../constants/config.constants';\nimport type { ConfigBase } from '../../models/config.models';\n\nexport class DependencyContainerUtil {\n public static createContainer<TConfig extends ConfigBase>(config: TConfig): DependencyContainer {\n container.register(CONFIG_TOKEN, { useValue: config });\n container.registerInstance(WINDOW_SERVICE_TOKEN, WindowService.getInstance());\n container.registerInstance(DEVICE_PIXEL_RATIO_SERVICE_TOKEN, DevicePixelRatioService.getInstance());\n container.registerInstance(KEYBOARD_SHORTCUT_SERVICE_TOKEN, KeyboardShortcutService.getInstance());\n\n return container;\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":";;;;;;AAcA,IAAaA,IAAb,MAAqC;CACnC,OAAc,gBAA4C,GAAsC;EAM9F,OALAC,EAAU,SAASC,GAAc,EAAE,UAAUC,EAAO,CAAC,GACrDF,EAAU,iBAAiBG,GAAsBC,EAAc,YAAY,CAAC,GAC5EJ,EAAU,iBAAiBK,GAAkCC,EAAwB,YAAY,CAAC,GAClGN,EAAU,iBAAiBO,GAAiCC,EAAwB,YAAY,CAAC,GAE1FR;CACT;CAEA,OAAc,cAAuD,IAA2CA,GAAoB;EAClI,OAAOS,EAAoB,QAAQR,CAAY;CACjD;AACF"}
1
+ {"version":3,"file":"index.js","names":["DependencyContainerUtil","container","WINDOW_SERVICE_TOKEN","WindowService","DEVICE_PIXEL_RATIO_SERVICE_TOKEN","DevicePixelRatioService","KEYBOARD_SHORTCUT_SERVICE_TOKEN","KeyboardShortcutService","dependencyContainer","CONFIG_TOKEN"],"sources":["../../../src/utils/DependencyContainerUtil/DependencyContainerUtil.ts"],"sourcesContent":["import { container } from 'tsyringe';\nimport type { DependencyContainer } from 'tsyringe';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\nimport { DevicePixelRatioService } from '@gen-epix/ui-core/classes/services/DevicePixelRatioService';\nimport { KeyboardShortcutService } from '@gen-epix/ui-core/classes/services/KeyboardShortcutService';\n\nimport {\n CONFIG_TOKEN,\n DEVICE_PIXEL_RATIO_SERVICE_TOKEN,\n KEYBOARD_SHORTCUT_SERVICE_TOKEN,\n WINDOW_SERVICE_TOKEN,\n} from '../../constants/config.constants';\nimport type { ConfigBase } from '../../models/config.models';\n\nexport class DependencyContainerUtil {\n public static createContainer(): DependencyContainer {\n container.registerInstance(WINDOW_SERVICE_TOKEN, WindowService.getInstance());\n container.registerInstance(DEVICE_PIXEL_RATIO_SERVICE_TOKEN, DevicePixelRatioService.getInstance());\n container.registerInstance(KEYBOARD_SHORTCUT_SERVICE_TOKEN, KeyboardShortcutService.getInstance());\n\n return container;\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":";;;;;;AAcA,IAAaA,IAAb,MAAqC;CACnC,OAAc,kBAAuC;EAKnD,OAJAC,EAAU,iBAAiBC,GAAsBC,EAAc,YAAY,CAAC,GAC5EF,EAAU,iBAAiBG,GAAkCC,EAAwB,YAAY,CAAC,GAClGJ,EAAU,iBAAiBK,GAAiCC,EAAwB,YAAY,CAAC,GAE1FN;CACT;CAEA,OAAc,cAAuD,IAA2CA,GAAoB;EAClI,OAAOO,EAAoB,QAAQC,CAAY;CACjD;AACF"}
@@ -1,10 +1,9 @@
1
- //#region src/utils/DownloadUtil/DownloadUtil.ts
1
+ // src/utils/DownloadUtil/DownloadUtil.ts
2
2
  var e = class {
3
3
  static datasetFilename(e) {
4
4
  return `${e.trim().replace(/\.[^.]+$/, "").replace(/[^a-zA-Z0-9._-]+/g, "_").replace(/^\.+|\.+$/g, "").slice(0, 80) || "alignment"}.fasta`;
5
5
  }
6
6
  };
7
- //#endregion
8
7
  export { e as DownloadUtil };
9
8
 
10
9
  //# sourceMappingURL=index.js.map
@@ -1,10 +1,9 @@
1
- //#region src/utils/ErrorUtil/ErrorUtil.ts
1
+ // src/utils/ErrorUtil/ErrorUtil.ts
2
2
  var e = class {
3
3
  static getErrorMessage(e, t) {
4
4
  return e instanceof Error ? e.message : t;
5
5
  }
6
6
  };
7
- //#endregion
8
7
  export { e as ErrorUtil };
9
8
 
10
9
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ export declare class ExportUtil {
2
+ static downloadCanvasAsImage(canvas: HTMLCanvasElement | null, format: 'jpeg' | 'png', filename?: string): void;
3
+ static downloadCanvasAsSvg(canvas: HTMLCanvasElement | null, filename?: string): void;
4
+ static downloadFastaFile(fasta: string, filename?: string): void;
5
+ static downloadNewickFile(newick: string, filename?: string): void;
6
+ }
@@ -0,0 +1 @@
1
+ export * from './ExportUtil';
@@ -0,0 +1,41 @@
1
+ import { DownloadUtil as e } from "@gen-epix/ui-core/utils/DownloadUtil";
2
+ // src/utils/ExportUtil/ExportUtil.ts
3
+ var t = class {
4
+ static downloadCanvasAsImage(t, n, r = "phylogenetic_tree") {
5
+ if (!t) {
6
+ console.error("No canvas available for export.");
7
+ return;
8
+ }
9
+ let i = n === "jpeg" ? "image/jpeg" : "image/png", a = n === "jpeg" ? "jpg" : "png", o = t;
10
+ if (n === "jpeg") {
11
+ o = document.createElement("canvas"), o.width = t.width, o.height = t.height;
12
+ let e = o.getContext("2d");
13
+ e && (e.fillStyle = "#FFFFFF", e.fillRect(0, 0, o.width, o.height), e.drawImage(t, 0, 0));
14
+ }
15
+ let s = o.toDataURL(i, .95);
16
+ e.createDownloadUrl(s, `${r}.${a}`);
17
+ }
18
+ static downloadCanvasAsSvg(t, n = "phylogenetic_tree.svg") {
19
+ if (!t) {
20
+ console.error("No canvas available for export.");
21
+ return;
22
+ }
23
+ let r = t.toDataURL("image/png"), i = t.width, a = t.height, o = `<?xml version="1.0" standalone="no"?>
24
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
25
+ <svg width="${i}" height="${a}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
26
+ <image xlink:href="${r}" x="0" y="0" height="${a}" width="${i}" />
27
+ </svg>`, s = new Blob([o], { type: "image/svg+xml;charset=utf-8" }), c = URL.createObjectURL(s);
28
+ e.createDownloadUrl(c, n), URL.revokeObjectURL(c);
29
+ }
30
+ static downloadFastaFile(t, n = "sequence.fasta") {
31
+ let r = new Blob([t], { type: "text/plain;charset=utf-8" }), i = URL.createObjectURL(r);
32
+ e.createDownloadUrl(i, n), URL.revokeObjectURL(i);
33
+ }
34
+ static downloadNewickFile(t, n = "phylogenetic_tree.nwk") {
35
+ let r = new Blob([t], { type: "text/plain;charset=utf-8" }), i = URL.createObjectURL(r);
36
+ e.createDownloadUrl(i, n), URL.revokeObjectURL(i);
37
+ }
38
+ };
39
+ export { t as ExportUtil };
40
+
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["ExportUtil","canvas","mimeType","format","extension","exportCanvas","ctx","dataUrl","filename","imgData","width","height","svgContent","blob","url","DownloadUtil","fasta","newick"],"sources":["../../../src/utils/ExportUtil/ExportUtil.ts"],"sourcesContent":["import { DownloadUtil } from '@gen-epix/ui-core/utils/DownloadUtil';\n\nexport class ExportUtil {\n public static downloadCanvasAsImage(\n canvas: HTMLCanvasElement | null,\n format: 'jpeg' | 'png',\n filename = 'phylogenetic_tree',\n ): void {\n if (!canvas) {\n console.error('No canvas available for export.');\n return;\n }\n\n const mimeType = format === 'jpeg' ? 'image/jpeg' : 'image/png';\n const extension = format === 'jpeg' ? 'jpg' : 'png';\n\n let exportCanvas = canvas;\n if (format === 'jpeg') {\n exportCanvas = document.createElement('canvas');\n exportCanvas.width = canvas.width;\n exportCanvas.height = canvas.height;\n const ctx = exportCanvas.getContext('2d');\n if (ctx) {\n ctx.fillStyle = '#FFFFFF';\n ctx.fillRect(0, 0, exportCanvas.width, exportCanvas.height);\n ctx.drawImage(canvas, 0, 0);\n }\n }\n\n const dataUrl = exportCanvas.toDataURL(mimeType, 0.95);\n DownloadUtil.createDownloadUrl(dataUrl, `${filename}.${extension}`);\n }\n\n public static downloadCanvasAsSvg(\n canvas: HTMLCanvasElement | null,\n filename = 'phylogenetic_tree.svg',\n ): void {\n if (!canvas) {\n console.error('No canvas available for export.');\n return;\n }\n\n const imgData = canvas.toDataURL('image/png');\n const width = canvas.width;\n const height = canvas.height;\n\n const svgContent = `<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg width=\"${width}\" height=\"${height}\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <image xlink:href=\"${imgData}\" x=\"0\" y=\"0\" height=\"${height}\" width=\"${width}\" />\n</svg>`;\n\n const blob = new Blob([svgContent], { type: 'image/svg+xml;charset=utf-8' });\n const url = URL.createObjectURL(blob);\n DownloadUtil.createDownloadUrl(url, filename);\n URL.revokeObjectURL(url);\n }\n\n public static downloadFastaFile(fasta: string, filename = 'sequence.fasta'): void {\n const blob = new Blob([fasta], { type: 'text/plain;charset=utf-8' });\n const url = URL.createObjectURL(blob);\n DownloadUtil.createDownloadUrl(url, filename);\n URL.revokeObjectURL(url);\n }\n\n public static downloadNewickFile(newick: string, filename = 'phylogenetic_tree.nwk'): void {\n const blob = new Blob([newick], { type: 'text/plain;charset=utf-8' });\n const url = URL.createObjectURL(blob);\n DownloadUtil.createDownloadUrl(url, filename);\n URL.revokeObjectURL(url);\n }\n}\n"],"mappings":";;AAEA,IAAaA,IAAb,MAAwB;CACtB,OAAc,sBACZ,GACA,GACA,IAAW,qBACL;EACN,IAAI,CAACC,GAAQ;GACX,QAAQ,MAAM,iCAAiC;GAC/C;EACF;EAEA,IAAMC,IAAWC,MAAW,SAAS,eAAe,aAC9CC,IAAYD,MAAW,SAAS,QAAQ,OAE1CE,IAAeJ;EACnB,IAAIE,MAAW,QAAQ;GAGrB,AAFA,IAAe,SAAS,cAAc,QAAQ,GAC9C,EAAa,QAAQF,EAAO,OAC5B,EAAa,SAASA,EAAO;GAC7B,IAAMK,IAAMD,EAAa,WAAW,IAAI;GACxC,AAAIC,MACF,EAAI,YAAY,WAChBA,EAAI,SAAS,GAAG,GAAGD,EAAa,OAAOA,EAAa,MAAM,GAC1DC,EAAI,UAAUL,GAAQ,GAAG,CAAC;EAE9B;EAEA,IAAMM,IAAUF,EAAa,UAAUH,GAAU,GAAI;EACrD,EAAa,kBAAkBK,GAAS,GAAGC,EAAS,GAAGJ,GAAW;CACpE;CAEA,OAAc,oBACZ,GACA,IAAW,yBACL;EACN,IAAI,CAACH,GAAQ;GACX,QAAQ,MAAM,iCAAiC;GAC/C;EACF;EAEA,IAAMQ,IAAUR,EAAO,UAAU,WAAW,GACtCS,IAAQT,EAAO,OACfU,IAASV,EAAO,QAEhBW,IAAa;;cAETF,EAAM,YAAYC,EAAO;uBAChBF,EAAQ,wBAAwBE,EAAO,WAAWD,EAAM;SAGrEG,IAAO,IAAI,KAAK,CAACD,CAAU,GAAG,EAAE,MAAM,8BAA8B,CAAC,GACrEE,IAAM,IAAI,gBAAgBD,CAAI;EAEpC,AADAE,EAAa,kBAAkBD,GAAKN,CAAQ,GAC5C,IAAI,gBAAgBM,CAAG;CACzB;CAEA,OAAc,kBAAkB,GAAe,IAAW,kBAAwB;EAChF,IAAMD,IAAO,IAAI,KAAK,CAACG,CAAK,GAAG,EAAE,MAAM,2BAA2B,CAAC,GAC7DF,IAAM,IAAI,gBAAgBD,CAAI;EAEpC,AADAE,EAAa,kBAAkBD,GAAKN,CAAQ,GAC5C,IAAI,gBAAgBM,CAAG;CACzB;CAEA,OAAc,mBAAmB,GAAgB,IAAW,yBAA+B;EACzF,IAAMD,IAAO,IAAI,KAAK,CAACI,CAAM,GAAG,EAAE,MAAM,2BAA2B,CAAC,GAC9DH,IAAM,IAAI,gBAAgBD,CAAI;EAEpC,AADAE,EAAa,kBAAkBD,GAAKN,CAAQ,GAC5C,IAAI,gBAAgBM,CAAG;CACzB;AACF"}
@@ -1,4 +1,4 @@
1
- //#region src/utils/FastaUtil/FastaUtil.ts
1
+ // src/utils/FastaUtil/FastaUtil.ts
2
2
  var e = class e {
3
3
  static parseFasta(t) {
4
4
  if (!t?.trim()) return e.createErrorResult("The FASTA input is empty.");
@@ -50,7 +50,6 @@ var e = class e {
50
50
  };
51
51
  }
52
52
  };
53
- //#endregion
54
53
  export { e as FastaUtil };
55
54
 
56
55
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- //#region src/utils/MetaDataUtil/MetaDataUtil.ts
1
+ // src/utils/MetaDataUtil/MetaDataUtil.ts
2
2
  var e = class e {
3
3
  static findBestMatchingColumn = (t, n, r) => {
4
4
  let i = e.getMatchCounts(t, n, r), a = null, o = -1;
@@ -127,7 +127,6 @@ var e = class e {
127
127
  };
128
128
  };
129
129
  };
130
- //#endregion
131
130
  export { e as MetaDataUtil };
132
131
 
133
132
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
1
  import { ConfigBase } from '../../models/config.models';
2
2
  export declare class StandardConfigUtil {
3
- static createConfig(): Pick<ConfigBase, 'nonce' | 'spinner'>;
3
+ static createConfig(): Pick<ConfigBase, 'nonce' | 'pageConfig' | 'spinner'>;
4
4
  }
@@ -1,9 +1,10 @@
1
1
  import { WindowService as e } from "@gen-epix/ui-core/classes/services/WindowService";
2
- //#region src/utils/StandardConfigUtil/StandardConfigUtil.ts
2
+ // src/utils/StandardConfigUtil/StandardConfigUtil.ts
3
3
  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 },
7
8
  spinner: {
8
9
  DEFAULT_CIRCULAR_PROGRESS_SIZE: 40,
9
10
  DEFAULT_TAKING_LONGER_TIMEOUT_MS: 5e3
@@ -11,7 +12,6 @@ var t = class {
11
12
  };
12
13
  }
13
14
  };
14
- //#endregion
15
15
  export { t as StandardConfigUtil };
16
16
 
17
17
  //# sourceMappingURL=index.js.map
@@ -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' | 'spinner'> {\n return {\n nonce: WindowService.getInstance().document.querySelector('meta[name=\"csp-nonce\"]')?.getAttribute('content') ?? undefined,\n spinner: {\n DEFAULT_CIRCULAR_PROGRESS_SIZE: 40,\n DEFAULT_TAKING_LONGER_TIMEOUT_MS: 5000,\n },\n };\n }\n}\n"],"mappings":";;AAIA,IAAaA,IAAb,MAAgC;CAC9B,OAAc,eAAsD;EAClE,OAAO;GACL,OAAOC,EAAc,YAAY,CAAC,CAAC,SAAS,cAAc,0BAAwB,CAAC,EAAE,aAAa,SAAS,KAAK,KAAA;GAChH,SAAS;IACP,gCAAgC;IAChC,kCAAkC;GACpC;EACF;CACF;AACF"}
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' | 'spinner'> {\n return {\n nonce: WindowService.getInstance().document.querySelector('meta[name=\"csp-nonce\"]')?.getAttribute('content') ?? undefined,\n pageConfig: {\n appBarHeight: 48,\n },\n spinner: {\n DEFAULT_CIRCULAR_PROGRESS_SIZE: 40,\n DEFAULT_TAKING_LONGER_TIMEOUT_MS: 5000,\n },\n };\n }\n}\n"],"mappings":";;AAIA,IAAaA,IAAb,MAAgC;CAC9B,OAAc,eAAqE;EACjF,OAAO;GACL,OAAOC,EAAc,YAAY,CAAC,CAAC,SAAS,cAAc,0BAAwB,CAAC,EAAE,aAAa,SAAS,KAAK,KAAA;GAChH,YAAY,EACV,cAAc,GAChB;GACA,SAAS;IACP,gCAAgC;IAChC,kCAAkC;GACpC;EACF;CACF;AACF"}
@@ -1,6 +1,6 @@
1
1
  import { WINDOW_SERVICE_TOKEN as e } from "../../constants/config.constants.js";
2
2
  import { container as t } from "tsyringe";
3
- //#region src/utils/UrlUtil/UrlUtil.ts
3
+ // src/utils/UrlUtil/UrlUtil.ts
4
4
  var n = class {
5
5
  static clearSearchParams() {
6
6
  let n = new URL(t.resolve(e).window.location.href);
@@ -25,7 +25,6 @@ var n = class {
25
25
  return t.href;
26
26
  }
27
27
  };
28
- //#endregion
29
28
  export { n as UrlUtil };
30
29
 
31
30
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivm-loculus-tools/common-frontend",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "license": "EUPL-1.2",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,9 +11,9 @@
11
11
  "@emotion/cache": "*",
12
12
  "@emotion/react": "*",
13
13
  "@emotion/styled": "*",
14
- "@gen-epix/ui-core-components": "^4.5.0",
15
- "@gen-epix/ui-core-form": "^4.4.1",
16
- "@gen-epix/ui-core": "^3.9.1",
14
+ "@gen-epix/ui-core-components": "^4.6.0",
15
+ "@gen-epix/ui-core-form": "^4.5.0",
16
+ "@gen-epix/ui-core": "^3.10.0",
17
17
  "@mui/icons-material": "*",
18
18
  "@mui/material": "*",
19
19
  "@mui/styled-engine": "*",
@@ -29,39 +29,39 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "lodash": "4.18.1",
32
- "zustand": "5.0.15"
32
+ "zustand": "5.0.16"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@emotion/cache": "11.14.0",
36
36
  "@emotion/react": "11.14.0",
37
37
  "@emotion/styled": "11.14.1",
38
38
  "@gen-epix/eslint-config": "0.8.0",
39
- "@gen-epix/ui-core-components": "4.5.0",
40
- "@gen-epix/ui-core-form": "4.4.1",
41
- "@gen-epix/ui-core": "3.9.1",
39
+ "@gen-epix/ui-core-components": "4.6.0",
40
+ "@gen-epix/ui-core-form": "4.5.0",
41
+ "@gen-epix/ui-core": "3.10.0",
42
42
  "@mui/icons-material": "9.5.0",
43
43
  "@mui/material": "9.5.0",
44
44
  "@mui/styled-engine": "9.5.0",
45
45
  "@mui/system": "9.5.0",
46
46
  "@mui/utils": "9.5.0",
47
- "@types/lodash": "4.17.26",
47
+ "@types/lodash": "4.17.27",
48
48
  "@types/node": "26.6.5",
49
49
  "@types/react-dom": "19.3.0",
50
50
  "@types/react": "19.3.0",
51
51
  "@vitejs/plugin-react": "6.1.2",
52
- "eslint": "10.12.0",
53
- "i18next": "26.4.4",
54
- "react-dom": "19.3.0",
52
+ "eslint": "10.13.0",
53
+ "i18next": "26.5.11",
54
+ "react-dom": "19.3.1",
55
55
  "react-error-boundary": "6.1.6",
56
- "react-hook-form": "7.90.0",
57
- "react-i18next": "17.0.16",
58
- "react": "19.3.0",
56
+ "react-hook-form": "7.91.0",
57
+ "react-i18next": "17.1.9",
58
+ "react": "19.3.1",
59
59
  "reflect-metadata": "0.2.2",
60
60
  "tsyringe": "4.10.0",
61
61
  "typescript": "6.0.3",
62
62
  "vite-plugin-dts": "5.1.2",
63
63
  "vite-plugin-static-copy": "4.1.1",
64
- "vite": "8.3.4"
64
+ "vite": "8.3.5"
65
65
  },
66
66
  "files": [
67
67
  "dist"
@@ -107,6 +107,10 @@
107
107
  "types": "./dist/components/fasta/FastaPageHeaderResetButton/index.d.ts",
108
108
  "import": "./dist/components/fasta/FastaPageHeaderResetButton/index.js"
109
109
  },
110
+ "./components/ui/ButtonWithMenu": {
111
+ "types": "./dist/components/ui/ButtonWithMenu/index.d.ts",
112
+ "import": "./dist/components/ui/ButtonWithMenu/index.js"
113
+ },
110
114
  "./components/ui/GenericErrorMessage": {
111
115
  "types": "./dist/components/ui/GenericErrorMessage/index.d.ts",
112
116
  "import": "./dist/components/ui/GenericErrorMessage/index.js"
@@ -127,10 +131,6 @@
127
131
  "types": "./dist/components/ui/PageCommonHeader/index.d.ts",
128
132
  "import": "./dist/components/ui/PageCommonHeader/index.js"
129
133
  },
130
- "./components/ui/PageHeaderDocumentationButton": {
131
- "types": "./dist/components/ui/PageHeaderDocumentationButton/index.d.ts",
132
- "import": "./dist/components/ui/PageHeaderDocumentationButton/index.js"
133
- },
134
134
  "./constants/config.constants": {
135
135
  "types": "./dist/constants/config.constants.d.ts",
136
136
  "import": "./dist/constants/config.constants.js"
@@ -139,10 +139,6 @@
139
139
  "types": "./dist/constants/page.constants.d.ts",
140
140
  "import": "./dist/constants/page.constants.js"
141
141
  },
142
- "./context/commonConfigContext": {
143
- "types": "./dist/context/commonConfigContext/index.d.ts",
144
- "import": "./dist/context/commonConfigContext/index.js"
145
- },
146
142
  "./context/pageCommonContext": {
147
143
  "types": "./dist/context/pageCommonContext/index.d.ts",
148
144
  "import": "./dist/context/pageCommonContext/index.js"
@@ -191,6 +187,10 @@
191
187
  "types": "./dist/utils/ErrorUtil/index.d.ts",
192
188
  "import": "./dist/utils/ErrorUtil/index.js"
193
189
  },
190
+ "./utils/ExportUtil": {
191
+ "types": "./dist/utils/ExportUtil/index.d.ts",
192
+ "import": "./dist/utils/ExportUtil/index.js"
193
+ },
194
194
  "./utils/FastaUtil": {
195
195
  "types": "./dist/utils/FastaUtil/index.d.ts",
196
196
  "import": "./dist/utils/FastaUtil/index.js"
@@ -1 +0,0 @@
1
- export declare const PageHeaderDocumentationButton: () => import('react').JSX.Element;
@@ -1 +0,0 @@
1
- export * from './PageHeaderDocumentationButton';
@@ -1,24 +0,0 @@
1
- import { IconButton as e, Tooltip as t } from "@mui/material";
2
- import { jsx as n } from "react/jsx-runtime";
3
- import { useCallback as r } from "react";
4
- import i from "@mui/icons-material/HelpOutlineOutlined";
5
- //#region src/components/ui/PageHeaderDocumentationButton/PageHeaderDocumentationButton.tsx
6
- var a = () => {
7
- let a = r(() => {
8
- window.open("https://github.com/RIVM-bioinformatics/loculus-tools", "_blank");
9
- }, []);
10
- return /* @__PURE__ */ n(t, {
11
- title: "Documentation & Specifications",
12
- children: /* @__PURE__ */ n(e, {
13
- color: "inherit",
14
- onClick: a,
15
- size: "small",
16
- sx: { opacity: .85 },
17
- children: /* @__PURE__ */ n(i, { fontSize: "small" })
18
- })
19
- });
20
- };
21
- //#endregion
22
- export { a as PageHeaderDocumentationButton };
23
-
24
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["HelpOutlineIcon","PageHeaderDocumentationButton","onDocumentationButtonClick","useCallback","Tooltip","IconButton"],"sources":["../../../../src/components/ui/PageHeaderDocumentationButton/PageHeaderDocumentationButton.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport {\n IconButton,\n Tooltip,\n} from '@mui/material';\nimport HelpOutlineIcon from '@mui/icons-material/HelpOutlineOutlined';\n\nexport const PageHeaderDocumentationButton = () => {\n const onDocumentationButtonClick = useCallback(() => {\n window.open('https://github.com/RIVM-bioinformatics/loculus-tools', '_blank');\n }, []);\n\n return (\n <Tooltip title={'Documentation & Specifications'}>\n <IconButton\n color={'inherit'}\n onClick={onDocumentationButtonClick}\n size={'small'}\n sx={{ opacity: 0.85 }}\n >\n <HelpOutlineIcon fontSize={'small'} />\n </IconButton>\n </Tooltip>\n );\n};\n"],"mappings":";;;;;AAOA,IAAaC,UAAsC;CACjD,IAAMC,IAA6BC,QAAkB;EACnD,OAAO,KAAK,wDAAwD,QAAQ;CAC9E,GAAG,CAAC,CAAC;CAEL,OACE,kBAACC,GAAD;EAAS,OAAO;EACd,UAAA,kBAACC,GAAD;GACE,OAAO;GACP,SAASH;GACT,MAAM;GACN,IAAI,EAAE,SAAS,IAAK;GAEpB,UAAA,kBAACF,GAAD,EAAiB,UAAU,QAAU,CAAA;EAC3B,CAAA;CACL,CAAA;AAEb"}
@@ -1,9 +0,0 @@
1
- import { CoreComponentsConfig } from '@gen-epix/ui-core-components/context/CoreComponentsConfigContext';
2
- import { DependencyContainer } from 'tsyringe';
3
- import { ConfigBase } from '../../models/config.models';
4
- export type CommonConfig<TConfig extends ConfigBase = ConfigBase> = {
5
- config: TConfig;
6
- container: DependencyContainer;
7
- genEpixCoreComponentsConfig: CoreComponentsConfig;
8
- };
9
- export declare const CommonConfigContext: import('react').Context<CommonConfig<ConfigBase> | null>;
@@ -1,6 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
- import { DependencyContainer } from 'tsyringe';
3
- export type CommonConfigContextProviderProps = PropsWithChildren<{
4
- readonly container: DependencyContainer;
5
- }>;
6
- export declare const CommonConfigContextProvider: (props: CommonConfigContextProviderProps) => import('react').JSX.Element;
@@ -1,3 +0,0 @@
1
- export * from './CommonConfigContext';
2
- export * from './CommonConfigContextProvider';
3
- export * from './useCommonConfigContext';
@@ -1,34 +0,0 @@
1
- import { DependencyContainerUtil as e } from "../../utils/DependencyContainerUtil/index.js";
2
- import { jsx as t } from "react/jsx-runtime";
3
- import { createContext as n, use as r, useMemo as i } from "react";
4
- import { CoreComponentsConfigContext as a } from "@gen-epix/ui-core-components/context/CoreComponentsConfigContext";
5
- //#region src/context/commonConfigContext/CommonConfigContext.tsx
6
- var o = n(null), s = (n) => {
7
- let { children: r, container: s } = n, c = e.resolveConfig(s), l = i(() => ({ spinner: {
8
- defaultCircularProgressSize: c.spinner.DEFAULT_CIRCULAR_PROGRESS_SIZE,
9
- defaultTakingLongerTimeoutMs: c.spinner.DEFAULT_TAKING_LONGER_TIMEOUT_MS
10
- } }), [c.spinner]), u = i(() => ({
11
- config: c,
12
- container: s,
13
- genEpixCoreComponentsConfig: l
14
- }), [
15
- c,
16
- s,
17
- l
18
- ]);
19
- return /* @__PURE__ */ t(a, {
20
- value: l,
21
- children: /* @__PURE__ */ t(o, {
22
- value: u,
23
- children: r
24
- })
25
- });
26
- }, c = () => {
27
- let e = r(o);
28
- if (!e) throw Error("CommonConfigContext is not available");
29
- return e;
30
- };
31
- //#endregion
32
- export { o as CommonConfigContext, s as CommonConfigContextProvider, c as useCommonConfigContext };
33
-
34
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["CommonConfigContext","createContext","CommonConfigContextProvider","props","config","DependencyContainerUtil","container","genEpixCoreComponentsConfig","useMemo","CommonConfig","CoreComponentsConfigContext","useCommonConfigContext","use"],"sources":["../../../src/context/commonConfigContext/CommonConfigContext.tsx","../../../src/context/commonConfigContext/CommonConfigContextProvider.tsx","../../../src/context/commonConfigContext/useCommonConfigContext.tsx"],"sourcesContent":["import type { CoreComponentsConfig } from '@gen-epix/ui-core-components/context/CoreComponentsConfigContext';\nimport { createContext } from 'react';\nimport type { DependencyContainer } from 'tsyringe';\n\nimport type { ConfigBase } from '../../models/config.models';\n\nexport type CommonConfig<TConfig extends ConfigBase = ConfigBase> = {\n config: TConfig;\n container: DependencyContainer;\n genEpixCoreComponentsConfig: CoreComponentsConfig;\n};\n\nexport const CommonConfigContext = createContext<CommonConfig | null>(null);\n","import { useMemo } from 'react';\nimport type { PropsWithChildren } from 'react';\nimport { CoreComponentsConfigContext } from '@gen-epix/ui-core-components/context/CoreComponentsConfigContext';\nimport type { DependencyContainer } from 'tsyringe';\n\nimport { DependencyContainerUtil } from '../../utils/DependencyContainerUtil';\nimport type { ConfigBase } from '../../models/config.models';\n\nimport type { CommonConfig } from './CommonConfigContext';\nimport { CommonConfigContext } from './CommonConfigContext';\n\n\nexport type CommonConfigContextProviderProps = PropsWithChildren<{\n readonly container: DependencyContainer;\n}>;\n\nexport const CommonConfigContextProvider = (\n props: CommonConfigContextProviderProps,\n) => {\n const { children, container } = props;\n const config = DependencyContainerUtil.resolveConfig<ConfigBase>(container);\n const genEpixCoreComponentsConfig = useMemo<CommonConfig['genEpixCoreComponentsConfig']>(() => ({\n spinner: {\n defaultCircularProgressSize: config.spinner.DEFAULT_CIRCULAR_PROGRESS_SIZE!,\n defaultTakingLongerTimeoutMs: config.spinner.DEFAULT_TAKING_LONGER_TIMEOUT_MS,\n },\n }), [config.spinner]);\n const CommonConfig = useMemo(() => ({ config, container, genEpixCoreComponentsConfig }), [config, container, genEpixCoreComponentsConfig]);\n\n return (\n <CoreComponentsConfigContext value={genEpixCoreComponentsConfig}>\n <CommonConfigContext value={CommonConfig}>\n {children}\n </CommonConfigContext>\n </CoreComponentsConfigContext>\n );\n};\n","import { use } from 'react';\n\nimport type { ConfigBase } from '../../models/config.models';\n\nimport type { CommonConfig } from './CommonConfigContext';\nimport { CommonConfigContext } from './CommonConfigContext';\n\nexport const useCommonConfigContext = <TConfig extends ConfigBase = ConfigBase>(): CommonConfig<TConfig> => {\n const config = use(CommonConfigContext);\n if (!config) {\n throw new Error('CommonConfigContext is not available');\n }\n return config as CommonConfig<TConfig>;\n};\n"],"mappings":";;;;;AAYA,IAAaA,IAAsBC,EAAmC,IAAI,GCI7DC,KACX,MACG;CACH,IAAM,EAAE,aAAU,iBAAcC,GAC1BC,IAASC,EAAwB,cAA0BC,CAAS,GACpEC,IAA8BC,SAA4D,EAC9F,SAAS;EACP,6BAA6BJ,EAAO,QAAQ;EAC5C,8BAA8BA,EAAO,QAAQ;CAC/C,EACF,IAAI,CAACA,EAAO,OAAO,CAAC,GACdK,IAAeD,SAAe;EAAE;EAAQ;EAAW;CAA4B,IAAI;EAACJ;EAAQE;EAAWC;CAA2B,CAAC;CAEzI,OACE,kBAACG,GAAD;EAA6B,OAAOH;EAClC,UAAA,kBAACP,GAAD;GAAqB,OAAOS;GACzB;EACkB,CAAA;CACM,CAAA;AAEjC,GC7BaE,UAA+F;CAC1G,IAAMP,IAASQ,EAAIZ,CAAmB;CACtC,IAAI,CAACI,GACH,MAAU,MAAM,sCAAsC;CAExD,OAAOA;AACT"}
@@ -1,3 +0,0 @@
1
- import { ConfigBase } from '../../models/config.models';
2
- import { CommonConfig } from './CommonConfigContext';
3
- export declare const useCommonConfigContext: <TConfig extends ConfigBase = ConfigBase>() => CommonConfig<TConfig>;