@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.6.10-develop-b2school.20261023141442",
3
+ "version": "2.6.10-develop-pedago.20261023145636",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -81,47 +81,39 @@
81
81
  "@dnd-kit/core": "6.3.1",
82
82
  "@dnd-kit/sortable": "8.0.0",
83
83
  "@dnd-kit/utilities": "3.2.2",
84
+ "@floating-ui/dom": "1.6.0",
84
85
  "@floating-ui/react": "0.26.0",
85
86
  "@popperjs/core": "2.11.8",
86
87
  "@screeb/sdk-browser": "0.5.0",
87
88
  "@screeb/sdk-react": "0.6.0",
88
- "@tiptap/core": "2.11.0",
89
- "@tiptap/extension-blockquote": "2.11.0",
90
- "@tiptap/extension-bullet-list": "2.11.0",
91
- "@tiptap/extension-character-count": "2.11.0",
92
- "@tiptap/extension-code": "2.11.0",
93
- "@tiptap/extension-code-block": "2.11.0",
94
- "@tiptap/extension-color": "2.11.0",
95
- "@tiptap/extension-dropcursor": "2.11.0",
96
- "@tiptap/extension-focus": "2.11.0",
97
- "@tiptap/extension-font-family": "2.11.0",
98
- "@tiptap/extension-gapcursor": "2.11.0",
99
- "@tiptap/extension-hard-break": "2.11.0",
100
- "@tiptap/extension-heading": "2.11.0",
101
- "@tiptap/extension-highlight": "2.11.0",
102
- "@tiptap/extension-history": "2.11.0",
103
- "@tiptap/extension-horizontal-rule": "2.11.0",
104
- "@tiptap/extension-image": "2.11.0",
105
- "@tiptap/extension-italic": "2.11.0",
106
- "@tiptap/extension-link": "2.11.0",
107
- "@tiptap/extension-list-item": "2.11.0",
108
- "@tiptap/extension-mathematics": "2.22.0",
109
- "@tiptap/extension-ordered-list": "2.11.0",
110
- "@tiptap/extension-placeholder": "2.11.0",
111
- "@tiptap/extension-strike": "2.11.0",
112
- "@tiptap/extension-subscript": "2.11.0",
113
- "@tiptap/extension-superscript": "2.11.0",
114
- "@tiptap/extension-table": "2.11.0",
115
- "@tiptap/extension-table-cell": "2.11.0",
116
- "@tiptap/extension-table-header": "2.11.0",
117
- "@tiptap/extension-table-row": "2.11.0",
118
- "@tiptap/extension-text-align": "2.11.0",
119
- "@tiptap/extension-text-style": "2.11.0",
120
- "@tiptap/extension-typography": "2.11.0",
121
- "@tiptap/extension-underline": "2.11.0",
122
- "@tiptap/pm": "2.11.0",
123
- "@tiptap/react": "2.11.0",
124
- "@tiptap/starter-kit": "2.11.0",
89
+ "@tiptap/core": "3.32.0",
90
+ "@tiptap/extension-blockquote": "3.32.0",
91
+ "@tiptap/extension-code": "3.32.0",
92
+ "@tiptap/extension-code-block": "3.32.0",
93
+ "@tiptap/extension-hard-break": "3.32.0",
94
+ "@tiptap/extension-heading": "3.32.0",
95
+ "@tiptap/extension-highlight": "3.32.0",
96
+ "@tiptap/extension-horizontal-rule": "3.32.0",
97
+ "@tiptap/extension-image": "3.32.0",
98
+ "@tiptap/extension-italic": "3.32.0",
99
+ "@tiptap/extension-link": "3.32.0",
100
+ "@tiptap/extension-mathematics": "3.32.0",
101
+ "@tiptap/extension-strike": "3.32.0",
102
+ "@tiptap/extension-subscript": "3.32.0",
103
+ "@tiptap/extension-superscript": "3.32.0",
104
+ "@tiptap/extension-table": "3.32.0",
105
+ "@tiptap/extension-text-align": "3.32.0",
106
+ "@tiptap/extension-text-style": "3.32.0",
107
+ "@tiptap/extension-color": "3.32.0",
108
+ "@tiptap/extension-font-family": "3.32.0",
109
+ "@tiptap/extension-typography": "3.32.0",
110
+ "@tiptap/extension-underline": "3.32.0",
111
+ "@tiptap/extension-list": "3.32.0",
112
+ "@tiptap/extension-bubble-menu": "3.32.0",
113
+ "@tiptap/extensions": "3.32.0",
114
+ "@tiptap/pm": "3.32.0",
115
+ "@tiptap/react": "3.32.0",
116
+ "@tiptap/starter-kit": "3.32.0",
125
117
  "@uidotdev/usehooks": "2.4.1",
