@edifice.io/react 2.6.11 → 2.6.12

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.
@@ -138,7 +138,7 @@ const Header = ({
138
138
  /* @__PURE__ */ jsxs("ul", { className: "navbar-nav", children: [
139
139
  /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/timeline/timeline", translate: t("navbar.home"), children: /* @__PURE__ */ jsx(SvgIconHome, { color: "#fff" }) }) }),
140
140
  /* @__PURE__ */ jsxs(NavItem, { className: "position-relative", ref: appsRef, id: popoverAppsId, "aria-haspopup": "true", "aria-expanded": isAppsHovered, children: [
141
- /* @__PURE__ */ jsx(NavLink, { link: "/welcome", translate: t("navbar.applications"), children: /* @__PURE__ */ jsx(SvgIconMyApps, { color: "#fff" }) }),
141
+ /* @__PURE__ */ jsx(NavLink, { link: "/welcome", translate: t("navbar.applications"), "data-testid": "header-my-apps-button", children: /* @__PURE__ */ jsx(SvgIconMyApps, { color: "#fff" }) }),
142
142
  /* @__PURE__ */ jsxs(Popover, { className: "top-100 widget", id: popoverAppsId, isVisible: isAppsHovered, children: [
143
143
  /* @__PURE__ */ jsx(PopoverBody, { children: /* @__PURE__ */ jsx(WidgetAppsBody, { bookmarkedApps }) }),
144
144
  /* @__PURE__ */ jsx(PopoverFooter, { className: "widget-footer border-top border-ghost", children: /* @__PURE__ */ jsx(WidgetAppsFooter, {}) })
@@ -174,17 +174,17 @@ const Header = ({
174
174
  /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("div", { className: "dropdown", children: [
175
175
  /* @__PURE__ */ jsx("button", { className: "nav-link btn btn-naked d-md-none", type: "button", "aria-controls": "dropdown-navbar", "aria-expanded": !isCollapsed, "aria-label": t("navbar.open.menu"), onClick: toggleCollapsedNav, children: /* @__PURE__ */ jsx(SvgIconRafterDown, { className: "icon rafter-down", width: "20", height: "20", color: "#fff" }) }),
176
176
  /* @__PURE__ */ jsxs("ul", { className: `dropdown-menu dropdown-menu-end ${isCollapsed ? "" : "show"}`, id: "dropdown-navbar", children: [
177
- communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/communities", className: "nav-link dropdown-item", children: [
177
+ communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/communities", className: "nav-link dropdown-item", "data-testid": "header-community-button", children: [
178
178
  /* @__PURE__ */ jsx(SvgIconCommunities, { className: "icon communities" }),
179
179
  /* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.community") })
180
180
  ] }) }),
181
181
  searchWorkflow ? /* @__PURE__ */ jsx(SearchEngine, {}) : null,
182
- /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/userbook/mon-compte", className: "nav-link dropdown-item", children: [
182
+ /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/userbook/mon-compte", className: "nav-link dropdown-item", "data-testid": "header-user-profile-button", children: [
183
183
  /* @__PURE__ */ jsx(Avatar, { alt: userName, size: "sm", src: userAvatar, variant: "circle", className: "bg-white", width: "32", height: "32" }),
184
184
  /* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.myaccount") })
185
185
  ] }) }),
186
186
  /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx("hr", { className: "dropdown-divider" }) }),
187
- /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/auth/logout?callback=" + ((theme == null ? void 0 : theme.logoutCallback) ?? ""), className: "nav-link dropdown-item", children: [
187
+ /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/auth/logout?callback=" + ((theme == null ? void 0 : theme.logoutCallback) ?? ""), className: "nav-link dropdown-item", "data-testid": "header-logout-button", children: [
188
188
  /* @__PURE__ */ jsx(SvgIconDisconnect, { className: "icon logout" }),
189
189
  /* @__PURE__ */ jsx("span", { id: "logout-label", className: "nav-text", children: t("navbar.disconnect") })
190
190
  ] }) })
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- export interface NavLinkProps<T> {
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export interface NavLinkProps<T> extends Omit<ComponentPropsWithoutRef<'a'>, 'className' | 'translate'> {
3
3
  /**
4
4
  * href link
5
5
  */
@@ -21,4 +21,4 @@ export interface NavLinkProps<T> {
21
21
  */
22
22
  button?: boolean;
23
23
  }
24
- export declare function NavLink({ link, className, children, translate, button, ...restProps }: NavLinkProps<string>): import("react/jsx-runtime").JSX.Element;
24
+ export declare const NavLink: import('react').ForwardRefExoticComponent<NavLinkProps<string> & import('react').RefAttributes<HTMLAnchorElement>>;
@@ -1,7 +1,8 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
2
3
  import clsx from "clsx";
3
4
  import VisuallyHidden from "../../VisuallyHidden/VisuallyHidden.js";
4
- function NavLink({
5
+ function NavLinkRender({
5
6
  link,
6
7
  className,
7
8
  children,
@@ -9,13 +10,14 @@ function NavLink({
9
10
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
11
  button,
11
12
  ...restProps
12
- }) {
13
+ }, ref) {
13
14
  const classes = clsx("nav-link", className);
14
- return /* @__PURE__ */ jsxs("a", { href: link, className: classes, ...restProps, children: [
15
+ return /* @__PURE__ */ jsxs("a", { ref, href: link, className: classes, ...restProps, children: [
15
16
  children,
16
17
  translate && /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("span", { className: "nav-text", children: translate }) })
17
18
  ] });
18
19
  }
20
+ const NavLink = /* @__PURE__ */ forwardRef(NavLinkRender);
19
21
  export {
20
22
  NavLink
21
23
  };
package/dist/icons.js CHANGED
@@ -84,122 +84,123 @@ import { default as default84 } from "./modules/icons/components/IconLink.js";
84
84
  import { default as default85 } from "./modules/icons/components/IconListOrder.js";
85
85
  import { default as default86 } from "./modules/icons/components/IconLoader.js";
86
86
  import { default as default87 } from "./modules/icons/components/IconLock.js";
87
- import { default as default88 } from "./modules/icons/components/IconLsuArt.js";
88
- import { default as default89 } from "./modules/icons/components/IconLsuCompetenceNumerique.js";
89
- import { default as default90 } from "./modules/icons/components/IconLsuEmc.js";
90
- import { default as default91 } from "./modules/icons/components/IconLsuFrancais.js";
91
- import { default as default92 } from "./modules/icons/components/IconLsuHistoireGeo.js";
92
- import { default as default93 } from "./modules/icons/components/IconLsuLangue.js";
93
- import { default as default94 } from "./modules/icons/components/IconLsuLangue2.js";
94
- import { default as default95 } from "./modules/icons/components/IconLsuMath.js";
95
- import { default as default96 } from "./modules/icons/components/IconLsuParcoursEducatif.js";
96
- import { default as default97 } from "./modules/icons/components/IconLsuSport.js";
97
- import { default as default98 } from "./modules/icons/components/IconLsuSvt.js";
98
- import { default as default99 } from "./modules/icons/components/IconMailRecall.js";
99
- import { default as default100 } from "./modules/icons/components/IconMail.js";
100
- import { default as default101 } from "./modules/icons/components/IconMegaphone.js";
101
- import { default as default102 } from "./modules/icons/components/IconMergeCells.js";
102
- import { default as default103 } from "./modules/icons/components/IconMessageInfo.js";
103
- import { default as default104 } from "./modules/icons/components/IconMicOff.js";
104
- import { default as default105 } from "./modules/icons/components/IconMic.js";
105
- import { default as default106 } from "./modules/icons/components/IconMinus.js";
106
- import { default as default107 } from "./modules/icons/components/IconMove.js";
107
- import { default as default108 } from "./modules/icons/components/IconNoColors.js";
108
- import { default as default109 } from "./modules/icons/components/IconNotes.js";
109
- import { default as default110 } from "./modules/icons/components/IconNotification.js";
110
- import { default as default111 } from "./modules/icons/components/IconOptions.js";
111
- import { default as default112 } from "./modules/icons/components/IconOrderedList.js";
112
- import { default as default113 } from "./modules/icons/components/IconPaperclip.js";
113
- import { default as default114 } from "./modules/icons/components/IconParcoursCitoyen.js";
114
- import { default as default115 } from "./modules/icons/components/IconParcoursSecours.js";
115
- import { default as default116 } from "./modules/icons/components/IconPause.js";
116
- import { default as default117 } from "./modules/icons/components/IconPinOff.js";
117
- import { default as default118 } from "./modules/icons/components/IconPinOn.js";
118
- import { default as default119 } from "./modules/icons/components/IconPlaceholder.js";
119
- import { default as default120 } from "./modules/icons/components/IconPlayFilled.js";
120
- import { default as default121 } from "./modules/icons/components/IconPlay.js";
121
- import { default as default122 } from "./modules/icons/components/IconPlus.js";
122
- import { default as default123 } from "./modules/icons/components/IconPointerDefault.js";
123
- import { default as default124 } from "./modules/icons/components/IconPointerHand.js";
124
- import { default as default125 } from "./modules/icons/components/IconPrint.js";
125
- import { default as default126 } from "./modules/icons/components/IconQuestionMark.js";
126
- import { default as default127 } from "./modules/icons/components/IconQuestion.js";
127
- import { default as default128 } from "./modules/icons/components/IconRafterDown.js";
128
- import { default as default129 } from "./modules/icons/components/IconRafterLeft.js";
129
- import { default as default130 } from "./modules/icons/components/IconRafterRight.js";
130
- import { default as default131 } from "./modules/icons/components/IconRafterUp.js";
131
- import { default as default132 } from "./modules/icons/components/IconReaction.js";
132
- import { default as default133 } from "./modules/icons/components/IconReadMail.js";
133
- import { default as default134 } from "./modules/icons/components/IconRecordPause.js";
134
- import { default as default135 } from "./modules/icons/components/IconRecordStop.js";
135
- import { default as default136 } from "./modules/icons/components/IconRecordVideo.js";
136
- import { default as default137 } from "./modules/icons/components/IconRecord.js";
137
- import { default as default138 } from "./modules/icons/components/IconRedo.js";
138
- import { default as default139 } from "./modules/icons/components/IconRefresh.js";
139
- import { default as default140 } from "./modules/icons/components/IconReset.js";
140
- import { default as default141 } from "./modules/icons/components/IconRestart.js";
141
- import { default as default142 } from "./modules/icons/components/IconRestore.js";
142
- import { default as default143 } from "./modules/icons/components/IconSave.js";
143
- import { default as default144 } from "./modules/icons/components/IconSearch.js";
144
- import { default as default145 } from "./modules/icons/components/IconSee.js";
145
- import { default as default146 } from "./modules/icons/components/IconSend.js";
146
- import { default as default147 } from "./modules/icons/components/IconSetBackground.js";
147
- import { default as default148 } from "./modules/icons/components/IconSettings.js";
148
- import { default as default149 } from "./modules/icons/components/IconShare.js";
149
- import { default as default150 } from "./modules/icons/components/IconSignature.js";
150
- import { default as default151 } from "./modules/icons/components/IconSmartphone.js";
151
- import { default as default152 } from "./modules/icons/components/IconSmiley.js";
152
- import { default as default153 } from "./modules/icons/components/IconSortAscendingLetters.js";
153
- import { default as default154 } from "./modules/icons/components/IconSortDescendingLetters.js";
154
- import { default as default155 } from "./modules/icons/components/IconSortDescending.js";
155
- import { default as default156 } from "./modules/icons/components/IconSortTime.js";
156
- import { default as default157 } from "./modules/icons/components/IconSpeechToText.js";
157
- import { default as default158 } from "./modules/icons/components/IconSplitCells.js";
158
- import { default as default159 } from "./modules/icons/components/IconSquareRoot.js";
159
- import { default as default160 } from "./modules/icons/components/IconStarFull.js";
160
- import { default as default161 } from "./modules/icons/components/IconStar.js";
161
- import { default as default162 } from "./modules/icons/components/IconSubmission.js";
162
- import { default as default163 } from "./modules/icons/components/IconSubmitToValidate.js";
163
- import { default as default164 } from "./modules/icons/components/IconSubscript.js";
164
- import { default as default165 } from "./modules/icons/components/IconSuccessFill.js";
165
- import { default as default166 } from "./modules/icons/components/IconSuccessOutline.js";
166
- import { default as default167 } from "./modules/icons/components/IconSuperscript.js";
167
- import { default as default168 } from "./modules/icons/components/IconTable.js";
168
- import { default as default169 } from "./modules/icons/components/IconTeacher.js";
169
- import { default as default170 } from "./modules/icons/components/IconTextBold.js";
170
- import { default as default171 } from "./modules/icons/components/IconTextColor.js";
171
- import { default as default172 } from "./modules/icons/components/IconTextHighlight.js";
172
- import { default as default173 } from "./modules/icons/components/IconTextItalic.js";
173
- import { default as default174 } from "./modules/icons/components/IconTextPage.js";
174
- import { default as default175 } from "./modules/icons/components/IconTextSize.js";
175
- import { default as default176 } from "./modules/icons/components/IconTextToSpeechOff.js";
176
- import { default as default177 } from "./modules/icons/components/IconTextToSpeech.js";
177
- import { default as default178 } from "./modules/icons/components/IconTextTypo.js";
178
- import { default as default179 } from "./modules/icons/components/IconTextUnderline.js";
179
- import { default as default180 } from "./modules/icons/components/IconTextVanilla.js";
180
- import { default as default181 } from "./modules/icons/components/IconThumbDown.js";
181
- import { default as default182 } from "./modules/icons/components/IconThumbUp.js";
182
- import { default as default183 } from "./modules/icons/components/IconToolCenter.js";
183
- import { default as default184 } from "./modules/icons/components/IconTool.js";
184
- import { default as default185 } from "./modules/icons/components/IconTrendingUp.js";
185
- import { default as default186 } from "./modules/icons/components/IconUndoAll.js";
186
- import { default as default187 } from "./modules/icons/components/IconUndoSlashed.js";
187
- import { default as default188 } from "./modules/icons/components/IconUndo.js";
188
- import { default as default189 } from "./modules/icons/components/IconUnion.js";
189
- import { default as default190 } from "./modules/icons/components/IconUnlink.js";
190
- import { default as default191 } from "./modules/icons/components/IconUnlock.js";
191
- import { default as default192 } from "./modules/icons/components/IconUnreadMail.js";
192
- import { default as default193 } from "./modules/icons/components/IconUpload.js";
193
- import { default as default194 } from "./modules/icons/components/IconUserSearch.js";
194
- import { default as default195 } from "./modules/icons/components/IconUser.js";
195
- import { default as default196 } from "./modules/icons/components/IconUsers.js";
196
- import { default as default197 } from "./modules/icons/components/IconVideo.js";
197
- import { default as default198 } from "./modules/icons/components/IconViewCalendar.js";
198
- import { default as default199 } from "./modules/icons/components/IconViewList.js";
199
- import { default as default200 } from "./modules/icons/components/IconWand.js";
200
- import { default as default201 } from "./modules/icons/components/IconWrite.js";
201
- import { default as default202 } from "./modules/icons/components/IconZoomIn.js";
202
- import { default as default203 } from "./modules/icons/components/IconZoomOut.js";
87
+ import { default as default88 } from "./modules/icons/components/IconLogout.js";
88
+ import { default as default89 } from "./modules/icons/components/IconLsuArt.js";
89
+ import { default as default90 } from "./modules/icons/components/IconLsuCompetenceNumerique.js";
90
+ import { default as default91 } from "./modules/icons/components/IconLsuEmc.js";
91
+ import { default as default92 } from "./modules/icons/components/IconLsuFrancais.js";
92
+ import { default as default93 } from "./modules/icons/components/IconLsuHistoireGeo.js";
93
+ import { default as default94 } from "./modules/icons/components/IconLsuLangue.js";
94
+ import { default as default95 } from "./modules/icons/components/IconLsuLangue2.js";
95
+ import { default as default96 } from "./modules/icons/components/IconLsuMath.js";
96
+ import { default as default97 } from "./modules/icons/components/IconLsuParcoursEducatif.js";
97
+ import { default as default98 } from "./modules/icons/components/IconLsuSport.js";
98
+ import { default as default99 } from "./modules/icons/components/IconLsuSvt.js";
99
+ import { default as default100 } from "./modules/icons/components/IconMailRecall.js";
100
+ import { default as default101 } from "./modules/icons/components/IconMail.js";
101
+ import { default as default102 } from "./modules/icons/components/IconMegaphone.js";
102
+ import { default as default103 } from "./modules/icons/components/IconMergeCells.js";
103
+ import { default as default104 } from "./modules/icons/components/IconMessageInfo.js";
104
+ import { default as default105 } from "./modules/icons/components/IconMicOff.js";
105
+ import { default as default106 } from "./modules/icons/components/IconMic.js";
106
+ import { default as default107 } from "./modules/icons/components/IconMinus.js";
107
+ import { default as default108 } from "./modules/icons/components/IconMove.js";
108
+ import { default as default109 } from "./modules/icons/components/IconNoColors.js";
109
+ import { default as default110 } from "./modules/icons/components/IconNotes.js";
110
+ import { default as default111 } from "./modules/icons/components/IconNotification.js";
111
+ import { default as default112 } from "./modules/icons/components/IconOptions.js";
112
+ import { default as default113 } from "./modules/icons/components/IconOrderedList.js";
113
+ import { default as default114 } from "./modules/icons/components/IconPaperclip.js";
114
+ import { default as default115 } from "./modules/icons/components/IconParcoursCitoyen.js";
115
+ import { default as default116 } from "./modules/icons/components/IconParcoursSecours.js";
116
+ import { default as default117 } from "./modules/icons/components/IconPause.js";
117
+ import { default as default118 } from "./modules/icons/components/IconPinOff.js";
118
+ import { default as default119 } from "./modules/icons/components/IconPinOn.js";
119
+ import { default as default120 } from "./modules/icons/components/IconPlaceholder.js";
120
+ import { default as default121 } from "./modules/icons/components/IconPlayFilled.js";
121
+ import { default as default122 } from "./modules/icons/components/IconPlay.js";
122
+ import { default as default123 } from "./modules/icons/components/IconPlus.js";
123
+ import { default as default124 } from "./modules/icons/components/IconPointerDefault.js";
124
+ import { default as default125 } from "./modules/icons/components/IconPointerHand.js";
125
+ import { default as default126 } from "./modules/icons/components/IconPrint.js";
126
+ import { default as default127 } from "./modules/icons/components/IconQuestionMark.js";
127
+ import { default as default128 } from "./modules/icons/components/IconQuestion.js";
128
+ import { default as default129 } from "./modules/icons/components/IconRafterDown.js";
129
+ import { default as default130 } from "./modules/icons/components/IconRafterLeft.js";
130
+ import { default as default131 } from "./modules/icons/components/IconRafterRight.js";
131
+ import { default as default132 } from "./modules/icons/components/IconRafterUp.js";
132
+ import { default as default133 } from "./modules/icons/components/IconReaction.js";
133
+ import { default as default134 } from "./modules/icons/components/IconReadMail.js";
134
+ import { default as default135 } from "./modules/icons/components/IconRecordPause.js";
135
+ import { default as default136 } from "./modules/icons/components/IconRecordStop.js";
136
+ import { default as default137 } from "./modules/icons/components/IconRecordVideo.js";
137
+ import { default as default138 } from "./modules/icons/components/IconRecord.js";
138
+ import { default as default139 } from "./modules/icons/components/IconRedo.js";
139
+ import { default as default140 } from "./modules/icons/components/IconRefresh.js";
140
+ import { default as default141 } from "./modules/icons/components/IconReset.js";
141
+ import { default as default142 } from "./modules/icons/components/IconRestart.js";
142
+ import { default as default143 } from "./modules/icons/components/IconRestore.js";
143
+ import { default as default144 } from "./modules/icons/components/IconSave.js";
144
+ import { default as default145 } from "./modules/icons/components/IconSearch.js";
145
+ import { default as default146 } from "./modules/icons/components/IconSee.js";
146
+ import { default as default147 } from "./modules/icons/components/IconSend.js";
147
+ import { default as default148 } from "./modules/icons/components/IconSetBackground.js";
148
+ import { default as default149 } from "./modules/icons/components/IconSettings.js";
149
+ import { default as default150 } from "./modules/icons/components/IconShare.js";
150
+ import { default as default151 } from "./modules/icons/components/IconSignature.js";
151
+ import { default as default152 } from "./modules/icons/components/IconSmartphone.js";
152
+ import { default as default153 } from "./modules/icons/components/IconSmiley.js";
153
+ import { default as default154 } from "./modules/icons/components/IconSortAscendingLetters.js";
154
+ import { default as default155 } from "./modules/icons/components/IconSortDescendingLetters.js";
155
+ import { default as default156 } from "./modules/icons/components/IconSortDescending.js";
156
+ import { default as default157 } from "./modules/icons/components/IconSortTime.js";
157
+ import { default as default158 } from "./modules/icons/components/IconSpeechToText.js";
158
+ import { default as default159 } from "./modules/icons/components/IconSplitCells.js";
159
+ import { default as default160 } from "./modules/icons/components/IconSquareRoot.js";
160
+ import { default as default161 } from "./modules/icons/components/IconStarFull.js";
161
+ import { default as default162 } from "./modules/icons/components/IconStar.js";
162
+ import { default as default163 } from "./modules/icons/components/IconSubmission.js";
163
+ import { default as default164 } from "./modules/icons/components/IconSubmitToValidate.js";
164
+ import { default as default165 } from "./modules/icons/components/IconSubscript.js";
165
+ import { default as default166 } from "./modules/icons/components/IconSuccessFill.js";
166
+ import { default as default167 } from "./modules/icons/components/IconSuccessOutline.js";
167
+ import { default as default168 } from "./modules/icons/components/IconSuperscript.js";
168
+ import { default as default169 } from "./modules/icons/components/IconTable.js";
169
+ import { default as default170 } from "./modules/icons/components/IconTeacher.js";
170
+ import { default as default171 } from "./modules/icons/components/IconTextBold.js";
171
+ import { default as default172 } from "./modules/icons/components/IconTextColor.js";
172
+ import { default as default173 } from "./modules/icons/components/IconTextHighlight.js";
173
+ import { default as default174 } from "./modules/icons/components/IconTextItalic.js";
174
+ import { default as default175 } from "./modules/icons/components/IconTextPage.js";
175
+ import { default as default176 } from "./modules/icons/components/IconTextSize.js";
176
+ import { default as default177 } from "./modules/icons/components/IconTextToSpeechOff.js";
177
+ import { default as default178 } from "./modules/icons/components/IconTextToSpeech.js";
178
+ import { default as default179 } from "./modules/icons/components/IconTextTypo.js";
179
+ import { default as default180 } from "./modules/icons/components/IconTextUnderline.js";
180
+ import { default as default181 } from "./modules/icons/components/IconTextVanilla.js";
181
+ import { default as default182 } from "./modules/icons/components/IconThumbDown.js";
182
+ import { default as default183 } from "./modules/icons/components/IconThumbUp.js";
183
+ import { default as default184 } from "./modules/icons/components/IconToolCenter.js";
184
+ import { default as default185 } from "./modules/icons/components/IconTool.js";
185
+ import { default as default186 } from "./modules/icons/components/IconTrendingUp.js";
186
+ import { default as default187 } from "./modules/icons/components/IconUndoAll.js";
187
+ import { default as default188 } from "./modules/icons/components/IconUndoSlashed.js";
188
+ import { default as default189 } from "./modules/icons/components/IconUndo.js";
189
+ import { default as default190 } from "./modules/icons/components/IconUnion.js";
190
+ import { default as default191 } from "./modules/icons/components/IconUnlink.js";
191
+ import { default as default192 } from "./modules/icons/components/IconUnlock.js";
192
+ import { default as default193 } from "./modules/icons/components/IconUnreadMail.js";
193
+ import { default as default194 } from "./modules/icons/components/IconUpload.js";
194
+ import { default as default195 } from "./modules/icons/components/IconUserSearch.js";
195
+ import { default as default196 } from "./modules/icons/components/IconUser.js";
196
+ import { default as default197 } from "./modules/icons/components/IconUsers.js";
197
+ import { default as default198 } from "./modules/icons/components/IconVideo.js";
198
+ import { default as default199 } from "./modules/icons/components/IconViewCalendar.js";
199
+ import { default as default200 } from "./modules/icons/components/IconViewList.js";
200
+ import { default as default201 } from "./modules/icons/components/IconWand.js";
201
+ import { default as default202 } from "./modules/icons/components/IconWrite.js";
202
+ import { default as default203 } from "./modules/icons/components/IconZoomIn.js";
203
+ import { default as default204 } from "./modules/icons/components/IconZoomOut.js";
203
204
  export {
204
205
  default3 as IconAdd,
205
206
  default2 as IconAddUser,
@@ -287,120 +288,121 @@ export {
287
288
  default85 as IconListOrder,
288
289
  default86 as IconLoader,
289
290
  default87 as IconLock,
290
- default88 as IconLsuArt,
291
- default89 as IconLsuCompetenceNumerique,
292
- default90 as IconLsuEmc,
293
- default91 as IconLsuFrancais,
294
- default92 as IconLsuHistoireGeo,
295
- default93 as IconLsuLangue,
296
- default94 as IconLsuLangue2,
297
- default95 as IconLsuMath,
298
- default96 as IconLsuParcoursEducatif,
299
- default97 as IconLsuSport,
300
- default98 as IconLsuSvt,
301
- default100 as IconMail,
302
- default99 as IconMailRecall,
303
- default101 as IconMegaphone,
304
- default102 as IconMergeCells,
305
- default103 as IconMessageInfo,
306
- default105 as IconMic,
307
- default104 as IconMicOff,
308
- default106 as IconMinus,
309
- default107 as IconMove,
310
- default108 as IconNoColors,
311
- default109 as IconNotes,
312
- default110 as IconNotification,
313
- default111 as IconOptions,
314
- default112 as IconOrderedList,
315
- default113 as IconPaperclip,
316
- default114 as IconParcoursCitoyen,
317
- default115 as IconParcoursSecours,
318
- default116 as IconPause,
319
- default117 as IconPinOff,
320
- default118 as IconPinOn,
321
- default119 as IconPlaceholder,
322
- default121 as IconPlay,
323
- default120 as IconPlayFilled,
324
- default122 as IconPlus,
325
- default123 as IconPointerDefault,
326
- default124 as IconPointerHand,
327
- default125 as IconPrint,
328
- default127 as IconQuestion,
329
- default126 as IconQuestionMark,
330
- default128 as IconRafterDown,
331
- default129 as IconRafterLeft,
332
- default130 as IconRafterRight,
333
- default131 as IconRafterUp,
334
- default132 as IconReaction,
335
- default133 as IconReadMail,
336
- default137 as IconRecord,
337
- default134 as IconRecordPause,
338
- default135 as IconRecordStop,
339
- default136 as IconRecordVideo,
340
- default138 as IconRedo,
341
- default139 as IconRefresh,
342
- default140 as IconReset,
343
- default141 as IconRestart,
344
- default142 as IconRestore,
345
- default143 as IconSave,
346
- default144 as IconSearch,
347
- default145 as IconSee,
348
- default146 as IconSend,
349
- default147 as IconSetBackground,
350
- default148 as IconSettings,
351
- default149 as IconShare,
352
- default150 as IconSignature,
353
- default151 as IconSmartphone,
354
- default152 as IconSmiley,
355
- default153 as IconSortAscendingLetters,
356
- default155 as IconSortDescending,
357
- default154 as IconSortDescendingLetters,
358
- default156 as IconSortTime,
359
- default157 as IconSpeechToText,
360
- default158 as IconSplitCells,
361
- default159 as IconSquareRoot,
362
- default161 as IconStar,
363
- default160 as IconStarFull,
364
- default162 as IconSubmission,
365
- default163 as IconSubmitToValidate,
366
- default164 as IconSubscript,
367
- default165 as IconSuccessFill,
368
- default166 as IconSuccessOutline,
369
- default167 as IconSuperscript,
370
- default168 as IconTable,
371
- default169 as IconTeacher,
372
- default170 as IconTextBold,
373
- default171 as IconTextColor,
374
- default172 as IconTextHighlight,
375
- default173 as IconTextItalic,
376
- default174 as IconTextPage,
377
- default175 as IconTextSize,
378
- default177 as IconTextToSpeech,
379
- default176 as IconTextToSpeechOff,
380
- default178 as IconTextTypo,
381
- default179 as IconTextUnderline,
382
- default180 as IconTextVanilla,
383
- default181 as IconThumbDown,
384
- default182 as IconThumbUp,
385
- default184 as IconTool,
386
- default183 as IconToolCenter,
387
- default185 as IconTrendingUp,
388
- default188 as IconUndo,
389
- default186 as IconUndoAll,
390
- default187 as IconUndoSlashed,
391
- default189 as IconUnion,
392
- default190 as IconUnlink,
393
- default191 as IconUnlock,
394
- default192 as IconUnreadMail,
395
- default193 as IconUpload,
396
- default195 as IconUser,
397
- default194 as IconUserSearch,
398
- default196 as IconUsers,
399
- default197 as IconVideo,
400
- default198 as IconViewCalendar,
401
- default199 as IconViewList,
402
- default200 as IconWand,
403
- default201 as IconWrite,
404
- default202 as IconZoomIn,
405
- default203 as IconZoomOut
291
+ default88 as IconLogout,
292
+ default89 as IconLsuArt,
293
+ default90 as IconLsuCompetenceNumerique,
294
+ default91 as IconLsuEmc,
295
+ default92 as IconLsuFrancais,
296
+ default93 as IconLsuHistoireGeo,
297
+ default94 as IconLsuLangue,
298
+ default95 as IconLsuLangue2,
299
+ default96 as IconLsuMath,
300
+ default97 as IconLsuParcoursEducatif,
301
+ default98 as IconLsuSport,
302
+ default99 as IconLsuSvt,
303
+ default101 as IconMail,
304
+ default100 as IconMailRecall,
305
+ default102 as IconMegaphone,
306
+ default103 as IconMergeCells,
307
+ default104 as IconMessageInfo,
308
+ default106 as IconMic,
309
+ default105 as IconMicOff,
310
+ default107 as IconMinus,
311
+ default108 as IconMove,
312
+ default109 as IconNoColors,
313
+ default110 as IconNotes,
314
+ default111 as IconNotification,
315
+ default112 as IconOptions,
316
+ default113 as IconOrderedList,
317
+ default114 as IconPaperclip,
318
+ default115 as IconParcoursCitoyen,
319
+ default116 as IconParcoursSecours,
320
+ default117 as IconPause,
321
+ default118 as IconPinOff,
322
+ default119 as IconPinOn,
323
+ default120 as IconPlaceholder,
324
+ default122 as IconPlay,
325
+ default121 as IconPlayFilled,
326
+ default123 as IconPlus,
327
+ default124 as IconPointerDefault,
328
+ default125 as IconPointerHand,
329
+ default126 as IconPrint,
330
+ default128 as IconQuestion,
331
+ default127 as IconQuestionMark,
332
+ default129 as IconRafterDown,
333
+ default130 as IconRafterLeft,
334
+ default131 as IconRafterRight,
335
+ default132 as IconRafterUp,
336
+ default133 as IconReaction,
337
+ default134 as IconReadMail,
338
+ default138 as IconRecord,
339
+ default135 as IconRecordPause,
340
+ default136 as IconRecordStop,
341
+ default137 as IconRecordVideo,
342
+ default139 as IconRedo,
343
+ default140 as IconRefresh,
344
+ default141 as IconReset,
345
+ default142 as IconRestart,
346
+ default143 as IconRestore,
347
+ default144 as IconSave,
348
+ default145 as IconSearch,
349
+ default146 as IconSee,
350
+ default147 as IconSend,
351
+ default148 as IconSetBackground,
352
+ default149 as IconSettings,
353
+ default150 as IconShare,
354
+ default151 as IconSignature,
355
+ default152 as IconSmartphone,
356
+ default153 as IconSmiley,
357
+ default154 as IconSortAscendingLetters,
358
+ default156 as IconSortDescending,
359
+ default155 as IconSortDescendingLetters,
360
+ default157 as IconSortTime,
361
+ default158 as IconSpeechToText,
362
+ default159 as IconSplitCells,
363
+ default160 as IconSquareRoot,
364
+ default162 as IconStar,
365
+ default161 as IconStarFull,
366
+ default163 as IconSubmission,
367
+ default164 as IconSubmitToValidate,
368
+ default165 as IconSubscript,
369
+ default166 as IconSuccessFill,
370
+ default167 as IconSuccessOutline,
371
+ default168 as IconSuperscript,
372
+ default169 as IconTable,
373
+ default170 as IconTeacher,
374
+ default171 as IconTextBold,
375
+ default172 as IconTextColor,
376
+ default173 as IconTextHighlight,
377
+ default174 as IconTextItalic,
378
+ default175 as IconTextPage,
379
+ default176 as IconTextSize,
380
+ default178 as IconTextToSpeech,
381
+ default177 as IconTextToSpeechOff,
382
+ default179 as IconTextTypo,
383
+ default180 as IconTextUnderline,
384
+ default181 as IconTextVanilla,
385
+ default182 as IconThumbDown,
386
+ default183 as IconThumbUp,
387
+ default185 as IconTool,
388
+ default184 as IconToolCenter,
389
+ default186 as IconTrendingUp,
390
+ default189 as IconUndo,
391
+ default187 as IconUndoAll,
392
+ default188 as IconUndoSlashed,
393
+ default190 as IconUnion,
394
+ default191 as IconUnlink,
395
+ default192 as IconUnlock,
396
+ default193 as IconUnreadMail,
397
+ default194 as IconUpload,
398
+ default196 as IconUser,
399
+ default195 as IconUserSearch,
400
+ default197 as IconUsers,
401
+ default198 as IconVideo,
402
+ default199 as IconViewCalendar,
403
+ default200 as IconViewList,
404
+ default201 as IconWand,
405
+ default202 as IconWrite,
406
+ default203 as IconZoomIn,
407
+ default204 as IconZoomOut
406
408
  };
@@ -22,11 +22,11 @@ const Communities = ({
22
22
  height: 80
23
23
  } }),
24
24
  /* @__PURE__ */ jsx("div", { className: "communities-empty-content", children: canCreateCommunity ? /* @__PURE__ */ jsxs(Fragment, { children: [
25
- /* @__PURE__ */ jsx("p", { className: "communities-empty-title", children: t("homepage.communities.subtitle.teacher", "Réunissez vos élèves avec Communautés !") }),
26
- /* @__PURE__ */ jsx("p", { className: "communities-empty-description", children: t("homepage.communities.description.teacher", "Centralisez et organisez les documents et les ressources pour vos groupes d'élèves.") })
25
+ /* @__PURE__ */ jsx("p", { className: "communities-empty-title", children: t("homepage.communities.subtitle.teacher") }),
26
+ /* @__PURE__ */ jsx("p", { className: "communities-empty-description", children: t("homepage.communities.description.teacher") })
27
27
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
28
- /* @__PURE__ */ jsx("p", { className: "communities-empty-title", children: t("homepage.communities.subtitle.student", "Retrouvez toutes vos communautés ici ! ") }),
29
- /* @__PURE__ */ jsx("p", { className: "communities-empty-description", children: t("homepage.communities.description.student", `Consultez l'onglet "Nouveaux partages" pour découvrir si vous avez été ajouté à une nouvelle communauté.`) })
28
+ /* @__PURE__ */ jsx("p", { className: "communities-empty-title", children: t("homepage.communities.subtitle.student") }),
29
+ /* @__PURE__ */ jsx("p", { className: "communities-empty-description", children: t("homepage.communities.description.student") })
30
30
  ] }) })
31
31
  ] }) }) })
32
32
  ] });
@@ -0,0 +1,13 @@
1
+ import { PopoverProps } from '../../../../components';
2
+ export interface AccountActionListPopoverProps extends Omit<PopoverProps, 'children'> {
3
+ /**
4
+ * Callback appended to the logout URL (from the theme configuration)
5
+ */
6
+ logoutCallback?: string;
7
+ }
8
+ /**
9
+ * "Mon compte" popover of the Header v2: a white box listing the account
10
+ * actions (my account, customize, logout).
11
+ */
12
+ export declare const AccountActionListPopover: import('react').ForwardRefExoticComponent<AccountActionListPopoverProps & import('react').RefAttributes<HTMLDivElement>>;
13
+ export default AccountActionListPopover;
@@ -0,0 +1,26 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import clsx from "clsx";
4
+ import { useTranslation } from "react-i18next";
5
+ import SvgIconLogout from "../../../icons/components/IconLogout.js";
6
+ import SvgIconSetBackground from "../../../icons/components/IconSetBackground.js";
7
+ import SvgIconUser from "../../../icons/components/IconUser.js";
8
+ import { ActionItem } from "./ActionItem.js";
9
+ import { Popover, PopoverBody } from "../../../../components/Popover/Popover.js";
10
+ const AccountActionListPopover = /* @__PURE__ */ forwardRef(({
11
+ className,
12
+ logoutCallback,
13
+ ...restProps
14
+ }, ref) => {
15
+ const {
16
+ t
17
+ } = useTranslation();
18
+ return /* @__PURE__ */ jsx(Popover, { ref, className: clsx("account-action-list-popover", className), ...restProps, children: /* @__PURE__ */ jsx(PopoverBody, { children: /* @__PURE__ */ jsxs("ul", { className: "account-action-list-popover__list", children: [
19
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(ActionItem, { href: "/userbook/mon-compte", icon: /* @__PURE__ */ jsx(SvgIconUser, {}), "data-testid": "header-my-account-button", children: t("navbar.myaccount") }) }),
20
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(ActionItem, { href: "/timeline/customize?callback=" + encodeURIComponent(`${window.location.pathname}${window.location.search}`), icon: /* @__PURE__ */ jsx(SvgIconSetBackground, {}), "data-testid": "header-customize-button", children: t("navbar.customize") }) }),
21
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(ActionItem, { href: "/auth/logout?callback=" + (logoutCallback ?? ""), icon: /* @__PURE__ */ jsx(SvgIconLogout, {}), variant: "destructive", "data-testid": "header-logout-button", children: t("navbar.disconnect") }) })
22
+ ] }) }) });
23
+ });
24
+ export {
25
+ AccountActionListPopover
26
+ };
@@ -0,0 +1,38 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ /**
3
+ * Action row (icon + label), used in the Header v2 account popover.
4
+ * Rendered as a link when `href` is set (navigation), otherwise as a button
5
+ * (e.g. opening a modal or triggering an in-page action).
6
+ *
7
+ * Context-free on purpose (no Dropdown context, no `.dropdown-item` styles):
8
+ * it is meant to be reused as the item primitive when the Dropdown component
9
+ * is redesigned (see ENABLING-882). The ref is forwarded to the underlying
10
+ * element so a parent menu can manage focus.
11
+ */
12
+ interface ActionItemBaseProps {
13
+ /**
14
+ * Icon displayed before the label (hidden from assistive technologies)
15
+ */
16
+ icon?: ReactNode;
17
+ /**
18
+ * Label
19
+ */
20
+ children: ReactNode;
21
+ /**
22
+ * `destructive` for destructive actions (e.g. logout)
23
+ */
24
+ variant?: 'default' | 'destructive';
25
+ className?: string;
26
+ }
27
+ type ActionItemLinkProps = ActionItemBaseProps & Omit<ComponentPropsWithoutRef<'a'>, keyof ActionItemBaseProps> & {
28
+ /**
29
+ * Link target: renders the item as a link
30
+ */
31
+ href: string;
32
+ };
33
+ type ActionItemButtonProps = ActionItemBaseProps & Omit<ComponentPropsWithoutRef<'button'>, keyof ActionItemBaseProps> & {
34
+ href?: never;
35
+ };
36
+ export type ActionItemProps = ActionItemLinkProps | ActionItemButtonProps;
37
+ export declare const ActionItem: import('react').ForwardRefExoticComponent<ActionItemProps & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
38
+ export default ActionItem;
@@ -0,0 +1,34 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import clsx from "clsx";
4
+ const isLinkProps = (props) => props.href !== void 0, getClasses = (variant, className) => clsx("action-item", {
5
+ "action-item--destructive": variant === "destructive"
6
+ }, className), ActionItemContent = ({
7
+ icon,
8
+ children
9
+ }) => /* @__PURE__ */ jsxs(Fragment, { children: [
10
+ icon && /* @__PURE__ */ jsx("span", { className: "action-item__icon", "aria-hidden": "true", children: icon }),
11
+ /* @__PURE__ */ jsx("span", { className: "action-item__label", children })
12
+ ] }), ActionItem = /* @__PURE__ */ forwardRef((props, ref) => {
13
+ if (isLinkProps(props)) {
14
+ const {
15
+ icon: icon2,
16
+ children: children2,
17
+ variant: variant2 = "default",
18
+ className: className2,
19
+ ...rest2
20
+ } = props;
21
+ return /* @__PURE__ */ jsx("a", { ref, className: getClasses(variant2, className2), ...rest2, children: /* @__PURE__ */ jsx(ActionItemContent, { icon: icon2, children: children2 }) });
22
+ }
23
+ const {
24
+ icon,
25
+ children,
26
+ variant = "default",
27
+ className,
28
+ ...rest
29
+ } = props;
30
+ return /* @__PURE__ */ jsx("button", { ref, type: "button", className: getClasses(variant, className), ...rest, children: /* @__PURE__ */ jsx(ActionItemContent, { icon, children }) });
31
+ });
32
+ export {
33
+ ActionItem
34
+ };
@@ -2,13 +2,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import { useId } from "react";
5
+ import { AccountActionListPopover } from "./AccountActionListPopover.js";
6
+ import { MyAppsPopoverBody, MyAppsPopoverFooter } from "./MyAppsPopover.js";
7
+ import { useSafeHoverPopover } from "./useSafeHoverPopover.js";
5
8
  import { Navbar } from "../../../../components/Layout/components/Navbar.js";
6
9
  import { NavItem } from "../../../../components/Layout/components/NavItem.js";
7
10
  import { NavLink } from "../../../../components/Layout/components/NavLink.js";
8
11
  import useHeader from "../../../../components/Layout/hooks/useHeader.js";
9
- import SvgIconSetBackground from "../../../icons/components/IconSetBackground.js";
10
12
  import SvgIconCommunitiesBeta from "../../../icons/components/nav/IconCommunitiesBeta.js";
11
- import SvgIconDisconnect from "../../../icons/components/nav/IconDisconnect.js";
12
13
  import SvgIconHomeBeta from "../../../icons/components/nav/IconHomeBeta.js";
13
14
  import SvgIconMessagesBeta from "../../../icons/components/nav/IconMessagesBeta.js";
14
15
  import SvgIconMyAppsBeta from "../../../icons/components/nav/IconMyAppsBeta.js";
@@ -18,13 +19,13 @@ import useConversation from "../../../../hooks/useConversation/useConversation.j
18
19
  import useUser from "../../../../hooks/useUser/useUser.js";
19
20
  import useCarbonioUnread from "../../../../hooks/useCarbonioUnread/useCarbonioUnread.js";
20
21
  import { useEdificeTheme } from "../../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
21
- import useHover from "../../../../hooks/useHover/useHover.js";
22
+ import useBreakpoint from "../../../../hooks/useBreakpoint/useBreakpoint.js";
22
23
  import LogoBeta from "../../../../components/LogoBeta/LogoBeta.js";
23
24
  import Badge from "../../../../components/Badge/Badge.js";
24
25
  import VisuallyHidden from "../../../../components/VisuallyHidden/VisuallyHidden.js";
25
26
  import ButtonBeta from "../../../../components/ButtonBeta/ButtonBeta.js";
26
27
  import Avatar from "../../../../components/Avatar/Avatar.js";
27
- import { Popover, PopoverBody } from "../../../../components/Popover/Popover.js";
28
+ import { Popover, PopoverBody, PopoverFooter } from "../../../../components/Popover/Popover.js";
28
29
  const Header = ({
29
30
  src = "",
30
31
  onNotificationsClick,
@@ -44,13 +45,21 @@ const Header = ({
44
45
  userAvatar,
45
46
  userName,
46
47
  communitiesWorkflow,
47
- conversationWorflow
48
+ conversationWorflow,
49
+ bookmarkedApps
48
50
  } = useHeader({
49
51
  user,
50
52
  avatar
51
53
  }), {
52
54
  theme
53
- } = useEdificeTheme(), hasMessages = messages > 0, hasNotificationToday = useHasNotificationToday(), [userRef, isUserHovered] = useHover(), popoverUserId = useId(), handleNotificationsClick = () => {
55
+ } = useEdificeTheme(), hasMessages = messages > 0, hasNotificationToday = useHasNotificationToday(), popoverUserId = useId(), popoverAppsId = useId(), {
56
+ lg: isDesktop
57
+ } = useBreakpoint(), myApps = useSafeHoverPopover({
58
+ hoverEnabled: isDesktop,
59
+ clickEnabled: !isDesktop
60
+ }), userMenu = useSafeHoverPopover(), handleMyAppsClick = (event) => {
61
+ isDesktop || event.preventDefault();
62
+ }, handleNotificationsClick = () => {
54
63
  onNotificationsClick == null || onNotificationsClick();
55
64
  };
56
65
  return /* @__PURE__ */ jsx("header", { className: classes, "data-product": dataProduct, children: /* @__PURE__ */ jsxs(Navbar, { className: "px-24", children: [
@@ -73,7 +82,15 @@ const Header = ({
73
82
  }, className: "position-absolute", children: carbonioUnreadCount }),
74
83
  /* @__PURE__ */ jsx(VisuallyHidden, { children: t("conversation") })
75
84
  ] }) }),
76
- /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/welcome", translate: t("navbar.applications"), "data-testid": "header-my-apps-button", children: /* @__PURE__ */ jsx(SvgIconMyAppsBeta, {}) }) }),
85
+ /* @__PURE__ */ jsxs(NavItem, { className: "position-relative", children: [
86
+ /* @__PURE__ */ jsx(NavLink, { ref: myApps.setReference, link: "/welcome", translate: t("navbar.applications"), id: popoverAppsId, "aria-haspopup": "true", "aria-expanded": myApps.open, "data-testid": "header-my-apps-button", ...myApps.getReferenceProps({
87
+ onClick: handleMyAppsClick
88
+ }), children: /* @__PURE__ */ jsx(SvgIconMyAppsBeta, {}) }),
89
+ /* @__PURE__ */ jsxs(Popover, { ref: myApps.setFloating, className: "my-apps-popover", id: popoverAppsId, isVisible: myApps.open, ...myApps.getFloatingProps(), children: [
90
+ /* @__PURE__ */ jsx(PopoverBody, { children: /* @__PURE__ */ jsx(MyAppsPopoverBody, { bookmarkedApps }) }),
91
+ /* @__PURE__ */ jsx(PopoverFooter, { className: "d-flex justify-content-center", children: /* @__PURE__ */ jsx(MyAppsPopoverFooter, {}) })
92
+ ] })
93
+ ] }),
77
94
  /* @__PURE__ */ jsxs(NavItem, { className: "position-relative", children: [
78
95
  /* @__PURE__ */ jsx(ButtonBeta, { leftIcon: /* @__PURE__ */ jsx(SvgIconNotificationBeta, {}), variant: "ghost", onClick: handleNotificationsClick }),
79
96
  hasNotificationToday && /* @__PURE__ */ jsx("span", { style: {
@@ -88,22 +105,11 @@ const Header = ({
88
105
  pointerEvents: "none",
89
106
  zIndex: 1,
90
107
  display: "block"
91
- }, "aria-label": t("homepage.notifications.new-badge", {
92
- defaultValue: "Nouvelle notification"
93
- }) })
108
+ }, "aria-label": t("homepage.notifications.new-badge") })
94
109
  ] }),
95
- /* @__PURE__ */ jsxs(NavItem, { className: "position-relative", ref: userRef, id: popoverUserId, "aria-haspopup": "true", "aria-expanded": isUserHovered, "data-testid": "header-user-menu-button", children: [
96
- /* @__PURE__ */ jsx(NavLink, { link: "/userbook/mon-compte", translate: t("navbar.myaccount"), "data-testid": "header-user-profile-button", children: /* @__PURE__ */ jsx(Avatar, { alt: userName, size: "sm", src: userAvatar, variant: "circle", className: "bg-white", width: "32", height: "32" }) }),
97
- /* @__PURE__ */ jsx(Popover, { align: "end", className: "widget", id: popoverUserId, isVisible: isUserHovered, children: /* @__PURE__ */ jsxs(PopoverBody, { children: [
98
- /* @__PURE__ */ jsxs("a", { href: "/timeline/customize?callback=" + encodeURIComponent(`${window.location.pathname}${window.location.search}`), className: "nav-link customize d-flex align-items-center gap-8", "data-testid": "header-customize-button", children: [
99
- /* @__PURE__ */ jsx(SvgIconSetBackground, { className: "icon" }),
100
- /* @__PURE__ */ jsx("span", { id: "cutomize-label", className: "nav-text", children: t("navbar.customize") })
101
- ] }),
102
- /* @__PURE__ */ jsxs("a", { href: "/auth/logout?callback=" + ((theme == null ? void 0 : theme.logoutCallback) ?? ""), className: "nav-link logout d-flex align-items-center gap-8", "data-testid": "header-logout-button", children: [
103
- /* @__PURE__ */ jsx(SvgIconDisconnect, { className: "icon logout" }),
104
- /* @__PURE__ */ jsx("span", { id: "logout-label", className: "nav-text", children: t("navbar.disconnect") })
105
- ] })
106
- ] }) })
110
+ /* @__PURE__ */ jsxs(NavItem, { className: "position-relative", children: [
111
+ /* @__PURE__ */ jsx(NavLink, { ref: userMenu.setReference, link: "/userbook/mon-compte", translate: t("navbar.myaccount"), id: popoverUserId, "aria-haspopup": "true", "aria-expanded": userMenu.open, "data-testid": "header-user-profile-button", ...userMenu.getReferenceProps(), children: /* @__PURE__ */ jsx(Avatar, { alt: userName, size: "sm", src: userAvatar, variant: "circle", className: "bg-white", width: "32", height: "32" }) }),
112
+ /* @__PURE__ */ jsx(AccountActionListPopover, { ref: userMenu.setFloating, align: "end", id: popoverUserId, isVisible: userMenu.open, logoutCallback: theme == null ? void 0 : theme.logoutCallback, ...userMenu.getFloatingProps() })
107
113
  ] })
108
114
  ] })
109
115
  ] }) });
