@backstage/plugin-notifications 0.3.2 → 0.3.3-next.1
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 +27 -0
- package/dist/api/NotificationsApi.esm.js.map +1 -1
- package/dist/api/NotificationsClient.esm.js +10 -0
- package/dist/api/NotificationsClient.esm.js.map +1 -1
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsCard.esm.js +36 -0
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsCard.esm.js.map +1 -0
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsPanel.esm.js +85 -0
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsPanel.esm.js.map +1 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.esm.js +1 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @backstage/plugin-notifications
|
|
2
2
|
|
|
3
|
+
## 0.3.3-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/theme@0.6.1-next.0
|
|
9
|
+
- @backstage/core-components@0.16.0-next.1
|
|
10
|
+
- @backstage/core-plugin-api@1.10.0
|
|
11
|
+
- @backstage/errors@1.2.4
|
|
12
|
+
- @backstage/types@1.1.1
|
|
13
|
+
- @backstage/plugin-notifications-common@0.0.6-next.0
|
|
14
|
+
- @backstage/plugin-signals-react@0.0.6
|
|
15
|
+
|
|
16
|
+
## 0.3.3-next.0
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 97ba58f: Add support for user specific notification settings
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- @backstage/core-components@0.16.0-next.0
|
|
23
|
+
- @backstage/plugin-notifications-common@0.0.6-next.0
|
|
24
|
+
- @backstage/core-plugin-api@1.10.0
|
|
25
|
+
- @backstage/errors@1.2.4
|
|
26
|
+
- @backstage/theme@0.6.0
|
|
27
|
+
- @backstage/types@1.1.1
|
|
28
|
+
- @backstage/plugin-signals-react@0.0.6
|
|
29
|
+
|
|
3
30
|
## 0.3.2
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsApi.esm.js","sources":["../../src/api/NotificationsApi.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport {\n Notification,\n NotificationSeverity,\n NotificationStatus,\n} from '@backstage/plugin-notifications-common';\n\n/** @public */\nexport const notificationsApiRef = createApiRef<NotificationsApi>({\n id: 'plugin.notifications.service',\n});\n\n/** @public */\nexport type GetNotificationsOptions = {\n offset?: number;\n limit?: number;\n search?: string;\n read?: boolean;\n saved?: boolean;\n createdAfter?: Date;\n sort?: 'created' | 'topic' | 'origin';\n sortOrder?: 'asc' | 'desc';\n minimumSeverity?: NotificationSeverity;\n};\n\n/** @public */\nexport type UpdateNotificationsOptions = {\n ids: string[];\n read?: boolean;\n saved?: boolean;\n};\n\n/** @public */\nexport type GetNotificationsResponse = {\n notifications: Notification[];\n totalCount: number;\n};\n\n/** @public */\nexport interface NotificationsApi {\n getNotifications(\n options?: GetNotificationsOptions,\n ): Promise<GetNotificationsResponse>;\n\n getNotification(id: string): Promise<Notification>;\n\n getStatus(): Promise<NotificationStatus>;\n\n updateNotifications(\n options: UpdateNotificationsOptions,\n ): Promise<Notification[]>;\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"NotificationsApi.esm.js","sources":["../../src/api/NotificationsApi.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport {\n Notification,\n NotificationSettings,\n NotificationSeverity,\n NotificationStatus,\n} from '@backstage/plugin-notifications-common';\n\n/** @public */\nexport const notificationsApiRef = createApiRef<NotificationsApi>({\n id: 'plugin.notifications.service',\n});\n\n/** @public */\nexport type GetNotificationsOptions = {\n offset?: number;\n limit?: number;\n search?: string;\n read?: boolean;\n saved?: boolean;\n createdAfter?: Date;\n sort?: 'created' | 'topic' | 'origin';\n sortOrder?: 'asc' | 'desc';\n minimumSeverity?: NotificationSeverity;\n};\n\n/** @public */\nexport type UpdateNotificationsOptions = {\n ids: string[];\n read?: boolean;\n saved?: boolean;\n};\n\n/** @public */\nexport type GetNotificationsResponse = {\n notifications: Notification[];\n totalCount: number;\n};\n\n/** @public */\nexport interface NotificationsApi {\n getNotifications(\n options?: GetNotificationsOptions,\n ): Promise<GetNotificationsResponse>;\n\n getNotification(id: string): Promise<Notification>;\n\n getStatus(): Promise<NotificationStatus>;\n\n updateNotifications(\n options: UpdateNotificationsOptions,\n ): Promise<Notification[]>;\n\n getNotificationSettings(): Promise<NotificationSettings>;\n\n updateNotificationSettings(\n settings: NotificationSettings,\n ): Promise<NotificationSettings>;\n}\n"],"names":[],"mappings":";;AAwBO,MAAM,sBAAsB,YAA+B,CAAA;AAAA,EAChE,EAAI,EAAA,8BAAA;AACN,CAAC;;;;"}
|
|
@@ -52,6 +52,16 @@ class NotificationsClient {
|
|
|
52
52
|
headers: { "Content-Type": "application/json" }
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
+
async getNotificationSettings() {
|
|
56
|
+
return await this.request("settings");
|
|
57
|
+
}
|
|
58
|
+
async updateNotificationSettings(settings) {
|
|
59
|
+
return await this.request("settings", {
|
|
60
|
+
method: "POST",
|
|
61
|
+
body: JSON.stringify(settings),
|
|
62
|
+
headers: { "Content-Type": "application/json" }
|
|
63
|
+
});
|
|
64
|
+
}
|
|
55
65
|
async request(path, init) {
|
|
56
66
|
const baseUrl = `${await this.discoveryApi.getBaseUrl("notifications")}/`;
|
|
57
67
|
const url = new URL(path, baseUrl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsClient.esm.js","sources":["../../src/api/NotificationsClient.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n GetNotificationsOptions,\n GetNotificationsResponse,\n NotificationsApi,\n UpdateNotificationsOptions,\n} from './NotificationsApi';\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport {\n Notification,\n NotificationStatus,\n} from '@backstage/plugin-notifications-common';\n\n/** @public */\nexport class NotificationsClient implements NotificationsApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n public constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n }\n\n async getNotifications(\n options?: GetNotificationsOptions,\n ): Promise<GetNotificationsResponse> {\n const queryString = new URLSearchParams();\n if (options?.limit !== undefined) {\n queryString.append('limit', options.limit.toString(10));\n }\n if (options?.offset !== undefined) {\n queryString.append('offset', options.offset.toString(10));\n }\n if (options?.sort !== undefined) {\n queryString.append(\n 'orderField',\n `${options.sort},${options?.sortOrder ?? 'desc'}`,\n );\n }\n if (options?.search) {\n queryString.append('search', options.search);\n }\n if (options?.read !== undefined) {\n queryString.append('read', options.read ? 'true' : 'false');\n }\n if (options?.saved !== undefined) {\n queryString.append('saved', options.saved ? 'true' : 'false');\n }\n if (options?.createdAfter !== undefined) {\n queryString.append('createdAfter', options.createdAfter.toISOString());\n }\n if (options?.minimumSeverity !== undefined) {\n queryString.append('minimumSeverity', options.minimumSeverity);\n }\n const urlSegment = `?${queryString}`;\n\n return await this.request<GetNotificationsResponse>(urlSegment);\n }\n\n async getNotification(id: string): Promise<Notification> {\n return await this.request<Notification>(`${id}`);\n }\n\n async getStatus(): Promise<NotificationStatus> {\n return await this.request<NotificationStatus>('status');\n }\n\n async updateNotifications(\n options: UpdateNotificationsOptions,\n ): Promise<Notification[]> {\n return await this.request<Notification[]>('update', {\n method: 'POST',\n body: JSON.stringify(options),\n headers: { 'Content-Type': 'application/json' },\n });\n }\n\n private async request<T>(path: string, init?: any): Promise<T> {\n const baseUrl = `${await this.discoveryApi.getBaseUrl('notifications')}/`;\n const url = new URL(path, baseUrl);\n\n const response = await this.fetchApi.fetch(url.toString(), init);\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n return response.json() as Promise<T>;\n }\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"NotificationsClient.esm.js","sources":["../../src/api/NotificationsClient.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n GetNotificationsOptions,\n GetNotificationsResponse,\n NotificationsApi,\n UpdateNotificationsOptions,\n} from './NotificationsApi';\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport {\n Notification,\n NotificationSettings,\n NotificationStatus,\n} from '@backstage/plugin-notifications-common';\n\n/** @public */\nexport class NotificationsClient implements NotificationsApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n public constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n }\n\n async getNotifications(\n options?: GetNotificationsOptions,\n ): Promise<GetNotificationsResponse> {\n const queryString = new URLSearchParams();\n if (options?.limit !== undefined) {\n queryString.append('limit', options.limit.toString(10));\n }\n if (options?.offset !== undefined) {\n queryString.append('offset', options.offset.toString(10));\n }\n if (options?.sort !== undefined) {\n queryString.append(\n 'orderField',\n `${options.sort},${options?.sortOrder ?? 'desc'}`,\n );\n }\n if (options?.search) {\n queryString.append('search', options.search);\n }\n if (options?.read !== undefined) {\n queryString.append('read', options.read ? 'true' : 'false');\n }\n if (options?.saved !== undefined) {\n queryString.append('saved', options.saved ? 'true' : 'false');\n }\n if (options?.createdAfter !== undefined) {\n queryString.append('createdAfter', options.createdAfter.toISOString());\n }\n if (options?.minimumSeverity !== undefined) {\n queryString.append('minimumSeverity', options.minimumSeverity);\n }\n const urlSegment = `?${queryString}`;\n\n return await this.request<GetNotificationsResponse>(urlSegment);\n }\n\n async getNotification(id: string): Promise<Notification> {\n return await this.request<Notification>(`${id}`);\n }\n\n async getStatus(): Promise<NotificationStatus> {\n return await this.request<NotificationStatus>('status');\n }\n\n async updateNotifications(\n options: UpdateNotificationsOptions,\n ): Promise<Notification[]> {\n return await this.request<Notification[]>('update', {\n method: 'POST',\n body: JSON.stringify(options),\n headers: { 'Content-Type': 'application/json' },\n });\n }\n\n async getNotificationSettings(): Promise<NotificationSettings> {\n return await this.request<NotificationSettings>('settings');\n }\n\n async updateNotificationSettings(\n settings: NotificationSettings,\n ): Promise<NotificationSettings> {\n return await this.request<NotificationSettings>('settings', {\n method: 'POST',\n body: JSON.stringify(settings),\n headers: { 'Content-Type': 'application/json' },\n });\n }\n\n private async request<T>(path: string, init?: any): Promise<T> {\n const baseUrl = `${await this.discoveryApi.getBaseUrl('notifications')}/`;\n const url = new URL(path, baseUrl);\n\n const response = await this.fetchApi.fetch(url.toString(), init);\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n return response.json() as Promise<T>;\n }\n}\n"],"names":[],"mappings":";;AA8BO,MAAM,mBAAgD,CAAA;AAAA,EAC1C,YAAA,CAAA;AAAA,EACA,QAAA,CAAA;AAAA,EAEV,YAAY,OAGhB,EAAA;AACD,IAAA,IAAA,CAAK,eAAe,OAAQ,CAAA,YAAA,CAAA;AAC5B,IAAA,IAAA,CAAK,WAAW,OAAQ,CAAA,QAAA,CAAA;AAAA,GAC1B;AAAA,EAEA,MAAM,iBACJ,OACmC,EAAA;AACnC,IAAM,MAAA,WAAA,GAAc,IAAI,eAAgB,EAAA,CAAA;AACxC,IAAI,IAAA,OAAA,EAAS,UAAU,KAAW,CAAA,EAAA;AAChC,MAAA,WAAA,CAAY,OAAO,OAAS,EAAA,OAAA,CAAQ,KAAM,CAAA,QAAA,CAAS,EAAE,CAAC,CAAA,CAAA;AAAA,KACxD;AACA,IAAI,IAAA,OAAA,EAAS,WAAW,KAAW,CAAA,EAAA;AACjC,MAAA,WAAA,CAAY,OAAO,QAAU,EAAA,OAAA,CAAQ,MAAO,CAAA,QAAA,CAAS,EAAE,CAAC,CAAA,CAAA;AAAA,KAC1D;AACA,IAA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B,MAAM,MAAA,MAAM,aAAc,CAAA,YAAA,CAAa,QAAQ,CAAA,CAAA;AAAA,KACjD;AAEA,IAAA,OAAO,SAAS,IAAK,EAAA,CAAA;AAAA,GACvB;AACF;;;;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { InfoCard, Progress, ErrorPanel } from '@backstage/core-components';
|
|
3
|
+
import { useNotificationsApi } from '../../hooks/useNotificationsApi.esm.js';
|
|
4
|
+
import { useApi } from '@backstage/core-plugin-api';
|
|
5
|
+
import { notificationsApiRef } from '../../api/NotificationsApi.esm.js';
|
|
6
|
+
import '@backstage/errors';
|
|
7
|
+
import '../../routes.esm.js';
|
|
8
|
+
import '../../hooks/useTitleCounter.esm.js';
|
|
9
|
+
import { UserNotificationSettingsPanel } from './UserNotificationSettingsPanel.esm.js';
|
|
10
|
+
|
|
11
|
+
const UserNotificationSettingsCard = (props) => {
|
|
12
|
+
const [settings, setNotificationSettings] = React.useState(void 0);
|
|
13
|
+
const client = useApi(notificationsApiRef);
|
|
14
|
+
const { error, value, loading } = useNotificationsApi((api) => {
|
|
15
|
+
return api.getNotificationSettings();
|
|
16
|
+
});
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (!loading && !error) {
|
|
19
|
+
setNotificationSettings(value);
|
|
20
|
+
}
|
|
21
|
+
}, [loading, value, error]);
|
|
22
|
+
const onUpdate = (newSettings) => {
|
|
23
|
+
client.updateNotificationSettings(newSettings).then((updatedSettings) => setNotificationSettings(updatedSettings));
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "Notification settings", variant: "gridItem" }, loading && /* @__PURE__ */ React.createElement(Progress, null), error && /* @__PURE__ */ React.createElement(ErrorPanel, { title: "Failed to load settings", error }), settings && /* @__PURE__ */ React.createElement(
|
|
26
|
+
UserNotificationSettingsPanel,
|
|
27
|
+
{
|
|
28
|
+
settings,
|
|
29
|
+
onChange: onUpdate,
|
|
30
|
+
originNames: props.originNames
|
|
31
|
+
}
|
|
32
|
+
));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { UserNotificationSettingsCard };
|
|
36
|
+
//# sourceMappingURL=UserNotificationSettingsCard.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserNotificationSettingsCard.esm.js","sources":["../../../src/components/UserNotificationSettingsCard/UserNotificationSettingsCard.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 */\n\nimport React, { useEffect } from 'react';\nimport { ErrorPanel, InfoCard, Progress } from '@backstage/core-components';\nimport { useNotificationsApi } from '../../hooks';\nimport { NotificationSettings } from '@backstage/plugin-notifications-common';\nimport { notificationsApiRef } from '../../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { UserNotificationSettingsPanel } from './UserNotificationSettingsPanel';\n\n/** @public */\nexport const UserNotificationSettingsCard = (props: {\n originNames?: Record<string, string>;\n}) => {\n const [settings, setNotificationSettings] = React.useState<\n NotificationSettings | undefined\n >(undefined);\n\n const client = useApi(notificationsApiRef);\n const { error, value, loading } = useNotificationsApi(api => {\n return api.getNotificationSettings();\n });\n\n useEffect(() => {\n if (!loading && !error) {\n setNotificationSettings(value);\n }\n }, [loading, value, error]);\n\n const onUpdate = (newSettings: NotificationSettings) => {\n client\n .updateNotificationSettings(newSettings)\n .then(updatedSettings => setNotificationSettings(updatedSettings));\n };\n\n return (\n <InfoCard title=\"Notification settings\" variant=\"gridItem\">\n {loading && <Progress />}\n {error && <ErrorPanel title=\"Failed to load settings\" error={error} />}\n {settings && (\n <UserNotificationSettingsPanel\n settings={settings}\n onChange={onUpdate}\n originNames={props.originNames}\n />\n )}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAyBa,MAAA,4BAAA,GAA+B,CAAC,KAEvC,KAAA;AACJ,EAAA,MAAM,CAAC,QAAU,EAAA,uBAAuB,CAAI,GAAA,KAAA,CAAM,SAEhD,KAAS,CAAA,CAAA,CAAA;AAEX,EAAM,MAAA,MAAA,GAAS,OAAO,mBAAmB,CAAA,CAAA;AACzC,EAAA,MAAM,EAAE,KAAO,EAAA,KAAA,EAAO,OAAQ,EAAA,GAAI,oBAAoB,CAAO,GAAA,KAAA;AAC3D,IAAA,OAAO,IAAI,uBAAwB,EAAA,CAAA;AAAA,GACpC,CAAA,CAAA;AAED,EAAA,SAAA,CAAU,MAAM;AACd,IAAI,IAAA,CAAC,OAAW,IAAA,CAAC,KAAO,EAAA;AACtB,MAAA,uBAAA,CAAwB,KAAK,CAAA,CAAA;AAAA,KAC/B;AAAA,GACC,EAAA,CAAC,OAAS,EAAA,KAAA,EAAO,KAAK,CAAC,CAAA,CAAA;AAE1B,EAAM,MAAA,QAAA,GAAW,CAAC,WAAsC,KAAA;AACtD,IAAA,MAAA,CACG,2BAA2B,WAAW,CAAA,CACtC,KAAK,CAAmB,eAAA,KAAA,uBAAA,CAAwB,eAAe,CAAC,CAAA,CAAA;AAAA,GACrE,CAAA;AAEA,EAAA,2CACG,QAAS,EAAA,EAAA,KAAA,EAAM,uBAAwB,EAAA,OAAA,EAAQ,cAC7C,OAAW,oBAAA,KAAA,CAAA,aAAA,CAAC,QAAS,EAAA,IAAA,CAAA,EACrB,yBAAU,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,OAAM,yBAA0B,EAAA,KAAA,EAAc,GACnE,QACC,oBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,6BAAA;AAAA,IAAA;AAAA,MACC,QAAA;AAAA,MACA,QAAU,EAAA,QAAA;AAAA,MACV,aAAa,KAAM,CAAA,WAAA;AAAA,KAAA;AAAA,GAGzB,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { isNotificationsEnabledFor } from '@backstage/plugin-notifications-common';
|
|
3
|
+
import Table from '@material-ui/core/Table';
|
|
4
|
+
import MuiTableCell from '@material-ui/core/TableCell';
|
|
5
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
6
|
+
import TableHead from '@material-ui/core/TableHead';
|
|
7
|
+
import Typography from '@material-ui/core/Typography';
|
|
8
|
+
import TableBody from '@material-ui/core/TableBody';
|
|
9
|
+
import TableRow from '@material-ui/core/TableRow';
|
|
10
|
+
import Switch from '@material-ui/core/Switch';
|
|
11
|
+
import { capitalize } from 'lodash';
|
|
12
|
+
import Tooltip from '@material-ui/core/Tooltip';
|
|
13
|
+
|
|
14
|
+
const TableCell = withStyles({
|
|
15
|
+
root: {
|
|
16
|
+
borderBottom: "none"
|
|
17
|
+
}
|
|
18
|
+
})(MuiTableCell);
|
|
19
|
+
const UserNotificationSettingsPanel = (props) => {
|
|
20
|
+
const { settings, onChange } = props;
|
|
21
|
+
const allOrigins = [
|
|
22
|
+
...new Set(
|
|
23
|
+
settings.channels.flatMap(
|
|
24
|
+
(channel) => channel.origins.map((origin) => origin.id)
|
|
25
|
+
)
|
|
26
|
+
)
|
|
27
|
+
];
|
|
28
|
+
const handleChange = (channelId, originId, enabled) => {
|
|
29
|
+
const updatedSettings = {
|
|
30
|
+
channels: settings.channels.map((channel) => {
|
|
31
|
+
if (channel.id !== channelId) {
|
|
32
|
+
return channel;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
...channel,
|
|
36
|
+
origins: channel.origins.map((origin) => {
|
|
37
|
+
if (origin.id !== originId) {
|
|
38
|
+
return origin;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
...origin,
|
|
42
|
+
enabled
|
|
43
|
+
};
|
|
44
|
+
})
|
|
45
|
+
};
|
|
46
|
+
})
|
|
47
|
+
};
|
|
48
|
+
onChange(updatedSettings);
|
|
49
|
+
};
|
|
50
|
+
const formatOriginName = (originId) => {
|
|
51
|
+
if (props.originNames && originId in props.originNames) {
|
|
52
|
+
return props.originNames[originId];
|
|
53
|
+
}
|
|
54
|
+
return capitalize(originId.replaceAll(/[_:]/g, " "));
|
|
55
|
+
};
|
|
56
|
+
if (settings.channels.length === 0 || allOrigins.length === 0) {
|
|
57
|
+
return /* @__PURE__ */ React.createElement(Typography, { variant: "body1" }, "No notification settings available, check back later");
|
|
58
|
+
}
|
|
59
|
+
return /* @__PURE__ */ React.createElement(Table, null, /* @__PURE__ */ React.createElement(TableHead, null, /* @__PURE__ */ React.createElement(TableRow, null, /* @__PURE__ */ React.createElement(TableCell, null, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle1" }, "Origin")), settings.channels.map((channel) => /* @__PURE__ */ React.createElement(TableCell, null, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle1" }, channel.id))))), /* @__PURE__ */ React.createElement(TableBody, null, allOrigins.map((origin) => /* @__PURE__ */ React.createElement(TableRow, null, /* @__PURE__ */ React.createElement(TableCell, null, formatOriginName(origin)), settings.channels.map((channel) => /* @__PURE__ */ React.createElement(TableCell, null, /* @__PURE__ */ React.createElement(
|
|
60
|
+
Tooltip,
|
|
61
|
+
{
|
|
62
|
+
title: `Enable or disable ${channel.id.toLocaleLowerCase(
|
|
63
|
+
"en-US"
|
|
64
|
+
)} notifications from ${formatOriginName(
|
|
65
|
+
origin
|
|
66
|
+
).toLocaleLowerCase("en-US")}`
|
|
67
|
+
},
|
|
68
|
+
/* @__PURE__ */ React.createElement(
|
|
69
|
+
Switch,
|
|
70
|
+
{
|
|
71
|
+
checked: isNotificationsEnabledFor(
|
|
72
|
+
settings,
|
|
73
|
+
channel.id,
|
|
74
|
+
origin
|
|
75
|
+
),
|
|
76
|
+
onChange: (event) => {
|
|
77
|
+
handleChange(channel.id, origin, event.target.checked);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
)))))));
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export { UserNotificationSettingsPanel };
|
|
85
|
+
//# sourceMappingURL=UserNotificationSettingsPanel.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserNotificationSettingsPanel.esm.js","sources":["../../../src/components/UserNotificationSettingsCard/UserNotificationSettingsPanel.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 */\n\nimport React from 'react';\nimport {\n isNotificationsEnabledFor,\n NotificationSettings,\n} from '@backstage/plugin-notifications-common';\nimport Table from '@material-ui/core/Table';\nimport MuiTableCell from '@material-ui/core/TableCell';\nimport { withStyles } from '@material-ui/core/styles';\nimport TableHead from '@material-ui/core/TableHead';\nimport Typography from '@material-ui/core/Typography';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableRow from '@material-ui/core/TableRow';\nimport Switch from '@material-ui/core/Switch';\nimport { capitalize } from 'lodash';\nimport Tooltip from '@material-ui/core/Tooltip';\n\nconst TableCell = withStyles({\n root: {\n borderBottom: 'none',\n },\n})(MuiTableCell);\n\nexport const UserNotificationSettingsPanel = (props: {\n settings: NotificationSettings;\n onChange: (settings: NotificationSettings) => void;\n originNames?: Record<string, string>;\n}) => {\n const { settings, onChange } = props;\n const allOrigins = [\n ...new Set(\n settings.channels.flatMap(channel =>\n channel.origins.map(origin => origin.id),\n ),\n ),\n ];\n\n const handleChange = (\n channelId: string,\n originId: string,\n enabled: boolean,\n ) => {\n const updatedSettings = {\n channels: settings.channels.map(channel => {\n if (channel.id !== channelId) {\n return channel;\n }\n return {\n ...channel,\n origins: channel.origins.map(origin => {\n if (origin.id !== originId) {\n return origin;\n }\n return {\n ...origin,\n enabled,\n };\n }),\n };\n }),\n };\n onChange(updatedSettings);\n };\n\n const formatOriginName = (originId: string) => {\n if (props.originNames && originId in props.originNames) {\n return props.originNames[originId];\n }\n return capitalize(originId.replaceAll(/[_:]/g, ' '));\n };\n\n if (settings.channels.length === 0 || allOrigins.length === 0) {\n return (\n <Typography variant=\"body1\">\n No notification settings available, check back later\n </Typography>\n );\n }\n\n return (\n <Table>\n <TableHead>\n <TableRow>\n <TableCell>\n <Typography variant=\"subtitle1\">Origin</Typography>\n </TableCell>\n {settings.channels.map(channel => (\n <TableCell>\n <Typography variant=\"subtitle1\">{channel.id}</Typography>\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {allOrigins.map(origin => (\n <TableRow>\n <TableCell>{formatOriginName(origin)}</TableCell>\n {settings.channels.map(channel => (\n <TableCell>\n <Tooltip\n title={`Enable or disable ${channel.id.toLocaleLowerCase(\n 'en-US',\n )} notifications from ${formatOriginName(\n origin,\n ).toLocaleLowerCase('en-US')}`}\n >\n <Switch\n checked={isNotificationsEnabledFor(\n settings,\n channel.id,\n origin,\n )}\n onChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n handleChange(channel.id, origin, event.target.checked);\n }}\n />\n </Tooltip>\n </TableCell>\n ))}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAgCA,MAAM,YAAY,UAAW,CAAA;AAAA,EAC3B,IAAM,EAAA;AAAA,IACJ,YAAc,EAAA,MAAA;AAAA,GAChB;AACF,CAAC,EAAE,YAAY,CAAA,CAAA;AAEF,MAAA,6BAAA,GAAgC,CAAC,KAIxC,KAAA;AACJ,EAAM,MAAA,EAAE,QAAU,EAAA,QAAA,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,CAAA;AAAA,KAAA;AAAA,oBAE5B,KAAA,CAAA,aAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,OAAS,EAAA,yBAAA;AAAA,UACP,QAAA;AAAA,UACA,OAAQ,CAAA,EAAA;AAAA,UACR,MAAA;AAAA,SACF;AAAA,QACA,QAAA,EAAU,CAAC,KAA+C,KAAA;AACxD,UAAA,YAAA,CAAa,OAAQ,CAAA,EAAA,EAAI,MAAQ,EAAA,KAAA,CAAM,OAAO,OAAO,CAAA,CAAA;AAAA,SACvD;AAAA,OAAA;AAAA,KACF;AAAA,GAEJ,CACD,CACH,CACD,CACH,CACF,CAAA,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
5
5
|
import { DiscoveryApi, FetchApi, IconComponent } from '@backstage/core-plugin-api';
|
|
6
|
-
import { NotificationSeverity, Notification, NotificationStatus } from '@backstage/plugin-notifications-common';
|
|
6
|
+
import { NotificationSeverity, Notification, NotificationStatus, NotificationSettings } from '@backstage/plugin-notifications-common';
|
|
7
7
|
import { TableProps } from '@backstage/core-components';
|
|
8
8
|
|
|
9
9
|
/** @public */
|
|
@@ -56,6 +56,8 @@ interface NotificationsApi {
|
|
|
56
56
|
getNotification(id: string): Promise<Notification>;
|
|
57
57
|
getStatus(): Promise<NotificationStatus>;
|
|
58
58
|
updateNotifications(options: UpdateNotificationsOptions): Promise<Notification[]>;
|
|
59
|
+
getNotificationSettings(): Promise<NotificationSettings>;
|
|
60
|
+
updateNotificationSettings(settings: NotificationSettings): Promise<NotificationSettings>;
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
/** @public */
|
|
@@ -70,6 +72,8 @@ declare class NotificationsClient implements NotificationsApi {
|
|
|
70
72
|
getNotification(id: string): Promise<Notification>;
|
|
71
73
|
getStatus(): Promise<NotificationStatus>;
|
|
72
74
|
updateNotifications(options: UpdateNotificationsOptions): Promise<Notification[]>;
|
|
75
|
+
getNotificationSettings(): Promise<NotificationSettings>;
|
|
76
|
+
updateNotificationSettings(settings: NotificationSettings): Promise<NotificationSettings>;
|
|
73
77
|
private request;
|
|
74
78
|
}
|
|
75
79
|
|
|
@@ -130,4 +134,9 @@ type NotificationsTableProps = Pick<TableProps, 'onPageChange' | 'onRowsPerPageC
|
|
|
130
134
|
/** @public */
|
|
131
135
|
declare const NotificationsTable: ({ markAsReadOnLinkOpen, isLoading, notifications, isUnread, onUpdate, setContainsText, onPageChange, onRowsPerPageChange, page, pageSize, totalCount, }: NotificationsTableProps) => React__default.JSX.Element;
|
|
132
136
|
|
|
133
|
-
|
|
137
|
+
/** @public */
|
|
138
|
+
declare const UserNotificationSettingsCard: (props: {
|
|
139
|
+
originNames?: Record<string, string>;
|
|
140
|
+
}) => React__default.JSX.Element;
|
|
141
|
+
|
|
142
|
+
export { type GetNotificationsOptions, type GetNotificationsResponse, type NotificationsApi, NotificationsClient, NotificationsPage, type NotificationsPageProps, NotificationsSidebarItem, NotificationsTable, type NotificationsTableProps, type UpdateNotificationsOptions, UserNotificationSettingsCard, notificationsApiRef, notificationsPlugin, useNotificationsApi };
|
package/dist/index.esm.js
CHANGED
|
@@ -8,4 +8,5 @@ import './routes.esm.js';
|
|
|
8
8
|
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
|
+
export { UserNotificationSettingsCard } from './components/UserNotificationSettingsCard/UserNotificationSettingsCard.esm.js';
|
|
11
12
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-notifications",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3-next.1",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "frontend-plugin",
|
|
6
6
|
"pluginId": "notifications",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"test": "backstage-cli package test"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@backstage/core-components": "
|
|
42
|
-
"@backstage/core-plugin-api": "
|
|
43
|
-
"@backstage/errors": "
|
|
44
|
-
"@backstage/plugin-notifications-common": "
|
|
45
|
-
"@backstage/plugin-signals-react": "
|
|
46
|
-
"@backstage/theme": "
|
|
47
|
-
"@backstage/types": "
|
|
41
|
+
"@backstage/core-components": "0.16.0-next.1",
|
|
42
|
+
"@backstage/core-plugin-api": "1.10.0",
|
|
43
|
+
"@backstage/errors": "1.2.4",
|
|
44
|
+
"@backstage/plugin-notifications-common": "0.0.6-next.0",
|
|
45
|
+
"@backstage/plugin-signals-react": "0.0.6",
|
|
46
|
+
"@backstage/theme": "0.6.1-next.0",
|
|
47
|
+
"@backstage/types": "1.1.1",
|
|
48
48
|
"@material-ui/core": "^4.9.13",
|
|
49
49
|
"@material-ui/icons": "^4.9.1",
|
|
50
50
|
"@material-ui/lab": "^4.0.0-alpha.61",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"react-use": "^17.2.4"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@backstage/cli": "
|
|
59
|
-
"@backstage/core-app-api": "
|
|
60
|
-
"@backstage/dev-utils": "
|
|
61
|
-
"@backstage/plugin-signals": "
|
|
62
|
-
"@backstage/test-utils": "
|
|
58
|
+
"@backstage/cli": "0.29.0-next.1",
|
|
59
|
+
"@backstage/core-app-api": "1.15.1",
|
|
60
|
+
"@backstage/dev-utils": "1.1.3-next.1",
|
|
61
|
+
"@backstage/plugin-signals": "0.0.12-next.1",
|
|
62
|
+
"@backstage/test-utils": "1.7.1-next.0",
|
|
63
63
|
"@testing-library/jest-dom": "^6.0.0",
|
|
64
64
|
"@testing-library/react": "^16.0.0",
|
|
65
65
|
"@testing-library/user-event": "^14.0.0",
|