126
118
  "antd": "5.29.1",
127
119
  "clsx": "2.1.1",
@@ -140,9 +132,9 @@
140
132
  "swiper": "10.1.0",
141
133
  "ua-parser-js": "1.0.36",
142
134
  "zustand": "4.5.7",
143
- "@edifice.io/bootstrap": "2.6.10-develop-b2school.20261023141442",
144
- "@edifice.io/tiptap-extensions": "2.6.10-develop-b2school.20261023141442",
145
- "@edifice.io/utilities": "2.6.10-develop-b2school.20261023141442"
135
+ "@edifice.io/bootstrap": "2.6.10-develop-pedago.20261023145636",
136
+ "@edifice.io/tiptap-extensions": "2.6.10-develop-pedago.20261023145636",
137
+ "@edifice.io/utilities": "2.6.10-develop-pedago.20261023145636"
146
138
  },
147
139
  "devDependencies": {
148
140
  "@babel/plugin-transform-react-pure-annotations": "7.27.1",
@@ -173,8 +165,8 @@
173
165
  "vite": "5.4.14",
174
166
  "vite-plugin-dts": "4.5.4",
175
167
  "vite-tsconfig-paths": "5.1.4",
176
- "@edifice.io/client": "2.6.10-develop-b2school.20261023141442",
177
- "@edifice.io/config": "2.6.10-develop-b2school.20261023141442"
168
+ "@edifice.io/client": "2.6.10-develop-pedago.20261023145636",
169
+ "@edifice.io/config": "2.6.10-develop-pedago.20261023145636"
178
170
  },
