udp-react-enterprise-component-library 26.8.0-beta.9 → 26.8.0
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/.tsbuildinfo +1 -1
- package/dist/index.mjs +2 -2
- package/dist/routes/PrivateRoute.d.ts.map +1 -1
- package/dist/routes/PrivateRoute.js +7 -3
- package/dist/routes/PrivateRoute.js.map +1 -1
- package/dist/routes/PrivateRoute.mjs +4 -4
- package/dist/routes/PrivateRoute.mjs.map +1 -1
- package/dist/routes/components/PageForbiddenRoute.d.ts.map +1 -1
- package/dist/routes/components/PageForbiddenRoute.js +4 -11
- package/dist/routes/components/PageForbiddenRoute.js.map +1 -1
- package/dist/routes/components/PageForbiddenRoute.mjs +35 -45
- package/dist/routes/components/PageForbiddenRoute.mjs.map +1 -1
- package/dist/routes/components/PageNotFoundRoute.d.ts.map +1 -1
- package/dist/routes/components/PageNotFoundRoute.js +4 -11
- package/dist/routes/components/PageNotFoundRoute.js.map +1 -1
- package/dist/routes/components/PageNotFoundRoute.mjs +32 -42
- package/dist/routes/components/PageNotFoundRoute.mjs.map +1 -1
- package/dist/routes/components/PageStatus.d.ts.map +1 -1
- package/dist/routes/components/PageStatus.js +16 -39
- package/dist/routes/components/PageStatus.js.map +1 -1
- package/dist/routes/components/PageStatus.mjs +55 -131
- package/dist/routes/components/PageStatus.mjs.map +1 -1
- package/dist/shell/Shell.d.ts +4 -1
- package/dist/shell/Shell.d.ts.map +1 -1
- package/dist/shell/Shell.js +21 -5
- package/dist/shell/Shell.js.map +1 -1
- package/dist/shell/Shell.mjs +13 -5
- package/dist/shell/Shell.mjs.map +1 -1
- package/dist/udp/pages/UdpTransactionsPage/UdpTransactionsPage.d.ts.map +1 -1
- package/dist/udp/pages/UdpTransactionsPage/UdpTransactionsPage.js +64 -5
- package/dist/udp/pages/UdpTransactionsPage/UdpTransactionsPage.js.map +1 -1
- package/dist/udp/pages/UdpTransactionsPage/UdpTransactionsPage.mjs +249 -160
- package/dist/udp/pages/UdpTransactionsPage/UdpTransactionsPage.mjs.map +1 -1
- package/dist/utilities/i18n/locales/es-US.json +5 -5
- package/dist/utilities/i18n/locales/es-US.mjs +5 -5
- package/dist/utilities/i18n/locales/fr-CA.json +5 -5
- package/dist/utilities/i18n/locales/fr-CA.mjs +5 -5
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -317,8 +317,6 @@ import { useTheme } from "./utilities/theme/useTheme.mjs";
|
|
|
317
317
|
import { corporateColors, corporateColorsHint, productCategoryColors } from "./utilities/theme/brand.mjs";
|
|
318
318
|
import { useSystemColor } from "./utilities/theme/systemColors.mjs";
|
|
319
319
|
import { getCurrentThemeMode, setThemeMode } from "./utilities/theme/index.mjs";
|
|
320
|
-
import { PageStatus } from "./routes/components/PageStatus.mjs";
|
|
321
|
-
import { PageForbiddenRoute } from "./routes/components/PageForbiddenRoute.mjs";
|
|
322
320
|
import { isI18nStackEnabled, setI18nEnabled } from "./utilities/i18n/i18nEnabled.mjs";
|
|
323
321
|
import { createDefaultLanguageLoader, fetchAvailableLanguages, setLanguageLoader, useAvailableLanguages } from "./utilities/i18n/languageSource.mjs";
|
|
324
322
|
import { findHomeRoute, findHomeRouteSlug, getMenuItemsRecursively, getRouteRolesMapAndMenuActiveMap } from "./utilities/menus/menuUtilities.mjs";
|
|
@@ -435,6 +433,8 @@ import { PrivateRoute } from "./routes/PrivateRoute.mjs";
|
|
|
435
433
|
import { PublicRoute } from "./routes/PublicRoute.mjs";
|
|
436
434
|
import { UdpRoutes } from "./routes/UdpRoutes.mjs";
|
|
437
435
|
import { Link, NavLink, Prompt, Redirect, Route, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter } from "./routes/index.mjs";
|
|
436
|
+
import { PageStatus } from "./routes/components/PageStatus.mjs";
|
|
437
|
+
import { PageForbiddenRoute } from "./routes/components/PageForbiddenRoute.mjs";
|
|
438
438
|
import { PageNotFoundRoute } from "./routes/components/PageNotFoundRoute.mjs";
|
|
439
439
|
import { BreadCrumbMenu } from "./UI/inputs/link/BreadCrumbMenu.mjs";
|
|
440
440
|
import { AmbientProjectSwitcher } from "./shell/ui/AmbientProjectSwitcher.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateRoute.d.ts","sourceRoot":"","sources":["../../src/routes/PrivateRoute.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"PrivateRoute.d.ts","sourceRoot":"","sources":["../../src/routes/PrivateRoute.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAO,EAAS,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAyCrD;;;;;;GAMG;AACH,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD;;;OAGG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACjC;;;OAGG;IACH,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,eAAO,MAAM,YAAY,uHA0LxB,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import React, { useMemo } from 'react';
|
|
12
|
+
import React, { lazy, Suspense, useMemo } from 'react';
|
|
13
13
|
import { Route } from 'react-router-dom';
|
|
14
14
|
import { useTheme } from '../utilities/theme';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
@@ -17,7 +17,6 @@ import { InteractionType, InteractionStatus } from '@azure/msal-browser';
|
|
|
17
17
|
import { MsalAuthenticationTemplate, useMsal } from '@azure/msal-react';
|
|
18
18
|
import { useIsUnityAuthenticated } from '../utilities/auth/useIsUnityAuthenticated';
|
|
19
19
|
import { useUser } from '../utilities/auth/useUser';
|
|
20
|
-
import { PageForbiddenRoute } from './components/PageForbiddenRoute';
|
|
21
20
|
import { useMenuContext } from '../utilities/menus/MenuProvider';
|
|
22
21
|
import { useRegisterRoute } from './useRegisterRoute';
|
|
23
22
|
import { LoadingIndicator } from '../UI/loading/LoadingIndicator';
|
|
@@ -28,6 +27,11 @@ import { storeRedirectPath } from '../utilities/redirect/LocalRedirectUrlStorage
|
|
|
28
27
|
import { useAxiosGet } from '../utilities';
|
|
29
28
|
import { ConfigService } from '../configService';
|
|
30
29
|
import { PageLoading } from '../UI';
|
|
30
|
+
// Matches the PageNotFoundRoute treatment in UdpRoutes: a 403 screen is not on
|
|
31
|
+
// the hot path, so it does not belong in the eager graph.
|
|
32
|
+
const PageForbiddenRoute = lazy(() => import('./components/PageForbiddenRoute').then((m) => ({
|
|
33
|
+
default: m.PageForbiddenRoute
|
|
34
|
+
})));
|
|
31
35
|
const FORBIDDEN_REASONS = {
|
|
32
36
|
INACTIVE_MENU: {
|
|
33
37
|
key: 'routes.forbidden.inactiveMenu',
|
|
@@ -162,7 +166,7 @@ export const PrivateRoute = (_a) => {
|
|
|
162
166
|
const forbiddenMessage = reason
|
|
163
167
|
? t(reason.key, { defaultValue: reason.defaultValue })
|
|
164
168
|
: routeAccessResponse;
|
|
165
|
-
return (React.createElement(Route, { path: "*", render: () => (React.createElement(PageForbiddenRoute, { message: forbiddenMessage, showButton: false })) }));
|
|
169
|
+
return (React.createElement(Route, { path: "*", render: () => (React.createElement(Suspense, { fallback: React.createElement(PageLoading, null) }, React.createElement(PageForbiddenRoute, { message: forbiddenMessage, showButton: false }))) }));
|
|
166
170
|
}
|
|
167
171
|
if (isUserInitialized) {
|
|
168
172
|
return React.createElement(Route, Object.assign({}, routeProps));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateRoute.js","sourceRoot":"","sources":["../../src/routes/PrivateRoute.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
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C;IACnC,CAAC;IAED,OAAO,oBAAC,gBAAgB,OAAG,CAAC;AAAA,CAC7B,CAAC"}
|
|
@@ -5,19 +5,19 @@ import { useAxiosGet } from "../utilities/useAxiosGet.mjs";
|
|
|
5
5
|
import { PageLoading } from "../UI/feedback/PageLoading.mjs";
|
|
6
6
|
import { useIsUnityAuthenticated } from "../utilities/auth/useIsUnityAuthenticated.mjs";
|
|
7
7
|
import { useTheme } from "../utilities/theme/useTheme.mjs";
|
|
8
|
-
import { PageForbiddenRoute } from "./components/PageForbiddenRoute.mjs";
|
|
9
8
|
import { useMenuContext } from "../utilities/menus/MenuProvider.mjs";
|
|
10
9
|
import { useRegisterRoute } from "./useRegisterRoute.mjs";
|
|
11
10
|
import { LoadingIndicator } from "../UI/loading/LoadingIndicator/LoadingIndicator.mjs";
|
|
12
11
|
import { storeRedirectPath } from "../utilities/redirect/LocalRedirectUrlStorage.mjs";
|
|
13
12
|
import { PasswordResetRedirect } from "./components/PasswordResetRedirect.mjs";
|
|
14
13
|
import { useTenant } from "../utilities/tenant/useTenant.mjs";
|
|
15
|
-
import React, { useMemo } from "react";
|
|
14
|
+
import React, { Suspense, lazy, useMemo } from "react";
|
|
16
15
|
import { InteractionStatus, InteractionType } from "@azure/msal-browser";
|
|
17
16
|
import { Route } from "react-router-dom";
|
|
18
17
|
import { useTranslation } from "react-i18next";
|
|
19
18
|
import { MsalAuthenticationTemplate, useMsal } from "@azure/msal-react";
|
|
20
19
|
//#region src/routes/PrivateRoute.tsx
|
|
20
|
+
const PageForbiddenRoute = lazy(() => import("./components/PageForbiddenRoute.mjs").then((m) => ({ default: m.PageForbiddenRoute })));
|
|
21
21
|
const FORBIDDEN_REASONS = {
|
|
22
22
|
INACTIVE_MENU: {
|
|
23
23
|
key: "routes.forbidden.inactiveMenu",
|
|
@@ -97,10 +97,10 @@ const PrivateRoute = ({ rolesMap: propRolesMap, menuActiveMap: propMenuActiveMap
|
|
|
97
97
|
const forbiddenMessage = reason ? t(reason.key, { defaultValue: reason.defaultValue }) : routeAccessResponse;
|
|
98
98
|
return /* @__PURE__ */ React.createElement(Route, {
|
|
99
99
|
path: "*",
|
|
100
|
-
render: () => /* @__PURE__ */ React.createElement(PageForbiddenRoute, {
|
|
100
|
+
render: () => /* @__PURE__ */ React.createElement(Suspense, { fallback: /* @__PURE__ */ React.createElement(PageLoading, null) }, /* @__PURE__ */ React.createElement(PageForbiddenRoute, {
|
|
101
101
|
message: forbiddenMessage,
|
|
102
102
|
showButton: false
|
|
103
|
-
})
|
|
103
|
+
}))
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
if (isUserInitialized) return /* @__PURE__ */ React.createElement(Route, routeProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateRoute.mjs","names":["React","useMemo","Route","RouteProps","useTheme","useTranslation","RedirectRequest","InteractionType","InteractionStatus","MsalAuthenticationTemplate","useMsal","useIsUnityAuthenticated","useUser","PageForbiddenRoute","useMenuContext","useRegisterRoute","LoadingIndicator","PasswordResetRedirect","getLoginRequest","useTenant","storeRedirectPath","useAxiosGet","ConfigService","PageLoading","FORBIDDEN_REASONS","Record","key","defaultValue","INACTIVE_MENU","MISSING_ROLES","PrivateRouteProps","rolesMap","Map","menuActiveMap","PrivateRoute","propRolesMap","propMenuActiveMap","routeProps","location","isPublic","isAuthenticated","inProgress","user","tenant","theme","t","menuContext","size","unknownRoute","path","mapProvesAccess","Boolean","has","pathname","get","length","isSystemAdmin","isUnitySystemAdmin","shouldWaitForMenu","leftMenu","leftMenuError","shouldCheckRoute","userId","activeTenant","tenantId","data","routeAccessResponse","loading","routeAccessLoading","error","routeAccessError","tenantV1ApiUrl","encodeURIComponent","userRoles","Array","isArray","roles","map","role","roleId","filter","userHasRoles","routeRoles","some","element","includes","menuIsActive","isUserInitialized","isTenantInitialized","isThemeInitialized","isInitialized","shouldWaitForProtectedContext","shouldWaitForTheme","Startup","HandleRedirect","None","search","loginRequest","Redirect","props","hasMsalError","errorMessage","test","window","hash","replace","undefined","isRouteForbidden","reason","forbiddenMessage"],"sources":["../../src/routes/PrivateRoute.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Route, RouteProps } from 'react-router-dom';\nimport { useTheme } from '../utilities/theme';\nimport { useTranslation } from 'react-i18next';\nimport type { RedirectRequest } from '@azure/msal-browser';\nimport { InteractionType, InteractionStatus } from '@azure/msal-browser';\nimport { MsalAuthenticationTemplate, useMsal } from '@azure/msal-react';\nimport { useIsUnityAuthenticated } from '../utilities/auth/useIsUnityAuthenticated';\nimport { useUser } from '../utilities/auth/useUser';\nimport { PageForbiddenRoute } from './components/PageForbiddenRoute';\nimport { useMenuContext } from '../utilities/menus/MenuProvider';\nimport { useRegisterRoute } from './useRegisterRoute';\nimport { LoadingIndicator } from '../UI/loading/LoadingIndicator';\nimport { PasswordResetRedirect } from './components/PasswordResetRedirect';\nimport { getLoginRequest } from '../utilities/auth/signInAuthProvider';\nimport { useTenant } from '../utilities/tenant';\nimport { storeRedirectPath } from '../utilities/redirect/LocalRedirectUrlStorage';\nimport { useAxiosGet } from '../utilities';\nimport { ConfigService } from '../configService';\nimport { PageLoading } from '../UI';\n\nconst FORBIDDEN_REASONS: Record<string, { key: string; defaultValue: string }> =\n {\n INACTIVE_MENU: {\n key: 'routes.forbidden.inactiveMenu',\n defaultValue:\n 'Trying to access inactive menu. Please check your menu configurations'\n },\n MISSING_ROLES: {\n key: 'routes.forbidden.missingRoles',\n defaultValue:\n 'You do not have the required roles to access this page. Please contact an administrator to get access'\n }\n };\n\n/**\n * Route guard for protected pages.\n *\n * - Triggers login redirect when the user is not authenticated.\n * - Blocks rendering until user/tenant/theme are initialized after login.\n * - Enforces menu activation and role-based access.\n */\nexport interface PrivateRouteProps extends RouteProps {\n /**\n * Optional map of pathname -> required role IDs.\n * If a path is present and has roles, the user must have at least one.\n */\n rolesMap?: Map<string, string[]>;\n /**\n * Optional map of pathname -> menu active status.\n * If a path is present and inactive, access is denied.\n */\n menuActiveMap?: Map<string, boolean>;\n}\n\nexport const PrivateRoute = ({\n rolesMap: propRolesMap,\n menuActiveMap: propMenuActiveMap,\n ...routeProps\n}: PrivateRouteProps) => {\n const location = useRegisterRoute({ isPublic: false });\n const isAuthenticated = useIsUnityAuthenticated();\n const { inProgress } = useMsal();\n const user = useUser();\n const tenant = useTenant();\n const theme = useTheme();\n const { t } = useTranslation();\n const menuContext = useMenuContext?.();\n const rolesMap = menuContext?.rolesMap?.size ? menuContext.rolesMap : propRolesMap;\n const menuActiveMap = menuContext?.menuActiveMap?.size ? menuContext.menuActiveMap : propMenuActiveMap;\n\n // The catch-all route: no menu backs it, so there is nothing to authorize helps avoid checking mistyped paths.\n const unknownRoute = routeProps?.path === '*';\n\n // The maps can prove access which saves a request. The backend\n // filters restricted paths out of the maps, so a path being present means the user\n // may access it — but only when the menu is active and the role list is empty\n // (empty array = no role restrictions).\n const mapProvesAccess =\n Boolean(rolesMap?.has(routeProps.location?.pathname)) &&\n menuActiveMap?.get(routeProps.location?.pathname) === true &&\n !rolesMap?.get(routeProps.location?.pathname)?.length;\n\n const isSystemAdmin = Boolean(user?.isUnitySystemAdmin);\n\n const shouldWaitForMenu =\n isAuthenticated &&\n !isSystemAdmin &&\n !menuContext?.leftMenu &&\n !menuContext?.leftMenuError;\n\n // Inverted into useAxiosGet's isManual below. Waits for the menu to settle so\n // the request is not fired and then cancelled when the menu proves access.\n const shouldCheckRoute =\n isAuthenticated &&\n !shouldWaitForMenu &&\n Boolean(routeProps.location?.pathname) &&\n Boolean(user?.userId) &&\n Boolean(tenant?.activeTenant?.tenantId) &&\n !mapProvesAccess &&\n !unknownRoute;\n\n const [\n {\n data: routeAccessResponse,\n loading: routeAccessLoading,\n error: routeAccessError\n }\n ] = useAxiosGet(\n ConfigService.tenantV1ApiUrl,\n `menus/tenant/${tenant?.activeTenant?.tenantId}/routeForbidden?route=${encodeURIComponent(routeProps.location?.pathname ?? '')}&userId=${user?.userId}`,\n {},\n !shouldCheckRoute\n ) as [{ data?: string; loading: boolean; error?: unknown }, unknown];\n\n const userRoles = useMemo(() => {\n return Array.isArray(user?.roles)\n ? user.roles.map((role) => role.roleId).filter(Boolean)\n : [];\n }, [user?.roles]);\n\n const userHasRoles = useMemo(() => {\n if (rolesMap?.size > 0) {\n if (!rolesMap.has(routeProps.location?.pathname)) {\n return false;\n }\n const routeRoles = rolesMap.get(routeProps.location?.pathname);\n if (!routeRoles?.length) {\n return true;\n }\n return routeRoles.some((element) => userRoles.includes(element));\n }\n return true;\n }, [userRoles, rolesMap, routeProps.location?.pathname]);\n\n const menuIsActive = useMemo(() => {\n if (\n menuActiveMap?.size > 0 &&\n menuActiveMap.has(routeProps.location?.pathname)\n ) {\n return menuActiveMap.get(routeProps.location?.pathname);\n }\n }, [menuActiveMap, routeProps.location?.pathname]);\n\n const activeTenant = tenant?.activeTenant ?? null;\n const isUserInitialized = Boolean(user?.userId);\n const isTenantInitialized = Boolean(activeTenant?.tenantId);\n const isThemeInitialized = Boolean(theme?.isInitialized);\n\n const shouldWaitForProtectedContext =\n isAuthenticated && (!isUserInitialized || !isTenantInitialized);\n const shouldWaitForTheme = isAuthenticated && !isThemeInitialized;\n if (shouldWaitForProtectedContext || shouldWaitForTheme) {\n return <LoadingIndicator />;\n }\n\n if (!isAuthenticated) {\n // Prevent login redirect loops while MSAL is still processing the redirect response.\n if (inProgress === InteractionStatus.Startup || inProgress === InteractionStatus.HandleRedirect) {\n return <LoadingIndicator />;\n }\n if (inProgress !== InteractionStatus.None) {\n return <LoadingIndicator />;\n }\n storeRedirectPath(location.pathname, location.search);\n let loginRequest: RedirectRequest | null = null;\n try {\n loginRequest = getLoginRequest();\n } catch {\n loginRequest = null;\n }\n\n if (!loginRequest) {\n return <LoadingIndicator />;\n }\n\n return (\n <MsalAuthenticationTemplate\n interactionType={InteractionType.Redirect}\n authenticationRequest={loginRequest}\n loadingComponent={() => <LoadingIndicator />}\n errorComponent={(props) => {\n if (inProgress !== InteractionStatus.None) {\n return <LoadingIndicator />;\n }\n const hasMsalError =\n Boolean(props?.error?.errorMessage) ||\n /(^|&)(error|error_description)=/.test(\n window.location.hash?.replace(/^#/, '') ?? ''\n );\n if (!hasMsalError) {\n return <LoadingIndicator />;\n }\n return <PasswordResetRedirect {...props} />;\n }}\n >\n <Route {...routeProps} />\n </MsalAuthenticationTemplate>\n );\n }\n\n // Only consult the access request while the check is wanted. axios-hooks\n // leaves `loading` stuck at true when a request is cancelled mid-flight, so\n // reading it unconditionally would hold the page loader forever.\n if (\n (shouldCheckRoute &&\n (routeAccessLoading ||\n (routeAccessResponse === undefined && !routeAccessError))) ||\n shouldWaitForMenu\n ) {\n return <PageLoading />;\n }\n\n // An inactive menu blocks system admins too, but missing roles do not, so the reason has to be checked explicitly\n const isRouteForbidden =\n shouldCheckRoute &&\n Boolean(routeAccessResponse) &&\n (!isSystemAdmin || routeAccessResponse === 'INACTIVE_MENU');\n\n if (isRouteForbidden) {\n const reason = FORBIDDEN_REASONS[routeAccessResponse];\n const forbiddenMessage = reason\n ? t(reason.key, { defaultValue: reason.defaultValue })\n : routeAccessResponse;\n return (\n <Route\n path='*'\n render={() => (\n <PageForbiddenRoute message={forbiddenMessage} showButton={false} />\n )}\n />\n );\n }\n\n if (isUserInitialized) {\n return <Route {...routeProps} />;\n }\n\n return <LoadingIndicator />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqBA,MAAMwB,oBACJ;CACEI,eAAe;EACbF,KAAK;EACLC,cACE;EACH;CACDE,eAAe;EACbH,KAAK;EACLC,cACE;EACJ;CACD;AAsBH,MAAaO,gBAAgB,EAC3BH,UAAUI,cACVF,eAAeG,mBACf,GAAGC,iBACoB;CACvB,MAAMC,WAAWvB,iBAAiB,EAAEwB,UAAU,OAAO,CAAC;CACtD,MAAMC,kBAAkB7B,yBAAyB;CACjD,MAAM,EAAE8B,eAAe/B,SAAS;CAChC,MAAMgC,OAAO9B,SAAS;CACtB,MAAM+B,SAASxB,WAAW;CAC1B,MAAMyB,QAAQ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,eAAejC,kBAAkBuF,KACnC,QAAO,sBAAA,cAAC,kBAAA,KAAmB;AAO7B,QAAI,EAJF5C,QAAQgD,OAAO9B,OAAOgC,aAAa,IACnC,kCAAkCC,KAChCC,OAAOjE,SAASkE,MAAMC,QAAQ,MAAM,GAAG,IAAI,GAC5C,EAED,QAAO,sBAAA,cAAC,kBAAA,KAAmB;AAE7B,WAAO,sBAAA,cAAC,uBAA0BN,MAAS;;GAIlB,EAD3B,sBAAA,cAAC,OAAU9D,WAAW,CACK;;AAOjC,KACGwB,qBACEO,sBACEF,wBAAwBwC,KAAAA,KAAa,CAACpC,qBAC3CZ,kBAEA,QAAO,sBAAA,cAAC,aAAA,KAAc;AASxB,KAJEG,oBACAV,QAAQe,oBAAoB,KAC3B,CAACV,iBAAiBU,wBAAwB,kBAEvB;EACpB,MAAM0C,SAASpF,kBAAkB0C;EACjC,MAAM2C,mBAAmBD,SACrB/D,EAAE+D,OAAOlF,KAAK,EAAEC,cAAciF,OAAOjF,cAAc,CAAC,GACpDuC;AACJ,SACE,sBAAA,cAAC,OAAD;GACE,MAAK;GACL,cACE,sBAAA,cAAC,oBAAD;IAAoB,SAAS2C;IAAkB,YAAY;IAC5D,CAAA;GACD,CAAA;;AAIN,KAAItB,kBACF,QAAO,sBAAA,cAAC,OAAUlD,WAAc;AAGlC,QAAO,sBAAA,cAAC,kBAAA,KAAmB"}
|
|
1
|
+
{"version":3,"file":"PrivateRoute.mjs","names":["React","lazy","Suspense","useMemo","Route","RouteProps","useTheme","useTranslation","RedirectRequest","InteractionType","InteractionStatus","MsalAuthenticationTemplate","useMsal","useIsUnityAuthenticated","useUser","useMenuContext","useRegisterRoute","LoadingIndicator","PasswordResetRedirect","getLoginRequest","useTenant","storeRedirectPath","useAxiosGet","ConfigService","PageLoading","PageForbiddenRoute","then","m","default","FORBIDDEN_REASONS","Record","key","defaultValue","INACTIVE_MENU","MISSING_ROLES","PrivateRouteProps","rolesMap","Map","menuActiveMap","PrivateRoute","propRolesMap","propMenuActiveMap","routeProps","location","isPublic","isAuthenticated","inProgress","user","tenant","theme","t","menuContext","size","unknownRoute","path","mapProvesAccess","Boolean","has","pathname","get","length","isSystemAdmin","isUnitySystemAdmin","shouldWaitForMenu","leftMenu","leftMenuError","shouldCheckRoute","userId","activeTenant","tenantId","data","routeAccessResponse","loading","routeAccessLoading","error","routeAccessError","tenantV1ApiUrl","encodeURIComponent","userRoles","Array","isArray","roles","map","role","roleId","filter","userHasRoles","routeRoles","some","element","includes","menuIsActive","isUserInitialized","isTenantInitialized","isThemeInitialized","isInitialized","shouldWaitForProtectedContext","shouldWaitForTheme","Startup","HandleRedirect","None","search","loginRequest","Redirect","props","hasMsalError","errorMessage","test","window","hash","replace","undefined","isRouteForbidden","reason","forbiddenMessage"],"sources":["../../src/routes/PrivateRoute.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\nimport { Route, RouteProps } from 'react-router-dom';\nimport { useTheme } from '../utilities/theme';\nimport { useTranslation } from 'react-i18next';\nimport type { RedirectRequest } from '@azure/msal-browser';\nimport { InteractionType, InteractionStatus } from '@azure/msal-browser';\nimport { MsalAuthenticationTemplate, useMsal } from '@azure/msal-react';\nimport { useIsUnityAuthenticated } from '../utilities/auth/useIsUnityAuthenticated';\nimport { useUser } from '../utilities/auth/useUser';\nimport { useMenuContext } from '../utilities/menus/MenuProvider';\nimport { useRegisterRoute } from './useRegisterRoute';\nimport { LoadingIndicator } from '../UI/loading/LoadingIndicator';\nimport { PasswordResetRedirect } from './components/PasswordResetRedirect';\nimport { getLoginRequest } from '../utilities/auth/signInAuthProvider';\nimport { useTenant } from '../utilities/tenant';\nimport { storeRedirectPath } from '../utilities/redirect/LocalRedirectUrlStorage';\nimport { useAxiosGet } from '../utilities';\nimport { ConfigService } from '../configService';\nimport { PageLoading } from '../UI';\n\n// Matches the PageNotFoundRoute treatment in UdpRoutes: a 403 screen is not on\n// the hot path, so it does not belong in the eager graph.\nconst PageForbiddenRoute = lazy(() =>\n import('./components/PageForbiddenRoute').then((m) => ({\n default: m.PageForbiddenRoute\n }))\n);\n\nconst FORBIDDEN_REASONS: Record<string, { key: string; defaultValue: string }> =\n {\n INACTIVE_MENU: {\n key: 'routes.forbidden.inactiveMenu',\n defaultValue:\n 'Trying to access inactive menu. Please check your menu configurations'\n },\n MISSING_ROLES: {\n key: 'routes.forbidden.missingRoles',\n defaultValue:\n 'You do not have the required roles to access this page. Please contact an administrator to get access'\n }\n };\n\n/**\n * Route guard for protected pages.\n *\n * - Triggers login redirect when the user is not authenticated.\n * - Blocks rendering until user/tenant/theme are initialized after login.\n * - Enforces menu activation and role-based access.\n */\nexport interface PrivateRouteProps extends RouteProps {\n /**\n * Optional map of pathname -> required role IDs.\n * If a path is present and has roles, the user must have at least one.\n */\n rolesMap?: Map<string, string[]>;\n /**\n * Optional map of pathname -> menu active status.\n * If a path is present and inactive, access is denied.\n */\n menuActiveMap?: Map<string, boolean>;\n}\n\nexport const PrivateRoute = ({\n rolesMap: propRolesMap,\n menuActiveMap: propMenuActiveMap,\n ...routeProps\n}: PrivateRouteProps) => {\n const location = useRegisterRoute({ isPublic: false });\n const isAuthenticated = useIsUnityAuthenticated();\n const { inProgress } = useMsal();\n const user = useUser();\n const tenant = useTenant();\n const theme = useTheme();\n const { t } = useTranslation();\n const menuContext = useMenuContext?.();\n const rolesMap = menuContext?.rolesMap?.size ? menuContext.rolesMap : propRolesMap;\n const menuActiveMap = menuContext?.menuActiveMap?.size ? menuContext.menuActiveMap : propMenuActiveMap;\n\n // The catch-all route: no menu backs it, so there is nothing to authorize helps avoid checking mistyped paths.\n const unknownRoute = routeProps?.path === '*';\n\n // The maps can prove access which saves a request. The backend\n // filters restricted paths out of the maps, so a path being present means the user\n // may access it — but only when the menu is active and the role list is empty\n // (empty array = no role restrictions).\n const mapProvesAccess =\n Boolean(rolesMap?.has(routeProps.location?.pathname)) &&\n menuActiveMap?.get(routeProps.location?.pathname) === true &&\n !rolesMap?.get(routeProps.location?.pathname)?.length;\n\n const isSystemAdmin = Boolean(user?.isUnitySystemAdmin);\n\n const shouldWaitForMenu =\n isAuthenticated &&\n !isSystemAdmin &&\n !menuContext?.leftMenu &&\n !menuContext?.leftMenuError;\n\n // Inverted into useAxiosGet's isManual below. Waits for the menu to settle so\n // the request is not fired and then cancelled when the menu proves access.\n const shouldCheckRoute =\n isAuthenticated &&\n !shouldWaitForMenu &&\n Boolean(routeProps.location?.pathname) &&\n Boolean(user?.userId) &&\n Boolean(tenant?.activeTenant?.tenantId) &&\n !mapProvesAccess &&\n !unknownRoute;\n\n const [\n {\n data: routeAccessResponse,\n loading: routeAccessLoading,\n error: routeAccessError\n }\n ] = useAxiosGet(\n ConfigService.tenantV1ApiUrl,\n `menus/tenant/${tenant?.activeTenant?.tenantId}/routeForbidden?route=${encodeURIComponent(routeProps.location?.pathname ?? '')}&userId=${user?.userId}`,\n {},\n !shouldCheckRoute\n ) as [{ data?: string; loading: boolean; error?: unknown }, unknown];\n\n const userRoles = useMemo(() => {\n return Array.isArray(user?.roles)\n ? user.roles.map((role) => role.roleId).filter(Boolean)\n : [];\n }, [user?.roles]);\n\n const userHasRoles = useMemo(() => {\n if (rolesMap?.size > 0) {\n if (!rolesMap.has(routeProps.location?.pathname)) {\n return false;\n }\n const routeRoles = rolesMap.get(routeProps.location?.pathname);\n if (!routeRoles?.length) {\n return true;\n }\n return routeRoles.some((element) => userRoles.includes(element));\n }\n return true;\n }, [userRoles, rolesMap, routeProps.location?.pathname]);\n\n const menuIsActive = useMemo(() => {\n if (\n menuActiveMap?.size > 0 &&\n menuActiveMap.has(routeProps.location?.pathname)\n ) {\n return menuActiveMap.get(routeProps.location?.pathname);\n }\n }, [menuActiveMap, routeProps.location?.pathname]);\n\n const activeTenant = tenant?.activeTenant ?? null;\n const isUserInitialized = Boolean(user?.userId);\n const isTenantInitialized = Boolean(activeTenant?.tenantId);\n const isThemeInitialized = Boolean(theme?.isInitialized);\n\n const shouldWaitForProtectedContext =\n isAuthenticated && (!isUserInitialized || !isTenantInitialized);\n const shouldWaitForTheme = isAuthenticated && !isThemeInitialized;\n if (shouldWaitForProtectedContext || shouldWaitForTheme) {\n return <LoadingIndicator />;\n }\n\n if (!isAuthenticated) {\n // Prevent login redirect loops while MSAL is still processing the redirect response.\n if (inProgress === InteractionStatus.Startup || inProgress === InteractionStatus.HandleRedirect) {\n return <LoadingIndicator />;\n }\n if (inProgress !== InteractionStatus.None) {\n return <LoadingIndicator />;\n }\n storeRedirectPath(location.pathname, location.search);\n let loginRequest: RedirectRequest | null = null;\n try {\n loginRequest = getLoginRequest();\n } catch {\n loginRequest = null;\n }\n\n if (!loginRequest) {\n return <LoadingIndicator />;\n }\n\n return (\n <MsalAuthenticationTemplate\n interactionType={InteractionType.Redirect}\n authenticationRequest={loginRequest}\n loadingComponent={() => <LoadingIndicator />}\n errorComponent={(props) => {\n if (inProgress !== InteractionStatus.None) {\n return <LoadingIndicator />;\n }\n const hasMsalError =\n Boolean(props?.error?.errorMessage) ||\n /(^|&)(error|error_description)=/.test(\n window.location.hash?.replace(/^#/, '') ?? ''\n );\n if (!hasMsalError) {\n return <LoadingIndicator />;\n }\n return <PasswordResetRedirect {...props} />;\n }}\n >\n <Route {...routeProps} />\n </MsalAuthenticationTemplate>\n );\n }\n\n // Only consult the access request while the check is wanted. axios-hooks\n // leaves `loading` stuck at true when a request is cancelled mid-flight, so\n // reading it unconditionally would hold the page loader forever.\n if (\n (shouldCheckRoute &&\n (routeAccessLoading ||\n (routeAccessResponse === undefined && !routeAccessError))) ||\n shouldWaitForMenu\n ) {\n return <PageLoading />;\n }\n\n // An inactive menu blocks system admins too, but missing roles do not, so the reason has to be checked explicitly\n const isRouteForbidden =\n shouldCheckRoute &&\n Boolean(routeAccessResponse) &&\n (!isSystemAdmin || routeAccessResponse === 'INACTIVE_MENU');\n\n if (isRouteForbidden) {\n const reason = FORBIDDEN_REASONS[routeAccessResponse];\n const forbiddenMessage = reason\n ? t(reason.key, { defaultValue: reason.defaultValue })\n : routeAccessResponse;\n return (\n <Route\n path='*'\n render={() => (\n <Suspense fallback={<PageLoading />}>\n <PageForbiddenRoute message={forbiddenMessage} showButton={false} />\n </Suspense>\n )}\n />\n );\n }\n\n if (isUserInitialized) {\n return <Route {...routeProps} />;\n }\n\n return <LoadingIndicator />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsBA,MAAMyB,qBAAqBxB,WACzB,OAAO,uCAAmCyB,MAAMC,OAAO,EACrDC,SAASD,EAAEF,oBACZ,EACH,CAAC;AAED,MAAMI,oBACJ;CACEI,eAAe;EACbF,KAAK;EACLC,cACE;EACH;CACDE,eAAe;EACbH,KAAK;EACLC,cACE;EACJ;CACD;AAsBH,MAAaO,gBAAgB,EAC3BH,UAAUI,cACVF,eAAeG,mBACf,GAAGC,iBACoB;CACvB,MAAMC,WAAW3B,iBAAiB,EAAE4B,UAAU,OAAO,CAAC;CACtD,MAAMC,kBAAkBhC,yBAAyB;CACjD,MAAM,EAAEiC,eAAelC,SAAS;CAChC,MAAMmC,OAAOjC,SAAS;CACtB,MAAMkC,SAAS5B,WAAW;CAC1B,MAAM6B,QAAQ3C,UAAU;CACxB,MAAM,EAAE4C,MAAM3C,gBAAgB;CAC9B,MAAM4C,cAAcpC,kBAAkB;CACtC,MAAMqB,WAAWe,aAAaf,UAAUgB,OAAOD,YAAYf,WAAWI;CACtE,MAAMF,gBAAgBa,aAAab,eAAec,OAAOD,YAAYb,gBAAgBG;CAGrF,MAAMY,eAAeX,YAAYY,SAAS;CAM1C,MAAMC,kBACJC,QAAQpB,UAAUqB,IAAIf,WAAWC,UAAUe,SAAS,CAAC,IACrDpB,eAAeqB,IAAIjB,WAAWC,UAAUe,SAAS,KAAK,QACtD,CAACtB,UAAUuB,IAAIjB,WAAWC,UAAUe,SAAS,EAAEE;CAEjD,MAAMC,gBAAgBL,QAAQT,MAAMe,mBAAmB;CAEvD,MAAMC,oBACJlB,mBACA,CAACgB,iBACD,CAACV,aAAaa,YACd,CAACb,aAAac;CAIh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EACjC,MAAM2C,mBAAmBD,SACrB/D,EAAE+D,OAAOlF,KAAK,EAAEC,cAAciF,OAAOjF,cAAc,CAAC,GACpDuC;AACJ,SACE,sBAAA,cAAC,OAAD;GACE,MAAK;GACL,cACE,sBAAA,cAAC,UAAD,EAAU,UAAU,sBAAA,cAAC,aAAA,KAAc,EAGpC,EAFG,sBAAA,cAAC,oBAAD;IAAoB,SAAS2C;IAAkB,YAAY;IAAM,CAAA,CAEpE;GACD,CAAA;;AAIN,KAAItB,kBACF,QAAO,sBAAA,cAAC,OAAUlD,WAAc;AAGlC,QAAO,sBAAA,cAAC,kBAAA,KAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageForbiddenRoute.d.ts","sourceRoot":"","sources":["../../../src/routes/components/PageForbiddenRoute.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PageForbiddenRoute.d.ts","sourceRoot":"","sources":["../../../src/routes/components/PageForbiddenRoute.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,kBAAkB,mCAgC9B,CAAC"}
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { makeStyles } from '@material-ui/core';
|
|
3
2
|
import { PageStatus } from './PageStatus';
|
|
4
3
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
const useStyles = makeStyles((theme) => ({
|
|
6
|
-
root: {
|
|
7
|
-
marginTop: theme.spacing(4)
|
|
8
|
-
}
|
|
9
|
-
}));
|
|
10
4
|
export const PageForbiddenRoute = (props) => {
|
|
11
5
|
const { title, statusCode, subheader, message, showButton } = props;
|
|
12
|
-
const classes = useStyles();
|
|
13
6
|
const { t } = useTranslation();
|
|
14
|
-
return (React.createElement(
|
|
15
|
-
defaultValue: '
|
|
7
|
+
return (React.createElement(PageStatus, { title: title !== null && title !== void 0 ? title : t('routes.forbidden.title', { defaultValue: 'Access denied' }), statusCode: statusCode !== null && statusCode !== void 0 ? statusCode : '403', iconName: "shield", subheader: subheader !== null && subheader !== void 0 ? subheader : t('routes.forbidden.subheader', {
|
|
8
|
+
defaultValue: "You don't have permission to view this page."
|
|
16
9
|
}), message: message !== null && message !== void 0 ? message : t('routes.forbidden.message', {
|
|
17
|
-
defaultValue: '
|
|
10
|
+
defaultValue: 'If you think you should have access, contact your administrator.'
|
|
18
11
|
}), to: "/", buttonLabel: t('routes.backToHome', {
|
|
19
12
|
defaultValue: 'Back to Home Page'
|
|
20
|
-
}), showButton: showButton }))
|
|
13
|
+
}), showButton: showButton }));
|
|
21
14
|
};
|
|
22
15
|
//# sourceMappingURL=PageForbiddenRoute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageForbiddenRoute.js","sourceRoot":"","sources":["../../../src/routes/components/PageForbiddenRoute.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PageForbiddenRoute.js","sourceRoot":"","sources":["../../../src/routes/components/PageForbiddenRoute.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC;IAC3C,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IACpE,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/B,OAAO,CACL,oBAAC,UAAU,IACT,KAAK,EACH,KAAK,aAAL,KAAK,cAAL,KAAK,GACL,CAAC,CAAC,wBAAwB,EAAE,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC,EAEhE,UAAU,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,KAAK,EAC/B,QAAQ,EAAC,QAAQ,EACjB,SAAS,EACP,SAAS,aAAT,SAAS,cAAT,SAAS,GACT,CAAC,CAAC,4BAA4B,EAAE;YAC9B,YAAY,EAAE,8CAA8C;SAC7D,CAAC,EAEJ,OAAO,EACL,OAAO,aAAP,OAAO,cAAP,OAAO,GACP,CAAC,CAAC,0BAA0B,EAAE;YAC5B,YAAY,EACV,kEAAkE;SACrE,CAAC,EAEJ,EAAE,EAAC,GAAG,EACN,WAAW,EAAE,CAAC,CAAC,mBAAmB,EAAE;YAClC,YAAY,EAAE,mBAAmB;SAClC,CAAC,EACF,UAAU,EAAE,UAAU,GACtB,CACH,CAAC;AAAA,CACH,CAAC"}
|
|
@@ -1,71 +1,61 @@
|
|
|
1
1
|
import { c } from "../../reactCompilerRuntime.mjs";
|
|
2
2
|
import { PageStatus } from "./PageStatus.mjs";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { makeStyles } from "@material-ui/core";
|
|
5
4
|
import { useTranslation } from "react-i18next";
|
|
6
5
|
//#region src/routes/components/PageForbiddenRoute.jsx
|
|
7
|
-
const useStyles = makeStyles((theme) => ({ root: { marginTop: theme.spacing(4) } }));
|
|
8
6
|
const PageForbiddenRoute = (props) => {
|
|
9
|
-
const $ = c(
|
|
7
|
+
const $ = c(18);
|
|
10
8
|
const { title, statusCode, subheader, message, showButton } = props;
|
|
11
|
-
const classes = useStyles();
|
|
12
9
|
const { t } = useTranslation();
|
|
13
|
-
|
|
14
|
-
let t1;
|
|
10
|
+
let t0;
|
|
15
11
|
if ($[0] !== t || $[1] !== title) {
|
|
16
|
-
|
|
12
|
+
t0 = title ?? t("routes.forbidden.title", { defaultValue: "Access denied" });
|
|
17
13
|
$[0] = t;
|
|
18
14
|
$[1] = title;
|
|
19
|
-
$[2] =
|
|
20
|
-
} else
|
|
21
|
-
const
|
|
22
|
-
let
|
|
15
|
+
$[2] = t0;
|
|
16
|
+
} else t0 = $[2];
|
|
17
|
+
const t1 = statusCode ?? "403";
|
|
18
|
+
let t2;
|
|
23
19
|
if ($[3] !== subheader || $[4] !== t) {
|
|
24
|
-
|
|
20
|
+
t2 = subheader ?? t("routes.forbidden.subheader", { defaultValue: "You don't have permission to view this page." });
|
|
25
21
|
$[3] = subheader;
|
|
26
22
|
$[4] = t;
|
|
27
|
-
$[5] =
|
|
28
|
-
} else
|
|
29
|
-
let
|
|
23
|
+
$[5] = t2;
|
|
24
|
+
} else t2 = $[5];
|
|
25
|
+
let t3;
|
|
30
26
|
if ($[6] !== message || $[7] !== t) {
|
|
31
|
-
|
|
27
|
+
t3 = message ?? t("routes.forbidden.message", { defaultValue: "If you think you should have access, contact your administrator." });
|
|
32
28
|
$[6] = message;
|
|
33
29
|
$[7] = t;
|
|
34
|
-
$[8] =
|
|
35
|
-
} else
|
|
36
|
-
let
|
|
30
|
+
$[8] = t3;
|
|
31
|
+
} else t3 = $[8];
|
|
32
|
+
let t4;
|
|
37
33
|
if ($[9] !== t) {
|
|
38
|
-
|
|
34
|
+
t4 = t("routes.backToHome", { defaultValue: "Back to Home Page" });
|
|
39
35
|
$[9] = t;
|
|
40
|
-
$[10] =
|
|
41
|
-
} else
|
|
42
|
-
let
|
|
43
|
-
if ($[11] !== showButton || $[12] !==
|
|
44
|
-
|
|
45
|
-
title:
|
|
46
|
-
statusCode:
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
$[10] = t4;
|
|
37
|
+
} else t4 = $[10];
|
|
38
|
+
let t5;
|
|
39
|
+
if ($[11] !== showButton || $[12] !== t0 || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4) {
|
|
40
|
+
t5 = /* @__PURE__ */ React.createElement(PageStatus, {
|
|
41
|
+
title: t0,
|
|
42
|
+
statusCode: t1,
|
|
43
|
+
iconName: "shield",
|
|
44
|
+
subheader: t2,
|
|
45
|
+
message: t3,
|
|
49
46
|
to: "/",
|
|
50
|
-
buttonLabel:
|
|
47
|
+
buttonLabel: t4,
|
|
51
48
|
showButton
|
|
52
49
|
});
|
|
53
50
|
$[11] = showButton;
|
|
54
|
-
$[12] =
|
|
55
|
-
$[13] =
|
|
56
|
-
$[14] =
|
|
57
|
-
$[15] =
|
|
58
|
-
$[16] =
|
|
59
|
-
$[17] =
|
|
60
|
-
} else
|
|
61
|
-
|
|
62
|
-
if ($[18] !== classes.root || $[19] !== t6) {
|
|
63
|
-
t7 = /* @__PURE__ */ React.createElement("div", { className: t0 }, t6);
|
|
64
|
-
$[18] = classes.root;
|
|
65
|
-
$[19] = t6;
|
|
66
|
-
$[20] = t7;
|
|
67
|
-
} else t7 = $[20];
|
|
68
|
-
return t7;
|
|
51
|
+
$[12] = t0;
|
|
52
|
+
$[13] = t1;
|
|
53
|
+
$[14] = t2;
|
|
54
|
+
$[15] = t3;
|
|
55
|
+
$[16] = t4;
|
|
56
|
+
$[17] = t5;
|
|
57
|
+
} else t5 = $[17];
|
|
58
|
+
return t5;
|
|
69
59
|
};
|
|
70
60
|
//#endregion
|
|
71
61
|
export { PageForbiddenRoute };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageForbiddenRoute.mjs","names":["React","
|
|
1
|
+
{"version":3,"file":"PageForbiddenRoute.mjs","names":["React","PageStatus","useTranslation","PageForbiddenRoute","props","$","_c","title","statusCode","subheader","message","showButton","t","t0","defaultValue","t1","t2","t3","t4","t5"],"sources":["../../../src/routes/components/PageForbiddenRoute.jsx"],"sourcesContent":["import React from 'react';\nimport { PageStatus } from './PageStatus';\nimport { useTranslation } from 'react-i18next';\n\nexport const PageForbiddenRoute = (props) => {\n const { title, statusCode, subheader, message, showButton } = props;\n const { t } = useTranslation();\n\n return (\n <PageStatus\n title={\n title ??\n t('routes.forbidden.title', { defaultValue: 'Access denied' })\n }\n statusCode={statusCode ?? '403'}\n iconName='shield'\n subheader={\n subheader ??\n t('routes.forbidden.subheader', {\n defaultValue: \"You don't have permission to view this page.\"\n })\n }\n message={\n message ??\n t('routes.forbidden.message', {\n defaultValue:\n 'If you think you should have access, contact your administrator.'\n })\n }\n to='/'\n buttonLabel={t('routes.backToHome', {\n defaultValue: 'Back to Home Page'\n })}\n showButton={showButton}\n />\n );\n};\n"],"mappings":";;;;;AAIA,MAAaG,sBAAqBC,UAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAChC,MAAA,EAAAC,OAAAC,YAAAC,WAAAC,SAAAC,eAA8DP;CAC9D,MAAA,EAAAQ,MAAcV,gBAAgB;CAAC,IAAAW;AAAA,KAAAR,EAAA,OAAAO,KAAAP,EAAA,OAAAE,OAAA;AAKzBM,OAAAN,SACAK,EAAE,0BAA0B,EAAAE,cAAgB,iBAAiB,CAAC;AAAAT,IAAA,KAAAO;AAAAP,IAAA,KAAAE;AAAAF,IAAA,KAAAQ;OAAAA,MAAAR,EAAA;CAEpD,MAAAU,KAAAP,cAAA;CAAmB,IAAAQ;AAAA,KAAAX,EAAA,OAAAI,aAAAJ,EAAA,OAAAO,GAAA;AAG7BI,OAAAP,aACAG,EAAE,8BAA8B,EAAAE,cAChB,gDACf,CAAC;AAAAT,IAAA,KAAAI;AAAAJ,IAAA,KAAAO;AAAAP,IAAA,KAAAW;OAAAA,MAAAX,EAAA;CAAA,IAAAY;AAAA,KAAAZ,EAAA,OAAAK,WAAAL,EAAA,OAAAO,GAAA;AAGFK,OAAAP,WACAE,EAAE,4BAA4B,EAAAE,cAE1B,oEACH,CAAC;AAAAT,IAAA,KAAAK;AAAAL,IAAA,KAAAO;AAAAP,IAAA,KAAAY;OAAAA,MAAAZ,EAAA;CAAA,IAAAa;AAAA,KAAAb,EAAA,OAAAO,GAAA;AAGSM,OAAAN,EAAE,qBAAqB,EAAAE,cACpB,qBACf,CAAC;AAAAT,IAAA,KAAAO;AAAAP,IAAA,MAAAa;OAAAA,MAAAb,EAAA;CAAA,IAAAc;AAAA,KAAAd,EAAA,QAAAM,cAAAN,EAAA,QAAAQ,MAAAR,EAAA,QAAAU,MAAAV,EAAA,QAAAW,MAAAX,EAAA,QAAAY,MAAAZ,EAAA,QAAAa,IAAA;AAvBJC,OAAA,sBAAA,cAAC,YAAD;GAEI,OAAAN;GAGU,YAAAE;GACH,UAAA;GAEP,WAAAC;GAMA,SAAAC;GAMC,IAAA;GACU,aAAAC;GAGDP;GACZ,CAAA;AAAAN,IAAA,MAAAM;AAAAN,IAAA,MAAAQ;AAAAR,IAAA,MAAAU;AAAAV,IAAA,MAAAW;AAAAX,IAAA,MAAAY;AAAAZ,IAAA,MAAAa;AAAAb,IAAA,MAAAc;OAAAA,MAAAd,EAAA;AAAA,QAzBFc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageNotFoundRoute.d.ts","sourceRoot":"","sources":["../../../src/routes/components/PageNotFoundRoute.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PageNotFoundRoute.d.ts","sourceRoot":"","sources":["../../../src/routes/components/PageNotFoundRoute.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,iBAAiB,yBAoB7B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { makeStyles } from '@material-ui/core';
|
|
3
2
|
import { useTranslation } from 'react-i18next';
|
|
4
3
|
import { PageStatus } from './PageStatus';
|
|
5
|
-
const useStyles = makeStyles((theme) => ({
|
|
6
|
-
root: {
|
|
7
|
-
marginTop: theme.spacing(4)
|
|
8
|
-
}
|
|
9
|
-
}));
|
|
10
4
|
export const PageNotFoundRoute = () => {
|
|
11
|
-
const classes = useStyles();
|
|
12
5
|
const { t } = useTranslation();
|
|
13
|
-
return (React.createElement(
|
|
14
|
-
defaultValue: "
|
|
6
|
+
return (React.createElement(PageStatus, { statusCode: 404, iconName: "search", title: t('routes.notFound.title', { defaultValue: 'Page not found' }), subheader: t('routes.notFound.subheader', {
|
|
7
|
+
defaultValue: "We can't find the page you're looking for."
|
|
15
8
|
}), message: t('routes.notFound.message', {
|
|
16
|
-
defaultValue: '
|
|
9
|
+
defaultValue: 'It may have been moved or deleted, or the link may be out of date.'
|
|
17
10
|
}), to: "/", buttonLabel: t('routes.backToHome', {
|
|
18
11
|
defaultValue: 'Back to Home Page'
|
|
19
|
-
}) }))
|
|
12
|
+
}) }));
|
|
20
13
|
};
|
|
21
14
|
export default PageNotFoundRoute;
|
|
22
15
|
//# sourceMappingURL=PageNotFoundRoute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageNotFoundRoute.js","sourceRoot":"","sources":["../../../src/routes/components/PageNotFoundRoute.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"PageNotFoundRoute.js","sourceRoot":"","sources":["../../../src/routes/components/PageNotFoundRoute.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC;IACrC,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAC/B,OAAO,CACL,oBAAC,UAAU,IACT,UAAU,EAAE,GAAG,EACf,QAAQ,EAAC,QAAQ,EACjB,KAAK,EAAE,CAAC,CAAC,uBAAuB,EAAE,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC,EACrE,SAAS,EAAE,CAAC,CAAC,2BAA2B,EAAE;YACxC,YAAY,EAAE,4CAA4C;SAC3D,CAAC,EACF,OAAO,EAAE,CAAC,CAAC,yBAAyB,EAAE;YACpC,YAAY,EACV,oEAAoE;SACvE,CAAC,EACF,EAAE,EAAC,GAAG,EACN,WAAW,EAAE,CAAC,CAAC,mBAAmB,EAAE;YAClC,YAAY,EAAE,mBAAmB;SAClC,CAAC,GACF,CACH,CAAC;AAAA,CACH,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,63 +1,53 @@
|
|
|
1
1
|
import { c } from "../../reactCompilerRuntime.mjs";
|
|
2
2
|
import { PageStatus } from "./PageStatus.mjs";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { makeStyles } from "@material-ui/core";
|
|
5
4
|
import { useTranslation } from "react-i18next";
|
|
6
5
|
//#region src/routes/components/PageNotFoundRoute.jsx
|
|
7
|
-
const useStyles = makeStyles((theme) => ({ root: { marginTop: theme.spacing(4) } }));
|
|
8
6
|
const PageNotFoundRoute = () => {
|
|
9
|
-
const $ = c(
|
|
10
|
-
const classes = useStyles();
|
|
7
|
+
const $ = c(13);
|
|
11
8
|
const { t } = useTranslation();
|
|
12
|
-
|
|
13
|
-
let t1;
|
|
9
|
+
let t0;
|
|
14
10
|
if ($[0] !== t) {
|
|
15
|
-
|
|
11
|
+
t0 = t("routes.notFound.title", { defaultValue: "Page not found" });
|
|
16
12
|
$[0] = t;
|
|
17
|
-
$[1] =
|
|
18
|
-
} else
|
|
19
|
-
let
|
|
13
|
+
$[1] = t0;
|
|
14
|
+
} else t0 = $[1];
|
|
15
|
+
let t1;
|
|
20
16
|
if ($[2] !== t) {
|
|
21
|
-
|
|
17
|
+
t1 = t("routes.notFound.subheader", { defaultValue: "We can't find the page you're looking for." });
|
|
22
18
|
$[2] = t;
|
|
23
|
-
$[3] =
|
|
24
|
-
} else
|
|
25
|
-
let
|
|
19
|
+
$[3] = t1;
|
|
20
|
+
} else t1 = $[3];
|
|
21
|
+
let t2;
|
|
26
22
|
if ($[4] !== t) {
|
|
27
|
-
|
|
23
|
+
t2 = t("routes.notFound.message", { defaultValue: "It may have been moved or deleted, or the link may be out of date." });
|
|
28
24
|
$[4] = t;
|
|
29
|
-
$[5] =
|
|
30
|
-
} else
|
|
31
|
-
let
|
|
25
|
+
$[5] = t2;
|
|
26
|
+
} else t2 = $[5];
|
|
27
|
+
let t3;
|
|
32
28
|
if ($[6] !== t) {
|
|
33
|
-
|
|
29
|
+
t3 = t("routes.backToHome", { defaultValue: "Back to Home Page" });
|
|
34
30
|
$[6] = t;
|
|
35
|
-
$[7] =
|
|
36
|
-
} else
|
|
37
|
-
let
|
|
38
|
-
if ($[8] !==
|
|
39
|
-
|
|
31
|
+
$[7] = t3;
|
|
32
|
+
} else t3 = $[7];
|
|
33
|
+
let t4;
|
|
34
|
+
if ($[8] !== t0 || $[9] !== t1 || $[10] !== t2 || $[11] !== t3) {
|
|
35
|
+
t4 = /* @__PURE__ */ React.createElement(PageStatus, {
|
|
40
36
|
statusCode: 404,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
iconName: "search",
|
|
38
|
+
title: t0,
|
|
39
|
+
subheader: t1,
|
|
40
|
+
message: t2,
|
|
44
41
|
to: "/",
|
|
45
|
-
buttonLabel:
|
|
42
|
+
buttonLabel: t3
|
|
46
43
|
});
|
|
47
|
-
$[8] =
|
|
48
|
-
$[9] =
|
|
49
|
-
$[10] =
|
|
50
|
-
$[11] =
|
|
51
|
-
$[12] =
|
|
52
|
-
} else
|
|
53
|
-
|
|
54
|
-
if ($[13] !== classes.root || $[14] !== t5) {
|
|
55
|
-
t6 = /* @__PURE__ */ React.createElement("div", { className: t0 }, t5);
|
|
56
|
-
$[13] = classes.root;
|
|
57
|
-
$[14] = t5;
|
|
58
|
-
$[15] = t6;
|
|
59
|
-
} else t6 = $[15];
|
|
60
|
-
return t6;
|
|
44
|
+
$[8] = t0;
|
|
45
|
+
$[9] = t1;
|
|
46
|
+
$[10] = t2;
|
|
47
|
+
$[11] = t3;
|
|
48
|
+
$[12] = t4;
|
|
49
|
+
} else t4 = $[12];
|
|
50
|
+
return t4;
|
|
61
51
|
};
|
|
62
52
|
//#endregion
|
|
63
53
|
export { PageNotFoundRoute, PageNotFoundRoute as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageNotFoundRoute.mjs","names":["React","
|
|
1
|
+
{"version":3,"file":"PageNotFoundRoute.mjs","names":["React","useTranslation","PageStatus","PageNotFoundRoute","$","_c","t","t0","defaultValue","t1","t2","t3","t4"],"sources":["../../../src/routes/components/PageNotFoundRoute.jsx"],"sourcesContent":["import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { PageStatus } from './PageStatus';\n\nexport const PageNotFoundRoute = () => {\n const { t } = useTranslation();\n return (\n <PageStatus\n statusCode={404}\n iconName='search'\n title={t('routes.notFound.title', { defaultValue: 'Page not found' })}\n subheader={t('routes.notFound.subheader', {\n defaultValue: \"We can't find the page you're looking for.\"\n })}\n message={t('routes.notFound.message', {\n defaultValue:\n 'It may have been moved or deleted, or the link may be out of date.'\n })}\n to='/'\n buttonLabel={t('routes.backToHome', {\n defaultValue: 'Back to Home Page'\n })}\n />\n );\n};\n\nexport default PageNotFoundRoute;\n"],"mappings":";;;;;AAIA,MAAaG,0BAAoB;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAC/B,MAAA,EAAAC,MAAcL,gBAAgB;CAAC,IAAAM;AAAA,KAAAH,EAAA,OAAAE,GAAA;AAKpBC,OAAAD,EAAE,yBAAyB,EAAAE,cAAgB,kBAAkB,CAAC;AAAAJ,IAAA,KAAAE;AAAAF,IAAA,KAAAG;OAAAA,MAAAH,EAAA;CAAA,IAAAK;AAAA,KAAAL,EAAA,OAAAE,GAAA;AAC1DG,OAAAH,EAAE,6BAA6B,EAAAE,cAC1B,8CACf,CAAC;AAAAJ,IAAA,KAAAE;AAAAF,IAAA,KAAAK;OAAAA,MAAAL,EAAA;CAAA,IAAAM;AAAA,KAAAN,EAAA,OAAAE,GAAA;AACOI,OAAAJ,EAAE,2BAA2B,EAAAE,cAElC,sEACH,CAAC;AAAAJ,IAAA,KAAAE;AAAAF,IAAA,KAAAM;OAAAA,MAAAN,EAAA;CAAA,IAAAO;AAAA,KAAAP,EAAA,OAAAE,GAAA;AAEWK,OAAAL,EAAE,qBAAqB,EAAAE,cACpB,qBACf,CAAC;AAAAJ,IAAA,KAAAE;AAAAF,IAAA,KAAAO;OAAAA,MAAAP,EAAA;CAAA,IAAAQ;AAAA,KAAAR,EAAA,OAAAG,MAAAH,EAAA,OAAAK,MAAAL,EAAA,QAAAM,MAAAN,EAAA,QAAAO,IAAA;AAdJC,OAAA,sBAAA,cAAC,YAAD;GACc,YAAA;GACH,UAAA;GACF,OAAAL;GACI,WAAAE;GAGF,SAAAC;GAIN,IAAA;GACU,aAAAC;GAGb,CAAA;AAAAP,IAAA,KAAAG;AAAAH,IAAA,KAAAK;AAAAL,IAAA,MAAAM;AAAAN,IAAA,MAAAO;AAAAP,IAAA,MAAAQ;OAAAA,MAAAR,EAAA;AAAA,QAfFQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageStatus.d.ts","sourceRoot":"","sources":["../../../src/routes/components/PageStatus.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PageStatus.d.ts","sourceRoot":"","sources":["../../../src/routes/components/PageStatus.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,UAAU,mCA+CtB,CAAC"}
|
|
@@ -1,43 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const useStyles = makeStyles(theme => ({
|
|
5
|
-
root: {
|
|
6
|
-
display: 'flex',
|
|
7
|
-
justifyContent: 'center',
|
|
8
|
-
alignItems: 'center',
|
|
9
|
-
},
|
|
10
|
-
card: {
|
|
11
|
-
background: theme.palette.primary.main,
|
|
12
|
-
minWidth: props => props === null || props === void 0 ? void 0 : props.minWidth,
|
|
13
|
-
minHeight: props => props === null || props === void 0 ? void 0 : props.minHeight,
|
|
14
|
-
},
|
|
15
|
-
subHeader: {
|
|
16
|
-
marginTop: theme.spacing(3),
|
|
17
|
-
},
|
|
18
|
-
content: {
|
|
19
|
-
color: theme.palette.getContrastText(theme.palette.primary.main),
|
|
20
|
-
},
|
|
21
|
-
header: {
|
|
22
|
-
textAlign: 'center',
|
|
23
|
-
marginTop: theme.spacing(2),
|
|
24
|
-
},
|
|
25
|
-
button: {
|
|
26
|
-
marginTop: theme.spacing(8),
|
|
27
|
-
display: 'flex',
|
|
28
|
-
justifyContent: 'center',
|
|
29
|
-
},
|
|
30
|
-
largeDisplay: {
|
|
31
|
-
fontSize: '4rem',
|
|
32
|
-
color: theme.palette.getContrastText(theme.palette.primary.main),
|
|
33
|
-
},
|
|
34
|
-
message: {
|
|
35
|
-
marginTop: theme.spacing(3),
|
|
36
|
-
},
|
|
37
|
-
}));
|
|
2
|
+
import { useHistory } from 'react-router-dom';
|
|
3
|
+
import { UdpButton, UdpEmptyState } from '../../UI/fluent-web-components';
|
|
38
4
|
export const PageStatus = props => {
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
return (
|
|
5
|
+
const { title, subheader, message, to, buttonLabel, statusCode, iconName = 'error', showButton = true, } = props;
|
|
6
|
+
const history = useHistory();
|
|
7
|
+
return (
|
|
8
|
+
// The shell gives pages no definite height (scrolling lives in the outer
|
|
9
|
+
// shell-content region), so center against the viewport instead: 60dvh
|
|
10
|
+
// lands the block at optical center, slightly above true center.
|
|
11
|
+
React.createElement("div", { style: {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
minHeight: '60dvh',
|
|
16
|
+
padding: 32,
|
|
17
|
+
boxSizing: 'border-box',
|
|
18
|
+
} }, React.createElement(UdpEmptyState, { size: "large", iconName: iconName, heading: statusCode ? `${statusCode} — ${title}` : title, description: [subheader, message].filter(Boolean).join(' ') }, showButton && (React.createElement(UdpButton, { slot: "action", appearance: "primary", id: `udpRecord-PageStatus-${buttonLabel}`, udprecordid: `udpRecord-PageStatus-${buttonLabel}`, onClick: () => history.push(to) }, buttonLabel)))));
|
|
42
19
|
};
|
|
43
20
|
//# sourceMappingURL=PageStatus.js.map
|