The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
feat(admin,vendor)!: topbar widget zone, remove built-in notifications bell (#1572)
Viktor Holik7741fde5b06b
diff --git a/packages/admin/src/__tests__/extension-targets.spec.ts b/packages/admin/src/__tests__/extension-targets.spec.tsnew file mode 100644index 000000000..4db7dfec9--- /dev/null+++ b/packages/admin/src/__tests__/extension-targets.spec.ts@@ -0,0 +1,17 @@+import fs from "fs"+import path from "path"+import { describe, expect, test } from "vitest"++const targets = fs.readFileSync(+ path.join(__dirname, "..", "extension-targets.d.ts"),+ "utf-8"+)++describe("extension targets", () => {+ test.each(["topbar.before", "topbar.after"])(+ "registers the %s widget zone",+ (zone) => {+ expect(targets).toContain(`"${zone}": true`)+ }+ )+})diff --git a/packages/admin/src/components/layout/notifications/index.ts b/packages/admin/src/components/layout/notifications/index.tsdeleted file mode 100644index 350984636..000000000--- a/packages/admin/src/components/layout/notifications/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from "./notifications"diff --git a/packages/admin/src/components/layout/notifications/notifications.tsx b/packages/admin/src/components/layout/notifications/notifications.tsxdeleted file mode 100644index d9829a06d..000000000--- a/packages/admin/src/components/layout/notifications/notifications.tsx+++ /dev/null@@ -1,291 +0,0 @@-import {- BellAlert,- BellAlertDone,- InformationCircleSolid,-} from "@medusajs/icons";-import { HttpTypes } from "@medusajs/types";-import { clx, Drawer, Heading, IconButton, Text } from "@medusajs/ui";-import { formatDistance } from "date-fns";-import { TFunction } from "i18next";-import { useEffect, useState } from "react";-import { useTranslation } from "react-i18next";-import { notificationQueryKeys, useNotifications } from "../../../hooks/api";-import { sdk } from "../../../lib/client";-import { FilePreview } from "../../common/file-preview";-import { InfiniteList } from "../../common/infinite-list";-import { InferClientInput } from "@mercurjs/client";--interface NotificationData {- title: string;- description?: string;- file?: {- filename?: string;- url?: string;- mimeType?: string;- };-}--const LAST_READ_NOTIFICATION_KEY = "notificationsLastReadAt";--export const Notifications = () => {- const { t } = useTranslation();- const [open, setOpen] = useState(false);- const [hasUnread, setHasUnread] = useUnreadNotifications();- // This is used to show the unread icon on the notification when the drawer is open,- // so it should lag behind the local storage data and should only be reset on close- const [lastReadAt, setLastReadAt] = useState(- localStorage.getItem(LAST_READ_NOTIFICATION_KEY),- );-- useEffect(() => {- const onKeyDown = (e: KeyboardEvent) => {- if (e.key === "n" && (e.metaKey || e.ctrlKey)) {- setOpen((prev) => !prev);- }- };-- document.addEventListener("keydown", onKeyDown);-- return () => {- document.removeEventListener("keydown", onKeyDown);- };- }, []);-- const handleOnOpen = (shouldOpen: boolean) => {- if (shouldOpen) {- setHasUnread(false);- setOpen(true);- localStorage.setItem(- LAST_READ_NOTIFICATION_KEY,- new Date().toISOString(),- );- } else {- setOpen(false);- setLastReadAt(localStorage.getItem(LAST_READ_NOTIFICATION_KEY));- }- };-- return (- <Drawer- open={open}- onOpenChange={handleOnOpen}- data-testid="notifications-drawer"- >- <Drawer.Trigger asChild>- <IconButton- variant="transparent"- size="small"- className="text-ui-fg-muted hover:text-ui-fg-subtle"- data-testid="notifications-trigger-button"- >- {hasUnread ? (- <BellAlertDone data-testid="notifications-icon-unread" />- ) : (- <BellAlert data-testid="notifications-icon" />- )}- </IconButton>- </Drawer.Trigger>- <Drawer.Content data-testid="notifications-content">- <Drawer.Header data-testid="notifications-header">- <Drawer.Title asChild>- <Heading data-testid="notifications-title">- {t("notifications.domain")}- </Heading>- </Drawer.Title>- <Drawer.Description- className="sr-only"- data-testid="notifications-description"- >- {t("notifications.accessibility.description")}- </Drawer.Description>- </Drawer.Header>- <Drawer.Body- className="overflow-y-auto px-0"- data-testid="notifications-body"- >- <div data-testid="notifications-list">- <InfiniteList<- HttpTypes.AdminNotificationListResponse,- HttpTypes.AdminNotification,- HttpTypes.AdminNotificationListParams- >- responseKey="notifications"- queryKey={notificationQueryKeys.all}- queryFn={(params) =>- sdk.admin.notifications.query({- ...(params as InferClientInput<- typeof sdk.admin.notifications.query- >),- })- }- queryOptions={{ enabled: open }}- renderEmpty={() => <NotificationsEmptyState t={t} />}- renderItem={(notification) => {- return (- <Notification- key={notification.id}- notification={notification}- unread={- Date.parse(notification.created_at) >- (lastReadAt ? Date.parse(lastReadAt) : 0)- }- />- );- }}- />- </div>- </Drawer.Body>- </Drawer.Content>- </Drawer>- );-};--const Notification = ({- notification,- unread,-}: {- notification: HttpTypes.AdminNotification;- unread?: boolean;-}) => {- const data = notification.data as unknown as NotificationData | undefined;-- // We need at least the title to render a notification in the feed- if (!data?.title) {- return null;- }-- return (- <>- <div- className="relative flex items-start justify-center gap-3 border-b p-6"- data-testid={`notification-${notification.id}`}- >- <div- className="text-ui-fg-muted flex size-5 items-center justify-center"- data-testid={`notification-${notification.id}-icon`}- >- <InformationCircleSolid />- </div>- <div- className="flex w-full flex-col gap-y-3"- data-testid={`notification-${notification.id}-content`}- >- <div- className="flex flex-col"- data-testid={`notification-${notification.id}-header`}- >- <div className="flex items-center justify-between">- <Text- size="small"- leading="compact"- weight="plus"- data-testid={`notification-${notification.id}-title`}- >- {data.title}- </Text>- <div- className="align-center flex items-center justify-center gap-2"- data-testid={`notification-${notification.id}-meta`}- >- <Text- as={"span"}- className={clx("text-ui-fg-subtle", {- "text-ui-fg-base": unread,- })}- size="small"- leading="compact"- weight="plus"- data-testid={`notification-${notification.id}-time`}- >- {formatDistance(notification.created_at, new Date(), {- addSuffix: true,- })}- </Text>- {unread && (- <div- className="bg-ui-bg-interactive h-2 w-2 rounded"- // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role- role="status"- data-testid={`notification-${notification.id}-unread-indicator`}- />- )}- </div>- </div>- {!!data.description && (- <Text- className="text-ui-fg-subtle whitespace-pre-line"- size="small"- data-testid={`notification-${notification.id}-description`}- >- {data.description}- </Text>- )}- </div>- {!!data?.file?.url && (- <FilePreview- filename={data.file.filename ?? ""}- url={data.file.url}- hideThumbnail- data-testid={`notification-${notification.id}-file`}- />- )}- </div>- </div>- </>- );-};--const NotificationsEmptyState = ({ t }: { t: TFunction }) => {- return (- <div- className="flex h-full flex-col items-center justify-center"- data-testid="notifications-empty-state"- >- <BellAlertDone data-testid="notifications-empty-icon" />- <Text- size="small"- leading="compact"- weight="plus"- className="mt-3"- data-testid="notifications-empty-title"- >- {t("notifications.emptyState.title")}- </Text>- <Text- size="small"- className="text-ui-fg-muted mt-1 max-w-[294px] text-center"- data-testid="notifications-empty-description"- >- {t("notifications.emptyState.description")}- </Text>- </div>- );-};--const useUnreadNotifications = () => {- const [hasUnread, setHasUnread] = useState(false);- const { notifications } = useNotifications(- { limit: 1, offset: 0, fields: "created_at" },- { refetchInterval: 60_000 },- );- const lastNotification = notifications?.[0];-- useEffect(() => {- if (!lastNotification) {- return;- }-- const lastNotificationAsTimestamp = Date.parse(lastNotification.created_at);-- const lastReadDatetime = localStorage.getItem(LAST_READ_NOTIFICATION_KEY);- const lastReadAsTimestamp = lastReadDatetime- ? Date.parse(lastReadDatetime)- : 0;-- if (lastNotificationAsTimestamp > lastReadAsTimestamp) {- setHasUnread(true);- }- }, [lastNotification]);-- return [hasUnread, setHasUnread] as const;-};diff --git a/packages/admin/src/components/layout/shell/shell.tsx b/packages/admin/src/components/layout/shell/shell.tsxindex fffcde359..252c7ad1a 100644--- a/packages/admin/src/components/layout/shell/shell.tsx+++ b/packages/admin/src/components/layout/shell/shell.tsx@@ -12,11 +12,11 @@ import {useNavigation,} from "react-router-dom"+import { WidgetZone } from "@mercurjs/dashboard-shared"import { KeybindProvider } from "../../../providers/keybind-provider"import { useGlobalShortcuts } from "../../../providers/keybind-provider/hooks"import { useSidebar } from "../../../providers/sidebar-provider"import { ProgressBar } from "../../common/progress-bar"-import { Notifications } from "../notifications"export const Shell = ({ children }: PropsWithChildren) => {const globalShortcuts = useGlobalShortcuts()@@ -200,7 +200,7 @@ const Topbar = () => {<Breadcrumbs /></div><div className="flex items-center justify-end gap-x-3">- <Notifications />+ <WidgetZone id="topbar" /></div></div>)diff --git a/packages/admin/src/extension-targets.d.ts b/packages/admin/src/extension-targets.d.tsindex 6babd37fb..ff034f991 100644--- a/packages/admin/src/extension-targets.d.ts+++ b/packages/admin/src/extension-targets.d.ts@@ -148,6 +148,8 @@ declare module "@mercurjs/dashboard-sdk" {"tax-regions.list.before": true"tax-regions.province.detail.main.after": true"tax-regions.province.detail.main.before": true+ "topbar.after": true+ "topbar.before": true"users.detail.main.after": true"users.detail.main.before": true"users.list.after": truediff --git a/packages/admin/src/hooks/api/index.ts b/packages/admin/src/hooks/api/index.tsindex 150a18e4a..8a4c66053 100644--- a/packages/admin/src/hooks/api/index.ts+++ b/packages/admin/src/hooks/api/index.ts@@ -13,7 +13,6 @@ export * from "./fulfillment-providers";export * from "./fulfillment-sets";export * from "./inventory";export * from "./invites";-export * from "./notification";export * from "./order-groups"export * from "./orders";export * from "./payment-collections";diff --git a/packages/admin/src/hooks/api/notification.tsx b/packages/admin/src/hooks/api/notification.tsxdeleted file mode 100644index 495b42a98..000000000--- a/packages/admin/src/hooks/api/notification.tsx+++ /dev/null@@ -1,58 +0,0 @@-import {- ClientError,- InferClientInput,- InferClientOutput,-} from "@mercurjs/client"-import { QueryKey, UseQueryOptions, useQuery } from "@tanstack/react-query"--import { sdk } from "../../lib/client"-import { queryKeysFactory } from "../../lib/query-key-factory"--const NOTIFICATION_QUERY_KEY = "notification" as const-export const notificationQueryKeys = queryKeysFactory(NOTIFICATION_QUERY_KEY)--export const useNotification = (- id: string,- query?: Omit<- InferClientInput<typeof sdk.admin.notifications.$id.query>,- "$id"- >,- options?: Omit<- UseQueryOptions<- InferClientOutput<typeof sdk.admin.notifications.$id.query>,- ClientError,- InferClientOutput<typeof sdk.admin.notifications.$id.query>,- QueryKey- >,- "queryFn" | "queryKey"- >-) => {- const { data, ...rest } = useQuery({- queryKey: notificationQueryKeys.detail(id),- queryFn: () => sdk.admin.notifications.$id.query({ $id: id, ...query }),- ...options,- })-- return { ...data, ...rest }-}--export const useNotifications = (- query?: InferClientInput<typeof sdk.admin.notifications.query>,- options?: Omit<- UseQueryOptions<- InferClientOutput<typeof sdk.admin.notifications.query>,- ClientError,- InferClientOutput<typeof sdk.admin.notifications.query>,- QueryKey- >,- "queryFn" | "queryKey"- >-) => {- const { data, ...rest } = useQuery({- queryFn: () => sdk.admin.notifications.query({ ...query }),- queryKey: notificationQueryKeys.list(query),- ...options,- })-- return { ...data, ...rest }-}diff --git a/packages/admin/src/i18n/translations/$schema.json b/packages/admin/src/i18n/translations/$schema.jsonindex dd4cadc5a..af7bfd7d8 100644--- a/packages/admin/src/i18n/translations/$schema.json+++ b/packages/admin/src/i18n/translations/$schema.json@@ -14264,48 +14264,6 @@],"additionalProperties": false},- "notifications": {- "type": "object",- "properties": {- "domain": {- "type": "string"- },- "emptyState": {- "type": "object",- "properties": {- "title": {- "type": "string"- },- "description": {- "type": "string"- }- },- "required": [- "title",- "description"- ],- "additionalProperties": false- },- "accessibility": {- "type": "object",- "properties": {- "description": {- "type": "string"- }- },- "required": [- "description"- ],- "additionalProperties": false- }- },- "required": [- "domain",- "emptyState",- "accessibility"- ],- "additionalProperties": false- },"errors": {"type": "object","properties": {@@ -16714,7 +16672,6 @@"shippingOptionTypes","productTypes","productTags",- "notifications","errors","statuses","labels",diff --git a/packages/admin/src/i18n/translations/ar.json b/packages/admin/src/i18n/translations/ar.jsonindex e7df79588..6c4180c57 100644--- a/packages/admin/src/i18n/translations/ar.json+++ b/packages/admin/src/i18n/translations/ar.json@@ -3369,16 +3369,6 @@"value": "القيمة"}},- "notifications": {- "domain": "الإشعارات",- "emptyState": {- "title": "لا توجد إشعارات",- "description": "ليس لديك أي إشعارات في الوقت الحالي، ولكن بمجرد أن تحصل عليها ستظهر هنا."- },- "accessibility": {- "description": "سيتم سرد الإشعارات حول أنشطة مدوسا هنا."- }- },"errors": {"serverError": "خطأ في الخادم - حاول مرة أخرى لاحقًا.","invalidCredentials": "البريد الإلكتروني أو كلمة المرور غير صحيحة"diff --git a/packages/admin/src/i18n/translations/bg.json b/packages/admin/src/i18n/translations/bg.jsonindex 3eda2278a..8f5820e1c 100644--- a/packages/admin/src/i18n/translations/bg.json+++ b/packages/admin/src/i18n/translations/bg.json@@ -3369,16 +3369,6 @@"value": "Стойност"}},- "notifications": {- "domain": "Известия",- "emptyState": {- "title": "Няма известия",- "description": "В момента нямате известия, но когато получите такива, ще се покажат тук."- },- "accessibility": {- "description": "Известия за дейности в Mercur ще се показват тук."- }- },"errors": {"serverError": "Сървърна грешка - Опитайте отново по-късно.","invalidCredentials": "Невалиден имейл или парола"diff --git a/packages/admin/src/i18n/translations/bs.json b/packages/admin/src/i18n/translations/bs.jsonindex b631c8eea..c38c48042 100644--- a/packages/admin/src/i18n/translations/bs.json+++ b/packages/admin/src/i18n/translations/bs.json@@ -3367,16 +3367,6 @@"value": "Vrijednost"}},- "notifications": {- "domain": "Obavijesti",- "emptyState": {- "title": "Nema obavijesti",- "description": "Nemate obavijesti u ovom trenutku, ali kada ih budete imali, bit će ovdje."- },- "accessibility": {- "description": "Obavijesti o Mercur aktivnostima bit će ovdje prikazane."- }- },"errors": {"serverError": "Greška na serveru - Pokušajte ponovo kasnije.","invalidCredentials": "Pogrešan email ili lozinka"diff --git a/packages/admin/src/i18n/translations/cs.json b/packages/admin/src/i18n/translations/cs.jsonindex 3169730b6..f93d0c727 100644--- a/packages/admin/src/i18n/translations/cs.json+++ b/packages/admin/src/i18n/translations/cs.json@@ -3365,16 +3365,6 @@"value": "Hodnota"}},- "notifications": {- "domain": "Oznámení",- "emptyState": {- "title": "Žádná oznámení",- "description": "Momentálně nemáte žádná oznámení, ale jakmile nějaká budete mít, budou zde."- },- "accessibility": {- "description": "oznámení o aktivitách Medusy budou zde uvedena."- }- },"errors": {"serverError": "Chyba serveru - Zkuste to později.","invalidCredentials": "Špatný e-mail nebo heslo"diff --git a/packages/admin/src/i18n/translations/de.json b/packages/admin/src/i18n/translations/de.jsonindex bbcee3597..00bff9a47 100644--- a/packages/admin/src/i18n/translations/de.json+++ b/packages/admin/src/i18n/translations/de.json@@ -3370,16 +3370,6 @@"value": "Wert"}},- "notifications": {- "domain": "Benachrichtigungen",- "emptyState": {- "title": "Keine Benachrichtigungen",- "description": "Sie haben im Moment keine Benachrichtigungen, aber sobald Sie dies tun, werden sie hier angezeigt."- },- "accessibility": {- "description": "Benachrichtigungen über Mercur-Aktivitäten werden hier aufgelistet."- }- },"errors": {"serverError": "Serverfehler – Versuchen Sie es später noch einmal.","invalidCredentials": "Falsche E-Mail oder Passwort"diff --git a/packages/admin/src/i18n/translations/el.json b/packages/admin/src/i18n/translations/el.jsonindex 87e5d5c0d..adfa2a7b3 100644--- a/packages/admin/src/i18n/translations/el.json+++ b/packages/admin/src/i18n/translations/el.json@@ -3369,16 +3369,6 @@"value": "Τιμή"}},- "notifications": {- "domain": "Ειδοποιήσεις",- "emptyState": {- "title": "Δεν υπάρχουν ειδοποιήσεις",- "description": "Δεν έχετε ειδοποιήσεις αυτήν τη στιγμή, αλλά μόλις τις έχετε, θα εμφανίζονται εδώ."- },- "accessibility": {- "description": "Οι ειδοποιήσεις σχετικά με τις δραστηριότητες της Mercur θα εμφανίζονται εδώ."- }- },"errors": {"serverError": "Σφάλμα διακομιστή - Δοκιμάστε ξανά αργότερα.","invalidCredentials": "Λάθος email ή κωδικός πρόσβασης"diff --git a/packages/admin/src/i18n/translations/en.json b/packages/admin/src/i18n/translations/en.jsonindex 91610a103..59eee0eb3 100644--- a/packages/admin/src/i18n/translations/en.json+++ b/packages/admin/src/i18n/translations/en.json@@ -3766,16 +3766,6 @@"value": "Value"}},- "notifications": {- "domain": "Notifications",- "emptyState": {- "title": "No notifications",- "description": "You don't have any notifications at the moment, but once you do they will live here."- },- "accessibility": {- "description": "Notifications about Mercur activities will be listed here."- }- },"errors": {"serverError": "Server error - Try again later.","invalidCredentials": "Wrong email or password"diff --git a/packages/admin/src/i18n/translations/es.json b/packages/admin/src/i18n/translations/es.jsonindex 2b0c5cfa8..99f74fa3b 100644--- a/packages/admin/src/i18n/translations/es.json+++ b/packages/admin/src/i18n/translations/es.json@@ -3385,16 +3385,6 @@"value": "Valor"}},- "notifications": {- "domain": "Notificaciones",- "emptyState": {- "title": "Sin notificaciones",- "description": "No tienes notificaciones por el momento, pero una vez las tengas aparecerán aquí."- },- "accessibility": {- "description": "Las notificaciones sobre las actividades de Mercur se mostrarán aquí."- }- },"errors": {"serverError": "Error de servidor - Intenta nuevamente más tarde.","invalidCredentials": "Correo electrónico o contraseña incorrectos"diff --git a/packages/admin/src/i18n/translations/fa.json b/packages/admin/src/i18n/translations/fa.jsonindex e4f7d23c5..ba5ef3091 100644--- a/packages/admin/src/i18n/translations/fa.json+++ b/packages/admin/src/i18n/translations/fa.json@@ -3369,16 +3369,6 @@"value": "مقدار"}},- "notifications": {- "domain": "اعلانها",- "emptyState": {- "title": "هیچ اعلانی وجود ندارد",- "description": "در حال حاضر هیچ اعلانی ندارید، اما به محض داشتن، آنها در اینجا نمایش داده میشوند."- },- "accessibility": {- "description": "اعلانهای مربوط به فعالیتهای مدوسا در اینجا فهرست میشوند."- }- },"errors": {"serverError": "خطای سرور - بعداً دوباره تلاش کنید.","invalidCredentials": "ایمیل یا رمز عبور اشتباه است"diff --git a/packages/admin/src/i18n/translations/fr.json b/packages/admin/src/i18n/translations/fr.jsonindex fb0a39f75..0f8e124c1 100644--- a/packages/admin/src/i18n/translations/fr.json+++ b/packages/admin/src/i18n/translations/fr.json@@ -3370,16 +3370,6 @@"value": "Valeur"}},- "notifications": {- "domain": "Notifications",- "emptyState": {- "title": "Aucune notification",- "description": "Vous n'avez aucune notification pour le moment, mais elles apparaîtront ici une fois que vous les aurez."- },- "accessibility": {- "description": "Les notifications concernant les activités Mercur seront listées ici."- }- },"errors": {"serverError": "Erreur serveur - Réessayez plus tard.","invalidCredentials": "Mauvais email ou mot de passe"diff --git a/packages/admin/src/i18n/translations/he.json b/packages/admin/src/i18n/translations/he.jsonindex 5658e13d0..185e69d95 100644--- a/packages/admin/src/i18n/translations/he.json+++ b/packages/admin/src/i18n/translations/he.json@@ -3365,16 +3365,6 @@"value": "ערך"}},- "notifications": {- "domain": "התראות",- "emptyState": {- "title": "אין התראות",- "description": "אין לך התראות כרגע, אך ברגע שיהיו לך הן יופיעו כאן."- },- "accessibility": {- "description": "התראות על פעילויות Mercur יוצגו כאן."- }- },"errors": {"serverError": "שגיאת שרת - נסה שוב מאוחר יותר.","invalidCredentials": "אימייל או סיסמה שגויים"diff --git a/packages/admin/src/i18n/translations/hu.json b/packages/admin/src/i18n/translations/hu.jsonindex 29800c991..b9cad6b39 100644--- a/packages/admin/src/i18n/translations/hu.json+++ b/packages/admin/src/i18n/translations/hu.json@@ -3368,16 +3368,6 @@"value": "Érték"}},- "notifications": {- "domain": "Értesítések",- "emptyState": {- "title": "Nincsenek értesítések",- "description": "Jelenleg nincsenek értesítései, de amint lesznek, itt fognak megjelenni."- },- "accessibility": {- "description": "értesítések a Mercur tevékenységeiről itt lesznek felsorolva."- }- },"errors": {"serverError": "Szerver hiba - Próbálja újra később.","invalidCredentials": "Helytelen email vagy jelszó"diff --git a/packages/admin/src/i18n/translations/id.json b/packages/admin/src/i18n/translations/id.jsonindex 29c6661b2..48d7cb709 100644--- a/packages/admin/src/i18n/translations/id.json+++ b/packages/admin/src/i18n/translations/id.json@@ -3365,16 +3365,6 @@"value": "Nilai"}},- "notifications": {- "domain": "Notifikasi",- "emptyState": {- "title": "Tidak ada notifikasi",- "description": "Anda belum memiliki notifikasi saat ini, tetapi setelah ada, akan muncul di sini."- },- "accessibility": {- "description": "Notifikasi tentang aktivitas Mercur akan dicantumkan di sini."- }- },"errors": {"serverError": "Kesalahan server - Coba lagi nanti.","invalidCredentials": "Email atau kata sandi salah"diff --git a/packages/admin/src/i18n/translations/it.json b/packages/admin/src/i18n/translations/it.jsonindex 5af1c3755..658b66cf5 100644--- a/packages/admin/src/i18n/translations/it.json+++ b/packages/admin/src/i18n/translations/it.json@@ -3370,16 +3370,6 @@"value": "Valore"}},- "notifications": {- "domain": "Notifiche",- "emptyState": {- "title": "Nessuna notifica",- "description": "Non hai notifiche al momento, ma una volta che ne avrai, saranno qui."- },- "accessibility": {- "description": "Le notifiche sulle attività di Mercur saranno elencate qui."- }- },"errors": {"serverError": "Errore del server - Riprova più tardi.","invalidCredentials": "Email o password errati"diff --git a/packages/admin/src/i18n/translations/ja.json b/packages/admin/src/i18n/translations/ja.jsonindex 6257f9ce3..39b582262 100644--- a/packages/admin/src/i18n/translations/ja.json+++ b/packages/admin/src/i18n/translations/ja.json@@ -3370,16 +3370,6 @@"value": "値"}},- "notifications": {- "domain": "通知",- "emptyState": {- "title": "通知はありません",- "description": "現在通知はありませんが、通知が届くとここに表示されます。"- },- "accessibility": {- "description": "Mercurの活動に関する通知がここに表示されます。"- }- },"errors": {"serverError": "サーバーエラー - 後でもう一度お試しください。","invalidCredentials": "Eメールまたはパスワードが間違っています"diff --git a/packages/admin/src/i18n/translations/ko.json b/packages/admin/src/i18n/translations/ko.jsonindex 4f9bc45f6..50af83851 100644--- a/packages/admin/src/i18n/translations/ko.json+++ b/packages/admin/src/i18n/translations/ko.json@@ -3365,16 +3365,6 @@"value": "값"}},- "notifications": {- "domain": "알림",- "emptyState": {- "title": "알림 없음",- "description": "현재 알림이 없습니다. 알림이 생기면 여기에 표시됩니다."- },- "accessibility": {- "description": "Mercur 활동에 대한 알림이 여기에 나열됩니다."- }- },"errors": {"serverError": "서버 오류 - 나중에 다시 시도하세요.","invalidCredentials": "이메일 또는 비밀번호가 잘못되었습니다"diff --git a/packages/admin/src/i18n/translations/lt.json b/packages/admin/src/i18n/translations/lt.jsonindex 450c21225..accdd935a 100644--- a/packages/admin/src/i18n/translations/lt.json+++ b/packages/admin/src/i18n/translations/lt.json@@ -3369,16 +3369,6 @@"value": "Reikšmė"}},- "notifications": {- "domain": "Pranešimai",- "emptyState": {- "title": "Pranešimų nėra",- "description": "Šiuo metu neturite jokių pranešimų, bet kai tik gausite, jie bus čia."- },- "accessibility": {- "description": "Čia bus pateikti pranešimai apie Mercur veiklą"- }- },"errors": {"serverError": "Serverio klaida - bandykite dar kartą vėliau.","invalidCredentials": "Klaidingas el. pašto adresas arba slaptažodis"diff --git a/packages/admin/src/i18n/translations/mk.json b/packages/admin/src/i18n/translations/mk.jsonindex cd790bd0a..b2872139f 100644--- a/packages/admin/src/i18n/translations/mk.json+++ b/packages/admin/src/i18n/translations/mk.json@@ -3369,16 +3369,6 @@"value": "Вредност"}},- "notifications": {- "domain": "Известувања",- "emptyState": {- "title": "Нема известувања",- "description": "Немате никакви известувања во моментот, но штом ќе ги направите тие ќе живеат овде."- },- "accessibility": {- "description": "известувањата за активностите на Медуза ќе бидат наведени овде."- }- },"errors": {"serverError": "Грешка на серверот - Обидете се повторно подоцна.","invalidCredentials": "Погрешна е-пошта или лозинка"diff --git a/packages/admin/src/i18n/translations/mn.json b/packages/admin/src/i18n/translations/mn.jsonindex 433602309..bd47f5fdd 100644--- a/packages/admin/src/i18n/translations/mn.json+++ b/packages/admin/src/i18n/translations/mn.json@@ -3369,16 +3369,6 @@"value": "Утга"}},- "notifications": {- "domain": "Мэдэгдлүүд",- "emptyState": {- "title": "Мэдэгдэл байхгүй",- "description": "Одоогоор танд мэдэгдэл алга байна, гэхдээ мэдэгдэл гарвал энд харагдана."- },- "accessibility": {- "description": "Mercur үйл ажиллагааны талаархи мэдэгдлүүд энд жагсаагдана."- }- },"errors": {"serverError": "Серверийн алдаа - Дараа нь дахин оролдоно уу.","invalidCredentials": "Буруу имэйл эсвэл нууц үг"diff --git a/packages/admin/src/i18n/translations/nl.json b/packages/admin/src/i18n/translations/nl.jsonindex c99103f5d..81db99ec1 100644--- a/packages/admin/src/i18n/translations/nl.json+++ b/packages/admin/src/i18n/translations/nl.json@@ -3368,16 +3368,6 @@"value": "Waarde"}},- "notifications": {- "domain": "Notificaties",- "emptyState": {- "title": "Geen notificaties",- "description": "U heeft momenteel geen notificaties, maar zodra u die heeft, verschijnen ze hier."- },- "accessibility": {- "description": "Notificaties over Mercur-activiteiten worden hier vermeld."- }- },"errors": {"serverError": "Serverfout - Probeer het later opnieuw.","invalidCredentials": "Onjuiste e-mail of wachtwoord"diff --git a/packages/admin/src/i18n/translations/pl.json b/packages/admin/src/i18n/translations/pl.jsonindex eededef75..ebf244ec6 100644--- a/packages/admin/src/i18n/translations/pl.json+++ b/packages/admin/src/i18n/translations/pl.json@@ -3608,16 +3608,6 @@"value": "Wartość"}},- "notifications": {- "domain": "Powiadomienia",- "emptyState": {- "title": "Brak powiadomień",- "description": "W tej chwili nie masz żadnych powiadomień, ale gdy to zrobisz, będą one tutaj wyświetlane."- },- "accessibility": {- "description": "powiadomienia o działaniach Meduzy będą tutaj wymienione."- }- },"errors": {"serverError": "Błąd serwera — spróbuj ponownie później.","invalidCredentials": "Zły adres e-mail lub hasło"diff --git a/packages/admin/src/i18n/translations/ptBR.json b/packages/admin/src/i18n/translations/ptBR.jsonindex a48c5c0aa..9a69012e7 100644--- a/packages/admin/src/i18n/translations/ptBR.json+++ b/packages/admin/src/i18n/translations/ptBR.json@@ -3370,16 +3370,6 @@"value": "Valor"}},- "notifications": {- "domain": "Notificações",- "emptyState": {- "title": "Sem notificações",- "description": "Você não tem nenhuma notificação no momento, mas quando tiver, elas aparecerão aqui."- },- "accessibility": {- "description": "Notificações sobre atividades do Mercur serão listadas aqui."- }- },"errors": {"serverError": "Erro no servidor - Tente novamente mais tarde.","invalidCredentials": "Email ou senha incorretos"diff --git a/packages/admin/src/i18n/translations/ro.json b/packages/admin/src/i18n/translations/ro.jsonindex 4b0b3744d..29ee6a64b 100644--- a/packages/admin/src/i18n/translations/ro.json+++ b/packages/admin/src/i18n/translations/ro.json@@ -3369,16 +3369,6 @@"value": "Valoare"}},- "notifications": {- "domain": "Notificări",- "emptyState": {- "title": "Fără notificări",- "description": "Nu aveți notificări momentan, dar odată ce o faceți vor locui aici."- },- "accessibility": {- "description": "notificările despre activitățile Mercur vor fi listate aici."- }- },"errors": {"serverError": "Eroare de server - Încercați din nou mai târziu.","invalidCredentials": "E-mail sau parolă greșită"diff --git a/packages/admin/src/i18n/translations/ru.json b/packages/admin/src/i18n/translations/ru.jsonindex 8476a4fbd..371faaddb 100644--- a/packages/admin/src/i18n/translations/ru.json+++ b/packages/admin/src/i18n/translations/ru.json@@ -3369,16 +3369,6 @@"value": "Значение"}},- "notifications": {- "domain": "Уведомления",- "emptyState": {- "title": "Нет уведомлений",- "description": "У вас пока нет уведомлений, но когда они появятся, они будут отображаться здесь."- },- "accessibility": {- "description": "здесь будут перечислены уведомления о действиях Mercur."- }- },"errors": {"serverError": "Ошибка сервера — попробуйте позже.","invalidCredentials": "Неверный email или пароль"diff --git a/packages/admin/src/i18n/translations/th.json b/packages/admin/src/i18n/translations/th.jsonindex 613abe78c..84978b34e 100644--- a/packages/admin/src/i18n/translations/th.json+++ b/packages/admin/src/i18n/translations/th.json@@ -3370,16 +3370,6 @@"value": "ค่า"}},- "notifications": {- "domain": "การแจ้งเตือน",- "emptyState": {- "title": "ไม่มีการแจ้งเตือน",- "description": "คุณยังไม่มีการแจ้งเตือนในขณะนี้ แต่เมื่อมีจะแสดงที่นี่"- },- "accessibility": {- "description": "การแจ้งเตือนเกี่ยวกับกิจกรรมใน Mercur จะปรากฏที่นี่"- }- },"errors": {"serverError": "ข้อผิดพลาดของเซิร์ฟเวอร์ - โปรดลองอีกครั้งในภายหลัง","invalidCredentials": "อีเมลหรือรหัสผ่านไม่ถูกต้อง"diff --git a/packages/admin/src/i18n/translations/tr.json b/packages/admin/src/i18n/translations/tr.jsonindex 34dbd02a3..65715ce30 100644--- a/packages/admin/src/i18n/translations/tr.json+++ b/packages/admin/src/i18n/translations/tr.json@@ -3369,16 +3369,6 @@"value": "Değer"}},- "notifications": {- "domain": "Bildirimler",- "emptyState": {- "title": "Bildirim yok",- "description": "Şu anda herhangi bir bildiriminiz yok, ancak olduğunda burada görünecekler."- },- "accessibility": {- "description": "Mercur aktiviteleri hakkında bildirimler burada listelenecek."- }- },"errors": {"serverError": "Sunucu hatası - Daha sonra tekrar deneyin.","invalidCredentials": "Yanlış e-posta veya şifre"diff --git a/packages/admin/src/i18n/translations/uk.json b/packages/admin/src/i18n/translations/uk.jsonindex 48ba8b341..3bea35395 100644--- a/packages/admin/src/i18n/translations/uk.json+++ b/packages/admin/src/i18n/translations/uk.json@@ -3370,16 +3370,6 @@"value": "Значення"}},- "notifications": {- "domain": "Сповіщення",- "emptyState": {- "title": "Немає сповіщень",- "description": "У вас наразі немає сповіщень, але коли вони з'являться, вони будуть відображені тут."- },- "accessibility": {- "description": "Сповіщення про активність Mercur будуть відображатися тут."- }- },"errors": {"serverError": "Помилка сервера - Спробуйте ще раз пізніше.","invalidCredentials": "Невірний email або пароль"diff --git a/packages/admin/src/i18n/translations/vi.json b/packages/admin/src/i18n/translations/vi.jsonindex de1f19f17..802c554e5 100644--- a/packages/admin/src/i18n/translations/vi.json+++ b/packages/admin/src/i18n/translations/vi.json@@ -3365,16 +3365,6 @@"value": "Giá trị"}},- "notifications": {- "domain": "Thông báo",- "emptyState": {- "title": "Không có thông báo",- "description": "Hiện tại bạn không có thông báo nào, nhưng khi có, chúng sẽ xuất hiện ở đây."- },- "accessibility": {- "description": "Thông báo về các hoạt động của Mercur sẽ được liệt kê ở đây."- }- },"errors": {"serverError": "Lỗi máy chủ - Thử lại sau.","invalidCredentials": "Email hoặc mật khẩu sai"diff --git a/packages/admin/src/i18n/translations/zhCN.json b/packages/admin/src/i18n/translations/zhCN.jsonindex 0ca5414c3..eb352b1aa 100644--- a/packages/admin/src/i18n/translations/zhCN.json+++ b/packages/admin/src/i18n/translations/zhCN.json@@ -3365,16 +3365,6 @@"value": "值"}},- "notifications": {- "domain": "通知",- "emptyState": {- "title": "无通知",- "description": "您目前没有任何通知,但一旦有通知它们将显示在这里。"- },- "accessibility": {- "description": "关于 Mercur 活动的通知将在此处列出。"- }- },"errors": {"serverError": "服务器错误 - 请稍后重试。","invalidCredentials": "电子邮件或密码错误"diff --git a/packages/admin/src/index.ts b/packages/admin/src/index.tsindex 2d661e8c8..448d92b19 100644--- a/packages/admin/src/index.ts+++ b/packages/admin/src/index.ts@@ -17,7 +17,6 @@ export { useDataTable } from './hooks/use-data-table'// Page layout componentsexport { SingleColumnPage } from './components/layout/pages/single-column-page'export { ActionMenu } from './components/common/action-menu'-export { Notifications } from './components/layout/notifications/notifications'// Product constantsexport { PRODUCT_DETAIL_FIELDS, PRODUCT_DETAIL_QUERY } from './pages/products/constants'diff --git a/packages/registry/registry.json b/packages/registry/registry.jsonindex f062eefd9..45e3b5145 100644--- a/packages/registry/registry.json+++ b/packages/registry/registry.json@@ -164,10 +164,10 @@},{"name": "vendor-notifications",- "description": "Vendor notification feed with bell icon in navbar and vendor API endpoint.",+ "description": "Vendor notification feed with a topbar bell widget and vendor API endpoint.","dependencies": [],"registryDependencies": [],- "docs": "## Vendor Notifications\n\nThis block adds vendor notifications: a bell icon in the navbar and a `GET /vendor/notifications` API endpoint.\n\n### 1. Notification Provider\n\nAdd the `seller_feed` channel to the local notification provider in `medusa-config.ts`:\n\n```ts\n{\n resolve: '@medusajs/medusa/notification',\n options: {\n providers: [\n {\n resolve: '@medusajs/medusa/notification-local',\n id: 'local',\n options: {\n channels: ['feed', 'seller_feed']\n }\n }\n ]\n }\n}\n```\n\n### 2. Middleware Setup\n\nImport `vendorNotificationMiddlewares` and add it to your `src/api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorNotificationMiddlewares } from \"./vendor/notifications/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n // ...your existing middlewares,\n ...vendorNotificationMiddlewares,\n ],\n});\n```\n\n### 3. TopbarActions Component\n\nRegister the `TopbarActions` component in your vendor app's `vite.config.ts`:\n\n```ts\nimport { mercurDashboardPlugin } from '@mercurjs/dashboard-sdk'\n\nexport default defineConfig({\n plugins: [\n react(),\n mercurDashboardPlugin({\n medusaConfigPath: '../../packages/api/medusa-config.ts',\n components: {\n TopbarActions: './components/topbar-actions',\n },\n }),\n ],\n})\n```\n\n### 4. Sending Notifications\n\nCreate a subscriber to send notifications to sellers. Example (`src/subscribers/seller-product-notification.ts`):\n\n```ts\nimport type { SubscriberArgs, SubscriberConfig } from \"@medusajs/framework\"\nimport { ContainerRegistrationKeys, Modules } from \"@medusajs/framework/utils\"\n\nexport default async function handler({\n event: { data },\n container,\n}: SubscriberArgs<{ id: string }>) {\n const query = container.resolve(ContainerRegistrationKeys.QUERY)\n const notificationService = container.resolve(Modules.NOTIFICATION)\n\n // Example: look up the seller linked to a product\n const { data: [product] } = await query.graph({\n entity: \"product\",\n fields: [\"id\", \"title\", \"seller.*\"],\n filters: { id: data.id },\n })\n\n if (!product?.seller?.id) return\n\n await notificationService.createNotifications({\n to: product.seller.id,\n channel: \"seller_feed\",\n template: \"product-created\",\n data: {\n title: \"Product created\",\n description: `Your product \\\"${product.title}\\\" has been created.`,\n },\n })\n}\n\nexport const config: SubscriberConfig = {\n event: \"product.created\",\n}\n```\n\n### 5. Run codegen\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```",+ "docs": "## Vendor Notifications\n\nThis block adds vendor notifications: a bell widget in the topbar and a `GET /vendor/notifications` API endpoint.\n\n### 1. Notification Provider\n\nAdd the `seller_feed` channel to the local notification provider in `medusa-config.ts`:\n\n```ts\n{\n resolve: '@medusajs/medusa/notification',\n options: {\n providers: [\n {\n resolve: '@medusajs/medusa/notification-local',\n id: 'local',\n options: {\n channels: ['feed', 'seller_feed']\n }\n }\n ]\n }\n}\n```\n\n### 2. Middleware Setup\n\nImport `vendorNotificationMiddlewares` and add it to your `src/api/middlewares.ts`:\n\n```ts\nimport { defineMiddlewares } from \"@medusajs/medusa\";\nimport { vendorNotificationMiddlewares } from \"./vendor/notifications/middlewares\";\n\nexport default defineMiddlewares({\n routes: [\n // ...your existing middlewares,\n ...vendorNotificationMiddlewares,\n ],\n});\n```\n\n### 3. Topbar bell\n\nThe bell ships as a vendor widget at `widgets/notifications.tsx` targeting the `topbar.after` zone. It registers itself, so there is nothing to wire up.\n\n### 4. Sending Notifications\n\nCreate a subscriber to send notifications to sellers. Example (`src/subscribers/seller-product-notification.ts`):\n\n```ts\nimport type { SubscriberArgs, SubscriberConfig } from \"@medusajs/framework\"\nimport { ContainerRegistrationKeys, Modules } from \"@medusajs/framework/utils\"\n\nexport default async function handler({\n event: { data },\n container,\n}: SubscriberArgs<{ id: string }>) {\n const query = container.resolve(ContainerRegistrationKeys.QUERY)\n const notificationService = container.resolve(Modules.NOTIFICATION)\n\n // Example: look up the seller linked to a product\n const { data: [product] } = await query.graph({\n entity: \"product\",\n fields: [\"id\", \"title\", \"seller.*\"],\n filters: { id: data.id },\n })\n\n if (!product?.seller?.id) return\n\n await notificationService.createNotifications({\n to: product.seller.id,\n channel: \"seller_feed\",\n template: \"product-created\",\n data: {\n title: \"Product created\",\n description: `Your product \\\"${product.title}\\\" has been created.`,\n },\n })\n}\n\nexport const config: SubscriberConfig = {\n event: \"product.created\",\n}\n```\n\n### 5. Run codegen\n\n```bash\nnpx @mercurjs/cli@latest codegen\n```","files": [{"path": "vendor-notifications/api/middlewares.ts",@@ -190,11 +190,7 @@"type": "registry:api"},{- "path": "vendor-notifications/api/vendor/notifications/helpers.ts",- "type": "registry:api"- },- {- "path": "vendor-notifications/vendor/components/topbar-actions.tsx",+ "path": "vendor-notifications/vendor/widgets/notifications.tsx","type": "registry:vendor"}],diff --git a/packages/registry/src/vendor-notifications/__tests__/vendor-notifications-route.unit.spec.ts b/packages/registry/src/vendor-notifications/__tests__/vendor-notifications-route.unit.spec.tsnew file mode 100644index 000000000..016428d49--- /dev/null+++ b/packages/registry/src/vendor-notifications/__tests__/vendor-notifications-route.unit.spec.ts@@ -0,0 +1,59 @@+import { ContainerRegistrationKeys } from "@medusajs/framework/utils"+import { GET } from "../api/vendor/notifications/route"++type RouteRequest = Parameters<typeof GET>[0]+type RouteResponse = Parameters<typeof GET>[1]++function setup() {+ const graph = jest.fn().mockResolvedValue({+ data: [{ id: "noti_1" }],+ metadata: { count: 1, skip: 0, take: 50 },+ })++ const req = {+ auth_context: { actor_id: "mem_1", actor_type: "seller" },+ seller_context: { seller_id: "sel_1" },+ scope: {+ resolve: jest.fn((key: string) =>+ key === ContainerRegistrationKeys.QUERY ? { graph } : undefined+ ),+ },+ queryConfig: {+ fields: ["id", "data", "created_at"],+ pagination: { skip: 0, take: 50 },+ },+ } as unknown as RouteRequest++ const json = jest.fn()+ const res = { json } as unknown as RouteResponse++ return { req, res, graph, json }+}++describe("GET /vendor/notifications", () => {+ it("scopes the feed to the current seller, not the member actor", async () => {+ const { req, res, graph } = setup()++ await GET(req, res)++ expect(graph).toHaveBeenCalledWith(+ expect.objectContaining({+ entity: "notification",+ filters: { channel: "seller_feed", to: "sel_1" },+ })+ )+ })++ it("returns the paginated list", async () => {+ const { req, res, json } = setup()++ await GET(req, res)++ expect(json).toHaveBeenCalledWith({+ notifications: [{ id: "noti_1" }],+ count: 1,+ offset: 0,+ limit: 50,+ })+ })+})diff --git a/packages/registry/src/vendor-notifications/api/vendor/notifications/helpers.ts b/packages/registry/src/vendor-notifications/api/vendor/notifications/helpers.tsdeleted file mode 100644index 68901dc1d..000000000--- a/packages/registry/src/vendor-notifications/api/vendor/notifications/helpers.ts+++ /dev/null@@ -1,20 +0,0 @@-import { ContainerRegistrationKeys } from "@medusajs/framework/utils"-import { MedusaContainer } from "@medusajs/framework/types"--export const fetchSellerByAuthActorId = async (- authActorId: string,- scope: MedusaContainer,- fields: string[] = ["id"]-) => {- const query = scope.resolve(ContainerRegistrationKeys.QUERY)-- const {- data: [seller],- } = await query.graph({- entity: "seller",- filters: { id: authActorId },- fields,- })-- return seller-}diff --git a/packages/registry/src/vendor-notifications/api/vendor/notifications/route.ts b/packages/registry/src/vendor-notifications/api/vendor/notifications/route.tsindex 3c8cc7fea..b5c676cc1 100644--- a/packages/registry/src/vendor-notifications/api/vendor/notifications/route.ts+++ b/packages/registry/src/vendor-notifications/api/vendor/notifications/route.ts@@ -1,21 +1,20 @@import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework"import { ContainerRegistrationKeys } from "@medusajs/framework/utils"-import { fetchSellerByAuthActorId } from "./helpers"++type VendorRequest = AuthenticatedMedusaRequest & {+ seller_context?: { seller_id: string }+}export async function GET(- req: AuthenticatedMedusaRequest,+ req: VendorRequest,res: MedusaResponse): Promise<void> {const query = req.scope.resolve(ContainerRegistrationKeys.QUERY)- const seller = await fetchSellerByAuthActorId(- req.auth_context.actor_id,- req.scope- )const { data: notifications, metadata } = await query.graph({entity: "notification",fields: req.queryConfig.fields,- filters: { channel: "seller_feed", to: seller.id },+ filters: { channel: "seller_feed", to: req.seller_context!.seller_id },pagination: req.queryConfig.pagination,})diff --git a/packages/registry/src/vendor-notifications/vendor/components/topbar-actions.tsx b/packages/registry/src/vendor-notifications/vendor/components/topbar-actions.tsxdeleted file mode 100644index 1ecf2a684..000000000--- a/packages/registry/src/vendor-notifications/vendor/components/topbar-actions.tsx+++ /dev/null@@ -1,5 +0,0 @@-import { Notifications } from "@mercurjs/vendor"--export default function TopbarActions() {- return <Notifications />-}diff --git a/packages/registry/src/vendor-notifications/vendor/widgets/notifications.tsx b/packages/registry/src/vendor-notifications/vendor/widgets/notifications.tsxnew file mode 100644index 000000000..55b678694--- /dev/null+++ b/packages/registry/src/vendor-notifications/vendor/widgets/notifications.tsx@@ -0,0 +1,269 @@+import {+ BellAlert,+ BellAlertDone,+ InformationCircleSolid,+} from "@medusajs/icons"+import { clx, Drawer, Heading, IconButton, Text } from "@medusajs/ui"+import { useQuery } from "@tanstack/react-query"+import { useEffect, useState } from "react"+import { defineWidgetConfig } from "@mercurjs/dashboard-sdk"+import {+ FilePreview,+ InfiniteList,+ queryKeysFactory,+ useDate,+} from "@mercurjs/dashboard-shared"++declare const __BACKEND_URL__: string++type NotificationData = {+ title: string+ description?: string+ file?: {+ filename?: string+ url?: string+ mimeType?: string+ }+}++type VendorNotification = {+ id: string+ created_at: string+ data: NotificationData | null+}++type VendorNotificationListResponse = {+ notifications: VendorNotification[]+ count: number+ offset: number+ limit: number+}++type VendorNotificationListParams = {+ offset?: number+ limit?: number+ fields?: string+}++const LAST_READ_NOTIFICATION_KEY = "notificationsLastReadAt"++const notificationQueryKeys = queryKeysFactory("vendor_notifications")++const fetchNotifications = async (+ params: VendorNotificationListParams+): Promise<VendorNotificationListResponse> => {+ const search = new URLSearchParams()+ for (const [key, value] of Object.entries(params)) {+ if (value !== undefined) search.set(key, String(value))+ }++ const response = await fetch(+ `${__BACKEND_URL__}/vendor/notifications?${search.toString()}`,+ { credentials: "include" }+ )++ if (!response.ok) {+ throw new Error(`Failed to load notifications (${response.status})`)+ }++ return response.json()+}++const Notifications = () => {+ const [open, setOpen] = useState(false)+ const [hasUnread, setHasUnread] = useUnreadNotifications()+ // Lags behind localStorage so rows stay marked unread while the drawer is open+ const [lastReadAt, setLastReadAt] = useState(+ localStorage.getItem(LAST_READ_NOTIFICATION_KEY)+ )++ useEffect(() => {+ const onKeyDown = (e: KeyboardEvent) => {+ if (e.key === "n" && (e.metaKey || e.ctrlKey)) {+ setOpen((prev) => !prev)+ }+ }++ document.addEventListener("keydown", onKeyDown)++ return () => {+ document.removeEventListener("keydown", onKeyDown)+ }+ }, [])++ const handleOnOpen = (shouldOpen: boolean) => {+ if (shouldOpen) {+ setHasUnread(false)+ setOpen(true)+ localStorage.setItem(LAST_READ_NOTIFICATION_KEY, new Date().toISOString())+ } else {+ setOpen(false)+ setLastReadAt(localStorage.getItem(LAST_READ_NOTIFICATION_KEY))+ }+ }++ return (+ <Drawer open={open} onOpenChange={handleOnOpen}>+ <Drawer.Trigger asChild>+ <IconButton+ variant="transparent"+ size="small"+ className="text-ui-fg-muted hover:text-ui-fg-subtle"+ data-testid="vendor-notifications-trigger"+ >+ {hasUnread ? <BellAlertDone /> : <BellAlert />}+ </IconButton>+ </Drawer.Trigger>+ <Drawer.Content data-testid="vendor-notifications-drawer">+ <Drawer.Header>+ <Drawer.Title asChild>+ <Heading>Notifications</Heading>+ </Drawer.Title>+ <Drawer.Description className="sr-only">+ Notifications about your store will be listed here.+ </Drawer.Description>+ </Drawer.Header>+ <Drawer.Body className="overflow-y-auto px-0">+ <InfiniteList<+ VendorNotificationListResponse,+ VendorNotification,+ VendorNotificationListParams+ >+ responseKey="notifications"+ queryKey={notificationQueryKeys.all}+ queryFn={fetchNotifications}+ queryOptions={{ enabled: open }}+ renderEmpty={() => <NotificationsEmptyState />}+ renderItem={(notification) => (+ <Notification+ key={notification.id}+ notification={notification}+ unread={+ Date.parse(notification.created_at) >+ (lastReadAt ? Date.parse(lastReadAt) : 0)+ }+ />+ )}+ />+ </Drawer.Body>+ </Drawer.Content>+ </Drawer>+ )+}++const Notification = ({+ notification,+ unread,+}: {+ notification: VendorNotification+ unread?: boolean+}) => {+ const { getRelativeDate } = useDate()+ const data = notification.data++ if (!data?.title) {+ return null+ }++ return (+ <div className="relative flex items-start justify-center gap-3 border-b p-6">+ <div className="text-ui-fg-muted flex size-5 items-center justify-center">+ <InformationCircleSolid />+ </div>+ <div className="flex w-full flex-col gap-y-3">+ <div className="flex flex-col">+ <div className="flex items-center justify-between">+ <Text size="small" leading="compact" weight="plus">+ {data.title}+ </Text>+ <div className="align-center flex items-center justify-center gap-2">+ <Text+ as="span"+ className={clx("text-ui-fg-subtle", {+ "text-ui-fg-base": unread,+ })}+ size="small"+ leading="compact"+ weight="plus"+ >+ {getRelativeDate(notification.created_at)}+ </Text>+ {unread && (+ <div+ className="bg-ui-bg-interactive h-2 w-2 rounded"+ // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role+ role="status"+ />+ )}+ </div>+ </div>+ {!!data.description && (+ <Text+ className="text-ui-fg-subtle whitespace-pre-line"+ size="small"+ >+ {data.description}+ </Text>+ )}+ </div>+ {!!data.file?.url && (+ <FilePreview+ filename={data.file.filename ?? ""}+ url={data.file.url}+ hideThumbnail+ />+ )}+ </div>+ </div>+ )+}++const NotificationsEmptyState = () => {+ return (+ <div className="flex h-full flex-col items-center justify-center">+ <BellAlertDone />+ <Text size="small" leading="compact" weight="plus" className="mt-3">+ No notifications+ </Text>+ <Text+ size="small"+ className="text-ui-fg-muted mt-1 max-w-[294px] text-center"+ >+ You don't have any notifications at the moment, but once you do they+ will live here.+ </Text>+ </div>+ )+}++const useUnreadNotifications = () => {+ const [hasUnread, setHasUnread] = useState(false)+ const { data } = useQuery({+ queryKey: notificationQueryKeys.list({ limit: 1 }),+ queryFn: () =>+ fetchNotifications({ limit: 1, offset: 0, fields: "created_at" }),+ refetchInterval: 60_000,+ })+ const lastNotification = data?.notifications[0]++ useEffect(() => {+ if (!lastNotification) {+ return+ }++ const lastReadDatetime = localStorage.getItem(LAST_READ_NOTIFICATION_KEY)+ const lastReadAsTimestamp = lastReadDatetime+ ? Date.parse(lastReadDatetime)+ : 0++ if (Date.parse(lastNotification.created_at) > lastReadAsTimestamp) {+ setHasUnread(true)+ }+ }, [lastNotification])++ return [hasUnread, setHasUnread] as const+}++export const config = defineWidgetConfig({ zone: "topbar.after" })++export default Notificationsdiff --git a/packages/vendor/src/__tests__/extension-targets.spec.ts b/packages/vendor/src/__tests__/extension-targets.spec.tsnew file mode 100644index 000000000..4db7dfec9--- /dev/null+++ b/packages/vendor/src/__tests__/extension-targets.spec.ts@@ -0,0 +1,17 @@+import fs from "fs"+import path from "path"+import { describe, expect, test } from "vitest"++const targets = fs.readFileSync(+ path.join(__dirname, "..", "extension-targets.d.ts"),+ "utf-8"+)++describe("extension targets", () => {+ test.each(["topbar.before", "topbar.after"])(+ "registers the %s widget zone",+ (zone) => {+ expect(targets).toContain(`"${zone}": true`)+ }+ )+})diff --git a/packages/vendor/src/components/layout/notifications/index.ts b/packages/vendor/src/components/layout/notifications/index.tsdeleted file mode 100644index 350984636..000000000--- a/packages/vendor/src/components/layout/notifications/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from "./notifications"diff --git a/packages/vendor/src/components/layout/notifications/notifications.tsx b/packages/vendor/src/components/layout/notifications/notifications.tsxdeleted file mode 100644index ed6305c30..000000000--- a/packages/vendor/src/components/layout/notifications/notifications.tsx+++ /dev/null@@ -1,233 +0,0 @@-import {- BellAlert,- BellAlertDone,- InformationCircleSolid,-} from "@medusajs/icons"-import { HttpTypes } from "@medusajs/types"-import { clx, Drawer, Heading, IconButton, Text } from "@medusajs/ui"-import { formatDistance } from "date-fns"-import { TFunction } from "i18next"-import { useEffect, useState } from "react"-import { useTranslation } from "react-i18next"-import { notificationQueryKeys, useNotifications } from "../../../hooks/api"-import { fetchQuery } from "../../../lib/client"-import { FilePreview } from "../../common/file-preview"-import { InfiniteList } from "../../common/infinite-list"--interface NotificationData {- title: string- description?: string- file?: {- filename?: string- url?: string- mimeType?: string- }-}--const LAST_READ_NOTIFICATION_KEY = "notificationsLastReadAt"--export const Notifications = () => {- const { t } = useTranslation()- const [open, setOpen] = useState(false)- const [hasUnread, setHasUnread] = useUnreadNotifications()- // This is used to show the unread icon on the notification when the drawer is open,- // so it should lag behind the local storage data and should only be reset on close- const [lastReadAt, setLastReadAt] = useState(- localStorage.getItem(LAST_READ_NOTIFICATION_KEY)- )-- useEffect(() => {- const onKeyDown = (e: KeyboardEvent) => {- if (e.key === "n" && (e.metaKey || e.ctrlKey)) {- setOpen((prev) => !prev)- }- }-- document.addEventListener("keydown", onKeyDown)-- return () => {- document.removeEventListener("keydown", onKeyDown)- }- }, [])-- const handleOnOpen = (shouldOpen: boolean) => {- if (shouldOpen) {- setHasUnread(false)- setOpen(true)- localStorage.setItem(LAST_READ_NOTIFICATION_KEY, new Date().toISOString())- } else {- setOpen(false)- setLastReadAt(localStorage.getItem(LAST_READ_NOTIFICATION_KEY))- }- }-- return (- <Drawer open={open} onOpenChange={handleOnOpen}>- <Drawer.Trigger asChild>- <IconButton- variant="transparent"- size="small"- className="text-ui-fg-muted hover:text-ui-fg-subtle"- >- {hasUnread ? <BellAlertDone /> : <BellAlert />}- </IconButton>- </Drawer.Trigger>- <Drawer.Content>- <Drawer.Header>- <Drawer.Title asChild>- <Heading>{t("notifications.domain")}</Heading>- </Drawer.Title>- <Drawer.Description className="sr-only">- {t("notifications.accessibility.description")}- </Drawer.Description>- </Drawer.Header>- <Drawer.Body className="overflow-y-auto px-0">- <InfiniteList<- HttpTypes.AdminNotificationListResponse,- HttpTypes.AdminNotification,- HttpTypes.AdminNotificationListParams- >- responseKey="notifications"- queryKey={notificationQueryKeys.all}- queryFn={(params: any) =>- fetchQuery(`/vendor/notifications`, {- method: "GET",- query: { ...params },- })- }- queryOptions={{ enabled: open }}- renderEmpty={() => <NotificationsEmptyState t={t} />}- renderItem={(notification) => {- return (- <Notification- key={notification.id}- notification={notification}- unread={- Date.parse(notification.created_at) >- (lastReadAt ? Date.parse(lastReadAt) : 0)- }- />- )- }}- />- </Drawer.Body>- </Drawer.Content>- </Drawer>- )-}--const Notification = ({- notification,- unread,-}: {- notification: HttpTypes.AdminNotification- unread?: boolean-}) => {- const data = notification.data as unknown as NotificationData | undefined-- // We need at least the title to render a notification in the feed- if (!data?.title) {- return null- }-- return (- <>- <div className="relative flex items-start justify-center gap-3 border-b p-6">- <div className="text-ui-fg-muted flex size-5 items-center justify-center">- <InformationCircleSolid />- </div>- <div className="flex w-full flex-col gap-y-3">- <div className="flex flex-col">- <div className="flex items-center justify-between">- <Text size="small" leading="compact" weight="plus">- {data.title}- </Text>- <div className="align-center flex items-center justify-center gap-2">- <Text- as={"span"}- className={clx("text-ui-fg-subtle", {- "text-ui-fg-base": unread,- })}- size="small"- leading="compact"- weight="plus"- >- {formatDistance(notification.created_at, new Date(), {- addSuffix: true,- })}- </Text>- {unread && (- <div- className="bg-ui-bg-interactive h-2 w-2 rounded"- // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role- role="status"- />- )}- </div>- </div>- {!!data.description && (- <Text- className="text-ui-fg-subtle whitespace-pre-line"- size="small"- >- {data.description}- </Text>- )}- </div>- {!!data?.file?.url && (- <FilePreview- filename={data.file.filename ?? ""}- url={data.file.url}- hideThumbnail- />- )}- </div>- </div>- </>- )-}--const NotificationsEmptyState = ({ t }: { t: TFunction }) => {- return (- <div className="flex h-full flex-col items-center justify-center">- <BellAlertDone />- <Text size="small" leading="compact" weight="plus" className="mt-3">- {t("notifications.emptyState.title")}- </Text>- <Text- size="small"- className="text-ui-fg-muted mt-1 max-w-[294px] text-center"- >- {t("notifications.emptyState.description")}- </Text>- </div>- )-}--const useUnreadNotifications = () => {- const [hasUnread, setHasUnread] = useState(false)- const { notifications } = useNotifications(- { limit: 1, offset: 0, fields: "created_at" },- { refetchInterval: 60_000 }- )- const lastNotification = notifications?.[0]-- useEffect(() => {- if (!lastNotification) {- return- }-- const lastNotificationAsTimestamp = Date.parse(lastNotification.created_at)-- const lastReadDatetime = localStorage.getItem(LAST_READ_NOTIFICATION_KEY)- const lastReadAsTimestamp = lastReadDatetime- ? Date.parse(lastReadDatetime)- : 0-- if (lastNotificationAsTimestamp > lastReadAsTimestamp) {- setHasUnread(true)- }- }, [lastNotification])-- return [hasUnread, setHasUnread] as const-}diff --git a/packages/vendor/src/components/layout/shell/shell.tsx b/packages/vendor/src/components/layout/shell/shell.tsxindex 880667d3e..0a8eed247 100644--- a/packages/vendor/src/components/layout/shell/shell.tsx+++ b/packages/vendor/src/components/layout/shell/shell.tsx@@ -202,7 +202,9 @@ const Topbar = () => {<ToggleSidebar /><Breadcrumbs /></div>- <div className="flex items-center justify-end gap-x-3" />+ <div className="flex items-center justify-end gap-x-3">+ <WidgetZone id="topbar" />+ </div></div>)}diff --git a/packages/vendor/src/extension-targets.d.ts b/packages/vendor/src/extension-targets.d.tsindex d02c054a6..8d1af75ba 100644--- a/packages/vendor/src/extension-targets.d.ts+++ b/packages/vendor/src/extension-targets.d.ts@@ -128,6 +128,8 @@ declare module "@mercurjs/dashboard-sdk" {"tax-regions.province.detail.main.before": true"team.list.after": true"team.list.before": true+ "topbar.after": true+ "topbar.before": true}interface NavItemRegistry {diff --git a/packages/vendor/src/hooks/api/index.ts b/packages/vendor/src/hooks/api/index.tsindex 012fb73ce..79b1f9795 100644--- a/packages/vendor/src/hooks/api/index.ts+++ b/packages/vendor/src/hooks/api/index.ts@@ -11,7 +11,6 @@ export * from "./fulfillment-providers"export * from "./fulfillment-sets"export * from "./inventory"export * from "./invites"-export * from "./notification"export * from "./offers"export * from "./orders"export * from "./payments"diff --git a/packages/vendor/src/hooks/api/notification.tsx b/packages/vendor/src/hooks/api/notification.tsxdeleted file mode 100644index c55b86aa6..000000000--- a/packages/vendor/src/hooks/api/notification.tsx+++ /dev/null@@ -1,42 +0,0 @@-import { UseQueryOptions, useQuery } from "@tanstack/react-query";--import { fetchQuery } from "../../lib/client";-import { queryKeysFactory } from "../../lib/query-key-factory";--const NOTIFICATION_QUERY_KEY = "notification" as const;-export const notificationQueryKeys = queryKeysFactory(NOTIFICATION_QUERY_KEY);--export const useNotification = (- id: string,- query?: Record<string, any>,- options?: Omit<UseQueryOptions<any, Error, any>, "queryKey" | "queryFn">-) => {- const { data, ...rest } = useQuery({- queryKey: notificationQueryKeys.detail(id),- queryFn: async () =>- fetchQuery(`/vendor/notifications/${id}`, {- method: "GET",- query,- }),- ...options,- });-- return { ...data, ...rest };-};--export const useNotifications = (- query?: Record<string, any>,- options?: Omit<UseQueryOptions<any, Error, any>, "queryKey" | "queryFn">-) => {- const { data, ...rest } = useQuery({- queryFn: () =>- fetchQuery(`/vendor/notifications`, {- method: "GET",- query,- }),- queryKey: notificationQueryKeys.list(query),- ...options,- });-- return { ...data, ...rest };-};diff --git a/packages/vendor/src/i18n/translations/$schema.json b/packages/vendor/src/i18n/translations/$schema.jsonindex 14a89c016..a725521aa 100644--- a/packages/vendor/src/i18n/translations/$schema.json+++ b/packages/vendor/src/i18n/translations/$schema.json@@ -16090,48 +16090,6 @@],"additionalProperties": false},- "notifications": {- "type": "object",- "properties": {- "domain": {- "type": "string"- },- "emptyState": {- "type": "object",- "properties": {- "title": {- "type": "string"- },- "description": {- "type": "string"- }- },- "required": [- "title",- "description"- ],- "additionalProperties": false- },- "accessibility": {- "type": "object",- "properties": {- "description": {- "type": "string"- }- },- "required": [- "description"- ],- "additionalProperties": false- }- },- "required": [- "domain",- "emptyState",- "accessibility"- ],- "additionalProperties": false- },"errors": {"type": "object","properties": {@@ -17884,7 +17842,6 @@"shippingOptionTypes","productTypes","productTags",- "notifications","errors","statuses","labels",diff --git a/packages/vendor/src/i18n/translations/ar.json b/packages/vendor/src/i18n/translations/ar.jsonindex 49eb63449..a77bbde19 100644--- a/packages/vendor/src/i18n/translations/ar.json+++ b/packages/vendor/src/i18n/translations/ar.json@@ -3475,16 +3475,6 @@"value": "القيمة"}},- "notifications": {- "domain": "الإشعارات",- "emptyState": {- "title": "لا توجد إشعارات",- "description": "ليس لديك أي إشعارات في الوقت الحالي، ولكن بمجرد أن تحصل عليها ستظهر هنا."- },- "accessibility": {- "description": "سيتم سرد الإشعارات حول أنشطة مدوسا هنا."- }- },"errors": {"serverError": "خطأ في الخادم - حاول مرة أخرى لاحقًا.","invalidCredentials": "البريد الإلكتروني أو كلمة المرور غير صحيحة"diff --git a/packages/vendor/src/i18n/translations/bg.json b/packages/vendor/src/i18n/translations/bg.jsonindex 27cb9a685..6049b7b13 100644--- a/packages/vendor/src/i18n/translations/bg.json+++ b/packages/vendor/src/i18n/translations/bg.json@@ -3475,16 +3475,6 @@"value": "Стойност"}},- "notifications": {- "domain": "Известия",- "emptyState": {- "title": "Няма известия",- "description": "В момента нямате известия, но когато получите такива, ще се покажат тук."- },- "accessibility": {- "description": "Известия за дейности в Mercur ще се показват тук."- }- },"errors": {"serverError": "Сървърна грешка - Опитайте отново по-късно.","invalidCredentials": "Невалиден имейл или парола"diff --git a/packages/vendor/src/i18n/translations/bs.json b/packages/vendor/src/i18n/translations/bs.jsonindex 9ff1e6f64..7e19b80e0 100644--- a/packages/vendor/src/i18n/translations/bs.json+++ b/packages/vendor/src/i18n/translations/bs.json@@ -3473,16 +3473,6 @@"value": "Vrijednost"}},- "notifications": {- "domain": "Obavijesti",- "emptyState": {- "title": "Nema obavijesti",- "description": "Nemate obavijesti u ovom trenutku, ali kada ih budete imali, bit će ovdje."- },- "accessibility": {- "description": "Obavijesti o Mercur aktivnostima bit će ovdje prikazane."- }- },"errors": {"serverError": "Greška na serveru - Pokušajte ponovo kasnije.","invalidCredentials": "Pogrešan email ili lozinka"diff --git a/packages/vendor/src/i18n/translations/cs.json b/packages/vendor/src/i18n/translations/cs.jsonindex 8711004ec..2b07e0d9d 100644--- a/packages/vendor/src/i18n/translations/cs.json+++ b/packages/vendor/src/i18n/translations/cs.json@@ -3471,16 +3471,6 @@"value": "Hodnota"}},- "notifications": {- "domain": "Oznámení",- "emptyState": {- "title": "Žádná oznámení",- "description": "Momentálně nemáte žádná oznámení, ale jakmile nějaká budete mít, budou zde."- },- "accessibility": {- "description": "oznámení o aktivitách Medusy budou zde uvedena."- }- },"errors": {"serverError": "Chyba serveru - Zkuste to později.","invalidCredentials": "Špatný e-mail nebo heslo"diff --git a/packages/vendor/src/i18n/translations/de.json b/packages/vendor/src/i18n/translations/de.jsonindex 5d85f132e..38ab64f22 100644--- a/packages/vendor/src/i18n/translations/de.json+++ b/packages/vendor/src/i18n/translations/de.json@@ -3476,16 +3476,6 @@"value": "Wert"}},- "notifications": {- "domain": "Benachrichtigungen",- "emptyState": {- "title": "Keine Benachrichtigungen",- "description": "Sie haben im Moment keine Benachrichtigungen, aber sobald Sie dies tun, werden sie hier angezeigt."- },- "accessibility": {- "description": "Benachrichtigungen über Mercur-Aktivitäten werden hier aufgelistet."- }- },"errors": {"serverError": "Serverfehler – Versuchen Sie es später noch einmal.","invalidCredentials": "Falsche E-Mail oder Passwort"diff --git a/packages/vendor/src/i18n/translations/el.json b/packages/vendor/src/i18n/translations/el.jsonindex 8a4218d9f..690e97cb1 100644--- a/packages/vendor/src/i18n/translations/el.json+++ b/packages/vendor/src/i18n/translations/el.json@@ -3475,16 +3475,6 @@"value": "Τιμή"}},- "notifications": {- "domain": "Ειδοποιήσεις",- "emptyState": {- "title": "Δεν υπάρχουν ειδοποιήσεις",- "description": "Δεν έχετε ειδοποιήσεις αυτήν τη στιγμή, αλλά μόλις τις έχετε, θα εμφανίζονται εδώ."- },- "accessibility": {- "description": "Οι ειδοποιήσεις σχετικά με τις δραστηριότητες της Mercur θα εμφανίζονται εδώ."- }- },"errors": {"serverError": "Σφάλμα διακομιστή - Δοκιμάστε ξανά αργότερα.","invalidCredentials": "Λάθος email ή κωδικός πρόσβασης"diff --git a/packages/vendor/src/i18n/translations/en.json b/packages/vendor/src/i18n/translations/en.jsonindex 836f4ada9..fdf18b1f5 100644--- a/packages/vendor/src/i18n/translations/en.json+++ b/packages/vendor/src/i18n/translations/en.json@@ -4034,16 +4034,6 @@"value": "Value"}},- "notifications": {- "domain": "Notifications",- "emptyState": {- "title": "No notifications",- "description": "You don't have any notifications at the moment, but once you do they will live here."- },- "accessibility": {- "description": "Notifications about Mercur activities will be listed here."- }- },"errors": {"serverError": "Server error - Try again later.","invalidCredentials": "Wrong email or password"diff --git a/packages/vendor/src/i18n/translations/es.json b/packages/vendor/src/i18n/translations/es.jsonindex c2f21de11..fdef7e302 100644--- a/packages/vendor/src/i18n/translations/es.json+++ b/packages/vendor/src/i18n/translations/es.json@@ -3534,16 +3534,6 @@"value": "Valor"}},- "notifications": {- "domain": "Notificaciones",- "emptyState": {- "title": "Sin notificaciones",- "description": "No tienes notificaciones por el momento, pero una vez las tengas aparecerán aquí."- },- "accessibility": {- "description": "Las notificaciones sobre las actividades de Mercur se mostrarán aquí."- }- },"errors": {"serverError": "Error de servidor - Intenta nuevamente más tarde.","invalidCredentials": "Correo electrónico o contraseña incorrectos"diff --git a/packages/vendor/src/i18n/translations/fa.json b/packages/vendor/src/i18n/translations/fa.jsonindex eb087c55a..ad5b27cdd 100644--- a/packages/vendor/src/i18n/translations/fa.json+++ b/packages/vendor/src/i18n/translations/fa.json@@ -3475,16 +3475,6 @@"value": "مقدار"}},- "notifications": {- "domain": "اعلانها",- "emptyState": {- "title": "هیچ اعلانی وجود ندارد",- "description": "در حال حاضر هیچ اعلانی ندارید، اما به محض داشتن، آنها در اینجا نمایش داده میشوند."- },- "accessibility": {- "description": "اعلانهای مربوط به فعالیتهای مدوسا در اینجا فهرست میشوند."- }- },"errors": {"serverError": "خطای سرور - بعداً دوباره تلاش کنید.","invalidCredentials": "ایمیل یا رمز عبور اشتباه است"diff --git a/packages/vendor/src/i18n/translations/fr.json b/packages/vendor/src/i18n/translations/fr.jsonindex 2bad4438d..075f62022 100644--- a/packages/vendor/src/i18n/translations/fr.json+++ b/packages/vendor/src/i18n/translations/fr.json@@ -3476,16 +3476,6 @@"value": "Valeur"}},- "notifications": {- "domain": "Notifications",- "emptyState": {- "title": "Aucune notification",- "description": "Vous n'avez aucune notification pour le moment, mais elles apparaîtront ici une fois que vous les aurez."- },- "accessibility": {- "description": "Les notifications concernant les activités Mercur seront listées ici."- }- },"errors": {"serverError": "Erreur serveur - Réessayez plus tard.","invalidCredentials": "Mauvais email ou mot de passe"diff --git a/packages/vendor/src/i18n/translations/he.json b/packages/vendor/src/i18n/translations/he.jsonindex 5fca54249..d51b7368e 100644--- a/packages/vendor/src/i18n/translations/he.json+++ b/packages/vendor/src/i18n/translations/he.json@@ -3471,16 +3471,6 @@"value": "ערך"}},- "notifications": {- "domain": "התראות",- "emptyState": {- "title": "אין התראות",- "description": "אין לך התראות כרגע, אך ברגע שיהיו לך הן יופיעו כאן."- },- "accessibility": {- "description": "התראות על פעילויות Mercur יוצגו כאן."- }- },"errors": {"serverError": "שגיאת שרת - נסה שוב מאוחר יותר.","invalidCredentials": "אימייל או סיסמה שגויים"diff --git a/packages/vendor/src/i18n/translations/hu.json b/packages/vendor/src/i18n/translations/hu.jsonindex b7dfde4e3..3465d43fb 100644--- a/packages/vendor/src/i18n/translations/hu.json+++ b/packages/vendor/src/i18n/translations/hu.json@@ -3474,16 +3474,6 @@"value": "Érték"}},- "notifications": {- "domain": "Értesítések",- "emptyState": {- "title": "Nincsenek értesítések",- "description": "Jelenleg nincsenek értesítései, de amint lesznek, itt fognak megjelenni."- },- "accessibility": {- "description": "értesítések a Mercur tevékenységeiről itt lesznek felsorolva."- }- },"errors": {"serverError": "Szerver hiba - Próbálja újra később.","invalidCredentials": "Helytelen email vagy jelszó"diff --git a/packages/vendor/src/i18n/translations/id.json b/packages/vendor/src/i18n/translations/id.jsonindex 81fed5ada..33d3c37c4 100644--- a/packages/vendor/src/i18n/translations/id.json+++ b/packages/vendor/src/i18n/translations/id.json@@ -3471,16 +3471,6 @@"value": "Nilai"}},- "notifications": {- "domain": "Notifikasi",- "emptyState": {- "title": "Tidak ada notifikasi",- "description": "Anda belum memiliki notifikasi saat ini, tetapi setelah ada, akan muncul di sini."- },- "accessibility": {- "description": "Notifikasi tentang aktivitas Mercur akan dicantumkan di sini."- }- },"errors": {"serverError": "Kesalahan server - Coba lagi nanti.","invalidCredentials": "Email atau kata sandi salah"diff --git a/packages/vendor/src/i18n/translations/it.json b/packages/vendor/src/i18n/translations/it.jsonindex 3ca114331..1e81c8f99 100644--- a/packages/vendor/src/i18n/translations/it.json+++ b/packages/vendor/src/i18n/translations/it.json@@ -3476,16 +3476,6 @@"value": "Valore"}},- "notifications": {- "domain": "Notifiche",- "emptyState": {- "title": "Nessuna notifica",- "description": "Non hai notifiche al momento, ma una volta che ne avrai, saranno qui."- },- "accessibility": {- "description": "Le notifiche sulle attività di Mercur saranno elencate qui."- }- },"errors": {"serverError": "Errore del server - Riprova più tardi.","invalidCredentials": "Email o password errati"diff --git a/packages/vendor/src/i18n/translations/ja.json b/packages/vendor/src/i18n/translations/ja.jsonindex c305d616a..4e95b1094 100644--- a/packages/vendor/src/i18n/translations/ja.json+++ b/packages/vendor/src/i18n/translations/ja.json@@ -3476,16 +3476,6 @@"value": "値"}},- "notifications": {- "domain": "通知",- "emptyState": {- "title": "通知はありません",- "description": "現在通知はありませんが、通知が届くとここに表示されます。"- },- "accessibility": {- "description": "Mercurの活動に関する通知がここに表示されます。"- }- },"errors": {"serverError": "サーバーエラー - 後でもう一度お試しください。","invalidCredentials": "Eメールまたはパスワードが間違っています"diff --git a/packages/vendor/src/i18n/translations/ko.json b/packages/vendor/src/i18n/translations/ko.jsonindex 41e05f23f..722be46e9 100644--- a/packages/vendor/src/i18n/translations/ko.json+++ b/packages/vendor/src/i18n/translations/ko.json@@ -3471,16 +3471,6 @@"value": "값"}},- "notifications": {- "domain": "알림",- "emptyState": {- "title": "알림 없음",- "description": "현재 알림이 없습니다. 알림이 생기면 여기에 표시됩니다."- },- "accessibility": {- "description": "Mercur 활동에 대한 알림이 여기에 나열됩니다."- }- },"errors": {"serverError": "서버 오류 - 나중에 다시 시도하세요.","invalidCredentials": "이메일 또는 비밀번호가 잘못되었습니다"diff --git a/packages/vendor/src/i18n/translations/lt.json b/packages/vendor/src/i18n/translations/lt.jsonindex 84ae3c1d5..fd0f53d14 100644--- a/packages/vendor/src/i18n/translations/lt.json+++ b/packages/vendor/src/i18n/translations/lt.json@@ -3475,16 +3475,6 @@"value": "Reikšmė"}},- "notifications": {- "domain": "Pranešimai",- "emptyState": {- "title": "Pranešimų nėra",- "description": "Šiuo metu neturite jokių pranešimų, bet kai tik gausite, jie bus čia."- },- "accessibility": {- "description": "Čia bus pateikti pranešimai apie Mercur veiklą"- }- },"errors": {"serverError": "Serverio klaida - bandykite dar kartą vėliau.","invalidCredentials": "Klaidingas el. pašto adresas arba slaptažodis"diff --git a/packages/vendor/src/i18n/translations/mk.json b/packages/vendor/src/i18n/translations/mk.jsonindex 86978de22..90e252326 100644--- a/packages/vendor/src/i18n/translations/mk.json+++ b/packages/vendor/src/i18n/translations/mk.json@@ -3475,16 +3475,6 @@"value": "Вредност"}},- "notifications": {- "domain": "Известувања",- "emptyState": {- "title": "Нема известувања",- "description": "Немате никакви известувања во моментот, но штом ќе ги направите тие ќе живеат овде."- },- "accessibility": {- "description": "известувањата за активностите на Медуза ќе бидат наведени овде."- }- },"errors": {"serverError": "Грешка на серверот - Обидете се повторно подоцна.","invalidCredentials": "Погрешна е-пошта или лозинка"diff --git a/packages/vendor/src/i18n/translations/mn.json b/packages/vendor/src/i18n/translations/mn.jsonindex af32373d1..f54f691a9 100644--- a/packages/vendor/src/i18n/translations/mn.json+++ b/packages/vendor/src/i18n/translations/mn.json@@ -3475,16 +3475,6 @@"value": "Утга"}},- "notifications": {- "domain": "Мэдэгдлүүд",- "emptyState": {- "title": "Мэдэгдэл байхгүй",- "description": "Одоогоор танд мэдэгдэл алга байна, гэхдээ мэдэгдэл гарвал энд харагдана."- },- "accessibility": {- "description": "Mercur үйл ажиллагааны талаархи мэдэгдлүүд энд жагсаагдана."- }- },"errors": {"serverError": "Серверийн алдаа - Дараа нь дахин оролдоно уу.","invalidCredentials": "Буруу имэйл эсвэл нууц үг"diff --git a/packages/vendor/src/i18n/translations/nl.json b/packages/vendor/src/i18n/translations/nl.jsonindex d731ec497..0874f2be8 100644--- a/packages/vendor/src/i18n/translations/nl.json+++ b/packages/vendor/src/i18n/translations/nl.json@@ -3474,16 +3474,6 @@"value": "Waarde"}},- "notifications": {- "domain": "Notificaties",- "emptyState": {- "title": "Geen notificaties",- "description": "U heeft momenteel geen notificaties, maar zodra u die heeft, verschijnen ze hier."- },- "accessibility": {- "description": "Notificaties over Mercur-activiteiten worden hier vermeld."- }- },"errors": {"serverError": "Serverfout - Probeer het later opnieuw.","invalidCredentials": "Onjuiste e-mail of wachtwoord"diff --git a/packages/vendor/src/i18n/translations/pl.json b/packages/vendor/src/i18n/translations/pl.jsonindex e30742817..ced03be71 100644--- a/packages/vendor/src/i18n/translations/pl.json+++ b/packages/vendor/src/i18n/translations/pl.json@@ -3897,16 +3897,6 @@"value": "Wartość"}},- "notifications": {- "domain": "Powiadomienia",- "emptyState": {- "title": "Brak powiadomień",- "description": "W tej chwili nie masz żadnych powiadomień, ale gdy to zrobisz, będą one tutaj wyświetlane."- },- "accessibility": {- "description": "powiadomienia o działaniach Meduzy będą tutaj wymienione."- }- },"errors": {"serverError": "Błąd serwera — spróbuj ponownie później.","invalidCredentials": "Zły adres e-mail lub hasło"diff --git a/packages/vendor/src/i18n/translations/ptBR.json b/packages/vendor/src/i18n/translations/ptBR.jsonindex 3bad3f05d..31103ffb9 100644--- a/packages/vendor/src/i18n/translations/ptBR.json+++ b/packages/vendor/src/i18n/translations/ptBR.json@@ -3476,16 +3476,6 @@"value": "Valor"}},- "notifications": {- "domain": "Notificações",- "emptyState": {- "title": "Sem notificações",- "description": "Você não tem nenhuma notificação no momento, mas quando tiver, elas aparecerão aqui."- },- "accessibility": {- "description": "Notificações sobre atividades do Mercur serão listadas aqui."- }- },"errors": {"serverError": "Erro no servidor - Tente novamente mais tarde.","invalidCredentials": "Email ou senha incorretos"diff --git a/packages/vendor/src/i18n/translations/ptPT.json b/packages/vendor/src/i18n/translations/ptPT.jsonindex d799d1374..cd6b17c76 100644--- a/packages/vendor/src/i18n/translations/ptPT.json+++ b/packages/vendor/src/i18n/translations/ptPT.json@@ -3528,16 +3528,6 @@"value": "Valor"}},- "notifications": {- "domain": "Notificações",- "emptyState": {- "title": "Sem notificações",- "description": "De momento não tens notificações, mas quando tiveres vão aparecer aqui."- },- "accessibility": {- "description": "Notificações sobre atividades do Mercur serão listadas aqui."- }- },"errors": {"serverError": "Erro do servidor - Tenta novamente mais tarde.","invalidCredentials": "Email ou palavra-passe incorretos"diff --git a/packages/vendor/src/i18n/translations/ro.json b/packages/vendor/src/i18n/translations/ro.jsonindex 1f1f9e1df..3a22853db 100644--- a/packages/vendor/src/i18n/translations/ro.json+++ b/packages/vendor/src/i18n/translations/ro.json@@ -3475,16 +3475,6 @@"value": "Valoare"}},- "notifications": {- "domain": "Notificări",- "emptyState": {- "title": "Fără notificări",- "description": "Nu aveți notificări momentan, dar odată ce o faceți vor locui aici."- },- "accessibility": {- "description": "notificările despre activitățile Mercur vor fi listate aici."- }- },"errors": {"serverError": "Eroare de server - Încercați din nou mai târziu.","invalidCredentials": "E-mail sau parolă greșită"diff --git a/packages/vendor/src/i18n/translations/ru.json b/packages/vendor/src/i18n/translations/ru.jsonindex 973afc5c1..fab081bd9 100644--- a/packages/vendor/src/i18n/translations/ru.json+++ b/packages/vendor/src/i18n/translations/ru.json@@ -3475,16 +3475,6 @@"value": "Значение"}},- "notifications": {- "domain": "Уведомления",- "emptyState": {- "title": "Нет уведомлений",- "description": "У вас пока нет уведомлений, но когда они появятся, они будут отображаться здесь."- },- "accessibility": {- "description": "здесь будут перечислены уведомления о действиях Mercur."- }- },"errors": {"serverError": "Ошибка сервера — попробуйте позже.","invalidCredentials": "Неверный email или пароль"diff --git a/packages/vendor/src/i18n/translations/th.json b/packages/vendor/src/i18n/translations/th.jsonindex b6f4ecae7..d20b0020a 100644--- a/packages/vendor/src/i18n/translations/th.json+++ b/packages/vendor/src/i18n/translations/th.json@@ -3476,16 +3476,6 @@"value": "ค่า"}},- "notifications": {- "domain": "การแจ้งเตือน",- "emptyState": {- "title": "ไม่มีการแจ้งเตือน",- "description": "คุณยังไม่มีการแจ้งเตือนในขณะนี้ แต่เมื่อมีจะแสดงที่นี่"- },- "accessibility": {- "description": "การแจ้งเตือนเกี่ยวกับกิจกรรมใน Mercur จะปรากฏที่นี่"- }- },"errors": {"serverError": "ข้อผิดพลาดของเซิร์ฟเวอร์ - โปรดลองอีกครั้งในภายหลัง","invalidCredentials": "อีเมลหรือรหัสผ่านไม่ถูกต้อง"diff --git a/packages/vendor/src/i18n/translations/tr.json b/packages/vendor/src/i18n/translations/tr.jsonindex 05030a16e..de1dfd898 100644--- a/packages/vendor/src/i18n/translations/tr.json+++ b/packages/vendor/src/i18n/translations/tr.json@@ -3475,16 +3475,6 @@"value": "Değer"}},- "notifications": {- "domain": "Bildirimler",- "emptyState": {- "title": "Bildirim yok",- "description": "Şu anda herhangi bir bildiriminiz yok, ancak olduğunda burada görünecekler."- },- "accessibility": {- "description": "Mercur aktiviteleri hakkında bildirimler burada listelenecek."- }- },"errors": {"serverError": "Sunucu hatası - Daha sonra tekrar deneyin.","invalidCredentials": "Yanlış e-posta veya şifre"diff --git a/packages/vendor/src/i18n/translations/uk.json b/packages/vendor/src/i18n/translations/uk.jsonindex 61b54764b..03c31ea64 100644--- a/packages/vendor/src/i18n/translations/uk.json+++ b/packages/vendor/src/i18n/translations/uk.json@@ -3476,16 +3476,6 @@"value": "Значення"}},- "notifications": {- "domain": "Сповіщення",- "emptyState": {- "title": "Немає сповіщень",- "description": "У вас наразі немає сповіщень, але коли вони з'являться, вони будуть відображені тут."- },- "accessibility": {- "description": "Сповіщення про активність Mercur будуть відображатися тут."- }- },"errors": {"serverError": "Помилка сервера - Спробуйте ще раз пізніше.","invalidCredentials": "Невірний email або пароль"diff --git a/packages/vendor/src/i18n/translations/vi.json b/packages/vendor/src/i18n/translations/vi.jsonindex ddffbcd82..b974fac4d 100644--- a/packages/vendor/src/i18n/translations/vi.json+++ b/packages/vendor/src/i18n/translations/vi.json@@ -3471,16 +3471,6 @@"value": "Giá trị"}},- "notifications": {- "domain": "Thông báo",- "emptyState": {- "title": "Không có thông báo",- "description": "Hiện tại bạn không có thông báo nào, nhưng khi có, chúng sẽ xuất hiện ở đây."- },- "accessibility": {- "description": "Thông báo về các hoạt động của Mercur sẽ được liệt kê ở đây."- }- },"errors": {"serverError": "Lỗi máy chủ - Thử lại sau.","invalidCredentials": "Email hoặc mật khẩu sai"diff --git a/packages/vendor/src/i18n/translations/zhCN.json b/packages/vendor/src/i18n/translations/zhCN.jsonindex 91845a06e..56581dbf0 100644--- a/packages/vendor/src/i18n/translations/zhCN.json+++ b/packages/vendor/src/i18n/translations/zhCN.json@@ -3471,16 +3471,6 @@"value": "值"}},- "notifications": {- "domain": "通知",- "emptyState": {- "title": "无通知",- "description": "您目前没有任何通知,但一旦有通知它们将显示在这里。"- },- "accessibility": {- "description": "关于 Mercur 活动的通知将在此处列出。"- }- },"errors": {"serverError": "服务器错误 - 请稍后重试。","invalidCredentials": "电子邮件或密码错误"diff --git a/packages/vendor/src/i18n/translations/zhTW.json b/packages/vendor/src/i18n/translations/zhTW.jsonindex f6f933cf5..42536a4bd 100644--- a/packages/vendor/src/i18n/translations/zhTW.json+++ b/packages/vendor/src/i18n/translations/zhTW.json@@ -3528,16 +3528,6 @@"value": "值"}},- "notifications": {- "domain": "通知",- "emptyState": {- "title": "沒有通知",- "description": "您目前沒有任何通知,但一旦有通知,它們將會顯示在此處。"- },- "accessibility": {- "description": "有關 Mercur 活動的通知將列在此處。"- }- },"errors": {"serverError": "伺服器錯誤 - 請稍後再試。","invalidCredentials": "電子郵件或密碼錯誤"diff --git a/packages/vendor/src/index.ts b/packages/vendor/src/index.tsindex ff66d964a..47eecc1ad 100644--- a/packages/vendor/src/index.ts+++ b/packages/vendor/src/index.ts@@ -5,4 +5,3 @@ export { TabbedForm, useTabbedForm } from './components/tabbed-form'export type { TabDefinition } from './components/tabbed-form'// Layout components-export { Notifications } from './components/layout/notifications/notifications'\ No newline at end of file