@edifice.io/react 2.5.24-develop-b2school.20260626115410 → 2.5.24-develop-enabling.20260629161142
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/homepage.js +2 -2
- package/dist/modules/homepage/components/Notifications/{NotificationItem.d.ts → Notification.d.ts} +3 -3
- package/dist/modules/homepage/components/Notifications/{NotificationItem.js → Notification.js} +6 -6
- package/dist/modules/homepage/components/Notifications/NotificationList.js +2 -2
- package/dist/modules/homepage/components/Notifications/NotificationSkeleton.js +1 -1
- package/dist/modules/homepage/components/Notifications/components/{CommonNotificationItem.d.ts → NotificationItem.d.ts} +2 -2
- package/dist/modules/homepage/components/Notifications/components/NotificationItem.js +28 -0
- package/dist/modules/homepage/components/Notifications/components/{NotificationItemResource.d.ts → NotificationResource.d.ts} +4 -4
- package/dist/modules/homepage/components/Notifications/components/NotificationResource.js +19 -0
- package/dist/modules/homepage/components/Notifications/components/{SystemNotificationItem.d.ts → SystemNotification.d.ts} +4 -4
- package/dist/modules/homepage/components/Notifications/components/SystemNotification.js +20 -0
- package/dist/modules/homepage/components/Notifications/components/{UserNotificationItem.d.ts → UserNotification.d.ts} +4 -4
- package/dist/modules/homepage/components/Notifications/components/UserNotification.js +25 -0
- package/dist/modules/homepage/components/Notifications/index.d.ts +2 -2
- package/package.json +9 -8
- package/dist/modules/homepage/components/Notifications/components/CommonNotificationItem.js +0 -28
- package/dist/modules/homepage/components/Notifications/components/NotificationItemResource.js +0 -19
- package/dist/modules/homepage/components/Notifications/components/SystemNotificationItem.js +0 -20
- package/dist/modules/homepage/components/Notifications/components/UserNotificationItem.js +0 -25
- package/dist/modules/icons/components/IconStarFavorite.d.ts +0 -7
package/dist/homepage.js
CHANGED
|
@@ -2,7 +2,7 @@ import { default as default2 } from "./modules/homepage/components/Header/Header
|
|
|
2
2
|
import { default as default3 } from "./modules/homepage/components/HomeCard/HomeCard.js";
|
|
3
3
|
import { default as default4 } from "./modules/homepage/components/LastInfos/LastInfos.js";
|
|
4
4
|
import { default as default5 } from "./modules/homepage/components/MessageFlashList/MessageFlashList.js";
|
|
5
|
-
import { default as default6 } from "./modules/homepage/components/Notifications/
|
|
5
|
+
import { default as default6 } from "./modules/homepage/components/Notifications/Notification.js";
|
|
6
6
|
import { default as default7 } from "./modules/homepage/components/Notifications/NotificationList.js";
|
|
7
7
|
import { NotificationListContainer } from "./modules/homepage/components/Notifications/NotificationListContainer.js";
|
|
8
8
|
import { default as default8 } from "./modules/homepage/components/SchoolSpace/SchoolSpace.js";
|
|
@@ -24,7 +24,7 @@ export {
|
|
|
24
24
|
LastInfosList,
|
|
25
25
|
default5 as MessageFlashList,
|
|
26
26
|
MessageFlashListContainer,
|
|
27
|
-
default6 as
|
|
27
|
+
default6 as Notification,
|
|
28
28
|
default7 as NotificationList,
|
|
29
29
|
NotificationListContainer,
|
|
30
30
|
default8 as SchoolSpace,
|
package/dist/modules/homepage/components/Notifications/{NotificationItem.d.ts → Notification.d.ts}
RENAMED
|
@@ -11,10 +11,10 @@ export type NotificationProps = {
|
|
|
11
11
|
* - **system** — triggered by an application event; shows the app icon.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
|
-
* <
|
|
14
|
+
* <Notification notification={notificationModel} />
|
|
15
15
|
*/
|
|
16
|
-
declare const
|
|
16
|
+
declare const Notification: {
|
|
17
17
|
({ notification }: NotificationProps): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
displayName: string;
|
|
19
19
|
};
|
|
20
|
-
export default
|
|
20
|
+
export default Notification;
|
package/dist/modules/homepage/components/Notifications/{NotificationItem.js → Notification.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import SystemNotification from "./components/SystemNotification.js";
|
|
3
|
+
import UserNotification from "./components/UserNotification.js";
|
|
4
4
|
import { notificationAdapter } from "./components/notificationAdapter.js";
|
|
5
|
-
const
|
|
5
|
+
const Notification = ({
|
|
6
6
|
notification
|
|
7
7
|
}) => {
|
|
8
8
|
const notif = notificationAdapter(notification);
|
|
9
9
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10
|
-
notif.type === "user" && /* @__PURE__ */ jsx(
|
|
11
|
-
notif.type === "system" && /* @__PURE__ */ jsx(
|
|
10
|
+
notif.type === "user" && /* @__PURE__ */ jsx(UserNotification, { notification: notif }),
|
|
11
|
+
notif.type === "system" && /* @__PURE__ */ jsx(SystemNotification, { notification: notif })
|
|
12
12
|
] });
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
Notification as default
|
|
16
16
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import illuEmptyNotification from "@edifice.io/bootstrap/dist/images/emptyscreen/illu-notifications.png";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import SvgIconClose from "../../../icons/components/IconClose.js";
|
|
5
|
-
import
|
|
5
|
+
import Notification from "./Notification.js";
|
|
6
6
|
import NotificationListSkeleton from "./NotificationListSkeleton.js";
|
|
7
7
|
import NotificationSkeleton from "./NotificationSkeleton.js";
|
|
8
8
|
import useInfiniteScroll from "../../../../hooks/useInfiniteScroll/useInfiniteScroll.js";
|
|
@@ -31,7 +31,7 @@ const NotificationList = ({
|
|
|
31
31
|
] }),
|
|
32
32
|
(notifications == null ? void 0 : notifications.length) === 0 ? /* @__PURE__ */ jsx("div", { className: "mx-24", children: /* @__PURE__ */ jsx(EmptyScreen, { size: 120, imageSrc: illuEmptyNotification, imageAlt: t("homepage.notifications-list.empty.description"), text: t("homepage.notifications-list.empty.description") }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33
33
|
/* @__PURE__ */ jsx("ul", { children: notifications == null ? void 0 : notifications.map((notification, index) => /* @__PURE__ */ jsxs("li", { children: [
|
|
34
|
-
/* @__PURE__ */ jsx(
|
|
34
|
+
/* @__PURE__ */ jsx(Notification, { notification }),
|
|
35
35
|
/* @__PURE__ */ jsx(Divider, { className: "border-grey-300 my-0" })
|
|
36
36
|
] }, "notification-list-" + notification._id + "-" + index)) }),
|
|
37
37
|
hasNextPage && /* @__PURE__ */ jsx(NotificationSkeleton, { ref: loadNextRef }),
|
|
@@ -4,7 +4,7 @@ import Flex from "../../../../components/Flex/Flex.js";
|
|
|
4
4
|
import Avatar from "../../../../components/Avatar/Avatar.js";
|
|
5
5
|
import TextSkeleton from "../../../../components/Skeleton/TextSkeleton.js";
|
|
6
6
|
const NotificationSkeleton = /* @__PURE__ */ React.forwardRef((_props, ref) => /* @__PURE__ */ jsx(Flex, { direction: "column", className: "notification", gap: "8", ref, children: /* @__PURE__ */ jsxs(Flex, { direction: "row", gap: "8", children: [
|
|
7
|
-
/* @__PURE__ */ jsx("div", { className: "notification-
|
|
7
|
+
/* @__PURE__ */ jsx("div", { className: "notification-picture", children: /* @__PURE__ */ jsx(Avatar, { alt: "Notification Picture", variant: "circle", className: "notification-avatar" }) }),
|
|
8
8
|
/* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "8", className: "notification-message", children: [
|
|
9
9
|
/* @__PURE__ */ jsx(TextSkeleton, {}),
|
|
10
10
|
/* @__PURE__ */ jsx(TextSkeleton, {}),
|
|
@@ -17,8 +17,8 @@ export type NotificationItemProps = {
|
|
|
17
17
|
* notification comes from a user or a system event. Use `UserNotification` or
|
|
18
18
|
* `SystemNotification` instead of consuming this directly.
|
|
19
19
|
*/
|
|
20
|
-
declare const
|
|
20
|
+
declare const NotificationItem: {
|
|
21
21
|
({ picture, message, date, uri, children, }: NotificationItemProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
displayName: string;
|
|
23
23
|
};
|
|
24
|
-
export default
|
|
24
|
+
export default NotificationItem;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import useDate from "../../../../../hooks/useDate/useDate.js";
|
|
3
|
+
import Flex from "../../../../../components/Flex/Flex.js";
|
|
4
|
+
const NotificationItem = ({
|
|
5
|
+
picture,
|
|
6
|
+
message,
|
|
7
|
+
date,
|
|
8
|
+
uri,
|
|
9
|
+
children
|
|
10
|
+
}) => {
|
|
11
|
+
const {
|
|
12
|
+
formatTimeAgo,
|
|
13
|
+
formatDate
|
|
14
|
+
} = useDate();
|
|
15
|
+
return /* @__PURE__ */ jsx(Flex, { direction: "column", className: "notification", gap: "8", children: /* @__PURE__ */ jsxs(Flex, { direction: "row", gap: "8", children: [
|
|
16
|
+
/* @__PURE__ */ jsx("div", { className: "notification-picture", children: picture }),
|
|
17
|
+
/* @__PURE__ */ jsx("a", { href: uri, "data-testid": "notification-content", children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "8", children: [
|
|
18
|
+
/* @__PURE__ */ jsx("div", { className: "notification-message", dangerouslySetInnerHTML: {
|
|
19
|
+
__html: message
|
|
20
|
+
} }),
|
|
21
|
+
children,
|
|
22
|
+
/* @__PURE__ */ jsx("p", { className: "notification-date", title: formatDate(date, "LLL"), children: formatTimeAgo(date) })
|
|
23
|
+
] }) })
|
|
24
|
+
] }) });
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
NotificationItem as default
|
|
28
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type NotificationResourceProps = {
|
|
2
2
|
appCode: string;
|
|
3
3
|
};
|
|
4
4
|
/**
|
|
@@ -8,8 +8,8 @@ export type NotificationItemResourceProps = {
|
|
|
8
8
|
* falling back to the raw `appCode` if no translation exists.
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
declare const
|
|
12
|
-
({ appCode
|
|
11
|
+
declare const NotificationResource: {
|
|
12
|
+
({ appCode }: NotificationResourceProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
displayName: string;
|
|
14
14
|
};
|
|
15
|
-
export default
|
|
15
|
+
export default NotificationResource;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import AppIcon from "../../../../../components/AppIcon/AppIcon.js";
|
|
4
|
+
const NotificationResource = ({
|
|
5
|
+
appCode
|
|
6
|
+
}) => {
|
|
7
|
+
const {
|
|
8
|
+
t
|
|
9
|
+
} = useTranslation(), appLabel = t(`${appCode}`, {
|
|
10
|
+
defaultValue: appCode
|
|
11
|
+
}), appCssClass = `app-${appCode}`;
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", { className: `notification-resource ${appCssClass} bg-app-light`, children: [
|
|
13
|
+
/* @__PURE__ */ jsx("span", { className: "notification-resource-icon", children: /* @__PURE__ */ jsx(AppIcon, { app: appCode, size: "24", iconFit: "contain" }) }),
|
|
14
|
+
/* @__PURE__ */ jsx("span", { className: "notification-resource-name color-app", children: appLabel })
|
|
15
|
+
] });
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
NotificationResource as default
|
|
19
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SystemWebNotification } from './notificationAdapter';
|
|
2
|
-
export type
|
|
2
|
+
export type SystemNotificationProps = {
|
|
3
3
|
notification: SystemWebNotification;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
@@ -8,8 +8,8 @@ export type SystemNotificationItemProps = {
|
|
|
8
8
|
* Wraps `NotificationItem` — prefer using `Notification` at the top level
|
|
9
9
|
* rather than this component directly.
|
|
10
10
|
*/
|
|
11
|
-
declare const
|
|
12
|
-
({ notification
|
|
11
|
+
declare const SystemNotification: {
|
|
12
|
+
({ notification }: SystemNotificationProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
displayName: string;
|
|
14
14
|
};
|
|
15
|
-
export default
|
|
15
|
+
export default SystemNotification;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import NotificationItem from "./NotificationItem.js";
|
|
4
|
+
import AppIcon from "../../../../../components/AppIcon/AppIcon.js";
|
|
5
|
+
const SystemNotification = ({
|
|
6
|
+
notification
|
|
7
|
+
}) => {
|
|
8
|
+
const {
|
|
9
|
+
params,
|
|
10
|
+
message,
|
|
11
|
+
date,
|
|
12
|
+
uri
|
|
13
|
+
} = notification, {
|
|
14
|
+
t
|
|
15
|
+
} = useTranslation(), appName = t(params.appCode);
|
|
16
|
+
return /* @__PURE__ */ jsx(NotificationItem, { uri, message, date, picture: /* @__PURE__ */ jsx("a", { href: uri, title: appName, "data-testid": "notification-app-icon", "aria-label": t("homepage.notifications.app-icon.placeholder"), children: /* @__PURE__ */ jsx(AppIcon, { app: params.appCode, size: "24", variant: "square", className: "notification-app-icon" }) }) });
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
SystemNotification as default
|
|
20
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserWebNotification } from './notificationAdapter';
|
|
2
|
-
export type
|
|
2
|
+
export type UserNotificationProps = {
|
|
3
3
|
notification: UserWebNotification;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
@@ -8,8 +8,8 @@ export type UserNotificationItemProps = {
|
|
|
8
8
|
* The avatar and its link are resolved via `useDirectory`. Wraps `NotificationItem`
|
|
9
9
|
* — prefer using `Notification` at the top level rather than this component directly.
|
|
10
10
|
*/
|
|
11
|
-
declare const
|
|
12
|
-
({ notification }:
|
|
11
|
+
declare const UserNotification: {
|
|
12
|
+
({ notification }: UserNotificationProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
displayName: string;
|
|
14
14
|
};
|
|
15
|
-
export default
|
|
15
|
+
export default UserNotification;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import NotificationItem from "./NotificationItem.js";
|
|
4
|
+
import NotificationResource from "./NotificationResource.js";
|
|
5
|
+
import useDirectory from "../../../../../hooks/useDirectory/useDirectory.js";
|
|
6
|
+
import Avatar from "../../../../../components/Avatar/Avatar.js";
|
|
7
|
+
const UserNotification = ({
|
|
8
|
+
notification
|
|
9
|
+
}) => {
|
|
10
|
+
const {
|
|
11
|
+
getAvatarURL,
|
|
12
|
+
getUserbookURL
|
|
13
|
+
} = useDirectory(), {
|
|
14
|
+
params,
|
|
15
|
+
message,
|
|
16
|
+
date,
|
|
17
|
+
uri
|
|
18
|
+
} = notification, {
|
|
19
|
+
t
|
|
20
|
+
} = useTranslation(), userName = t(params.username);
|
|
21
|
+
return /* @__PURE__ */ jsx(NotificationItem, { uri, message, date, picture: /* @__PURE__ */ jsx("a", { href: getUserbookURL(params.userId, "user"), title: userName, "data-testid": "notification-avatar", children: /* @__PURE__ */ jsx(Avatar, { "aria-label": t("homepage.notifications.avatar.placeholder"), src: getAvatarURL(params.userId, "user"), alt: userName, variant: "circle", className: "notification-avatar" }) }), children: /* @__PURE__ */ jsx(NotificationResource, { appCode: params.appCode }) });
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
UserNotification as default
|
|
25
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export { default as
|
|
1
|
+
export * from './Notification';
|
|
2
|
+
export { default as Notification } from './Notification';
|
|
3
3
|
export * from './NotificationList';
|
|
4
4
|
export { default as NotificationList } from './NotificationList';
|
|
5
5
|
export * from './NotificationListContainer';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.5.24-develop-
|
|
3
|
+
"version": "2.5.24-develop-enabling.20260629161142",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
"swiper": "10.1.0",
|
|
141
141
|
"ua-parser-js": "1.0.36",
|
|
142
142
|
"zustand": "4.5.7",
|
|
143
|
-
"@edifice.io/
|
|
144
|
-
"@edifice.io/
|
|
145
|
-
"@edifice.io/
|
|
143
|
+
"@edifice.io/bootstrap": "2.5.24-develop-enabling.20260629161142",
|
|
144
|
+
"@edifice.io/tiptap-extensions": "2.5.24-develop-enabling.20260629161142",
|
|
145
|
+
"@edifice.io/utilities": "2.5.24-develop-enabling.20260629161142"
|
|
146
146
|
},
|
|
147
147
|
"devDependencies": {
|
|
148
148
|
"@babel/plugin-transform-react-pure-annotations": "7.27.1",
|
|
@@ -173,8 +173,8 @@
|
|
|
173
173
|
"vite": "5.4.14",
|
|
174
174
|
"vite-plugin-dts": "4.5.4",
|
|
175
175
|
"vite-tsconfig-paths": "5.1.4",
|
|
176
|
-
"@edifice.io/client": "2.5.24-develop-
|
|
177
|
-
"@edifice.io/config": "2.5.24-develop-
|
|
176
|
+
"@edifice.io/client": "2.5.24-develop-enabling.20260629161142",
|
|
177
|
+
"@edifice.io/config": "2.5.24-develop-enabling.20260629161142"
|
|
178
178
|
},
|
|
179
179
|
"peerDependencies": {
|
|
180
180
|
"@react-spring/web": "9.7.5",
|
|
@@ -189,9 +189,10 @@
|
|
|
189
189
|
},
|
|
190
190
|
"gitHead": "3e1c3f5b48505564db1b70aab22063a70336f3b0",
|
|
191
191
|
"scripts": {
|
|
192
|
-
"build": "
|
|
193
|
-
"build:icons": "svgr src/modules/icons/assets --config-file ./svgr.config.cjs",
|
|
192
|
+
"build": "vite build",
|
|
194
193
|
"build:analyze": "vite build --mode analyze",
|
|
194
|
+
"generate:icons": "rm -rf src/modules/icons/components && svgr src/modules/icons/assets --config-file ./svgr.config.cjs --silent",
|
|
195
|
+
"icons:check": "pnpm generate:icons && git add --intent-to-add -- src/modules/icons/components && git diff --exit-code -- src/modules/icons/components",
|
|
195
196
|
"fix": "eslint --fix --report-unused-disable-directives --max-warnings 0",
|
|
196
197
|
"format": "prettier --check \"src/**/*.{ts,tsx}\"",
|
|
197
198
|
"format:write": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import useDate from "../../../../../hooks/useDate/useDate.js";
|
|
3
|
-
import Flex from "../../../../../components/Flex/Flex.js";
|
|
4
|
-
const CommonNotificationItem = ({
|
|
5
|
-
picture,
|
|
6
|
-
message,
|
|
7
|
-
date,
|
|
8
|
-
uri,
|
|
9
|
-
children
|
|
10
|
-
}) => {
|
|
11
|
-
const {
|
|
12
|
-
formatTimeAgo,
|
|
13
|
-
formatDate
|
|
14
|
-
} = useDate();
|
|
15
|
-
return /* @__PURE__ */ jsx(Flex, { direction: "column", className: "notification-item", gap: "8", children: /* @__PURE__ */ jsxs(Flex, { direction: "row", gap: "8", children: [
|
|
16
|
-
/* @__PURE__ */ jsx("div", { className: "notification-item-picture", children: picture }),
|
|
17
|
-
/* @__PURE__ */ jsx("a", { href: uri, "data-testid": "notification-item-content", children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "8", children: [
|
|
18
|
-
/* @__PURE__ */ jsx("div", { className: "notification-item-message", dangerouslySetInnerHTML: {
|
|
19
|
-
__html: message
|
|
20
|
-
} }),
|
|
21
|
-
children,
|
|
22
|
-
/* @__PURE__ */ jsx("p", { className: "notification-item-date", title: formatDate(date, "LLL"), children: formatTimeAgo(date) })
|
|
23
|
-
] }) })
|
|
24
|
-
] }) });
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
CommonNotificationItem as default
|
|
28
|
-
};
|
package/dist/modules/homepage/components/Notifications/components/NotificationItemResource.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation } from "react-i18next";
|
|
3
|
-
import AppIcon from "../../../../../components/AppIcon/AppIcon.js";
|
|
4
|
-
const NotificationItemResource = ({
|
|
5
|
-
appCode
|
|
6
|
-
}) => {
|
|
7
|
-
const {
|
|
8
|
-
t
|
|
9
|
-
} = useTranslation(), appLabel = t(`${appCode}`, {
|
|
10
|
-
defaultValue: appCode
|
|
11
|
-
}), appCssClass = `app-${appCode}`;
|
|
12
|
-
return /* @__PURE__ */ jsxs("div", { className: `notification-item-resource ${appCssClass} bg-app-light`, children: [
|
|
13
|
-
/* @__PURE__ */ jsx("span", { className: "notification-item-resource-icon", children: /* @__PURE__ */ jsx(AppIcon, { app: appCode, size: "24", iconFit: "contain" }) }),
|
|
14
|
-
/* @__PURE__ */ jsx("span", { className: "notification-item-resource-name color-app", children: appLabel })
|
|
15
|
-
] });
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
NotificationItemResource as default
|
|
19
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation } from "react-i18next";
|
|
3
|
-
import CommonNotificationItem from "./CommonNotificationItem.js";
|
|
4
|
-
import AppIcon from "../../../../../components/AppIcon/AppIcon.js";
|
|
5
|
-
const SystemNotificationItem = ({
|
|
6
|
-
notification
|
|
7
|
-
}) => {
|
|
8
|
-
const {
|
|
9
|
-
params,
|
|
10
|
-
message,
|
|
11
|
-
date,
|
|
12
|
-
uri
|
|
13
|
-
} = notification, {
|
|
14
|
-
t
|
|
15
|
-
} = useTranslation(), appName = t(params.appCode);
|
|
16
|
-
return /* @__PURE__ */ jsx(CommonNotificationItem, { uri, message, date, picture: /* @__PURE__ */ jsx("a", { href: uri, title: appName, "data-testid": "notification-item-app-icon", "aria-label": t("homepage.notifications.app-icon.placeholder"), children: /* @__PURE__ */ jsx(AppIcon, { app: params.appCode, size: "24", variant: "square", className: "notification-item-app-icon" }) }) });
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
SystemNotificationItem as default
|
|
20
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation } from "react-i18next";
|
|
3
|
-
import CommonNotificationItem from "./CommonNotificationItem.js";
|
|
4
|
-
import NotificationItemResource from "./NotificationItemResource.js";
|
|
5
|
-
import useDirectory from "../../../../../hooks/useDirectory/useDirectory.js";
|
|
6
|
-
import Avatar from "../../../../../components/Avatar/Avatar.js";
|
|
7
|
-
const UserNotificationItem = ({
|
|
8
|
-
notification
|
|
9
|
-
}) => {
|
|
10
|
-
const {
|
|
11
|
-
getAvatarURL,
|
|
12
|
-
getUserbookURL
|
|
13
|
-
} = useDirectory(), {
|
|
14
|
-
params,
|
|
15
|
-
message,
|
|
16
|
-
date,
|
|
17
|
-
uri
|
|
18
|
-
} = notification, {
|
|
19
|
-
t
|
|
20
|
-
} = useTranslation(), userName = t(params.username);
|
|
21
|
-
return /* @__PURE__ */ jsx(CommonNotificationItem, { uri, message, date, picture: /* @__PURE__ */ jsx("a", { href: getUserbookURL(params.userId, "user"), title: userName, "data-testid": "notification-item-avatar", children: /* @__PURE__ */ jsx(Avatar, { "aria-label": t("homepage.notifications.avatar.placeholder"), src: getAvatarURL(params.userId, "user"), alt: userName, variant: "circle", className: "notification-item-avatar" }) }), children: /* @__PURE__ */ jsx(NotificationItemResource, { appCode: params.appCode }) });
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
UserNotificationItem as default
|
|
25
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SVGProps } from 'react';
|
|
2
|
-
interface SVGRProps {
|
|
3
|
-
title?: string;
|
|
4
|
-
titleId?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const SvgIconStarFavorite: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default SvgIconStarFavorite;
|