@backstage/plugin-notifications 0.5.15-next.0 → 0.5.15

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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # @backstage/plugin-notifications
2
2
 
3
+ ## 0.5.15
4
+
5
+ ### Patch Changes
6
+
7
+ - aa29b50: New frontend system pages now use the default plugin header together with `HeaderPage` instead of the legacy core page header pattern.
8
+ - 0be2541: Promoted the plugin's translation ref to the stable package entry point. It was previously only available through the alpha entry point.
9
+ - Updated dependencies
10
+ - @backstage/ui@0.13.0
11
+ - @backstage/core-plugin-api@1.12.4
12
+ - @backstage/core-components@0.18.8
13
+ - @backstage/frontend-plugin-api@0.15.0
14
+ - @backstage/plugin-signals-react@0.0.20
15
+
16
+ ## 0.5.15-next.1
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+ - @backstage/frontend-plugin-api@0.15.0-next.1
22
+ - @backstage/core-plugin-api@1.12.4-next.1
23
+ - @backstage/core-components@0.18.8-next.1
24
+
3
25
  ## 0.5.15-next.0
4
26
 
5
27
  ### Patch Changes
package/dist/alpha.d.ts CHANGED
@@ -3,6 +3,64 @@ import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api'
3
3
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
4
4
 
5
5
  /** @alpha */
6
+ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{
7
+ root: _backstage_core_plugin_api.RouteRef<undefined>;
8
+ }, {}, {
9
+ "api:notifications": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
10
+ kind: "api";
11
+ name: undefined;
12
+ config: {};
13
+ configInput: {};
14
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
15
+ inputs: {};
16
+ params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
17
+ }>;
18
+ "page:notifications": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
19
+ kind: "page";
20
+ name: undefined;
21
+ config: {
22
+ path: string | undefined;
23
+ title: string | undefined;
24
+ };
25
+ configInput: {
26
+ title?: string | undefined;
27
+ path?: string | undefined;
28
+ };
29
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
30
+ optional: true;
31
+ }> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.title", {
32
+ optional: true;
33
+ }> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
34
+ optional: true;
35
+ }>;
36
+ inputs: {
37
+ pages: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
38
+ optional: true;
39
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.title", {
40
+ optional: true;
41
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
42
+ optional: true;
43
+ }>, {
44
+ singleton: false;
45
+ optional: false;
46
+ internal: false;
47
+ }>;
48
+ };
49
+ params: {
50
+ path: string;
51
+ title?: string;
52
+ icon?: _backstage_frontend_plugin_api.IconElement;
53
+ loader?: () => Promise<react.JSX.Element>;
54
+ routeRef?: _backstage_frontend_plugin_api.RouteRef;
55
+ noHeader?: boolean;
56
+ };
57
+ }>;
58
+ }>;
59
+
60
+ /**
61
+ * @alpha
62
+ * @deprecated Import from `@backstage/plugin-notifications` instead.
63
+ */
6
64
  declare const notificationsTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"plugin.notifications", {
7
65
  readonly "table.errors.markAllReadFailed": "Failed to mark all notifications as read";
8
66
  readonly "table.pagination.labelDisplayedRows": "{from}-{to} of {count}";
@@ -64,60 +122,4 @@ declare const notificationsTranslationRef: _backstage_frontend_plugin_api.Transl
64
122
  readonly "notificationsPage.tableTitle.read_other": "Read notifications ({{count}})";
65
123
  }>;
66
124
 
67
- /** @alpha */
68
- declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{
69
- root: _backstage_core_plugin_api.RouteRef<undefined>;
70
- }, {}, {
71
- "api:notifications": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
72
- kind: "api";
73
- name: undefined;
74
- config: {};
75
- configInput: {};
76
- output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
77
- inputs: {};
78
- params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
79
- }>;
80
- "page:notifications": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
81
- kind: "page";
82
- name: undefined;
83
- config: {
84
- path: string | undefined;
85
- title: string | undefined;
86
- };
87
- configInput: {
88
- title?: string | undefined;
89
- path?: string | undefined;
90
- };
91
- output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
92
- optional: true;
93
- }> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.title", {
94
- optional: true;
95
- }> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
96
- optional: true;
97
- }>;
98
- inputs: {
99
- pages: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
100
- optional: true;
101
- }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.title", {
102
- optional: true;
103
- }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
104
- optional: true;
105
- }>, {
106
- singleton: false;
107
- optional: false;
108
- internal: false;
109
- }>;
110
- };
111
- params: {
112
- defaultPath?: [Error: `Use the 'path' param instead`];
113
- path: string;
114
- title?: string;
115
- icon?: _backstage_frontend_plugin_api.IconElement;
116
- loader?: () => Promise<react.JSX.Element>;
117
- routeRef?: _backstage_frontend_plugin_api.RouteRef;
118
- noHeader?: boolean;
119
- };
120
- }>;
121
- }>;
122
-
123
125
  export { _default as default, notificationsTranslationRef };
