@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.
Files changed (65) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/alpha/extensions/unreadNotificationsHomeWidget.esm.js +57 -0
  3. package/dist/alpha/extensions/unreadNotificationsHomeWidget.esm.js.map +1 -0
  4. package/dist/alpha.d.ts +17 -0
  5. package/dist/alpha.esm.js +2 -1
  6. package/dist/alpha.esm.js.map +1 -1
  7. package/dist/api/NotificationsApi.esm.js.map +1 -1
  8. package/dist/api/NotificationsClient.esm.js.map +1 -1
  9. package/dist/components/NotificationsFilters/NotificationsFilters.esm.js.map +1 -1
  10. package/dist/components/NotificationsPage/NotificationsPage.esm.js +48 -4
  11. package/dist/components/NotificationsPage/NotificationsPage.esm.js.map +1 -1
  12. package/dist/components/NotificationsPage/index.esm.js +1 -1
  13. package/dist/components/NotificationsSideBarItem/NotificationsSideBarItem.esm.js +1 -1
  14. package/dist/components/NotificationsSideBarItem/NotificationsSideBarItem.esm.js.map +1 -1
  15. package/dist/components/NotificationsSideBarItem/NotificationsSideBarItem.module.css.esm.js.map +1 -1
  16. package/dist/components/NotificationsTable/BulkActions.esm.js.map +1 -1
  17. package/dist/components/NotificationsTable/DefaultNotificationDescription.esm.js.map +1 -1
  18. package/dist/components/NotificationsTable/NotificationDescription.esm.js.map +1 -1
  19. package/dist/components/NotificationsTable/NotificationIcon.esm.js +14 -8
  20. package/dist/components/NotificationsTable/NotificationIcon.esm.js.map +1 -1
  21. package/dist/components/NotificationsTable/NotificationsTable.esm.js +76 -41
  22. package/dist/components/NotificationsTable/NotificationsTable.esm.js.map +1 -1
  23. package/dist/components/NotificationsTable/NotificationsTable.module.css.esm.js +2 -2
  24. package/dist/components/NotificationsTable/NotificationsTable.module.css.esm.js.map +1 -1
  25. package/dist/components/NotificationsTable/SelectAll.esm.js.map +1 -1
  26. package/dist/components/NotificationsTable/SelectAll.module.css.esm.js.map +1 -1
  27. package/dist/components/NotificationsTable/SeverityIcon.esm.js.map +1 -1
  28. package/dist/components/NotificationsTable/SeverityIcon.module.css.esm.js.map +1 -1
  29. package/dist/components/UnreadNotificationsCard/UnreadNotificationsCard.esm.js +255 -0
  30. package/dist/components/UnreadNotificationsCard/UnreadNotificationsCard.esm.js.map +1 -0
  31. package/dist/components/UnreadNotificationsCard/UnreadNotificationsCard.module.css.esm.js +8 -0
  32. package/dist/components/UnreadNotificationsCard/UnreadNotificationsCard.module.css.esm.js.map +1 -0
  33. package/dist/components/UnreadNotificationsCard/index.esm.js +7 -0
  34. package/dist/components/UnreadNotificationsCard/index.esm.js.map +1 -0
  35. package/dist/components/UserNotificationSettingsCard/NoBorderTableCell.esm.js.map +1 -1
  36. package/dist/components/UserNotificationSettingsCard/NoBorderTableCell.module.css.esm.js.map +1 -1
  37. package/dist/components/UserNotificationSettingsCard/NotificationFormatContext.esm.js.map +1 -1
  38. package/dist/components/UserNotificationSettingsCard/OriginRow.esm.js +3 -3
  39. package/dist/components/UserNotificationSettingsCard/OriginRow.esm.js.map +1 -1
  40. package/dist/components/UserNotificationSettingsCard/TopicRow.esm.js +1 -3
  41. package/dist/components/UserNotificationSettingsCard/TopicRow.esm.js.map +1 -1
  42. package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsCard.esm.js +1 -0
  43. package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsCard.esm.js.map +1 -1
  44. package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsPanel.esm.js.map +1 -1
  45. package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsPanel.module.css.esm.js.map +1 -1
  46. package/dist/hooks/useNotificationsApi.esm.js.map +1 -1
  47. package/dist/hooks/useNotificationsRefresh.esm.js +24 -0
  48. package/dist/hooks/useNotificationsRefresh.esm.js.map +1 -0
  49. package/dist/hooks/useTitleCounter.esm.js.map +1 -1
  50. package/dist/hooks/useWebNotifications.esm.js.map +1 -1
  51. package/dist/index.d.ts +9 -1
  52. package/dist/index.esm.js +1 -0
  53. package/dist/index.esm.js.map +1 -1
  54. package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -1
  55. package/dist/plugin.esm.js.map +1 -1
  56. package/dist/plugins/notifications/package.json.esm.js +2 -1
  57. package/dist/plugins/notifications/package.json.esm.js.map +1 -1
  58. package/dist/routes.esm.js.map +1 -1
  59. package/dist/translation.esm.js +9 -0
  60. package/dist/translation.esm.js.map +1 -1
  61. package/dist/utils/notificationLinks.esm.js +11 -0
  62. package/dist/utils/notificationLinks.esm.js.map +1 -0
  63. package/dist/utils/plainText.esm.js +30 -0
  64. package/dist/utils/plainText.esm.js.map +1 -0
  65. package/package.json +13 -12
