@backstage/plugin-notifications 0.5.21-next.2 → 0.6.1-next.0
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/CHANGELOG.md +32 -0
- package/dist/alpha/extensions/unreadNotificationsHomeWidget.esm.js +57 -0
- package/dist/alpha/extensions/unreadNotificationsHomeWidget.esm.js.map +1 -0
- package/dist/alpha.d.ts +17 -0
- package/dist/alpha.esm.js +2 -1
- package/dist/alpha.esm.js.map +1 -1
- package/dist/api/NotificationsApi.esm.js.map +1 -1
- package/dist/api/NotificationsClient.esm.js.map +1 -1
- package/dist/components/NotificationsFilters/NotificationsFilters.esm.js.map +1 -1
- package/dist/components/NotificationsPage/NotificationsPage.esm.js +48 -4
- package/dist/components/NotificationsPage/NotificationsPage.esm.js.map +1 -1
- package/dist/components/NotificationsPage/index.esm.js +1 -1
- package/dist/components/NotificationsSideBarItem/NotificationsSideBarItem.esm.js +1 -1
- package/dist/components/NotificationsSideBarItem/NotificationsSideBarItem.esm.js.map +1 -1
- package/dist/components/NotificationsSideBarItem/NotificationsSideBarItem.module.css.esm.js.map +1 -1
- package/dist/components/NotificationsTable/BulkActions.esm.js.map +1 -1
- package/dist/components/NotificationsTable/DefaultNotificationDescription.esm.js.map +1 -1
- package/dist/components/NotificationsTable/NotificationDescription.esm.js.map +1 -1
- package/dist/components/NotificationsTable/NotificationIcon.esm.js +14 -8
- package/dist/components/NotificationsTable/NotificationIcon.esm.js.map +1 -1
- package/dist/components/NotificationsTable/NotificationsTable.esm.js +76 -41
- package/dist/components/NotificationsTable/NotificationsTable.esm.js.map +1 -1
- package/dist/components/NotificationsTable/NotificationsTable.module.css.esm.js +2 -2
- package/dist/components/NotificationsTable/NotificationsTable.module.css.esm.js.map +1 -1
- package/dist/components/NotificationsTable/SelectAll.esm.js.map +1 -1
- package/dist/components/NotificationsTable/SelectAll.module.css.esm.js.map +1 -1
- package/dist/components/NotificationsTable/SeverityIcon.esm.js.map +1 -1
- package/dist/components/NotificationsTable/SeverityIcon.module.css.esm.js.map +1 -1
- package/dist/components/UnreadNotificationsCard/UnreadNotificationsCard.esm.js +255 -0
- package/dist/components/UnreadNotificationsCard/UnreadNotificationsCard.esm.js.map +1 -0
- package/dist/components/UnreadNotificationsCard/UnreadNotificationsCard.module.css.esm.js +8 -0
- package/dist/components/UnreadNotificationsCard/UnreadNotificationsCard.module.css.esm.js.map +1 -0
- package/dist/components/UnreadNotificationsCard/index.esm.js +7 -0
- package/dist/components/UnreadNotificationsCard/index.esm.js.map +1 -0
- package/dist/components/UserNotificationSettingsCard/NoBorderTableCell.esm.js.map +1 -1
- package/dist/components/UserNotificationSettingsCard/NoBorderTableCell.module.css.esm.js.map +1 -1
- package/dist/components/UserNotificationSettingsCard/NotificationFormatContext.esm.js.map +1 -1
- package/dist/components/UserNotificationSettingsCard/OriginRow.esm.js +3 -3
- package/dist/components/UserNotificationSettingsCard/OriginRow.esm.js.map +1 -1
- package/dist/components/UserNotificationSettingsCard/TopicRow.esm.js +1 -3
- package/dist/components/UserNotificationSettingsCard/TopicRow.esm.js.map +1 -1
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsCard.esm.js +1 -0
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsCard.esm.js.map +1 -1
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsPanel.esm.js.map +1 -1
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsPanel.module.css.esm.js.map +1 -1
- package/dist/hooks/useNotificationsApi.esm.js.map +1 -1
- package/dist/hooks/useNotificationsRefresh.esm.js +24 -0
- package/dist/hooks/useNotificationsRefresh.esm.js.map +1 -0
- package/dist/hooks/useTitleCounter.esm.js.map +1 -1
- package/dist/hooks/useWebNotifications.esm.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.esm.js +1 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -1
- package/dist/plugin.esm.js.map +1 -1
- package/dist/plugins/notifications/package.json.esm.js +2 -1
- package/dist/plugins/notifications/package.json.esm.js.map +1 -1
- package/dist/routes.esm.js.map +1 -1
- package/dist/translation.esm.js +9 -0
- package/dist/translation.esm.js.map +1 -1
- package/dist/utils/notificationLinks.esm.js +11 -0
- package/dist/utils/notificationLinks.esm.js.map +1 -0
- package/dist/utils/plainText.esm.js +30 -0
- package/dist/utils/plainText.esm.js.map +1 -0
- package/package.json +13 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWebNotifications.esm.js","sources":["../../src/hooks/useWebNotifications.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useCallback, useState } from 'react';\nimport { useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport { notificationsApiRef } from '../api';\nimport { rootRouteRef } from '../routes';\n\n/** @internal */\nexport function useWebNotifications(enabled: boolean) {\n const [webNotificationPermission, setWebNotificationPermission] =\n useState('default');\n const notificationsRoute = useRouteRef(rootRouteRef)();\n const notificationsApi = useApi(notificationsApiRef);\n\n const requestUserPermission = useCallback(() => {\n if (\n enabled &&\n 'Notification' in window &&\n webNotificationPermission === 'default'\n ) {\n window.Notification.requestPermission().then(permission => {\n setWebNotificationPermission(permission);\n });\n }\n }, [enabled, webNotificationPermission]);\n\n const sendWebNotification = useCallback(\n (options: {\n id: string;\n title: string;\n description: string;\n link?: string;\n }) => {\n if (webNotificationPermission !== 'granted') {\n return null;\n }\n\n const notification = new Notification(options.title, {\n body: options.description,\n tag: options.id, // Prevent duplicates from multiple tabs\n });\n\n notification.onclick = event => {\n event.preventDefault();\n if (options.link) {\n window.open(options.link, '_blank');\n notificationsApi.updateNotifications({\n ids: [options.id],\n read: true,\n });\n } else {\n window.open(notificationsRoute);\n }\n notification.close();\n };\n\n return notification;\n },\n [webNotificationPermission, notificationsApi, notificationsRoute],\n );\n\n return { sendWebNotification, requestUserPermission };\n}\n"],"names":[],"mappings":";;;;;;AAqBO,SAAS,oBAAoB,OAAA,EAAkB;AACpD,EAAA,MAAM,CAAC,yBAAA,EAA2B,4BAA4B,CAAA,GAC5D,SAAS,SAAS,CAAA;AACpB,EAAA,MAAM,kBAAA,GAAqB,WAAA,CAAY,YAAY,CAAA,EAAE;AACrD,EAAA,MAAM,gBAAA,GAAmB,OAAO,mBAAmB,CAAA;AAEnD,EAAA,MAAM,qBAAA,GAAwB,YAAY,MAAM;AAC9C,IAAA,IACE,OAAA,IACA,cAAA,IAAkB,MAAA,IAClB,yBAAA,KAA8B,SAAA,EAC9B;AACA,MAAA,MAAA,CAAO,YAAA,CAAa,iBAAA,EAAkB,CAAE,IAAA,CAAK,CAAA,UAAA,KAAc;AACzD,QAAA,4BAAA,CAA6B,UAAU,CAAA;AAAA,MACzC,CAAC,CAAA;AAAA,IACH;AAAA,EACF,CAAA,EAAG,CAAC,OAAA,EAAS,yBAAyB,CAAC,CAAA;AAEvC,EAAA,MAAM,mBAAA,GAAsB,WAAA;AAAA,IAC1B,CAAC,OAAA,KAKK;AACJ,MAAA,IAAI,8BAA8B,SAAA,EAAW;AAC3C,QAAA,OAAO,IAAA;AAAA,MACT;AAEA,MAAA,MAAM,YAAA,GAAe,IAAI,YAAA,CAAa,OAAA,CAAQ,KAAA,EAAO;AAAA,QACnD,MAAM,OAAA,CAAQ,WAAA;AAAA,QACd,KAAK,OAAA,CAAQ;AAAA;AAAA,OACd,CAAA;AAED,MAAA,YAAA,CAAa,UAAU,CAAA,KAAA,KAAS;AAC9B,QAAA,KAAA,CAAM,cAAA,EAAe;AACrB,QAAA,IAAI,QAAQ,IAAA,EAAM;AAChB,UAAA,MAAA,CAAO,IAAA,CAAK,OAAA,CAAQ,IAAA,EAAM,QAAQ,CAAA;AAClC,UAAA,gBAAA,CAAiB,mBAAA,CAAoB;AAAA,YACnC,GAAA,EAAK,CAAC,OAAA,CAAQ,EAAE,CAAA;AAAA,YAChB,IAAA,EAAM;AAAA,WACP,CAAA;AAAA,QACH,CAAA,MAAO;AACL,UAAA,MAAA,CAAO,KAAK,kBAAkB,CAAA;AAAA,QAChC;AACA,QAAA,YAAA,CAAa,KAAA,EAAM;AAAA,MACrB,CAAA;AAEA,MAAA,OAAO,YAAA;AAAA,IACT,CAAA;AAAA,IACA,CAAC,yBAAA,EAA2B,gBAAA,EAAkB,kBAAkB;AAAA,GAClE;AAEA,EAAA,OAAO,EAAE,qBAAqB,qBAAA,EAAsB;AACtD
|
|
1
|
+
{"version":3,"file":"useWebNotifications.esm.js","sources":["../../src/hooks/useWebNotifications.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useCallback, useState } from 'react';\nimport { useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport { notificationsApiRef } from '../api';\nimport { rootRouteRef } from '../routes';\n\n/** @internal */\nexport function useWebNotifications(enabled: boolean) {\n const [webNotificationPermission, setWebNotificationPermission] =\n useState('default');\n const notificationsRoute = useRouteRef(rootRouteRef)();\n const notificationsApi = useApi(notificationsApiRef);\n\n const requestUserPermission = useCallback(() => {\n if (\n enabled &&\n 'Notification' in window &&\n webNotificationPermission === 'default'\n ) {\n window.Notification.requestPermission().then(permission => {\n setWebNotificationPermission(permission);\n });\n }\n }, [enabled, webNotificationPermission]);\n\n const sendWebNotification = useCallback(\n (options: {\n id: string;\n title: string;\n description: string;\n link?: string;\n }) => {\n if (webNotificationPermission !== 'granted') {\n return null;\n }\n\n const notification = new Notification(options.title, {\n body: options.description,\n tag: options.id, // Prevent duplicates from multiple tabs\n });\n\n notification.onclick = event => {\n event.preventDefault();\n if (options.link) {\n window.open(options.link, '_blank');\n notificationsApi.updateNotifications({\n ids: [options.id],\n read: true,\n });\n } else {\n window.open(notificationsRoute);\n }\n notification.close();\n };\n\n return notification;\n },\n [webNotificationPermission, notificationsApi, notificationsRoute],\n );\n\n return { sendWebNotification, requestUserPermission };\n}\n"],"names":[],"mappings":";;;;;;AAqBO,SAAS,oBAAoB,OAAA,EAAkB;AACpD,EAAA,MAAM,CAAC,yBAAA,EAA2B,4BAA4B,CAAA,GAC5D,SAAS,SAAS,CAAA;AACpB,EAAA,MAAM,kBAAA,GAAqB,WAAA,CAAY,YAAY,CAAA,EAAE;AACrD,EAAA,MAAM,gBAAA,GAAmB,OAAO,mBAAmB,CAAA;AAEnD,EAAA,MAAM,qBAAA,GAAwB,YAAY,MAAM;AAC9C,IAAA,IACE,OAAA,IACA,cAAA,IAAkB,MAAA,IAClB,yBAAA,KAA8B,SAAA,EAC9B;AACA,MAAA,MAAA,CAAO,YAAA,CAAa,iBAAA,EAAkB,CAAE,IAAA,CAAK,CAAA,UAAA,KAAc;AACzD,QAAA,4BAAA,CAA6B,UAAU,CAAA;AAAA,MACzC,CAAC,CAAA;AAAA,IACH;AAAA,EACF,CAAA,EAAG,CAAC,OAAA,EAAS,yBAAyB,CAAC,CAAA;AAEvC,EAAA,MAAM,mBAAA,GAAsB,WAAA;AAAA,IAC1B,CAAC,OAAA,KAKK;AACJ,MAAA,IAAI,8BAA8B,SAAA,EAAW;AAC3C,QAAA,OAAO,IAAA;AAAA,MACT;AAEA,MAAA,MAAM,YAAA,GAAe,IAAI,YAAA,CAAa,OAAA,CAAQ,KAAA,EAAO;AAAA,QACnD,MAAM,OAAA,CAAQ,WAAA;AAAA,QACd,KAAK,OAAA,CAAQ;AAAA;AAAA,OACd,CAAA;AAED,MAAA,YAAA,CAAa,UAAU,CAAA,KAAA,KAAS;AAC9B,QAAA,KAAA,CAAM,cAAA,EAAe;AACrB,QAAA,IAAI,QAAQ,IAAA,EAAM;AAChB,UAAA,MAAA,CAAO,IAAA,CAAK,OAAA,CAAQ,IAAA,EAAM,QAAQ,CAAA;AAClC,UAAA,gBAAA,CAAiB,mBAAA,CAAoB;AAAA,YACnC,GAAA,EAAK,CAAC,OAAA,CAAQ,EAAE,CAAA;AAAA,YAChB,IAAA,EAAM;AAAA,WACP,CAAA;AAAA,QACH,CAAA,MAAO;AACL,UAAA,MAAA,CAAO,KAAK,kBAAkB,CAAA;AAAA,QAChC;AACA,QAAA,YAAA,CAAa,KAAA,EAAM;AAAA,MACrB,CAAA;AAEA,MAAA,OAAO,YAAA;AAAA,IACT,CAAA;AAAA,IACA,CAAC,yBAAA,EAA2B,gBAAA,EAAkB,kBAAkB;AAAA,GAClE;AAEA,EAAA,OAAO,EAAE,qBAAqB,qBAAA,EAAsB;AACtD;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -77,12 +77,13 @@ type NotificationsTableProps = Pick<TableProps, 'onPageChange' | 'onRowsPerPageC
|
|
|
77
77
|
isLoading?: boolean;
|
|
78
78
|
isUnread: boolean;
|
|
79
79
|
notifications?: Notification[];
|
|
80
|
+
highlightedNotificationId?: string;
|
|
80
81
|
onUpdate: () => void;
|
|
81
82
|
setContainsText: (search: string) => void;
|
|
82
83
|
pageSize: number;
|
|
83
84
|
};
|
|
84
85
|
/** @public */
|
|
85
|
-
declare const NotificationsTable: ({ title, markAsReadOnLinkOpen, isLoading, notifications, isUnread, onUpdate, setContainsText, onPageChange, onRowsPerPageChange, page, pageSize, totalCount, }: NotificationsTableProps) => react_jsx_runtime.JSX.Element;
|
|
86
|
+
declare const NotificationsTable: ({ title, markAsReadOnLinkOpen, isLoading, notifications, highlightedNotificationId, isUnread, onUpdate, setContainsText, onPageChange, onRowsPerPageChange, page, pageSize, totalCount, }: NotificationsTableProps) => react_jsx_runtime.JSX.Element;
|
|
86
87
|
|
|
87
88
|
/**
|
|
88
89
|
* Props for the {@link NotificationDescription} swappable component.
|
|
@@ -281,6 +282,13 @@ declare const notificationsTranslationRef: _backstage_frontend_plugin_api.Transl
|
|
|
281
282
|
readonly "notificationsPage.tableTitle.unread_other": "Unread notifications ({{count}})";
|
|
282
283
|
readonly "notificationsPage.tableTitle.read_one": "Read notifications ({{count}})";
|
|
283
284
|
readonly "notificationsPage.tableTitle.read_other": "Read notifications ({{count}})";
|
|
285
|
+
readonly "unreadCard.emptyState": "All caught up!";
|
|
286
|
+
readonly "unreadCard.title_one": "Last unread notifications ({{count}})";
|
|
287
|
+
readonly "unreadCard.title_other": "Last unread notifications ({{count}})";
|
|
288
|
+
readonly "unreadCard.viewAll": "View All";
|
|
289
|
+
readonly "unreadCard.columnNotification": "Notification";
|
|
290
|
+
readonly "unreadCard.columnActions": "Actions";
|
|
291
|
+
readonly "unreadCard.resultsCount": "{{displayed}} results out of {{total}}";
|
|
284
292
|
}>;
|
|
285
293
|
|
|
286
294
|
export { NotificationDescription, NotificationsClient, NotificationsPage, NotificationsSidebarItem, NotificationsTable, UserNotificationSettingsCard, notificationsApiRef, notificationsPlugin, notificationsTranslationRef, useNotificationsApi };
|
package/dist/index.esm.js
CHANGED
|
@@ -3,6 +3,7 @@ export { notificationsApiRef } from './api/NotificationsApi.esm.js';
|
|
|
3
3
|
export { NotificationsClient } from './api/NotificationsClient.esm.js';
|
|
4
4
|
export { useNotificationsApi } from './hooks/useNotificationsApi.esm.js';
|
|
5
5
|
import 'react';
|
|
6
|
+
import '@backstage/plugin-signals-react';
|
|
6
7
|
import '@backstage/core-plugin-api';
|
|
7
8
|
import './routes.esm.js';
|
|
8
9
|
import './hooks/useTitleCounter.esm.js';
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-inject.es.esm.js","sources":["../../../../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,MAAM,GAAG,GAAG,GAAG,EAAE;AAChC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ;;AAE7B,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,CAAC;;AAEzD,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU;;AAEzB,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AAC/C,IAAI,CAAC,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC7B,IAAI;AACJ,EAAE,CAAC,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,EAAE;;AAEF,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG;AAClC,EAAE,CAAC,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACnD,EAAE;AACF
|
|
1
|
+
{"version":3,"file":"style-inject.es.esm.js","sources":["../../../../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,MAAM,GAAG,GAAG,GAAG,EAAE;AAChC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ;;AAE7B,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,CAAC;;AAEzD,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU;;AAEzB,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AAC/C,IAAI,CAAC,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC7B,IAAI;AACJ,EAAE,CAAC,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,EAAE;;AAEF,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG;AAClC,EAAE,CAAC,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACnD,EAAE;AACF;;","x_google_ignoreList":[0]}
|
package/dist/plugin.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef } from './routes';\nimport { notificationsApiRef } from './api/NotificationsApi';\nimport { NotificationsClient } from './api';\n\n/** @public */\nexport const notificationsPlugin = createPlugin({\n id: 'notifications',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: notificationsApiRef,\n deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef },\n factory: ({ discoveryApi, fetchApi }) =>\n new NotificationsClient({ discoveryApi, fetchApi }),\n }),\n ],\n});\n\n/** @public */\nexport const NotificationsPage = notificationsPlugin.provide(\n createRoutableExtension({\n name: 'NotificationsPage',\n component: () =>\n import('./components/NotificationsPage').then(m => m.NotificationsPage),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;;;AA4BO,MAAM,sBAAsB,YAAA,CAAa;AAAA,EAC9C,EAAA,EAAI,eAAA;AAAA,EACJ,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,mBAAA;AAAA,MACL,IAAA,EAAM,EAAE,YAAA,EAAc,eAAA,EAAiB,UAAU,WAAA,EAAY;AAAA,MAC7D,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,mBAAA,CAAoB,EAAE,YAAA,EAAc,QAAA,EAAU;AAAA,KACrD;AAAA;AAEL,CAAC;AAGM,MAAM,oBAAoB,mBAAA,CAAoB,OAAA;AAAA,EACnD,uBAAA,CAAwB;AAAA,IACtB,IAAA,EAAM,mBAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,6CAAgC,EAAE,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,iBAAiB,CAAA;AAAA,IACxE,UAAA,EAAY;AAAA,GACb;AACH
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { rootRouteRef } from './routes';\nimport { notificationsApiRef } from './api/NotificationsApi';\nimport { NotificationsClient } from './api';\n\n/** @public */\nexport const notificationsPlugin = createPlugin({\n id: 'notifications',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: notificationsApiRef,\n deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef },\n factory: ({ discoveryApi, fetchApi }) =>\n new NotificationsClient({ discoveryApi, fetchApi }),\n }),\n ],\n});\n\n/** @public */\nexport const NotificationsPage = notificationsPlugin.provide(\n createRoutableExtension({\n name: 'NotificationsPage',\n component: () =>\n import('./components/NotificationsPage').then(m => m.NotificationsPage),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;;;AA4BO,MAAM,sBAAsB,YAAA,CAAa;AAAA,EAC9C,EAAA,EAAI,eAAA;AAAA,EACJ,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,mBAAA;AAAA,MACL,IAAA,EAAM,EAAE,YAAA,EAAc,eAAA,EAAiB,UAAU,WAAA,EAAY;AAAA,MAC7D,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,mBAAA,CAAoB,EAAE,YAAA,EAAc,QAAA,EAAU;AAAA,KACrD;AAAA;AAEL,CAAC;AAGM,MAAM,oBAAoB,mBAAA,CAAoB,OAAA;AAAA,EACnD,uBAAA,CAAwB;AAAA,IACtB,IAAA,EAAM,mBAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,6CAAgC,EAAE,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,iBAAiB,CAAA;AAAA,IACxE,UAAA,EAAY;AAAA,GACb;AACH;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "@backstage/plugin-notifications";
|
|
2
|
-
var version = "0.
|
|
2
|
+
var version = "0.6.1-next.0";
|
|
3
3
|
var backstage = {
|
|
4
4
|
role: "frontend-plugin",
|
|
5
5
|
pluginId: "notifications",
|
|
@@ -54,6 +54,7 @@ var dependencies = {
|
|
|
54
54
|
"@backstage/core-plugin-api": "workspace:^",
|
|
55
55
|
"@backstage/errors": "workspace:^",
|
|
56
56
|
"@backstage/frontend-plugin-api": "workspace:^",
|
|
57
|
+
"@backstage/plugin-home-react": "workspace:^",
|
|
57
58
|
"@backstage/plugin-notifications-common": "workspace:^",
|
|
58
59
|
"@backstage/plugin-signals-react": "workspace:^",
|
|
59
60
|
"@backstage/theme": "workspace:^",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/routes.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'notifications',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAA,CAAe;AAAA,EACzC,EAAA,EAAI;AACN,CAAC
|
|
1
|
+
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'notifications',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAA,CAAe;AAAA,EACzC,EAAA,EAAI;AACN,CAAC;;"}
|
package/dist/translation.esm.js
CHANGED
|
@@ -97,6 +97,15 @@ const notificationsTranslationRef = createTranslationRef({
|
|
|
97
97
|
errors: {
|
|
98
98
|
useNotificationFormat: "useNotificationFormat must be used within a NotificationFormatProvider"
|
|
99
99
|
}
|
|
100
|
+
},
|
|
101
|
+
unreadCard: {
|
|
102
|
+
title_one: "Last unread notifications ({{count}})",
|
|
103
|
+
title_other: "Last unread notifications ({{count}})",
|
|
104
|
+
viewAll: "View All",
|
|
105
|
+
emptyState: "All caught up!",
|
|
106
|
+
columnNotification: "Notification",
|
|
107
|
+
columnActions: "Actions",
|
|
108
|
+
resultsCount: "{{displayed}} results out of {{total}}"
|
|
100
109
|
}
|
|
101
110
|
}
|
|
102
111
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/frontend-plugin-api';\n\n/** @public */\nexport const notificationsTranslationRef = createTranslationRef({\n id: 'plugin.notifications',\n messages: {\n notificationsPage: {\n title: 'Notifications',\n tableTitle: {\n all_one: 'All notifications ({{count}})',\n all_other: 'All notifications ({{count}})',\n saved_one: 'Saved notifications ({{count}})',\n saved_other: 'Saved notifications ({{count}})',\n unread_one: 'Unread notifications ({{count}})',\n unread_other: 'Unread notifications ({{count}})',\n read_one: 'Read notifications ({{count}})',\n read_other: 'Read notifications ({{count}})',\n },\n },\n filters: {\n title: 'Filters',\n view: {\n label: 'View',\n unread: 'Unread notifications',\n read: 'Read notifications',\n saved: 'Saved',\n all: 'All',\n },\n createdAfter: {\n label: 'Sent out',\n placeholder: 'Notifications since',\n last24h: 'Last 24h',\n lastWeek: 'Last week',\n anyTime: 'Any time',\n },\n sortBy: {\n label: 'Sort by',\n placeholder: 'Field to sort by',\n newest: 'Newest on top',\n oldest: 'Oldest on top',\n topic: 'Topic',\n origin: 'Origin',\n },\n severity: {\n label: 'Min severity',\n critical: 'Critical',\n high: 'High',\n normal: 'Normal',\n low: 'Low',\n },\n topic: {\n label: 'Topic',\n anyTopic: 'Any topic',\n },\n },\n table: {\n emptyMessage: 'No records to display',\n pagination: {\n firstTooltip: 'First Page',\n labelDisplayedRows: '{from}-{to} of {count}',\n labelRowsSelect: 'rows',\n lastTooltip: 'Last Page',\n nextTooltip: 'Next Page',\n previousTooltip: 'Previous Page',\n },\n bulkActions: {\n markAllRead: 'Mark all read',\n markSelectedAsRead: 'Mark selected as read',\n returnSelectedAmongUnread: 'Return selected among unread',\n saveSelectedForLater: 'Save selected for later',\n undoSaveForSelected: 'Undo save for selected',\n },\n confirmDialog: {\n title: 'Are you sure?',\n markAllReadDescription: 'Mark all notifications as read.',\n markAllReadConfirmation: 'Mark All',\n cancel: 'Cancel',\n },\n errors: {\n markAllReadFailed: 'Failed to mark all notifications as read',\n },\n },\n sidebar: {\n title: 'Notifications',\n errors: {\n markAsReadFailed: 'Failed to mark notification as read',\n fetchNotificationFailed: 'Failed to fetch notification',\n },\n },\n settings: {\n title: 'Notification settings',\n errorTitle: 'Failed to load settings',\n noSettingsAvailable:\n 'No notification settings available, check back later',\n table: {\n origin: 'Origin',\n topic: 'Topic',\n },\n errors: {\n useNotificationFormat:\n 'useNotificationFormat must be used within a NotificationFormatProvider',\n },\n },\n },\n});\n"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/frontend-plugin-api';\n\n/** @public */\nexport const notificationsTranslationRef = createTranslationRef({\n id: 'plugin.notifications',\n messages: {\n notificationsPage: {\n title: 'Notifications',\n tableTitle: {\n all_one: 'All notifications ({{count}})',\n all_other: 'All notifications ({{count}})',\n saved_one: 'Saved notifications ({{count}})',\n saved_other: 'Saved notifications ({{count}})',\n unread_one: 'Unread notifications ({{count}})',\n unread_other: 'Unread notifications ({{count}})',\n read_one: 'Read notifications ({{count}})',\n read_other: 'Read notifications ({{count}})',\n },\n },\n filters: {\n title: 'Filters',\n view: {\n label: 'View',\n unread: 'Unread notifications',\n read: 'Read notifications',\n saved: 'Saved',\n all: 'All',\n },\n createdAfter: {\n label: 'Sent out',\n placeholder: 'Notifications since',\n last24h: 'Last 24h',\n lastWeek: 'Last week',\n anyTime: 'Any time',\n },\n sortBy: {\n label: 'Sort by',\n placeholder: 'Field to sort by',\n newest: 'Newest on top',\n oldest: 'Oldest on top',\n topic: 'Topic',\n origin: 'Origin',\n },\n severity: {\n label: 'Min severity',\n critical: 'Critical',\n high: 'High',\n normal: 'Normal',\n low: 'Low',\n },\n topic: {\n label: 'Topic',\n anyTopic: 'Any topic',\n },\n },\n table: {\n emptyMessage: 'No records to display',\n pagination: {\n firstTooltip: 'First Page',\n labelDisplayedRows: '{from}-{to} of {count}',\n labelRowsSelect: 'rows',\n lastTooltip: 'Last Page',\n nextTooltip: 'Next Page',\n previousTooltip: 'Previous Page',\n },\n bulkActions: {\n markAllRead: 'Mark all read',\n markSelectedAsRead: 'Mark selected as read',\n returnSelectedAmongUnread: 'Return selected among unread',\n saveSelectedForLater: 'Save selected for later',\n undoSaveForSelected: 'Undo save for selected',\n },\n confirmDialog: {\n title: 'Are you sure?',\n markAllReadDescription: 'Mark all notifications as read.',\n markAllReadConfirmation: 'Mark All',\n cancel: 'Cancel',\n },\n errors: {\n markAllReadFailed: 'Failed to mark all notifications as read',\n },\n },\n sidebar: {\n title: 'Notifications',\n errors: {\n markAsReadFailed: 'Failed to mark notification as read',\n fetchNotificationFailed: 'Failed to fetch notification',\n },\n },\n settings: {\n title: 'Notification settings',\n errorTitle: 'Failed to load settings',\n noSettingsAvailable:\n 'No notification settings available, check back later',\n table: {\n origin: 'Origin',\n topic: 'Topic',\n },\n errors: {\n useNotificationFormat:\n 'useNotificationFormat must be used within a NotificationFormatProvider',\n },\n },\n unreadCard: {\n title_one: 'Last unread notifications ({{count}})',\n title_other: 'Last unread notifications ({{count}})',\n viewAll: 'View All',\n emptyState: 'All caught up!',\n columnNotification: 'Notification',\n columnActions: 'Actions',\n resultsCount: '{{displayed}} results out of {{total}}',\n },\n },\n});\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const NOTIFICATIONS_PAGE_PATH = "/notifications";
|
|
2
|
+
function getNotificationsPageLink(notificationId) {
|
|
3
|
+
if (!notificationId) {
|
|
4
|
+
return NOTIFICATIONS_PAGE_PATH;
|
|
5
|
+
}
|
|
6
|
+
const params = new URLSearchParams({ id: notificationId });
|
|
7
|
+
return `${NOTIFICATIONS_PAGE_PATH}?${params.toString()}`;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { NOTIFICATIONS_PAGE_PATH, getNotificationsPageLink };
|
|
11
|
+
//# sourceMappingURL=notificationLinks.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationLinks.esm.js","sources":["../../src/utils/notificationLinks.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @public */\nexport const NOTIFICATIONS_PAGE_PATH = '/notifications';\n\n/** @public */\nexport function getNotificationsPageLink(notificationId?: string): string {\n if (!notificationId) {\n return NOTIFICATIONS_PAGE_PATH;\n }\n\n const params = new URLSearchParams({ id: notificationId });\n return `${NOTIFICATIONS_PAGE_PATH}?${params.toString()}`;\n}\n"],"names":[],"mappings":"AAiBO,MAAM,uBAAA,GAA0B;AAGhC,SAAS,yBAAyB,cAAA,EAAiC;AACxE,EAAA,IAAI,CAAC,cAAA,EAAgB;AACnB,IAAA,OAAO,uBAAA;AAAA,EACT;AAEA,EAAA,MAAM,SAAS,IAAI,eAAA,CAAgB,EAAE,EAAA,EAAI,gBAAgB,CAAA;AACzD,EAAA,OAAO,CAAA,EAAG,uBAAuB,CAAA,CAAA,EAAI,MAAA,CAAO,UAAU,CAAA,CAAA;AACxD;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const HTML_ENTITY_MAP = {
|
|
2
|
+
"&": "&",
|
|
3
|
+
"<": "<",
|
|
4
|
+
">": ">",
|
|
5
|
+
""": '"',
|
|
6
|
+
"'": "'",
|
|
7
|
+
" ": " "
|
|
8
|
+
};
|
|
9
|
+
function toPlainText(text) {
|
|
10
|
+
const withoutEntities = text.replace(
|
|
11
|
+
/&(?:amp|lt|gt|quot|#39|nbsp);/g,
|
|
12
|
+
(entity) => HTML_ENTITY_MAP[entity] ?? entity
|
|
13
|
+
);
|
|
14
|
+
const withoutHtml = withoutEntities.replace(/<\/?[a-zA-Z][^>]*>/g, " ");
|
|
15
|
+
return withoutHtml.replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").replace(/(\*\*|__)(.*?)\1/g, "$2").replace(/(\*|_)(.*?)\1/g, "$2").replace(/`([^`]+)`/g, "$1").replace(/^#{1,6}\s+/gm, "").replace(/\s+/g, " ").trim();
|
|
16
|
+
}
|
|
17
|
+
function truncateText(text, maxChars) {
|
|
18
|
+
const full = toPlainText(text);
|
|
19
|
+
if (full.length <= maxChars) {
|
|
20
|
+
return { display: full, truncated: false, full };
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
display: `${full.slice(0, maxChars)}...`,
|
|
24
|
+
truncated: true,
|
|
25
|
+
full
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { toPlainText, truncateText };
|
|
30
|
+
//# sourceMappingURL=plainText.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plainText.esm.js","sources":["../../src/utils/plainText.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst HTML_ENTITY_MAP: Record<string, string> = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n ' ': ' ',\n};\n\n/** @public */\nexport function toPlainText(text: string): string {\n // Decode entities before stripping tags so encoded markup like\n // `<b>...</b>` does not reappear as HTML in the result.\n const withoutEntities = text.replace(\n /&(?:amp|lt|gt|quot|#39|nbsp);/g,\n entity => HTML_ENTITY_MAP[entity] ?? entity,\n );\n // Only strip real HTML tags (names starting with a letter), so text like\n // \"<3\" or placeholders is preserved after entity decoding.\n const withoutHtml = withoutEntities.replace(/<\\/?[a-zA-Z][^>]*>/g, ' ');\n\n return withoutHtml\n .replace(/!\\[([^\\]]*)\\]\\([^)]*\\)/g, '$1')\n .replace(/\\[([^\\]]+)\\]\\([^)]*\\)/g, '$1')\n .replace(/(\\*\\*|__)(.*?)\\1/g, '$2')\n .replace(/(\\*|_)(.*?)\\1/g, '$2')\n .replace(/`([^`]+)`/g, '$1')\n .replace(/^#{1,6}\\s+/gm, '')\n .replace(/\\s+/g, ' ')\n .trim();\n}\n\n/** @public */\nexport function truncateText(\n text: string,\n maxChars: number,\n): { display: string; truncated: boolean; full: string } {\n const full = toPlainText(text);\n\n if (full.length <= maxChars) {\n return { display: full, truncated: false, full };\n }\n\n return {\n display: `${full.slice(0, maxChars)}...`,\n truncated: true,\n full,\n };\n}\n"],"names":[],"mappings":"AAgBA,MAAM,eAAA,GAA0C;AAAA,EAC9C,OAAA,EAAS,GAAA;AAAA,EACT,MAAA,EAAQ,GAAA;AAAA,EACR,MAAA,EAAQ,GAAA;AAAA,EACR,QAAA,EAAU,GAAA;AAAA,EACV,OAAA,EAAS,GAAA;AAAA,EACT,QAAA,EAAU;AACZ,CAAA;AAGO,SAAS,YAAY,IAAA,EAAsB;AAGhD,EAAA,MAAM,kBAAkB,IAAA,CAAK,OAAA;AAAA,IAC3B,gCAAA;AAAA,IACA,CAAA,MAAA,KAAU,eAAA,CAAgB,MAAM,CAAA,IAAK;AAAA,GACvC;AAGA,EAAA,MAAM,WAAA,GAAc,eAAA,CAAgB,OAAA,CAAQ,qBAAA,EAAuB,GAAG,CAAA;AAEtE,EAAA,OAAO,WAAA,CACJ,OAAA,CAAQ,yBAAA,EAA2B,IAAI,CAAA,CACvC,OAAA,CAAQ,wBAAA,EAA0B,IAAI,CAAA,CACtC,OAAA,CAAQ,mBAAA,EAAqB,IAAI,CAAA,CACjC,OAAA,CAAQ,gBAAA,EAAkB,IAAI,CAAA,CAC9B,OAAA,CAAQ,YAAA,EAAc,IAAI,CAAA,CAC1B,OAAA,CAAQ,cAAA,EAAgB,EAAE,CAAA,CAC1B,OAAA,CAAQ,MAAA,EAAQ,GAAG,EACnB,IAAA,EAAK;AACV;AAGO,SAAS,YAAA,CACd,MACA,QAAA,EACuD;AACvD,EAAA,MAAM,IAAA,GAAO,YAAY,IAAI,CAAA;AAE7B,EAAA,IAAI,IAAA,CAAK,UAAU,QAAA,EAAU;AAC3B,IAAA,OAAO,EAAE,OAAA,EAAS,IAAA,EAAM,SAAA,EAAW,OAAO,IAAA,EAAK;AAAA,EACjD;AAEA,EAAA,OAAO;AAAA,IACL,SAAS,CAAA,EAAG,IAAA,CAAK,KAAA,CAAM,CAAA,EAAG,QAAQ,CAAC,CAAA,GAAA,CAAA;AAAA,IACnC,SAAA,EAAW,IAAA;AAAA,IACX;AAAA,GACF;AACF;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-notifications",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1-next.0",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "frontend-plugin",
|
|
6
6
|
"pluginId": "notifications",
|
|
@@ -63,14 +63,15 @@
|
|
|
63
63
|
"test": "backstage-cli package test"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@backstage/core-components": "0.18.
|
|
67
|
-
"@backstage/core-plugin-api": "1.12.
|
|
68
|
-
"@backstage/errors": "1.3.
|
|
69
|
-
"@backstage/frontend-plugin-api": "0.18.
|
|
70
|
-
"@backstage/plugin-
|
|
71
|
-
"@backstage/plugin-
|
|
66
|
+
"@backstage/core-components": "0.18.15-next.0",
|
|
67
|
+
"@backstage/core-plugin-api": "1.12.11-next.0",
|
|
68
|
+
"@backstage/errors": "1.3.2-next.0",
|
|
69
|
+
"@backstage/frontend-plugin-api": "0.18.2-next.0",
|
|
70
|
+
"@backstage/plugin-home-react": "0.1.43-next.0",
|
|
71
|
+
"@backstage/plugin-notifications-common": "0.2.5-next.0",
|
|
72
|
+
"@backstage/plugin-signals-react": "0.0.27-next.0",
|
|
72
73
|
"@backstage/theme": "0.7.3",
|
|
73
|
-
"@backstage/ui": "0.18.0
|
|
74
|
+
"@backstage/ui": "0.18.0",
|
|
74
75
|
"@remixicon/react": ">=4.6.0 <4.9.0",
|
|
75
76
|
"lodash": "^4.17.21",
|
|
76
77
|
"notistack": "^3.0.1",
|
|
@@ -79,10 +80,10 @@
|
|
|
79
80
|
"react-use": "^17.2.4"
|
|
80
81
|
},
|
|
81
82
|
"devDependencies": {
|
|
82
|
-
"@backstage/cli": "0.36.
|
|
83
|
-
"@backstage/dev-utils": "1.1.
|
|
84
|
-
"@backstage/plugin-signals": "0.0.
|
|
85
|
-
"@backstage/test-utils": "1.7.
|
|
83
|
+
"@backstage/cli": "0.36.7-next.0",
|
|
84
|
+
"@backstage/dev-utils": "1.1.28-next.0",
|
|
85
|
+
"@backstage/plugin-signals": "0.0.36-next.0",
|
|
86
|
+
"@backstage/test-utils": "1.7.23-next.0",
|
|
86
87
|
"@testing-library/dom": "^10.0.0",
|
|
87
88
|
"@testing-library/jest-dom": "^6.0.0",
|
|
88
89
|
"@testing-library/react": "^16.0.0",
|