package/dist/alpha.esm.js CHANGED
@@ -3,13 +3,13 @@ import { PageBlueprint, ApiBlueprint, fetchApiRef, discoveryApiRef, createFronte
3
3
  import { rootRouteRef } from './routes.esm.js';
4
4
  import { notificationsApiRef } from './api/NotificationsApi.esm.js';
5
5
  import { NotificationsClient } from './api/NotificationsClient.esm.js';
6
- export { notificationsTranslationRef } from './translation.esm.js';
6
+ import { notificationsTranslationRef as notificationsTranslationRef$1 } from './translation.esm.js';
7
7
 
8
8
  const page = PageBlueprint.make({
9
9
  params: {
10
10
  path: "/notifications",
11
11
  routeRef: rootRouteRef,
12
- loader: () => import('./components/NotificationsPage/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.NotificationsPage, {}))
12
+ loader: () => import('./components/NotificationsPage/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.NfsNotificationsPage, {}))
13
13
  }
14
14
  });
15
15
  const api = ApiBlueprint.make({
@@ -28,6 +28,7 @@ var alpha = createFrontendPlugin({
28
28
  // TODO(Rugvip): Nav item (i.e. NotificationsSidebarItem) currently needs to be installed manually
29
29
  extensions: [page, api]
30
30
  });
31
+ const notificationsTranslationRef = notificationsTranslationRef$1;
31
32
 
32
- export { alpha as default };
33
+ export { alpha as default, notificationsTranslationRef };
33
34
  //# sourceMappingURL=alpha.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.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 */\n\nimport {\n ApiBlueprint,\n PageBlueprint,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { rootRouteRef } from './routes';\nimport { NotificationsClient, notificationsApiRef } from './api';\n\nconst page = PageBlueprint.make({\n params: {\n path: '/notifications',\n routeRef: rootRouteRef,\n loader: () =>\n import('./components/NotificationsPage').then(m => (\n <m.NotificationsPage />\n )),\n },\n});\n\nconst api = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\n api: notificationsApiRef,\n deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef },\n factory: ({ discoveryApi, fetchApi }) =>\n new NotificationsClient({ discoveryApi, fetchApi }),\n }),\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'notifications',\n info: { packageJson: () => import('../package.json') },\n routes: {\n root: rootRouteRef,\n },\n // TODO(Rugvip): Nav item (i.e. NotificationsSidebarItem) currently needs to be installed manually\n extensions: [page, api],\n});\n\nexport { notificationsTranslationRef } from './translation';\n"],"names":[],"mappings":";;;;;;;AA0BA,MAAM,IAAA,GAAO,cAAc,IAAA,CAAK;AAAA,EAC9B,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,gBAAA;AAAA,IACN,QAAA,EAAU,YAAA;AAAA,IACV,MAAA,EAAQ,MACN,OAAO,6CAAgC,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAC5C,GAAA,CAAC,CAAA,CAAE,iBAAA,EAAF,EAAoB,CACtB;AAAA;AAEP,CAAC,CAAA;AAED,MAAM,GAAA,GAAM,aAAa,IAAA,CAAK;AAAA,EAC5B,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,mBAAA;AAAA,IACL,IAAA,EAAM,EAAE,YAAA,EAAc,eAAA,EAAiB,UAAU,WAAA,EAAY;AAAA,IAC7D,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,mBAAA,CAAoB,EAAE,YAAA,EAAc,QAAA,EAAU;AAAA,GACrD;AACL,CAAC,CAAA;AAGD,YAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,eAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAiB,CAAA,EAAE;AAAA,EACrD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA;AAAA,EAEA,UAAA,EAAY,CAAC,IAAA,EAAM,GAAG;AACxB,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.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 */\n\nimport {\n ApiBlueprint,\n PageBlueprint,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { rootRouteRef } from './routes';\nimport { NotificationsClient, notificationsApiRef } from './api';\n\nconst page = PageBlueprint.make({\n params: {\n path: '/notifications',\n routeRef: rootRouteRef,\n loader: () =>\n import('./components/NotificationsPage').then(m => (\n <m.NfsNotificationsPage />\n )),\n },\n});\n\nconst api = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\n api: notificationsApiRef,\n deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef },\n factory: ({ discoveryApi, fetchApi }) =>\n new NotificationsClient({ discoveryApi, fetchApi }),\n }),\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'notifications',\n info: { packageJson: () => import('../package.json') },\n routes: {\n root: rootRouteRef,\n },\n // TODO(Rugvip): Nav item (i.e. NotificationsSidebarItem) currently needs to be installed manually\n extensions: [page, api],\n});\n\nimport { notificationsTranslationRef as _notificationsTranslationRef } from './translation';\n\n/**\n * @alpha\n * @deprecated Import from `@backstage/plugin-notifications` instead.\n */\nexport const notificationsTranslationRef = _notificationsTranslationRef;\n"],"names":["_notificationsTranslationRef"],"mappings":";;;;;;;AA0BA,MAAM,IAAA,GAAO,cAAc,IAAA,CAAK;AAAA,EAC9B,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,gBAAA;AAAA,IACN,QAAA,EAAU,YAAA;AAAA,IACV,MAAA,EAAQ,MACN,OAAO,6CAAgC,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAC5C,GAAA,CAAC,CAAA,CAAE,oBAAA,EAAF,EAAuB,CACzB;AAAA;AAEP,CAAC,CAAA;AAED,MAAM,GAAA,GAAM,aAAa,IAAA,CAAK;AAAA,EAC5B,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,mBAAA;AAAA,IACL,IAAA,EAAM,EAAE,YAAA,EAAc,eAAA,EAAiB,UAAU,WAAA,EAAY;AAAA,IAC7D,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,mBAAA,CAAoB,EAAE,YAAA,EAAc,QAAA,EAAU;AAAA,GACrD;AACL,CAAC,CAAA;AAGD,YAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,eAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAiB,CAAA,EAAE;AAAA,EACrD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA;AAAA,EAEA,UAAA,EAAY,CAAC,IAAA,EAAM,GAAG;AACxB,CAAC,CAAA;AAQM,MAAM,2BAAA,GAA8BA;;;;"}
@@ -14,7 +14,7 @@ import '../../api/NotificationsApi.esm.js';
14
14
  import '@backstage/errors';
15
15
  import '../../routes.esm.js';
16
16
  import '../../hooks/useTitleCounter.esm.js';
17
- import { SortByOptions, NotificationsFilters, CreatedAfterOptions } from '../NotificationsFilters/NotificationsFilters.esm.js';
17
+ import { SortByOptions, CreatedAfterOptions, NotificationsFilters } from '../NotificationsFilters/NotificationsFilters.esm.js';
18
18
 
19
19
  const TableTitleKeys = {
20
20
  all: "notificationsPage.tableTitle.all",
@@ -23,7 +23,7 @@ const TableTitleKeys = {
23
23
  read: "notificationsPage.tableTitle.read"
24
24
  };
25
25
  const ThrottleDelayMs = 2e3;
26
- const NotificationsPage = (props) => {
26
+ function NotificationsPageContent(props) {
27
27
  const { t } = useTranslationRef(notificationsTranslationRef);
28
28
  const {
29
29
  title = t("notificationsPage.title"),
@@ -32,8 +32,9 @@ const NotificationsPage = (props) => {
32
32
  tooltip,
33
33
  type,
34
34
  typeLink,
35
- markAsReadOnLinkOpen
36
- } = props ?? {};
35
+ markAsReadOnLinkOpen,
36
+ headerVariant
37
+ } = props;
37
38
  const [refresh, setRefresh] = useState(false);
38
39
  const { lastSignal } = useSignal("notifications");
39
40
  const [unreadOnly, setUnreadOnly] = useState(true);
@@ -126,6 +127,46 @@ const NotificationsPage = (props) => {
126
127
  count: totalCount ?? 0
127
128
  });
128
129
  }
130
+ const pageContent = /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(ConfirmProvider, { children: /* @__PURE__ */ jsxs(Grid, { container: true, children: [
131
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 2, children: /* @__PURE__ */ jsx(
132
+ NotificationsFilters,
133
+ {
134
+ unreadOnly,
135
+ onUnreadOnlyChanged: setUnreadOnly,
136
+ createdAfter,
137
+ onCreatedAfterChanged: setCreatedAfter,
138
+ onSortingChanged: setSorting,
139
+ sorting,
140
+ saved,
141
+ onSavedChanged: setSaved,
142
+ severity,
143
+ onSeverityChanged: setSeverity,
144
+ topic,
145
+ onTopicChanged: setTopic,
146
+ allTopics
147
+ }
148
+ ) }),
149
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 10, children: /* @__PURE__ */ jsx(
150
+ NotificationsTable,
151
+ {
152
+ title: tableTitle,
153
+ isLoading: loading,
154
+ isUnread,
155
+ markAsReadOnLinkOpen,
156
+ notifications,
157
+ onUpdate,
158
+ setContainsText,
159
+ onPageChange: setPageNumber,
160
+ onRowsPerPageChange: setPageSize,
161
+ page: pageNumber,
162
+ pageSize,
163
+ totalCount
164
+ }
165
+ ) })
166
+ ] }) }) });
167
+ if (headerVariant === "bui") {
168
+ return pageContent;
169
+ }
129
170
  return /* @__PURE__ */ jsx(
130
171
  PageWithHeader,
131
172
  {
@@ -135,46 +176,12 @@ const NotificationsPage = (props) => {
135
176
  subtitle,
136
177
  type,
137
178
  typeLink,
138
- children: /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(ConfirmProvider, { children: /* @__PURE__ */ jsxs(Grid, { container: true, children: [
139
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 2, children: /* @__PURE__ */ jsx(
140
- NotificationsFilters,
141
- {
142
- unreadOnly,
143
- onUnreadOnlyChanged: setUnreadOnly,
144
- createdAfter,
145
- onCreatedAfterChanged: setCreatedAfter,
146
- onSortingChanged: setSorting,
147
- sorting,
148
- saved,
149
- onSavedChanged: setSaved,
150
- severity,
151
- onSeverityChanged: setSeverity,
152
- topic,
153
- onTopicChanged: setTopic,
154
- allTopics
155
- }
156
- ) }),
157
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 10, children: /* @__PURE__ */ jsx(
158
- NotificationsTable,
159
- {
160
- title: tableTitle,
161
- isLoading: loading,
162
- isUnread,
163
- markAsReadOnLinkOpen,
164
- notifications,
165
- onUpdate,
166
- setContainsText,
167
- onPageChange: setPageNumber,
168
- onRowsPerPageChange: setPageSize,
169
- page: pageNumber,
170
- pageSize,
171
- totalCount
172
- }
173
- ) })
174
- ] }) }) })
179
+ children: pageContent
175
180
  }
