@edifice.io/react 2.6.10-develop-b2school.20261023141442 → 2.6.10-develop-pedago.20261023145636

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.
Files changed (179) hide show
  1. package/dist/components/Checkbox/Checkbox.js +1 -1
  2. package/dist/components/Layout/Layout.js +4 -12
  3. package/dist/components/Layout/components/Header.js +4 -4
  4. package/dist/components/Layout/components/NavLink.d.ts +3 -3
  5. package/dist/components/Layout/components/NavLink.js +3 -5
  6. package/dist/editor.js +2 -0
  7. package/dist/homepage.js +24 -74
  8. package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +6 -2
  9. package/dist/hooks/useZendeskGuide/useZendeskGuide.js +8 -11
  10. package/dist/icons.js +402 -406
  11. package/dist/modules/HelpZone/HelpZone.js +8 -6
  12. package/dist/modules/HelpZone/HelpZoneContainer.js +5 -2
  13. package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js +110 -91
  14. package/dist/modules/editor/components/BubbleMenuEditInformationPane/BubbleMenuEditInformationPane.js +123 -96
  15. package/dist/modules/editor/components/Editor/Editor.d.ts +0 -5
  16. package/dist/modules/editor/components/Editor/Editor.js +0 -3
  17. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js +5 -8
  18. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js +5 -8
  19. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +7 -3
  20. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +3 -2
  21. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +6 -4
  22. package/dist/modules/editor/components/Toolbar/FloatingMenuOptions.d.ts +29 -0
  23. package/dist/modules/editor/components/Toolbar/FloatingMenuOptions.js +22 -0
  24. package/dist/modules/editor/components/Toolbar/LinkToolbar.d.ts +6 -3
  25. package/dist/modules/editor/components/Toolbar/LinkToolbar.js +29 -7
  26. package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js +3 -2
  27. package/dist/modules/editor/components/Toolbar/TableToolbar.js +65 -45
  28. package/dist/modules/editor/hooks/index.d.ts +1 -0
  29. package/dist/modules/editor/hooks/useCommentEditor.d.ts +1 -1
  30. package/dist/modules/editor/hooks/useCommentEditor.js +12 -4
  31. package/dist/modules/editor/hooks/useEditorState.d.ts +20 -0
  32. package/dist/modules/editor/hooks/useEditorState.js +16 -0
  33. package/dist/modules/editor/hooks/useLinkToolbar.d.ts +2 -2
  34. package/dist/modules/editor/hooks/useLinkToolbar.js +2 -1
  35. package/dist/modules/editor/hooks/useTipTapEditor.d.ts +3 -3
  36. package/dist/modules/editor/hooks/useTipTapEditor.js +81 -24
  37. package/dist/modules/homepage/components/Communities/Communities.js +4 -4
  38. package/dist/modules/homepage/components/Header/Header.js +22 -28
  39. package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +1 -5
  40. package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +1 -1
  41. package/dist/modules/homepage/components/MessageFlashList/MessageFlash.js +1 -1
  42. package/dist/modules/homepage/components/Notifications/NotificationList.js +8 -7
  43. package/dist/modules/homepage/components/Notifications/NotificationListSkeleton.js +12 -7
  44. package/dist/modules/homepage/components/Notifications/NotificationSkeleton.js +4 -7
  45. package/dist/modules/homepage/components/Notifications/components/NotificationFilterMenu.js +5 -1
  46. package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.js +12 -10
  47. package/dist/modules/homepage/components/Notifications/components/NotificationOptionsMenu.js +9 -3
  48. package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js +12 -6
  49. package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +10 -12
  50. package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.js +10 -9
  51. package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.js +1 -1
  52. package/dist/modules/homepage/{hooks → components/SchoolSpace}/useUserSchools.d.ts +2 -2
  53. package/dist/modules/homepage/{hooks → components/SchoolSpace}/useUserSchools.js +4 -4
  54. package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.js +2 -2
  55. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.js +2 -2
  56. package/dist/modules/homepage/components/UserSpace/UserSpace.d.ts +1 -3
  57. package/dist/modules/homepage/components/UserSpace/UserSpace.js +7 -13
  58. package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.d.ts +2 -4
  59. package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.js +2 -3
  60. package/dist/modules/homepage/components/index.d.ts +1 -9
  61. package/dist/modules/icons/components/index.d.ts +0 -2
  62. package/dist/modules/modals/ResourceModal/ResourceModal.js +16 -9
  63. package/dist/modules/modals/ResourceModal/apps/BlogPublic.js +9 -13
  64. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +7 -1
  65. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +2 -0
  66. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +2 -0
  67. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +2 -0
  68. package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.d.ts +4 -0
  69. package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js +2 -1
  70. package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js +3 -0
  71. package/dist/node_modules/.pnpm/@tiptap_extension-floating-menu@3.32.0_@floating-ui_dom@1.6.0_@tiptap_core@3.32.0_@tiptap_pm@3.32.0__@tiptap_pm@3.32.0/node_modules/@tiptap/extension-floating-menu/dist/index.js +159 -0
  72. package/dist/node_modules/.pnpm/@tiptap_react@3.32.0_@floating-ui_dom@1.6.0_@tiptap_core@3.32.0_@tiptap_pm@3.32.0__@tiptap_pm_6inmb43gajy4fnlwtngbwkv7um/node_modules/@tiptap/react/dist/menus/index.js +341 -0
  73. package/dist/node_modules/.pnpm/prosemirror-model@1.25.12/node_modules/prosemirror-model/dist/index.js +549 -0
  74. package/dist/node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js +489 -0
  75. package/dist/node_modules/.pnpm/prosemirror-transform@1.12.4/node_modules/prosemirror-transform/dist/index.js +659 -0
  76. package/package.json +35 -43
  77. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.d.ts +0 -2
  78. package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js +0 -8
  79. package/dist/modules/homepage/components/Agenda/Agenda.d.ts +0 -10
  80. package/dist/modules/homepage/components/Agenda/Agenda.js +0 -54
  81. package/dist/modules/homepage/components/Agenda/AgendaContainer.d.ts +0 -1
  82. package/dist/modules/homepage/components/Agenda/AgendaContainer.js +0 -14
  83. package/dist/modules/homepage/components/Agenda/AgendaEventCard.d.ts +0 -10
  84. package/dist/modules/homepage/components/Agenda/AgendaEventCard.js +0 -30
  85. package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.d.ts +0 -14
  86. package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.js +0 -27
  87. package/dist/modules/homepage/components/Agenda/index.d.ts +0 -3
  88. package/dist/modules/homepage/components/Agenda/services/api/agendaService.d.ts +0 -24
  89. package/dist/modules/homepage/components/Agenda/services/api/agendaService.js +0 -45
  90. package/dist/modules/homepage/components/Agenda/services/api/index.d.ts +0 -4
  91. package/dist/modules/homepage/components/Agenda/services/api/index.js +0 -5
  92. package/dist/modules/homepage/components/Agenda/services/queries/agenda.d.ts +0 -19
  93. package/dist/modules/homepage/components/Agenda/services/queries/agenda.js +0 -26
  94. package/dist/modules/homepage/components/BriefMe/BriefMe.d.ts +0 -9
  95. package/dist/modules/homepage/components/BriefMe/BriefMe.js +0 -59
  96. package/dist/modules/homepage/components/BriefMe/BriefMeContainer.d.ts +0 -4
  97. package/dist/modules/homepage/components/BriefMe/BriefMeContainer.js +0 -17
  98. package/dist/modules/homepage/components/BriefMe/index.d.ts +0 -4
  99. package/dist/modules/homepage/components/BriefMe/types.d.ts +0 -17
  100. package/dist/modules/homepage/components/BriefMe/types.js +0 -8
  101. package/dist/modules/homepage/components/BriefMe/useBriefMe.d.ts +0 -31
  102. package/dist/modules/homepage/components/BriefMe/useBriefMe.js +0 -51
  103. package/dist/modules/homepage/components/Cantine/Cantine.d.ts +0 -7
  104. package/dist/modules/homepage/components/Cantine/Cantine.js +0 -44
  105. package/dist/modules/homepage/components/Cantine/CantineContainer.d.ts +0 -4
  106. package/dist/modules/homepage/components/Cantine/CantineContainer.js +0 -18
  107. package/dist/modules/homepage/components/Cantine/CantineModal.d.ts +0 -24
  108. package/dist/modules/homepage/components/Cantine/CantineModal.js +0 -88
  109. package/dist/modules/homepage/components/Cantine/CantineModalContainer.d.ts +0 -7
  110. package/dist/modules/homepage/components/Cantine/CantineModalContainer.js +0 -12
  111. package/dist/modules/homepage/components/Cantine/components/CantineLegend.d.ts +0 -5
  112. package/dist/modules/homepage/components/Cantine/components/CantineLegend.js +0 -22
  113. package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.d.ts +0 -6
  114. package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.js +0 -28
  115. package/dist/modules/homepage/components/Cantine/components/cantineLabels.d.ts +0 -12
  116. package/dist/modules/homepage/components/Cantine/components/cantineLabels.js +0 -60
  117. package/dist/modules/homepage/components/Cantine/hooks/useCantine.d.ts +0 -11
  118. package/dist/modules/homepage/components/Cantine/hooks/useCantine.js +0 -20
  119. package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.d.ts +0 -24
  120. package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.js +0 -65
  121. package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.d.ts +0 -23
  122. package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.js +0 -43
  123. package/dist/modules/homepage/components/Cantine/index.d.ts +0 -7
  124. package/dist/modules/homepage/components/Cantine/types.d.ts +0 -42
  125. package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.d.ts +0 -16
  126. package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.js +0 -48
  127. package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.d.ts +0 -4
  128. package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.js +0 -12
  129. package/dist/modules/homepage/components/GenerationHdf/formatSolde.d.ts +0 -1
  130. package/dist/modules/homepage/components/GenerationHdf/formatSolde.js +0 -6
  131. package/dist/modules/homepage/components/GenerationHdf/index.d.ts +0 -3
  132. package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.d.ts +0 -10
  133. package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.js +0 -68
  134. package/dist/modules/homepage/components/Header/AccountActionListPopover.d.ts +0 -13
  135. package/dist/modules/homepage/components/Header/AccountActionListPopover.js +0 -26
  136. package/dist/modules/homepage/components/Header/ActionItem.d.ts +0 -38
  137. package/dist/modules/homepage/components/Header/ActionItem.js +0 -34
  138. package/dist/modules/homepage/components/Header/MyAppsPopover.d.ts +0 -5
  139. package/dist/modules/homepage/components/Header/MyAppsPopover.js +0 -28
  140. package/dist/modules/homepage/components/Header/useSafeHoverPopover.js +0 -32
  141. package/dist/modules/homepage/components/Qwant/Qwant.d.ts +0 -4
  142. package/dist/modules/homepage/components/Qwant/Qwant.js +0 -41
  143. package/dist/modules/homepage/components/Qwant/QwantContainer.d.ts +0 -1
  144. package/dist/modules/homepage/components/Qwant/QwantContainer.js +0 -10
  145. package/dist/modules/homepage/components/Qwant/index.d.ts +0 -3
  146. package/dist/modules/homepage/components/Rss/Rss.d.ts +0 -11
  147. package/dist/modules/homepage/components/Rss/Rss.js +0 -64
  148. package/dist/modules/homepage/components/Rss/RssContainer.d.ts +0 -1
  149. package/dist/modules/homepage/components/Rss/RssContainer.js +0 -45
  150. package/dist/modules/homepage/components/Rss/RssFeedForm.d.ts +0 -13
  151. package/dist/modules/homepage/components/Rss/RssFeedForm.js +0 -69
  152. package/dist/modules/homepage/components/Rss/RssFeedsModal.d.ts +0 -11
  153. package/dist/modules/homepage/components/Rss/RssFeedsModal.js +0 -58
  154. package/dist/modules/homepage/components/Rss/hooks/useRssContainer.d.ts +0 -25
  155. package/dist/modules/homepage/components/Rss/hooks/useRssContainer.js +0 -43
  156. package/dist/modules/homepage/components/Rss/index.d.ts +0 -6
  157. package/dist/modules/homepage/components/Rss/services/api/index.d.ts +0 -5
  158. package/dist/modules/homepage/components/Rss/services/api/index.js +0 -5
  159. package/dist/modules/homepage/components/Rss/services/api/rssService.d.ts +0 -38
  160. package/dist/modules/homepage/components/Rss/services/api/rssService.js +0 -51
  161. package/dist/modules/homepage/components/Rss/services/queries/rss.d.ts +0 -28
  162. package/dist/modules/homepage/components/Rss/services/queries/rss.js +0 -71
  163. package/dist/modules/homepage/components/Rss/types.d.ts +0 -25
  164. package/dist/modules/homepage/components/Rss/utils.d.ts +0 -7
  165. package/dist/modules/homepage/components/Rss/utils.js +0 -19
  166. package/dist/modules/homepage/components/Universalis/Universalis.d.ts +0 -8
  167. package/dist/modules/homepage/components/Universalis/Universalis.js +0 -62
  168. package/dist/modules/homepage/components/Universalis/UniversalisContainer.d.ts +0 -1
  169. package/dist/modules/homepage/components/Universalis/UniversalisContainer.js +0 -16
  170. package/dist/modules/homepage/components/Universalis/index.d.ts +0 -3
  171. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.d.ts +0 -16
  172. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js +0 -15
  173. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.d.ts +0 -21
  174. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js +0 -47
  175. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/index.d.ts +0 -2
  176. package/dist/modules/icons/components/IconAddWidget.d.ts +0 -7
  177. package/dist/modules/icons/components/IconAddWidget.js +0 -12
  178. package/dist/modules/icons/components/IconLogout.d.ts +0 -7
  179. package/dist/modules/icons/components/IconLogout.js +0 -13
