@techdocs/cli 1.10.2 → 1.10.3-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/embedded-app/.config-schema.json +145 -145
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/1155.1bc918a1.chunk.js +10 -0
- package/dist/embedded-app/static/{1155.c6c120ba.chunk.js.map → 1155.1bc918a1.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1335.e649d01a.chunk.js → 1335.d9759037.chunk.js} +2 -2
- package/dist/embedded-app/static/{1335.e649d01a.chunk.js.map → 1335.d9759037.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1749.ecaae025.chunk.js → 1749.aa6bc589.chunk.js} +2 -2
- package/dist/embedded-app/static/{1749.ecaae025.chunk.js.map → 1749.aa6bc589.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1994.90be16c3.chunk.js → 1994.ca9d4fc1.chunk.js} +2 -2
- package/dist/embedded-app/static/{1994.90be16c3.chunk.js.map → 1994.ca9d4fc1.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2295.676254a6.chunk.js → 2295.3f44c986.chunk.js} +2 -2
- package/dist/embedded-app/static/{2295.676254a6.chunk.js.map → 2295.3f44c986.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4591.c7904e2c.chunk.js → 4591.5aa5d796.chunk.js} +2 -2
- package/dist/embedded-app/static/{4591.c7904e2c.chunk.js.map → 4591.5aa5d796.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4648.42e253c5.chunk.js → 4648.68d2c6ff.chunk.js} +2 -2
- package/dist/embedded-app/static/{4648.42e253c5.chunk.js.map → 4648.68d2c6ff.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{5574.3e0b1b01.chunk.js → 5574.723a5e64.chunk.js} +2 -2
- package/dist/embedded-app/static/{5574.3e0b1b01.chunk.js.map → 5574.723a5e64.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7203.f047878f.chunk.js → 6138.ca5f4dea.chunk.js} +2 -2
- package/dist/embedded-app/static/{6138.72f63616.chunk.js.map → 6138.ca5f4dea.chunk.js.map} +1 -1
- package/dist/embedded-app/static/6270.33cbf043.chunk.js +2 -0
- package/dist/embedded-app/static/{6270.0cf24ebb.chunk.js.map → 6270.33cbf043.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7186.96e6edf9.chunk.js +2 -0
- package/dist/embedded-app/static/{7186.c0fa7899.chunk.js.map → 7186.96e6edf9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6138.72f63616.chunk.js → 7203.7288c4e0.chunk.js} +2 -2
- package/dist/embedded-app/static/{7203.f047878f.chunk.js.map → 7203.7288c4e0.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7226.99db194a.chunk.js +2 -0
- package/dist/embedded-app/static/{7226.f8fc7544.chunk.js.map → 7226.99db194a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{7382.688a734f.chunk.js → 7382.836db1c7.chunk.js} +2 -2
- package/dist/embedded-app/static/{7382.688a734f.chunk.js.map → 7382.836db1c7.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7526.601d8e47.chunk.js +2 -0
- package/dist/embedded-app/static/{7526.a9e2aca8.chunk.js.map → 7526.601d8e47.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8125.d73ed16d.chunk.js → 8125.2e82046f.chunk.js} +3 -3
- package/dist/embedded-app/static/{8125.d73ed16d.chunk.js.map → 8125.2e82046f.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9050.47091371.chunk.js → 9050.1b486cae.chunk.js} +2 -2
- package/dist/embedded-app/static/{9050.47091371.chunk.js.map → 9050.1b486cae.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9230.57f4ae14.chunk.js → 9230.02b12ff0.chunk.js} +2 -2
- package/dist/embedded-app/static/{9230.57f4ae14.chunk.js.map → 9230.02b12ff0.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9579.46a875e3.chunk.js → 9579.beaea584.chunk.js} +2 -2
- package/dist/embedded-app/static/{9579.46a875e3.chunk.js.map → 9579.beaea584.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.9f641a04.js +550 -0
- package/dist/embedded-app/static/main.9f641a04.js.map +1 -0
- package/dist/embedded-app/static/{runtime.1ed9627a.js → runtime.89b37e56.js} +2 -2
- package/dist/embedded-app/static/{runtime.1ed9627a.js.map → runtime.89b37e56.js.map} +1 -1
- package/dist/package.json.cjs.js +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/1155.c6c120ba.chunk.js +0 -10
- package/dist/embedded-app/static/6270.0cf24ebb.chunk.js +0 -2
- package/dist/embedded-app/static/7186.c0fa7899.chunk.js +0 -2
- package/dist/embedded-app/static/7226.f8fc7544.chunk.js +0 -2
- package/dist/embedded-app/static/7526.a9e2aca8.chunk.js +0 -2
- package/dist/embedded-app/static/main.a9a0a87c.js +0 -550
- package/dist/embedded-app/static/main.a9a0a87c.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["6138"],{52235:function(e,t,n){var i=n(4293),a=n(78920);t.default=void 0;var o=a(n(14041));t.default=(0,i(n(74044)).default)(o.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward")},98557:function(e,t,n){n.d(t,{M:()=>l});var i=n(31085),a=n(58837),o=n(71677),s=n(72501);let r=(0,a.A)({container:{overflow:"visible !important"},typo:{fontSize:"inherit",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":({line:e})=>e||1,"-webkit-box-orient":"vertical"}},{name:"BackstageOverflowTooltip"});function l(e){let t=r(e);return(0,i.jsx)(o.Ay,{title:e.title??(e.text||""),placement:e.placement,children:(0,i.jsx)(s.A,{className:t.typo,variant:"inherit",children:e.text})})}},89439:function(e,t,n){n.d(t,{n:()=>R});var i=n(31085),a=n(40703),o=n(59469),s=n(48653),r=n(45685),l=n(37197),c=n(58837),d=n(24568),m=n(53373),u=n.n(m),p=n(9720),y=n(72501),h=n(52235),f=n(60603);let g=(0,c.A)(e=>({root:{maxWidth:"fit-content",padding:e.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:e.palette.textSubtle},arrow:{color:e.palette.textSubtle}}),{name:"BackstageBottomLink"});function x(e){let{link:t,title:n,onClick:a}=e,o=g();return(0,i.jsxs)(p.A,{children:[(0,i.jsx)(l.A,{}),(0,i.jsx)(f.N_,{to:t,onClick:a,underline:"none",children:(0,i.jsxs)(p.A,{display:"flex",alignItems:"center",className:o.root,children:[(0,i.jsx)(p.A,{className:o.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,i.jsx)(y.A,{children:(0,i.jsx)("strong",{children:n})})}),(0,i.jsx)(h.default,{className:o.arrow})]})})]})}var C=n(14041),b=n(45463),v=n(60691),j=n(89332),w=n(55994);let E=e=>{let{slackChannel:t}=e,{t:n}=(0,w.i)(j.O);return t?"string"==typeof t?(0,i.jsx)(y.A,{children:n("errorBoundary.title",{slackChannel:t})}):t.href?(0,i.jsx)(b.z,{to:t.href,variant:"contained",children:t.name}):(0,i.jsx)(y.A,{children:n("errorBoundary.title",{slackChannel:t.name})}):null},A=class extends C.Component{constructor(e){super(e),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(e,t){console.error(`ErrorBoundary, error: ${e}`,{error:e,errorInfo:t}),this.setState({error:e,errorInfo:t})}render(){let{slackChannel:e,children:t}=this.props,{error:n}=this.state;return n?(0,i.jsx)(v.b,{title:"Something Went Wrong",error:n,children:(0,i.jsx)(E,{slackChannel:e})}):t}},T=(0,c.A)(e=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},contentAlignBottom:{display:"flex",alignItems:"self-end"},header:{padding:e.spacing(2,2,2,2.5)},headerTitle:{fontWeight:e.typography.fontWeightBold},headerSubheader:{paddingTop:e.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),k=(0,d.A)(e=>({root:{display:"inline-block",padding:e.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(o.A),S={flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px",breakInside:"avoid-page","@media print":{height:"auto"}}},L={fullHeight:{flex:1},gridItem:{flex:1}};function R(e){let{title:t,subheader:n,divider:c=!0,deepLink:d,slackChannel:m,errorBoundaryProps:p,variant:y,alignContent:h="normal",children:f,headerStyle:g,headerProps:C,icon:b,action:v,actionsClassName:j,actions:w,cardClassName:E,actionsTopRight:R,className:M,noPadding:N,titleTypographyProps:B,subheaderTypographyProps:O}=e,D=T(),K={},I={};return y&&y.split(/[\s]+/g).forEach(e=>{K={...K,...S[e]},I={...I,...L[e]}}),(0,i.jsx)(a.A,{style:K,className:M,children:(0,i.jsxs)(A,{...p||(m?{slackChannel:m}:{}),children:[t&&(0,i.jsx)(r.A,{classes:{root:u()(D.header),title:D.headerTitle,subheader:D.headerSubheader,avatar:D.headerAvatar,action:D.headerAction,content:D.headerContent},title:t,subheader:n||b?(0,i.jsxs)("div",{"data-testid":"info-card-subheader",children:[n&&(0,i.jsx)("div",{className:D.subheader,children:n}),b]}):null,action:v,style:{...g},titleTypographyProps:B,subheaderTypographyProps:O,...C}),R&&(0,i.jsx)(k,{children:R}),c&&(0,i.jsx)(l.A,{}),(0,i.jsx)(s.A,{className:u()(E,{[D.noPadding]:N,[D.contentAlignBottom]:"bottom"===h}),style:I,children:f}),w&&(0,i.jsx)(o.A,{className:j,children:w}),d&&(0,i.jsx)(x,{...d})]})})}},65671:function(e,t,n){n.d(t,{s:()=>g});var i=n(31085),a=n(58837),o=n(96403),s=n(98557),r=n(53320),l=n(7537),c=n(76025),d=n(53987),m=n(19857);let u=Object.freeze({createEntityRefColumn(e){let{defaultKind:t}=e;function n(e){return e.metadata?.title||(0,l.S)(e,{defaultKind:t})}return{title:(0,i.jsx)(m.g,{translationKey:"name"}),highlight:!0,customFilterAndSearch:(e,t)=>n(t).includes(e),customSort:(e,t)=>n(e).localeCompare(n(t)),render:e=>(0,i.jsx)(c.z,{entityRef:e,defaultKind:t,title:e.metadata?.title})}},createEntityRelationColumn(e){let{title:t,relation:n,defaultKind:a,filter:o}=e;function s(e){return(0,r.t)(e,n,o)}function c(e){return s(e).map(e=>(0,l.S)(e,{defaultKind:a})).join(", ")}return{title:t,customFilterAndSearch:(e,t)=>c(t).includes(e),customSort:(e,t)=>c(e).localeCompare(c(t)),render:e=>(0,i.jsx)(d.i,{entityRefs:s(e),defaultKind:a})}},createOwnerColumn(){return this.createEntityRelationColumn({title:(0,i.jsx)(m.g,{translationKey:"owner"}),relation:o.vv,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:(0,i.jsx)(m.g,{translationKey:"domain"}),relation:o.jn,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:(0,i.jsx)(m.g,{translationKey:"system"}),relation:o.jn,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn:()=>({title:(0,i.jsx)(m.g,{translationKey:"description"}),field:"metadata.description",render:e=>(0,i.jsx)(s.M,{text:e.metadata.description,placement:"bottom-start",line:2})}),createSpecLifecycleColumn:()=>({title:(0,i.jsx)(m.g,{translationKey:"lifecycle"}),field:"spec.lifecycle"}),createSpecTypeColumn:()=>({title:(0,i.jsx)(m.g,{translationKey:"type"}),field:"spec.type"})}),p=[u.createEntityRefColumn({defaultKind:"system"}),u.createDomainColumn(),u.createOwnerColumn(),u.createMetadataDescriptionColumn()],y=[u.createEntityRefColumn({defaultKind:"component"}),u.createSystemColumn(),u.createOwnerColumn(),u.createSpecTypeColumn(),u.createSpecLifecycleColumn(),u.createMetadataDescriptionColumn()];var h=n(28499);let f=(0,a.A)(e=>({empty:{padding:e.spacing(2),display:"flex",justifyContent:"center"}})),g=e=>{let{entities:t,title:n,emptyContent:a,variant:o="gridItem",columns:s,tableOptions:r={}}=e,l=f(),c={minWidth:"0",width:"100%"};return"gridItem"===o&&(c.height="calc(100% - 10px)"),(0,i.jsx)(h.X,{columns:s,title:n,style:c,emptyContent:a&&(0,i.jsx)("div",{className:l.empty,children:a}),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1,...r},data:t})};g.columns=u,g.systemEntityColumns=p,g.componentEntityColumns=y},19857:function(e,t,n){n.d(t,{g:()=>o});var i=n(55994),a=n(79811);let o=({translationKey:e})=>{let{t}=(0,i.i)(a.j);return t(`entityTableColumnTitle.${e}`)}},22845:function(e,t,n){n.d(t,{T7:()=>c,TY:()=>m,tN:()=>d});var i=n(31085),a=n(58077),o=n(92829),s=n(9135),r=n(20549);let l=(0,s.tK)("entity-context"),c=e=>{let{children:t,entity:n,loading:s,error:c,refresh:d}=e;return(0,i.jsx)(l.Provider,{value:(0,r.B)({1:{entity:n,loading:s,error:c,refresh:d}}),children:(0,i.jsx)(o.Ig,{attributes:{...n?{entityRef:(0,a.U2)(n)}:void 0},children:t})})};function d(){let e=(0,s.qO)("entity-context");if(!e)throw Error("Entity context is not available");let t=e.atVersion(1);if(!t)throw Error("EntityContext v1 not available");if(!t.entity)throw Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:t.entity}}function m(){let e=(0,s.qO)("entity-context");if(!e)throw Error("Entity context is not available");let t=e.atVersion(1);if(!t)throw Error("EntityContext v1 not available");let{entity:n,loading:i,error:a,refresh:o}=t;return{entity:n,loading:i,error:a,refresh:o}}},50010:function(e,t,n){n.d(t,{W:()=>i});let i=(0,n(75493).h)({id:"catalog",messages:{indexPage:{title:"{{orgName}} Catalog",createButtonTitle:"Create",supportButtonContent:"All your software catalog entities"},aboutCard:{title:"About",refreshButtonTitle:"Schedule entity refresh",editButtonTitle:"Edit Metadata",createSimilarButtonTitle:"Create something similar",refreshScheduledMessage:"Refresh scheduled",launchTemplate:"Launch Template",viewTechdocs:"View TechDocs",viewSource:"View Source",descriptionField:{label:"Description",value:"No description"},ownerField:{label:"Owner",value:"No Owner"},domainField:{label:"Domain",value:"No Domain"},systemField:{label:"System",value:"No System"},parentComponentField:{label:"Parent Component",value:"No Parent Component"},typeField:{label:"Type"},lifecycleField:{label:"Lifecycle"},tagsField:{label:"Tags",value:"No Tags"},targetsField:{label:"Targets"}},searchResultItem:{lifecycle:"Lifecycle",Owner:"Owner"},catalogTable:{warningPanelTitle:"Could not fetch catalog entities.",viewActionTitle:"View",editActionTitle:"Edit",starActionTitle:"Add to favorites",unStarActionTitle:"Remove from favorites"},dependencyOfComponentsCard:{title:"Dependency of components",emptyMessage:"No component depends on this component"},dependsOnComponentsCard:{title:"Depends on components",emptyMessage:"No component is a dependency of this component"},dependsOnResourcesCard:{title:"Depends on resources",emptyMessage:"No resource is a dependency of this component"},entityContextMenu:{copiedMessage:"Copied!",moreButtonTitle:"More",inspectMenuTitle:"Inspect entity",copyURLMenuTitle:"Copy entity URL",unregisterMenuTitle:"Unregister entity"},entityLabelsCard:{title:"Labels",emptyDescription:"No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityLabels:{warningPanelTitle:"Entity not found",ownerLabel:"Owner",lifecycleLabel:"Lifecycle"},entityLinksCard:{title:"Links",emptyDescription:"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityNotFound:{title:"Entity was not found",description:"Want to help us build this? Check out our Getting Started documentation.",docButtonTitle:"DOCS"},deleteEntity:{dialogTitle:"Are you sure you want to delete this entity?",deleteButtonTitle:"Delete",cancelButtonTitle:"Cancel",description:"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."},entityProcessingErrorsDescription:"The error below originates from",entityRelationWarningDescription:"This entity has relations to other entities, which can't be found in the catalog.\n Entities not found are: ",hasComponentsCard:{title:"Has components",emptyMessage:"No component is part of this system"},hasResourcesCard:{title:"Has resources",emptyMessage:"No resource is part of this system"},hasSubcomponentsCard:{title:"Has subcomponents",emptyMessage:"No subcomponent is part of this component"},hasSubdomainsCard:{title:"Has subdomains",emptyMessage:"No subdomain is part of this domain"},hasSystemsCard:{title:"Has systems",emptyMessage:"No system is part of this domain"},relatedEntitiesCard:{emptyHelpLinkTitle:"Learn how to change this"},systemDiagramCard:{title:"System Diagram",description:"Use pinch & zoom to move around the diagram.",edgeLabels:{partOf:"part of",provides:"provides",dependsOn:"depends on"}}}})},64785:function(e,t,n){n.d(t,{HasResourcesCard:()=>c});var i=n(31085),a=n(96403),o=n(79842),s=n(44849),r=n(50010),l=n(55994);function c(e){let{t}=(0,l.i)(r.W),{variant:n="gridItem",title:c=t("hasResourcesCard.title"),columns:d=o.v9,tableOptions:m={}}=e;return(0,i.jsx)(s.p,{variant:n,title:c,entityKind:"Resource",relationType:a.sA,columns:d,asRenderableEntities:o.eB,emptyMessage:t("hasResourcesCard.emptyMessage"),emptyHelpLink:o.nz,tableOptions:m})}},44849:function(e,t,n){n.d(t,{p:()=>T});var i=n(31085),a=n(72501),o=n(22845),s=n(58077),r=n(5712),l=n(73466),c=n(76272),d=n(65671),m=n(89439),u=n(55489),p=n(58837),y=n(37197),h=n(8109),f=n(5951),g=n(4809),x=n(55555),C=n(60691);let b=(0,p.A)(e=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:e.spacing(2)},divider:{margin:e.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function v(e){let{title:t,error:n,defaultExpanded:a}=e,o=b();if("ResponseError"!==n.name)return(0,i.jsx)(C.b,{title:t??n.message,defaultExpanded:a,error:n});let{body:s,cause:r}=n,{request:l,response:c}=s,d=`${c.statusCode}: ${r.name}`,m=l&&`${l.method} ${l.url}`,u=r.message.replace(/\\n/g,"\n"),p=r.stack?.replace(/\\n/g,"\n"),v=JSON.stringify(s,void 0,2);return(0,i.jsxs)(C.b,{title:t??n.message,defaultExpanded:a,error:{name:d,message:u,stack:p},children:[m&&(0,i.jsxs)(h.A,{alignItems:"flex-start",children:[(0,i.jsx)(f.A,{classes:{secondary:o.text},primary:"Request",secondary:l?`${m}`:void 0}),(0,i.jsx)(x.l,{text:m})]}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(y.A,{component:"li",className:o.divider}),(0,i.jsx)(h.A,{alignItems:"flex-start",children:(0,i.jsx)(f.A,{classes:{secondary:o.text},primary:"Full Error as JSON"})}),(0,i.jsx)(g.z,{language:"json",text:v,showCopyCodeButton:!0})]})]})}var j=n(60603),w=n(79842),E=n(50010),A=n(55994);let T=e=>{let{variant:t="gridItem",title:n,columns:p,entityKind:y,relationType:h,emptyMessage:f,emptyHelpLink:g,asRenderableEntities:x,tableOptions:C={}}=e,{t:b}=(0,A.i)(E.W),{entity:w}=(0,o.tN)(),{entities:T,loading:k,error:S}=function(e,t){let n=t?.type?.toLocaleLowerCase("en-US"),i=t?.kind?.toLocaleLowerCase("en-US"),a=(0,r.gf)(c.v),{loading:o,value:d,error:m}=(0,l.A)(async()=>{let t=e.relations?.filter(e=>(!n||e.type.toLocaleLowerCase("en-US")===n)&&(!i||(0,s.KU)(e.targetRef).kind===i));if(!t?.length)return[];let{items:o}=await a.getEntitiesByRefs({entityRefs:t.map(e=>e.targetRef)});return o.filter(e=>!!e)},[e,n,i]);return{entities:d,loading:o,error:m}}(w,{type:h,kind:y});return k?(0,i.jsx)(m.n,{variant:t,title:n,children:(0,i.jsx)(u.k,{})}):S?(0,i.jsx)(m.n,{variant:t,title:n,children:(0,i.jsx)(v,{error:S})}):(0,i.jsx)(d.s,{title:n,variant:t,emptyContent:(0,i.jsxs)("div",{style:{textAlign:"center"},children:[(0,i.jsx)(a.A,{variant:"body1",children:f}),(0,i.jsx)(a.A,{variant:"body2",children:(0,i.jsx)(j.N_,{to:g,externalLinkIcon:!0,children:b("relatedEntitiesCard.emptyHelpLinkTitle")})})]}),columns:p,entities:x(T||[]),tableOptions:C})};T.componentEntityColumns=w.mz,T.componentEntityHelpLink=w.e2,T.asComponentEntities=w.xJ,T.resourceEntityColumns=w.v9,T.resourceEntityHelpLink=w.nz,T.asResourceEntities=w.eB,T.systemEntityColumns=w.MW,T.systemEntityHelpLink=w.iU,T.asSystemEntities=w.vy,T.domainEntityColums=w.xO,T.domainEntityHelpLink=w.Xr,T.asDomainEntities=w.QS},79842:function(e,t,n){n.d(t,{MW:()=>d,QS:()=>h,Xr:()=>y,e2:()=>o,eB:()=>c,iU:()=>m,mz:()=>a,nz:()=>l,v9:()=>r,vy:()=>u,xJ:()=>s,xO:()=>p});var i=n(65671);let a=[i.s.columns.createEntityRefColumn({defaultKind:"component"}),i.s.columns.createOwnerColumn(),i.s.columns.createSpecTypeColumn(),i.s.columns.createSpecLifecycleColumn(),i.s.columns.createMetadataDescriptionColumn()],o="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",s=e=>e,r=[i.s.columns.createEntityRefColumn({defaultKind:"resource"}),i.s.columns.createOwnerColumn(),i.s.columns.createSpecTypeColumn(),i.s.columns.createSpecLifecycleColumn(),i.s.columns.createMetadataDescriptionColumn()],l="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",c=e=>e,d=[i.s.columns.createEntityRefColumn({defaultKind:"system"}),i.s.columns.createOwnerColumn(),i.s.columns.createMetadataDescriptionColumn()],m="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",u=e=>e,p=[i.s.columns.createEntityRefColumn({defaultKind:"domain"}),i.s.columns.createOwnerColumn(),i.s.columns.createMetadataDescriptionColumn()],y="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-domain",h=e=>e}}]);
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["7203"],{52235:function(e,t,n){var i=n(4293),a=n(78920);t.default=void 0;var o=a(n(14041));t.default=(0,i(n(74044)).default)(o.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward")},98557:function(e,t,n){n.d(t,{M:()=>l});var i=n(31085),a=n(58837),o=n(71677),s=n(72501);let r=(0,a.A)({container:{overflow:"visible !important"},typo:{fontSize:"inherit",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":({line:e})=>e||1,"-webkit-box-orient":"vertical"}},{name:"BackstageOverflowTooltip"});function l(e){let t=r(e);return(0,i.jsx)(o.Ay,{title:e.title??(e.text||""),placement:e.placement,children:(0,i.jsx)(s.A,{className:t.typo,variant:"inherit",children:e.text})})}},89439:function(e,t,n){n.d(t,{n:()=>R});var i=n(31085),a=n(40703),o=n(59469),s=n(48653),r=n(45685),l=n(37197),c=n(58837),d=n(24568),m=n(53373),u=n.n(m),p=n(9720),y=n(72501),h=n(52235),f=n(60603);let g=(0,c.A)(e=>({root:{maxWidth:"fit-content",padding:e.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:e.palette.textSubtle},arrow:{color:e.palette.textSubtle}}),{name:"BackstageBottomLink"});function x(e){let{link:t,title:n,onClick:a}=e,o=g();return(0,i.jsxs)(p.A,{children:[(0,i.jsx)(l.A,{}),(0,i.jsx)(f.N_,{to:t,onClick:a,underline:"none",children:(0,i.jsxs)(p.A,{display:"flex",alignItems:"center",className:o.root,children:[(0,i.jsx)(p.A,{className:o.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,i.jsx)(y.A,{children:(0,i.jsx)("strong",{children:n})})}),(0,i.jsx)(h.default,{className:o.arrow})]})})]})}var C=n(14041),b=n(45463),v=n(60691),j=n(89332),w=n(89595);let E=e=>{let{slackChannel:t}=e,{t:n}=(0,w.i)(j.O);return t?"string"==typeof t?(0,i.jsx)(y.A,{children:n("errorBoundary.title",{slackChannel:t})}):t.href?(0,i.jsx)(b.z,{to:t.href,variant:"contained",children:t.name}):(0,i.jsx)(y.A,{children:n("errorBoundary.title",{slackChannel:t.name})}):null},A=class extends C.Component{constructor(e){super(e),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(e,t){console.error(`ErrorBoundary, error: ${e}`,{error:e,errorInfo:t}),this.setState({error:e,errorInfo:t})}render(){let{slackChannel:e,children:t}=this.props,{error:n}=this.state;return n?(0,i.jsx)(v.b,{title:"Something Went Wrong",error:n,children:(0,i.jsx)(E,{slackChannel:e})}):t}},T=(0,c.A)(e=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},contentAlignBottom:{display:"flex",alignItems:"self-end"},header:{padding:e.spacing(2,2,2,2.5)},headerTitle:{fontWeight:e.typography.fontWeightBold},headerSubheader:{paddingTop:e.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),S=(0,d.A)(e=>({root:{display:"inline-block",padding:e.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(o.A),k={flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px",breakInside:"avoid-page","@media print":{height:"auto"}}},L={fullHeight:{flex:1},gridItem:{flex:1}};function R(e){let{title:t,subheader:n,divider:c=!0,deepLink:d,slackChannel:m,errorBoundaryProps:p,variant:y,alignContent:h="normal",children:f,headerStyle:g,headerProps:C,icon:b,action:v,actionsClassName:j,actions:w,cardClassName:E,actionsTopRight:R,className:M,noPadding:N,titleTypographyProps:B,subheaderTypographyProps:O}=e,D=T(),K={},I={};return y&&y.split(/[\s]+/g).forEach(e=>{K={...K,...k[e]},I={...I,...L[e]}}),(0,i.jsx)(a.A,{style:K,className:M,children:(0,i.jsxs)(A,{...p||(m?{slackChannel:m}:{}),children:[t&&(0,i.jsx)(r.A,{classes:{root:u()(D.header),title:D.headerTitle,subheader:D.headerSubheader,avatar:D.headerAvatar,action:D.headerAction,content:D.headerContent},title:t,subheader:n||b?(0,i.jsxs)("div",{"data-testid":"info-card-subheader",children:[n&&(0,i.jsx)("div",{className:D.subheader,children:n}),b]}):null,action:v,style:{...g},titleTypographyProps:B,subheaderTypographyProps:O,...C}),R&&(0,i.jsx)(S,{children:R}),c&&(0,i.jsx)(l.A,{}),(0,i.jsx)(s.A,{className:u()(E,{[D.noPadding]:N,[D.contentAlignBottom]:"bottom"===h}),style:I,children:f}),w&&(0,i.jsx)(o.A,{className:j,children:w}),d&&(0,i.jsx)(x,{...d})]})})}},65671:function(e,t,n){n.d(t,{s:()=>g});var i=n(31085),a=n(58837),o=n(96403),s=n(98557),r=n(53320),l=n(7537),c=n(76025),d=n(53987),m=n(19857);let u=Object.freeze({createEntityRefColumn(e){let{defaultKind:t}=e;function n(e){return e.metadata?.title||(0,l.S)(e,{defaultKind:t})}return{title:(0,i.jsx)(m.g,{translationKey:"name"}),highlight:!0,customFilterAndSearch:(e,t)=>n(t).includes(e),customSort:(e,t)=>n(e).localeCompare(n(t)),render:e=>(0,i.jsx)(c.z,{entityRef:e,defaultKind:t,title:e.metadata?.title})}},createEntityRelationColumn(e){let{title:t,relation:n,defaultKind:a,filter:o}=e;function s(e){return(0,r.t)(e,n,o)}function c(e){return s(e).map(e=>(0,l.S)(e,{defaultKind:a})).join(", ")}return{title:t,customFilterAndSearch:(e,t)=>c(t).includes(e),customSort:(e,t)=>c(e).localeCompare(c(t)),render:e=>(0,i.jsx)(d.i,{entityRefs:s(e),defaultKind:a})}},createOwnerColumn(){return this.createEntityRelationColumn({title:(0,i.jsx)(m.g,{translationKey:"owner"}),relation:o.vv,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:(0,i.jsx)(m.g,{translationKey:"domain"}),relation:o.jn,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:(0,i.jsx)(m.g,{translationKey:"system"}),relation:o.jn,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn:()=>({title:(0,i.jsx)(m.g,{translationKey:"description"}),field:"metadata.description",render:e=>(0,i.jsx)(s.M,{text:e.metadata.description,placement:"bottom-start",line:2})}),createSpecLifecycleColumn:()=>({title:(0,i.jsx)(m.g,{translationKey:"lifecycle"}),field:"spec.lifecycle"}),createSpecTypeColumn:()=>({title:(0,i.jsx)(m.g,{translationKey:"type"}),field:"spec.type"})}),p=[u.createEntityRefColumn({defaultKind:"system"}),u.createDomainColumn(),u.createOwnerColumn(),u.createMetadataDescriptionColumn()],y=[u.createEntityRefColumn({defaultKind:"component"}),u.createSystemColumn(),u.createOwnerColumn(),u.createSpecTypeColumn(),u.createSpecLifecycleColumn(),u.createMetadataDescriptionColumn()];var h=n(28499);let f=(0,a.A)(e=>({empty:{padding:e.spacing(2),display:"flex",justifyContent:"center"}})),g=e=>{let{entities:t,title:n,emptyContent:a,variant:o="gridItem",columns:s,tableOptions:r={}}=e,l=f(),c={minWidth:"0",width:"100%"};return"gridItem"===o&&(c.height="calc(100% - 10px)"),(0,i.jsx)(h.X,{columns:s,title:n,style:c,emptyContent:a&&(0,i.jsx)("div",{className:l.empty,children:a}),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1,...r},data:t})};g.columns=u,g.systemEntityColumns=p,g.componentEntityColumns=y},19857:function(e,t,n){n.d(t,{g:()=>o});var i=n(89595),a=n(79811);let o=({translationKey:e})=>{let{t}=(0,i.i)(a.j);return t(`entityTableColumnTitle.${e}`)}},22845:function(e,t,n){n.d(t,{T7:()=>c,TY:()=>m,tN:()=>d});var i=n(31085),a=n(58077),o=n(92829),s=n(9135),r=n(20549);let l=(0,s.tK)("entity-context"),c=e=>{let{children:t,entity:n,loading:s,error:c,refresh:d}=e;return(0,i.jsx)(l.Provider,{value:(0,r.B)({1:{entity:n,loading:s,error:c,refresh:d}}),children:(0,i.jsx)(o.Ig,{attributes:{...n?{entityRef:(0,a.U2)(n)}:void 0},children:t})})};function d(){let e=(0,s.qO)("entity-context");if(!e)throw Error("Entity context is not available");let t=e.atVersion(1);if(!t)throw Error("EntityContext v1 not available");if(!t.entity)throw Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:t.entity}}function m(){let e=(0,s.qO)("entity-context");if(!e)throw Error("Entity context is not available");let t=e.atVersion(1);if(!t)throw Error("EntityContext v1 not available");let{entity:n,loading:i,error:a,refresh:o}=t;return{entity:n,loading:i,error:a,refresh:o}}},50010:function(e,t,n){n.d(t,{W:()=>i});let i=(0,n(97386).h)({id:"catalog",messages:{indexPage:{title:"{{orgName}} Catalog",createButtonTitle:"Create",supportButtonContent:"All your software catalog entities"},aboutCard:{title:"About",refreshButtonTitle:"Schedule entity refresh",editButtonTitle:"Edit Metadata",createSimilarButtonTitle:"Create something similar",refreshScheduledMessage:"Refresh scheduled",launchTemplate:"Launch Template",viewTechdocs:"View TechDocs",viewSource:"View Source",descriptionField:{label:"Description",value:"No description"},ownerField:{label:"Owner",value:"No Owner"},domainField:{label:"Domain",value:"No Domain"},systemField:{label:"System",value:"No System"},parentComponentField:{label:"Parent Component",value:"No Parent Component"},typeField:{label:"Type"},lifecycleField:{label:"Lifecycle"},tagsField:{label:"Tags",value:"No Tags"},targetsField:{label:"Targets"}},searchResultItem:{lifecycle:"Lifecycle",Owner:"Owner"},catalogTable:{warningPanelTitle:"Could not fetch catalog entities.",viewActionTitle:"View",editActionTitle:"Edit",starActionTitle:"Add to favorites",unStarActionTitle:"Remove from favorites"},dependencyOfComponentsCard:{title:"Dependency of components",emptyMessage:"No component depends on this component"},dependsOnComponentsCard:{title:"Depends on components",emptyMessage:"No component is a dependency of this component"},dependsOnResourcesCard:{title:"Depends on resources",emptyMessage:"No resource is a dependency of this component"},entityContextMenu:{copiedMessage:"Copied!",moreButtonTitle:"More",inspectMenuTitle:"Inspect entity",copyURLMenuTitle:"Copy entity URL",unregisterMenuTitle:"Unregister entity"},entityLabelsCard:{title:"Labels",emptyDescription:"No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityLabels:{warningPanelTitle:"Entity not found",ownerLabel:"Owner",lifecycleLabel:"Lifecycle"},entityLinksCard:{title:"Links",emptyDescription:"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityNotFound:{title:"Entity was not found",description:"Want to help us build this? Check out our Getting Started documentation.",docButtonTitle:"DOCS"},deleteEntity:{dialogTitle:"Are you sure you want to delete this entity?",deleteButtonTitle:"Delete",cancelButtonTitle:"Cancel",description:"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."},entityProcessingErrorsDescription:"The error below originates from",entityRelationWarningDescription:"This entity has relations to other entities, which can't be found in the catalog.\n Entities not found are: ",hasComponentsCard:{title:"Has components",emptyMessage:"No component is part of this system"},hasResourcesCard:{title:"Has resources",emptyMessage:"No resource is part of this system"},hasSubcomponentsCard:{title:"Has subcomponents",emptyMessage:"No subcomponent is part of this component"},hasSubdomainsCard:{title:"Has subdomains",emptyMessage:"No subdomain is part of this domain"},hasSystemsCard:{title:"Has systems",emptyMessage:"No system is part of this domain"},relatedEntitiesCard:{emptyHelpLinkTitle:"Learn how to change this"},systemDiagramCard:{title:"System Diagram",description:"Use pinch & zoom to move around the diagram.",edgeLabels:{partOf:"part of",provides:"provides",dependsOn:"depends on"}}}})},81342:function(e,t,n){n.d(t,{HasSubdomainsCard:()=>c});var i=n(31085),a=n(96403),o=n(79842),s=n(44849),r=n(50010),l=n(89595);function c(e){let{t}=(0,l.i)(r.W),{variant:n="gridItem",title:c=t("hasSubdomainsCard.title"),columns:d=o.xO,tableOptions:m={}}=e;return(0,i.jsx)(s.p,{variant:n,title:c,entityKind:"Domain",relationType:a.sA,columns:d,asRenderableEntities:o.QS,emptyMessage:t("hasSubdomainsCard.emptyMessage"),emptyHelpLink:o.Xr,tableOptions:m})}},44849:function(e,t,n){n.d(t,{p:()=>T});var i=n(31085),a=n(72501),o=n(22845),s=n(58077),r=n(50509),l=n(73466),c=n(76272),d=n(65671),m=n(89439),u=n(55489),p=n(58837),y=n(37197),h=n(8109),f=n(5951),g=n(4809),x=n(55555),C=n(60691);let b=(0,p.A)(e=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:e.spacing(2)},divider:{margin:e.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function v(e){let{title:t,error:n,defaultExpanded:a}=e,o=b();if("ResponseError"!==n.name)return(0,i.jsx)(C.b,{title:t??n.message,defaultExpanded:a,error:n});let{body:s,cause:r}=n,{request:l,response:c}=s,d=`${c.statusCode}: ${r.name}`,m=l&&`${l.method} ${l.url}`,u=r.message.replace(/\\n/g,"\n"),p=r.stack?.replace(/\\n/g,"\n"),v=JSON.stringify(s,void 0,2);return(0,i.jsxs)(C.b,{title:t??n.message,defaultExpanded:a,error:{name:d,message:u,stack:p},children:[m&&(0,i.jsxs)(h.A,{alignItems:"flex-start",children:[(0,i.jsx)(f.A,{classes:{secondary:o.text},primary:"Request",secondary:l?`${m}`:void 0}),(0,i.jsx)(x.l,{text:m})]}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(y.A,{component:"li",className:o.divider}),(0,i.jsx)(h.A,{alignItems:"flex-start",children:(0,i.jsx)(f.A,{classes:{secondary:o.text},primary:"Full Error as JSON"})}),(0,i.jsx)(g.z,{language:"json",text:v,showCopyCodeButton:!0})]})]})}var j=n(60603),w=n(79842),E=n(50010),A=n(89595);let T=e=>{let{variant:t="gridItem",title:n,columns:p,entityKind:y,relationType:h,emptyMessage:f,emptyHelpLink:g,asRenderableEntities:x,tableOptions:C={}}=e,{t:b}=(0,A.i)(E.W),{entity:w}=(0,o.tN)(),{entities:T,loading:S,error:k}=function(e,t){let n=t?.type?.toLocaleLowerCase("en-US"),i=t?.kind?.toLocaleLowerCase("en-US"),a=(0,r.gf)(c.v),{loading:o,value:d,error:m}=(0,l.A)(async()=>{let t=e.relations?.filter(e=>(!n||e.type.toLocaleLowerCase("en-US")===n)&&(!i||(0,s.KU)(e.targetRef).kind===i));if(!t?.length)return[];let{items:o}=await a.getEntitiesByRefs({entityRefs:t.map(e=>e.targetRef)});return o.filter(e=>!!e)},[e,n,i]);return{entities:d,loading:o,error:m}}(w,{type:h,kind:y});return S?(0,i.jsx)(m.n,{variant:t,title:n,children:(0,i.jsx)(u.k,{})}):k?(0,i.jsx)(m.n,{variant:t,title:n,children:(0,i.jsx)(v,{error:k})}):(0,i.jsx)(d.s,{title:n,variant:t,emptyContent:(0,i.jsxs)("div",{style:{textAlign:"center"},children:[(0,i.jsx)(a.A,{variant:"body1",children:f}),(0,i.jsx)(a.A,{variant:"body2",children:(0,i.jsx)(j.N_,{to:g,externalLinkIcon:!0,children:b("relatedEntitiesCard.emptyHelpLinkTitle")})})]}),columns:p,entities:x(T||[]),tableOptions:C})};T.componentEntityColumns=w.mz,T.componentEntityHelpLink=w.e2,T.asComponentEntities=w.xJ,T.resourceEntityColumns=w.v9,T.resourceEntityHelpLink=w.nz,T.asResourceEntities=w.eB,T.systemEntityColumns=w.MW,T.systemEntityHelpLink=w.iU,T.asSystemEntities=w.vy,T.domainEntityColums=w.xO,T.domainEntityHelpLink=w.Xr,T.asDomainEntities=w.QS},79842:function(e,t,n){n.d(t,{MW:()=>d,QS:()=>h,Xr:()=>y,e2:()=>o,eB:()=>c,iU:()=>m,mz:()=>a,nz:()=>l,v9:()=>r,vy:()=>u,xJ:()=>s,xO:()=>p});var i=n(65671);let a=[i.s.columns.createEntityRefColumn({defaultKind:"component"}),i.s.columns.createOwnerColumn(),i.s.columns.createSpecTypeColumn(),i.s.columns.createSpecLifecycleColumn(),i.s.columns.createMetadataDescriptionColumn()],o="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",s=e=>e,r=[i.s.columns.createEntityRefColumn({defaultKind:"resource"}),i.s.columns.createOwnerColumn(),i.s.columns.createSpecTypeColumn(),i.s.columns.createSpecLifecycleColumn(),i.s.columns.createMetadataDescriptionColumn()],l="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",c=e=>e,d=[i.s.columns.createEntityRefColumn({defaultKind:"system"}),i.s.columns.createOwnerColumn(),i.s.columns.createMetadataDescriptionColumn()],m="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",u=e=>e,p=[i.s.columns.createEntityRefColumn({defaultKind:"domain"}),i.s.columns.createOwnerColumn(),i.s.columns.createMetadataDescriptionColumn()],y="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-domain",h=e=>e}}]);
|
|
2
|
+
//# sourceMappingURL=7203.7288c4e0.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/7203.f047878f.chunk.js","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/ArrowForward.js","webpack://techdocs-cli-embedded-app/../core-components/src/components/OverflowTooltip/OverflowTooltip.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/BottomLink/BottomLink.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/ErrorBoundary/ErrorBoundary.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/InfoCard/InfoCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityTable/columns.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityTable/presets.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityTable/EntityTable.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityTable/TitleColumn.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntity.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/alpha/translation.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasSubdomainsCard/HasSubdomainsCard.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/ResponseErrorPanel/ResponseErrorPanel.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useRelatedEntities.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"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: \"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"\n}), 'ArrowForward');\n\nexports.default = _default;","/*\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';\nimport Tooltip, { TooltipProps } from '@material-ui/core/Tooltip';\nimport Typography from '@material-ui/core/Typography';\n\ntype Props = {\n text?: string | undefined;\n title?: TooltipProps['title'];\n line?: number | undefined;\n placement?: TooltipProps['placement'];\n};\n\nexport type OverflowTooltipClassKey = 'container';\n\nconst useStyles = makeStyles(\n {\n container: {\n overflow: 'visible !important',\n },\n typo: {\n fontSize: 'inherit',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n '-webkit-line-clamp': ({ line }: Props) => line || 1,\n '-webkit-box-orient': 'vertical',\n },\n },\n { name: 'BackstageOverflowTooltip' },\n);\n\nexport function OverflowTooltip(props: Props) {\n const classes = useStyles(props);\n\n return (\n <Tooltip\n title={props.title ?? (props.text || '')}\n placement={props.placement}\n >\n <Typography className={classes.typo} variant=\"inherit\">\n {props.text}\n </Typography>\n </Tooltip>\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 Divider from '@material-ui/core/Divider';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowIcon from '@material-ui/icons/ArrowForward';\nimport { MouseEvent } from 'react';\nimport { Link } from '../../components/Link';\n\n/** @public */\nexport type BottomLinkClassKey = 'root' | 'boxTitle' | 'arrow';\n\nconst useStyles = makeStyles(\n theme => ({\n root: {\n maxWidth: 'fit-content',\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n boxTitle: {\n margin: 0,\n color: theme.palette.textSubtle,\n },\n arrow: {\n color: theme.palette.textSubtle,\n },\n }),\n { name: 'BackstageBottomLink' },\n);\n\n/** @public */\nexport type BottomLinkProps = {\n link: string;\n title: string;\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n};\n\n/**\n * Footer with link used in {@link InfoCard } and {@link TabbedCard}\n *\n * @public\n *\n */\nexport function BottomLink(props: BottomLinkProps) {\n const { link, title, onClick } = props;\n const classes = useStyles();\n\n return (\n <Box>\n <Divider />\n <Link to={link} onClick={onClick} underline=\"none\">\n <Box display=\"flex\" alignItems=\"center\" className={classes.root}>\n <Box className={classes.boxTitle} fontWeight=\"fontWeightBold\" m={1}>\n <Typography>\n <strong>{title}</strong>\n </Typography>\n </Box>\n <ArrowIcon className={classes.arrow} />\n </Box>\n </Link>\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 Typography from '@material-ui/core/Typography';\nimport { PropsWithChildren, ComponentClass, Component, ErrorInfo } from 'react';\nimport { LinkButton } from '../../components/LinkButton';\nimport { ErrorPanel } from '../../components/ErrorPanel';\nimport { coreComponentsTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\ntype SlackChannel = {\n name: string;\n href?: string;\n};\n\n/** @public */\nexport type ErrorBoundaryProps = PropsWithChildren<{\n slackChannel?: string | SlackChannel;\n onError?: (error: Error, errorInfo: string) => null;\n}>;\n\ntype State = {\n error?: Error;\n errorInfo?: ErrorInfo;\n};\n\nconst SlackLink = (props: { slackChannel?: string | SlackChannel }) => {\n const { slackChannel } = props;\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n\n if (!slackChannel) {\n return null;\n } else if (typeof slackChannel === 'string') {\n return (\n <Typography>{t('errorBoundary.title', { slackChannel })}</Typography>\n );\n } else if (!slackChannel.href) {\n return (\n <Typography>\n {t('errorBoundary.title', {\n slackChannel: slackChannel.name,\n })}\n </Typography>\n );\n }\n\n return (\n <LinkButton to={slackChannel.href} variant=\"contained\">\n {slackChannel.name}\n </LinkButton>\n );\n};\n\n/** @public */\nexport const ErrorBoundary: ComponentClass<\n ErrorBoundaryProps,\n State\n> = class ErrorBoundary extends Component<ErrorBoundaryProps, State> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = {\n error: undefined,\n errorInfo: undefined,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // eslint-disable-next-line no-console\n console.error(`ErrorBoundary, error: ${error}`, { error, errorInfo });\n this.setState({ error, errorInfo });\n }\n\n render() {\n const { slackChannel, children } = this.props;\n const { error } = this.state;\n\n if (!error) {\n return children;\n }\n\n return (\n <ErrorPanel title=\"Something Went Wrong\" error={error}>\n <SlackLink slackChannel={slackChannel} />\n </ErrorPanel>\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 Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader, { CardHeaderProps } from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport { ReactNode } from 'react';\nimport { BottomLink, BottomLinkProps } from '../BottomLink';\nimport { ErrorBoundary, ErrorBoundaryProps } from '../ErrorBoundary';\n\n/** @public */\nexport type InfoCardClassKey =\n | 'noPadding'\n | 'header'\n | 'headerTitle'\n | 'headerSubheader'\n | 'headerAvatar'\n | 'headerAction'\n | 'headerContent';\n\nconst useStyles = makeStyles(\n theme => ({\n noPadding: {\n padding: 0,\n '&:last-child': {\n paddingBottom: 0,\n },\n },\n contentAlignBottom: {\n display: 'flex',\n alignItems: 'self-end',\n },\n header: {\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n headerTitle: {\n fontWeight: theme.typography.fontWeightBold,\n },\n headerSubheader: {\n paddingTop: theme.spacing(1),\n },\n headerAvatar: {},\n headerAction: {},\n headerContent: {},\n subheader: {\n display: 'flex',\n },\n }),\n { name: 'BackstageInfoCard' },\n);\n\n/** @public */\nexport type CardActionsTopRightClassKey = 'root';\n\nconst CardActionsTopRight = withStyles(\n theme => ({\n root: {\n display: 'inline-block',\n padding: theme.spacing(8, 8, 0, 0),\n float: 'right',\n },\n }),\n { name: 'BackstageInfoCardCardActionsTopRight' },\n)(CardActions);\n\nconst VARIANT_STYLES = {\n card: {\n flex: {\n display: 'flex',\n flexDirection: 'column',\n },\n fullHeight: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n gridItem: {\n display: 'flex',\n flexDirection: 'column',\n height: 'calc(100% - 10px)', // for pages without content header\n marginBottom: '10px',\n breakInside: 'avoid-page',\n '@media print': {\n height: 'auto',\n },\n },\n },\n cardContent: {\n fullHeight: {\n flex: 1,\n },\n gridItem: {\n flex: 1,\n },\n },\n};\n\n/** @public */\nexport type InfoCardVariants = 'flex' | 'fullHeight' | 'gridItem';\n\n/**\n * InfoCard is used to display a paper-styled block on the screen, similar to a panel.\n *\n * You can custom style an InfoCard with the 'className' (outer container) and 'cardClassName' (inner container)\n * props. This is typically used with the material-ui makeStyles mechanism.\n *\n * The InfoCard serves as an error boundary. As a result, if you provide an 'errorBoundaryProps' property this\n * specifies the extra information to display in the error component that is displayed if an error occurs\n * in any descendent components.\n *\n * By default the InfoCard has no custom layout of its children, but is treated as a block element. A\n * couple common variants are provided and can be specified via the variant property:\n *\n * When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items.\n * Set to the 'gridItem' variant to display the InfoCard with full height suitable for Grid:\n *\n * `<InfoCard variant=\"gridItem\">...</InfoCard>`\n */\nexport type Props = {\n title?: ReactNode;\n subheader?: ReactNode;\n divider?: boolean;\n deepLink?: BottomLinkProps;\n /** @deprecated Use errorBoundaryProps instead */\n slackChannel?: string;\n errorBoundaryProps?: ErrorBoundaryProps;\n variant?: InfoCardVariants;\n alignContent?: 'normal' | 'bottom';\n children?: ReactNode;\n headerStyle?: object;\n headerProps?: CardHeaderProps;\n icon?: ReactNode;\n action?: ReactNode;\n actionsClassName?: string;\n actions?: ReactNode;\n cardClassName?: string;\n actionsTopRight?: ReactNode;\n className?: string;\n noPadding?: boolean;\n titleTypographyProps?: object;\n subheaderTypographyProps?: object;\n};\n\n/**\n * Material-ui card with header , content and actions footer\n *\n * @public\n *\n */\nexport function InfoCard(props: Props): JSX.Element {\n const {\n title,\n subheader,\n divider = true,\n deepLink,\n slackChannel,\n errorBoundaryProps,\n variant,\n alignContent = 'normal',\n children,\n headerStyle,\n headerProps,\n icon,\n action,\n actionsClassName,\n actions,\n cardClassName,\n actionsTopRight,\n className,\n noPadding,\n titleTypographyProps,\n subheaderTypographyProps,\n } = props;\n const classes = useStyles();\n /**\n * If variant is specified, we build up styles for that particular variant for both\n * the Card and the CardContent (since these need to be synced)\n */\n let calculatedStyle = {};\n let calculatedCardStyle = {};\n if (variant) {\n const variants = variant.split(/[\\s]+/g);\n variants.forEach(name => {\n calculatedStyle = {\n ...calculatedStyle,\n ...VARIANT_STYLES.card[name as keyof (typeof VARIANT_STYLES)['card']],\n };\n calculatedCardStyle = {\n ...calculatedCardStyle,\n ...VARIANT_STYLES.cardContent[\n name as keyof (typeof VARIANT_STYLES)['cardContent']\n ],\n };\n });\n }\n\n const cardSubTitle = () => {\n if (!subheader && !icon) {\n return null;\n }\n\n return (\n <div data-testid=\"info-card-subheader\">\n {subheader && <div className={classes.subheader}>{subheader}</div>}\n {icon}\n </div>\n );\n };\n\n const errProps: ErrorBoundaryProps =\n errorBoundaryProps || (slackChannel ? { slackChannel } : {});\n\n return (\n <Card style={calculatedStyle} className={className}>\n <ErrorBoundary {...errProps}>\n {title && (\n <CardHeader\n classes={{\n root: classNames(classes.header),\n title: classes.headerTitle,\n subheader: classes.headerSubheader,\n avatar: classes.headerAvatar,\n action: classes.headerAction,\n content: classes.headerContent,\n }}\n title={title}\n subheader={cardSubTitle()}\n action={action}\n style={{ ...headerStyle }}\n titleTypographyProps={titleTypographyProps}\n subheaderTypographyProps={subheaderTypographyProps}\n {...headerProps}\n />\n )}\n {actionsTopRight && (\n <CardActionsTopRight>{actionsTopRight}</CardActionsTopRight>\n )}\n {divider && <Divider />}\n <CardContent\n className={classNames(cardClassName, {\n [classes.noPadding]: noPadding,\n [classes.contentAlignBottom]: alignContent === 'bottom',\n })}\n style={calculatedCardStyle}\n >\n {children}\n </CardContent>\n {actions && (\n <CardActions className={actionsClassName}>{actions}</CardActions>\n )}\n {deepLink && <BottomLink {...deepLink} />}\n </ErrorBoundary>\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 {\n Entity,\n CompoundEntityRef,\n RELATION_OWNED_BY,\n RELATION_PART_OF,\n} from '@backstage/catalog-model';\nimport { OverflowTooltip, TableColumn } from '@backstage/core-components';\nimport { getEntityRelations } from '../../utils';\nimport {\n EntityRefLink,\n EntityRefLinks,\n humanizeEntityRef,\n} from '../EntityRefLink';\nimport { EntityTableColumnTitle } from './TitleColumn';\n\n/** @public */\nexport const columnFactories = Object.freeze({\n createEntityRefColumn<T extends Entity>(options: {\n defaultKind?: string;\n }): TableColumn<T> {\n const { defaultKind } = options;\n function formatContent(entity: T): string {\n return (\n entity.metadata?.title ||\n humanizeEntityRef(entity, {\n defaultKind,\n })\n );\n }\n\n return {\n title: <EntityTableColumnTitle translationKey=\"name\" />,\n highlight: true,\n customFilterAndSearch(filter, entity) {\n // TODO: We could implement this more efficiently, like searching over\n // each field that is displayed individually (kind, namespace, name).\n // but that might confuse the user as it will behave different than a\n // simple text search.\n // Another alternative would be to cache the values. But writing them\n // into the entity feels bad too.\n return formatContent(entity).includes(filter);\n },\n customSort(entity1, entity2) {\n // TODO: We could implement this more efficiently by comparing field by field.\n // This has similar issues as above.\n return formatContent(entity1).localeCompare(formatContent(entity2));\n },\n render: entity => (\n <EntityRefLink\n entityRef={entity}\n defaultKind={defaultKind}\n title={entity.metadata?.title}\n />\n ),\n };\n },\n createEntityRelationColumn<T extends Entity>(options: {\n title: string | JSX.Element;\n relation: string;\n defaultKind?: string;\n filter?: { kind: string };\n }): TableColumn<T> {\n const { title, relation, defaultKind, filter: entityFilter } = options;\n\n function getRelations(entity: T): CompoundEntityRef[] {\n return getEntityRelations(entity, relation, entityFilter);\n }\n\n function formatContent(entity: T): string {\n return getRelations(entity)\n .map(r => humanizeEntityRef(r, { defaultKind }))\n .join(', ');\n }\n\n return {\n title,\n customFilterAndSearch(filter, entity) {\n return formatContent(entity).includes(filter);\n },\n customSort(entity1, entity2) {\n return formatContent(entity1).localeCompare(formatContent(entity2));\n },\n render: entity => {\n return (\n <EntityRefLinks\n entityRefs={getRelations(entity)}\n defaultKind={defaultKind}\n />\n );\n },\n };\n },\n createOwnerColumn<T extends Entity>(): TableColumn<T> {\n return this.createEntityRelationColumn({\n title: <EntityTableColumnTitle translationKey=\"owner\" />,\n relation: RELATION_OWNED_BY,\n defaultKind: 'group',\n });\n },\n createDomainColumn<T extends Entity>(): TableColumn<T> {\n return this.createEntityRelationColumn({\n title: <EntityTableColumnTitle translationKey=\"domain\" />,\n relation: RELATION_PART_OF,\n defaultKind: 'domain',\n filter: {\n kind: 'domain',\n },\n });\n },\n createSystemColumn<T extends Entity>(): TableColumn<T> {\n return this.createEntityRelationColumn({\n title: <EntityTableColumnTitle translationKey=\"system\" />,\n relation: RELATION_PART_OF,\n defaultKind: 'system',\n filter: {\n kind: 'system',\n },\n });\n },\n createMetadataDescriptionColumn<T extends Entity>(): TableColumn<T> {\n return {\n title: <EntityTableColumnTitle translationKey=\"description\" />,\n field: 'metadata.description',\n render: entity => (\n <OverflowTooltip\n text={entity.metadata.description}\n placement=\"bottom-start\"\n line={2}\n />\n ),\n };\n },\n createSpecLifecycleColumn<T extends Entity>(): TableColumn<T> {\n return {\n title: <EntityTableColumnTitle translationKey=\"lifecycle\" />,\n field: 'spec.lifecycle',\n };\n },\n createSpecTypeColumn<T extends Entity>(): TableColumn<T> {\n return {\n title: <EntityTableColumnTitle translationKey=\"type\" />,\n field: 'spec.type',\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 { ComponentEntity, SystemEntity } from '@backstage/catalog-model';\nimport { TableColumn } from '@backstage/core-components';\nimport { columnFactories } from './columns';\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n columnFactories.createEntityRefColumn({ defaultKind: 'system' }),\n columnFactories.createDomainColumn(),\n columnFactories.createOwnerColumn(),\n columnFactories.createMetadataDescriptionColumn(),\n];\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n columnFactories.createEntityRefColumn({ defaultKind: 'component' }),\n columnFactories.createSystemColumn(),\n columnFactories.createOwnerColumn(),\n columnFactories.createSpecTypeColumn(),\n columnFactories.createSpecLifecycleColumn(),\n columnFactories.createMetadataDescriptionColumn(),\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 { Entity } from '@backstage/catalog-model';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { CSSProperties, ReactNode } from 'react';\nimport { columnFactories } from './columns';\nimport { componentEntityColumns, systemEntityColumns } from './presets';\nimport {\n InfoCardVariants,\n Table,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\n\n/**\n * Props for {@link EntityTable}.\n *\n * @public\n */\nexport interface EntityTableProps<T extends Entity> {\n title: string;\n variant?: InfoCardVariants;\n entities: T[];\n emptyContent?: ReactNode;\n columns: TableColumn<T>[];\n tableOptions?: TableOptions;\n}\n\nconst useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n\n/**\n * A general entity table component, that can be used for composing more\n * specific entity tables.\n *\n * @public\n */\nexport const EntityTable = <T extends Entity>(props: EntityTableProps<T>) => {\n const {\n entities,\n title,\n emptyContent,\n variant = 'gridItem',\n columns,\n tableOptions = {},\n } = props;\n\n const classes = useStyles();\n const tableStyle: CSSProperties = {\n minWidth: '0',\n width: '100%',\n };\n\n if (variant === 'gridItem') {\n tableStyle.height = 'calc(100% - 10px)';\n }\n\n return (\n <Table<T>\n columns={columns}\n title={title}\n style={tableStyle}\n emptyContent={\n emptyContent && <div className={classes.empty}>{emptyContent}</div>\n }\n options={{\n // TODO: Toolbar padding if off compared to other cards, should be: padding: 16px 24px;\n search: false,\n paging: false,\n actionsColumnIndex: -1,\n padding: 'dense',\n draggable: false,\n ...tableOptions,\n }}\n data={entities}\n />\n );\n};\n\nEntityTable.columns = columnFactories;\n\nEntityTable.systemEntityColumns = systemEntityColumns;\n\nEntityTable.componentEntityColumns = componentEntityColumns;\n","/*\n * Copyright 2025 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 { useTranslationRef } from '@backstage/frontend-plugin-api';\nimport { catalogReactTranslationRef } from '../../translation';\n\n/**\n * @alpha\n */\nexport type EntityTableColumnTitleProps = {\n translationKey:\n | 'name'\n | 'system'\n | 'owner'\n | 'type'\n | 'lifecycle'\n | 'namespace'\n | 'description'\n | 'tags'\n | 'targets'\n | 'title'\n | 'label'\n | 'domain';\n};\n\n/**\n * @alpha\n */\nexport const EntityTableColumnTitle = ({\n translationKey,\n}: EntityTableColumnTitleProps) => {\n const { t } = useTranslationRef(catalogReactTranslationRef);\n return t(`entityTableColumnTitle.${translationKey}`);\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 */\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { AnalyticsContext } from '@backstage/core-plugin-api';\nimport {\n createVersionedContext,\n createVersionedValueMap,\n useVersionedContext,\n} from '@backstage/version-bridge';\nimport { ReactNode } from 'react';\n\n/** @public */\nexport type EntityLoadingStatus<TEntity extends Entity = Entity> = {\n entity?: TEntity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n};\n\n// This context has support for multiple concurrent versions of this package.\n// It is currently used in parallel with the old context in order to provide\n// a smooth transition, but will eventually be the only context we use.\nconst NewEntityContext = createVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n);\n\n/**\n * Properties for the AsyncEntityProvider component.\n *\n * @public\n */\nexport interface AsyncEntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n}\n\n/**\n * Provides a loaded entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const AsyncEntityProvider = (props: AsyncEntityProviderProps) => {\n const { children, entity, loading, error, refresh } = props;\n const value = { entity, loading, error, refresh };\n // We provide both the old and the new context, since\n // consumers might be doing things like `useContext(EntityContext)`\n return (\n <NewEntityContext.Provider value={createVersionedValueMap({ 1: value })}>\n <AnalyticsContext\n attributes={{\n ...(entity ? { entityRef: stringifyEntityRef(entity) } : undefined),\n }}\n >\n {children}\n </AnalyticsContext>\n </NewEntityContext.Provider>\n );\n};\n\n/**\n * Properties for the EntityProvider component.\n *\n * @public\n */\nexport interface EntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n}\n\n/**\n * Provides an entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const EntityProvider = (props: EntityProviderProps) => (\n <AsyncEntityProvider\n entity={props.entity}\n loading={!Boolean(props.entity)}\n error={undefined}\n refresh={undefined}\n children={props.children}\n />\n);\n\n/**\n * Grab the current entity from the context, throws if the entity has not yet been loaded\n * or is not available.\n *\n * @public\n */\nexport function useEntity<TEntity extends Entity = Entity>(): {\n entity: TEntity;\n} {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n if (!value.entity) {\n throw new Error(\n 'useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.',\n );\n }\n\n return { entity: value.entity as TEntity };\n}\n\n/**\n * Grab the current entity from the context, provides loading state and errors, and the ability to refresh.\n *\n * @public\n */\nexport function useAsyncEntity<\n TEntity extends Entity = Entity,\n>(): EntityLoadingStatus<TEntity> {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n const { entity, loading, error, refresh } = value;\n return { entity: entity as TEntity, loading, error, refresh };\n}\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n supportButtonContent: 'All your software catalog entities',\n },\n aboutCard: {\n title: 'About',\n refreshButtonTitle: 'Schedule entity refresh',\n editButtonTitle: 'Edit Metadata',\n createSimilarButtonTitle: 'Create something similar',\n refreshScheduledMessage: 'Refresh scheduled',\n launchTemplate: 'Launch Template',\n viewTechdocs: 'View TechDocs',\n viewSource: 'View Source',\n descriptionField: {\n label: 'Description',\n value: 'No description',\n },\n ownerField: {\n label: 'Owner',\n value: 'No Owner',\n },\n domainField: {\n label: 'Domain',\n value: 'No Domain',\n },\n systemField: {\n label: 'System',\n value: 'No System',\n },\n parentComponentField: {\n label: 'Parent Component',\n value: 'No Parent Component',\n },\n typeField: {\n label: 'Type',\n },\n lifecycleField: {\n label: 'Lifecycle',\n },\n tagsField: {\n label: 'Tags',\n value: 'No Tags',\n },\n targetsField: {\n label: 'Targets',\n },\n },\n searchResultItem: {\n lifecycle: 'Lifecycle',\n Owner: 'Owner',\n },\n catalogTable: {\n warningPanelTitle: 'Could not fetch catalog entities.',\n viewActionTitle: 'View',\n editActionTitle: 'Edit',\n starActionTitle: 'Add to favorites',\n unStarActionTitle: 'Remove from favorites',\n },\n dependencyOfComponentsCard: {\n title: 'Dependency of components',\n emptyMessage: 'No component depends on this component',\n },\n dependsOnComponentsCard: {\n title: 'Depends on components',\n emptyMessage: 'No component is a dependency of this component',\n },\n dependsOnResourcesCard: {\n title: 'Depends on resources',\n emptyMessage: 'No resource is a dependency of this component',\n },\n entityContextMenu: {\n copiedMessage: 'Copied!',\n moreButtonTitle: 'More',\n inspectMenuTitle: 'Inspect entity',\n copyURLMenuTitle: 'Copy entity URL',\n unregisterMenuTitle: 'Unregister entity',\n },\n entityLabelsCard: {\n title: 'Labels',\n emptyDescription:\n 'No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityLabels: {\n warningPanelTitle: 'Entity not found',\n ownerLabel: 'Owner',\n lifecycleLabel: 'Lifecycle',\n },\n entityLinksCard: {\n title: 'Links',\n emptyDescription:\n 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityNotFound: {\n title: 'Entity was not found',\n description:\n 'Want to help us build this? Check out our Getting Started documentation.',\n docButtonTitle: 'DOCS',\n },\n deleteEntity: {\n dialogTitle: 'Are you sure you want to delete this entity?',\n deleteButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n description:\n 'This entity is not referenced by any location and is therefore not receiving updates. Click here to delete.',\n },\n entityProcessingErrorsDescription: 'The error below originates from',\n entityRelationWarningDescription:\n \"This entity has relations to other entities, which can't be found in the catalog.\\n Entities not found are: \",\n hasComponentsCard: {\n title: 'Has components',\n emptyMessage: 'No component is part of this system',\n },\n hasResourcesCard: {\n title: 'Has resources',\n emptyMessage: 'No resource is part of this system',\n },\n hasSubcomponentsCard: {\n title: 'Has subcomponents',\n emptyMessage: 'No subcomponent is part of this component',\n },\n hasSubdomainsCard: {\n title: 'Has subdomains',\n emptyMessage: 'No subdomain is part of this domain',\n },\n hasSystemsCard: {\n title: 'Has systems',\n emptyMessage: 'No system is part of this domain',\n },\n relatedEntitiesCard: {\n emptyHelpLinkTitle: 'Learn how to change this',\n },\n systemDiagramCard: {\n title: 'System Diagram',\n description: 'Use pinch & zoom to move around the diagram.',\n edgeLabels: {\n partOf: 'part of',\n provides: 'provides',\n dependsOn: 'depends on',\n },\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 { DomainEntity, RELATION_HAS_PART } from '@backstage/catalog-model';\nimport {\n InfoCardVariants,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\nimport {\n asDomainEntities,\n domainEntityColumns,\n domainEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport interface HasSubdomainsCardProps {\n variant?: InfoCardVariants;\n tableOptions?: TableOptions;\n columns?: TableColumn<DomainEntity>[];\n title?: string;\n}\n\nexport function HasSubdomainsCard(props: HasSubdomainsCardProps) {\n const { t } = useTranslationRef(catalogTranslationRef);\n const {\n variant = 'gridItem',\n title = t('hasSubdomainsCard.title'),\n columns = domainEntityColumns,\n tableOptions = {},\n } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Domain\"\n relationType={RELATION_HAS_PART}\n columns={columns}\n asRenderableEntities={asDomainEntities}\n emptyMessage={t('hasSubdomainsCard.emptyMessage')}\n emptyHelpLink={domainEntityHelpLink}\n tableOptions={tableOptions}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ResponseError } from '@backstage/errors';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Divider from '@material-ui/core/Divider';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { CodeSnippet } from '../CodeSnippet';\nimport { CopyTextButton } from '../CopyTextButton';\nimport { ErrorPanel, ErrorPanelProps } from '../ErrorPanel';\n\nexport type ResponseErrorPanelClassKey = 'text' | 'divider';\n\nconst useStyles = makeStyles(\n theme => ({\n text: {\n fontFamily: 'monospace',\n whiteSpace: 'pre',\n overflowX: 'auto',\n marginRight: theme.spacing(2),\n },\n divider: {\n margin: theme.spacing(2),\n },\n }),\n { name: 'BackstageResponseErrorPanel' },\n);\n\n/**\n * Renders a warning panel as the effect of a failed server request.\n *\n * @remarks\n * Has special treatment for ResponseError errors, to display rich\n * server-provided information about what happened.\n */\nexport function ResponseErrorPanel(props: ErrorPanelProps) {\n const { title, error, defaultExpanded } = props;\n const classes = useStyles();\n\n if (error.name !== 'ResponseError') {\n return (\n <ErrorPanel\n title={title ?? error.message}\n defaultExpanded={defaultExpanded}\n error={error}\n />\n );\n }\n\n const { body, cause } = error as ResponseError;\n const { request, response } = body;\n\n const errorString = `${response.statusCode}: ${cause.name}`;\n const requestString = request && `${request.method} ${request.url}`;\n const messageString = cause.message.replace(/\\\\n/g, '\\n');\n const stackString = cause.stack?.replace(/\\\\n/g, '\\n');\n const jsonString = JSON.stringify(body, undefined, 2);\n\n return (\n <ErrorPanel\n title={title ?? error.message}\n defaultExpanded={defaultExpanded}\n error={{ name: errorString, message: messageString, stack: stackString }}\n >\n {requestString && (\n <ListItem alignItems=\"flex-start\">\n <ListItemText\n classes={{ secondary: classes.text }}\n primary=\"Request\"\n secondary={request ? `${requestString}` : undefined}\n />\n <CopyTextButton text={requestString} />\n </ListItem>\n )}\n <>\n <Divider component=\"li\" className={classes.divider} />\n <ListItem alignItems=\"flex-start\">\n <ListItemText\n classes={{ secondary: classes.text }}\n primary=\"Full Error as JSON\"\n />\n </ListItem>\n <CodeSnippet language=\"json\" text={jsonString} showCopyCodeButton />\n </>\n </ErrorPanel>\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 { Entity } from '@backstage/catalog-model';\nimport Typography from '@material-ui/core/Typography';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport {\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\nimport {\n asComponentEntities,\n asDomainEntities,\n asResourceEntities,\n asSystemEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n domainEntityColumns,\n domainEntityHelpLink,\n resourceEntityColumns,\n resourceEntityHelpLink,\n systemEntityColumns,\n systemEntityHelpLink,\n} from './presets';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\n tableOptions?: TableOptions;\n};\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport const RelatedEntitiesCard = <T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) => {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n tableOptions = {},\n } = props;\n const { t } = useTranslationRef(catalogTranslationRef);\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink} externalLinkIcon>\n {t('relatedEntitiesCard.emptyHelpLinkTitle')}\n </Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n tableOptions={tableOptions}\n />\n );\n};\n\nRelatedEntitiesCard.componentEntityColumns = componentEntityColumns;\nRelatedEntitiesCard.componentEntityHelpLink = componentEntityHelpLink;\nRelatedEntitiesCard.asComponentEntities = asComponentEntities;\nRelatedEntitiesCard.resourceEntityColumns = resourceEntityColumns;\nRelatedEntitiesCard.resourceEntityHelpLink = resourceEntityHelpLink;\nRelatedEntitiesCard.asResourceEntities = asResourceEntities;\nRelatedEntitiesCard.systemEntityColumns = systemEntityColumns;\nRelatedEntitiesCard.systemEntityHelpLink = systemEntityHelpLink;\nRelatedEntitiesCard.asSystemEntities = asSystemEntities;\nRelatedEntitiesCard.domainEntityColums = domainEntityColumns;\nRelatedEntitiesCard.domainEntityHelpLink = domainEntityHelpLink;\nRelatedEntitiesCard.asDomainEntities = asDomainEntities;\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 { Entity, parseEntityRef } from '@backstage/catalog-model';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { catalogApiRef } from '../api';\n\n/**\n * Fetches all entities that appear in the entity's relations, optionally\n * filtered by relation type and kind.\n *\n * @public\n */\nexport function useRelatedEntities(\n entity: Entity,\n relationFilter: { type?: string; kind?: string },\n): {\n entities: Entity[] | undefined;\n loading: boolean;\n error: Error | undefined;\n} {\n const filterByTypeLower = relationFilter?.type?.toLocaleLowerCase('en-US');\n const filterByKindLower = relationFilter?.kind?.toLocaleLowerCase('en-US');\n const catalogApi = useApi(catalogApiRef);\n\n const {\n loading,\n value: entities,\n error,\n } = useAsync(async () => {\n const relations = entity.relations?.filter(\n r =>\n (!filterByTypeLower ||\n r.type.toLocaleLowerCase('en-US') === filterByTypeLower) &&\n (!filterByKindLower ||\n parseEntityRef(r.targetRef).kind === filterByKindLower),\n );\n\n if (!relations?.length) {\n return [];\n }\n\n const { items } = await catalogApi.getEntitiesByRefs({\n entityRefs: relations.map(r => r.targetRef),\n });\n\n return items.filter((x): x is Entity => Boolean(x));\n }, [entity, filterByTypeLower, filterByKindLower]);\n\n return {\n entities,\n loading,\n error,\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n DomainEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n\nexport const domainEntityColumns: TableColumn<DomainEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'domain' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const domainEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-domain';\nexport const asDomainEntities = (entities: Entity[]): DomainEntity[] =>\n entities as DomainEntity[];\n"],"names":["useStyles","makeStyles","line","OverflowTooltip","props","classes","Tooltip","Typography","theme","BottomLink","link","title","onClick","Box","Divider","Link","ArrowIcon","SlackLink","slackChannel","t","useTranslationRef","coreComponentsTranslationRef","LinkButton","ErrorBoundary","Component","undefined","error","errorInfo","console","children","ErrorPanel","CardActionsTopRight","withStyles","CardActions","InfoCard","subheader","divider","deepLink","errorBoundaryProps","variant","alignContent","headerStyle","headerProps","icon","action","actionsClassName","actions","cardClassName","actionsTopRight","className","noPadding","titleTypographyProps","subheaderTypographyProps","calculatedStyle","calculatedCardStyle","variants","name","VARIANT_STYLES","Card","CardHeader","classNames","CardContent","columnFactories","Object","options","defaultKind","formatContent","entity","humanizeEntityRef","EntityTableColumnTitle","filter","entity1","entity2","EntityRefLink","relation","entityFilter","getRelations","getEntityRelations","r","EntityRefLinks","RELATION_OWNED_BY","RELATION_PART_OF","systemEntityColumns","componentEntityColumns","EntityTable","entities","emptyContent","columns","tableOptions","tableStyle","Table","translationKey","catalogReactTranslationRef","NewEntityContext","createVersionedContext","AsyncEntityProvider","loading","refresh","createVersionedValueMap","AnalyticsContext","stringifyEntityRef","useEntity","versionedHolder","useVersionedContext","Error","value","useAsyncEntity","catalogTranslationRef","createTranslationRef","HasSubdomainsCard","domainEntityColumns","RelatedEntitiesCard","RELATION_HAS_PART","asDomainEntities","domainEntityHelpLink","ResponseErrorPanel","defaultExpanded","body","cause","request","response","errorString","requestString","messageString","stackString","jsonString","JSON","ListItem","ListItemText","CopyTextButton","CodeSnippet","entityKind","relationType","emptyMessage","emptyHelpLink","asRenderableEntities","useRelatedEntities","relationFilter","filterByTypeLower","filterByKindLower","catalogApi","useApi","catalogApiRef","useAsync","relations","parseEntityRef","items","x","Boolean","Progress","componentEntityHelpLink","asComponentEntities","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityHelpLink","asSystemEntities"],"mappings":"+IAEA,IAAI,EAAyB,EAAQ,MAEjC,EAA0B,EAAQ,MAKtC,UAAe,CAAG,KAAK,EAEvB,IAAI,EAAQ,EAAwB,EAAQ,OAQ5C,UAAe,CAJA,AAAC,GAAG,AAFE,EAAuB,EAAQ,QAElB,OAAO,AAAD,EAAiB,EAAM,aAAa,CAAC,OAAQ,CACnF,EAAG,2DACL,GAAI,e,yFCYJ,IAAMA,EAAYC,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,EAChB,CACE,UAAW,CACT,SAAU,oBACZ,EACA,KAAM,CACJ,SAAU,UACV,SAAU,SACV,aAAc,WACd,QAAS,cACT,qBAAsB,CAAC,CAAEC,KAAAA,CAAI,CAAS,GAAKA,GAAQ,EACnD,qBAAsB,UACxB,CACF,EACA,CAAE,KAAM,0BAA2B,GAG9B,SAASC,EAAgBC,CAAY,EAC1C,IAAMC,EAAUL,EAAUI,GAE1B,MACE,UAACE,EAAAA,EAAOA,CAAAA,CACN,MAAOF,EAAM,KAAK,EAAKA,CAAAA,EAAM,IAAI,EAAI,EAAC,EACtC,UAAWA,EAAM,SAAS,C,SAE1B,UAACG,EAAAA,CAAUA,CAAAA,CAAC,UAAWF,EAAQ,IAAI,CAAE,QAAQ,U,SAC1CD,EAAM,IA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A0B,2BAC1B,wBAAyB,oBACzB,eAAgB,kBAChB,aAAc,gBACd,WAAY,cACZ,iBAAkB,CAChB,MAAO,cACP,MAAO,gBACT,EACA,WAAY,CACV,MAAO,QACP,MAAO,UACT,EACA,YAAa,CACX,MAAO,SACP,MAAO,WACT,EACA,YAAa,CACX,MAAO,SACP,MAAO,WACT,EACA,qBAAsB,CACpB,MAAO,mBACP,MAAO,qBACT,EACA,UAAW,CACT,MAAO,MACT,EACA,eAAgB,CACd,MAAO,WACT,EACA,UAAW,CACT,MAAO,OACP,MAAO,SACT,EACA,aAAc,CACZ,MAAO,SACT,CACF,EACA,iBAAkB,CAChB,UAAW,YACX,MAAO,OACT,EACA,aAAc,CACZ,kBAAmB,oCACnB,gBAAiB,OACjB,gBAAiB,OACjB,gBAAiB,mBACjB,kBAAmB,uBACrB,EACA,2BAA4B,CAC1B,MAAO,2BACP,aAAc,wCAChB,EACA,wBAAyB,CACvB,MAAO,wBACP,aAAc,gDAChB,EACA,uBAAwB,CACtB,MAAO,uBACP,aAAc,+CAChB,EACA,kBAAmB,CACjB,cAAe,UACf,gBAAiB,OACjB,iBAAkB,iBAClB,iBAAkB,kBAClB,oBAAqB,mBACvB,EACA,iBAAkB,CAChB,MAAO,SACP,iBACE,uHACF,oBAAqB,WACvB,EACA,aAAc,CACZ,kBAAmB,mBACnB,WAAY,QACZ,eAAgB,WAClB,EACA,gBAAiB,CACf,MAAO,QACP,iBACE,qHACF,oBAAqB,WACvB,EACA,eAAgB,CACd,MAAO,uBACP,YACE,2EACF,eAAgB,MAClB,EACA,aAAc,CACZ,YAAa,+CACb,kBAAmB,SACnB,kBAAmB,SACnB,YACE,6GACJ,EACA,kCAAmC,kCACnC,iCACE,+GACF,kBAAmB,CACjB,MAAO,iBACP,aAAc,qCAChB,EACA,iBAAkB,CAChB,MAAO,gBACP,aAAc,oCAChB,EACA,qBAAsB,CACpB,MAAO,oBACP,aAAc,2CAChB,EACA,kBAAmB,CACjB,MAAO,iBACP,aAA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AA,iBAAqC,GACrCA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,+BAAmD,GACpD,CACY8B,EACX,oFACWD,EAAmB,AAAC5B,GAC/BA,C"}
|
|
1
|
+
{"version":3,"file":"static/7203.7288c4e0.chunk.js","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/ArrowForward.js","webpack://techdocs-cli-embedded-app/../core-components/src/components/OverflowTooltip/OverflowTooltip.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/BottomLink/BottomLink.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/ErrorBoundary/ErrorBoundary.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/InfoCard/InfoCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityTable/columns.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityTable/presets.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityTable/EntityTable.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityTable/TitleColumn.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntity.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/alpha/translation.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasSubdomainsCard/HasSubdomainsCard.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/ResponseErrorPanel/ResponseErrorPanel.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useRelatedEntities.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"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: \"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"\n}), 'ArrowForward');\n\nexports.default = _default;","/*\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';\nimport Tooltip, { TooltipProps } from '@material-ui/core/Tooltip';\nimport Typography from '@material-ui/core/Typography';\n\ntype Props = {\n text?: string | undefined;\n title?: TooltipProps['title'];\n line?: number | undefined;\n placement?: TooltipProps['placement'];\n};\n\nexport type OverflowTooltipClassKey = 'container';\n\nconst useStyles = makeStyles(\n {\n container: {\n overflow: 'visible !important',\n },\n typo: {\n fontSize: 'inherit',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n '-webkit-line-clamp': ({ line }: Props) => line || 1,\n '-webkit-box-orient': 'vertical',\n },\n },\n { name: 'BackstageOverflowTooltip' },\n);\n\nexport function OverflowTooltip(props: Props) {\n const classes = useStyles(props);\n\n return (\n <Tooltip\n title={props.title ?? (props.text || '')}\n placement={props.placement}\n >\n <Typography className={classes.typo} variant=\"inherit\">\n {props.text}\n </Typography>\n </Tooltip>\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 Divider from '@material-ui/core/Divider';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowIcon from '@material-ui/icons/ArrowForward';\nimport { MouseEvent } from 'react';\nimport { Link } from '../../components/Link';\n\n/** @public */\nexport type BottomLinkClassKey = 'root' | 'boxTitle' | 'arrow';\n\nconst useStyles = makeStyles(\n theme => ({\n root: {\n maxWidth: 'fit-content',\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n boxTitle: {\n margin: 0,\n color: theme.palette.textSubtle,\n },\n arrow: {\n color: theme.palette.textSubtle,\n },\n }),\n { name: 'BackstageBottomLink' },\n);\n\n/** @public */\nexport type BottomLinkProps = {\n link: string;\n title: string;\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n};\n\n/**\n * Footer with link used in {@link InfoCard } and {@link TabbedCard}\n *\n * @public\n *\n */\nexport function BottomLink(props: BottomLinkProps) {\n const { link, title, onClick } = props;\n const classes = useStyles();\n\n return (\n <Box>\n <Divider />\n <Link to={link} onClick={onClick} underline=\"none\">\n <Box display=\"flex\" alignItems=\"center\" className={classes.root}>\n <Box className={classes.boxTitle} fontWeight=\"fontWeightBold\" m={1}>\n <Typography>\n <strong>{title}</strong>\n </Typography>\n </Box>\n <ArrowIcon className={classes.arrow} />\n </Box>\n </Link>\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 Typography from '@material-ui/core/Typography';\nimport { PropsWithChildren, ComponentClass, Component, ErrorInfo } from 'react';\nimport { LinkButton } from '../../components/LinkButton';\nimport { ErrorPanel } from '../../components/ErrorPanel';\nimport { coreComponentsTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\ntype SlackChannel = {\n name: string;\n href?: string;\n};\n\n/** @public */\nexport type ErrorBoundaryProps = PropsWithChildren<{\n slackChannel?: string | SlackChannel;\n onError?: (error: Error, errorInfo: string) => null;\n}>;\n\ntype State = {\n error?: Error;\n errorInfo?: ErrorInfo;\n};\n\nconst SlackLink = (props: { slackChannel?: string | SlackChannel }) => {\n const { slackChannel } = props;\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n\n if (!slackChannel) {\n return null;\n } else if (typeof slackChannel === 'string') {\n return (\n <Typography>{t('errorBoundary.title', { slackChannel })}</Typography>\n );\n } else if (!slackChannel.href) {\n return (\n <Typography>\n {t('errorBoundary.title', {\n slackChannel: slackChannel.name,\n })}\n </Typography>\n );\n }\n\n return (\n <LinkButton to={slackChannel.href} variant=\"contained\">\n {slackChannel.name}\n </LinkButton>\n );\n};\n\n/** @public */\nexport const ErrorBoundary: ComponentClass<\n ErrorBoundaryProps,\n State\n> = class ErrorBoundary extends Component<ErrorBoundaryProps, State> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = {\n error: undefined,\n errorInfo: undefined,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // eslint-disable-next-line no-console\n console.error(`ErrorBoundary, error: ${error}`, { error, errorInfo });\n this.setState({ error, errorInfo });\n }\n\n render() {\n const { slackChannel, children } = this.props;\n const { error } = this.state;\n\n if (!error) {\n return children;\n }\n\n return (\n <ErrorPanel title=\"Something Went Wrong\" error={error}>\n <SlackLink slackChannel={slackChannel} />\n </ErrorPanel>\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 Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader, { CardHeaderProps } from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport { ReactNode } from 'react';\nimport { BottomLink, BottomLinkProps } from '../BottomLink';\nimport { ErrorBoundary, ErrorBoundaryProps } from '../ErrorBoundary';\n\n/** @public */\nexport type InfoCardClassKey =\n | 'noPadding'\n | 'header'\n | 'headerTitle'\n | 'headerSubheader'\n | 'headerAvatar'\n | 'headerAction'\n | 'headerContent';\n\nconst useStyles = makeStyles(\n theme => ({\n noPadding: {\n padding: 0,\n '&:last-child': {\n paddingBottom: 0,\n },\n },\n contentAlignBottom: {\n display: 'flex',\n alignItems: 'self-end',\n },\n header: {\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n headerTitle: {\n fontWeight: theme.typography.fontWeightBold,\n },\n headerSubheader: {\n paddingTop: theme.spacing(1),\n },\n headerAvatar: {},\n headerAction: {},\n headerContent: {},\n subheader: {\n display: 'flex',\n },\n }),\n { name: 'BackstageInfoCard' },\n);\n\n/** @public */\nexport type CardActionsTopRightClassKey = 'root';\n\nconst CardActionsTopRight = withStyles(\n theme => ({\n root: {\n display: 'inline-block',\n padding: theme.spacing(8, 8, 0, 0),\n float: 'right',\n },\n }),\n { name: 'BackstageInfoCardCardActionsTopRight' },\n)(CardActions);\n\nconst VARIANT_STYLES = {\n card: {\n flex: {\n display: 'flex',\n flexDirection: 'column',\n },\n fullHeight: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n gridItem: {\n display: 'flex',\n flexDirection: 'column',\n height: 'calc(100% - 10px)', // for pages without content header\n marginBottom: '10px',\n breakInside: 'avoid-page',\n '@media print': {\n height: 'auto',\n },\n },\n },\n cardContent: {\n fullHeight: {\n flex: 1,\n },\n gridItem: {\n flex: 1,\n },\n },\n};\n\n/** @public */\nexport type InfoCardVariants = 'flex' | 'fullHeight' | 'gridItem';\n\n/**\n * InfoCard is used to display a paper-styled block on the screen, similar to a panel.\n *\n * You can custom style an InfoCard with the 'className' (outer container) and 'cardClassName' (inner container)\n * props. This is typically used with the material-ui makeStyles mechanism.\n *\n * The InfoCard serves as an error boundary. As a result, if you provide an 'errorBoundaryProps' property this\n * specifies the extra information to display in the error component that is displayed if an error occurs\n * in any descendent components.\n *\n * By default the InfoCard has no custom layout of its children, but is treated as a block element. A\n * couple common variants are provided and can be specified via the variant property:\n *\n * When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items.\n * Set to the 'gridItem' variant to display the InfoCard with full height suitable for Grid:\n *\n * `<InfoCard variant=\"gridItem\">...</InfoCard>`\n */\nexport type Props = {\n title?: ReactNode;\n subheader?: ReactNode;\n divider?: boolean;\n deepLink?: BottomLinkProps;\n /** @deprecated Use errorBoundaryProps instead */\n slackChannel?: string;\n errorBoundaryProps?: ErrorBoundaryProps;\n variant?: InfoCardVariants;\n alignContent?: 'normal' | 'bottom';\n children?: ReactNode;\n headerStyle?: object;\n headerProps?: CardHeaderProps;\n icon?: ReactNode;\n action?: ReactNode;\n actionsClassName?: string;\n actions?: ReactNode;\n cardClassName?: string;\n actionsTopRight?: ReactNode;\n className?: string;\n noPadding?: boolean;\n titleTypographyProps?: object;\n subheaderTypographyProps?: object;\n};\n\n/**\n * Material-ui card with header , content and actions footer\n *\n * @public\n *\n */\nexport function InfoCard(props: Props): JSX.Element {\n const {\n title,\n subheader,\n divider = true,\n deepLink,\n slackChannel,\n errorBoundaryProps,\n variant,\n alignContent = 'normal',\n children,\n headerStyle,\n headerProps,\n icon,\n action,\n actionsClassName,\n actions,\n cardClassName,\n actionsTopRight,\n className,\n noPadding,\n titleTypographyProps,\n subheaderTypographyProps,\n } = props;\n const classes = useStyles();\n /**\n * If variant is specified, we build up styles for that particular variant for both\n * the Card and the CardContent (since these need to be synced)\n */\n let calculatedStyle = {};\n let calculatedCardStyle = {};\n if (variant) {\n const variants = variant.split(/[\\s]+/g);\n variants.forEach(name => {\n calculatedStyle = {\n ...calculatedStyle,\n ...VARIANT_STYLES.card[name as keyof (typeof VARIANT_STYLES)['card']],\n };\n calculatedCardStyle = {\n ...calculatedCardStyle,\n ...VARIANT_STYLES.cardContent[\n name as keyof (typeof VARIANT_STYLES)['cardContent']\n ],\n };\n });\n }\n\n const cardSubTitle = () => {\n if (!subheader && !icon) {\n return null;\n }\n\n return (\n <div data-testid=\"info-card-subheader\">\n {subheader && <div className={classes.subheader}>{subheader}</div>}\n {icon}\n </div>\n );\n };\n\n const errProps: ErrorBoundaryProps =\n errorBoundaryProps || (slackChannel ? { slackChannel } : {});\n\n return (\n <Card style={calculatedStyle} className={className}>\n <ErrorBoundary {...errProps}>\n {title && (\n <CardHeader\n classes={{\n root: classNames(classes.header),\n title: classes.headerTitle,\n subheader: classes.headerSubheader,\n avatar: classes.headerAvatar,\n action: classes.headerAction,\n content: classes.headerContent,\n }}\n title={title}\n subheader={cardSubTitle()}\n action={action}\n style={{ ...headerStyle }}\n titleTypographyProps={titleTypographyProps}\n subheaderTypographyProps={subheaderTypographyProps}\n {...headerProps}\n />\n )}\n {actionsTopRight && (\n <CardActionsTopRight>{actionsTopRight}</CardActionsTopRight>\n )}\n {divider && <Divider />}\n <CardContent\n className={classNames(cardClassName, {\n [classes.noPadding]: noPadding,\n [classes.contentAlignBottom]: alignContent === 'bottom',\n })}\n style={calculatedCardStyle}\n >\n {children}\n </CardContent>\n {actions && (\n <CardActions className={actionsClassName}>{actions}</CardActions>\n )}\n {deepLink && <BottomLink {...deepLink} />}\n </ErrorBoundary>\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 {\n Entity,\n CompoundEntityRef,\n RELATION_OWNED_BY,\n RELATION_PART_OF,\n} from '@backstage/catalog-model';\nimport { OverflowTooltip, TableColumn } from '@backstage/core-components';\nimport { getEntityRelations } from '../../utils';\nimport {\n EntityRefLink,\n EntityRefLinks,\n humanizeEntityRef,\n} from '../EntityRefLink';\nimport { EntityTableColumnTitle } from './TitleColumn';\n\n/** @public */\nexport const columnFactories = Object.freeze({\n createEntityRefColumn<T extends Entity>(options: {\n defaultKind?: string;\n }): TableColumn<T> {\n const { defaultKind } = options;\n function formatContent(entity: T): string {\n return (\n entity.metadata?.title ||\n humanizeEntityRef(entity, {\n defaultKind,\n })\n );\n }\n\n return {\n title: <EntityTableColumnTitle translationKey=\"name\" />,\n highlight: true,\n customFilterAndSearch(filter, entity) {\n // TODO: We could implement this more efficiently, like searching over\n // each field that is displayed individually (kind, namespace, name).\n // but that might confuse the user as it will behave different than a\n // simple text search.\n // Another alternative would be to cache the values. But writing them\n // into the entity feels bad too.\n return formatContent(entity).includes(filter);\n },\n customSort(entity1, entity2) {\n // TODO: We could implement this more efficiently by comparing field by field.\n // This has similar issues as above.\n return formatContent(entity1).localeCompare(formatContent(entity2));\n },\n render: entity => (\n <EntityRefLink\n entityRef={entity}\n defaultKind={defaultKind}\n title={entity.metadata?.title}\n />\n ),\n };\n },\n createEntityRelationColumn<T extends Entity>(options: {\n title: string | JSX.Element;\n relation: string;\n defaultKind?: string;\n filter?: { kind: string };\n }): TableColumn<T> {\n const { title, relation, defaultKind, filter: entityFilter } = options;\n\n function getRelations(entity: T): CompoundEntityRef[] {\n return getEntityRelations(entity, relation, entityFilter);\n }\n\n function formatContent(entity: T): string {\n return getRelations(entity)\n .map(r => humanizeEntityRef(r, { defaultKind }))\n .join(', ');\n }\n\n return {\n title,\n customFilterAndSearch(filter, entity) {\n return formatContent(entity).includes(filter);\n },\n customSort(entity1, entity2) {\n return formatContent(entity1).localeCompare(formatContent(entity2));\n },\n render: entity => {\n return (\n <EntityRefLinks\n entityRefs={getRelations(entity)}\n defaultKind={defaultKind}\n />\n );\n },\n };\n },\n createOwnerColumn<T extends Entity>(): TableColumn<T> {\n return this.createEntityRelationColumn({\n title: <EntityTableColumnTitle translationKey=\"owner\" />,\n relation: RELATION_OWNED_BY,\n defaultKind: 'group',\n });\n },\n createDomainColumn<T extends Entity>(): TableColumn<T> {\n return this.createEntityRelationColumn({\n title: <EntityTableColumnTitle translationKey=\"domain\" />,\n relation: RELATION_PART_OF,\n defaultKind: 'domain',\n filter: {\n kind: 'domain',\n },\n });\n },\n createSystemColumn<T extends Entity>(): TableColumn<T> {\n return this.createEntityRelationColumn({\n title: <EntityTableColumnTitle translationKey=\"system\" />,\n relation: RELATION_PART_OF,\n defaultKind: 'system',\n filter: {\n kind: 'system',\n },\n });\n },\n createMetadataDescriptionColumn<T extends Entity>(): TableColumn<T> {\n return {\n title: <EntityTableColumnTitle translationKey=\"description\" />,\n field: 'metadata.description',\n render: entity => (\n <OverflowTooltip\n text={entity.metadata.description}\n placement=\"bottom-start\"\n line={2}\n />\n ),\n };\n },\n createSpecLifecycleColumn<T extends Entity>(): TableColumn<T> {\n return {\n title: <EntityTableColumnTitle translationKey=\"lifecycle\" />,\n field: 'spec.lifecycle',\n };\n },\n createSpecTypeColumn<T extends Entity>(): TableColumn<T> {\n return {\n title: <EntityTableColumnTitle translationKey=\"type\" />,\n field: 'spec.type',\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 { ComponentEntity, SystemEntity } from '@backstage/catalog-model';\nimport { TableColumn } from '@backstage/core-components';\nimport { columnFactories } from './columns';\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n columnFactories.createEntityRefColumn({ defaultKind: 'system' }),\n columnFactories.createDomainColumn(),\n columnFactories.createOwnerColumn(),\n columnFactories.createMetadataDescriptionColumn(),\n];\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n columnFactories.createEntityRefColumn({ defaultKind: 'component' }),\n columnFactories.createSystemColumn(),\n columnFactories.createOwnerColumn(),\n columnFactories.createSpecTypeColumn(),\n columnFactories.createSpecLifecycleColumn(),\n columnFactories.createMetadataDescriptionColumn(),\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 { Entity } from '@backstage/catalog-model';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { CSSProperties, ReactNode } from 'react';\nimport { columnFactories } from './columns';\nimport { componentEntityColumns, systemEntityColumns } from './presets';\nimport {\n InfoCardVariants,\n Table,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\n\n/**\n * Props for {@link EntityTable}.\n *\n * @public\n */\nexport interface EntityTableProps<T extends Entity> {\n title: string;\n variant?: InfoCardVariants;\n entities: T[];\n emptyContent?: ReactNode;\n columns: TableColumn<T>[];\n tableOptions?: TableOptions;\n}\n\nconst useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n\n/**\n * A general entity table component, that can be used for composing more\n * specific entity tables.\n *\n * @public\n */\nexport const EntityTable = <T extends Entity>(props: EntityTableProps<T>) => {\n const {\n entities,\n title,\n emptyContent,\n variant = 'gridItem',\n columns,\n tableOptions = {},\n } = props;\n\n const classes = useStyles();\n const tableStyle: CSSProperties = {\n minWidth: '0',\n width: '100%',\n };\n\n if (variant === 'gridItem') {\n tableStyle.height = 'calc(100% - 10px)';\n }\n\n return (\n <Table<T>\n columns={columns}\n title={title}\n style={tableStyle}\n emptyContent={\n emptyContent && <div className={classes.empty}>{emptyContent}</div>\n }\n options={{\n // TODO: Toolbar padding if off compared to other cards, should be: padding: 16px 24px;\n search: false,\n paging: false,\n actionsColumnIndex: -1,\n padding: 'dense',\n draggable: false,\n ...tableOptions,\n }}\n data={entities}\n />\n );\n};\n\nEntityTable.columns = columnFactories;\n\nEntityTable.systemEntityColumns = systemEntityColumns;\n\nEntityTable.componentEntityColumns = componentEntityColumns;\n","/*\n * Copyright 2025 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 { useTranslationRef } from '@backstage/frontend-plugin-api';\nimport { catalogReactTranslationRef } from '../../translation';\n\n/**\n * @alpha\n */\nexport type EntityTableColumnTitleProps = {\n translationKey:\n | 'name'\n | 'system'\n | 'owner'\n | 'type'\n | 'lifecycle'\n | 'namespace'\n | 'description'\n | 'tags'\n | 'targets'\n | 'title'\n | 'label'\n | 'domain';\n};\n\n/**\n * @alpha\n */\nexport const EntityTableColumnTitle = ({\n translationKey,\n}: EntityTableColumnTitleProps) => {\n const { t } = useTranslationRef(catalogReactTranslationRef);\n return t(`entityTableColumnTitle.${translationKey}`);\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 */\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { AnalyticsContext } from '@backstage/core-plugin-api';\nimport {\n createVersionedContext,\n createVersionedValueMap,\n useVersionedContext,\n} from '@backstage/version-bridge';\nimport { ReactNode } from 'react';\n\n/** @public */\nexport type EntityLoadingStatus<TEntity extends Entity = Entity> = {\n entity?: TEntity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n};\n\n// This context has support for multiple concurrent versions of this package.\n// It is currently used in parallel with the old context in order to provide\n// a smooth transition, but will eventually be the only context we use.\nconst NewEntityContext = createVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n);\n\n/**\n * Properties for the AsyncEntityProvider component.\n *\n * @public\n */\nexport interface AsyncEntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n}\n\n/**\n * Provides a loaded entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const AsyncEntityProvider = (props: AsyncEntityProviderProps) => {\n const { children, entity, loading, error, refresh } = props;\n const value = { entity, loading, error, refresh };\n // We provide both the old and the new context, since\n // consumers might be doing things like `useContext(EntityContext)`\n return (\n <NewEntityContext.Provider value={createVersionedValueMap({ 1: value })}>\n <AnalyticsContext\n attributes={{\n ...(entity ? { entityRef: stringifyEntityRef(entity) } : undefined),\n }}\n >\n {children}\n </AnalyticsContext>\n </NewEntityContext.Provider>\n );\n};\n\n/**\n * Properties for the EntityProvider component.\n *\n * @public\n */\nexport interface EntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n}\n\n/**\n * Provides an entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const EntityProvider = (props: EntityProviderProps) => (\n <AsyncEntityProvider\n entity={props.entity}\n loading={!Boolean(props.entity)}\n error={undefined}\n refresh={undefined}\n children={props.children}\n />\n);\n\n/**\n * Grab the current entity from the context, throws if the entity has not yet been loaded\n * or is not available.\n *\n * @public\n */\nexport function useEntity<TEntity extends Entity = Entity>(): {\n entity: TEntity;\n} {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n if (!value.entity) {\n throw new Error(\n 'useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.',\n );\n }\n\n return { entity: value.entity as TEntity };\n}\n\n/**\n * Grab the current entity from the context, provides loading state and errors, and the ability to refresh.\n *\n * @public\n */\nexport function useAsyncEntity<\n TEntity extends Entity = Entity,\n>(): EntityLoadingStatus<TEntity> {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n const { entity, loading, error, refresh } = value;\n return { entity: entity as TEntity, loading, error, refresh };\n}\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n supportButtonContent: 'All your software catalog entities',\n },\n aboutCard: {\n title: 'About',\n refreshButtonTitle: 'Schedule entity refresh',\n editButtonTitle: 'Edit Metadata',\n createSimilarButtonTitle: 'Create something similar',\n refreshScheduledMessage: 'Refresh scheduled',\n launchTemplate: 'Launch Template',\n viewTechdocs: 'View TechDocs',\n viewSource: 'View Source',\n descriptionField: {\n label: 'Description',\n value: 'No description',\n },\n ownerField: {\n label: 'Owner',\n value: 'No Owner',\n },\n domainField: {\n label: 'Domain',\n value: 'No Domain',\n },\n systemField: {\n label: 'System',\n value: 'No System',\n },\n parentComponentField: {\n label: 'Parent Component',\n value: 'No Parent Component',\n },\n typeField: {\n label: 'Type',\n },\n lifecycleField: {\n label: 'Lifecycle',\n },\n tagsField: {\n label: 'Tags',\n value: 'No Tags',\n },\n targetsField: {\n label: 'Targets',\n },\n },\n searchResultItem: {\n lifecycle: 'Lifecycle',\n Owner: 'Owner',\n },\n catalogTable: {\n warningPanelTitle: 'Could not fetch catalog entities.',\n viewActionTitle: 'View',\n editActionTitle: 'Edit',\n starActionTitle: 'Add to favorites',\n unStarActionTitle: 'Remove from favorites',\n },\n dependencyOfComponentsCard: {\n title: 'Dependency of components',\n emptyMessage: 'No component depends on this component',\n },\n dependsOnComponentsCard: {\n title: 'Depends on components',\n emptyMessage: 'No component is a dependency of this component',\n },\n dependsOnResourcesCard: {\n title: 'Depends on resources',\n emptyMessage: 'No resource is a dependency of this component',\n },\n entityContextMenu: {\n copiedMessage: 'Copied!',\n moreButtonTitle: 'More',\n inspectMenuTitle: 'Inspect entity',\n copyURLMenuTitle: 'Copy entity URL',\n unregisterMenuTitle: 'Unregister entity',\n },\n entityLabelsCard: {\n title: 'Labels',\n emptyDescription:\n 'No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityLabels: {\n warningPanelTitle: 'Entity not found',\n ownerLabel: 'Owner',\n lifecycleLabel: 'Lifecycle',\n },\n entityLinksCard: {\n title: 'Links',\n emptyDescription:\n 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityNotFound: {\n title: 'Entity was not found',\n description:\n 'Want to help us build this? Check out our Getting Started documentation.',\n docButtonTitle: 'DOCS',\n },\n deleteEntity: {\n dialogTitle: 'Are you sure you want to delete this entity?',\n deleteButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n description:\n 'This entity is not referenced by any location and is therefore not receiving updates. Click here to delete.',\n },\n entityProcessingErrorsDescription: 'The error below originates from',\n entityRelationWarningDescription:\n \"This entity has relations to other entities, which can't be found in the catalog.\\n Entities not found are: \",\n hasComponentsCard: {\n title: 'Has components',\n emptyMessage: 'No component is part of this system',\n },\n hasResourcesCard: {\n title: 'Has resources',\n emptyMessage: 'No resource is part of this system',\n },\n hasSubcomponentsCard: {\n title: 'Has subcomponents',\n emptyMessage: 'No subcomponent is part of this component',\n },\n hasSubdomainsCard: {\n title: 'Has subdomains',\n emptyMessage: 'No subdomain is part of this domain',\n },\n hasSystemsCard: {\n title: 'Has systems',\n emptyMessage: 'No system is part of this domain',\n },\n relatedEntitiesCard: {\n emptyHelpLinkTitle: 'Learn how to change this',\n },\n systemDiagramCard: {\n title: 'System Diagram',\n description: 'Use pinch & zoom to move around the diagram.',\n edgeLabels: {\n partOf: 'part of',\n provides: 'provides',\n dependsOn: 'depends on',\n },\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 { DomainEntity, RELATION_HAS_PART } from '@backstage/catalog-model';\nimport {\n InfoCardVariants,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\nimport {\n asDomainEntities,\n domainEntityColumns,\n domainEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport interface HasSubdomainsCardProps {\n variant?: InfoCardVariants;\n tableOptions?: TableOptions;\n columns?: TableColumn<DomainEntity>[];\n title?: string;\n}\n\nexport function HasSubdomainsCard(props: HasSubdomainsCardProps) {\n const { t } = useTranslationRef(catalogTranslationRef);\n const {\n variant = 'gridItem',\n title = t('hasSubdomainsCard.title'),\n columns = domainEntityColumns,\n tableOptions = {},\n } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Domain\"\n relationType={RELATION_HAS_PART}\n columns={columns}\n asRenderableEntities={asDomainEntities}\n emptyMessage={t('hasSubdomainsCard.emptyMessage')}\n emptyHelpLink={domainEntityHelpLink}\n tableOptions={tableOptions}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ResponseError } from '@backstage/errors';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Divider from '@material-ui/core/Divider';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { CodeSnippet } from '../CodeSnippet';\nimport { CopyTextButton } from '../CopyTextButton';\nimport { ErrorPanel, ErrorPanelProps } from '../ErrorPanel';\n\nexport type ResponseErrorPanelClassKey = 'text' | 'divider';\n\nconst useStyles = makeStyles(\n theme => ({\n text: {\n fontFamily: 'monospace',\n whiteSpace: 'pre',\n overflowX: 'auto',\n marginRight: theme.spacing(2),\n },\n divider: {\n margin: theme.spacing(2),\n },\n }),\n { name: 'BackstageResponseErrorPanel' },\n);\n\n/**\n * Renders a warning panel as the effect of a failed server request.\n *\n * @remarks\n * Has special treatment for ResponseError errors, to display rich\n * server-provided information about what happened.\n */\nexport function ResponseErrorPanel(props: ErrorPanelProps) {\n const { title, error, defaultExpanded } = props;\n const classes = useStyles();\n\n if (error.name !== 'ResponseError') {\n return (\n <ErrorPanel\n title={title ?? error.message}\n defaultExpanded={defaultExpanded}\n error={error}\n />\n );\n }\n\n const { body, cause } = error as ResponseError;\n const { request, response } = body;\n\n const errorString = `${response.statusCode}: ${cause.name}`;\n const requestString = request && `${request.method} ${request.url}`;\n const messageString = cause.message.replace(/\\\\n/g, '\\n');\n const stackString = cause.stack?.replace(/\\\\n/g, '\\n');\n const jsonString = JSON.stringify(body, undefined, 2);\n\n return (\n <ErrorPanel\n title={title ?? error.message}\n defaultExpanded={defaultExpanded}\n error={{ name: errorString, message: messageString, stack: stackString }}\n >\n {requestString && (\n <ListItem alignItems=\"flex-start\">\n <ListItemText\n classes={{ secondary: classes.text }}\n primary=\"Request\"\n secondary={request ? `${requestString}` : undefined}\n />\n <CopyTextButton text={requestString} />\n </ListItem>\n )}\n <>\n <Divider component=\"li\" className={classes.divider} />\n <ListItem alignItems=\"flex-start\">\n <ListItemText\n classes={{ secondary: classes.text }}\n primary=\"Full Error as JSON\"\n />\n </ListItem>\n <CodeSnippet language=\"json\" text={jsonString} showCopyCodeButton />\n </>\n </ErrorPanel>\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 { Entity } from '@backstage/catalog-model';\nimport Typography from '@material-ui/core/Typography';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport {\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\nimport {\n asComponentEntities,\n asDomainEntities,\n asResourceEntities,\n asSystemEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n domainEntityColumns,\n domainEntityHelpLink,\n resourceEntityColumns,\n resourceEntityHelpLink,\n systemEntityColumns,\n systemEntityHelpLink,\n} from './presets';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\n tableOptions?: TableOptions;\n};\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport const RelatedEntitiesCard = <T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) => {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n tableOptions = {},\n } = props;\n const { t } = useTranslationRef(catalogTranslationRef);\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink} externalLinkIcon>\n {t('relatedEntitiesCard.emptyHelpLinkTitle')}\n </Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n tableOptions={tableOptions}\n />\n );\n};\n\nRelatedEntitiesCard.componentEntityColumns = componentEntityColumns;\nRelatedEntitiesCard.componentEntityHelpLink = componentEntityHelpLink;\nRelatedEntitiesCard.asComponentEntities = asComponentEntities;\nRelatedEntitiesCard.resourceEntityColumns = resourceEntityColumns;\nRelatedEntitiesCard.resourceEntityHelpLink = resourceEntityHelpLink;\nRelatedEntitiesCard.asResourceEntities = asResourceEntities;\nRelatedEntitiesCard.systemEntityColumns = systemEntityColumns;\nRelatedEntitiesCard.systemEntityHelpLink = systemEntityHelpLink;\nRelatedEntitiesCard.asSystemEntities = asSystemEntities;\nRelatedEntitiesCard.domainEntityColums = domainEntityColumns;\nRelatedEntitiesCard.domainEntityHelpLink = domainEntityHelpLink;\nRelatedEntitiesCard.asDomainEntities = asDomainEntities;\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 { Entity, parseEntityRef } from '@backstage/catalog-model';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { catalogApiRef } from '../api';\n\n/**\n * Fetches all entities that appear in the entity's relations, optionally\n * filtered by relation type and kind.\n *\n * @public\n */\nexport function useRelatedEntities(\n entity: Entity,\n relationFilter: { type?: string; kind?: string },\n): {\n entities: Entity[] | undefined;\n loading: boolean;\n error: Error | undefined;\n} {\n const filterByTypeLower = relationFilter?.type?.toLocaleLowerCase('en-US');\n const filterByKindLower = relationFilter?.kind?.toLocaleLowerCase('en-US');\n const catalogApi = useApi(catalogApiRef);\n\n const {\n loading,\n value: entities,\n error,\n } = useAsync(async () => {\n const relations = entity.relations?.filter(\n r =>\n (!filterByTypeLower ||\n r.type.toLocaleLowerCase('en-US') === filterByTypeLower) &&\n (!filterByKindLower ||\n parseEntityRef(r.targetRef).kind === filterByKindLower),\n );\n\n if (!relations?.length) {\n return [];\n }\n\n const { items } = await catalogApi.getEntitiesByRefs({\n entityRefs: relations.map(r => r.targetRef),\n });\n\n return items.filter((x): x is Entity => Boolean(x));\n }, [entity, filterByTypeLower, filterByKindLower]);\n\n return {\n entities,\n loading,\n error,\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n DomainEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n\nexport const domainEntityColumns: TableColumn<DomainEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'domain' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const domainEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-domain';\nexport const asDomainEntities = (entities: Entity[]): DomainEntity[] =>\n entities as DomainEntity[];\n"],"names":["useStyles","makeStyles","line","OverflowTooltip","props","classes","Tooltip","Typography","theme","BottomLink","link","title","onClick","Box","Divider","Link","ArrowIcon","SlackLink","slackChannel","t","useTranslationRef","coreComponentsTranslationRef","LinkButton","ErrorBoundary","Component","undefined","error","errorInfo","console","children","ErrorPanel","CardActionsTopRight","withStyles","CardActions","InfoCard","subheader","divider","deepLink","errorBoundaryProps","variant","alignContent","headerStyle","headerProps","icon","action","actionsClassName","actions","cardClassName","actionsTopRight","className","noPadding","titleTypographyProps","subheaderTypographyProps","calculatedStyle","calculatedCardStyle","variants","name","VARIANT_STYLES","Card","CardHeader","classNames","CardContent","columnFactories","Object","options","defaultKind","formatContent","entity","humanizeEntityRef","EntityTableColumnTitle","filter","entity1","entity2","EntityRefLink","relation","entityFilter","getRelations","getEntityRelations","r","EntityRefLinks","RELATION_OWNED_BY","RELATION_PART_OF","systemEntityColumns","componentEntityColumns","EntityTable","entities","emptyContent","columns","tableOptions","tableStyle","Table","translationKey","catalogReactTranslationRef","NewEntityContext","createVersionedContext","AsyncEntityProvider","loading","refresh","createVersionedValueMap","AnalyticsContext","stringifyEntityRef","useEntity","versionedHolder","useVersionedContext","Error","value","useAsyncEntity","catalogTranslationRef","createTranslationRef","HasSubdomainsCard","domainEntityColumns","RelatedEntitiesCard","RELATION_HAS_PART","asDomainEntities","domainEntityHelpLink","ResponseErrorPanel","defaultExpanded","body","cause","request","response","errorString","requestString","messageString","stackString","jsonString","JSON","ListItem","ListItemText","CopyTextButton","CodeSnippet","entityKind","relationType","emptyMessage","emptyHelpLink","asRenderableEntities","useRelatedEntities","relationFilter","filterByTypeLower","filterByKindLower","catalogApi","useApi","catalogApiRef","useAsync","relations","parseEntityRef","items","x","Boolean","Progress","componentEntityHelpLink","asComponentEntities","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityHelpLink","asSystemEntities"],"mappings":"+IAEA,IAAI,EAAyB,EAAQ,MAEjC,EAA0B,EAAQ,MAKtC,UAAe,CAAG,KAAK,EAEvB,IAAI,EAAQ,EAAwB,EAAQ,OAQ5C,UAAe,CAJA,AAAC,GAAG,AAFE,EAAuB,EAAQ,QAElB,OAAO,AAAD,EAAiB,EAAM,aAAa,CAAC,OAAQ,CACnF,EAAG,2DACL,GAAI,e,yFCYJ,IAAMA,EAAYC,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,EAChB,CACE,UAAW,CACT,SAAU,oBACZ,EACA,KAAM,CACJ,SAAU,UACV,SAAU,SACV,aAAc,WACd,QAAS,cACT,qBAAsB,CAAC,CAAEC,KAAAA,CAAI,CAAS,GAAKA,GAAQ,EACnD,qBAAsB,UACxB,CACF,EACA,CAAE,KAAM,0BAA2B,GAG9B,SAASC,EAAgBC,CAAY,EAC1C,IAAMC,EAAUL,EAAUI,GAE1B,MACE,UAACE,EAAAA,EAAOA,CAAAA,CACN,MAAOF,EAAM,KAAK,EAAKA,CAAAA,EAAM,IAAI,EAAI,EAAC,EACtC,UAAWA,EAAM,SAAS,C,SAE1B,UAACG,EAAAA,CAAUA,CAAAA,CAAC,UAAWF,EAAQ,IAAI,CAAE,QAAQ,U,SAC1CD,EAAM,IAAI,A,IAInB,C,oMChCA,IAAMJ,EAAYC,AAAAA,GAAAA,EAAAA,CAAAA,AAAAA,EAChBO,AAAAA,GAAU,EACR,KAAM,CACJ,SAAU,cACV,QAASA,EAAM,OAAO,CAAC,EAAG,EAAG,EAAG,IAClC,EACA,SAAU,CACR,OAAQ,EACR,MAAOA,EAAM,OAAO,CAAC,UAAU,AACjC,EACA,MAAO,CACL,MAAOA,EAAM,OAAO,CAAC,UAAU,AACjC,CACF,GACA,CAAE,K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GACrCA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,oBAAwC,GACxCA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,yBAA6C,GAC7CA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,+BAAmD,GACpD,CACYkE,EACX,uFACWC,EAAsB,AAAClE,GAClCA,EAEWmE,EAAuD,CAClEpE,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,qBAAyC,CAAC,CAAE,YAAa,UAAW,GACpEA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,iBAAqC,GACrCA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,oBAAwC,GACxCA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,yBAA6C,GAC7CA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,+BAAmD,GACpD,CACYqE,EACX,sFACWC,EAAqB,AAACrE,GACjCA,EAEWH,EAAmD,CAC9DE,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,qBAAyC,CAAC,CAAE,YAAa,QAAS,GAClEA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,iBAAqC,GACrCA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,+BAAmD,GACpD,CACYuE,EACX,oFACWC,EAAmB,AAACvE,GAC/BA,EAEWyB,EAAmD,CAC9D1B,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,qBAAyC,CAAC,CAAE,YAAa,QAAS,GAClEA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,iBAAqC,GACrCA,EAAAA,CAAAA,CAAAA,OAAAA,CAAAA,+BAAmD,GACpD,CACY8B,EACX,oFACWD,EAAmB,AAAC5B,GAC/BA,C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["7226"],{52235:function(e,t,a){var r=a(4293),n=a(78920);t.default=void 0;var i=n(a(14041));t.default=(0,r(a(74044)).default)(i.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward")},89439:function(e,t,a){a.d(t,{n:()=>w});var r=a(31085),n=a(40703),i=a(59469),l=a(48653),s=a(45685),d=a(37197),o=a(58837),c=a(24568),p=a(53373),h=a.n(p),m=a(9720),u=a(72501),g=a(52235),x=a(60603);let f=(0,o.A)(e=>({root:{maxWidth:"fit-content",padding:e.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:e.palette.textSubtle},arrow:{color:e.palette.textSubtle}}),{name:"BackstageBottomLink"});function j(e){let{link:t,title:a,onClick:n}=e,i=f();return(0,r.jsxs)(m.A,{children:[(0,r.jsx)(d.A,{}),(0,r.jsx)(x.N_,{to:t,onClick:n,underline:"none",children:(0,r.jsxs)(m.A,{display:"flex",alignItems:"center",className:i.root,children:[(0,r.jsx)(m.A,{className:i.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,r.jsx)(u.A,{children:(0,r.jsx)("strong",{children:a})})}),(0,r.jsx)(g.default,{className:i.arrow})]})})]})}var A=a(14041),b=a(45463),y=a(60691),v=a(89332),k=a(89595);let C=e=>{let{slackChannel:t}=e,{t:a}=(0,k.i)(v.O);return t?"string"==typeof t?(0,r.jsx)(u.A,{children:a("errorBoundary.title",{slackChannel:t})}):t.href?(0,r.jsx)(b.z,{to:t.href,variant:"contained",children:t.name}):(0,r.jsx)(u.A,{children:a("errorBoundary.title",{slackChannel:t.name})}):null},B=class extends A.Component{constructor(e){super(e),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(e,t){console.error(`ErrorBoundary, error: ${e}`,{error:e,errorInfo:t}),this.setState({error:e,errorInfo:t})}render(){let{slackChannel:e,children:t}=this.props,{error:a}=this.state;return a?(0,r.jsx)(y.b,{title:"Something Went Wrong",error:a,children:(0,r.jsx)(C,{slackChannel:e})}):t}},S=(0,o.A)(e=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},contentAlignBottom:{display:"flex",alignItems:"self-end"},header:{padding:e.spacing(2,2,2,2.5)},headerTitle:{fontWeight:e.typography.fontWeightBold},headerSubheader:{paddingTop:e.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),T=(0,c.A)(e=>({root:{display:"inline-block",padding:e.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(i.A),I={flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px",breakInside:"avoid-page","@media print":{height:"auto"}}},P={fullHeight:{flex:1},gridItem:{flex:1}};function w(e){let{title:t,subheader:a,divider:o=!0,deepLink:c,slackChannel:p,errorBoundaryProps:m,variant:u,alignContent:g="normal",children:x,headerStyle:f,headerProps:A,icon:b,action:y,actionsClassName:v,actions:k,cardClassName:C,actionsTopRight:w,className:N,noPadding:W,titleTypographyProps:D,subheaderTypographyProps:U}=e,_=S(),E={},H={};return u&&u.split(/[\s]+/g).forEach(e=>{E={...E,...I[e]},H={...H,...P[e]}}),(0,r.jsx)(n.A,{style:E,className:N,children:(0,r.jsxs)(B,{...m||(p?{slackChannel:p}:{}),children:[t&&(0,r.jsx)(s.A,{classes:{root:h()(_.header),title:_.headerTitle,subheader:_.headerSubheader,avatar:_.headerAvatar,action:_.headerAction,content:_.headerContent},title:t,subheader:a||b?(0,r.jsxs)("div",{"data-testid":"info-card-subheader",children:[a&&(0,r.jsx)("div",{className:_.subheader,children:a}),b]}):null,action:y,style:{...f},titleTypographyProps:D,subheaderTypographyProps:U,...A}),w&&(0,r.jsx)(T,{children:w}),o&&(0,r.jsx)(d.A,{}),(0,r.jsx)(l.A,{className:h()(C,{[_.noPadding]:W,[_.contentAlignBottom]:"bottom"===g}),style:H,children:x}),k&&(0,r.jsx)(i.A,{className:v,children:k}),c&&(0,r.jsx)(j,{...c})]})})}},68817:function(e,t,a){a.d(t,{TechDocsCustomHome:()=>Q});var r=a(31085),n=a(14041),i=a(73466),l=a(58837),s=a(96403),d=a(58077),o=a(50509),c=a(48203),p=a(53320),h=a(59378),m=a(76272),u=a(74854),g=a(31314),x=a(90898),f=a(99255),j=a(16647),A=a(19735),b=a(9720),y=a(30455);let v=(0,l.A)(e=>(0,y.A)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:e.spacing(2)}}),{name:"BackstageItemCardGrid"});function k(e){let{children:t,...a}=e,n=v(a);return(0,r.jsx)(b.A,{className:n.root,...a,children:t})}var C=a(72501);let B=(0,l.A)(e=>(0,y.A)({root:{color:e.palette.text.primary,padding:e.spacing(2,2,3),backgroundImage:e.getPageTheme({themeId:"card"}).backgroundImage,backgroundPosition:0,backgroundSize:"inherit"}}),{name:"BackstageItemCardHeader"});function S(e){let{title:t,subtitle:a,children:n}=e,i=B(e);return(0,r.jsxs)(b.A,{className:i.root,children:[a&&(0,r.jsx)(C.A,{variant:"subtitle2",component:"h3",children:a}),t&&(0,r.jsx)(C.A,{variant:"h6",component:"h4",children:t}),n]})}var T=a(45463),I=a(40703),P=a(59469),w=a(48653),N=a(57369),W=a(55489),D=a(89439),U=a(60603),_=a(87623);let E=(0,l.A)(e=>({linkSpacer:{paddingTop:e.spacing(.2)},readMoreLink:{paddingTop:e.spacing(.2)}}),{name:"BackstageInfoCardGrid"});var H=a(90998),V=a(34289),L=a(15179),R=a(23413),z=a(84391),G=a(87187),M=a(4809),O=a(38605),$=a(74953);let F=(0,l.A)(e=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:e.palette.background.paper,paddingLeft:e.spacing(3),minWidth:0},defaultTab:{...e.typography.caption,padding:e.spacing(3,3),textTransform:"uppercase",fontWeight:e.typography.fontWeightBold,color:e.palette.text.secondary},selected:{color:e.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:e.palette.background.default,color:e.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function K(e){let{tabs:t,onChange:a,selectedIndex:i}=e,[l,s]=(0,n.useState)(i??0),d=F(),o=(0,n.useCallback)((e,t)=>{void 0===i&&s(t),a&&a(t)},[i,a]);return(0,n.useEffect)(()=>{void 0!==i&&s(i)},[i]),(0,r.jsx)(b.A,{className:d.tabsWrapper,children:(0,r.jsx)($.A,{indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"tabs",onChange:o,value:l,children:t.map((e,t)=>(0,r.jsx)(O.A,{"data-testid":`header-tab-${t}`,label:e.label,value:t,className:d.defaultTab,classes:{selected:d.selected,root:d.tabRoot},...e.tabProps},e.id))})})}var Y=a(78931);let q={DocsTable:g.o,DocsCardGrid:e=>{let{entities:t}=e,a=(0,j.S)(x.Oc),n=(0,o.gf)(A.U);return t?(0,r.jsx)(k,{"data-testid":"docs-explore",children:t?.length?t.map((e,t)=>(0,r.jsxs)(I.A,{children:[(0,r.jsx)(N.A,{children:(0,r.jsx)(S,{title:e.metadata.title??e.metadata.name})}),(0,r.jsx)(w.A,{children:e.metadata.description}),(0,r.jsx)(P.A,{children:(0,r.jsx)(T.z,{to:a({namespace:(0,f.V)(e.metadata.namespace??"default",n),kind:(0,f.V)(e.kind,n),name:(0,f.V)(e.metadata.name,n)}),color:"primary","data-testid":"read_docs",children:"Read Docs"})})]},t)):null}):null},TechDocsIndexPage:V.TechDocsIndexPage,InfoCardGrid:e=>{let{entities:t,linkContent:a,linkDestination:n}=e,l=E(),s=(0,j.S)(x.Oc),c=(0,o.gf)(A.U),p=(0,o.gf)(_.n),{value:h,loading:m}=(0,i.A)(async()=>new Map(await Promise.all(t?.map(async e=>{let t=await p.forEntity(e).promise;return[(0,d.U2)(e),t]})||[])));return m?(0,r.jsx)(W.k,{}):t&&t?.length?(0,r.jsx)(k,{"data-testid":"info-card-container",children:t.map(e=>(0,r.jsxs)(D.n,{"data-testid":e?.metadata?.title,title:h?.get((0,d.U2)(e))?.primaryTitle,children:[(0,r.jsx)("div",{children:e?.metadata?.description}),(0,r.jsx)("div",{className:l.linkSpacer}),(0,r.jsx)(U.N_,{to:(e=>{if(n){let t=n(e);if(t)return t}return s({namespace:(0,f.V)(e.metadata.namespace??"default",c),kind:(0,f.V)(e.kind,c),name:(0,f.V)(e.metadata.name,c)})})(e),className:l.readMoreLink,"data-testid":"read-docs-link",children:a||"Read Docs"})]},e.metadata.name))}):null}},J=({config:e,entities:t,index:a})=>{let m=(0,l.A)({panelContainer:{marginBottom:"2rem",...e.panelCSS?e.panelCSS:{}}})(),{loading:u,isOwnedEntity:g}=function(){let e=(0,o.gf)(c.K),{loading:t,value:a}=(0,i.A)(async()=>{let{ownershipEntityRefs:t}=await e.getBackstageIdentity();return t},[]);return{loading:t,isOwnedEntity:(0,n.useMemo)(()=>{let e=new Set(a??[]);return t=>{for(let a of(0,p.t)(t,s.vv).map(d.U2))if(e.has(a))return!0;return!1}},[a])}}(),x=q[e.panelType],f=t.filter(t=>"ownedByUser"===e.filterPredicate?!u&&g(t):"function"==typeof e.filterPredicate&&e.filterPredicate(t)),j=e.panelProps?.CustomHeader||(()=>(0,r.jsx)(L.d,{title:e.title,description:e.description,children:0===a?(0,r.jsx)(R.Y,{children:"Discover documentation in your ecosystem."}):null}));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{}),(0,r.jsx)("div",{className:m.panelContainer,children:(0,r.jsx)(h.B9,{children:(0,r.jsx)(x,{"data-testid":"techdocs-custom-panel",entities:f,...e.panelProps})})})]})},Q=e=>{let{tabsConfig:t,filter:a,CustomPageWrapper:l}=e,[s,d]=(0,n.useState)(0),c=(0,o.gf)(m.v),{value:p,loading:h,error:g}=(0,i.A)(async()=>(await c.getEntities({filter:{...a,[`metadata.annotations.${Y.As}`]:u.c},fields:["apiVersion","kind","metadata","relations","spec.owner","spec.type"]})).items.filter(e=>!!e.metadata.annotations?.[Y.As])),x=t[s];return h?(0,r.jsx)(H.S,{CustomPageWrapper:l,children:(0,r.jsx)(z.U,{children:(0,r.jsx)(W.k,{})})}):g?(0,r.jsx)(H.S,{CustomPageWrapper:l,children:(0,r.jsx)(z.U,{children:(0,r.jsx)(G.B,{severity:"error",title:"Could not load available documentation.",children:(0,r.jsx)(M.z,{language:"text",text:g.toString()})})})}):(0,r.jsxs)(H.S,{CustomPageWrapper:l,children:[(0,r.jsx)(K,{selectedIndex:s,onChange:e=>d(e),tabs:t.map(({label:e},t)=>({id:t.toString(),label:e}))}),(0,r.jsx)(z.U,{"data-testid":"techdocs-content",children:x.panels.map((e,t)=>(0,r.jsx)(J,{config:e,entities:p||[],index:t},t))})]})}},34289:function(e,t,a){a.d(t,{TechDocsIndexPage:()=>l});var r=a(31085),n=a(18690),i=a(70335);let l=e=>(0,n.P1)()||(0,r.jsx)(i.K,{...e})}}]);
|
|
2
|
+
//# sourceMappingURL=7226.99db194a.chunk.js.map
|