@hitachivantara/app-shell-ui 2.3.2 → 2.3.3

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 (62) hide show
  1. package/dist/components/AppShell/AppShell.js +16 -5
  2. package/dist/components/AppShell/AppShellContainer.js +75 -66
  3. package/dist/components/AppShell/AppShellRouter.js +98 -109
  4. package/dist/components/AppShellI18nProvider/AppShellI18nProvider.js +19 -25
  5. package/dist/components/AppShellProvider/AppShellProvider.js +84 -91
  6. package/dist/components/AppShellViewProvider/AppShellViewProvider.js +10 -7
  7. package/dist/components/ConfigIcon.js +13 -15
  8. package/dist/components/CustomHooksInitializer/CustomHooksInitializer.js +7 -7
  9. package/dist/components/GlobalStyles.js +11 -9
  10. package/dist/components/IconUiKit/IconUiKit.js +10 -8
  11. package/dist/components/InitErrorFallback/InitErrorFallback.js +31 -23
  12. package/dist/components/SnackbarProvider/SnackbarProvider.js +17 -20
  13. package/dist/components/layout/AppShellLayout.js +50 -65
  14. package/dist/components/layout/BrandLogo/BrandLogo.js +25 -35
  15. package/dist/components/layout/BrandLogo/logos.js +38 -55
  16. package/dist/components/layout/Header/Header.js +55 -74
  17. package/dist/components/layout/HeaderActions/AppSwitcherToggle/AppSwitcherToggle.js +66 -74
  18. package/dist/components/layout/HeaderActions/AppSwitcherToggle/styles.js +12 -12
  19. package/dist/components/layout/HeaderActions/ColorModeSwitcher.js +23 -26
  20. package/dist/components/layout/HeaderActions/DynamicAction.js +22 -21
  21. package/dist/components/layout/HeaderActions/HeaderActions.js +15 -22
  22. package/dist/components/layout/HeaderActions/HelpButton/HelpButton.js +22 -31
  23. package/dist/components/layout/HeaderActions/InternalAction/InternalAction.js +25 -36
  24. package/dist/components/layout/VerticalNavigation/NavigationCollapse.js +29 -34
  25. package/dist/components/layout/VerticalNavigation/NavigationHeader.js +18 -20
  26. package/dist/components/layout/VerticalNavigation/VerticalNavigation.js +96 -130
  27. package/dist/hooks/useClearLocationState.js +10 -12
  28. package/dist/hooks/useConditionsEvaluator.js +67 -81
  29. package/dist/hooks/useCustomEventListener.js +16 -28
  30. package/dist/hooks/useFilteredModel.js +30 -27
  31. package/dist/hooks/useLocalStorage.js +26 -26
  32. package/dist/hooks/useModelFromConfig.js +43 -39
  33. package/dist/hooks/useNavigationMenuItems.js +27 -30
  34. package/dist/hooks/useNotificationsEventListener.js +35 -42
  35. package/dist/hooks/useResizeObserver.js +13 -13
  36. package/dist/hooks/useThemeEventListener.js +17 -18
  37. package/dist/i18n/constants.js +5 -6
  38. package/dist/i18n/index.js +26 -20
  39. package/dist/i18n/useI18nInit.js +72 -66
  40. package/dist/index.js +4 -3
  41. package/dist/pages/ErrorPage/ErrorPage.js +33 -32
  42. package/dist/pages/ErrorPage/Footer.js +46 -55
  43. package/dist/pages/GenericError/CatServer.js +585 -569
  44. package/dist/pages/GenericError/GenericError.js +25 -26
  45. package/dist/pages/LoadingPage/LoadingPage.js +9 -17
  46. package/dist/pages/LoadingPage/index.js +4 -3
  47. package/dist/pages/NotFound/DogeSpace.js +505 -540
  48. package/dist/pages/NotFound/NotFound.js +17 -20
  49. package/dist/pages/NotFound/index.js +2 -4
  50. package/dist/pages/RootRoute.js +32 -19
  51. package/dist/providers/BannerProvider.js +98 -123
  52. package/dist/providers/LayoutProvider.js +26 -32
  53. package/dist/providers/NavigationProvider.js +96 -107
  54. package/dist/utils/CombinedProviders.js +12 -18
  55. package/dist/utils/documentUtil.js +12 -12
  56. package/dist/utils/filterModel.js +134 -170
  57. package/dist/utils/lazyImport.js +31 -36
  58. package/dist/utils/navigationUtil.js +68 -53
  59. package/dist/utils/processConfig.js +119 -153
  60. package/package.json +8 -8
  61. package/dist/components/IconUiKit/index.js +0 -6
  62. package/dist/pages/LoadingPage/styles.js +0 -30
