@hitachivantara/app-shell-ui 1.12.3 → 1.13.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.
@@ -5,7 +5,6 @@ import { RouterProvider, createBrowserRouter, Outlet } from "react-router-dom";
5
5
  import { useHvAppShellConfig, useHvAppShellCombinedProviders } from "@hitachivantara/app-shell-shared";
6
6
  import { HvContainer } from "@hitachivantara/uikit-react-core";
7
7
  import LoadingPage from "../../pages/LoadingPage/LoadingPage.js";
8
- import getBasePath from "../../utils/basePathUtils.js";
9
8
  import { getAppIdFromBundle } from "../../utils/navigationUtil.js";
10
9
  import GenericError from "../../pages/GenericError/GenericError.js";
11
10
  import Root from "../../pages/Root/Root.js";
@@ -90,7 +89,7 @@ function renderErrorRoutes(mainPanel) {
90
89
  ];
91
90
  }
92
91
  const AppShellRoutes = () => {
93
- const config = useHvAppShellConfig();
92
+ const { baseUrl, mainPanel, services } = useHvAppShellConfig();
94
93
  const { providers } = useHvAppShellCombinedProviders();
95
94
  return /* @__PURE__ */ jsx(
96
95
  RouterProvider,
@@ -99,16 +98,16 @@ const AppShellRoutes = () => {
99
98
  router: createBrowserRouter(
100
99
  [
101
100
  {
102
- element: /* @__PURE__ */ jsx(Root, { providers }),
101
+ element: /* @__PURE__ */ jsx(Root, { providers, services }),
103
102
  // All routes live inside `RootRoute`
104
103
  errorElement: /* @__PURE__ */ jsx(GenericError, { fullPage: true }),
105
104
  children: [
106
- ...renderRoutes(config.mainPanel),
107
- ...renderErrorRoutes(config.mainPanel)
105
+ ...renderRoutes(mainPanel),
106
+ ...renderErrorRoutes(mainPanel)
108
107
  ]
109
108
  }
110
109
  ],
111
- { basename: getBasePath(config) }
110
+ { basename: baseUrl ?? "/" }
112
111
  )
113
112
  }
114
113
  );
@@ -53,20 +53,23 @@ const VerticalNavigation = () => {
53
53
  useIcons: true,
54
54
  slider: isCompactMode,
55
55
  children: [
56
- isPentahoTheme ? /* @__PURE__ */ jsx(NavigationHeader, { isOpen: open }) : /* @__PURE__ */ jsx(
57
- HvVerticalNavigationHeader,
58
- {
59
- title: t("title"),
60
- onCollapseButtonClick: !isCompactMode ? switchVerticalNavigationMode : void 0,
61
- collapseButtonProps: {
62
- "aria-label": t(open ? "ariaLabelCollapse" : "ariaLabelExpand"),
63
- "aria-expanded": open
64
- },
65
- backButtonProps: {
66
- "aria-label": t("ariaLabelHeaderBackButton")
56
+ /* @__PURE__ */ jsxs("div", { children: [
57
+ isPentahoTheme && /* @__PURE__ */ jsx(NavigationHeader, { isOpen: open }),
58
+ (!isPentahoTheme || isCompactMode) && /* @__PURE__ */ jsx(
59
+ HvVerticalNavigationHeader,
60
+ {
61
+ title: t("title"),
62
+ onCollapseButtonClick: !isCompactMode ? switchVerticalNavigationMode : void 0,
63
+ collapseButtonProps: {
64
+ "aria-label": t(open ? "ariaLabelCollapse" : "ariaLabelExpand"),
65
+ "aria-expanded": open
66
+ },
67
+ backButtonProps: {
68
+ "aria-label": t("ariaLabelHeaderBackButton")
69
+ }
67
70
  }
68
- }
69
- ),
71
+ )
72
+ ] }),
70
73
  /* @__PURE__ */ jsx(
71
74
  HvVerticalNavigationTree,
72
75
  {
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Suspense } from "react";
3
3
  import { ErrorBoundary } from "react-error-boundary";
4
4
  import { Outlet } from "react-router-dom";
5
+ import ServiceManagerProvider from "@hitachivantara/app-shell-services";
5
6
  import { BannerProvider } from "../../providers/BannerProvider.js";
6
7
  import { NavigationProvider } from "../../providers/NavigationProvider.js";
7
8
  import CombinedProviders from "../../utils/CombinedProviders.js";
@@ -10,11 +11,11 @@ import CustomHooksInitializer from "../../components/CustomHooksInitializer/Cust
10
11
  import Header from "../../components/layout/Header/Header.js";
11
12
  import Main from "../../components/layout/Main/Main.js";
12
13
  import GenericError from "../GenericError/GenericError.js";
13
- const Root = ({ providers }) => /* @__PURE__ */ jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsx(GenericError, { fullPage: true }), children: /* @__PURE__ */ jsx(CombinedProviders, { providers, children: /* @__PURE__ */ jsx(NavigationProvider, { children: /* @__PURE__ */ jsxs(BannerProvider, { children: [
14
+ const Root = ({ providers, services }) => /* @__PURE__ */ jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsx(GenericError, { fullPage: true }), children: /* @__PURE__ */ jsx(ServiceManagerProvider, { config: { services }, children: /* @__PURE__ */ jsx(CombinedProviders, { providers, children: /* @__PURE__ */ jsx(NavigationProvider, { children: /* @__PURE__ */ jsxs(BannerProvider, { children: [
14
15
  /* @__PURE__ */ jsx(CustomHooksInitializer, {}),
15
16
  /* @__PURE__ */ jsx(Header, {}),
16
17
  /* @__PURE__ */ jsx(Main, { children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingPage, {}), children: /* @__PURE__ */ jsx(Outlet, {}) }) })
17
- ] }) }) }) });
18
+ ] }) }) }) }) });
18
19
  export {
19
20
  Root as default
20
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/app-shell-ui",
3
- "version": "1.12.3",
3
+ "version": "1.13.1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "author": "Hitachi Vantara UI Kit Team",
@@ -19,10 +19,11 @@
19
19
  "@emotion/react": "^11.10.5",
20
20
  "@emotion/styled": "^11.10.5",
21
21
  "@hitachivantara/app-shell-events": "^1.1.2",
22
- "@hitachivantara/app-shell-navigation": "^1.4.9",
23
- "@hitachivantara/app-shell-shared": "^1.6.3",
24
- "@hitachivantara/uikit-react-core": "^5.103.0",
25
- "@hitachivantara/uikit-react-icons": "^5.16.4",
22
+ "@hitachivantara/app-shell-navigation": "^1.4.11",
23
+ "@hitachivantara/app-shell-services": "^1.1.0",
24
+ "@hitachivantara/app-shell-shared": "^1.7.1",
25
+ "@hitachivantara/uikit-react-core": "^5.104.1",
26
+ "@hitachivantara/uikit-react-icons": "^5.16.5",
26
27
  "@mui/material": "^5.16.14",
27
28
  "i18next": "^24.2.2",
28
29
  "i18next-browser-languagedetector": "^8.0.3",
@@ -43,7 +44,7 @@
43
44
  "access": "public",
44
45
  "directory": "package"
45
46
  },
46
- "gitHead": "5799882b08854f3714634028eddac77ca7ece8ea",
47
+ "gitHead": "108aeb035cc208aa2603071db6d10135d1501f7e",
47
48
  "exports": {
48
49
  ".": {
49
50
  "types": "./dist/types/index.d.ts",
@@ -1,6 +0,0 @@
1
- const getBasePath = (config) => {
2
- return config?.baseUrl ?? "/";
3
- };
4
- export {
5
- getBasePath as default
6
- };