@@ -0,0 +1,5 @@
1
+ import { IWebApp } from '@edifice.io/client';
2
+ export declare const MyAppsPopoverFooter: () => import("react/jsx-runtime").JSX.Element;
3
+ export declare const MyAppsPopoverBody: ({ bookmarkedApps, }: {
4
+ bookmarkedApps: IWebApp[] | undefined;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useTranslation } from "react-i18next";
3
+ import illuEmptyFavorite from "@edifice.io/bootstrap/dist/images/homepage/illu-empty-favorite.svg";
4
+ import Flex from "../../../../components/Flex/Flex.js";
5
+ import AppIcon from "../../../../components/AppIcon/AppIcon.js";
6
+ const MAX_VISIBLE_APPS = 10, appToOpenOnBlank = ["Administration"], MyAppsPopoverFooter = () => {
7
+ const {
8
+ t
9
+ } = useTranslation();
10
+ return /* @__PURE__ */ jsx("a", { href: "/welcome", className: "btn-beta btn-beta-tertiary btn-beta--ghost btn-beta--small", "data-testid": "header-my-apps-popover-more", children: /* @__PURE__ */ jsx("span", { children: t("homepage.header.myapps.seeMore") }) });
11
+ }, MyAppsPopoverBody = ({
12
+ bookmarkedApps
13
+ }) => {
14
+ const {
15
+ t
16
+ } = useTranslation(), getAppName = (app) => app.prefix && app.prefix.length > 1 ? t(app.prefix.substring(1)) : t(app.displayName) || "";
17
+ return bookmarkedApps != null && bookmarkedApps.length ? /* @__PURE__ */ jsx("div", { className: "my-apps-popover-grid", "data-testid": "header-my-apps-popover", children: bookmarkedApps.slice(0, MAX_VISIBLE_APPS).map((app, index) => {
18
+ const opensInNewTab = appToOpenOnBlank.includes(app.name) || app.isExternal || app.target === "_blank", appName = getAppName(app);
19
+ return /* @__PURE__ */ jsx("a", { href: app.address, title: appName, "aria-label": appName, className: "my-apps-popover-item", "data-testid": "header-my-apps-popover-item", target: opensInNewTab ? "_blank" : void 0, rel: opensInNewTab ? "noopener noreferrer" : void 0, children: /* @__PURE__ */ jsx(AppIcon, { app, size: "32" }) }, index);
20
+ }) }) : /* @__PURE__ */ jsxs(Flex, { direction: "column", align: "center", gap: "8", children: [
21
+ /* @__PURE__ */ jsx("img", { src: illuEmptyFavorite, alt: "", width: 50, height: 50 }),
22
+ /* @__PURE__ */ jsx("span", { className: "my-apps-popover-empty-text text-center", children: t("homepage.header.myapps.empty") })
23
+ ] });
24
+ };
25
+ export {
26
+ MyAppsPopoverBody,
27
+ MyAppsPopoverFooter
28
+ };
@@ -0,0 +1,32 @@
1
+ import { useState } from "react";
2
+ import { useFloating, useHover, safePolygon, useClick, useDismiss, useFocus, useInteractions } from "@floating-ui/react";
3
+ function useSafeHoverPopover({
4
+ hoverEnabled = !0,
5
+ clickEnabled = !1
6
+ } = {}) {
7
+ const [open, setOpen] = useState(!1), {
8
+ refs,
9
+ context
10
+ } = useFloating({
11
+ open,
12
+ onOpenChange: setOpen
13
+ }), hover = useHover(context, {
14
+ enabled: hoverEnabled,
15
+ handleClose: safePolygon()
16
+ }), click = useClick(context, {
17
+ enabled: clickEnabled
18
+ }), dismiss = useDismiss(context), focus = useFocus(context), {
19
+ getReferenceProps,
20
+ getFloatingProps
21
+ } = useInteractions([hover, click, dismiss, focus]);
22
+ return {
23
+ open,
24
+ setReference: refs.setReference,
25
+ setFloating: refs.setFloating,
26
+ getReferenceProps,
27
+ getFloatingProps
28
+ };
29
+ }
30
+ export {
31
+ useSafeHoverPopover
32
+ };
@@ -47,7 +47,7 @@ const MessageFlash = ({
47
47
  }), title: t("close.message", {
48
48
  title: message.title
49
49
  }) }),
