@hitachivantara/app-shell-ui 1.5.0 → 1.6.1
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/esm/components/AppShell/AppShell.js +8 -6
- package/dist/esm/components/AppShellProvider/AppShellProvider.js +80 -56
- package/dist/esm/components/AppShellRoutes/AppShellRoutes.js +74 -65
- package/dist/esm/components/AppShellViewProvider/AppShellViewProvider.js +13 -13
- package/dist/esm/components/CustomHooksInitializer/CustomHooksInitializer.js +9 -5
- package/dist/esm/components/GlobalStyles/GlobalStyles.js +8 -8
- package/dist/esm/components/GlobalStyles/index.js +2 -3
- package/dist/esm/components/IconUiKit/IconUiKit.js +10 -8
- package/dist/esm/components/IconUiKit/index.js +4 -5
- package/dist/esm/components/hoc/withClickAwayListener.js +19 -12
- package/dist/esm/components/hoc/withGlobalProvider.js +30 -25
- package/dist/esm/components/layout/Header/BrandLogo/BrandLogo.js +27 -16
- package/dist/esm/components/layout/Header/BrandLogo/Logos/Hitachi.js +12 -0
- package/dist/esm/components/layout/Header/BrandLogo/Logos/Lumada.js +17 -0
- package/dist/esm/components/layout/Header/BrandLogo/Logos/Pentaho.js +12 -0
- package/dist/esm/components/layout/Header/Header.js +54 -42
- package/dist/esm/components/layout/Header/HeaderActions/DynamicAction/DynamicAction.js +22 -18
- package/dist/esm/components/layout/Header/HeaderActions/DynamicAction/index.js +2 -3
- package/dist/esm/components/layout/Header/HeaderActions/HeaderActions.js +17 -14
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/AppSwitcherToggle/AppSwitcherToggle.js +59 -40
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/AppSwitcherToggle/index.js +2 -3
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/AppSwitcherToggle/styles.js +6 -6
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/ColorModeSwitcher/ColorModeSwitcher.js +19 -17
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/ColorModeSwitcher/index.js +2 -3
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/HelpButton/HelpButton.js +23 -20
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/HelpButton/index.js +2 -3
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/InternalAction/InternalAction.js +23 -21
- package/dist/esm/components/layout/Header/HeaderActions/index.js +2 -3
- package/dist/esm/components/layout/Header/styles.js +7 -7
- package/dist/esm/components/layout/Loading/Loading.js +9 -7
- package/dist/esm/components/layout/Loading/styles.js +20 -8
- package/dist/esm/components/layout/Main/Main.js +23 -22
- package/dist/esm/components/layout/Main/styles.js +17 -8
- package/dist/esm/components/layout/VerticalNavigation/VerticalNavigation.js +67 -49
- package/dist/esm/components/layout/VerticalNavigation/styles.js +15 -16
- package/dist/esm/index.js +2 -3
- package/dist/esm/lib/hooks/useClearLocationState.js +14 -14
- package/dist/esm/lib/hooks/useCustomEventListener.js +19 -14
- package/dist/esm/lib/hooks/useLocalStorage.js +22 -16
- package/dist/esm/lib/hooks/useNavigationMenuItems.js +36 -28
- package/dist/esm/lib/hooks/useNotificationsEventListener.js +47 -37
- package/dist/esm/lib/hooks/useThemeEventListener.js +25 -20
- package/dist/esm/lib/i18n/index.js +23 -19
- package/dist/esm/lib/i18n/localization/en.json.js +18 -15
- package/dist/esm/lib/i18n/localization/pt.json.js +18 -15
- package/dist/esm/lib/utils/CombinedProviders.js +19 -14
- package/dist/esm/lib/utils/basePathUtils.js +4 -3
- package/dist/esm/lib/utils/documentUtil.js +10 -6
- package/dist/esm/lib/utils/navigationUtil.js +65 -38
- package/dist/esm/lib/utils/textUtil.js +4 -3
- package/dist/esm/pages/ErrorPage/ErrorPage.js +24 -24
- package/dist/esm/pages/ErrorPage/Footer/Footer.js +47 -31
- package/dist/esm/pages/ErrorPage/Footer/styles.js +8 -8
- package/dist/esm/pages/ErrorPage/styles.js +25 -15
- package/dist/esm/pages/GenericError/500.svg.js +2 -3
- package/dist/esm/pages/GenericError/GenericError.js +13 -13
- package/dist/esm/pages/LoadingPage/LoadingPage.js +12 -12
- package/dist/esm/pages/LoadingPage/index.js +2 -3
- package/dist/esm/pages/LoadingPage/styles.js +15 -9
- package/dist/esm/pages/NotFound/404.svg.js +2 -3
- package/dist/esm/pages/NotFound/NotFound.js +11 -11
- package/dist/esm/pages/NotFound/index.js +2 -3
- package/dist/esm/pages/Root/Root.js +22 -22
- package/dist/esm/providers/BannerProvider.js +67 -57
- package/dist/esm/providers/LayoutProvider.js +19 -16
- package/dist/esm/providers/NavigationProvider.js +87 -55
- package/dist/esm/providers/hooks/useBannerContext.js +9 -7
- package/dist/esm/providers/hooks/useLayoutContext.js +9 -7
- package/dist/esm/providers/hooks/useNavigationContext.js +9 -7
- package/package.json +5 -5
- package/dist/esm/components/AppShell/AppShell.js.map +0 -1
- package/dist/esm/components/AppShellProvider/AppShellProvider.js.map +0 -1
- package/dist/esm/components/AppShellRoutes/AppShellRoutes.js.map +0 -1
- package/dist/esm/components/AppShellViewProvider/AppShellViewProvider.js.map +0 -1
- package/dist/esm/components/CustomHooksInitializer/CustomHooksInitializer.js.map +0 -1
- package/dist/esm/components/GlobalStyles/GlobalStyles.js.map +0 -1
- package/dist/esm/components/GlobalStyles/index.js.map +0 -1
- package/dist/esm/components/IconUiKit/IconUiKit.js.map +0 -1
- package/dist/esm/components/IconUiKit/index.js.map +0 -1
- package/dist/esm/components/hoc/withClickAwayListener.js.map +0 -1
- package/dist/esm/components/hoc/withGlobalProvider.js.map +0 -1
- package/dist/esm/components/layout/Header/BrandLogo/BrandLogo.js.map +0 -1
- package/dist/esm/components/layout/Header/BrandLogo/Logos/Hitachi/Hitachi.js +0 -10
- package/dist/esm/components/layout/Header/BrandLogo/Logos/Hitachi/Hitachi.js.map +0 -1
- package/dist/esm/components/layout/Header/BrandLogo/Logos/Hitachi/styles.js +0 -28
- package/dist/esm/components/layout/Header/BrandLogo/Logos/Hitachi/styles.js.map +0 -1
- package/dist/esm/components/layout/Header/BrandLogo/Logos/Lumada/Lumada.js +0 -15
- package/dist/esm/components/layout/Header/BrandLogo/Logos/Lumada/Lumada.js.map +0 -1
- package/dist/esm/components/layout/Header/BrandLogo/Logos/Lumada/styles.js +0 -34
- package/dist/esm/components/layout/Header/BrandLogo/Logos/Lumada/styles.js.map +0 -1
- package/dist/esm/components/layout/Header/Header.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/DynamicAction/DynamicAction.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/DynamicAction/index.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/HeaderActions.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/AppSwitcherToggle/AppSwitcherToggle.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/AppSwitcherToggle/index.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/AppSwitcherToggle/styles.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/ColorModeSwitcher/ColorModeSwitcher.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/ColorModeSwitcher/index.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/HelpButton/HelpButton.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/HelpButton/index.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/InternalActions/InternalAction/InternalAction.js.map +0 -1
- package/dist/esm/components/layout/Header/HeaderActions/index.js.map +0 -1
- package/dist/esm/components/layout/Header/styles.js.map +0 -1
- package/dist/esm/components/layout/Loading/Loading.js.map +0 -1
- package/dist/esm/components/layout/Loading/styles.js.map +0 -1
- package/dist/esm/components/layout/Main/Main.js.map +0 -1
- package/dist/esm/components/layout/Main/styles.js.map +0 -1
- package/dist/esm/components/layout/VerticalNavigation/VerticalNavigation.js.map +0 -1
- package/dist/esm/components/layout/VerticalNavigation/styles.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lib/hooks/useClearLocationState.js.map +0 -1
- package/dist/esm/lib/hooks/useCustomEventListener.js.map +0 -1
- package/dist/esm/lib/hooks/useLocalStorage.js.map +0 -1
- package/dist/esm/lib/hooks/useNavigationMenuItems.js.map +0 -1
- package/dist/esm/lib/hooks/useNotificationsEventListener.js.map +0 -1
- package/dist/esm/lib/hooks/useThemeEventListener.js.map +0 -1
- package/dist/esm/lib/i18n/index.js.map +0 -1
- package/dist/esm/lib/i18n/localization/en.json.js.map +0 -1
- package/dist/esm/lib/i18n/localization/pt.json.js.map +0 -1
- package/dist/esm/lib/utils/CombinedProviders.js.map +0 -1
- package/dist/esm/lib/utils/basePathUtils.js.map +0 -1
- package/dist/esm/lib/utils/documentUtil.js.map +0 -1
- package/dist/esm/lib/utils/navigationUtil.js.map +0 -1
- package/dist/esm/lib/utils/textUtil.js.map +0 -1
- package/dist/esm/pages/ErrorPage/ErrorPage.js.map +0 -1
- package/dist/esm/pages/ErrorPage/Footer/Footer.js.map +0 -1
- package/dist/esm/pages/ErrorPage/Footer/styles.js.map +0 -1
- package/dist/esm/pages/ErrorPage/styles.js.map +0 -1
- package/dist/esm/pages/GenericError/500.svg.js.map +0 -1
- package/dist/esm/pages/GenericError/GenericError.js.map +0 -1
- package/dist/esm/pages/LoadingPage/LoadingPage.js.map +0 -1
- package/dist/esm/pages/LoadingPage/index.js.map +0 -1
- package/dist/esm/pages/LoadingPage/styles.js.map +0 -1
- package/dist/esm/pages/NotFound/404.svg.js.map +0 -1
- package/dist/esm/pages/NotFound/NotFound.js.map +0 -1
- package/dist/esm/pages/NotFound/index.js.map +0 -1
- package/dist/esm/pages/Root/Root.js.map +0 -1
- package/dist/esm/providers/BannerProvider.js.map +0 -1
- package/dist/esm/providers/LayoutProvider.js.map +0 -1
- package/dist/esm/providers/NavigationProvider.js.map +0 -1
- package/dist/esm/providers/hooks/useBannerContext.js.map +0 -1
- package/dist/esm/providers/hooks/useLayoutContext.js.map +0 -1
- package/dist/esm/providers/hooks/useNavigationContext.js.map +0 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import withGlobalProvider from "../hoc/withGlobalProvider.js";
|
|
3
|
+
import AppShellRoutes from "../AppShellRoutes/AppShellRoutes.js";
|
|
4
|
+
const AppShell = () => {
|
|
5
|
+
return /* @__PURE__ */ jsx(AppShellRoutes, {});
|
|
6
|
+
};
|
|
7
|
+
const HvAppShell = withGlobalProvider(AppShell);
|
|
5
8
|
export {
|
|
6
|
-
|
|
9
|
+
HvAppShell as default
|
|
7
10
|
};
|
|
8
|
-
//# sourceMappingURL=AppShell.js.map
|
|
@@ -1,61 +1,85 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { useContext
|
|
3
|
-
import { HvAppShellContext
|
|
4
|
-
import { I18nContext
|
|
5
|
-
import { themes
|
|
6
|
-
import { addResourceBundles
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
children
|
|
10
|
-
config:
|
|
11
|
-
configUrl
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useContext, useState, useEffect, useMemo } from "react";
|
|
3
|
+
import { HvAppShellContext, HvAppShellRuntimeContext, HvAppShellCombinedProvidersContext, CONFIG_TRANSLATIONS_NAMESPACE } from "@hitachivantara/app-shell-shared";
|
|
4
|
+
import { I18nContext } from "react-i18next";
|
|
5
|
+
import { themes, HvProvider } from "@hitachivantara/uikit-react-core";
|
|
6
|
+
import { addResourceBundles } from "../../lib/i18n/index.js";
|
|
7
|
+
import useLocalStorage from "../../lib/hooks/useLocalStorage.js";
|
|
8
|
+
const AppShellProvider = ({
|
|
9
|
+
children,
|
|
10
|
+
config: localConfig,
|
|
11
|
+
configUrl
|
|
12
12
|
}) => {
|
|
13
|
-
var f, P, x, S;
|
|
14
13
|
const {
|
|
15
|
-
i18n
|
|
16
|
-
} =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
i18n
|
|
15
|
+
} = useContext(I18nContext);
|
|
16
|
+
const {
|
|
17
|
+
value: storedColorModeValue
|
|
18
|
+
} = useLocalStorage("COLOR_MODE");
|
|
19
|
+
const [loadedConfig, setLoadedConfig] = useState(void 0);
|
|
20
|
+
const [hasError, setHasError] = useState(false);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!localConfig && configUrl) {
|
|
23
|
+
fetch(new URL(configUrl)).then((result) => {
|
|
24
|
+
return result.json();
|
|
25
|
+
}).then((data) => setLoadedConfig(data)).catch((e) => {
|
|
26
|
+
console.error(`It was not possible to obtain the context from: ${configUrl}`, e);
|
|
27
|
+
setLoadedConfig(void 0);
|
|
28
|
+
setHasError(true);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}, [localConfig, configUrl]);
|
|
32
|
+
const theConfig = useMemo(() => localConfig ?? loadedConfig, [localConfig, loadedConfig]);
|
|
33
|
+
if (hasError) {
|
|
26
34
|
throw Error("It was not possible to obtain the configuration");
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
35
|
+
}
|
|
36
|
+
if (theConfig?.translations) {
|
|
37
|
+
addResourceBundles(i18n, theConfig.translations, CONFIG_TRANSLATIONS_NAMESPACE);
|
|
38
|
+
}
|
|
39
|
+
const [themes$1, setThemes] = useState(void 0);
|
|
40
|
+
const [providers, setProviders] = useState(void 0);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (theConfig?.theming?.themes) {
|
|
43
|
+
Promise.all(theConfig.theming.themes?.map((bundle) => {
|
|
44
|
+
return themes[bundle] ?? import(
|
|
45
|
+
/* @vite-ignore */
|
|
46
|
+
bundle
|
|
47
|
+
).then((module) => module.default).catch((e) => {
|
|
48
|
+
console.error(`Import of theme bundle ${bundle} failed! ${e}`);
|
|
49
|
+
});
|
|
50
|
+
})).then((loadedThemes) => {
|
|
51
|
+
setThemes(loadedThemes.filter((theme) => !!theme));
|
|
52
|
+
}).catch((e) => {
|
|
53
|
+
console.error(`Import of themes failed! ${e}`);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}, [theConfig?.theming?.themes]);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (theConfig?.providers) {
|
|
59
|
+
Promise.all(theConfig.providers.map((provider) => {
|
|
60
|
+
return import(
|
|
61
|
+
/* @vite-ignore */
|
|
62
|
+
provider.bundle
|
|
63
|
+
).then((module) => module.default).catch((e) => {
|
|
64
|
+
console.error(`Import of provider '${provider.bundle}' failed! ${e}`);
|
|
65
|
+
});
|
|
66
|
+
})).then((loadedProviders) => setProviders(loadedProviders.filter((provider) => !!provider))).catch((e) => {
|
|
67
|
+
console.error(`Import of providers failed!`, e);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}, [theConfig?.providers]);
|
|
71
|
+
const runtimeContext = useMemo(() => ({
|
|
72
|
+
i18n
|
|
73
|
+
}), [i18n]);
|
|
74
|
+
const providersContext = useMemo(() => ({
|
|
75
|
+
providers
|
|
76
|
+
}), [providers]);
|
|
77
|
+
if (!theConfig || theConfig.theming?.themes && !themes$1 || theConfig.providers != null && providers === void 0) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
return /* @__PURE__ */ jsx(HvAppShellContext.Provider, { value: theConfig, children: /* @__PURE__ */ jsx(HvAppShellRuntimeContext.Provider, { value: runtimeContext, children: /* @__PURE__ */ jsx(HvProvider, { themes: themes$1, theme: theConfig.theming?.theme, colorMode: storedColorModeValue ?? theConfig.theming?.colorMode, children: /* @__PURE__ */ jsx(HvAppShellCombinedProvidersContext.Provider, { value: providersContext, children }) }) }) });
|
|
81
|
+
};
|
|
82
|
+
const AppShellProvider$1 = AppShellProvider;
|
|
58
83
|
export {
|
|
59
|
-
|
|
84
|
+
AppShellProvider$1 as default
|
|
60
85
|
};
|
|
61
|
-
//# sourceMappingURL=AppShellProvider.js.map
|
|
@@ -1,86 +1,95 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { lazy
|
|
3
|
-
import { RouterProvider
|
|
4
|
-
import { ErrorBoundary
|
|
5
|
-
import { HvContainer
|
|
6
|
-
import { useHvAppShellConfig
|
|
7
|
-
import
|
|
8
|
-
import { getAppIdFromBundle
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { lazy } from "react";
|
|
3
|
+
import { RouterProvider, createBrowserRouter, Outlet } from "react-router-dom";
|
|
4
|
+
import { ErrorBoundary } from "react-error-boundary";
|
|
5
|
+
import { HvContainer } from "@hitachivantara/uikit-react-core";
|
|
6
|
+
import { useHvAppShellConfig, useHvAppShellCombinedProviders } from "@hitachivantara/app-shell-shared";
|
|
7
|
+
import LoadingPage from "../../pages/LoadingPage/LoadingPage.js";
|
|
8
|
+
import { getAppIdFromBundle } from "../../lib/utils/navigationUtil.js";
|
|
9
|
+
import getBasePath from "../../lib/utils/basePathUtils.js";
|
|
10
|
+
import RootRoute from "../../pages/Root/Root.js";
|
|
11
|
+
import GenericError from "../../pages/GenericError/GenericError.js";
|
|
12
|
+
import AppShellViewProvider from "../AppShellViewProvider/AppShellViewProvider.js";
|
|
13
|
+
const NotFound = lazy(() => import("../../pages/NotFound/index.js"));
|
|
14
|
+
function renderNestedRoutes(views) {
|
|
15
|
+
if (!views) {
|
|
16
|
+
return void 0;
|
|
17
|
+
}
|
|
18
|
+
return views.map((view) => {
|
|
19
|
+
const {
|
|
20
|
+
bundle
|
|
21
|
+
} = view;
|
|
22
|
+
const appId = getAppIdFromBundle(bundle);
|
|
23
|
+
const RouteComponent = lazy(() => import(
|
|
24
|
+
/* @vite-ignore */
|
|
25
|
+
bundle
|
|
26
|
+
));
|
|
27
|
+
const path = view.route.replace(/^\//, "");
|
|
28
|
+
return {
|
|
29
|
+
path,
|
|
30
|
+
// "Component" used instead of "element" due to lazy loading
|
|
31
|
+
Component: () => /* @__PURE__ */ jsx(AppShellViewProvider, { id: appId, children: /* @__PURE__ */ jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsx(GenericError, { fullPage: false }), children: /* @__PURE__ */ jsx(RouteComponent, { ...view.config, children: view.views != null ? /* @__PURE__ */ jsx(Outlet, {}) : null }) }, view.route) }),
|
|
32
|
+
children: renderNestedRoutes(view.views)
|
|
33
|
+
};
|
|
34
|
+
});
|
|
30
35
|
}
|
|
31
|
-
function
|
|
32
|
-
if (
|
|
36
|
+
function renderRoutes(mainPanel) {
|
|
37
|
+
if (mainPanel == null || mainPanel.views == null) {
|
|
33
38
|
return [];
|
|
39
|
+
}
|
|
34
40
|
const {
|
|
35
|
-
views
|
|
36
|
-
maxWidth
|
|
37
|
-
...
|
|
38
|
-
} =
|
|
39
|
-
return
|
|
41
|
+
views,
|
|
42
|
+
maxWidth = "xl",
|
|
43
|
+
...mainContainerProps
|
|
44
|
+
} = mainPanel;
|
|
45
|
+
return views.map((view) => {
|
|
40
46
|
const {
|
|
41
|
-
bundle
|
|
42
|
-
route
|
|
43
|
-
config
|
|
44
|
-
views:
|
|
45
|
-
maxWidth:
|
|
46
|
-
...
|
|
47
|
-
} =
|
|
47
|
+
bundle,
|
|
48
|
+
route,
|
|
49
|
+
config,
|
|
50
|
+
views: nestedViews,
|
|
51
|
+
maxWidth: viewMaxWidth,
|
|
52
|
+
...viewContainerProps
|
|
53
|
+
} = view;
|
|
54
|
+
const appId = getAppIdFromBundle(bundle);
|
|
55
|
+
const RouteComponent = lazy(() => import(
|
|
48
56
|
/* @vite-ignore */
|
|
49
|
-
|
|
57
|
+
bundle
|
|
50
58
|
));
|
|
51
59
|
return {
|
|
52
|
-
path:
|
|
60
|
+
path: route,
|
|
53
61
|
// "Component" used instead of "element" due to lazy loading
|
|
54
|
-
Component: () => /* @__PURE__ */
|
|
55
|
-
children:
|
|
62
|
+
Component: () => /* @__PURE__ */ jsx(HvContainer, { maxWidth: viewMaxWidth ?? maxWidth, ...mainContainerProps, ...viewContainerProps, children: /* @__PURE__ */ jsx(AppShellViewProvider, { id: appId, children: /* @__PURE__ */ jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsx(GenericError, { fullPage: false }), children: /* @__PURE__ */ jsx(RouteComponent, { ...config, children: nestedViews != null ? /* @__PURE__ */ jsx(Outlet, {}) : null }) }, route) }) }),
|
|
63
|
+
children: renderNestedRoutes(nestedViews)
|
|
56
64
|
};
|
|
57
65
|
});
|
|
58
66
|
}
|
|
59
|
-
function
|
|
67
|
+
function renderErrorRoutes(mainPanel) {
|
|
60
68
|
const {
|
|
61
|
-
views
|
|
62
|
-
maxWidth
|
|
63
|
-
...
|
|
64
|
-
} =
|
|
69
|
+
views,
|
|
70
|
+
maxWidth = "xl",
|
|
71
|
+
...mainContainerProps
|
|
72
|
+
} = mainPanel ?? {};
|
|
65
73
|
return [{
|
|
66
74
|
path: "*",
|
|
67
|
-
element: /* @__PURE__ */
|
|
75
|
+
element: /* @__PURE__ */ jsx(HvContainer, { maxWidth, ...mainContainerProps, children: /* @__PURE__ */ jsx(NotFound, {}) })
|
|
68
76
|
}];
|
|
69
77
|
}
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
const AppShellRoutes = () => {
|
|
79
|
+
const config = useHvAppShellConfig();
|
|
80
|
+
const {
|
|
81
|
+
providers
|
|
82
|
+
} = useHvAppShellCombinedProviders();
|
|
83
|
+
return /* @__PURE__ */ jsx(RouterProvider, { fallbackElement: /* @__PURE__ */ jsx(LoadingPage, {}), router: createBrowserRouter([{
|
|
84
|
+
element: /* @__PURE__ */ jsx(RootRoute, { providers }),
|
|
76
85
|
// All routes live inside `RootRoute`
|
|
77
|
-
errorElement: /* @__PURE__ */
|
|
78
|
-
children: [...
|
|
86
|
+
errorElement: /* @__PURE__ */ jsx(GenericError, { fullPage: true }),
|
|
87
|
+
children: [...renderRoutes(config.mainPanel), ...renderErrorRoutes(config.mainPanel)]
|
|
79
88
|
}], {
|
|
80
|
-
basename:
|
|
89
|
+
basename: getBasePath(config)
|
|
81
90
|
}) });
|
|
82
|
-
}
|
|
91
|
+
};
|
|
92
|
+
const AppShellRoutes$1 = AppShellRoutes;
|
|
83
93
|
export {
|
|
84
|
-
|
|
94
|
+
AppShellRoutes$1 as default
|
|
85
95
|
};
|
|
86
|
-
//# sourceMappingURL=AppShellRoutes.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { useMemo
|
|
3
|
-
import { HvAppShellViewContext
|
|
4
|
-
const
|
|
5
|
-
children
|
|
6
|
-
id
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { HvAppShellViewContext } from "@hitachivantara/app-shell-shared";
|
|
4
|
+
const AppShellViewProvider = ({
|
|
5
|
+
children,
|
|
6
|
+
id
|
|
7
7
|
}) => {
|
|
8
|
-
const
|
|
9
|
-
id
|
|
10
|
-
}), [
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
}
|
|
8
|
+
const value = useMemo(() => ({
|
|
9
|
+
id
|
|
10
|
+
}), [id]);
|
|
11
|
+
return /* @__PURE__ */ jsx(HvAppShellViewContext.Provider, { value, children });
|
|
12
|
+
};
|
|
13
|
+
const AppShellViewProvider$1 = AppShellViewProvider;
|
|
13
14
|
export {
|
|
14
|
-
|
|
15
|
+
AppShellViewProvider$1 as default
|
|
15
16
|
};
|
|
16
|
-
//# sourceMappingURL=AppShellViewProvider.js.map
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import useClearLocationState from "../../lib/hooks/useClearLocationState.js";
|
|
2
|
+
import useCustomEventListener from "../../lib/hooks/useCustomEventListener.js";
|
|
3
|
+
const CustomHooksInitializer = () => {
|
|
4
|
+
useCustomEventListener();
|
|
5
|
+
useClearLocationState();
|
|
6
|
+
return null;
|
|
7
|
+
};
|
|
8
|
+
const CustomHooksInitializer$1 = CustomHooksInitializer;
|
|
4
9
|
export {
|
|
5
|
-
|
|
10
|
+
CustomHooksInitializer$1 as default
|
|
6
11
|
};
|
|
7
|
-
//# sourceMappingURL=CustomHooksInitializer.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { Global
|
|
3
|
-
function
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { Global } from "@emotion/react";
|
|
3
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() {
|
|
4
4
|
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
5
5
|
}
|
|
6
|
-
var
|
|
6
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
7
7
|
name: "1ay3zcm",
|
|
8
8
|
styles: "html,body{height:unset;}"
|
|
9
9
|
} : {
|
|
10
10
|
name: "1xkfqfu-GlobalStyles",
|
|
11
11
|
styles: "html,body{height:unset;};label:GlobalStyles;",
|
|
12
12
|
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9fX3cvaHYtYXBwLXNoZWxsL2h2LWFwcC1zaGVsbC9jbGllbnQvcGFja2FnZXMvYXBwLXNoZWxsLXVpL3NyYy9jb21wb25lbnRzL0dsb2JhbFN0eWxlcy9HbG9iYWxTdHlsZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVVlIiwiZmlsZSI6Ii9fX3cvaHYtYXBwLXNoZWxsL2h2LWFwcC1zaGVsbC9jbGllbnQvcGFja2FnZXMvYXBwLXNoZWxsLXVpL3NyYy9jb21wb25lbnRzL0dsb2JhbFN0eWxlcy9HbG9iYWxTdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgR2xvYmFsLCBjc3MgfSBmcm9tIFwiQGVtb3Rpb24vcmVhY3RcIjtcblxuLyoqXG4gKiBUaGlzIGNvbXBvbmVudCBjYW4gYmUgdXNlZCB0byBzZXQgfCBhZGQgfCBtb2RpZnkgZ2xvYmFsIGNzcy4gSXQgY2FuIGFsc28gb3ZlcnJpZGUgcHJvcGVydGllcyBkZWZpbmVkIGluIFVJLUtJVC5cbiAqXG4gKiBXZSBuZWVkIHRvIGhhdmUgdGhpcyBjb21wb25lbnQgYmVjYXVzZSB0aGUgVUktS0lUIGlzIGZvcmNpbmcgdGhlIGhlaWdodCB0byAxMDAlIGFuZCB0aGlzIGNhdXNlZCBBcHAgU2hlbGwgdG8gc2hvd1xuICogYSB2ZXJ0aWNhbCBzY3JvbGwgYmFyIHdoZW4gaXQgc2hvdWxkbid0IGR1ZSB0byB0aGUgaGVhZGVyIGhlaWdodC5cbiAqL1xuY29uc3QgR2xvYmFsU3R5bGVzID0gKCkgPT4gKFxuICA8R2xvYmFsXG4gICAgc3R5bGVzPXtjc3NgXG4gICAgICBodG1sLFxuICAgICAgYm9keSB7XG4gICAgICAgIGhlaWdodDogdW5zZXQ7XG4gICAgICB9XG4gICAgYH1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IEdsb2JhbFN0eWxlcztcbiJdfQ== */",
|
|
13
|
-
toString:
|
|
13
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
14
14
|
};
|
|
15
|
-
const
|
|
15
|
+
const GlobalStyles = () => /* @__PURE__ */ jsx(Global, { styles: _ref });
|
|
16
|
+
const GlobalStyles$1 = GlobalStyles;
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
GlobalStyles$1 as default
|
|
18
19
|
};
|
|
19
|
-
//# sourceMappingURL=GlobalStyles.js.map
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { HvIconSprite
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
name
|
|
6
|
-
}) =>
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { HvIconSprite } from "@hitachivantara/uikit-react-icons";
|
|
3
|
+
const spriteUri = import.meta.resolve?.("@hv/uikit-icons/icons.svg");
|
|
4
|
+
const IconUiKit = ({
|
|
5
|
+
name
|
|
6
|
+
}) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(HvIconSprite, { spriteUrl: spriteUri, iconName: name });
|
|
8
|
+
};
|
|
9
|
+
const IconUiKit$1 = IconUiKit;
|
|
7
10
|
export {
|
|
8
|
-
|
|
11
|
+
IconUiKit$1 as default
|
|
9
12
|
};
|
|
10
|
-
//# sourceMappingURL=IconUiKit.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import React from "react";
|
|
2
|
+
import IconUiKit$1 from "./IconUiKit.js";
|
|
3
|
+
const IconUiKit = React.memo(IconUiKit$1);
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
IconUiKit as default
|
|
6
6
|
};
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { createPortal
|
|
3
|
-
import { ClickAwayListener
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { createPortal } from "react-dom";
|
|
3
|
+
import { ClickAwayListener } from "@mui/material";
|
|
4
|
+
import createAppContainerElement from "../../lib/utils/documentUtil.js";
|
|
5
|
+
const withClickAwayListener = (WrappedComponent) => {
|
|
6
|
+
const displayName = WrappedComponent.displayName ?? WrappedComponent.name;
|
|
7
|
+
const panelContainerElement = createAppContainerElement();
|
|
8
|
+
const ComponentWithClickAwayListener = ({
|
|
9
|
+
onClickAway,
|
|
10
|
+
...wrappedProps
|
|
11
|
+
}) => {
|
|
12
|
+
if (onClickAway) {
|
|
13
|
+
return createPortal(/* @__PURE__ */ jsx(ClickAwayListener, { onClickAway, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(WrappedComponent, { ...wrappedProps }) }) }), panelContainerElement);
|
|
14
|
+
}
|
|
15
|
+
return /* @__PURE__ */ jsx(WrappedComponent, { ...wrappedProps });
|
|
16
|
+
};
|
|
17
|
+
ComponentWithClickAwayListener.displayName = `withClickAwayListener(${displayName})`;
|
|
18
|
+
return ComponentWithClickAwayListener;
|
|
11
19
|
};
|
|
12
20
|
export {
|
|
13
|
-
|
|
21
|
+
withClickAwayListener as default
|
|
14
22
|
};
|
|
15
|
-
//# sourceMappingURL=withClickAwayListener.js.map
|
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { css
|
|
3
|
-
import { I18nextProvider
|
|
4
|
-
import { HelmetProvider
|
|
5
|
-
import { theme
|
|
6
|
-
import { ErrorBoundary
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
containerRoot: /* @__PURE__ */
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { css } from "@emotion/css";
|
|
3
|
+
import { I18nextProvider } from "react-i18next";
|
|
4
|
+
import { HelmetProvider } from "react-helmet-async";
|
|
5
|
+
import { theme, HvProvider, HvSnackbarProvider } from "@hitachivantara/uikit-react-core";
|
|
6
|
+
import { ErrorBoundary } from "react-error-boundary";
|
|
7
|
+
import GlobalStyles from "../GlobalStyles/GlobalStyles.js";
|
|
8
|
+
import AppShellProvider from "../AppShellProvider/AppShellProvider.js";
|
|
9
|
+
import createI18Next from "../../lib/i18n/index.js";
|
|
10
|
+
import LayoutProvider from "../../providers/LayoutProvider.js";
|
|
11
|
+
import GenericError from "../../pages/GenericError/GenericError.js";
|
|
12
|
+
const snackbarClasses = {
|
|
13
|
+
containerRoot: /* @__PURE__ */ css("margin-top:", theme.header.height, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:containerRoot;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9fX3cvaHYtYXBwLXNoZWxsL2h2LWFwcC1zaGVsbC9jbGllbnQvcGFja2FnZXMvYXBwLXNoZWxsLXVpL3NyYy9jb21wb25lbnRzL2hvYy93aXRoR2xvYmFsUHJvdmlkZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXdCb0IiLCJmaWxlIjoiL19fdy9odi1hcHAtc2hlbGwvaHYtYXBwLXNoZWxsL2NsaWVudC9wYWNrYWdlcy9hcHAtc2hlbGwtdWkvc3JjL2NvbXBvbmVudHMvaG9jL3dpdGhHbG9iYWxQcm92aWRlci50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tIFwiQGVtb3Rpb24vY3NzXCI7XG5pbXBvcnQgeyBJMThuZXh0UHJvdmlkZXIgfSBmcm9tIFwicmVhY3QtaTE4bmV4dFwiO1xuaW1wb3J0IHsgSGVsbWV0UHJvdmlkZXIgfSBmcm9tIFwicmVhY3QtaGVsbWV0LWFzeW5jXCI7XG5cbmltcG9ydCB7XG4gIEh2UHJvdmlkZXIsXG4gIEh2U25hY2tiYXJQcm92aWRlcixcbiAgdGhlbWVcbn0gZnJvbSBcIkBoaXRhY2hpdmFudGFyYS91aWtpdC1yZWFjdC1jb3JlXCI7XG5cbmltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCB7IEVycm9yQm91bmRhcnkgfSBmcm9tIFwicmVhY3QtZXJyb3ItYm91bmRhcnlcIjtcblxuaW1wb3J0IEdsb2JhbFN0eWxlcyBmcm9tIFwiLi4vR2xvYmFsU3R5bGVzXCI7XG5pbXBvcnQgQXBwU2hlbGxQcm92aWRlciBmcm9tIFwiLi4vQXBwU2hlbGxQcm92aWRlci9BcHBTaGVsbFByb3ZpZGVyXCI7XG5pbXBvcnQgY3JlYXRlSTE4TmV4dCBmcm9tIFwiLi4vLi4vbGliL2kxOG5cIjtcbmltcG9ydCBMYXlvdXRQcm92aWRlciBmcm9tIFwiLi4vLi4vcHJvdmlkZXJzL0xheW91dFByb3ZpZGVyXCI7XG5pbXBvcnQgR2VuZXJpY0Vycm9yIGZyb20gXCIuLi8uLi9wYWdlcy9HZW5lcmljRXJyb3JcIjtcblxudHlwZSBXcmFwcGVkQ29tcG9uZW50UHJvcHM8VCBleHRlbmRzIFJlYWN0LkVsZW1lbnRUeXBlPiA9IFJlYWN0LkNvbXBvbmVudFR5cGU8XG4gIFJlYWN0LkNvbXBvbmVudFByb3BzPFQ+XG4+O1xuXG5jb25zdCBzbmFja2JhckNsYXNzZXMgPSB7XG4gIGNvbnRhaW5lclJvb3Q6IGNzc2BcbiAgICBtYXJnaW4tdG9wOiAke3RoZW1lLmhlYWRlci5oZWlnaHR9O1xuICBgXG59O1xuXG5jb25zdCB3aXRoR2xvYmFsUHJvdmlkZXIgPSA8VCBleHRlbmRzIFJlYWN0LkVsZW1lbnRUeXBlPihcbiAgV3JhcHBlZENvbXBvbmVudDogV3JhcHBlZENvbXBvbmVudFByb3BzPFQ+XG4pID0+IHtcbiAgY29uc3QgZGlzcGxheU5hbWUgPSBXcmFwcGVkQ29tcG9uZW50LmRpc3BsYXlOYW1lID8/IFdyYXBwZWRDb21wb25lbnQubmFtZTtcblxuICBjb25zdCB7IGkxOG4gfSA9IGNyZWF0ZUkxOE5leHQoKTtcblxuICBjb25zdCBDb21wb25lbnRXaXRoR2xvYmFsUHJvdmlkZXIgPSAoe1xuICAgIC4uLndyYXBwZWRQcm9wc1xuICB9OiBSZWFjdC5Db21wb25lbnRQcm9wczxUPikgPT4ge1xuICAgIHJldHVybiAoXG4gICAgICA8SGVsbWV0UHJvdmlkZXI+XG4gICAgICAgIDxIdlByb3ZpZGVyPlxuICAgICAgICAgIDxHbG9iYWxTdHlsZXMgLz5cbiAgICAgICAgICA8STE4bmV4dFByb3ZpZGVyIGkxOG49e2kxOG59PlxuICAgICAgICAgICAgPEVycm9yQm91bmRhcnlcbiAgICAgICAgICAgICAga2V5PVwiZ2VuZXJhbFwiXG4gICAgICAgICAgICAgIGZhbGxiYWNrPXs8R2VuZXJpY0Vycm9yIGZ1bGxQYWdlIGluY2x1ZGVGb290ZXI9e2ZhbHNlfSAvPn0+XG4gICAgICAgICAgICAgIDxBcHBTaGVsbFByb3ZpZGVyXG4gICAgICAgICAgICAgICAgY29uZmlnPXt3cmFwcGVkUHJvcHMuY29uZmlnfVxuICAgICAgICAgICAgICAgIGNvbmZpZ1VybD17d3JhcHBlZFByb3BzLmNvbmZpZ1VybH0+XG4gICAgICAgICAgICAgICAgPExheW91dFByb3ZpZGVyPlxuICAgICAgICAgICAgICAgICAgPEh2U25hY2tiYXJQcm92aWRlclxuICAgICAgICAgICAgICAgICAgICBub3Rpc3RhY2tDbGFzc2VzT3ZlcnJpZGU9e3NuYWNrYmFyQ2xhc3Nlc30+XG4gICAgICAgICAgICAgICAgICAgIDxXcmFwcGVkQ29tcG9uZW50IHsuLi53cmFwcGVkUHJvcHN9IC8+XG4gICAgICAgICAgICAgICAgICA8L0h2U25hY2tiYXJQcm92aWRlcj5cbiAgICAgICAgICAgICAgICA8L0xheW91dFByb3ZpZGVyPlxuICAgICAgICAgICAgICA8L0FwcFNoZWxsUHJvdmlkZXI+XG4gICAgICAgICAgICA8L0Vycm9yQm91bmRhcnk+XG4gICAgICAgICAgPC9JMThuZXh0UHJvdmlkZXI+XG4gICAgICAgIDwvSHZQcm92aWRlcj5cbiAgICAgIDwvSGVsbWV0UHJvdmlkZXI+XG4gICAgKTtcbiAgfTtcblxuICBDb21wb25lbnRXaXRoR2xvYmFsUHJvdmlkZXIuZGlzcGxheU5hbWUgPSBgd2l0aEdsb2JhbFByb3ZpZGVyKCR7ZGlzcGxheU5hbWV9KWA7XG5cbiAgcmV0dXJuIENvbXBvbmVudFdpdGhHbG9iYWxQcm92aWRlcjtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IHdpdGhHbG9iYWxQcm92aWRlcjtcbiJdfQ== */")
|
|
14
|
+
};
|
|
15
|
+
const withGlobalProvider = (WrappedComponent) => {
|
|
16
|
+
const displayName = WrappedComponent.displayName ?? WrappedComponent.name;
|
|
17
|
+
const {
|
|
18
|
+
i18n
|
|
19
|
+
} = createI18Next();
|
|
20
|
+
const ComponentWithGlobalProvider = ({
|
|
21
|
+
...wrappedProps
|
|
22
|
+
}) => {
|
|
23
|
+
return /* @__PURE__ */ jsx(HelmetProvider, { children: /* @__PURE__ */ jsxs(HvProvider, { children: [
|
|
24
|
+
/* @__PURE__ */ jsx(GlobalStyles, {}),
|
|
25
|
+
/* @__PURE__ */ jsx(I18nextProvider, { i18n, children: /* @__PURE__ */ jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsx(GenericError, { fullPage: true, includeFooter: false }), children: /* @__PURE__ */ jsx(AppShellProvider, { config: wrappedProps.config, configUrl: wrappedProps.configUrl, children: /* @__PURE__ */ jsx(LayoutProvider, { children: /* @__PURE__ */ jsx(HvSnackbarProvider, { notistackClassesOverride: snackbarClasses, children: /* @__PURE__ */ jsx(WrappedComponent, { ...wrappedProps }) }) }) }) }, "general") })
|
|
26
|
+
] }) });
|
|
27
|
+
};
|
|
28
|
+
ComponentWithGlobalProvider.displayName = `withGlobalProvider(${displayName})`;
|
|
29
|
+
return ComponentWithGlobalProvider;
|
|
24
30
|
};
|
|
25
31
|
export {
|
|
26
|
-
|
|
32
|
+
withGlobalProvider as default
|
|
27
33
|
};
|
|
28
|
-
//# sourceMappingURL=withGlobalProvider.js.map
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { CONFIG_TRANSLATIONS_NAMESPACE
|
|
3
|
-
import { useTranslation
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { CONFIG_TRANSLATIONS_NAMESPACE } from "@hitachivantara/app-shell-shared";
|
|
3
|
+
import { useTranslation } from "react-i18next";
|
|
4
|
+
import Hitachi from "./Logos/Hitachi.js";
|
|
5
|
+
import Lumada from "./Logos/Lumada.js";
|
|
6
|
+
import Pentaho from "./Logos/Pentaho.js";
|
|
7
|
+
const BrandLogo = ({
|
|
8
|
+
logo
|
|
8
9
|
}) => {
|
|
9
10
|
const {
|
|
10
|
-
t:
|
|
11
|
-
} =
|
|
12
|
-
if (!
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
t: tConfig
|
|
12
|
+
} = useTranslation(CONFIG_TRANSLATIONS_NAMESPACE);
|
|
13
|
+
if (!logo) {
|
|
14
|
+
if (logo === null) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return /* @__PURE__ */ jsx(Hitachi, {});
|
|
18
|
+
}
|
|
19
|
+
const description = logo.description != null ? tConfig(logo.description) : void 0;
|
|
20
|
+
if (logo.name === "LUMADA") {
|
|
21
|
+
return /* @__PURE__ */ jsx(Lumada, { description });
|
|
22
|
+
}
|
|
23
|
+
if (logo.name === "PENTAHO+") {
|
|
24
|
+
return /* @__PURE__ */ jsx(Pentaho, { description });
|
|
25
|
+
}
|
|
26
|
+
return /* @__PURE__ */ jsx(Hitachi, { description });
|
|
27
|
+
};
|
|
28
|
+
const BrandLogo$1 = BrandLogo;
|
|
17
29
|
export {
|
|
18
|
-
|
|
30
|
+
BrandLogo$1 as default
|
|
19
31
|
};
|
|
20
|
-
//# sourceMappingURL=BrandLogo.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { theme } from "@hitachivantara/uikit-react-core";
|
|
3
|
+
const Hitachi = ({
|
|
4
|
+
description = "Hitachi logo",
|
|
5
|
+
letteringColor
|
|
6
|
+
}) => {
|
|
7
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", x: 0, y: 0, width: "72px", height: "20px", viewBox: "0 0 80.5 16.9", xmlSpace: "preserve", "aria-label": description, children: /* @__PURE__ */ jsx("path", { fill: letteringColor ?? theme.colors.secondary, d: "M63.6 2.5v4.7H70V2.5h3.1v11.9H70V9.2h-6.3v5.2h-3.1V2.5h3zM33.9 2.5v2h-4.8v9.8H26V4.5h-4.8v-2h12.7zM46 14.3h-3.5l-1-2.6h-5.9l-1 2.6h-3.5l5.5-11.9h3.8L46 14.3zm-7.4-9.8-2.2 5.4h4.4l-2.2-5.4M75.6 2.5h3.1v11.9h-3.1zM4.9 2.5v4.7h6.3V2.5h3.1v11.9h-3.1V9.2H4.9v5.2H1.7V2.5h3.2zM16.9 2.5H20v11.9h-3.1zM45.9 11c-.3-.8-.4-1.6-.4-2.5 0-1.2.2-2.4.8-3.4.6-1 1.5-1.8 2.7-2.2 1.1-.4 2.2-.6 3.5-.6 1.4 0 2.7.3 4 .8 1.1.5 2 1.5 2.2 2.7.1.3.1.5.1.8h-3.3c0-.3-.1-.6-.2-.9-.3-.6-.8-1.2-1.5-1.4-.4-.1-.9-.2-1.4-.2-.5 0-1.1.1-1.5.3-.8.3-1.4.9-1.7 1.7-.3.8-.4 1.6-.4 2.5 0 .7.1 1.4.3 2.1.2.9.9 1.6 1.7 1.9.5.2 1.1.3 1.7.3.5 0 1-.1 1.5-.2.6-.2 1.1-.6 1.4-1.2.2-.4.3-.8.3-1.3H59c0 .4-.1.8-.2 1.1-.3 1.2-1.1 2.2-2.2 2.6-1.2.5-2.6.8-4 .8-1.1 0-2.2-.2-3.2-.5-1.6-.6-2.9-1.7-3.5-3.2z" }) });
|
|
8
|
+
};
|
|
9
|
+
const Hitachi$1 = Hitachi;
|
|
10
|
+
export {
|
|
11
|
+
Hitachi$1 as default
|
|
12
|
+
};
|