@edifice.io/react 2.6.12-develop-b2school.20261102112143 → 2.6.12-develop-integration.20261103121816

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 (209) hide show
  1. package/dist/components/Checkbox/Checkbox.js +1 -1
  2. package/dist/components/Dropdown/DropdownItem.js +1 -17
  3. package/dist/components/Layout/Layout.js +4 -12
  4. package/dist/components/SearchBar/SearchBar.js +26 -17
  5. package/dist/components/Tree/components/Tree.d.ts +5 -2
  6. package/dist/components/Tree/components/Tree.js +7 -10
  7. package/dist/components/Tree/hooks/useTree.d.ts +0 -1
  8. package/dist/components/Tree/hooks/useTree.js +2 -6
  9. package/dist/components/Tree/types/index.d.ts +0 -7
  10. package/dist/components/index.d.ts +0 -1
  11. package/dist/homepage.js +28 -87
  12. package/dist/hooks/index.d.ts +1 -0
  13. package/dist/hooks/useDropdown/useDropdown.js +2 -2
  14. package/dist/hooks/useGoogleDriveSearch/index.d.ts +1 -0
  15. package/dist/hooks/useGoogleDriveSearch/useGoogleDriveSearch.d.ts +19 -0
  16. package/dist/hooks/useGoogleDriveSearch/useGoogleDriveSearch.js +60 -0
  17. package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +6 -2
  18. package/dist/hooks/useZendeskGuide/useZendeskGuide.js +8 -11
  19. package/dist/icons-apps.js +184 -182
  20. package/dist/icons.js +404 -406
  21. package/dist/index.js +198 -194
  22. package/dist/modules/HelpZone/HelpZone.js +8 -6
  23. package/dist/modules/HelpZone/HelpZoneContainer.js +5 -2
  24. package/dist/modules/editor/components/Editor/Editor.d.ts +7 -5
  25. package/dist/modules/editor/components/Editor/Editor.js +3 -5
  26. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +3 -1
  27. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +14 -8
  28. package/dist/modules/editor/components/NodeView/ImageNodeView.d.ts +1 -1
  29. package/dist/modules/editor/components/NodeView/ImageNodeView.js +14 -7
  30. package/dist/modules/editor/hooks/useActionOptions.d.ts +1 -1
  31. package/dist/modules/editor/hooks/useActionOptions.js +12 -12
  32. package/dist/modules/editor/hooks/useTipTapEditor.d.ts +2 -1
  33. package/dist/modules/editor/hooks/useTipTapEditor.js +2 -2
  34. package/dist/modules/homepage/components/AlloLycee/AlloLycee.d.ts +11 -0
  35. package/dist/modules/homepage/components/AlloLycee/AlloLycee.js +32 -0
  36. package/dist/modules/homepage/components/AlloLycee/AlloLyceeContainer.d.ts +4 -0
  37. package/dist/modules/homepage/components/AlloLycee/AlloLyceeContainer.js +10 -0
  38. package/dist/modules/homepage/components/AlloLycee/index.d.ts +3 -0
  39. package/dist/modules/homepage/components/Header/Header.js +21 -9
  40. package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +1 -5
  41. package/dist/modules/homepage/components/HomeCard/HomeCardHeader.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/CommonNotificationItem.js +9 -9
  46. package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.js +13 -11
  47. package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js +12 -6
  48. package/dist/modules/homepage/components/Notifications/components/notificationAdapter.d.ts +2 -1
  49. package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +12 -14
  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 +2 -11
  61. package/dist/modules/icons/components/apps/IconElea.d.ts +7 -0
  62. package/dist/modules/icons/components/apps/IconElea.js +23 -0
  63. package/dist/modules/icons/components/apps/index.d.ts +1 -0
  64. package/dist/modules/icons/components/index.d.ts +0 -1
  65. package/dist/modules/icons/components/nav/IconCommunitiesBeta.js +7 -5
  66. package/dist/modules/icons/components/nav/IconHomeBeta.js +3 -6
  67. package/dist/modules/icons/components/nav/IconMessagesBeta.js +7 -7
  68. package/dist/modules/icons/components/nav/IconMyAppsBeta.js +3 -2
  69. package/dist/modules/icons/components/nav/IconNotificationBeta.js +4 -2
  70. package/dist/modules/multimedia/FileCard/GoogleDriveFileCard.d.ts +25 -0
  71. package/dist/modules/multimedia/FileCard/GoogleDriveFileCard.js +102 -0
  72. package/dist/modules/multimedia/FileCard/index.d.ts +2 -0
  73. package/dist/modules/multimedia/GoogleDrive/GoogleDrive.d.ts +24 -0
  74. package/dist/modules/multimedia/GoogleDrive/GoogleDrive.js +103 -0
  75. package/dist/modules/multimedia/GoogleDrive/index.d.ts +2 -0
  76. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +7 -1
  77. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +2 -0
  78. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +16 -5
  79. package/dist/modules/multimedia/MediaLibrary/innertabs/GoogleDrive.d.ts +1 -0
  80. package/dist/modules/multimedia/MediaLibrary/innertabs/GoogleDrive.js +61 -0
  81. package/dist/modules/multimedia/MediaLibrary/innertabs/index.d.ts +1 -0
  82. package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +2 -0
  83. package/dist/modules/multimedia/Workspace/Workspace.js +1 -1
  84. package/dist/modules/multimedia/index.d.ts +1 -0
  85. package/dist/multimedia.js +26 -22
  86. package/package.json +6 -6
  87. package/dist/components/Masonry/Masonry.d.ts +0 -40
  88. package/dist/components/Masonry/Masonry.js +0 -50
  89. package/dist/components/Masonry/index.d.ts +0 -2
  90. package/dist/modules/homepage/components/Agenda/Agenda.d.ts +0 -10
  91. package/dist/modules/homepage/components/Agenda/Agenda.js +0 -54
  92. package/dist/modules/homepage/components/Agenda/AgendaContainer.d.ts +0 -1
  93. package/dist/modules/homepage/components/Agenda/AgendaContainer.js +0 -14
  94. package/dist/modules/homepage/components/Agenda/AgendaEventCard.d.ts +0 -10
  95. package/dist/modules/homepage/components/Agenda/AgendaEventCard.js +0 -30
  96. package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.d.ts +0 -14
  97. package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.js +0 -27
  98. package/dist/modules/homepage/components/Agenda/index.d.ts +0 -3
  99. package/dist/modules/homepage/components/Agenda/services/api/agendaService.d.ts +0 -24
  100. package/dist/modules/homepage/components/Agenda/services/api/agendaService.js +0 -45
  101. package/dist/modules/homepage/components/Agenda/services/api/index.d.ts +0 -4
  102. package/dist/modules/homepage/components/Agenda/services/api/index.js +0 -5
  103. package/dist/modules/homepage/components/Agenda/services/queries/agenda.d.ts +0 -19
  104. package/dist/modules/homepage/components/Agenda/services/queries/agenda.js +0 -26
  105. package/dist/modules/homepage/components/BriefMe/BriefMe.d.ts +0 -9
  106. package/dist/modules/homepage/components/BriefMe/BriefMe.js +0 -59
  107. package/dist/modules/homepage/components/BriefMe/BriefMeContainer.d.ts +0 -4
  108. package/dist/modules/homepage/components/BriefMe/BriefMeContainer.js +0 -17
  109. package/dist/modules/homepage/components/BriefMe/index.d.ts +0 -4
  110. package/dist/modules/homepage/components/BriefMe/types.d.ts +0 -17
  111. package/dist/modules/homepage/components/BriefMe/types.js +0 -8
  112. package/dist/modules/homepage/components/BriefMe/useBriefMe.d.ts +0 -31
  113. package/dist/modules/homepage/components/BriefMe/useBriefMe.js +0 -51
  114. package/dist/modules/homepage/components/Cantine/Cantine.d.ts +0 -7
  115. package/dist/modules/homepage/components/Cantine/Cantine.js +0 -44
  116. package/dist/modules/homepage/components/Cantine/CantineContainer.d.ts +0 -4
  117. package/dist/modules/homepage/components/Cantine/CantineContainer.js +0 -18
  118. package/dist/modules/homepage/components/Cantine/CantineModal.d.ts +0 -24
  119. package/dist/modules/homepage/components/Cantine/CantineModal.js +0 -88
  120. package/dist/modules/homepage/components/Cantine/CantineModalContainer.d.ts +0 -7
  121. package/dist/modules/homepage/components/Cantine/CantineModalContainer.js +0 -12
  122. package/dist/modules/homepage/components/Cantine/components/CantineLegend.d.ts +0 -5
  123. package/dist/modules/homepage/components/Cantine/components/CantineLegend.js +0 -22
  124. package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.d.ts +0 -6
  125. package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.js +0 -28
  126. package/dist/modules/homepage/components/Cantine/components/cantineLabels.d.ts +0 -12
  127. package/dist/modules/homepage/components/Cantine/components/cantineLabels.js +0 -60
  128. package/dist/modules/homepage/components/Cantine/hooks/useCantine.d.ts +0 -11
  129. package/dist/modules/homepage/components/Cantine/hooks/useCantine.js +0 -20
  130. package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.d.ts +0 -24
  131. package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.js +0 -65
  132. package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.d.ts +0 -23
  133. package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.js +0 -43
  134. package/dist/modules/homepage/components/Cantine/index.d.ts +0 -7
  135. package/dist/modules/homepage/components/Cantine/types.d.ts +0 -42
  136. package/dist/modules/homepage/components/Edumalin/Edumalin.d.ts +0 -9
  137. package/dist/modules/homepage/components/Edumalin/Edumalin.js +0 -65
  138. package/dist/modules/homepage/components/Edumalin/EdumalinContainer.d.ts +0 -4
  139. package/dist/modules/homepage/components/Edumalin/EdumalinContainer.js +0 -21
  140. package/dist/modules/homepage/components/Edumalin/EdumalinModal.d.ts +0 -8
  141. package/dist/modules/homepage/components/Edumalin/EdumalinModal.js +0 -62
  142. package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.d.ts +0 -5
  143. package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.js +0 -38
  144. package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.d.ts +0 -5
  145. package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.js +0 -12
  146. package/dist/modules/homepage/components/Edumalin/index.d.ts +0 -7
  147. package/dist/modules/homepage/components/Edumalin/types.d.ts +0 -24
  148. package/dist/modules/homepage/components/Edumalin/types.js +0 -4
  149. package/dist/modules/homepage/components/Edumalin/useEdumalin.d.ts +0 -16
  150. package/dist/modules/homepage/components/Edumalin/useEdumalin.js +0 -35
  151. package/dist/modules/homepage/components/Edumalin/utils.d.ts +0 -28
  152. package/dist/modules/homepage/components/Edumalin/utils.js +0 -56
  153. package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.d.ts +0 -16
  154. package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.js +0 -65
  155. package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.d.ts +0 -4
  156. package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.js +0 -12
  157. package/dist/modules/homepage/components/GenerationHdf/formatSolde.d.ts +0 -1
  158. package/dist/modules/homepage/components/GenerationHdf/formatSolde.js +0 -6
  159. package/dist/modules/homepage/components/GenerationHdf/index.d.ts +0 -3
  160. package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.d.ts +0 -10
  161. package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.js +0 -69
  162. package/dist/modules/homepage/components/Qwant/Qwant.d.ts +0 -4
  163. package/dist/modules/homepage/components/Qwant/Qwant.js +0 -41
  164. package/dist/modules/homepage/components/Qwant/QwantContainer.d.ts +0 -1
  165. package/dist/modules/homepage/components/Qwant/QwantContainer.js +0 -10
  166. package/dist/modules/homepage/components/Qwant/index.d.ts +0 -3
  167. package/dist/modules/homepage/components/Rss/Rss.d.ts +0 -11
  168. package/dist/modules/homepage/components/Rss/Rss.js +0 -64
  169. package/dist/modules/homepage/components/Rss/RssContainer.d.ts +0 -1
  170. package/dist/modules/homepage/components/Rss/RssContainer.js +0 -45
  171. package/dist/modules/homepage/components/Rss/RssFeedForm.d.ts +0 -13
  172. package/dist/modules/homepage/components/Rss/RssFeedForm.js +0 -69
  173. package/dist/modules/homepage/components/Rss/RssFeedsModal.d.ts +0 -11
  174. package/dist/modules/homepage/components/Rss/RssFeedsModal.js +0 -58
  175. package/dist/modules/homepage/components/Rss/hooks/useRssContainer.d.ts +0 -25
  176. package/dist/modules/homepage/components/Rss/hooks/useRssContainer.js +0 -43
  177. package/dist/modules/homepage/components/Rss/index.d.ts +0 -6
  178. package/dist/modules/homepage/components/Rss/services/api/index.d.ts +0 -5
  179. package/dist/modules/homepage/components/Rss/services/api/index.js +0 -5
  180. package/dist/modules/homepage/components/Rss/services/api/rssService.d.ts +0 -38
  181. package/dist/modules/homepage/components/Rss/services/api/rssService.js +0 -51
  182. package/dist/modules/homepage/components/Rss/services/queries/rss.d.ts +0 -28
  183. package/dist/modules/homepage/components/Rss/services/queries/rss.js +0 -71
  184. package/dist/modules/homepage/components/Rss/types.d.ts +0 -25
  185. package/dist/modules/homepage/components/Rss/utils.d.ts +0 -7
  186. package/dist/modules/homepage/components/Rss/utils.js +0 -19
  187. package/dist/modules/homepage/components/TabsKids/components/TabsKids.d.ts +0 -43
  188. package/dist/modules/homepage/components/TabsKids/components/TabsKids.js +0 -23
  189. package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.d.ts +0 -34
  190. package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.js +0 -26
  191. package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.d.ts +0 -14
  192. package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.js +0 -64
  193. package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.d.ts +0 -20
  194. package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.js +0 -43
  195. package/dist/modules/homepage/components/TabsKids/index.d.ts +0 -3
  196. package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.d.ts +0 -15
  197. package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.js +0 -21
  198. package/dist/modules/homepage/components/Universalis/Universalis.d.ts +0 -8
  199. package/dist/modules/homepage/components/Universalis/Universalis.js +0 -62
  200. package/dist/modules/homepage/components/Universalis/UniversalisContainer.d.ts +0 -1
  201. package/dist/modules/homepage/components/Universalis/UniversalisContainer.js +0 -16
  202. package/dist/modules/homepage/components/Universalis/index.d.ts +0 -3
  203. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.d.ts +0 -16
  204. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js +0 -15
  205. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.d.ts +0 -21
  206. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js +0 -47
  207. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/index.d.ts +0 -2
  208. package/dist/modules/icons/components/IconAddWidget.d.ts +0 -7
  209. package/dist/modules/icons/components/IconAddWidget.js +0 -12
