@backstage/core-components 0.17.5 → 0.17.6-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/alpha.d.ts +1 -0
- package/dist/components/Avatar/utils.esm.js +1 -1
- package/dist/components/Avatar/utils.esm.js.map +1 -1
- package/dist/components/DependencyGraph/DependencyGraph.esm.js +115 -69
- package/dist/components/DependencyGraph/DependencyGraph.esm.js.map +1 -1
- package/dist/components/HeaderIconLinkRow/HeaderIconLinkRow.esm.js +2 -1
- package/dist/components/HeaderIconLinkRow/HeaderIconLinkRow.esm.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/layout/ErrorPage/StackDetails.esm.js +1 -7
- package/dist/layout/ErrorPage/StackDetails.esm.js.map +1 -1
- package/dist/translation.esm.js +3 -0
- package/dist/translation.esm.js.map +1 -1
- package/package.json +12 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @backstage/core-components
|
|
2
2
|
|
|
3
|
+
## 0.17.6-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1ad3d94: Dependency graph can now be opened in full screen mode
|
|
8
|
+
- ae7d426: update about card links style for pretty display with other language
|
|
9
|
+
|
|
10
|
+
## 0.17.6-next.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- e409bec: Fixes for rendering initials in the avatar component.
|
|
15
|
+
|
|
3
16
|
## 0.17.5
|
|
4
17
|
|
|
5
18
|
### 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
|
|
|
@@ -11,7 +11,7 @@ function stringToColor(str) {
|
|
|
11
11
|
return color;
|
|
12
12
|
}
|
|
13
13
|
function extractInitials(name) {
|
|
14
|
-
const names = name.trim().split(
|
|
14
|
+
const names = name.replace(/\([^)]{0,1000}\)/g, "").replace(/\[[^\]]{0,1000}\]/g, "").trim().split(/\s+/).map((word) => word.replace(/[^A-Za-z\u00C0-\u017F]/g, "")).filter(Boolean);
|
|
15
15
|
const firstName = names[0] ?? "";
|
|
16
16
|
const lastName = names.length > 1 ? names[names.length - 1] : "";
|
|
17
17
|
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.esm.js","sources":["../../../src/components/Avatar/utils.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\nexport function stringToColor(str: string) {\n let hash = 0;\n for (let i = 0; i < str.length; i++) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash);\n }\n let color = '#';\n for (let i = 0; i < 3; i++) {\n const value = (hash >> (i * 8)) & 0xff;\n color += `00${value.toString(16)}`.slice(-2);\n }\n return color;\n}\n\nexport function extractInitials(name: string) {\n const names = name.trim().split(
|
|
1
|
+
{"version":3,"file":"utils.esm.js","sources":["../../../src/components/Avatar/utils.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\nexport function stringToColor(str: string) {\n let hash = 0;\n for (let i = 0; i < str.length; i++) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash);\n }\n let color = '#';\n for (let i = 0; i < 3; i++) {\n const value = (hash >> (i * 8)) & 0xff;\n color += `00${value.toString(16)}`.slice(-2);\n }\n return color;\n}\n\nexport function extractInitials(name: string) {\n const names = name\n .replace(/\\([^)]{0,1000}\\)/g, '')\n .replace(/\\[[^\\]]{0,1000}\\]/g, '')\n .trim()\n .split(/\\s+/)\n .map(word => word.replace(/[^A-Za-z\\u00C0-\\u017F]/g, ''))\n .filter(Boolean);\n const firstName = names[0] ?? '';\n const lastName = names.length > 1 ? names[names.length - 1] : '';\n return firstName && lastName\n ? `${firstName.charAt(0)}${lastName.charAt(0)}`\n : firstName.charAt(0);\n}\n"],"names":[],"mappings":"AAgBO,SAAS,cAAc,GAAA,EAAa;AACzC,EAAA,IAAI,IAAA,GAAO,CAAA;AACX,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,GAAA,CAAI,QAAQ,CAAA,EAAA,EAAK;AACnC,IAAA,IAAA,GAAO,GAAA,CAAI,UAAA,CAAW,CAAC,CAAA,IAAA,CAAM,QAAQ,CAAA,IAAK,IAAA,CAAA;AAAA,EAC5C;AACA,EAAA,IAAI,KAAA,GAAQ,GAAA;AACZ,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,CAAA,EAAG,CAAA,EAAA,EAAK;AAC1B,IAAA,MAAM,KAAA,GAAS,IAAA,IAAS,CAAA,GAAI,CAAA,GAAM,GAAA;AAClC,IAAA,KAAA,IAAS,KAAK,KAAA,CAAM,QAAA,CAAS,EAAE,CAAC,CAAA,CAAA,CAAG,MAAM,EAAE,CAAA;AAAA,EAC7C;AACA,EAAA,OAAO,KAAA;AACT;AAEO,SAAS,gBAAgB,IAAA,EAAc;AAC5C,EAAA,MAAM,KAAA,GAAQ,IAAA,CACX,OAAA,CAAQ,mBAAA,EAAqB,EAAE,EAC/B,OAAA,CAAQ,oBAAA,EAAsB,EAAE,CAAA,CAChC,IAAA,EAAK,CACL,MAAM,KAAK,CAAA,CACX,GAAA,CAAI,CAAA,IAAA,KAAQ,IAAA,CAAK,OAAA,CAAQ,2BAA2B,EAAE,CAAC,CAAA,CACvD,MAAA,CAAO,OAAO,CAAA;AACjB,EAAA,MAAM,SAAA,GAAY,KAAA,CAAM,CAAC,CAAA,IAAK,EAAA;AAC9B,EAAA,MAAM,QAAA,GAAW,MAAM,MAAA,GAAS,CAAA,GAAI,MAAM,KAAA,CAAM,MAAA,GAAS,CAAC,CAAA,GAAI,EAAA;AAC9D,EAAA,OAAO,SAAA,IAAa,QAAA,GAChB,CAAA,EAAG,SAAA,CAAU,OAAO,CAAC,CAAC,CAAA,EAAG,QAAA,CAAS,OAAO,CAAC,CAAC,CAAA,CAAA,GAC3C,SAAA,CAAU,OAAO,CAAC,CAAA;AACxB;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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((
|
|
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 } =
|
|
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
|
-
|
|
224
|
+
return /* @__PURE__ */ jsx("div", { ref: containerRef, className: styles.root, children: /* @__PURE__ */ jsxs(
|
|
225
|
+
FullScreen,
|
|
197
226
|
{
|
|
198
|
-
|
|
199
|
-
|
|
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__ */
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
241
|
+
...svgProps,
|
|
242
|
+
width: "100%",
|
|
243
|
+
height: scalableHeight,
|
|
244
|
+
viewBox: `0 0 ${maxWidth} ${maxHeight}`,
|
|
245
|
+
id: DEPENDENCY_GRAPH_SVG,
|
|
235
246
|
children: [
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
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,K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,EAAQ,WAAA;AAAA,oBACR,IAAA;AAAA,oBACA,KAAA;AAAA,oBACA;AAAA,mBAAA;AAAA,kBANK,CAAA,EAAG,CAAA,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,IAC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AAA;AAAA,oBACA,UAAA,CAAW,GAAA,CAAI,CAAC,EAAA,KAAe;AAC9B,sBAAA,MAAM,IAAA,GAAO,KAAA,CAAM,OAAA,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":"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;
|
|
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
|
@@ -604,6 +604,14 @@ interface DependencyGraphProps<NodeData, EdgeData> extends SVGProps<SVGSVGElemen
|
|
|
604
604
|
* Default: 'grow'
|
|
605
605
|
*/
|
|
606
606
|
fit?: 'grow' | 'contain';
|
|
607
|
+
/**
|
|
608
|
+
* Controls if user can toggle fullscreen mode
|
|
609
|
+
*
|
|
610
|
+
* @remarks
|
|
611
|
+
*
|
|
612
|
+
* Default: true
|
|
613
|
+
*/
|
|
614
|
+
allowFullscreen?: boolean;
|
|
607
615
|
}
|
|
608
616
|
/**
|
|
609
617
|
* 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 '
|
|
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":"
|
|
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;;;;"}
|
package/dist/translation.esm.js
CHANGED
|
@@ -99,6 +99,9 @@ const coreComponentsTranslationRef = createTranslationRef({
|
|
|
99
99
|
buttonText: "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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AAU,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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EAAY;AAAA;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.
|
|
3
|
+
"version": "0.17.6-next.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": "
|
|
70
|
-
"@backstage/core-plugin-api": "
|
|
71
|
-
"@backstage/errors": "
|
|
72
|
-
"@backstage/theme": "
|
|
73
|
-
"@backstage/version-bridge": "
|
|
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",
|
|
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": "
|
|
110
|
-
"@backstage/cli": "
|
|
111
|
-
"@backstage/core-app-api": "
|
|
112
|
-
"@backstage/test-utils": "
|
|
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",
|
|
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",
|