@backstage/core-components 0.17.6-next.0 → 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,26 @@
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
+
17
+ ## 0.17.6-next.1
18
+
19
+ ### Patch Changes
20
+
21
+ - 1ad3d94: Dependency graph can now be opened in full screen mode
22
+ - ae7d426: update about card links style for pretty display with other language
23
+
3
24
  ## 0.17.6-next.0
4
25
 
5
26
  ### Patch Changes
package/dist/alpha.d.ts CHANGED
@@ -54,6 +54,7 @@ declare const coreComponentsTranslationRef: _backstage_core_plugin_api_alpha.Tra
54
54
  readonly "alertDisplay.message_other": "({{ count }} newer messages)";
55
55
  readonly "autoLogout.stillTherePrompt.title": "Logging out due to inactivity";
56
56
  readonly "autoLogout.stillTherePrompt.buttonText": "Yes! Don't log me out";
57
+ readonly "dependencyGraph.fullscreenTooltip": "Toggle fullscreen";
57
58
  readonly "proxiedSignInPage.title": "You do not appear to be signed in. Please try reloading the browser page.";
58
59
  }>;
59
60
 
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useState, useRef, useMemo, useCallback, useEffect } from 'react';
3
3
  import * as d3Zoom from 'd3-zoom';
4
4
  import * as d3Selection from 'd3-selection';
@@ -9,8 +9,27 @@ import { DependencyGraphTypes } from './types.esm.js';
9
9
  import { Node } from './Node.esm.js';
10
10
  import { Edge } from './Edge.esm.js';
11
11
  import { ARROW_MARKER_ID } from './constants.esm.js';
12
+ import IconButton from '@material-ui/core/IconButton';
13
+ import FullscreenIcon from '@material-ui/icons/Fullscreen';
14
+ import FullscreenExitIcon from '@material-ui/icons/FullscreenExit';
15
+ import { useFullScreenHandle, FullScreen } from 'react-full-screen';
16
+ import { makeStyles } from '@material-ui/core/styles';
17
+ import Tooltip from '@material-ui/core/Tooltip';
18
+ import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
19
+ import { coreComponentsTranslationRef } from '../../translation.esm.js';
12
20
 
21
+ const useStyles = makeStyles((theme) => ({
22
+ root: {
23
+ overflow: "hidden",
24
+ minHeight: "100%",
25
+ minWidth: "100%"
26
+ },
27
+ fullscreen: {
28
+ backgroundColor: theme.palette.background.paper
29
+ }
30
+ }));
13
31
  const WORKSPACE_ID = "workspace";
