@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.
@@ -1,6 +1,7 @@
1
- import { CONFIG_TOKEN as e, WINDOW_SERVICE_TOKEN as t } from "../constants/config.constants.js";
2
- import { t as n } from "./decorate.js";
3
- import { inject as r, singleton as i } from "tsyringe";
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";
4
5
  import a from "@emotion/cache";
5
6
  // \0@oxc-project+runtime@0.155.0/helpers/esm/decorateParam.js
6
7
  function o(e, t) {
@@ -21,10 +22,10 @@ var s = class {
21
22
  });
22
23
  }
23
24
  };
24
- s = n([
25
- i(),
26
- o(0, r(e)),
27
- o(1, r(t))
25
+ s = t([
26
+ r(),
27
+ o(0, n(e)),
28
+ o(1, n(i))
28
29
  ], s);
29
30
  export { s as t };
30
31
 
@@ -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":";;;;;;;;;;;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"}
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"}
@@ -1,6 +1,3 @@
1
- import { DependencyContainer } from 'tsyringe';
2
1
  import { PropsWithChildren } from 'react';
3
- export type AppProps = PropsWithChildren<{
4
- readonly container: DependencyContainer;
5
- }>;
6
- export declare const App: ({ children, container }: AppProps) => import('react').JSX.Element;
2
+ export type AppProps = PropsWithChildren;
3
+ export declare const App: ({ children }: AppProps) => import('react').JSX.Element;
@@ -3,14 +3,16 @@ import { PageCommonContextProvider as t } from "../../../context/pageCommonConte
3
3
  import { ErrorPage as n } from "../../../pages/ErrorPage/index.js";
4
4
  import { I18nWrapper as r } from "../../ui/I18nWrapper/index.js";
5
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";
6
+ import { container as a } from "tsyringe";
7
+ import { CssBaseline as o, ThemeProvider as s } from "@mui/material";
8
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
+ import { Component as u, createContext as d, createElement as f, useMemo as p } from "react";
10
+ import { CacheProvider as m } from "@emotion/react";
11
+ import { setupUiCore as h } from "@gen-epix/ui-core/setup/setup";
10
12
  // ../../../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(() => ({
13
+ var g = d(null);
14
+ function _({ children: e, didCatch: t, error: n, resetErrorBoundary: r }) {
15
+ let i = p(() => ({
14
16
  didCatch: t,
15
17
  error: n,
16
18
  resetErrorBoundary: r
@@ -19,14 +21,14 @@ function h({ children: e, didCatch: t, error: n, resetErrorBoundary: r }) {
19
21
  n,
20
22
  r
21
23
  ]);
22
- return d(m.Provider, { value: i }, e);
24
+ return f(g.Provider, { value: i }, e);
23
25
  }
24
- var g = {
26
+ var v = {
25
27
  didCatch: !1,
26
28
  error: null
27
- }, _ = class extends l {
29
+ }, y = class extends u {
28
30
  constructor(e) {
29
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = g;
31
+ super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = v;
30
32
  }
31
33
  static getDerivedStateFromError(e) {
32
34
  return {
@@ -39,18 +41,18 @@ var g = {
39
41
  t && (this.props.onReset?.({
40
42
  args: e,
41
43
  reason: "imperative-api"
42
- }), this.setState(g));
44
+ }), this.setState(v));
43
45
  }
44
46
  componentDidCatch(e, t) {
45
47
  this.props.onError?.(e, t);
46
48
  }
47
49
  componentDidUpdate(e, t) {
48
50
  let { didCatch: n } = this.state, { resetKeys: r } = this.props;
49
- n && t.didCatch && v(e.resetKeys, r) && (this.props.onReset?.({
51
+ n && t.didCatch && b(e.resetKeys, r) && (this.props.onReset?.({
50
52
  next: r,
51
53
  prev: e.resetKeys,
52
54
  reason: "keys"
53
- }), this.setState(g));
55
+ }), this.setState(v));
54
56
  }
55
57
  render() {
56
58
  let { children: e, fallbackRender: t, FallbackComponent: n, fallback: r } = this.props, { didCatch: i, error: a } = this.state, o = e;
@@ -60,39 +62,40 @@ var g = {
60
62
  resetErrorBoundary: this.resetErrorBoundary
61
63
  };
62
64
  if (typeof t == "function") o = t(e);
63
- else if (n) o = d(n, e);
65
+ else if (n) o = f(n, e);
64
66
  else if ("fallback" in this.props) o = r;
65
67
  else throw a;
66
68
  }
67
- return d(h, {
69
+ return f(_, {
68
70
  didCatch: i,
69
71
  error: a,
70
72
  resetErrorBoundary: this.resetErrorBoundary
71
73
  }, o);
72
74
  }
73
75
  };
74
- function v(e = [], t = []) {
76
+ function b(e = [], t = []) {
75
77
  return e.length !== t.length || e.some((e, n) => !Object.is(e, t[n]));
76
78
  }
77
79
  // 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, {
80
+ var x = ({ children: u }) => {
81
+ h();
82
+ let d = e.resolveConfig(), { pageConfig: f } = d, p = d.getTouchIconUrl?.();
83
+ p && document.querySelector("link[rel=\"icon\"]")?.setAttribute("href", p);
84
+ let g = a.resolve(i).emotionCache;
85
+ return /* @__PURE__ */ c(m, {
86
+ value: g,
87
+ children: /* @__PURE__ */ l(s, {
85
88
  theme: d.theme,
86
- children: [/* @__PURE__ */ s(a, {}), /* @__PURE__ */ s(_, {
89
+ children: [/* @__PURE__ */ c(o, {}), /* @__PURE__ */ c(y, {
87
90
  FallbackComponent: n,
88
- children: /* @__PURE__ */ s(r, { children: /* @__PURE__ */ s(t, {
91
+ children: /* @__PURE__ */ c(r, { children: /* @__PURE__ */ c(t, {
89
92
  ...f,
90
- children: l
93
+ children: u
91
94
  }) })
92
95
  })]
93
96
  })
94
97
  });
95
98
  };
96
- export { y as App };
99
+ export { x as App };
97
100
 
98
101
  //# 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","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,GAA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["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","touchIconUrl","emotionCache","container","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 { container } from 'tsyringe';\nimport { CacheProvider } from '@emotion/react';\nimport { setupUiCore } from '@gen-epix/ui-core/setup/setup';\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\nexport const App = ({ children }: AppProps) => {\n setupUiCore();\n const config = DependencyContainerUtil.resolveConfig<ConfigBase>();\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;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CAAmB,CAAC,CAAC;CAE5D,OACE,kBAACwB,GAAD;EAAe,OAAOF;EACpB,UAAA,kBAACG,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"}
@@ -1,9 +1,3 @@
1
1
  import { InjectionToken } from 'tsyringe';
2
- import { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';
3
- import { DevicePixelRatioService } from '@gen-epix/ui-core/classes/services/DevicePixelRatioService';
4
- import { KeyboardShortcutService } from '@gen-epix/ui-core/classes/services/KeyboardShortcutService';
5
2
  import { ConfigBase } from '../models/config.models';
6
3
  export declare const CONFIG_TOKEN: InjectionToken<ConfigBase>;
7
- export declare const WINDOW_SERVICE_TOKEN: InjectionToken<WindowService>;
8
- export declare const DEVICE_PIXEL_RATIO_SERVICE_TOKEN: InjectionToken<DevicePixelRatioService>;
9
- export declare const KEYBOARD_SHORTCUT_SERVICE_TOKEN: InjectionToken<KeyboardShortcutService>;
@@ -1,5 +1,5 @@
1
1
  // src/constants/config.constants.ts
2
- var e = Symbol("CONFIG_TOKEN"), t = Symbol("WINDOW_SERVICE_TOKEN"), n = Symbol("DEVICE_PIXEL_RATIO_SERVICE_TOKEN"), r = Symbol("KEYBOARD_SHORTCUT_SERVICE_TOKEN");
3
- export { e as CONFIG_TOKEN, n as DEVICE_PIXEL_RATIO_SERVICE_TOKEN, r as KEYBOARD_SHORTCUT_SERVICE_TOKEN, t as WINDOW_SERVICE_TOKEN };
2
+ var e = Symbol("CONFIG_TOKEN");
3
+ export { e as CONFIG_TOKEN };
4
4
 
5
5
  //# sourceMappingURL=config.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.constants.js","names":["CONFIG_TOKEN","WINDOW_SERVICE_TOKEN","DEVICE_PIXEL_RATIO_SERVICE_TOKEN","KEYBOARD_SHORTCUT_SERVICE_TOKEN"],"sources":["../../src/constants/config.constants.ts"],"sourcesContent":["import type { InjectionToken } from 'tsyringe';\nimport type { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\nimport type { DevicePixelRatioService } from '@gen-epix/ui-core/classes/services/DevicePixelRatioService';\nimport type { KeyboardShortcutService } from '@gen-epix/ui-core/classes/services/KeyboardShortcutService';\n\nimport type { ConfigBase } from '../models/config.models';\n\nexport const CONFIG_TOKEN: InjectionToken<ConfigBase> = Symbol('CONFIG_TOKEN');\nexport const WINDOW_SERVICE_TOKEN: InjectionToken<WindowService> = Symbol('WINDOW_SERVICE_TOKEN');\nexport const DEVICE_PIXEL_RATIO_SERVICE_TOKEN: InjectionToken<DevicePixelRatioService> = Symbol('DEVICE_PIXEL_RATIO_SERVICE_TOKEN');\nexport const KEYBOARD_SHORTCUT_SERVICE_TOKEN: InjectionToken<KeyboardShortcutService> = Symbol('KEYBOARD_SHORTCUT_SERVICE_TOKEN');\n"],"mappings":";AAOA,IAAaA,IAA2C,OAAO,cAAc,GAChEC,IAAsD,OAAO,sBAAsB,GACnFC,IAA4E,OAAO,kCAAkC,GACrHC,IAA2E,OAAO,iCAAiC"}
1
+ {"version":3,"file":"config.constants.js","names":["CONFIG_TOKEN"],"sources":["../../src/constants/config.constants.ts"],"sourcesContent":["import type { InjectionToken } from 'tsyringe';\n\nimport type { ConfigBase } from '../models/config.models';\n\nexport const CONFIG_TOKEN: InjectionToken<ConfigBase> = Symbol('CONFIG_TOKEN');\n"],"mappings":";AAIA,IAAaA,IAA2C,OAAO,cAAc"}
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { CircularProgressProps, Theme } from '@mui/material';
2
+ import { Theme } from '@mui/material';
3
3
  import { PageCommonConfig } from '../context/pageCommonContext';
4
4
  export interface ConfigBase {
5
5
  applicationName: string;
@@ -8,9 +8,5 @@ export interface ConfigBase {
8
8
  readonly headerComponent?: () => ReactElement;
9
9
  nonce?: string;
10
10
  pageConfig?: PageCommonConfig;
11
- spinner: {
12
- DEFAULT_CIRCULAR_PROGRESS_SIZE: CircularProgressProps['size'];
13
- DEFAULT_TAKING_LONGER_TIMEOUT_MS: number;
14
- };
15
11
  theme: Theme;
16
12
  }
@@ -0,0 +1,3 @@
1
+ import { PaletteMode, Theme, ThemeOptions } from '@mui/material';
2
+ export declare const createDemoThemeOptions: (paletteMode: PaletteMode) => ThemeOptions;
3
+ export declare const createDemoTheme: (paletteMode: PaletteMode) => Theme;
@@ -0,0 +1 @@
1
+ export * from './demoTheme';