@edifice.io/react 2.3.2-develop-b2school.20251001090200 → 2.3.2-develop-pedago.20251001105735

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,7 +70,8 @@ const Header = ({
70
70
  conversationWorflow,
71
71
  searchWorkflow,
72
72
  isCollapsed,
73
- toggleCollapsedNav
73
+ toggleCollapsedNav,
74
+ handleLogout
74
75
  } = useHeader({
75
76
  user,
76
77
  avatar
@@ -103,7 +104,7 @@ const Header = ({
103
104
  ] }),
104
105
  /* @__PURE__ */ jsx(Help, { isHelpOpen, setIsHelpOpen, parsedContent, parsedHeadline, error })
105
106
  ] }) : null,
106
- /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/auth/logout?callback=" + ((theme == null ? void 0 : theme.logoutCallback) ?? "/"), className: "nav-link", children: [
107
+ /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("button", { className: "nav-link", onClick: handleLogout, children: [
107
108
  /* @__PURE__ */ jsx(SvgIconDisconnect, { className: "icon logout" }),
108
109
  /* @__PURE__ */ jsx(VisuallyHidden, { children: t("navbar.disconnect") })
109
110
  ] }) }),
@@ -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", target: app.isExternal || app.category === "connector" ? "_blank" : void 0, 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", children: /* @__PURE__ */ jsx(AppIcon, { app, size: "32" }) }, index))
18
18
  ] });
19
19
  };
20
20
  export {
@@ -1,7 +1,9 @@
1
1
  import { useState, useId, useCallback, useMemo } from "react";
2
+ import { odeServices } from "@edifice.io/client";
2
3
  import { useHover } from "@uidotdev/usehooks";
3
4
  import { useTranslation } from "react-i18next";
4
5
  import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
6
+ import { useEdificeTheme } from "../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
5
7
  import useBookmark from "../../../hooks/useBookmark/useBookmark.js";
6
8
  import useHasWorkflow from "../../../hooks/useHasWorkflow/useHasWorkflow.js";
7
9
  function useHeader({
@@ -12,11 +14,15 @@ function useHeader({
12
14
  appCode
13
15
  } = useEdificeClient(), {
14
16
  t
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", {
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", {
16
20
  username: user == null ? void 0 : user.firstName
17
21
  }), 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(() => {
18
22
  setIsCollapsed(!isCollapsed);
19
- }, [isCollapsed]);
23
+ }, [isCollapsed]), handleLogout = async () => {
24
+ await odeServices.session().logout(), window.location.href = (theme == null ? void 0 : theme.logoutCallback) ?? "/auth/login";
25
+ };
20
26
  return useMemo(() => ({
21
27
  title,
22
28
  bookmarkedApps,
@@ -31,8 +37,9 @@ function useHeader({
31
37
  conversationWorflow,
32
38
  searchWorkflow,
33
39
  isCollapsed,
34
- toggleCollapsedNav
35
- }), [appsRef, bookmarkedApps, communityWorkflow, conversationWorflow, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
40
+ toggleCollapsedNav,
41
+ handleLogout
42
+ }), [appsRef, bookmarkedApps, communityWorkflow, conversationWorflow, handleLogout, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
36
43
  }
37
44
  export {
38
45
  useHeader as default
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
- import Mathematics from "@tiptap/extension-mathematics";
3
+ import Mathematics from "@tiptap-pro/extension-mathematics";
4
4
  import { useEditor, EditorContent } from "@tiptap/react";
5
5
  import StarterKit from "@tiptap/starter-kit";
6
6
  import { useTranslation } from "react-i18next";
@@ -7,7 +7,7 @@ import { Hyperlink } from "@edifice.io/tiptap-extensions/hyperlink";
7
7
  import { SpeechRecognition } from "@edifice.io/tiptap-extensions/speech-recognition";
8
8
  import { SpeechSynthesis } from "@edifice.io/tiptap-extensions/speech-synthesis";
9
9
  import { TableCell } from "@edifice.io/tiptap-extensions/table-cell";
10
- import { Mathematics } from "@tiptap/extension-mathematics";
10
+ import { Mathematics } from "@tiptap-pro/extension-mathematics";
11
11
  import Color from "@tiptap/extension-color";
12
12
  import Focus from "@tiptap/extension-focus";
13
13
  import FontFamily from "@tiptap/extension-font-family";
@@ -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") || document.body);
69
+ ] }), document.getElementById("portal"));
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-b2school.20251001090200",
3
+ "version": "2.3.2-develop-pedago.20251001105735",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -90,7 +90,6 @@
90
90
  "@tiptap/extension-image": "2.11.0",
91
91
  "@tiptap/extension-link": "2.11.0",
92
92
  "@tiptap/extension-list-item": "2.11.0",
93
- "@tiptap/extension-mathematics": "2.22.0",
94
93
  "@tiptap/extension-placeholder": "2.11.0",
95
94
  "@tiptap/extension-subscript": "2.11.0",
96
95
  "@tiptap/extension-superscript": "2.11.0",
@@ -131,9 +130,9 @@
131
130
  "react-slugify": "^3.0.3",
132
131
  "swiper": "^10.1.0",
133
132
  "ua-parser-js": "^1.0.36",
134
- "@edifice.io/bootstrap": "2.3.2-develop-b2school.20251001090200",
135
- "@edifice.io/utilities": "2.3.2-develop-b2school.20251001090200",
136
- "@edifice.io/tiptap-extensions": "2.3.2-develop-b2school.20251001090200"
133
+ "@edifice.io/bootstrap": "2.3.2-develop-pedago.20251001105735",
134
+ "@edifice.io/tiptap-extensions": "2.3.2-develop-pedago.20251001105735",
135
+ "@edifice.io/utilities": "2.3.2-develop-pedago.20251001105735"
137
136
  },
138
137
  "devDependencies": {
139
138
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -164,8 +163,8 @@
164
163
  "vite": "^5.4.11",
165
164
  "vite-plugin-dts": "^4.1.0",
166
165
  "vite-tsconfig-paths": "^5.0.1",
167
- "@edifice.io/config": "2.3.2-develop-b2school.20251001090200",
168
- "@edifice.io/client": "2.3.2-develop-b2school.20251001090200"
166
+ "@edifice.io/client": "2.3.2-develop-pedago.20251001105735",
167
+ "@edifice.io/config": "2.3.2-develop-pedago.20251001105735"
169
168
  },
170
169
  "peerDependencies": {
171
170
  "@react-spring/web": "^9.7.5",
@@ -175,6 +174,9 @@
175
174
  "react-hook-form": "^7.53.0",
176
175
  "react-i18next": "^14.1.0"
177
176
  },
177
+ "optionalDependencies": {
178
+ "@tiptap-pro/extension-mathematics": "2.2.1"
179
+ },
178
180
  "publishConfig": {
179
181
  "access": "public"
180
182
  },