@edifice.io/react 2.6.2-develop-pedago.20260810101026 → 2.6.2-develop-b2school.20260814142937
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 +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -6
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +5 -0
- package/dist/components/DatePicker/DatePicker.js +2 -0
- package/dist/components/Layout/components/Header.js +6 -0
- package/dist/components/Layout/hooks/useHeader.js +3 -2
- package/dist/icons.js +340 -338
- package/dist/modules/homepage/components/Communities/Communities.d.ts +10 -0
- package/dist/modules/homepage/components/Communities/CommunitiesContainer.d.ts +9 -0
- package/dist/modules/homepage/components/Communities/CommunitiesSkeleton.d.ts +5 -0
- package/dist/modules/homepage/components/Communities/CommunityItem.d.ts +11 -0
- package/dist/modules/homepage/components/Communities/index.d.ts +8 -0
- package/dist/modules/homepage/components/Communities/useCommunities.d.ts +13 -0
- package/dist/modules/homepage/components/HomeCard/HomeCard.d.ts +5 -1
- package/dist/modules/homepage/components/HomeCard/HomeCard.js +10 -2
- package/dist/modules/homepage/components/LastInfos/LastInfosList.js +2 -2
- package/dist/modules/homepage/components/Notifications/NotificationList.js +2 -2
- package/dist/modules/homepage/components/Notifications/components/NotificationItemResource.d.ts +2 -1
- package/dist/modules/homepage/components/Notifications/components/NotificationItemResource.js +3 -2
- package/dist/modules/homepage/components/Notifications/components/UserNotificationItem.js +1 -1
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.d.ts +21 -7
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +26 -13
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpace.js +20 -11
- package/dist/modules/homepage/components/UserSpace/UserSpace.js +5 -2
- package/dist/modules/homepage/components/UserSpace/hooks/useChildren.d.ts +14 -0
- package/dist/modules/homepage/components/UserSpace/hooks/useChildren.js +23 -0
- package/dist/modules/homepage/components/UserSpace/hooks/useProfileLinks.d.ts +8 -0
- package/dist/modules/homepage/components/UserSpace/hooks/useProfileLinks.js +65 -0
- package/dist/modules/icons/components/IconClass.d.ts +7 -0
- package/dist/modules/icons/components/IconClass.js +13 -0
- package/dist/modules/icons/components/index.d.ts +1 -0
- package/package.json +6 -6
|
@@ -64,7 +64,7 @@ const Alert = /* @__PURE__ */ forwardRef(({
|
|
|
64
64
|
}, divContainerClasses = clsx("alert gap-12", mapping[type].classModifier, toastClasses, confirmClasses, position, className);
|
|
65
65
|
return /* @__PURE__ */ jsx(Fragment, { children: isVisible ? /* @__PURE__ */ jsxs("div", { ref: refAlert, className: divContainerClasses, role: "alert", children: [
|
|
66
66
|
!isConfirm && mapping[type].icon,
|
|
67
|
-
/* @__PURE__ */ jsx("div", { className: "alert-content small", children }),
|
|
67
|
+
/* @__PURE__ */ jsx("div", { className: "alert-content small flex-grow-1", children }),
|
|
68
68
|
button && /* @__PURE__ */ jsxs("div", { className: "ms-12", children: [
|
|
69
69
|
button,
|
|
70
70
|
" ",
|
|
@@ -6,11 +6,6 @@ export type NotificationBadgeVariant = {
|
|
|
6
6
|
type: 'notification';
|
|
7
7
|
level: 'success' | 'warning' | 'danger' | 'info';
|
|
8
8
|
};
|
|
9
|
-
/** Badge variant : status */
|
|
10
|
-
export type StatusBadgeVariant = {
|
|
11
|
-
type: 'status';
|
|
12
|
-
level: 'validate' | 'success' | 'warning' | 'danger' | 'info';
|
|
13
|
-
};
|
|
14
9
|
/** Badge variant : content */
|
|
15
10
|
export type ContentBadgeVariant = {
|
|
16
11
|
type: 'content';
|
|
@@ -54,7 +49,7 @@ export type AppVersionBadgeVariant = {
|
|
|
54
49
|
color?: string;
|
|
55
50
|
app?: IWebApp;
|
|
56
51
|
};
|
|
57
|
-
export type BadgeVariants = NotificationBadgeVariant |
|
|
52
|
+
export type BadgeVariants = NotificationBadgeVariant | ContentBadgeVariant | ProfileBadgeVariant | ChipBadgeVariant | LinkBadgeVariant | AppVersionBadgeVariant;
|
|
58
53
|
export interface BadgeProps extends React.ComponentPropsWithRef<'span'> {
|
|
59
54
|
/**
|
|
60
55
|
* Badge variant : notification, link or profile (Teacher|Student|Relative|Personnel)
|
|
@@ -21,7 +21,7 @@ const Badge = /* @__PURE__ */ forwardRef(({
|
|
|
21
21
|
const colorAppClassName = getIconClass(variant.app), backgroundLightAppClassName = getBackgroundLightIconClass(variant.app), borderAppClassName = getBorderIconClass(variant.app);
|
|
22
22
|
appVersionBadgeColorClassName = `${colorAppClassName} ${backgroundLightAppClassName} ${borderAppClassName}`;
|
|
23
23
|
}
|
|
24
|
-
const classes = clsx("badge rounded-pill", (variant.type === "content" || variant.type === "user") && "background" in variant ? "bg-gray-200" : (variant.type === "content" || variant.type === "user") && !("background" in variant) ? "border border-0" : "", variant.type === "content" && `text-${variant.level}`, variant.type === "notification" && `badge-notification bg-${variant.level} text-light border border-0`, variant.type === "
|
|
24
|
+
const classes = clsx("badge rounded-pill", (variant.type === "content" || variant.type === "user") && "background" in variant ? "bg-gray-200" : (variant.type === "content" || variant.type === "user") && !("background" in variant) ? "border border-0" : "", variant.type === "content" && `text-${variant.level}`, variant.type === "notification" && `badge-notification bg-${variant.level} text-light border border-0`, variant.type === "user" && `badge-profile-${variant.profile.toLowerCase()}`, variant.type === "link" && "badge-link border border-0", variant.type === "chip" && "bg-gray-200", variant.type === "appVersion" && appVersionBadgeColorClassName, className);
|
|
25
25
|
return /* @__PURE__ */ jsxs("span", { ref, className: classes, ...restProps, children: [
|
|
26
26
|
variant.type === "chip" && /* @__PURE__ */ jsx("div", { className: "d-flex fw-800 align-items-center", children }),
|
|
27
27
|
variant.type === "appVersion" && (children ?? "BÊTA"),
|
|
@@ -28,6 +28,11 @@ export interface DatePickerProps extends Omit<React.HTMLAttributes<HTMLElement>,
|
|
|
28
28
|
* Maximum selectable date
|
|
29
29
|
*/
|
|
30
30
|
maxDate?: Date;
|
|
31
|
+
/**
|
|
32
|
+
* Disables the input and prevents the calendar popup from opening.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
disabled?: boolean;
|
|
31
36
|
}
|
|
32
37
|
/**
|
|
33
38
|
* Type for DatePicker ref
|
|
@@ -17,6 +17,7 @@ const DatePicker = /* @__PURE__ */ forwardRef(({
|
|
|
17
17
|
dateFormat = "DD / MM / YYYY",
|
|
18
18
|
minDate,
|
|
19
19
|
maxDate,
|
|
20
|
+
disabled,
|
|
20
21
|
...htmlProps
|
|
21
22
|
}, ref) => {
|
|
22
23
|
const handleChange = (date) => {
|
|
@@ -27,6 +28,7 @@ const DatePicker = /* @__PURE__ */ forwardRef(({
|
|
|
27
28
|
format: dateFormat,
|
|
28
29
|
minDate: minDate ? dayjs(minDate) : void 0,
|
|
29
30
|
maxDate: maxDate ? dayjs(maxDate) : void 0,
|
|
31
|
+
disabled,
|
|
30
32
|
ref,
|
|
31
33
|
// Cast necessary because AntDatePicker expects a specific type, but our API exposes only HTMLElement to avoid dependency on Ant Design-specific features.
|
|
32
34
|
...htmlProps
|
|
@@ -5,6 +5,7 @@ import { useEdificeClient } from "../../../providers/EdificeClientProvider/Edifi
|
|
|
5
5
|
import { useEdificeTheme } from "../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
|
|
6
6
|
import SvgIconRafterDown from "../../../modules/icons/components/IconRafterDown.js";
|
|
7
7
|
import SvgIconCommunities from "../../../modules/icons/components/nav/IconCommunities.js";
|
|
8
|
+
import SvgIconCommunity from "../../../modules/icons/components/nav/IconCommunity.js";
|
|
8
9
|
import SvgIconDisconnect from "../../../modules/icons/components/nav/IconDisconnect.js";
|
|
9
10
|
import SvgIconHome from "../../../modules/icons/components/nav/IconHome.js";
|
|
10
11
|
import SvgIconMyApps from "../../../modules/icons/components/nav/IconMyApps.js";
|
|
@@ -66,6 +67,7 @@ const Header = ({
|
|
|
66
67
|
userAvatar,
|
|
67
68
|
userName,
|
|
68
69
|
welcomeUser,
|
|
70
|
+
communityWorkflow,
|
|
69
71
|
communitiesWorkflow,
|
|
70
72
|
conversationWorflow,
|
|
71
73
|
searchWorkflow,
|
|
@@ -174,6 +176,10 @@ const Header = ({
|
|
|
174
176
|
/* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("div", { className: "dropdown", children: [
|
|
175
177
|
/* @__PURE__ */ jsx("button", { className: "nav-link btn btn-naked d-md-none", type: "button", "aria-controls": "dropdown-navbar", "aria-expanded": !isCollapsed, "aria-label": t("navbar.open.menu"), onClick: toggleCollapsedNav, children: /* @__PURE__ */ jsx(SvgIconRafterDown, { className: "icon rafter-down", width: "20", height: "20", color: "#fff" }) }),
|
|
176
178
|
/* @__PURE__ */ jsxs("ul", { className: `dropdown-menu dropdown-menu-end ${isCollapsed ? "" : "show"}`, id: "dropdown-navbar", children: [
|
|
179
|
+
communityWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/community", className: "nav-link dropdown-item", children: [
|
|
180
|
+
/* @__PURE__ */ jsx(SvgIconCommunity, { className: "icon community" }),
|
|
181
|
+
/* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.community") })
|
|
182
|
+
] }) }),
|
|
177
183
|
communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/communities", className: "nav-link dropdown-item", children: [
|
|
178
184
|
/* @__PURE__ */ jsx(SvgIconCommunities, { className: "icon communities" }),
|
|
179
185
|
/* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.community") })
|
|
@@ -14,7 +14,7 @@ function useHeader({
|
|
|
14
14
|
t
|
|
15
15
|
} = useTranslation(), title = t(appCode), [isCollapsed, setIsCollapsed] = useState(!0), [appsRef, isAppsHovered] = useHover(), popoverAppsId = useId(), popoverSearchId = useId(), userAvatar = avatar, userName = user == null ? void 0 : user.username, welcomeUser = t("welcome", {
|
|
16
16
|
username: user == null ? void 0 : user.firstName
|
|
17
|
-
}), bookmarkedApps = useBookmark(), communitiesWorkflow = useHasWorkflow("community.access"), conversationWorflow = useHasWorkflow("org.entcore.conversation.controllers.ConversationController|view"), searchWorkflow = useHasWorkflow("fr.openent.searchengine.controllers.SearchEngineController|view"), toggleCollapsedNav = useCallback(() => {
|
|
17
|
+
}), bookmarkedApps = useBookmark(), communityWorkflow = useHasWorkflow("net.atos.entng.community.controllers.CommunityController|view"), communitiesWorkflow = useHasWorkflow("community.access"), conversationWorflow = useHasWorkflow("org.entcore.conversation.controllers.ConversationController|view"), searchWorkflow = useHasWorkflow("fr.openent.searchengine.controllers.SearchEngineController|view"), toggleCollapsedNav = useCallback(() => {
|
|
18
18
|
setIsCollapsed(!isCollapsed);
|
|
19
19
|
}, [isCollapsed]);
|
|
20
20
|
return useMemo(() => ({
|
|
@@ -27,12 +27,13 @@ function useHeader({
|
|
|
27
27
|
userAvatar,
|
|
28
28
|
userName,
|
|
29
29
|
welcomeUser,
|
|
30
|
+
communityWorkflow,
|
|
30
31
|
communitiesWorkflow,
|
|
31
32
|
conversationWorflow,
|
|
32
33
|
searchWorkflow,
|
|
33
34
|
isCollapsed,
|
|
34
35
|
toggleCollapsedNav
|
|
35
|
-
}), [appsRef, bookmarkedApps, communitiesWorkflow, conversationWorflow, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
|
|
36
|
+
}), [appsRef, bookmarkedApps, communitiesWorkflow, communityWorkflow, conversationWorflow, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
|
|
36
37
|
}
|
|
37
38
|
export {
|
|
38
39
|
useHeader as default
|