@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.
- package/dist/components/AppShell/AppShell.js +16 -5
- package/dist/components/AppShell/AppShellContainer.js +75 -66
- package/dist/components/AppShell/AppShellRouter.js +98 -109
- package/dist/components/AppShellI18nProvider/AppShellI18nProvider.js +19 -25
- package/dist/components/AppShellProvider/AppShellProvider.js +84 -91
- package/dist/components/AppShellViewProvider/AppShellViewProvider.js +10 -7
- package/dist/components/ConfigIcon.js +13 -15
- package/dist/components/CustomHooksInitializer/CustomHooksInitializer.js +7 -7
- package/dist/components/GlobalStyles.js +11 -9
- package/dist/components/IconUiKit/IconUiKit.js +10 -8
- package/dist/components/InitErrorFallback/InitErrorFallback.js +31 -23
- package/dist/components/SnackbarProvider/SnackbarProvider.js +17 -20
- package/dist/components/layout/AppShellLayout.js +50 -65
- package/dist/components/layout/BrandLogo/BrandLogo.js +25 -35
- package/dist/components/layout/BrandLogo/logos.js +38 -55
- package/dist/components/layout/Header/Header.js +55 -74
- package/dist/components/layout/HeaderActions/AppSwitcherToggle/AppSwitcherToggle.js +66 -74
- package/dist/components/layout/HeaderActions/AppSwitcherToggle/styles.js +12 -12
- package/dist/components/layout/HeaderActions/ColorModeSwitcher.js +23 -26
- package/dist/components/layout/HeaderActions/DynamicAction.js +22 -21
- package/dist/components/layout/HeaderActions/HeaderActions.js +15 -22
- package/dist/components/layout/HeaderActions/HelpButton/HelpButton.js +22 -31
- package/dist/components/layout/HeaderActions/InternalAction/InternalAction.js +25 -36
- package/dist/components/layout/VerticalNavigation/NavigationCollapse.js +29 -34
- package/dist/components/layout/VerticalNavigation/NavigationHeader.js +18 -20
- package/dist/components/layout/VerticalNavigation/VerticalNavigation.js +96 -130
- package/dist/hooks/useClearLocationState.js +10 -12
- package/dist/hooks/useConditionsEvaluator.js +67 -81
- package/dist/hooks/useCustomEventListener.js +16 -28
- package/dist/hooks/useFilteredModel.js +30 -27
- package/dist/hooks/useLocalStorage.js +26 -26
- package/dist/hooks/useModelFromConfig.js +43 -39
- package/dist/hooks/useNavigationMenuItems.js +27 -30
- package/dist/hooks/useNotificationsEventListener.js +35 -42
- package/dist/hooks/useResizeObserver.js +13 -13
- package/dist/hooks/useThemeEventListener.js +17 -18
- package/dist/i18n/constants.js +5 -6
- package/dist/i18n/index.js +26 -20
- package/dist/i18n/useI18nInit.js +72 -66
- package/dist/index.js +4 -3
- package/dist/pages/ErrorPage/ErrorPage.js +33 -32
- package/dist/pages/ErrorPage/Footer.js +46 -55
- package/dist/pages/GenericError/CatServer.js +585 -569
- package/dist/pages/GenericError/GenericError.js +25 -26
- package/dist/pages/LoadingPage/LoadingPage.js +9 -17
- package/dist/pages/LoadingPage/index.js +4 -3
- package/dist/pages/NotFound/DogeSpace.js +505 -540
- package/dist/pages/NotFound/NotFound.js +17 -20
- package/dist/pages/NotFound/index.js +2 -4
- package/dist/pages/RootRoute.js +32 -19
- package/dist/providers/BannerProvider.js +98 -123
- package/dist/providers/LayoutProvider.js +26 -32
- package/dist/providers/NavigationProvider.js +96 -107
- package/dist/utils/CombinedProviders.js +12 -18
- package/dist/utils/documentUtil.js +12 -12
- package/dist/utils/filterModel.js +134 -170
- package/dist/utils/lazyImport.js +31 -36
- package/dist/utils/navigationUtil.js +68 -53
- package/dist/utils/processConfig.js +119 -153
- package/package.json +8 -8
- package/dist/components/IconUiKit/index.js +0 -6
- 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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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 {
|
|
1
|
+
import { useNavigationContext } from "../../providers/NavigationProvider.js";
|
|
2
2
|
import { useErrorBoundary } from "react-error-boundary";
|
|
3
|
-
import {
|
|
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 {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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 };
|