@backstage/core-components 0.17.6-next.1 → 0.18.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
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @backstage/core-components
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c095909: Swap base token for semantic token in ItemCardHeader to ensure readability in light mode.
|
|
8
|
+
|
|
9
|
+
## 0.18.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- b9a87f4: Add optional `distance` property to `DependencyEdge` to reflect the distance to a root.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 1ad3d94: Dependency graph can now be opened in full screen mode
|
|
18
|
+
- e409bec: Fixes for rendering initials in the avatar component.
|
|
19
|
+
- ae7d426: update about card links style for pretty display with other language
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @backstage/core-plugin-api@1.11.0
|
|
22
|
+
|
|
3
23
|
## 0.17.6-next.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.esm.js","sources":["../../../src/components/DependencyGraph/types.ts"],"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\n/**\n * Types used to customize and provide data to {@link DependencyGraph}\n *\n * @packageDocumentation\n */\n\nimport { ReactNode } from 'react';\n\n/**\n * Types for the {@link DependencyGraph} component.\n *\n * @public\n */\nexport namespace DependencyGraphTypes {\n /**\n * Edge of {@link DependencyGraph}\n *\n * @public\n */\n export type DependencyEdge<T = {}> = T & {\n /**\n * ID of {@link DependencyNode} from where the Edge start\n */\n from: string;\n /**\n * ID of {@link DependencyNode} to where the Edge goes to\n */\n to: string;\n /**\n * Label assigned and rendered with the Edge\n */\n label?: string;\n };\n\n /**\n * Properties of {@link DependencyGraphTypes.RenderLabelFunction} for {@link DependencyGraphTypes.DependencyEdge}\n *\n * @public\n */\n export type RenderLabelProps<T = unknown> = { edge: DependencyEdge<T> };\n\n /**\n * Custom React component for edge labels\n *\n * @public\n */\n export type RenderLabelFunction<T = {}> = (\n props: RenderLabelProps<T>,\n ) => ReactNode;\n\n /**\n * Node of {@link DependencyGraph}\n *\n * @public\n */\n export type DependencyNode<T = {}> = T & {\n id: string;\n };\n\n /**\n * Properties of {@link DependencyGraphTypes.RenderNodeFunction} for {@link DependencyGraphTypes.DependencyNode}\n *\n * @public\n */\n export type RenderNodeProps<T = unknown> = { node: DependencyNode<T> };\n\n /**\n * Custom React component for graph {@link DependencyGraphTypes.DependencyNode}\n *\n * @public\n */\n export type RenderNodeFunction<T = {}> = (\n props: RenderNodeProps<T>,\n ) => ReactNode;\n\n /**\n * Graph direction\n *\n * @public\n */\n export enum Direction {\n /**\n * Top to Bottom\n */\n TOP_BOTTOM = 'TB',\n /**\n * Bottom to Top\n */\n BOTTOM_TOP = 'BT',\n /**\n * Left to Right\n */\n LEFT_RIGHT = 'LR',\n /**\n * Right to Left\n */\n RIGHT_LEFT = 'RL',\n }\n\n /**\n * Node alignment\n *\n * @public\n */\n export enum Alignment {\n /**\n * Up Left\n */\n UP_LEFT = 'UL',\n /**\n * Up Right\n */\n UP_RIGHT = 'UR',\n /**\n * Down Left\n */\n DOWN_LEFT = 'DL',\n /**\n * Down Right\n */\n DOWN_RIGHT = 'DR',\n }\n\n /**\n * Algorithm used to rand nodes in graph\n *\n * @public\n */\n export enum Ranker {\n /**\n * {@link https://en.wikipedia.org/wiki/Network_simplex_algorithm | Network Simplex} algorithm\n */\n NETWORK_SIMPLEX = 'network-simplex',\n /**\n * Tight Tree algorithm\n */\n TIGHT_TREE = 'tight-tree',\n /**\n * Longest path algorithm\n *\n * @remarks\n *\n * Simplest and fastest\n */\n LONGEST_PATH = 'longest-path',\n }\n\n /**\n * Position of label in relation to the edge\n *\n * @public\n */\n export enum LabelPosition {\n LEFT = 'l',\n RIGHT = 'r',\n CENTER = 'c',\n }\n}\n"],"names":["DependencyGraphTypes","Direction","Alignment","Ranker","LabelPosition"],"mappings":"AA6BO,IAAU;AAAA,CAAV,CAAUA,qBAAAA,KAAV;
|
|
1
|
+
{"version":3,"file":"types.esm.js","sources":["../../../src/components/DependencyGraph/types.ts"],"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\n/**\n * Types used to customize and provide data to {@link DependencyGraph}\n *\n * @packageDocumentation\n */\n\nimport { ReactNode } from 'react';\n\n/**\n * Types for the {@link DependencyGraph} component.\n *\n * @public\n */\nexport namespace DependencyGraphTypes {\n /**\n * Edge of {@link DependencyGraph}\n *\n * @public\n */\n export type DependencyEdge<T = {}> = T & {\n /**\n * ID of {@link DependencyNode} from where the Edge start\n */\n from: string;\n /**\n * ID of {@link DependencyNode} to where the Edge goes to\n */\n to: string;\n /**\n * Label assigned and rendered with the Edge\n */\n label?: string;\n /**\n * Distance to a root entity\n */\n distance?: number;\n };\n\n /**\n * Properties of {@link DependencyGraphTypes.RenderLabelFunction} for {@link DependencyGraphTypes.DependencyEdge}\n *\n * @public\n */\n export type RenderLabelProps<T = unknown> = { edge: DependencyEdge<T> };\n\n /**\n * Custom React component for edge labels\n *\n * @public\n */\n export type RenderLabelFunction<T = {}> = (\n props: RenderLabelProps<T>,\n ) => ReactNode;\n\n /**\n * Node of {@link DependencyGraph}\n *\n * @public\n */\n export type DependencyNode<T = {}> = T & {\n id: string;\n };\n\n /**\n * Properties of {@link DependencyGraphTypes.RenderNodeFunction} for {@link DependencyGraphTypes.DependencyNode}\n *\n * @public\n */\n export type RenderNodeProps<T = unknown> = { node: DependencyNode<T> };\n\n /**\n * Custom React component for graph {@link DependencyGraphTypes.DependencyNode}\n *\n * @public\n */\n export type RenderNodeFunction<T = {}> = (\n props: RenderNodeProps<T>,\n ) => ReactNode;\n\n /**\n * Graph direction\n *\n * @public\n */\n export enum Direction {\n /**\n * Top to Bottom\n */\n TOP_BOTTOM = 'TB',\n /**\n * Bottom to Top\n */\n BOTTOM_TOP = 'BT',\n /**\n * Left to Right\n */\n LEFT_RIGHT = 'LR',\n /**\n * Right to Left\n */\n RIGHT_LEFT = 'RL',\n }\n\n /**\n * Node alignment\n *\n * @public\n */\n export enum Alignment {\n /**\n * Up Left\n */\n UP_LEFT = 'UL',\n /**\n * Up Right\n */\n UP_RIGHT = 'UR',\n /**\n * Down Left\n */\n DOWN_LEFT = 'DL',\n /**\n * Down Right\n */\n DOWN_RIGHT = 'DR',\n }\n\n /**\n * Algorithm used to rand nodes in graph\n *\n * @public\n */\n export enum Ranker {\n /**\n * {@link https://en.wikipedia.org/wiki/Network_simplex_algorithm | Network Simplex} algorithm\n */\n NETWORK_SIMPLEX = 'network-simplex',\n /**\n * Tight Tree algorithm\n */\n TIGHT_TREE = 'tight-tree',\n /**\n * Longest path algorithm\n *\n * @remarks\n *\n * Simplest and fastest\n */\n LONGEST_PATH = 'longest-path',\n }\n\n /**\n * Position of label in relation to the edge\n *\n * @public\n */\n export enum LabelPosition {\n LEFT = 'l',\n RIGHT = 'r',\n CENTER = 'c',\n }\n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CAAA,aAAA,GAAA,EAAA,CAAA,CAAA;AAAA,CAAA,EA/IG,oBAAA,KAAA,oBAAA,GAAA,EAAA,CAAA,CAAA;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -338,6 +338,10 @@ declare namespace DependencyGraphTypes {
|
|
|
338
338
|
* Label assigned and rendered with the Edge
|
|
339
339
|
*/
|
|
340
340
|
label?: string;
|
|
341
|
+
/**
|
|
342
|
+
* Distance to a root entity
|
|
343
|
+
*/
|
|
344
|
+
distance?: number;
|
|
341
345
|
};
|
|
342
346
|
/**
|
|
343
347
|
* Properties of {@link DependencyGraphTypes.RenderLabelFunction} for {@link DependencyGraphTypes.DependencyEdge}
|
|
@@ -5,7 +5,7 @@ import Typography from '@material-ui/core/Typography';
|
|
|
5
5
|
|
|
6
6
|
const styles = (theme) => createStyles({
|
|
7
7
|
root: {
|
|
8
|
-
color: theme.palette.
|
|
8
|
+
color: theme.palette.text.primary,
|
|
9
9
|
padding: theme.spacing(2, 2, 3),
|
|
10
10
|
backgroundImage: theme.getPageTheme({ themeId: "card" }).backgroundImage,
|
|
11
11
|
backgroundPosition: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemCardHeader.esm.js","sources":["../../../src/layout/ItemCard/ItemCardHeader.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 Box from '@material-ui/core/Box';\nimport {\n createStyles,\n makeStyles,\n Theme,\n WithStyles,\n} from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport { ReactNode } from 'react';\n\n/** @public */\nexport type ItemCardHeaderClassKey = 'root';\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n color: theme.palette.
|
|
1
|
+
{"version":3,"file":"ItemCardHeader.esm.js","sources":["../../../src/layout/ItemCard/ItemCardHeader.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 Box from '@material-ui/core/Box';\nimport {\n createStyles,\n makeStyles,\n Theme,\n WithStyles,\n} from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport { ReactNode } from 'react';\n\n/** @public */\nexport type ItemCardHeaderClassKey = 'root';\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n color: theme.palette.text.primary,\n padding: theme.spacing(2, 2, 3),\n backgroundImage: theme.getPageTheme({ themeId: 'card' }).backgroundImage,\n backgroundPosition: 0,\n backgroundSize: 'inherit',\n },\n });\n\nconst useStyles = makeStyles(styles, { name: 'BackstageItemCardHeader' });\n\n/** @public */\nexport type ItemCardHeaderProps = Partial<WithStyles<typeof styles>> & {\n /**\n * A large title to show in the header, providing the main heading.\n *\n * Use this if you want to have the default styling and placement of a title.\n */\n title?: ReactNode;\n /**\n * A slightly smaller title to show in the header, providing additional\n * details.\n *\n * Use this if you want to have the default styling and placement of a\n * subtitle.\n */\n subtitle?: ReactNode;\n /**\n * Custom children to draw in the header.\n *\n * If the title and/or subtitle were specified, the children are drawn below\n * those.\n */\n children?: ReactNode;\n};\n\n/**\n * A simple card header, rendering a default look for \"item cards\" - cards that\n * are arranged in a grid for users to select among several options.\n *\n * @remarks\n * This component expects to be placed within a Material UI `<CardMedia>`.\n *\n * Styles for the header can be overridden using the `classes` prop, e.g.:\n *\n * `<ItemCardHeader title=\"Hello\" classes={{ root: myClassName }} />`\n *\n * @public\n */\nexport function ItemCardHeader(props: ItemCardHeaderProps) {\n const { title, subtitle, children } = props;\n const classes = useStyles(props);\n return (\n <Box className={classes.root}>\n {subtitle && (\n <Typography variant=\"subtitle2\" component=\"h3\">\n {subtitle}\n </Typography>\n )}\n {title && (\n <Typography variant=\"h6\" component=\"h4\">\n {title}\n </Typography>\n )}\n {children}\n </Box>\n );\n}\n"],"names":[],"mappings":";;;;;AA6BA,MAAM,MAAA,GAAS,CAAC,KAAA,KACd,YAAA,CAAa;AAAA,EACX,IAAA,EAAM;AAAA,IACJ,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,OAAA;AAAA,IAC1B,OAAA,EAAS,KAAA,CAAM,OAAA,CAAQ,CAAA,EAAG,GAAG,CAAC,CAAA;AAAA,IAC9B,iBAAiB,KAAA,CAAM,YAAA,CAAa,EAAE,OAAA,EAAS,MAAA,EAAQ,CAAA,CAAE,eAAA;AAAA,IACzD,kBAAA,EAAoB,CAAA;AAAA,IACpB,cAAA,EAAgB;AAAA;AAEpB,CAAC,CAAA;AAEH,MAAM,YAAY,UAAA,CAAW,MAAA,EAAQ,EAAE,IAAA,EAAM,2BAA2B,CAAA;AAwCjE,SAAS,eAAe,KAAA,EAA4B;AACzD,EAAA,MAAM,EAAE,KAAA,EAAO,QAAA,EAAU,QAAA,EAAS,GAAI,KAAA;AACtC,EAAA,MAAM,OAAA,GAAU,UAAU,KAAK,CAAA;AAC/B,EAAA,uBACE,IAAA,CAAC,GAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,IAAA,EACrB,QAAA,EAAA;AAAA,IAAA,QAAA,wBACE,UAAA,EAAA,EAAW,OAAA,EAAQ,WAAA,EAAY,SAAA,EAAU,MACvC,QAAA,EAAA,QAAA,EACH,CAAA;AAAA,IAED,yBACC,GAAA,CAAC,UAAA,EAAA,EAAW,SAAQ,IAAA,EAAK,SAAA,EAAU,MAChC,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,IAED;AAAA,GAAA,EACH,CAAA;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/core-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.1",
|
|
4
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": "1.3.3",
|
|
70
|
-
"@backstage/core-plugin-api": "1.
|
|
71
|
-
"@backstage/errors": "1.2.7",
|
|
72
|
-
"@backstage/theme": "0.6.8",
|
|
73
|
-
"@backstage/version-bridge": "1.0.11",
|
|
69
|
+
"@backstage/config": "^1.3.3",
|
|
70
|
+
"@backstage/core-plugin-api": "^1.11.0",
|
|
71
|
+
"@backstage/errors": "^1.2.7",
|
|
72
|
+
"@backstage/theme": "^0.6.8",
|
|
73
|
+
"@backstage/version-bridge": "^1.0.11",
|
|
74
74
|
"@dagrejs/dagre": "^1.1.4",
|
|
75
75
|
"@date-io/core": "^1.3.13",
|
|
76
76
|
"@material-table/core": "^3.1.0",
|
|
@@ -107,10 +107,10 @@
|
|
|
107
107
|
"zod": "^3.22.4"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
|
-
"@backstage/app-defaults": "1.
|
|
111
|
-
"@backstage/cli": "0.34.
|
|
112
|
-
"@backstage/core-app-api": "1.
|
|
113
|
-
"@backstage/test-utils": "1.7.11",
|
|
110
|
+
"@backstage/app-defaults": "^1.7.0",
|
|
111
|
+
"@backstage/cli": "^0.34.3",
|
|
112
|
+
"@backstage/core-app-api": "^1.19.0",
|
|
113
|
+
"@backstage/test-utils": "^1.7.11",
|
|
114
114
|
"@testing-library/dom": "^10.0.0",
|
|
115
115
|
"@testing-library/jest-dom": "^6.0.0",
|
|
116
116
|
"@testing-library/user-event": "^14.0.0",
|