179
171
  "peerDependencies": {
180
172
  "@react-spring/web": "9.7.5",
@@ -1,2 +0,0 @@
1
- import { FloatingMenuProps } from '@tiptap/react';
2
- export declare const tippyOptions: FloatingMenuProps['tippyOptions'];
@@ -1,8 +0,0 @@
1
- const tippyOptions = {
2
- placement: "bottom",
3
- offset: [0, 10],
4
- zIndex: 999
5
- };
6
- export {
7
- tippyOptions
8
- };
@@ -1,10 +0,0 @@
1
- import { CalendarEvent } from '@edifice.io/client';
2
- export interface AgendaProps {
3
- events: CalendarEvent[];
4
- onEventClick?: (event: CalendarEvent) => void;
5
- onOpenAgendaClick?: () => void;
6
- }
7
- export declare const Agenda: {
8
- ({ events, onEventClick, onOpenAgendaClick, }: AgendaProps): import("react/jsx-runtime").JSX.Element;
9
- displayName: string;
10
- };
@@ -1,54 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useMemo } from "react";
3
- import { useTranslation } from "react-i18next";
4
- import illuEmptyAgenda from "@edifice.io/bootstrap/dist/images/homepage/illu-empty-agenda.svg";
5
- import SvgIconExternalLink from "../../../icons/components/IconExternalLink.js";
6
- import HomeCard from "../HomeCard/HomeCard.js";
7
- import { AgendaEventCard } from "./AgendaEventCard.js";
8
- import useDate from "../../../../hooks/useDate/useDate.js";
9
- import Flex from "../../../../components/Flex/Flex.js";
10
- const capitalize = (value) => value.charAt(0).toUpperCase() + value.slice(1), Agenda = ({
11
- events,
12
- onEventClick,
13
- onOpenAgendaClick = () => window.open("/calendar", "_self")
14
- }) => {
15
- const {
16
- t
17
- } = useTranslation(), {
18
- formatDate,
19
- dateIsSame
20
- } = useDate(), dayGroups = useMemo(() => {
21
- const now = (/* @__PURE__ */ new Date()).toISOString();
22
- return events.reduce((groups, event) => {
23
- const lastGroup = groups[groups.length - 1];
24
- return lastGroup && dateIsSame(lastGroup.date, event.startMoment, "day") ? (lastGroup.events.push(event), groups) : (groups.push({
25
- key: event.id,
26
- date: event.startMoment,
27
- weekday: capitalize(formatDate(event.startMoment, "ddd")),
28
- day: formatDate(event.startMoment, "D"),
29
- month: dateIsSame(event.startMoment, now, "month") ? void 0 : formatDate(event.startMoment, "MMM"),
30
- events: [event]
31
- }), groups);
32
- }, []);
33
- }, [events, dateIsSame, formatDate]);
34
- return /* @__PURE__ */ jsxs(HomeCard, { variant: "primary", children: [
35
- /* @__PURE__ */ jsx(HomeCard.Header, { title: t("homepage.agenda.title"), actionLeftIcon: /* @__PURE__ */ jsx(SvgIconExternalLink, { width: "20", height: "20" }), onActionClick: onOpenAgendaClick, actionProps: {
36
- "aria-label": t("homepage.agenda.openAgenda"),
37
- "data-testid": "agenda-button-open"
38
- } }),
39
- /* @__PURE__ */ jsx(HomeCard.Content, { children: dayGroups.length === 0 ? /* @__PURE__ */ jsxs(Flex, { direction: "column", align: "center", gap: "8", className: "agenda-empty", children: [
40
- /* @__PURE__ */ jsx("img", { src: illuEmptyAgenda, alt: "", width: 64, height: 64 }),
41
- /* @__PURE__ */ jsx("span", { className: "agenda-empty-text", children: t("homepage.agenda.empty") })
42
- ] }) : /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "8", className: "agenda-content", children: dayGroups.map((group) => /* @__PURE__ */ jsxs(Flex, { gap: "4", className: "agenda-day-group", "data-testid": "agenda-day-group", children: [
43
- /* @__PURE__ */ jsxs(Flex, { direction: "column", align: "center", className: "agenda-day-group-date", children: [
44
- /* @__PURE__ */ jsx("span", { children: group.weekday }),
45
- /* @__PURE__ */ jsx("span", { className: "agenda-day-group-date-number", children: group.day }),
46
- group.month && /* @__PURE__ */ jsx("span", { children: group.month })
47
- ] }),
48
- /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "8", className: "agenda-day-group-events", children: group.events.map((event) => /* @__PURE__ */ jsx(AgendaEventCard, { event, onClick: () => onEventClick == null ? void 0 : onEventClick(event) }, event.id)) })
49
- ] }, group.key)) }) })
50
- ] });
51
- };
52
- export {
53
- Agenda
54
- };
@@ -1 +0,0 @@
1
- export declare function AgendaContainer(): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Agenda } from "./Agenda.js";
3
- import { useAgendaContainer } from "./hooks/useAgendaContainer.js";
4
- function AgendaContainer() {
5
- const {
6
- events
7
- } = useAgendaContainer();
8
- return /* @__PURE__ */ jsx(Agenda, { events, onEventClick: (event) => {
9
- window.open(`/calendar#/view/${event.calendarId}/event/${event.id}`, "_self");
10
- } });
11
- }
12
- export {
13
- AgendaContainer
14
- };
@@ -1,10 +0,0 @@
1
- import { CalendarEvent } from '@edifice.io/client';
2
- import { MouseEventHandler } from 'react';
3
- export interface AgendaEventCardProps {
4
- event: CalendarEvent;
5
- onClick?: MouseEventHandler<HTMLButtonElement>;
6
- }
7
- export declare const AgendaEventCard: {
8
- ({ event, onClick }: AgendaEventCardProps): import("react/jsx-runtime").JSX.Element;
9
- displayName: string;
10
- };
@@ -1,30 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { useTranslation } from "react-i18next";
3
- import SvgIconClock from "../../../icons/components/IconClock.js";
4
- import useDate from "../../../../hooks/useDate/useDate.js";
5
- import Flex from "../../../../components/Flex/Flex.js";
6
- const capitalize = (value) => value.charAt(0).toUpperCase() + value.slice(1), AgendaEventCard = ({
7
- event,
8
- onClick
9
- }) => {
10
- const {
11
- t
12
- } = useTranslation(), {
13
- formatDate,
14
- dateIsSame
15
- } = useDate(), formatTime = (date) => formatDate(date, "HH[h]mm"), timeLabel = event.allDay ? t("homepage.agenda.allDay") : dateIsSame(event.startMoment, event.endMoment, "day") ? `${formatTime(event.startMoment)} - ${formatTime(event.endMoment)}` : t("homepage.agenda.multiDayTime", {
16
- startTime: formatTime(event.startMoment),
17
- endDay: capitalize(formatDate(event.endMoment, "ddd D")),
18
- endTime: formatTime(event.endMoment)
19
- });
20
- return /* @__PURE__ */ jsxs("button", { type: "button", className: "agenda-event-card", onClick, "data-testid": "agenda-event-card", children: [
21
- /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "8", className: "agenda-event-card-time", children: [
22
- /* @__PURE__ */ jsx(SvgIconClock, { width: "20", height: "20" }),
23
- /* @__PURE__ */ jsx("span", { children: timeLabel })
24
- ] }),
25
- /* @__PURE__ */ jsx("p", { className: "agenda-event-card-title", children: event.title })
26
- ] });
27
- };
28
- export {
29
- AgendaEventCard
30
- };
@@ -1,14 +0,0 @@
1
- import { CalendarEvent } from '@edifice.io/client';
2
- /** Number of upcoming events shown by the widget. */
3
- export declare const MAX_VISIBLE_EVENTS = 3;
4
- export interface UseAgendaContainerReturn {
5
- events: CalendarEvent[];
6
- isLoading: boolean;
7
- error: Error | null;
8
- }
9
- /**
10
- * Loads the current user's calendars, then their events, and keeps only the
11
- * next `MAX_VISIBLE_EVENTS` events that haven't fully elapsed yet — an event
12
- * still in progress (end date in the future) counts as "upcoming" too.
13
- */
14
- export declare const useAgendaContainer: () => UseAgendaContainerReturn;
@@ -1,27 +0,0 @@
1
- import dayjs from "dayjs";
2
- import { useMemo } from "react";
3
- import { useCalendars, useEvents } from "../services/queries/agenda.js";
4
- const MAX_VISIBLE_EVENTS = 3, useAgendaContainer = () => {
5
- const {
6
- data: calendars,
7
- isLoading: isLoadingCalendars,
8
- error: calendarsError
9
- } = useCalendars(), calendarIds = useMemo(() => (calendars == null ? void 0 : calendars.map((calendar) => calendar.id)) ?? [], [calendars]), {
10
- data: rawEvents,
11
- isLoading: isLoadingEvents,
12
- error: eventsError
13
- } = useEvents(calendarIds, MAX_VISIBLE_EVENTS);
14
- return {
15
- events: useMemo(() => {
16
- if (!rawEvents) return [];
17
- const now = dayjs();
18
- return rawEvents.filter((event) => dayjs(event.endMoment).isAfter(now)).sort((a, b) => dayjs(a.startMoment).diff(dayjs(b.startMoment))).slice(0, MAX_VISIBLE_EVENTS);
19
- }, [rawEvents]),
20
- isLoading: isLoadingCalendars || isLoadingEvents,
21
- error: calendarsError ?? eventsError
22
- };
23
- };
24
- export {
25
- MAX_VISIBLE_EVENTS,
26
- useAgendaContainer
27
- };
@@ -1,3 +0,0 @@
1
- export * from './Agenda';
2
- export * from './AgendaContainer';
3
- export * from './AgendaEventCard';
@@ -1,24 +0,0 @@
1
- import { Calendar, CalendarEvent } from '@edifice.io/client';
2
- /**
3
- * Creates an agenda service with methods to fetch the current user's
4
- * calendars and upcoming events (homepage "Agenda" widget).
5
- *
6
- * Backend contract (provisional, see IMPULS-5880/IMPULS-6095): `GET
7
- * /calendar/calendars` lists the user's calendars, `GET
8
- * /calendar/events/widget?calendarId=...&nb=N` returns up to `N` events for
9
- * the given calendars. Whether that second endpoint already excludes past
10
- * (fully elapsed) events isn't guaranteed, so callers should re-apply that
11
- * filter themselves.
12
- *
13
- * @param baseURL The base URL for the agenda service API.
14
- */
15
- export declare const createAgendaService: (baseURL: string) => {
16
- /**
17
- * Get the calendars the current user can see events from.
18
- */
19
- getCalendars(): Promise<Calendar[]>;
20
- /**
21
- * Get up to `nb` events for the given calendars, in no particular order.
22
- */
23
- getEvents(calendarIds: string[], nb: number): Promise<CalendarEvent[]>;
24
- };
@@ -1,45 +0,0 @@
1
- import { odeServices } from "@edifice.io/client";
2
- const toCalendar = ({
3
- _id,
4
- title,
5
- color,
6
- isExternal
7
- }) => ({
8
- id: _id,
9
- title,
10
- color,
11
- isExternal
12
- }), toCalendarEvent = ({
13
- _id,
14
- title,
15
- allday,
16
- startMoment,
17
- endMoment,
18
- calendar
19
- }) => ({
20
- id: _id,
21
- calendarId: calendar[0],
22
- title,
23
- startMoment,
24
- endMoment,
25
- allDay: allday
26
- }), createAgendaService = (baseURL) => ({
27
- /**
28
- * Get the calendars the current user can see events from.
29
- */
30
- async getCalendars() {
31
- return (await odeServices.http().get(`${baseURL}/calendar/calendars`)).map(toCalendar);
32
- },
33
- /**
34
- * Get up to `nb` events for the given calendars, in no particular order.
35
- */
36
- async getEvents(calendarIds, nb) {
37
- if (calendarIds.length === 0)
38
- return [];
39
- const query = new URLSearchParams();
40
- return calendarIds.forEach((id) => query.append("calendarId", id)), query.set("nb", String(nb)), (await odeServices.http().get(`${baseURL}/calendar/events/widget?${query.toString()}`)).map(toCalendarEvent);
41
- }
42
- });
43
- export {
44
- createAgendaService
45
- };
@@ -1,4 +0,0 @@
1
- export declare const agendaService: {
2
- getCalendars(): Promise<import('@edifice.io/client').Calendar[]>;
3
- getEvents(calendarIds: string[], nb: number): Promise<import('@edifice.io/client').CalendarEvent[]>;
4
- };
@@ -1,5 +0,0 @@
1
- import { createAgendaService } from "./agendaService.js";
2
- const agendaService = createAgendaService("");
3
- export {
4
- agendaService
5
- };
@@ -1,19 +0,0 @@
1
- import { Calendar, CalendarEvent } from '@edifice.io/client';
2
- export declare const agendaQueryKeys: {
3
- calendars: () => readonly ["agenda", "calendars"];
4
- events: (calendarIds: string[], nb: number) => readonly ["agenda", "events", string[], number];
5
- };
6
- export declare const agendaQueryOptions: {
7
- getCalendars(): import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<Calendar[], Error, Calendar[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
8
- queryFn?: import('@tanstack/react-query').QueryFunction<Calendar[], import('@tanstack/react-query').QueryKey, never> | undefined;
9
- } & {
10
- queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, Calendar[]>;
11
- };
12
- getEvents(calendarIds: string[], nb: number): import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<CalendarEvent[], Error, CalendarEvent[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
13
- queryFn?: import('@tanstack/react-query').QueryFunction<CalendarEvent[], import('@tanstack/react-query').QueryKey, never> | undefined;
14
- } & {
15
- queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, CalendarEvent[]>;
16
- };
17
- };
18
- export declare const useCalendars: () => import('@tanstack/react-query').UseQueryResult<Calendar[], Error>;
19
- export declare const useEvents: (calendarIds: string[], nb: number) => import('@tanstack/react-query').UseQueryResult<CalendarEvent[], Error>;
@@ -1,26 +0,0 @@
1
- import { useQuery, queryOptions } from "@tanstack/react-query";
2
- import { agendaService } from "../api/index.js";
3
- const agendaQueryKeys = {
4
- calendars: () => ["agenda", "calendars"],
5
- events: (calendarIds, nb) => ["agenda", "events", calendarIds, nb]
6
- }, agendaQueryOptions = {
7
- getCalendars() {
8
- return queryOptions({
9
- queryKey: agendaQueryKeys.calendars(),
10
- queryFn: async () => agendaService.getCalendars()
11
- });
12
- },
13
- getEvents(calendarIds, nb) {
14
- return queryOptions({
15
- queryKey: agendaQueryKeys.events(calendarIds, nb),
16
- queryFn: async () => agendaService.getEvents(calendarIds, nb),
17
- enabled: calendarIds.length > 0
18
- });
19
- }
20
- }, useCalendars = () => useQuery(agendaQueryOptions.getCalendars()), useEvents = (calendarIds, nb) => useQuery(agendaQueryOptions.getEvents(calendarIds, nb));
21
- export {
22
- agendaQueryKeys,
23
- agendaQueryOptions,
24
- useCalendars,
25
- useEvents
26
- };
@@ -1,9 +0,0 @@
1
- import { BriefMeArticle, BriefMeStatus } from './types';
2
- export interface BriefMeProps {
3
- handleActionClick: () => void;
4
- status: BriefMeStatus;
5
- category: string;
6
- onCategoryChange: (value: string) => void;
7
- articles: BriefMeArticle[];
8
- }
9
- export default function BriefMe({ handleActionClick, status, category, onCategoryChange, articles, }: BriefMeProps): import("react/jsx-runtime").JSX.Element;
@@ -1,59 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import illuBriefMeError from "@edifice.io/bootstrap/dist/images/homepage/illu-briefme-error.svg";
3
- import clsx from "clsx";
4
- import { useTranslation } from "react-i18next";
5
- import SvgIconExternalLink from "../../../icons/components/IconExternalLink.js";
6
- import HomeCard from "../HomeCard/HomeCard.js";
7
- import IconButton from "../../../../components/Button/IconButton.js";
8
- import SegmentedControl from "../../../../components/SegmentedControl/SegmentedControl.js";
9
- import TextSkeleton from "../../../../components/Skeleton/TextSkeleton.js";
10
- import Image from "../../../../components/Image/Image.js";
11
- function BriefMe({
12
- handleActionClick,
13
- status,
14
- category,
15
- onCategoryChange,
16
- articles
17
- }) {
18
- const {
19
- t
20
- } = useTranslation(), categoryOptions = [{
21
- label: t("homepage.briefme.category.briefme"),
22
- value: "briefme"
23
- }, {
24
- label: t("homepage.briefme.category.brief-eco"),
25
- value: "brief-eco"
26
- }, {
27
- label: t("homepage.briefme.category.brief-science"),
28
- value: "brief-science"
29
- }];
30
- return /* @__PURE__ */ jsxs(HomeCard, { variant: "primary", className: "briefme", children: [
31
- /* @__PURE__ */ jsxs("div", { className: "briefme__header", children: [
32
- /* @__PURE__ */ jsx("h3", { className: "briefme__title", children: t("homepage.briefme.title") }),
33
- /* @__PURE__ */ jsx(IconButton, { "aria-label": t("homepage.briefme.open"), onClick: handleActionClick, icon: /* @__PURE__ */ jsx(SvgIconExternalLink, {}), variant: "ghost", color: "tertiary" })
34
- ] }),
35
- /* @__PURE__ */ jsxs(HomeCard.Content, { className: clsx("briefme__body", `briefme__body--${status}`), children: [
36
- status !== "error" && /* @__PURE__ */ jsx(SegmentedControl, { "aria-label": t("homepage.briefme.categories"), options: categoryOptions, value: category, onChange: onCategoryChange, className: "briefme__categories" }),
37
- status === "loading" && /* @__PURE__ */ jsxs("div", { className: "briefme__loading", "data-testid": "briefme-loading", children: [
38
- /* @__PURE__ */ jsx(TextSkeleton, { size: "lg", className: "briefme__loading-item" }),
39
- /* @__PURE__ */ jsx(TextSkeleton, { size: "lg", className: "briefme__loading-item" }),
40
- /* @__PURE__ */ jsx(TextSkeleton, { size: "lg", className: "briefme__loading-item" })
41
- ] }),
42
- status === "error" && /* @__PURE__ */ jsxs("div", { className: "briefme__error", children: [
43
- /* @__PURE__ */ jsx(Image, { src: illuBriefMeError, alt: "", className: "briefme__error-illu" }),
44
- /* @__PURE__ */ jsxs("p", { className: "briefme__error-message", children: [
45
- /* @__PURE__ */ jsx("span", { className: "briefme__error-line", children: t("homepage.briefme.error.connection") }),
46
- /* @__PURE__ */ jsx("span", { className: "briefme__error-line", children: t("homepage.briefme.error.help") })
47
- ] })
48
- ] }),
49
- status === "empty" && /* @__PURE__ */ jsx("p", { className: "briefme__empty", children: t("homepage.briefme.empty") }),
50
- status === "default" && /* @__PURE__ */ jsx("ul", { className: "briefme__list", children: articles.map((article) => /* @__PURE__ */ jsxs("li", { className: "briefme__article", children: [
51
- /* @__PURE__ */ jsx("span", { className: "briefme__article-date", children: article.date }),
52
- /* @__PURE__ */ jsx("a", { className: "briefme__article-title", href: article.url, target: "_blank", rel: "noopener noreferrer", children: article.title })
53
- ] }, article.id)) })
54
- ] })
55
- ] });
56
- }
57
- export {
58
- BriefMe as default
59
- };
@@ -1,4 +0,0 @@
1
- export declare function BriefMeContainer(): import("react/jsx-runtime").JSX.Element;
2
- export declare namespace BriefMeContainer {
3
- var displayName: string;
4
- }
@@ -1,17 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import BriefMe from "./BriefMe.js";
3
- import { useBriefMe } from "./useBriefMe.js";
4
- function BriefMeContainer() {
5
- const {
6
- category,
7
- setCategory,
8
- articles,
9
- status
10
- } = useBriefMe();
11
- return /* @__PURE__ */ jsx(BriefMe, { handleActionClick: () => {
12
- window.open("https://brief.me", "_blank", "noopener,noreferrer");
13
- }, status, category, onCategoryChange: (value) => setCategory(value), articles });
14
- }
15
- export {
16
- BriefMeContainer
17
- };
@@ -1,4 +0,0 @@
1
- export * from './BriefMe';
2
- export { default as BriefMe } from './BriefMe';
3
- export * from './BriefMeContainer';
4
- export * from './useBriefMe';
@@ -1,17 +0,0 @@
1
- export interface BriefMeArticle {
2
- id: string;
3
- date: string;
4
- title: string;
5
- url: string;
6
- }
7
- export type BriefMeStatus = 'loading' | 'default' | 'empty' | 'error';
8
- /**
9
- * Brief.me feeds are proxied and cached by app-registry, one endpoint per
10
- * category. Keys match the SegmentedControl option values of `BriefMe`.
11
- */
12
- export declare const BRIEFME_ENDPOINTS: {
13
- readonly briefme: "/appregistry/widget/cache/external/briefme";
14
- readonly 'brief-eco': "/appregistry/widget/cache/external/briefeco";
15
- readonly 'brief-science': "/appregistry/widget/cache/external/briefscience";
16
- };
17
- export type BriefMeCategory = keyof typeof BRIEFME_ENDPOINTS;
@@ -1,8 +0,0 @@
1
- const BRIEFME_ENDPOINTS = {
2
- briefme: "/appregistry/widget/cache/external/briefme",
3
- "brief-eco": "/appregistry/widget/cache/external/briefeco",
4
- "brief-science": "/appregistry/widget/cache/external/briefscience"
5
- };
6
- export {
7
- BRIEFME_ENDPOINTS
8
- };
@@ -1,31 +0,0 @@
1
- import { School } from '@edifice.io/client';
2
- import { BriefMeArticle, BriefMeCategory, BriefMeStatus } from './types';
3
- interface BriefMeEntry {
4
- title: string;
5
- published_at: string;
6
- url: string;
7
- }
8
- /**
9
- * Article URLs served by Brief.me embed the literal `ID_ETAB` and `ID_ENT`
10
- * placeholders, which identify the subscribing school to their SSO. Both are
11
- * replaced by base64-encoded values: the school UAI, and the GAR code taken
12
- * from its exports.
13
- */
14
- export declare function buildGarLink(url: string, school?: School): string;
15
- export declare function briefMeQueryOptions(category: BriefMeCategory): import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<BriefMeEntry[], Error, BriefMeEntry[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
16
- queryFn?: import('@tanstack/react-query').QueryFunction<BriefMeEntry[], import('@tanstack/react-query').QueryKey, never> | undefined;
17
- } & {
18
- queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, BriefMeEntry[]>;
19
- };
20
- /**
21
- * Loads the Brief.me articles of the selected category (most recent first,
22
- * capped at `BRIEFME_MAX_ARTICLES`), and resolves their links against the
23
- * school currently selected by the user.
24
- */
25
- export declare function useBriefMe(): {
26
- category: "briefme" | "brief-eco" | "brief-science";
27
- setCategory: import('react').Dispatch<import('react').SetStateAction<"briefme" | "brief-eco" | "brief-science">>;
28
- articles: BriefMeArticle[];
29
- status: BriefMeStatus;
30
- };
31
- export {};