@backstage/core-components 0.17.6-next.1 → 0.18.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,19 @@
1
1
  # @backstage/core-components
2
2
 
3
+ ## 0.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b9a87f4: Add optional `distance` property to `DependencyEdge` to reflect the distance to a root.
8
+
9
+ ### Patch Changes
10
+
11
+ - 1ad3d94: Dependency graph can now be opened in full screen mode
12
+ - e409bec: Fixes for rendering initials in the avatar component.
13
+ - ae7d426: update about card links style for pretty display with other language
14
+ - Updated dependencies
15
+ - @backstage/core-plugin-api@1.11.0
16
+
3
17
  ## 0.17.6-next.1
4
18
 
5
19
  ### 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 LE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HCJ,qBAAAA,CAAA,aAAA,KAAAA,qBAAAA,CAAA,aAAA,GAAA,EAAA,CAAA,CAAA;AAAA,CAAA,EA3IG,oBAAA,KAAA,oBAAA,GAAA,EAAA,CAAA,CAAA;;;;"}
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}\n"],"names":["DependencyGraphTypes","Direction","Alignment","Ranker","LabelPosition"],"mappings":"AA6BO,IAAU;AAAA,CAAV,CAAUA,qBAAAA,KAAV;AAuEE,EAAA,CAAA,CAAKC,UAAAA,KAAL;AAIL,IAAAA,WAAA,YAAA,CAAA,GAAa,IAAA;AAIb,IAAAA,WAAA,YAAA,CAAA,GAAa,IAAA;AAIb,IAAAA,WAAA,YAAA,CAAA,GAAa,IAAA;AAIb,IAAAA,WAAA,YAAA,CAAA,GAAa,IAAA;AAAA,EAAA,CAAA,EAhBHD,qBAAAA,CAAA,SAAA,KAAAA,qBAAAA,CAAA,SAAA,GAAA,EAAA,CAAA,CAAA;AAwBL,EAAA,CAAA,CAAKE,UAAAA,KAAL;AAIL,IAAAA,WAAA,SAAA,CAAA,GAAU,IAAA;AAIV,IAAAA,WAAA,UAAA,CAAA,GAAW,IAAA;AAIX,IAAAA,WAAA,WAAA,CAAA,GAAY,IAAA;AAIZ,IAAAA,WAAA,YAAA,CAAA,GAAa,IAAA;AAAA,EAAA,CAAA,EAhBHF,qBAAAA,CAAA,SAAA,KAAAA,qBAAAA,CAAA,SAAA,GAAA,EAAA,CAAA,CAAA;AAwBL,EAAA,CAAA,CAAKG,OAAAA,KAAL;AAIL,IAAAA,QAAA,iBAAA,CAAA,GAAkB,iBAAA;AAIlB,IAAAA,QAAA,YAAA,CAAA,GAAa,YAAA;AAQb,IAAAA,QAAA,cAAA,CAAA,GAAe,cAAA;AAAA,EAAA,CAAA,EAhBLH,qBAAAA,CAAA,MAAA,KAAAA,qBAAAA,CAAA,MAAA,GAAA,EAAA,CAAA,CAAA;AAwBL,EAAA,CAAA,CAAKI,cAAAA,KAAL;AACL,IAAAA,eAAA,MAAA,CAAA,GAAO,GAAA;AACP,IAAAA,eAAA,OAAA,CAAA,GAAQ,GAAA;AACR,IAAAA,eAAA,QAAA,CAAA,GAAS,GAAA;AAAA,EAAA,CAAA,EAHCJ,qBAAAA,CAAA,aAAA,KAAAA,qBAAAA,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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/core-components",
3
- "version": "0.17.6-next.1",
3
+ "version": "0.18.0",
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.10.9",
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.6.6-next.0",
111
- "@backstage/cli": "0.34.2-next.2",
112
- "@backstage/core-app-api": "1.18.0",
113
- "@backstage/test-utils": "1.7.11",
110
+ "@backstage/app-defaults": "^1.7.0",
111
+ "@backstage/cli": "^0.34.2",
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",