@techdocs/cli 1.14.1-next.0 → 1.14.1-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/embedded-app/.config-schema.json +99 -123
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/{123.eca4d2d6c144.chunk.js → 123.45e40c5d70dc.chunk.js} +2 -2
- package/dist/embedded-app/static/{123.eca4d2d6c144.chunk.js.map → 123.45e40c5d70dc.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1659.767eec7c12e4.chunk.js → 1659.865be4aaaafb.chunk.js} +2 -2
- package/dist/embedded-app/static/{1659.767eec7c12e4.chunk.js.map → 1659.865be4aaaafb.chunk.js.map} +1 -1
- package/dist/embedded-app/static/1749.b4483b4e2bb6.chunk.js +2 -0
- package/dist/embedded-app/static/1749.b4483b4e2bb6.chunk.js.map +1 -0
- package/dist/embedded-app/static/1767.6e4cbc9c9d27.chunk.js +2 -0
- package/dist/embedded-app/static/1767.6e4cbc9c9d27.chunk.js.map +1 -0
- package/dist/embedded-app/static/1994.38d3dd466d30.chunk.js +2 -0
- package/dist/embedded-app/static/1994.38d3dd466d30.chunk.js.map +1 -0
- package/dist/embedded-app/static/2295.dda08612a0e4.chunk.js +5 -0
- package/dist/embedded-app/static/2295.dda08612a0e4.chunk.js.map +1 -0
- package/dist/embedded-app/static/2339.4b6211cd2e17.chunk.js +2 -0
- package/dist/embedded-app/static/2339.4b6211cd2e17.chunk.js.map +1 -0
- package/dist/embedded-app/static/2360.e30d0a827f1b.chunk.js +2 -0
- package/dist/embedded-app/static/2360.e30d0a827f1b.chunk.js.map +1 -0
- package/dist/embedded-app/static/{2668.70ce80bd9574.chunk.js → 2668.420a5986c298.chunk.js} +2 -2
- package/dist/embedded-app/static/{2668.70ce80bd9574.chunk.js.map → 2668.420a5986c298.chunk.js.map} +1 -1
- package/dist/embedded-app/static/3306.ebe1d57e1ee8.chunk.js +2 -0
- package/dist/embedded-app/static/3306.ebe1d57e1ee8.chunk.js.map +1 -0
- package/dist/embedded-app/static/{3554.aaaad1cae741.chunk.js → 3554.3dc8d75e4b1f.chunk.js} +2 -2
- package/dist/embedded-app/static/{3554.aaaad1cae741.chunk.js.map → 3554.3dc8d75e4b1f.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4587.f031cac4f3d3.chunk.js → 4587.51c2cef24263.chunk.js} +2 -2
- package/dist/embedded-app/static/{4587.f031cac4f3d3.chunk.js.map → 4587.51c2cef24263.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4609.7159e7b45bd3.chunk.js → 4609.59cdb7eef90d.chunk.js} +3 -3
- package/dist/embedded-app/static/4609.59cdb7eef90d.chunk.js.map +1 -0
- package/dist/embedded-app/static/4648.71cc1dd433d0.chunk.js +2 -0
- package/dist/embedded-app/static/4648.71cc1dd433d0.chunk.js.map +1 -0
- package/dist/embedded-app/static/6138.4babe9cc6492.chunk.js +2 -0
- package/dist/embedded-app/static/6138.4babe9cc6492.chunk.js.map +1 -0
- package/dist/embedded-app/static/{6206.6f592cc4a4bf.chunk.js → 6206.a6dc0414494f.chunk.js} +2 -2
- package/dist/embedded-app/static/{6206.6f592cc4a4bf.chunk.js.map → 6206.a6dc0414494f.chunk.js.map} +1 -1
- package/dist/embedded-app/static/6949.d6860e77e10c.chunk.js +4 -0
- package/dist/embedded-app/static/6949.d6860e77e10c.chunk.js.map +1 -0
- package/dist/embedded-app/static/698.6389c3faa0bb.chunk.js +2 -0
- package/dist/embedded-app/static/698.6389c3faa0bb.chunk.js.map +1 -0
- package/dist/embedded-app/static/7203.a37705ededb5.chunk.js +2 -0
- package/dist/embedded-app/static/7203.a37705ededb5.chunk.js.map +1 -0
- package/dist/embedded-app/static/7632.79234b81e968.chunk.js +2 -0
- package/dist/embedded-app/static/{7632.3917bed33d55.chunk.js.map → 7632.79234b81e968.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8125.d349a79d61b4.chunk.js → 8125.84952fcec739.chunk.js} +2 -2
- package/dist/embedded-app/static/{8125.d349a79d61b4.chunk.js.map → 8125.84952fcec739.chunk.js.map} +1 -1
- package/dist/embedded-app/static/9050.d056f544fb11.chunk.js +2 -0
- package/dist/embedded-app/static/9050.d056f544fb11.chunk.js.map +1 -0
- package/dist/embedded-app/static/9230.cf54b232ffd4.chunk.js +2 -0
- package/dist/embedded-app/static/9230.cf54b232ffd4.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.4513a8956ce8.js +2 -0
- package/dist/embedded-app/static/main.4513a8956ce8.js.map +1 -0
- package/dist/embedded-app/static/module-react-aria-components.ad458624f76c.js +2 -0
- package/dist/embedded-app/static/module-react-aria-components.ad458624f76c.js.map +1 -0
- package/dist/embedded-app/static/{runtime.39a00258842d.js → runtime.3d9231da678d.js} +2 -2
- package/dist/embedded-app/static/{runtime.39a00258842d.js.map → runtime.3d9231da678d.js.map} +1 -1
- package/dist/embedded-app/static/vendor.9c2d9a0c65bd.js +2 -0
- package/dist/embedded-app/static/vendor.9c2d9a0c65bd.js.map +1 -0
- package/dist/packages/techdocs-cli/package.json.cjs.js +1 -1
- package/package.json +9 -9
- package/dist/embedded-app/static/1435.8322a7d8da03.chunk.js +0 -2
- package/dist/embedded-app/static/1435.8322a7d8da03.chunk.js.map +0 -1
- package/dist/embedded-app/static/1749.f2783113f24a.chunk.js +0 -2
- package/dist/embedded-app/static/1749.f2783113f24a.chunk.js.map +0 -1
- package/dist/embedded-app/static/1767.9f5e3fa87f62.chunk.js +0 -2
- package/dist/embedded-app/static/1767.9f5e3fa87f62.chunk.js.map +0 -1
- package/dist/embedded-app/static/1994.72ee610866fc.chunk.js +0 -2
- package/dist/embedded-app/static/1994.72ee610866fc.chunk.js.map +0 -1
- package/dist/embedded-app/static/2295.6b18a59669de.chunk.js +0 -5
- package/dist/embedded-app/static/2295.6b18a59669de.chunk.js.map +0 -1
- package/dist/embedded-app/static/2360.e42caf382494.chunk.js +0 -2
- package/dist/embedded-app/static/2360.e42caf382494.chunk.js.map +0 -1
- package/dist/embedded-app/static/4609.7159e7b45bd3.chunk.js.map +0 -1
- package/dist/embedded-app/static/4648.3e2002550d64.chunk.js +0 -2
- package/dist/embedded-app/static/4648.3e2002550d64.chunk.js.map +0 -1
- package/dist/embedded-app/static/6138.dbcb4da44274.chunk.js +0 -2
- package/dist/embedded-app/static/6138.dbcb4da44274.chunk.js.map +0 -1
- package/dist/embedded-app/static/6949.839b3ea7bf41.chunk.js +0 -4
- package/dist/embedded-app/static/6949.839b3ea7bf41.chunk.js.map +0 -1
- package/dist/embedded-app/static/7203.7253fd38b5a8.chunk.js +0 -2
- package/dist/embedded-app/static/7203.7253fd38b5a8.chunk.js.map +0 -1
- package/dist/embedded-app/static/7632.3917bed33d55.chunk.js +0 -2
- package/dist/embedded-app/static/9050.eb172abfab76.chunk.js +0 -2
- package/dist/embedded-app/static/9050.eb172abfab76.chunk.js.map +0 -1
- package/dist/embedded-app/static/9230.30651d06697c.chunk.js +0 -2
- package/dist/embedded-app/static/9230.30651d06697c.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.7639b033499f.js +0 -2
- package/dist/embedded-app/static/main.7639b033499f.js.map +0 -1
- package/dist/embedded-app/static/module-micromark-core-commonmark.d049c8fc059e.js +0 -2
- package/dist/embedded-app/static/module-micromark-core-commonmark.d049c8fc059e.js.map +0 -1
- package/dist/embedded-app/static/module-parse5.94980036c2b0.js +0 -2
- package/dist/embedded-app/static/module-parse5.94980036c2b0.js.map +0 -1
- package/dist/embedded-app/static/module-react-aria-components.27a8b47829ea.js +0 -2
- package/dist/embedded-app/static/module-react-aria-components.27a8b47829ea.js.map +0 -1
- package/dist/embedded-app/static/vendor.f76bf913b1bd.js +0 -2
- package/dist/embedded-app/static/vendor.f76bf913b1bd.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["7632"],{6659(e,t,r){r.d(t,{DependencyGraph:()=>I});var n=r(31085),a=r(14041),i=r(37238),l=r(53373),s=r.n(l),d=r(45250),u=r(685),o=r(87397),c=r(41809),h=r(57586),f=r.n(h),m=r(12784),g=r.n(m),x=r(6033),p=r(22249),k=r(58837);let w=(0,k.A)(e=>({node:{fill:e.palette.primary.light,stroke:e.palette.primary.light},text:{fill:e.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function b({node:{id:e}}){let t=w(),[r,i]=(0,a.useState)(0),[l,s]=(0,a.useState)(0),d=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if(d.current){let{height:e,width:t}=d.current.getBBox();e=Math.round(e),t=Math.round(t),(e!==l||t!==r)&&(i(t),s(e))}},[r,l]);let u=r+20,o=l+20;return(0,n.jsxs)("g",{children:[(0,n.jsx)("rect",{className:t.node,width:u,height:o,rx:10}),(0,n.jsx)("text",{ref:d,className:t.text,y:o/2,x:u/2,textAnchor:"middle",alignmentBaseline:"middle",children:e})]})}let y=(0,p.default)(e=>({node:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),v=e=>(0,n.jsx)(b,{...e});function j({render:e=v,setNode:t,node:r}){let{width:i,height:l,x:s=0,y:d=0}=r,u=y(),o=(0,a.useRef)(null);return(0,a.useLayoutEffect)(()=>{if(o.current){let{height:e,width:n}=o.current.getBBox();e=Math.round(e),n=Math.round(n),(e!==l||n!==i)&&t(r.id,{...r,height:e,width:n})}},[r,i,l,t]),(0,n.jsx)("g",{ref:o,"data-testid":"node",className:u.node,transform:`translate(${s-i/2},${d-l/2})`,children:e({node:r})})}var M=r(42287),E=r(20644),B=r.n(E);let N="arrow-marker",$=(0,p.default)(e=>({text:{fill:e.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function S({edge:{label:e}}){let t=$();return(0,n.jsx)("text",{className:t.text,textAnchor:"middle",children:e})}let R=(0,p.default)(e=>({path:{strokeWidth:1.3,stroke:e.palette.textSubtle,fill:"none",transition:`${e.transitions.duration.shortest}ms`},label:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),D=e=>(0,n.jsx)(S,{...e});function A({render:e=D,setEdge:t,id:r,edge:i,curve:l,showArrowHeads:s}){let{x:d=0,y:u=0,width:o,height:c,points:h}=i,f=R(),m=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if(m.current){let{height:e,width:n}=m.current.getBBox();e=Math.round(e),n=Math.round(n),(e!==c||n!==o)&&t(r,{...i,height:e,width:n})}},[i,c,o,t,r]);let g="",x=(0,a.useMemo)(()=>M.line().x(e=>e.x).y(e=>e.y).curve(M[l]),[l]);return h&&(g=x(h.filter(e=>B()(e.x)&&B()(e.y)))||""),(0,n.jsxs)(n.Fragment,{children:[g&&(0,n.jsx)("path",{"data-testid":"edge",className:f.path,markerEnd:s?`url(#${N})`:void 0,d:g}),i.label?(0,n.jsx)("g",{ref:m,"data-testid":"label",className:f.label,transform:`translate(${d},${u})`,children:e({edge:i})}):null]})}var H=r(29365),C=r(25828),G=r(63988),L=r(14112),T=r(71677),W=r(89595),_=r(89332);let O=(0,k.A)(e=>({fullscreenButton:{position:"absolute",right:0},root:{overflow:"hidden",minHeight:"100%",minWidth:"100%"},fixedHeight:{maxHeight:"100%"},fullscreen:{backgroundColor:e.palette.background.paper}})),q="workspace",F="dependency-graph";function I(e){let{edges:t,nodes:r,renderNode:l,direction:h=x.D.Direction.TOP_BOTTOM,align:m,nodeMargin:p=50,edgeMargin:k=10,rankMargin:w=50,paddingX:b=0,paddingY:y=0,acyclicer:v,ranker:M=x.D.Ranker.NETWORK_SIMPLEX,labelPosition:E=x.D.LabelPosition.RIGHT,labelOffset:B=10,edgeRanks:$=1,edgeWeight:S=1,renderEdge:R,renderLabel:D,defs:I,zoom:P="enabled",curve:X="curveMonotoneX",showArrowHeads:z=!1,fit:K="grow",allowFullscreen:U=!0,...V}=e,Y=(0,c.default)(),[J,Q]=(0,a.useState)(100),[Z,ee]=(0,a.useState)(100),et=(0,L.V)(),er=O(),{t:en}=(0,W.i)(_.O),ea=(0,a.useRef)(new(f()).graphlib.Graph),[ei,el]=(0,a.useState)(ea.current.graph()?.width||0),[es,ed]=(0,a.useState)(ea.current.graph()?.height||0),[eu,eo]=(0,a.useState)([]),[ec,eh]=(0,a.useState)([]),[ef,em]=(0,a.useState)(!1),[eg,ex]=(0,a.useState)(!1),ep=(0,a.useRef)(!1),ek=(0,a.useRef)(!1),ew=(0,a.useRef)(0);(0,a.useEffect)(()=>{if(ef&&!eg){let e=requestAnimationFrame(()=>{ex(!0)});return()=>cancelAnimationFrame(e)}},[ef,eg]),(0,a.useEffect)(()=>{if(eu.length>0&&!ep.current){let e=setTimeout(()=>{ep.current||(ep.current=!0,em(!0))},500);return()=>clearTimeout(e)}},[eu]);let eb=Math.max(ei,J),ey=Math.max(es,Z),ev=(0,a.useRef)({containerWidth:J,containerHeight:Z,maxWidth:eb,maxHeight:ey});ev.current={containerWidth:J,containerHeight:Z,maxWidth:eb,maxHeight:ey};let[ej]=(0,i.A)(),eM=(0,d.once)(ej),eE="grow"!==K||et.active?"100%":ey,eB=(0,a.useMemo)(()=>g()(e=>{if(!e)return;eM(e);let t=e.querySelector(`svg#${F}`);if(!t)return;let r=o.Lt(t),n=o.Lt(t.getElementById(q));function a(){r.call(u.s_().scaleExtent([1,1/0]).on("zoom",e=>{let t=ev.current;e.transform.x=Math.min(0,Math.max(e.transform.x,t.maxWidth-t.maxWidth*e.transform.k)),e.transform.y=Math.min(0,Math.max(e.transform.y,t.maxHeight-t.maxHeight*e.transform.k)),n.attr("transform",e.transform)}))}"enabled"===P?a():"enable-on-click"===P&&r.on("click",()=>a());let{width:i,height:l}=e.getBoundingClientRect(),s=ev.current;s.containerWidth!==i&&i<=s.maxWidth&&Q(i),s.containerHeight!==l&&l<=s.maxHeight&&ee(l)},100),[eM,P]),eN=(0,a.useCallback)(()=>{let e=ea.current.nodes(),n=ea.current.edges();e.forEach(e=>{r.some(t=>t.id===e)||ea.current.removeNode(e)}),n.forEach(e=>{t.some(t=>t.from===e.v&&t.to===e.w)||ea.current.removeEdge(e.v,e.w)}),r.forEach(e=>{let t=ea.current.nodes().find(t=>e.id===t);if(t&&ea.current.node(t)){let{width:r,height:n,x:a,y:i}=ea.current.node(t);ea.current.setNode(t,{...e,width:r,height:n,x:a,y:i})}else ea.current.setNode(e.id,{...e,width:0,height:0})}),t.forEach(e=>{ea.current.setEdge(e.from,e.to,{...e,label:e.label,width:0,height:0,labelpos:E,labeloffset:B,weight:S,minlen:$})})},[t,r,E,B,S,$]),e$=(0,a.useMemo)(()=>g()(()=>{f().layout(ea.current);let{height:e,width:t}=ea.current.graph(),r=Math.max(0,e||0);if(el(Math.max(0,t||0)),ed(r),eo(ea.current.nodes()),eh(ea.current.edges()),!ep.current){let e=ea.current.nodes();e.length>0&&e.some(e=>{let t=ea.current.node(e);return t&&t.width>0&&t.height>0})&&(ew.current+=1),(ew.current>=2||0===e.length)&&(ep.current=!0,em(!0))}},250,{leading:!0}),[]);(0,a.useEffect)(()=>(ea.current.setGraph({rankdir:h,align:m,nodesep:p,edgesep:k,ranksep:w,marginx:b,marginy:y,acyclicer:v,ranker:M}),eN(),e$(),e$.cancel),[v,m,h,k,b,y,p,w,M,eN,e$]);let eS=(0,a.useCallback)((e,t)=>(ea.current.setNode(e,t),e$(),ep.current||ek.current||(ek.current=!0,queueMicrotask(()=>{ek.current=!1,e$.flush()})),ea.current),[e$]),eR=(0,a.useCallback)((e,t)=>(ea.current.setEdge(e,t),e$(),ea.current),[e$]);return(0,n.jsxs)(L.m,{handle:et,className:s()(et.active?er.fullscreen:er.root),children:[U&&(0,n.jsx)(T.Ay,{title:en("dependencyGraph.fullscreenTooltip"),children:(0,n.jsx)(H.A,{className:er.fullscreenButton,onClick:et.active?et.exit:et.enter,children:et.active?(0,n.jsx)(G.default,{}):(0,n.jsx)(C.default,{})})}),(0,n.jsx)("div",{ref:eB,style:{width:"100%",height:"100%",visibility:ef?"visible":"hidden"},children:(0,n.jsxs)("svg",{...V,width:"100%",height:eE,viewBox:`0 0 ${eb} ${ey}`,id:F,children:[(0,n.jsxs)("defs",{children:[(0,n.jsx)("marker",{id:N,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth",children:(0,n.jsx)("path",{fill:Y.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),I]}),!eg&&(0,n.jsx)("style",{children:`#${F} * { transition: none !important; }`}),(0,n.jsx)("g",{id:q,children:(0,n.jsxs)("svg",{width:ei,height:es,y:ey/2-es/2,x:eb/2-ei/2,viewBox:`0 0 ${ei} ${es}`,children:[ec.map(e=>{let t=ea.current.edge(e);return t?R?R({edge:t,id:e}):(0,n.jsx)(A,{id:e,setEdge:eR,render:D,edge:t,curve:X,showArrowHeads:z},`${e.v}-${e.w}`):null}),eu.map(e=>{let t=ea.current.node(e);return t?(0,n.jsx)(j,{setNode:eS,render:l,node:t},e):null})]})})]})})]})}}}]);
|
|
2
|
+
//# sourceMappingURL=7632.79234b81e968.chunk.js.map
|
package/dist/embedded-app/static/{7632.3917bed33d55.chunk.js.map → 7632.79234b81e968.chunk.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/7632.3917bed33d55.chunk.js","sources":["webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/DefaultNode.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/Node.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/constants.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/DefaultLabel.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/Edge.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/DependencyGraphContent.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 { useState, useRef, useLayoutEffect } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { DependencyGraphTypes as Types } from './types';\n\n/** @public */\nexport type DependencyGraphDefaultNodeClassKey = 'node' | 'text';\n\nconst useStyles = makeStyles(\n theme => ({\n node: {\n fill: theme.palette.primary.light,\n stroke: theme.palette.primary.light,\n },\n text: {\n fill: theme.palette.primary.contrastText,\n },\n }),\n { name: 'BackstageDependencyGraphDefaultNode' },\n);\n\n/** @public */\nexport function DefaultNode({ node: { id } }: Types.RenderNodeProps) {\n const classes = useStyles();\n const [width, setWidth] = useState(0);\n const [height, setHeight] = useState(0);\n const idRef = useRef<SVGTextElement | null>(null);\n\n useLayoutEffect(() => {\n // set the width to the length of the ID\n if (idRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n idRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setWidth(renderedWidth);\n setHeight(renderedHeight);\n }\n }\n }, [width, height]);\n\n const padding = 10;\n const paddedWidth = width + padding * 2;\n const paddedHeight = height + padding * 2;\n\n return (\n <g>\n <rect\n className={classes.node}\n width={paddedWidth}\n height={paddedHeight}\n rx={10}\n />\n <text\n ref={idRef}\n className={classes.text}\n y={paddedHeight / 2}\n x={paddedWidth / 2}\n textAnchor=\"middle\"\n alignmentBaseline=\"middle\"\n >\n {id}\n </text>\n </g>\n );\n}\n","/*\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 { useRef, useLayoutEffect } from 'react';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport { DefaultNode } from './DefaultNode';\nimport { DependencyGraphTypes as Types } from './types';\nimport { NODE_TEST_ID } from './constants';\nimport dagre from '@dagrejs/dagre';\n\n/** @public */\nexport type DependencyGraphNodeClassKey = 'node';\n\nconst useStyles = makeStyles(\n theme => ({\n node: {\n transition: `${theme.transitions.duration.shortest}ms`,\n },\n }),\n { name: 'BackstageDependencyGraphNode' },\n);\n\nexport type GraphNode<T> = dagre.Node<Types.DependencyNode<T>>;\n\nexport type NodeComponentProps<T> = {\n node: GraphNode<T>;\n render?: Types.RenderNodeFunction<T>;\n setNode: dagre.graphlib.Graph['setNode'];\n};\n\nconst renderDefault = (props: Types.RenderNodeProps) => (\n <DefaultNode {...props} />\n);\n\nexport function Node<T>({\n render = renderDefault,\n setNode,\n node,\n}: NodeComponentProps<T>) {\n const { width, height, x = 0, y = 0 } = node;\n const nodeProps: Types.DependencyNode<T> = node;\n const classes = useStyles();\n const nodeRef = useRef<SVGGElement | null>(null);\n\n useLayoutEffect(() => {\n // set the node width to the actual rendered width to properly layout graph\n if (nodeRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n nodeRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setNode(node.id, {\n ...node,\n height: renderedHeight,\n width: renderedWidth,\n });\n }\n }\n }, [node, width, height, setNode]);\n\n return (\n <g\n ref={nodeRef}\n data-testid={NODE_TEST_ID}\n className={classes.node}\n transform={`translate(${x - width / 2},${y - height / 2})`}\n >\n {render({ node: nodeProps })}\n </g>\n );\n}\n","/*\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 const ARROW_MARKER_ID = 'arrow-marker';\n\nexport const NODE_TEST_ID = 'node';\nexport const EDGE_TEST_ID = 'edge';\nexport const LABEL_TEST_ID = 'label';\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport { DependencyGraphTypes as Types } from './types';\n\n/** @public */\nexport type DependencyGraphDefaultLabelClassKey = 'text';\n\nconst useStyles = makeStyles(\n theme => ({\n text: {\n fill: theme.palette.textContrast,\n },\n }),\n { name: 'BackstageDependencyGraphDefaultLabel' },\n);\n\n/** @public */\nexport function DefaultLabel({ edge: { label } }: Types.RenderLabelProps) {\n const classes = useStyles();\n return (\n <text className={classes.text} textAnchor=\"middle\">\n {label}\n </text>\n );\n}\n","/*\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 { useRef, useLayoutEffect, useMemo } from 'react';\nimport * as d3Shape from 'd3-shape';\nimport isFinite from 'lodash/isFinite';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport { DependencyGraphTypes as Types } from './types';\nimport { ARROW_MARKER_ID, EDGE_TEST_ID, LABEL_TEST_ID } from './constants';\nimport { DefaultLabel } from './DefaultLabel';\nimport dagre from '@dagrejs/dagre';\n\n/* Based on: https://github.com/dagrejs/dagre/wiki#configuring-the-layout */\nexport type EdgeProperties = {\n label?: string;\n width?: number;\n height?: number;\n labeloffset?: number;\n labelpos?: Types.LabelPosition;\n minlen?: number;\n weight?: number;\n};\nexport type GraphEdge<T> = Types.DependencyEdge<T> &\n dagre.GraphEdge &\n EdgeProperties;\n\n/** @public */\nexport type DependencyGraphEdgeClassKey = 'path' | 'label';\n\nconst useStyles = makeStyles(\n theme => ({\n path: {\n strokeWidth: 1.3,\n stroke: theme.palette.textSubtle,\n fill: 'none',\n transition: `${theme.transitions.duration.shortest}ms`,\n },\n label: {\n transition: `${theme.transitions.duration.shortest}ms`,\n },\n }),\n { name: 'BackstageDependencyGraphEdge' },\n);\n\ntype EdgePoint = dagre.GraphEdge['points'][0];\n\n/** @public */\nexport type EdgeComponentProps<T = unknown> = {\n id: dagre.Edge;\n edge: GraphEdge<T>;\n render?: Types.RenderLabelFunction<T>;\n setEdge: (\n id: dagre.Edge,\n edge: Types.DependencyEdge<T>,\n ) => dagre.graphlib.Graph<{}>;\n curve: 'curveStepBefore' | 'curveMonotoneX';\n showArrowHeads?: boolean;\n};\n\nconst renderDefault = (props: Types.RenderLabelProps<unknown>) => (\n <DefaultLabel {...props} />\n);\n\nexport function Edge<EdgeData>({\n render = renderDefault,\n setEdge,\n id,\n edge,\n curve,\n showArrowHeads,\n}: EdgeComponentProps<EdgeData>) {\n const { x = 0, y = 0, width, height, points } = edge;\n const labelProps: Types.DependencyEdge<EdgeData> = edge;\n const classes = useStyles();\n\n const labelRef = useRef<SVGGElement>(null);\n\n useLayoutEffect(() => {\n // set the label width to the actual rendered width to properly layout graph\n if (labelRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n labelRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setEdge(id, {\n ...edge,\n height: renderedHeight,\n width: renderedWidth,\n });\n }\n }\n }, [edge, height, width, setEdge, id]);\n\n let path: string = '';\n\n const createPath = useMemo(\n () =>\n d3Shape\n .line<EdgePoint>()\n .x(d => d.x)\n .y(d => d.y)\n .curve(d3Shape[curve]),\n [curve],\n );\n\n if (points) {\n const finitePoints = points.filter(\n (point: EdgePoint) => isFinite(point.x) && isFinite(point.y),\n );\n path = createPath(finitePoints) || '';\n }\n\n return (\n <>\n {path && (\n <path\n data-testid={EDGE_TEST_ID}\n className={classes.path}\n markerEnd={showArrowHeads ? `url(#${ARROW_MARKER_ID})` : undefined}\n d={path}\n />\n )}\n {labelProps.label ? (\n <g\n ref={labelRef}\n data-testid={LABEL_TEST_ID}\n className={classes.label}\n transform={`translate(${x},${y})`}\n >\n {render({ edge: labelProps })}\n </g>\n ) : null}\n </>\n );\n}\n","/*\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 useMeasure from 'react-use/esm/useMeasure';\nimport classNames from 'classnames';\nimport { once } from 'lodash';\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 fullscreenButton: {\n position: 'absolute',\n right: 0,\n },\n root: {\n overflow: 'hidden',\n minHeight: '100%',\n minWidth: '100%',\n },\n fixedHeight: {\n maxHeight: '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:namespace) | direction}\n *\n * @remarks\n *\n * Default: `DependencyGraphTypes.Direction.TOP_BOTTOM`\n */\n direction?: Types.Direction;\n /**\n * Node {@link DependencyGraphTypes.(Alignment:namespace) | 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:namespace) | 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:namespace) | 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 edge rendering component\n */\n renderEdge?: Types.RenderEdgeFunction<EdgeData>;\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 renderEdge,\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 const [settled, setSettled] = useState(false);\n const [transitionsReady, setTransitionsReady] = useState(false);\n const settledRef = useRef(false);\n const pendingInitialFlush = useRef(false);\n const measuredLayoutCount = useRef(0);\n\n useEffect(() => {\n if (settled && !transitionsReady) {\n const frame = requestAnimationFrame(() => {\n setTransitionsReady(true);\n });\n return () => cancelAnimationFrame(frame);\n }\n return undefined;\n }, [settled, transitionsReady]);\n\n // Fallback: if getBBox() returns zero dimensions (e.g. in jsdom or hidden\n // containers), setNode is never called and the normal settlement path never\n // triggers. This timeout ensures the graph still becomes visible.\n useEffect(() => {\n if (graphNodes.length > 0 && !settledRef.current) {\n const timeout = setTimeout(() => {\n if (!settledRef.current) {\n settledRef.current = true;\n setSettled(true);\n }\n }, 500);\n return () => clearTimeout(timeout);\n }\n return undefined;\n }, [graphNodes]);\n\n const maxWidth = Math.max(graphWidth, containerWidth);\n const maxHeight = Math.max(graphHeight, containerHeight);\n\n const dimensionsRef = useRef({\n containerWidth,\n containerHeight,\n maxWidth,\n maxHeight,\n });\n dimensionsRef.current = {\n containerWidth,\n containerHeight,\n maxWidth,\n maxHeight,\n };\n\n const [_measureRef] = useMeasure();\n const measureRef = once(_measureRef);\n\n const scalableHeight =\n fit === 'grow' && !fullScreenHandle.active ? maxHeight : '100%';\n\n const containerRef = useMemo(\n () =>\n debounce((root: HTMLDivElement) => {\n if (!root) {\n return;\n }\n measureRef(root);\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 const dims = dimensionsRef.current;\n event.transform.x = Math.min(\n 0,\n Math.max(\n event.transform.x,\n dims.maxWidth - dims.maxWidth * event.transform.k,\n ),\n );\n event.transform.y = Math.min(\n 0,\n Math.max(\n event.transform.y,\n dims.maxHeight - dims.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 const dims = dimensionsRef.current;\n if (\n dims.containerWidth !== newContainerWidth &&\n newContainerWidth <= dims.maxWidth\n ) {\n setContainerWidth(newContainerWidth);\n }\n if (\n dims.containerHeight !== newContainerHeight &&\n newContainerHeight <= dims.maxHeight\n ) {\n setContainerHeight(newContainerHeight);\n }\n }, 100),\n [measureRef, 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 if (!settledRef.current) {\n const nodeIds = graph.current.nodes();\n const hasMeasuredNodes =\n nodeIds.length > 0 &&\n nodeIds.some(id => {\n const n = graph.current.node(id);\n return n && n.width > 0 && n.height > 0;\n });\n if (hasMeasuredNodes) {\n measuredLayoutCount.current += 1;\n }\n if (measuredLayoutCount.current >= 2 || nodeIds.length === 0) {\n settledRef.current = true;\n setSettled(true);\n }\n }\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 const setNode = useCallback(\n (id: string, node: Types.DependencyNode<NodeData>) => {\n graph.current.setNode(id, node);\n updateGraph();\n if (!settledRef.current && !pendingInitialFlush.current) {\n pendingInitialFlush.current = true;\n queueMicrotask(() => {\n pendingInitialFlush.current = false;\n updateGraph.flush();\n });\n }\n return graph.current;\n },\n [updateGraph],\n );\n\n const setEdge = useCallback(\n (id: dagre.Edge, edge: Types.DependencyEdge<EdgeData>) => {\n graph.current.setEdge(id, edge);\n updateGraph();\n return graph.current;\n },\n [updateGraph],\n );\n\n return (\n <FullScreen\n handle={fullScreenHandle}\n className={classNames(\n fullScreenHandle.active ? styles.fullscreen : styles.root,\n )}\n >\n {allowFullscreen && (\n <Tooltip title={t('dependencyGraph.fullscreenTooltip')}>\n <IconButton\n className={styles.fullscreenButton}\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 <div\n ref={containerRef}\n style={{\n width: '100%',\n height: '100%',\n visibility: settled ? 'visible' : 'hidden',\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 {!transitionsReady && (\n <style>{`#${DEPENDENCY_GRAPH_SVG} * { transition: none !important; }`}</style>\n )}\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 if (renderEdge) return renderEdge({ edge, id: e });\n\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 </div>\n </FullScreen>\n );\n}\n"],"names":["useStyles","makeStyles","theme","DefaultNode","id","classes","width","setWidth","useState","height","setHeight","idRef","useRef","useLayoutEffect","renderedHeight","renderedWidth","Math","paddedWidth","padding","paddedHeight","renderDefault","props","Node","render","setNode","node","x","y","nodeRef","NODE_TEST_ID","ARROW_MARKER_ID","DefaultLabel","label","Edge","setEdge","edge","curve","showArrowHeads","points","labelRef","path","createPath","useMemo","d3Shape","d","point","isFinite","EDGE_TEST_ID","undefined","labelProps","LABEL_TEST_ID","WORKSPACE_ID","DEPENDENCY_GRAPH_SVG","DependencyGraph","edges","nodes","renderNode","direction","Types","align","nodeMargin","edgeMargin","rankMargin","paddingX","paddingY","acyclicer","ranker","labelPosition","labelOffset","edgeRanks","edgeWeight","renderEdge","renderLabel","defs","zoom","fit","allowFullscreen","svgProps","useTheme","containerWidth","setContainerWidth","containerHeight","setContainerHeight","fullScreenHandle","useFullScreenHandle","styles","t","useTranslationRef","coreComponentsTranslationRef","graph","dagre","graphWidth","setGraphWidth","graphHeight","setGraphHeight","graphNodes","setGraphNodes","graphEdges","setGraphEdges","settled","setSettled","transitionsReady","setTransitionsReady","settledRef","pendingInitialFlush","measuredLayoutCount","useEffect","frame","requestAnimationFrame","cancelAnimationFrame","timeout","setTimeout","clearTimeout","maxWidth","maxHeight","dimensionsRef","_measureRef","useMeasure","measureRef","once","scalableHeight","containerRef","debounce","root","container","d3Selection","workspace","enableZoom","d3Zoom","Infinity","event","dims","newContainerWidth","newContainerHeight","setNodesAndEdges","useCallback","currentGraphNodes","currentGraphEdges","nodeId","e","existingNode","updateGraph","newHeight","nodeIds","hasMeasuredNodes","n","queueMicrotask","FullScreen","classNames","Tooltip","IconButton","FullscreenExitIcon","FullscreenIcon"],"mappings":"iVAuBA,IAAMA,EAAYC,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,EAChBC,AAAAA,GAAU,EACR,KAAM,CACJ,KAAMA,EAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CACjC,OAAQA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GAAIwG,CAAE,GAG9C,UAAC1G,EAAIA,CAEH,GAAI0G,EACJ,QAASzG,GACT,OAAQsC,EACR,KAAMrC,EACN,MAAOC,EACP,eAAgBC,C,EANX,CAAC,EAAEsG,EAAE,CAAC,CAAC,CAAC,EAAEA,EAAE,CAAC,CAAC,CAAC,EALN,IAcpB,GACC5C,GAAW,GAAG,CAAC,AAAC3F,IACf,IAAMqB,EAAOgE,GAAM,OAAO,CAAC,IAAI,CAACrF,UAChC,AAAKqB,EAEH,UAACH,EAAIA,CAEH,QAASE,GACT,OAAQgC,EACR,KAAM/B,C,EAHDrB,GAHS,IASpB,G,YAOd,C"}
|
|
1
|
+
{"version":3,"file":"static/7632.79234b81e968.chunk.js","sources":["webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/DefaultNode.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/Node.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/constants.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/DefaultLabel.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/Edge.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/DependencyGraph/DependencyGraphContent.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 { useState, useRef, useLayoutEffect } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { DependencyGraphTypes as Types } from './types';\n\n/** @public */\nexport type DependencyGraphDefaultNodeClassKey = 'node' | 'text';\n\nconst useStyles = makeStyles(\n theme => ({\n node: {\n fill: theme.palette.primary.light,\n stroke: theme.palette.primary.light,\n },\n text: {\n fill: theme.palette.primary.contrastText,\n },\n }),\n { name: 'BackstageDependencyGraphDefaultNode' },\n);\n\n/** @public */\nexport function DefaultNode({ node: { id } }: Types.RenderNodeProps) {\n const classes = useStyles();\n const [width, setWidth] = useState(0);\n const [height, setHeight] = useState(0);\n const idRef = useRef<SVGTextElement | null>(null);\n\n useLayoutEffect(() => {\n // set the width to the length of the ID\n if (idRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n idRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setWidth(renderedWidth);\n setHeight(renderedHeight);\n }\n }\n }, [width, height]);\n\n const padding = 10;\n const paddedWidth = width + padding * 2;\n const paddedHeight = height + padding * 2;\n\n return (\n <g>\n <rect\n className={classes.node}\n width={paddedWidth}\n height={paddedHeight}\n rx={10}\n />\n <text\n ref={idRef}\n className={classes.text}\n y={paddedHeight / 2}\n x={paddedWidth / 2}\n textAnchor=\"middle\"\n alignmentBaseline=\"middle\"\n >\n {id}\n </text>\n </g>\n );\n}\n","/*\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 { useRef, useLayoutEffect } from 'react';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport { DefaultNode } from './DefaultNode';\nimport { DependencyGraphTypes as Types } from './types';\nimport { NODE_TEST_ID } from './constants';\nimport dagre from '@dagrejs/dagre';\n\n/** @public */\nexport type DependencyGraphNodeClassKey = 'node';\n\nconst useStyles = makeStyles(\n theme => ({\n node: {\n transition: `${theme.transitions.duration.shortest}ms`,\n },\n }),\n { name: 'BackstageDependencyGraphNode' },\n);\n\nexport type GraphNode<T> = dagre.Node<Types.DependencyNode<T>>;\n\nexport type NodeComponentProps<T> = {\n node: GraphNode<T>;\n render?: Types.RenderNodeFunction<T>;\n setNode: dagre.graphlib.Graph['setNode'];\n};\n\nconst renderDefault = (props: Types.RenderNodeProps) => (\n <DefaultNode {...props} />\n);\n\nexport function Node<T>({\n render = renderDefault,\n setNode,\n node,\n}: NodeComponentProps<T>) {\n const { width, height, x = 0, y = 0 } = node;\n const nodeProps: Types.DependencyNode<T> = node;\n const classes = useStyles();\n const nodeRef = useRef<SVGGElement | null>(null);\n\n useLayoutEffect(() => {\n // set the node width to the actual rendered width to properly layout graph\n if (nodeRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n nodeRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setNode(node.id, {\n ...node,\n height: renderedHeight,\n width: renderedWidth,\n });\n }\n }\n }, [node, width, height, setNode]);\n\n return (\n <g\n ref={nodeRef}\n data-testid={NODE_TEST_ID}\n className={classes.node}\n transform={`translate(${x - width / 2},${y - height / 2})`}\n >\n {render({ node: nodeProps })}\n </g>\n );\n}\n","/*\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 const ARROW_MARKER_ID = 'arrow-marker';\n\nexport const NODE_TEST_ID = 'node';\nexport const EDGE_TEST_ID = 'edge';\nexport const LABEL_TEST_ID = 'label';\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport { DependencyGraphTypes as Types } from './types';\n\n/** @public */\nexport type DependencyGraphDefaultLabelClassKey = 'text';\n\nconst useStyles = makeStyles(\n theme => ({\n text: {\n fill: theme.palette.textContrast,\n },\n }),\n { name: 'BackstageDependencyGraphDefaultLabel' },\n);\n\n/** @public */\nexport function DefaultLabel({ edge: { label } }: Types.RenderLabelProps) {\n const classes = useStyles();\n return (\n <text className={classes.text} textAnchor=\"middle\">\n {label}\n </text>\n );\n}\n","/*\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 { useRef, useLayoutEffect, useMemo } from 'react';\nimport * as d3Shape from 'd3-shape';\nimport isFinite from 'lodash/isFinite';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport { DependencyGraphTypes as Types } from './types';\nimport { ARROW_MARKER_ID, EDGE_TEST_ID, LABEL_TEST_ID } from './constants';\nimport { DefaultLabel } from './DefaultLabel';\nimport dagre from '@dagrejs/dagre';\n\n/* Based on: https://github.com/dagrejs/dagre/wiki#configuring-the-layout */\nexport type EdgeProperties = {\n label?: string;\n width?: number;\n height?: number;\n labeloffset?: number;\n labelpos?: Types.LabelPosition;\n minlen?: number;\n weight?: number;\n};\nexport type GraphEdge<T> = Types.DependencyEdge<T> &\n dagre.GraphEdge &\n EdgeProperties;\n\n/** @public */\nexport type DependencyGraphEdgeClassKey = 'path' | 'label';\n\nconst useStyles = makeStyles(\n theme => ({\n path: {\n strokeWidth: 1.3,\n stroke: theme.palette.textSubtle,\n fill: 'none',\n transition: `${theme.transitions.duration.shortest}ms`,\n },\n label: {\n transition: `${theme.transitions.duration.shortest}ms`,\n },\n }),\n { name: 'BackstageDependencyGraphEdge' },\n);\n\ntype EdgePoint = dagre.GraphEdge['points'][0];\n\n/** @public */\nexport type EdgeComponentProps<T = unknown> = {\n id: dagre.Edge;\n edge: GraphEdge<T>;\n render?: Types.RenderLabelFunction<T>;\n setEdge: (\n id: dagre.Edge,\n edge: Types.DependencyEdge<T>,\n ) => dagre.graphlib.Graph<{}>;\n curve: 'curveStepBefore' | 'curveMonotoneX';\n showArrowHeads?: boolean;\n};\n\nconst renderDefault = (props: Types.RenderLabelProps<unknown>) => (\n <DefaultLabel {...props} />\n);\n\nexport function Edge<EdgeData>({\n render = renderDefault,\n setEdge,\n id,\n edge,\n curve,\n showArrowHeads,\n}: EdgeComponentProps<EdgeData>) {\n const { x = 0, y = 0, width, height, points } = edge;\n const labelProps: Types.DependencyEdge<EdgeData> = edge;\n const classes = useStyles();\n\n const labelRef = useRef<SVGGElement>(null);\n\n useLayoutEffect(() => {\n // set the label width to the actual rendered width to properly layout graph\n if (labelRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n labelRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setEdge(id, {\n ...edge,\n height: renderedHeight,\n width: renderedWidth,\n });\n }\n }\n }, [edge, height, width, setEdge, id]);\n\n let path: string = '';\n\n const createPath = useMemo(\n () =>\n d3Shape\n .line<EdgePoint>()\n .x(d => d.x)\n .y(d => d.y)\n .curve(d3Shape[curve]),\n [curve],\n );\n\n if (points) {\n const finitePoints = points.filter(\n (point: EdgePoint) => isFinite(point.x) && isFinite(point.y),\n );\n path = createPath(finitePoints) || '';\n }\n\n return (\n <>\n {path && (\n <path\n data-testid={EDGE_TEST_ID}\n className={classes.path}\n markerEnd={showArrowHeads ? `url(#${ARROW_MARKER_ID})` : undefined}\n d={path}\n />\n )}\n {labelProps.label ? (\n <g\n ref={labelRef}\n data-testid={LABEL_TEST_ID}\n className={classes.label}\n transform={`translate(${x},${y})`}\n >\n {render({ edge: labelProps })}\n </g>\n ) : null}\n </>\n );\n}\n","/*\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 useMeasure from 'react-use/esm/useMeasure';\nimport classNames from 'classnames';\nimport { once } from 'lodash';\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 fullscreenButton: {\n position: 'absolute',\n right: 0,\n },\n root: {\n overflow: 'hidden',\n minHeight: '100%',\n minWidth: '100%',\n },\n fixedHeight: {\n maxHeight: '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:namespace) | direction}\n *\n * @remarks\n *\n * Default: `DependencyGraphTypes.Direction.TOP_BOTTOM`\n */\n direction?: Types.Direction;\n /**\n * Node {@link DependencyGraphTypes.(Alignment:namespace) | 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:namespace) | 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:namespace) | 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 edge rendering component\n */\n renderEdge?: Types.RenderEdgeFunction<EdgeData>;\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 renderEdge,\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 const [settled, setSettled] = useState(false);\n const [transitionsReady, setTransitionsReady] = useState(false);\n const settledRef = useRef(false);\n const pendingInitialFlush = useRef(false);\n const measuredLayoutCount = useRef(0);\n\n useEffect(() => {\n if (settled && !transitionsReady) {\n const frame = requestAnimationFrame(() => {\n setTransitionsReady(true);\n });\n return () => cancelAnimationFrame(frame);\n }\n return undefined;\n }, [settled, transitionsReady]);\n\n // Fallback: if getBBox() returns zero dimensions (e.g. in jsdom or hidden\n // containers), setNode is never called and the normal settlement path never\n // triggers. This timeout ensures the graph still becomes visible.\n useEffect(() => {\n if (graphNodes.length > 0 && !settledRef.current) {\n const timeout = setTimeout(() => {\n if (!settledRef.current) {\n settledRef.current = true;\n setSettled(true);\n }\n }, 500);\n return () => clearTimeout(timeout);\n }\n return undefined;\n }, [graphNodes]);\n\n const maxWidth = Math.max(graphWidth, containerWidth);\n const maxHeight = Math.max(graphHeight, containerHeight);\n\n const dimensionsRef = useRef({\n containerWidth,\n containerHeight,\n maxWidth,\n maxHeight,\n });\n dimensionsRef.current = {\n containerWidth,\n containerHeight,\n maxWidth,\n maxHeight,\n };\n\n const [_measureRef] = useMeasure();\n const measureRef = once(_measureRef);\n\n const scalableHeight =\n fit === 'grow' && !fullScreenHandle.active ? maxHeight : '100%';\n\n const containerRef = useMemo(\n () =>\n debounce((root: HTMLDivElement) => {\n if (!root) {\n return;\n }\n measureRef(root);\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 const dims = dimensionsRef.current;\n event.transform.x = Math.min(\n 0,\n Math.max(\n event.transform.x,\n dims.maxWidth - dims.maxWidth * event.transform.k,\n ),\n );\n event.transform.y = Math.min(\n 0,\n Math.max(\n event.transform.y,\n dims.maxHeight - dims.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 const dims = dimensionsRef.current;\n if (\n dims.containerWidth !== newContainerWidth &&\n newContainerWidth <= dims.maxWidth\n ) {\n setContainerWidth(newContainerWidth);\n }\n if (\n dims.containerHeight !== newContainerHeight &&\n newContainerHeight <= dims.maxHeight\n ) {\n setContainerHeight(newContainerHeight);\n }\n }, 100),\n [measureRef, 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 if (!settledRef.current) {\n const nodeIds = graph.current.nodes();\n const hasMeasuredNodes =\n nodeIds.length > 0 &&\n nodeIds.some(id => {\n const n = graph.current.node(id);\n return n && n.width > 0 && n.height > 0;\n });\n if (hasMeasuredNodes) {\n measuredLayoutCount.current += 1;\n }\n if (measuredLayoutCount.current >= 2 || nodeIds.length === 0) {\n settledRef.current = true;\n setSettled(true);\n }\n }\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 const setNode = useCallback(\n (id: string, node: Types.DependencyNode<NodeData>) => {\n graph.current.setNode(id, node);\n updateGraph();\n if (!settledRef.current && !pendingInitialFlush.current) {\n pendingInitialFlush.current = true;\n queueMicrotask(() => {\n pendingInitialFlush.current = false;\n updateGraph.flush();\n });\n }\n return graph.current;\n },\n [updateGraph],\n );\n\n const setEdge = useCallback(\n (id: dagre.Edge, edge: Types.DependencyEdge<EdgeData>) => {\n graph.current.setEdge(id, edge);\n updateGraph();\n return graph.current;\n },\n [updateGraph],\n );\n\n return (\n <FullScreen\n handle={fullScreenHandle}\n className={classNames(\n fullScreenHandle.active ? styles.fullscreen : styles.root,\n )}\n >\n {allowFullscreen && (\n <Tooltip title={t('dependencyGraph.fullscreenTooltip')}>\n <IconButton\n className={styles.fullscreenButton}\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 <div\n ref={containerRef}\n style={{\n width: '100%',\n height: '100%',\n visibility: settled ? 'visible' : 'hidden',\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 {!transitionsReady && (\n <style>{`#${DEPENDENCY_GRAPH_SVG} * { transition: none !important; }`}</style>\n )}\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 if (renderEdge) return renderEdge({ edge, id: e });\n\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 </div>\n </FullScreen>\n );\n}\n"],"names":["useStyles","makeStyles","theme","DefaultNode","id","classes","width","setWidth","useState","height","setHeight","idRef","useRef","useLayoutEffect","renderedHeight","renderedWidth","Math","paddedWidth","padding","paddedHeight","renderDefault","props","Node","render","setNode","node","x","y","nodeRef","NODE_TEST_ID","ARROW_MARKER_ID","DefaultLabel","label","Edge","setEdge","edge","curve","showArrowHeads","points","labelRef","path","createPath","useMemo","d3Shape","d","point","isFinite","EDGE_TEST_ID","undefined","labelProps","LABEL_TEST_ID","WORKSPACE_ID","DEPENDENCY_GRAPH_SVG","DependencyGraph","edges","nodes","renderNode","direction","Types","align","nodeMargin","edgeMargin","rankMargin","paddingX","paddingY","acyclicer","ranker","labelPosition","labelOffset","edgeRanks","edgeWeight","renderEdge","renderLabel","defs","zoom","fit","allowFullscreen","svgProps","useTheme","containerWidth","setContainerWidth","containerHeight","setContainerHeight","fullScreenHandle","useFullScreenHandle","styles","t","useTranslationRef","coreComponentsTranslationRef","graph","dagre","graphWidth","setGraphWidth","graphHeight","setGraphHeight","graphNodes","setGraphNodes","graphEdges","setGraphEdges","settled","setSettled","transitionsReady","setTransitionsReady","settledRef","pendingInitialFlush","measuredLayoutCount","useEffect","frame","requestAnimationFrame","cancelAnimationFrame","timeout","setTimeout","clearTimeout","maxWidth","maxHeight","dimensionsRef","_measureRef","useMeasure","measureRef","once","scalableHeight","containerRef","debounce","root","container","d3Selection","workspace","enableZoom","d3Zoom","Infinity","event","dims","newContainerWidth","newContainerHeight","setNodesAndEdges","useCallback","currentGraphNodes","currentGraphEdges","nodeId","e","existingNode","updateGraph","newHeight","nodeIds","hasMeasuredNodes","n","queueMicrotask","FullScreen","classNames","Tooltip","IconButton","FullscreenExitIcon","FullscreenIcon"],"mappings":"+UAuBA,IAAMA,EAAYC,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,EAChBC,AAAAA,GAAU,EACR,KAAM,CACJ,KAAMA,EAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CACjC,OAAQA,EAAM,OAAO,CAAC,OAAO,CAAC,KAAK,AACrC,EACA,KAAM,CACJ,KAAMA,EAAM,OAAO,CAAC,OAAO,CAAC,YAAY,AAC1C,CACF,GACA,CAAE,KAAM,qCAAsC,GAIzC,SAASC,EAAY,CAAE,KAAM,CAAEC,GAAAA,CAAE,CAAE,CAAyB,EACjE,IAAMC,EAAUL,IACV,CAACM,EAAOC,EAAS,CAAGC,AAAAA,GAAAA,EAAAA,QAAAA,AAAAA,EAAS,GAC7B,CAACC,EAAQC,EAAU,CAAGF,AAAAA,GAAAA,EAAAA,QAAAA,AAAAA,EAAS,GAC/BG,EAAQC,AAAAA,GAAAA,EAAAA,MAAAA,AAAAA,EAA8B,MAE5CC,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ict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["8125"],{23127(e,t,r){var a=r(4293),l=r(78920);t.default=void 0;var s=l(r(14041));t.default=(0,a(r(74044)).default)(s.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"Language")},26438(e,t,r){r.d(t,{wL:()=>x,aR:()=>f,Zp:()=>b,bw:()=>g});var a=r(31085),l=r(14041),s=r(57873),i=r(
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["8125"],{23127(e,t,r){var a=r(4293),l=r(78920);t.default=void 0;var s=l(r(14041));t.default=(0,a(r(74044)).default)(s.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"Language")},26438(e,t,r){r.d(t,{wL:()=>x,aR:()=>f,Zp:()=>b,bw:()=>g});var a=r(31085),l=r(14041),s=r(57873),i=r(75661),n=r(48119);let o={"bui-Card":"vwbKbDh04mMaiBi3","bui-CardHeader":"XFUmGkj6WID_JnEz","bui-CardBody":"bDKBEHaUGVdvGxpS","bui-CardFooter":"htqU_uAkxL89C8of","bui-CardTrigger":"YH9iVtgxrw5b0cYJ","bui-card-body-shadow":"bJ7HlUi_25Q2Dxr7"},d=(0,n.p)()({styles:o,classNames:{root:"bui-Card",trigger:"bui-CardTrigger"},propDefs:{children:{},className:{},onPress:{},href:{},label:{},target:{},rel:{},download:{},style:{}},utilityProps:["grow","shrink","basis"]}),c=(0,n.p)()({styles:o,classNames:{root:"bui-CardHeader"},propDefs:{children:{},className:{}}}),m=(0,n.p)()({styles:o,classNames:{root:"bui-CardBody"},propDefs:{children:{},className:{}}}),u=(0,n.p)()({styles:o,classNames:{root:"bui-CardFooter"},propDefs:{children:{},className:{}}});var p=r(13408),h=r(12860);let b=(0,l.forwardRef)((e,t)=>{let{ownProps:r,restProps:n,dataAttributes:o,utilityStyle:c}=(0,i.Z)(d,e),{classes:m,children:u,onPress:b,href:f,label:g,target:x,rel:y,download:v}=r,j=!!(b||f),N=(0,l.useRef)(null),k=(0,l.useCallback)(e=>{if(!j||!N.current||N.current.contains(e.target))return;let t=e.target,r=t instanceof Element?t:t?.parentElement;r?.closest('a[href],button,input,select,textarea,[role="button"],[role="link"],[tabindex]:not([tabindex="-1"])')||window.getSelection()?.toString()||N.current.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,altKey:e.altKey}))},[j]);return(0,a.jsxs)(p.a,{as:"article",bg:"neutral",ref:t,className:m.root,"data-interactive":j||void 0,...o,...n,onClick:j?k:void 0,style:{...c,...r.style},children:[f&&(0,a.jsx)(h.N,{ref:N,className:m.trigger,href:f,target:x,rel:y,download:v,"aria-label":g}),b&&!f&&(0,a.jsx)(s.$,{ref:N,className:m.trigger,onPress:b,"aria-label":g}),u]})});b.displayName="Card";let f=(0,l.forwardRef)((e,t)=>{let{ownProps:r,restProps:l}=(0,i.Z)(c,e),{classes:s,children:n}=r;return(0,a.jsx)("div",{ref:t,className:s.root,...l,children:n})});f.displayName="CardHeader";let g=(0,l.forwardRef)((e,t)=>{let{ownProps:r,restProps:l}=(0,i.Z)(m,e),{classes:s,children:n}=r;return(0,a.jsx)("div",{ref:t,className:s.root,...l,children:n})});g.displayName="CardBody";let x=(0,l.forwardRef)((e,t)=>{let{ownProps:r,restProps:l}=(0,i.Z)(u,e),{classes:s,children:n}=r;return(0,a.jsx)("div",{ref:t,className:s.root,...l,children:n})});x.displayName="CardFooter"},32386(e,t,r){r.d(t,{x:()=>c});var a=r(31085),l=r(14041),s=r(75661),i=r(48119);let n={"bui-Grid":"lOUUwZ1G_vYgdngG"},o=(0,i.p)()({styles:n,classNames:{root:"bui-Grid"},bg:"provider",propDefs:{bg:{dataAttribute:!0},children:{},className:{},style:{}},utilityProps:["columns","gap","m","mb","ml","mr","mt","mx","my","p","pb","pl","pr","pt","px","py","grow","shrink","basis"]}),d=(0,i.p)()({styles:n,classNames:{root:"bui-GridItem"},bg:"provider",propDefs:{bg:{dataAttribute:!0},children:{},className:{},style:{}},utilityProps:["colSpan","colEnd","colStart","rowSpan"]}),c={Root:(0,l.forwardRef)((e,t)=>{let{ownProps:r,dataAttributes:l,utilityStyle:i,restProps:n}=(0,s.Z)(o,{columns:"auto",gap:"4",...e}),{classes:d,childrenWithBgProvider:c}=r;return(0,a.jsx)("div",{ref:t,className:d.root,style:{...i,...r.style},...l,...n,children:c})}),Item:(0,l.forwardRef)((e,t)=>{let{ownProps:r,dataAttributes:l,utilityStyle:i,restProps:n}=(0,s.Z)(d,e),{classes:o,childrenWithBgProvider:c}=r;return(0,a.jsx)("div",{ref:t,className:o.root,style:{...i,...r.style},...l,...n,children:c})})}},25390(e,t,r){r.d(t,{o:()=>m});var a=r(31085),l=r(26438),s=r(73880),i=r(69749),n=r(58837),o=r(53373),d=r.n(o);let c=(0,n.A)({root:{height:"100%"},title:{minWidth:0,overflow:"hidden"},footer:{display:"flex",justifyContent:"flex-end"}});function m(e){let{title:t,headerActions:r,footerActions:n,children:o,className:m}=e,u=c();return(0,a.jsxs)(l.Zp,{className:d()(u.root,m),children:[t&&(0,a.jsx)(l.aR,{children:(0,a.jsxs)(s.s,{justify:"between",align:"center",children:[(0,a.jsx)(i.E,{as:"h3",variant:"title-x-small",weight:"bold",className:u.title,children:t}),r&&(0,a.jsx)(s.s,{align:"center",gap:"1",children:r})]})}),(0,a.jsx)(l.bw,{children:o}),n&&(0,a.jsx)(l.wL,{className:u.footer,children:n})]})}},75836(e,t,r){r.d(t,{m:()=>h});var a=r(31085),l=r(32386),s=r(77125),i=r(72501),n=r(58837),o=r(23127),d=r(60603);let c=(0,n.A)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function m(e){let{href:t,text:r,Icon:l}=e,n=c();return(0,a.jsxs)(s.A,{display:"flex",children:[(0,a.jsx)(s.A,{mr:1,className:n.svgIcon,children:(0,a.jsx)(i.A,{component:"div",children:l?(0,a.jsx)(l,{}):(0,a.jsx)(o.default,{})})}),(0,a.jsx)(s.A,{flexGrow:"1",children:(0,a.jsx)(d.N_,{to:t,target:"_blank",rel:"noopener",children:r||t})})]})}var u=r(5893);let p={xs:1,sm:1,md:1,lg:2,xl:3};function h(e){let{items:t,cols:r}=e,s=function(e){let t=[(0,u.A)(e=>e.breakpoints.up("xl"))?"xl":null,(0,u.A)(e=>e.breakpoints.up("lg"))?"lg":null,(0,u.A)(e=>e.breakpoints.up("md"))?"md":null,(0,u.A)(e=>e.breakpoints.up("sm"))?"sm":null,(0,u.A)(e=>e.breakpoints.up("xs"))?"xs":null],r=1;if("number"==typeof e)r=e;else{let a=t.find(e=>null!==e)??"xs";r=e?.[a]??p[a]}return r}(r);return(0,a.jsx)(l.x.Root,{columns:String(Math.min(Math.max(s,1),12)),gap:"2",children:t.map(({text:e,href:t,Icon:r},l)=>(0,a.jsx)(m,{href:t,text:e??t,Icon:r},l))})}},27516(e,t,r){r.d(t,{EntityLinksCard:()=>x});var a=r(31085),l=r(22845),s=r(25390),i=r(23127),n=r(64947),o=r(72501),d=r(58837),c=r(4809),m=r(89595),u=r(50010);let p=`metadata:
|
|
2
2
|
name: example
|
|
3
3
|
links:
|
|
4
4
|
- url: https://dashboard.example.com
|
|
5
5
|
title: My Dashboard
|
|
6
6
|
icon: dashboard`,h=(0,d.A)(e=>({code:{borderRadius:6,margin:e.spacing(2,0),background:"dark"===e.palette.type?"#444":e.palette.common.white}}),{name:"PluginCatalogEntityLinksEmptyState"});function b(){let e=h(),{t}=(0,m.i)(u.W);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{variant:"body1",children:t("entityLinksCard.emptyDescription")}),(0,a.jsx)("div",{className:e.code,children:(0,a.jsx)(c.z,{text:p,language:"yaml",showLineNumbers:!0,highlightedNumbers:[3,4,5,6],customStyle:{background:"inherit",fontSize:"115%"}})}),(0,a.jsx)(n.A,{variant:"contained",color:"primary",target:"_blank",href:"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional",children:t("entityLinksCard.readMoreButtonTitle")})]})}var f=r(75836),g=r(91189);let x=e=>{let{cols:t}=e,{entity:r}=(0,l.tN)(),n=(0,g.n)(),{t:o}=(0,m.i)(u.W),d=r?.metadata?.links;return(0,a.jsx)(s.o,{title:o("entityLinksCard.title"),children:d&&0!==d.length?(0,a.jsx)(f.m,{cols:t,items:d.map(({url:e,title:t,icon:r})=>({text:t??e,href:e,Icon:r?n.getSystemIcon(r)??i.default:i.default}))}):(0,a.jsx)(b,{})})}}}]);
|
|
7
|
-
//# sourceMappingURL=8125.
|
|
7
|
+
//# sourceMappingURL=8125.84952fcec739.chunk.js.map
|
package/dist/embedded-app/static/{8125.d349a79d61b4.chunk.js.map → 8125.84952fcec739.chunk.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/8125.d349a79d61b4.chunk.js","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/Language.js","webpack://techdocs-cli-embedded-app/../ui/src/components/Card/Card.module.css?7524","webpack://techdocs-cli-embedded-app/../ui/src/components/Card/definition.ts","webpack://techdocs-cli-embedded-app/../ui/src/components/Card/Card.tsx","webpack://techdocs-cli-embedded-app/../ui/src/components/Grid/Grid.module.css?1013","webpack://techdocs-cli-embedded-app/../ui/src/components/Grid/definition.ts","webpack://techdocs-cli-embedded-app/../ui/src/components/Grid/Grid.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityInfoCard/EntityInfoCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksEmptyState.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z\"\n}), 'Language');\n\nexports.default = _default;","// extracted by css-extract-rspack-plugin\nexport default {\"bui-Card\":\"vwbKbDh04mMaiBi3\",\"bui-CardHeader\":\"XFUmGkj6WID_JnEz\",\"bui-CardBody\":\"bDKBEHaUGVdvGxpS\",\"bui-CardFooter\":\"htqU_uAkxL89C8of\",\"bui-CardTrigger\":\"YH9iVtgxrw5b0cYJ\",\"bui-card-body-shadow\":\"bJ7HlUi_25Q2Dxr7\"};","/*\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 */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n CardOwnProps,\n CardHeaderOwnProps,\n CardBodyOwnProps,\n CardFooterOwnProps,\n} from './types';\nimport styles from './Card.module.css';\n\n/**\n * Component definition for Card\n * @public\n */\nexport const CardDefinition = defineComponent<CardOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Card',\n trigger: 'bui-CardTrigger',\n },\n propDefs: {\n children: {},\n className: {},\n onPress: {},\n href: {},\n label: {},\n target: {},\n rel: {},\n download: {},\n style: {},\n },\n utilityProps: ['grow', 'shrink', 'basis'],\n});\n\n/**\n * Component definition for CardHeader\n * @public\n */\nexport const CardHeaderDefinition = defineComponent<CardHeaderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardHeader',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardBody\n * @public\n */\nexport const CardBodyDefinition = defineComponent<CardBodyOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardBody',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardFooter\n * @public\n */\nexport const CardFooterDefinition = defineComponent<CardFooterOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardFooter',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n","/*\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 */\n\nimport { forwardRef, useCallback, useRef } from 'react';\nimport { Button as RAButton } from 'react-aria-components';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n CardDefinition,\n CardHeaderDefinition,\n CardBodyDefinition,\n CardFooterDefinition,\n} from './definition';\nimport type {\n CardProps,\n CardHeaderProps,\n CardBodyProps,\n CardFooterProps,\n} from './types';\nimport { Box } from '../Box/Box';\nimport { Link } from '../Link';\n\nconst INTERACTIVE_ELEMENT_SELECTOR =\n 'a[href],button,input,select,textarea,[role=\"button\"],[role=\"link\"],[tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * Card component.\n *\n * @public\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition(\n CardDefinition,\n props,\n );\n const {\n classes,\n children,\n onPress,\n href,\n label,\n target: linkTarget,\n rel,\n download,\n } = ownProps;\n const isInteractive = !!(onPress || href);\n\n const triggerRef = useRef<HTMLAnchorElement | HTMLButtonElement>(null);\n\n const handleClick = useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (!isInteractive || !triggerRef.current) return;\n\n // Don't delegate if the click target is the trigger itself\n if (triggerRef.current.contains(e.target as Node)) return;\n\n // Don't delegate if the user clicked a nested interactive element\n const targetNode = e.target as Node | null;\n const targetElement =\n targetNode instanceof Element ? targetNode : targetNode?.parentElement;\n if (targetElement?.closest(INTERACTIVE_ELEMENT_SELECTOR)) return;\n\n // Don't delegate if the user is selecting text\n if (window.getSelection()?.toString()) return;\n\n triggerRef.current.dispatchEvent(\n new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n shiftKey: e.shiftKey,\n altKey: e.altKey,\n }),\n );\n },\n [isInteractive],\n );\n\n return (\n <Box\n as=\"article\"\n bg=\"neutral\"\n ref={ref}\n className={classes.root}\n data-interactive={isInteractive || undefined}\n {...dataAttributes}\n {...restProps}\n onClick={isInteractive ? handleClick : undefined}\n style={{ ...utilityStyle, ...ownProps.style }}\n >\n {href && (\n <Link\n ref={triggerRef as React.Ref<HTMLAnchorElement>}\n className={classes.trigger}\n href={href}\n target={linkTarget}\n rel={rel}\n download={download}\n aria-label={label}\n />\n )}\n {onPress && !href && (\n <RAButton\n ref={triggerRef as React.Ref<HTMLButtonElement>}\n className={classes.trigger}\n onPress={onPress}\n aria-label={label}\n />\n )}\n {children}\n </Box>\n );\n});\n\nCard.displayName = 'Card';\n\n/**\n * CardHeader component.\n *\n * @public\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardHeaderDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardHeader.displayName = 'CardHeader';\n\n/**\n * CardBody component.\n *\n * @public\n */\nexport const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardBodyDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardBody.displayName = 'CardBody';\n\n/**\n * CardFooter component.\n *\n * @public\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardFooterDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardFooter.displayName = 'CardFooter';\n","// extracted by css-extract-rspack-plugin\nexport default {\"bui-Grid\":\"lOUUwZ1G_vYgdngG\"};","/*\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 */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { GridOwnProps, GridItemOwnProps } from './types';\nimport styles from './Grid.module.css';\n\n/**\n * Component definition for Grid\n * @public\n */\nexport const GridDefinition = defineComponent<GridOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Grid',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'columns',\n 'gap',\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n 'grow',\n 'shrink',\n 'basis',\n ],\n});\n\n/**\n * Component definition for GridItem\n * @public\n */\nexport const GridItemDefinition = defineComponent<GridItemOwnProps>()({\n styles,\n classNames: {\n root: 'bui-GridItem',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: ['colSpan', 'colEnd', 'colStart', 'rowSpan'],\n});\n","/*\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 */\n\nimport { forwardRef } from 'react';\nimport type { GridItemProps, GridProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { GridDefinition, GridItemDefinition } from './definition';\n\nconst GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {\n const { ownProps, dataAttributes, utilityStyle, restProps } = useDefinition(\n GridDefinition,\n { columns: 'auto', gap: '4', ...props },\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <div\n ref={ref}\n className={classes.root}\n style={{ ...utilityStyle, ...ownProps.style }}\n {...dataAttributes}\n {...restProps}\n >\n {childrenWithBgProvider}\n </div>\n );\n});\n\nconst GridItem = forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {\n const { ownProps, dataAttributes, utilityStyle, restProps } = useDefinition(\n GridItemDefinition,\n props,\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <div\n ref={ref}\n className={classes.root}\n style={{ ...utilityStyle, ...ownProps.style }}\n {...dataAttributes}\n {...restProps}\n >\n {childrenWithBgProvider}\n </div>\n );\n});\n\n/** @public */\nexport const Grid = {\n Root: GridRoot,\n Item: GridItem,\n};\n","/*\n * Copyright 2026 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 { ReactNode } from 'react';\nimport {\n Card,\n CardHeader,\n CardBody,\n CardFooter,\n Text,\n Flex,\n} from '@backstage/ui';\nimport { makeStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\n\nconst useStyles = makeStyles({\n root: {\n height: '100%',\n },\n title: {\n minWidth: 0,\n overflow: 'hidden',\n },\n footer: {\n display: 'flex',\n justifyContent: 'flex-end',\n },\n});\n\n/** @public */\nexport interface EntityInfoCardProps {\n title?: ReactNode;\n headerActions?: ReactNode;\n footerActions?: ReactNode;\n children?: ReactNode;\n className?: string;\n}\n\n/** @public */\nexport function EntityInfoCard(props: EntityInfoCardProps) {\n const { title, headerActions, footerActions, children, className } = props;\n const classes = useStyles();\n\n return (\n <Card className={classNames(classes.root, className)}>\n {title && (\n <CardHeader>\n <Flex justify=\"between\" align=\"center\">\n <Text\n as=\"h3\"\n variant=\"title-x-small\"\n weight=\"bold\"\n className={classes.title}\n >\n {title}\n </Text>\n {headerActions && (\n <Flex align=\"center\" gap=\"1\">\n {headerActions}\n </Flex>\n )}\n </Flex>\n </CardHeader>\n )}\n <CardBody>{children}</CardBody>\n {footerActions && (\n <CardFooter className={classes.footer}>{footerActions}</CardFooter>\n )}\n </Card>\n );\n}\n","/*\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 Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport { Link } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport function IconLink(props: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n <Box display=\"flex\">\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n {Icon ? <Icon /> : <LanguageIcon />}\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={href} target=\"_blank\" rel=\"noopener\">\n {text || href}\n </Link>\n </Box>\n </Box>\n );\n}\n","/*\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 useMediaQuery from '@material-ui/core/useMediaQuery';\nimport { Theme } from '@material-ui/core/styles';\nimport { Breakpoint, ColumnBreakpoints } from './types';\n\nconst colDefaults: ColumnBreakpoints = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols: ColumnBreakpoints | number | undefined,\n): number {\n const matches: (Breakpoint | null)[] = [\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\n}\n","/*\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 { Grid, type Columns } from '@backstage/ui';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <Grid.Root\n columns={String(Math.min(Math.max(numOfCols, 1), 12)) as Columns}\n gap=\"2\"\n >\n {items.map(({ text, href, Icon }, i) => (\n <IconLink key={i} href={href} text={text ?? href} Icon={Icon} />\n ))}\n </Grid.Root>\n );\n}\n","/*\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 Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { CodeSnippet } from '@backstage/core-components';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogTranslationRef } from '../../alpha/translation';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\nexport type EntityLinksEmptyStateClassKey = 'code';\n\nconst useStyles = makeStyles(\n theme => ({\n code: {\n borderRadius: 6,\n margin: theme.spacing(2, 0),\n background:\n theme.palette.type === 'dark' ? '#444' : theme.palette.common.white,\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n return (\n <>\n <Typography variant=\"body1\">\n {t('entityLinksCard.emptyDescription')}\n </Typography>\n <div className={classes.code}>\n <CodeSnippet\n text={ENTITY_YAML}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n </div>\n <Button\n variant=\"contained\"\n color=\"primary\"\n target=\"_blank\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\"\n >\n {t('entityLinksCard.readMoreButtonTitle')}\n </Button>\n </>\n );\n}\n","/*\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 { useEntity, EntityInfoCard } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\nimport { ColumnBreakpoints } from './types';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogTranslationRef } from '../../alpha/translation';\n\n/** @public */\nexport interface EntityLinksCardProps {\n cols?: ColumnBreakpoints | number;\n}\n\nexport const EntityLinksCard = (props: EntityLinksCardProps) => {\n const { cols = undefined } = props;\n const { entity } = useEntity();\n const app = useApp();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n <EntityInfoCard title={t('entityLinksCard.title')}>\n {!links || links.length === 0 ? (\n <EntityLinksEmptyState />\n ) : (\n <LinksGridList\n cols={cols}\n items={links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n }))}\n />\n )}\n </EntityInfoCard>\n );\n};\n"],"names":["r","CardDefinition","defineComponent","styles","CardHeaderDefinition","CardBodyDefinition","CardFooterDefinition","Card","forwardRef","props","ref","ownProps","restProps","dataAttributes","utilityStyle","useDefinition","classes","children","onPress","href","label","linkTarget","rel","download","isInteractive","triggerRef","useRef","handleClick","useCallback","e","targetNode","targetElement","Element","window","MouseEvent","Box","undefined","Link","RAButton","CardHeader","CardBody","CardFooter","GridDefinition","GridItemDefinition","Grid","childrenWithBgProvider","useStyles","makeStyles","EntityInfoCard","title","headerActions","footerActions","className","classNames","Flex","Text","IconLink","text","Icon","Typography","LanguageIcon","colDefaults","LinksGridList","items","cols","numOfCols","useDynamicColumns","matches","useMediaQuery","theme","breakpoint","k","String","Math","i","ENTITY_YAML","EntityLinksEmptyState","t","useTranslationRef","catalogTranslationRef","CodeSnippet","Button","EntityLinksCard","entity","useEntity","app","useApp","links","url","icon","key"],"mappings":"sIAEA,IAAI,EAAyBA,EAAQ,MAEjC,EAA0BA,EAAQ,MAKtC,UAAe,CAAG,KAAK,EAEvB,IAAI,EAAQ,EAAwBA,EAAQ,OAQ5C,UAAe,CAJA,AAAC,GAAG,AAFE,EAAuBA,EAAQ,QAElB,OAAO,AAAD,EAAiB,EAAM,aAAa,CAAC,OAAQ,CACnF,EAAG,2yBACL,GAAI,W,uHChBJ,MAAe,CAAC,WAAW,mBAAmB,iBAAiB,mBAAmB,eAAe,mBAAmB,iBAAiB,mBAAmB,kBAAkB,mBAAmB,uBAAuB,kBAAkB,EC4BzNC,EAAiBC,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,IAAgC,CAC5DC,OAAMA,EACN,WAAY,CACV,KAAM,WACN,QAAS,iBACX,EACA,SAAU,CACR,SAAU,CAAC,EACX,UAAW,CAAC,EACZ,QAAS,CAAC,EACV,KAAM,CAAC,EACP,MAAO,CAAC,EACR,OAAQ,CAAC,EACT,IAAK,CAAC,EACN,SAAU,CAAC,EACX,MAAO,CAAC,CACV,EACA,aAAc,CAAC,OAAQ,SAAU,QAAQ,AAC3C,GAMaC,EAAuBF,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,IAAsC,CACxEC,OAAMA,EACN,WAAY,CACV,KAAM,gBACR,EACA,SAAU,CACR,SAAU,CAAC,EACX,UAAW,CAAC,CACd,CACF,GAMaE,EAAqBH,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,IAAoC,CACpEC,OAAMA,EACN,WAAY,CACV,KAAM,cACR,EACA,SAAU,CACR,SAAU,CAAC,EACX,UAAW,CAAC,CACd,CACF,GAMaG,EAAuBJ,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,IAAsC,CACxEC,OAAMA,EACN,WAAY,CACV,KAAM,gBACR,EACA,SAAU,CACR,SAAU,CAAC,EACX,UAAW,CAAC,CACd,C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A,CAAAA,CACZ,KAAME,EACN,MAAOuB,EAAM,GAAG,CAAC,CAAC,CAAEC,IAAAA,CAAG,CAAEvC,MAAAA,CAAK,CAAEwC,KAAAA,CAAI,CAAE,GAAM,EAC1C,KAAMxC,GAASuC,EACf,KAAMA,EACN,KAdRE,AAc2BD,EAdrBJ,EAAI,aAAa,CAcII,IAdK7B,EAAAA,OAAYA,CAAGA,EAAAA,OAAYA,AAerD,G,GARF,UAACgB,EAAqBA,CAAAA,E,EAa9B,C"}
|
|
1
|
+
{"version":3,"file":"static/8125.84952fcec739.chunk.js","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/Language.js","webpack://techdocs-cli-embedded-app/../ui/src/components/Card/Card.module.css?7524","webpack://techdocs-cli-embedded-app/../ui/src/components/Card/definition.ts","webpack://techdocs-cli-embedded-app/../ui/src/components/Card/Card.tsx","webpack://techdocs-cli-embedded-app/../ui/src/components/Grid/Grid.module.css?1013","webpack://techdocs-cli-embedded-app/../ui/src/components/Grid/definition.ts","webpack://techdocs-cli-embedded-app/../ui/src/components/Grid/Grid.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityInfoCard/EntityInfoCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksEmptyState.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z\"\n}), 'Language');\n\nexports.default = _default;","// extracted by css-extract-rspack-plugin\nexport default {\"bui-Card\":\"vwbKbDh04mMaiBi3\",\"bui-CardHeader\":\"XFUmGkj6WID_JnEz\",\"bui-CardBody\":\"bDKBEHaUGVdvGxpS\",\"bui-CardFooter\":\"htqU_uAkxL89C8of\",\"bui-CardTrigger\":\"YH9iVtgxrw5b0cYJ\",\"bui-card-body-shadow\":\"bJ7HlUi_25Q2Dxr7\"};","/*\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 */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n CardOwnProps,\n CardHeaderOwnProps,\n CardBodyOwnProps,\n CardFooterOwnProps,\n} from './types';\nimport styles from './Card.module.css';\n\n/**\n * Component definition for Card\n * @public\n */\nexport const CardDefinition = defineComponent<CardOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Card',\n trigger: 'bui-CardTrigger',\n },\n propDefs: {\n children: {},\n className: {},\n onPress: {},\n href: {},\n label: {},\n target: {},\n rel: {},\n download: {},\n style: {},\n },\n utilityProps: ['grow', 'shrink', 'basis'],\n});\n\n/**\n * Component definition for CardHeader\n * @public\n */\nexport const CardHeaderDefinition = defineComponent<CardHeaderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardHeader',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardBody\n * @public\n */\nexport const CardBodyDefinition = defineComponent<CardBodyOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardBody',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardFooter\n * @public\n */\nexport const CardFooterDefinition = defineComponent<CardFooterOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardFooter',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n","/*\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 */\n\nimport { forwardRef, useCallback, useRef } from 'react';\nimport { Button as RAButton } from 'react-aria-components';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n CardDefinition,\n CardHeaderDefinition,\n CardBodyDefinition,\n CardFooterDefinition,\n} from './definition';\nimport type {\n CardProps,\n CardHeaderProps,\n CardBodyProps,\n CardFooterProps,\n} from './types';\nimport { Box } from '../Box/Box';\nimport { Link } from '../Link';\n\nconst INTERACTIVE_ELEMENT_SELECTOR =\n 'a[href],button,input,select,textarea,[role=\"button\"],[role=\"link\"],[tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * Card component.\n *\n * @public\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition(\n CardDefinition,\n props,\n );\n const {\n classes,\n children,\n onPress,\n href,\n label,\n target: linkTarget,\n rel,\n download,\n } = ownProps;\n const isInteractive = !!(onPress || href);\n\n const triggerRef = useRef<HTMLAnchorElement | HTMLButtonElement>(null);\n\n const handleClick = useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (!isInteractive || !triggerRef.current) return;\n\n // Don't delegate if the click target is the trigger itself\n if (triggerRef.current.contains(e.target as Node)) return;\n\n // Don't delegate if the user clicked a nested interactive element\n const targetNode = e.target as Node | null;\n const targetElement =\n targetNode instanceof Element ? targetNode : targetNode?.parentElement;\n if (targetElement?.closest(INTERACTIVE_ELEMENT_SELECTOR)) return;\n\n // Don't delegate if the user is selecting text\n if (window.getSelection()?.toString()) return;\n\n triggerRef.current.dispatchEvent(\n new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n shiftKey: e.shiftKey,\n altKey: e.altKey,\n }),\n );\n },\n [isInteractive],\n );\n\n return (\n <Box\n as=\"article\"\n bg=\"neutral\"\n ref={ref}\n className={classes.root}\n data-interactive={isInteractive || undefined}\n {...dataAttributes}\n {...restProps}\n onClick={isInteractive ? handleClick : undefined}\n style={{ ...utilityStyle, ...ownProps.style }}\n >\n {href && (\n <Link\n ref={triggerRef as React.Ref<HTMLAnchorElement>}\n className={classes.trigger}\n href={href}\n target={linkTarget}\n rel={rel}\n download={download}\n aria-label={label}\n />\n )}\n {onPress && !href && (\n <RAButton\n ref={triggerRef as React.Ref<HTMLButtonElement>}\n className={classes.trigger}\n onPress={onPress}\n aria-label={label}\n />\n )}\n {children}\n </Box>\n );\n});\n\nCard.displayName = 'Card';\n\n/**\n * CardHeader component.\n *\n * @public\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardHeaderDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardHeader.displayName = 'CardHeader';\n\n/**\n * CardBody component.\n *\n * @public\n */\nexport const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardBodyDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardBody.displayName = 'CardBody';\n\n/**\n * CardFooter component.\n *\n * @public\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardFooterDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardFooter.displayName = 'CardFooter';\n","// extracted by css-extract-rspack-plugin\nexport default {\"bui-Grid\":\"lOUUwZ1G_vYgdngG\"};","/*\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 */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { GridOwnProps, GridItemOwnProps } from './types';\nimport styles from './Grid.module.css';\n\n/**\n * Component definition for Grid\n * @public\n */\nexport const GridDefinition = defineComponent<GridOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Grid',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'columns',\n 'gap',\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n 'grow',\n 'shrink',\n 'basis',\n ],\n});\n\n/**\n * Component definition for GridItem\n * @public\n */\nexport const GridItemDefinition = defineComponent<GridItemOwnProps>()({\n styles,\n classNames: {\n root: 'bui-GridItem',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: ['colSpan', 'colEnd', 'colStart', 'rowSpan'],\n});\n","/*\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 */\n\nimport { forwardRef } from 'react';\nimport type { GridItemProps, GridProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { GridDefinition, GridItemDefinition } from './definition';\n\nconst GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {\n const { ownProps, dataAttributes, utilityStyle, restProps } = useDefinition(\n GridDefinition,\n { columns: 'auto', gap: '4', ...props },\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <div\n ref={ref}\n className={classes.root}\n style={{ ...utilityStyle, ...ownProps.style }}\n {...dataAttributes}\n {...restProps}\n >\n {childrenWithBgProvider}\n </div>\n );\n});\n\nconst GridItem = forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {\n const { ownProps, dataAttributes, utilityStyle, restProps } = useDefinition(\n GridItemDefinition,\n props,\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <div\n ref={ref}\n className={classes.root}\n style={{ ...utilityStyle, ...ownProps.style }}\n {...dataAttributes}\n {...restProps}\n >\n {childrenWithBgProvider}\n </div>\n );\n});\n\n/** @public */\nexport const Grid = {\n Root: GridRoot,\n Item: GridItem,\n};\n","/*\n * Copyright 2026 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 { ReactNode } from 'react';\nimport {\n Card,\n CardHeader,\n CardBody,\n CardFooter,\n Text,\n Flex,\n} from '@backstage/ui';\nimport { makeStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\n\nconst useStyles = makeStyles({\n root: {\n height: '100%',\n },\n title: {\n minWidth: 0,\n overflow: 'hidden',\n },\n footer: {\n display: 'flex',\n justifyContent: 'flex-end',\n },\n});\n\n/** @public */\nexport interface EntityInfoCardProps {\n title?: ReactNode;\n headerActions?: ReactNode;\n footerActions?: ReactNode;\n children?: ReactNode;\n className?: string;\n}\n\n/** @public */\nexport function EntityInfoCard(props: EntityInfoCardProps) {\n const { title, headerActions, footerActions, children, className } = props;\n const classes = useStyles();\n\n return (\n <Card className={classNames(classes.root, className)}>\n {title && (\n <CardHeader>\n <Flex justify=\"between\" align=\"center\">\n <Text\n as=\"h3\"\n variant=\"title-x-small\"\n weight=\"bold\"\n className={classes.title}\n >\n {title}\n </Text>\n {headerActions && (\n <Flex align=\"center\" gap=\"1\">\n {headerActions}\n </Flex>\n )}\n </Flex>\n </CardHeader>\n )}\n <CardBody>{children}</CardBody>\n {footerActions && (\n <CardFooter className={classes.footer}>{footerActions}</CardFooter>\n )}\n </Card>\n );\n}\n","/*\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 Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport { Link } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport function IconLink(props: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n <Box display=\"flex\">\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n {Icon ? <Icon /> : <LanguageIcon />}\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={href} target=\"_blank\" rel=\"noopener\">\n {text || href}\n </Link>\n </Box>\n </Box>\n );\n}\n","/*\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 useMediaQuery from '@material-ui/core/useMediaQuery';\nimport { Theme } from '@material-ui/core/styles';\nimport { Breakpoint, ColumnBreakpoints } from './types';\n\nconst colDefaults: ColumnBreakpoints = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols: ColumnBreakpoints | number | undefined,\n): number {\n const matches: (Breakpoint | null)[] = [\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\n}\n","/*\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 { Grid, type Columns } from '@backstage/ui';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <Grid.Root\n columns={String(Math.min(Math.max(numOfCols, 1), 12)) as Columns}\n gap=\"2\"\n >\n {items.map(({ text, href, Icon }, i) => (\n <IconLink key={i} href={href} text={text ?? href} Icon={Icon} />\n ))}\n </Grid.Root>\n );\n}\n","/*\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 Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { CodeSnippet } from '@backstage/core-components';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogTranslationRef } from '../../alpha/translation';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\nexport type EntityLinksEmptyStateClassKey = 'code';\n\nconst useStyles = makeStyles(\n theme => ({\n code: {\n borderRadius: 6,\n margin: theme.spacing(2, 0),\n background:\n theme.palette.type === 'dark' ? '#444' : theme.palette.common.white,\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n return (\n <>\n <Typography variant=\"body1\">\n {t('entityLinksCard.emptyDescription')}\n </Typography>\n <div className={classes.code}>\n <CodeSnippet\n text={ENTITY_YAML}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n </div>\n <Button\n variant=\"contained\"\n color=\"primary\"\n target=\"_blank\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\"\n >\n {t('entityLinksCard.readMoreButtonTitle')}\n </Button>\n </>\n );\n}\n","/*\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 { useEntity, EntityInfoCard } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\nimport { ColumnBreakpoints } from './types';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogTranslationRef } from '../../alpha/translation';\n\n/** @public */\nexport interface EntityLinksCardProps {\n cols?: ColumnBreakpoints | number;\n}\n\nexport const EntityLinksCard = (props: EntityLinksCardProps) => {\n const { cols = undefined } = props;\n const { entity } = useEntity();\n const app = useApp();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n <EntityInfoCard title={t('entityLinksCard.title')}>\n {!links || links.length === 0 ? (\n <EntityLinksEmptyState />\n ) : (\n <LinksGridList\n cols={cols}\n items={links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n }))}\n />\n )}\n </EntityInfoCard>\n );\n};\n"],"names":["r","CardDefinition","defineComponent","styles","CardHeaderDefinition","CardBodyDefinition","CardFooterDefinition","Card","forwardRef","props","ref","ownProps","restProps","dataAttributes","utilityStyle","useDefinition","classes","children","onPress","href","label","linkTarget","rel","download","isInteractive","triggerRef","useRef","handleClick","useCallback","e","targetNode","targetElement","Element","window","MouseEvent","Box","undefined","Link","RAButton","CardHeader","CardBody","CardFooter","GridDefinition","GridItemDefinition","Grid","childrenWithBgProvider","useStyles","makeStyles","EntityInfoCard","title","headerActions","footerActions","className","classNames","Flex","Text","IconLink","text","Icon","Typography","LanguageIcon","colDefaults","LinksGridList","items","cols","numOfCols","useDynamicColumns","matches","useMediaQuery","theme","breakpoint","k","String","Math","i","ENTITY_YAML","EntityLinksEmptyState","t","useTranslationRef","catalogTranslationRef","CodeSnippet","Button","EntityLinksCard","entity","useEntity","app","useApp","links","url","icon","key"],"mappings":"sIAEA,IAAI,EAAyBA,EAAQ,MAEjC,EAA0BA,EAAQ,MAKtC,UAAe,CAAG,KAAK,EAEvB,IAAI,EAAQ,EAAwBA,EAAQ,OAQ5C,UAAe,CAJA,AAAC,GAAG,AAFE,EAAuBA,EAAQ,QAElB,OAAO,AAAD,EAAiB,EAAM,aAAa,CAAC,OAAQ,CACnF,EAAG,2yBACL,GAAI,W,uHChBJ,MAAe,CAAC,WAAW,mBAAmB,iBAAiB,mBAAmB,eAAe,mBAAmB,iBAAiB,mBAAmB,kBAAkB,mBAAmB,uBAAuB,kBAAkB,EC4BzNC,EAAiBC,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA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