@@ -35,14 +35,15 @@ import { Toolbar } from "../../../../components/Toolbar/Toolbar.js";
35
35
  const EditorToolbar = ({
36
36
  mediaLibraryRef,
37
37
  toggleMathsModal,
38
- cantooEditor
38
+ cantooEditor,
39
+ multimedia = !0
39
40
  }) => {
40
41
  const {
41
42
  t
42
43
  } = useTranslation(), {
43
44
  id,
44
45
  editor
45
- } = useEditorContext(), [plusOptions, listOptions, alignmentOptions] = useActionOptions(editor, toggleMathsModal, mediaLibraryRef), {
46
+ } = useEditorContext(), [plusOptions, listOptions, alignmentOptions] = useActionOptions(editor, toggleMathsModal, mediaLibraryRef, multimedia), {
46
47
  isAvailable: canRecognizeSpeech,
47
48
  isActive: speechRecognition,
48
49
  toggle: toggleSpeechRecognition
@@ -105,7 +106,8 @@ const EditorToolbar = ({
105
106
  }
106
107
  },
107
108
  name: "image",
108
- tooltip: t("tiptap.toolbar.picture")
109
+ tooltip: t("tiptap.toolbar.picture"),
110
+ visibility: showIf(multimedia)
109
111
  },
110
112
  //--------------- VIDEO ---------------//
111
113
  {
@@ -120,7 +122,8 @@ const EditorToolbar = ({
120
122
  }
121
123
  },
122
124
  name: "video",
123
- tooltip: t("tiptap.toolbar.video")
125
+ tooltip: t("tiptap.toolbar.video"),
126
+ visibility: showIf(multimedia)
124
127
  },
125
128
  //--------------- AUDIO ---------------//
126
129
  {
@@ -135,7 +138,8 @@ const EditorToolbar = ({
135
138
  }
136
139
  },
137
140
  name: "audio",
138
- tooltip: t("tiptap.toolbar.audio")
141
+ tooltip: t("tiptap.toolbar.audio"),
142
+ visibility: showIf(multimedia)
139
143
  },
140
144
  //--------------- ATTACHMENT ---------------//
141
145
  {
@@ -150,11 +154,13 @@ const EditorToolbar = ({
150
154
  }
151
155
  },
152
156
  name: "attachment",
153
- tooltip: t("tiptap.toolbar.attachment")
157
+ tooltip: t("tiptap.toolbar.attachment"),
158
+ visibility: showIf(multimedia)
154
159
  },
155
160
  {
156
161
  type: "divider",
157
- name: "div-2"
162
+ name: "div-2",
163
+ visibility: showIf(multimedia)
158
164
  },
159
165
  //--------------- SPEECH TO TEXT ---------------//
160
166
  {
@@ -348,7 +354,7 @@ const EditorToolbar = ({
348
354
  visibility: showIf(hasExtension("textAlign", editor))
349
355
  }
350
356
  ];
351
- }, [alignmentOptions, canRecognizeSpeech, editor, listOptions, mediaLibraryRef, plusOptions, speechRecognition, t, toggleSpeechRecognition]);
357
+ }, [alignmentOptions, canRecognizeSpeech, editor, listOptions, mediaLibraryRef, multimedia, plusOptions, speechRecognition, t, toggleSpeechRecognition]);
352
358
  return /* @__PURE__ */ jsx("div", { className: "sticky-top z-1 editor-toolbar rounded-3", children: /* @__PURE__ */ jsx(Toolbar, { items: toolbarItems, variant: "no-shadow", className: "rounded-top-3", isBlock: !0, align: "left", ariaControls: id }) });
