@edifice.io/react 2.6.12-develop-b2school.20261102112143 → 2.6.12-develop-integration.20261103121816
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 +1 -17
- package/dist/components/Layout/Layout.js +4 -12
- package/dist/components/SearchBar/SearchBar.js +26 -17
- package/dist/components/Tree/components/Tree.d.ts +5 -2
- package/dist/components/Tree/components/Tree.js +7 -10
- package/dist/components/Tree/hooks/useTree.d.ts +0 -1
- package/dist/components/Tree/hooks/useTree.js +2 -6
- package/dist/components/Tree/types/index.d.ts +0 -7
- package/dist/components/index.d.ts +0 -1
- package/dist/homepage.js +28 -87
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useDropdown/useDropdown.js +2 -2
- package/dist/hooks/useGoogleDriveSearch/index.d.ts +1 -0
- package/dist/hooks/useGoogleDriveSearch/useGoogleDriveSearch.d.ts +19 -0
- package/dist/hooks/useGoogleDriveSearch/useGoogleDriveSearch.js +60 -0
- package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +6 -2
- package/dist/hooks/useZendeskGuide/useZendeskGuide.js +8 -11
- package/dist/icons-apps.js +184 -182
- package/dist/icons.js +404 -406
- package/dist/index.js +198 -194
- package/dist/modules/HelpZone/HelpZone.js +8 -6
- package/dist/modules/HelpZone/HelpZoneContainer.js +5 -2
- package/dist/modules/editor/components/Editor/Editor.d.ts +7 -5
- package/dist/modules/editor/components/Editor/Editor.js +3 -5
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +3 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +14 -8
- package/dist/modules/editor/components/NodeView/ImageNodeView.d.ts +1 -1
- package/dist/modules/editor/components/NodeView/ImageNodeView.js +14 -7
- 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 +2 -1
- package/dist/modules/editor/hooks/useTipTapEditor.js +2 -2
- package/dist/modules/homepage/components/AlloLycee/AlloLycee.d.ts +11 -0
- package/dist/modules/homepage/components/AlloLycee/AlloLycee.js +32 -0
- package/dist/modules/homepage/components/AlloLycee/AlloLyceeContainer.d.ts +4 -0
- package/dist/modules/homepage/components/AlloLycee/AlloLyceeContainer.js +10 -0
- package/dist/modules/homepage/components/AlloLycee/index.d.ts +3 -0
- package/dist/modules/homepage/components/Header/Header.js +21 -9
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +1 -5
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +1 -1
- package/dist/modules/homepage/components/Notifications/NotificationList.js +8 -7
- package/dist/modules/homepage/components/Notifications/NotificationListSkeleton.js +12 -7
- package/dist/modules/homepage/components/Notifications/NotificationSkeleton.js +4 -7
- package/dist/modules/homepage/components/Notifications/components/CommonNotificationItem.js +9 -9
- package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.js +13 -11
- package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js +12 -6
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.d.ts +2 -1
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +12 -14
- package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.js +10 -9
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.js +1 -1
- package/dist/modules/homepage/{hooks → components/SchoolSpace}/useUserSchools.d.ts +2 -2
- package/dist/modules/homepage/{hooks → components/SchoolSpace}/useUserSchools.js +4 -4
- 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 +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/index.d.ts +2 -11
- package/dist/modules/icons/components/apps/IconElea.d.ts +7 -0
- package/dist/modules/icons/components/apps/IconElea.js +23 -0
- package/dist/modules/icons/components/apps/index.d.ts +1 -0
- package/dist/modules/icons/components/index.d.ts +0 -1
- package/dist/modules/icons/components/nav/IconCommunitiesBeta.js +7 -5
- package/dist/modules/icons/components/nav/IconHomeBeta.js +3 -6
- package/dist/modules/icons/components/nav/IconMessagesBeta.js +7 -7
- package/dist/modules/icons/components/nav/IconMyAppsBeta.js +3 -2
- package/dist/modules/icons/components/nav/IconNotificationBeta.js +4 -2
- package/dist/modules/multimedia/FileCard/GoogleDriveFileCard.d.ts +25 -0
- package/dist/modules/multimedia/FileCard/GoogleDriveFileCard.js +102 -0
- package/dist/modules/multimedia/FileCard/index.d.ts +2 -0
- package/dist/modules/multimedia/GoogleDrive/GoogleDrive.d.ts +24 -0
- package/dist/modules/multimedia/GoogleDrive/GoogleDrive.js +103 -0
- package/dist/modules/multimedia/GoogleDrive/index.d.ts +2 -0
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +7 -1
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +2 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +16 -5
- package/dist/modules/multimedia/MediaLibrary/innertabs/GoogleDrive.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/GoogleDrive.js +61 -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/Workspace/Workspace.js +1 -1
- package/dist/modules/multimedia/index.d.ts +1 -0
- package/dist/multimedia.js +26 -22
- package/package.json +6 -6
- package/dist/components/Masonry/Masonry.d.ts +0 -40
- package/dist/components/Masonry/Masonry.js +0 -50
- package/dist/components/Masonry/index.d.ts +0 -2
- package/dist/modules/homepage/components/Agenda/Agenda.d.ts +0 -10
- package/dist/modules/homepage/components/Agenda/Agenda.js +0 -54
- package/dist/modules/homepage/components/Agenda/AgendaContainer.d.ts +0 -1
- package/dist/modules/homepage/components/Agenda/AgendaContainer.js +0 -14
- package/dist/modules/homepage/components/Agenda/AgendaEventCard.d.ts +0 -10
- package/dist/modules/homepage/components/Agenda/AgendaEventCard.js +0 -30
- package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.d.ts +0 -14
- package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.js +0 -27
- package/dist/modules/homepage/components/Agenda/index.d.ts +0 -3
- package/dist/modules/homepage/components/Agenda/services/api/agendaService.d.ts +0 -24
- package/dist/modules/homepage/components/Agenda/services/api/agendaService.js +0 -45
- package/dist/modules/homepage/components/Agenda/services/api/index.d.ts +0 -4
- package/dist/modules/homepage/components/Agenda/services/api/index.js +0 -5
- package/dist/modules/homepage/components/Agenda/services/queries/agenda.d.ts +0 -19
- package/dist/modules/homepage/components/Agenda/services/queries/agenda.js +0 -26
- package/dist/modules/homepage/components/BriefMe/BriefMe.d.ts +0 -9
- package/dist/modules/homepage/components/BriefMe/BriefMe.js +0 -59
- package/dist/modules/homepage/components/BriefMe/BriefMeContainer.d.ts +0 -4
- package/dist/modules/homepage/components/BriefMe/BriefMeContainer.js +0 -17
- package/dist/modules/homepage/components/BriefMe/index.d.ts +0 -4
- package/dist/modules/homepage/components/BriefMe/types.d.ts +0 -17
- package/dist/modules/homepage/components/BriefMe/types.js +0 -8
- package/dist/modules/homepage/components/BriefMe/useBriefMe.d.ts +0 -31
- package/dist/modules/homepage/components/BriefMe/useBriefMe.js +0 -51
- package/dist/modules/homepage/components/Cantine/Cantine.d.ts +0 -7
- package/dist/modules/homepage/components/Cantine/Cantine.js +0 -44
- package/dist/modules/homepage/components/Cantine/CantineContainer.d.ts +0 -4
- package/dist/modules/homepage/components/Cantine/CantineContainer.js +0 -18
- package/dist/modules/homepage/components/Cantine/CantineModal.d.ts +0 -24
- package/dist/modules/homepage/components/Cantine/CantineModal.js +0 -88
- package/dist/modules/homepage/components/Cantine/CantineModalContainer.d.ts +0 -7
- package/dist/modules/homepage/components/Cantine/CantineModalContainer.js +0 -12
- package/dist/modules/homepage/components/Cantine/components/CantineLegend.d.ts +0 -5
- package/dist/modules/homepage/components/Cantine/components/CantineLegend.js +0 -22
- package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.d.ts +0 -6
- package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.js +0 -28
- package/dist/modules/homepage/components/Cantine/components/cantineLabels.d.ts +0 -12
- package/dist/modules/homepage/components/Cantine/components/cantineLabels.js +0 -60
- package/dist/modules/homepage/components/Cantine/hooks/useCantine.d.ts +0 -11
- package/dist/modules/homepage/components/Cantine/hooks/useCantine.js +0 -20
- package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.d.ts +0 -24
- package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.js +0 -65
- package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.d.ts +0 -23
- package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.js +0 -43
- package/dist/modules/homepage/components/Cantine/index.d.ts +0 -7
- package/dist/modules/homepage/components/Cantine/types.d.ts +0 -42
- package/dist/modules/homepage/components/Edumalin/Edumalin.d.ts +0 -9
- package/dist/modules/homepage/components/Edumalin/Edumalin.js +0 -65
- package/dist/modules/homepage/components/Edumalin/EdumalinContainer.d.ts +0 -4
- package/dist/modules/homepage/components/Edumalin/EdumalinContainer.js +0 -21
- package/dist/modules/homepage/components/Edumalin/EdumalinModal.d.ts +0 -8
- package/dist/modules/homepage/components/Edumalin/EdumalinModal.js +0 -62
- package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.d.ts +0 -5
- package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.js +0 -38
- package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.d.ts +0 -5
- package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.js +0 -12
- package/dist/modules/homepage/components/Edumalin/index.d.ts +0 -7
- package/dist/modules/homepage/components/Edumalin/types.d.ts +0 -24
- package/dist/modules/homepage/components/Edumalin/types.js +0 -4
- package/dist/modules/homepage/components/Edumalin/useEdumalin.d.ts +0 -16
- package/dist/modules/homepage/components/Edumalin/useEdumalin.js +0 -35
- package/dist/modules/homepage/components/Edumalin/utils.d.ts +0 -28
- package/dist/modules/homepage/components/Edumalin/utils.js +0 -56
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.d.ts +0 -16
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.js +0 -65
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.d.ts +0 -4
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.js +0 -12
- package/dist/modules/homepage/components/GenerationHdf/formatSolde.d.ts +0 -1
- package/dist/modules/homepage/components/GenerationHdf/formatSolde.js +0 -6
- package/dist/modules/homepage/components/GenerationHdf/index.d.ts +0 -3
- package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.d.ts +0 -10
- package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.js +0 -69
- package/dist/modules/homepage/components/Qwant/Qwant.d.ts +0 -4
- package/dist/modules/homepage/components/Qwant/Qwant.js +0 -41
- package/dist/modules/homepage/components/Qwant/QwantContainer.d.ts +0 -1
- package/dist/modules/homepage/components/Qwant/QwantContainer.js +0 -10
- package/dist/modules/homepage/components/Qwant/index.d.ts +0 -3
- package/dist/modules/homepage/components/Rss/Rss.d.ts +0 -11
- package/dist/modules/homepage/components/Rss/Rss.js +0 -64
- package/dist/modules/homepage/components/Rss/RssContainer.d.ts +0 -1
- package/dist/modules/homepage/components/Rss/RssContainer.js +0 -45
- package/dist/modules/homepage/components/Rss/RssFeedForm.d.ts +0 -13
- package/dist/modules/homepage/components/Rss/RssFeedForm.js +0 -69
- package/dist/modules/homepage/components/Rss/RssFeedsModal.d.ts +0 -11
- package/dist/modules/homepage/components/Rss/RssFeedsModal.js +0 -58
- package/dist/modules/homepage/components/Rss/hooks/useRssContainer.d.ts +0 -25
- package/dist/modules/homepage/components/Rss/hooks/useRssContainer.js +0 -43
- package/dist/modules/homepage/components/Rss/index.d.ts +0 -6
- package/dist/modules/homepage/components/Rss/services/api/index.d.ts +0 -5
- package/dist/modules/homepage/components/Rss/services/api/index.js +0 -5
- package/dist/modules/homepage/components/Rss/services/api/rssService.d.ts +0 -38
- package/dist/modules/homepage/components/Rss/services/api/rssService.js +0 -51
- package/dist/modules/homepage/components/Rss/services/queries/rss.d.ts +0 -28
- package/dist/modules/homepage/components/Rss/services/queries/rss.js +0 -71
- package/dist/modules/homepage/components/Rss/types.d.ts +0 -25
- package/dist/modules/homepage/components/Rss/utils.d.ts +0 -7
- package/dist/modules/homepage/components/Rss/utils.js +0 -19
- package/dist/modules/homepage/components/TabsKids/components/TabsKids.d.ts +0 -43
- package/dist/modules/homepage/components/TabsKids/components/TabsKids.js +0 -23
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.d.ts +0 -34
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.js +0 -26
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.d.ts +0 -14
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.js +0 -64
- package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.d.ts +0 -20
- package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.js +0 -43
- package/dist/modules/homepage/components/TabsKids/index.d.ts +0 -3
- package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.d.ts +0 -15
- package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.js +0 -21
- package/dist/modules/homepage/components/Universalis/Universalis.d.ts +0 -8
- package/dist/modules/homepage/components/Universalis/Universalis.js +0 -62
- package/dist/modules/homepage/components/Universalis/UniversalisContainer.d.ts +0 -1
- package/dist/modules/homepage/components/Universalis/UniversalisContainer.js +0 -16
- package/dist/modules/homepage/components/Universalis/index.d.ts +0 -3
- 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
|
@@ -6,42 +6,40 @@ const resolveNotificationResourceUri = (params, type, appCode, eventType) => {
|
|
|
6
6
|
for (const [key, value] of Object.entries(params))
|
|
7
7
|
if (typeof value == "string" && value.length > 0 && key.endsWith("Uri") && key !== "profilUri" && key !== "resourceFolderUri")
|
|
8
8
|
return value;
|
|
9
|
-
}, parseNotificationMessage = (message) => message.replace(/<\/a>/gi, "</strong>").replace(/<a\b[^>]*>/gi, "<strong>"), getAppCodeAndI18nKey = (appCode) => {
|
|
9
|
+
}, parseNotificationMessage = (message) => message.replace(/<\/a>/gi, "</strong>").replace(/<a\b[^>]*>/gi, "<strong>"), keepsMessageLinks = (params) => !!params.projectId && !params.resourceUri, getAppCodeAndI18nKey = (appCode) => {
|
|
10
10
|
appCode = appCode.toLowerCase();
|
|
11
|
-
|
|
11
|
+
let appI18nKey = appCode;
|
|
12
12
|
switch (appCode) {
|
|
13
|
-
case "collaborativeeditor":
|
|
14
|
-
appCode = "pad";
|
|
15
|
-
break;
|
|
16
13
|
case "collaborativewall":
|
|
17
14
|
appCode = "collaborative-wall";
|
|
18
15
|
break;
|
|
19
16
|
case "formulaire":
|
|
20
|
-
appCode = "forms";
|
|
17
|
+
appI18nKey = "formulaire", appCode = "forms";
|
|
21
18
|
break;
|
|
22
19
|
case "messagerie":
|
|
23
|
-
appCode = "conversation";
|
|
20
|
+
appI18nKey = appCode = "conversation";
|
|
24
21
|
break;
|
|
25
22
|
case "news":
|
|
26
|
-
appCode = "actualites";
|
|
23
|
+
appI18nKey = appCode = "actualites";
|
|
27
24
|
break;
|
|
28
25
|
case "homeworks":
|
|
29
26
|
appCode = "cahier-de-texte";
|
|
30
27
|
break;
|
|
31
28
|
case "userbook_motto":
|
|
29
|
+
appI18nKey = "userbook_motto", appCode = "userbook";
|
|
30
|
+
break;
|
|
32
31
|
case "userbook_mood":
|
|
33
|
-
|
|
34
|
-
appCode = "userbook";
|
|
32
|
+
appI18nKey = "userbook_mood", appCode = "userbook";
|
|
35
33
|
break;
|
|
36
|
-
case "
|
|
37
|
-
appCode = "
|
|
34
|
+
case "userbook_discovervisiblegroups":
|
|
35
|
+
appI18nKey = "userbook_discovervisiblegroups", appCode = "userbook";
|
|
38
36
|
break;
|
|
39
37
|
default:
|
|
40
|
-
appCode = appCode.replace(/_/g, "-");
|
|
38
|
+
appI18nKey = appCode = appCode.replace(/_/g, "-");
|
|
41
39
|
}
|
|
42
40
|
return [appCode, appI18nKey];
|
|
43
41
|
}, notificationAdapter = (notification) => {
|
|
44
|
-
const type = notification.sender ? "user" : "system", [appCode, appI18nKey] = getAppCodeAndI18nKey(notification.type), uri = resolveNotificationResourceUri(notification.params, type, appCode, notification["event-type"] || notification.eventType), date = new Date(notification.date.$date), message = parseNotificationMessage(notification.message), base = {
|
|
42
|
+
const type = notification.sender ? "user" : "system", [appCode, appI18nKey] = getAppCodeAndI18nKey(notification.type), keepLinks = keepsMessageLinks(notification.params), uri = keepLinks ? void 0 : resolveNotificationResourceUri(notification.params, type, appCode, notification["event-type"] || notification.eventType), date = new Date(notification.date.$date), message = keepLinks ? notification.message : parseNotificationMessage(notification.message), base = {
|
|
45
43
|
id: notification._id,
|
|
46
44
|
uri,
|
|
47
45
|
message,
|
|
@@ -14,30 +14,31 @@ const useNotificationListContainer = () => {
|
|
|
14
14
|
mutate: saveTimelinePreference
|
|
15
15
|
} = useSaveTimelinePreference(), [selectedTypes, setSelectedTypesState] = useState();
|
|
16
16
|
useEffect(() => {
|
|
17
|
-
selectedTypes === void 0 && isFetchedTypes && isFetchedPreference
|
|
17
|
+
if (selectedTypes === void 0 && isFetchedTypes && isFetchedPreference) {
|
|
18
|
+
const preferredTypes = preference == null ? void 0 : preference.type;
|
|
19
|
+
setSelectedTypesState(preferredTypes && preferredTypes.length > 0 ? preferredTypes : notificationTypes ?? []);
|
|
20
|
+
}
|
|
18
21
|
}, [selectedTypes, isFetchedTypes, isFetchedPreference, preference, notificationTypes]);
|
|
19
22
|
const setSelectedTypes = (types) => {
|
|
20
23
|
setSelectedTypesState(types), saveTimelinePreference({
|
|
21
24
|
...preference,
|
|
22
25
|
type: types
|
|
23
26
|
});
|
|
24
|
-
},
|
|
25
|
-
data,
|
|
27
|
+
}, {
|
|
28
|
+
data: notifications,
|
|
26
29
|
hasNextPage,
|
|
27
30
|
isLoading: isLoadingNotifications,
|
|
28
31
|
error: errorNotifications,
|
|
29
32
|
fetchNextPage
|
|
30
|
-
} = useNotifications(selectedTypes ?? [], isFetchedTypes && !!selectedTypes
|
|
33
|
+
} = useNotifications(selectedTypes ?? [], isFetchedTypes && !!selectedTypes);
|
|
31
34
|
return {
|
|
32
|
-
notifications
|
|
35
|
+
notifications,
|
|
33
36
|
notificationTypes,
|
|
34
37
|
selectedTypes,
|
|
35
38
|
setSelectedTypes,
|
|
36
|
-
hasNextPage
|
|
39
|
+
hasNextPage,
|
|
37
40
|
loadNextPage: () => fetchNextPage(),
|
|
38
|
-
|
|
39
|
-
// read, so this wait must count as loading too.
|
|
40
|
-
isLoading: isLoadingTypes || selectedTypes === void 0 || isLoadingNotifications,
|
|
41
|
+
isLoading: isLoadingTypes || isLoadingNotifications,
|
|
41
42
|
error: errorTypes || errorNotifications
|
|
42
43
|
};
|
|
43
44
|
}, useHasNotificationToday = () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import SchoolSpace from "./SchoolSpace.js";
|
|
3
|
-
import { useUserSchools } from "
|
|
3
|
+
import { useUserSchools } from "./useUserSchools.js";
|
|
4
4
|
function SchoolSpaceContainer() {
|
|
5
5
|
const {
|
|
6
6
|
handleSelectedSchoolChange,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { School
|
|
2
|
-
export declare function useUserSchools(
|
|
1
|
+
import { School } from '@edifice.io/client';
|
|
2
|
+
export declare function useUserSchools(): {
|
|
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 "../../hooks/useWidget.js";
|
|
4
|
+
import useSession from "../../../../hooks/useSession/useSession.js";
|
|
5
|
+
function useUserSchools() {
|
|
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(WIDGET_NAME.SCHOOL), [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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
-
import
|
|
3
|
+
import illuEmptyUsefulLinks from "@edifice.io/bootstrap/dist/images/homepage/illu-empty-useful-links.png";
|
|
4
4
|
import SvgIconEdit from "../../../icons/components/IconEdit.js";
|
|
5
5
|
import HomeCard from "../HomeCard/HomeCard.js";
|
|
6
6
|
import Image from "../../../../components/Image/Image.js";
|
|
@@ -18,7 +18,7 @@ function UsefulLinks({
|
|
|
18
18
|
"data-testid": "usefullinks-button-edit"
|
|
19
19
|
} }),
|
|
20
20
|
/* @__PURE__ */ jsx(HomeCard.Content, { children: links.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "useful-links-widget__empty", children: [
|
|
21
|
-
/* @__PURE__ */ jsx(Image, { src:
|
|
21
|
+
/* @__PURE__ */ jsx(Image, { src: illuEmptyUsefulLinks, alt: "", "aria-hidden": "true", style: {
|
|
22
22
|
width: 160,
|
|
23
23
|
height: 87
|
|
24
24
|
} }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
-
import
|
|
3
|
+
import illuEmptyUsefulLinks from "@edifice.io/bootstrap/dist/images/homepage/illu-empty-useful-links.png";
|
|
4
4
|
import SvgIconClose from "../../../icons/components/IconClose.js";
|
|
5
5
|
import SvgIconEdit from "../../../icons/components/IconEdit.js";
|
|
6
6
|
import SvgIconPlus from "../../../icons/components/IconPlus.js";
|
|
@@ -29,7 +29,7 @@ function UsefulLinksModal({
|
|
|
29
29
|
/* @__PURE__ */ jsx(ModalBeta.Body, { children: links.length === 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30
30
|
/* @__PURE__ */ jsx(Flex, { justify: "end", className: "mb-16", children: addLinkButton }),
|
|
31
31
|
/* @__PURE__ */ jsxs("div", { className: "useful-links-modal__empty", children: [
|
|
32
|
-
/* @__PURE__ */ jsx(Image, { src:
|
|
32
|
+
/* @__PURE__ */ jsx(Image, { src: illuEmptyUsefulLinks, alt: "", "aria-hidden": "true", style: {
|
|
33
33
|
width: 200,
|
|
34
34
|
height: 109
|
|
35
35
|
} }),
|
|
@@ -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"), 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
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
export * from './Agenda';
|
|
2
|
-
export * from './Communities';
|
|
3
|
-
export * from './BriefMe';
|
|
4
|
-
export * from './Cantine';
|
|
5
|
-
export * from './Edumalin';
|
|
6
1
|
export * from './Favorites';
|
|
7
|
-
export * from './GenerationHdf';
|
|
8
2
|
export * from './Header';
|
|
9
3
|
export * from './HomeCard';
|
|
10
4
|
export * from './LastInfos';
|
|
11
5
|
export * from './MessageFlashList';
|
|
12
6
|
export * from './Notifications';
|
|
13
|
-
export * from './Qwant';
|
|
14
|
-
export * from './Rss';
|
|
15
7
|
export * from './SchoolSpace';
|
|
16
8
|
export * from './UsefulLinks';
|
|
17
|
-
export * from './Universalis';
|
|
18
9
|
export * from './UserSpace';
|
|
19
|
-
export * from './
|
|
20
|
-
export * from './
|
|
10
|
+
export * from './Communities';
|
|
11
|
+
export * from './AlloLycee';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconElea: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconElea;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconElea = ({
|
|
3
|
+
title,
|
|
4
|
+
titleId,
|
|
5
|
+
...props
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 593 512", width: "24", height: "24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
+
/* @__PURE__ */ jsx("path", { fill: "#c05382", d: "M484.091 53.268c8.412 6.559 16.526 13.34 24.562 20.353l6.236 5.268c48.117 43.915 74.575 113.077 77.843 176.915 1.737 74.603-24.159 143.023-75.034 197.535-18.204 18.599-39.779 36.844-65.933 41.929l4.274-10.157q2.78-6.738 5.555-13.477l2.817-6.66c16.47-40.282 12.872-79.412-2.83-119.327-9.178-19.688-22.28-45.218-43.32-53.961-11.269-.93-18.064 6.336-26.732 12.837l6.615 5.176c23.402 19.468 43.27 40.331 47.894 71.637 2.295 26.74.603 52.617-11.005 77.121-10.039 3.346-10.039 3.346-18.392-.157-54.682-31.662-93.019-75.478-120.963-132.257l-3.416-6.566-2.871-5.81c-15.451-18.111-42.847-25.361-64.41-33.575l-10.495-4.051a14418 14418 0 0 0-33.151-12.721q-10.926-4.203-21.85-8.412l-10.806-4.16q-10.66-4.105-21.318-8.212c-16.117-6.204-32.244-12.371-48.423-18.411l-8.369-3.16a1530 1530 0 0 0-15.16-5.634c-25.035-9.507-37.074-21.382-48.715-44.666C-4.515 134.531 5.537 90.65 20.08 56.887c11.997 2.117 19.761 7.095 29.647 14.091l9.569 6.722 10.143 7.213q10.424 7.335 20.849 14.666l10.358 7.311c13.306 9.362 26.695 18.6 40.113 27.8l6.317 4.345a2806 2806 0 0 0 36.977 24.936l.876-6.876c7.231-47.895 32.509-82.3 69.882-112.575 70.286-49.422 161.93-39.815 229.281 8.745z" }),
|
|
9
|
+
/* @__PURE__ */ jsx("path", { fill: "#6e1ce0", d: "M20.078 56.889c11.997 2.117 19.762 7.095 29.647 14.092l9.569 6.722 10.143 7.213q10.424 7.335 20.85 14.666l10.358 7.311c13.306 9.362 26.695 18.6 40.112 27.8l6.317 4.345a2796 2796 0 0 0 36.977 24.936l1.255-13.177c.706-7.412.706-7.412 2.091-13.595 10.437-5.219 18.557-4.294 30.118-3.346 17.552 6.399 28.767 16.411 36.81 33.464 2.294 16.696 1.129 28.598-6.693 43.504l10.706 7.137 7.146 4.764q7.974 5.315 15.95 10.627a15760 15760 0 0 1 45.257 30.255l9.403 6.299a9967 9967 0 0 1 18.05 12.121c12.151 8.132 24.244 16.104 37.017 23.227 27.212 15.589 44.403 39.745 53.909 69.543 4.356 28.334 2.286 57.639-10.039 83.66-10.039 3.346-10.039 3.346-18.392-.157-54.682-31.662-93.019-75.478-120.963-132.257l-3.416-6.566-2.871-5.81c-15.451-18.111-42.847-25.361-64.41-33.575l-10.495-4.051a14418 14418 0 0 0-33.151-12.721q-10.926-4.203-21.85-8.412l-10.806-4.16q-10.66-4.105-21.318-8.212c-16.117-6.204-32.244-12.371-48.423-18.411l-8.369-3.16a1530 1530 0 0 0-15.16-5.634c-25.035-9.507-37.074-21.382-48.715-44.666C-4.517 134.531 5.535 90.65 20.078 56.887z" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { fill: "#fcfbfc", d: "M390.418 75.098c31.719 20.682 52.493 49.127 63.294 85.373 6.565 32.149.214 67.381-16.993 95.281a317 317 0 0 1-10.471 13.151c-5.171 5.835-5.171 5.835-9.83 14.915-6.202 9.437-11.079 13.079-21.543 17.36-22.272-.501-35.343-9.995-52.706-22.588q-8.372-5.904-16.745-11.804l-8.682-6.182c-14.753-10.434-29.704-20.577-44.639-30.746q-8.074-5.52-16.144-11.046l-6.845-4.684-4.827-3.303 3.276-6.244c5.81-12.147 5.244-24.099 3.417-37.26-6.035-12.533-11.134-18.543-22.588-26.353-13.483-4.667-23.451-4.499-37.647-3.764l3.346-20.078c24.876-1.12 44.168-.465 66.928 10.039l.837-9.83c2.805-18.162 7.099-36.873 22.183-48.602 33.34-16.819 74.365-10.93 106.379 6.366z" }),
|
|
11
|
+
/* @__PURE__ */ jsx("path", { fill: "#6119dc", d: "m0 237.595 21.415 6.374 19.227 5.72a27471 27471 0 0 1 53.37 15.932c31.727 9.5 63.448 18.959 95.361 27.816q6.948 1.962 13.894 3.929a1567 1567 0 0 0 24.918 6.803c22.725 6.48 37.431 13.017 49.567 33.818 4.577 8.868 9.017 17.799 13.385 26.771-24.584.341-49.168.575-73.754.736q-12.526.1-25.053.274c-12.054.163-24.106.238-36.161.298l-11.18.209c-40.31.012-75.058-13.387-104.624-41.046C18.676 302.044-.001 269.893-.001 237.595z" }),
|
|
12
|
+
/* @__PURE__ */ jsx("path", { fill: "#761de2", d: "M73.621 394.876c30.021-.7 60.039-1.234 90.066-1.56 13.946-.156 27.886-.369 41.828-.712 13.475-.329 26.945-.507 40.423-.586a722 722 0 0 0 15.364-.327c40.142-1.229 40.142-1.229 56.617 10.089 7.435 7.385 13.938 14.726 20.067 23.212-14.862 11.424-30.487 18.016-47.687 25.307l-9.294 4.046c-44.125 18.852-84.121 24.262-130.431 8.307-28.063-11.745-53.128-32.043-73.608-54.392-2.085-7.142-2.085-7.142-3.347-13.385z" }),
|
|
13
|
+
/* @__PURE__ */ jsx("path", { fill: "#251742", d: "M358.065 80.314c14.965 8.032 27.32 17.26 33.464 33.464 2.344 16.513 1.721 29.822-5.438 44.968-12.831 13.844-24.406 19.105-43.085 20.078-15.076-.583-23.67-4.715-35.137-14.85-11.353-13.145-15.624-23.254-14.68-40.314 3.628-18.324 16.832-29.641 31.412-40 10.973-5.487 21.652-5.556 33.464-3.347z" }),
|
|
14
|
+
/* @__PURE__ */ jsx("path", { fill: "#ea9924", d: "M331.294 16.732v6.693a2500 2500 0 0 1-20.079 13.386c-18.004 16.718-30.594 32.238-39.111 55.425l-4.222 11.307c-2.704 7.871-5.058 15.51-6.863 23.621-3.658-1.035-7.316-2.07-11.085-3.138-17.302-4.38-34.736-5.662-52.496-6.902 14.762-39.941 49.191-72.072 87.007-90.353 15.966-6.079 29.702-10.039 46.849-10.039" }),
|
|
15
|
+
/* @__PURE__ */ jsx("path", { fill: "#9122ea", d: "M368.104 455.111c8.222 4.719 8.222 4.719 16.104 10.248l8.013 5.555 6 4.274c-1.252 8.404-2.235 12.404-8.706 18.118-32.296 19.328-64.678 23.728-101.921 16.784-21.82-6.017-21.82-6.017-29.921-18.17a5012 5012 0 0 1 39.113-17.341q6.657-2.931 13.291-5.912c6.37-2.858 12.764-5.658 19.164-8.447l11.63-5.151c11.142-3.508 16.295-3.603 27.233.04z" }),
|
|
16
|
+
/* @__PURE__ */ jsx("path", { fill: "#faf9fa", d: "M358.065 100.392c10.248 6.902 10.248 6.902 16.732 16.732 2.314 14.399 1.726 20.78-6.274 33.046-9.077 9.077-12.005 10.254-24.889 11.713-12.34-1.255-12.34-1.255-22.17-7.738-9.244-13.726-10.026-24.268-6.902-40.366 9.49-16.918 25.949-16.947 43.504-13.385z" }),
|
|
17
|
+
/* @__PURE__ */ jsx("path", { fill: "#1f103c", d: "M281.098 170.667c16.177 1.387 23.075 7.958 33.464 20.078 3.154 9.461 3.797 15.5 3.764 25.307l.026 7.961c-.445 6.889-.445 6.889-3.791 13.582-14.794-3.441-24.179-8.311-33.543-20.575-5.966-11.312-7.557-23.63-6.615-36.314l6.693-10.039z" }),
|
|
18
|
+
/* @__PURE__ */ jsx("path", { fill: "#2b1d47", d: "M217.517 133.856c17.552 6.399 28.767 16.411 36.81 33.464 2.155 15.929 2.354 26.587-6.693 40.157-6.483-1.255-6.483-1.255-13.386-3.346-1.105-2.208-2.208-4.417-3.346-6.693 1.105-2.208 2.208-4.417 3.346-6.693 1.28-11.776 1.489-17.875-5.229-27.817-10.584-7.327-18.829-8.298-31.582-8.994l-10.039 3.346v-20.078c10.437-5.219 18.557-4.294 30.118-3.346z" }),
|
|
19
|
+
/* @__PURE__ */ jsx("path", { fill: "#f4f2f7", d: "M220.863 153.935c11.454 8.53 16.131 12.974 18.405 27.19-1.849 10.631-3.992 12.72-11.713 19.66a1520 1520 0 0 1-19.869-14.013l-5.719-3.928c-9.131-6.616-14.083-10.631-17.51-21.549l-.405-7.359c12.934-4.656 23.607-3.243 36.81 0z" })
|
|
20
|
+
] });
|
|
21
|
+
export {
|
|
22
|
+
SvgIconElea as default
|
|
23
|
+
};
|
|
@@ -40,6 +40,7 @@ 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';
|
|
43
44
|
export { default as IconElectron } from './IconElectron';
|
|
44
45
|
export { default as IconElyceepicardie } from './IconElyceepicardie';
|
|
45
46
|
export { default as IconEsidoc } from './IconEsidoc';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { default as IconAddUser } from './IconAddUser';
|
|
2
|
-
export { default as IconAddWidget } from './IconAddWidget';
|
|
3
2
|
export { default as IconAdd } from './IconAdd';
|
|
4
3
|
export { default as IconAdjustSettings } from './IconAdjustSettings';
|
|
5
4
|
export { default as IconAiFill } from './IconAiFill';
|
|
@@ -3,13 +3,15 @@ const SvgIconCommunitiesBeta = ({
|
|
|
3
3
|
title,
|
|
4
4
|
titleId,
|
|
5
5
|
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsxs("g", {
|
|
9
|
-
/* @__PURE__ */ jsx("path", {
|
|
10
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
8
|
+
/* @__PURE__ */ jsxs("g", { strokeMiterlimit: 10, strokeWidth: 2.667, clipPath: "url(#icon-communities-beta_svg__a)", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("path", { fill: "#FEECFE", stroke: "#E26AE2", d: "M19.96 5.803a3.803 3.803 0 1 0-7.605 0 3.803 3.803 0 0 0 7.606 0Z" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { stroke: "#E26AE2", d: "M9.668 11.861a3.803 3.803 0 1 0-7.606 0 3.803 3.803 0 0 0 7.606 0ZM30.254 11.861a3.803 3.803 0 1 0-7.606 0 3.803 3.803 0 0 0 7.606 0Z" }),
|
|
11
|
+
/* @__PURE__ */ jsx("path", { stroke: "#FC94FF", d: "M6.389 18.847a5.25 5.25 0 0 1 5.248 5.248v6.837H1.14v-6.837a5.25 5.25 0 0 1 5.248-5.248ZM25.637 18.847a5.25 5.25 0 0 1 5.248 5.248v6.837H20.389v-6.837a5.25 5.25 0 0 1 5.248-5.248Z" }),
|
|
12
|
+
/* @__PURE__ */ jsx("path", { fill: "#FEECFE", stroke: "#E26AE2", d: "M16.158 12.955a5.25 5.25 0 0 1 5.248 5.248v12.73H10.91v-12.73a5.25 5.25 0 0 1 5.248-5.248Z" })
|
|
11
13
|
] }),
|
|
12
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-communities-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0
|
|
14
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-communities-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
|
|
13
15
|
] });
|
|
14
16
|
export {
|
|
15
17
|
SvgIconCommunitiesBeta as default
|
|
@@ -3,13 +3,10 @@ const SvgIconHomeBeta = ({
|
|
|
3
3
|
title,
|
|
4
4
|
titleId,
|
|
5
5
|
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
|
|
10
|
-
/* @__PURE__ */ jsx("path", { d: "M14.3 23V13H9.7v10a1 1 0 1 1-2 0V12a1 1 0 0 1 1-1h6.6a1 1 0 0 1 1 1v11a1 1 0 1 1-2 0" })
|
|
11
|
-
] }),
|
|
12
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-home-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
8
|
+
/* @__PURE__ */ jsx("g", { clipPath: "url(#icon-home-beta_svg__a)", children: /* @__PURE__ */ jsx("path", { fill: "#383838", d: "M15.183.28a1.334 1.334 0 0 1 1.636 0l12 9.335c.325.252.515.64.515 1.052v14.666a4 4 0 0 1-4 4H6.668a4 4 0 0 1-4-4V10.667c0-.411.19-.8.515-1.052zM5.334 11.32v14.014a1.335 1.335 0 0 0 1.334 1.334h4v-12c0-.736.597-1.334 1.333-1.334h8c.736 0 1.333.598 1.333 1.334v12h4a1.335 1.335 0 0 0 1.334-1.334V11.32L16.001 3.023zm8 15.348h5.334V16h-5.334z" }) }),
|
|
9
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-home-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
|
|
13
10
|
] });
|
|
14
11
|
export {
|
|
15
12
|
SvgIconHomeBeta as default
|
|
@@ -3,15 +3,15 @@ const SvgIconMessagesBeta = ({
|
|
|
3
3
|
title,
|
|
4
4
|
titleId,
|
|
5
5
|
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsxs("g", {
|
|
9
|
-
/* @__PURE__ */ jsx("path", {
|
|
10
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
11
|
-
/* @__PURE__ */ jsx("path", { d: "
|
|
12
|
-
/* @__PURE__ */ jsx("path", {
|
|
8
|
+
/* @__PURE__ */ jsxs("g", { clipPath: "url(#icon-messages-beta_svg__a)", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("path", { stroke: "#E5A800", strokeMiterlimit: 10, strokeWidth: 2.667, d: "m5.93 10.246-4.8 3.088v12.267a5.335 5.335 0 0 0 5.334 5.333h24.534v-17.6l-4.689-3.013" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { fill: "#FCF3CF", d: "M26.196 15.468v-14.4H5.93v14.4" }),
|
|
11
|
+
/* @__PURE__ */ jsx("path", { stroke: "#FFC403", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M26.196 15.468v-14.4H5.93v14.4" }),
|
|
12
|
+
/* @__PURE__ */ jsx("path", { stroke: "#E5A800", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M9.13 5.334h13.867M10.197 9.6h11.734M1.13 13.334l14.934 8.533 14.933-8.533" })
|
|
13
13
|
] }),
|
|
14
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-messages-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0
|
|
14
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-messages-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
|
|
15
15
|
] });
|
|
16
16
|
export {
|
|
17
17
|
SvgIconMessagesBeta as default
|
|
@@ -3,9 +3,10 @@ const SvgIconMyAppsBeta = ({
|
|
|
3
3
|
title,
|
|
4
4
|
titleId,
|
|
5
5
|
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("g", {
|
|
8
|
+
/* @__PURE__ */ jsx("g", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, clipPath: "url(#icon-my-apps-beta_svg__a)", children: /* @__PURE__ */ jsx("path", { d: "M31.117 1H19v12.117h12.117zM13.207 18.884H1.09V31h12.117zM1 1.084c6.688 0 12.117 5.43 12.117 12.117H1zM30.934 18.884H18.816V31h12.118z" }) }),
|
|
9
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-my-apps-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
|
|
9
10
|
] });
|
|
10
11
|
export {
|
|
11
12
|
SvgIconMyAppsBeta as default
|
|
@@ -3,9 +3,11 @@ const SvgIconNotificationBeta = ({
|
|
|
3
3
|
title,
|
|
4
4
|
titleId,
|
|
5
5
|
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("path", {
|
|
8
|
+
/* @__PURE__ */ jsx("path", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M13.363 5.348a2.726 2.726 0 1 1 5.383-.622q0 .423-.12.808M19.886 25.184a3.919 3.919 0 1 1-7.559-.26" }),
|
|
9
|
+
/* @__PURE__ */ jsx("path", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M28.62 18.901H4.058v6.682h24.56z" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M16.189 4.889c5.639 0 10.22 4.581 10.22 10.22v3.794H5.97V15.11c0-5.639 4.581-10.22 10.22-10.22Z" })
|
|
9
11
|
] });
|
|
10
12
|
export {
|
|
11
13
|
SvgIconNotificationBeta as default
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { GoogleDriveDocument } from '@edifice.io/client';
|
|
3
|
+
import { CardProps } from '../../../components/Card';
|
|
4
|
+
export interface GoogleDriveFileCardProps extends CardProps {
|
|
5
|
+
doc: GoogleDriveDocument;
|
|
6
|
+
/**
|
|
7
|
+
* Id of the user who owns the Google Drive document, used to build the preview URL.
|
|
8
|
+
*/
|
|
9
|
+
userId: string;
|
|
10
|
+
/**
|
|
11
|
+
* Custom icon to override the default based on file type
|
|
12
|
+
* Can be a string or a React node
|
|
13
|
+
*/
|
|
14
|
+
customIcon?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Custom color class to override the default based on file type
|
|
17
|
+
* Example: "bg-purple-300" or any valid CSS class
|
|
18
|
+
*/
|
|
19
|
+
customColor?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const GoogleDriveFileCard: {
|
|
22
|
+
({ doc, userId, isClickable, isSelectable, isSelected, onClick, className, onSelect, isFocused, app, customIcon, customColor, }: GoogleDriveFileCardProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
export default GoogleDriveFileCard;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
import { DocumentHelper, odeServices } from "@edifice.io/client";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import SvgIconLandscape from "../../icons/components/IconLandscape.js";
|
|
6
|
+
import SvgIconMic from "../../icons/components/IconMic.js";
|
|
7
|
+
import SvgIconTextPage from "../../icons/components/IconTextPage.js";
|
|
8
|
+
import SvgIconVideo from "../../icons/components/IconVideo.js";
|
|
9
|
+
import FileIcon from "./FileIcon.js";
|
|
10
|
+
import useThumbnail from "../../../hooks/useThumbnail/useThumbnail.js";
|
|
11
|
+
import Card from "../../../components/Card/Card.js";
|
|
12
|
+
const roleMappings = {
|
|
13
|
+
csv: {
|
|
14
|
+
icon: ".CSV",
|
|
15
|
+
color: "bg-orange-200"
|
|
16
|
+
},
|
|
17
|
+
xls: {
|
|
18
|
+
icon: ".XLS",
|
|
19
|
+
color: "bg-green-200"
|
|
20
|
+
},
|
|
21
|
+
doc: {
|
|
22
|
+
icon: ".DOC",
|
|
23
|
+
color: "bg-blue-200"
|
|
24
|
+
},
|
|
25
|
+
txt: {
|
|
26
|
+
icon: ".TXT",
|
|
27
|
+
color: "bg-blue-200"
|
|
28
|
+
},
|
|
29
|
+
pdf: {
|
|
30
|
+
icon: ".PDF",
|
|
31
|
+
color: "bg-red-200"
|
|
32
|
+
},
|
|
33
|
+
audio: {
|
|
34
|
+
icon: /* @__PURE__ */ jsx(SvgIconMic, { width: 22, height: 22 }),
|
|
35
|
+
color: "bg-red-200"
|
|
36
|
+
},
|
|
37
|
+
ppt: {
|
|
38
|
+
icon: ".PPT",
|
|
39
|
+
color: "bg-red-200"
|
|
40
|
+
},
|
|
41
|
+
img: {
|
|
42
|
+
icon: /* @__PURE__ */ jsx(SvgIconLandscape, { width: 22, height: 22 }),
|
|
43
|
+
color: "bg-green-200"
|
|
44
|
+
},
|
|
45
|
+
video: {
|
|
46
|
+
icon: /* @__PURE__ */ jsx(SvgIconVideo, { width: 22, height: 22 }),
|
|
47
|
+
color: "bg-purple-200"
|
|
48
|
+
},
|
|
49
|
+
zip: {
|
|
50
|
+
icon: ".ZIP",
|
|
51
|
+
color: "bg-gray-300"
|
|
52
|
+
},
|
|
53
|
+
md: {
|
|
54
|
+
icon: ".MD",
|
|
55
|
+
color: "bg-blue-200"
|
|
56
|
+
},
|
|
57
|
+
unknown: {
|
|
58
|
+
icon: /* @__PURE__ */ jsx(SvgIconTextPage, { width: 22, height: 22 }),
|
|
59
|
+
color: "bg-gray-300"
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function getRoleMap(type, customIcon, customColor) {
|
|
63
|
+
return customIcon !== void 0 || customColor !== void 0 ? {
|
|
64
|
+
icon: customIcon || /* @__PURE__ */ jsx(SvgIconTextPage, { width: 22, height: 22 }),
|
|
65
|
+
color: customColor || "bg-gray-300",
|
|
66
|
+
hasShadow: !1
|
|
67
|
+
} : roleMappings[type] ?? roleMappings.unknown;
|
|
68
|
+
}
|
|
69
|
+
const GoogleDriveFileCard = ({
|
|
70
|
+
doc,
|
|
71
|
+
userId,
|
|
72
|
+
isClickable = !0,
|
|
73
|
+
isSelectable = !1,
|
|
74
|
+
isSelected = !1,
|
|
75
|
+
onClick,
|
|
76
|
+
className,
|
|
77
|
+
onSelect,
|
|
78
|
+
isFocused,
|
|
79
|
+
app,
|
|
80
|
+
customIcon,
|
|
81
|
+
customColor
|
|
82
|
+
}) => {
|
|
83
|
+
const ref = useRef(null), type = DocumentHelper.role(doc.contentType, !1), roleMap = getRoleMap(type ?? "unknown", customIcon, customColor), file = clsx("file position-relative rounded", (roleMap == null ? void 0 : roleMap.color) ?? "bg-yellow-200"), mediaSrc = type === "img" ? odeServices.googledrive().getFileUrl(userId, doc) : null, hasThumbnail = useThumbnail(mediaSrc, {
|
|
84
|
+
ref
|
|
85
|
+
}), imageStyles = hasThumbnail && {
|
|
86
|
+
backgroundImage: `url(${mediaSrc})`,
|
|
87
|
+
backgroundSize: "cover"
|
|
88
|
+
};
|
|
89
|
+
return /* @__PURE__ */ jsx(Card, { className: clsx("card-file", className), isClickable, isSelectable, isSelected, onClick, app, isFocused, onSelect, children: /* @__PURE__ */ jsxs(Card.Body, { space: "8", children: [
|
|
90
|
+
/* @__PURE__ */ jsx("div", { ref, className: file, style: {
|
|
91
|
+
aspectRatio: "16/10",
|
|
92
|
+
...imageStyles
|
|
93
|
+
}, children: type !== "img" || !hasThumbnail ? /* @__PURE__ */ jsx(FileIcon, { type, roleMap }) : null }),
|
|
94
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-4", children: [
|
|
95
|
+
/* @__PURE__ */ jsx(Card.Text, { children: doc.name }),
|
|
96
|
+
/* @__PURE__ */ jsx(Card.Text, { className: "text-black-50", children: doc == null ? void 0 : doc.ownerDisplayName })
|
|
97
|
+
] })
|
|
98
|
+
] }) });
|
|
99
|
+
};
|
|
100
|
+
export {
|
|
101
|
+
GoogleDriveFileCard as default
|
|
102
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { default as FileCard } from './FileCard';
|
|
2
2
|
export * from './FileCard';
|
|
3
|
+
export { default as GoogleDriveFileCard } from './GoogleDriveFileCard';
|
|
4
|
+
export * from './GoogleDriveFileCard';
|
|
3
5
|
export { default as NextcloudFileCard } from './NextcloudFileCard';
|
|
4
6
|
export * from './NextcloudFileCard';
|