@edifice.io/react 2.3.2-develop-wl.20250925111519 → 2.3.2-develop-b2school.20250926135017
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.
|
@@ -70,8 +70,7 @@ const Header = ({
|
|
|
70
70
|
conversationWorflow,
|
|
71
71
|
searchWorkflow,
|
|
72
72
|
isCollapsed,
|
|
73
|
-
toggleCollapsedNav
|
|
74
|
-
handleLogout
|
|
73
|
+
toggleCollapsedNav
|
|
75
74
|
} = useHeader({
|
|
76
75
|
user,
|
|
77
76
|
avatar
|
|
@@ -104,7 +103,7 @@ const Header = ({
|
|
|
104
103
|
] }),
|
|
105
104
|
/* @__PURE__ */ jsx(Help, { isHelpOpen, setIsHelpOpen, parsedContent, parsedHeadline, error })
|
|
106
105
|
] }) : null,
|
|
107
|
-
/* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("
|
|
106
|
+
/* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/auth/logout?callback=" + ((theme == null ? void 0 : theme.logoutCallback) ?? "/"), className: "nav-link", children: [
|
|
108
107
|
/* @__PURE__ */ jsx(SvgIconDisconnect, { className: "icon logout" }),
|
|
109
108
|
/* @__PURE__ */ jsx(VisuallyHidden, { children: t("navbar.disconnect") })
|
|
110
109
|
] }) }),
|
|
@@ -14,7 +14,7 @@ const WidgetAppsFooter = () => {
|
|
|
14
14
|
} = useTranslation();
|
|
15
15
|
return /* @__PURE__ */ jsxs("div", { className: "widget-body d-flex flex-wrap", children: [
|
|
16
16
|
!bookmarkedApps.length && /* @__PURE__ */ jsx("div", { className: "text-dark", children: t("navbar.myapps.more") }),
|
|
17
|
-
bookmarkedApps.slice(0, 6).map((app, index) => /* @__PURE__ */ jsx("a", { href: app.address, className: "bookmarked-app", children: /* @__PURE__ */ jsx(AppIcon, { app, size: "32" }) }, index))
|
|
17
|
+
bookmarkedApps.slice(0, 6).map((app, index) => /* @__PURE__ */ jsx("a", { href: app.address, className: "bookmarked-app", target: app.isExternal || app.category === "connector" ? "_blank" : void 0, children: /* @__PURE__ */ jsx(AppIcon, { app, size: "32" }) }, index))
|
|
18
18
|
] });
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { useState, useId, useCallback, useMemo } from "react";
|
|
2
|
-
import { odeServices } from "@edifice.io/client";
|
|
3
2
|
import { useHover } from "@uidotdev/usehooks";
|
|
4
3
|
import { useTranslation } from "react-i18next";
|
|
5
4
|
import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
6
|
-
import { useEdificeTheme } from "../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
|
|
7
5
|
import useBookmark from "../../../hooks/useBookmark/useBookmark.js";
|
|
8
6
|
import useHasWorkflow from "../../../hooks/useHasWorkflow/useHasWorkflow.js";
|
|
9
7
|
function useHeader({
|
|
@@ -14,15 +12,11 @@ function useHeader({
|
|
|
14
12
|
appCode
|
|
15
13
|
} = useEdificeClient(), {
|
|
16
14
|
t
|
|
17
|
-
} = useTranslation(), {
|
|
18
|
-
theme
|
|
19
|
-
} = useEdificeTheme(), title = t(appCode), [isCollapsed, setIsCollapsed] = useState(!0), [appsRef, isAppsHovered] = useHover(), popoverAppsId = useId(), popoverSearchId = useId(), userAvatar = avatar, userName = user == null ? void 0 : user.username, welcomeUser = t("welcome", {
|
|
15
|
+
} = useTranslation(), title = t(appCode), [isCollapsed, setIsCollapsed] = useState(!0), [appsRef, isAppsHovered] = useHover(), popoverAppsId = useId(), popoverSearchId = useId(), userAvatar = avatar, userName = user == null ? void 0 : user.username, welcomeUser = t("welcome", {
|
|
20
16
|
username: user == null ? void 0 : user.firstName
|
|
21
17
|
}), bookmarkedApps = useBookmark(), communityWorkflow = useHasWorkflow("net.atos.entng.community.controllers.CommunityController|view"), conversationWorflow = useHasWorkflow("org.entcore.conversation.controllers.ConversationController|view"), searchWorkflow = useHasWorkflow("fr.openent.searchengine.controllers.SearchEngineController|view"), toggleCollapsedNav = useCallback(() => {
|
|
22
18
|
setIsCollapsed(!isCollapsed);
|
|
23
|
-
}, [isCollapsed])
|
|
24
|
-
await odeServices.session().logout(), window.location.href = (theme == null ? void 0 : theme.logoutCallback) ?? "/auth/login";
|
|
25
|
-
};
|
|
19
|
+
}, [isCollapsed]);
|
|
26
20
|
return useMemo(() => ({
|
|
27
21
|
title,
|
|
28
22
|
bookmarkedApps,
|
|
@@ -37,9 +31,8 @@ function useHeader({
|
|
|
37
31
|
conversationWorflow,
|
|
38
32
|
searchWorkflow,
|
|
39
33
|
isCollapsed,
|
|
40
|
-
toggleCollapsedNav
|
|
41
|
-
|
|
42
|
-
}), [appsRef, bookmarkedApps, communityWorkflow, conversationWorflow, handleLogout, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
|
|
34
|
+
toggleCollapsedNav
|
|
35
|
+
}), [appsRef, bookmarkedApps, communityWorkflow, conversationWorflow, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
|
|
43
36
|
}
|
|
44
37
|
export {
|
|
45
38
|
useHeader as default
|
|
@@ -66,7 +66,7 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
|
|
|
66
66
|
isOnboarding ? handleCloseWithPreference() : handleCloseWithoutPreference();
|
|
67
67
|
}, children: t(closeText || "explorer.modal.onboarding.trash.close") })
|
|
68
68
|
] })
|
|
69
|
-
] }), document.getElementById("portal"));
|
|
69
|
+
] }), document.getElementById("portal") || document.body);
|
|
70
70
|
});
|
|
71
71
|
export {
|
|
72
72
|
OnboardingModal as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.3.2-develop-
|
|
3
|
+
"version": "2.3.2-develop-b2school.20250926135017",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -130,9 +130,9 @@
|
|
|
130
130
|
"react-slugify": "^3.0.3",
|
|
131
131
|
"swiper": "^10.1.0",
|
|
132
132
|
"ua-parser-js": "^1.0.36",
|
|
133
|
-
"@edifice.io/bootstrap": "2.3.2-develop-
|
|
134
|
-
"@edifice.io/tiptap-extensions": "2.3.2-develop-
|
|
135
|
-
"@edifice.io/utilities": "2.3.2-develop-
|
|
133
|
+
"@edifice.io/bootstrap": "2.3.2-develop-b2school.20250926135017",
|
|
134
|
+
"@edifice.io/tiptap-extensions": "2.3.2-develop-b2school.20250926135017",
|
|
135
|
+
"@edifice.io/utilities": "2.3.2-develop-b2school.20250926135017"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
138
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -163,8 +163,8 @@
|
|
|
163
163
|
"vite": "^5.4.11",
|
|
164
164
|
"vite-plugin-dts": "^4.1.0",
|
|
165
165
|
"vite-tsconfig-paths": "^5.0.1",
|
|
166
|
-
"@edifice.io/client": "2.3.2-develop-
|
|
167
|
-
"@edifice.io/config": "2.3.2-develop-
|
|
166
|
+
"@edifice.io/client": "2.3.2-develop-b2school.20250926135017",
|
|
167
|
+
"@edifice.io/config": "2.3.2-develop-b2school.20250926135017"
|
|
168
168
|
},
|
|
169
169
|
"peerDependencies": {
|
|
170
170
|
"@react-spring/web": "^9.7.5",
|