runid-lys 0.6.0 → 0.7.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/CHANGELOG.md +15 -0
- package/dist/{hooks-CvhFUowR.js → PublicAppTemplate-DLKcJZVR.js} +23 -2
- package/dist/PublicAppTemplate-DLKcJZVR.js.map +1 -0
- package/dist/{constants-BMsk7KvD.js → constants-sdhUzJ0l.js} +130 -26
- package/dist/{constants-BMsk7KvD.js.map → constants-sdhUzJ0l.js.map} +1 -1
- package/dist/index.js +23 -21
- package/dist/index.js.map +1 -1
- package/dist/providers/RouteProvider/hooks.d.ts +22 -0
- package/dist/providers/RouteProvider/index.d.ts +45 -0
- package/dist/providers/hooks/useRestrictedLink.d.ts +3 -2
- package/dist/providers/hooks/useRouteAccess.d.ts +25 -0
- package/dist/providers/index.d.ts +5 -0
- package/dist/providers/index.js +23 -20
- package/dist/templates/index.js +1 -1
- package/dist/types/descriptionTypes.d.ts +7 -1
- package/dist/types/routeTypes.d.ts +7 -1
- package/package.json +1 -1
- package/dist/PublicAppTemplate-B93G2Smc.js +0 -26
- package/dist/PublicAppTemplate-B93G2Smc.js.map +0 -1
- package/dist/hooks-CvhFUowR.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { I18nLocaleEnum } from "./types/index.js";
|
|
2
2
|
import { c, a, b, d, e, f, g, h, i, j, k, l, m, n, p, s, t, v } from "./translationTools-CKk0l3jr.js";
|
|
3
3
|
import { g as g2, m as m2 } from "./i18nTools-C1k2y9xe.js";
|
|
4
|
-
import { A, C, a as a2, b as b2, c as c2, E, F, G, L, d as d2, e as e2, f as f2, g as g3, P, R, S, U, W, u,
|
|
5
|
-
import { u as u2, a as a3 } from "./
|
|
4
|
+
import { A, C, a as a2, b as b2, c as c2, E, F, G, L, d as d2, e as e2, f as f2, g as g3, P, R, h as h2, S, U, W, u, i as i2, j as j2, k as k2, l as l2, m as m3, n as n2, o, p as p2, q, r, s as s2, t as t2, v as v2, w, x, y, z, B, D, H } from "./constants-sdhUzJ0l.js";
|
|
5
|
+
import { P as P2, u as u2, a as a3 } from "./PublicAppTemplate-DLKcJZVR.js";
|
|
6
6
|
import { R as R2, c as c3, a as a4 } from "./RelayEnvironment-D880U9SM.js";
|
|
7
|
-
import { P as P2 } from "./PublicAppTemplate-B93G2Smc.js";
|
|
8
7
|
import { e as e3, i as i3 } from "./errors-BOacmKM0.js";
|
|
9
8
|
import { messagesTranslations } from "./i18n/index.js";
|
|
10
9
|
export {
|
|
@@ -26,6 +25,7 @@ export {
|
|
|
26
25
|
P2 as PublicAppTemplate,
|
|
27
26
|
R as RefreshSignalContext,
|
|
28
27
|
R2 as RelayEnvironment,
|
|
28
|
+
h2 as RouteProvider,
|
|
29
29
|
S as SignalProvider,
|
|
30
30
|
U as UrlQueriesProvider,
|
|
31
31
|
W as WebserviceAccessProvider,
|
|
@@ -55,25 +55,27 @@ export {
|
|
|
55
55
|
t as toSnakeCase,
|
|
56
56
|
u as useAlertMessages,
|
|
57
57
|
u2 as useChatbot,
|
|
58
|
-
|
|
58
|
+
i2 as useClientId,
|
|
59
59
|
a3 as useConnectedUserInfo,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
60
|
+
j2 as useDialogWithUpdates,
|
|
61
|
+
k2 as useFilterLabels,
|
|
62
|
+
l2 as useLocale,
|
|
63
|
+
m3 as useLysDialog,
|
|
64
|
+
n2 as useLysLoadingFallback,
|
|
65
|
+
o as useLysMutation,
|
|
66
|
+
p2 as useLysQuery,
|
|
67
|
+
q as usePageContext,
|
|
68
|
+
r as usePermissionCheck,
|
|
69
|
+
s2 as useRefreshSignal,
|
|
70
|
+
t2 as useRestrictedLink,
|
|
71
|
+
v2 as useRouteAccess,
|
|
72
|
+
w as useRouteInfo,
|
|
73
|
+
x as useSignal,
|
|
74
|
+
y as useSignalRefresh,
|
|
75
|
+
z as useSignalSubscription,
|
|
76
|
+
B as useUrlQueries,
|
|
77
|
+
D as useWebserviceAccess,
|
|
76
78
|
v as validators,
|
|
77
|
-
|
|
79
|
+
H as webserviceAccessProviderConfig
|
|
78
80
|
};
|
|
79
81
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RouteInterface } from '../../types/routeTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Shape of the value exposed by the route context.
|
|
4
|
+
*/
|
|
5
|
+
export interface RouteContextValue {
|
|
6
|
+
/** Currently active route (the one matching the URL). */
|
|
7
|
+
route: RouteInterface | null;
|
|
8
|
+
/** Default route used as fallback for authenticated users (e.g. home page). */
|
|
9
|
+
defaultPrivateRoute: RouteInterface | null;
|
|
10
|
+
/** Default route used as fallback for anonymous users (e.g. login page). */
|
|
11
|
+
defaultPublicRoute: RouteInterface | null;
|
|
12
|
+
/** All known routes keyed by route name for O(1) lookup. */
|
|
13
|
+
allRoutes: Record<string, RouteInterface>;
|
|
14
|
+
/** Look up a route by its name. */
|
|
15
|
+
getRouteByName: (name: string) => RouteInterface | undefined;
|
|
16
|
+
}
|
|
17
|
+
declare const RouteContext: import('react').Context<RouteContextValue>;
|
|
18
|
+
/**
|
|
19
|
+
* Hook to access the active route, default routes and the route map.
|
|
20
|
+
*/
|
|
21
|
+
declare const useRouteInfo: () => RouteContextValue;
|
|
22
|
+
export { RouteContext, useRouteInfo };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { RouteInterface } from '../../types/routeTypes';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Shape expected from any template component plugged into `RouteProvider`.
|
|
5
|
+
*
|
|
6
|
+
* Templates receive the same triplet (active route + default routes) so they
|
|
7
|
+
* can render the page chrome and trigger any post-mount redirects.
|
|
8
|
+
*/
|
|
9
|
+
export interface RouteTemplateProps {
|
|
10
|
+
route: RouteInterface;
|
|
11
|
+
defaultPrivateRoute: RouteInterface;
|
|
12
|
+
defaultPublicRoute: RouteInterface;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export interface RouteProviderProps {
|
|
16
|
+
route: RouteInterface;
|
|
17
|
+
routes: RouteInterface[];
|
|
18
|
+
defaultPrivateRoute: RouteInterface;
|
|
19
|
+
defaultPublicRoute: RouteInterface;
|
|
20
|
+
/**
|
|
21
|
+
* Template used when the active route's `type` is `"private"`.
|
|
22
|
+
* Projects inject their own private template (e.g. with sidebar/topbar)
|
|
23
|
+
* because the layout is project-specific.
|
|
24
|
+
*/
|
|
25
|
+
privateTemplate: React.ComponentType<RouteTemplateProps>;
|
|
26
|
+
/**
|
|
27
|
+
* Optional override for public pages. Defaults to the generic
|
|
28
|
+
* `PublicAppTemplate` shipped with lys-front (handles connected-user
|
|
29
|
+
* redirects).
|
|
30
|
+
*/
|
|
31
|
+
publicTemplate?: React.ComponentType<RouteTemplateProps>;
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Generic route provider:
|
|
36
|
+
* - Exposes the active route, the route map and helpers via `useRouteInfo`.
|
|
37
|
+
* - Wires the chatbot's `pageContext` to the current route + URL params.
|
|
38
|
+
* - Auto-opens the chatbot for routes flagged with `autoOpenChatbot`.
|
|
39
|
+
* - Renders the project-supplied template matching the route type.
|
|
40
|
+
*
|
|
41
|
+
* The two templates are injected as props so projects keep ownership of their
|
|
42
|
+
* page chrome (sidebar, navbar, branding…) while reusing all the route plumbing.
|
|
43
|
+
*/
|
|
44
|
+
declare const RouteProvider: React.FC<RouteProviderProps>;
|
|
45
|
+
export default RouteProvider;
|
|
@@ -6,8 +6,9 @@ export interface RestrictedLink {
|
|
|
6
6
|
/**
|
|
7
7
|
* Hook to check route permission and provide navigation callback.
|
|
8
8
|
*
|
|
9
|
-
* Combines permission checking (via WebserviceAccessProvider
|
|
10
|
-
*
|
|
9
|
+
* Combines permission checking (via WebserviceAccessProvider — delegated to
|
|
10
|
+
* `useRouteAccess` so the single/array `mainWebserviceName` semantics stay
|
|
11
|
+
* in one place) with navigation (via react-router) for a given route.
|
|
11
12
|
*
|
|
12
13
|
* Usage:
|
|
13
14
|
* ```tsx
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RouteInterface } from '../../types/routeTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Hook that returns a function reporting whether the current user has
|
|
4
|
+
* access to a given route.
|
|
5
|
+
*
|
|
6
|
+
* The returned function accepts either a `RouteInterface` (when the caller
|
|
7
|
+
* already has the route resolved) or a route name (the hook performs the
|
|
8
|
+
* lookup against the `RouteProvider`'s map). `undefined` always returns
|
|
9
|
+
* `false`.
|
|
10
|
+
*
|
|
11
|
+
* Permission semantics for `route.mainWebserviceName`:
|
|
12
|
+
* - `undefined` → no permission gate → access granted.
|
|
13
|
+
* - `string` → access requires that single webservice.
|
|
14
|
+
* - `string[]` → any-of: access granted as soon as the user has at least
|
|
15
|
+
* one of the listed webservices.
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* ```tsx
|
|
19
|
+
* const hasAccess = useRouteAccess();
|
|
20
|
+
* hasAccess(route); // route already resolved
|
|
21
|
+
* hasAccess("AdministrationPage"); // resolved internally via RouteProvider
|
|
22
|
+
* hasAccess(undefined); // false
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare const useRouteAccess: () => (routeOrName: RouteInterface | string | undefined) => boolean;
|
|
@@ -12,6 +12,7 @@ export { default as SignalProvider } from './SignalProvider';
|
|
|
12
12
|
export { default as LysQueryProvider } from './LysQueryProvider';
|
|
13
13
|
export { default as LysMutationProvider } from './LysMutationProvider';
|
|
14
14
|
export { default as ClientProvider } from './ClientProvider';
|
|
15
|
+
export { default as RouteProvider } from './RouteProvider';
|
|
15
16
|
export { useAlertMessages } from './AlertMessageProvider/hooks';
|
|
16
17
|
export { useLocale } from './LocaleProvider/hooks';
|
|
17
18
|
export { useLysDialog, useDialogWithUpdates } from './LysDialogProvider/hooks';
|
|
@@ -28,6 +29,10 @@ export { useLysMutation } from './LysMutationProvider/hooks';
|
|
|
28
29
|
export { usePermissionCheck } from './hooks/usePermissionCheck';
|
|
29
30
|
export { useRestrictedLink } from './hooks/useRestrictedLink';
|
|
30
31
|
export type { RestrictedLink } from './hooks/useRestrictedLink';
|
|
32
|
+
export { useRouteAccess } from './hooks/useRouteAccess';
|
|
33
|
+
export { useRouteInfo } from './RouteProvider/hooks';
|
|
34
|
+
export type { RouteContextValue } from './RouteProvider/hooks';
|
|
35
|
+
export type { RouteProviderProps, RouteTemplateProps } from './RouteProvider';
|
|
31
36
|
export { useClientId } from './ClientProvider/hooks';
|
|
32
37
|
export type { ClientContextValue, ClientProviderProps } from './ClientProvider/types';
|
|
33
38
|
export { default as LysLoadingContext, useLysLoadingFallback } from './LysQueryProvider/LysLoadingContext';
|
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A, C, a, b, c, E, F, G, L, d, e, f, g, P, R, S, U, W, u,
|
|
2
|
-
import { u as u2, a as a2 } from "../
|
|
1
|
+
import { A, C, a, b, c, E, F, G, L, d, e, f, g, P, R, h, S, U, W, u, i, j, k, l, m, n, o, p, q, r, s, t, v, w, x, y, z, B, D, H } from "../constants-sdhUzJ0l.js";
|
|
2
|
+
import { u as u2, a as a2 } from "../PublicAppTemplate-DLKcJZVR.js";
|
|
3
3
|
import { c as c2 } from "../RelayEnvironment-D880U9SM.js";
|
|
4
4
|
export {
|
|
5
5
|
A as AlertMessageProvider,
|
|
@@ -17,30 +17,33 @@ export {
|
|
|
17
17
|
g as LysQueryProvider,
|
|
18
18
|
P as PageContextProvider,
|
|
19
19
|
R as RefreshSignalContext,
|
|
20
|
+
h as RouteProvider,
|
|
20
21
|
S as SignalProvider,
|
|
21
22
|
U as UrlQueriesProvider,
|
|
22
23
|
W as WebserviceAccessProvider,
|
|
23
24
|
c2 as clearRelayCache,
|
|
24
25
|
u as useAlertMessages,
|
|
25
26
|
u2 as useChatbot,
|
|
26
|
-
|
|
27
|
+
i as useClientId,
|
|
27
28
|
a2 as useConnectedUserInfo,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
29
|
+
j as useDialogWithUpdates,
|
|
30
|
+
k as useFilterLabels,
|
|
31
|
+
l as useLocale,
|
|
32
|
+
m as useLysDialog,
|
|
33
|
+
n as useLysLoadingFallback,
|
|
34
|
+
o as useLysMutation,
|
|
35
|
+
p as useLysQuery,
|
|
36
|
+
q as usePageContext,
|
|
37
|
+
r as usePermissionCheck,
|
|
38
|
+
s as useRefreshSignal,
|
|
39
|
+
t as useRestrictedLink,
|
|
40
|
+
v as useRouteAccess,
|
|
41
|
+
w as useRouteInfo,
|
|
42
|
+
x as useSignal,
|
|
43
|
+
y as useSignalRefresh,
|
|
44
|
+
z as useSignalSubscription,
|
|
45
|
+
B as useUrlQueries,
|
|
46
|
+
D as useWebserviceAccess,
|
|
47
|
+
H as webserviceAccessProviderConfig
|
|
45
48
|
};
|
|
46
49
|
//# sourceMappingURL=index.js.map
|
package/dist/templates/index.js
CHANGED
|
@@ -22,7 +22,13 @@ export type PageDescriptionType = ComponentDescriptionType & {
|
|
|
22
22
|
options?: {
|
|
23
23
|
[key: string]: string | number | boolean;
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Webservice(s) gating access to the page.
|
|
27
|
+
* - `string`: single webservice — user needs access to it.
|
|
28
|
+
* - `string[]`: any-of semantics — user needs access to at least one.
|
|
29
|
+
* - `undefined`: page has no permission gate.
|
|
30
|
+
*/
|
|
31
|
+
mainWebserviceName?: string | string[] | undefined;
|
|
26
32
|
description?: string;
|
|
27
33
|
chatbotBehaviour?: ChatbotBehaviourType;
|
|
28
34
|
extraWebservices?: string[];
|
|
@@ -14,7 +14,13 @@ export interface RouteInterface {
|
|
|
14
14
|
options?: {
|
|
15
15
|
[key: string]: string | number | boolean;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Webservice(s) gating access to the route.
|
|
19
|
+
* - `string`: single webservice — user needs access to it.
|
|
20
|
+
* - `string[]`: any-of semantics — user needs access to at least one.
|
|
21
|
+
* - `undefined`: route has no permission gate.
|
|
22
|
+
*/
|
|
23
|
+
mainWebserviceName?: string | string[] | undefined;
|
|
18
24
|
description?: string;
|
|
19
25
|
/** If true, the chatbot is automatically opened when the user enters this route. */
|
|
20
26
|
autoOpenChatbot?: boolean;
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect } from "react";
|
|
3
|
-
import { Navigate } from "react-router-dom";
|
|
4
|
-
import { a as useConnectedUserInfo, u as useChatbot } from "./hooks-CvhFUowR.js";
|
|
5
|
-
const PublicAppTemplate = ({
|
|
6
|
-
route,
|
|
7
|
-
defaultPrivateRoute,
|
|
8
|
-
children
|
|
9
|
-
}) => {
|
|
10
|
-
var _a;
|
|
11
|
-
const { user } = useConnectedUserInfo();
|
|
12
|
-
const { setIsChatbotEnabled } = useChatbot();
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
setIsChatbotEnabled(false);
|
|
15
|
-
return () => setIsChatbotEnabled(true);
|
|
16
|
-
}, [setIsChatbotEnabled]);
|
|
17
|
-
const isOpened = ((_a = route.options) == null ? void 0 : _a.opened) === true;
|
|
18
|
-
if (user && !isOpened) {
|
|
19
|
-
return /* @__PURE__ */ jsx(Navigate, { to: defaultPrivateRoute.path, replace: true });
|
|
20
|
-
}
|
|
21
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
PublicAppTemplate as P
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=PublicAppTemplate-B93G2Smc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PublicAppTemplate-B93G2Smc.js","sources":["../src/templates/PublicAppTemplate.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {useEffect} from \"react\";\nimport {Navigate} from \"react-router-dom\";\nimport {useConnectedUserInfo} from \"../providers/ConnectedUserProvider/hooks\";\nimport {useChatbot} from \"../providers/ChatbotProvider/hooks\";\nimport {RouteInterface} from \"../types/routeTypes\";\n\ninterface PublicAppTemplateProps {\n route: RouteInterface\n defaultPrivateRoute: RouteInterface\n defaultPublicRoute: RouteInterface\n children: React.ReactNode\n}\n\n/**\n * Public app template\n * Wraps public pages and redirects authenticated users to private area\n * Unless route.options?.opened is true (public pages accessible when connected)\n */\nconst PublicAppTemplate: React.ComponentType<PublicAppTemplateProps> = (\n {\n route,\n defaultPrivateRoute,\n children\n }) => {\n\n /*******************************************************************************************************************\n * HOOKS\n ******************************************************************************************************************/\n\n const {user} = useConnectedUserInfo();\n const {setIsChatbotEnabled} = useChatbot();\n\n /*******************************************************************************************************************\n * EFFECTS\n ******************************************************************************************************************/\n\n // Disable chatbot on public pages\n useEffect(() => {\n setIsChatbotEnabled(false);\n return () => setIsChatbotEnabled(true);\n }, [setIsChatbotEnabled]);\n\n /*******************************************************************************************************************\n * RENDER\n ******************************************************************************************************************/\n\n // Redirect authenticated users to private area (unless page is opened)\n const isOpened = route.options?.opened === true;\n if (user && !isOpened) {\n return <Navigate to={defaultPrivateRoute.path} replace />;\n }\n\n return (\n <>\n {children}\n </>\n );\n};\n\nexport default PublicAppTemplate;\n"],"names":[],"mappings":";;;;AAmBA,MAAM,oBAAiE,CACnE;AAAA,EACI;AAAA,EACA;AAAA,EACA;AACJ,MAAM;;AAMN,QAAM,EAAC,KAAA,IAAQ,qBAAA;AACf,QAAM,EAAC,oBAAA,IAAuB,WAAA;AAO9B,YAAU,MAAM;AACZ,wBAAoB,KAAK;AACzB,WAAO,MAAM,oBAAoB,IAAI;AAAA,EACzC,GAAG,CAAC,mBAAmB,CAAC;AAOxB,QAAM,aAAW,WAAM,YAAN,mBAAe,YAAW;AAC3C,MAAI,QAAQ,CAAC,UAAU;AACnB,+BAAQ,UAAA,EAAS,IAAI,oBAAoB,MAAM,SAAO,MAAC;AAAA,EAC3D;AAEA,yCAES,UACL;AAER;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-CvhFUowR.js","sources":["../src/providers/ChatbotProvider/hooks.ts","../src/providers/ConnectedUserProvider/hooks.ts"],"sourcesContent":["import {createContext, useContext} from \"react\";\nimport {ChatbotContextValue} from \"./types\";\n\nexport const ChatbotContext = createContext<ChatbotContextValue | null>(null);\n\nexport const useChatbot = (): ChatbotContextValue => {\n const context = useContext(ChatbotContext);\n if (!context) {\n throw new Error(\"useChatbot must be used within a ChatbotProvider\");\n }\n return context;\n};\n","import {createContext, useContext} from \"react\";\nimport {ConnectedUserInterface} from \"./types\";\n\n/**\n * Connected user context\n */\nconst ConnectedUserContext = createContext<{\n user: ConnectedUserInterface | undefined\n push(webservice: () => void): void\n login: [(login: string, password: string) => void, boolean],\n logout: [() => void, boolean],\n refresh: [() => void, boolean],\n handleSessionExpired: (onRefreshSuccess?: () => void) => void\n}>({\n user: undefined,\n push: () => {\n console.warn(\"ConnectedUserProvider not initialized: push\")\n },\n login: [() => {\n console.warn(\"ConnectedUserProvider not initialized: login\")\n }, false],\n logout: [() => {\n console.warn(\"ConnectedUserProvider not initialized: logout\")\n }, false],\n refresh: [() => {\n console.warn(\"ConnectedUserProvider not initialized: refresh\")\n }, false],\n handleSessionExpired: () => {\n console.warn(\"ConnectedUserProvider not initialized: handleSessionExpired\")\n }\n});\n\n/**\n * Hook to access connected user info\n */\nfunction useConnectedUserInfo() {\n return useContext(ConnectedUserContext)\n}\n\nexport {\n ConnectedUserContext,\n useConnectedUserInfo\n}\n"],"names":[],"mappings":";AAGO,MAAM,iBAAiB,cAA0C,IAAI;AAErE,MAAM,aAAa,MAA2B;AACjD,QAAM,UAAU,WAAW,cAAc;AACzC,MAAI,CAAC,SAAS;AACV,UAAM,IAAI,MAAM,kDAAkD;AAAA,EACtE;AACA,SAAO;AACX;ACLA,MAAM,uBAAuB,cAO1B;AAAA,EACC,MAAM;AAAA,EACN,MAAM,MAAM;AACR,YAAQ,KAAK,6CAA6C;AAAA,EAC9D;AAAA,EACA,OAAO,CAAC,MAAM;AACV,YAAQ,KAAK,8CAA8C;AAAA,EAC/D,GAAG,KAAK;AAAA,EACR,QAAQ,CAAC,MAAM;AACX,YAAQ,KAAK,+CAA+C;AAAA,EAChE,GAAG,KAAK;AAAA,EACR,SAAS,CAAC,MAAM;AACZ,YAAQ,KAAK,gDAAgD;AAAA,EACjE,GAAG,KAAK;AAAA,EACR,sBAAsB,MAAM;AACxB,YAAQ,KAAK,6DAA6D;AAAA,EAC9E;AACJ,CAAC;AAKD,SAAS,uBAAuB;AAC5B,SAAO,WAAW,oBAAoB;AAC1C;"}
|