@backstage/plugin-notifications 0.5.5 → 0.5.6-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 +25 -0
- package/dist/alpha.esm.js +1 -0
- package/dist/alpha.esm.js.map +1 -1
- package/dist/components/UserNotificationSettingsCard/NoBorderTableCell.esm.js +11 -0
- package/dist/components/UserNotificationSettingsCard/NoBorderTableCell.esm.js.map +1 -0
- package/dist/components/UserNotificationSettingsCard/OriginRow.esm.js +59 -0
- package/dist/components/UserNotificationSettingsCard/OriginRow.esm.js.map +1 -0
- package/dist/components/UserNotificationSettingsCard/TopicRow.esm.js +50 -0
- package/dist/components/UserNotificationSettingsCard/TopicRow.esm.js.map +1 -0
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsCard.esm.js +49 -6
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsCard.esm.js.map +1 -1
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsPanel.esm.js +64 -47
- package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsPanel.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/package.json.esm.js +118 -0
- package/dist/package.json.esm.js.map +1 -0
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @backstage/plugin-notifications
|
|
2
2
|
|
|
3
|
+
## 0.5.6-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1fb5f06: Adds ability for user to turn on/off notifications for specific topics within an origin.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/plugin-notifications-common@0.0.9-next.0
|
|
10
|
+
- @backstage/core-compat-api@0.4.3-next.1
|
|
11
|
+
- @backstage/core-components@0.17.2
|
|
12
|
+
- @backstage/core-plugin-api@1.10.7
|
|
13
|
+
- @backstage/errors@1.2.7
|
|
14
|
+
- @backstage/frontend-plugin-api@0.10.3-next.0
|
|
15
|
+
- @backstage/theme@0.6.6
|
|
16
|
+
- @backstage/types@1.2.1
|
|
17
|
+
- @backstage/plugin-signals-react@0.0.13
|
|
18
|
+
|
|
19
|
+
## 0.5.6-next.0
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 18c64e9: Added the `info.packageJson` option to the plugin instance for the new frontend system.
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @backstage/frontend-plugin-api@0.10.3-next.0
|
|
26
|
+
- @backstage/core-compat-api@0.4.3-next.0
|
|
27
|
+
|
|
3
28
|
## 0.5.5
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/dist/alpha.esm.js
CHANGED
package/dist/alpha.esm.js.map
CHANGED
|
@@ -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 createApiFactory,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { rootRouteRef } from './routes';\nimport {\n convertLegacyRouteRef,\n convertLegacyRouteRefs,\n} from '@backstage/core-compat-api';\nimport { NotificationsClient, notificationsApiRef } from './api';\n\nconst page = PageBlueprint.make({\n params: {\n defaultPath: '/notifications',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('./components/NotificationsPage').then(m => (\n <m.NotificationsPage />\n )),\n },\n});\n\nconst api = ApiBlueprint.make({\n params: {\n factory: createApiFactory({\n api: notificationsApiRef,\n deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef },\n factory: ({ discoveryApi, fetchApi }) =>\n new NotificationsClient({ discoveryApi, fetchApi }),\n }),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'notifications',\n routes: convertLegacyRouteRefs({\n root: rootRouteRef,\n }),\n // TODO(Rugvip): Nav item (i.e. NotificationsSidebarItem) currently needs to be installed manually\n extensions: [page, api],\n});\n"],"names":[],"mappings":";;;;;;;AA+BA,MAAM,IAAA,GAAO,cAAc,IAAK,CAAA;AAAA,EAC9B,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,gBAAA;AAAA,IACb,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,MAAA,EAAQ,MACN,OAAO,6CAAgC,CAAA,CAAE,IAAK,CAAA,CAAA,CAAA,qBAC3C,GAAA,CAAA,CAAA,CAAE,iBAAF,EAAA,EAAoB,CACtB;AAAA;AAEP,CAAC,CAAA;AAED,MAAM,GAAA,GAAM,aAAa,IAAK,CAAA;AAAA,EAC5B,MAAQ,EAAA;AAAA,IACN,SAAS,gBAAiB,CAAA;AAAA,MACxB,GAAK,EAAA,mBAAA;AAAA,MACL,IAAM,EAAA,EAAE,YAAc,EAAA,eAAA,EAAiB,UAAU,WAAY,EAAA;AAAA,MAC7D,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EACxB,KAAA,IAAI,mBAAoB,CAAA,EAAE,YAAc,EAAA,QAAA,EAAU;AAAA,KACrD;AAAA;AAEL,CAAC,CAAA;AAGD,YAAe,oBAAqB,CAAA;AAAA,EAClC,QAAU,EAAA,eAAA;AAAA,EACV,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,IAAM,EAAA;AAAA,GACP,CAAA;AAAA;AAAA,EAED,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 createApiFactory,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { rootRouteRef } from './routes';\nimport {\n convertLegacyRouteRef,\n convertLegacyRouteRefs,\n} from '@backstage/core-compat-api';\nimport { NotificationsClient, notificationsApiRef } from './api';\n\nconst page = PageBlueprint.make({\n params: {\n defaultPath: '/notifications',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('./components/NotificationsPage').then(m => (\n <m.NotificationsPage />\n )),\n },\n});\n\nconst api = ApiBlueprint.make({\n params: {\n factory: createApiFactory({\n api: notificationsApiRef,\n deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef },\n factory: ({ discoveryApi, fetchApi }) =>\n new NotificationsClient({ discoveryApi, fetchApi }),\n }),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'notifications',\n info: { packageJson: () => import('../package.json') },\n routes: convertLegacyRouteRefs({\n root: rootRouteRef,\n }),\n // TODO(Rugvip): Nav item (i.e. NotificationsSidebarItem) currently needs to be installed manually\n extensions: [page, api],\n});\n"],"names":[],"mappings":";;;;;;;AA+BA,MAAM,IAAA,GAAO,cAAc,IAAK,CAAA;AAAA,EAC9B,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,gBAAA;AAAA,IACb,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,MAAA,EAAQ,MACN,OAAO,6CAAgC,CAAA,CAAE,IAAK,CAAA,CAAA,CAAA,qBAC3C,GAAA,CAAA,CAAA,CAAE,iBAAF,EAAA,EAAoB,CACtB;AAAA;AAEP,CAAC,CAAA;AAED,MAAM,GAAA,GAAM,aAAa,IAAK,CAAA;AAAA,EAC5B,MAAQ,EAAA;AAAA,IACN,SAAS,gBAAiB,CAAA;AAAA,MACxB,GAAK,EAAA,mBAAA;AAAA,MACL,IAAM,EAAA,EAAE,YAAc,EAAA,eAAA,EAAiB,UAAU,WAAY,EAAA;AAAA,MAC7D,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EACxB,KAAA,IAAI,mBAAoB,CAAA,EAAE,YAAc,EAAA,QAAA,EAAU;AAAA,KACrD;AAAA;AAEL,CAAC,CAAA;AAGD,YAAe,oBAAqB,CAAA;AAAA,EAClC,QAAU,EAAA,eAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAiB,CAAE,EAAA;AAAA,EACrD,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,IAAM,EAAA;AAAA,GACP,CAAA;AAAA;AAAA,EAED,UAAA,EAAY,CAAC,IAAA,EAAM,GAAG;AACxB,CAAC,CAAA;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
2
|
+
import MuiTableCell from '@material-ui/core/TableCell';
|
|
3
|
+
|
|
4
|
+
const NoBorderTableCell = withStyles({
|
|
5
|
+
root: {
|
|
6
|
+
borderBottom: "none"
|
|
7
|
+
}
|
|
8
|
+
})(MuiTableCell);
|
|
9
|
+
|
|
10
|
+
export { NoBorderTableCell };
|
|
11
|
+
//# sourceMappingURL=NoBorderTableCell.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NoBorderTableCell.esm.js","sources":["../../../src/components/UserNotificationSettingsCard/NoBorderTableCell.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 { withStyles } from '@material-ui/core/styles';\nimport MuiTableCell from '@material-ui/core/TableCell';\n\nexport const NoBorderTableCell = withStyles({\n root: {\n borderBottom: 'none',\n },\n})(MuiTableCell);\n"],"names":[],"mappings":";;;AAmBO,MAAM,oBAAoB,UAAW,CAAA;AAAA,EAC1C,IAAM,EAAA;AAAA,IACJ,YAAc,EAAA;AAAA;AAElB,CAAC,EAAE,YAAY;;;;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { isNotificationsEnabledFor } from '@backstage/plugin-notifications-common';
|
|
3
|
+
import IconButton from '@material-ui/core/IconButton';
|
|
4
|
+
import Switch from '@material-ui/core/Switch';
|
|
5
|
+
import TableRow from '@material-ui/core/TableRow';
|
|
6
|
+
import Tooltip from '@material-ui/core/Tooltip';
|
|
7
|
+
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
|
|
8
|
+
import KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';
|
|
9
|
+
import { NoBorderTableCell } from './NoBorderTableCell.esm.js';
|
|
10
|
+
import { useNotificationFormat } from './UserNotificationSettingsCard.esm.js';
|
|
11
|
+
|
|
12
|
+
const OriginRow = (props) => {
|
|
13
|
+
const { channel, origin, settings, handleChange, open, handleRowToggle } = props;
|
|
14
|
+
const { formatOriginName } = useNotificationFormat();
|
|
15
|
+
return /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
16
|
+
/* @__PURE__ */ jsx(NoBorderTableCell, { children: origin.topics && origin.topics.length > 0 && /* @__PURE__ */ jsx(
|
|
17
|
+
Tooltip,
|
|
18
|
+
{
|
|
19
|
+
title: `Show Topics for the ${formatOriginName(origin.id)} origin`,
|
|
20
|
+
children: /* @__PURE__ */ jsx(
|
|
21
|
+
IconButton,
|
|
22
|
+
{
|
|
23
|
+
"aria-label": "expand row",
|
|
24
|
+
size: "small",
|
|
25
|
+
onClick: () => handleRowToggle(origin.id),
|
|
26
|
+
children: open ? /* @__PURE__ */ jsx(KeyboardArrowUpIcon, {}) : /* @__PURE__ */ jsx(KeyboardArrowDownIcon, {})
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
) }),
|
|
31
|
+
/* @__PURE__ */ jsx(NoBorderTableCell, { children: formatOriginName(origin.id) }),
|
|
32
|
+
/* @__PURE__ */ jsx(NoBorderTableCell, { children: "all" }),
|
|
33
|
+
settings.channels.map((ch) => /* @__PURE__ */ jsx(NoBorderTableCell, { align: "center", children: /* @__PURE__ */ jsx(
|
|
34
|
+
Tooltip,
|
|
35
|
+
{
|
|
36
|
+
title: `Enable or disable ${channel.id.toLocaleLowerCase(
|
|
37
|
+
"en-US"
|
|
38
|
+
)} notifications from ${formatOriginName(origin.id)}`,
|
|
39
|
+
children: /* @__PURE__ */ jsx(
|
|
40
|
+
Switch,
|
|
41
|
+
{
|
|
42
|
+
checked: isNotificationsEnabledFor(
|
|
43
|
+
settings,
|
|
44
|
+
ch.id,
|
|
45
|
+
origin.id,
|
|
46
|
+
null
|
|
47
|
+
),
|
|
48
|
+
onChange: (event) => {
|
|
49
|
+
handleChange(ch.id, origin.id, null, event.target.checked);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
) }, ch.id))
|
|
55
|
+
] });
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export { OriginRow };
|
|
59
|
+
//# sourceMappingURL=OriginRow.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OriginRow.esm.js","sources":["../../../src/components/UserNotificationSettingsCard/OriginRow.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 ChannelSetting,\n isNotificationsEnabledFor,\n NotificationSettings,\n OriginSetting,\n} from '@backstage/plugin-notifications-common';\nimport IconButton from '@material-ui/core/IconButton';\nimport Switch from '@material-ui/core/Switch';\nimport TableRow from '@material-ui/core/TableRow';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\nimport { NoBorderTableCell } from './NoBorderTableCell';\nimport { useNotificationFormat } from './UserNotificationSettingsCard';\n\nexport const OriginRow = (props: {\n channel: ChannelSetting;\n origin: OriginSetting;\n settings: NotificationSettings;\n handleChange: (\n channel: string,\n origin: string,\n topic: string | null,\n enabled: boolean,\n ) => void;\n open: boolean;\n handleRowToggle: (originId: string) => void;\n}) => {\n const { channel, origin, settings, handleChange, open, handleRowToggle } =\n props;\n const { formatOriginName } = useNotificationFormat();\n return (\n <TableRow>\n <NoBorderTableCell>\n {origin.topics && origin.topics.length > 0 && (\n <Tooltip\n title={`Show Topics for the ${formatOriginName(origin.id)} origin`}\n >\n <IconButton\n aria-label=\"expand row\"\n size=\"small\"\n onClick={() => handleRowToggle(origin.id)}\n >\n {open ? <KeyboardArrowUpIcon /> : <KeyboardArrowDownIcon />}\n </IconButton>\n </Tooltip>\n )}\n </NoBorderTableCell>\n <NoBorderTableCell>{formatOriginName(origin.id)}</NoBorderTableCell>\n <NoBorderTableCell>all</NoBorderTableCell>\n {settings.channels.map(ch => (\n <NoBorderTableCell key={ch.id} align=\"center\">\n <Tooltip\n title={`Enable or disable ${channel.id.toLocaleLowerCase(\n 'en-US',\n )} notifications from ${formatOriginName(origin.id)}`}\n >\n <Switch\n checked={isNotificationsEnabledFor(\n settings,\n ch.id,\n origin.id,\n null,\n )}\n onChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n handleChange(ch.id, origin.id, null, event.target.checked);\n }}\n />\n </Tooltip>\n </NoBorderTableCell>\n ))}\n </TableRow>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAgCa,MAAA,SAAA,GAAY,CAAC,KAYpB,KAAA;AACJ,EAAA,MAAM,EAAE,OAAS,EAAA,MAAA,EAAQ,UAAU,YAAc,EAAA,IAAA,EAAM,iBACrD,GAAA,KAAA;AACF,EAAM,MAAA,EAAE,gBAAiB,EAAA,GAAI,qBAAsB,EAAA;AACnD,EAAA,4BACG,QACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,qBACE,QAAO,EAAA,MAAA,CAAA,MAAA,IAAU,MAAO,CAAA,MAAA,CAAO,SAAS,CACvC,oBAAA,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,KAAO,EAAA,CAAA,oBAAA,EAAuB,gBAAiB,CAAA,MAAA,CAAO,EAAE,CAAC,CAAA,OAAA,CAAA;AAAA,QAEzD,QAAA,kBAAA,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YACC,YAAW,EAAA,YAAA;AAAA,YACX,IAAK,EAAA,OAAA;AAAA,YACL,OAAS,EAAA,MAAM,eAAgB,CAAA,MAAA,CAAO,EAAE,CAAA;AAAA,YAEvC,QAAO,EAAA,IAAA,mBAAA,GAAA,CAAC,mBAAoB,EAAA,EAAA,CAAA,uBAAM,qBAAsB,EAAA,EAAA;AAAA;AAAA;AAC3D;AAAA,KAGN,EAAA,CAAA;AAAA,oBACC,GAAA,CAAA,iBAAA,EAAA,EAAmB,QAAiB,EAAA,gBAAA,CAAA,MAAA,CAAO,EAAE,CAAE,EAAA,CAAA;AAAA,oBAChD,GAAA,CAAC,qBAAkB,QAAG,EAAA,KAAA,EAAA,CAAA;AAAA,IACrB,SAAS,QAAS,CAAA,GAAA,CAAI,wBACpB,GAAA,CAAA,iBAAA,EAAA,EAA8B,OAAM,QACnC,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,CAAqB,kBAAA,EAAA,OAAA,CAAQ,EAAG,CAAA,iBAAA;AAAA,UACrC;AAAA,SACD,CAAA,oBAAA,EAAuB,gBAAiB,CAAA,MAAA,CAAO,EAAE,CAAC,CAAA,CAAA;AAAA,QAEnD,QAAA,kBAAA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,OAAS,EAAA,yBAAA;AAAA,cACP,QAAA;AAAA,cACA,EAAG,CAAA,EAAA;AAAA,cACH,MAAO,CAAA,EAAA;AAAA,cACP;AAAA,aACF;AAAA,YACA,QAAA,EAAU,CAAC,KAA+C,KAAA;AACxD,cAAA,YAAA,CAAa,GAAG,EAAI,EAAA,MAAA,CAAO,IAAI,IAAM,EAAA,KAAA,CAAM,OAAO,OAAO,CAAA;AAAA;AAC3D;AAAA;AACF;AAAA,KACF,EAAA,EAjBsB,EAAG,CAAA,EAkB3B,CACD;AAAA,GACH,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { isNotificationsEnabledFor } from '@backstage/plugin-notifications-common';
|
|
3
|
+
import TableRow from '@material-ui/core/TableRow';
|
|
4
|
+
import Tooltip from '@material-ui/core/Tooltip';
|
|
5
|
+
import Switch from '@material-ui/core/Switch';
|
|
6
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
7
|
+
import { NoBorderTableCell } from './NoBorderTableCell.esm.js';
|
|
8
|
+
import { useNotificationFormat } from './UserNotificationSettingsCard.esm.js';
|
|
9
|
+
|
|
10
|
+
const TopicTableRow = withStyles({
|
|
11
|
+
root: {
|
|
12
|
+
paddingLeft: "4px"
|
|
13
|
+
}
|
|
14
|
+
})(TableRow);
|
|
15
|
+
const TopicRow = (props) => {
|
|
16
|
+
const { topic, origin, settings, handleChange } = props;
|
|
17
|
+
const { formatOriginName, formatTopicName } = useNotificationFormat();
|
|
18
|
+
return /* @__PURE__ */ jsxs(TopicTableRow, { children: [
|
|
19
|
+
/* @__PURE__ */ jsx(NoBorderTableCell, {}),
|
|
20
|
+
/* @__PURE__ */ jsx(NoBorderTableCell, {}),
|
|
21
|
+
/* @__PURE__ */ jsx(NoBorderTableCell, { children: formatTopicName(topic.id) }),
|
|
22
|
+
settings.channels.map((ch) => /* @__PURE__ */ jsx(NoBorderTableCell, { align: "center", children: /* @__PURE__ */ jsx(
|
|
23
|
+
Tooltip,
|
|
24
|
+
{
|
|
25
|
+
title: `Enable or disable ${ch.id.toLocaleLowerCase(
|
|
26
|
+
"en-US"
|
|
27
|
+
)} notifications for the ${formatTopicName(
|
|
28
|
+
topic.id
|
|
29
|
+
)} topic from ${formatOriginName(origin.id)}`,
|
|
30
|
+
children: /* @__PURE__ */ jsx(
|
|
31
|
+
Switch,
|
|
32
|
+
{
|
|
33
|
+
checked: isNotificationsEnabledFor(
|
|
34
|
+
settings,
|
|
35
|
+
ch.id,
|
|
36
|
+
origin.id,
|
|
37
|
+
topic.id
|
|
38
|
+
),
|
|
39
|
+
onChange: (event) => {
|
|
40
|
+
handleChange(ch.id, origin.id, topic.id, event.target.checked);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
) }, `${ch.id}-${topic}`))
|
|
46
|
+
] });
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { TopicRow };
|
|
50
|
+
//# sourceMappingURL=TopicRow.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopicRow.esm.js","sources":["../../../src/components/UserNotificationSettingsCard/TopicRow.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 OriginSetting,\n TopicSetting,\n} from '@backstage/plugin-notifications-common';\nimport TableRow from '@material-ui/core/TableRow';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Switch from '@material-ui/core/Switch';\nimport { withStyles } from '@material-ui/core/styles';\nimport { NoBorderTableCell } from './NoBorderTableCell';\nimport { useNotificationFormat } from './UserNotificationSettingsCard';\n\nconst TopicTableRow = withStyles({\n root: {\n paddingLeft: '4px',\n },\n})(TableRow);\n\nexport const TopicRow = (props: {\n topic: TopicSetting;\n origin: OriginSetting;\n settings: NotificationSettings;\n handleChange: (\n channel: string,\n origin: string,\n topic: string | null,\n enabled: boolean,\n ) => void;\n}) => {\n const { topic, origin, settings, handleChange } = props;\n const { formatOriginName, formatTopicName } = useNotificationFormat();\n return (\n <TopicTableRow>\n <NoBorderTableCell />\n <NoBorderTableCell />\n <NoBorderTableCell>{formatTopicName(topic.id)}</NoBorderTableCell>\n {settings.channels.map(ch => (\n <NoBorderTableCell key={`${ch.id}-${topic}`} align=\"center\">\n <Tooltip\n title={`Enable or disable ${ch.id.toLocaleLowerCase(\n 'en-US',\n )} notifications for the ${formatTopicName(\n topic.id,\n )} topic from ${formatOriginName(origin.id)}`}\n >\n <Switch\n checked={isNotificationsEnabledFor(\n settings,\n ch.id,\n origin.id,\n topic.id,\n )}\n onChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n handleChange(ch.id, origin.id, topic.id, event.target.checked);\n }}\n />\n </Tooltip>\n </NoBorderTableCell>\n ))}\n </TopicTableRow>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA8BA,MAAM,gBAAgB,UAAW,CAAA;AAAA,EAC/B,IAAM,EAAA;AAAA,IACJ,WAAa,EAAA;AAAA;AAEjB,CAAC,EAAE,QAAQ,CAAA;AAEE,MAAA,QAAA,GAAW,CAAC,KAUnB,KAAA;AACJ,EAAA,MAAM,EAAE,KAAA,EAAO,MAAQ,EAAA,QAAA,EAAU,cAAiB,GAAA,KAAA;AAClD,EAAA,MAAM,EAAE,gBAAA,EAAkB,eAAgB,EAAA,GAAI,qBAAsB,EAAA;AACpE,EAAA,4BACG,aACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,iBAAkB,EAAA,EAAA,CAAA;AAAA,wBAClB,iBAAkB,EAAA,EAAA,CAAA;AAAA,oBAClB,GAAA,CAAA,iBAAA,EAAA,EAAmB,QAAgB,EAAA,eAAA,CAAA,KAAA,CAAM,EAAE,CAAE,EAAA,CAAA;AAAA,IAC7C,SAAS,QAAS,CAAA,GAAA,CAAI,wBACpB,GAAA,CAAA,iBAAA,EAAA,EAA4C,OAAM,QACjD,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,CAAqB,kBAAA,EAAA,EAAA,CAAG,EAAG,CAAA,iBAAA;AAAA,UAChC;AAAA,SACD,CAA0B,uBAAA,EAAA,eAAA;AAAA,UACzB,KAAM,CAAA;AAAA,SACP,CAAA,YAAA,EAAe,gBAAiB,CAAA,MAAA,CAAO,EAAE,CAAC,CAAA,CAAA;AAAA,QAE3C,QAAA,kBAAA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,OAAS,EAAA,yBAAA;AAAA,cACP,QAAA;AAAA,cACA,EAAG,CAAA,EAAA;AAAA,cACH,MAAO,CAAA,EAAA;AAAA,cACP,KAAM,CAAA;AAAA,aACR;AAAA,YACA,QAAA,EAAU,CAAC,KAA+C,KAAA;AACxD,cAAa,YAAA,CAAA,EAAA,CAAG,IAAI,MAAO,CAAA,EAAA,EAAI,MAAM,EAAI,EAAA,KAAA,CAAM,OAAO,OAAO,CAAA;AAAA;AAC/D;AAAA;AACF;AAAA,SAlBoB,CAAG,EAAA,EAAA,CAAG,EAAE,CAAI,CAAA,EAAA,KAAK,EAoBzC,CACD;AAAA,GACH,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useState, useEffect } from 'react';
|
|
2
|
+
import { createContext, useState, useEffect, useContext } from 'react';
|
|
3
3
|
import { InfoCard, Progress, ErrorPanel } from '@backstage/core-components';
|
|
4
4
|
import { useNotificationsApi } from '../../hooks/useNotificationsApi.esm.js';
|
|
5
5
|
import { useApi } from '@backstage/core-plugin-api';
|
|
@@ -8,7 +8,44 @@ import '@backstage/errors';
|
|
|
8
8
|
import '../../routes.esm.js';
|
|
9
9
|
import '../../hooks/useTitleCounter.esm.js';
|
|
10
10
|
import { UserNotificationSettingsPanel } from './UserNotificationSettingsPanel.esm.js';
|
|
11
|
+
import { capitalize } from 'lodash';
|
|
11
12
|
|
|
13
|
+
const NotificationFormatContext = createContext(
|
|
14
|
+
void 0
|
|
15
|
+
);
|
|
16
|
+
const useNotificationFormat = () => {
|
|
17
|
+
const context = useContext(NotificationFormatContext);
|
|
18
|
+
if (!context)
|
|
19
|
+
throw new Error(
|
|
20
|
+
"useNotificationFormat must be used within a NotificationFormatProvider"
|
|
21
|
+
);
|
|
22
|
+
return context;
|
|
23
|
+
};
|
|
24
|
+
const NotificationFormatProvider = ({
|
|
25
|
+
children,
|
|
26
|
+
originMap,
|
|
27
|
+
topicMap
|
|
28
|
+
}) => {
|
|
29
|
+
const formatName = (id, nameMap) => {
|
|
30
|
+
if (nameMap && id in nameMap) {
|
|
31
|
+
return nameMap[id];
|
|
32
|
+
}
|
|
33
|
+
return capitalize(id.replaceAll(/[-_:]/g, " "));
|
|
34
|
+
};
|
|
35
|
+
const formatOriginName = (originId) => {
|
|
36
|
+
return formatName(originId, originMap);
|
|
37
|
+
};
|
|
38
|
+
const formatTopicName = (topicId) => {
|
|
39
|
+
return formatName(topicId, topicMap);
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
NotificationFormatContext.Provider,
|
|
43
|
+
{
|
|
44
|
+
value: { formatOriginName, formatTopicName },
|
|
45
|
+
children
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
};
|
|
12
49
|
const UserNotificationSettingsCard = (props) => {
|
|
13
50
|
const [settings, setNotificationSettings] = useState(void 0);
|
|
14
51
|
const client = useApi(notificationsApiRef);
|
|
@@ -27,15 +64,21 @@ const UserNotificationSettingsCard = (props) => {
|
|
|
27
64
|
loading && /* @__PURE__ */ jsx(Progress, {}),
|
|
28
65
|
error && /* @__PURE__ */ jsx(ErrorPanel, { title: "Failed to load settings", error }),
|
|
29
66
|
settings && /* @__PURE__ */ jsx(
|
|
30
|
-
|
|
67
|
+
NotificationFormatProvider,
|
|
31
68
|
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
69
|
+
originMap: props.originNames,
|
|
70
|
+
topicMap: props.topicNames,
|
|
71
|
+
children: /* @__PURE__ */ jsx(
|
|
72
|
+
UserNotificationSettingsPanel,
|
|
73
|
+
{
|
|
74
|
+
settings,
|
|
75
|
+
onChange: onUpdate
|
|
76
|
+
}
|
|
77
|
+
)
|
|
35
78
|
}
|
|
36
79
|
)
|
|
37
80
|
] });
|
|
38
81
|
};
|
|
39
82
|
|
|
40
|
-
export { UserNotificationSettingsCard };
|
|
83
|
+
export { NotificationFormatProvider, UserNotificationSettingsCard, useNotificationFormat };
|
|
41
84
|
//# sourceMappingURL=UserNotificationSettingsCard.esm.js.map
|
package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsCard.esm.js.map
CHANGED
|
@@ -1 +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 { useState, 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] = 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 <
|
|
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 { createContext, useState, useContext, 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';\nimport { capitalize } from 'lodash';\n\ntype FormatContextType = {\n formatOriginName: (id: string) => string;\n formatTopicName: (id: string) => string;\n};\n\nconst NotificationFormatContext = createContext<FormatContextType | undefined>(\n undefined,\n);\n\nexport const useNotificationFormat = () => {\n const context = useContext(NotificationFormatContext);\n if (!context)\n throw new Error(\n 'useNotificationFormat must be used within a NotificationFormatProvider',\n );\n return context;\n};\n\ntype Props = {\n children: React.ReactNode;\n originMap: Record<string, string> | undefined;\n topicMap: Record<string, string> | undefined;\n};\n\nexport const NotificationFormatProvider = ({\n children,\n originMap,\n topicMap,\n}: Props) => {\n const formatName = (\n id: string,\n nameMap: Record<string, string> | undefined,\n ) => {\n if (nameMap && id in nameMap) {\n return nameMap[id];\n }\n return capitalize(id.replaceAll(/[-_:]/g, ' '));\n };\n\n const formatOriginName = (originId: string) => {\n return formatName(originId, originMap);\n };\n\n const formatTopicName = (topicId: string) => {\n return formatName(topicId, topicMap);\n };\n return (\n <NotificationFormatContext.Provider\n value={{ formatOriginName, formatTopicName }}\n >\n {children}\n </NotificationFormatContext.Provider>\n );\n};\n\n/** @public */\nexport const UserNotificationSettingsCard = (props: {\n originNames?: Record<string, string>;\n topicNames?: Record<string, string>;\n}) => {\n const [settings, setNotificationSettings] = 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 <NotificationFormatProvider\n originMap={props.originNames}\n topicMap={props.topicNames}\n >\n <UserNotificationSettingsPanel\n settings={settings}\n onChange={onUpdate}\n />\n </NotificationFormatProvider>\n )}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA8BA,MAAM,yBAA4B,GAAA,aAAA;AAAA,EAChC,KAAA;AACF,CAAA;AAEO,MAAM,wBAAwB,MAAM;AACzC,EAAM,MAAA,OAAA,GAAU,WAAW,yBAAyB,CAAA;AACpD,EAAA,IAAI,CAAC,OAAA;AACH,IAAA,MAAM,IAAI,KAAA;AAAA,MACR;AAAA,KACF;AACF,EAAO,OAAA,OAAA;AACT;AAQO,MAAM,6BAA6B,CAAC;AAAA,EACzC,QAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAa,KAAA;AACX,EAAM,MAAA,UAAA,GAAa,CACjB,EAAA,EACA,OACG,KAAA;AACH,IAAI,IAAA,OAAA,IAAW,MAAM,OAAS,EAAA;AAC5B,MAAA,OAAO,QAAQ,EAAE,CAAA;AAAA;AAEnB,IAAA,OAAO,UAAW,CAAA,EAAA,CAAG,UAAW,CAAA,QAAA,EAAU,GAAG,CAAC,CAAA;AAAA,GAChD;AAEA,EAAM,MAAA,gBAAA,GAAmB,CAAC,QAAqB,KAAA;AAC7C,IAAO,OAAA,UAAA,CAAW,UAAU,SAAS,CAAA;AAAA,GACvC;AAEA,EAAM,MAAA,eAAA,GAAkB,CAAC,OAAoB,KAAA;AAC3C,IAAO,OAAA,UAAA,CAAW,SAAS,QAAQ,CAAA;AAAA,GACrC;AACA,EACE,uBAAA,GAAA;AAAA,IAAC,yBAA0B,CAAA,QAAA;AAAA,IAA1B;AAAA,MACC,KAAA,EAAO,EAAE,gBAAA,EAAkB,eAAgB,EAAA;AAAA,MAE1C;AAAA;AAAA,GACH;AAEJ;AAGa,MAAA,4BAAA,GAA+B,CAAC,KAGvC,KAAA;AACJ,EAAA,MAAM,CAAC,QAAA,EAAU,uBAAuB,CAAA,GAAI,SAE1C,KAAS,CAAA,CAAA;AAEX,EAAM,MAAA,MAAA,GAAS,OAAO,mBAAmB,CAAA;AACzC,EAAA,MAAM,EAAE,KAAO,EAAA,KAAA,EAAO,OAAQ,EAAA,GAAI,oBAAoB,CAAO,GAAA,KAAA;AAC3D,IAAA,OAAO,IAAI,uBAAwB,EAAA;AAAA,GACpC,CAAA;AAED,EAAA,SAAA,CAAU,MAAM;AACd,IAAI,IAAA,CAAC,OAAW,IAAA,CAAC,KAAO,EAAA;AACtB,MAAA,uBAAA,CAAwB,KAAK,CAAA;AAAA;AAC/B,GACC,EAAA,CAAC,OAAS,EAAA,KAAA,EAAO,KAAK,CAAC,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;AAAA,GACrE;AAEA,EAAA,uBACG,IAAA,CAAA,QAAA,EAAA,EAAS,KAAM,EAAA,uBAAA,EAAwB,SAAQ,UAC7C,EAAA,QAAA,EAAA;AAAA,IAAA,OAAA,wBAAY,QAAS,EAAA,EAAA,CAAA;AAAA,IACrB,KAAS,oBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,KAAA,EAAM,2BAA0B,KAAc,EAAA,CAAA;AAAA,IACnE,QACC,oBAAA,GAAA;AAAA,MAAC,0BAAA;AAAA,MAAA;AAAA,QACC,WAAW,KAAM,CAAA,WAAA;AAAA,QACjB,UAAU,KAAM,CAAA,UAAA;AAAA,QAEhB,QAAA,kBAAA,GAAA;AAAA,UAAC,6BAAA;AAAA,UAAA;AAAA,YACC,QAAA;AAAA,YACA,QAAU,EAAA;AAAA;AAAA;AACZ;AAAA;AACF,GAEJ,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
3
3
|
import Table from '@material-ui/core/Table';
|
|
4
4
|
import MuiTableCell from '@material-ui/core/TableCell';
|
|
5
5
|
import { withStyles } from '@material-ui/core/styles';
|
|
@@ -7,9 +7,8 @@ import TableHead from '@material-ui/core/TableHead';
|
|
|
7
7
|
import Typography from '@material-ui/core/Typography';
|
|
8
8
|
import TableBody from '@material-ui/core/TableBody';
|
|
9
9
|
import TableRow from '@material-ui/core/TableRow';
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import Tooltip from '@material-ui/core/Tooltip';
|
|
10
|
+
import { TopicRow } from './TopicRow.esm.js';
|
|
11
|
+
import { OriginRow } from './OriginRow.esm.js';
|
|
13
12
|
|
|
14
13
|
const TableCell = withStyles({
|
|
15
14
|
root: {
|
|
@@ -18,14 +17,19 @@ const TableCell = withStyles({
|
|
|
18
17
|
})(MuiTableCell);
|
|
19
18
|
const UserNotificationSettingsPanel = (props) => {
|
|
20
19
|
const { settings, onChange } = props;
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
const [expandedRows, setExpandedRows] = useState(/* @__PURE__ */ new Set());
|
|
21
|
+
const handleRowToggle = (originId) => {
|
|
22
|
+
setExpandedRows((prevState) => {
|
|
23
|
+
const newExpandedRows = new Set(prevState);
|
|
24
|
+
if (newExpandedRows.has(originId)) {
|
|
25
|
+
newExpandedRows.delete(originId);
|
|
26
|
+
} else {
|
|
27
|
+
newExpandedRows.add(originId);
|
|
28
|
+
}
|
|
29
|
+
return newExpandedRows;
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const handleChange = (channelId, originId, topicId, enabled) => {
|
|
29
33
|
const updatedSettings = {
|
|
30
34
|
channels: settings.channels.map((channel) => {
|
|
31
35
|
if (channel.id !== channelId) {
|
|
@@ -37,9 +41,26 @@ const UserNotificationSettingsPanel = (props) => {
|
|
|
37
41
|
if (origin.id !== originId) {
|
|
38
42
|
return origin;
|
|
39
43
|
}
|
|
44
|
+
if (topicId === null) {
|
|
45
|
+
return {
|
|
46
|
+
...origin,
|
|
47
|
+
enabled,
|
|
48
|
+
topics: origin.topics?.map((topic) => {
|
|
49
|
+
return { ...topic, enabled };
|
|
50
|
+
}) ?? []
|
|
51
|
+
};
|
|
52
|
+
}
|
|
40
53
|
return {
|
|
41
54
|
...origin,
|
|
42
|
-
|
|
55
|
+
topics: origin.topics?.map((topic) => {
|
|
56
|
+
if (topic.id === topicId) {
|
|
57
|
+
return {
|
|
58
|
+
...topic,
|
|
59
|
+
enabled: origin.enabled ? enabled : origin.enabled
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return topic;
|
|
63
|
+
}) ?? []
|
|
43
64
|
};
|
|
44
65
|
})
|
|
45
66
|
};
|
|
@@ -47,46 +68,42 @@ const UserNotificationSettingsPanel = (props) => {
|
|
|
47
68
|
};
|
|
48
69
|
onChange(updatedSettings);
|
|
49
70
|
};
|
|
50
|
-
|
|
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) {
|
|
71
|
+
if (settings.channels.length === 0) {
|
|
57
72
|
return /* @__PURE__ */ jsx(Typography, { variant: "body1", children: "No notification settings available, check back later" });
|
|
58
73
|
}
|
|
59
74
|
return /* @__PURE__ */ jsxs(Table, { children: [
|
|
60
75
|
/* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
76
|
+
/* @__PURE__ */ jsx(TableCell, {}),
|
|
61
77
|
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Typography, { variant: "subtitle1", children: "Origin" }) }),
|
|
62
|
-
|
|
78
|
+
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Typography, { variant: "subtitle1", children: "Topic" }) }),
|
|
79
|
+
settings.channels.map((channel) => /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Typography, { variant: "subtitle1", align: "center", children: channel.id }) }, channel.id))
|
|
63
80
|
] }) }),
|
|
64
|
-
/* @__PURE__ */ jsx(TableBody, { children:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
origin
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
)
|
|
89
|
-
|
|
81
|
+
/* @__PURE__ */ jsx(TableBody, { children: settings.channels.map(
|
|
82
|
+
(channel) => channel.origins.flatMap((origin) => [
|
|
83
|
+
/* @__PURE__ */ jsx(
|
|
84
|
+
OriginRow,
|
|
85
|
+
{
|
|
86
|
+
channel,
|
|
87
|
+
origin,
|
|
88
|
+
settings,
|
|
89
|
+
open: expandedRows.has(origin.id),
|
|
90
|
+
handleChange,
|
|
91
|
+
handleRowToggle
|
|
92
|
+
},
|
|
93
|
+
origin.id
|
|
94
|
+
),
|
|
95
|
+
...expandedRows.has(origin.id) ? origin.topics?.map((topic) => /* @__PURE__ */ jsx(
|
|
96
|
+
TopicRow,
|
|
97
|
+
{
|
|
98
|
+
topic,
|
|
99
|
+
origin,
|
|
100
|
+
settings,
|
|
101
|
+
handleChange
|
|
102
|
+
},
|
|
103
|
+
`${origin.id}-${topic.id}`
|
|
104
|
+
)) || [] : []
|
|
105
|
+
])
|
|
106
|
+
) })
|
|
90
107
|
] });
|
|
91
108
|
};
|
|
92
109
|
|
package/dist/components/UserNotificationSettingsCard/UserNotificationSettingsPanel.esm.js.map
CHANGED
|
@@ -1 +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 {
|
|
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 { useState } from 'react';\nimport { NotificationSettings } 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 { TopicRow } from './TopicRow';\nimport { OriginRow } from './OriginRow';\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 topicNames?: Record<string, string>;\n}) => {\n const { settings, onChange } = props;\n const [expandedRows, setExpandedRows] = useState<Set<string>>(new Set());\n\n const handleRowToggle = (originId: string) => {\n setExpandedRows(prevState => {\n const newExpandedRows = new Set(prevState);\n if (newExpandedRows.has(originId)) {\n newExpandedRows.delete(originId);\n } else {\n newExpandedRows.add(originId);\n }\n return newExpandedRows;\n });\n };\n const handleChange = (\n channelId: string,\n originId: string,\n topicId: string | null,\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\n if (topicId === null) {\n return {\n ...origin,\n enabled,\n topics:\n origin.topics?.map(topic => {\n return { ...topic, enabled };\n }) ?? [],\n };\n }\n\n return {\n ...origin,\n topics:\n origin.topics?.map(topic => {\n if (topic.id === topicId) {\n return {\n ...topic,\n enabled: origin.enabled ? enabled : origin.enabled,\n };\n }\n return topic;\n }) ?? [],\n };\n }),\n };\n }),\n };\n onChange(updatedSettings);\n };\n\n if (settings.channels.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 <TableCell>\n <Typography variant=\"subtitle1\">Origin</Typography>\n </TableCell>\n <TableCell>\n <Typography variant=\"subtitle1\">Topic</Typography>\n </TableCell>\n {settings.channels.map(channel => (\n <TableCell key={channel.id}>\n <Typography variant=\"subtitle1\" align=\"center\">\n {channel.id}\n </Typography>\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {settings.channels.map(channel =>\n channel.origins.flatMap(origin => [\n <OriginRow\n key={origin.id}\n channel={channel}\n origin={origin}\n settings={settings}\n open={expandedRows.has(origin.id)}\n handleChange={handleChange}\n handleRowToggle={handleRowToggle}\n />,\n ...(expandedRows.has(origin.id)\n ? origin.topics?.map(topic => (\n <TopicRow\n key={`${origin.id}-${topic.id}`}\n topic={topic}\n origin={origin}\n settings={settings}\n handleChange={handleChange}\n />\n )) || []\n : []),\n ]),\n )}\n </TableBody>\n </Table>\n );\n};\n"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -148,6 +148,7 @@ declare const NotificationsTable: ({ title, markAsReadOnLinkOpen, isLoading, not
|
|
|
148
148
|
/** @public */
|
|
149
149
|
declare const UserNotificationSettingsCard: (props: {
|
|
150
150
|
originNames?: Record<string, string>;
|
|
151
|
+
topicNames?: Record<string, string>;
|
|
151
152
|
}) => react_jsx_runtime.JSX.Element;
|
|
152
153
|
|
|
153
154
|
export { type GetNotificationsCommonOptions, type GetNotificationsOptions, type GetNotificationsResponse, type GetTopicsOptions, type GetTopicsResponse, type NotificationsApi, NotificationsClient, NotificationsPage, type NotificationsPageProps, NotificationsSidebarItem, NotificationsTable, type NotificationsTableProps, type UpdateNotificationsOptions, UserNotificationSettingsCard, notificationsApiRef, notificationsPlugin, useNotificationsApi };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
var name = "@backstage/plugin-notifications";
|
|
2
|
+
var version = "0.5.6-next.1";
|
|
3
|
+
var backstage = {
|
|
4
|
+
role: "frontend-plugin",
|
|
5
|
+
pluginId: "notifications",
|
|
6
|
+
pluginPackages: [
|
|
7
|
+
"@backstage/plugin-notifications",
|
|
8
|
+
"@backstage/plugin-notifications-backend",
|
|
9
|
+
"@backstage/plugin-notifications-common",
|
|
10
|
+
"@backstage/plugin-notifications-node"
|
|
11
|
+
]
|
|
12
|
+
};
|
|
13
|
+
var publishConfig = {
|
|
14
|
+
access: "public"
|
|
15
|
+
};
|
|
16
|
+
var repository = {
|
|
17
|
+
type: "git",
|
|
18
|
+
url: "https://github.com/backstage/backstage",
|
|
19
|
+
directory: "plugins/notifications"
|
|
20
|
+
};
|
|
21
|
+
var license = "Apache-2.0";
|
|
22
|
+
var sideEffects = false;
|
|
23
|
+
var exports = {
|
|
24
|
+
".": "./src/index.ts",
|
|
25
|
+
"./alpha": "./src/alpha.tsx",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
};
|
|
28
|
+
var main = "src/index.ts";
|
|
29
|
+
var types = "src/index.ts";
|
|
30
|
+
var typesVersions = {
|
|
31
|
+
"*": {
|
|
32
|
+
alpha: [
|
|
33
|
+
"src/alpha.tsx"
|
|
34
|
+
],
|
|
35
|
+
"package.json": [
|
|
36
|
+
"package.json"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var files = [
|
|
41
|
+
"dist"
|
|
42
|
+
];
|
|
43
|
+
var scripts = {
|
|
44
|
+
build: "backstage-cli package build",
|
|
45
|
+
clean: "backstage-cli package clean",
|
|
46
|
+
lint: "backstage-cli package lint",
|
|
47
|
+
prepack: "backstage-cli package prepack",
|
|
48
|
+
postpack: "backstage-cli package postpack",
|
|
49
|
+
start: "backstage-cli package start",
|
|
50
|
+
test: "backstage-cli package test"
|
|
51
|
+
};
|
|
52
|
+
var dependencies = {
|
|
53
|
+
"@backstage/core-compat-api": "workspace:^",
|
|
54
|
+
"@backstage/core-components": "workspace:^",
|
|
55
|
+
"@backstage/core-plugin-api": "workspace:^",
|
|
56
|
+
"@backstage/errors": "workspace:^",
|
|
57
|
+
"@backstage/frontend-plugin-api": "workspace:^",
|
|
58
|
+
"@backstage/plugin-notifications-common": "workspace:^",
|
|
59
|
+
"@backstage/plugin-signals-react": "workspace:^",
|
|
60
|
+
"@backstage/theme": "workspace:^",
|
|
61
|
+
"@backstage/types": "workspace:^",
|
|
62
|
+
"@material-ui/core": "^4.9.13",
|
|
63
|
+
"@material-ui/icons": "^4.9.1",
|
|
64
|
+
"@material-ui/lab": "^4.0.0-alpha.61",
|
|
65
|
+
lodash: "^4.17.21",
|
|
66
|
+
"material-ui-confirm": "^3.0.12",
|
|
67
|
+
notistack: "^3.0.1",
|
|
68
|
+
"react-relative-time": "^0.0.9",
|
|
69
|
+
"react-use": "^17.2.4"
|
|
70
|
+
};
|
|
71
|
+
var devDependencies = {
|
|
72
|
+
"@backstage/cli": "workspace:^",
|
|
73
|
+
"@backstage/core-app-api": "workspace:^",
|
|
74
|
+
"@backstage/dev-utils": "workspace:^",
|
|
75
|
+
"@backstage/plugin-signals": "workspace:^",
|
|
76
|
+
"@backstage/test-utils": "workspace:^",
|
|
77
|
+
"@testing-library/jest-dom": "^6.0.0",
|
|
78
|
+
"@testing-library/react": "^16.0.0",
|
|
79
|
+
"@testing-library/user-event": "^14.0.0",
|
|
80
|
+
"@types/react": "^18.0.0",
|
|
81
|
+
msw: "^1.0.0",
|
|
82
|
+
react: "^18.0.2",
|
|
83
|
+
"react-dom": "^18.0.2",
|
|
84
|
+
"react-router-dom": "^6.3.0"
|
|
85
|
+
};
|
|
86
|
+
var peerDependencies = {
|
|
87
|
+
"@types/react": "^17.0.0 || ^18.0.0",
|
|
88
|
+
react: "^17.0.0 || ^18.0.0",
|
|
89
|
+
"react-dom": "^17.0.0 || ^18.0.0",
|
|
90
|
+
"react-router-dom": "^6.3.0"
|
|
91
|
+
};
|
|
92
|
+
var peerDependenciesMeta = {
|
|
93
|
+
"@types/react": {
|
|
94
|
+
optional: true
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var _package = {
|
|
98
|
+
name: name,
|
|
99
|
+
version: version,
|
|
100
|
+
backstage: backstage,
|
|
101
|
+
publishConfig: publishConfig,
|
|
102
|
+
repository: repository,
|
|
103
|
+
license: license,
|
|
104
|
+
sideEffects: sideEffects,
|
|
105
|
+
exports: exports,
|
|
106
|
+
main: main,
|
|
107
|
+
types: types,
|
|
108
|
+
typesVersions: typesVersions,
|
|
109
|
+
files: files,
|
|
110
|
+
scripts: scripts,
|
|
111
|
+
dependencies: dependencies,
|
|
112
|
+
devDependencies: devDependencies,
|
|
113
|
+
peerDependencies: peerDependencies,
|
|
114
|
+
peerDependenciesMeta: peerDependenciesMeta
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export { backstage, _package as default, dependencies, devDependencies, exports, files, license, main, name, peerDependencies, peerDependenciesMeta, publishConfig, repository, scripts, sideEffects, types, typesVersions, version };
|
|
118
|
+
//# sourceMappingURL=package.json.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.json.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.5.
|
|
3
|
+
"version": "0.5.6-next.1",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "frontend-plugin",
|
|
6
6
|
"pluginId": "notifications",
|
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
"test": "backstage-cli package test"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@backstage/core-compat-api": "
|
|
67
|
-
"@backstage/core-components": "
|
|
68
|
-
"@backstage/core-plugin-api": "
|
|
69
|
-
"@backstage/errors": "
|
|
70
|
-
"@backstage/frontend-plugin-api": "
|
|
71
|
-
"@backstage/plugin-notifications-common": "
|
|
72
|
-
"@backstage/plugin-signals-react": "
|
|
73
|
-
"@backstage/theme": "
|
|
74
|
-
"@backstage/types": "
|
|
66
|
+
"@backstage/core-compat-api": "0.4.3-next.1",
|
|
67
|
+
"@backstage/core-components": "0.17.2",
|
|
68
|
+
"@backstage/core-plugin-api": "1.10.7",
|
|
69
|
+
"@backstage/errors": "1.2.7",
|
|
70
|
+
"@backstage/frontend-plugin-api": "0.10.3-next.0",
|
|
71
|
+
"@backstage/plugin-notifications-common": "0.0.9-next.0",
|
|
72
|
+
"@backstage/plugin-signals-react": "0.0.13",
|
|
73
|
+
"@backstage/theme": "0.6.6",
|
|
74
|
+
"@backstage/types": "1.2.1",
|
|
75
75
|
"@material-ui/core": "^4.9.13",
|
|
76
76
|
"@material-ui/icons": "^4.9.1",
|
|
77
77
|
"@material-ui/lab": "^4.0.0-alpha.61",
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
"react-use": "^17.2.4"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@backstage/cli": "
|
|
86
|
-
"@backstage/core-app-api": "
|
|
87
|
-
"@backstage/dev-utils": "
|
|
88
|
-
"@backstage/plugin-signals": "
|
|
89
|
-
"@backstage/test-utils": "
|
|
85
|
+
"@backstage/cli": "0.32.2-next.0",
|
|
86
|
+
"@backstage/core-app-api": "1.17.0",
|
|
87
|
+
"@backstage/dev-utils": "1.1.11-next.1",
|
|
88
|
+
"@backstage/plugin-signals": "0.0.20-next.0",
|
|
89
|
+
"@backstage/test-utils": "1.7.8",
|
|
90
90
|
"@testing-library/jest-dom": "^6.0.0",
|
|
91
91
|
"@testing-library/react": "^16.0.0",
|
|
92
92
|
"@testing-library/user-event": "^14.0.0",
|