@edifice.io/react 2.5.23 → 2.5.24-develop.20260623184311
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/AppIcon/AppIcon.js +4 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +2 -1
- package/dist/components/BetaSwitch/BetaSwitch.d.ts +13 -0
- package/dist/components/BetaSwitch/BetaSwitch.js +27 -0
- package/dist/components/BetaSwitch/index.d.ts +1 -0
- package/dist/components/ButtonBeta/ButtonBeta.d.ts +47 -0
- package/dist/components/ButtonBeta/ButtonBeta.js +34 -0
- package/dist/components/ButtonBeta/index.d.ts +2 -0
- package/dist/components/Flex/Flex.js +5 -1
- package/dist/components/Logo/index.d.ts +1 -1
- package/dist/components/LogoBeta/LogoBeta.d.ts +7 -0
- package/dist/components/LogoBeta/LogoBeta.js +14 -0
- package/dist/components/LogoBeta/index.d.ts +2 -0
- package/dist/components/PageLayout/PageLayout.d.ts +45 -0
- package/dist/components/PageLayout/PageLayout.js +94 -0
- package/dist/components/PageLayout/PageLayoutContext.d.ts +14 -0
- package/dist/components/PageLayout/PageLayoutContext.js +8 -0
- package/dist/components/PageLayout/components/PageLayoutBreadcrumb.d.ts +9 -0
- package/dist/components/PageLayout/components/PageLayoutBreadcrumb.js +10 -0
- package/dist/components/PageLayout/components/PageLayoutContent.d.ts +9 -0
- package/dist/components/PageLayout/components/PageLayoutContent.js +18 -0
- package/dist/components/PageLayout/components/PageLayoutHeader.d.ts +10 -0
- package/dist/components/PageLayout/components/PageLayoutHeader.js +18 -0
- package/dist/components/PageLayout/components/PageLayoutOverlay.d.ts +15 -0
- package/dist/components/PageLayout/components/PageLayoutOverlay.js +51 -0
- package/dist/components/PageLayout/components/PageLayoutSidebarLeft.d.ts +9 -0
- package/dist/components/PageLayout/components/PageLayoutSidebarLeft.js +18 -0
- package/dist/components/PageLayout/components/PageLayoutSidebarRight.d.ts +9 -0
- package/dist/components/PageLayout/components/PageLayoutSidebarRight.js +18 -0
- package/dist/components/PageLayout/hook/useOverlay.d.ts +5 -0
- package/dist/components/PageLayout/hook/useOverlay.js +15 -0
- package/dist/components/PageLayout/index.d.ts +4 -0
- package/dist/components/PageLayout/store/overlayStore.d.ts +15 -0
- package/dist/components/PageLayout/store/overlayStore.js +12 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/homepage.js +34 -0
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/useEdificeIcons/useEdificeIcons.js +10 -9
- package/dist/icons-nav.js +38 -28
- package/dist/index.js +215 -202
- package/dist/modules/homepage/components/Favorites/Favorites.d.ts +6 -0
- package/dist/modules/homepage/components/Favorites/Favorites.js +28 -0
- package/dist/modules/homepage/components/Favorites/FavoritesContainer.d.ts +4 -0
- package/dist/modules/homepage/components/Favorites/FavoritesContainer.js +10 -0
- package/dist/modules/homepage/components/Favorites/index.d.ts +2 -0
- package/dist/modules/homepage/components/Header/Header.d.ts +9 -0
- package/dist/modules/homepage/components/Header/Header.js +80 -0
- package/dist/modules/homepage/components/Header/index.d.ts +2 -0
- package/dist/modules/homepage/components/HomeCard/HomeCard.d.ts +37 -0
- package/dist/modules/homepage/components/HomeCard/HomeCard.js +17 -0
- package/dist/modules/homepage/components/HomeCard/HomeCardContent.d.ts +7 -0
- package/dist/modules/homepage/components/HomeCard/HomeCardContent.js +10 -0
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +18 -0
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +22 -0
- package/dist/modules/homepage/components/HomeCard/index.d.ts +4 -0
- package/dist/modules/homepage/components/LastInfos/LastInfos.d.ts +49 -0
- package/dist/modules/homepage/components/LastInfos/LastInfos.js +58 -0
- package/dist/modules/homepage/components/LastInfos/LastInfosContainer.d.ts +4 -0
- package/dist/modules/homepage/components/LastInfos/LastInfosContainer.js +37 -0
- package/dist/modules/homepage/components/LastInfos/LastInfosList.d.ts +13 -0
- package/dist/modules/homepage/components/LastInfos/LastInfosList.js +31 -0
- package/dist/modules/homepage/components/LastInfos/index.d.ts +4 -0
- package/dist/modules/homepage/components/LastInfos/useLastInfos.d.ts +18 -0
- package/dist/modules/homepage/components/LastInfos/useLastInfos.js +25 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlash.d.ts +12 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlash.js +65 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlashList.d.ts +12 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlashList.js +10 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlashListContainer.d.ts +5 -0
- package/dist/modules/homepage/components/MessageFlashList/MessageFlashListContainer.js +14 -0
- package/dist/modules/homepage/components/MessageFlashList/hooks/useMessageFlashList.d.ts +16 -0
- package/dist/modules/homepage/components/MessageFlashList/hooks/useMessageFlashList.js +19 -0
- package/dist/modules/homepage/components/MessageFlashList/index.d.ts +4 -0
- package/dist/modules/homepage/components/MessageFlashList/services/api/index.d.ts +4 -0
- package/dist/modules/homepage/components/MessageFlashList/services/api/index.js +5 -0
- package/dist/modules/homepage/components/MessageFlashList/services/api/messagesFlashService.d.ts +20 -0
- package/dist/modules/homepage/components/MessageFlashList/services/api/messagesFlashService.js +21 -0
- package/dist/modules/homepage/components/MessageFlashList/services/queries/messagesFlash.d.ts +13 -0
- package/dist/modules/homepage/components/MessageFlashList/services/queries/messagesFlash.js +31 -0
- package/dist/modules/homepage/components/Notifications/Notification.d.ts +20 -0
- package/dist/modules/homepage/components/Notifications/Notification.js +16 -0
- package/dist/modules/homepage/components/Notifications/NotificationList.d.ts +18 -0
- package/dist/modules/homepage/components/Notifications/NotificationList.js +44 -0
- package/dist/modules/homepage/components/Notifications/NotificationListContainer.d.ts +9 -0
- package/dist/modules/homepage/components/Notifications/NotificationListContainer.js +20 -0
- package/dist/modules/homepage/components/Notifications/NotificationListSkeleton.d.ts +5 -0
- package/dist/modules/homepage/components/Notifications/NotificationListSkeleton.js +17 -0
- package/dist/modules/homepage/components/Notifications/NotificationSkeleton.d.ts +3 -0
- package/dist/modules/homepage/components/Notifications/NotificationSkeleton.js +19 -0
- package/dist/modules/homepage/components/Notifications/components/NotificationItem.d.ts +24 -0
- package/dist/modules/homepage/components/Notifications/components/NotificationItem.js +28 -0
- package/dist/modules/homepage/components/Notifications/components/NotificationResource.d.ts +15 -0
- package/dist/modules/homepage/components/Notifications/components/NotificationResource.js +19 -0
- package/dist/modules/homepage/components/Notifications/components/SystemNotification.d.ts +15 -0
- package/dist/modules/homepage/components/Notifications/components/SystemNotification.js +20 -0
- package/dist/modules/homepage/components/Notifications/components/UserNotification.d.ts +15 -0
- package/dist/modules/homepage/components/Notifications/components/UserNotification.js +25 -0
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.d.ts +27 -0
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +53 -0
- package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.d.ts +20 -0
- package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.js +26 -0
- package/dist/modules/homepage/components/Notifications/index.d.ts +6 -0
- package/dist/modules/homepage/components/Notifications/services/api/index.d.ts +4 -0
- package/dist/modules/homepage/components/Notifications/services/api/index.js +5 -0
- package/dist/modules/homepage/components/Notifications/services/api/notificationService.d.ts +15 -0
- package/dist/modules/homepage/components/Notifications/services/api/notificationService.js +22 -0
- package/dist/modules/homepage/components/Notifications/services/queries/notification.d.ts +20 -0
- package/dist/modules/homepage/components/Notifications/services/queries/notification.js +40 -0
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpace.d.ts +15 -0
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpace.js +29 -0
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.d.ts +4 -0
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.js +13 -0
- package/dist/modules/homepage/components/SchoolSpace/index.d.ts +3 -0
- package/dist/modules/homepage/components/SchoolSpace/useUserSchools.d.ts +6 -0
- package/dist/modules/homepage/components/SchoolSpace/useUserSchools.js +39 -0
- package/dist/modules/homepage/components/UserSpace/UserSpace.d.ts +13 -0
- package/dist/modules/homepage/components/UserSpace/UserSpace.js +28 -0
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.d.ts +7 -0
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.js +19 -0
- package/dist/modules/homepage/components/UserSpace/index.d.ts +3 -0
- package/dist/modules/homepage/components/index.d.ts +8 -0
- package/dist/modules/homepage/hooks/useWidget.d.ts +6 -0
- package/dist/modules/homepage/hooks/useWidget.js +83 -0
- package/dist/modules/homepage/hooks/useWidgetPreferences.d.ts +6 -0
- package/dist/modules/homepage/hooks/useWidgetPreferences.js +34 -0
- package/dist/modules/homepage/index.d.ts +1 -0
- package/dist/modules/icons/components/nav/IconCommunitiesBeta.d.ts +7 -0
- package/dist/modules/icons/components/nav/IconCommunitiesBeta.js +18 -0
- package/dist/modules/icons/components/nav/IconHomeBeta.d.ts +7 -0
- package/dist/modules/icons/components/nav/IconHomeBeta.js +13 -0
- package/dist/modules/icons/components/nav/IconMessagesBeta.d.ts +7 -0
- package/dist/modules/icons/components/nav/IconMessagesBeta.js +18 -0
- package/dist/modules/icons/components/nav/IconMyAppsBeta.d.ts +7 -0
- package/dist/modules/icons/components/nav/IconMyAppsBeta.js +13 -0
- package/dist/modules/icons/components/nav/IconNotificationBeta.d.ts +7 -0
- package/dist/modules/icons/components/nav/IconNotificationBeta.js +14 -0
- package/dist/modules/icons/components/nav/index.d.ts +5 -0
- package/dist/modules/modals/OnboardingModal/index.d.ts +1 -1
- package/dist/providers/EdificeClientProvider/EdificeClientProvider.d.ts +0 -7
- package/dist/utilities/create-selectors/createSelectors.d.ts +10 -0
- package/dist/utilities/create-selectors/createSelectors.js +11 -0
- package/package.json +13 -8
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { odeServices } from "@edifice.io/client";
|
|
2
|
+
const createNotificationService = (baseURL) => ({
|
|
3
|
+
/**
|
|
4
|
+
* Get notifications.
|
|
5
|
+
* @returns list of notification objects
|
|
6
|
+
*/
|
|
7
|
+
getNotifications(types, page) {
|
|
8
|
+
const searchParams = new URLSearchParams({
|
|
9
|
+
page: page.toString(),
|
|
10
|
+
mine: "1"
|
|
11
|
+
});
|
|
12
|
+
return types.forEach((type) => {
|
|
13
|
+
searchParams.append("type", type);
|
|
14
|
+
}), odeServices.http().get(`${baseURL}/timeline/lastNotifications?${searchParams.toString()}`).then((response) => response.status !== "ok" ? [] : response.number && response.results ? response.results : []);
|
|
15
|
+
},
|
|
16
|
+
getNotificationTypes() {
|
|
17
|
+
return odeServices.http().get(`${baseURL}/timeline/types`);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
createNotificationService
|
|
22
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NotificationModel } from '@edifice.io/client';
|
|
2
|
+
export declare const notificationQueryKeys: {
|
|
3
|
+
all: () => readonly ["notifications"];
|
|
4
|
+
notifications: (types?: string[]) => readonly ["notifications", "list", string[]];
|
|
5
|
+
types: () => readonly ["notifications", "types"];
|
|
6
|
+
};
|
|
7
|
+
export declare const notificationQueryOptions: {
|
|
8
|
+
getNotifications(types: string[], enabled: boolean): import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseInfiniteQueryOptions<NotificationModel[], Error, NotificationModel[], NotificationModel[], readonly ["notifications", "list", string[]], number>, "queryFn"> & {
|
|
9
|
+
queryFn?: import('@tanstack/react-query').QueryFunction<NotificationModel[], readonly ["notifications", "list", string[]], number> | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
queryKey: import('@tanstack/react-query').DataTag<readonly ["notifications", "list", string[]], import('@tanstack/react-query').InfiniteData<NotificationModel[], unknown>>;
|
|
12
|
+
};
|
|
13
|
+
getNotificationTypes(): import('@tanstack/react-query').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<string[], Error, string[], import('@tanstack/react-query').QueryKey>, "queryFn"> & {
|
|
14
|
+
queryFn?: import('@tanstack/react-query').QueryFunction<string[], import('@tanstack/react-query').QueryKey, never> | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
queryKey: import('@tanstack/react-query').DataTag<import('@tanstack/react-query').QueryKey, string[]>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const useNotifications: (types?: string[], enabled?: boolean) => import('@tanstack/react-query').UseInfiniteQueryResult<NotificationModel[], Error>;
|
|
20
|
+
export declare const useNotificationTypes: () => import('@tanstack/react-query').UseQueryResult<string[], Error>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useQuery, useInfiniteQuery, queryOptions, infiniteQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { notificationService } from "../api/index.js";
|
|
3
|
+
const notificationQueryKeys = {
|
|
4
|
+
all: () => ["notifications"],
|
|
5
|
+
notifications: (types = []) => [...notificationQueryKeys.all(), "list", types],
|
|
6
|
+
types: () => [...notificationQueryKeys.all(), "types"]
|
|
7
|
+
}, notificationQueryOptions = {
|
|
8
|
+
getNotifications(types, enabled) {
|
|
9
|
+
return infiniteQueryOptions({
|
|
10
|
+
queryKey: notificationQueryKeys.notifications(types),
|
|
11
|
+
queryFn: ({
|
|
12
|
+
pageParam = 0
|
|
13
|
+
}) => notificationService.getNotifications(types, pageParam),
|
|
14
|
+
staleTime: 5 * 60 * 1e3,
|
|
15
|
+
// 5 minutes
|
|
16
|
+
initialPageParam: 0,
|
|
17
|
+
select(data) {
|
|
18
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
19
|
+
return data.pages.flat().filter((notification) => seenIds.has(notification._id) ? !1 : (seenIds.add(notification._id), !0));
|
|
20
|
+
},
|
|
21
|
+
getNextPageParam: (lastPage, _allPages, lastPageParam) => {
|
|
22
|
+
if ((lastPage == null ? void 0 : lastPage.length) !== 0)
|
|
23
|
+
return lastPageParam + 1;
|
|
24
|
+
},
|
|
25
|
+
enabled
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
getNotificationTypes() {
|
|
29
|
+
return queryOptions({
|
|
30
|
+
queryKey: notificationQueryKeys.types(),
|
|
31
|
+
queryFn: async () => notificationService.getNotificationTypes()
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}, useNotifications = (types = [], enabled = !0) => useInfiniteQuery(notificationQueryOptions.getNotifications(types, enabled)), useNotificationTypes = () => useQuery(notificationQueryOptions.getNotificationTypes());
|
|
35
|
+
export {
|
|
36
|
+
notificationQueryKeys,
|
|
37
|
+
notificationQueryOptions,
|
|
38
|
+
useNotificationTypes,
|
|
39
|
+
useNotifications
|
|
40
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { School } from '@edifice.io/client';
|
|
2
|
+
/**
|
|
3
|
+
* SchoolSpace component displays the currently selected school and provides
|
|
4
|
+
* a dropdown menu to switch between multiple schools if available.
|
|
5
|
+
*/
|
|
6
|
+
export interface SchoolSpaceProps {
|
|
7
|
+
selectedSchool: School | undefined;
|
|
8
|
+
onSelectedSchoolChange?: (school: School) => void;
|
|
9
|
+
schools?: School[];
|
|
10
|
+
}
|
|
11
|
+
declare const SchoolSpace: {
|
|
12
|
+
({ schools, selectedSchool, onSelectedSchoolChange, }: SchoolSpaceProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export default SchoolSpace;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import SvgIconRafterUp from "../../../icons/components/IconRafterUp.js";
|
|
4
|
+
import useToggle from "../../../../hooks/useToggle/useToggle.js";
|
|
5
|
+
import Flex from "../../../../components/Flex/Flex.js";
|
|
6
|
+
import Dropdown from "../../../../components/Dropdown/Dropdown.js";
|
|
7
|
+
import IconButton from "../../../../components/Button/IconButton.js";
|
|
8
|
+
import { getRotateTransitionStyle } from "../../../../utilities/rotate-transition-style/get-rotate-transition-style.js";
|
|
9
|
+
const SchoolSpace = ({
|
|
10
|
+
schools,
|
|
11
|
+
selectedSchool,
|
|
12
|
+
onSelectedSchoolChange
|
|
13
|
+
}) => {
|
|
14
|
+
const [isExpanded, toggleExpanded] = useToggle(!1), {
|
|
15
|
+
t
|
|
16
|
+
} = useTranslation(), hasManySchools = schools && schools.length > 1;
|
|
17
|
+
return selectedSchool ? /* @__PURE__ */ jsx("div", { className: "school-space", children: /* @__PURE__ */ jsxs(Flex, { className: "school-space-container", justify: "center", gap: "4", align: "center", children: [
|
|
18
|
+
/* @__PURE__ */ jsx("b", { children: selectedSchool.name }),
|
|
19
|
+
hasManySchools && /* @__PURE__ */ jsx(Dropdown, { placement: "bottom-end", onToggle: toggleExpanded, children: (triggerProps) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
/* @__PURE__ */ jsx(IconButton, { ...triggerProps, "aria-label": t("show"), color: "tertiary", variant: "ghost", icon: /* @__PURE__ */ jsx(SvgIconRafterUp, { className: "w-16 min-w-0", style: getRotateTransitionStyle(isExpanded, {
|
|
21
|
+
degrees: 180
|
|
22
|
+
}) }) }),
|
|
23
|
+
/* @__PURE__ */ jsx(Dropdown.Menu, { children: schools.map((school) => /* @__PURE__ */ jsx(Dropdown.Item, { onClick: () => onSelectedSchoolChange == null ? void 0 : onSelectedSchoolChange(school), children: /* @__PURE__ */ jsx(Flex, { direction: "column", children: /* @__PURE__ */ jsx("p", { children: school.name }) }) }, school.id)) })
|
|
24
|
+
] }) })
|
|
25
|
+
] }) }) : null;
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
SchoolSpace as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import SchoolSpace from "./SchoolSpace.js";
|
|
3
|
+
import { useUserSchools } from "./useUserSchools.js";
|
|
4
|
+
function SchoolSpaceContainer() {
|
|
5
|
+
const {
|
|
6
|
+
handleSelectedSchoolChange,
|
|
7
|
+
...otherProps
|
|
8
|
+
} = useUserSchools();
|
|
9
|
+
return /* @__PURE__ */ jsx(SchoolSpace, { onSelectedSchoolChange: handleSelectedSchoolChange, ...otherProps });
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
SchoolSpaceContainer
|
|
13
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { WIDGET_NAME } from "@edifice.io/client";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import useWidget from "../../hooks/useWidget.js";
|
|
4
|
+
import useSession from "../../../../hooks/useSession/useSession.js";
|
|
5
|
+
function useUserSchools() {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
const {
|
|
8
|
+
data: session
|
|
9
|
+
} = useSession(), {
|
|
10
|
+
preference,
|
|
11
|
+
savePreference
|
|
12
|
+
} = useWidget(WIDGET_NAME.SCHOOL), [selectedSchool, setSelectedSchool] = useState(), [schools, setSchools] = useState((_a = session == null ? void 0 : session.userDescription) == null ? void 0 : _a.schools);
|
|
13
|
+
return useEffect(() => {
|
|
14
|
+
var _a2;
|
|
15
|
+
const newSchools = (_a2 = session == null ? void 0 : session.userDescription) == null ? void 0 : _a2.schools;
|
|
16
|
+
setSchools(newSchools), setSelectedSchool(newSchools == null ? void 0 : newSchools[0]);
|
|
17
|
+
}, [(_b = session == null ? void 0 : session.userDescription) == null ? void 0 : _b.schools]), useEffect(() => {
|
|
18
|
+
if (Array.isArray(schools)) {
|
|
19
|
+
if (schools.length === 1)
|
|
20
|
+
setSelectedSchool(schools[0]);
|
|
21
|
+
else if (preference != null && preference.schoolId) {
|
|
22
|
+
const index = schools.findIndex((school) => school.id === (preference == null ? void 0 : preference.schoolId));
|
|
23
|
+
setSelectedSchool(index < 0 || index >= schools.length ? schools[0] : schools[index]);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, [preference, schools]), {
|
|
27
|
+
schools: schools ?? [],
|
|
28
|
+
selectedSchool,
|
|
29
|
+
handleSelectedSchoolChange: (school) => {
|
|
30
|
+
setSelectedSchool(school), preference && savePreference({
|
|
31
|
+
...preference,
|
|
32
|
+
schoolId: school.id
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
useUserSchools
|
|
39
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UserProfile } from '@edifice.io/client';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type UserSpaceProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
avatar: string;
|
|
6
|
+
profile: UserProfile[number];
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
declare function UserSpace({ name, avatar, profile, children, }: UserSpaceProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare namespace UserSpace {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
export default UserSpace;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import HomeCard from "../HomeCard/HomeCard.js";
|
|
4
|
+
import Flex from "../../../../components/Flex/Flex.js";
|
|
5
|
+
import Avatar from "../../../../components/Avatar/Avatar.js";
|
|
6
|
+
function UserSpace({
|
|
7
|
+
name,
|
|
8
|
+
avatar,
|
|
9
|
+
profile,
|
|
10
|
+
children
|
|
11
|
+
}) {
|
|
12
|
+
const {
|
|
13
|
+
t
|
|
14
|
+
} = useTranslation();
|
|
15
|
+
return /* @__PURE__ */ jsxs(HomeCard, { variant: "user", children: [
|
|
16
|
+
/* @__PURE__ */ jsx(HomeCard.Header, { title: /* @__PURE__ */ jsxs(Flex, { className: "user-space", direction: "row", gap: "8", children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Avatar, { className: "user-space--avatar", size: "auto", alt: name, src: avatar, variant: "circle" }),
|
|
18
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
|
|
19
|
+
/* @__PURE__ */ jsx("div", { "data-testid": "user-space-name", className: "user-space--name", children: name }),
|
|
20
|
+
/* @__PURE__ */ jsx("div", { "data-testid": "user-space-profile", className: "user-space--profile", children: t(profile) })
|
|
21
|
+
] })
|
|
22
|
+
] }) }),
|
|
23
|
+
children && /* @__PURE__ */ jsx(HomeCard.Content, { children })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
UserSpace as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import UserSpace from "./UserSpace.js";
|
|
3
|
+
import useUser from "../../../../hooks/useUser/useUser.js";
|
|
4
|
+
function UserSpaceContainer({
|
|
5
|
+
children
|
|
6
|
+
}) {
|
|
7
|
+
var _a;
|
|
8
|
+
const {
|
|
9
|
+
user,
|
|
10
|
+
avatar,
|
|
11
|
+
userDescription
|
|
12
|
+
} = useUser();
|
|
13
|
+
if (!user || !userDescription) return null;
|
|
14
|
+
const name = user.username || "", profile = ((_a = userDescription.profiles) == null ? void 0 : _a[0]) || "Guest";
|
|
15
|
+
return /* @__PURE__ */ jsx(UserSpace, { name, profile, avatar, children });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
UserSpaceContainer
|
|
19
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WidgetName, WidgetUserPref } from '@edifice.io/client';
|
|
2
|
+
export default function useWidget(widgetName: WidgetName): {
|
|
3
|
+
widget: import('@edifice.io/client').IWidgetModel | undefined;
|
|
4
|
+
preference: WidgetUserPref | undefined;
|
|
5
|
+
savePreference: (pref: WidgetUserPref) => Promise<void> | undefined;
|
|
6
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { WIDGET_POSITION } from "@edifice.io/client";
|
|
2
|
+
import { useMemo, useState, useCallback, useEffect } from "react";
|
|
3
|
+
import { useWidgetPreferences } from "./useWidgetPreferences.js";
|
|
4
|
+
const DEFAULT_VALUES = (/* @__PURE__ */ new Map()).set("school-widget", {
|
|
5
|
+
index: 0,
|
|
6
|
+
position: WIDGET_POSITION.LEFT
|
|
7
|
+
}).set("my-apps", {
|
|
8
|
+
index: 10,
|
|
9
|
+
position: WIDGET_POSITION.RIGHT
|
|
10
|
+
}).set("record-me", {
|
|
11
|
+
index: 15,
|
|
12
|
+
position: WIDGET_POSITION.RIGHT
|
|
13
|
+
}).set("last-infos-widget", {
|
|
14
|
+
index: 20,
|
|
15
|
+
position: WIDGET_POSITION.LEFT
|
|
16
|
+
}).set("qwant", {
|
|
17
|
+
index: 30,
|
|
18
|
+
position: WIDGET_POSITION.RIGHT
|
|
19
|
+
}).set("qwant-junior", {
|
|
20
|
+
index: 30,
|
|
21
|
+
position: WIDGET_POSITION.LEFT
|
|
22
|
+
}).set("universalis-widget", {
|
|
23
|
+
index: 35,
|
|
24
|
+
position: WIDGET_POSITION.RIGHT
|
|
25
|
+
}).set("agenda-widget", {
|
|
26
|
+
index: 40,
|
|
27
|
+
position: WIDGET_POSITION.LEFT
|
|
28
|
+
}).set("bookmark-widget", {
|
|
29
|
+
index: 50,
|
|
30
|
+
position: WIDGET_POSITION.RIGHT
|
|
31
|
+
}).set("carnet-de-bord", {
|
|
32
|
+
index: 60,
|
|
33
|
+
position: WIDGET_POSITION.LEFT
|
|
34
|
+
}).set("maxicours-widget", {
|
|
35
|
+
index: 70,
|
|
36
|
+
position: WIDGET_POSITION.RIGHT
|
|
37
|
+
}).set("cursus-widget", {
|
|
38
|
+
index: 80,
|
|
39
|
+
position: WIDGET_POSITION.LEFT
|
|
40
|
+
}).set("briefme-widget", {
|
|
41
|
+
index: 90,
|
|
42
|
+
position: WIDGET_POSITION.LEFT
|
|
43
|
+
}).set("rss-widget", {
|
|
44
|
+
index: 100,
|
|
45
|
+
position: WIDGET_POSITION.LEFT
|
|
46
|
+
}).set("mood", {
|
|
47
|
+
index: 110,
|
|
48
|
+
position: WIDGET_POSITION.LEFT
|
|
49
|
+
}).set("birthday", {
|
|
50
|
+
index: 120,
|
|
51
|
+
position: WIDGET_POSITION.LEFT
|
|
52
|
+
}).set("calendar-widget", {
|
|
53
|
+
index: 130,
|
|
54
|
+
position: WIDGET_POSITION.RIGHT
|
|
55
|
+
}).set("notes", {
|
|
56
|
+
index: 140,
|
|
57
|
+
position: WIDGET_POSITION.RIGHT
|
|
58
|
+
});
|
|
59
|
+
function useWidget(widgetName) {
|
|
60
|
+
const {
|
|
61
|
+
widgets,
|
|
62
|
+
preferences,
|
|
63
|
+
savePreferences
|
|
64
|
+
} = useWidgetPreferences(), widget = useMemo(() => widgets == null ? void 0 : widgets.find((w) => w.name === widgetName), [widgets, widgetName]), [preference, setPreference] = useState(), savePreference = useCallback((pref) => {
|
|
65
|
+
if (preferences)
|
|
66
|
+
return preferences[widgetName] = pref, savePreferences(preferences);
|
|
67
|
+
}, [preferences, savePreferences, widgetName]);
|
|
68
|
+
return useEffect(() => {
|
|
69
|
+
const defaultValue = DEFAULT_VALUES.get(widgetName), pref = (preferences == null ? void 0 : preferences[widgetName]) ?? {
|
|
70
|
+
index: (defaultValue == null ? void 0 : defaultValue.index) ?? 999,
|
|
71
|
+
show: !0,
|
|
72
|
+
position: defaultValue == null ? void 0 : defaultValue.position
|
|
73
|
+
};
|
|
74
|
+
widget != null && widget.mandatory && (pref.show = !0, pref.index = (defaultValue == null ? void 0 : defaultValue.index) ?? 0), setPreference(pref);
|
|
75
|
+
}, [preferences, widget, widgetName]), {
|
|
76
|
+
widget,
|
|
77
|
+
preference,
|
|
78
|
+
savePreference
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
useWidget as default
|
|
83
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IWidgetPreferences } from '@edifice.io/client';
|
|
2
|
+
export declare function useWidgetPreferences(): {
|
|
3
|
+
widgets: import('@edifice.io/client').IWidgetModel[] | undefined;
|
|
4
|
+
preferences: IWidgetPreferences | undefined;
|
|
5
|
+
savePreferences: (prefs: IWidgetPreferences) => Promise<void>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { odeServices } from "@edifice.io/client";
|
|
2
|
+
import { useQueryClient, useQuery, queryOptions, useMutation } from "@tanstack/react-query";
|
|
3
|
+
const WIDGETS_QUERY_KEY = ["widgets", "system"], PREFERENCES_QUERY_KEY = ["widgets", "preferences"];
|
|
4
|
+
function useWidgetPreferences() {
|
|
5
|
+
const queryClient = useQueryClient(), {
|
|
6
|
+
data: widgets
|
|
7
|
+
} = useQuery(queryOptions({
|
|
8
|
+
queryKey: WIDGETS_QUERY_KEY,
|
|
9
|
+
queryFn: () => odeServices.widget().getSystemWidgets()
|
|
10
|
+
})), {
|
|
11
|
+
data: preferences
|
|
12
|
+
} = useQuery(queryOptions({
|
|
13
|
+
queryKey: PREFERENCES_QUERY_KEY,
|
|
14
|
+
queryFn: () => odeServices.widget().getPreferences()
|
|
15
|
+
})), preferencesMutation = useMutation({
|
|
16
|
+
mutationFn: (prefs) => odeServices.widget().setPreferences(prefs),
|
|
17
|
+
onMutate: async (prefs) => {
|
|
18
|
+
queryClient.setQueryData(PREFERENCES_QUERY_KEY, () => prefs);
|
|
19
|
+
},
|
|
20
|
+
onError() {
|
|
21
|
+
queryClient.invalidateQueries({
|
|
22
|
+
queryKey: PREFERENCES_QUERY_KEY
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
widgets,
|
|
28
|
+
preferences,
|
|
29
|
+
savePreferences: (prefs) => preferencesMutation.mutateAsync(prefs)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
useWidgetPreferences
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconCommunitiesBeta: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconCommunitiesBeta;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconCommunitiesBeta = ({
|
|
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 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
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" })
|
|
13
|
+
] }),
|
|
14
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-communities-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
|
|
15
|
+
] });
|
|
16
|
+
export {
|
|
17
|
+
SvgIconCommunitiesBeta as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconHomeBeta: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconHomeBeta;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconHomeBeta = ({
|
|
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 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
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" }) }) })
|
|
10
|
+
] });
|
|
11
|
+
export {
|
|
12
|
+
SvgIconHomeBeta as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconMessagesBeta: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconMessagesBeta;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconMessagesBeta = ({
|
|
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 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
+
/* @__PURE__ */ jsxs("g", { clipPath: "url(#icon-messages-beta_svg__a)", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("path", { 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
|
+
] }),
|
|
14
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-messages-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
|
|
15
|
+
] });
|
|
16
|
+
export {
|
|
17
|
+
SvgIconMessagesBeta as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconMyAppsBeta: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconMyAppsBeta;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconMyAppsBeta = ({
|
|
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 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
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" }) }) })
|
|
10
|
+
] });
|
|
11
|
+
export {
|
|
12
|
+
SvgIconMyAppsBeta as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconNotificationBeta: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconNotificationBeta;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconNotificationBeta = ({
|
|
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 32 32", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
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" })
|
|
11
|
+
] });
|
|
12
|
+
export {
|
|
13
|
+
SvgIconNotificationBeta as default
|
|
14
|
+
};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
export { default as IconCommunitiesBeta } from './IconCommunitiesBeta';
|
|
1
2
|
export { default as IconCommunities } from './IconCommunities';
|
|
2
3
|
export { default as IconCommunity } from './IconCommunity';
|
|
3
4
|
export { default as IconDisconnect } from './IconDisconnect';
|
|
5
|
+
export { default as IconHomeBeta } from './IconHomeBeta';
|
|
4
6
|
export { default as IconHome } from './IconHome';
|
|
7
|
+
export { default as IconMessagesBeta } from './IconMessagesBeta';
|
|
8
|
+
export { default as IconMyAppsBeta } from './IconMyAppsBeta';
|
|
5
9
|
export { default as IconMyApps } from './IconMyApps';
|
|
6
10
|
export { default as IconNeoAssistance } from './IconNeoAssistance';
|
|
7
11
|
export { default as IconNeoMessaging } from './IconNeoMessaging';
|
|
8
12
|
export { default as IconNewRelease } from './IconNewRelease';
|
|
13
|
+
export { default as IconNotificationBeta } from './IconNotificationBeta';
|
|
9
14
|
export { default as IconOneAssistance } from './IconOneAssistance';
|
|
10
15
|
export { default as IconOneMessaging } from './IconOneMessaging';
|
|
11
16
|
export { default as IconOneProfile } from './IconOneProfile';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as OnboardingModal } from './OnboardingModal';
|
|
2
|
-
export type { OnboardingModalRef } from './OnboardingModal';
|
|
2
|
+
export type { DisplayRuleCheckResult, OnboardingModalRef, OnboardingProps, } from './OnboardingModal';
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import { App } from '@edifice.io/client';
|
|
2
1
|
import { EdificeClientProviderProps } from './EdificeClientProvider.context';
|
|
3
|
-
export interface OdeProviderParams {
|
|
4
|
-
alternativeApp?: boolean;
|
|
5
|
-
app: App;
|
|
6
|
-
cdnDomain?: string | null;
|
|
7
|
-
version?: string | null;
|
|
8
|
-
}
|
|
9
2
|
export declare function EdificeClientProvider({ children, params, }: EdificeClientProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoreApi, UseBoundStore } from 'zustand';
|
|
2
|
+
type WithSelectors<S> = S extends {
|
|
3
|
+
getState: () => infer T;
|
|
4
|
+
} ? S & {
|
|
5
|
+
use: {
|
|
6
|
+
[K in keyof T]: () => T[K];
|
|
7
|
+
};
|
|
8
|
+
} : never;
|
|
9
|
+
export declare const createSelectors: <S extends UseBoundStore<StoreApi<object>>>(_store: S) => WithSelectors<S>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const createSelectors = (_store) => {
|
|
2
|
+
const store = _store;
|
|
3
|
+
store.use = {};
|
|
4
|
+
const selectorMap = store.use;
|
|
5
|
+
for (const k of Object.keys(store.getState()))
|
|
6
|
+
selectorMap[k] = () => store((s) => s[k]);
|
|
7
|
+
return store;
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
createSelectors
|
|
11
|
+
};
|