@edifice.io/react 2.5.15-develop-pedago.20260401154013 → 2.5.15-develop-pedago.20260401160109

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.
@@ -4,6 +4,7 @@ import { useTranslation } from "react-i18next";
4
4
  import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
5
5
  import { useEdificeTheme } from "../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
6
6
  import SvgIconRafterDown from "../../../modules/icons/components/IconRafterDown.js";
7
+ import SvgIconCommunities from "../../../modules/icons/components/nav/IconCommunities.js";
7
8
  import SvgIconCommunity from "../../../modules/icons/components/nav/IconCommunity.js";
8
9
  import SvgIconDisconnect from "../../../modules/icons/components/nav/IconDisconnect.js";
9
10
  import SvgIconHome from "../../../modules/icons/components/nav/IconHome.js";
@@ -67,6 +68,7 @@ const Header = ({
67
68
  userName,
68
69
  welcomeUser,
69
70
  communityWorkflow,
71
+ communitiesWorkflow,
70
72
  conversationWorflow,
71
73
  searchWorkflow,
72
74
  isCollapsed,
@@ -177,6 +179,10 @@ const Header = ({
177
179
  /* @__PURE__ */ jsx(SvgIconCommunity, { className: "icon community" }),
178
180
  /* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.community") })
179
181
  ] }) }),
182
+ communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/communities", className: "nav-link dropdown-item", children: [
183
+ /* @__PURE__ */ jsx(SvgIconCommunities, { className: "icon communities" }),
184
+ /* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.community") })
185
+ ] }) }),
180
186
  searchWorkflow ? /* @__PURE__ */ jsx(SearchEngine, {}) : null,
181
187
  /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/userbook/mon-compte", className: "nav-link dropdown-item", children: [
182
188
  /* @__PURE__ */ jsx(Avatar, { alt: userName, size: "sm", src: userAvatar, variant: "circle", className: "bg-white", width: "32", height: "32" }),
@@ -14,7 +14,7 @@ function useHeader({
14
14
  t
15
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", {
16
16
  username: user == null ? void 0 : user.firstName
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(() => {
17
+ }), bookmarkedApps = useBookmark(), communityWorkflow = useHasWorkflow("net.atos.entng.community.controllers.CommunityController|view"), communitiesWorkflow = useHasWorkflow("community.access"), conversationWorflow = useHasWorkflow("org.entcore.conversation.controllers.ConversationController|view"), searchWorkflow = useHasWorkflow("fr.openent.searchengine.controllers.SearchEngineController|view"), toggleCollapsedNav = useCallback(() => {
18
18
  setIsCollapsed(!isCollapsed);
19
19
  }, [isCollapsed]);
20
20
  return useMemo(() => ({
@@ -28,11 +28,12 @@ function useHeader({
28
28
  userName,
29
29
  welcomeUser,
30
30
  communityWorkflow,
31
+ communitiesWorkflow,
31
32
  conversationWorflow,
32
33
  searchWorkflow,
33
34
  isCollapsed,
34
35
  toggleCollapsedNav
35
- }), [appsRef, bookmarkedApps, communityWorkflow, conversationWorflow, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
36
+ }), [appsRef, bookmarkedApps, communitiesWorkflow, communityWorkflow, conversationWorflow, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
36
37
  }
37
38
  export {
38
39
  useHeader as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.5.15-develop-pedago.20260401154013",
3
+ "version": "2.5.15-develop-pedago.20260401160109",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -135,9 +135,9 @@
135
135
  "swiper": "^10.1.0",
136
136
  "ua-parser-js": "^1.0.36",
137
137
  "react-pdf": "10.2.0",
138
- "@edifice.io/bootstrap": "2.5.15-develop-pedago.20260401154013",
139
- "@edifice.io/tiptap-extensions": "2.5.15-develop-pedago.20260401154013",
140
- "@edifice.io/utilities": "2.5.15-develop-pedago.20260401154013"
138
+ "@edifice.io/tiptap-extensions": "2.5.15-develop-pedago.20260401160109",
139
+ "@edifice.io/bootstrap": "2.5.15-develop-pedago.20260401160109",
140
+ "@edifice.io/utilities": "2.5.15-develop-pedago.20260401160109"
141
141
  },
142
142
  "devDependencies": {
143
143
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -168,8 +168,8 @@
168
168
  "vite": "^5.4.11",
169
169
  "vite-plugin-dts": "^4.1.0",
170
170
  "vite-tsconfig-paths": "^5.0.1",
171
- "@edifice.io/client": "2.5.15-develop-pedago.20260401154013",
172
- "@edifice.io/config": "2.5.15-develop-pedago.20260401154013"
171
+ "@edifice.io/client": "2.5.15-develop-pedago.20260401160109",
172
+ "@edifice.io/config": "2.5.15-develop-pedago.20260401160109"
173
173
  },
174
174
  "peerDependencies": {
175
175
  "@react-spring/web": "^9.7.5",