32
+ const DEPENDENCY_GRAPH_SVG = "dependency-graph";
14
33
  function DependencyGraph(props) {
15
34
  const {
16
35
  edges,
@@ -35,11 +54,15 @@ function DependencyGraph(props) {
35
54
  curve = "curveMonotoneX",
36
55
  showArrowHeads = false,
37
56
  fit = "grow",
57
+ allowFullscreen = true,
38
58
  ...svgProps
39
59
  } = props;
40
60
  const theme = useTheme();
41
61
  const [containerWidth, setContainerWidth] = useState(100);
42
62
  const [containerHeight, setContainerHeight] = useState(100);
63
+ const fullScreenHandle = useFullScreenHandle();
64
+ const styles = useStyles();
65
+ const { t } = useTranslationRef(coreComponentsTranslationRef);
43
66
  const graph = useRef(
44
67
  new dagre.graphlib.Graph()
45
68
  );
@@ -56,7 +79,13 @@ function DependencyGraph(props) {
56
79
  const minHeight = Math.min(graphHeight, containerHeight);
57
80
  const scalableHeight = fit === "grow" ? maxHeight : minHeight;
58
81
  const containerRef = useMemo(
59
- () => debounce((node) => {
82
+ () => debounce((root) => {
83
+ if (!root) {
84
+ return;
85
+ }
86
+ const node = root.querySelector(
87
+ `svg#${DEPENDENCY_GRAPH_SVG}`
88
+ );
60
89
  if (!node) {
61
90
  return;
62
91
  }
@@ -88,7 +117,7 @@ function DependencyGraph(props) {
88
117
  } else if (zoom === "enable-on-click") {
89
118
  container.on("click", () => enableZoom());
90
119
  }
91
- const { width: newContainerWidth, height: newContainerHeight } = node.getBoundingClientRect();
120
+ const { width: newContainerWidth, height: newContainerHeight } = root.getBoundingClientRect();
92
121
  if (containerWidth !== newContainerWidth) {
93
122
  setContainerWidth(newContainerWidth);
94
123
  }
@@ -192,82 +221,99 @@ function DependencyGraph(props) {
192
221
  updateGraph();
193
222
  return graph.current;
194
223
  }
195
- return /* @__PURE__ */ jsxs(
196
- "svg",
224
+ return /* @__PURE__ */ jsx("div", { ref: containerRef, className: styles.root, children: /* @__PURE__ */ jsxs(
225
+ FullScreen,
197
226
  {
198
- ref: containerRef,
199
- ...svgProps,
200
- width: "100%",
201
- height: scalableHeight,
202
- viewBox: `0 0 ${maxWidth} ${maxHeight}`,
227
+ handle: fullScreenHandle,
228
+ className: fullScreenHandle.active ? styles.fullscreen : styles.root,
203
229
  children: [
204
- /* @__PURE__ */ jsxs("defs", { children: [
205
- /* @__PURE__ */ jsx(
206
- "marker",
207
- {
208
- id: ARROW_MARKER_ID,
209
- viewBox: "0 0 24 24",
210
- markerWidth: "14",
211
- markerHeight: "14",
212
- refX: "16",
213
- refY: "12",
214
- orient: "auto",
215
- markerUnits: "strokeWidth",
216
- children: /* @__PURE__ */ jsx(
217
- "path",
218
- {
219
- fill: theme.palette.textSubtle,
220
- d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
221
- }
222
- )
223
- }
224
- ),
225
- defs
226
- ] }),
227
- /* @__PURE__ */ jsx("g", { id: WORKSPACE_ID, children: /* @__PURE__ */ jsxs(
230
+ allowFullscreen && /* @__PURE__ */ jsx(Tooltip, { title: t("dependencyGraph.fullscreenTooltip"), children: /* @__PURE__ */ jsx(
231
+ IconButton,
232
+ {
233
+ style: { float: "right" },
234
+ onClick: fullScreenHandle.active ? fullScreenHandle.exit : fullScreenHandle.enter,
235
+ children: fullScreenHandle.active ? /* @__PURE__ */ jsx(FullscreenExitIcon, {}) : /* @__PURE__ */ jsx(FullscreenIcon, {})
236
+ }
237
+ ) }),
238
+ /* @__PURE__ */ jsxs(
228
239
  "svg",
229
240
  {
230
- width: graphWidth,
231
- height: graphHeight,
232
- y: maxHeight / 2 - graphHeight / 2,
233
- x: maxWidth / 2 - graphWidth / 2,
234
- viewBox: `0 0 ${graphWidth} ${graphHeight}`,
241
+ ...svgProps,
242
+ width: "100%",
243
+ height: scalableHeight,
244
+ viewBox: `0 0 ${maxWidth} ${maxHeight}`,
245
+ id: DEPENDENCY_GRAPH_SVG,
235
246
  children: [
236
- graphEdges.map((e) => {
237
- const edge = graph.current.edge(e);
238
- if (!edge) return null;
239
- return /* @__PURE__ */ jsx(
240
- Edge,
241
- {
242
- id: e,
243
- setEdge,
244
- render: renderLabel,
245
- edge,
246
- curve,
247
- showArrowHeads
248
- },
249
- `${e.v}-${e.w}`
250
- );
251
- }),
252
- graphNodes.map((id) => {
253
- const node = graph.current.node(id);
254
- if (!node) return null;
255
- return /* @__PURE__ */ jsx(
256
- Node,
247
+ /* @__PURE__ */ jsxs("defs", { children: [
248
+ /* @__PURE__ */ jsx(
249
+ "marker",
257
250
  {
258
- setNode,
259
- render: renderNode,
260
- node
261
- },
262
- id
263
- );
264
- })
251
+ id: ARROW_MARKER_ID,
252
+ viewBox: "0 0 24 24",
253
+ markerWidth: "14",
254
+ markerHeight: "14",
255
+ refX: "16",
256
+ refY: "12",
257
+ orient: "auto",
258
+ markerUnits: "strokeWidth",
259
+ children: /* @__PURE__ */ jsx(
260
+ "path",
261
+ {
262
+ fill: theme.palette.textSubtle,
263
+ d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
264
+ }
265
+ )
266
+ }
267
+ ),
268
+ defs
269
+ ] }),
270
+ /* @__PURE__ */ jsx("g", { id: WORKSPACE_ID, children: /* @__PURE__ */ jsxs(
271
+ "svg",
272
+ {
273
+ width: graphWidth,
274
+ height: graphHeight,
275
+ y: maxHeight / 2 - graphHeight / 2,
276
+ x: maxWidth / 2 - graphWidth / 2,
277
+ viewBox: `0 0 ${graphWidth} ${graphHeight}`,
278
+ children: [
279
+ graphEdges.map((e) => {
280
+ const edge = graph.current.edge(e);
281
+ if (!edge) return null;
282
+ return /* @__PURE__ */ jsx(
283
+ Edge,
284
+ {
285
+ id: e,
286
+ setEdge,
287
+ render: renderLabel,
288
+ edge,
289
+ curve,
290
+ showArrowHeads
291
+ },
292
+ `${e.v}-${e.w}`
293
+ );
294
+ }),
295
+ graphNodes.map((id) => {
296
+ const node = graph.current.node(id);
297
+ if (!node) return null;
298
+ return /* @__PURE__ */ jsx(
299
+ Node,
300
+ {
301
+ setNode,
302
+ render: renderNode,
303
+ node
304
+ },
305
+ id
306
+ );
307
+ })
308
+ ]
309
+ }
310
+ ) })
265
311
  ]
266
312
  }
267
- ) })
313
+ )
268
314
  ]
269
315
  }
270
- );
316
+ ) });
271
317
  }
272
318
 
273
319
  export { DependencyGraph };
@@ -1 +1 @@
1
- {"version":3,"file":"DependencyGraph.esm.js","sources":["../../../src/components/DependencyGraph/DependencyGraph.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 {\n SVGProps,\n useState,\n useRef,\n useMemo,\n useCallback,\n useEffect,\n} from 'react';\nimport * as d3Zoom from 'd3-zoom';\nimport * as d3Selection from 'd3-selection';\nimport useTheme from '@material-ui/core/styles/useTheme';\nimport dagre from '@dagrejs/dagre';\nimport debounce from 'lodash/debounce';\nimport { DependencyGraphTypes as Types } from './types';\nimport { Node } from './Node';\nimport { Edge, GraphEdge } from './Edge';\nimport { ARROW_MARKER_ID } from './constants';\n\n/**\n * Properties of {@link DependencyGraph}\n *\n * @public\n * @remarks\n * `<NodeData>` and `<EdgeData>` are useful when rendering custom or edge labels\n */\nexport interface DependencyGraphProps<NodeData, EdgeData>\n extends SVGProps<SVGSVGElement> {\n /**\n * Edges of graph\n */\n edges: Types.DependencyEdge<EdgeData>[];\n /**\n * Nodes of Graph\n */\n nodes: Types.DependencyNode<NodeData>[];\n /**\n * Graph {@link DependencyGraphTypes.Direction | direction}\n *\n * @remarks\n *\n * Default: `DependencyGraphTypes.Direction.TOP_BOTTOM`\n */\n direction?: Types.Direction;\n /**\n * Node {@link DependencyGraphTypes.Alignment | alignment}\n */\n align?: Types.Alignment;\n /**\n * Margin between nodes on each rank\n *\n * @remarks\n *\n * Default: 50\n */\n nodeMargin?: number;\n /**\n * Margin between edges\n *\n * @remarks\n *\n * Default: 10\n */\n edgeMargin?: number;\n /**\n * Margin between each rank\n *\n * @remarks\n *\n * Default: 50\n */\n rankMargin?: number;\n /**\n * Margin on left and right of whole graph\n *\n * @remarks\n *\n * Default: 0\n */\n paddingX?: number;\n /**\n * Margin on top and bottom of whole graph\n *\n * @remarks\n *\n * Default: 0\n */\n paddingY?: number;\n /**\n * Heuristic used to find set of edges that will make graph acyclic\n */\n acyclicer?: 'greedy';\n /**\n * {@link DependencyGraphTypes.Ranker | Algorithm} used to rank nodes\n *\n * @remarks\n *\n * Default: `DependencyGraphTypes.Ranker.NETWORK_SIMPLEX`\n */\n ranker?: Types.Ranker;\n /**\n * {@link DependencyGraphTypes.LabelPosition | Position} of label in relation to edge\n *\n * @remarks\n *\n * Default: `DependencyGraphTypes.LabelPosition.RIGHT`\n */\n labelPosition?: Types.LabelPosition;\n /**\n * How much to move label away from edge\n *\n * @remarks\n *\n * Applies only when {@link DependencyGraphProps.labelPosition} is `DependencyGraphTypes.LabelPosition.LEFT` or\n * `DependencyGraphTypes.LabelPosition.RIGHT`\n */\n labelOffset?: number;\n /**\n * Minimum number of ranks to keep between connected nodes\n */\n edgeRanks?: number;\n /**\n * Weight applied to edges in graph\n */\n edgeWeight?: number;\n /**\n * Custom node rendering component\n */\n renderNode?: Types.RenderNodeFunction<NodeData>;\n /**\n * Custom label rendering component\n */\n renderLabel?: Types.RenderLabelFunction<EdgeData>;\n /**\n * {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs | Defs} shared by rendered SVG to be used by\n * {@link DependencyGraphProps.renderNode} and/or {@link DependencyGraphProps.renderLabel}\n */\n defs?: JSX.Element | JSX.Element[];\n /**\n * Controls zoom behavior of graph\n *\n * @remarks\n *\n * Default: `enabled`\n */\n zoom?: 'enabled' | 'disabled' | 'enable-on-click';\n /**\n * A factory for curve generators addressing both lines and areas.\n *\n * @remarks\n *\n * Default: 'curveMonotoneX'\n */\n curve?: 'curveStepBefore' | 'curveMonotoneX';\n /**\n * Controls if the arrow heads should be rendered or not.\n *\n * Default: false\n */\n showArrowHeads?: boolean;\n /**\n * Controls if the graph should be contained or grow\n *\n * @remarks\n *\n * Default: 'grow'\n */\n fit?: 'grow' | 'contain';\n}\n\nconst WORKSPACE_ID = 'workspace';\n\n/**\n * Graph component used to visualize relations between entities\n *\n * @public\n */\nexport function DependencyGraph<NodeData, EdgeData>(\n props: DependencyGraphProps<NodeData, EdgeData>,\n) {\n const {\n edges,\n nodes,\n renderNode,\n direction = Types.Direction.TOP_BOTTOM,\n align,\n nodeMargin = 50,\n edgeMargin = 10,\n rankMargin = 50,\n paddingX = 0,\n paddingY = 0,\n acyclicer,\n ranker = Types.Ranker.NETWORK_SIMPLEX,\n labelPosition = Types.LabelPosition.RIGHT,\n labelOffset = 10,\n edgeRanks = 1,\n edgeWeight = 1,\n renderLabel,\n defs,\n zoom = 'enabled',\n curve = 'curveMonotoneX',\n showArrowHeads = false,\n fit = 'grow',\n ...svgProps\n } = props;\n const theme = useTheme();\n const [containerWidth, setContainerWidth] = useState<number>(100);\n const [containerHeight, setContainerHeight] = useState<number>(100);\n\n const graph = useRef<dagre.graphlib.Graph<Types.DependencyNode<NodeData>>>(\n new dagre.graphlib.Graph(),\n );\n const [graphWidth, setGraphWidth] = useState<number>(\n graph.current.graph()?.width || 0,\n );\n const [graphHeight, setGraphHeight] = useState<number>(\n graph.current.graph()?.height || 0,\n );\n const [graphNodes, setGraphNodes] = useState<string[]>([]);\n const [graphEdges, setGraphEdges] = useState<dagre.Edge[]>([]);\n\n const maxWidth = Math.max(graphWidth, containerWidth);\n const maxHeight = Math.max(graphHeight, containerHeight);\n const minHeight = Math.min(graphHeight, containerHeight);\n\n const scalableHeight = fit === 'grow' ? maxHeight : minHeight;\n\n const containerRef = useMemo(\n () =>\n debounce((node: SVGSVGElement) => {\n if (!node) {\n return;\n }\n // Set up zooming + panning\n const container = d3Selection.select<SVGSVGElement, null>(node);\n const workspace = d3Selection.select(node.getElementById(WORKSPACE_ID));\n\n function enableZoom() {\n container.call(\n d3Zoom\n .zoom<SVGSVGElement, null>()\n .scaleExtent([1, Infinity])\n .on('zoom', event => {\n event.transform.x = Math.min(\n 0,\n Math.max(\n event.transform.x,\n maxWidth - maxWidth * event.transform.k,\n ),\n );\n event.transform.y = Math.min(\n 0,\n Math.max(\n event.transform.y,\n maxHeight - maxHeight * event.transform.k,\n ),\n );\n workspace.attr('transform', event.transform);\n }),\n );\n }\n\n if (zoom === 'enabled') {\n enableZoom();\n } else if (zoom === 'enable-on-click') {\n container.on('click', () => enableZoom());\n }\n\n const { width: newContainerWidth, height: newContainerHeight } =\n node.getBoundingClientRect();\n if (containerWidth !== newContainerWidth) {\n setContainerWidth(newContainerWidth);\n }\n if (containerHeight !== newContainerHeight) {\n setContainerHeight(newContainerHeight);\n }\n }, 100),\n [containerHeight, containerWidth, maxWidth, maxHeight, zoom],\n );\n\n const setNodesAndEdges = useCallback(() => {\n // Cleaning up lingering nodes and edges\n const currentGraphNodes = graph.current.nodes();\n const currentGraphEdges = graph.current.edges();\n\n currentGraphNodes.forEach(nodeId => {\n const remainingNode = nodes.some(node => node.id === nodeId);\n if (!remainingNode) {\n graph.current.removeNode(nodeId);\n }\n });\n\n currentGraphEdges.forEach(e => {\n const remainingEdge = edges.some(\n edge => edge.from === e.v && edge.to === e.w,\n );\n if (!remainingEdge) {\n graph.current.removeEdge(e.v, e.w);\n }\n });\n\n // Adding/updating nodes and edges\n nodes.forEach(node => {\n const existingNode = graph.current\n .nodes()\n .find(nodeId => node.id === nodeId);\n\n if (existingNode && graph.current.node(existingNode)) {\n const { width, height, x, y } = graph.current.node(existingNode);\n graph.current.setNode(existingNode, { ...node, width, height, x, y });\n } else {\n graph.current.setNode(node.id, { ...node, width: 0, height: 0 });\n }\n });\n\n edges.forEach(e => {\n graph.current.setEdge(e.from, e.to, {\n ...e,\n label: e.label,\n width: 0,\n height: 0,\n labelpos: labelPosition,\n labeloffset: labelOffset,\n weight: edgeWeight,\n minlen: edgeRanks,\n });\n });\n }, [edges, nodes, labelPosition, labelOffset, edgeWeight, edgeRanks]);\n\n const updateGraph = useMemo(\n () =>\n debounce(\n () => {\n dagre.layout(graph.current);\n const { height, width } = graph.current.graph();\n const newHeight = Math.max(0, height || 0);\n const newWidth = Math.max(0, width || 0);\n setGraphWidth(newWidth);\n setGraphHeight(newHeight);\n\n setGraphNodes(graph.current.nodes());\n setGraphEdges(graph.current.edges());\n },\n 250,\n { leading: true },\n ),\n [],\n );\n\n useEffect(() => {\n graph.current.setGraph({\n rankdir: direction,\n align,\n nodesep: nodeMargin,\n edgesep: edgeMargin,\n ranksep: rankMargin,\n marginx: paddingX,\n marginy: paddingY,\n acyclicer,\n ranker,\n });\n\n setNodesAndEdges();\n updateGraph();\n\n return updateGraph.cancel;\n }, [\n acyclicer,\n align,\n direction,\n edgeMargin,\n paddingX,\n paddingY,\n nodeMargin,\n rankMargin,\n ranker,\n setNodesAndEdges,\n updateGraph,\n ]);\n\n function setNode(id: string, node: Types.DependencyNode<NodeData>) {\n graph.current.setNode(id, node);\n updateGraph();\n return graph.current;\n }\n\n function setEdge(id: dagre.Edge, edge: Types.DependencyEdge<EdgeData>) {\n graph.current.setEdge(id, edge);\n updateGraph();\n return graph.current;\n }\n\n return (\n <svg\n ref={containerRef}\n {...svgProps}\n width=\"100%\"\n height={scalableHeight}\n viewBox={`0 0 ${maxWidth} ${maxHeight}`}\n >\n <defs>\n <marker\n id={ARROW_MARKER_ID}\n viewBox=\"0 0 24 24\"\n markerWidth=\"14\"\n markerHeight=\"14\"\n refX=\"16\"\n refY=\"12\"\n orient=\"auto\"\n markerUnits=\"strokeWidth\"\n >\n <path\n fill={theme.palette.textSubtle}\n d=\"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z\"\n />\n </marker>\n {defs}\n </defs>\n <g id={WORKSPACE_ID}>\n <svg\n width={graphWidth}\n height={graphHeight}\n y={maxHeight / 2 - graphHeight / 2}\n x={maxWidth / 2 - graphWidth / 2}\n viewBox={`0 0 ${graphWidth} ${graphHeight}`}\n >\n {graphEdges.map(e => {\n const edge = graph.current.edge(e) as GraphEdge<EdgeData>;\n if (!edge) return null;\n return (\n <Edge\n key={`${e.v}-${e.w}`}\n id={e}\n setEdge={setEdge}\n render={renderLabel}\n edge={edge}\n curve={curve}\n showArrowHeads={showArrowHeads}\n />\n );\n })}\n {graphNodes.map((id: string) => {\n const node = graph.current.node(id);\n if (!node) return null;\n return (\n <Node\n key={id}\n setNode={setNode}\n render={renderNode}\n node={node}\n />\n );\n })}\n </svg>\n </g>\n </svg>\n );\n}\n"],"names":["Types"],"mappings":";;;;;;;;;;;;AAyLA,MAAM,YAAA,GAAe,WAAA;AAOd,SAAS,gBACd,KAAA,EACA;AACA,EAAA,MAAM;AAAA,IACJ,KAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA,GAAYA,qBAAM,SAAA,CAAU,UAAA;AAAA,IAC5B,KAAA;AAAA,IACA,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AAA,CAAE,CAAC,CAAA,CAAA,EAAI,EAAE,CAAC,CAAA;AAAA,iBAOpB;AAAA,cAEJ,CAAC,CAAA;AAAA,cACA,UAAA,CAAW,GAAA,CAAI,CAAC,EAAA,KAAe;AAC9B,gBAAA,MAAM,IAAA,GAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,EAAE,CAAA;AAClC,gBAAA,IAAI,CAAC,MAAM,OAAO,IAAA;AAClB,gBAAA,uBACE,GAAA;AAAA,kBAAC,IAAA;AAAA,kBAAA;AAAA,oBAEC,OAAA;AAAA,oBACA,MAAA,EAAQ,UAAA;AAAA,oBACR;AAAA,mBAAA;AAAA,kBAHK;AAAA,iBAIP;AAAA,cAEJ,CAAC;AAAA;AAAA;AAAA,SACH,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"DependencyGraph.esm.js","sources":["../../../src/components/DependencyGraph/DependencyGraph.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 {\n SVGProps,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport * as d3Zoom from 'd3-zoom';\nimport * as d3Selection from 'd3-selection';\nimport useTheme from '@material-ui/core/styles/useTheme';\nimport dagre from '@dagrejs/dagre';\nimport debounce from 'lodash/debounce';\nimport { DependencyGraphTypes as Types } from './types';\nimport { Node } from './Node';\nimport { Edge, GraphEdge } from './Edge';\nimport { ARROW_MARKER_ID } from './constants';\nimport IconButton from '@material-ui/core/IconButton';\nimport FullscreenIcon from '@material-ui/icons/Fullscreen';\nimport FullscreenExitIcon from '@material-ui/icons/FullscreenExit';\nimport { FullScreen, useFullScreenHandle } from 'react-full-screen';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { coreComponentsTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles((theme: Theme) => ({\n root: {\n overflow: 'hidden',\n minHeight: '100%',\n minWidth: '100%',\n },\n fullscreen: {\n backgroundColor: theme.palette.background.paper,\n },\n}));\n\n/**\n * Properties of {@link DependencyGraph}\n *\n * @public\n * @remarks\n * `<NodeData>` and `<EdgeData>` are useful when rendering custom or edge labels\n */\nexport interface DependencyGraphProps<NodeData, EdgeData>\n extends SVGProps<SVGSVGElement> {\n /**\n * Edges of graph\n */\n edges: Types.DependencyEdge<EdgeData>[];\n /**\n * Nodes of Graph\n */\n nodes: Types.DependencyNode<NodeData>[];\n /**\n * Graph {@link DependencyGraphTypes.Direction | direction}\n *\n * @remarks\n *\n * Default: `DependencyGraphTypes.Direction.TOP_BOTTOM`\n */\n direction?: Types.Direction;\n /**\n * Node {@link DependencyGraphTypes.Alignment | alignment}\n */\n align?: Types.Alignment;\n /**\n * Margin between nodes on each rank\n *\n * @remarks\n *\n * Default: 50\n */\n nodeMargin?: number;\n /**\n * Margin between edges\n *\n * @remarks\n *\n * Default: 10\n */\n edgeMargin?: number;\n /**\n * Margin between each rank\n *\n * @remarks\n *\n * Default: 50\n */\n rankMargin?: number;\n /**\n * Margin on left and right of whole graph\n *\n * @remarks\n *\n * Default: 0\n */\n paddingX?: number;\n /**\n * Margin on top and bottom of whole graph\n *\n * @remarks\n *\n * Default: 0\n */\n paddingY?: number;\n /**\n * Heuristic used to find set of edges that will make graph acyclic\n */\n acyclicer?: 'greedy';\n /**\n * {@link DependencyGraphTypes.Ranker | Algorithm} used to rank nodes\n *\n * @remarks\n *\n * Default: `DependencyGraphTypes.Ranker.NETWORK_SIMPLEX`\n */\n ranker?: Types.Ranker;\n /**\n * {@link DependencyGraphTypes.LabelPosition | Position} of label in relation to edge\n *\n * @remarks\n *\n * Default: `DependencyGraphTypes.LabelPosition.RIGHT`\n */\n labelPosition?: Types.LabelPosition;\n /**\n * How much to move label away from edge\n *\n * @remarks\n *\n * Applies only when {@link DependencyGraphProps.labelPosition} is `DependencyGraphTypes.LabelPosition.LEFT` or\n * `DependencyGraphTypes.LabelPosition.RIGHT`\n */\n labelOffset?: number;\n /**\n * Minimum number of ranks to keep between connected nodes\n */\n edgeRanks?: number;\n /**\n * Weight applied to edges in graph\n */\n edgeWeight?: number;\n /**\n * Custom node rendering component\n */\n renderNode?: Types.RenderNodeFunction<NodeData>;\n /**\n * Custom label rendering component\n */\n renderLabel?: Types.RenderLabelFunction<EdgeData>;\n /**\n * {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs | Defs} shared by rendered SVG to be used by\n * {@link DependencyGraphProps.renderNode} and/or {@link DependencyGraphProps.renderLabel}\n */\n defs?: JSX.Element | JSX.Element[];\n /**\n * Controls zoom behavior of graph\n *\n * @remarks\n *\n * Default: `enabled`\n */\n zoom?: 'enabled' | 'disabled' | 'enable-on-click';\n /**\n * A factory for curve generators addressing both lines and areas.\n *\n * @remarks\n *\n * Default: 'curveMonotoneX'\n */\n curve?: 'curveStepBefore' | 'curveMonotoneX';\n /**\n * Controls if the arrow heads should be rendered or not.\n *\n * Default: false\n */\n showArrowHeads?: boolean;\n /**\n * Controls if the graph should be contained or grow\n *\n * @remarks\n *\n * Default: 'grow'\n */\n fit?: 'grow' | 'contain';\n /**\n * Controls if user can toggle fullscreen mode\n *\n * @remarks\n *\n * Default: true\n */\n allowFullscreen?: boolean;\n}\n\nconst WORKSPACE_ID = 'workspace';\nconst DEPENDENCY_GRAPH_SVG = 'dependency-graph';\n\n/**\n * Graph component used to visualize relations between entities\n *\n * @public\n */\nexport function DependencyGraph<NodeData, EdgeData>(\n props: DependencyGraphProps<NodeData, EdgeData>,\n) {\n const {\n edges,\n nodes,\n renderNode,\n direction = Types.Direction.TOP_BOTTOM,\n align,\n nodeMargin = 50,\n edgeMargin = 10,\n rankMargin = 50,\n paddingX = 0,\n paddingY = 0,\n acyclicer,\n ranker = Types.Ranker.NETWORK_SIMPLEX,\n labelPosition = Types.LabelPosition.RIGHT,\n labelOffset = 10,\n edgeRanks = 1,\n edgeWeight = 1,\n renderLabel,\n defs,\n zoom = 'enabled',\n curve = 'curveMonotoneX',\n showArrowHeads = false,\n fit = 'grow',\n allowFullscreen = true,\n ...svgProps\n } = props;\n const theme = useTheme();\n const [containerWidth, setContainerWidth] = useState<number>(100);\n const [containerHeight, setContainerHeight] = useState<number>(100);\n const fullScreenHandle = useFullScreenHandle();\n const styles = useStyles();\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n\n const graph = useRef<dagre.graphlib.Graph<Types.DependencyNode<NodeData>>>(\n new dagre.graphlib.Graph(),\n );\n const [graphWidth, setGraphWidth] = useState<number>(\n graph.current.graph()?.width || 0,\n );\n const [graphHeight, setGraphHeight] = useState<number>(\n graph.current.graph()?.height || 0,\n );\n const [graphNodes, setGraphNodes] = useState<string[]>([]);\n const [graphEdges, setGraphEdges] = useState<dagre.Edge[]>([]);\n\n const maxWidth = Math.max(graphWidth, containerWidth);\n const maxHeight = Math.max(graphHeight, containerHeight);\n const minHeight = Math.min(graphHeight, containerHeight);\n\n const scalableHeight = fit === 'grow' ? maxHeight : minHeight;\n\n const containerRef = useMemo(\n () =>\n debounce((root: HTMLDivElement) => {\n if (!root) {\n return;\n }\n // Set up zooming + panning\n const node: SVGSVGElement = root.querySelector(\n `svg#${DEPENDENCY_GRAPH_SVG}`,\n ) as SVGSVGElement;\n if (!node) {\n return;\n }\n const container = d3Selection.select<SVGSVGElement, null>(node);\n const workspace = d3Selection.select(node.getElementById(WORKSPACE_ID));\n\n function enableZoom() {\n container.call(\n d3Zoom\n .zoom<SVGSVGElement, null>()\n .scaleExtent([1, Infinity])\n .on('zoom', event => {\n event.transform.x = Math.min(\n 0,\n Math.max(\n event.transform.x,\n maxWidth - maxWidth * event.transform.k,\n ),\n );\n event.transform.y = Math.min(\n 0,\n Math.max(\n event.transform.y,\n maxHeight - maxHeight * event.transform.k,\n ),\n );\n workspace.attr('transform', event.transform);\n }),\n );\n }\n\n if (zoom === 'enabled') {\n enableZoom();\n } else if (zoom === 'enable-on-click') {\n container.on('click', () => enableZoom());\n }\n\n const { width: newContainerWidth, height: newContainerHeight } =\n root.getBoundingClientRect();\n if (containerWidth !== newContainerWidth) {\n setContainerWidth(newContainerWidth);\n }\n if (containerHeight !== newContainerHeight) {\n setContainerHeight(newContainerHeight);\n }\n }, 100),\n [containerHeight, containerWidth, maxWidth, maxHeight, zoom],\n );\n\n const setNodesAndEdges = useCallback(() => {\n // Cleaning up lingering nodes and edges\n const currentGraphNodes = graph.current.nodes();\n const currentGraphEdges = graph.current.edges();\n\n currentGraphNodes.forEach(nodeId => {\n const remainingNode = nodes.some(node => node.id === nodeId);\n if (!remainingNode) {\n graph.current.removeNode(nodeId);\n }\n });\n\n currentGraphEdges.forEach(e => {\n const remainingEdge = edges.some(\n edge => edge.from === e.v && edge.to === e.w,\n );\n if (!remainingEdge) {\n graph.current.removeEdge(e.v, e.w);\n }\n });\n\n // Adding/updating nodes and edges\n nodes.forEach(node => {\n const existingNode = graph.current\n .nodes()\n .find(nodeId => node.id === nodeId);\n\n if (existingNode && graph.current.node(existingNode)) {\n const { width, height, x, y } = graph.current.node(existingNode);\n graph.current.setNode(existingNode, { ...node, width, height, x, y });\n } else {\n graph.current.setNode(node.id, { ...node, width: 0, height: 0 });\n }\n });\n\n edges.forEach(e => {\n graph.current.setEdge(e.from, e.to, {\n ...e,\n label: e.label,\n width: 0,\n height: 0,\n labelpos: labelPosition,\n labeloffset: labelOffset,\n weight: edgeWeight,\n minlen: edgeRanks,\n });\n });\n }, [edges, nodes, labelPosition, labelOffset, edgeWeight, edgeRanks]);\n\n const updateGraph = useMemo(\n () =>\n debounce(\n () => {\n dagre.layout(graph.current);\n const { height, width } = graph.current.graph();\n const newHeight = Math.max(0, height || 0);\n const newWidth = Math.max(0, width || 0);\n setGraphWidth(newWidth);\n setGraphHeight(newHeight);\n\n setGraphNodes(graph.current.nodes());\n setGraphEdges(graph.current.edges());\n },\n 250,\n { leading: true },\n ),\n [],\n );\n\n useEffect(() => {\n graph.current.setGraph({\n rankdir: direction,\n align,\n nodesep: nodeMargin,\n edgesep: edgeMargin,\n ranksep: rankMargin,\n marginx: paddingX,\n marginy: paddingY,\n acyclicer,\n ranker,\n });\n\n setNodesAndEdges();\n updateGraph();\n\n return updateGraph.cancel;\n }, [\n acyclicer,\n align,\n direction,\n edgeMargin,\n paddingX,\n paddingY,\n nodeMargin,\n rankMargin,\n ranker,\n setNodesAndEdges,\n updateGraph,\n ]);\n\n function setNode(id: string, node: Types.DependencyNode<NodeData>) {\n graph.current.setNode(id, node);\n updateGraph();\n return graph.current;\n }\n\n function setEdge(id: dagre.Edge, edge: Types.DependencyEdge<EdgeData>) {\n graph.current.setEdge(id, edge);\n updateGraph();\n return graph.current;\n }\n\n return (\n <div ref={containerRef} className={styles.root}>\n <FullScreen\n handle={fullScreenHandle}\n className={fullScreenHandle.active ? styles.fullscreen : styles.root}\n >\n {allowFullscreen && (\n <Tooltip title={t('dependencyGraph.fullscreenTooltip')}>\n <IconButton\n style={{ float: 'right' }}\n onClick={\n fullScreenHandle.active\n ? fullScreenHandle.exit\n : fullScreenHandle.enter\n }\n >\n {fullScreenHandle.active ? (\n <FullscreenExitIcon />\n ) : (\n <FullscreenIcon />\n )}\n </IconButton>\n </Tooltip>\n )}\n\n <svg\n {...svgProps}\n width=\"100%\"\n height={scalableHeight}\n viewBox={`0 0 ${maxWidth} ${maxHeight}`}\n id={DEPENDENCY_GRAPH_SVG}\n >\n <defs>\n <marker\n id={ARROW_MARKER_ID}\n viewBox=\"0 0 24 24\"\n markerWidth=\"14\"\n markerHeight=\"14\"\n refX=\"16\"\n refY=\"12\"\n orient=\"auto\"\n markerUnits=\"strokeWidth\"\n >\n <path\n fill={theme.palette.textSubtle}\n d=\"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z\"\n />\n </marker>\n {defs}\n </defs>\n <g id={WORKSPACE_ID}>\n <svg\n width={graphWidth}\n height={graphHeight}\n y={maxHeight / 2 - graphHeight / 2}\n x={maxWidth / 2 - graphWidth / 2}\n viewBox={`0 0 ${graphWidth} ${graphHeight}`}\n >\n {graphEdges.map(e => {\n const edge = graph.current.edge(e) as GraphEdge<EdgeData>;\n if (!edge) return null;\n return (\n <Edge\n key={`${e.v}-${e.w}`}\n id={e}\n setEdge={setEdge}\n render={renderLabel}\n edge={edge}\n curve={curve}\n showArrowHeads={showArrowHeads}\n />\n );\n })}\n {graphNodes.map((id: string) => {\n const node = graph.current.node(id);\n if (!node) return null;\n return (\n <Node\n key={id}\n setNode={setNode}\n render={renderNode}\n node={node}\n />\n );\n })}\n </svg>\n </g>\n </svg>\n </FullScreen>\n </div>\n );\n}\n"],"names":["Types"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0CA,MAAM,SAAA,GAAY,UAAA,CAAW,CAAC,KAAA,MAAkB;AAAA,EAC9C,IAAA,EAAM;AAAA,IACJ,QAAA,EAAU,QAAA;AAAA,IACV,SAAA,EAAW,MAAA;AAAA,IACX,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,UAAA,EAAY;AAAA,IACV,eAAA,EAAiB,KAAA,CAAM,OAAA,CAAQ,UAAA,CAAW;AAAA;AAE9C,CAAA,CAAE,CAAA;AAiKF,MAAM,YAAA,GAAe,WAAA;AACrB,MAAM,oBAAA,GAAuB,kBAAA;AAOtB,SAAS,gBACd,KAAA,EACA;AACA,EAAA,MAAM;AAAA,IACJ,KAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA,GAAYA,qBAAM,SAAA,CAAU,UAAA;AAAA,IAC5B,KAAA;AAAA,IACA,UAAA,GAAa,EAAA;AA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,CAAQ,IAAA,CAAK,EAAE,CAAA;AAClC,sBAAA,IAAI,CAAC,MAAM,OAAO,IAAA;AAClB,sBAAA,uBACE,GAAA;AAAA,wBAAC,IAAA;AAAA,wBAAA;AAAA,0BAEC,OAAA;AAAA,0BACA,MAAA,EAAQ,UAAA;AAAA,0BACR;AAAA,yBAAA;AAAA,wBAHK;AAAA,uBAIP;AAAA,oBAEJ,CAAC;AAAA;AAAA;AAAA,eACH,EACF;AAAA;AAAA;AAAA;AACF;AAAA;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
@@ -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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"}
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;;;;"}
@@ -9,7 +9,8 @@ const useStyles = makeStyles(
9
9
  display: "grid",
10
10
  gridAutoFlow: "column",
11
11
  gridAutoColumns: "min-content",
12
- gridGap: theme.spacing(3)
12
+ gridGap: theme.spacing(3),
13
+ wordBreak: "keep-all"
13
14
  }
14
15
  }),
15
16
  { name: "BackstageHeaderIconLinkRow" }
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderIconLinkRow.esm.js","sources":["../../../src/components/HeaderIconLinkRow/HeaderIconLinkRow.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 */\nimport { makeStyles } from '@material-ui/core/styles';\nimport { IconLinkVertical, IconLinkVerticalProps } from './IconLinkVertical';\n\n/** @public */\nexport type HeaderIconLinkRowClassKey = 'links';\n\nconst useStyles = makeStyles(\n theme => ({\n links: {\n margin: theme.spacing(2, 0),\n display: 'grid',\n gridAutoFlow: 'column',\n gridAutoColumns: 'min-content',\n gridGap: theme.spacing(3),\n },\n }),\n { name: 'BackstageHeaderIconLinkRow' },\n);\n\ntype Props = {\n links: IconLinkVerticalProps[];\n};\n\n/**\n * HTML nav tag with links mapped inside\n *\n * @public\n *\n */\nexport function HeaderIconLinkRow(props: Props) {\n const { links } = props;\n const classes = useStyles();\n return (\n <nav className={classes.links}>\n {links.map((link, index) => (\n <IconLinkVertical key={index + 1} {...link} />\n ))}\n </nav>\n );\n}\n"],"names":[],"mappings":";;;;AAqBA,MAAM,SAAA,GAAY,UAAA;AAAA,EAChB,CAAA,KAAA,MAAU;AAAA,IACR,KAAA,EAAO;AAAA,MACL,MAAA,EAAQ,KAAA,CAAM,OAAA,CAAQ,CAAA,EAAG,CAAC,CAAA;AAAA,MAC1B,OAAA,EAAS,MAAA;AAAA,MACT,YAAA,EAAc,QAAA;AAAA,MACd,eAAA,EAAiB,aAAA;AAAA,MACjB,OAAA,EAAS,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA;AAC1B,GACF,CAAA;AAAA,EACA,EAAE,MAAM,4BAAA;AACV,CAAA;AAYO,SAAS,kBAAkB,KAAA,EAAc;AAC9C,EAAA,MAAM,EAAE,OAAM,GAAI,KAAA;AAClB,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,KAAA,EACrB,gBAAM,GAAA,CAAI,CAAC,IAAA,EAAM,KAAA,yBACf,gBAAA,EAAA,EAAkC,GAAG,QAAf,KAAA,GAAQ,CAAa,CAC7C,CAAA,EACH,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"HeaderIconLinkRow.esm.js","sources":["../../../src/components/HeaderIconLinkRow/HeaderIconLinkRow.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 */\nimport { makeStyles } from '@material-ui/core/styles';\nimport { IconLinkVertical, IconLinkVerticalProps } from './IconLinkVertical';\n\n/** @public */\nexport type HeaderIconLinkRowClassKey = 'links';\n\nconst useStyles = makeStyles(\n theme => ({\n links: {\n margin: theme.spacing(2, 0),\n display: 'grid',\n gridAutoFlow: 'column',\n gridAutoColumns: 'min-content',\n gridGap: theme.spacing(3),\n wordBreak: 'keep-all',\n },\n }),\n { name: 'BackstageHeaderIconLinkRow' },\n);\n\ntype Props = {\n links: IconLinkVerticalProps[];\n};\n\n/**\n * HTML nav tag with links mapped inside\n *\n * @public\n *\n */\nexport function HeaderIconLinkRow(props: Props) {\n const { links } = props;\n const classes = useStyles();\n return (\n <nav className={classes.links}>\n {links.map((link, index) => (\n <IconLinkVertical key={index + 1} {...link} />\n ))}\n </nav>\n );\n}\n"],"names":[],"mappings":";;;;AAqBA,MAAM,SAAA,GAAY,UAAA;AAAA,EAChB,CAAA,KAAA,MAAU;AAAA,IACR,KAAA,EAAO;AAAA,MACL,MAAA,EAAQ,KAAA,CAAM,OAAA,CAAQ,CAAA,EAAG,CAAC,CAAA;AAAA,MAC1B,OAAA,EAAS,MAAA;AAAA,MACT,YAAA,EAAc,QAAA;AAAA,MACd,eAAA,EAAiB,aAAA;AAAA,MACjB,OAAA,EAAS,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,MACxB,SAAA,EAAW;AAAA;AACb,GACF,CAAA;AAAA,EACA,EAAE,MAAM,4BAAA;AACV,CAAA;AAYO,SAAS,kBAAkB,KAAA,EAAc;AAC9C,EAAA,MAAM,EAAE,OAAM,GAAI,KAAA;AAClB,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,KAAA,EACrB,gBAAM,GAAA,CAAI,CAAC,IAAA,EAAM,KAAA,yBACf,gBAAA,EAAA,EAAkC,GAAG,QAAf,KAAA,GAAQ,CAAa,CAC7C,CAAA,EACH,CAAA;AAEJ;;;;"}
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}
@@ -604,6 +608,14 @@ interface DependencyGraphProps<NodeData, EdgeData> extends SVGProps<SVGSVGElemen
604
608
  * Default: 'grow'
605
609
  */
606
610
  fit?: 'grow' | 'contain';
611
+ /**
612
+ * Controls if user can toggle fullscreen mode
613
+ *
614
+ * @remarks
615
+ *
616
+ * Default: true
617
+ */
618
+ allowFullscreen?: boolean;
607
619
  }
608
620
  /**
609
621
  * Graph component used to visualize relations between entities
@@ -25,14 +25,8 @@ import 'react-use/esm/useCopyToClipboard';
25
25
  import '@material-ui/core/useMediaQuery';
26
26
  import 'react-router-dom';
27
27
  import '@material-ui/icons/AddCircleOutline';
28
- import 'd3-zoom';
29
- import 'd3-selection';
30
- import '@material-ui/core/styles/useTheme';
31
- import '@dagrejs/dagre';
32
- import 'lodash/debounce';
28
+ import '../../components/DependencyGraph/DependencyGraph.esm.js';
33
29
  import '../../components/DependencyGraph/types.esm.js';
34
- import '../../components/DependencyGraph/Node.esm.js';
35
- import '../../components/DependencyGraph/Edge.esm.js';
36
30
  import '../../components/DismissableBanner/DismissableBanner.esm.js';
37
31
  import '../../components/EmptyState/EmptyState.esm.js';
38
32
  import '../../components/EmptyState/MissingAnnotationEmptyState.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"StackDetails.esm.js","sources":["../../../src/layout/ErrorPage/StackDetails.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 */\nimport Typography from '@material-ui/core/Typography';\nimport { useState } from 'react';\nimport { Link } from '../../components/Link';\nimport { CodeSnippet } from '../../components';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { coreComponentsTranslationRef } from '../../translation';\n\ninterface IStackDetailsProps {\n stack: string;\n}\n\n/** @public */\nexport type StackDetailsClassKey = 'title';\n\nconst useStyles = makeStyles(\n theme => ({\n title: {\n paddingBottom: theme.spacing(5),\n [theme.breakpoints.down('xs')]: {\n paddingBottom: theme.spacing(4),\n fontSize: theme.typography.h3.fontSize,\n },\n },\n }),\n { name: 'BackstageErrorPageStackDetails' },\n);\n\n/**\n * Error page details with stack trace\n *\n * @public\n *\n */\nexport function StackDetails(props: IStackDetailsProps) {\n const { stack } = props;\n const classes = useStyles();\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n\n const [detailsOpen, setDetailsOpen] = useState<boolean>(false);\n\n if (!detailsOpen) {\n return (\n <Typography variant=\"h6\" className={classes.title}>\n <Link to=\"#\" onClick={() => setDetailsOpen(true)}>\n {t('errorPage.showMoreDetails')}\n </Link>\n </Typography>\n );\n }\n\n return (\n <>\n <Typography variant=\"h6\" className={classes.title}>\n <Link to=\"#\" onClick={() => setDetailsOpen(false)}>\n {t('errorPage.showLessDetails')}\n </Link>\n </Typography>\n <CodeSnippet\n text={stack}\n language=\"text\"\n showCopyCodeButton\n showLineNumbers\n />\n </>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,SAAA,GAAY,UAAA;AAAA,EAChB,CAAA,KAAA,MAAU;AAAA,IACR,KAAA,EAAO;AAAA,MACL,aAAA,EAAe,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,MAC9B,CAAC,KAAA,CAAM,WAAA,CAAY,IAAA,CAAK,IAAI,CAAC,GAAG;AAAA,QAC9B,aAAA,EAAe,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,QAC9B,QAAA,EAAU,KAAA,CAAM,UAAA,CAAW,EAAA,CAAG;AAAA;AAChC;AACF,GACF,CAAA;AAAA,EACA,EAAE,MAAM,gCAAA;AACV,CAAA;AAQO,SAAS,aAAa,KAAA,EAA2B;AACtD,EAAA,MAAM,EAAE,OAAM,GAAI,KAAA;AAClB,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,4BAA4B,CAAA;AAE5D,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAAkB,KAAK,CAAA;AAE7D,EAAA,IAAI,CAAC,WAAA,EAAa;AAChB,IAAA,2BACG,UAAA,EAAA,EAAW,OAAA,EAAQ,MAAK,SAAA,EAAW,OAAA,CAAQ,OAC1C,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAG,GAAA,EAAI,OAAA,EAAS,MAAM,cAAA,CAAe,IAAI,GAC5C,QAAA,EAAA,CAAA,CAAE,2BAA2B,GAChC,CAAA,EACF,CAAA;AAAA,EAEJ;AAEA,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cAAW,OAAA,EAAQ,IAAA,EAAK,WAAW,OAAA,CAAQ,KAAA,EAC1C,8BAAC,IAAA,EAAA,EAAK,EAAA,EAAG,GAAA,EAAI,OAAA,EAAS,MAAM,cAAA,CAAe,KAAK,GAC7C,QAAA,EAAA,CAAA,CAAE,2BAA2B,GAChC,CAAA,EACF,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,KAAA;AAAA,QACN,QAAA,EAAS,MAAA;AAAA,QACT,kBAAA,EAAkB,IAAA;AAAA,QAClB,eAAA,EAAe;AAAA;AAAA;AACjB,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"StackDetails.esm.js","sources":["../../../src/layout/ErrorPage/StackDetails.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 */\nimport Typography from '@material-ui/core/Typography';\nimport { useState } from 'react';\nimport { Link } from '../../components/Link';\nimport { CodeSnippet } from '../../components';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { coreComponentsTranslationRef } from '../../translation';\n\ninterface IStackDetailsProps {\n stack: string;\n}\n\n/** @public */\nexport type StackDetailsClassKey = 'title';\n\nconst useStyles = makeStyles(\n theme => ({\n title: {\n paddingBottom: theme.spacing(5),\n [theme.breakpoints.down('xs')]: {\n paddingBottom: theme.spacing(4),\n fontSize: theme.typography.h3.fontSize,\n },\n },\n }),\n { name: 'BackstageErrorPageStackDetails' },\n);\n\n/**\n * Error page details with stack trace\n *\n * @public\n *\n */\nexport function StackDetails(props: IStackDetailsProps) {\n const { stack } = props;\n const classes = useStyles();\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n\n const [detailsOpen, setDetailsOpen] = useState<boolean>(false);\n\n if (!detailsOpen) {\n return (\n <Typography variant=\"h6\" className={classes.title}>\n <Link to=\"#\" onClick={() => setDetailsOpen(true)}>\n {t('errorPage.showMoreDetails')}\n </Link>\n </Typography>\n );\n }\n\n return (\n <>\n <Typography variant=\"h6\" className={classes.title}>\n <Link to=\"#\" onClick={() => setDetailsOpen(false)}>\n {t('errorPage.showLessDetails')}\n </Link>\n </Typography>\n <CodeSnippet\n text={stack}\n language=\"text\"\n showCopyCodeButton\n showLineNumbers\n />\n </>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,SAAA,GAAY,UAAA;AAAA,EAChB,CAAA,KAAA,MAAU;AAAA,IACR,KAAA,EAAO;AAAA,MACL,aAAA,EAAe,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,MAC9B,CAAC,KAAA,CAAM,WAAA,CAAY,IAAA,CAAK,IAAI,CAAC,GAAG;AAAA,QAC9B,aAAA,EAAe,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,QAC9B,QAAA,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Yes! Don't log me out"
100
100
  }
101
101
  },
102
+ dependencyGraph: {
103
+ fullscreenTooltip: "Toggle fullscreen"
104
+ },
102
105
  proxiedSignInPage: {
103
106
  title: "You do not appear to be signed in. Please try reloading the browser page."
104
107
  }
@@ -1 +1 @@
1
- {"version":3,"file":"translation.esm.js","sources":["../src/translation.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 */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const coreComponentsTranslationRef = createTranslationRef({\n id: 'core-components',\n messages: {\n signIn: {\n title: 'Sign In',\n loginFailed: 'Login failed',\n customProvider: {\n title: 'Custom User',\n subtitle:\n 'Enter your own User ID and credentials.\\n This selection will not be stored.',\n userId: 'User ID',\n tokenInvalid: 'Token is not a valid OpenID Connect JWT Token',\n continue: 'Continue',\n idToken: 'ID Token (optional)',\n },\n guestProvider: {\n title: 'Guest',\n subtitle:\n 'Enter as a Guest User.\\n You will not have a verified identity, meaning some features might be unavailable.',\n enter: 'Enter',\n },\n },\n skipToContent: 'Skip to content',\n copyTextButton: {\n tooltipText: 'Text copied to clipboard',\n },\n simpleStepper: {\n reset: 'Reset',\n finish: 'Finish',\n next: 'Next',\n skip: 'Skip',\n back: 'Back',\n },\n errorPage: {\n subtitle: 'ERROR {{status}}: {{statusMessage}}',\n title: 'Looks like someone dropped the mic!',\n goBack: 'Go back',\n showMoreDetails: 'Show more details',\n showLessDetails: 'Show less details',\n },\n emptyState: {\n missingAnnotation: {\n title: 'Missing Annotation',\n actionTitle:\n 'Add the annotation to your component YAML as shown in the highlighted example below:',\n readMore: 'Read more',\n },\n },\n supportConfig: {\n default: {\n title: 'Support Not Configured',\n linkTitle: 'Add `app.support` config key',\n },\n },\n errorBoundary: {\n title: 'Please contact {{slackChannel}} for help.',\n },\n oauthRequestDialog: {\n title: 'Login Required',\n authRedirectTitle: 'This will trigger a http redirect to OAuth Login.',\n login: 'Log in',\n rejectAll: 'Reject All',\n message:\n 'Sign-in to allow {{appTitle}} access to {{provider}} APIs and identities.',\n },\n supportButton: {\n title: 'Support',\n close: 'Close',\n },\n table: {\n filter: {\n title: 'Filters',\n clearAll: 'Clear all',\n placeholder: 'All results',\n },\n body: {\n emptyDataSourceMessage: 'No records to display',\n },\n pagination: {\n firstTooltip: 'First Page',\n labelDisplayedRows: '{from}-{to} of {count}',\n labelRowsSelect: 'rows',\n lastTooltip: 'Last Page',\n nextTooltip: 'Next Page',\n previousTooltip: 'Previous Page',\n },\n toolbar: {\n search: 'Filter',\n },\n header: {\n actions: 'Actions',\n },\n },\n alertDisplay: {\n message_one: '({{ count }} newer message)',\n message_other: '({{ count }} newer messages)',\n },\n autoLogout: {\n stillTherePrompt: {\n title: 'Logging out due to inactivity',\n buttonText: \"Yes! Don't log me out\",\n },\n },\n proxiedSignInPage: {\n title:\n 'You do not appear to be signed in. Please try reloading the browser page.',\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,+BAA+B,oBAAA,CAAqB;AAAA,EAC/D,EAAA,EAAI,iBAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO,SAAA;AAAA,MACP,WAAA,EAAa,cAAA;AAAA,MACb,cAAA,EAAgB;AAAA,QACd,KAAA,EAAO,aAAA;AAAA,QACP,QAAA,EACE,8EAAA;AAAA,QACF,MAAA,EAAQ,SAAA;AAAA,QACR,YAAA,EAAc,+CAAA;AAAA,QACd,QAAA,EAAU,UAAA;AAAA,QACV,OAAA,EAAS;AAAA,OACX;AAAA,MACA,aA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,WAAA;AAAA,QACV,WAAA,EAAa;AAAA,OACf;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,sBAAA,EAAwB;AAAA,OAC1B;AAAA,MACA,UAAA,EAAY;AAAA,QACV,YAAA,EAAc,YAAA;AAAA,QACd,kBAAA,EAAoB,wBAAA;AAAA,QACpB,eAAA,EAAiB,MAAA;AAAA,QACjB,WAAA,EAAa,WAAA;AAAA,QACb,WAAA,EAAa,WAAA;AAAA,QACb,eAAA,EAAiB;AAAA,OACnB;AAAA,MACA,OAAA,EAAS;AAAA,QACP,MAAA,EAAQ;AAAA,OACV;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,OAAA,EAAS;AAAA;AACX,KACF;AAAA,IACA,YAAA,EAAc;AAAA,MACZ,WAAA,EAAa,6BAAA;AAAA,MACb,aAAA,EAAe;AAAA,KACjB;AAAA,IACA,UAAA,EAAY;AAAA,MACV,gBAAA,EAAkB;AAAA,QAChB,KAAA,EAAO,+BAAA;AAAA,QACP,UAAA,EAAY;AAAA;AACd,KACF;AAAA,IACA,iBAAA,EAAmB;AAAA,MACjB,KAAA,EACE;AAAA;AACJ;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"translation.esm.js","sources":["../src/translation.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 */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const coreComponentsTranslationRef = createTranslationRef({\n id: 'core-components',\n messages: {\n signIn: {\n title: 'Sign In',\n loginFailed: 'Login failed',\n customProvider: {\n title: 'Custom User',\n subtitle:\n 'Enter your own User ID and credentials.\\n This selection will not be stored.',\n userId: 'User ID',\n tokenInvalid: 'Token is not a valid OpenID Connect JWT Token',\n continue: 'Continue',\n idToken: 'ID Token (optional)',\n },\n guestProvider: {\n title: 'Guest',\n subtitle:\n 'Enter as a Guest User.\\n You will not have a verified identity, meaning some features might be unavailable.',\n enter: 'Enter',\n },\n },\n skipToContent: 'Skip to content',\n copyTextButton: {\n tooltipText: 'Text copied to clipboard',\n },\n simpleStepper: {\n reset: 'Reset',\n finish: 'Finish',\n next: 'Next',\n skip: 'Skip',\n back: 'Back',\n },\n errorPage: {\n subtitle: 'ERROR {{status}}: {{statusMessage}}',\n title: 'Looks like someone dropped the mic!',\n goBack: 'Go back',\n showMoreDetails: 'Show more details',\n showLessDetails: 'Show less details',\n },\n emptyState: {\n missingAnnotation: {\n title: 'Missing Annotation',\n actionTitle:\n 'Add the annotation to your component YAML as shown in the highlighted example below:',\n readMore: 'Read more',\n },\n },\n supportConfig: {\n default: {\n title: 'Support Not Configured',\n linkTitle: 'Add `app.support` config key',\n },\n },\n errorBoundary: {\n title: 'Please contact {{slackChannel}} for help.',\n },\n oauthRequestDialog: {\n title: 'Login Required',\n authRedirectTitle: 'This will trigger a http redirect to OAuth Login.',\n login: 'Log in',\n rejectAll: 'Reject All',\n message:\n 'Sign-in to allow {{appTitle}} access to {{provider}} APIs and identities.',\n },\n supportButton: {\n title: 'Support',\n close: 'Close',\n },\n table: {\n filter: {\n title: 'Filters',\n clearAll: 'Clear all',\n placeholder: 'All results',\n },\n body: {\n emptyDataSourceMessage: 'No records to display',\n },\n pagination: {\n firstTooltip: 'First Page',\n labelDisplayedRows: '{from}-{to} of {count}',\n labelRowsSelect: 'rows',\n lastTooltip: 'Last Page',\n nextTooltip: 'Next Page',\n previousTooltip: 'Previous Page',\n },\n toolbar: {\n search: 'Filter',\n },\n header: {\n actions: 'Actions',\n },\n },\n alertDisplay: {\n message_one: '({{ count }} newer message)',\n message_other: '({{ count }} newer messages)',\n },\n autoLogout: {\n stillTherePrompt: {\n title: 'Logging out due to inactivity',\n buttonText: \"Yes! Don't log me out\",\n },\n },\n dependencyGraph: {\n fullscreenTooltip: 'Toggle fullscreen',\n },\n proxiedSignInPage: {\n title:\n 'You do not appear to be signed in. Please try reloading the browser page.',\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,+BAA+B,oBAAA,CAAqB;AAAA,EAC/D,EAAA,EAAI,iBAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO,SAAA;AAAA,MACP,WAAA,EAAa,cAAA;AAAA,MACb,cAAA,EAAgB;AAAA,QACd,KAAA,EAAO,aAAA;AAAA,QACP,QAAA,EACE,8EAAA;AAAA,QACF,MAAA,EAAQ,SAAA;AAAA,QACR,YAAA,EAAc,+CAAA;AAAA,QACd,QAAA,EAAU,UAAA;AAAA,QACV,OAAA,EAAS;AAAA,OACX;AAAA,MACA,aAAA,EAAe;AAAA,QACb,KAAA,EAAO,OAAA;AAAA,QACP,QAAA,EACE,6GAAA;AAAA,QACF,KAAA,EAAO;AAAA;AACT,KACF;AAAA,IACA,aAAA,EAAe,iBAAA;AAAA,IACf,cAAA,EAAgB;AAAA,MACd,WAAA,EAAa;AAAA,KACf;AAAA,IACA,aAAA,EAAe;AAAA,MACb,KAAA,EAAO,OAAA;AAAA,MACP,MAAA,EAAQ,QAAA;AAAA,MACR,IAAA,EAAM,MAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,IAAA,EAAM;AAAA,KACR;AAAA,IACA,SAAA,EAAW;AAAA,MACT,QAAA,EAAU,qCAAA;AAAA,MACV,KAAA,EAAO,qCAAA;AAAA,MACP,MAAA,EAAQ,SAAA;AAAA,MACR,eAAA,EAAiB,mBAAA;AAAA,MACjB,eAAA,EAAiB;AAAA,KACnB;AAAA,IACA,UAAA,EAAY;AAAA,MACV,iBAAA,EAAmB;AAAA,QACjB,KAAA,EAAO,oBAAA;AA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;AACd,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,iBAAA,EAAmB;AAAA,KACrB;AAAA,IACA,iBAAA,EAAmB;AAAA,MACjB,KAAA,EACE;AAAA;AACJ;AAEJ,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/core-components",
3
- "version": "0.17.6-next.0",
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",
@@ -92,6 +92,7 @@
92
92
  "pluralize": "^8.0.0",
93
93
  "qs": "^6.9.4",
94
94
  "rc-progress": "3.5.1",
95
+ "react-full-screen": "^1.1.1",
95
96
  "react-helmet": "6.1.0",
96
97
  "react-hook-form": "^7.12.2",
97
98
  "react-idle-timer": "5.7.2",
@@ -106,10 +107,10 @@
106
107
  "zod": "^3.22.4"
107
108
  },
108
109
  "devDependencies": {
109
- "@backstage/app-defaults": "1.6.6-next.0",
110
- "@backstage/cli": "0.34.2-next.1",
111
- "@backstage/core-app-api": "1.18.0",
112
- "@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",
113
114
  "@testing-library/dom": "^10.0.0",
114
115
  "@testing-library/jest-dom": "^6.0.0",
115
116
  "@testing-library/user-event": "^14.0.0",
@@ -118,6 +119,7 @@
118
119
  "@types/d3-selection": "^3.0.1",
119
120
  "@types/d3-shape": "^3.0.1",
120
121
  "@types/d3-zoom": "^3.0.1",
122
+ "@types/fscreen": "^1",
121
123
  "@types/google-protobuf": "^3.7.2",
122
124
  "@types/react": "^18.0.0",
123
125
  "@types/react-helmet": "^6.1.0",