@edifice.io/react 2.6.12-develop-b2school.20261103172112 → 2.6.12-develop.20261104120548

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 (197) 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 +24 -97
  12. package/dist/hooks/useDropdown/useDropdown.js +2 -2
  13. package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +6 -2
  14. package/dist/hooks/useZendeskGuide/useZendeskGuide.js +8 -11
  15. package/dist/icons.js +404 -406
  16. package/dist/index.js +0 -2
  17. package/dist/modules/HelpZone/HelpZone.js +8 -6
  18. package/dist/modules/HelpZone/HelpZoneContainer.js +5 -2
  19. package/dist/modules/editor/components/Editor/Editor.d.ts +0 -5
  20. package/dist/modules/editor/components/Editor/Editor.js +0 -3
  21. package/dist/modules/homepage/components/Header/Header.js +21 -9
  22. package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +1 -5
  23. package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +1 -1
  24. package/dist/modules/homepage/components/Notifications/NotificationList.js +8 -7
  25. package/dist/modules/homepage/components/Notifications/NotificationListSkeleton.js +12 -7
  26. package/dist/modules/homepage/components/Notifications/NotificationSkeleton.js +4 -7
  27. package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.js +13 -11
  28. package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js +12 -6
  29. package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +10 -12
  30. package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.js +10 -9
  31. package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.js +1 -1
  32. package/dist/modules/homepage/{hooks → components/SchoolSpace}/useUserSchools.d.ts +2 -2
  33. package/dist/modules/homepage/{hooks → components/SchoolSpace}/useUserSchools.js +4 -4
  34. package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.js +2 -2
  35. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.js +2 -2
  36. package/dist/modules/homepage/components/UserSpace/UserSpace.d.ts +1 -3
  37. package/dist/modules/homepage/components/UserSpace/UserSpace.js +7 -13
  38. package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.d.ts +2 -4
  39. package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.js +2 -3
  40. package/dist/modules/homepage/components/index.d.ts +1 -12
  41. package/dist/modules/icons/components/index.d.ts +0 -1
  42. package/dist/modules/icons/components/nav/IconCommunitiesBeta.js +7 -5
  43. package/dist/modules/icons/components/nav/IconHomeBeta.js +3 -6
  44. package/dist/modules/icons/components/nav/IconMessagesBeta.js +7 -7
  45. package/dist/modules/icons/components/nav/IconMyAppsBeta.js +3 -2
  46. package/dist/modules/icons/components/nav/IconNotificationBeta.js +4 -2
  47. package/dist/modules/multimedia/Workspace/Workspace.js +1 -1
  48. package/package.json +6 -7
  49. package/dist/components/Masonry/Masonry.d.ts +0 -40
  50. package/dist/components/Masonry/Masonry.js +0 -50
  51. package/dist/components/Masonry/index.d.ts +0 -2
  52. package/dist/modules/homepage/components/Agenda/Agenda.d.ts +0 -10
  53. package/dist/modules/homepage/components/Agenda/Agenda.js +0 -54
  54. package/dist/modules/homepage/components/Agenda/AgendaContainer.d.ts +0 -1
  55. package/dist/modules/homepage/components/Agenda/AgendaContainer.js +0 -14
  56. package/dist/modules/homepage/components/Agenda/AgendaEventCard.d.ts +0 -10
  57. package/dist/modules/homepage/components/Agenda/AgendaEventCard.js +0 -30
  58. package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.d.ts +0 -14
  59. package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.js +0 -27
  60. package/dist/modules/homepage/components/Agenda/index.d.ts +0 -3
  61. package/dist/modules/homepage/components/Agenda/services/api/agendaService.d.ts +0 -24
  62. package/dist/modules/homepage/components/Agenda/services/api/agendaService.js +0 -45
  63. package/dist/modules/homepage/components/Agenda/services/api/index.d.ts +0 -4
  64. package/dist/modules/homepage/components/Agenda/services/api/index.js +0 -5
  65. package/dist/modules/homepage/components/Agenda/services/queries/agenda.d.ts +0 -19
  66. package/dist/modules/homepage/components/Agenda/services/queries/agenda.js +0 -26
  67. package/dist/modules/homepage/components/BriefMe/BriefMe.d.ts +0 -9
  68. package/dist/modules/homepage/components/BriefMe/BriefMe.js +0 -59
  69. package/dist/modules/homepage/components/BriefMe/BriefMeContainer.d.ts +0 -4
  70. package/dist/modules/homepage/components/BriefMe/BriefMeContainer.js +0 -17
  71. package/dist/modules/homepage/components/BriefMe/index.d.ts +0 -4
  72. package/dist/modules/homepage/components/BriefMe/types.d.ts +0 -17
  73. package/dist/modules/homepage/components/BriefMe/types.js +0 -8
  74. package/dist/modules/homepage/components/BriefMe/useBriefMe.d.ts +0 -31
  75. package/dist/modules/homepage/components/BriefMe/useBriefMe.js +0 -51
  76. package/dist/modules/homepage/components/Cantine/Cantine.d.ts +0 -7
  77. package/dist/modules/homepage/components/Cantine/Cantine.js +0 -44
  78. package/dist/modules/homepage/components/Cantine/CantineContainer.d.ts +0 -4
  79. package/dist/modules/homepage/components/Cantine/CantineContainer.js +0 -18
  80. package/dist/modules/homepage/components/Cantine/CantineModal.d.ts +0 -24
  81. package/dist/modules/homepage/components/Cantine/CantineModal.js +0 -88
  82. package/dist/modules/homepage/components/Cantine/CantineModalContainer.d.ts +0 -7
  83. package/dist/modules/homepage/components/Cantine/CantineModalContainer.js +0 -12
  84. package/dist/modules/homepage/components/Cantine/components/CantineLegend.d.ts +0 -5
  85. package/dist/modules/homepage/components/Cantine/components/CantineLegend.js +0 -22
  86. package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.d.ts +0 -6
  87. package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.js +0 -28
  88. package/dist/modules/homepage/components/Cantine/components/cantineLabels.d.ts +0 -12
  89. package/dist/modules/homepage/components/Cantine/components/cantineLabels.js +0 -60
  90. package/dist/modules/homepage/components/Cantine/hooks/useCantine.d.ts +0 -11
  91. package/dist/modules/homepage/components/Cantine/hooks/useCantine.js +0 -20
  92. package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.d.ts +0 -24
  93. package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.js +0 -65
  94. package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.d.ts +0 -23
  95. package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.js +0 -43
  96. package/dist/modules/homepage/components/Cantine/index.d.ts +0 -7
  97. package/dist/modules/homepage/components/Cantine/types.d.ts +0 -42
  98. package/dist/modules/homepage/components/Edumalin/Edumalin.d.ts +0 -9
  99. package/dist/modules/homepage/components/Edumalin/Edumalin.js +0 -65
  100. package/dist/modules/homepage/components/Edumalin/EdumalinContainer.d.ts +0 -4
  101. package/dist/modules/homepage/components/Edumalin/EdumalinContainer.js +0 -21
  102. package/dist/modules/homepage/components/Edumalin/EdumalinModal.d.ts +0 -8
  103. package/dist/modules/homepage/components/Edumalin/EdumalinModal.js +0 -62
  104. package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.d.ts +0 -5
  105. package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.js +0 -38
  106. package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.d.ts +0 -5
  107. package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.js +0 -12
  108. package/dist/modules/homepage/components/Edumalin/index.d.ts +0 -7
  109. package/dist/modules/homepage/components/Edumalin/types.d.ts +0 -24
  110. package/dist/modules/homepage/components/Edumalin/types.js +0 -4
  111. package/dist/modules/homepage/components/Edumalin/useEdumalin.d.ts +0 -16
  112. package/dist/modules/homepage/components/Edumalin/useEdumalin.js +0 -35
  113. package/dist/modules/homepage/components/Edumalin/utils.d.ts +0 -28
  114. package/dist/modules/homepage/components/Edumalin/utils.js +0 -56
  115. package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.d.ts +0 -16
  116. package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.js +0 -65
  117. package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.d.ts +0 -4
  118. package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.js +0 -12
  119. package/dist/modules/homepage/components/GenerationHdf/formatSolde.d.ts +0 -1
  120. package/dist/modules/homepage/components/GenerationHdf/formatSolde.js +0 -6
  121. package/dist/modules/homepage/components/GenerationHdf/index.d.ts +0 -3
  122. package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.d.ts +0 -10
  123. package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.js +0 -69
  124. package/dist/modules/homepage/components/Qwant/Qwant.d.ts +0 -4
  125. package/dist/modules/homepage/components/Qwant/Qwant.js +0 -41
  126. package/dist/modules/homepage/components/Qwant/QwantContainer.d.ts +0 -1
  127. package/dist/modules/homepage/components/Qwant/QwantContainer.js +0 -10
  128. package/dist/modules/homepage/components/Qwant/index.d.ts +0 -3
  129. package/dist/modules/homepage/components/Rss/Rss.d.ts +0 -11
  130. package/dist/modules/homepage/components/Rss/Rss.js +0 -64
  131. package/dist/modules/homepage/components/Rss/RssContainer.d.ts +0 -1
  132. package/dist/modules/homepage/components/Rss/RssContainer.js +0 -45
  133. package/dist/modules/homepage/components/Rss/RssFeedForm.d.ts +0 -13
  134. package/dist/modules/homepage/components/Rss/RssFeedForm.js +0 -69
  135. package/dist/modules/homepage/components/Rss/RssFeedsModal.d.ts +0 -11
  136. package/dist/modules/homepage/components/Rss/RssFeedsModal.js +0 -58
  137. package/dist/modules/homepage/components/Rss/hooks/useRssContainer.d.ts +0 -25
  138. package/dist/modules/homepage/components/Rss/hooks/useRssContainer.js +0 -43
  139. package/dist/modules/homepage/components/Rss/index.d.ts +0 -6
  140. package/dist/modules/homepage/components/Rss/services/api/index.d.ts +0 -5
  141. package/dist/modules/homepage/components/Rss/services/api/index.js +0 -5
  142. package/dist/modules/homepage/components/Rss/services/api/rssService.d.ts +0 -38
  143. package/dist/modules/homepage/components/Rss/services/api/rssService.js +0 -51
  144. package/dist/modules/homepage/components/Rss/services/queries/rss.d.ts +0 -28
  145. package/dist/modules/homepage/components/Rss/services/queries/rss.js +0 -71
  146. package/dist/modules/homepage/components/Rss/types.d.ts +0 -25
  147. package/dist/modules/homepage/components/Rss/utils.d.ts +0 -7
  148. package/dist/modules/homepage/components/Rss/utils.js +0 -19
  149. package/dist/modules/homepage/components/ScreenTime/ScreenTime.d.ts +0 -11
  150. package/dist/modules/homepage/components/ScreenTime/ScreenTime.js +0 -49
  151. package/dist/modules/homepage/components/ScreenTime/ScreenTimeChart.d.ts +0 -10
  152. package/dist/modules/homepage/components/ScreenTime/ScreenTimeChart.js +0 -115
  153. package/dist/modules/homepage/components/ScreenTime/ScreenTimeContainer.d.ts +0 -1
  154. package/dist/modules/homepage/components/ScreenTime/ScreenTimeContainer.js +0 -25
  155. package/dist/modules/homepage/components/ScreenTime/ScreenTimeError.d.ts +0 -5
  156. package/dist/modules/homepage/components/ScreenTime/ScreenTimeError.js +0 -22
  157. package/dist/modules/homepage/components/ScreenTime/ScreenTimeModal.d.ts +0 -22
  158. package/dist/modules/homepage/components/ScreenTime/ScreenTimeModal.js +0 -81
  159. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeContainer.d.ts +0 -14
  160. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeContainer.js +0 -22
  161. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeKids.d.ts +0 -6
  162. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeKids.js +0 -25
  163. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeModal.d.ts +0 -31
  164. package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeModal.js +0 -34
  165. package/dist/modules/homepage/components/ScreenTime/index.d.ts +0 -6
  166. package/dist/modules/homepage/components/ScreenTime/services/api/index.d.ts +0 -4
  167. package/dist/modules/homepage/components/ScreenTime/services/api/index.js +0 -5
  168. package/dist/modules/homepage/components/ScreenTime/services/api/screenTimeService.d.ts +0 -28
  169. package/dist/modules/homepage/components/ScreenTime/services/api/screenTimeService.js +0 -39
  170. package/dist/modules/homepage/components/ScreenTime/services/queries/screenTime.d.ts +0 -23
  171. package/dist/modules/homepage/components/ScreenTime/services/queries/screenTime.js +0 -41
  172. package/dist/modules/homepage/components/ScreenTime/types.d.ts +0 -30
  173. package/dist/modules/homepage/components/ScreenTime/utils.d.ts +0 -50
  174. package/dist/modules/homepage/components/ScreenTime/utils.js +0 -115
  175. package/dist/modules/homepage/components/TabsKids/components/TabsKids.d.ts +0 -43
  176. package/dist/modules/homepage/components/TabsKids/components/TabsKids.js +0 -23
  177. package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.d.ts +0 -34
  178. package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.js +0 -26
  179. package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.d.ts +0 -14
  180. package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.js +0 -64
  181. package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.d.ts +0 -20
  182. package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.js +0 -43
  183. package/dist/modules/homepage/components/TabsKids/index.d.ts +0 -3
  184. package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.d.ts +0 -15
  185. package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.js +0 -21
  186. package/dist/modules/homepage/components/Universalis/Universalis.d.ts +0 -8
  187. package/dist/modules/homepage/components/Universalis/Universalis.js +0 -62
  188. package/dist/modules/homepage/components/Universalis/UniversalisContainer.d.ts +0 -1
  189. package/dist/modules/homepage/components/Universalis/UniversalisContainer.js +0 -16
  190. package/dist/modules/homepage/components/Universalis/index.d.ts +0 -3
  191. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.d.ts +0 -16
  192. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js +0 -15
  193. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.d.ts +0 -21
  194. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js +0 -47
  195. package/dist/modules/homepage/components/WidgetsPersonalizationPanel/index.d.ts +0 -2
  196. package/dist/modules/icons/components/IconAddWidget.d.ts +0 -7
  197. package/dist/modules/icons/components/IconAddWidget.js +0 -12
