@edifice.io/react 2.6.2-develop-integration-crna.20260823185851 → 2.6.2-develop-integration.20260824122250
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/DatePicker/DatePicker.d.ts +0 -5
- package/dist/components/DatePicker/DatePicker.js +0 -2
- package/dist/components/Layout/Layout.js +3 -5
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useNextcloudSearch/index.d.ts +1 -0
- package/dist/hooks/useNextcloudSearch/useNextcloudSearch.d.ts +12 -0
- package/dist/hooks/useNextcloudSearch/useNextcloudSearch.js +56 -0
- package/dist/icons.js +338 -340
- package/dist/index.js +152 -146
- package/dist/modules/homepage/components/Favorites/Favorites.js +4 -7
- package/dist/modules/homepage/components/HomeCard/HomeCard.d.ts +1 -5
- package/dist/modules/homepage/components/HomeCard/HomeCard.js +2 -10
- package/dist/modules/homepage/components/LastInfos/LastInfosList.js +2 -2
- package/dist/modules/homepage/components/Notifications/NotificationItem.js +4 -5
- package/dist/modules/homepage/components/Notifications/NotificationList.d.ts +1 -7
- package/dist/modules/homepage/components/Notifications/NotificationList.js +3 -10
- package/dist/modules/homepage/components/Notifications/NotificationListContainer.js +1 -4
- package/dist/modules/homepage/components/Notifications/components/CommonNotificationItem.d.ts +1 -2
- package/dist/modules/homepage/components/Notifications/components/CommonNotificationItem.js +10 -14
- package/dist/modules/homepage/components/Notifications/components/NotificationItemResource.d.ts +1 -2
- package/dist/modules/homepage/components/Notifications/components/NotificationItemResource.js +2 -3
- package/dist/modules/homepage/components/Notifications/components/SystemNotificationItem.d.ts +1 -3
- package/dist/modules/homepage/components/Notifications/components/SystemNotificationItem.js +2 -3
- package/dist/modules/homepage/components/Notifications/components/UserNotificationItem.d.ts +1 -3
- package/dist/modules/homepage/components/Notifications/components/UserNotificationItem.js +2 -3
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.d.ts +7 -22
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +13 -27
- package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.d.ts +1 -5
- package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.js +2 -22
- package/dist/modules/homepage/components/Notifications/services/api/index.d.ts +0 -2
- package/dist/modules/homepage/components/Notifications/services/api/notificationService.d.ts +0 -8
- package/dist/modules/homepage/components/Notifications/services/api/notificationService.js +0 -12
- package/dist/modules/homepage/components/Notifications/services/queries/notification.d.ts +1 -13
- package/dist/modules/homepage/components/Notifications/services/queries/notification.js +4 -41
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpace.js +11 -20
- package/dist/modules/homepage/components/UserSpace/UserSpace.js +2 -5
- package/dist/modules/icons/components/index.d.ts +0 -1
- package/dist/modules/multimedia/FileCard/NextcloudFileCard.d.ts +25 -0
- package/dist/modules/multimedia/FileCard/NextcloudFileCard.js +105 -0
- package/dist/modules/multimedia/FileCard/index.d.ts +2 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +2 -2
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +20 -7
- package/dist/modules/multimedia/MediaLibrary/innertabs/Nextcloud.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Nextcloud.js +35 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +2 -0
- package/dist/modules/multimedia/Nextcloud/Nextcloud.d.ts +24 -0
- package/dist/modules/multimedia/Nextcloud/Nextcloud.js +109 -0
- package/dist/modules/multimedia/Nextcloud/index.d.ts +2 -0
- package/dist/modules/multimedia/index.d.ts +1 -0
- package/dist/multimedia.js +16 -12
- package/package.json +6 -6
- package/dist/modules/homepage/components/Communities/Communities.d.ts +0 -10
- package/dist/modules/homepage/components/Communities/CommunitiesContainer.d.ts +0 -9
- package/dist/modules/homepage/components/Communities/CommunitiesSkeleton.d.ts +0 -5
- package/dist/modules/homepage/components/Communities/CommunityItem.d.ts +0 -11
- package/dist/modules/homepage/components/Communities/index.d.ts +0 -8
- package/dist/modules/homepage/components/Communities/useCommunities.d.ts +0 -13
- package/dist/modules/homepage/components/Notifications/components/NotificationFilterMenu.d.ts +0 -16
- package/dist/modules/homepage/components/Notifications/components/NotificationFilterMenu.js +0 -29
- package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.d.ts +0 -18
- package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.js +0 -67
- package/dist/modules/homepage/components/Notifications/components/NotificationOptionsMenu.d.ts +0 -12
- package/dist/modules/homepage/components/Notifications/components/NotificationOptionsMenu.js +0 -42
- package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.d.ts +0 -13
- package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js +0 -31
- package/dist/modules/homepage/components/UserSpace/hooks/useChildren.d.ts +0 -14
- package/dist/modules/homepage/components/UserSpace/hooks/useChildren.js +0 -23
- package/dist/modules/homepage/components/UserSpace/hooks/useProfileLinks.d.ts +0 -8
- package/dist/modules/homepage/components/UserSpace/hooks/useProfileLinks.js +0 -65
- package/dist/modules/icons/components/IconClass.d.ts +0 -7
- package/dist/modules/icons/components/IconClass.js +0 -13
package/dist/modules/homepage/components/Notifications/components/NotificationOptionsMenu.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import SvgIconAlertTriangle from "../../../../icons/components/IconAlertTriangle.js";
|
|
5
|
-
import SvgIconDelete from "../../../../icons/components/IconDelete.js";
|
|
6
|
-
import SvgIconOptions from "../../../../icons/components/IconOptions.js";
|
|
7
|
-
import { useReportNotification, useDeleteNotification } from "../services/queries/notification.js";
|
|
8
|
-
import ReportNotificationModal from "./ReportNotificationModal.js";
|
|
9
|
-
import Dropdown from "../../../../../components/Dropdown/Dropdown.js";
|
|
10
|
-
import IconButton from "../../../../../components/Button/IconButton.js";
|
|
11
|
-
const NotificationOptionsMenu = ({
|
|
12
|
-
notificationId
|
|
13
|
-
}) => {
|
|
14
|
-
const {
|
|
15
|
-
t
|
|
16
|
-
} = useTranslation(), {
|
|
17
|
-
mutate: reportNotification
|
|
18
|
-
} = useReportNotification(), {
|
|
19
|
-
mutate: deleteNotification
|
|
20
|
-
} = useDeleteNotification(), [isReportModalOpen, setIsReportModalOpen] = useState(!1);
|
|
21
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
|
-
/* @__PURE__ */ jsx(Dropdown, { overflow: !1, children: (triggerProps) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
|
-
/* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", "aria-label": t("homepage.notifications.options.label", {
|
|
24
|
-
defaultValue: "Options de la notification"
|
|
25
|
-
}), color: "tertiary", variant: "ghost", icon: /* @__PURE__ */ jsx(SvgIconOptions, {}), "data-testid": "notification-item-options-button" }),
|
|
26
|
-
/* @__PURE__ */ jsxs(Dropdown.Menu, { children: [
|
|
27
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconAlertTriangle, {}), onClick: () => setIsReportModalOpen(!0), children: t("homepage.notifications.options.report", {
|
|
28
|
-
defaultValue: "Signaler"
|
|
29
|
-
}) }),
|
|
30
|
-
/* @__PURE__ */ jsx(Dropdown.Item, { icon: /* @__PURE__ */ jsx(SvgIconDelete, {}), onClick: () => deleteNotification(notificationId), children: t("homepage.notifications.options.delete", {
|
|
31
|
-
defaultValue: "Supprimer"
|
|
32
|
-
}) })
|
|
33
|
-
] })
|
|
34
|
-
] }) }),
|
|
35
|
-
isReportModalOpen && /* @__PURE__ */ jsx(ReportNotificationModal, { isOpen: isReportModalOpen, onCancel: () => setIsReportModalOpen(!1), onConfirm: () => {
|
|
36
|
-
reportNotification(notificationId), setIsReportModalOpen(!1);
|
|
37
|
-
} })
|
|
38
|
-
] });
|
|
39
|
-
};
|
|
40
|
-
export {
|
|
41
|
-
NotificationOptionsMenu as default
|
|
42
|
-
};
|
package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type ReportNotificationModalProps = {
|
|
2
|
-
isOpen: boolean;
|
|
3
|
-
onCancel: () => void;
|
|
4
|
-
onConfirm: () => void;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Confirmation modal shown before reporting a notification as inappropriate.
|
|
8
|
-
*/
|
|
9
|
-
declare const ReportNotificationModal: {
|
|
10
|
-
({ isOpen, onCancel, onConfirm, }: ReportNotificationModalProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
13
|
-
export default ReportNotificationModal;
|
package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation } from "react-i18next";
|
|
3
|
-
import SvgIconAlertTriangle from "../../../../icons/components/IconAlertTriangle.js";
|
|
4
|
-
import Modal from "../../../../../components/Modal/Modal.js";
|
|
5
|
-
import ButtonBeta from "../../../../../components/ButtonBeta/ButtonBeta.js";
|
|
6
|
-
const ReportNotificationModal = ({
|
|
7
|
-
isOpen,
|
|
8
|
-
onCancel,
|
|
9
|
-
onConfirm
|
|
10
|
-
}) => {
|
|
11
|
-
const {
|
|
12
|
-
t
|
|
13
|
-
} = useTranslation();
|
|
14
|
-
return /* @__PURE__ */ jsxs(Modal, { id: "report-notification-modal", size: "lg", isOpen, onModalClose: onCancel, children: [
|
|
15
|
-
/* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: t("homepage.notifications.report-modal.title", {
|
|
16
|
-
defaultValue: "Signaler une notification"
|
|
17
|
-
}) }),
|
|
18
|
-
/* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx("p", { children: t("homepage.notifications.report-modal.body", {
|
|
19
|
-
defaultValue: "Attention ! Vous souhaitez signaler une notification inappropriée ou qui ne respecte pas les conditions d'utilisation de ONE. L'heure et l'origine de ce signalement seront enregistrées et transmises à un administrateur pour traitement."
|
|
20
|
-
}) }) }),
|
|
21
|
-
/* @__PURE__ */ jsxs(Modal.Footer, { children: [
|
|
22
|
-
/* @__PURE__ */ jsx(ButtonBeta, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: t("cancel") }),
|
|
23
|
-
/* @__PURE__ */ jsx(ButtonBeta, { color: "default", onClick: onConfirm, type: "button", variant: "filled", leftIcon: /* @__PURE__ */ jsx(SvgIconAlertTriangle, {}), children: t("homepage.notifications.report-modal.confirm", {
|
|
24
|
-
defaultValue: "Signaler la notification"
|
|
25
|
-
}) })
|
|
26
|
-
] })
|
|
27
|
-
] });
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
ReportNotificationModal as default
|
|
31
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Child, StructureChildren } from '@edifice.io/client';
|
|
2
|
-
export declare const childrenQueryKeys: {
|
|
3
|
-
all: (userId: string) => readonly ["children", string];
|
|
4
|
-
};
|
|
5
|
-
export declare const childrenQueryOptions: (userId: string | undefined, enabled: boolean) => import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<StructureChildren[], Error, Child[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
|
|
6
|
-
queryFn?: import('@tanstack/react-query').QueryFunction<StructureChildren[], import('@tanstack/react-query').QueryKey, never> | undefined;
|
|
7
|
-
} & {
|
|
8
|
-
queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, StructureChildren[]>;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Fetches the children of a "Relative" user across all their structures,
|
|
12
|
-
* merged into a single list.
|
|
13
|
-
*/
|
|
14
|
-
export declare function useChildren(userId: string | undefined, enabled: boolean): import('@tanstack/react-query').UseQueryResult<Child[], Error>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { odeServices } from "@edifice.io/client";
|
|
2
|
-
import { useQuery, queryOptions } from "@tanstack/react-query";
|
|
3
|
-
const childrenQueryKeys = {
|
|
4
|
-
all: (userId) => ["children", userId]
|
|
5
|
-
};
|
|
6
|
-
function flattenChildrenByStructure(structures) {
|
|
7
|
-
const seenIds = /* @__PURE__ */ new Set();
|
|
8
|
-
return structures.flatMap((structure) => structure.children).filter((child) => seenIds.has(child.id) ? !1 : (seenIds.add(child.id), !0));
|
|
9
|
-
}
|
|
10
|
-
const childrenQueryOptions = (userId, enabled) => queryOptions({
|
|
11
|
-
queryKey: childrenQueryKeys.all(userId ?? ""),
|
|
12
|
-
queryFn: () => odeServices.directory().getChildren(userId),
|
|
13
|
-
enabled: enabled && !!userId,
|
|
14
|
-
select: flattenChildrenByStructure
|
|
15
|
-
});
|
|
16
|
-
function useChildren(userId, enabled) {
|
|
17
|
-
return useQuery(childrenQueryOptions(userId, enabled));
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
childrenQueryKeys,
|
|
21
|
-
childrenQueryOptions,
|
|
22
|
-
useChildren
|
|
23
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { UserProfile } from '@edifice.io/client';
|
|
2
|
-
type ProfileLink = {
|
|
3
|
-
url: string;
|
|
4
|
-
text: string;
|
|
5
|
-
};
|
|
6
|
-
/** Generates user's links to show in the UserSpace home component. */
|
|
7
|
-
export declare function useProfileLinks(profile: UserProfile[number]): Array<ProfileLink> | undefined;
|
|
8
|
-
export {};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { useTranslation } from "react-i18next";
|
|
2
|
-
import { useEdificeClient } from "../../../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
3
|
-
import { useChildren } from "./useChildren.js";
|
|
4
|
-
function useProfileLinks(profile) {
|
|
5
|
-
var _a;
|
|
6
|
-
const {
|
|
7
|
-
user
|
|
8
|
-
} = useEdificeClient(), {
|
|
9
|
-
t
|
|
10
|
-
} = useTranslation(), isRelative = profile === "Relative", {
|
|
11
|
-
data: children
|
|
12
|
-
} = useChildren(user == null ? void 0 : user.userId, isRelative), structureId = (_a = user == null ? void 0 : user.structures) == null ? void 0 : _a[0];
|
|
13
|
-
if (structureId && profile) {
|
|
14
|
-
const baseUrl = "/userbook/annuaire#/search", buildStructureGroupsUrl = () => {
|
|
15
|
-
const params = new URLSearchParams({
|
|
16
|
-
filters: "groups",
|
|
17
|
-
structure: structureId
|
|
18
|
-
});
|
|
19
|
-
return `${baseUrl}?${params.toString()}`;
|
|
20
|
-
}, buildClassesUrl = (classIds = []) => {
|
|
21
|
-
const params = new URLSearchParams({
|
|
22
|
-
filters: "groups",
|
|
23
|
-
structure: structureId
|
|
24
|
-
});
|
|
25
|
-
return classIds.forEach((c) => params.append("class", String(c))), `${baseUrl}?${params.toString()}`;
|
|
26
|
-
};
|
|
27
|
-
switch (profile) {
|
|
28
|
-
case "Teacher":
|
|
29
|
-
return [{
|
|
30
|
-
text: t("homepage.userspace.teacher.link.classes"),
|
|
31
|
-
url: buildClassesUrl(user.classes)
|
|
32
|
-
}];
|
|
33
|
-
case "Student":
|
|
34
|
-
return [{
|
|
35
|
-
text: t("homepage.userspace.student.link.teachers"),
|
|
36
|
-
url: "/userbook/annuaire#/search?filters=groups&profile=Teacher"
|
|
37
|
-
}, {
|
|
38
|
-
text: t("homepage.userspace.student.link.classes"),
|
|
39
|
-
url: buildClassesUrl(user.classes)
|
|
40
|
-
}];
|
|
41
|
-
case "Relative":
|
|
42
|
-
return children != null && children.length ? children.map((child) => {
|
|
43
|
-
var _a2;
|
|
44
|
-
return {
|
|
45
|
-
text: t("homepage.userspace.relative.link.classes", {
|
|
46
|
-
childName: child.firstName
|
|
47
|
-
}),
|
|
48
|
-
url: buildClassesUrl((_a2 = child.classes) == null ? void 0 : _a2.map(({
|
|
49
|
-
id
|
|
50
|
-
}) => id))
|
|
51
|
-
};
|
|
52
|
-
}) : void 0;
|
|
53
|
-
case "Personnel":
|
|
54
|
-
return [{
|
|
55
|
-
text: t("homepage.userspace.personnel.link.classesAndGroups"),
|
|
56
|
-
url: buildStructureGroupsUrl()
|
|
57
|
-
}];
|
|
58
|
-
case "Guest":
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
export {
|
|
64
|
-
useProfileLinks
|
|
65
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SVGProps } from 'react';
|
|
2
|
-
interface SVGRProps {
|
|
3
|
-
title?: string;
|
|
4
|
-
titleId?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const SvgIconClass: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default SvgIconClass;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
const SvgIconClass = ({
|
|
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 24 24", "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: "M2.074 17.258c.707-.837 1.705-1.349 2.79-1.349h5.727c1.085 0 2.083.512 2.79 1.35.701.831 1.073 1.928 1.073 3.044V22a1 1 0 1 1-2 0v-1.697c0-.684-.23-1.314-.603-1.755-.367-.436-.826-.639-1.26-.639H4.864c-.434 0-.893.203-1.261.64-.372.44-.603 1.07-.603 1.754V22a1 1 0 1 1-2 0v-1.697c0-1.116.372-2.213 1.074-3.045M7.728 8.5a2.182 2.182 0 1 0 0 4.364 2.182 2.182 0 0 0 0-4.364m-4.182 2.182a4.182 4.182 0 1 1 8.364 0 4.182 4.182 0 0 1-8.364 0", clipRule: "evenodd" }),
|
|
9
|
-
/* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M0 5a3 3 0 0 1 3-3h18a3 3 0 0 1 3 3v11a3 3 0 0 1-3 3h-5a1 1 0 1 1 0-2h5a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v10a1 1 0 1 1-2 0z", clipRule: "evenodd" })
|
|
10
|
-
] });
|
|
11
|
-
export {
|
|
12
|
-
SvgIconClass as default
|
|
13
|
-
};
|