@edifice.io/react 2.5.16-develop-b2school.20260413113834 → 2.5.16-develop-pedago.20260413164323
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/components/Layout/components/Header.js +7 -0
- package/dist/components/Layout/hooks/useHeader.js +3 -2
- package/dist/modules/icons/components/nav/IconCommunities.js +1 -1
- package/dist/modules/modals/OnboardingModal/index.d.ts +1 -1
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +3 -1
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +2 -1
- package/package.json +6 -6
|
@@ -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,
|
|
@@ -97,6 +99,7 @@ const Header = ({
|
|
|
97
99
|
/* @__PURE__ */ jsx(SvgIconOneMessaging, { className: "icon notification" }),
|
|
98
100
|
/* @__PURE__ */ jsx(VisuallyHidden, { children: t("navbar.messages") })
|
|
99
101
|
] }) }),
|
|
102
|
+
communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/communities", translate: t("navbar.community"), children: /* @__PURE__ */ jsx(SvgIconCommunities, { className: "icon communities text-purple-500" }) }) }),
|
|
100
103
|
/* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/userbook/mon-compte", className: "dropdown-item", translate: t("navbar.myaccount"), children: /* @__PURE__ */ jsx(SvgIconOneProfile, { className: "icon user" }) }) }),
|
|
101
104
|
currentLanguage === "fr" && hasOldHelpEnableWorkflow ? /* @__PURE__ */ jsxs(NavItem, { children: [
|
|
102
105
|
/* @__PURE__ */ jsxs("button", { className: "nav-link", onClick: () => {
|
|
@@ -177,6 +180,10 @@ const Header = ({
|
|
|
177
180
|
/* @__PURE__ */ jsx(SvgIconCommunity, { className: "icon community" }),
|
|
178
181
|
/* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.community") })
|
|
179
182
|
] }) }),
|
|
183
|
+
communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/communities", className: "nav-link dropdown-item", children: [
|
|
184
|
+
/* @__PURE__ */ jsx(SvgIconCommunities, { className: "icon communities" }),
|
|
185
|
+
/* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.community") })
|
|
186
|
+
] }) }),
|
|
180
187
|
searchWorkflow ? /* @__PURE__ */ jsx(SearchEngine, {}) : null,
|
|
181
188
|
/* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/userbook/mon-compte", className: "nav-link dropdown-item", children: [
|
|
182
189
|
/* @__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
|
|
@@ -5,7 +5,7 @@ const SvgIconCommunities = ({
|
|
|
5
5
|
...props
|
|
6
6
|
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 50 50", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("path", { d: "M25.807 33.165c4.726.17 8 3.997 8 8.5 0 .984-.795 1.775-1.775 1.775H18.977a1.774 1.774 0 0 1-1.776-1.775v-.201h-.004a8.303 8.303 0 0 1 8.61-8.299M8.61 24.451c4.726.17 8.001 3.997 8.001 8.5 0 .984-.796 1.776-1.775 1.776H1.776A1.774 1.774 0 0 1 0 32.95v-.201a8.303 8.303 0 0 1 8.61-8.299M41.61 24.006c4.499.162 8.001 3.996 8.001 8.5 0 .984-.796 1.775-1.775 1.775H34.779a1.774 1.774 0 0 1-1.775-1.775v-.201H33a8.303 8.303 0 0 1 8.61-8.3M25.142 20a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285M8.308 11.627a5.141 5.141 0 1 1 0 10.282 5.141 5.141 0 0 1 0-10.282M41.691 11.627a5.142 5.142 0 1 1 .001 10.284 5.142 5.142 0 0 1 0-10.284M24.997 5.557a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285" })
|
|
8
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M25.807 33.165c4.726.17 8 3.997 8 8.5 0 .984-.795 1.775-1.775 1.775H18.977a1.774 1.774 0 0 1-1.776-1.775v-.201h-.004a8.303 8.303 0 0 1 8.61-8.299M8.61 24.451c4.726.17 8.001 3.997 8.001 8.5 0 .984-.796 1.776-1.775 1.776H1.776A1.774 1.774 0 0 1 0 32.95v-.201a8.303 8.303 0 0 1 8.61-8.299M41.61 24.006c4.499.162 8.001 3.996 8.001 8.5 0 .984-.796 1.775-1.775 1.775H34.779a1.774 1.774 0 0 1-1.775-1.775v-.201H33a8.303 8.303 0 0 1 8.61-8.3M25.142 20a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285M8.308 11.627a5.141 5.141 0 1 1 0 10.282 5.141 5.141 0 0 1 0-10.282M41.691 11.627a5.142 5.142 0 1 1 .001 10.284 5.142 5.142 0 0 1 0-10.284M24.997 5.557a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285" })
|
|
9
9
|
] });
|
|
10
10
|
export {
|
|
11
11
|
SvgIconCommunities as default
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as OnboardingModal } from './OnboardingModal';
|
|
2
|
-
export type {
|
|
2
|
+
export type { OnboardingModalRef } from './OnboardingModal';
|
|
@@ -32,8 +32,10 @@ export interface InternalLinkerProps {
|
|
|
32
32
|
applicationList?: ApplicationOption[];
|
|
33
33
|
/** Whether to show the application selector */
|
|
34
34
|
showApplicationSelector?: boolean;
|
|
35
|
+
/** Disable application selecetor */
|
|
36
|
+
disableApplicationSelector?: boolean;
|
|
35
37
|
/** Optional callback to filter resources after loading. Applied in addition to search filters. */
|
|
36
38
|
resourceFilter?: (resource: ILinkedResource) => boolean;
|
|
37
39
|
}
|
|
38
|
-
export declare const InternalLinker: ({ appCode, defaultAppCode, defaultResourceId, onChange, onSelect, multiple, resourceList, applicationList, showApplicationSelector, resourceFilter, }: InternalLinkerProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare const InternalLinker: ({ appCode, defaultAppCode, defaultResourceId, onChange, onSelect, multiple, resourceList, applicationList, showApplicationSelector, disableApplicationSelector, resourceFilter, }: InternalLinkerProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
41
|
export default InternalLinker;
|
|
@@ -22,6 +22,7 @@ const InternalLinker = ({
|
|
|
22
22
|
resourceList,
|
|
23
23
|
applicationList,
|
|
24
24
|
showApplicationSelector = !0,
|
|
25
|
+
disableApplicationSelector = !1,
|
|
25
26
|
resourceFilter
|
|
26
27
|
}) => {
|
|
27
28
|
const {
|
|
@@ -114,7 +115,7 @@ const InternalLinker = ({
|
|
|
114
115
|
/* @__PURE__ */ jsx(Dropdown.Trigger, { icon: /* @__PURE__ */ jsx("div", { className: "pe-8", children: (selectedApplication == null ? void 0 : selectedApplication.icon) || /* @__PURE__ */ jsx(SvgIconApplications, {}) }), label: /* @__PURE__ */ jsxs("span", { className: "d-md-inline d-sm-none", children: [
|
|
115
116
|
" ",
|
|
116
117
|
t((selectedApplication == null ? void 0 : selectedApplication.displayName) || "bbm.linker.int.choose")
|
|
117
|
-
] }), variant: "ghost", size: "md" }),
|
|
118
|
+
] }), variant: "ghost", size: "md", disabled: disableApplicationSelector }),
|
|
118
119
|
/* @__PURE__ */ jsx(Dropdown.Menu, { children: options == null ? void 0 : options.map((option) => /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => handleOptionClick(option), children: option.displayName }, option.application)) })
|
|
119
120
|
] }) }),
|
|
120
121
|
/* @__PURE__ */ jsx("div", { className: "flex-grow-1 align-self-center", children: /* @__PURE__ */ jsx("form", { className: "gap-16 d-flex w-100 align-items-center px-16 py-8", onSubmit: handleSubmit, children: /* @__PURE__ */ jsx(SearchBar, { isVariant: !0, placeholder: t("search"), size: "lg", className: "w-100", disabled: !selectedApplication, onChange: handleSearchChange }) }) })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.5.16-develop-
|
|
3
|
+
"version": "2.5.16-develop-pedago.20260413164323",
|
|
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/
|
|
139
|
-
"@edifice.io/
|
|
140
|
-
"@edifice.io/
|
|
138
|
+
"@edifice.io/bootstrap": "2.5.16-develop-pedago.20260413164323",
|
|
139
|
+
"@edifice.io/tiptap-extensions": "2.5.16-develop-pedago.20260413164323",
|
|
140
|
+
"@edifice.io/utilities": "2.5.16-develop-pedago.20260413164323"
|
|
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/config": "2.5.16-develop-
|
|
172
|
-
"@edifice.io/client": "2.5.16-develop-
|
|
171
|
+
"@edifice.io/config": "2.5.16-develop-pedago.20260413164323",
|
|
172
|
+
"@edifice.io/client": "2.5.16-develop-pedago.20260413164323"
|
|
173
173
|
},
|
|
174
174
|
"peerDependencies": {
|
|
175
175
|
"@react-spring/web": "^9.7.5",
|