@@ -1 +1 @@
1
- {"version":3,"file":"BulkActions.esm.js","sources":["../../../src/components/NotificationsTable/BulkActions.tsx"],"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 { Notification } from '@backstage/plugin-notifications-common';\nimport { ButtonIcon, Flex, Tooltip, TooltipTrigger } from '@backstage/ui';\nimport {\n RiCheckDoubleLine,\n RiBookmarkLine,\n RiBookmark3Line,\n RiCheckboxCircleLine,\n RiMailLine,\n} from '@remixicon/react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { notificationsTranslationRef } from '../../translation';\n\nexport const BulkActions = ({\n selectedNotifications,\n notifications,\n isUnread,\n onSwitchReadStatus,\n onSwitchSavedStatus,\n onMarkAllRead,\n}: {\n selectedNotifications: Set<Notification['id']>;\n notifications: Notification[];\n isUnread?: boolean;\n onSwitchReadStatus: (ids: Notification['id'][], newStatus: boolean) => void;\n onSwitchSavedStatus: (ids: Notification['id'][], newStatus: boolean) => void;\n onMarkAllRead?: () => void;\n}) => {\n const { t } = useTranslationRef(notificationsTranslationRef);\n const isDisabled = selectedNotifications.size === 0;\n const bulkNotifications = notifications.filter(notification =>\n selectedNotifications.has(notification.id),\n );\n\n const isOneRead = !!bulkNotifications.find(\n (notification: Notification) => !!notification.read,\n );\n const isOneSaved = !!bulkNotifications.find(\n (notification: Notification) => !!notification.saved,\n );\n\n const markAsReadText = isOneRead\n ? t('table.bulkActions.returnSelectedAmongUnread')\n : t('table.bulkActions.markSelectedAsRead');\n const ReadIcon = isOneRead ? RiMailLine : RiCheckboxCircleLine;\n\n const markAsSavedText = isOneSaved\n ? t('table.bulkActions.undoSaveForSelected')\n : t('table.bulkActions.saveSelectedForLater');\n const SavedIcon = isOneSaved ? RiBookmark3Line : RiBookmarkLine;\n const markAllReadText = t('table.bulkActions.markAllRead');\n\n return (\n <Flex gap=\"1\">\n {onMarkAllRead ? (\n <TooltipTrigger>\n <ButtonIcon\n aria-label={markAllReadText}\n isDisabled={!isUnread}\n onPress={onMarkAllRead}\n icon={<RiCheckDoubleLine size={16} />}\n variant=\"secondary\"\n />\n <Tooltip>{markAllReadText}</Tooltip>\n </TooltipTrigger>\n ) : (\n <div />\n )}\n\n <TooltipTrigger>\n <ButtonIcon\n aria-label={markAsSavedText}\n isDisabled={isDisabled}\n onPress={() => {\n onSwitchSavedStatus([...selectedNotifications], !isOneSaved);\n }}\n icon={<SavedIcon size={16} />}\n variant=\"secondary\"\n />\n <Tooltip>{markAsSavedText}</Tooltip>\n </TooltipTrigger>\n\n <TooltipTrigger>\n <ButtonIcon\n aria-label={markAsReadText}\n isDisabled={isDisabled}\n onPress={() => {\n onSwitchReadStatus([...selectedNotifications], !isOneRead);\n }}\n icon={<ReadIcon size={16} />}\n variant=\"secondary\"\n />\n <Tooltip>{markAsReadText}</Tooltip>\n </TooltipTr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AAA,EAAe;AAAA,KAAA,EAC3B;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"BulkActions.esm.js","sources":["../../../src/components/NotificationsTable/BulkActions.tsx"],"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 { Notification } from '@backstage/plugin-notifications-common';\nimport { ButtonIcon, Flex, Tooltip, TooltipTrigger } from '@backstage/ui';\nimport {\n RiCheckDoubleLine,\n RiBookmarkLine,\n RiBookmark3Line,\n RiCheckboxCircleLine,\n RiMailLine,\n} from '@remixicon/react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { notificationsTranslationRef } from '../../translation';\n\nexport const BulkActions = ({\n selectedNotifications,\n notifications,\n isUnread,\n onSwitchReadStatus,\n onSwitchSavedStatus,\n onMarkAllRead,\n}: {\n selectedNotifications: Set<Notification['id']>;\n notifications: Notification[];\n isUnread?: boolean;\n onSwitchReadStatus: (ids: Notification['id'][], newStatus: boolean) => void;\n onSwitchSavedStatus: (ids: Notification['id'][], newStatus: boolean) => void;\n onMarkAllRead?: () => void;\n}) => {\n const { t } = useTranslationRef(notificationsTranslationRef);\n const isDisabled = selectedNotifications.size === 0;\n const bulkNotifications = notifications.filter(notification =>\n selectedNotifications.has(notification.id),\n );\n\n const isOneRead = !!bulkNotifications.find(\n (notification: Notification) => !!notification.read,\n );\n const isOneSaved = !!bulkNotifications.find(\n (notification: Notification) => !!notification.saved,\n );\n\n const markAsReadText = isOneRead\n ? t('table.bulkActions.returnSelectedAmongUnread')\n : t('table.bulkActions.markSelectedAsRead');\n const ReadIcon = isOneRead ? RiMailLine : RiCheckboxCircleLine;\n\n const markAsSavedText = isOneSaved\n ? t('table.bulkActions.undoSaveForSelected')\n : t('table.bulkActions.saveSelectedForLater');\n const SavedIcon = isOneSaved ? RiBookmark3Line : RiBookmarkLine;\n const markAllReadText = t('table.bulkActions.markAllRead');\n\n return (\n <Flex gap=\"1\">\n {onMarkAllRead ? (\n <TooltipTrigger>\n <ButtonIcon\n aria-label={markAllReadText}\n isDisabled={!isUnread}\n onPress={onMarkAllRead}\n icon={<RiCheckDoubleLine size={16} />}\n variant=\"secondary\"\n />\n <Tooltip>{markAllReadText}</Tooltip>\n </TooltipTrigger>\n ) : (\n <div />\n )}\n\n <TooltipTrigger>\n <ButtonIcon\n aria-label={markAsSavedText}\n isDisabled={isDisabled}\n onPress={() => {\n onSwitchSavedStatus([...selectedNotifications], !isOneSaved);\n }}\n icon={<SavedIcon size={16} />}\n variant=\"secondary\"\n />\n <Tooltip>{markAsSavedText}</Tooltip>\n </TooltipTrigger>\n\n <TooltipTrigger>\n <ButtonIcon\n aria-label={markAsReadText}\n isDisabled={isDisabled}\n onPress={() => {\n onSwitchReadStatus([...selectedNotifications], !isOneRead);\n }}\n icon={<ReadIcon size={16} />}\n variant=\"secondary\"\n />\n <Tooltip>{markAsReadText}</Tooltip>\n </TooltipTrigger>\n </Flex>\n );\n};\n"],"names":[],"mappings":";;;;;;AA2BO,MAAM,cAAc,CAAC;AAAA,EAC1B,qBAAA;AAAA,EACA,aAAA;AAAA,EACA,QAAA;AAAA,EACA,kBAAA;AAAA,EACA,mBAAA;AAAA,EACA;AACF,CAAA,KAOM;AACJ,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,2BAA2B,CAAA;AAC3D,EAAA,MAAM,UAAA,GAAa,sBAAsB,IAAA,KAAS,CAAA;AAClD,EAAA,MAAM,oBAAoB,aAAA,CAAc,MAAA;AAAA,IAAO,CAAA,YAAA,KAC7C,qBAAA,CAAsB,GAA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AAC,UAAA;AAAA,QAAA;AAAA,UACC,YAAA,EAAY,eAAA;AAAA,UACZ,UAAA;AAAA,UACA,SAAS,MAAM;AACb,YAAA,mBAAA,CAAoB,CAAC,GAAG,qBAAqB,CAAA,EAAG,CAAC,UAAU,CAAA;AAAA,UAC7D,CAAA;AAAA,UACA,IAAA,kBAAM,GAAA,CAAC,SAAA,EAAA,EAAU,IAAA,EAAM,EAAA,EAAI,CAAA;AAAA,UAC3B,OAAA,EAAQ;AAAA;AAAA,OACV;AAAA,sBACA,GAAA,CAAC,WAAS,QAAA,EAAA,eAAA,EAAgB;AAAA,KAAA,EAC5B,CAAA;AAAA,yBAEC,cAAA,EAAA,EACC,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,QAAC,UAAA;AAAA,QAAA;AAAA,UACC,YAAA,EAAY,cAAA;AAAA,UACZ,UAAA;AAAA,UACA,SAAS,MAAM;AACb,YAAA,kBAAA,CAAmB,CAAC,GAAG,qBAAqB,CAAA,EAAG,CAAC,SAAS,CAAA;AAAA,UAC3D,CAAA;AAAA,UACA,IAAA,kBAAM,GAAA,CAAC,QAAA,EAAA,EAAS,IAAA,EAAM,EAAA,EAAI,CAAA;AAAA,UAC1B,OAAA,EAAQ;AAAA;AAAA,OACV;AAAA,sBACA,GAAA,CAAC,WAAS,QAAA,EAAA,cAAA,EAAe;AAAA,KAAA,EAC3B;AAAA,GAAA,EACF,CAAA;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultNotificationDescription.esm.js","sources":["../../../src/components/NotificationsTable/DefaultNotificationDescription.tsx"],"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 */\nimport { Text, Button } from '@backstage/ui';\nimport { useState } from 'react';\nimport type { NotificationDescriptionProps } from './NotificationDescription';\n\nconst MAX_LENGTH = 100;\n\nexport const DefaultNotificationDescription = (\n props: NotificationDescriptionProps,\n) => {\n const { description } = props;\n const [shown, setShown] = useState(false);\n const isLong = description.length > MAX_LENGTH;\n\n if (!isLong) {\n return <Text variant=\"body-small\">{description}</Text>;\n }\n\n if (shown) {\n return (\n <Text variant=\"body-small\">\n {description}{' '}\n <Button\n variant=\"tertiary\"\n onPress={() => {\n setShown(false);\n }}\n >\n Show less\n </Button>\n </Text>\n );\n }\n return (\n <Text variant=\"body-small\">\n {description.substring(0, MAX_LENGTH)}...{' '}\n <Button\n variant=\"tertiary\"\n onPress={() => {\n setShown(true);\n }}\n >\n Show more\n </Button>\n </Text>\n );\n};\n"],"names":[],"mappings":";;;;AAmBA,MAAM,UAAA,GAAa,GAAA;AAEZ,MAAM,8BAAA,GAAiC,CAC5C,KAAA,KACG;AACH,EAAA,MAAM,EAAE,aAAY,GAAI,KAAA;AACxB,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,SAAS,KAAK,CAAA;AACxC,EAAA,MAAM,MAAA,GAAS,YAAY,MAAA,GAAS,UAAA;AAEpC,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,YAAA,EAAc,QAAA,EAAA,WAAA,EAAY,CAAA;AAAA,EACjD;AAEA,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,uBACE,IAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,YAAA,EACX,QAAA,EAAA;AAAA,MAAA,WAAA;AAAA,MAAa,GAAA;AAAA,sBACd,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,UAAA;AAAA,UACR,SAAS,MAAM;AACb,YAAA,QAAA,CAAS,KAAK,CAAA;AAAA,UAChB,CAAA;AAAA,UACD,QAAA,EAAA;AAAA;AAAA;AAED,KAAA,EACF,CAAA;AAAA,EAEJ;AACA,EAAA,uBACE,IAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,YAAA,EACX,QAAA,EAAA;AAAA,IAAA,WAAA,CAAY,SAAA,CAAU,GAAG,UAAU,CAAA;AAAA,IAAE,KAAA;AAAA,IAAI,GAAA;AAAA,oBAC1C,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,UAAA;AAAA,QACR,SAAS,MAAM;AACb,UAAA,QAAA,CAAS,IAAI,CAAA;AAAA,QACf,CAAA;AAAA,QACD,QAAA,EAAA;AAAA;AAAA;AAED,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"DefaultNotificationDescription.esm.js","sources":["../../../src/components/NotificationsTable/DefaultNotificationDescription.tsx"],"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 */\nimport { Text, Button } from '@backstage/ui';\nimport { useState } from 'react';\nimport type { NotificationDescriptionProps } from './NotificationDescription';\n\nconst MAX_LENGTH = 100;\n\nexport const DefaultNotificationDescription = (\n props: NotificationDescriptionProps,\n) => {\n const { description } = props;\n const [shown, setShown] = useState(false);\n const isLong = description.length > MAX_LENGTH;\n\n if (!isLong) {\n return <Text variant=\"body-small\">{description}</Text>;\n }\n\n if (shown) {\n return (\n <Text variant=\"body-small\">\n {description}{' '}\n <Button\n variant=\"tertiary\"\n onPress={() => {\n setShown(false);\n }}\n >\n Show less\n </Button>\n </Text>\n );\n }\n return (\n <Text variant=\"body-small\">\n {description.substring(0, MAX_LENGTH)}...{' '}\n <Button\n variant=\"tertiary\"\n onPress={() => {\n setShown(true);\n }}\n >\n Show more\n </Button>\n </Text>\n );\n};\n"],"names":[],"mappings":";;;;AAmBA,MAAM,UAAA,GAAa,GAAA;AAEZ,MAAM,8BAAA,GAAiC,CAC5C,KAAA,KACG;AACH,EAAA,MAAM,EAAE,aAAY,GAAI,KAAA;AACxB,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,SAAS,KAAK,CAAA;AACxC,EAAA,MAAM,MAAA,GAAS,YAAY,MAAA,GAAS,UAAA;AAEpC,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,YAAA,EAAc,QAAA,EAAA,WAAA,EAAY,CAAA;AAAA,EACjD;AAEA,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,uBACE,IAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,YAAA,EACX,QAAA,EAAA;AAAA,MAAA,WAAA;AAAA,MAAa,GAAA;AAAA,sBACd,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,UAAA;AAAA,UACR,SAAS,MAAM;AACb,YAAA,QAAA,CAAS,KAAK,CAAA;AAAA,UAChB,CAAA;AAAA,UACD,QAAA,EAAA;AAAA;AAAA;AAED,KAAA,EACF,CAAA;AAAA,EAEJ;AACA,EAAA,uBACE,IAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,YAAA,EACX,QAAA,EAAA;AAAA,IAAA,WAAA,CAAY,SAAA,CAAU,GAAG,UAAU,CAAA;AAAA,IAAE,KAAA;AAAA,IAAI,GAAA;AAAA,oBAC1C,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,UAAA;AAAA,QACR,SAAS,MAAM;AACb,UAAA,QAAA,CAAS,IAAI,CAAA;AAAA,QACf,CAAA;AAAA,QACD,QAAA,EAAA;AAAA;AAAA;AAED,GAAA,EACF,CAAA;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationDescription.esm.js","sources":["../../../src/components/NotificationsTable/NotificationDescription.tsx"],"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 */\nimport { createSwappableComponent } from '@backstage/frontend-plugin-api';\n\n/**\n * Props for the {@link NotificationDescription} swappable component.\n *\n * @public\n */\nexport interface NotificationDescriptionProps {\n /**\n * The plain-text description of the notification.\n */\n description: string;\n}\n\n/**\n * Swappable component that renders the description of a notification in the\n * notifications table. Apps can override this to customize how descriptions\n * are displayed.\n *\n * @public\n */\nexport const NotificationDescription =\n createSwappableComponent<NotificationDescriptionProps>({\n id: 'notifications.notification-description',\n loader: () =>\n import('./DefaultNotificationDescription').then(\n m => m.DefaultNotificationDescription,\n ),\n });\n"],"names":[],"mappings":";;AAoCO,MAAM,0BACX,wBAAA,CAAuD;AAAA,EACrD,EAAA,EAAI,wCAAA;AAAA,EACJ,MAAA,EAAQ,MACN,OAAO,yCAAkC,CAAA,CAAE,IAAA;AAAA,IACzC,OAAK,CAAA,CAAE;AAAA;AAEb,CAAC;;;;"}
1
+ {"version":3,"file":"NotificationDescription.esm.js","sources":["../../../src/components/NotificationsTable/NotificationDescription.tsx"],"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 */\nimport { createSwappableComponent } from '@backstage/frontend-plugin-api';\n\n/**\n * Props for the {@link NotificationDescription} swappable component.\n *\n * @public\n */\nexport interface NotificationDescriptionProps {\n /**\n * The plain-text description of the notification.\n */\n description: string;\n}\n\n/**\n * Swappable component that renders the description of a notification in the\n * notifications table. Apps can override this to customize how descriptions\n * are displayed.\n *\n * @public\n */\nexport const NotificationDescription =\n createSwappableComponent<NotificationDescriptionProps>({\n id: 'notifications.notification-description',\n loader: () =>\n import('./DefaultNotificationDescription').then(\n m => m.DefaultNotificationDescription,\n ),\n });\n"],"names":[],"mappings":";;AAoCO,MAAM,0BACX,wBAAA,CAAuD;AAAA,EACrD,EAAA,EAAI,wCAAA;AAAA,EACJ,MAAA,EAAQ,MACN,OAAO,yCAAkC,CAAA,CAAE,IAAA;AAAA,IACzC,OAAK,CAAA,CAAE;AAAA;AAEb,CAAC;;"}
@@ -1,18 +1,24 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { useApp } from '@backstage/core-plugin-api';
2
+ import { useApi, iconsApiRef } from '@backstage/frontend-plugin-api';
3
3
  import { SeverityIcon } from './SeverityIcon.esm.js';