@@ -9,18 +9,14 @@ import { SpeechSynthesis } from "@edifice.io/tiptap-extensions/speech-synthesis"
9
9
  import { TableCell } from "@edifice.io/tiptap-extensions/table-cell";
10
10
  import { Mathematics } from "@tiptap/extension-mathematics";
11
11
  import Color from "@tiptap/extension-color";
12
- import Focus from "@tiptap/extension-focus";
13
12
  import FontFamily from "@tiptap/extension-font-family";
14
- import Placeholder from "@tiptap/extension-placeholder";
13
+ import { TextStyleKit } from "@tiptap/extension-text-style";
14
+ import { Focus, Placeholder } from "@tiptap/extensions";
15
15
  import Subscript from "@tiptap/extension-subscript";
16
16
  import Superscript from "@tiptap/extension-superscript";
17
- import Table from "@tiptap/extension-table";
18
- import TableHeader from "@tiptap/extension-table-header";
19
- import TableRow from "@tiptap/extension-table-row";
17
+ import { TableRow, TableHeader, Table } from "@tiptap/extension-table";
20
18
  import TextAlign from "@tiptap/extension-text-align";
21
- import TextStyle from "@tiptap/extension-text-style";
22
19
  import Typography from "@tiptap/extension-typography";
23
- import Underline from "@tiptap/extension-underline";
24
20
  import { useEditor } from "@tiptap/react";
