@hitachivantara/app-shell-ui 1.1.0 → 1.2.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/AppShellRoutes/AppShellRoutes.js +56 -24
- package/dist/esm/components/AppShellRoutes/AppShellRoutes.js.map +1 -1
- package/dist/esm/components/hoc/withClickAwayListener.js +8 -8
- package/dist/esm/components/hoc/withClickAwayListener.js.map +1 -1
- package/dist/esm/components/hoc/withGlobalProvider.js +12 -12
- package/dist/esm/components/hoc/withGlobalProvider.js.map +1 -1
- package/dist/esm/components/layout/Main/Main.js +16 -20
- package/dist/esm/components/layout/Main/Main.js.map +1 -1
- package/dist/esm/components/layout/Main/styles.js +7 -8
- package/dist/esm/components/layout/Main/styles.js.map +1 -1
- package/dist/esm/components/layout/VerticalNavigation/VerticalNavigation.js +41 -38
- package/dist/esm/components/layout/VerticalNavigation/VerticalNavigation.js.map +1 -1
- package/dist/esm/components/layout/VerticalNavigation/styles.js +31 -18
- package/dist/esm/components/layout/VerticalNavigation/styles.js.map +1 -1
- package/dist/esm/lib/hooks/useClearLocationState.js +5 -5
- package/dist/esm/lib/hooks/useClearLocationState.js.map +1 -1
- package/dist/esm/lib/hooks/useCustomEventListener.js +3 -3
- package/dist/esm/lib/hooks/useCustomEventListener.js.map +1 -1
- package/dist/esm/lib/hooks/useLocalStorage.js +7 -7
- package/dist/esm/lib/hooks/useLocalStorage.js.map +1 -1
- package/dist/esm/lib/hooks/useNavigationMenuItems.js +7 -7
- package/dist/esm/lib/hooks/useNavigationMenuItems.js.map +1 -1
- package/dist/esm/lib/hooks/useNotificationsEventListener.js +12 -12
- package/dist/esm/lib/hooks/useNotificationsEventListener.js.map +1 -1
- package/dist/esm/lib/hooks/useThemeEventListener.js +8 -8
- package/dist/esm/lib/hooks/useThemeEventListener.js.map +1 -1
- package/dist/esm/lib/i18n/index.js +4 -4
- package/dist/esm/lib/i18n/index.js.map +1 -1
- package/dist/esm/lib/utils/basePathUtils.js +2 -2
- package/dist/esm/lib/utils/basePathUtils.js.map +1 -1
- package/dist/esm/lib/utils/documentUtil.js +2 -2
- package/dist/esm/lib/utils/documentUtil.js.map +1 -1
- package/dist/esm/lib/utils/textUtil.js +2 -2
- package/dist/esm/lib/utils/textUtil.js.map +1 -1
- package/dist/esm/pages/ErrorPage/styles.js +12 -13
- package/dist/esm/pages/ErrorPage/styles.js.map +1 -1
- package/dist/esm/pages/LoadingPage/styles.js +5 -6
- package/dist/esm/pages/LoadingPage/styles.js.map +1 -1
- package/dist/esm/providers/BannerProvider.js +43 -44
- package/dist/esm/providers/BannerProvider.js.map +1 -1
- package/dist/esm/providers/hooks/useBannerContext.js +7 -7
- package/dist/esm/providers/hooks/useBannerContext.js.map +1 -1
- package/dist/esm/providers/hooks/useLayoutContext.js +6 -6
- package/dist/esm/providers/hooks/useLayoutContext.js.map +1 -1
- package/dist/esm/providers/hooks/useNavigationContext.js +6 -6
- package/dist/esm/providers/hooks/useNavigationContext.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../../src/components/layout/VerticalNavigation/styles.ts"],"sourcesContent":["import { css } from \"@emotion/css\";\nimport
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../../src/components/layout/VerticalNavigation/styles.ts"],"sourcesContent":["import { css } from \"@emotion/css\";\nimport {\n theme,\n verticalNavigationTreeClasses\n} from \"@hitachivantara/uikit-react-core\";\n\nexport const classes = {\n navigation: css({\n height: `calc(100vh - ${theme.header.height})`,\n top: theme.header.height,\n zIndex: theme.zIndices.overlay,\n position: \"sticky\"\n }),\n navigationCompact: css({\n position: \"fixed\"\n }),\n navigationPopup: css({\n maxHeight: `calc(100vh - ${theme.header.height})`,\n overflowY: \"auto\",\n boxShadow: theme.colors.shadow,\n [`& .${verticalNavigationTreeClasses.popup}`]: { boxShadow: \"none\" }\n })\n};\n"],"names":["classes","navigation","css","height","theme","header","top","zIndex","zIndices","overlay","position","process","env","NODE_ENV","navigationCompact","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","navigationPopup","maxHeight","overflowY","boxShadow","colors","shadow","verticalNavigationTreeClasses","popup"],"mappings":";;;;;AAMO,MAAMA,IAAU;AAAA,EACrBC,YAAgB,gBAAAC,EAAA;AAAA,IACdC,QAAS,gBAAeC,EAAMC,OAAOF,MAAO;AAAA,IAC5CG,KAAKF,EAAMC,OAAOF;AAAAA,IAClBI,QAAQH,EAAMI,SAASC;AAAAA,IACvBC,UAAU;AAAA,EACXC,GAAAA,QAAAC,IAAAC,aAAAF,eAAAA,KAAAA,sBAAAA,QAAAC,IAAAC,aAAC,eAAA,KAAA,6yCAAA;AAAA,EACFC,mBAAmBZ,gBAAAA,EAAGS,QAAAC,IAAAC,aAAA,eAAA;AAAA,IAAAE,MAAA;AAAA,IAAAC,QAAA;AAAA,EAAA,IAAA;AAAA,IAAAD,MAAA;AAAA,IAAAC,QAAA;AAAA,IAAAC,KAAA;AAAA,IAAAC,UAAAC;AAAAA,EAAAA,CAErB;AAAA,EACDC,iBAAqB,gBAAAlB,EAAA;AAAA,IACnBmB,WAAY,gBAAejB,EAAMC,OAAOF,MAAO;AAAA,IAC/CmB,WAAW;AAAA,IACXC,WAAWnB,EAAMoB,OAAOC;AAAAA,IACxB,CAAE,MAAKC,EAA8BC,KAAM,EAAC,GAAG;AAAA,MAAEJ,WAAW;AAAA,IAAO;AAAA,EACpEZ,GAAAA,QAAAC,IAAAC,aAAA,eAAA,KAAA,2BAAAF,QAAAC,IAAAC,aAAA,eAAA,KAAA,izCAAA;AACH;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useCallback as a } from "react";
|
|
2
2
|
import { useLocation as e, useBeforeUnload as r } from "react-router-dom";
|
|
3
|
-
import { useHvNavigation as
|
|
4
|
-
const
|
|
3
|
+
import { useHvNavigation as i } from "@hitachivantara/app-shell-navigation";
|
|
4
|
+
const l = () => {
|
|
5
5
|
const o = e(), {
|
|
6
6
|
navigate: t
|
|
7
|
-
} =
|
|
7
|
+
} = i();
|
|
8
8
|
r(a(() => {
|
|
9
9
|
t({
|
|
10
10
|
...o
|
|
@@ -12,8 +12,8 @@ const s = () => {
|
|
|
12
12
|
replace: !0
|
|
13
13
|
});
|
|
14
14
|
}, [o, t]));
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
l as default
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=useClearLocationState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClearLocationState.js","sources":["../../../../src/lib/hooks/useClearLocationState.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { useBeforeUnload, useLocation } from \"react-router-dom\";\n\nimport { useHvNavigation } from \"@hitachivantara/app-shell-navigation\";\n\nconst useClearLocationState = () => {\n const location = useLocation();\n const { navigate } = useHvNavigation();\n\n // This will only be called when the user reloads the page or navigates away from the app and is required when\n // the configuration changes (refresh is mandatory) so that useLocation `state` property is reset.\n useBeforeUnload(\n useCallback(() => {\n navigate({ ...location }, { replace: true });\n }, [location, navigate])\n );\n};\n\nexport default useClearLocationState;\n"],"names":["useClearLocationState","location","useLocation","navigate","useHvNavigation","useBeforeUnload","useCallback","replace"
|
|
1
|
+
{"version":3,"file":"useClearLocationState.js","sources":["../../../../src/lib/hooks/useClearLocationState.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { useBeforeUnload, useLocation } from \"react-router-dom\";\n\nimport { useHvNavigation } from \"@hitachivantara/app-shell-navigation\";\n\nconst useClearLocationState = () => {\n const location = useLocation();\n const { navigate } = useHvNavigation();\n\n // This will only be called when the user reloads the page or navigates away from the app and is required when\n // the configuration changes (refresh is mandatory) so that useLocation `state` property is reset.\n useBeforeUnload(\n useCallback(() => {\n navigate({ ...location }, { replace: true });\n }, [location, navigate])\n );\n};\n\nexport default useClearLocationState;\n"],"names":["useClearLocationState","location","useLocation","navigate","useHvNavigation","useBeforeUnload","useCallback","replace"],"mappings":";;;AAKA,MAAMA,IAAwBA,MAAM;AAClC,QAAMC,IAAWC,KACX;AAAA,IAAEC,UAAAA;AAAAA,MAAaC,EAAgB;AAIrCC,EAAAA,EACEC,EAAY,MAAM;AACP,IAAAH,EAAA;AAAA,MAAE,GAAGF;AAAAA,IAAAA,GAAY;AAAA,MAAEM,SAAS;AAAA,IAAA,CAAM;AAAA,EAC1C,GAAA,CAACN,GAAUE,CAAQ,CAAC,CACzB;AACF;"}
|
|
@@ -2,7 +2,7 @@ import { useEffect as o } from "react";
|
|
|
2
2
|
import { HvAppShellEventNotificationTrigger as n, HvAppShellEventThemeTrigger as i } from "@hitachivantara/app-shell-events";
|
|
3
3
|
import r from "./useNotificationsEventListener.js";
|
|
4
4
|
import s from "./useThemeEventListener.js";
|
|
5
|
-
const
|
|
5
|
+
const E = () => {
|
|
6
6
|
const {
|
|
7
7
|
handleNotificationEvent: e
|
|
8
8
|
} = r(), {
|
|
@@ -11,8 +11,8 @@ const v = () => {
|
|
|
11
11
|
o(() => (globalThis.addEventListener(n, e), globalThis.addEventListener(i, t), () => {
|
|
12
12
|
globalThis.removeEventListener(n, e), globalThis.removeEventListener(i, t);
|
|
13
13
|
}), [e, t]);
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
E as default
|
|
17
17
|
};
|
|
18
18
|
//# sourceMappingURL=useCustomEventListener.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCustomEventListener.js","sources":["../../../../src/lib/hooks/useCustomEventListener.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport {\n HvAppShellEventThemeTrigger,\n HvAppShellEventNotificationTrigger\n} from \"@hitachivantara/app-shell-events\";\nimport useNotificationsEventListener from \"./useNotificationsEventListener\";\nimport useThemeEventListener from \"./useThemeEventListener\";\n\nconst useCustomEventListener = () => {\n const { handleNotificationEvent } = useNotificationsEventListener();\n const { handleThemeEvent } = useThemeEventListener();\n\n useEffect(() => {\n globalThis.addEventListener(\n HvAppShellEventNotificationTrigger,\n handleNotificationEvent as EventListener\n );\n globalThis.addEventListener(\n HvAppShellEventThemeTrigger,\n handleThemeEvent as EventListener\n );\n\n return () => {\n globalThis.removeEventListener(\n HvAppShellEventNotificationTrigger,\n handleNotificationEvent as EventListener\n );\n globalThis.removeEventListener(\n HvAppShellEventThemeTrigger,\n handleThemeEvent as EventListener\n );\n };\n }, [handleNotificationEvent, handleThemeEvent]);\n};\n\nexport default useCustomEventListener;\n"],"names":["useCustomEventListener","handleNotificationEvent","useNotificationsEventListener","handleThemeEvent","useThemeEventListener","useEffect","addEventListener","HvAppShellEventNotificationTrigger","HvAppShellEventThemeTrigger","removeEventListener"
|
|
1
|
+
{"version":3,"file":"useCustomEventListener.js","sources":["../../../../src/lib/hooks/useCustomEventListener.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport {\n HvAppShellEventThemeTrigger,\n HvAppShellEventNotificationTrigger\n} from \"@hitachivantara/app-shell-events\";\nimport useNotificationsEventListener from \"./useNotificationsEventListener\";\nimport useThemeEventListener from \"./useThemeEventListener\";\n\nconst useCustomEventListener = () => {\n const { handleNotificationEvent } = useNotificationsEventListener();\n const { handleThemeEvent } = useThemeEventListener();\n\n useEffect(() => {\n globalThis.addEventListener(\n HvAppShellEventNotificationTrigger,\n handleNotificationEvent as EventListener\n );\n globalThis.addEventListener(\n HvAppShellEventThemeTrigger,\n handleThemeEvent as EventListener\n );\n\n return () => {\n globalThis.removeEventListener(\n HvAppShellEventNotificationTrigger,\n handleNotificationEvent as EventListener\n );\n globalThis.removeEventListener(\n HvAppShellEventThemeTrigger,\n handleThemeEvent as EventListener\n );\n };\n }, [handleNotificationEvent, handleThemeEvent]);\n};\n\nexport default useCustomEventListener;\n"],"names":["useCustomEventListener","handleNotificationEvent","useNotificationsEventListener","handleThemeEvent","useThemeEventListener","useEffect","addEventListener","HvAppShellEventNotificationTrigger","HvAppShellEventThemeTrigger","removeEventListener"],"mappings":";;;;AAQA,MAAMA,IAAyBA,MAAM;AAC7B,QAAA;AAAA,IAAEC,yBAAAA;AAAAA,MAA4BC,EAA8B,GAC5D;AAAA,IAAEC,kBAAAA;AAAAA,MAAqBC,EAAsB;AAEnDC,EAAAA,EAAU,OACGC,WAAAA,iBACTC,GACAN,CACF,GACWK,WAAAA,iBACTE,GACAL,CACF,GAEO,MAAM;AACAM,eAAAA,oBACTF,GACAN,CACF,GACWQ,WAAAA,oBACTD,GACAL,CACF;AAAA,EAAA,IAED,CAACF,GAAyBE,CAAgB,CAAC;AAChD;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useState as n, useEffect as
|
|
2
|
-
const
|
|
1
|
+
import { useState as n, useEffect as l } from "react";
|
|
2
|
+
const u = {
|
|
3
3
|
COLOR_MODE: "hv/user-preferences/color-mode"
|
|
4
|
-
},
|
|
4
|
+
}, d = (e) => {
|
|
5
5
|
const [r, a] = n(() => localStorage.getItem(e)), s = (t) => {
|
|
6
6
|
localStorage.setItem(e, t);
|
|
7
7
|
};
|
|
8
|
-
return
|
|
8
|
+
return l(() => {
|
|
9
9
|
const t = (o) => {
|
|
10
10
|
o.key === e && a(o.newValue);
|
|
11
11
|
};
|
|
@@ -16,9 +16,9 @@ const g = {
|
|
|
16
16
|
value: r,
|
|
17
17
|
setStoredValue: s
|
|
18
18
|
};
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
u as LOCAL_STORAGE_KEYS,
|
|
22
|
+
d as default
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=useLocalStorage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocalStorage.js","sources":["../../../../src/lib/hooks/useLocalStorage.ts"],"sourcesContent":["import { useState, useEffect } from \"react\";\n\nexport const LOCAL_STORAGE_KEYS = {\n COLOR_MODE: \"hv/user-preferences/color-mode\"\n};\n\nconst useLocalStorage = (key: string) => {\n const [value, setValue] = useState(() => localStorage.getItem(key));\n\n const setStoredValue = (newValue: string) => {\n localStorage.setItem(key, newValue);\n };\n\n useEffect(() => {\n const handleStorageChange = (event: StorageEvent) => {\n if (event.key === key) {\n setValue(event.newValue);\n }\n };\n\n window.addEventListener(\"storage\", handleStorageChange);\n\n return () => {\n window.removeEventListener(\"storage\", handleStorageChange);\n };\n }, [key]);\n\n return { value, setStoredValue };\n};\n\nexport default useLocalStorage;\n"],"names":["LOCAL_STORAGE_KEYS","COLOR_MODE","useLocalStorage","key","value","setValue","useState","localStorage","getItem","setStoredValue","newValue","setItem","useEffect","handleStorageChange","event","addEventListener","removeEventListener"
|
|
1
|
+
{"version":3,"file":"useLocalStorage.js","sources":["../../../../src/lib/hooks/useLocalStorage.ts"],"sourcesContent":["import { useState, useEffect } from \"react\";\n\nexport const LOCAL_STORAGE_KEYS = {\n COLOR_MODE: \"hv/user-preferences/color-mode\"\n};\n\nconst useLocalStorage = (key: string) => {\n const [value, setValue] = useState(() => localStorage.getItem(key));\n\n const setStoredValue = (newValue: string) => {\n localStorage.setItem(key, newValue);\n };\n\n useEffect(() => {\n const handleStorageChange = (event: StorageEvent) => {\n if (event.key === key) {\n setValue(event.newValue);\n }\n };\n\n window.addEventListener(\"storage\", handleStorageChange);\n\n return () => {\n window.removeEventListener(\"storage\", handleStorageChange);\n };\n }, [key]);\n\n return { value, setStoredValue };\n};\n\nexport default useLocalStorage;\n"],"names":["LOCAL_STORAGE_KEYS","COLOR_MODE","useLocalStorage","key","value","setValue","useState","localStorage","getItem","setStoredValue","newValue","setItem","useEffect","handleStorageChange","event","addEventListener","removeEventListener"],"mappings":";AAEO,MAAMA,IAAqB;AAAA,EAChCC,YAAY;AACd,GAEMC,IAAkBA,CAACC,MAAgB;AACjC,QAAA,CAACC,GAAOC,CAAQ,IAAIC,EAAS,MAAMC,aAAaC,QAAQL,CAAG,CAAC,GAE5DM,IAAiBA,CAACC,MAAqB;AAC9BC,iBAAAA,QAAQR,GAAKO,CAAQ;AAAA,EAAA;AAGpCE,SAAAA,EAAU,MAAM;AACRC,UAAAA,IAAsBA,CAACC,MAAwB;AAC/CA,MAAAA,EAAMX,QAAQA,KAChBE,EAASS,EAAMJ,QAAQ;AAAA,IACzB;AAGKK,kBAAAA,iBAAiB,WAAWF,CAAmB,GAE/C,MAAM;AACJG,aAAAA,oBAAoB,WAAWH,CAAmB;AAAA,IAAA;AAAA,EAC3D,GACC,CAACV,CAAG,CAAC,GAED;AAAA,IAAEC,OAAAA;AAAAA,IAAOK,gBAAAA;AAAAA,EAAAA;AAClB;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useContext as c, useMemo as f, useEffect as
|
|
2
|
-
import { useLocation as
|
|
1
|
+
import { useContext as c, useMemo as f, useEffect as p } from "react";
|
|
2
|
+
import { useLocation as g } from "react-router-dom";
|
|
3
3
|
import { useHvAppShellConfig as v, HvAppShellRuntimeContext as M, CONFIG_TRANSLATIONS_NAMESPACE as I, useHvMenuItems as N } from "@hitachivantara/app-shell-shared";
|
|
4
4
|
import { useHvNavigation as d } from "@hitachivantara/app-shell-navigation";
|
|
5
5
|
import { createNavigationMenuItems as l } from "../utils/navigationUtil.js";
|
|
6
|
-
const A = 2,
|
|
6
|
+
const A = 2, H = () => {
|
|
7
7
|
const {
|
|
8
8
|
pathname: s
|
|
9
|
-
} =
|
|
9
|
+
} = g(), {
|
|
10
10
|
navigationMode: m
|
|
11
11
|
} = v(), {
|
|
12
12
|
navigate: i
|
|
@@ -18,7 +18,7 @@ const A = 2, T = () => {
|
|
|
18
18
|
selectedMenuItemId: n,
|
|
19
19
|
rootMenuItemId: u
|
|
20
20
|
} = N(), r = l(a, t, m === "ONLY_TOP" ? A : void 0);
|
|
21
|
-
return
|
|
21
|
+
return p(() => {
|
|
22
22
|
var o;
|
|
23
23
|
!n && s === "/" && ((o = t[0]) != null && o.href) && i(t[0].href);
|
|
24
24
|
}, [s, t, i, n]), {
|
|
@@ -26,8 +26,8 @@ const A = 2, T = () => {
|
|
|
26
26
|
selectedMenuItemId: n,
|
|
27
27
|
rootMenuItemId: u
|
|
28
28
|
};
|
|
29
|
-
}
|
|
29
|
+
};
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
H as default
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=useNavigationMenuItems.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNavigationMenuItems.js","sources":["../../../../src/lib/hooks/useNavigationMenuItems.tsx"],"sourcesContent":["import { useContext, useEffect, useMemo } from \"react\";\nimport { useLocation } from \"react-router-dom\";\n\nimport {\n CONFIG_TRANSLATIONS_NAMESPACE,\n HvAppShellRuntimeContext,\n useHvAppShellConfig,\n useHvMenuItems\n} from \"@hitachivantara/app-shell-shared\";\nimport { useHvNavigation } from \"@hitachivantara/app-shell-navigation\";\n\nimport { createNavigationMenuItems } from \"../utils/navigationUtil\";\nimport { MenuItemsContext } from \"../types\";\n\nconst MAX_TOP_MENU_DEPTH = 2;\n\nconst useNavigationMenuItems = (): MenuItemsContext => {\n // use the i18n instance from the app shell runtime context to ensure we're using\n // the app shell instance of i18n and not the one from the embedded app\n const { pathname } = useLocation();\n const { navigationMode } = useHvAppShellConfig();\n const { navigate } = useHvNavigation();\n const { i18n } = useContext(HvAppShellRuntimeContext) ?? {};\n const tConfig = useMemo(\n () =>\n i18n?.getFixedT(i18n.language, CONFIG_TRANSLATIONS_NAMESPACE) ??\n // should not happen, but fallback if the i18n instance is not available\n ((l: string) => l),\n [i18n]\n );\n\n const { items, selectedMenuItemId, rootMenuItemId } = useHvMenuItems();\n const navigationMenuItemsTmp = createNavigationMenuItems(\n tConfig,\n items,\n navigationMode === \"ONLY_TOP\" ? MAX_TOP_MENU_DEPTH : undefined\n );\n useEffect(() => {\n // First render (or a refresh) without written user url, then navigate to the first menu item\n if (!selectedMenuItemId && pathname === \"/\" && items[0]?.href) {\n navigate(items[0].href);\n }\n }, [pathname, items, navigate, selectedMenuItemId]);\n return {\n items: navigationMenuItemsTmp,\n selectedMenuItemId,\n rootMenuItemId\n };\n};\n\nexport default useNavigationMenuItems;\n"],"names":["MAX_TOP_MENU_DEPTH","useNavigationMenuItems","pathname","useLocation","navigationMode","useHvAppShellConfig","navigate","useHvNavigation","i18n","useContext","HvAppShellRuntimeContext","tConfig","useMemo","getFixedT","language","CONFIG_TRANSLATIONS_NAMESPACE","l","items","selectedMenuItemId","rootMenuItemId","useHvMenuItems","navigationMenuItemsTmp","createNavigationMenuItems","undefined","useEffect","href"
|
|
1
|
+
{"version":3,"file":"useNavigationMenuItems.js","sources":["../../../../src/lib/hooks/useNavigationMenuItems.tsx"],"sourcesContent":["import { useContext, useEffect, useMemo } from \"react\";\nimport { useLocation } from \"react-router-dom\";\n\nimport {\n CONFIG_TRANSLATIONS_NAMESPACE,\n HvAppShellRuntimeContext,\n useHvAppShellConfig,\n useHvMenuItems\n} from \"@hitachivantara/app-shell-shared\";\nimport { useHvNavigation } from \"@hitachivantara/app-shell-navigation\";\n\nimport { createNavigationMenuItems } from \"../utils/navigationUtil\";\nimport { MenuItemsContext } from \"../types\";\n\nconst MAX_TOP_MENU_DEPTH = 2;\n\nconst useNavigationMenuItems = (): MenuItemsContext => {\n // use the i18n instance from the app shell runtime context to ensure we're using\n // the app shell instance of i18n and not the one from the embedded app\n const { pathname } = useLocation();\n const { navigationMode } = useHvAppShellConfig();\n const { navigate } = useHvNavigation();\n const { i18n } = useContext(HvAppShellRuntimeContext) ?? {};\n const tConfig = useMemo(\n () =>\n i18n?.getFixedT(i18n.language, CONFIG_TRANSLATIONS_NAMESPACE) ??\n // should not happen, but fallback if the i18n instance is not available\n ((l: string) => l),\n [i18n]\n );\n\n const { items, selectedMenuItemId, rootMenuItemId } = useHvMenuItems();\n const navigationMenuItemsTmp = createNavigationMenuItems(\n tConfig,\n items,\n navigationMode === \"ONLY_TOP\" ? MAX_TOP_MENU_DEPTH : undefined\n );\n useEffect(() => {\n // First render (or a refresh) without written user url, then navigate to the first menu item\n if (!selectedMenuItemId && pathname === \"/\" && items[0]?.href) {\n navigate(items[0].href);\n }\n }, [pathname, items, navigate, selectedMenuItemId]);\n return {\n items: navigationMenuItemsTmp,\n selectedMenuItemId,\n rootMenuItemId\n };\n};\n\nexport default useNavigationMenuItems;\n"],"names":["MAX_TOP_MENU_DEPTH","useNavigationMenuItems","pathname","useLocation","navigationMode","useHvAppShellConfig","navigate","useHvNavigation","i18n","useContext","HvAppShellRuntimeContext","tConfig","useMemo","getFixedT","language","CONFIG_TRANSLATIONS_NAMESPACE","l","items","selectedMenuItemId","rootMenuItemId","useHvMenuItems","navigationMenuItemsTmp","createNavigationMenuItems","undefined","useEffect","href"],"mappings":";;;;;AAcA,MAAMA,IAAqB,GAErBC,IAAyBA,MAAwB;AAG/C,QAAA;AAAA,IAAEC,UAAAA;AAAAA,MAAaC,EAAY,GAC3B;AAAA,IAAEC,gBAAAA;AAAAA,MAAmBC,EAAoB,GACzC;AAAA,IAAEC,UAAAA;AAAAA,MAAaC,EAAgB,GAC/B;AAAA,IAAEC,MAAAA;AAAAA,EAAAA,IAASC,EAAWC,CAAwB,KAAK,IACnDC,IAAUC,EACd,OACEJ,KAAAA,gBAAAA,EAAMK,UAAUL,EAAKM,UAAUC;AAAAA,GAE9B,CAACC,MAAcA,IAClB,CAACR,CAAI,CACP,GAEM;AAAA,IAAES,OAAAA;AAAAA,IAAOC,oBAAAA;AAAAA,IAAoBC,gBAAAA;AAAAA,MAAmBC,EAAe,GAC/DC,IAAyBC,EAC7BX,GACAM,GACAb,MAAmB,aAAaJ,IAAqBuB,MACvD;AACAC,SAAAA,EAAU,MAAM;;AAEd,IAAI,CAACN,KAAsBhB,MAAa,SAAOe,IAAAA,EAAM,CAAC,MAAPA,QAAAA,EAAUQ,SAC9CR,EAAAA,EAAM,CAAC,EAAEQ,IAAI;AAAA,KAEvB,CAACvB,GAAUe,GAAOX,GAAUY,CAAkB,CAAC,GAC3C;AAAA,IACLD,OAAOI;AAAAA,IACPH,oBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,EAAAA;AAEJ;"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { useHvSnackbar as f } from "@hitachivantara/uikit-react-core";
|
|
2
2
|
import u from "../../providers/hooks/useBannerContext.js";
|
|
3
|
-
const
|
|
3
|
+
const k = () => {
|
|
4
4
|
const {
|
|
5
5
|
enqueueSnackbar: o
|
|
6
6
|
} = f(), {
|
|
7
7
|
show: s
|
|
8
|
-
} = u(), i = (
|
|
8
|
+
} = u(), i = (a) => {
|
|
9
9
|
const {
|
|
10
10
|
message: n,
|
|
11
11
|
variant: r,
|
|
12
|
-
actions:
|
|
12
|
+
actions: t,
|
|
13
13
|
actionsCallback: l
|
|
14
|
-
} =
|
|
14
|
+
} = a;
|
|
15
15
|
let e;
|
|
16
|
-
|
|
17
|
-
action: Array.isArray(
|
|
16
|
+
t && (e = {
|
|
17
|
+
action: Array.isArray(t) ? t[0] : t,
|
|
18
18
|
actionCallback: l
|
|
19
19
|
}), n && o(n, {
|
|
20
20
|
variant: r ?? "default",
|
|
21
21
|
snackbarContentProps: e
|
|
22
22
|
});
|
|
23
|
-
}, c = (
|
|
24
|
-
|
|
23
|
+
}, c = (a) => {
|
|
24
|
+
a.message && s(a);
|
|
25
25
|
};
|
|
26
26
|
return {
|
|
27
|
-
handleNotificationEvent: (
|
|
28
|
-
const n =
|
|
27
|
+
handleNotificationEvent: (a) => {
|
|
28
|
+
const n = a.detail;
|
|
29
29
|
switch (n.type) {
|
|
30
30
|
case "snackbar":
|
|
31
31
|
i(n);
|
|
@@ -38,8 +38,8 @@ const v = () => {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
}
|
|
41
|
+
};
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
k as default
|
|
44
44
|
};
|
|
45
45
|
//# sourceMappingURL=useNotificationsEventListener.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNotificationsEventListener.js","sources":["../../../../src/lib/hooks/useNotificationsEventListener.ts"],"sourcesContent":["import { useHvSnackbar } from \"@hitachivantara/uikit-react-core\";\nimport { HvAppShellEventNotification } from \"@hitachivantara/app-shell-events\";\n\nimport useBannerContext from \"../../providers/hooks/useBannerContext\";\n\nconst useNotificationsEventListener = () => {\n const { enqueueSnackbar } = useHvSnackbar();\n const { show } = useBannerContext();\n\n const handleCustomEventSnackbar = (\n notification: HvAppShellEventNotification\n ) => {\n const { message, variant, actions, actionsCallback } = notification;\n\n let snackbarContentProps;\n if (actions) {\n snackbarContentProps = {\n action: Array.isArray(actions) ? actions[0] : actions,\n actionCallback: actionsCallback\n };\n }\n\n if (message) {\n enqueueSnackbar(message, {\n variant: variant ?? \"default\",\n\n snackbarContentProps\n });\n }\n };\n\n const handleCustomEventBanner = (\n notification: HvAppShellEventNotification\n ) => {\n if (notification.message) {\n show(notification);\n }\n };\n\n const handleNotificationEvent = (\n event: CustomEvent<HvAppShellEventNotification>\n ) => {\n const notificationEvent = event.detail;\n switch (notificationEvent.type) {\n case \"snackbar\":\n handleCustomEventSnackbar(notificationEvent);\n break;\n case \"banner\":\n handleCustomEventBanner(notificationEvent);\n break;\n default:\n console.warn(\"Invalid notification type\", notificationEvent.type);\n }\n };\n\n return { handleNotificationEvent };\n};\n\nexport default useNotificationsEventListener;\n"],"names":["useNotificationsEventListener","enqueueSnackbar","useHvSnackbar","show","useBannerContext","handleCustomEventSnackbar","notification","message","variant","actions","actionsCallback","snackbarContentProps","action","Array","isArray","actionCallback","handleCustomEventBanner","handleNotificationEvent","event","notificationEvent","detail","type","warn"
|
|
1
|
+
{"version":3,"file":"useNotificationsEventListener.js","sources":["../../../../src/lib/hooks/useNotificationsEventListener.ts"],"sourcesContent":["import { useHvSnackbar } from \"@hitachivantara/uikit-react-core\";\nimport { HvAppShellEventNotification } from \"@hitachivantara/app-shell-events\";\n\nimport useBannerContext from \"../../providers/hooks/useBannerContext\";\n\nconst useNotificationsEventListener = () => {\n const { enqueueSnackbar } = useHvSnackbar();\n const { show } = useBannerContext();\n\n const handleCustomEventSnackbar = (\n notification: HvAppShellEventNotification\n ) => {\n const { message, variant, actions, actionsCallback } = notification;\n\n let snackbarContentProps;\n if (actions) {\n snackbarContentProps = {\n action: Array.isArray(actions) ? actions[0] : actions,\n actionCallback: actionsCallback\n };\n }\n\n if (message) {\n enqueueSnackbar(message, {\n variant: variant ?? \"default\",\n\n snackbarContentProps\n });\n }\n };\n\n const handleCustomEventBanner = (\n notification: HvAppShellEventNotification\n ) => {\n if (notification.message) {\n show(notification);\n }\n };\n\n const handleNotificationEvent = (\n event: CustomEvent<HvAppShellEventNotification>\n ) => {\n const notificationEvent = event.detail;\n switch (notificationEvent.type) {\n case \"snackbar\":\n handleCustomEventSnackbar(notificationEvent);\n break;\n case \"banner\":\n handleCustomEventBanner(notificationEvent);\n break;\n default:\n console.warn(\"Invalid notification type\", notificationEvent.type);\n }\n };\n\n return { handleNotificationEvent };\n};\n\nexport default useNotificationsEventListener;\n"],"names":["useNotificationsEventListener","enqueueSnackbar","useHvSnackbar","show","useBannerContext","handleCustomEventSnackbar","notification","message","variant","actions","actionsCallback","snackbarContentProps","action","Array","isArray","actionCallback","handleCustomEventBanner","handleNotificationEvent","event","notificationEvent","detail","type","warn"],"mappings":";;AAKA,MAAMA,IAAgCA,MAAM;AACpC,QAAA;AAAA,IAAEC,iBAAAA;AAAAA,MAAoBC,EAAc,GACpC;AAAA,IAAEC,MAAAA;AAAAA,MAASC,EAAiB,GAE5BC,IAA4BA,CAChCC,MACG;AACG,UAAA;AAAA,MAAEC,SAAAA;AAAAA,MAASC,SAAAA;AAAAA,MAASC,SAAAA;AAAAA,MAASC,iBAAAA;AAAAA,IAAoBJ,IAAAA;AAEnDK,QAAAA;AACJ,IAAIF,MACqBE,IAAA;AAAA,MACrBC,QAAQC,MAAMC,QAAQL,CAAO,IAAIA,EAAQ,CAAC,IAAIA;AAAAA,MAC9CM,gBAAgBL;AAAAA,IAAAA,IAIhBH,KACFN,EAAgBM,GAAS;AAAA,MACvBC,SAASA,KAAW;AAAA,MAEpBG,sBAAAA;AAAAA,IAAAA,CACD;AAAA,EACH,GAGIK,IAA0BA,CAC9BV,MACG;AACH,IAAIA,EAAaC,WACfJ,EAAKG,CAAY;AAAA,EACnB;AAmBK,SAAA;AAAA,IAAEW,yBAhBuBA,CAC9BC,MACG;AACH,YAAMC,IAAoBD,EAAME;AAChC,cAAQD,EAAkBE,MAAI;AAAA,QAC5B,KAAK;AACHhB,UAAAA,EAA0Bc,CAAiB;AAC3C;AAAA,QACF,KAAK;AACHH,UAAAA,EAAwBG,CAAiB;AACzC;AAAA,QACF;AACUG,kBAAAA,KAAK,6BAA6BH,EAAkBE,IAAI;AAAA,MACpE;AAAA,IAAA;AAAA,EAGOJ;AACX;"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { useTheme as h } from "@hitachivantara/uikit-react-core";
|
|
2
2
|
import m, { LOCAL_STORAGE_KEYS as a } from "./useLocalStorage.js";
|
|
3
|
-
const
|
|
3
|
+
const O = () => {
|
|
4
4
|
const {
|
|
5
5
|
selectedTheme: s,
|
|
6
6
|
changeTheme: d,
|
|
7
7
|
selectedMode: r,
|
|
8
|
-
colorModes:
|
|
8
|
+
colorModes: o
|
|
9
9
|
} = h(), {
|
|
10
10
|
setStoredValue: c
|
|
11
11
|
} = m(a.COLOR_MODE), l = () => {
|
|
12
|
-
const e = (
|
|
13
|
-
return
|
|
12
|
+
const e = (o.indexOf(r) + 1) % o.length;
|
|
13
|
+
return o[e];
|
|
14
14
|
};
|
|
15
15
|
return {
|
|
16
|
-
handleThemeEvent: (
|
|
16
|
+
handleThemeEvent: (t) => {
|
|
17
17
|
const {
|
|
18
18
|
colorMode: e
|
|
19
|
-
} =
|
|
19
|
+
} = t.detail, n = !e || o.indexOf(e) === -1 ? l() : e;
|
|
20
20
|
d(s, n), c(n);
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
O as default
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=useThemeEventListener.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeEventListener.js","sources":["../../../../src/lib/hooks/useThemeEventListener.ts"],"sourcesContent":["import { useTheme } from \"@hitachivantara/uikit-react-core\";\n\nimport { HvAppShellEventTheme } from \"@hitachivantara/app-shell-events\";\nimport useLocalStorage, { LOCAL_STORAGE_KEYS } from \"./useLocalStorage\";\n\nconst useThemeEventListener = () => {\n const { selectedTheme, changeTheme, selectedMode, colorModes } = useTheme();\n const { setStoredValue } = useLocalStorage(LOCAL_STORAGE_KEYS.COLOR_MODE);\n\n const getNextColorMode = () => {\n const index = colorModes.indexOf(selectedMode);\n\n const nextIndex = (index + 1) % colorModes.length;\n return colorModes[nextIndex];\n };\n\n const handleThemeEvent = (event: CustomEvent<HvAppShellEventTheme>) => {\n const { colorMode } = event.detail;\n const newColorMode =\n !colorMode || colorModes.indexOf(colorMode) === -1\n ? getNextColorMode()\n : colorMode;\n\n // For now we only want to change the colorMode\n changeTheme(selectedTheme, newColorMode);\n setStoredValue(newColorMode);\n };\n\n return { handleThemeEvent };\n};\n\nexport default useThemeEventListener;\n"],"names":["useThemeEventListener","selectedTheme","changeTheme","selectedMode","colorModes","useTheme","setStoredValue","useLocalStorage","LOCAL_STORAGE_KEYS","COLOR_MODE","getNextColorMode","nextIndex","indexOf","length","handleThemeEvent","event","colorMode","detail","newColorMode"
|
|
1
|
+
{"version":3,"file":"useThemeEventListener.js","sources":["../../../../src/lib/hooks/useThemeEventListener.ts"],"sourcesContent":["import { useTheme } from \"@hitachivantara/uikit-react-core\";\n\nimport { HvAppShellEventTheme } from \"@hitachivantara/app-shell-events\";\nimport useLocalStorage, { LOCAL_STORAGE_KEYS } from \"./useLocalStorage\";\n\nconst useThemeEventListener = () => {\n const { selectedTheme, changeTheme, selectedMode, colorModes } = useTheme();\n const { setStoredValue } = useLocalStorage(LOCAL_STORAGE_KEYS.COLOR_MODE);\n\n const getNextColorMode = () => {\n const index = colorModes.indexOf(selectedMode);\n\n const nextIndex = (index + 1) % colorModes.length;\n return colorModes[nextIndex];\n };\n\n const handleThemeEvent = (event: CustomEvent<HvAppShellEventTheme>) => {\n const { colorMode } = event.detail;\n const newColorMode =\n !colorMode || colorModes.indexOf(colorMode) === -1\n ? getNextColorMode()\n : colorMode;\n\n // For now we only want to change the colorMode\n changeTheme(selectedTheme, newColorMode);\n setStoredValue(newColorMode);\n };\n\n return { handleThemeEvent };\n};\n\nexport default useThemeEventListener;\n"],"names":["useThemeEventListener","selectedTheme","changeTheme","selectedMode","colorModes","useTheme","setStoredValue","useLocalStorage","LOCAL_STORAGE_KEYS","COLOR_MODE","getNextColorMode","nextIndex","indexOf","length","handleThemeEvent","event","colorMode","detail","newColorMode"],"mappings":";;AAKA,MAAMA,IAAwBA,MAAM;AAC5B,QAAA;AAAA,IAAEC,eAAAA;AAAAA,IAAeC,aAAAA;AAAAA,IAAaC,cAAAA;AAAAA,IAAcC,YAAAA;AAAAA,MAAeC,EAAS,GACpE;AAAA,IAAEC,gBAAAA;AAAAA,EAAAA,IAAmBC,EAAgBC,EAAmBC,UAAU,GAElEC,IAAmBA,MAAM;AAGvBC,UAAAA,KAFQP,EAAWQ,QAAQT,CAAY,IAElB,KAAKC,EAAWS;AAC3C,WAAOT,EAAWO,CAAS;AAAA,EAAA;AAetB,SAAA;AAAA,IAAEG,kBAZgBA,CAACC,MAA6C;AAC/D,YAAA;AAAA,QAAEC,WAAAA;AAAAA,MAAAA,IAAcD,EAAME,QACtBC,IACJ,CAACF,KAAaZ,EAAWQ,QAAQI,CAAS,MAAM,KAC5CN,EACAM,IAAAA;AAGNd,MAAAA,EAAYD,GAAeiB,CAAY,GACvCZ,EAAeY,CAAY;AAAA,IAAA;AAAA,EAGpBJ;AACX;"}
|
|
@@ -3,12 +3,12 @@ import { initReactI18next as d } from "react-i18next";
|
|
|
3
3
|
import u from "i18next-browser-languagedetector";
|
|
4
4
|
import i from "./localization/en.json.js";
|
|
5
5
|
import l from "./localization/pt.json.js";
|
|
6
|
-
const t = "appShell",
|
|
6
|
+
const t = "appShell", x = (e, n, r) => {
|
|
7
7
|
Object.entries(n).forEach((o) => {
|
|
8
8
|
const [a, c] = o;
|
|
9
9
|
e.addResourceBundle(a, r ?? t, c);
|
|
10
10
|
});
|
|
11
|
-
},
|
|
11
|
+
}, B = () => {
|
|
12
12
|
const e = s.createInstance();
|
|
13
13
|
return e.use(u).use(d).init({
|
|
14
14
|
defaultNS: t,
|
|
@@ -20,10 +20,10 @@ const t = "appShell", g = (e, n, r) => {
|
|
|
20
20
|
}), e.addResourceBundle("en", t, i), e.addResourceBundle("pt", t, l), {
|
|
21
21
|
i18n: e
|
|
22
22
|
};
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
export {
|
|
25
25
|
t as APP_SHELL_NAMESPACE,
|
|
26
|
-
|
|
26
|
+
x as addResourceBundles,
|
|
27
27
|
B as default
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/lib/i18n/index.ts"],"sourcesContent":["import i18next, { i18n } from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport en from \"./localization/en.json\";\nimport pt from \"./localization/pt.json\";\n\nexport const APP_SHELL_NAMESPACE = \"appShell\";\nexport const addResourceBundles = (\n i18nInstance: i18n,\n bundles: Record<string, object>,\n namespace?: string\n) => {\n Object.entries(bundles).forEach(entry => {\n const [key, value] = entry;\n i18nInstance.addResourceBundle(\n key,\n namespace ?? APP_SHELL_NAMESPACE,\n value\n );\n });\n};\n\nconst createI18Next = () => {\n const newInstance = i18next.createInstance();\n newInstance\n .use(LanguageDetector)\n .use(initReactI18next)\n .init({\n defaultNS: APP_SHELL_NAMESPACE,\n fallbackLng: \"en\",\n detection: { order: [\"navigator\"] },\n resources: {}\n });\n\n newInstance.addResourceBundle(\"en\", APP_SHELL_NAMESPACE, en);\n newInstance.addResourceBundle(\"pt\", APP_SHELL_NAMESPACE, pt);\n\n return {\n i18n: newInstance\n };\n};\n\nexport default createI18Next;\n"],"names":["APP_SHELL_NAMESPACE","addResourceBundles","i18nInstance","bundles","namespace","Object","entries","forEach","entry","key","value","addResourceBundle","createI18Next","newInstance","i18next","createInstance","use","LanguageDetector","initReactI18next","init","defaultNS","fallbackLng","detection","order","resources","en","pt","i18n"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/lib/i18n/index.ts"],"sourcesContent":["import i18next, { i18n } from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport en from \"./localization/en.json\";\nimport pt from \"./localization/pt.json\";\n\nexport const APP_SHELL_NAMESPACE = \"appShell\";\nexport const addResourceBundles = (\n i18nInstance: i18n,\n bundles: Record<string, object>,\n namespace?: string\n) => {\n Object.entries(bundles).forEach(entry => {\n const [key, value] = entry;\n i18nInstance.addResourceBundle(\n key,\n namespace ?? APP_SHELL_NAMESPACE,\n value\n );\n });\n};\n\nconst createI18Next = () => {\n const newInstance = i18next.createInstance();\n newInstance\n .use(LanguageDetector)\n .use(initReactI18next)\n .init({\n defaultNS: APP_SHELL_NAMESPACE,\n fallbackLng: \"en\",\n detection: { order: [\"navigator\"] },\n resources: {}\n });\n\n newInstance.addResourceBundle(\"en\", APP_SHELL_NAMESPACE, en);\n newInstance.addResourceBundle(\"pt\", APP_SHELL_NAMESPACE, pt);\n\n return {\n i18n: newInstance\n };\n};\n\nexport default createI18Next;\n"],"names":["APP_SHELL_NAMESPACE","addResourceBundles","i18nInstance","bundles","namespace","Object","entries","forEach","entry","key","value","addResourceBundle","createI18Next","newInstance","i18next","createInstance","use","LanguageDetector","initReactI18next","init","defaultNS","fallbackLng","detection","order","resources","en","pt","i18n"],"mappings":";;;;;AAMO,MAAMA,IAAsB,YACtBC,IAAqBA,CAChCC,GACAC,GACAC,MACG;AACHC,SAAOC,QAAQH,CAAO,EAAEI,QAAQC,CAASA,MAAA;AACjC,UAAA,CAACC,GAAKC,CAAK,IAAIF;AACrBN,IAAAA,EAAaS,kBACXF,GACAL,KAAaJ,GACbU,CACF;AAAA,EAAA,CACD;AACH,GAEME,IAAgBA,MAAM;AACpBC,QAAAA,IAAcC,EAAQC;AAC5BF,SAAAA,EACGG,IAAIC,CAAgB,EACpBD,IAAIE,CAAgB,EACpBC,KAAK;AAAA,IACJC,WAAWpB;AAAAA,IACXqB,aAAa;AAAA,IACbC,WAAW;AAAA,MAAEC,OAAO,CAAC,WAAW;AAAA,IAAE;AAAA,IAClCC,WAAW,CAAC;AAAA,EAAA,CACb,GAESb,EAAAA,kBAAkB,MAAMX,GAAqByB,CAAE,GAC/Cd,EAAAA,kBAAkB,MAAMX,GAAqB0B,CAAE,GAEpD;AAAA,IACLC,MAAMd;AAAAA,EAAAA;AAEV;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basePathUtils.js","sources":["../../../../src/lib/utils/basePathUtils.ts"],"sourcesContent":["import { HvAppShellConfig } from \"@hitachivantara/app-shell-shared\";\n\n/**\n * Returns the app base path.\n * - The path is calculated by returning the sub-path value for the main app.\n * - Main app is the first app that baseUrl matches window.location\n * - App baseUrl don't have case restrictions\n * - If the main app is not discovered, returns \"/\"\n *\n * @return The main app baseUrl, or \"/\" otherwise. Value is always returned in lowercase.\n * @param config The app configuration definition\n */\nconst getBasePath = (config: HvAppShellConfig) => {\n return config?.baseUrl ?? \"/\";\n};\n\nexport default getBasePath;\n"],"names":["getBasePath","config","baseUrl"
|
|
1
|
+
{"version":3,"file":"basePathUtils.js","sources":["../../../../src/lib/utils/basePathUtils.ts"],"sourcesContent":["import { HvAppShellConfig } from \"@hitachivantara/app-shell-shared\";\n\n/**\n * Returns the app base path.\n * - The path is calculated by returning the sub-path value for the main app.\n * - Main app is the first app that baseUrl matches window.location\n * - App baseUrl don't have case restrictions\n * - If the main app is not discovered, returns \"/\"\n *\n * @return The main app baseUrl, or \"/\" otherwise. Value is always returned in lowercase.\n * @param config The app configuration definition\n */\nconst getBasePath = (config: HvAppShellConfig) => {\n return config?.baseUrl ?? \"/\";\n};\n\nexport default getBasePath;\n"],"names":["getBasePath","config","baseUrl"],"mappings":"AAYMA,MAAAA,IAAcA,CAACC,OACZA,KAAAA,gBAAAA,EAAQC,YAAW;"}
|
|
@@ -2,8 +2,8 @@ const a = (t) => {
|
|
|
2
2
|
const n = "app-shell-panel-container";
|
|
3
3
|
let e = document.getElementById(t ?? n);
|
|
4
4
|
return e || (e = document.createElement("div"), e.id = n, document.body.appendChild(e)), e;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=documentUtil.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentUtil.js","sources":["../../../../src/lib/utils/documentUtil.ts"],"sourcesContent":["const createAppContainerElement = (id?: string): HTMLElement => {\n const panelContainerId = \"app-shell-panel-container\";\n let panelContainerElement = document.getElementById(id ?? panelContainerId);\n\n if (!panelContainerElement) {\n panelContainerElement = document.createElement(\"div\");\n panelContainerElement.id = panelContainerId;\n document.body.appendChild(panelContainerElement);\n }\n\n return panelContainerElement;\n};\n\nexport default createAppContainerElement;\n"],"names":["createAppContainerElement","id","panelContainerId","panelContainerElement","document","getElementById","createElement","body","appendChild"
|
|
1
|
+
{"version":3,"file":"documentUtil.js","sources":["../../../../src/lib/utils/documentUtil.ts"],"sourcesContent":["const createAppContainerElement = (id?: string): HTMLElement => {\n const panelContainerId = \"app-shell-panel-container\";\n let panelContainerElement = document.getElementById(id ?? panelContainerId);\n\n if (!panelContainerElement) {\n panelContainerElement = document.createElement(\"div\");\n panelContainerElement.id = panelContainerId;\n document.body.appendChild(panelContainerElement);\n }\n\n return panelContainerElement;\n};\n\nexport default createAppContainerElement;\n"],"names":["createAppContainerElement","id","panelContainerId","panelContainerElement","document","getElementById","createElement","body","appendChild"],"mappings":"AAAMA,MAAAA,IAA4BA,CAACC,MAA6B;AAC9D,QAAMC,IAAmB;AACzB,MAAIC,IAAwBC,SAASC,eAAeJ,KAAMC,CAAgB;AAE1E,SAAKC,MACqBC,IAAAA,SAASE,cAAc,KAAK,GACpDH,EAAsBF,KAAKC,GAClBK,SAAAA,KAAKC,YAAYL,CAAqB,IAG1CA;AACT;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textUtil.js","sources":["../../../../src/lib/utils/textUtil.ts"],"sourcesContent":["/**\n * Checks if a search string (can be a single character or a string sequence) may be found within the given value string.\n * @param value The string to be checked if contains the search value\n * @param searchParam The string\n */\nconst includesString = (value: string, searchParam: string): boolean => {\n return value.includes(searchParam);\n};\n\nexport default includesString;\n"],"names":["includesString","value","searchParam","includes"
|
|
1
|
+
{"version":3,"file":"textUtil.js","sources":["../../../../src/lib/utils/textUtil.ts"],"sourcesContent":["/**\n * Checks if a search string (can be a single character or a string sequence) may be found within the given value string.\n * @param value The string to be checked if contains the search value\n * @param searchParam The string\n */\nconst includesString = (value: string, searchParam: string): boolean => {\n return value.includes(searchParam);\n};\n\nexport default includesString;\n"],"names":["includesString","value","searchParam","includes"],"mappings":"AAKMA,MAAAA,IAAiBA,CAACC,GAAeC,MAC9BD,EAAME,SAASD,CAAW;"}
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import b from "@emotion/styled/base";
|
|
2
2
|
import { theme as c } from "@hitachivantara/uikit-react-core";
|
|
3
|
-
|
|
4
|
-
function I() {
|
|
3
|
+
function W() {
|
|
5
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).";
|
|
6
5
|
}
|
|
7
|
-
const
|
|
6
|
+
const G = ({
|
|
8
7
|
showHeaderSubMenu: l,
|
|
9
|
-
isCompactMode:
|
|
10
|
-
fullPage:
|
|
11
|
-
}) =>
|
|
8
|
+
isCompactMode: d,
|
|
9
|
+
fullPage: Z
|
|
10
|
+
}) => Z ? "100vh" : l && !d ? `calc(100vh - (${c.header.height} + ${c.header.secondLevelHeight}px + ${c.space.lg} + ${c.space.lg}))` : `calc(100vh - (${c.header.height} + ${c.space.lg} + ${c.space.lg}))`, y = /* @__PURE__ */ b("div", process.env.NODE_ENV === "production" ? {
|
|
12
11
|
target: "e18ahwyt2"
|
|
13
12
|
} : {
|
|
14
13
|
target: "e18ahwyt2",
|
|
15
14
|
label: "StyledErrorPage"
|
|
16
|
-
})("flex:1;display:flex;flex-direction:column;margin-top:", c.space.lg, ";height:", (l) =>
|
|
15
|
+
})("flex:1;display:flex;flex-direction:column;margin-top:", c.space.lg, ";height:", (l) => G(l), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9fX3cvaHYtYXBwLXNoZWxsL2h2LWFwcC1zaGVsbC9jbGllbnQvcGFja2FnZXMvYXBwLXNoZWxsLXVpL3NyYy9wYWdlcy9FcnJvclBhZ2Uvc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQStCd0QiLCJmaWxlIjoiL19fdy9odi1hcHAtc2hlbGwvaHYtYXBwLXNoZWxsL2NsaWVudC9wYWNrYWdlcy9hcHAtc2hlbGwtdWkvc3JjL3BhZ2VzL0Vycm9yUGFnZS9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcclxuXHJcbmltcG9ydCB7IHRoZW1lIH0gZnJvbSBcIkBoaXRhY2hpdmFudGFyYS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nN0IFN0eWxlZEVycm9yUGFnZSA9IHN0eWxlZC5kaXY8U3R5bGVkRXJyb3JQYWdlUHJvcHM+YFxyXG4gIGZsZXg6IDE7XHJcbiAgZGlzcGxheTogZmxleDtcclxuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xyXG4gIG1hcmdpbi10b3A6ICR7dGhlbWUuc3BhY2UubGd9O1xyXG4gIGhlaWdodDogJHsocHJvcHM6IFN0eWxlZEVycm9yUGFnZVByb3BzKSA9PiBjYWxjSGVpZ2h0KHByb3BzKX07XHJcbmA7XHJcblxyXG5jb25zdCBTdHlsZWRJbWFnZVdyYXBwZXIgPSBzdHlsZWQuZGl2PFN0eWxlZEltYWdlV3JhcHBlclByb3BzPmBcclxuICBmbGV4OiAxO1xyXG4gIGRpc3BsYXk6IGZsZXg7XHJcbiAgYmFja2dyb3VuZC1pbWFnZTogJHtwcm9wcyA9PiBwcm9wcy5iYWNrZ3JvdW5kSW1hZ2V9O1xyXG4gIGJhY2tncm91bmQtc2l6ZTogY29udGFpbjtcclxuICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiBjZW50ZXIgY2VudGVyO1xyXG4gIGJhY2tncm91bmQtcmVwZWF0OiBuby1yZXBlYXQ7XHJcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICBoZWlnaHQ6IDEwMCU7XHJcbmA7XHJcblxyXG5jb25zdCBTdHlsZWRUaXRsZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxyXG4gIHRleHQtYWxpZ246IGNlbnRlcjtcclxuYDtcclxuXHJcbmV4cG9ydCB7IFN0eWxlZFRpdGxlV3JhcHBlciwgU3R5bGVkRXJyb3JQYWdlLCBTdHlsZWRJbWFnZVdyYXBwZXIgfTtcclxuIl19 */")), I = /* @__PURE__ */ b("div", process.env.NODE_ENV === "production" ? {
|
|
17
16
|
target: "e18ahwyt1"
|
|
18
17
|
} : {
|
|
19
18
|
target: "e18ahwyt1",
|
|
20
19
|
label: "StyledImageWrapper"
|
|
21
|
-
})("flex:1;display:flex;background-image:", (l) => l.backgroundImage, ";background-size:contain;background-position:center center;background-repeat:no-repeat;flex-direction:column;height:100%;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
20
|
+
})("flex:1;display:flex;background-image:", (l) => l.backgroundImage, ";background-size:contain;background-position:center center;background-repeat:no-repeat;flex-direction:column;height:100%;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9fX3cvaHYtYXBwLXNoZWxsL2h2LWFwcC1zaGVsbC9jbGllbnQvcGFja2FnZXMvYXBwLXNoZWxsLXVpL3NyYy9wYWdlcy9FcnJvclBhZ2Uvc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVDOEQiLCJmaWxlIjoiL19fdy9odi1hcHAtc2hlbGwvaHYtYXBwLXNoZWxsL2NsaWVudC9wYWNrYWdlcy9hcHAtc2hlbGwtdWkvc3JjL3BhZ2VzL0Vycm9yUGFnZS9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcclxuXHJcbmltcG9ydCB7IHRoZW1lIH0gZnJvbSBcIkBoaXRhY2hpdmFudGFyYS91aWtpdC1yZWFjdC1jb3JlXCI7XHJcblxyXG5pbnRlcmZhY2UgU3R5bGVkRXJyb3JQYWdlUHJvcHMge1xyXG4gIHNob3dIZWFkZXJTdWJNZW51PzogYm9vbGVhbjtcclxuICBpc0NvbXBhY3RNb2RlPzogYm9vbGVhbjtcclxuICBmdWxsUGFnZT86IGJvb2xlYW47XHJcbn1cclxuXHJcbmludGVyZmFjZSBTdHlsZWRJbWFnZVdyYXBwZXJQcm9wcyB7XHJcbiAgYmFja2dyb3VuZEltYWdlOiBzdHJpbmc7XHJcbn1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blxyXG5jb25zdCBTdHlsZWRJbWFnZVdyYXBwZXIgPSBzdHlsZWQuZGl2PFN0eWxlZEltYWdlV3JhcHBlclByb3BzPmBcclxuICBmbGV4OiAxO1xyXG4gIGRpc3BsYXk6IGZsZXg7XHJcbiAgYmFja2dyb3VuZC1pbWFnZTogJHtwcm9wcyA9PiBwcm9wcy5iYWNrZ3JvdW5kSW1hZ2V9O1xyXG4gIGJhY2tncm91bmQtc2l6ZTogY29udGFpbjtcclxuICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiBjZW50ZXIgY2VudGVyO1xyXG4gIGJhY2tncm91bmQtcmVwZWF0OiBuby1yZXBlYXQ7XHJcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICBoZWlnaHQ6IDEwMCU7XHJcbmA7XHJcblxyXG5jb25zdCBTdHlsZWRUaXRsZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxyXG4gIHRleHQtYWxpZ246IGNlbnRlcjtcclxuYDtcclxuXHJcbmV4cG9ydCB7IFN0eWxlZFRpdGxlV3JhcHBlciwgU3R5bGVkRXJyb3JQYWdlLCBTdHlsZWRJbWFnZVdyYXBwZXIgfTtcclxuIl19 */")), t = /* @__PURE__ */ b("div", process.env.NODE_ENV === "production" ? {
|
|
22
21
|
target: "e18ahwyt0"
|
|
23
22
|
} : {
|
|
24
23
|
target: "e18ahwyt0",
|
|
@@ -29,12 +28,12 @@ const X = ({
|
|
|
29
28
|
} : {
|
|
30
29
|
name: "1azakc",
|
|
31
30
|
styles: "text-align:center",
|
|
32
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
33
|
-
toString:
|
|
31
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9fX3cvaHYtYXBwLXNoZWxsL2h2LWFwcC1zaGVsbC9jbGllbnQvcGFja2FnZXMvYXBwLXNoZWxsLXVpL3NyYy9wYWdlcy9FcnJ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HJcbmA7XHJcblxyXG5jb25zdCBTdHlsZWRUaXRsZVdyYXBwZXIgPSBzdHlsZWQuZGl2YFxyXG4gIHRleHQtYWxpZ246IGNlbnRlcjtcclxuYDtcclxuXHJcbmV4cG9ydCB7IFN0eWxlZFRpdGxlV3JhcHBlciwgU3R5bGVkRXJyb3JQYWdlLCBTdHlsZWRJbWFnZVdyYXBwZXIgfTtcclxuIl19 */",
|
|
32
|
+
toString: W
|
|
34
33
|
});
|
|
35
34
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
y as StyledErrorPage,
|
|
36
|
+
I as StyledImageWrapper,
|
|
37
|
+
t as StyledTitleWrapper
|
|
39
38
|
};
|
|
40
39
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/pages/ErrorPage/styles.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\r\n\r\nimport { theme } from \"@hitachivantara/uikit-react-core\";\r\n\r\
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/pages/ErrorPage/styles.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\r\n\r\nimport { theme } from \"@hitachivantara/uikit-react-core\";\r\n\r\ninterface StyledErrorPageProps {\r\n showHeaderSubMenu?: boolean;\r\n isCompactMode?: boolean;\r\n fullPage?: boolean;\r\n}\r\n\r\ninterface StyledImageWrapperProps {\r\n backgroundImage: string;\r\n}\r\n\r\n/**\r\n * Calculates the height of the image wrapper based on the header sub menu and compact mode.\r\n */\r\nconst calcHeight = ({\r\n showHeaderSubMenu,\r\n isCompactMode,\r\n fullPage\r\n}: StyledErrorPageProps) => {\r\n if (fullPage) {\r\n return `100vh`;\r\n }\r\n if (showHeaderSubMenu && !isCompactMode) {\r\n return `calc(100vh - (${theme.header.height} + ${theme.header.secondLevelHeight}px + ${theme.space.lg} + ${theme.space.lg}))`;\r\n }\r\n return `calc(100vh - (${theme.header.height} + ${theme.space.lg} + ${theme.space.lg}))`;\r\n};\r\n\r\nconst StyledErrorPage = styled.div<StyledErrorPageProps>`\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: ${theme.space.lg};\r\n height: ${(props: StyledErrorPageProps) => calcHeight(props)};\r\n`;\r\n\r\nconst StyledImageWrapper = styled.div<StyledImageWrapperProps>`\r\n flex: 1;\r\n display: flex;\r\n background-image: ${props => props.backgroundImage};\r\n background-size: contain;\r\n background-position: center center;\r\n background-repeat: no-repeat;\r\n flex-direction: column;\r\n height: 100%;\r\n`;\r\n\r\nconst StyledTitleWrapper = styled.div`\r\n text-align: center;\r\n`;\r\n\r\nexport { StyledTitleWrapper, StyledErrorPage, StyledImageWrapper };\r\n"],"names":["calcHeight","showHeaderSubMenu","isCompactMode","fullPage","theme","header","height","secondLevelHeight","space","lg","StyledErrorPage","_styled","process","env","NODE_ENV","target","label","props","StyledImageWrapper","backgroundImage","StyledTitleWrapper","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"mappings":";;;;;AAiBA,MAAMA,IAAaA,CAAC;AAAA,EAClBC,mBAAAA;AAAAA,EACAC,eAAAA;AAAAA,EACAC,UAAAA;AACoB,MAChBA,IACM,UAENF,KAAqB,CAACC,IAChB,iBAAgBE,EAAMC,OAAOC,MAAO,MAAKF,EAAMC,OAAOE,iBAAkB,QAAOH,EAAMI,MAAMC,EAAG,MAAKL,EAAMI,MAAMC,EAAG,OAEpH,iBAAgBL,EAAMC,OAAOC,MAAO,MAAKF,EAAMI,MAAMC,EAAG,MAAKL,EAAMI,MAAMC,EAAG,MAGhFC,IAAe,gBAAAC,EAAA,OAAAC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAA,QAAA;AAAA,EAAAC,OAAA;AAAA,CAILZ,EAAAA,yDAAAA,EAAMI,MAAMC,IAChB,YAAA,CAACQ,MAAgCjB,EAAWiB,CAAK,GAAC,OAAAL,QAAAC,IAAAC,aAC7D,eAAA,KAAA,0gFAAA,GAEKI,IAAkB,gBAAAP,EAAA,OAAAC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAA,QAAA;AAAA,EAAAC,OAAA;AAAA,CAGFC,EAAAA,yCAAAA,CAAAA,MAASA,EAAME,iBAAeP,+HAAAA,QAAAC,IAAAC,aAMnD,eAAA,KAAA,0gFAAA,GAEKM,IAAkB,gBAAAT,EAAA,OAAAC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAA,QAAA;AAAA,EAAAC,OAAA;AAAA,CAAA,EAAAJ,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAO,MAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAD,MAAA;AAAA,EAAAC,QAAA;AAAA,EAAAC,KAAA;AAAA,EAAAC,UAAAC;AAAA,CAEvB;"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import G from "@emotion/styled/base";
|
|
2
2
|
import { theme as c } from "@hitachivantara/uikit-react-core";
|
|
3
|
-
|
|
4
|
-
const a = ({
|
|
3
|
+
const b = ({
|
|
5
4
|
showHeaderSubMenu: l,
|
|
6
|
-
isCompactMode:
|
|
7
|
-
}) => l && !
|
|
5
|
+
isCompactMode: Z
|
|
6
|
+
}) => l && !Z ? `calc(100vh - (${c.header.height} + ${c.header.secondLevelHeight}px + ${c.space.lg} + ${c.space.lg}))` : `calc(100vh - (${c.header.height} + ${c.space.lg} + ${c.space.lg}))`, a = /* @__PURE__ */ G("div", process.env.NODE_ENV === "production" ? {
|
|
8
7
|
target: "e1y8bo8h0"
|
|
9
8
|
} : {
|
|
10
9
|
target: "e1y8bo8h0",
|
|
11
10
|
label: "StyledLoadingPage"
|
|
12
|
-
})("flex:1;display:flex;flex-direction:column;margin-top:", c.space.lg, ";height:", (l) =>
|
|
11
|
+
})("flex:1;display:flex;flex-direction:column;margin-top:", c.space.lg, ";height:", (l) => b(l), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9fX3cvaHYtYXBwLXNoZWxsL2h2LWFwcC1zaGVsbC9jbGllbnQvcGFja2FnZXMvYXBwLXNoZWxsLXVpL3NyYy9wYWdlcy9Mb2FkaW5nUGFnZS9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0I0RCIsImZpbGUiOiIvX193L2h2LWFwcC1zaGVsbC9odi1hcHAtc2hlbGwvY2xpZW50L3BhY2thZ2VzL2FwcC1zaGVsbC11aS9zcmMvcGFnZXMvTG9hZGluZ1BhZ2Uvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XHJcblxyXG5pbXBvcnQgeyB0aGVtZSB9IGZyb20gXCJAaGl0YWNoaXZhbnRhcmEvdWlraXQtcmVhY3QtY29yZVwiO1xyXG5cclxuaW50ZXJmYWNlIFN0eWxlZExvYWRpbmdQYWdlUHJvcHMge1xyXG4gIHNob3dIZWFkZXJTdWJNZW51PzogYm9vbGVhbjtcclxuICBpc0NvbXBhY3RNb2RlPzogYm9vbGVhbjtcclxufVxyXG5cclxuLyoqXHJcbiAqIENhbGN1bGF0ZXMgdGhlIGhlaWdodCBvZiB0aGUgaW1hZ2Ugd3JhcHBlciBiYXNlZCBvbiB0aGUgaGVhZGVyIHN1YiBtZW51IGFuZCBjb21wYWN0IG1vZGUuXHJcbiAqL1xyXG5jb25zdCBjYWxjSGVpZ2h0ID0gKHtcclxuICBzaG93SGVhZGVyU3ViTWVudSxcclxuICBpc0NvbXBhY3RNb2RlXHJcbn06IFN0eWxlZExvYWRpbmdQYWdlUHJvcHMpID0+IHtcclxuICBpZiAoc2hvd0hlYWRlclN1Yk1lbnUgJiYgIWlzQ29tcGFjdE1vZGUpIHtcclxuICAgIHJldHVybiBgY2FsYygxMDB2aCAtICgke3RoZW1lLmhlYWRlci5oZWlnaHR9ICsgJHt0aGVtZS5oZWFkZXIuc2Vjb25kTGV2ZWxIZWlnaHR9cHggKyAke3RoZW1lLnNwYWNlLmxnfSArICR7dGhlbWUuc3BhY2UubGd9KSlgO1xyXG4gIH1cclxuICByZXR1cm4gYGNhbGMoMTAwdmggLSAoJHt0aGVtZS5oZWFkZXIuaGVpZ2h0fSArICR7dGhlbWUuc3BhY2UubGd9ICsgJHt0aGVtZS5zcGFjZS5sZ30pKWA7XHJcbn07XHJcblxyXG5jb25zdCBTdHlsZWRMb2FkaW5nUGFnZSA9IHN0eWxlZC5kaXY8U3R5bGVkTG9hZGluZ1BhZ2VQcm9wcz5gXHJcbiAgZmxleDogMTtcclxuICBkaXNwbGF5OiBmbGV4O1xyXG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XHJcbiAgbWFyZ2luLXRvcDogJHt0aGVtZS5zcGFjZS5sZ307XHJcbiAgaGVpZ2h0OiAkeyhwcm9wczogU3R5bGVkTG9hZGluZ1BhZ2VQcm9wcykgPT4gY2FsY0hlaWdodChwcm9wcyl9O1xyXG5gO1xyXG5cclxuZXhwb3J0IGRlZmF1bHQgU3R5bGVkTG9hZGluZ1BhZ2U7XHJcbiJdfQ== */")), e = a;
|
|
13
12
|
export {
|
|
14
|
-
|
|
13
|
+
e as default
|
|
15
14
|
};
|
|
16
15
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/pages/LoadingPage/styles.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\r\n\r\nimport { theme } from \"@hitachivantara/uikit-react-core\";\r\n\r\
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/pages/LoadingPage/styles.ts"],"sourcesContent":["import styled from \"@emotion/styled\";\r\n\r\nimport { theme } from \"@hitachivantara/uikit-react-core\";\r\n\r\ninterface StyledLoadingPageProps {\r\n showHeaderSubMenu?: boolean;\r\n isCompactMode?: boolean;\r\n}\r\n\r\n/**\r\n * Calculates the height of the image wrapper based on the header sub menu and compact mode.\r\n */\r\nconst calcHeight = ({\r\n showHeaderSubMenu,\r\n isCompactMode\r\n}: StyledLoadingPageProps) => {\r\n if (showHeaderSubMenu && !isCompactMode) {\r\n return `calc(100vh - (${theme.header.height} + ${theme.header.secondLevelHeight}px + ${theme.space.lg} + ${theme.space.lg}))`;\r\n }\r\n return `calc(100vh - (${theme.header.height} + ${theme.space.lg} + ${theme.space.lg}))`;\r\n};\r\n\r\nconst StyledLoadingPage = styled.div<StyledLoadingPageProps>`\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: ${theme.space.lg};\r\n height: ${(props: StyledLoadingPageProps) => calcHeight(props)};\r\n`;\r\n\r\nexport default StyledLoadingPage;\r\n"],"names":["calcHeight","showHeaderSubMenu","isCompactMode","theme","header","height","secondLevelHeight","space","lg","StyledLoadingPage","_styled","process","env","NODE_ENV","target","label","props","StyledLoadingPage$1"],"mappings":";;AAYA,MAAMA,IAAaA,CAAC;AAAA,EAClBC,mBAAAA;AAAAA,EACAC,eAAAA;AACsB,MAClBD,KAAqB,CAACC,IAChB,iBAAgBC,EAAMC,OAAOC,MAAO,MAAKF,EAAMC,OAAOE,iBAAkB,QAAOH,EAAMI,MAAMC,EAAG,MAAKL,EAAMI,MAAMC,EAAG,OAEpH,iBAAgBL,EAAMC,OAAOC,MAAO,MAAKF,EAAMI,MAAMC,EAAG,MAAKL,EAAMI,MAAMC,EAAG,MAGhFC,IAAiB,gBAAAC,EAAA,OAAAC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAA,QAAA;AAAA,EAAAC,OAAA;AAAA,CAIPZ,EAAAA,yDAAAA,EAAMI,MAAMC,IAChB,YAAA,CAACQ,MAAkChB,EAAWgB,CAAK,GAAC,OAAAL,QAAAC,IAAAC,aAC/D,eAAA,KAAA,0vDAAA,GAEDI,IAAeR;"}
|