176
181
  );
177
- };
182
+ }
183
+ const NotificationsPage = (props) => /* @__PURE__ */ jsx(NotificationsPageContent, { ...props ?? {}, headerVariant: "legacy" });
184
+ const NfsNotificationsPage = (props) => /* @__PURE__ */ jsx(NotificationsPageContent, { ...props ?? {}, headerVariant: "bui" });
178
185
 
179
- export { NotificationsPage };
186
+ export { NfsNotificationsPage, NotificationsPage };
180
187
  //# sourceMappingURL=NotificationsPage.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsPage.esm.js","sources":["../../../src/components/NotificationsPage/NotificationsPage.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 */\n\nimport { useEffect, useMemo, useState } from 'react';\nimport throttle from 'lodash/throttle';\nimport {\n Content,\n PageWithHeader,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport Grid from '@material-ui/core/Grid';\nimport { ConfirmProvider } from 'material-ui-confirm';\nimport { useSignal } from '@backstage/plugin-signals-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { notificationsTranslationRef } from '../../translation';\n\nconst TableTitleKeys = {\n all: 'notificationsPage.tableTitle.all',\n saved: 'notificationsPage.tableTitle.saved',\n unread: 'notificationsPage.tableTitle.unread',\n read: 'notificationsPage.tableTitle.read',\n} as const;\n\nimport { NotificationsTable } from '../NotificationsTable';\nimport { useNotificationsApi } from '../../hooks';\nimport {\n CreatedAfterOptions,\n NotificationsFilters,\n SortBy,\n SortByOptions,\n} from '../NotificationsFilters';\nimport {\n GetNotificationsOptions,\n GetNotificationsResponse,\n GetTopicsResponse,\n} from '../../api';\nimport {\n NotificationSeverity,\n NotificationStatus,\n} from '@backstage/plugin-notifications-common';\n\nconst ThrottleDelayMs = 2000;\n\n/** @public */\nexport type NotificationsPageProps = {\n /** Mark notification as read when opening the link it contains, defaults to false */\n markAsReadOnLinkOpen?: boolean;\n title?: string;\n themeId?: string;\n subtitle?: string;\n tooltip?: string;\n type?: string;\n typeLink?: string;\n};\n\nexport const NotificationsPage = (props?: NotificationsPageProps) => {\n const { t } = useTranslationRef(notificationsTranslationRef);\n const {\n title = t('notificationsPage.title'),\n themeId = 'tool',\n subtitle,\n tooltip,\n type,\n typeLink,\n markAsReadOnLinkOpen,\n } = props ?? {};\n\n const [refresh, setRefresh] = useState(false);\n const { lastSignal } = useSignal('notifications');\n const [unreadOnly, setUnreadOnly] = useState<boolean | undefined>(true);\n const [saved, setSaved] = useState<boolean | undefined>(undefined);\n const [pageNumber, setPageNumber] = useState(0);\n const [pageSize, setPageSize] = useState(5);\n const [containsText, setContainsText] = useState<string>();\n const [createdAfter, setCreatedAfter] = useState<string>('all');\n const [sorting, setSorting] = useState<SortBy>(SortByOptions.newest.sortBy);\n const [severity, setSeverity] = useState<NotificationSeverity>('low');\n const [topic, setTopic] = useState<string>();\n\n const { error, value, retry, loading } = useNotificationsApi<\n [GetNotificationsResponse, NotificationStatus, GetTopicsResponse]\n >(\n api => {\n const options: GetNotificationsOptions = {\n search: containsText,\n limit: pageSize,\n offset: pageNumber * pageSize,\n minimumSeverity: severity,\n ...(sorting || {}),\n };\n if (unreadOnly !== undefined) {\n options.read = !unreadOnly;\n }\n if (saved !== undefined) {\n options.saved = saved;\n }\n if (topic !== undefined) {\n options.topic = topic;\n }\n\n const createdAfterDate =\n CreatedAfterOptions[\n createdAfter as keyof typeof CreatedAfterOptions\n ].getDate();\n if (createdAfterDate.valueOf() > 0) {\n options.createdAfter = createdAfterDate;\n }\n\n return Promise.all([\n api.getNotifications(options),\n api.getStatus(),\n api.getTopics(options),\n ]);\n },\n [\n containsText,\n unreadOnly,\n createdAfter,\n pageNumber,\n pageSize,\n sorting,\n saved,\n severity,\n topic,\n ],\n );\n\n const throttledSetRefresh = useMemo(\n () => throttle(setRefresh, ThrottleDelayMs),\n [setRefresh],\n );\n\n useEffect(() => {\n if (refresh && !loading) {\n retry();\n setRefresh(false);\n }\n }, [refresh, setRefresh, retry, loading]);\n\n useEffect(() => {\n if (lastSignal && lastSignal.action) {\n throttledSetRefresh(true);\n }\n }, [lastSignal, throttledSetRefresh]);\n\n const onUpdate = () => {\n throttledSetRefresh(true);\n };\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n const notifications = value?.[0]?.notifications;\n const totalCount = value?.[0]?.totalCount;\n const isUnread = !!value?.[1]?.unread;\n const allTopics = value?.[2]?.topics;\n\n let tableTitle: string = t(TableTitleKeys.all, {\n count: totalCount ?? 0,\n });\n if (saved) {\n tableTitle = t(TableTitleKeys.saved, {\n count: totalCount ?? 0,\n });\n } else if (unreadOnly === true) {\n tableTitle = t(TableTitleKeys.unread, {\n count: totalCount ?? 0,\n });\n } else if (unreadOnly === false) {\n tableTitle = t(TableTitleKeys.read, {\n count: totalCount ?? 0,\n });\n }\n\n return (\n <PageWithHeader\n title={title}\n themeId={themeId}\n tooltip={tooltip}\n subtitle={subtitle}\n type={type}\n typeLink={typeLink}\n >\n <Content>\n <ConfirmProvider>\n <Grid container>\n <Grid item xs={2}>\n <NotificationsFilters\n unreadOnly={unreadOnly}\n onUnreadOnlyChanged={setUnreadOnly}\n createdAfter={createdAfter}\n onCreatedAfterChanged={setCreatedAfter}\n onSortingChanged={setSorting}\n sorting={sorting}\n saved={saved}\n onSavedChanged={setSaved}\n severity={severity}\n onSeverityChanged={setSeverity}\n topic={topic}\n onTopicChanged={setTopic}\n allTopics={allTopics}\n />\n </Grid>\n <Grid item xs={10}>\n <NotificationsTable\n title={tableTitle}\n isLoading={loading}\n isUnread={isUnread}\n markAsReadOnLinkOpen={markAsReadOnLinkOpen}\n notifications={notifications}\n onUpdate={onUpdate}\n setContainsText={setContainsText}\n onPageChange={setPageNumber}\n onRowsPerPageChange={setPageSize}\n page={pageNumber}\n pageSize={pageSize}\n totalCount={totalCount}\n />\n </Grid>\n </Grid>\n </ConfirmProvider>\n </Content>\n </PageWithHeader>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,MAAM,cAAA,GAAiB;AAAA,EACrB,GAAA,EAAK,kCAAA;AAAA,EACL,KAAA,EAAO,oCAAA;AAAA,EACP,MAAA,EAAQ,qCAAA;AAAA,EACR,IAAA,EAAM;AACR,CAAA;AAoBA,MAAM,eAAA,GAAkB,GAAA;AAcjB,MAAM,iBAAA,GAAoB,CAAC,KAAA,KAAmC;AACnE,EA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ACN,QAAA;AAAA,YACA;AAAA;AAAA,SACF,EACF;AAAA,OAAA,EACF,GACF,CAAA,EACF;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"NotificationsPage.esm.js","sources":["../../../src/components/NotificationsPage/NotificationsPage.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 */\n\nimport { useEffect, useMemo, useState } from 'react';\nimport throttle from 'lodash/throttle';\nimport {\n Content,\n PageWithHeader,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport Grid from '@material-ui/core/Grid';\nimport { ConfirmProvider } from 'material-ui-confirm';\nimport { useSignal } from '@backstage/plugin-signals-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { notificationsTranslationRef } from '../../translation';\n\nconst TableTitleKeys = {\n all: 'notificationsPage.tableTitle.all',\n saved: 'notificationsPage.tableTitle.saved',\n unread: 'notificationsPage.tableTitle.unread',\n read: 'notificationsPage.tableTitle.read',\n} as const;\n\nimport { NotificationsTable } from '../NotificationsTable';\nimport { useNotificationsApi } from '../../hooks';\nimport {\n CreatedAfterOptions,\n NotificationsFilters,\n SortBy,\n SortByOptions,\n} from '../NotificationsFilters';\nimport {\n GetNotificationsOptions,\n GetNotificationsResponse,\n GetTopicsResponse,\n} from '../../api';\nimport {\n NotificationSeverity,\n NotificationStatus,\n} from '@backstage/plugin-notifications-common';\n\nconst ThrottleDelayMs = 2000;\n\n/** @public */\nexport type NotificationsPageProps = {\n /** Mark notification as read when opening the link it contains, defaults to false */\n markAsReadOnLinkOpen?: boolean;\n title?: string;\n themeId?: string;\n subtitle?: string;\n tooltip?: string;\n type?: string;\n typeLink?: string;\n};\n\nfunction NotificationsPageContent(\n props: NotificationsPageProps & { headerVariant: 'legacy' | 'bui' },\n) {\n const { t } = useTranslationRef(notificationsTranslationRef);\n const {\n title = t('notificationsPage.title'),\n themeId = 'tool',\n subtitle,\n tooltip,\n type,\n typeLink,\n markAsReadOnLinkOpen,\n headerVariant,\n } = props;\n\n const [refresh, setRefresh] = useState(false);\n const { lastSignal } = useSignal('notifications');\n const [unreadOnly, setUnreadOnly] = useState<boolean | undefined>(true);\n const [saved, setSaved] = useState<boolean | undefined>(undefined);\n const [pageNumber, setPageNumber] = useState(0);\n const [pageSize, setPageSize] = useState(5);\n const [containsText, setContainsText] = useState<string>();\n const [createdAfter, setCreatedAfter] = useState<string>('all');\n const [sorting, setSorting] = useState<SortBy>(SortByOptions.newest.sortBy);\n const [severity, setSeverity] = useState<NotificationSeverity>('low');\n const [topic, setTopic] = useState<string>();\n\n const { error, value, retry, loading } = useNotificationsApi<\n [GetNotificationsResponse, NotificationStatus, GetTopicsResponse]\n >(\n api => {\n const options: GetNotificationsOptions = {\n search: containsText,\n limit: pageSize,\n offset: pageNumber * pageSize,\n minimumSeverity: severity,\n ...(sorting || {}),\n };\n if (unreadOnly !== undefined) {\n options.read = !unreadOnly;\n }\n if (saved !== undefined) {\n options.saved = saved;\n }\n if (topic !== undefined) {\n options.topic = topic;\n }\n\n const createdAfterDate =\n CreatedAfterOptions[\n createdAfter as keyof typeof CreatedAfterOptions\n ].getDate();\n if (createdAfterDate.valueOf() > 0) {\n options.createdAfter = createdAfterDate;\n }\n\n return Promise.all([\n api.getNotifications(options),\n api.getStatus(),\n api.getTopics(options),\n ]);\n },\n [\n containsText,\n unreadOnly,\n createdAfter,\n pageNumber,\n pageSize,\n sorting,\n saved,\n severity,\n topic,\n ],\n );\n\n const throttledSetRefresh = useMemo(\n () => throttle(setRefresh, ThrottleDelayMs),\n [setRefresh],\n );\n\n useEffect(() => {\n if (refresh && !loading) {\n retry();\n setRefresh(false);\n }\n }, [refresh, setRefresh, retry, loading]);\n\n useEffect(() => {\n if (lastSignal && lastSignal.action) {\n throttledSetRefresh(true);\n }\n }, [lastSignal, throttledSetRefresh]);\n\n const onUpdate = () => {\n throttledSetRefresh(true);\n };\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n const notifications = value?.[0]?.notifications;\n const totalCount = value?.[0]?.totalCount;\n const isUnread = !!value?.[1]?.unread;\n const allTopics = value?.[2]?.topics;\n\n let tableTitle: string = t(TableTitleKeys.all, {\n count: totalCount ?? 0,\n });\n if (saved) {\n tableTitle = t(TableTitleKeys.saved, {\n count: totalCount ?? 0,\n });\n } else if (unreadOnly === true) {\n tableTitle = t(TableTitleKeys.unread, {\n count: totalCount ?? 0,\n });\n } else if (unreadOnly === false) {\n tableTitle = t(TableTitleKeys.read, {\n count: totalCount ?? 0,\n });\n }\n\n const pageContent = (\n <Content>\n <ConfirmProvider>\n <Grid container>\n <Grid item xs={2}>\n <NotificationsFilters\n unreadOnly={unreadOnly}\n onUnreadOnlyChanged={setUnreadOnly}\n createdAfter={createdAfter}\n onCreatedAfterChanged={setCreatedAfter}\n onSortingChanged={setSorting}\n sorting={sorting}\n saved={saved}\n onSavedChanged={setSaved}\n severity={severity}\n onSeverityChanged={setSeverity}\n topic={topic}\n onTopicChanged={setTopic}\n allTopics={allTopics}\n />\n </Grid>\n <Grid item xs={10}>\n <NotificationsTable\n title={tableTitle}\n isLoading={loading}\n isUnread={isUnread}\n markAsReadOnLinkOpen={markAsReadOnLinkOpen}\n notifications={notifications}\n onUpdate={onUpdate}\n setContainsText={setContainsText}\n onPageChange={setPageNumber}\n onRowsPerPageChange={setPageSize}\n page={pageNumber}\n pageSize={pageSize}\n totalCount={totalCount}\n />\n </Grid>\n </Grid>\n </ConfirmProvider>\n </Content>\n );\n\n if (headerVariant === 'bui') {\n return pageContent;\n }\n\n return (\n <PageWithHeader\n title={title}\n themeId={themeId}\n tooltip={tooltip}\n subtitle={subtitle}\n type={type}\n typeLink={typeLink}\n >\n {pageContent}\n </PageWithHeader>\n );\n}\n\nexport const NotificationsPage = (props?: NotificationsPageProps) => (\n <NotificationsPageContent {...(props ?? {})} headerVariant=\"legacy\" />\n);\n\nexport const NfsNotificationsPage = (props?: NotificationsPageProps) => (\n <NotificationsPageContent {...(props ?? {})} headerVariant=\"bui\" />\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,MAAM,cAAA,GAAiB;AAAA,EACrB,GAAA,EAAK,kCAAA;AAAA,EACL,KAAA,EAAO,oCAAA;AAAA,EACP,MAAA,EAAQ,qCAAA;AAAA,EACR,IAAA,EAAM;AACR,CAAA;AAoBA,MAAM,eAAA,GAAkB,GAAA;AAcxB,SAAS,yBACP,KAAA,EACA;AACA,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,2BAA2B,CAAA;AAC3D,EAAA,MAAM;AAAA,IACJ,KAAA,GAAQ,EAAE,yBAAyB,CAAA;AAAA,IACnC,OAAA,GAAU,MAAA;AAAA,IACV,QAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA;AAAA,IACA,QAAA;AAAA,IACA,oBAAA;AAAA,IACA;AAAA,GACF,GAAI,KAAA;AAEJ,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,SAAS,KAAK,CAAA;AAC5C,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,eAAe,CAAA;AAChD,EAAA,MAAM,CAAC,UAAA,EAAY,aAAa,CAAA,GAAI,SAA8B,IAAI,CAAA;AACtE,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,SAA8B,MAAS,CAAA;AACjE,EAAA,MAAM,CAAC,UAAA,EAAY,aAAa,CAAA,GAAI,SAAS,CAAC,CAAA;AAC9C,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAS,CAAC,CAAA;AAC1C,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F,CAAA;AAAA,oBACA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,IAAI,EAAA,EACb,QAAA,kBAAA,GAAA;AAAA,MAAC,kBAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,UAAA;AAAA,QACP,SAAA,EAAW,OAAA;AAAA,QACX,QAAA;AAAA,QACA,oBAAA;AAAA,QACA,aAAA;AAAA,QACA,QAAA;AAAA,QACA,eAAA;AAAA,QACA,YAAA,EAAc,aAAA;AAAA,QACd,mBAAA,EAAqB,WAAA;AAAA,QACrB,IAAA,EAAM,UAAA;AAAA,QACN,QAAA;AAAA,QACA;AAAA;AAAA,KACF,EACF;AAAA,GAAA,EACF,GACF,CAAA,EACF,CAAA;AAGF,EAAA,IAAI,kBAAkB,KAAA,EAAO;AAC3B,IAAA,OAAO,WAAA;AAAA,EACT;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,KAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA,IAAA;AAAA,MACA,QAAA;AAAA,MAEC,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ;AAEO,MAAM,iBAAA,GAAoB,CAAC,KAAA,qBAChC,GAAA,CAAC,wBAAA,EAAA,EAA0B,GAAI,KAAA,IAAS,EAAC,EAAI,aAAA,EAAc,QAAA,EAAS;AAG/D,MAAM,oBAAA,GAAuB,CAAC,KAAA,qBACnC,GAAA,CAAC,wBAAA,EAAA,EAA0B,GAAI,KAAA,IAAS,EAAC,EAAI,aAAA,EAAc,KAAA,EAAM;;;;"}