@@ -1,9 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- export interface UserSpaceContainerProps {
2
+ export declare function UserSpaceContainer({ children }: {
3
3
  children?: ReactNode;
4
- onCustomizeWidgetsClick?: () => void;
5
- }
6
- export declare function UserSpaceContainer({ children, onCustomizeWidgetsClick, }: UserSpaceContainerProps): import("react/jsx-runtime").JSX.Element | null;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
7
5
  export declare namespace UserSpaceContainer {
8
6
  var displayName: string;
9
7
  }
@@ -2,8 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import UserSpace from "./UserSpace.js";
3
3
  import useUser from "../../../../hooks/useUser/useUser.js";
4
4
  function UserSpaceContainer({
5
- children,
6
- onCustomizeWidgetsClick
5
+ children
7
6
  }) {
8
7
  var _a;
9
8
  const {
@@ -13,7 +12,7 @@ function UserSpaceContainer({
13
12
  } = useUser();
14
13
  if (!user || !userDescription) return null;
15
14
  const name = user.username || "", profile = ((_a = userDescription.profiles) == null ? void 0 : _a[0]) || "Guest";
16
- return /* @__PURE__ */ jsx(UserSpace, { name, profile, avatar, onCustomizeWidgetsClick, children });
15
+ return /* @__PURE__ */ jsx(UserSpace, { name, profile, avatar, children });
17
16
  }
18
17
  export {
19
18
  UserSpaceContainer
@@ -1,21 +1,10 @@
1
- export * from './Agenda';
2
- export * from './Communities';
3
- export * from './BriefMe';
4
- export * from './Cantine';
5
- export * from './Edumalin';
6
1
  export * from './Favorites';
7
- export * from './GenerationHdf';
8
2
  export * from './Header';
9
3
  export * from './HomeCard';
10
4
  export * from './LastInfos';
11
5
  export * from './MessageFlashList';
12
6
  export * from './Notifications';
13
- export * from './Qwant';
14
- export * from './Rss';
15
7
  export * from './SchoolSpace';
16
- export * from './ScreenTime';
17
8
  export * from './UsefulLinks';
18
- export * from './Universalis';
19
9
  export * from './UserSpace';
20
- export * from './WidgetsPersonalizationPanel';
21
- export * from './TabsKids';
10
+ export * from './Communities';
@@ -1,5 +1,4 @@
1
1
  export { default as IconAddUser } from './IconAddUser';
2
- export { default as IconAddWidget } from './IconAddWidget';
3
2
  export { default as IconAdd } from './IconAdd';
4
3
  export { default as IconAdjustSettings } from './IconAdjustSettings';
5
4
  export { default as IconAiFill } from './IconAiFill';
@@ -3,13 +3,15 @@ const SvgIconCommunitiesBeta = ({
3
3
  title,
4
4
  titleId,
5
5
  ...props
6
- }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
7
  title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
- /* @__PURE__ */ jsxs("g", { fill: "currentColor", clipPath: "url(#icon-communities-beta_svg__a)", children: [
9
- /* @__PURE__ */ jsx("path", { d: "M13.97 3.852a1.852 1.852 0 1 0-3.704.001 1.852 1.852 0 0 0 3.705-.001m2 0a3.853 3.853 0 1 1-7.705-.001 3.853 3.853 0 0 1 7.706 0M6.251 8.396a1.852 1.852 0 1 0-3.705.001 1.852 1.852 0 0 0 3.705-.001m2 0a3.853 3.853 0 1 1-7.706-.001 3.853 3.853 0 0 1 7.706 0M21.69 8.396a1.852 1.852 0 1 0-3.704.001 1.852 1.852 0 0 0 3.704-.001m2 0a3.853 3.853 0 1 1-7.705-.001 3.853 3.853 0 0 1 7.705 0M6.728 17.57c0-1.75-1.216-2.935-2.437-2.935s-2.435 1.185-2.435 2.936V21.7h4.872zm2 6.13H-.144v-6.13c0-2.591 1.864-4.934 4.435-4.935 2.572 0 4.436 2.344 4.437 4.936zM22.164 17.57c0-1.75-1.216-2.935-2.437-2.935s-2.435 1.185-2.436 2.936V21.7h4.873zm2 6.13H15.29v-6.13c0-2.591 1.865-4.934 4.436-4.935 2.572 0 4.436 2.344 4.437 4.936z" }),
10
- /* @__PURE__ */ jsx("path", { d: "M15.055 13.152a2.94 2.94 0 0 0-2.937-2.935 2.94 2.94 0 0 0-2.935 2.935v8.549h5.872zm2 10.549H7.183V13.152a4.94 4.94 0 0 1 4.935-4.935 4.94 4.94 0 0 1 4.937 4.935z" })
8
+ /* @__PURE__ */ jsxs("g", { strokeMiterlimit: 10, strokeWidth: 2.667, clipPath: "url(#icon-communities-beta_svg__a)", children: [
9
+ /* @__PURE__ */ jsx("path", { fill: "#FEECFE", stroke: "#E26AE2", d: "M19.96 5.803a3.803 3.803 0 1 0-7.605 0 3.803 3.803 0 0 0 7.606 0Z" }),
10
+ /* @__PURE__ */ jsx("path", { stroke: "#E26AE2", d: "M9.668 11.861a3.803 3.803 0 1 0-7.606 0 3.803 3.803 0 0 0 7.606 0ZM30.254 11.861a3.803 3.803 0 1 0-7.606 0 3.803 3.803 0 0 0 7.606 0Z" }),
11
+ /* @__PURE__ */ jsx("path", { stroke: "#FC94FF", d: "M6.389 18.847a5.25 5.25 0 0 1 5.248 5.248v6.837H1.14v-6.837a5.25 5.25 0 0 1 5.248-5.248ZM25.637 18.847a5.25 5.25 0 0 1 5.248 5.248v6.837H20.389v-6.837a5.25 5.25 0 0 1 5.248-5.248Z" }),
12
+ /* @__PURE__ */ jsx("path", { fill: "#FEECFE", stroke: "#E26AE2", d: "M16.158 12.955a5.25 5.25 0 0 1 5.248 5.248v12.73H10.91v-12.73a5.25 5.25 0 0 1 5.248-5.248Z" })
11
13
  ] }),
12
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-communities-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
14
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-communities-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
13
15
  ] });
14
16
  export {
15
17
  SvgIconCommunitiesBeta as default
@@ -3,13 +3,10 @@ const SvgIconHomeBeta = ({
3
3
  title,
4
4
  titleId,
5
5
  ...props
6
- }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
7
  title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
- /* @__PURE__ */ jsxs("g", { fill: "currentColor", clipPath: "url(#icon-home-beta_svg__a)", children: [
9
- /* @__PURE__ */ jsx("path", { d: "M20.9 9.188 12 2.266 3.1 9.188V20.8A1.2 1.2 0 0 0 4.3 22h15.4a1.2 1.2 0 0 0 1.2-1.2zm2 11.612a3.2 3.2 0 0 1-3.2 3.2H4.3a3.2 3.2 0 0 1-3.2-3.2V8.7a1 1 0 0 1 .386-.789l9.9-7.7.142-.093a1 1 0 0 1 1.086.093l9.9 7.7a1 1 0 0 1 .386.79z" }),
10
- /* @__PURE__ */ jsx("path", { d: "M14.3 23V13H9.7v10a1 1 0 1 1-2 0V12a1 1 0 0 1 1-1h6.6a1 1 0 0 1 1 1v11a1 1 0 1 1-2 0" })
11
- ] }),
12
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-home-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
8
+ /* @__PURE__ */ jsx("g", { clipPath: "url(#icon-home-beta_svg__a)", children: /* @__PURE__ */ jsx("path", { fill: "#383838", d: "M15.183.28a1.334 1.334 0 0 1 1.636 0l12 9.335c.325.252.515.64.515 1.052v14.666a4 4 0 0 1-4 4H6.668a4 4 0 0 1-4-4V10.667c0-.411.19-.8.515-1.052zM5.334 11.32v14.014a1.335 1.335 0 0 0 1.334 1.334h4v-12c0-.736.597-1.334 1.333-1.334h8c.736 0 1.333.598 1.333 1.334v12h4a1.335 1.335 0 0 0 1.334-1.334V11.32L16.001 3.023zm8 15.348h5.334V16h-5.334z" }) }),
9
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-home-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
13
10
  ] });
14
11
  export {
15
12
  SvgIconHomeBeta as default
@@ -3,15 +3,15 @@ const SvgIconMessagesBeta = ({
3
3
  title,
4
4
  titleId,
5
5
  ...props
6
- }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
7
  title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
- /* @__PURE__ */ jsxs("g", { fill: "currentColor", clipPath: "url(#icon-messages-beta_svg__a)", children: [
9
- /* @__PURE__ */ jsx("path", { d: "M23.401 9.243V23.4H4.821A4.824 4.824 0 0 1 0 18.578V9.243l3.898-2.508L4.98 8.417 2 10.334v8.244A2.824 2.824 0 0 0 4.821 21.4h16.58V10.334l-2.9-1.863.541-.841.54-.842z" }),
10
- /* @__PURE__ */ jsx("path", { d: "M19.962 0v11.318h-2V2H5.439v9.318h-2V0z" }),
11
- /* @__PURE__ */ jsx("path", { d: "M16.669 3.773v2H6.732v-2zM15.904 7.546v2H7.496v-2z" }),
12
- /* @__PURE__ */ jsx("path", { d: "m22.898 10.657-10.702 6.114-.496.284-.496-.284-10.7-6.114.992-1.736L11.7 14.75l10.204-5.83z" })
8
+ /* @__PURE__ */ jsxs("g", { clipPath: "url(#icon-messages-beta_svg__a)", children: [
9
+ /* @__PURE__ */ jsx("path", { stroke: "#E5A800", strokeMiterlimit: 10, strokeWidth: 2.667, d: "m5.93 10.246-4.8 3.088v12.267a5.335 5.335 0 0 0 5.334 5.333h24.534v-17.6l-4.689-3.013" }),
10
+ /* @__PURE__ */ jsx("path", { fill: "#FCF3CF", d: "M26.196 15.468v-14.4H5.93v14.4" }),
11
+ /* @__PURE__ */ jsx("path", { stroke: "#FFC403", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M26.196 15.468v-14.4H5.93v14.4" }),
12
+ /* @__PURE__ */ jsx("path", { stroke: "#E5A800", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M9.13 5.334h13.867M10.197 9.6h11.734M1.13 13.334l14.934 8.533 14.933-8.533" })
13
13
  ] }),
14
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-messages-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
14
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-messages-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
15
15
  ] });
16
16
  export {
17
17
  SvgIconMessagesBeta as default
@@ -3,9 +3,10 @@ const SvgIconMyAppsBeta = ({
3
3
  title,
4
4
  titleId,
5
5
  ...props
6
- }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
7
  title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
- /* @__PURE__ */ jsx("g", { fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M23 1v10.182H12.818V1zm-8.182 8.182H21V3h-6.182zM23 12.818V23H12.818V12.818zM14.818 21H21v-6.182h-6.182zM11.182 12.818V23H1V12.818zM3 21h6.182v-6.182H3zM2.049 1l.141.003q.181.005.492.03c.41.034.98.108 1.63.26 1.287.301 2.963.931 4.304 2.272 1.341 1.342 1.972 3.018 2.274 4.304.152.65.224 1.22.26 1.631a9 9 0 0 1 .032.633v.061l-.013.988H1V1.014L1.986 1 2 2l-.014-1zM3 9.182h6.1a10 10 0 0 0-.158-.857c-.255-1.088-.76-2.366-1.74-3.346C6.223 4 4.945 3.495 3.856 3.24A10 10 0 0 0 3 3.081z" }) })
8
+ /* @__PURE__ */ jsx("g", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, clipPath: "url(#icon-my-apps-beta_svg__a)", children: /* @__PURE__ */ jsx("path", { d: "M31.117 1H19v12.117h12.117zM13.207 18.884H1.09V31h12.117zM1 1.084c6.688 0 12.117 5.43 12.117 12.117H1zM30.934 18.884H18.816V31h12.118z" }) }),
9
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-my-apps-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
9
10
  ] });
10
11
  export {
11
12
  SvgIconMyAppsBeta as default
@@ -3,9 +3,11 @@ const SvgIconNotificationBeta = ({
3
3
  title,
4
4
  titleId,
5
5
  ...props
6
- }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
7
  title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
- /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M12.016.5a3.04 3.04 0 0 1 3.02 2.663c3.36 1.192 5.771 4.401 5.772 8.168v1.845h1.656v7.01h-6.522a3.94 3.94 0 0 1-7.778 0h-6.12v-7.01h1.434V11.33c0-3.666 2.284-6.802 5.505-8.066A3.045 3.045 0 0 1 12.016.5m-1.798 19.687a1.94 1.94 0 0 0 3.67 0zm-6.175-5.01v3.01h16.42v-3.01zm8.1-10.511a6.67 6.67 0 0 0-6.665 6.665v1.845h13.33V11.33a6.67 6.67 0 0 0-6.665-6.665" })
8
+ /* @__PURE__ */ jsx("path", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M13.363 5.348a2.726 2.726 0 1 1 5.383-.622q0 .423-.12.808M19.886 25.184a3.919 3.919 0 1 1-7.559-.26" }),
9
+ /* @__PURE__ */ jsx("path", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M28.62 18.901H4.058v6.682h24.56z" }),
10
+ /* @__PURE__ */ jsx("path", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M16.189 4.889c5.639 0 10.22 4.581 10.22 10.22v3.794H5.97V15.11c0-5.639 4.581-10.22 10.22-10.22Z" })
9
11
  ] });
10
12
  export {
11
13
  SvgIconNotificationBeta as default
@@ -150,7 +150,7 @@ const WORKSPACE_VIEW_WORKFLOW = "org.entcore.workspace.controllers.WorkspaceCont
150
150
  ] }) }),
151
151
  /* @__PURE__ */ jsx(Grid.Col, { sm: "12", md: "5", xl: "8", children: /* @__PURE__ */ jsxs(Grid, { className: "flex-grow-1 gap-0", children: [
152
152
  /* @__PURE__ */ jsxs(Grid.Col, { sm: "4", md: "8", xl: "12", children: [
153
- /* @__PURE__ */ jsx("div", { className: "workspace-search px-16 py-8 ", children: /* @__PURE__ */ jsx(SearchBar, { isVariant: !0, onChange: handleSearchChange }) }),
153
+ /* @__PURE__ */ jsx("div", { className: "workspace-search px-16 py-8 ", children: /* @__PURE__ */ jsx(SearchBar, { isVariant: !0, className: "gap-16", onChange: handleSearchChange }) }),
154
154
  /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center justify-content-end px-8 py-4", children: [
155
155
  /* @__PURE__ */ jsx("small", { className: "text-muted", children: t("workspace.search.order") }),
156
156
  /* @__PURE__ */ jsxs(Dropdown, { children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.6.12-develop-b2school.20261103172112",
3
+ "version": "2.6.12-develop.20261104120548",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -124,7 +124,6 @@
124
124
  "@tiptap/starter-kit": "2.11.0",
125
125
  "@uidotdev/usehooks": "2.4.1",
126
126
  "antd": "5.29.1",
127
- "chart.js": "4.5.1",
128
127
  "clsx": "2.1.1",
129
128
  "dayjs": "1.11.19",
130
129
  "emoji-picker-react": "4.17.4",
@@ -141,9 +140,9 @@
141
140
  "swiper": "10.1.0",
142
141
  "ua-parser-js": "1.0.36",
143
142
  "zustand": "4.5.7",
144
- "@edifice.io/bootstrap": "2.6.12-develop-b2school.20261103172112",
145
- "@edifice.io/tiptap-extensions": "2.6.12-develop-b2school.20261103172112",
146
- "@edifice.io/utilities": "2.6.12-develop-b2school.20261103172112"
143
+ "@edifice.io/bootstrap": "2.6.12-develop.20261104120548",
144
+ "@edifice.io/tiptap-extensions": "2.6.12-develop.20261104120548",
145
+ "@edifice.io/utilities": "2.6.12-develop.20261104120548"
147
146
  },
148
147
  "devDependencies": {
149
148
  "@babel/plugin-transform-react-pure-annotations": "7.27.1",
@@ -175,8 +174,8 @@
175
174
  "vite": "5.4.14",
176
175
  "vite-plugin-dts": "4.5.4",
177
176
  "vite-tsconfig-paths": "5.1.4",
178
- "@edifice.io/config": "2.6.12-develop-b2school.20261103172112",
179
- "@edifice.io/client": "2.6.12-develop-b2school.20261103172112"
177
+ "@edifice.io/client": "2.6.12-develop.20261104120548",
178
+ "@edifice.io/config": "2.6.12-develop.20261104120548"
180
179
  },
181
180
  "peerDependencies": {
182
181
  "@react-spring/web": "9.7.5",
@@ -1,40 +0,0 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- export interface MasonryItemProps {
3
- /**
4
- * Number of columns the item spans (capped to the number of columns).
5
- * @default 1
6
- */
7
- span?: number;
8
- children: ReactNode;
9
- }
10
- export interface MasonryProps extends HTMLAttributes<HTMLDivElement> {
11
- /**
12
- * Items to lay out. Each child is one masonry item, in reading order.
13
- */
14
- children: ReactNode;
15
- /**
16
- * Number of columns. Each column takes an equal share of the available
17
- * width, gap excluded.
18
- * @default 2
19
- */
20
- columns?: number;
21
- /**
22
- * Gap between columns and between items, as a spacing token (e.g. `16`).
23
- * @default '16'
24
- */
25
- gap?: string;
26
- /**
27
- * Optional class for styling purpose
28
- */
29
- className?: string;
30
- }
31
- export declare const Masonry: {
32
- ({ children, columns, gap, className, style, ...restProps }: MasonryProps): import("react/jsx-runtime").JSX.Element;
33
- displayName: string;
34
- } & {
35
- Item: {
36
- ({ children }: MasonryItemProps): import("react/jsx-runtime").JSX.Element;
37
- displayName: string;
38
- };
39
- };
40
- export default Masonry;
@@ -1,50 +0,0 @@
1
- import { jsx, Fragment } from "react/jsx-runtime";
2
- import { useRef, useState, Children, useCallback, useLayoutEffect, isValidElement } from "react";
3
- import clsx from "clsx";
4
- const MasonryItem = ({
5
- children
6
- }) => /* @__PURE__ */ jsx(Fragment, { children }), Root = ({
7
- children,
8
- columns = 2,
9
- gap = "16",
10
- className,
11
- style,
12
- ...restProps
13
- }) => {
14
- const columnCount = Math.max(1, Math.floor(columns)), gridRef = useRef(null), itemRefs = useRef(/* @__PURE__ */ new Map()), [spans, setSpans] = useState({}), items = Children.toArray(children), measure = useCallback(() => {
15
- const grid = gridRef.current;
16
- if (!grid) return;
17
- const rowGap = parseFloat(getComputedStyle(grid).columnGap) || 0, next = {};
18
- itemRefs.current.forEach((el, key) => {
19
- next[key] = Math.ceil(el.getBoundingClientRect().height + rowGap);
20
- }), setSpans((prev) => {
21
- const keys = Object.keys(next);
22
- return keys.length === Object.keys(prev).length && keys.every((key) => prev[key] === next[key]) ? prev : next;
23
- });
24
- }, []);
25
- return useLayoutEffect(() => {
26
- if (measure(), typeof ResizeObserver > "u") return;
27
- const observer = new ResizeObserver(measure);
28
- return gridRef.current && observer.observe(gridRef.current), itemRefs.current.forEach((el) => observer.observe(el)), () => observer.disconnect();
29
- }, [measure, columnCount, items.length]), /* @__PURE__ */ jsx("div", { ref: gridRef, className: clsx("masonry", `column-gap-${gap}`, className), style: {
30
- display: "grid",
31
- gridTemplateColumns: `repeat(${columnCount}, minmax(0, 1fr))`,
32
- gridAutoRows: "1px",
33
- alignItems: "start",
34
- ...style
35
- }, ...restProps, children: items.map((item, index) => {
36
- const key = String(item.key ?? index), span = /* @__PURE__ */ isValidElement(item) && item.type === MasonryItem ? Math.min(Math.max(1, Math.floor(item.props.span ?? 1)), columnCount) : 1;
37
- return /* @__PURE__ */ jsx("div", { ref: (el) => {
38
- el ? itemRefs.current.set(key, el) : itemRefs.current.delete(key);
39
- }, className: "masonry__item", "data-testid": `masonry-item-${index}`, style: {
40
- gridColumn: `span ${span}`,
41
- gridRowEnd: `span ${spans[key] ?? 1}`
42
- }, children: item }, key);
43
- }) });
44
- }, Masonry = Object.assign(Root, {
45
- Item: MasonryItem
46
- });
47
- export {
48
- Masonry,
49
- Masonry as default
50
- };
@@ -1,2 +0,0 @@
1
- export { default as Masonry } from './Masonry';
2
- export * from './Masonry';
@@ -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: () => {
9
- window.open("/calendar", "_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>;