353
359
  };
354
360
  export {
@@ -1,3 +1,3 @@
1
1
  import { WorkspaceElement } from '@edifice.io/client';
2
- declare const ImageNodeView: (Component: any, uploadFile: (file: File) => Promise<WorkspaceElement | null>) => import('@tiptap/core').Node<import('@edifice.io/tiptap-extensions/image').CustomImageOptions, any>;
2
+ declare const ImageNodeView: (Component: any, uploadFile?: (file: File) => Promise<WorkspaceElement | null>) => import('@tiptap/core').Node<import('@edifice.io/tiptap-extensions/image').CustomImageOptions, any>;
3
3
  export default ImageNodeView;
@@ -1,12 +1,19 @@
1
1
  import { Image } from "@edifice.io/tiptap-extensions/image";
2
2
  import { ReactNodeViewRenderer } from "@tiptap/react";
3
- const ImageNodeView = (Component, uploadFile) => Image.extend({
4
- addNodeView() {
5
- return ReactNodeViewRenderer(Component);
6
- }
7
- }).configure({
8
- uploadFile
9
- });
3
+ const ImageNodeView = (Component, uploadFile) => {
4
+ const ImageWithNodeView = Image.extend({
5
+ addNodeView() {
6
+ return ReactNodeViewRenderer(Component);
7
+ }
8
+ });
9
+ return uploadFile ? ImageWithNodeView.configure({
10
+ uploadFile
11
+ }) : ImageWithNodeView.extend({
12
+ addProseMirrorPlugins() {
13
+ return [];
14
+ }
15
+ });
16
+ };
10
17
  export {
11
18
  ImageNodeView as default
12
19
  };
@@ -2,4 +2,4 @@ import { RefObject } from 'react';
2
2
  import { Editor } from '@tiptap/react';
3
3
  import { DropdownMenuOptions } from '../../../components';
4
4
  import { MediaLibraryRef } from '../../multimedia';
5
- export declare const useActionOptions: (editor: Editor | null, toggleMathsModal: () => void, mediaLibraryRef: RefObject<MediaLibraryRef>) => DropdownMenuOptions[][];
5
+ export declare const useActionOptions: (editor: Editor | null, toggleMathsModal: () => void, mediaLibraryRef: RefObject<MediaLibraryRef>, multimedia?: boolean) => DropdownMenuOptions[][];
@@ -12,10 +12,19 @@ import SvgIconSubscript from "../../icons/components/IconSubscript.js";
12
12
  import SvgIconSuperscript from "../../icons/components/IconSuperscript.js";
13
13
  import SvgIconTable from "../../icons/components/IconTable.js";
14
14
  import SvgIconTextVanilla from "../../icons/components/IconTextVanilla.js";
15
- const useActionOptions = (editor, toggleMathsModal, mediaLibraryRef) => {
15
+ const useActionOptions = (editor, toggleMathsModal, mediaLibraryRef, multimedia = !0) => {
16
16
  const {
17
17
  t
18
- } = useTranslation(), options = [{
18
+ } = useTranslation(), embedOptions = multimedia ? [{
19
+ type: "divider"
20
+ }, {
21
+ icon: /* @__PURE__ */ jsx(SvgIconCode, {}),
22
+ label: t("tiptap.toolbar.embed.iframe"),
23
+ action: () => {
24
+ var _a;
25
+ return (_a = mediaLibraryRef.current) == null ? void 0 : _a.show("embedder");
26
+ }
27
+ }] : [], options = [{
19
28
  icon: /* @__PURE__ */ jsx(SvgIconTextVanilla, {}),
20
29
  label: t("tiptap.toolbar.removeFormat"),
21
30
  action: () => editor == null ? void 0 : editor.chain().clearNodes().unsetAllMarks().run()
@@ -45,16 +54,7 @@ const useActionOptions = (editor, toggleMathsModal, mediaLibraryRef) => {
45
54
  action: () => {
46
55
  toggleMathsModal();
47
56
  }
48
- }, {
49
- type: "divider"
50
- }, {
51
- icon: /* @__PURE__ */ jsx(SvgIconCode, {}),
52
- label: t("tiptap.toolbar.embed.iframe"),
53
- action: () => {
54
- var _a;
55
- return (_a = mediaLibraryRef.current) == null ? void 0 : _a.show("embedder");
56
- }
57
- }], listOptions = [{
57
+ }, ...embedOptions], listOptions = [{
58
58
  icon: /* @__PURE__ */ jsx(SvgIconBulletList, {}),
59
59
  label: t("tiptap.toolbar.ulist"),
60
60
  action: () => editor == null ? void 0 : editor.chain().focus().toggleBulletList().run()
@@ -10,11 +10,12 @@ import { WorkspaceVisibility } from '@edifice.io/client';
10
10
  * @param onContentChange callback to be called on content change
11
11
  * @param visibility workspace visibility
12
12
  * @param extensions extensions to add to the editor
13
+ * @param multimedia truthy to upload the images pasted or dropped in the editor
13
14
  * @returns the editor instance and the editable state
14
15
  */
15
16
  export declare const useTipTapEditor: (editable: boolean, content: Content, focus?: FocusPosition, placeholder?: string, onContentChange?: ({ editor }: {
16
17
  editor: any;
17
- }) => void, visibility?: WorkspaceVisibility, extensions?: Extensions) => {
18
+ }) => void, visibility?: WorkspaceVisibility, extensions?: Extensions, multimedia?: boolean) => {
18
19
  editor: import('@tiptap/core').Editor | null;
19
20
  editable: boolean;
20
21
  };
@@ -38,7 +38,7 @@ import AttachmentNodeView from "../components/NodeView/AttachmentNodeView.js";
38
38
  import AttachmentRenderer from "../components/Renderer/AttachmentRenderer.js";
39
39
  import InformationPaneNodeView from "../components/NodeView/InformationPaneNodeView.js";
40
40
  import InformationPaneRenderer from "../components/Renderer/InformationPaneRenderer.js";
41
- const useTipTapEditor = (editable, content, focus, placeholder, onContentChange, visibility = "protected", extensions) => {
41
+ const useTipTapEditor = (editable, content, focus, placeholder, onContentChange, visibility = "protected", extensions, multimedia = !0) => {
42
42
  const {
43
43
  currentLanguage
44
44
  } = useEdificeClient(), {
@@ -65,7 +65,7 @@ const useTipTapEditor = (editable, content, focus, placeholder, onContentChange,
65
65
  levels: [1, 2]
66
66
  }), Typography, FontSize, SpeechRecognition, SpeechSynthesis.configure({
67
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 || []],
68
+ }), Hyperlink, FontFamily, Mathematics, Alert, IframeNodeView(MediaRenderer), VideoNodeView(MediaRenderer), AudioNodeView(AudioRenderer), LinkerNodeView(LinkerRenderer), ImageNodeView(MediaRenderer, multimedia ? uploadFile : void 0), AttachmentNodeView(AttachmentRenderer), InformationPaneNodeView(InformationPaneRenderer), ...extensions || []],
69
69
  content,
70
70
  // If the onContentChange callback is provided, we call it on every content change.
71
71
  ...onContentChange ? {
@@ -0,0 +1,11 @@
1
+ export interface AlloLyceeProps {
2
+ /** Opens the requests the user already made. */
3
+ onRequestsClick: () => void;
4
+ /** Opens the form to make a new request. */
5
+ onNewRequestClick: () => void;
6
+ }
7
+ declare const AlloLycee: {
8
+ ({ onRequestsClick, onNewRequestClick }: AlloLyceeProps): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
11
+ export default AlloLycee;
@@ -0,0 +1,32 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import illuAlloLycee from "@edifice.io/bootstrap/dist/images/homepage/illu-allo-lycee.svg";
3
+ import { useTranslation } from "react-i18next";
4
+ import SvgIconArrowRight from "../../../icons/components/IconArrowRight.js";
5
+ import HomeCard from "../HomeCard/HomeCard.js";
6
+ import Image from "../../../../components/Image/Image.js";
7
+ import ButtonBeta from "../../../../components/ButtonBeta/ButtonBeta.js";
8
+ const AlloLycee = ({
9
+ onRequestsClick,
10
+ onNewRequestClick
11
+ }) => {
12
+ const {
13
+ t
14
+ } = useTranslation();
15
+ return /* @__PURE__ */ jsxs(HomeCard, { variant: "primary", children: [
16
+ /* @__PURE__ */ jsx(HomeCard.Header, { title: t("homepage.allolycee.title", "Allô Lycée"), actionLabel: t("homepage.allolycee.actionLabel", "Mes demandes"), actionRightIcon: /* @__PURE__ */ jsx(SvgIconArrowRight, {}), onActionClick: onRequestsClick, actionProps: {
17
+ "data-testid": "allo-lycee-requests"
18
+ } }),
19
+ /* @__PURE__ */ jsxs(HomeCard.Content, { className: "align-items-center gap-8", children: [
20
+ /* @__PURE__ */ jsx(Image, { src: illuAlloLycee, alt: "", "aria-hidden": "true", width: 120, height: 86 }),
21
+ /* @__PURE__ */ jsxs("p", { className: "mb-0 w-100", children: [
22
+ t("homepage.allolycee.description", "Des dysfonctionnements matériels ou cadre de vie au sein de l’établissement ?"),
23
+ " ",
24
+ /* @__PURE__ */ jsx("strong", { children: t("homepage.allolycee.callToAction", "Signalez-le !") })
25
+ ] }),
26
+ /* @__PURE__ */ jsx(ButtonBeta, { variant: "outline", rightIcon: /* @__PURE__ */ jsx(SvgIconArrowRight, {}), onClick: onNewRequestClick, children: t("homepage.allolycee.newRequest", "Faire une demande") })
27
+ ] })
28
+ ] });
29
+ };
30
+ export {
31
+ AlloLycee as default
32
+ };
@@ -0,0 +1,4 @@
1
+ export declare function AlloLyceeContainer(): import("react/jsx-runtime").JSX.Element | null;
2
+ export declare namespace AlloLyceeContainer {
3
+ var displayName: string;
4
+ }
@@ -0,0 +1,10 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import AlloLycee from "./AlloLycee.js";
3
+ import useHasWorkflow from "../../../../hooks/useHasWorkflow/useHasWorkflow.js";
4
+ const ALLO_LYCEE_ACCESS_WORKFLOW = "allolycee.access", ALLO_LYCEE_ADDRESS = "/allolycee";
5
+ function AlloLyceeContainer() {
6
+ return useHasWorkflow(ALLO_LYCEE_ACCESS_WORKFLOW) ? /* @__PURE__ */ jsx(AlloLycee, { onRequestsClick: () => window.open(ALLO_LYCEE_ADDRESS, "_self"), onNewRequestClick: () => window.open(`${ALLO_LYCEE_ADDRESS}/new`, "_self") }) : null;
7
+ }
8
+ export {
9
+ AlloLyceeContainer
10
+ };
@@ -0,0 +1,3 @@
1
+ export * from './AlloLycee';
2
+ export { default as AlloLycee } from './AlloLycee';
3
+ export * from './AlloLyceeContainer';
@@ -63,18 +63,18 @@ const Header = ({
63
63
  onNotificationsClick == null || onNotificationsClick();
64
64
  };
65
65
  return /* @__PURE__ */ jsx("header", { className: classes, "data-product": dataProduct, children: /* @__PURE__ */ jsxs(Navbar, { className: "px-24", children: [
66
- /* @__PURE__ */ jsx(LogoBeta, { src: `${src}/img/illustrations/logo-v2.png` }),
66
+ /* @__PURE__ */ jsx(LogoBeta, { src: `${src}/img/illustrations/logo.png` }),
67
67
  /* @__PURE__ */ jsxs("ul", { className: "navbar-nav", children: [
68
- /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/timeline/timeline", translate: t("navbar.home"), "data-testid": "header-home-button", title: t("navbar.home"), children: /* @__PURE__ */ jsx(SvgIconHomeBeta, {}) }) }),
69
- communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/communities", translate: t("navbar.community"), "data-testid": "header-community-button", title: t("navbar.community"), children: /* @__PURE__ */ jsx(SvgIconCommunitiesBeta, { className: "icon community" }) }) }),
70
- conversationWorflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs(NavLink, { className: "position-relative", link: "/conversation/conversation", translate: t("conversation"), title: t("conversation"), "data-testid": "header-messagerie-button", children: [
68
+ /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/timeline/timeline", translate: t("navbar.home"), "data-testid": "header-home-button", children: /* @__PURE__ */ jsx(SvgIconHomeBeta, {}) }) }),
69
+ communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/communities", translate: t("navbar.community"), "data-testid": "header-community-button", children: /* @__PURE__ */ jsx(SvgIconCommunitiesBeta, { className: "icon community" }) }) }),
70
+ conversationWorflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs(NavLink, { className: "position-relative", link: "/conversation/conversation", translate: t("conversation"), "data-testid": "header-messagerie-button", children: [
71
71
  /* @__PURE__ */ jsx(SvgIconMessagesBeta, {}),
72
72
  hasMessages && /* @__PURE__ */ jsx(Badge, { variant: {
73
73
  type: "notification",
74
74
  level: "danger"
75
75
  }, className: "position-absolute", children: messages })
76
76
  ] }) }),
77
- hasCarbonioWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { className: "nav-link position-relative", href: "/auth/carbonio/preauth", target: "_blank", "data-testid": "header-messagerie-button", title: t("conversation"), children: [
77
+ hasCarbonioWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { className: "nav-link position-relative", href: "/auth/carbonio/preauth", target: "_blank", "data-testid": "header-messagerie-button", children: [
78
78
  /* @__PURE__ */ jsx(SvgIconMessagesBeta, {}),
79
79
  carbonioUnreadCount > 0 && /* @__PURE__ */ jsx(Badge, { variant: {
80
80
  type: "notification",
@@ -83,7 +83,7 @@ const Header = ({
83
83
  /* @__PURE__ */ jsx(VisuallyHidden, { children: t("conversation") })
84
84
  ] }) }),
85
85
  /* @__PURE__ */ jsxs(NavItem, { className: "position-relative", children: [
86
- /* @__PURE__ */ jsx(NavLink, { ref: myApps.setReference, link: "/welcome", title: t("navbar.applications"), translate: t("navbar.applications"), id: popoverAppsId, "aria-haspopup": "true", "aria-expanded": myApps.open, "data-testid": "header-my-apps-button", ...myApps.getReferenceProps({
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
87
  onClick: handleMyAppsClick
88
88
  }), children: /* @__PURE__ */ jsx(SvgIconMyAppsBeta, {}) }),
89
89
  /* @__PURE__ */ jsxs(Popover, { ref: myApps.setFloating, className: "my-apps-popover", id: popoverAppsId, isVisible: myApps.open, ...myApps.getFloatingProps(), children: [
@@ -91,9 +91,21 @@ const Header = ({
91
91
  /* @__PURE__ */ jsx(PopoverFooter, { className: "d-flex justify-content-center", children: /* @__PURE__ */ jsx(MyAppsPopoverFooter, {}) })
92
92
  ] })
93
93
  ] }),
94
- /* @__PURE__ */ jsxs(NavItem, { className: "position-relative navbar-nav-notification", children: [
95
- /* @__PURE__ */ jsx(ButtonBeta, { leftIcon: /* @__PURE__ */ jsx(SvgIconNotificationBeta, {}), variant: "ghost", title: t("navbar.notifications"), "data-testid": "header-notifications-button", "aria-label": t("navbar.notifications"), onClick: handleNotificationsClick }),
96
- hasNotificationToday && /* @__PURE__ */ jsx("span", { className: "navbar-nav-notification-badge", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("navbar.notifications.new") }) })
94
+ /* @__PURE__ */ jsxs(NavItem, { className: "position-relative", children: [
95
+ /* @__PURE__ */ jsx(ButtonBeta, { leftIcon: /* @__PURE__ */ jsx(SvgIconNotificationBeta, {}), variant: "ghost", onClick: handleNotificationsClick }),
96
+ hasNotificationToday && /* @__PURE__ */ jsx("span", { style: {
97
+ position: "absolute",
98
+ top: 0,
99
+ right: 0,
100
+ width: 15,
101
+ height: 15,
102
+ background: "red",
103
+ borderRadius: "50%",
104
+ border: "2px solid white",
105
+ pointerEvents: "none",
106
+ zIndex: 1,
107
+ display: "block"
108
+ }, "aria-label": t("homepage.notifications.new-badge") })
97
109
  ] }),
98
110
  /* @__PURE__ */ jsxs(NavItem, { className: "position-relative", children: [
99
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" }) }),
@@ -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 })
@@ -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: {
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import useDate from "../../../../../hooks/useDate/useDate.js";
3
3
  import Flex from "../../../../../components/Flex/Flex.js";
4
4
  const CommonNotificationItem = ({
@@ -12,17 +12,17 @@ const CommonNotificationItem = ({
12
12
  const {
13
13
  formatTimeAgo,
14
14
  formatDate
15
- } = useDate();
15
+ } = useDate(), content = /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "8", children: [
16
+ /* @__PURE__ */ jsx("div", { className: "notification-item-message", dangerouslySetInnerHTML: {
17
+ __html: message
18
+ } }),
19
+ children,
20
+ /* @__PURE__ */ jsx("p", { className: "notification-item-date", title: formatDate(date, "LLL"), children: formatTimeAgo(date) })
21
+ ] });
16
22
  return /* @__PURE__ */ jsx(Flex, { direction: "column", className: "notification-item", gap: "8", children: /* @__PURE__ */ jsxs(Flex, { direction: "row", justify: "between", wrap: "nowrap", gap: "8", children: [
17
23
  /* @__PURE__ */ jsxs(Flex, { direction: "row", align: "start", gap: "8", className: "notification-item-content-wrapper", children: [
18
24
  /* @__PURE__ */ jsx("div", { className: "notification-item-picture", children: picture }),
19
- /* @__PURE__ */ jsx("a", { href: uri, className: "notification-item-link", "data-testid": "notification-item-content", children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "8", children: [
20
- /* @__PURE__ */ jsx("div", { className: "notification-item-message", dangerouslySetInnerHTML: {
21
- __html: message
22
- } }),
23
- children,
24
- /* @__PURE__ */ jsx("p", { className: "notification-item-date", title: formatDate(date, "LLL"), children: formatTimeAgo(date) })
25
- ] }) })
25
+ uri ? /* @__PURE__ */ jsx("a", { href: uri, className: "notification-item-link", "data-testid": "notification-item-content", children: content }) : /* @__PURE__ */ jsx("div", { className: "notification-item-link", "data-testid": "notification-item-content", children: content })
26
26
  ] }),
27
27
  menu && /* @__PURE__ */ jsx("div", { className: "notification-item-menu", children: menu })
28
28
  ] }) });
@@ -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,
@@ -58,13 +60,13 @@ const NotificationFilterModal = ({
58
60
  return /* @__PURE__ */ jsxs("label", { className: clsx("notification-filter-chip", {
59
61
  "is-checked": checked
60
62
  }), children: [
61
- /* @__PURE__ */ jsx(AppIcon, { app: appCode, size: "24", iconFit: "contain", "aria-hidden": "true" }),
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
  ] })
@@ -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
  };
@@ -36,7 +36,8 @@ export declare const getAppCodeAndI18nKey: (appCode: string) => [string, string]
36
36
  * - Resolves the target URI from the model's `params` (handles both user and system naming conventions).
37
37
  * - Converts the MongoDB `$date` timestamp to a JS `Date`.
38
38
  * - Normalises the `type` field into a kebab-case `appCode` (e.g. `"BLOG_POST"` → `"blog-post"`).
39
- * - Strips anchor tags from the message, keeping only the inner text as `<strong>`.
39
+ * - Strips anchor tags from the message, keeping only the inner text as `<strong>`,
40
+ * except for external notifications without `resourceUri` whose links are kept.
40
41
  */
41
42
  export declare const notificationAdapter: (notification: NotificationModel) => WebNotification;
42
43
  export {};