@@ -1,2 +1,2 @@
1
- export { NotificationsPage } from './NotificationsPage.esm.js';
1
+ export { NfsNotificationsPage, NotificationsPage } from './NotificationsPage.esm.js';
2
2
  //# sourceMappingURL=index.esm.js.map
package/dist/index.d.ts CHANGED
@@ -197,5 +197,67 @@ declare function useNotificationsApi<T>(f: (api: NotificationsApi) => Promise<T>
197
197
  value: T;
198
198
  };
199
199
 
200
- export { NotificationsClient, NotificationsPage, NotificationsSidebarItem, NotificationsTable, UserNotificationSettingsCard, notificationsApiRef, notificationsPlugin, useNotificationsApi };
200
+ /** @public */
201
+ declare const notificationsTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"plugin.notifications", {
202
+ readonly "table.errors.markAllReadFailed": "Failed to mark all notifications as read";
203
+ readonly "table.pagination.labelDisplayedRows": "{from}-{to} of {count}";
204
+ readonly "table.pagination.firstTooltip": "First Page";
205
+ readonly "table.pagination.labelRowsSelect": "rows";
206
+ readonly "table.pagination.lastTooltip": "Last Page";
207
+ readonly "table.pagination.nextTooltip": "Next Page";
208
+ readonly "table.pagination.previousTooltip": "Previous Page";
209
+ readonly "table.emptyMessage": "No records to display";
210
+ readonly "table.bulkActions.markAllRead": "Mark all read";
211
+ readonly "table.bulkActions.markSelectedAsRead": "Mark selected as read";
212
+ readonly "table.bulkActions.returnSelectedAmongUnread": "Return selected among unread";
213
+ readonly "table.bulkActions.saveSelectedForLater": "Save selected for later";
214
+ readonly "table.bulkActions.undoSaveForSelected": "Undo save for selected";
215
+ readonly "table.confirmDialog.title": "Are you sure?";
216
+ readonly "table.confirmDialog.markAllReadDescription": "Mark <b>all</b> notifications as <b>read</b>.";
217
+ readonly "table.confirmDialog.markAllReadConfirmation": "Mark All";
218
+ readonly "filters.view.all": "All";
219
+ readonly "filters.view.label": "View";
220
+ readonly "filters.view.read": "Read notifications";
221
+ readonly "filters.view.saved": "Saved";
222
+ readonly "filters.view.unread": "Unread notifications";
223
+ readonly "filters.title": "Filters";
224
+ readonly "filters.severity.normal": "Normal";
225
+ readonly "filters.severity.high": "High";
226
+ readonly "filters.severity.low": "Low";
227
+ readonly "filters.severity.label": "Min severity";
228
+ readonly "filters.severity.critical": "Critical";
229
+ readonly "filters.topic.label": "Topic";
230
+ readonly "filters.topic.anyTopic": "Any topic";
231
+ readonly "filters.createdAfter.label": "Sent out";
232
+ readonly "filters.createdAfter.placeholder": "Notifications since";
233
+ readonly "filters.createdAfter.last24h": "Last 24h";
234
+ readonly "filters.createdAfter.lastWeek": "Last week";
235
+ readonly "filters.createdAfter.anyTime": "Any time";
236
+ readonly "filters.sortBy.origin": "Origin";
237
+ readonly "filters.sortBy.label": "Sort by";
238
+ readonly "filters.sortBy.placeholder": "Field to sort by";
239
+ readonly "filters.sortBy.newest": "Newest on top";
240
+ readonly "filters.sortBy.oldest": "Oldest on top";
241
+ readonly "filters.sortBy.topic": "Topic";
242
+ readonly "settings.table.origin": "Origin";
243
+ readonly "settings.table.topic": "Topic";
244
+ readonly "settings.title": "Notification settings";
245
+ readonly "settings.errors.useNotificationFormat": "useNotificationFormat must be used within a NotificationFormatProvider";
246
+ readonly "settings.errorTitle": "Failed to load settings";
247
+ readonly "settings.noSettingsAvailable": "No notification settings available, check back later";
248
+ readonly "sidebar.title": "Notifications";
249
+ readonly "sidebar.errors.markAsReadFailed": "Failed to mark notification as read";
250
+ readonly "sidebar.errors.fetchNotificationFailed": "Failed to fetch notification";
251
+ readonly "notificationsPage.title": "Notifications";
252
+ readonly "notificationsPage.tableTitle.all_one": "All notifications ({{count}})";
253
+ readonly "notificationsPage.tableTitle.all_other": "All notifications ({{count}})";
254
+ readonly "notificationsPage.tableTitle.saved_one": "Saved notifications ({{count}})";
255
+ readonly "notificationsPage.tableTitle.saved_other": "Saved notifications ({{count}})";
256
+ readonly "notificationsPage.tableTitle.unread_one": "Unread notifications ({{count}})";
257
+ readonly "notificationsPage.tableTitle.unread_other": "Unread notifications ({{count}})";
258
+ readonly "notificationsPage.tableTitle.read_one": "Read notifications ({{count}})";
259
+ readonly "notificationsPage.tableTitle.read_other": "Read notifications ({{count}})";
260
+ }>;
261
+
262
+ export { NotificationsClient, NotificationsPage, NotificationsSidebarItem, NotificationsTable, UserNotificationSettingsCard, notificationsApiRef, notificationsPlugin, notificationsTranslationRef, useNotificationsApi };
201
263
  export type { GetNotificationsCommonOptions, GetNotificationsOptions, GetNotificationsResponse, GetTopicsOptions, GetTopicsResponse, NotificationSnackbarProperties, NotificationsApi, NotificationsPageProps, NotificationsRenderItemProps, NotificationsSideBarItemProps, NotificationsTableProps, UpdateNotificationsOptions };
