@edifice.io/react 2.6.12-develop-integration.20261103121816 → 2.6.12-develop-b2school.20261103144351
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.
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Dropdown/DropdownItem.js +17 -1
- package/dist/components/Layout/Layout.js +12 -4
- package/dist/components/Masonry/Masonry.d.ts +40 -0
- package/dist/components/Masonry/Masonry.js +50 -0
- package/dist/components/Masonry/index.d.ts +2 -0
- package/dist/components/SearchBar/SearchBar.js +17 -26
- package/dist/components/Tree/components/Tree.d.ts +2 -5
- package/dist/components/Tree/components/Tree.js +10 -7
- package/dist/components/Tree/hooks/useTree.d.ts +1 -0
- package/dist/components/Tree/hooks/useTree.js +6 -2
- package/dist/components/Tree/types/index.d.ts +7 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/homepage.js +97 -28
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useDropdown/useDropdown.js +2 -2
- package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +2 -6
- package/dist/hooks/useZendeskGuide/useZendeskGuide.js +11 -8
- package/dist/icons-apps.js +182 -184
- package/dist/icons.js +406 -404
- package/dist/index.js +194 -198
- package/dist/modules/HelpZone/HelpZone.js +6 -8
- package/dist/modules/HelpZone/HelpZoneContainer.js +2 -5
- package/dist/modules/editor/components/Editor/Editor.d.ts +5 -7
- package/dist/modules/editor/components/Editor/Editor.js +5 -3
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +1 -3
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +8 -14
- package/dist/modules/editor/components/NodeView/ImageNodeView.d.ts +1 -1
- package/dist/modules/editor/components/NodeView/ImageNodeView.js +7 -14
- package/dist/modules/editor/hooks/useActionOptions.d.ts +1 -1
- package/dist/modules/editor/hooks/useActionOptions.js +12 -12
- package/dist/modules/editor/hooks/useTipTapEditor.d.ts +1 -2
- package/dist/modules/editor/hooks/useTipTapEditor.js +2 -2
- package/dist/modules/homepage/components/Agenda/Agenda.d.ts +10 -0
- package/dist/modules/homepage/components/Agenda/Agenda.js +54 -0
- package/dist/modules/homepage/components/Agenda/AgendaContainer.d.ts +1 -0
- package/dist/modules/homepage/components/Agenda/AgendaContainer.js +14 -0
- package/dist/modules/homepage/components/Agenda/AgendaEventCard.d.ts +10 -0
- package/dist/modules/homepage/components/Agenda/AgendaEventCard.js +30 -0
- package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.d.ts +14 -0
- package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.js +27 -0
- package/dist/modules/homepage/components/Agenda/index.d.ts +3 -0
- package/dist/modules/homepage/components/Agenda/services/api/agendaService.d.ts +24 -0
- package/dist/modules/homepage/components/Agenda/services/api/agendaService.js +45 -0
- package/dist/modules/homepage/components/Agenda/services/api/index.d.ts +4 -0
- package/dist/modules/homepage/components/Agenda/services/api/index.js +5 -0
- package/dist/modules/homepage/components/Agenda/services/queries/agenda.d.ts +19 -0
- package/dist/modules/homepage/components/Agenda/services/queries/agenda.js +26 -0
- package/dist/modules/homepage/components/BriefMe/BriefMe.d.ts +9 -0
- package/dist/modules/homepage/components/BriefMe/BriefMe.js +59 -0
- package/dist/modules/homepage/components/BriefMe/BriefMeContainer.d.ts +4 -0
- package/dist/modules/homepage/components/BriefMe/BriefMeContainer.js +17 -0
- package/dist/modules/homepage/components/BriefMe/index.d.ts +4 -0
- package/dist/modules/homepage/components/BriefMe/types.d.ts +17 -0
- package/dist/modules/homepage/components/BriefMe/types.js +8 -0
- package/dist/modules/homepage/components/BriefMe/useBriefMe.d.ts +31 -0
- package/dist/modules/homepage/components/BriefMe/useBriefMe.js +51 -0
- package/dist/modules/homepage/components/Cantine/Cantine.d.ts +7 -0
- package/dist/modules/homepage/components/Cantine/Cantine.js +44 -0
- package/dist/modules/homepage/components/Cantine/CantineContainer.d.ts +4 -0
- package/dist/modules/homepage/components/Cantine/CantineContainer.js +18 -0
- package/dist/modules/homepage/components/Cantine/CantineModal.d.ts +24 -0
- package/dist/modules/homepage/components/Cantine/CantineModal.js +88 -0
- package/dist/modules/homepage/components/Cantine/CantineModalContainer.d.ts +7 -0
- package/dist/modules/homepage/components/Cantine/CantineModalContainer.js +12 -0
- package/dist/modules/homepage/components/Cantine/components/CantineLegend.d.ts +5 -0
- package/dist/modules/homepage/components/Cantine/components/CantineLegend.js +22 -0
- package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.d.ts +6 -0
- package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.js +28 -0
- package/dist/modules/homepage/components/Cantine/components/cantineLabels.d.ts +12 -0
- package/dist/modules/homepage/components/Cantine/components/cantineLabels.js +60 -0
- package/dist/modules/homepage/components/Cantine/hooks/useCantine.d.ts +11 -0
- package/dist/modules/homepage/components/Cantine/hooks/useCantine.js +20 -0
- package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.d.ts +24 -0
- package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.js +65 -0
- package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.d.ts +23 -0
- package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.js +43 -0
- package/dist/modules/homepage/components/Cantine/index.d.ts +7 -0
- package/dist/modules/homepage/components/Cantine/types.d.ts +42 -0
- package/dist/modules/homepage/components/Edumalin/Edumalin.d.ts +9 -0
- package/dist/modules/homepage/components/Edumalin/Edumalin.js +65 -0
- package/dist/modules/homepage/components/Edumalin/EdumalinContainer.d.ts +4 -0
- package/dist/modules/homepage/components/Edumalin/EdumalinContainer.js +21 -0
- package/dist/modules/homepage/components/Edumalin/EdumalinModal.d.ts +8 -0
- package/dist/modules/homepage/components/Edumalin/EdumalinModal.js +62 -0
- package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.d.ts +5 -0
- package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.js +38 -0
- package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.d.ts +5 -0
- package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.js +12 -0
- package/dist/modules/homepage/components/Edumalin/index.d.ts +7 -0
- package/dist/modules/homepage/components/Edumalin/types.d.ts +24 -0
- package/dist/modules/homepage/components/Edumalin/types.js +4 -0
- package/dist/modules/homepage/components/Edumalin/useEdumalin.d.ts +16 -0
- package/dist/modules/homepage/components/Edumalin/useEdumalin.js +35 -0
- package/dist/modules/homepage/components/Edumalin/utils.d.ts +28 -0
- package/dist/modules/homepage/components/Edumalin/utils.js +56 -0
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.d.ts +16 -0
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.js +65 -0
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.d.ts +4 -0
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.js +12 -0
- package/dist/modules/homepage/components/GenerationHdf/formatSolde.d.ts +1 -0
- package/dist/modules/homepage/components/GenerationHdf/formatSolde.js +6 -0
- package/dist/modules/homepage/components/GenerationHdf/index.d.ts +3 -0
- package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.d.ts +10 -0
- package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.js +69 -0
- package/dist/modules/homepage/components/Header/Header.js +9 -21
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +5 -1
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +1 -1
- package/dist/modules/homepage/components/Notifications/NotificationList.js +7 -8
- package/dist/modules/homepage/components/Notifications/NotificationListSkeleton.js +7 -12
- package/dist/modules/homepage/components/Notifications/NotificationSkeleton.js +7 -4
- package/dist/modules/homepage/components/Notifications/components/CommonNotificationItem.js +9 -9
- package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.js +11 -13
- package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js +6 -12
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.d.ts +1 -2
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +14 -12
- package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.js +9 -10
- package/dist/modules/homepage/components/Qwant/Qwant.d.ts +4 -0
- package/dist/modules/homepage/components/Qwant/Qwant.js +41 -0
- package/dist/modules/homepage/components/Qwant/QwantContainer.d.ts +1 -0
- package/dist/modules/homepage/components/Qwant/QwantContainer.js +10 -0
- package/dist/modules/homepage/components/Qwant/index.d.ts +3 -0
- package/dist/modules/homepage/components/Rss/Rss.d.ts +11 -0
- package/dist/modules/homepage/components/Rss/Rss.js +64 -0
- package/dist/modules/homepage/components/Rss/RssContainer.d.ts +1 -0
- package/dist/modules/homepage/components/Rss/RssContainer.js +45 -0
- package/dist/modules/homepage/components/Rss/RssFeedForm.d.ts +13 -0
- package/dist/modules/homepage/components/Rss/RssFeedForm.js +69 -0
- package/dist/modules/homepage/components/Rss/RssFeedsModal.d.ts +11 -0
- package/dist/modules/homepage/components/Rss/RssFeedsModal.js +58 -0
- package/dist/modules/homepage/components/Rss/hooks/useRssContainer.d.ts +25 -0
- package/dist/modules/homepage/components/Rss/hooks/useRssContainer.js +43 -0
- package/dist/modules/homepage/components/Rss/index.d.ts +6 -0
- package/dist/modules/homepage/components/Rss/services/api/index.d.ts +5 -0
- package/dist/modules/homepage/components/Rss/services/api/index.js +5 -0
- package/dist/modules/homepage/components/Rss/services/api/rssService.d.ts +38 -0
- package/dist/modules/homepage/components/Rss/services/api/rssService.js +51 -0
- package/dist/modules/homepage/components/Rss/services/queries/rss.d.ts +28 -0
- package/dist/modules/homepage/components/Rss/services/queries/rss.js +71 -0
- package/dist/modules/homepage/components/Rss/types.d.ts +25 -0
- package/dist/modules/homepage/components/Rss/utils.d.ts +7 -0
- package/dist/modules/homepage/components/Rss/utils.js +19 -0
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.js +1 -1
- package/dist/modules/homepage/components/ScreenTime/ScreenTime.d.ts +11 -0
- package/dist/modules/homepage/components/ScreenTime/ScreenTime.js +49 -0
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeChart.d.ts +10 -0
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeChart.js +115 -0
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeContainer.d.ts +1 -0
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeContainer.js +25 -0
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeError.d.ts +5 -0
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeError.js +22 -0
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeModal.d.ts +22 -0
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeModal.js +81 -0
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeContainer.d.ts +14 -0
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeContainer.js +22 -0
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeKids.d.ts +6 -0
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeKids.js +25 -0
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeModal.d.ts +31 -0
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeModal.js +34 -0
- package/dist/modules/homepage/components/ScreenTime/index.d.ts +6 -0
- package/dist/modules/homepage/components/ScreenTime/services/api/index.d.ts +4 -0
- package/dist/modules/homepage/components/ScreenTime/services/api/index.js +5 -0
- package/dist/modules/homepage/components/ScreenTime/services/api/screenTimeService.d.ts +28 -0
- package/dist/modules/homepage/components/ScreenTime/services/api/screenTimeService.js +39 -0
- package/dist/modules/homepage/components/ScreenTime/services/queries/screenTime.d.ts +23 -0
- package/dist/modules/homepage/components/ScreenTime/services/queries/screenTime.js +41 -0
- package/dist/modules/homepage/components/ScreenTime/types.d.ts +30 -0
- package/dist/modules/homepage/components/ScreenTime/utils.d.ts +50 -0
- package/dist/modules/homepage/components/ScreenTime/utils.js +115 -0
- package/dist/modules/homepage/components/TabsKids/components/TabsKids.d.ts +43 -0
- package/dist/modules/homepage/components/TabsKids/components/TabsKids.js +23 -0
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.d.ts +34 -0
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.js +26 -0
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.d.ts +14 -0
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.js +64 -0
- package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.d.ts +20 -0
- package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.js +43 -0
- package/dist/modules/homepage/components/TabsKids/index.d.ts +3 -0
- package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.d.ts +15 -0
- package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.js +21 -0
- package/dist/modules/homepage/components/Universalis/Universalis.d.ts +8 -0
- package/dist/modules/homepage/components/Universalis/Universalis.js +62 -0
- package/dist/modules/homepage/components/Universalis/UniversalisContainer.d.ts +1 -0
- package/dist/modules/homepage/components/Universalis/UniversalisContainer.js +16 -0
- package/dist/modules/homepage/components/Universalis/index.d.ts +3 -0
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.js +2 -2
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.js +2 -2
- package/dist/modules/homepage/components/UserSpace/UserSpace.d.ts +3 -1
- package/dist/modules/homepage/components/UserSpace/UserSpace.js +13 -7
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.d.ts +4 -2
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.js +3 -2
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.d.ts +16 -0
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js +15 -0
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.d.ts +21 -0
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js +47 -0
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/index.d.ts +2 -0
- package/dist/modules/homepage/components/index.d.ts +12 -2
- package/dist/modules/homepage/{components/SchoolSpace → hooks}/useUserSchools.d.ts +2 -2
- package/dist/modules/homepage/{components/SchoolSpace → hooks}/useUserSchools.js +4 -4
- package/dist/modules/icons/components/IconAddWidget.d.ts +7 -0
- package/dist/modules/icons/components/IconAddWidget.js +12 -0
- package/dist/modules/icons/components/apps/index.d.ts +0 -1
- package/dist/modules/icons/components/index.d.ts +1 -0
- package/dist/modules/icons/components/nav/IconCommunitiesBeta.js +5 -7
- package/dist/modules/icons/components/nav/IconHomeBeta.js +6 -3
- package/dist/modules/icons/components/nav/IconMessagesBeta.js +7 -7
- package/dist/modules/icons/components/nav/IconMyAppsBeta.js +2 -3
- package/dist/modules/icons/components/nav/IconNotificationBeta.js +2 -4
- package/dist/modules/multimedia/FileCard/index.d.ts +0 -2
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +1 -7
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +0 -2
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +5 -16
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.d.ts +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +0 -2
- package/dist/modules/multimedia/Workspace/Workspace.js +1 -1
- package/dist/modules/multimedia/index.d.ts +0 -1
- package/dist/multimedia.js +22 -26
- package/package.json +7 -6
- package/dist/hooks/useGoogleDriveSearch/index.d.ts +0 -1
- package/dist/hooks/useGoogleDriveSearch/useGoogleDriveSearch.d.ts +0 -19
- package/dist/hooks/useGoogleDriveSearch/useGoogleDriveSearch.js +0 -60
- package/dist/modules/homepage/components/AlloLycee/AlloLycee.d.ts +0 -11
- package/dist/modules/homepage/components/AlloLycee/AlloLycee.js +0 -32
- package/dist/modules/homepage/components/AlloLycee/AlloLyceeContainer.d.ts +0 -4
- package/dist/modules/homepage/components/AlloLycee/AlloLyceeContainer.js +0 -10
- package/dist/modules/homepage/components/AlloLycee/index.d.ts +0 -3
- package/dist/modules/icons/components/apps/IconElea.d.ts +0 -7
- package/dist/modules/icons/components/apps/IconElea.js +0 -23
- package/dist/modules/multimedia/FileCard/GoogleDriveFileCard.d.ts +0 -25
- package/dist/modules/multimedia/FileCard/GoogleDriveFileCard.js +0 -102
- package/dist/modules/multimedia/GoogleDrive/GoogleDrive.d.ts +0 -24
- package/dist/modules/multimedia/GoogleDrive/GoogleDrive.js +0 -103
- package/dist/modules/multimedia/GoogleDrive/index.d.ts +0 -2
- package/dist/modules/multimedia/MediaLibrary/innertabs/GoogleDrive.d.ts +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/GoogleDrive.js +0 -61
|
@@ -5,8 +5,10 @@ export type UserSpaceProps = {
|
|
|
5
5
|
avatar: string;
|
|
6
6
|
profile: UserProfile[number];
|
|
7
7
|
children?: ReactNode;
|
|
8
|
+
/** Renders a trigger button in the top-right corner when provided. */
|
|
9
|
+
onCustomizeWidgetsClick?: () => void;
|
|
8
10
|
};
|
|
9
|
-
declare function UserSpace({ name, avatar, profile, children, }: UserSpaceProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function UserSpace({ name, avatar, profile, children, onCustomizeWidgetsClick, }: UserSpaceProps): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
declare namespace UserSpace {
|
|
11
13
|
var displayName: string;
|
|
12
14
|
}
|
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
+
import SvgIconAddWidget from "../../../icons/components/IconAddWidget.js";
|
|
3
4
|
import SvgIconClass from "../../../icons/components/IconClass.js";
|
|
4
5
|
import { useProfileLinks } from "./hooks/useProfileLinks.js";
|
|
5
6
|
import HomeCard from "../HomeCard/HomeCard.js";
|
|
6
7
|
import Flex from "../../../../components/Flex/Flex.js";
|
|
7
8
|
import Avatar from "../../../../components/Avatar/Avatar.js";
|
|
9
|
+
import IconButton from "../../../../components/Button/IconButton.js";
|
|
8
10
|
import ButtonBeta from "../../../../components/ButtonBeta/ButtonBeta.js";
|
|
9
11
|
function UserSpace({
|
|
10
12
|
name,
|
|
11
13
|
avatar,
|
|
12
14
|
profile,
|
|
13
|
-
children
|
|
15
|
+
children,
|
|
16
|
+
onCustomizeWidgetsClick
|
|
14
17
|
}) {
|
|
15
18
|
const {
|
|
16
19
|
t
|
|
17
20
|
} = useTranslation(), links = useProfileLinks(profile);
|
|
18
21
|
return /* @__PURE__ */ jsxs(HomeCard, { variant: "user", footer: !!links && /* @__PURE__ */ jsx(Flex, { children: links.map((link, index) => /* @__PURE__ */ jsx(ButtonBeta, { size: "sm", variant: "ghost", leftIcon: /* @__PURE__ */ jsx(SvgIconClass, {}), onClick: () => window.location.href = link.url, children: link.text }, `${link.url}-${index}`)) }), children: [
|
|
19
|
-
/* @__PURE__ */ jsxs(Flex, { className: "user-space", direction: "row", gap: "8", children: [
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
/* @__PURE__ */ jsxs(Flex, { className: "user-space", direction: "row", justify: "between", gap: "8", children: [
|
|
23
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "row", gap: "8", children: [
|
|
24
|
+
/* @__PURE__ */ jsx(Avatar, { className: "user-space--avatar", size: "auto", alt: name, src: avatar, variant: "circle" }),
|
|
25
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
|
|
26
|
+
/* @__PURE__ */ jsx("div", { "data-testid": "user-space-name", className: "user-space--name", children: name }),
|
|
27
|
+
/* @__PURE__ */ jsx("div", { "data-testid": "user-space-profile", className: "user-space--profile", children: t(profile) })
|
|
28
|
+
] })
|
|
29
|
+
] }),
|
|
30
|
+
onCustomizeWidgetsClick && /* @__PURE__ */ jsx(IconButton, { className: "user-space--customize-widgets", icon: /* @__PURE__ */ jsx(SvgIconAddWidget, {}), variant: "ghost", color: "tertiary", "aria-label": t("homepage.userSpace.customizeWidgets"), onClick: onCustomizeWidgetsClick })
|
|
25
31
|
] }),
|
|
26
32
|
children && /* @__PURE__ */ jsx(HomeCard.Content, { children })
|
|
27
33
|
] });
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export interface UserSpaceContainerProps {
|
|
3
3
|
children?: ReactNode;
|
|
4
|
-
|
|
4
|
+
onCustomizeWidgetsClick?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function UserSpaceContainer({ children, onCustomizeWidgetsClick, }: UserSpaceContainerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
7
|
export declare namespace UserSpaceContainer {
|
|
6
8
|
var displayName: string;
|
|
7
9
|
}
|
|
@@ -2,7 +2,8 @@ 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
|
|
5
|
+
children,
|
|
6
|
+
onCustomizeWidgetsClick
|
|
6
7
|
}) {
|
|
7
8
|
var _a;
|
|
8
9
|
const {
|
|
@@ -12,7 +13,7 @@ function UserSpaceContainer({
|
|
|
12
13
|
} = useUser();
|
|
13
14
|
if (!user || !userDescription) return null;
|
|
14
15
|
const name = user.username || "", profile = ((_a = userDescription.profiles) == null ? void 0 : _a[0]) || "Guest";
|
|
15
|
-
return /* @__PURE__ */ jsx(UserSpace, { name, profile, avatar, children });
|
|
16
|
+
return /* @__PURE__ */ jsx(UserSpace, { name, profile, avatar, onCustomizeWidgetsClick, children });
|
|
16
17
|
}
|
|
17
18
|
export {
|
|
18
19
|
UserSpaceContainer
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface WidgetToggleProps extends Omit<ComponentPropsWithoutRef<'button'>, 'onClick' | 'type' | 'role' | 'aria-checked'> {
|
|
3
|
+
'checked': boolean;
|
|
4
|
+
'onChange': () => void;
|
|
5
|
+
'aria-label': string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Dedicated on/off control for a widget row in `WidgetsPersonalizationPanel`.
|
|
9
|
+
* The generic `Switch` component doesn't match this panel's design (size,
|
|
10
|
+
* filled-vs-outlined states), so this is a small purpose-built control
|
|
11
|
+
* rather than a `Switch` variant.
|
|
12
|
+
*/
|
|
13
|
+
export declare function WidgetToggle({ checked, onChange, disabled, ...rest }: WidgetToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare namespace WidgetToggle {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
function WidgetToggle({
|
|
4
|
+
checked,
|
|
5
|
+
onChange,
|
|
6
|
+
disabled,
|
|
7
|
+
...rest
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ jsx("button", { type: "button", role: "switch", "aria-checked": checked, disabled, className: clsx("widget-toggle", {
|
|
10
|
+
"widget-toggle--checked": checked
|
|
11
|
+
}), onClick: onChange, ...rest, children: /* @__PURE__ */ jsx("span", { className: "widget-toggle__knob" }) });
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
WidgetToggle
|
|
15
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface WidgetPersonalizationItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon: ReactNode;
|
|
6
|
+
checked: boolean;
|
|
7
|
+
/** When true, the widget is pinned by an admin: no toggle, lock icon instead. */
|
|
8
|
+
locked?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface WidgetsPersonalizationPanelProps {
|
|
11
|
+
items: WidgetPersonalizationItem[];
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
onToggle: (id: string) => void;
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
title?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function WidgetsPersonalizationPanel({ items, isLoading, onToggle, onClose, title, description, }: WidgetsPersonalizationPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare namespace WidgetsPersonalizationPanel {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import SvgIconClose from "../../../icons/components/IconClose.js";
|
|
5
|
+
import SvgIconLock from "../../../icons/components/IconLock.js";
|
|
6
|
+
import { WidgetToggle } from "./WidgetToggle.js";
|
|
7
|
+
import Heading from "../../../../components/Heading/Heading.js";
|
|
8
|
+
import IconButton from "../../../../components/Button/IconButton.js";
|
|
9
|
+
import TextSkeleton from "../../../../components/Skeleton/TextSkeleton.js";
|
|
10
|
+
const SKELETON_ROWS = 5;
|
|
11
|
+
function WidgetsPersonalizationPanel({
|
|
12
|
+
items,
|
|
13
|
+
isLoading = !1,
|
|
14
|
+
onToggle,
|
|
15
|
+
onClose,
|
|
16
|
+
title,
|
|
17
|
+
description
|
|
18
|
+
}) {
|
|
19
|
+
const {
|
|
20
|
+
t
|
|
21
|
+
} = useTranslation();
|
|
22
|
+
return /* @__PURE__ */ jsxs("div", { className: "widgets-personalization-panel", children: [
|
|
23
|
+
/* @__PURE__ */ jsxs("div", { className: "widgets-personalization-panel__header", children: [
|
|
24
|
+
/* @__PURE__ */ jsx(Heading, { level: "h2", headingStyle: "h5", className: "widgets-personalization-panel__title", children: title ?? t("homepage.widgetsPersonalization.title") }),
|
|
25
|
+
/* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(SvgIconClose, {}), variant: "ghost", color: "tertiary", "aria-label": t("close"), onClick: onClose, "data-testid": "widgetspersonalization-button-close" })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ jsx("p", { className: "widgets-personalization-panel__description", children: description ?? t("homepage.widgetsPersonalization.description") }),
|
|
28
|
+
isLoading ? /* @__PURE__ */ jsx("ul", { className: "widgets-personalization-panel__list", "aria-hidden": "true", children: Array.from({
|
|
29
|
+
length: SKELETON_ROWS
|
|
30
|
+
}).map((_, index) => /* @__PURE__ */ jsxs("li", { className: "widgets-personalization-panel__item widgets-personalization-panel__item--skeleton", children: [
|
|
31
|
+
/* @__PURE__ */ jsx(TextSkeleton, { className: "widgets-personalization-panel__item-icon-skeleton" }),
|
|
32
|
+
/* @__PURE__ */ jsx(TextSkeleton, { className: "widgets-personalization-panel__item-label-skeleton" })
|
|
33
|
+
] }, index)) }) : items.length === 0 ? /* @__PURE__ */ jsx("div", { className: "widgets-personalization-panel__empty", children: /* @__PURE__ */ jsx("p", { className: "widgets-personalization-panel__empty-text", children: t("homepage.widgetsPersonalization.empty") }) }) : /* @__PURE__ */ jsx("ul", { className: "widgets-personalization-panel__list", children: items.map((item) => /* @__PURE__ */ jsxs("li", { className: clsx("widgets-personalization-panel__item", {
|
|
34
|
+
"widgets-personalization-panel__item--checked": item.checked && !item.locked,
|
|
35
|
+
"widgets-personalization-panel__item--locked": item.locked
|
|
36
|
+
}), "data-testid": `widgetspersonalization-item-${item.id}`, children: [
|
|
37
|
+
/* @__PURE__ */ jsx("span", { className: "widgets-personalization-panel__item-icon", "aria-hidden": "true", children: item.icon }),
|
|
38
|
+
/* @__PURE__ */ jsx("span", { className: "widgets-personalization-panel__item-label", children: item.label }),
|
|
39
|
+
item.locked ? /* @__PURE__ */ jsx("span", { className: "widgets-personalization-panel__item-lock", role: "img", "aria-label": t("homepage.widgetsPersonalization.locked"), "data-testid": `widgetspersonalization-lock-${item.id}`, children: /* @__PURE__ */ jsx(SvgIconLock, {}) }) : /* @__PURE__ */ jsx(WidgetToggle, { checked: item.checked, onChange: () => onToggle(item.id), "aria-label": t("homepage.widgetsPersonalization.toggle", {
|
|
40
|
+
label: item.label
|
|
41
|
+
}), "data-testid": `widgetspersonalization-toggle-${item.id}` })
|
|
42
|
+
] }, item.id)) })
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
WidgetsPersonalizationPanel
|
|
47
|
+
};
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
+
export * from './Agenda';
|
|
2
|
+
export * from './Communities';
|
|
3
|
+
export * from './BriefMe';
|
|
4
|
+
export * from './Cantine';
|
|
5
|
+
export * from './Edumalin';
|
|
1
6
|
export * from './Favorites';
|
|
7
|
+
export * from './GenerationHdf';
|
|
2
8
|
export * from './Header';
|
|
3
9
|
export * from './HomeCard';
|
|
4
10
|
export * from './LastInfos';
|
|
5
11
|
export * from './MessageFlashList';
|
|
6
12
|
export * from './Notifications';
|
|
13
|
+
export * from './Qwant';
|
|
14
|
+
export * from './Rss';
|
|
7
15
|
export * from './SchoolSpace';
|
|
16
|
+
export * from './ScreenTime';
|
|
8
17
|
export * from './UsefulLinks';
|
|
18
|
+
export * from './Universalis';
|
|
9
19
|
export * from './UserSpace';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
20
|
+
export * from './WidgetsPersonalizationPanel';
|
|
21
|
+
export * from './TabsKids';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { School } from '@edifice.io/client';
|
|
2
|
-
export declare function useUserSchools(): {
|
|
1
|
+
import { School, WidgetName } from '@edifice.io/client';
|
|
2
|
+
export declare function useUserSchools(widgetName?: WidgetName): {
|
|
3
3
|
schools: School[];
|
|
4
4
|
selectedSchool: School | undefined;
|
|
5
5
|
handleSelectedSchoolChange: (school: School) => void;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { WIDGET_NAME } from "@edifice.io/client";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import useWidget from "
|
|
4
|
-
import useSession from "
|
|
5
|
-
function useUserSchools() {
|
|
3
|
+
import useWidget from "./useWidget.js";
|
|
4
|
+
import useSession from "../../../hooks/useSession/useSession.js";
|
|
5
|
+
function useUserSchools(widgetName = WIDGET_NAME.SCHOOL) {
|
|
6
6
|
var _a, _b;
|
|
7
7
|
const {
|
|
8
8
|
data: session
|
|
9
9
|
} = useSession(), {
|
|
10
10
|
preference,
|
|
11
11
|
savePreference
|
|
12
|
-
} = useWidget(
|
|
12
|
+
} = useWidget(widgetName), [selectedSchool, setSelectedSchool] = useState(), [schools, setSchools] = useState((_a = session == null ? void 0 : session.userDescription) == null ? void 0 : _a.schools);
|
|
13
13
|
return useEffect(() => {
|
|
14
14
|
var _a2;
|
|
15
15
|
const newSchools = (_a2 = session == null ? void 0 : session.userDescription) == null ? void 0 : _a2.schools;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconAddWidget: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconAddWidget;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconAddWidget = ({
|
|
3
|
+
title,
|
|
4
|
+
titleId,
|
|
5
|
+
...props
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 20 20", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M15.834 10.833c.46 0 .833.373.833.834v2.5h2.5a.833.833 0 0 1 0 1.666h-2.5v2.5a.833.833 0 0 1-1.667 0v-2.5h-2.5a.833.833 0 0 1 0-1.666H15v-2.5c0-.46.373-.834.834-.834M8.333 3.333A.833.833 0 0 0 7.5 2.5h-5a.833.833 0 0 0-.833.833v13.334c0 .46.373.833.833.833h5c.46 0 .833-.373.833-.833zM10 16.667a2.5 2.5 0 0 1-2.5 2.5h-5a2.5 2.5 0 0 1-2.5-2.5V3.333a2.5 2.5 0 0 1 2.5-2.5h5a2.5 2.5 0 0 1 2.5 2.5zM18.334 3.333A.833.833 0 0 0 17.5 2.5h-3.333a.833.833 0 0 0-.833.833v3.334c0 .46.373.833.833.833H17.5c.46 0 .834-.373.834-.833zM20 6.667a2.5 2.5 0 0 1-2.5 2.5h-3.333a2.5 2.5 0 0 1-2.5-2.5V3.333a2.5 2.5 0 0 1 2.5-2.5H17.5a2.5 2.5 0 0 1 2.5 2.5z", clipRule: "evenodd" })
|
|
9
|
+
] });
|
|
10
|
+
export {
|
|
11
|
+
SvgIconAddWidget as default
|
|
12
|
+
};
|
|
@@ -40,7 +40,6 @@ export { default as IconEducagri } from './IconEducagri';
|
|
|
40
40
|
export { default as IconEdumedia } from './IconEdumedia';
|
|
41
41
|
export { default as IconEdumoov } from './IconEdumoov';
|
|
42
42
|
export { default as IconEdutheque } from './IconEdutheque';
|
|
43
|
-
export { default as IconElea } from './IconElea';
|
|
44
43
|
export { default as IconElectron } from './IconElectron';
|
|
45
44
|
export { default as IconElyceepicardie } from './IconElyceepicardie';
|
|
46
45
|
export { default as IconEsidoc } from './IconEsidoc';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as IconAddUser } from './IconAddUser';
|
|
2
|
+
export { default as IconAddWidget } from './IconAddWidget';
|
|
2
3
|
export { default as IconAdd } from './IconAdd';
|
|
3
4
|
export { default as IconAdjustSettings } from './IconAdjustSettings';
|
|
4
5
|
export { default as IconAiFill } from './IconAiFill';
|
|
@@ -3,15 +3,13 @@ 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
|
|
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: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsxs("g", {
|
|
9
|
-
/* @__PURE__ */ jsx("path", {
|
|
10
|
-
/* @__PURE__ */ jsx("path", {
|
|
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" })
|
|
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" })
|
|
13
11
|
] }),
|
|
14
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-communities-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0
|
|
12
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-communities-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
15
13
|
] });
|
|
16
14
|
export {
|
|
17
15
|
SvgIconCommunitiesBeta as default
|
|
@@ -3,10 +3,13 @@ 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
|
|
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: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
|
|
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" }) }) })
|
|
10
13
|
] });
|
|
11
14
|
export {
|
|
12
15
|
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
|
|
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: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsxs("g", { clipPath: "url(#icon-messages-beta_svg__a)", children: [
|
|
9
|
-
/* @__PURE__ */ jsx("path", {
|
|
10
|
-
/* @__PURE__ */ jsx("path", {
|
|
11
|
-
/* @__PURE__ */ jsx("path", {
|
|
12
|
-
/* @__PURE__ */ jsx("path", {
|
|
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" })
|
|
13
13
|
] }),
|
|
14
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-messages-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0
|
|
14
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-messages-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
15
15
|
] });
|
|
16
16
|
export {
|
|
17
17
|
SvgIconMessagesBeta as default
|
|
@@ -3,10 +3,9 @@ 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
|
|
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: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("g", {
|
|
9
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-my-apps-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
|
|
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" }) })
|
|
10
9
|
] });
|
|
11
10
|
export {
|
|
12
11
|
SvgIconMyAppsBeta as default
|
|
@@ -3,11 +3,9 @@ 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
|
|
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: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("path", {
|
|
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" })
|
|
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" })
|
|
11
9
|
] });
|
|
12
10
|
export {
|
|
13
11
|
SvgIconNotificationBeta as default
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export { default as FileCard } from './FileCard';
|
|
2
2
|
export * from './FileCard';
|
|
3
|
-
export { default as GoogleDriveFileCard } from './GoogleDriveFileCard';
|
|
4
|
-
export * from './GoogleDriveFileCard';
|
|
5
3
|
export { default as NextcloudFileCard } from './NextcloudFileCard';
|
|
6
4
|
export * from './NextcloudFileCard';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { App, ILinkedResource } from '@edifice.io/client';
|
|
3
2
|
/**
|
|
4
3
|
* Definition of an internal link.
|
|
@@ -33,11 +32,6 @@ export interface InternalLinkerProps {
|
|
|
33
32
|
applicationList?: ApplicationOption[];
|
|
34
33
|
/** Whether to show the application selector */
|
|
35
34
|
showApplicationSelector?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Rendered on the search row, where the application selector sits, for
|
|
38
|
-
* consumers that hide that selector but still need a filter of their own.
|
|
39
|
-
*/
|
|
40
|
-
searchFilter?: ReactNode;
|
|
41
35
|
/** Disable application selecetor */
|
|
42
36
|
disableApplicationSelector?: boolean;
|
|
43
37
|
/** Optional callback to filter resources after loading. Applied in addition to search filters. */
|
|
@@ -55,5 +49,5 @@ export interface InternalLinkerProps {
|
|
|
55
49
|
/** Label for the "load more" button. Defaults to the `bbm.linker.see.more` i18n key. */
|
|
56
50
|
loadMoreLabel?: string;
|
|
57
51
|
}
|
|
58
|
-
export declare const InternalLinker: ({ appCode, defaultAppCode, defaultResourceId, onChange, onSelect, multiple, resourceList, applicationList, showApplicationSelector,
|
|
52
|
+
export declare const InternalLinker: ({ appCode, defaultAppCode, defaultResourceId, onChange, onSelect, multiple, resourceList, applicationList, showApplicationSelector, disableApplicationSelector, resourceFilter, onSearch, hasMoreResources, onLoadMore, loadMoreLabel, }: InternalLinkerProps) => import("react/jsx-runtime").JSX.Element;
|
|
59
53
|
export default InternalLinker;
|
|
@@ -23,7 +23,6 @@ const InternalLinker = ({
|
|
|
23
23
|
resourceList,
|
|
24
24
|
applicationList,
|
|
25
25
|
showApplicationSelector = !0,
|
|
26
|
-
searchFilter,
|
|
27
26
|
disableApplicationSelector = !1,
|
|
28
27
|
resourceFilter,
|
|
29
28
|
onSearch,
|
|
@@ -132,7 +131,6 @@ const InternalLinker = ({
|
|
|
132
131
|
] }), variant: "ghost", size: "md", disabled: disableApplicationSelector }),
|
|
133
132
|
/* @__PURE__ */ jsx(Dropdown.Menu, { children: options == null ? void 0 : options.map((option) => /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => handleOptionClick(option), children: option.displayName }, option.application)) })
|
|
134
133
|
] }) }),
|
|
135
|
-
!showApplicationSelector && searchFilter && /* @__PURE__ */ jsx("div", { className: "flex-shrink-1 px-8 py-12 border-end align-self-center", children: searchFilter }),
|
|
136
134
|
/* @__PURE__ */ jsx("div", { className: "flex-grow-1 align-self-center", children: /* @__PURE__ */ jsx("form", { className: "gap-16 d-flex w-100 align-items-center px-16 py-8", onSubmit: handleSubmit, children: /* @__PURE__ */ jsx(SearchBar, { isVariant: !0, placeholder: t("search"), size: "lg", className: "w-100", disabled: !selectedApplication, onChange: handleSearchChange }) }) })
|
|
137
135
|
] }),
|
|
138
136
|
/* @__PURE__ */ jsxs("div", { className: "internal-linker flex-grow-1 w-100 rounded-bottom border gap-0 overflow-auto", children: [
|
|
@@ -33,11 +33,9 @@ const orderedTabs = [
|
|
|
33
33
|
// Media browser
|
|
34
34
|
"nextcloud",
|
|
35
35
|
// Nextcloud media browser
|
|
36
|
-
"google-drive",
|
|
37
|
-
// Google Drive media browser
|
|
38
36
|
"video-embedder"
|
|
39
37
|
// Link to a hosted video
|
|
40
|
-
],
|
|
38
|
+
], mediaLibraryTypes = {
|
|
41
39
|
none: null,
|
|
42
40
|
audio: {
|
|
43
41
|
title: "bbm.audio.modal.title",
|
|
@@ -76,7 +74,7 @@ const orderedTabs = [
|
|
|
76
74
|
onCancel,
|
|
77
75
|
onTabChange
|
|
78
76
|
}, ref) => {
|
|
79
|
-
var _a, _b
|
|
77
|
+
var _a, _b;
|
|
80
78
|
const linkTabProps = useRef(), refModal = useRef(null);
|
|
81
79
|
useImperativeHandle(ref, () => ({
|
|
82
80
|
show,
|
|
@@ -87,9 +85,9 @@ const orderedTabs = [
|
|
|
87
85
|
}));
|
|
88
86
|
const {
|
|
89
87
|
t
|
|
90
|
-
} = useTranslation(), workspaceCreateWorkflow = useHasWorkflow("org.entcore.workspace.controllers.WorkspaceController|addDocument"), videoCaptureWorkflow = useHasWorkflow("com.opendigitaleducation.video.controllers.VideoController|capture"), nextcloudViewWorkflow = useHasWorkflow("fr.openent.nextcloud.controller.NextcloudController|view"),
|
|
88
|
+
} = useTranslation(), workspaceCreateWorkflow = useHasWorkflow("org.entcore.workspace.controllers.WorkspaceController|addDocument"), videoCaptureWorkflow = useHasWorkflow("com.opendigitaleducation.video.controllers.VideoController|capture"), nextcloudViewWorkflow = useHasWorkflow("fr.openent.nextcloud.controller.NextcloudController|view"), {
|
|
91
89
|
data: workspacePublicConf
|
|
92
|
-
} = usePublicConf("workspace"), enableNextcloudTab = ((_a = workspacePublicConf == null ? void 0 : workspacePublicConf["folder-service"]) == null ? void 0 : _a.includes("nextcloud")) && nextcloudViewWorkflow,
|
|
90
|
+
} = usePublicConf("workspace"), enableNextcloudTab = ((_a = workspacePublicConf == null ? void 0 : workspacePublicConf["folder-service"]) == null ? void 0 : _a.includes("nextcloud")) && nextcloudViewWorkflow, [type, setType] = useState(null);
|
|
93
91
|
useHttpErrorToast({
|
|
94
92
|
active: !!type,
|
|
95
93
|
isDismissible: !0,
|
|
@@ -112,15 +110,6 @@ const orderedTabs = [
|
|
|
112
110
|
availableFor: ["audio", "video", "image", "attachment"],
|
|
113
111
|
isEnable: () => !!enableNextcloudTab
|
|
114
112
|
},
|
|
115
|
-
"google-drive": {
|
|
116
|
-
id: "google-drive",
|
|
117
|
-
// FIXME No Google Drive icon in the pack yet; reusing the generic one.
|
|
118
|
-
icon: /* @__PURE__ */ jsx(SvgIconGlobe2, {}),
|
|
119
|
-
label: t("bbm.google-drive"),
|
|
120
|
-
content: /* @__PURE__ */ jsx(InnerTabs.GoogleDrive, {}),
|
|
121
|
-
availableFor: ["audio", "video", "image", "attachment"],
|
|
122
|
-
isEnable: () => !!enableGoogleDriveTab
|
|
123
|
-
},
|
|
124
113
|
upload: {
|
|
125
114
|
id: "upload",
|
|
126
115
|
icon: /* @__PURE__ */ jsx(SvgIconSmartphone, {}),
|
|
@@ -206,7 +195,7 @@ const orderedTabs = [
|
|
|
206
195
|
const typeKey = type || "none";
|
|
207
196
|
!defaultTabId && typeof ((_a2 = mediaLibraryTypes[typeKey]) == null ? void 0 : _a2.defaultTab) == "string" && setDefaultTabId((_b2 = mediaLibraryTypes[typeKey]) == null ? void 0 : _b2.defaultTab);
|
|
208
197
|
}, [defaultTabId, type]);
|
|
209
|
-
const modalHeader = t(((
|
|
198
|
+
const modalHeader = t(((_b = mediaLibraryTypes[type ?? "none"]) == null ? void 0 : _b.title) ?? "bbm"), resetState = () => {
|
|
210
199
|
linkTabProps.current = void 0, setResult(void 0), setResultCounter(void 0), setDefaultTabId(void 0), setPreSuccess(void 0), setDeletionsOnCancel([]);
|
|
211
200
|
}, handleTabChange = (tab) => {
|
|
212
201
|
onTabChange == null || onTabChange(tab, deletionsOnCancel), resetState();
|
|
@@ -5,7 +5,6 @@ export declare const InnerTabs: {
|
|
|
5
5
|
ExternalLink: ({ link, multiNodeSelected, }: import('./ExternalLink').ExternalLinkTabProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
Workspace: () => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
Nextcloud: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
GoogleDrive: () => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
InternalLink: ({ target, resourceId, appPrefix, }: import('./InternalLink').InternalLinkTabProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
Iframe: () => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
VideoEmbedder: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Audio } from "./Audio.js";
|
|
2
2
|
import { ExternalLink } from "./ExternalLink.js";
|
|
3
|
-
import { GoogleDrive } from "./GoogleDrive.js";
|
|
4
3
|
import { Iframe } from "./Iframe.js";
|
|
5
4
|
import { InternalLink } from "./InternalLink.js";
|
|
6
5
|
import { Nextcloud } from "./Nextcloud.js";
|
|
@@ -15,7 +14,6 @@ const InnerTabs = {
|
|
|
15
14
|
ExternalLink,
|
|
16
15
|
Workspace,
|
|
17
16
|
Nextcloud,
|
|
18
|
-
GoogleDrive,
|
|
19
17
|
InternalLink,
|
|
20
18
|
Iframe,
|
|
21
19
|
VideoEmbedder
|
|
@@ -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,
|
|
153
|
+
/* @__PURE__ */ jsx("div", { className: "workspace-search px-16 py-8 ", children: /* @__PURE__ */ jsx(SearchBar, { isVariant: !0, 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: [
|