50
- /* @__PURE__ */ jsx("div", { className: "message-flash-icon", role: "img", "aria-label": message.color === "red" ? t("warning") : t("information"), children: message.color && message.color === "red" ? /* @__PURE__ */ jsx(SvgIconAlertTriangle, {}) : /* @__PURE__ */ jsx(SvgIconInfoCircle, {}) }),
50
+ /* @__PURE__ */ jsx("div", { className: "message-flash-icon", role: "img", "aria-label": message.color === "red" ? t("homepage.messageFlash.warning") : t("homepage.messageFlash.information"), children: message.color && message.color === "red" ? /* @__PURE__ */ jsx(SvgIconAlertTriangle, {}) : /* @__PURE__ */ jsx(SvgIconInfoCircle, {}) }),
51
51
  /* @__PURE__ */ jsxs(Flex, { direction: "column", className: "w-100 message-flash-body", children: [
52
52
  /* @__PURE__ */ jsx(Card.Title, { children: message.title }),
53
53
  /* @__PURE__ */ jsx("div", { ref: contentRef, className: classesContent, dangerouslySetInnerHTML: {
@@ -16,11 +16,7 @@ const NotificationFilterMenu = ({
16
16
  onFilterChange(types), setIsOpen(!1);
17
17
  };
18
18
  return /* @__PURE__ */ jsxs(Fragment, { children: [
19
- /* @__PURE__ */ jsx(ButtonBeta, { type: "button", color: "secondary", variant: "outline", size: "md", leftIcon: /* @__PURE__ */ jsx(SvgIconFilter, {}), rightIcon: /* @__PURE__ */ jsx(SvgIconRafterDown, {}), "aria-label": t("homepage.notifications.filter-modal.trigger", {
20
- defaultValue: "Filtrer les notifications"
21
- }), title: t("homepage.notifications.filter-modal.trigger", {
22
- defaultValue: "Filtrer les notifications"
23
- }), onClick: () => setIsOpen(!0), "data-testid": "notification-filter-button" }),
19
+ /* @__PURE__ */ jsx(ButtonBeta, { type: "button", color: "secondary", variant: "outline", size: "md", leftIcon: /* @__PURE__ */ jsx(SvgIconFilter, {}), rightIcon: /* @__PURE__ */ jsx(SvgIconRafterDown, {}), "aria-label": t("homepage.notifications.filter-modal.trigger"), title: t("homepage.notifications.filter-modal.trigger"), onClick: () => setIsOpen(!0), "data-testid": "notification-filter-button" }),
24
20
  isOpen && /* @__PURE__ */ jsx(NotificationFilterModal, { isOpen, allTypes: notificationTypes, appliedTypes: selectedTypes, onCancel: () => setIsOpen(!1), onApply: handleApply })
25
21
  ] });
26
22
  };
@@ -20,16 +20,10 @@ const NotificationOptionsMenu = ({
20
20
  } = useDeleteNotification(), [isReportModalOpen, setIsReportModalOpen] = useState(!1);
21
21
  return /* @__PURE__ */ jsxs(Fragment, { children: [
22
22
  /* @__PURE__ */ jsx(Dropdown, { overflow: !1, children: (triggerProps) => /* @__PURE__ */ jsxs(Fragment, { children: [
23
- /* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", "aria-label": t("homepage.notifications.options.label", {
24
- defaultValue: "Options de la notification"
25
- }), color: "tertiary", variant: "ghost", icon: /* @__PURE__ */ jsx(SvgIconOptions, {}), "data-testid": "notification-item-options-button" }),
23
+ /* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", "aria-label": t("homepage.notifications.options.label"), color: "tertiary", variant: "ghost", icon: /* @__PURE__ */ jsx(SvgIconOptions, {}), "data-testid": "notification-item-options-button" }),
26
24
  /* @__PURE__ */ jsxs(Dropdown.Menu, { children: [
27
- /* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconAlertTriangle, {}), onClick: () => setIsReportModalOpen(!0), children: t("homepage.notifications.options.report", {
28
- defaultValue: "Signaler"
29
- }) }),
30
- /* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconDelete, {}), onClick: () => deleteNotification(notificationId), children: t("homepage.notifications.options.delete", {
31
- defaultValue: "Supprimer"
32
- }) })
25
+ /* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconAlertTriangle, {}), onClick: () => setIsReportModalOpen(!0), children: t("homepage.notifications.options.report") }),
26
+ /* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconDelete, {}), onClick: () => deleteNotification(notificationId), children: t("homepage.notifications.options.delete") })
33
27
  ] })
34
28
  ] }) }),
35
29
  isReportModalOpen && /* @__PURE__ */ jsx(ReportNotificationModal, { isOpen: isReportModalOpen, onCancel: () => setIsReportModalOpen(!1), onConfirm: () => {
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconLogout: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconLogout;
@@ -0,0 +1,13 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconLogout = ({
3
+ title,
4
+ titleId,
5
+ ...props
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 22 22", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
+ title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M11.917.917a.916.916 0 0 1 0 1.833H5.042a.46.46 0 0 0-.459.458v15.584c0 .253.206.458.459.458h6.875a.917.917 0 0 1 0 1.833H5.042a2.29 2.29 0 0 1-2.292-2.291V3.208A2.29 2.29 0 0 1 5.042.917zm3.018 5.769a.916.916 0 0 1 1.296 0l3.667 3.666a.917.917 0 0 1 0 1.296l-3.667 3.667a.916.916 0 1 1-1.296-1.296L17.956 11l-3.02-3.019a.916.916 0 0 1 0-1.295" }),
9
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M7.333 11c0-.506.41-.917.917-.917h11a.917.917 0 1 1 0 1.834h-11A.917.917 0 0 1 7.333 11", clipRule: "evenodd" })
10
+ ] });
11
+ export {
12
+ SvgIconLogout as default
13
+ };
@@ -84,6 +84,7 @@ export { default as IconLink } from './IconLink';
84
84
  export { default as IconListOrder } from './IconListOrder';
85
85
  export { default as IconLoader } from './IconLoader';
86
86
  export { default as IconLock } from './IconLock';
87
+ export { default as IconLogout } from './IconLogout';
87
88
  export { default as IconLsuArt } from './IconLsuArt';
88
89
  export { default as IconLsuCompetenceNumerique } from './IconLsuCompetenceNumerique';
89
90
  export { default as IconLsuEmc } from './IconLsuEmc';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.6.11",
3
+ "version": "2.6.12",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -140,9 +140,9 @@
140
140
  "swiper": "10.1.0",
141
141
  "ua-parser-js": "1.0.36",
142
142
  "zustand": "4.5.7",
143
- "@edifice.io/tiptap-extensions": "2.6.11",
144
- "@edifice.io/utilities": "2.6.11",
145
- "@edifice.io/bootstrap": "2.6.11"
143
+ "@edifice.io/bootstrap": "2.6.12",
144
+ "@edifice.io/tiptap-extensions": "2.6.12",
145
+ "@edifice.io/utilities": "2.6.12"
146
146
  },
147
147
  "devDependencies": {
148
148
  "@babel/plugin-transform-react-pure-annotations": "7.27.1",
@@ -169,12 +169,13 @@
169
169
  "react-i18next": "14.1.3",
170
170
  "rollup-plugin-pure": "0.4.0",
171
171
  "rollup-plugin-visualizer": "5.12.0",
172
+ "typescript": "5.9.3",
172
173
  "typescript-eslint": "8.54.0",
173
174
  "vite": "5.4.14",
174
175
  "vite-plugin-dts": "4.5.4",
175
176
  "vite-tsconfig-paths": "5.1.4",
176
- "@edifice.io/client": "2.6.11",
177
- "@edifice.io/config": "2.6.11"
177
+ "@edifice.io/client": "2.6.12",
178
+ "@edifice.io/config": "2.6.12"
178
179
  },
179
180
  "peerDependencies": {
180
181
  "@react-spring/web": "9.7.5",