@edifice.io/react 2.6.7-develop-b2school.20260930103331 → 2.6.7-develop-pedago.20260930173910
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/Alert/Alert.js +23 -47
- package/dist/components/AppIcon/AppIcon.js +5 -11
- package/dist/components/Form/FormText.js +6 -11
- package/dist/components/Image/Image.js +2 -5
- package/dist/components/Input/Input.d.ts +2 -11
- package/dist/components/Input/Input.js +21 -43
- package/dist/components/Label/Label.js +4 -4
- package/dist/components/Layout/Layout.js +15 -30
- package/dist/components/PageLayout/PageLayout.d.ts +0 -4
- package/dist/components/PageLayout/PageLayout.js +14 -37
- package/dist/components/PageLayout/components/PageLayoutContent.js +1 -5
- package/dist/components/Table/components/Table.d.ts +2 -2
- package/dist/components/Table/components/TableTd.d.ts +1 -1
- package/dist/components/Table/components/TableTh.d.ts +1 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/homepage.js +3 -17
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +1 -1
- package/dist/hooks/useClickOutside/useClickOutside.js +2 -3
- package/dist/hooks/useToast/useToast.d.ts +0 -1
- package/dist/hooks/useToast/useToast.js +9 -12
- package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +2 -16
- package/dist/hooks/useZendeskGuide/useZendeskGuide.js +24 -58
- package/dist/icons.js +402 -404
- package/dist/index.js +160 -168
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +3 -3
- package/dist/modules/homepage/components/Communities/Communities.d.ts +2 -1
- package/dist/modules/homepage/components/Communities/Communities.js +14 -13
- package/dist/modules/homepage/components/Communities/CommunitiesContainer.d.ts +1 -1
- package/dist/modules/homepage/components/Communities/CommunitiesContainer.js +9 -5
- package/dist/modules/homepage/components/Communities/CommunitiesSkeleton.js +4 -7
- package/dist/modules/homepage/components/Communities/useCommunities.d.ts +4 -1
- package/dist/modules/homepage/components/Communities/useCommunities.js +8 -3
- package/dist/modules/homepage/components/Favorites/Favorites.js +2 -2
- package/dist/modules/homepage/components/Header/Header.js +4 -11
- package/dist/modules/homepage/components/HomeCard/HomeCard.d.ts +1 -1
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +1 -15
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +2 -3
- package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.js +26 -36
- package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js +1 -1
- package/dist/modules/homepage/components/Notifications/services/queries/notification.js +2 -9
- package/dist/modules/homepage/components/UserSpace/UserSpace.d.ts +1 -3
- package/dist/modules/homepage/components/UserSpace/UserSpace.js +7 -13
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.d.ts +2 -4
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.js +2 -3
- package/dist/modules/homepage/components/UserSpace/hooks/useProfileLinks.js +8 -18
- package/dist/modules/homepage/components/index.d.ts +1 -3
- package/dist/modules/icons/components/index.d.ts +0 -1
- package/dist/modules/widgets/index.d.ts +1 -1
- package/package.json +6 -6
- package/dist/components/LinkPill/LinkPill.d.ts +0 -41
- package/dist/components/LinkPill/LinkPill.js +0 -28
- package/dist/components/LinkPill/index.d.ts +0 -2
- package/dist/components/ModalBeta/ModalBeta.d.ts +0 -47
- package/dist/components/ModalBeta/ModalBeta.js +0 -62
- package/dist/components/ModalBeta/ModalBetaBody.d.ts +0 -19
- package/dist/components/ModalBeta/ModalBetaBody.js +0 -15
- package/dist/components/ModalBeta/ModalBetaContext.d.ts +0 -7
- package/dist/components/ModalBeta/ModalBetaContext.js +0 -15
- package/dist/components/ModalBeta/ModalBetaFooter.d.ts +0 -13
- package/dist/components/ModalBeta/ModalBetaFooter.js +0 -7
- package/dist/components/ModalBeta/ModalBetaHeader.d.ts +0 -23
- package/dist/components/ModalBeta/ModalBetaHeader.js +0 -31
- package/dist/components/ModalBeta/index.d.ts +0 -2
- package/dist/components/PageLayout/components/PageLayoutHelpZone.d.ts +0 -12
- package/dist/components/PageLayout/components/PageLayoutHelpZone.js +0 -6
- package/dist/hooks/useBackground/index.d.ts +0 -1
- package/dist/hooks/useBackground/useBackground.d.ts +0 -7
- package/dist/hooks/useBackground/useBackground.js +0 -16
- package/dist/hooks/useUserPreferences/index.d.ts +0 -1
- package/dist/hooks/useUserPreferences/useUserPreferences.d.ts +0 -9
- package/dist/hooks/useUserPreferences/useUserPreferences.js +0 -40
- package/dist/modules/HelpZone/HelpZone.d.ts +0 -13
- package/dist/modules/HelpZone/HelpZone.js +0 -52
- package/dist/modules/HelpZone/HelpZoneContainer.d.ts +0 -4
- package/dist/modules/HelpZone/HelpZoneContainer.js +0 -18
- package/dist/modules/HelpZone/index.d.ts +0 -3
- package/dist/modules/homepage/components/UsefulLinks/LinkForm.d.ts +0 -13
- package/dist/modules/homepage/components/UsefulLinks/LinkForm.js +0 -67
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.d.ts +0 -6
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.js +0 -31
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinksContainer.d.ts +0 -1
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinksContainer.js +0 -40
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.d.ts +0 -11
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.js +0 -65
- package/dist/modules/homepage/components/UsefulLinks/hooks/useUsefulLinksContainer.d.ts +0 -19
- package/dist/modules/homepage/components/UsefulLinks/hooks/useUsefulLinksContainer.js +0 -26
- package/dist/modules/homepage/components/UsefulLinks/index.d.ts +0 -5
- package/dist/modules/homepage/components/UsefulLinks/services/api/index.d.ts +0 -6
- package/dist/modules/homepage/components/UsefulLinks/services/api/index.js +0 -5
- package/dist/modules/homepage/components/UsefulLinks/services/api/usefulLinksService.d.ts +0 -31
- package/dist/modules/homepage/components/UsefulLinks/services/api/usefulLinksService.js +0 -50
- package/dist/modules/homepage/components/UsefulLinks/services/queries/usefulLinks.d.ts +0 -20
- package/dist/modules/homepage/components/UsefulLinks/services/queries/usefulLinks.js +0 -65
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.d.ts +0 -16
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js +0 -15
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.d.ts +0 -21
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js +0 -47
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/index.d.ts +0 -2
- package/dist/modules/icons/components/IconAddWidget.d.ts +0 -7
- package/dist/modules/icons/components/IconAddWidget.js +0 -12
- package/dist/modules/icons/components/logo/IconLogoEdificeFull.d.ts +0 -7
- package/dist/modules/icons/components/logo/IconLogoEdificeFull.js +0 -26
- package/dist/modules/icons/components/logo/IconLogoEdificeSmall.d.ts +0 -7
- package/dist/modules/icons/components/logo/IconLogoEdificeSmall.js +0 -17
- package/dist/modules/icons/components/logo/index.d.ts +0 -2
|
@@ -16,10 +16,10 @@ function Favorites({
|
|
|
16
16
|
sensitivity: "base"
|
|
17
17
|
})), [apps, t]);
|
|
18
18
|
return /* @__PURE__ */ jsxs(HomeCard, { variant: "secondary", children: [
|
|
19
|
-
/* @__PURE__ */ jsx(HomeCard.Header, { title: t("homepage.favorites.title"), actionLabel: t("homepage.favorites.all"), onActionClick: onSeeAllClick, actionRightIcon: /* @__PURE__ */ jsx(SvgIconArrowRight, {}) }),
|
|
19
|
+
/* @__PURE__ */ jsx(HomeCard.Header, { title: t("homepage.favorites.title", "Favoris"), actionLabel: t("homepage.favorites.all", "Mes applis"), onActionClick: onSeeAllClick, actionRightIcon: /* @__PURE__ */ jsx(SvgIconArrowRight, {}) }),
|
|
20
20
|
/* @__PURE__ */ jsx(HomeCard.Content, { children: /* @__PURE__ */ jsx("div", { className: "favorites-content", children: visibleApps.length === 0 ? /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "12", children: [
|
|
21
21
|
/* @__PURE__ */ jsx("img", { src: illuEmptyFavorite, alt: "", width: 50, height: 50 }),
|
|
22
|
-
/* @__PURE__ */ jsx("span", { className: "favorites-empty-text", children: t("homepage.favorites.empty") })
|
|
22
|
+
/* @__PURE__ */ jsx("span", { className: "favorites-empty-text", children: t("homepage.favorites.empty", "Ajouter des applications à vos favoris pour les retrouver ici et y accéder rapidement !") })
|
|
23
23
|
] }) : /* @__PURE__ */ jsx(Flex, { wrap: "wrap", gap: "8 16", children: visibleApps.map((app) => {
|
|
24
24
|
const appName = getAppName(app), opensInNewTab = app.isExternal || app.target === "_blank";
|
|
25
25
|
return /* @__PURE__ */ jsx("a", { href: app.address, "aria-label": appName, title: appName, target: opensInNewTab ? "_blank" : void 0, rel: opensInNewTab ? "noopener noreferrer" : void 0, children: /* @__PURE__ */ jsx(AppIcon, { app, size: "40", variant: "square" }) }, app.name);
|
|
@@ -6,7 +6,6 @@ import { Navbar } from "../../../../components/Layout/components/Navbar.js";
|
|
|
6
6
|
import { NavItem } from "../../../../components/Layout/components/NavItem.js";
|
|
7
7
|
import { NavLink } from "../../../../components/Layout/components/NavLink.js";
|
|
8
8
|
import useHeader from "../../../../components/Layout/hooks/useHeader.js";
|
|
9
|
-
import SvgIconSetBackground from "../../../icons/components/IconSetBackground.js";
|
|
10
9
|
import SvgIconCommunitiesBeta from "../../../icons/components/nav/IconCommunitiesBeta.js";
|
|
11
10
|
import SvgIconDisconnect from "../../../icons/components/nav/IconDisconnect.js";
|
|
12
11
|
import SvgIconHomeBeta from "../../../icons/components/nav/IconHomeBeta.js";
|
|
@@ -87,16 +86,10 @@ const Header = ({
|
|
|
87
86
|
] }),
|
|
88
87
|
/* @__PURE__ */ jsxs(NavItem, { className: "position-relative", ref: userRef, id: popoverUserId, "aria-haspopup": "true", "aria-expanded": isUserHovered, "data-testid": "header-user-menu-button", children: [
|
|
89
88
|
/* @__PURE__ */ jsx(NavLink, { link: "/userbook/mon-compte", translate: t("navbar.myaccount"), "data-testid": "header-user-profile-button", children: /* @__PURE__ */ jsx(Avatar, { alt: userName, size: "sm", src: userAvatar, variant: "circle", className: "bg-white", width: "32", height: "32" }) }),
|
|
90
|
-
/* @__PURE__ */ jsx(Popover, { align: "end", className: "widget", id: popoverUserId, isVisible: isUserHovered, children: /* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
] }),
|
|
95
|
-
/* @__PURE__ */ jsxs("a", { href: "/auth/logout?callback=" + ((theme == null ? void 0 : theme.logoutCallback) ?? ""), className: "nav-link logout d-flex align-items-center gap-8", "data-testid": "header-logout-button", children: [
|
|
96
|
-
/* @__PURE__ */ jsx(SvgIconDisconnect, { className: "icon logout" }),
|
|
97
|
-
/* @__PURE__ */ jsx("span", { id: "logout-label", className: "nav-text", children: t("navbar.disconnect") })
|
|
98
|
-
] })
|
|
99
|
-
] }) })
|
|
89
|
+
/* @__PURE__ */ jsx(Popover, { align: "end", className: "widget", id: popoverUserId, isVisible: isUserHovered, children: /* @__PURE__ */ jsx(PopoverBody, { children: /* @__PURE__ */ jsxs("a", { href: "/auth/logout?callback=" + ((theme == null ? void 0 : theme.logoutCallback) ?? ""), className: "nav-link logout d-flex align-items-center gap-8", "data-testid": "header-logout-button", children: [
|
|
90
|
+
/* @__PURE__ */ jsx(SvgIconDisconnect, { className: "icon logout" }),
|
|
91
|
+
/* @__PURE__ */ jsx("span", { id: "logout-label", className: "nav-text", children: t("navbar.disconnect") })
|
|
92
|
+
] }) }) })
|
|
100
93
|
] })
|
|
101
94
|
] })
|
|
102
95
|
] }) });
|
|
@@ -30,7 +30,7 @@ declare const HomeCard: {
|
|
|
30
30
|
displayName: string;
|
|
31
31
|
} & {
|
|
32
32
|
Header: {
|
|
33
|
-
({ title, actionLabel, onActionClick, actionLeftIcon, actionRightIcon,
|
|
33
|
+
({ title, actionLabel, onActionClick, actionLeftIcon, actionRightIcon, className, ...rest }: HomeCardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
34
34
|
displayName: string;
|
|
35
35
|
};
|
|
36
36
|
Content: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
-
import { ButtonBeta } from '../../../../components';
|
|
3
2
|
export interface HomeCardHeaderProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
4
3
|
/** Title displayed on the left side of the header. */
|
|
5
4
|
title: ReactNode;
|
|
@@ -11,22 +10,9 @@ export interface HomeCardHeaderProps extends Omit<ComponentPropsWithoutRef<'div'
|
|
|
11
10
|
actionLeftIcon?: ReactNode;
|
|
12
11
|
/** Optional right icon of the action button. */
|
|
13
12
|
actionRightIcon?: ReactNode;
|
|
14
|
-
/**
|
|
15
|
-
* Extra props spread onto the action button (e.g. `data-testid`) — its
|
|
16
|
-
* default `data-testid` (`home-card-header-action`) isn't unique across
|
|
17
|
-
* the several `HomeCard`s a page can render, so consumers doing that
|
|
18
|
-
* should override it here. The `data-*` index signature covers
|
|
19
|
-
* attributes like `data-testid` that `ButtonBetaProps` doesn't declare:
|
|
20
|
-
* TypeScript's built-in allowance for undeclared `data-*`/`aria-*`
|
|
21
|
-
* attributes only applies to attributes written directly on a JSX
|
|
22
|
-
* element, not to a plain object literal passed as a prop value.
|
|
23
|
-
*/
|
|
24
|
-
actionProps?: ComponentPropsWithoutRef<typeof ButtonBeta> & {
|
|
25
|
-
[key: `data-${string}`]: string;
|
|
26
|
-
};
|
|
27
13
|
}
|
|
28
14
|
declare const HomeCardHeader: {
|
|
29
|
-
({ title, actionLabel, onActionClick, actionLeftIcon, actionRightIcon,
|
|
15
|
+
({ title, actionLabel, onActionClick, actionLeftIcon, actionRightIcon, className, ...rest }: HomeCardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
16
|
displayName: string;
|
|
31
17
|
};
|
|
32
18
|
export default HomeCardHeader;
|
|
@@ -8,14 +8,13 @@ const HomeCardHeader = ({
|
|
|
8
8
|
onActionClick,
|
|
9
9
|
actionLeftIcon,
|
|
10
10
|
actionRightIcon,
|
|
11
|
-
actionProps,
|
|
12
11
|
className,
|
|
13
12
|
...rest
|
|
14
13
|
}) => {
|
|
15
14
|
const hasAction = !!actionLabel && !!onActionClick;
|
|
16
|
-
return /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", gap: "8", className: clsx("home-card-header", className), ...rest, children: [
|
|
15
|
+
return /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", gap: "8", wrap: "wrap", className: clsx("home-card-header", className), ...rest, children: [
|
|
17
16
|
/* @__PURE__ */ jsx("h3", { className: "home-card-header-title", children: title }),
|
|
18
|
-
hasAction && /* @__PURE__ */ jsx(ButtonBeta, { color: "tertiary", size: "sm", variant: "ghost", onClick: onActionClick, leftIcon: actionLeftIcon, rightIcon: actionRightIcon, "data-testid": "home-card-header-action",
|
|
17
|
+
hasAction && /* @__PURE__ */ jsx(ButtonBeta, { color: "tertiary", size: "sm", variant: "ghost", onClick: onActionClick, className: "home-card-header-action", leftIcon: actionLeftIcon, rightIcon: actionRightIcon, "data-testid": "home-card-header-action", children: actionLabel })
|
|
19
18
|
] });
|
|
20
19
|
};
|
|
21
20
|
export {
|
package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import { useState
|
|
3
|
+
import { useState } from "react";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import SvgIconCheck from "../../../../icons/components/IconCheck.js";
|
|
6
6
|
import { getAppCodeAndI18nKey } from "./notificationAdapter.js";
|
|
7
7
|
import Modal from "../../../../../components/Modal/Modal.js";
|
|
8
8
|
import Flex from "../../../../../components/Flex/Flex.js";
|
|
9
|
+
import Checkbox from "../../../../../components/Checkbox/Checkbox.js";
|
|
9
10
|
import AppIcon from "../../../../../components/AppIcon/AppIcon.js";
|
|
10
11
|
import ButtonBeta from "../../../../../components/ButtonBeta/ButtonBeta.js";
|
|
11
12
|
const NotificationFilterModal = ({
|
|
@@ -16,59 +17,48 @@ const NotificationFilterModal = ({
|
|
|
16
17
|
onApply
|
|
17
18
|
}) => {
|
|
18
19
|
const {
|
|
19
|
-
t
|
|
20
|
-
|
|
21
|
-
} = useTranslation(), [selected, setSelected] = useState(appliedTypes), refSelectAllCheckbox = useRef(null), allTypesSorted = useMemo(() => allTypes.map((type) => {
|
|
22
|
-
const [appCode, appI18nKey] = getAppCodeAndI18nKey(type), label = t(appI18nKey, {
|
|
23
|
-
defaultValue: appCode
|
|
24
|
-
});
|
|
25
|
-
return {
|
|
26
|
-
type,
|
|
27
|
-
appCode,
|
|
28
|
-
appI18nKey,
|
|
29
|
-
label
|
|
30
|
-
};
|
|
31
|
-
}).sort((a, b) => a.label.localeCompare(b.label, i18n.language, {
|
|
32
|
-
sensitivity: "base"
|
|
33
|
-
})), [allTypes, t, i18n.language]), toggleType = (type) => {
|
|
20
|
+
t
|
|
21
|
+
} = useTranslation(), [selected, setSelected] = useState(appliedTypes), toggleType = (type) => {
|
|
34
22
|
setSelected((current) => current.includes(type) ? current.filter((value) => value !== type) : [...current, type]);
|
|
35
23
|
}, toggleAll = () => {
|
|
36
24
|
setSelected(selected.length === allTypes.length ? [] : allTypes);
|
|
37
25
|
};
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
/* @__PURE__ */ jsx(Modal.Subtitle, { children: t("homepage.notifications.filter-modal.subtitle"
|
|
26
|
+
return /* @__PURE__ */ jsxs(Modal, { id: "notification-filter-modal", size: "lg", scrollable: !0, isOpen, onModalClose: onCancel, children: [
|
|
27
|
+
/* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: t("homepage.notifications.filter-modal.title", {
|
|
28
|
+
defaultValue: "Filtrer les notifications"
|
|
29
|
+
}) }),
|
|
30
|
+
/* @__PURE__ */ jsx(Modal.Subtitle, { children: t("homepage.notifications.filter-modal.subtitle", {
|
|
31
|
+
defaultValue: "Sélectionnez seulement les notifications importantes pour vous"
|
|
32
|
+
}) }),
|
|
43
33
|
/* @__PURE__ */ jsxs(Modal.Body, { children: [
|
|
44
|
-
/* @__PURE__ */ jsxs(Flex, { align: "center", gap: "8", className: "mb-
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
] }),
|
|
34
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", gap: "8", className: "mb-16", children: [
|
|
35
|
+
/* @__PURE__ */ jsx("div", { className: "notification-filter-select-all", children: /* @__PURE__ */ jsx(Checkbox, { label: t("homepage.notifications.filter-modal.select-all", {
|
|
36
|
+
defaultValue: "Tout sélectionner"
|
|
37
|
+
}), checked: selected.length === allTypes.length, indeterminate: selected.length > 0 && selected.length < allTypes.length, onChange: toggleAll }) }),
|
|
49
38
|
/* @__PURE__ */ jsx("span", { className: "notification-filter-count", children: t("homepage.notifications.filter-modal.count", {
|
|
50
39
|
selected: selected.length,
|
|
51
|
-
total: allTypes.length
|
|
40
|
+
total: allTypes.length,
|
|
41
|
+
defaultValue: "[[selected]] / [[total]] sélectionnées"
|
|
52
42
|
}) })
|
|
53
43
|
] }),
|
|
54
|
-
/* @__PURE__ */ jsx(Flex, { wrap: "wrap", gap: "
|
|
55
|
-
type,
|
|
56
|
-
label,
|
|
57
|
-
appCode
|
|
58
|
-
}) => {
|
|
59
|
-
const checked = selected.includes(type);
|
|
44
|
+
/* @__PURE__ */ jsx(Flex, { wrap: "wrap", gap: "8", className: "notification-filter-options", children: allTypes.map((type) => {
|
|
45
|
+
const [appCode, appI18nKey] = getAppCodeAndI18nKey(type), checked = selected.includes(type);
|
|
60
46
|
return /* @__PURE__ */ jsxs("label", { className: clsx("notification-filter-chip", {
|
|
61
47
|
"is-checked": checked
|
|
62
48
|
}), children: [
|
|
63
49
|
/* @__PURE__ */ jsx(AppIcon, { app: appCode, size: "24", iconFit: "contain" }),
|
|
64
|
-
/* @__PURE__ */ jsx("span", { children:
|
|
65
|
-
|
|
50
|
+
/* @__PURE__ */ jsx("span", { children: t(appI18nKey, {
|
|
51
|
+
defaultValue: appCode
|
|
52
|
+
}) }),
|
|
53
|
+
/* @__PURE__ */ jsx("input", { type: "checkbox", className: "form-check-input", checked, onChange: () => toggleType(type) })
|
|
66
54
|
] }, type);
|
|
67
55
|
}) })
|
|
68
56
|
] }),
|
|
69
57
|
/* @__PURE__ */ jsxs(Modal.Footer, { children: [
|
|
70
58
|
/* @__PURE__ */ jsx(ButtonBeta, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: t("cancel") }),
|
|
71
|
-
/* @__PURE__ */ jsx(ButtonBeta, { color: "default", onClick: () => onApply(selected), type: "button", variant: "filled", rightIcon: /* @__PURE__ */ jsx(SvgIconCheck, {}), children: t("homepage.notifications.filter-modal.confirm"
|
|
59
|
+
/* @__PURE__ */ jsx(ButtonBeta, { color: "default", onClick: () => onApply(selected), type: "button", variant: "filled", rightIcon: /* @__PURE__ */ jsx(SvgIconCheck, {}), children: t("homepage.notifications.filter-modal.confirm", {
|
|
60
|
+
defaultValue: "Enregistrer"
|
|
61
|
+
}) })
|
|
72
62
|
] })
|
|
73
63
|
] });
|
|
74
64
|
};
|
package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js
CHANGED
|
@@ -11,7 +11,7 @@ const ReportNotificationModal = ({
|
|
|
11
11
|
const {
|
|
12
12
|
t
|
|
13
13
|
} = useTranslation();
|
|
14
|
-
return /* @__PURE__ */ jsxs(Modal, { id: "report-notification-modal", size: "
|
|
14
|
+
return /* @__PURE__ */ jsxs(Modal, { id: "report-notification-modal", size: "lg", isOpen, onModalClose: onCancel, children: [
|
|
15
15
|
/* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: t("homepage.notifications.report-modal.title", {
|
|
16
16
|
defaultValue: "Signaler une notification"
|
|
17
17
|
}) }),
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { odeServices } from "@edifice.io/client";
|
|
2
2
|
import { useQuery, useInfiniteQuery, useMutation, useQueryClient, queryOptions, infiniteQueryOptions } from "@tanstack/react-query";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
3
|
import { notificationService } from "../api/index.js";
|
|
5
|
-
import useToast from "../../../../../../hooks/useToast/useToast.js";
|
|
6
4
|
const notificationQueryKeys = {
|
|
7
5
|
all: () => ["notifications"],
|
|
8
6
|
notifications: (types = []) => [...notificationQueryKeys.all(), "list", types],
|
|
@@ -54,9 +52,7 @@ const notificationQueryKeys = {
|
|
|
54
52
|
}, useReportNotification = () => useMutation({
|
|
55
53
|
mutationFn: (id) => notificationService.reportNotification(id)
|
|
56
54
|
}), useDeleteNotification = () => {
|
|
57
|
-
const
|
|
58
|
-
t
|
|
59
|
-
} = useTranslation(), toast = useToast(), queryClient = useQueryClient();
|
|
55
|
+
const queryClient = useQueryClient();
|
|
60
56
|
return useMutation({
|
|
61
57
|
mutationFn: (id) => notificationService.deleteNotification(id),
|
|
62
58
|
onSuccess: (_data, id) => {
|
|
@@ -65,10 +61,7 @@ const notificationQueryKeys = {
|
|
|
65
61
|
}, (data) => data && {
|
|
66
62
|
...data,
|
|
67
63
|
pages: data.pages.map((page) => page.filter((notification) => notification._id !== id))
|
|
68
|
-
})
|
|
69
|
-
},
|
|
70
|
-
onError: () => {
|
|
71
|
-
toast.error(t("homepage.notifications.options.delete.error"));
|
|
64
|
+
});
|
|
72
65
|
}
|
|
73
66
|
});
|
|
74
67
|
};
|
|
@@ -5,10 +5,8 @@ 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;
|
|
10
8
|
};
|
|
11
|
-
declare function UserSpace({ name, avatar, profile, children,
|
|
9
|
+
declare function UserSpace({ name, avatar, profile, children, }: UserSpaceProps): import("react/jsx-runtime").JSX.Element;
|
|
12
10
|
declare namespace UserSpace {
|
|
13
11
|
var displayName: string;
|
|
14
12
|
}
|
|
@@ -1,33 +1,27 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
-
import SvgIconAddWidget from "../../../icons/components/IconAddWidget.js";
|
|
4
3
|
import SvgIconClass from "../../../icons/components/IconClass.js";
|
|
5
4
|
import { useProfileLinks } from "./hooks/useProfileLinks.js";
|
|
6
5
|
import HomeCard from "../HomeCard/HomeCard.js";
|
|
7
6
|
import Flex from "../../../../components/Flex/Flex.js";
|
|
8
7
|
import Avatar from "../../../../components/Avatar/Avatar.js";
|
|
9
|
-
import IconButton from "../../../../components/Button/IconButton.js";
|
|
10
8
|
import ButtonBeta from "../../../../components/ButtonBeta/ButtonBeta.js";
|
|
11
9
|
function UserSpace({
|
|
12
10
|
name,
|
|
13
11
|
avatar,
|
|
14
12
|
profile,
|
|
15
|
-
children
|
|
16
|
-
onCustomizeWidgetsClick
|
|
13
|
+
children
|
|
17
14
|
}) {
|
|
18
15
|
const {
|
|
19
16
|
t
|
|
20
17
|
} = useTranslation(), links = useProfileLinks(profile);
|
|
21
18
|
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: [
|
|
22
|
-
/* @__PURE__ */ jsxs(Flex, { className: "user-space", direction: "row",
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
|
|
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", "Personnaliser mes widgets"), onClick: onCustomizeWidgetsClick })
|
|
19
|
+
/* @__PURE__ */ jsxs(Flex, { className: "user-space", direction: "row", gap: "8", children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Avatar, { className: "user-space--avatar", size: "auto", alt: name, src: avatar, variant: "circle" }),
|
|
21
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
|
|
22
|
+
/* @__PURE__ */ jsx("div", { "data-testid": "user-space-name", className: "user-space--name", children: name }),
|
|
23
|
+
/* @__PURE__ */ jsx("div", { "data-testid": "user-space-profile", className: "user-space--profile", children: t(profile) })
|
|
24
|
+
] })
|
|
31
25
|
] }),
|
|
32
26
|
children && /* @__PURE__ */ jsx(HomeCard.Content, { children })
|
|
33
27
|
] });
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export declare function UserSpaceContainer({ children }: {
|
|
3
3
|
children?: ReactNode;
|
|
4
|
-
|
|
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,
|
|
15
|
+
return /* @__PURE__ */ jsx(UserSpace, { name, profile, avatar, children });
|
|
17
16
|
}
|
|
18
17
|
export {
|
|
19
18
|
UserSpaceContainer
|
|
@@ -17,20 +17,18 @@ function useProfileLinks(profile) {
|
|
|
17
17
|
structure: structureId
|
|
18
18
|
});
|
|
19
19
|
return `${baseUrl}?${params.toString()}`;
|
|
20
|
-
}, buildClassesUrl = (
|
|
21
|
-
const params = new URLSearchParams(
|
|
20
|
+
}, buildClassesUrl = (classIds = []) => {
|
|
21
|
+
const params = new URLSearchParams({
|
|
22
|
+
filters: "groups",
|
|
23
|
+
structure: structureId
|
|
24
|
+
});
|
|
22
25
|
return classIds.forEach((c) => params.append("class", String(c))), `${baseUrl}?${params.toString()}`;
|
|
23
26
|
};
|
|
24
27
|
switch (profile) {
|
|
25
28
|
case "Teacher":
|
|
26
29
|
return [{
|
|
27
30
|
text: t("homepage.userspace.teacher.link.classes"),
|
|
28
|
-
url: buildClassesUrl(
|
|
29
|
-
{
|
|
30
|
-
filters: "groups"
|
|
31
|
-
}
|
|
32
|
-
/* Do not explicitely add classes ids, because none <=> see all*/
|
|
33
|
-
)
|
|
31
|
+
url: buildClassesUrl(user.classes)
|
|
34
32
|
}];
|
|
35
33
|
case "Student":
|
|
36
34
|
return [{
|
|
@@ -38,12 +36,7 @@ function useProfileLinks(profile) {
|
|
|
38
36
|
url: "/userbook/annuaire#/search?filters=groups&profile=Teacher"
|
|
39
37
|
}, {
|
|
40
38
|
text: t("homepage.userspace.student.link.classes"),
|
|
41
|
-
url: buildClassesUrl(
|
|
42
|
-
{
|
|
43
|
-
filters: "groups"
|
|
44
|
-
}
|
|
45
|
-
/* Do not explicitely add classes ids, because none <=> see all*/
|
|
46
|
-
)
|
|
39
|
+
url: buildClassesUrl(user.classes)
|
|
47
40
|
}];
|
|
48
41
|
case "Relative":
|
|
49
42
|
return children != null && children.length ? children.map((child) => {
|
|
@@ -52,10 +45,7 @@ function useProfileLinks(profile) {
|
|
|
52
45
|
text: t("homepage.userspace.relative.link.classes", {
|
|
53
46
|
childName: child.firstName
|
|
54
47
|
}),
|
|
55
|
-
url: buildClassesUrl({
|
|
56
|
-
filters: "groups",
|
|
57
|
-
structure: structureId
|
|
58
|
-
}, (_a2 = child.classes) == null ? void 0 : _a2.map(({
|
|
48
|
+
url: buildClassesUrl((_a2 = child.classes) == null ? void 0 : _a2.map(({
|
|
59
49
|
id
|
|
60
50
|
}) => id))
|
|
61
51
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './Communities';
|
|
2
1
|
export * from './Favorites';
|
|
3
2
|
export * from './Header';
|
|
4
3
|
export * from './HomeCard';
|
|
@@ -6,6 +5,5 @@ export * from './LastInfos';
|
|
|
6
5
|
export * from './MessageFlashList';
|
|
7
6
|
export * from './Notifications';
|
|
8
7
|
export * from './SchoolSpace';
|
|
9
|
-
export * from './UsefulLinks';
|
|
10
8
|
export * from './UserSpace';
|
|
11
|
-
export * from './
|
|
9
|
+
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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.6.7-develop-
|
|
3
|
+
"version": "2.6.7-develop-pedago.20260930173910",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
"swiper": "10.1.0",
|
|
141
141
|
"ua-parser-js": "1.0.36",
|
|
142
142
|
"zustand": "4.5.7",
|
|
143
|
-
"@edifice.io/bootstrap": "2.6.7-develop-
|
|
144
|
-
"@edifice.io/tiptap-extensions": "2.6.7-develop-
|
|
145
|
-
"@edifice.io/utilities": "2.6.7-develop-
|
|
143
|
+
"@edifice.io/bootstrap": "2.6.7-develop-pedago.20260930173910",
|
|
144
|
+
"@edifice.io/tiptap-extensions": "2.6.7-develop-pedago.20260930173910",
|
|
145
|
+
"@edifice.io/utilities": "2.6.7-develop-pedago.20260930173910"
|
|
146
146
|
},
|
|
147
147
|
"devDependencies": {
|
|
148
148
|
"@babel/plugin-transform-react-pure-annotations": "7.27.1",
|
|
@@ -173,8 +173,8 @@
|
|
|
173
173
|
"vite": "5.4.14",
|
|
174
174
|
"vite-plugin-dts": "4.5.4",
|
|
175
175
|
"vite-tsconfig-paths": "5.1.4",
|
|
176
|
-
"@edifice.io/client": "2.6.7-develop-
|
|
177
|
-
"@edifice.io/config": "2.6.7-develop-
|
|
176
|
+
"@edifice.io/client": "2.6.7-develop-pedago.20260930173910",
|
|
177
|
+
"@edifice.io/config": "2.6.7-develop-pedago.20260930173910"
|
|
178
178
|
},
|
|
179
179
|
"peerDependencies": {
|
|
180
180
|
"@react-spring/web": "9.7.5",
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
export type LinkPillIllustrationType = 'icon' | 'img';
|
|
3
|
-
export type LinkPillIllustrationPosition = 'left' | 'right';
|
|
4
|
-
export interface LinkPillProps extends ComponentPropsWithoutRef<'a'> {
|
|
5
|
-
/**
|
|
6
|
-
* URL opened in a new tab when the pill is clicked.
|
|
7
|
-
*/
|
|
8
|
-
href: string;
|
|
9
|
-
/**
|
|
10
|
-
* Text displayed inside the pill (single line, ellipsis on overflow).
|
|
11
|
-
*/
|
|
12
|
-
label: string;
|
|
13
|
-
/**
|
|
14
|
-
* Optional second line displayed below the label (single line, ellipsis
|
|
15
|
-
* on overflow). Does not affect the label's font size.
|
|
16
|
-
*/
|
|
17
|
-
subtitle?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Illustration node. Defaults to `<IconLink />` for the `icon` type.
|
|
20
|
-
* For the `img` type, the caller must provide an `<img>` element.
|
|
21
|
-
*/
|
|
22
|
-
illustration?: ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
* `icon` (default): illustration wrapped in a small rounded box.
|
|
25
|
-
* `img`: illustration rendered as a 36x36 rounded square (e.g. a favicon).
|
|
26
|
-
*/
|
|
27
|
-
illustrationType?: LinkPillIllustrationType;
|
|
28
|
-
/**
|
|
29
|
-
* Side the illustration is displayed on.
|
|
30
|
-
*/
|
|
31
|
-
illustrationPosition?: LinkPillIllustrationPosition;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* LinkPill – design system component used to display a link to an
|
|
35
|
-
* external resource as a small rounded pill.
|
|
36
|
-
*/
|
|
37
|
-
declare const LinkPill: {
|
|
38
|
-
({ href, label, subtitle, illustration, illustrationType, illustrationPosition, className, ...restProps }: LinkPillProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
-
displayName: string;
|
|
40
|
-
};
|
|
41
|
-
export default LinkPill;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import SvgIconLink from "../../modules/icons/components/IconLink.js";
|
|
4
|
-
const LinkPill = ({
|
|
5
|
-
href,
|
|
6
|
-
label,
|
|
7
|
-
subtitle,
|
|
8
|
-
illustration,
|
|
9
|
-
illustrationType = "icon",
|
|
10
|
-
illustrationPosition = "left",
|
|
11
|
-
className,
|
|
12
|
-
...restProps
|
|
13
|
-
}) => {
|
|
14
|
-
const illustrationNode = illustrationType === "icon" ? /* @__PURE__ */ jsx("span", { className: "link-pill-icon", children: illustration ?? /* @__PURE__ */ jsx(SvgIconLink, {}) }) : /* @__PURE__ */ jsx("span", { className: "link-pill-image", children: illustration }), contentNode = /* @__PURE__ */ jsxs("span", { className: "link-pill-content", children: [
|
|
15
|
-
/* @__PURE__ */ jsx("span", { className: "link-pill-label", title: label, children: label }),
|
|
16
|
-
subtitle && /* @__PURE__ */ jsx("span", { className: "link-pill-subtitle", title: subtitle, children: subtitle })
|
|
17
|
-
] });
|
|
18
|
-
return /* @__PURE__ */ jsx("a", { href, target: "_blank", rel: "noopener noreferrer", "data-testid": "link-pill", className: clsx("link-pill", `link-pill--illustration-${illustrationPosition}`, className), ...restProps, children: illustrationPosition === "left" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
|
-
illustrationNode,
|
|
20
|
-
contentNode
|
|
21
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
|
-
contentNode,
|
|
23
|
-
illustrationNode
|
|
24
|
-
] }) });
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
LinkPill as default
|
|
28
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export type ModalBetaElement = HTMLDivElement;
|
|
2
|
-
export type ModalBetaSize = 's' | 'm' | 'l' | 'xl';
|
|
3
|
-
export interface ModalBetaProps {
|
|
4
|
-
/**
|
|
5
|
-
* Modal id (useful when multiple modal on the same page)
|
|
6
|
-
*/
|
|
7
|
-
id: string;
|
|
8
|
-
/**
|
|
9
|
-
* Modal testid
|
|
10
|
-
*/
|
|
11
|
-
['data-testid']?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Is Modal Open
|
|
14
|
-
*/
|
|
15
|
-
isOpen: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Function to call when closing modal
|
|
18
|
-
*/
|
|
19
|
-
onModalClose: () => void;
|
|
20
|
-
/**
|
|
21
|
-
* Size of the modal (width, padding and corner radius)
|
|
22
|
-
*/
|
|
23
|
-
size?: ModalBetaSize;
|
|
24
|
-
/**
|
|
25
|
-
* ID of the HTML element to receive focus when modal is active.
|
|
26
|
-
*/
|
|
27
|
-
focusId?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Children
|
|
30
|
-
*/
|
|
31
|
-
children: React.ReactNode;
|
|
32
|
-
}
|
|
33
|
-
declare const ModalBeta: import('react').ForwardRefExoticComponent<ModalBetaProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
34
|
-
Header: {
|
|
35
|
-
({ onModalClose, children, subtitle, }: import('./ModalBetaHeader').ModalBetaHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
-
displayName: string;
|
|
37
|
-
};
|
|
38
|
-
Body: {
|
|
39
|
-
({ children, className }: import('./ModalBetaBody').ModalBetaBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
displayName: string;
|
|
41
|
-
};
|
|
42
|
-
Footer: {
|
|
43
|
-
({ children }: import('./ModalBetaFooter').ModalBetaFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
displayName: string;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
export default ModalBeta;
|