package/dist/index.esm.js CHANGED
@@ -9,4 +9,5 @@ import './hooks/useTitleCounter.esm.js';
9
9
  export { NotificationsSidebarItem } from './components/NotificationsSideBarItem/NotificationsSideBarItem.esm.js';
10
10
  export { NotificationsTable } from './components/NotificationsTable/NotificationsTable.esm.js';
11
11
  export { UserNotificationSettingsCard } from './components/UserNotificationSettingsCard/UserNotificationSettingsCard.esm.js';
12
+ export { notificationsTranslationRef } from './translation.esm.js';
12
13
  //# sourceMappingURL=index.esm.js.map
@@ -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,5 +1,5 @@
1
1
  var name = "@backstage/plugin-notifications";
2
- var version = "0.5.15-next.0";
2
+ var version = "0.5.15";
3
3
  var backstage = {
4
4
  role: "frontend-plugin",
5
5
  pluginId: "notifications",
@@ -57,6 +57,7 @@ var dependencies = {
57
57
  "@backstage/plugin-notifications-common": "workspace:^",
58
58
  "@backstage/plugin-signals-react": "workspace:^",
59
59
  "@backstage/theme": "workspace:^",
60
+ "@backstage/ui": "workspace:^",
60
61
  "@material-ui/core": "^4.9.13",
61
62
  "@material-ui/icons": "^4.9.1",
62
63
  lodash: "^4.17.21",
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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/** @alpha */\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 <b>all</b> notifications as <b>read</b>.',\n markAllReadConfirmation: 'Mark All',\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":";;AAmBO,MAAM,8BAA8B,oBAAA,CAAqB;AAAA,EAC9D,EAAA,EAAI,sBAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,iBAAA,EAAmB;AAAA,MACjB,KAAA,EAAO,eAAA;AAAA,MACP,UAAA,EAAY;AAAA,QACV,OAAA,EAAS,+BAAA;AAAA,QACT,SAAA,EAAW,+BAAA;AAAA,QACX,SAAA,EAAW,iCAAA;AAAA,QACX,WAAA,EAAa,iCAAA;AAAA,QACb,UAAA,EAAY,kCAAA;AAAA,QACZ,YAAA,EAAc,kCAAA;AAAA,QACd,QAAA,EAAU,gCAAA;AAAA,QACV,UAAA,EAAY;AAAA;AACd,KACF;AAAA,IACA,OAAA,EAAS;AAAA,MACP,KAAA,EAAO,SAAA;AAA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AA;AAAA,QACtB,mBAAA,EAAqB;AAAA,OACvB;AAAA,MACA,aAAA,EAAe;AAAA,QACb,KAAA,EAAO,eAAA;AAAA,QACP,sBAAA,EAAwB,+CAAA;AAAA,QACxB,uBAAA,EAAyB;AAAA,OAC3B;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,iBAAA,EAAmB;AAAA;AACrB,KACF;AAAA,IACA,OAAA,EAAS;AAAA,MACP,KAAA,EAAO,eAAA;AAAA,MACP,MAAA,EAAQ;AAAA,QACN,gBAAA,EAAkB,qCAAA;AAAA,QAClB,uBAAA,EAAyB;AAAA;AAC3B,KACF;AAAA,IACA,QAAA,EAAU;AAAA,MACR,KAAA,EAAO,uBAAA;AAAA,MACP,UAAA,EAAY,yBAAA;AAAA,MACZ,mBAAA,EACE,sDAAA;AAAA,MACF,KAAA,EAAO;AAAA,QACL,MAAA,EAAQ,QAAA;AAAA,QACR,KAAA,EAAO;AAAA,OACT;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,qBAAA,EACE;AAAA;AACJ;AACF;AAEJ,CAAC;;;;"}
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 <b>all</b> notifications as <b>read</b>.',\n markAllReadConfirmation: 'Mark All',\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 Not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2
2
  "name": "@backstage/plugin-notifications",
3
- "version": "0.5.15-next.0",
3
+ "version": "0.5.15",
4
4
  "backstage": {
5
5
  "role": "frontend-plugin",
6
6
  "pluginId": "notifications",
@@ -63,13 +63,14 @@
63
63
  "test": "backstage-cli package test"
64
64
  },
65
65
  "dependencies": {
66
- "@backstage/core-components": "0.18.8-next.0",
67
- "@backstage/core-plugin-api": "1.12.4-next.0",
68
- "@backstage/errors": "1.2.7",
69
- "@backstage/frontend-plugin-api": "0.14.2-next.0",
70
- "@backstage/plugin-notifications-common": "0.2.1",
71
- "@backstage/plugin-signals-react": "0.0.20-next.0",
72
- "@backstage/theme": "0.7.2",
66
+ "@backstage/core-components": "^0.18.8",
67
+ "@backstage/core-plugin-api": "^1.12.4",
68
+ "@backstage/errors": "^1.2.7",
69
+ "@backstage/frontend-plugin-api": "^0.15.0",
70
+ "@backstage/plugin-notifications-common": "^0.2.1",
71
+ "@backstage/plugin-signals-react": "^0.0.20",
72
+ "@backstage/theme": "^0.7.2",
73
+ "@backstage/ui": "^0.13.0",
73
74
  "@material-ui/core": "^4.9.13",
74
75
  "@material-ui/icons": "^4.9.1",
75
76
  "lodash": "^4.17.21",
@@ -79,10 +80,10 @@
79
80
  "react-use": "^17.2.4"
80
81
  },
81
82
  "devDependencies": {
82
- "@backstage/cli": "0.35.5-next.0",
83
- "@backstage/dev-utils": "1.1.21-next.0",
84
- "@backstage/plugin-signals": "0.0.29-next.0",
85
- "@backstage/test-utils": "1.7.16-next.0",
83
+ "@backstage/cli": "^0.36.0",
84
+ "@backstage/dev-utils": "^1.1.21",
85
+ "@backstage/plugin-signals": "^0.0.29",
86
+ "@backstage/test-utils": "^1.7.16",
86
87
  "@testing-library/jest-dom": "^6.0.0",
87
88
  "@testing-library/react": "^16.0.0",
88
89
  "@types/react": "^18.0.0",