4
4
 
5
+ function NotificationIconWithCustomIcon({
6
+ notification
7
+ }) {
8
+ const iconsApi = useApi(iconsApiRef);
9
+ const Icon = iconsApi.getIcon(notification.payload.icon);
10
+ if (Icon) {
11
+ return /* @__PURE__ */ jsx(Icon, {});
12
+ }
13
+ return /* @__PURE__ */ jsx(SeverityIcon, { severity: notification.payload.severity });
14
+ }
5
15
  const NotificationIcon = ({
6
16
  notification
7
17
  }) => {
8
- const app = useApp();
9
- if (notification.payload.icon) {
10
- const Icon = app.getSystemIcon(notification.payload.icon);
11
- if (Icon) {
12
- return /* @__PURE__ */ jsx(Icon, {});
13
- }
18
+ if (!notification.payload.icon) {
19
+ return /* @__PURE__ */ jsx(SeverityIcon, { severity: notification.payload.severity });
14
20
  }
15
- return /* @__PURE__ */ jsx(SeverityIcon, { severity: notification.payload.severity });
21
+ return /* @__PURE__ */ jsx(NotificationIconWithCustomIcon, { notification });
16
22
  };
17
23
 
18
24
  export { NotificationIcon };
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationIcon.esm.js","sources":["../../../src/components/NotificationsTable/NotificationIcon.tsx"],"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 { Notification } from '@backstage/plugin-notifications-common';\nimport { useApp } from '@backstage/core-plugin-api';\nimport { SeverityIcon } from './SeverityIcon';\n\nexport const NotificationIcon = ({\n notification,\n}: {\n notification: Notification;\n}) => {\n const app = useApp();\n\n if (notification.payload.icon) {\n const Icon = app.getSystemIcon(notification.payload.icon);\n if (Icon) {\n return <Icon />;\n }\n }\n return <SeverityIcon severity={notification.payload.severity} />;\n};\n"],"names":[],"mappings":";;;;AAmBO,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AACF,CAAA,KAEM;AACJ,EAAA,MAAM,MAAM,MAAA,EAAO;AAEnB,EAAA,IAAI,YAAA,CAAa,QAAQ,IAAA,EAAM;AAC7B,IAAA,MAAM,IAAA,GAAO,GAAA,CAAI,aAAA,CAAc,YAAA,CAAa,QAAQ,IAAI,CAAA;AACxD,IAAA,IAAI,IAAA,EAAM;AACR,MAAA,2BAAQ,IAAA,EAAA,EAAK,CAAA;AAAA,IACf;AAAA,EACF;AACA,EAAA,uBAAO,GAAA,CAAC,YAAA,EAAA,EAAa,QAAA,EAAU,YAAA,CAAa,QAAQ,QAAA,EAAU,CAAA;AAChE;;;;"}
1
+ {"version":3,"file":"NotificationIcon.esm.js","sources":["../../../src/components/NotificationsTable/NotificationIcon.tsx"],"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 { Notification } from '@backstage/plugin-notifications-common';\nimport { iconsApiRef, useApi } from '@backstage/frontend-plugin-api';\nimport { SeverityIcon } from './SeverityIcon';\n\nfunction NotificationIconWithCustomIcon({\n notification,\n}: {\n notification: Notification;\n}) {\n const iconsApi = useApi(iconsApiRef);\n const Icon = iconsApi.getIcon(notification.payload.icon!);\n if (Icon) {\n return <Icon />;\n }\n return <SeverityIcon severity={notification.payload.severity} />;\n}\n\nexport const NotificationIcon = ({\n notification,\n}: {\n notification: Notification;\n}) => {\n if (!notification.payload.icon) {\n return <SeverityIcon severity={notification.payload.severity} />;\n }\n\n return <NotificationIconWithCustomIcon notification={notification} />;\n};\n"],"names":[],"mappings":";;;;AAmBA,SAAS,8BAAA,CAA+B;AAAA,EACtC;AACF,CAAA,EAEG;AACD,EAAA,MAAM,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAA,MAAM,IAAA,GAAO,QAAA,CAAS,OAAA,CAAQ,YAAA,CAAa,QAAQ,IAAK,CAAA;AACxD,EAAA,IAAI,IAAA,EAAM;AACR,IAAA,2BAAQ,IAAA,EAAA,EAAK,CAAA;AAAA,EACf;AACA,EAAA,uBAAO,GAAA,CAAC,YAAA,EAAA,EAAa,QAAA,EAAU,YAAA,CAAa,QAAQ,QAAA,EAAU,CAAA;AAChE;AAEO,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AACF,CAAA,KAEM;AACJ,EAAA,IAAI,CAAC,YAAA,CAAa,OAAA,CAAQ,IAAA,EAAM;AAC9B,IAAA,uBAAO,GAAA,CAAC,YAAA,EAAA,EAAa,QAAA,EAAU,YAAA,CAAa,QAAQ,QAAA,EAAU,CAAA;AAAA,EAChE;AAEA,EAAA,uBAAO,GAAA,CAAC,kCAA+B,YAAA,EAA4B,CAAA;AACrE;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { useState, useCallback, useMemo, useEffect } from 'react';
2
+ import { useState, useCallback, useMemo, useEffect, useRef } from 'react';
3
3
  import throttle from 'lodash/throttle';
4
4
  import RelativeTime from 'react-relative-time';
5
5
  import { Checkbox, Flex, Text, Dialog, DialogHeader, DialogBody, DialogFooter, Button } from '@backstage/ui';
@@ -23,6 +23,7 @@ const NotificationsTable = ({
23
23
  markAsReadOnLinkOpen,
24
24
  isLoading,
25
25
  notifications = [],
26
+ highlightedNotificationId,
26
27
  isUnread,
27
28
  onUpdate,
28
29
  setContainsText,
@@ -101,6 +102,30 @@ const NotificationsTable = ({
101
102
  setSelectedNotifications(new Set(intersect));
102
103
  }
103
104
  }, [notifications, selectedNotifications]);
105
+ const focusedHighlightedIdRef = useRef(void 0);
106
+ useEffect(() => {
107
+ if (!highlightedNotificationId) {
108
+ focusedHighlightedIdRef.current = void 0;
109
+ return;
110
+ }
111
+ if (focusedHighlightedIdRef.current === highlightedNotificationId) {
112
+ return;
113
+ }
114
+ const highlightedElement = document.getElementById(
115
+ `notification-${highlightedNotificationId}`
116
+ );
117
+ if (!highlightedElement) {
118
+ return;
119
+ }
120
+ if (typeof highlightedElement.scrollIntoView === "function") {
121
+ highlightedElement.scrollIntoView({
122
+ behavior: "smooth",
123
+ block: "center"
124
+ });
125
+ }
126
+ highlightedElement.focus({ preventScroll: true });
127
+ focusedHighlightedIdRef.current = highlightedNotificationId;
128
+ }, [highlightedNotificationId, notifications]);
104
129
  const compactColumns = useMemo(() => {
105
130
  const showToolbar = notifications.length > 0;
106
131
  return [
@@ -133,47 +158,56 @@ const NotificationsTable = ({
133
158
  customFilterAndSearch: () => true,
134
159
  cellStyle: { paddingLeft: 0 },
135
160
  render: (notification) => {
136
- return /* @__PURE__ */ jsxs(Flex, { gap: "4", align: "center", children: [
137
- /* @__PURE__ */ jsx("div", { className: styles.severityItem, children: /* @__PURE__ */ jsx(NotificationIcon, { notification }) }),
138
- /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "1", children: [
139
- /* @__PURE__ */ jsx(Text, { variant: "body-medium", children: notification.payload.link ? /* @__PURE__ */ jsx(
140
- Link,
141
- {
142
- to: notification.payload.link,
143
- onClick: () => {
144
- if (markAsReadOnLinkOpen && !notification.read) {
145
- onSwitchReadStatus([notification.id], true);
161
+ const isHighlighted = highlightedNotificationId === notification.id;
162
+ return /* @__PURE__ */ jsx(
163
+ "div",
164
+ {
165
+ id: `notification-${notification.id}`,
166
+ tabIndex: isHighlighted ? -1 : void 0,
167
+ className: isHighlighted ? styles.highlightedNotification : void 0,
168
+ children: /* @__PURE__ */ jsxs(Flex, { gap: "4", align: "center", children: [
169
+ /* @__PURE__ */ jsx("div", { className: styles.severityItem, children: /* @__PURE__ */ jsx(NotificationIcon, { notification }) }),
170
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "1", children: [
171
+ /* @__PURE__ */ jsx(Text, { variant: "body-medium", children: notification.payload.link ? /* @__PURE__ */ jsx(
172
+ Link,
173
+ {
174
+ to: notification.payload.link,
175
+ onClick: () => {
176
+ if (markAsReadOnLinkOpen && !notification.read) {
177
+ onSwitchReadStatus([notification.id], true);
178
+ }
179
+ },
180
+ children: notification.payload.title
181
+ }
182
+ ) : notification.payload.title }),
183
+ notification.payload.description ? /* @__PURE__ */ jsx(
184
+ NotificationDescription,
185
+ {
186
+ description: notification.payload.description
146
187
  }
147
- },
148
- children: notification.payload.title
149
- }
150
- ) : notification.payload.title }),
151
- notification.payload.description ? /* @__PURE__ */ jsx(
152
- NotificationDescription,
153
- {
154
- description: notification.payload.description
155
- }
156
- ) : null,
157
- /* @__PURE__ */ jsxs(Text, { variant: "body-small", color: "secondary", children: [
158
- !notification.user && /* @__PURE__ */ jsx(RiRssFill, { size: 14, className: styles.broadcastIcon }),
159
- notification.origin && /* @__PURE__ */ jsxs(Fragment, { children: [
160
- /* @__PURE__ */ jsx("span", { className: styles.notificationInfoRow, children: notification.origin }),
161
- "\u2022"
162
- ] }),
163
- notification.payload.topic && /* @__PURE__ */ jsxs(Fragment, { children: [
164
- /* @__PURE__ */ jsx("span", { className: styles.notificationInfoRow, children: notification.payload.topic }),
165
- "\u2022"
166
- ] }),
167
- notification.created && /* @__PURE__ */ jsx(
168
- RelativeTime,
169
- {
170
- value: notification.created,
171
- className: styles.notificationInfoRow
172
- }
173
- )
188
+ ) : null,
189
+ /* @__PURE__ */ jsxs(Text, { variant: "body-small", color: "secondary", children: [
190
+ !notification.user && /* @__PURE__ */ jsx(RiRssFill, { size: 14, className: styles.broadcastIcon }),
191
+ notification.origin && /* @__PURE__ */ jsxs(Fragment, { children: [
192
+ /* @__PURE__ */ jsx("span", { className: styles.notificationInfoRow, children: notification.origin }),
193
+ "\u2022"
194
+ ] }),
195
+ notification.payload.topic && /* @__PURE__ */ jsxs(Fragment, { children: [
196
+ /* @__PURE__ */ jsx("span", { className: styles.notificationInfoRow, children: notification.payload.topic }),
197
+ "\u2022"
198
+ ] }),
199
+ notification.created && /* @__PURE__ */ jsx(
200
+ RelativeTime,
201
+ {
202
+ value: notification.created,
203
+ className: styles.notificationInfoRow
204
+ }
205
+ )
206
+ ] })
207
+ ] })
174
208
  ] })
175
- ] })
176
- ] });
209
+ }
210
+ );
177
211
  }
178
212
  },
179
213
  {
@@ -209,7 +243,8 @@ const NotificationsTable = ({
209
243
  onSwitchSavedStatus,
210
244
  onMarkAllRead,
211
245
  onNotificationsSelectChange,
212
- markAsReadOnLinkOpen
246
+ markAsReadOnLinkOpen,
247
+ highlightedNotificationId
213
248
  ]);
214
249
  return /* @__PURE__ */ jsxs(Fragment, { children: [
215
250
  /* @__PURE__ */ jsx(
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsTable.esm.js","sources":["../../../src/components/NotificationsTable/NotificationsTable.tsx"],"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 { useCallback, useEffect, useMemo, useState } from 'react';\nimport throttle from 'lodash/throttle';\n// @ts-ignore\nimport RelativeTime from 'react-relative-time';\nimport { Notification } from '@backstage/plugin-notifications-common';\nimport {\n Button,\n Checkbox,\n Dialog,\n DialogBody,\n DialogFooter,\n DialogHeader,\n Flex,\n Text,\n} from '@backstage/ui';\nimport { RiRssFill } from '@remixicon/react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { toastApiRef } from '@backstage/frontend-plugin-api';\nimport {\n Link,\n Table,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { notificationsTranslationRef } from '../../translation';\n\nimport { notificationsApiRef } from '../../api';\nimport { SelectAll } from './SelectAll';\nimport { BulkActions } from './BulkActions';\nimport { NotificationIcon } from './NotificationIcon';\nimport { NotificationDescription } from './NotificationDescription';\n\nimport styles from './NotificationsTable.module.css';\n\nconst ThrottleDelayMs = 1000;\n\n/** @public */\nexport type NotificationsTableProps = Pick<\n TableProps,\n 'onPageChange' | 'onRowsPerPageChange' | 'page' | 'totalCount' | 'title'\n> & {\n markAsReadOnLinkOpen?: boolean;\n isLoading?: boolean;\n isUnread: boolean;\n notifications?: Notification[];\n onUpdate: () => void;\n setContainsText: (search: string) => void;\n pageSize: number;\n};\n\n/** @public */\nexport const NotificationsTable = ({\n title,\n markAsReadOnLinkOpen,\n isLoading,\n notifications = [],\n isUnread,\n onUpdate,\n setContainsText,\n onPageChange,\n onRowsPerPageChange,\n page,\n pageSize,\n totalCount,\n}: NotificationsTableProps) => {\n const { t } = useTranslationRef(notificationsTranslationRef);\n const notificationsApi = useApi(notificationsApiRef);\n const toastApi = useApi(toastApiRef);\n const [confirmDialogOpen, setConfirmDialogOpen] = useState(false);\n\n const [selectedNotifications, setSelectedNotifications] = useState(\n new Set<Notification['id']>(),\n );\n\n const onNotificationsSelectChange = useCallback(\n (ids: Notification['id'][], checked: boolean) => {\n let newSelect: Set<Notification['id']>;\n if (checked) {\n newSelect = new Set([...selectedNotifications, ...ids]);\n } else {\n newSelect = new Set(selectedNotifications);\n ids.forEach(id => newSelect.delete(id));\n }\n setSelectedNotifications(newSelect);\n },\n [selectedNotifications, setSelectedNotifications],\n );\n\n const onSwitchReadStatus = useCallback(\n (ids: Notification['id'][], newStatus: boolean) => {\n notificationsApi\n .updateNotifications({\n ids,\n read: newStatus,\n })\n .then(onUpdate);\n },\n [notificationsApi, onUpdate],\n );\n\n const onSwitchSavedStatus = useCallback(\n (ids: Notification['id'][], newStatus: boolean) => {\n notificationsApi\n .updateNotifications({\n ids,\n saved: newStatus,\n })\n .then(onUpdate);\n },\n [notificationsApi, onUpdate],\n );\n\n const doMarkAllRead = useCallback(async () => {\n setConfirmDialogOpen(false);\n try {\n const result = await notificationsApi.getNotifications({ read: false });\n const ids =\n result.notifications?.map(notification => notification.id) ?? [];\n if (ids.length === 0) return;\n await notificationsApi.updateNotifications({ ids, read: true });\n onUpdate();\n } catch {\n toastApi.post({\n title: t('table.errors.markAllReadFailed'),\n status: 'danger',\n });\n }\n }, [notificationsApi, onUpdate, toastApi, t]);\n\n const onMarkAllRead = useCallback(() => {\n setConfirmDialogOpen(true);\n }, []);\n\n const throttledContainsTextHandler = useMemo(\n () => throttle(setContainsText, ThrottleDelayMs),\n [setContainsText],\n );\n\n useEffect(() => {\n const allShownIds = new Set(notifications.map(n => n.id));\n const intersect = [...selectedNotifications].filter(id =>\n allShownIds.has(id),\n );\n if (selectedNotifications.size !== intersect.length) {\n setSelectedNotifications(new Set(intersect));\n }\n }, [notifications, selectedNotifications]);\n\n const compactColumns = useMemo((): TableColumn<Notification>[] => {\n const showToolbar = notifications.length > 0;\n return [\n {\n /* selection column */\n width: '1rem',\n cellStyle: { paddingRight: '2.5rem' },\n title: showToolbar ? (\n <SelectAll\n count={selectedNotifications.size}\n totalCount={notifications.length}\n onSelectAll={() =>\n onNotificationsSelectChange(\n notifications.map(notification => notification.id),\n selectedNotifications.size !== notifications.length,\n )\n }\n />\n ) : undefined,\n render: (notification: Notification) => (\n <Checkbox\n aria-label=\"Select notification\"\n isSelected={selectedNotifications.has(notification.id)}\n onChange={checked =>\n onNotificationsSelectChange([notification.id], checked)\n }\n />\n ),\n },\n {\n /* compact-data column */\n customFilterAndSearch: () =>\n true /* Keep sorting&filtering on backend due to pagination. */,\n cellStyle: { paddingLeft: 0 },\n render: (notification: Notification) => {\n // Compact content\n return (\n <Flex gap=\"4\" align=\"center\">\n <div className={styles.severityItem}>\n <NotificationIcon notification={notification} />\n </div>\n <Flex direction=\"column\" gap=\"1\">\n <Text variant=\"body-medium\">\n {notification.payload.link ? (\n <Link\n to={notification.payload.link}\n onClick={() => {\n if (markAsReadOnLinkOpen && !notification.read) {\n onSwitchReadStatus([notification.id], true);\n }\n }}\n >\n {notification.payload.title}\n </Link>\n ) : (\n notification.payload.title\n )}\n </Text>\n {notification.payload.description ? (\n <NotificationDescription\n description={notification.payload.description}\n />\n ) : null}\n\n <Text variant=\"body-small\" color=\"secondary\">\n {!notification.user && (\n <RiRssFill size={14} className={styles.broadcastIcon} />\n )}\n {notification.origin && (\n <>\n <span className={styles.notificationInfoRow}>\n {notification.origin}\n </span>\n &bull;\n </>\n )}\n {notification.payload.topic && (\n <>\n <span className={styles.notificationInfoRow}>\n {notification.payload.topic}\n </span>\n &bull;\n </>\n )}\n {notification.created && (\n <RelativeTime\n value={notification.created}\n className={styles.notificationInfoRow}\n />\n )}\n </Text>\n </Flex>\n </Flex>\n );\n },\n },\n {\n /* actions column */\n width: '1rem',\n title: showToolbar ? (\n <BulkActions\n notifications={notifications}\n selectedNotifications={selectedNotifications}\n isUnread={isUnread}\n onSwitchReadStatus={onSwitchReadStatus}\n onSwitchSavedStatus={onSwitchSavedStatus}\n onMarkAllRead={onMarkAllRead}\n />\n ) : undefined,\n render: (notification: Notification) => (\n <BulkActions\n notifications={[notification]}\n selectedNotifications={new Set([notification.id])}\n onSwitchReadStatus={onSwitchReadStatus}\n onSwitchSavedStatus={onSwitchSavedStatus}\n />\n ),\n },\n ];\n }, [\n notifications,\n selectedNotifications,\n isUnread,\n onSwitchReadStatus,\n onSwitchSavedStatus,\n onMarkAllRead,\n onNotificationsSelectChange,\n markAsReadOnLinkOpen,\n ]);\n\n return (\n <>\n <Table<Notification>\n isLoading={isLoading}\n options={{\n padding: 'dense',\n search: true,\n paging: true,\n pageSize,\n header: true,\n sorting: false,\n }}\n title={title}\n onPageChange={onPageChange}\n onRowsPerPageChange={onRowsPerPageChange}\n page={page}\n totalCount={totalCount}\n onSearchChange={throttledContainsTextHandler}\n data={notifications}\n columns={compactColumns}\n localization={{\n body: {\n emptyDataSourceMessage: t('table.emptyMessage'),\n },\n pagination: {\n firstTooltip: t('table.pagination.firstTooltip'),\n labelDisplayedRows: t('table.pagination.labelDisplayedRows'),\n labelRowsSelect: t('table.pagination.labelRowsSelect'),\n lastTooltip: t('table.pagination.lastTooltip'),\n nextTooltip: t('table.pagination.nextTooltip'),\n previousTooltip: t('table.pagination.previousTooltip'),\n },\n }}\n />\n <Dialog\n isOpen={confirmDialogOpen}\n onOpenChange={setConfirmDialogOpen}\n isDismissable\n >\n <DialogHeader>{t('table.confirmDialog.title')}</DialogHeader>\n <DialogBody>\n <Text variant=\"body-medium\">\n {t('table.confirmDialog.markAllReadDescription')}\n </Text>\n </DialogBody>\n <DialogFooter>\n <Button variant=\"primary\" onPress={doMarkAllRead}>\n {t('table.confirmDialog.markAllReadConfirmation')}\n </Button>\n <Button variant=\"secondary\" slot=\"close\">\n {t('table.confirmDialog.cancel')}\n </Button>\n </DialogFooter>\n </Dialog>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAkDA,MAAM,eAAA,GAAkB,GAAA;AAiBjB,MAAM,qBAAqB,CAAC;AAAA,EACjC,KAAA;AAAA,EACA,oBAAA;AAAA,EACA,SAAA;AAAA,EACA,gBAAgB,EAAC;AAAA,EACjB,QAAA;AAAA,EACA,QAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,mBAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF,CAAA,KAA+B;AAC7B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,2BAA2B,CAAA;AAC3D,EAAA,MAAM,gBAAA,GAAmB,OAAO,mBAAmB,CAAA;AACnD,EAAA,MAAM,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAA,MAAM,CAAC,iBAAA,EAAmB,oBAAoB,CAAA,GAAI,SAAS,KAAK,CAAA;AAEhE,EAAA,MAAM,CAAC,qBAAA,EAAuB,wBAAwB,CAAA,GAAI,QAAA;AAAA,wBACpD,GAAA;AAAwB,GAC9B;AAEA,EAAA,MAAM,2BAAA,GAA8B,WAAA;AAAA,IAClC,CAAC,KAA2B,OAAA,KAAqB;AAC/C,MAAA,IAAI,SAAA;AACJ,MAAA,IAAI,OAAA,EAAS;AACX,QAAA,SAAA,uBAAgB,GAAA,CAAI,CAAC,GAAG,qBAAA,EAAuB,GAAG,GAAG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EAAA,CAAA,CAAE,4BAA4B,CAAA,EACjC;AAAA,WAAA,EACF;AAAA;AAAA;AAAA;AACF,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"NotificationsTable.esm.js","sources":["../../../src/components/NotificationsTable/NotificationsTable.tsx"],"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 { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport throttle from 'lodash/throttle';\n// @ts-ignore\nimport RelativeTime from 'react-relative-time';\nimport { Notification } from '@backstage/plugin-notifications-common';\nimport {\n Button,\n Checkbox,\n Dialog,\n DialogBody,\n DialogFooter,\n DialogHeader,\n Flex,\n Text,\n} from '@backstage/ui';\nimport { RiRssFill } from '@remixicon/react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { toastApiRef } from '@backstage/frontend-plugin-api';\nimport {\n Link,\n Table,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { notificationsTranslationRef } from '../../translation';\n\nimport { notificationsApiRef } from '../../api';\nimport { SelectAll } from './SelectAll';\nimport { BulkActions } from './BulkActions';\nimport { NotificationIcon } from './NotificationIcon';\nimport { NotificationDescription } from './NotificationDescription';\n\nimport styles from './NotificationsTable.module.css';\n\nconst ThrottleDelayMs = 1000;\n\n/** @public */\nexport type NotificationsTableProps = Pick<\n TableProps,\n 'onPageChange' | 'onRowsPerPageChange' | 'page' | 'totalCount' | 'title'\n> & {\n markAsReadOnLinkOpen?: boolean;\n isLoading?: boolean;\n isUnread: boolean;\n notifications?: Notification[];\n highlightedNotificationId?: string;\n onUpdate: () => void;\n setContainsText: (search: string) => void;\n pageSize: number;\n};\n\n/** @public */\nexport const NotificationsTable = ({\n title,\n markAsReadOnLinkOpen,\n isLoading,\n notifications = [],\n highlightedNotificationId,\n isUnread,\n onUpdate,\n setContainsText,\n onPageChange,\n onRowsPerPageChange,\n page,\n pageSize,\n totalCount,\n}: NotificationsTableProps) => {\n const { t } = useTranslationRef(notificationsTranslationRef);\n const notificationsApi = useApi(notificationsApiRef);\n const toastApi = useApi(toastApiRef);\n const [confirmDialogOpen, setConfirmDialogOpen] = useState(false);\n\n const [selectedNotifications, setSelectedNotifications] = useState(\n new Set<Notification['id']>(),\n );\n\n const onNotificationsSelectChange = useCallback(\n (ids: Notification['id'][], checked: boolean) => {\n let newSelect: Set<Notification['id']>;\n if (checked) {\n newSelect = new Set([...selectedNotifications, ...ids]);\n } else {\n newSelect = new Set(selectedNotifications);\n ids.forEach(id => newSelect.delete(id));\n }\n setSelectedNotifications(newSelect);\n },\n [selectedNotifications, setSelectedNotifications],\n );\n\n const onSwitchReadStatus = useCallback(\n (ids: Notification['id'][], newStatus: boolean) => {\n notificationsApi\n .updateNotifications({\n ids,\n read: newStatus,\n })\n .then(onUpdate);\n },\n [notificationsApi, onUpdate],\n );\n\n const onSwitchSavedStatus = useCallback(\n (ids: Notification['id'][], newStatus: boolean) => {\n notificationsApi\n .updateNotifications({\n ids,\n saved: newStatus,\n })\n .then(onUpdate);\n },\n [notificationsApi, onUpdate],\n );\n\n const doMarkAllRead = useCallback(async () => {\n setConfirmDialogOpen(false);\n try {\n const result = await notificationsApi.getNotifications({ read: false });\n const ids =\n result.notifications?.map(notification => notification.id) ?? [];\n if (ids.length === 0) return;\n await notificationsApi.updateNotifications({ ids, read: true });\n onUpdate();\n } catch {\n toastApi.post({\n title: t('table.errors.markAllReadFailed'),\n status: 'danger',\n });\n }\n }, [notificationsApi, onUpdate, toastApi, t]);\n\n const onMarkAllRead = useCallback(() => {\n setConfirmDialogOpen(true);\n }, []);\n\n const throttledContainsTextHandler = useMemo(\n () => throttle(setContainsText, ThrottleDelayMs),\n [setContainsText],\n );\n\n useEffect(() => {\n const allShownIds = new Set(notifications.map(n => n.id));\n const intersect = [...selectedNotifications].filter(id =>\n allShownIds.has(id),\n );\n if (selectedNotifications.size !== intersect.length) {\n setSelectedNotifications(new Set(intersect));\n }\n }, [notifications, selectedNotifications]);\n\n const focusedHighlightedIdRef = useRef<string | undefined>(undefined);\n\n useEffect(() => {\n if (!highlightedNotificationId) {\n focusedHighlightedIdRef.current = undefined;\n return;\n }\n\n // Only scroll/focus once per deep-linked id so refreshes don't steal focus.\n if (focusedHighlightedIdRef.current === highlightedNotificationId) {\n return;\n }\n\n const highlightedElement = document.getElementById(\n `notification-${highlightedNotificationId}`,\n );\n if (!highlightedElement) {\n return;\n }\n\n if (typeof highlightedElement.scrollIntoView === 'function') {\n highlightedElement.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n });\n }\n highlightedElement.focus({ preventScroll: true });\n focusedHighlightedIdRef.current = highlightedNotificationId;\n }, [highlightedNotificationId, notifications]);\n\n const compactColumns = useMemo((): TableColumn<Notification>[] => {\n const showToolbar = notifications.length > 0;\n return [\n {\n /* selection column */\n width: '1rem',\n cellStyle: { paddingRight: '2.5rem' },\n title: showToolbar ? (\n <SelectAll\n count={selectedNotifications.size}\n totalCount={notifications.length}\n onSelectAll={() =>\n onNotificationsSelectChange(\n notifications.map(notification => notification.id),\n selectedNotifications.size !== notifications.length,\n )\n }\n />\n ) : undefined,\n render: (notification: Notification) => (\n <Checkbox\n aria-label=\"Select notification\"\n isSelected={selectedNotifications.has(notification.id)}\n onChange={checked =>\n onNotificationsSelectChange([notification.id], checked)\n }\n />\n ),\n },\n {\n /* compact-data column */\n customFilterAndSearch: () =>\n true /* Keep sorting&filtering on backend due to pagination. */,\n cellStyle: { paddingLeft: 0 },\n render: (notification: Notification) => {\n const isHighlighted = highlightedNotificationId === notification.id;\n // Compact content\n return (\n <div\n id={`notification-${notification.id}`}\n tabIndex={isHighlighted ? -1 : undefined}\n className={\n isHighlighted ? styles.highlightedNotification : undefined\n }\n >\n <Flex gap=\"4\" align=\"center\">\n <div className={styles.severityItem}>\n <NotificationIcon notification={notification} />\n </div>\n <Flex direction=\"column\" gap=\"1\">\n <Text variant=\"body-medium\">\n {notification.payload.link ? (\n <Link\n to={notification.payload.link}\n onClick={() => {\n if (markAsReadOnLinkOpen && !notification.read) {\n onSwitchReadStatus([notification.id], true);\n }\n }}\n >\n {notification.payload.title}\n </Link>\n ) : (\n notification.payload.title\n )}\n </Text>\n {notification.payload.description ? (\n <NotificationDescription\n description={notification.payload.description}\n />\n ) : null}\n\n <Text variant=\"body-small\" color=\"secondary\">\n {!notification.user && (\n <RiRssFill size={14} className={styles.broadcastIcon} />\n )}\n {notification.origin && (\n <>\n <span className={styles.notificationInfoRow}>\n {notification.origin}\n </span>\n &bull;\n </>\n )}\n {notification.payload.topic && (\n <>\n <span className={styles.notificationInfoRow}>\n {notification.payload.topic}\n </span>\n &bull;\n </>\n )}\n {notification.created && (\n <RelativeTime\n value={notification.created}\n className={styles.notificationInfoRow}\n />\n )}\n </Text>\n </Flex>\n </Flex>\n </div>\n );\n },\n },\n {\n /* actions column */\n width: '1rem',\n title: showToolbar ? (\n <BulkActions\n notifications={notifications}\n selectedNotifications={selectedNotifications}\n isUnread={isUnread}\n onSwitchReadStatus={onSwitchReadStatus}\n onSwitchSavedStatus={onSwitchSavedStatus}\n onMarkAllRead={onMarkAllRead}\n />\n ) : undefined,\n render: (notification: Notification) => (\n <BulkActions\n notifications={[notification]}\n selectedNotifications={new Set([notification.id])}\n onSwitchReadStatus={onSwitchReadStatus}\n onSwitchSavedStatus={onSwitchSavedStatus}\n />\n ),\n },\n ];\n }, [\n notifications,\n selectedNotifications,\n isUnread,\n onSwitchReadStatus,\n onSwitchSavedStatus,\n onMarkAllRead,\n onNotificationsSelectChange,\n markAsReadOnLinkOpen,\n highlightedNotificationId,\n ]);\n\n return (\n <>\n <Table<Notification>\n isLoading={isLoading}\n options={{\n padding: 'dense',\n search: true,\n paging: true,\n pageSize,\n header: true,\n sorting: false,\n }}\n title={title}\n onPageChange={onPageChange}\n onRowsPerPageChange={onRowsPerPageChange}\n page={page}\n totalCount={totalCount}\n onSearchChange={throttledContainsTextHandler}\n data={notifications}\n columns={compactColumns}\n localization={{\n body: {\n emptyDataSourceMessage: t('table.emptyMessage'),\n },\n pagination: {\n firstTooltip: t('table.pagination.firstTooltip'),\n labelDisplayedRows: t('table.pagination.labelDisplayedRows'),\n labelRowsSelect: t('table.pagination.labelRowsSelect'),\n lastTooltip: t('table.pagination.lastTooltip'),\n nextTooltip: t('table.pagination.nextTooltip'),\n previousTooltip: t('table.pagination.previousTooltip'),\n },\n }}\n />\n <Dialog\n isOpen={confirmDialogOpen}\n onOpenChange={setConfirmDialogOpen}\n isDismissable\n >\n <DialogHeader>{t('table.confirmDialog.title')}</DialogHeader>\n <DialogBody>\n <Text variant=\"body-medium\">\n {t('table.confirmDialog.markAllReadDescription')}\n </Text>\n </DialogBody>\n <DialogFooter>\n <Button variant=\"primary\" onPress={doMarkAllRead}>\n {t('table.confirmDialog.markAllReadConfirmation')}\n </Button>\n <Button variant=\"secondary\" slot=\"close\">\n {t('table.confirmDialog.cancel')}\n </Button>\n </DialogFooter>\n </Dialog>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAkDA,MAAM,eAAA,GAAkB,GAAA;AAkBjB,MAAM,qBAAqB,CAAC;AAAA,EACjC,KAAA;AAAA,EACA,oBAAA;AAAA,EACA,SAAA;AAAA,EACA,gBAAgB,EAAC;AAAA,EACjB,yBAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,mBAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF,CAAA,KAA+B;AAC7B,EAAA,MAAM,EAAE,CAA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E,2BAA2B,CAAA,EAAE,CAAA;AAAA,0BAC9C,GAAA,CAAC,cACC,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,SAAQ,aAAA,EACX,QAAA,EAAA,CAAA,CAAE,4CAA4C,CAAA,EACjD,CAAA,EACF,CAAA;AAAA,+BACC,YAAA,EAAA,EACC,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,UAAO,OAAA,EAAQ,SAAA,EAAU,SAAS,aAAA,EAChC,QAAA,EAAA,CAAA,CAAE,6CAA6C,CAAA,EAClD,CAAA;AAAA,4BACA,GAAA,CAAC,UAAO,OAAA,EAAQ,WAAA,EAAY,MAAK,OAAA,EAC9B,QAAA,EAAA,CAAA,CAAE,4BAA4B,CAAA,EACjC;AAAA,WAAA,EACF;AAAA;AAAA;AAAA;AACF,GAAA,EACF,CAAA;AAEJ;;"}
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\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 */\n\n@layer components {\n .NotificationsTable_severityItem__f46e23ec09 {\n align-content: center;\n display: flex;\n align-items: center;\n }\n\n .NotificationsTable_broadcastIcon__f46e23ec09 {\n font-size: 1rem;\n vertical-align: text-bottom;\n }\n\n .NotificationsTable_notificationInfoRow__f46e23ec09 {\n margin-right: var(--bui-space-1);\n }\n\n .NotificationsTable_notificationInfoRow__f46e23ec09:not(:first-child) {\n margin-left: var(--bui-space-1);\n }\n}\n";
4
- var styles = {"severityItem":"NotificationsTable_severityItem__f46e23ec09","broadcastIcon":"NotificationsTable_broadcastIcon__f46e23ec09","notificationInfoRow":"NotificationsTable_notificationInfoRow__f46e23ec09"};
3
+ var css_248z = "/*\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 */\n\n@layer components {\n .NotificationsTable_severityItem__ec8df2aec9 {\n align-content: center;\n display: flex;\n align-items: center;\n }\n\n .NotificationsTable_broadcastIcon__ec8df2aec9 {\n font-size: 1rem;\n vertical-align: text-bottom;\n }\n\n .NotificationsTable_notificationInfoRow__ec8df2aec9 {\n margin-right: var(--bui-space-1);\n }\n\n .NotificationsTable_notificationInfoRow__ec8df2aec9:not(:first-child) {\n margin-left: var(--bui-space-1);\n }\n\n .NotificationsTable_highlightedNotification__ec8df2aec9 {\n background-color: var(--bui-color-bg-surface-hover, rgba(0, 0, 0, 0.04));\n border-radius: var(--bui-radius-2, 4px);\n padding: var(--bui-space-2, 8px);\n margin: calc(var(--bui-space-2, 8px) * -1);\n outline: 2px solid var(--bui-color-border-primary, #1f5493);\n outline-offset: var(--bui-space-1, 4px);\n }\n}\n";
4
+ var styles = {"severityItem":"NotificationsTable_severityItem__ec8df2aec9","broadcastIcon":"NotificationsTable_broadcastIcon__ec8df2aec9","notificationInfoRow":"NotificationsTable_notificationInfoRow__ec8df2aec9","highlightedNotification":"NotificationsTable_highlightedNotification__ec8df2aec9"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsTable.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"NotificationsTable.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAll.esm.js","sources":["../../../src/components/NotificationsTable/SelectAll.tsx"],"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 { Checkbox, Tooltip, TooltipTrigger } from '@backstage/ui';\nimport styles from './SelectAll.module.css';\n\nexport const SelectAll = ({\n count,\n totalCount,\n onSelectAll,\n}: {\n count: number;\n totalCount: number;\n onSelectAll: () => void;\n}) => {\n return (\n <TooltipTrigger>\n <Checkbox\n className={styles.label}\n aria-label=\"Select all\"\n isDisabled={!totalCount}\n isSelected={count > 0}\n isIndeterminate={count > 0 && totalCount !== count}\n onChange={() => onSelectAll()}\n >\n {count > 0 ? `(${count})` : undefined}\n </Checkbox>\n <Tooltip>Select all</Tooltip>\n </TooltipTrigger>\n );\n};\n"],"names":[],"mappings":";;;;AAkBO,MAAM,YAAY,CAAC;AAAA,EACxB,KAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,4BACG,cAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,WAAW,MAAA,CAAO,KAAA;AAAA,QAClB,YAAA,EAAW,YAAA;AAAA,QACX,YAAY,CAAC,UAAA;AAAA,QACb,YAAY,KAAA,GAAQ,CAAA;AAAA,QACpB,eAAA,EAAiB,KAAA,GAAQ,CAAA,IAAK,UAAA,KAAe,KAAA;AAAA,QAC7C,QAAA,EAAU,MAAM,WAAA,EAAY;AAAA,QAE3B,QAAA,EAAA,KAAA,GAAQ,CAAA,GAAI,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA,CAAA,GAAM;AAAA;AAAA,KAC9B;AAAA,oBACA,GAAA,CAAC,WAAQ,QAAA,EAAA,YAAA,EAAU;AAAA,GAAA,EACrB,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"SelectAll.esm.js","sources":["../../../src/components/NotificationsTable/SelectAll.tsx"],"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 { Checkbox, Tooltip, TooltipTrigger } from '@backstage/ui';\nimport styles from './SelectAll.module.css';\n\nexport const SelectAll = ({\n count,\n totalCount,\n onSelectAll,\n}: {\n count: number;\n totalCount: number;\n onSelectAll: () => void;\n}) => {\n return (\n <TooltipTrigger>\n <Checkbox\n className={styles.label}\n aria-label=\"Select all\"\n isDisabled={!totalCount}\n isSelected={count > 0}\n isIndeterminate={count > 0 && totalCount !== count}\n onChange={() => onSelectAll()}\n >\n {count > 0 ? `(${count})` : undefined}\n </Checkbox>\n <Tooltip>Select all</Tooltip>\n </TooltipTrigger>\n );\n};\n"],"names":[],"mappings":";;;;AAkBO,MAAM,YAAY,CAAC;AAAA,EACxB,KAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,4BACG,cAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,WAAW,MAAA,CAAO,KAAA;AAAA,QAClB,YAAA,EAAW,YAAA;AAAA,QACX,YAAY,CAAC,UAAA;AAAA,QACb,YAAY,KAAA,GAAQ,CAAA;AAAA,QACpB,eAAA,EAAiB,KAAA,GAAQ,CAAA,IAAK,UAAA,KAAe,KAAA;AAAA,QAC7C,QAAA,EAAU,MAAM,WAAA,EAAY;AAAA,QAE3B,QAAA,EAAA,KAAA,GAAQ,CAAA,GAAI,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA,CAAA,GAAM;AAAA;AAAA,KAC9B;AAAA,oBACA,GAAA,CAAC,WAAQ,QAAA,EAAA,YAAA,EAAU;AAAA,GAAA,EACrB,CAAA;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAll.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"SelectAll.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SeverityIcon.esm.js","sources":["../../../src/components/NotificationsTable/SeverityIcon.tsx"],"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 { NotificationSeverity } from '@backstage/plugin-notifications-common';\nimport {\n RiCheckLine,\n RiErrorWarningLine,\n RiAlertLine,\n RiInformationLine,\n} from '@remixicon/react';\nimport styles from './SeverityIcon.module.css';\n\nexport const SeverityIcon = ({\n severity,\n className,\n style,\n}: {\n severity?: NotificationSeverity;\n className?: string;\n style?: React.CSSProperties;\n}) => {\n switch (severity) {\n case 'critical':\n return (\n <RiErrorWarningLine\n size={20}\n className={[styles.critical, className].filter(Boolean).join(' ')}\n style={style}\n />\n );\n case 'high':\n return (\n <RiAlertLine\n size={20}\n className={[styles.high, className].filter(Boolean).join(' ')}\n style={style}\n />\n );\n case 'low':\n return (\n <RiInformationLine\n size={20}\n className={[styles.low, className].filter(Boolean).join(' ')}\n style={style}\n />\n );\n case 'normal':\n default:\n return (\n <RiCheckLine\n size={20}\n className={[styles.normal, className].filter(Boolean).join(' ')}\n style={style}\n />\n );\n }\n};\n"],"names":[],"mappings":";;;;AAwBO,MAAM,eAAe,CAAC;AAAA,EAC3B,QAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,QAAQ,QAAA;AAAU,IAChB,KAAK,UAAA;AACH,MAAA,uBACE,GAAA;AAAA,QAAC,kBAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAM,EAAA;AAAA,UACN,SAAA,EAAW,CAAC,MAAA,CAAO,QAAA,EAAU,SAAS,EAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAAA,UAChE;AAAA;AAAA,OACF;AAAA,IAEJ,KAAK,MAAA;AACH,MAAA,uBACE,GAAA;AAAA,QAAC,WAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAM,EAAA;AAAA,UACN,SAAA,EAAW,CAAC,MAAA,CAAO,IAAA,EAAM,SAAS,EAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAAA,UAC5D;AAAA;AAAA,OACF;AAAA,IAEJ,KAAK,KAAA;AACH,MAAA,uBACE,GAAA;AAAA,QAAC,iBAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAM,EAAA;AAAA,UACN,SAAA,EAAW,CAAC,MAAA,CAAO,GAAA,EAAK,SAAS,EAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAAA,UAC3D;AAAA;AAAA,OACF;AAAA,IAEJ,KAAK,QAAA;AAAA,IACL;AACE,MAAA,uBACE,GAAA;AAAA,QAAC,WAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAM,EAAA;AAAA,UACN,SAAA,EAAW,CAAC,MAAA,CAAO,MAAA,EAAQ,SAAS,EAAE,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAAA,UAC9D;AAAA;AAAA,OACF;AAAA;AAGR;;;;"}
1
+ {"version":3,"file":"SeverityIcon.esm.js","sources":["../../../src/components/NotificationsTable/SeverityIcon.tsx"],"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 { NotificationSeverity } from '@backstage/plugin-notifications-common';\nimport {\n RiCheckLine,\n RiErrorWarningLine,\n RiAlertLine,\n RiInformationLine,\n} from '@remixicon/react';\nimport styles from './SeverityIcon.module.css';\n\nexport const SeverityIcon = ({\n severity,\n className,\n style,\n}: {\n severity?: NotificationSeverity;\n className?: string;\n style?: React.CSSProperties;\n}) => {\n switch (severity) {\n case 'critical':\n return (\n <RiErrorWarningLine\n size={20}\n className={[styles.critical, className].filter(Boolean).join(' ')}\n style={style}\n />\n );\n case 'high':\n return (\n <RiAlertLine\n size={20}\n className={[styles.high, className].filter(Boolean).join(' ')}\n style={style}\n />\n );\n case 'low':\n return (\n <RiInformationLine\n size={20}\n className={[styles.low, className].filter(Boolean).join(' ')}\n style={style}\n />\n );\n case 'normal':\n default:\n return (\n <RiCheckLine\n size={20}\n className={[styles.normal, className].filter(Boolean).join(' ')}\n style={style}\n />\n );\n }\n};\n"],"names":[],"mappings":";;;;AAwBO,MAAM,eAAe,CAAC;AAAA,EA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 {"version":3,"file":"SeverityIcon.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}