@@ -1,35 +1,36 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { HvContainer, HvTypography, createClasses, theme } from "@hitachivantara/uikit-react-core";
3
1
  import { useNavigationContext } from "../../providers/NavigationProvider.js";
4
2
  import { Footer } from "./Footer.js";
5
- const { useClasses } = createClasses("ErrorPage", {
6
- root: {
7
- height: "100%",
8
- display: "flex",
9
- flexDirection: "column",
10
- paddingTop: theme.space.lg,
11
- paddingBottom: theme.space.lg,
12
- textAlign: "center",
13
- "& > svg": {
14
- flex: 1
15
- }
16
- }
17
- });
18
- const ErrorPage = ({
19
- code,
20
- title,
21
- image,
22
- includeFooter = true
23
- }) => {
24
- const { classes } = useClasses();
25
- const { isCompactMode } = useNavigationContext();
26
- return /* @__PURE__ */ jsxs(HvContainer, { maxWidth: "xl", className: classes.root, children: [
27
- code && /* @__PURE__ */ jsx(HvTypography, { variant: "title1", children: code }),
28
- /* @__PURE__ */ jsx(HvTypography, { variant: isCompactMode ? "title3" : "display", children: title }),
29
- image,
30
- includeFooter && /* @__PURE__ */ jsx(Footer, {})
31
- ] });
32
- };
33
- export {
34
- ErrorPage
3
+ import { HvContainer, HvTypography, createClasses, theme } from "@hitachivantara/uikit-react-core";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/pages/ErrorPage/ErrorPage.tsx
6
+ var { useClasses } = createClasses("ErrorPage", { root: {
7
+ height: "100%",
8
+ display: "flex",
9
+ flexDirection: "column",
10
+ paddingTop: theme.space.lg,
11
+ paddingBottom: theme.space.lg,
12
+ textAlign: "center",
13
+ "& > svg": { flex: 1 }
14
+ } });
15
+ var ErrorPage = ({ code, title, image, includeFooter = true }) => {
16
+ const { classes } = useClasses();
17
+ const { isCompactMode } = useNavigationContext();
18
+ return /* @__PURE__ */ jsxs(HvContainer, {
19
+ maxWidth: "xl",
20
+ className: classes.root,
21
+ children: [
22
+ code && /* @__PURE__ */ jsx(HvTypography, {
23
+ variant: "title1",
24
+ children: code
25
+ }),
26
+ /* @__PURE__ */ jsx(HvTypography, {
27
+ variant: isCompactMode ? "title3" : "display",
28
+ children: title
29
+ }),
30
+ image,
31
+ includeFooter && /* @__PURE__ */ jsx(Footer, {})
32
+ ]
33
+ });
35
34
  };
35
+ //#endregion
36
+ export { ErrorPage };
@@ -1,58 +1,49 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { useNavigationContext } from "../../providers/NavigationProvider.js";
2
2
  import { useErrorBoundary } from "react-error-boundary";
3
- import { useTranslation, Trans } from "react-i18next";
4
- import { useHvNavigation } from "@hitachivantara/app-shell-navigation";
5
- import { useHvAppShellRuntimeContext, useHvAppShellModel } from "@hitachivantara/app-shell-shared";
3
+ import { Trans, useTranslation } from "react-i18next";
6
4
  import { HvTypography } from "@hitachivantara/uikit-react-core";
7
- import { useNavigationContext } from "../../providers/NavigationProvider.js";
8
- const Footer = () => {
9
- const { i18n } = useHvAppShellRuntimeContext();
10
- const { t } = useTranslation(void 0, { i18n });
11
- const { navigate } = useHvNavigation();
12
- const { navigationMode } = useHvAppShellModel();
13
- const { resetBoundary } = useErrorBoundary();
14
- const { items, verticalNavigationItems, isCompactMode } = useNavigationContext();
15
- const getFirstMenuItem = () => {
16
- if (!isCompactMode && navigationMode !== "ONLY_LEFT") {
17
- return items.length > 0 ? items[0] : null;
18
- }
19
- return verticalNavigationItems.length > 0 ? verticalNavigationItems[0] : null;
20
- };
21
- const firstMenuItem = getFirstMenuItem();
22
- const handleClick = (event) => {
23
- event.preventDefault();
24
- if (firstMenuItem?.href) {
25
- resetBoundary();
26
- let path = firstMenuItem.href;
27
- if (path.startsWith(".")) {
28
- path = path.slice(1);
29
- }
30
- navigate(path);
31
- }
32
- };
33
- if (!firstMenuItem) return null;
34
- return /* @__PURE__ */ jsx(HvTypography, { variant: "body", children: /* @__PURE__ */ jsx(
35
- Trans,
36
- {
37
- t,
38
- i18nKey: "errors.footer",
39
- values: { label: firstMenuItem.label },
40
- components: {
41
- navigate: /* @__PURE__ */ jsx(
42
- HvTypography,
43
- {
44
- link: true,
45
- component: "a",
46
- href: firstMenuItem.href,
47
- variant: "label",
48
- onClick: handleClick,
49
- children: firstMenuItem.label
50
- }
51
- )
52
- }
53
- }
54
- ) });
55
- };
56
- export {
57
- Footer
5
+ import { useHvAppShellModel, useHvAppShellRuntimeContext } from "@hitachivantara/app-shell-shared";
6
+ import { useHvNavigation } from "@hitachivantara/app-shell-navigation";
7
+ import { jsx } from "react/jsx-runtime";
8
+ //#region src/pages/ErrorPage/Footer.tsx
9
+ var Footer = () => {
10
+ const { i18n } = useHvAppShellRuntimeContext();
11
+ const { t } = useTranslation(void 0, { i18n });
12
+ const { navigate } = useHvNavigation();
13
+ const { navigationMode } = useHvAppShellModel();
14
+ const { resetBoundary } = useErrorBoundary();
15
+ const { items, verticalNavigationItems, isCompactMode } = useNavigationContext();
16
+ const getFirstMenuItem = () => {
17
+ if (!isCompactMode && navigationMode !== "ONLY_LEFT") return items.length > 0 ? items[0] : null;
18
+ return verticalNavigationItems.length > 0 ? verticalNavigationItems[0] : null;
19
+ };
20
+ const firstMenuItem = getFirstMenuItem();
21
+ const handleClick = (event) => {
22
+ event.preventDefault();
23
+ if (firstMenuItem?.href) {
24
+ resetBoundary();
25
+ let path = firstMenuItem.href;
26
+ if (path.startsWith(".")) path = path.slice(1);
27
+ navigate(path);
28
+ }
29
+ };
30
+ if (!firstMenuItem) return null;
31
+ return /* @__PURE__ */ jsx(HvTypography, {
32
+ variant: "body",
33
+ children: /* @__PURE__ */ jsx(Trans, {
34
+ t,
35
+ i18nKey: "errors.footer",
36
+ values: { label: firstMenuItem.label },
37
+ components: { navigate: /* @__PURE__ */ jsx(HvTypography, {
38
+ link: true,
39
+ component: "a",
40
+ href: firstMenuItem.href,
41
+ variant: "label",
42
+ onClick: handleClick,
43
+ children: firstMenuItem.label
44
+ }) }
45
+ })
46
+ });
58
47
  };
48
+ //#endregion
49
+ export { Footer };