25
21
  import StarterKit from "@tiptap/starter-kit";
26
22
  import { useTranslation } from "react-i18next";
@@ -50,22 +46,81 @@ const useTipTapEditor = (editable, content, focus, placeholder, onContentChange,
50
46
  // TipTap editor must be instantiated in editable mode for table columns to be resizable.
51
47
  // It will then be set in the correct editable mode, by a useEffect below.
52
48
  editable: !0,
53
- extensions: [StarterKit, Focus.configure({
54
- className: "has-focus",
55
- mode: "all"
56
- }), Placeholder.configure({
57
- placeholder: t(placeholder || "tiptap.placeholder")
58
- }), CustomHighlight.configure({
59
- multicolor: !0
60
- }), Underline, TextStyle, Color, Subscript, Superscript, Table.configure({
61
- resizable: !0
62
- }), TableRow, TableHeader, TableCell, TextAlign.configure({
63
- types: ["heading", "paragraph", "video", "audio", "iframe"]
64
- }), CustomHeading.configure({
65
- levels: [1, 2]
66
- }), Typography, FontSize, SpeechRecognition, SpeechSynthesis.configure({
67
- lang: (currentLanguage == null ? void 0 : currentLanguage.length) === 2 ? `${currentLanguage}-${currentLanguage.toUpperCase()}` : "fr-FR"
68
- }), Hyperlink, FontFamily, Mathematics, Alert, IframeNodeView(MediaRenderer), VideoNodeView(MediaRenderer), AudioNodeView(AudioRenderer), LinkerNodeView(LinkerRenderer), ImageNodeView(MediaRenderer, uploadFile), AttachmentNodeView(AttachmentRenderer), InformationPaneNodeView(InformationPaneRenderer), ...extensions || []],
49
+ extensions: [
50
+ // v3's StarterKit bundles its own heading/link nodes, which would compete with
51
+ // CustomHeading/Hyperlink below for the same HTML tags. Disabled.
52
+ // `underline` stays enabled (default) - same as the explicit Underline
53
+ // extension it replaces, no custom one added below.
54
+ StarterKit.configure({
55
+ heading: !1,
56
+ link: !1
57
+ }),
58
+ Focus.configure({
59
+ className: "has-focus",
60
+ mode: "all"
61
+ }),
62
+ Placeholder.configure({
63
+ placeholder: t(placeholder || "tiptap.placeholder")
64
+ }),
65
+ CustomHighlight.configure({
66
+ multicolor: !0
67
+ }),
68
+ // v3's TextStyleKit bundles its own color/fontFamily/fontSize, which would
69
+ // duplicate the Color/FontFamily/FontSize added below. Disabled.
70
+ // backgroundColor/lineHeight are also disabled: they're new in v3 (v2
71
+ // stripped these inline styles), and lineHeight would otherwise collide
72
+ // with our own @edifice.io/tiptap-extensions/line-height by name for
73
+ // any caller that adds it via this hook's `extensions` param.
74
+ TextStyleKit.configure({
75
+ color: !1,
76
+ fontFamily: !1,
77
+ fontSize: !1,
78
+ backgroundColor: !1,
79
+ lineHeight: !1
80
+ }),
81
+ Color,
82
+ Subscript,
83
+ Superscript,
84
+ Table.configure({
85
+ resizable: !0
86
+ }),
87
+ TableRow,
88
+ TableHeader,
89
+ TableCell,
90
+ TextAlign.configure({
91
+ types: ["heading", "paragraph", "video", "audio", "iframe"]
92
+ }),
93
+ // The published package names this node 'customHeading' (to avoid
94
+ // colliding with v3 StarterKit's now-bundled 'heading', disabled
95
+ // above). Pinned back to 'heading' to match what's already stored for
96
+ // existing content, and what edifice-tiptap-transformer's own Heading
97
+ // model does server-side - without this, loading any stored content
98
+ // with a heading throws "Unknown node type: heading" and the editor
99
+ // falls back to an empty document.
100
+ CustomHeading.extend({
101
+ name: "heading"
102
+ }).configure({
103
+ levels: [1, 2]
104
+ }),
105
+ Typography,
106
+ FontSize,
107
+ SpeechRecognition,
108
+ SpeechSynthesis.configure({
109
+ lang: (currentLanguage == null ? void 0 : currentLanguage.length) === 2 ? `${currentLanguage}-${currentLanguage.toUpperCase()}` : "fr-FR"
110
+ }),
111
+ Hyperlink,
112
+ FontFamily,
113
+ Mathematics,
114
+ Alert,
115
+ IframeNodeView(MediaRenderer),
116
+ VideoNodeView(MediaRenderer),
117
+ AudioNodeView(AudioRenderer),
118
+ LinkerNodeView(LinkerRenderer),
119
+ ImageNodeView(MediaRenderer, uploadFile),
120
+ AttachmentNodeView(AttachmentRenderer),
121
+ InformationPaneNodeView(InformationPaneRenderer),
122
+ ...extensions || []
123
+ ],
69
124
  content,
70
125
  // If the onContentChange callback is provided, we call it on every content change.
71
126
  ...onContentChange ? {
@@ -75,7 +130,9 @@ const useTipTapEditor = (editable, content, focus, placeholder, onContentChange,
75
130
  return useEffect(() => {
76
131
  editor == null || editor.setEditable(editable, !1);
77
132
  }, [editor, editable]), useEffect(() => {
78
- editor == null || editor.commands.setContent(content);
133
+ editor == null || editor.commands.setContent(content, {
134
+ emitUpdate: !1
135
+ });
79
136
  }, [content]), useEffect(() => {
80
137
  focus && (editor == null || editor.commands.focus(focus));
81
138
  }, [editor, focus, editable]), {
@@ -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") }),
26
- /* @__PURE__ */ jsx("p", { className: "communities-empty-description", children: t("homepage.communities.description.teacher") })
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.") })
27
27
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
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") })
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é.`) })
30
30
  ] }) })
31
31
  ] }) }) })
32
32
  ] });
@@ -2,14 +2,13 @@ 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";
8
5
  import { Navbar } from "../../../../components/Layout/components/Navbar.js";
9
6
  import { NavItem } from "../../../../components/Layout/components/NavItem.js";
10
7
  import { NavLink } from "../../../../components/Layout/components/NavLink.js";
11
8
  import useHeader from "../../../../components/Layout/hooks/useHeader.js";
9
+ import SvgIconSetBackground from "../../../icons/components/IconSetBackground.js";
12
10
  import SvgIconCommunitiesBeta from "../../../icons/components/nav/IconCommunitiesBeta.js";
11
+ import SvgIconDisconnect from "../../../icons/components/nav/IconDisconnect.js";
13
12
  import SvgIconHomeBeta from "../../../icons/components/nav/IconHomeBeta.js";
14
13
  import SvgIconMessagesBeta from "../../../icons/components/nav/IconMessagesBeta.js";
15
14
  import SvgIconMyAppsBeta from "../../../icons/components/nav/IconMyAppsBeta.js";
@@ -19,13 +18,13 @@ import useConversation from "../../../../hooks/useConversation/useConversation.j
19
18
  import useUser from "../../../../hooks/useUser/useUser.js";
20
19
  import useCarbonioUnread from "../../../../hooks/useCarbonioUnread/useCarbonioUnread.js";
21
20
  import { useEdificeTheme } from "../../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
22
- import useBreakpoint from "../../../../hooks/useBreakpoint/useBreakpoint.js";
21
+ import useHover from "../../../../hooks/useHover/useHover.js";
23
22
  import LogoBeta from "../../../../components/LogoBeta/LogoBeta.js";
24
23
  import Badge from "../../../../components/Badge/Badge.js";
25
24
  import VisuallyHidden from "../../../../components/VisuallyHidden/VisuallyHidden.js";
26
25
  import ButtonBeta from "../../../../components/ButtonBeta/ButtonBeta.js";
27
26
  import Avatar from "../../../../components/Avatar/Avatar.js";
28
- import { Popover, PopoverBody, PopoverFooter } from "../../../../components/Popover/Popover.js";
27
+ import { Popover, PopoverBody } from "../../../../components/Popover/Popover.js";
29
28
  const Header = ({
30
29
  src = "",
31
30
  onNotificationsClick,
@@ -45,21 +44,13 @@ const Header = ({
45
44
  userAvatar,
46
45
  userName,
47
46
  communitiesWorkflow,
48
- conversationWorflow,
49
- bookmarkedApps
47
+ conversationWorflow
50
48
  } = useHeader({
51
49
  user,
52
50
  avatar
53
51
  }), {
54
52
  theme
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 = () => {
53
+ } = useEdificeTheme(), hasMessages = messages > 0, hasNotificationToday = useHasNotificationToday(), [userRef, isUserHovered] = useHover(), popoverUserId = useId(), handleNotificationsClick = () => {
63
54
  onNotificationsClick == null || onNotificationsClick();
64
55
  };
65
56
  return /* @__PURE__ */ jsx("header", { className: classes, "data-product": dataProduct, children: /* @__PURE__ */ jsxs(Navbar, { className: "px-24", children: [
@@ -82,15 +73,7 @@ const Header = ({
82
73
  }, className: "position-absolute", children: carbonioUnreadCount }),
83
74
  /* @__PURE__ */ jsx(VisuallyHidden, { children: t("conversation") })
84
75
  ] }) }),
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
- ] }),
76
+ /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/welcome", translate: t("navbar.applications"), "data-testid": "header-my-apps-button", children: /* @__PURE__ */ jsx(SvgIconMyAppsBeta, {}) }) }),
94
77
  /* @__PURE__ */ jsxs(NavItem, { className: "position-relative", children: [
95
78
  /* @__PURE__ */ jsx(ButtonBeta, { leftIcon: /* @__PURE__ */ jsx(SvgIconNotificationBeta, {}), variant: "ghost", onClick: handleNotificationsClick }),
96
79
  hasNotificationToday && /* @__PURE__ */ jsx("span", { style: {
@@ -105,11 +88,22 @@ const Header = ({
105
88
  pointerEvents: "none",
106
89
  zIndex: 1,
107
90
  display: "block"
108
- }, "aria-label": t("homepage.notifications.new-badge") })
91
+ }, "aria-label": t("homepage.notifications.new-badge", {
92
+ defaultValue: "Nouvelle notification"
93
+ }) })
109
94
  ] }),
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() })
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
+ ] }) })
113
107
  ] })
114
108
  ] })
115
109
  ] }) });
@@ -3,11 +3,7 @@ import { ButtonBeta } from '../../../../components';
3
3
  export interface HomeCardHeaderProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
4
4
  /** Title displayed on the left side of the header. */
5
5
  title: ReactNode;
6
- /**
7
- * Label of the action button displayed on the right side of the header.
8
- * Can be omitted for an icon-only button — pass `aria-label` via
9
- * `actionProps` in that case.
10
- */
6
+ /** Label of the action button displayed on the right side of the header. */
11
7
  actionLabel?: ReactNode;
12
8
  /** Callback invoked when the action button is clicked. */
13
9
  onActionClick?: MouseEventHandler<HTMLButtonElement>;
@@ -12,7 +12,7 @@ const HomeCardHeader = ({
12
12
  className,
13
13
  ...rest
14
14
  }) => {
15
- const hasAction = !!onActionClick && (!!actionLabel || !!actionLeftIcon || !!actionRightIcon);
15
+ const hasAction = !!actionLabel && !!onActionClick;
16
16
  return /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", gap: "8", wrap: "wrap", className: clsx("home-card-header", className), ...rest, children: [
17
17
  /* @__PURE__ */ jsx("h3", { className: "home-card-header-title", children: title }),
18
18
  hasAction && /* @__PURE__ */ jsx(ButtonBeta, { color: "tertiary", size: "sm", variant: "ghost", onClick: onActionClick, className: "home-card-header-action", leftIcon: actionLeftIcon, rightIcon: actionRightIcon, "data-testid": "home-card-header-action", ...actionProps, children: actionLabel })
@@ -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("homepage.messageFlash.warning") : t("homepage.messageFlash.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("warning") : t("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: {
@@ -14,7 +14,7 @@ import Divider from "../../../../components/Divider/Divider.js";
14
14
  const NotificationList = ({
15
15
  notifications,
16
16
  notificationTypes,
17
- selectedTypes = [],
17
+ selectedTypes,
18
18
  onFilterChange,
19
19
  onCloseNotifications,
20
20
  onLoadNextPage,
@@ -25,23 +25,24 @@ const NotificationList = ({
25
25
  t
26
26
  } = useTranslation(), loadNextRef = useInfiniteScroll({
27
27
  callback: () => onLoadNextPage == null ? void 0 : onLoadNextPage()
28
- }), handleFilterChange = (types) => onFilterChange == null ? void 0 : onFilterChange(types), handleCloseClick = () => {
28
+ }), handleCloseClick = () => {
29
29
  onCloseNotifications && onCloseNotifications();
30
30
  };
31
- return /* @__PURE__ */ jsx("section", { role: "region", className: "notification-list", children: /* @__PURE__ */ jsxs(Flex, { direction: "column", className: "notification-list-body", children: [
31
+ return /* @__PURE__ */ jsx("section", { role: "region", className: "notification-list", children: /* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
32
32
  /* @__PURE__ */ jsxs(Flex, { justify: "between", align: "center", wrap: "nowrap", className: "py-16 ps-24 pe-8", children: [
33
33
  /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "8", className: "notification-list-title", children: [
34
34
  /* @__PURE__ */ jsx("h4", { className: "text-truncate", children: t("homepage.notifications-list.title") }),
35
- notificationTypes && notificationTypes.length > 0 && /* @__PURE__ */ jsx(NotificationFilterMenu, { notificationTypes, selectedTypes, onFilterChange: handleFilterChange })
35
+ notificationTypes && notificationTypes.length > 0 && /* @__PURE__ */ jsx(NotificationFilterMenu, { notificationTypes, selectedTypes: selectedTypes ?? notificationTypes, onFilterChange: (types) => onFilterChange == null ? void 0 : onFilterChange(types) })
36
36
  ] }),
37
37
  onCloseNotifications && /* @__PURE__ */ jsx(ButtonBeta, { color: "tertiary", variant: "ghost", rightIcon: /* @__PURE__ */ jsx(SvgIconClose, {}), onClick: handleCloseClick, "aria-label": t("homepage.notifications-list.close"), title: t("homepage.notifications-list.close"), "data-testid": "notification-list-close-button" })
38
38
  ] }),
39
- isLoading && !(notifications != null && notifications.length) ? /* @__PURE__ */ jsx(NotificationListSkeleton, {}) : !notifications || notifications.length === 0 ? /* @__PURE__ */ jsx("div", { className: "mx-24", children: /* @__PURE__ */ jsx(EmptyScreen, { size: 135, imageSrc: illuEmptyNotification, imageAlt: t("homepage.notifications-list.empty.description"), text: t("homepage.notifications-list.empty.description") }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
40
- /* @__PURE__ */ jsx("ul", { children: notifications.map((notification, index) => /* @__PURE__ */ jsxs("li", { children: [
39
+ (notifications == null ? void 0 : notifications.length) === 0 ? /* @__PURE__ */ jsx("div", { className: "mx-24", children: /* @__PURE__ */ jsx(EmptyScreen, { size: 135, imageSrc: illuEmptyNotification, imageAlt: t("homepage.notifications-list.empty.description"), text: t("homepage.notifications-list.empty.description") }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
40
+ /* @__PURE__ */ jsx("ul", { children: notifications == null ? void 0 : notifications.map((notification, index) => /* @__PURE__ */ jsxs("li", { children: [
41
41
  /* @__PURE__ */ jsx(NotificationItem, { notification }),
42
42
  /* @__PURE__ */ jsx(Divider, { className: "border-grey-300 my-0" })
43
43
  ] }, "notification-list-" + notification._id + "-" + index)) }),
44
- hasNextPage && /* @__PURE__ */ jsx(NotificationSkeleton, { ref: loadNextRef })
44
+ hasNextPage && /* @__PURE__ */ jsx(NotificationSkeleton, { ref: loadNextRef }),
45
+ isLoading && /* @__PURE__ */ jsx(NotificationListSkeleton, {})
45
46
  ] })
46
47
  ] }) });
47
48
  };
@@ -1,12 +1,17 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import NotificationSkeleton from "./NotificationSkeleton.js";
3
3
  import Divider from "../../../../components/Divider/Divider.js";
4
- const SKELETON_COUNT = 8, NotificationListSkeleton = () => /* @__PURE__ */ jsx("ul", { className: "notification-list-skeleton", "aria-hidden": "true", children: Array.from({
5
- length: SKELETON_COUNT
6
- }, (_, index) => /* @__PURE__ */ jsxs("li", { children: [
7
- /* @__PURE__ */ jsx(NotificationSkeleton, {}),
8
- index < SKELETON_COUNT - 1 && /* @__PURE__ */ jsx(Divider, { className: "border-grey-300 my-0" })
9
- ] }, index)) });
4
+ const NotificationListSkeleton = () => /* @__PURE__ */ jsxs("ul", { children: [
5
+ /* @__PURE__ */ jsxs("li", { children: [
6
+ /* @__PURE__ */ jsx(NotificationSkeleton, {}),
7
+ /* @__PURE__ */ jsx(Divider, { className: "border-grey-300 my-0" })
8
+ ] }),
9
+ /* @__PURE__ */ jsxs("li", { children: [
10
+ /* @__PURE__ */ jsx(NotificationSkeleton, {}),
11
+ /* @__PURE__ */ jsx(Divider, { className: "border-grey-300 my-0" })
12
+ ] }),
13
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NotificationSkeleton, {}) })
14
+ ] });
10
15
  export {
11
16
  NotificationListSkeleton as default
12
17
  };
@@ -1,14 +1,11 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import Flex from "../../../../components/Flex/Flex.js";
4
+ import Avatar from "../../../../components/Avatar/Avatar.js";
4
5
  import TextSkeleton from "../../../../components/Skeleton/TextSkeleton.js";
5
- const NotificationSkeleton = /* @__PURE__ */ React.forwardRef((_props, ref) => /* @__PURE__ */ jsx(Flex, { direction: "column", className: "notification-item", gap: "8", ref, children: /* @__PURE__ */ jsxs(Flex, { direction: "row", gap: "8", children: [
6
- /* @__PURE__ */ jsx("div", { className: "notification-item-picture", children: /* @__PURE__ */ jsx("div", { className: "placeholder col-4", style: {
7
- height: "3.2rem",
8
- width: "3.2rem",
9
- borderRadius: "50%"
10
- } }) }),
11
- /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "8", className: "notification-item-message", children: [
6
+ const NotificationSkeleton = /* @__PURE__ */ React.forwardRef((_props, ref) => /* @__PURE__ */ jsx(Flex, { direction: "column", className: "notification", gap: "8", ref, children: /* @__PURE__ */ jsxs(Flex, { direction: "row", gap: "8", children: [
7
+ /* @__PURE__ */ jsx("div", { className: "notification-item-picture", children: /* @__PURE__ */ jsx(Avatar, { alt: "Notification Picture", variant: "circle", className: "notification-item-avatar" }) }),
8
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "8", className: "notification-message", children: [
12
9
  /* @__PURE__ */ jsx(TextSkeleton, {}),
13
10
  /* @__PURE__ */ jsx(TextSkeleton, {}),
14
11
  /* @__PURE__ */ jsx("div", { className: "placeholder col-4", style: {
@@ -16,7 +16,11 @@ 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"), title: t("homepage.notifications.filter-modal.trigger"), 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", {
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" }),
20
24
  isOpen && /* @__PURE__ */ jsx(NotificationFilterModal, { isOpen, allTypes: notificationTypes, appliedTypes: selectedTypes, onCancel: () => setIsOpen(!1), onApply: handleApply })
21
25
  ] });
22
26
  };
@@ -1,12 +1,11 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
- import { useState, useMemo } from "react";
3
+ import { useState, useRef, useMemo, useEffect } from "react";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import SvgIconCheck from "../../../../icons/components/IconCheck.js";
6
6
  import { getAppCodeAndI18nKey } from "./notificationAdapter.js";
7
- import ModalBeta from "../../../../../components/ModalBeta/ModalBeta.js";
7
+ import Modal from "../../../../../components/Modal/Modal.js";
8
8
  import Flex from "../../../../../components/Flex/Flex.js";
9
- import Checkbox from "../../../../../components/Checkbox/Checkbox.js";
10
9
  import AppIcon from "../../../../../components/AppIcon/AppIcon.js";
11
10
  import ButtonBeta from "../../../../../components/ButtonBeta/ButtonBeta.js";
12
11
  const NotificationFilterModal = ({
@@ -19,7 +18,7 @@ const NotificationFilterModal = ({
19
18
  const {
20
19
  t,
21
20
  i18n
22
- } = useTranslation(), [selected, setSelected] = useState(appliedTypes), allTypesSorted = useMemo(() => allTypes.map((type) => {
21
+ } = useTranslation(), [selected, setSelected] = useState(appliedTypes), refSelectAllCheckbox = useRef(null), allTypesSorted = useMemo(() => allTypes.map((type) => {
23
22
  const [appCode, appI18nKey] = getAppCodeAndI18nKey(type), label = t(appI18nKey, {
24
23
  defaultValue: appCode
25
24
  });
@@ -36,13 +35,16 @@ const NotificationFilterModal = ({
36
35
  }, toggleAll = () => {
37
36
  setSelected(selected.length === allTypes.length ? [] : allTypes);
38
37
  };
39
- return /* @__PURE__ */ jsxs(ModalBeta, { id: "notification-filter-modal", size: "l", isOpen, onModalClose: onCancel, children: [
40
- /* @__PURE__ */ jsx(ModalBeta.Header, { subtitle: t("homepage.notifications.filter-modal.subtitle"), onModalClose: onCancel, children: t("homepage.notifications.filter-modal.title") }),
41
- /* @__PURE__ */ jsxs(ModalBeta.Body, { children: [
38
+ return useEffect(() => {
39
+ refSelectAllCheckbox.current && (refSelectAllCheckbox.current.indeterminate = selected.length > 0 && selected.length < allTypes.length);
40
+ }, [selected.length, allTypes.length]), /* @__PURE__ */ jsxs(Modal, { id: "notification-filter-modal", size: "lg", scrollable: !0, isOpen, onModalClose: onCancel, children: [
41
+ /* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: t("homepage.notifications.filter-modal.title") }),
42
+ /* @__PURE__ */ jsx(Modal.Subtitle, { children: t("homepage.notifications.filter-modal.subtitle") }),
43
+ /* @__PURE__ */ jsxs(Modal.Body, { children: [
42
44
  /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "8", className: "mb-24", children: [
43
45
  /* @__PURE__ */ jsxs("label", { className: "notification-filter-select-all notification-filter-chip", children: [
44
46
  /* @__PURE__ */ jsx("span", { children: t("homepage.notifications.filter-modal.select-all") }),
45
- /* @__PURE__ */ jsx(Checkbox, { checked: selected.length === allTypes.length, indeterminate: selected.length > 0 && selected.length < allTypes.length, onChange: toggleAll })
47
+ /* @__PURE__ */ jsx("input", { type: "checkbox", ref: refSelectAllCheckbox, checked: selected.length === allTypes.length, className: "notification-filter-checkbox", onChange: toggleAll })
46
48
  ] }),
47
49
  /* @__PURE__ */ jsx("span", { className: "notification-filter-count", children: t("homepage.notifications.filter-modal.count", {
48
50
  selected: selected.length,
@@ -60,11 +62,11 @@ const NotificationFilterModal = ({
60
62
  }), children: [
61
63
  /* @__PURE__ */ jsx(AppIcon, { app: appCode, size: "24", iconFit: "contain" }),
62
64
  /* @__PURE__ */ jsx("span", { children: label }),
63
- /* @__PURE__ */ jsx(Checkbox, { checked, onChange: () => toggleType(type) })
65
+ /* @__PURE__ */ jsx("input", { type: "checkbox", className: "notification-filter-checkbox", checked, onChange: () => toggleType(type) })
64
66
  ] }, type);
65
67
  }) })
66
68
  ] }),
67
- /* @__PURE__ */ jsxs(ModalBeta.Footer, { children: [
69
+ /* @__PURE__ */ jsxs(Modal.Footer, { children: [
68
70
  /* @__PURE__ */ jsx(ButtonBeta, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: t("cancel") }),
69
71
  /* @__PURE__ */ jsx(ButtonBeta, { color: "default", onClick: () => onApply(selected), type: "button", variant: "filled", rightIcon: /* @__PURE__ */ jsx(SvgIconCheck, {}), children: t("homepage.notifications.filter-modal.confirm") })
70
72
  ] })
@@ -20,10 +20,16 @@ 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"), 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", {
24
+ defaultValue: "Options de la notification"
25
+ }), color: "tertiary", variant: "ghost", icon: /* @__PURE__ */ jsx(SvgIconOptions, {}), "data-testid": "notification-item-options-button" }),
24
26
  /* @__PURE__ */ jsxs(Dropdown.Menu, { children: [
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") })
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
+ }) })
27
33
  ] })
28
34
  ] }) }),
29
35
  isReportModalOpen && /* @__PURE__ */ jsx(ReportNotificationModal, { isOpen: isReportModalOpen, onCancel: () => setIsReportModalOpen(!1), onConfirm: () => {
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useTranslation } from "react-i18next";
3
3
  import SvgIconAlertTriangle from "../../../../icons/components/IconAlertTriangle.js";
4
- import ModalBeta from "../../../../../components/ModalBeta/ModalBeta.js";
4
+ import Modal from "../../../../../components/Modal/Modal.js";
5
5
  import ButtonBeta from "../../../../../components/ButtonBeta/ButtonBeta.js";
6
6
  const ReportNotificationModal = ({
7
7
  isOpen,
@@ -11,12 +11,18 @@ const ReportNotificationModal = ({
11
11
  const {
12
12
  t
13
13
  } = useTranslation();
14
- return /* @__PURE__ */ jsxs(ModalBeta, { id: "report-notification-modal", size: "m", isOpen, onModalClose: onCancel, children: [
15
- /* @__PURE__ */ jsx(ModalBeta.Header, { onModalClose: onCancel, children: t("homepage.notifications.report-modal.title") }),
16
- /* @__PURE__ */ jsx(ModalBeta.Body, { children: /* @__PURE__ */ jsx("p", { children: t("homepage.notifications.report-modal.body") }) }),
17
- /* @__PURE__ */ jsxs(ModalBeta.Footer, { children: [
14
+ return /* @__PURE__ */ jsxs(Modal, { id: "report-notification-modal", size: "sm", isOpen, onModalClose: onCancel, children: [
15
+ /* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: t("homepage.notifications.report-modal.title", {
16
+ defaultValue: "Signaler une notification"
17
+ }) }),
18
+ /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx("p", { children: t("homepage.notifications.report-modal.body", {
19
+ defaultValue: "Attention ! Vous souhaitez signaler une notification inappropriée ou qui ne respecte pas les conditions d'utilisation de ONE. L'heure et l'origine de ce signalement seront enregistrées et transmises à un administrateur pour traitement."
20
+ }) }) }),
21
+ /* @__PURE__ */ jsxs(Modal.Footer, { children: [
18
22
  /* @__PURE__ */ jsx(ButtonBeta, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: t("cancel") }),
19
- /* @__PURE__ */ jsx(ButtonBeta, { color: "default", onClick: onConfirm, type: "button", variant: "filled", leftIcon: /* @__PURE__ */ jsx(SvgIconAlertTriangle, {}), children: t("homepage.notifications.report-modal.confirm") })
23
+ /* @__PURE__ */ jsx(ButtonBeta, { color: "default", onClick: onConfirm, type: "button", variant: "filled", leftIcon: /* @__PURE__ */ jsx(SvgIconAlertTriangle, {}), children: t("homepage.notifications.report-modal.confirm", {
24
+ defaultValue: "Signaler la notification"
25
+ }) })
20
26
  ] })
21
27
  ] });
22
28
  };
@@ -8,36 +8,34 @@ const resolveNotificationResourceUri = (params, type, appCode, eventType) => {
8
8
  return value;
9
9
  }, parseNotificationMessage = (message) => message.replace(/<\/a>/gi, "</strong>").replace(/<a\b[^>]*>/gi, "<strong>"), getAppCodeAndI18nKey = (appCode) => {
10
10
  appCode = appCode.toLowerCase();
11
- const appI18nKey = `homepage.notification.type.${appCode}`;
11
+ let appI18nKey = appCode;
12
12
  switch (appCode) {
13
- case "collaborativeeditor":
14
- appCode = "pad";
15
- break;
16
13
  case "collaborativewall":
17
14
  appCode = "collaborative-wall";
18
15
  break;
19
16
  case "formulaire":
20
- appCode = "forms";
17
+ appI18nKey = "formulaire", appCode = "forms";
21
18
  break;
22
19
  case "messagerie":
23
- appCode = "conversation";
20
+ appI18nKey = appCode = "conversation";
24
21
  break;
25
22
  case "news":
26
- appCode = "actualites";
23
+ appI18nKey = appCode = "actualites";
27
24
  break;
28
25
  case "homeworks":
29
26
  appCode = "cahier-de-texte";
30
27
  break;
31
28
  case "userbook_motto":
29
+ appI18nKey = "userbook_motto", appCode = "userbook";
30
+ break;
32
31
  case "userbook_mood":
33
- case "userbook_discovervisiblegroups":
34
- appCode = "userbook";
32
+ appI18nKey = "userbook_mood", appCode = "userbook";
35
33
  break;
36
- case "viescolaire":
37
- appCode = "vie-scolaire";
34
+ case "userbook_discovervisiblegroups":
35
+ appI18nKey = "userbook_discovervisiblegroups", appCode = "userbook";
38
36
  break;
39
37
  default:
40
- appCode = appCode.replace(/_/g, "-");
38
+ appI18nKey = appCode = appCode.replace(/_/g, "-");
41
39
  }
42
40
  return [appCode, appI18nKey];
43
41
  }, notificationAdapter = (notification) => {
@@ -14,30 +14,31 @@ const useNotificationListContainer = () => {
14
14
  mutate: saveTimelinePreference
15
15
  } = useSaveTimelinePreference(), [selectedTypes, setSelectedTypesState] = useState();
16
16
  useEffect(() => {
17
- selectedTypes === void 0 && isFetchedTypes && isFetchedPreference && setSelectedTypesState((preference == null ? void 0 : preference.type) ?? notificationTypes ?? []);
17
+ if (selectedTypes === void 0 && isFetchedTypes && isFetchedPreference) {
18
+ const preferredTypes = preference == null ? void 0 : preference.type;
19
+ setSelectedTypesState(preferredTypes && preferredTypes.length > 0 ? preferredTypes : notificationTypes ?? []);
20
+ }
18
21
  }, [selectedTypes, isFetchedTypes, isFetchedPreference, preference, notificationTypes]);
19
22
  const setSelectedTypes = (types) => {
20
23
  setSelectedTypesState(types), saveTimelinePreference({
21
24
  ...preference,
22
25
  type: types
23
26
  });
24
- }, hasNoTypeSelected = (selectedTypes == null ? void 0 : selectedTypes.length) === 0, {
25
- data,
27
+ }, {
28
+ data: notifications,
26
29
  hasNextPage,
27
30
  isLoading: isLoadingNotifications,
28
31
  error: errorNotifications,
29
32
  fetchNextPage
30
- } = useNotifications(selectedTypes ?? [], isFetchedTypes && !!selectedTypes && !hasNoTypeSelected);
33
+ } = useNotifications(selectedTypes ?? [], isFetchedTypes && !!selectedTypes);
31
34
  return {
32
- notifications: hasNoTypeSelected ? [] : data,
35
+ notifications,
33
36
  notificationTypes,
34
37
  selectedTypes,
35
38
  setSelectedTypes,
36
- hasNextPage: hasNoTypeSelected ? !1 : hasNextPage,
39
+ hasNextPage,
37
40
  loadNextPage: () => fetchNextPage(),
38
- // The notification query stays disabled until the saved filter is
39
- // read, so this wait must count as loading too.
40
- isLoading: isLoadingTypes || selectedTypes === void 0 || isLoadingNotifications,
41
+ isLoading: isLoadingTypes || isLoadingNotifications,
41
42
  error: errorTypes || errorNotifications
42
43
  };
43
44
  }, useHasNotificationToday = () => {
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import SchoolSpace from "./SchoolSpace.js";
3
- import { useUserSchools } from "../../hooks/useUserSchools.js";
3
+ import { useUserSchools } from "./useUserSchools.js";
4
4
  function SchoolSpaceContainer() {
5
5
  const {
6
6
  handleSelectedSchoolChange,