@backstage/core-components 0.18.8 → 0.18.9-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @backstage/core-components
|
|
2
2
|
|
|
3
|
+
## 0.18.9-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 320eed3: Resolved DOM nesting warning in OAuthRequestDialog by rendering secondary text as block-level spans.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/core-plugin-api@1.12.5-next.0
|
|
10
|
+
- @backstage/config@1.3.6
|
|
11
|
+
- @backstage/errors@1.2.7
|
|
12
|
+
- @backstage/theme@0.7.2
|
|
13
|
+
- @backstage/version-bridge@1.0.12
|
|
14
|
+
|
|
3
15
|
## 0.18.8
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -52,8 +52,17 @@ const LoginRequestListItem = ({ request, busy, setBusy }) => {
|
|
|
52
52
|
{
|
|
53
53
|
primary: request.provider.title,
|
|
54
54
|
secondary: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
55
|
-
message && /* @__PURE__ */ jsx(
|
|
56
|
-
|
|
55
|
+
message && /* @__PURE__ */ jsx(
|
|
56
|
+
Typography,
|
|
57
|
+
{
|
|
58
|
+
variant: "subtitle2",
|
|
59
|
+
component: "span",
|
|
60
|
+
display: "block",
|
|
61
|
+
color: "textSecondary",
|
|
62
|
+
children: message
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
error && /* @__PURE__ */ jsx(Typography, { component: "span", display: "block", color: "error", children: error })
|
|
57
66
|
] })
|
|
58
67
|
}
|
|
59
68
|
) }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginRequestListItem.esm.js","sources":["../../../src/components/OAuthRequestDialog/LoginRequestListItem.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 { makeStyles } from '@material-ui/core/styles';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemAvatar from '@material-ui/core/ListItemAvatar';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Typography from '@material-ui/core/Typography';\nimport Button from '@material-ui/core/Button';\nimport { createElement, isValidElement, useState } from 'react';\nimport { isError } from '@backstage/errors';\nimport {\n configApiRef,\n IconComponent,\n PendingOAuthRequest,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { coreComponentsTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport Box from '@material-ui/core/Box';\n\nexport type LoginRequestListItemClassKey = 'root';\n\nconst useItemStyles = makeStyles(\n theme => ({\n root: {\n paddingLeft: theme.spacing(2),\n },\n button: {\n marginLeft: theme.spacing(2),\n },\n }),\n { name: 'BackstageLoginRequestListItem' },\n);\n\ntype RowProps = {\n request: PendingOAuthRequest;\n busy: boolean;\n setBusy: (busy: boolean) => void;\n};\n\nconst LoginRequestListItem = ({ request, busy, setBusy }: RowProps) => {\n const classes = useItemStyles();\n const [error, setError] = useState<string>();\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n const configApi = useApi(configApiRef);\n\n const handleContinue = async () => {\n setBusy(true);\n try {\n await request.trigger();\n } catch (e) {\n setError(isError(e) ? e.message : 'An unspecified error occurred');\n } finally {\n setBusy(false);\n }\n };\n\n const providerIcon = request.provider.icon;\n const message =\n request.provider.message ??\n t('oauthRequestDialog.message', {\n appTitle: configApi.getString('app.title'),\n provider: request.provider.title,\n });\n\n const iconElement =\n providerIcon === null || isValidElement(providerIcon)\n ? providerIcon\n : createElement(providerIcon as IconComponent, { fontSize: 'large' });\n\n return (\n <ListItem disabled={busy} classes={{ root: classes.root }}>\n <ListItemAvatar>{iconElement ?? <></>}</ListItemAvatar>\n <Box display=\"flex\" alignItems=\"center\" flex={1}>\n <Box flex={1}>\n <ListItemText\n primary={request.provider.title}\n secondary={\n <>\n {message && (\n <Typography
|
|
1
|
+
{"version":3,"file":"LoginRequestListItem.esm.js","sources":["../../../src/components/OAuthRequestDialog/LoginRequestListItem.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 { makeStyles } from '@material-ui/core/styles';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemAvatar from '@material-ui/core/ListItemAvatar';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Typography from '@material-ui/core/Typography';\nimport Button from '@material-ui/core/Button';\nimport { createElement, isValidElement, useState } from 'react';\nimport { isError } from '@backstage/errors';\nimport {\n configApiRef,\n IconComponent,\n PendingOAuthRequest,\n useApi,\n} from '@backstage/core-plugin-api';\nimport { coreComponentsTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport Box from '@material-ui/core/Box';\n\nexport type LoginRequestListItemClassKey = 'root';\n\nconst useItemStyles = makeStyles(\n theme => ({\n root: {\n paddingLeft: theme.spacing(2),\n },\n button: {\n marginLeft: theme.spacing(2),\n },\n }),\n { name: 'BackstageLoginRequestListItem' },\n);\n\ntype RowProps = {\n request: PendingOAuthRequest;\n busy: boolean;\n setBusy: (busy: boolean) => void;\n};\n\nconst LoginRequestListItem = ({ request, busy, setBusy }: RowProps) => {\n const classes = useItemStyles();\n const [error, setError] = useState<string>();\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n const configApi = useApi(configApiRef);\n\n const handleContinue = async () => {\n setBusy(true);\n try {\n await request.trigger();\n } catch (e) {\n setError(isError(e) ? e.message : 'An unspecified error occurred');\n } finally {\n setBusy(false);\n }\n };\n\n const providerIcon = request.provider.icon;\n const message =\n request.provider.message ??\n t('oauthRequestDialog.message', {\n appTitle: configApi.getString('app.title'),\n provider: request.provider.title,\n });\n\n const iconElement =\n providerIcon === null || isValidElement(providerIcon)\n ? providerIcon\n : createElement(providerIcon as IconComponent, { fontSize: 'large' });\n\n return (\n <ListItem disabled={busy} classes={{ root: classes.root }}>\n <ListItemAvatar>{iconElement ?? <></>}</ListItemAvatar>\n <Box display=\"flex\" alignItems=\"center\" flex={1}>\n <Box flex={1}>\n <ListItemText\n primary={request.provider.title}\n secondary={\n <>\n {message && (\n <Typography\n variant=\"subtitle2\"\n component=\"span\"\n display=\"block\"\n color=\"textSecondary\"\n >\n {message}\n </Typography>\n )}\n {error && (\n <Typography component=\"span\" display=\"block\" color=\"error\">\n {error}\n </Typography>\n )}\n </>\n }\n />\n </Box>\n <Button\n color=\"primary\"\n variant=\"contained\"\n onClick={handleContinue}\n className={classes.button}\n >\n {t('oauthRequestDialog.login')}\n </Button>\n </Box>\n </ListItem>\n );\n};\n\nexport default LoginRequestListItem;\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAoCA,MAAM,aAAA,GAAgB,UAAA;AAAA,EACpB,CAAA,KAAA,MAAU;AAAA,IACR,IAAA,EAAM;AAAA,MACJ,WAAA,EAAa,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA,KAC9B;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,UAAA,EAAY,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA;AAC7B,GACF,CAAA;AAAA,EACA,EAAE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
4
|
"description": "Core components used by Backstage plugins and apps",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library"
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"test": "backstage-cli package test"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@backstage/config": "
|
|
70
|
-
"@backstage/core-plugin-api": "
|
|
71
|
-
"@backstage/errors": "
|
|
72
|
-
"@backstage/theme": "
|
|
73
|
-
"@backstage/version-bridge": "
|
|
69
|
+
"@backstage/config": "1.3.6",
|
|
70
|
+
"@backstage/core-plugin-api": "1.12.5-next.0",
|
|
71
|
+
"@backstage/errors": "1.2.7",
|
|
72
|
+
"@backstage/theme": "0.7.2",
|
|
73
|
+
"@backstage/version-bridge": "1.0.12",
|
|
74
74
|
"@dagrejs/dagre": "^1.1.4",
|
|
75
75
|
"@date-io/core": "^1.3.13",
|
|
76
76
|
"@material-table/core": "^3.1.0",
|
|
@@ -110,10 +110,10 @@
|
|
|
110
110
|
"zod": "^3.25.76 || ^4.0.0"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
|
-
"@backstage/app-defaults": "
|
|
114
|
-
"@backstage/cli": "
|
|
115
|
-
"@backstage/core-app-api": "
|
|
116
|
-
"@backstage/test-utils": "
|
|
113
|
+
"@backstage/app-defaults": "1.7.7-next.0",
|
|
114
|
+
"@backstage/cli": "0.36.1-next.0",
|
|
115
|
+
"@backstage/core-app-api": "1.19.7-next.0",
|
|
116
|
+
"@backstage/test-utils": "1.7.17-next.0",
|
|
117
117
|
"@testing-library/dom": "^10.0.0",
|
|
118
118
|
"@testing-library/jest-dom": "^6.0.0",
|
|
119
119
|
"@testing-library/user-event": "^14.0.0",
|