@techdocs/cli 1.5.1 → 1.5.2-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -3
- package/README.md +0 -35
- package/dist/embedded-app/.config-schema.json +97 -50
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/1032.d8d4547a.chunk.js +5 -0
- package/dist/embedded-app/static/1032.d8d4547a.chunk.js.map +1 -0
- package/dist/embedded-app/static/1105.250209d9.chunk.js +5 -0
- package/dist/embedded-app/static/1105.250209d9.chunk.js.map +1 -0
- package/dist/embedded-app/static/1600.1ec85d5a.chunk.js +3 -0
- package/dist/embedded-app/static/1600.1ec85d5a.chunk.js.map +1 -0
- package/dist/embedded-app/static/184.3d7fb6d2.chunk.js +5 -0
- package/dist/embedded-app/static/184.3d7fb6d2.chunk.js.map +1 -0
- package/dist/embedded-app/static/2440.8c636d46.chunk.js +5 -0
- package/dist/embedded-app/static/2440.8c636d46.chunk.js.map +1 -0
- package/dist/embedded-app/static/2924.b96e10c0.chunk.js +3 -0
- package/dist/embedded-app/static/2924.b96e10c0.chunk.js.map +1 -0
- package/dist/embedded-app/static/3487.ca0b20dd.chunk.js +5 -0
- package/dist/embedded-app/static/{1105.ac144a87.chunk.js.map → 3487.ca0b20dd.chunk.js.map} +1 -1
- package/dist/embedded-app/static/5458.e6517aa6.chunk.js +5 -0
- package/dist/embedded-app/static/5458.e6517aa6.chunk.js.map +1 -0
- package/dist/embedded-app/static/5877.829aa767.chunk.js +6 -0
- package/dist/embedded-app/static/5877.829aa767.chunk.js.map +1 -0
- package/dist/embedded-app/static/5914.4dde69d3.chunk.js +3 -0
- package/dist/embedded-app/static/5914.4dde69d3.chunk.js.map +1 -0
- package/dist/embedded-app/static/6051.84051083.chunk.js +4 -0
- package/dist/embedded-app/static/6051.84051083.chunk.js.map +1 -0
- package/dist/embedded-app/static/7670.4e34a90d.chunk.js +3 -0
- package/dist/embedded-app/static/7670.4e34a90d.chunk.js.map +1 -0
- package/dist/embedded-app/static/7750.3b7f34f8.chunk.js +8 -0
- package/dist/embedded-app/static/7750.3b7f34f8.chunk.js.map +1 -0
- package/dist/embedded-app/static/7893.8b70980c.chunk.js +3 -0
- package/dist/embedded-app/static/7893.8b70980c.chunk.js.map +1 -0
- package/dist/embedded-app/static/9545.1f2986d6.chunk.js +5 -0
- package/dist/embedded-app/static/9545.1f2986d6.chunk.js.map +1 -0
- package/dist/embedded-app/static/967.9162e72e.chunk.js +11 -0
- package/dist/embedded-app/static/967.9162e72e.chunk.js.map +1 -0
- package/dist/embedded-app/static/9770.5cb016d6.chunk.js +5 -0
- package/dist/embedded-app/static/9770.5cb016d6.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.42be8165.js +487 -0
- package/dist/embedded-app/static/main.42be8165.js.map +1 -0
- package/dist/embedded-app/static/{module-material-ui.1b712255.js → module-material-ui.bdbd8daa.js} +7 -7
- package/dist/embedded-app/static/module-material-ui.bdbd8daa.js.map +1 -0
- package/dist/embedded-app/static/{runtime.04af2edd.js → runtime.42be8165.js} +2 -2
- package/dist/embedded-app/static/{runtime.04af2edd.js.map → runtime.42be8165.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.04af2edd.js → vendor.42be8165.js} +1 -1
- package/dist/embedded-app/static/{vendor.04af2edd.js.map → vendor.42be8165.js.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/package.json +8 -11
- package/dist/embedded-app/static/1032.96cef90d.chunk.js +0 -5
- package/dist/embedded-app/static/1032.96cef90d.chunk.js.map +0 -1
- package/dist/embedded-app/static/1105.ac144a87.chunk.js +0 -5
- package/dist/embedded-app/static/184.5623ac15.chunk.js +0 -5
- package/dist/embedded-app/static/184.5623ac15.chunk.js.map +0 -1
- package/dist/embedded-app/static/2440.240e2610.chunk.js +0 -5
- package/dist/embedded-app/static/2440.240e2610.chunk.js.map +0 -1
- package/dist/embedded-app/static/2924.b757596e.chunk.js +0 -3
- package/dist/embedded-app/static/2924.b757596e.chunk.js.map +0 -1
- package/dist/embedded-app/static/3487.bf80060c.chunk.js +0 -5
- package/dist/embedded-app/static/3487.bf80060c.chunk.js.map +0 -1
- package/dist/embedded-app/static/5458.f510f1d2.chunk.js +0 -5
- package/dist/embedded-app/static/5458.f510f1d2.chunk.js.map +0 -1
- package/dist/embedded-app/static/5877.fa5d49bb.chunk.js +0 -6
- package/dist/embedded-app/static/5877.fa5d49bb.chunk.js.map +0 -1
- package/dist/embedded-app/static/5914.412625b0.chunk.js +0 -3
- package/dist/embedded-app/static/5914.412625b0.chunk.js.map +0 -1
- package/dist/embedded-app/static/6051.5b06b988.chunk.js +0 -4
- package/dist/embedded-app/static/6051.5b06b988.chunk.js.map +0 -1
- package/dist/embedded-app/static/7670.dce585cd.chunk.js +0 -3
- package/dist/embedded-app/static/7670.dce585cd.chunk.js.map +0 -1
- package/dist/embedded-app/static/7750.f3e35b68.chunk.js +0 -8
- package/dist/embedded-app/static/7750.f3e35b68.chunk.js.map +0 -1
- package/dist/embedded-app/static/7893.67e0b03f.chunk.js +0 -3
- package/dist/embedded-app/static/7893.67e0b03f.chunk.js.map +0 -1
- package/dist/embedded-app/static/9545.3ea2318c.chunk.js +0 -5
- package/dist/embedded-app/static/9545.3ea2318c.chunk.js.map +0 -1
- package/dist/embedded-app/static/9598.c8137318.chunk.js +0 -3
- package/dist/embedded-app/static/9598.c8137318.chunk.js.map +0 -1
- package/dist/embedded-app/static/967.c3c74dec.chunk.js +0 -15
- package/dist/embedded-app/static/967.c3c74dec.chunk.js.map +0 -1
- package/dist/embedded-app/static/9770.18f87a62.chunk.js +0 -5
- package/dist/embedded-app/static/9770.18f87a62.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.04af2edd.js +0 -487
- package/dist/embedded-app/static/main.04af2edd.js.map +0 -1
- package/dist/embedded-app/static/module-material-ui.1b712255.js.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[7750],{27597:function(R,c,t){var n,g=t(71600),h=t(34590);n={value:!0},c.Z=void 0;var x=h(t(2784)),m=g(t(50175)),u=(0,m.default)(x.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");c.Z=u},52160:function(R,c,t){var n,g=t(71600),h=t(34590);n={value:!0},c.Z=void 0;var x=h(t(2784)),m=g(t(50175)),u=(0,m.default)(x.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"Language");c.Z=u},1546:function(R,c,t){t.d(c,{r:function(){return C}});var n=t(52322),g=t(94339),h=t(14503),x=t(24579),m=t(32552),u=t(85256),Z=t(79692),L=t(15459),A=t(72779),I=t.n(A),B=t(2784),e=t(62774),i=t(90436),y=t(27597),E=t(98864);const a=(0,Z.Z)(r=>({root:{maxWidth:"fit-content",padding:r.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:r.palette.textSubtle},arrow:{color:r.palette.textSubtle}}),{name:"BackstageBottomLink"});function l(r){const{link:o,title:p,onClick:M}=r,D=a();return(0,n.jsxs)(e.Z,{children:[(0,n.jsx)(u.Z,{}),(0,n.jsx)(E.rU,{to:o,onClick:M,underline:"none",children:(0,n.jsxs)(e.Z,{display:"flex",alignItems:"center",className:D.root,children:[(0,n.jsx)(e.Z,{className:D.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,n.jsx)(i.Z,{children:(0,n.jsx)("strong",{children:p})})}),(0,n.jsx)(y.Z,{className:D.arrow})]})})]})}var v=t(15929),f=t(74359);const d=r=>{const{slackChannel:o}=r;if(o){if(typeof o=="string")return(0,n.jsxs)(i.Z,{children:["Please contact ",o," for help."]});if(!o.href)return(0,n.jsxs)(i.Z,{children:["Please contact ",o.name," for help."]})}else return null;return(0,n.jsx)(v.Q,{to:o.href,variant:"contained",children:o.name})},s=class extends B.Component{componentDidCatch(o,p){console.error(`ErrorBoundary, error: ${o}, info: ${p}`),this.setState({error:o,errorInfo:p})}render(){const{slackChannel:o,children:p}=this.props,{error:M}=this.state;return M?(0,n.jsx)(f.y,{title:"Something Went Wrong",error:M,children:(0,n.jsx)(d,{slackChannel:o})}):p}constructor(o){super(o),this.state={error:void 0,errorInfo:void 0}}},P=(0,Z.Z)(r=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:r.spacing(2,2,2,2.5)},headerTitle:{fontWeight:r.typography.fontWeightBold},headerSubheader:{paddingTop:r.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),T=(0,L.Z)(r=>({root:{display:"inline-block",padding:r.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(h.Z),S={card:{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"}}},cardContent:{fullHeight:{flex:1},gridItem:{flex:1}}};function C(r){const{title:o,subheader:p,divider:M=!0,deepLink:D,slackChannel:W,errorBoundaryProps:K,variant:k,children:V,headerStyle:Y,headerProps:F,icon:z,action:G,actionsClassName:$,actions:b,cardClassName:Q,actionsTopRight:H,className:X,noPadding:J,titleTypographyProps:w}=r,j=P();let N={},O={};k&&k.split(/[\s]+/g).forEach(U=>{N={...N,...S.card[U]},O={...O,...S.cardContent[U]}});const q=()=>!p&&!z?null:(0,n.jsxs)("div",{className:j.headerSubheader,"data-testid":"info-card-subheader",children:[p&&(0,n.jsx)("div",{className:j.subheader,children:p}),z]}),_=K||(W?{slackChannel:W}:{});return(0,n.jsx)(g.Z,{style:N,className:X,children:(0,n.jsxs)(s,{..._,children:[o&&(0,n.jsx)(m.Z,{classes:{root:j.header,title:j.headerTitle,subheader:j.headerSubheader,avatar:j.headerAvatar,action:j.headerAction,content:j.headerContent},title:o,subheader:q(),action:G,style:{...Y},titleTypographyProps:w,...F}),H&&(0,n.jsx)(T,{children:H}),M&&(0,n.jsx)(u.Z,{}),(0,n.jsx)(x.Z,{className:I()(Q,{[j.noPadding]:J}),style:O,children:V}),b&&(0,n.jsx)(h.Z,{className:$,children:b}),D&&(0,n.jsx)(l,{...D})]})})}},96641:function(R,c,t){t.d(c,{X2:function(){return I},h$:function(){return L}});var n=t(52322),g=t(74314),h=t(72388),x=t(29651),m=t(68993),u=t(2784);const Z=(0,x.CT)("entity-context"),L=e=>{const{children:i,entity:y,loading:E,error:a,refresh:l}=e,v={entity:y,loading:E,error:a,refresh:l};return(0,n.jsx)(Z.Provider,{value:(0,m.E)({1:v}),children:(0,n.jsx)(h.fC,{attributes:{...y?{entityRef:(0,g.eE)(y)}:void 0},children:i})})},A=e=>_jsx(L,{entity:e.entity,loading:!Boolean(e.entity),error:void 0,refresh:void 0,children:e.children});function I(){const e=(0,x.Vt)("entity-context");if(!e)throw new Error("Entity context is not available");const i=e.atVersion(1);if(!i)throw new Error("EntityContext v1 not available");if(!i.entity)throw new 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:i.entity}}function B(){const e=useVersionedContext("entity-context");if(!e)throw new Error("Entity context is not available");const i=e.atVersion(1);if(!i)throw new Error("EntityContext v1 not available");const{entity:y,loading:E,error:a,refresh:l}=i;return{entity:y,loading:E,error:a,refresh:l}}},24851:function(R,c,t){t.d(c,{s:function(){return E}});var n=t(52322),g=t(90348),h=t(11861),x=t(2784),m=t(79692),u=t(62774),Z=t(90436),L=t(52160),A=t(98864);const I=(0,m.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function B(a){const{href:l,text:v,Icon:f}=a,d=I();return(0,n.jsxs)(u.Z,{display:"flex",children:[(0,n.jsx)(u.Z,{mr:1,className:d.svgIcon,children:(0,n.jsx)(Z.Z,{component:"div",children:f?(0,n.jsx)(f,{}):(0,n.jsx)(L.Z,{})})}),(0,n.jsx)(u.Z,{flexGrow:"1",children:(0,n.jsx)(A.rU,{to:l,target:"_blank",rel:"noopener",children:v||l})})]})}var e=t(41156);const i={xs:1,sm:1,md:1,lg:2,xl:3};function y(a){const l=[(0,e.Z)(s=>s.breakpoints.up("xl"))?"xl":null,(0,e.Z)(s=>s.breakpoints.up("lg"))?"lg":null,(0,e.Z)(s=>s.breakpoints.up("md"))?"md":null,(0,e.Z)(s=>s.breakpoints.up("sm"))?"sm":null,(0,e.Z)(s=>s.breakpoints.up("xs"))?"xs":null];let v=1;if(typeof a=="number")v=a;else{var f;const s=(f=l.find(P=>P!==null))!==null&&f!==void 0?f:"xs";var d;v=(d=a==null?void 0:a[s])!==null&&d!==void 0?d:i[s]}return v}function E(a){const{items:l,cols:v=void 0}=a,f=y(v);return(0,n.jsx)(g.Z,{rowHeight:"auto",cols:f,children:l.map(({text:d,href:s,Icon:P},T)=>(0,n.jsx)(h.Z,{children:(0,n.jsx)(B,{href:s,text:d!=null?d:s,Icon:P})},T))})}},17750:function(R,c,t){t.r(c),t.d(c,{EntityLinksCard:function(){return E}});var n=t(52322),g=t(96641),h=t(52160),x=t(2784),m=t(79692),u=t(90436),Z=t(77277),L=t(9791);const A=`metadata:
|
|
2
|
+
name: example
|
|
3
|
+
links:
|
|
4
|
+
- url: https://dashboard.example.com
|
|
5
|
+
title: My Dashboard
|
|
6
|
+
icon: dashboard`,I=(0,m.Z)(a=>({code:{borderRadius:6,margin:a.spacing(2,0),background:a.palette.type==="dark"?"#444":a.palette.common.white}}),{name:"PluginCatalogEntityLinksEmptyState"});function B(){const a=I();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.Z,{variant:"body1",children:"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:"}),(0,n.jsx)("div",{className:a.code,children:(0,n.jsx)(L.O,{text:A,language:"yaml",showLineNumbers:!0,highlightedNumbers:[3,4,5,6],customStyle:{background:"inherit",fontSize:"115%"}})}),(0,n.jsx)(Z.Z,{variant:"contained",color:"primary",target:"_blank",href:"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional",children:"Read more"})]})}var e=t(24851),i=t(80851),y=t(1546);const E=a=>{var l;const{cols:v=void 0,variant:f}=a,{entity:d}=(0,g.X2)(),s=(0,i.q)(),P=S=>{var C;return S&&(C=s.getSystemIcon(S))!==null&&C!==void 0?C:h.Z},T=d==null||(l=d.metadata)===null||l===void 0?void 0:l.links;return(0,n.jsx)(y.r,{title:"Links",variant:f,children:!T||T.length===0?(0,n.jsx)(B,{}):(0,n.jsx)(e.s,{cols:v,items:T.map(({url:S,title:C,icon:r})=>({text:C!=null?C:S,href:S,Icon:P(r)}))})})}}}]);})();
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=7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AAUA,CAACO,QAAQ,Q,SAAQ,oH,MAI5B,OAAC0D,MAAAA,CAAIpE,UAAWR,EAAQ+I,K,YACtB,OAACO,EAAAA,EAAWA,CACVvC,KAAM+B,EACNS,SAAS,OACTC,gBAAe,GACfC,mBAAoB,CAAC,EAAG,EAAG,EAAG,C,EAC9BC,YAAa,CAAET,WAAY,UAAWrC,SAAU,MAAO,C,QAG3D,OAAC+C,EAAAA,EAAMA,CACLzI,QAAQ,YACR5B,MAAM,UACN+H,OAAO,SACPrG,KAAK,uF,SACN,W,KAKP,C,oCCxCO,MAAM4I,EAAmBhK,GAAAA,C,IAQhB6F,EAPd,KAAM,CAAEqC,KAAAA,EAAO/F,OAAWb,QAAAA,CAAQ,EAAItB,EAChC,CAAE6F,OAAAA,CAAO,KAAIY,EAAAA,IAAU,EACvBwD,KAAMC,EAAAA,GAAO,EAEbC,EAAgBC,GAAAA,C,IACdH,E,OAANG,IAAMH,EAAAA,EAAII,cAAcD,CAAG,KAAHA,MAAlBH,IAAAA,OAAAA,EAAyC1C,EAAAA,CAAW,EAEtD+C,EAAQzE,GAAAA,OAAAA,EAAAA,EAAQ0E,YAAQ,MAAhB1E,IAAAA,OAAAA,OAAAA,EAAkByE,MAEhC,SACE,OAACxG,EAAAA,EAAQA,CAAC5D,MAAM,QAAQoB,QAASA,E,SAC9B,CAACgJ,GAASA,EAAME,SAAW,KAC1B,OAACf,EAAqBA,CAAAA,CAAAA,KAEtB,OAACd,EAAAA,EAAaA,CACZT,KAAMA,EACNU,MAAO0B,EAAMvB,IAAI,CAAC,CAAE0B,IAAAA,EAAKvK,MAAAA,EAAOkE,KAAAA,CAAK,KAAO,CAC1C+C,KAAMjH,GAAAA,KAAAA,EAASuK,EACfrJ,KAAMqJ,EACNrD,KAAM+C,EAAa/F,CAAI,CACzB,EAAE,C,IAKZ,C","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/ArrowForward.js","webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/Language.js","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/hooks/useEntity.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksEmptyState.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"\n}), 'ArrowForward');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z\"\n}), 'Language');\n\nexports.default = _default;","/*\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 { BackstageTheme } from '@backstage/theme';\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 React from 'react';\nimport { Link } from '../../components/Link';\n\n/** @public */\nexport type BottomLinkClassKey = 'root' | 'boxTitle' | 'arrow';\n\nconst useStyles = makeStyles<BackstageTheme>(\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: React.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 React, { ComponentClass, Component, ErrorInfo } from 'react';\nimport { LinkButton } from '../../components/LinkButton';\nimport { ErrorPanel } from '../../components/ErrorPanel';\n\ntype SlackChannel = {\n name: string;\n href?: string;\n};\n\n/** @public */\nexport type ErrorBoundaryProps = React.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\n if (!slackChannel) {\n return null;\n } else if (typeof slackChannel === 'string') {\n return <Typography>Please contact {slackChannel} for help.</Typography>;\n } else if (!slackChannel.href) {\n return (\n <Typography>Please contact {slackChannel.name} for help.</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}, info: ${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 React, { 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 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 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};\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 children,\n headerStyle,\n headerProps,\n icon,\n action,\n actionsClassName,\n actions,\n cardClassName,\n actionsTopRight,\n className,\n noPadding,\n titleTypographyProps,\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\n className={classes.headerSubheader}\n data-testid=\"info-card-subheader\"\n >\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: 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 {...headerProps}\n />\n )}\n {actionsTopRight && (\n <CardActionsTopRight>{actionsTopRight}</CardActionsTopRight>\n )}\n {divider && <Divider />}\n <CardContent\n className={classNames(cardClassName, {\n [classes.noPadding]: noPadding,\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 */\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 React, { 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 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, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { Link } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport function IconLink(props: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n <Box display=\"flex\">\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n {Icon ? <Icon /> : <LanguageIcon />}\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={href} target=\"_blank\" rel=\"noopener\">\n {text || href}\n </Link>\n </Box>\n </Box>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Theme, useMediaQuery } from '@material-ui/core';\nimport { Breakpoint, ColumnBreakpoints } from './types';\n\nconst colDefaults: ColumnBreakpoints = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols: ColumnBreakpoints | number | undefined,\n): number {\n const matches: (Breakpoint | null)[] = [\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ImageList, ImageListItem } from '@material-ui/core';\nimport React from 'react';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <ImageList rowHeight=\"auto\" cols={numOfCols}>\n {items.map(({ text, href, Icon }, i) => (\n <ImageListItem key={i}>\n <IconLink href={href} text={text ?? href} Icon={Icon} />\n </ImageListItem>\n ))}\n </ImageList>\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 { BackstageTheme } from '@backstage/theme';\nimport { Button, makeStyles, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\nexport type EntityLinksEmptyStateClassKey = 'code';\n\nconst useStyles = makeStyles<BackstageTheme>(\n theme => ({\n code: {\n borderRadius: 6,\n margin: theme.spacing(2, 0),\n background:\n theme.palette.type === 'dark' ? '#444' : theme.palette.common.white,\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n\n return (\n <>\n <Typography variant=\"body1\">\n No links defined for this entity. You can add links to your entity YAML\n as shown in the highlighted example below:\n </Typography>\n <div className={classes.code}>\n <CodeSnippet\n text={ENTITY_YAML}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n </div>\n <Button\n variant=\"contained\"\n color=\"primary\"\n target=\"_blank\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\"\n >\n Read more\n </Button>\n </>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\nimport { ColumnBreakpoints } from './types';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { InfoCard, InfoCardVariants } from '@backstage/core-components';\n\n/** @public */\nexport interface EntityLinksCardProps {\n cols?: ColumnBreakpoints | number;\n variant?: InfoCardVariants;\n}\n\nexport const EntityLinksCard = (props: EntityLinksCardProps) => {\n const { cols = undefined, variant } = props;\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n <InfoCard title=\"Links\" variant={variant}>\n {!links || links.length === 0 ? (\n <EntityLinksEmptyState />\n ) : (\n <LinksGridList\n cols={cols}\n items={links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n }))}\n />\n )}\n </InfoCard>\n );\n};\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_createSvgIcon","_default","useStyles","makeStyles","theme","root","maxWidth","padding","spacing","boxTitle","margin","color","palette","textSubtle","arrow","name","BottomLink","props","link","title","onClick","classes","Box","Divider","Link","to","underline","display","alignItems","className","fontWeight","m","Typography","strong","ArrowIcon","SlackLink","slackChannel","href","LinkButton","variant","ErrorBoundary","Component","componentDidCatch","error","errorInfo","console","setState","render","children","state","ErrorPanel","constructor","undefined","noPadding","paddingBottom","header","headerTitle","typography","fontWeightBold","headerSubheader","paddingTop","headerAvatar","headerAction","headerContent","subheader","CardActionsTopRight","withStyles","float","CardActions","VARIANT_STYLES","card","flex","flexDirection","fullHeight","height","gridItem","marginBottom","breakInside","cardContent","InfoCard","divider","deepLink","errorBoundaryProps","headerStyle","headerProps","icon","action","actionsClassName","actions","cardClassName","actionsTopRight","titleTypographyProps","calculatedStyle","calculatedCardStyle","split","forEach","cardSubTitle","div","data-testid","errProps","Card","style","CardHeader","avatar","content","CardContent","classNames","NewEntityContext","createVersionedContext","AsyncEntityProvider","entity","loading","refresh","value","Provider","createVersionedValueMap","AnalyticsContext","attributes","entityRef","stringifyEntityRef","EntityProvider","Boolean","useEntity","versionedHolder","useVersionedContext","Error","atVersion","useAsyncEntity","svgIcon","fontSize","verticalAlign","IconLink","text","Icon","mr","component","LanguageIcon","flexGrow","target","rel","colDefaults","xs","sm","md","lg","xl","useDynamicColumns","cols","matches","useMediaQuery","breakpoints","up","numOfCols","breakpoint","find","k","LinksGridList","items","ImageList","rowHeight","map","i","ImageListItem","ENTITY_YAML","code","borderRadius","background","type","common","white","EntityLinksEmptyState","CodeSnippet","language","showLineNumbers","highlightedNumbers","customStyle","Button","EntityLinksCard","app","useApp","iconResolver","key","getSystemIcon","links","metadata","length","url"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[7893],{96641:function(se,$,t){t.d($,{X2:function(){return B},h$:function(){return S}});var n=t(52322),A=t(74314),U=t(72388),R=t(29651),x=t(68993),P=t(2784);const z=(0,R.CT)("entity-context"),S=c=>{const{children:y,entity:j,loading:w,error:h,refresh:u}=c,v={entity:j,loading:w,error:h,refresh:u};return(0,n.jsx)(z.Provider,{value:(0,x.E)({1:v}),children:(0,n.jsx)(U.fC,{attributes:{...j?{entityRef:(0,A.eE)(j)}:void 0},children:y})})},J=c=>_jsx(S,{entity:c.entity,loading:!Boolean(c.entity),error:void 0,refresh:void 0,children:c.children});function B(){const c=(0,R.Vt)("entity-context");if(!c)throw new Error("Entity context is not available");const y=c.atVersion(1);if(!y)throw new Error("EntityContext v1 not available");if(!y.entity)throw new 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:y.entity}}function H(){const c=useVersionedContext("entity-context");if(!c)throw new Error("Entity context is not available");const y=c.atVersion(1);if(!y)throw new Error("EntityContext v1 not available");const{entity:j,loading:w,error:h,refresh:u}=y;return{entity:j,loading:w,error:h,refresh:u}}},37893:function(se,$,t){t.r($),t.d($,{AboutCard:function(){return et},AboutContent:function(){return he},AboutField:function(){return L}});var n=t(52322),A=t(34106),U=t(90663),R=t(74314),x=t(79692),P=t(94339),z=t(32552),S=t(61837),J=t(85256),B=t(24579),H=t(98864),c=t(2784),y=t(72779),j=t.n(y),w=t(35292),h=t(62774),u=t(90436);const v=(0,x.Z)(e=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:e.palette.text.secondary,cursor:"default"},primary:{color:e.palette.primary.main},secondary:{color:e.palette.secondary.main},label:{textTransform:"uppercase",fontWeight:e.typography.fontWeightBold,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function k({color:e="primary",disabled:a=!1,href:o="#",icon:s=(0,n.jsx)(w.Z,{}),label:r,onClick:l,title:d}){const p=v();return a?(0,n.jsxs)(h.Z,{title:d,className:j()(p.link,p.disabled),children:[s,(0,n.jsx)(u.Z,{variant:"caption",component:"span",className:p.label,children:r})]}):(0,n.jsxs)(H.rU,{title:d,className:j()(p.link,p[e]),to:o,onClick:l,children:[s,(0,n.jsx)(u.Z,{variant:"caption",component:"span",className:p.label,children:r})]})}const b=(0,x.Z)(e=>({links:{margin:e.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:e.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function m(e){const{links:a}=e,o=b();return(0,n.jsx)("nav",{className:o.links,children:a.map((s,r)=>(0,n.jsx)(k,{...s},r+1))})}var G=t(91657),te=t(73250),re=t(80851);const fe=e=>{const{type:a}=e,o=(0,re.q)(),s=te.Z;var r;const l=a&&(r=o.getSystemIcon(a))!==null&&r!==void 0?r:s;return(0,n.jsx)(l,{})};var X=t(44394),ye=t(78847),ge=t(58513),le=t(37321),ve=t(96641),be=t(88624),de=t(51547);function xe(e,a){var o;const s=(o=e.metadata.annotations)===null||o===void 0?void 0:o[U.M6];if(s)try{const r=(0,de.Ou)(s),l=a.byUrl(r.target);return{locationTargetUrl:r.target,integrationType:l==null?void 0:l.type}}catch{return}}var ce=t(65524),Q=t(8709),Y=t(75435),q=t(68138),pe=t(60905),je=t(7089),ke=t(28865),Le=t(60251),Ce=t(9791);const Te=(0,x.Z)(e=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${e.palette.border}`},"& th, & td":{border:`1px solid ${e.palette.border}`,padding:e.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:e.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:e.palette.background.paper},"& tr":{backgroundColor:e.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:e.palette.background.default},"& a":{color:e.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),me=(e,a)=>a?typeof a=="string"?e+a:c.Children.toArray(a.props.children).reduce(me,e):e,Z=({level:e,children:a})=>{const r=c.Children.toArray(a).reduce(me,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return c.createElement(`h${e}`,{id:r},a)},Ae={code:({inline:e,className:a,children:o,...s})=>{const r=String(o).replace(/\n+$/,""),l=/language-(\w+)/.exec(a||"");return!e&&l?(0,n.jsx)(Ce.O,{language:l[1],text:r}):(0,n.jsx)("code",{className:a,...s,children:o})},h1:Z,h2:Z,h3:Z,h4:Z,h5:Z,h6:Z};function Ee(e){const{content:a,dialect:o="gfm",linkTarget:s,transformLinkUri:r,transformImageUri:l,className:d}=e,p=Te();return(0,n.jsx)(ke.D,{remarkPlugins:o==="gfm"?[Le.Z]:[],className:`${p.markdown} ${d}`,children:a,components:Ae,linkTarget:s,transformLinkUri:r,transformImageUri:l})}var Se=t(2532);const we=(0,x.Z)(e=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:e.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function L(e){const{label:a,value:o,gridSizes:s,children:r}=e,l=we(),d=(0,Se.v)(r,f=>f.getElements()),p=d.length>0?d:(0,n.jsx)(u.Z,{variant:"body2",className:l.value,children:o||"unknown"});return(0,n.jsxs)(pe.Z,{item:!0,...s,children:[(0,n.jsx)(u.Z,{variant:"h2",className:l.label,children:a}),p]})}var Ie=t(24851);const Oe=(0,x.Z)({description:{wordBreak:"break-word"}});function $e(e,a,o){if(a==="url"||e.includes("://"))return e;const s=o.type==="file"?`file://${o.target}`:o.target;return a==="file"||o.type==="file"?new URL(e,s).href:s}function he(e){var a,o,s,r,l,d,p,f;const{entity:i}=e,ie=Oe(),_=i.kind.toLocaleLowerCase("en-US")==="system",K=i.kind.toLocaleLowerCase("en-US")==="resource",I=i.kind.toLocaleLowerCase("en-US")==="component",E=i.kind.toLocaleLowerCase("en-US")==="api",W=i.kind.toLocaleLowerCase("en-US")==="template",C=i.kind.toLocaleLowerCase("en-US")==="location",N=i.kind.toLocaleLowerCase("en-US")==="group",T=(0,Y.h)(i,Q.cz,{kind:"system"}),D=(0,Y.h)(i,Q.cz,{kind:"component"}),F=(0,Y.h)(i,Q.cz,{kind:"domain"}),ee=(0,Y.h)(i,Q.S4);let M;try{M=(0,de.CV)(i)}catch{M=void 0}return(0,n.jsxs)(pe.Z,{container:!0,children:[(0,n.jsx)(L,{label:"Description",gridSizes:{xs:12},children:(0,n.jsx)(Ee,{className:ie.description,content:(i==null||(a=i.metadata)===null||a===void 0?void 0:a.description)||"No description"})}),(0,n.jsx)(L,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4},children:ee.length>0&&(0,n.jsx)(q.r,{entityRefs:ee,defaultKind:"group"})}),(_||F.length>0)&&(0,n.jsx)(L,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4},children:F.length>0&&(0,n.jsx)(q.r,{entityRefs:F,defaultKind:"domain"})}),(E||I||K||T.length>0)&&(0,n.jsx)(L,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4},children:T.length>0&&(0,n.jsx)(q.r,{entityRefs:T,defaultKind:"system"})}),I&&D.length>0&&(0,n.jsx)(L,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4},children:(0,n.jsx)(q.r,{entityRefs:D,defaultKind:"component"})}),(E||I||K||W||N||C||typeof(i==null||(o=i.spec)===null||o===void 0?void 0:o.type)=="string")&&(0,n.jsx)(L,{label:"Type",value:i==null||(s=i.spec)===null||s===void 0?void 0:s.type,gridSizes:{xs:12,sm:6,lg:4}}),(E||I||typeof(i==null||(r=i.spec)===null||r===void 0?void 0:r.lifecycle)=="string")&&(0,n.jsx)(L,{label:"Lifecycle",value:i==null||(l=i.spec)===null||l===void 0?void 0:l.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),(0,n.jsx)(L,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4},children:((i==null||(d=i.metadata)===null||d===void 0?void 0:d.tags)||[]).map(g=>(0,n.jsx)(je.Z,{size:"small",label:g},g))}),C&&((i==null||(p=i.spec)===null||p===void 0?void 0:p.targets)||(i==null||(f=i.spec)===null||f===void 0?void 0:f.target))&&(0,n.jsx)(L,{label:"Targets",gridSizes:{xs:12},children:(0,n.jsx)(Ie.s,{cols:1,items:(i.spec.targets||[i.spec.target]).map(g=>g).map(g=>{var O;return{text:g,href:$e(g,(i==null||(O=i.spec)===null||O===void 0?void 0:O.type)||"unknown",M)}})})})]})}var Ue=t(52866),Re=t(88188),Pe=t(30254),Ze=t(27604),Ne=t(27991),De=t.n(Ne),Me=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),Ve=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),ze=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),Be=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","targetRef"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference","deprecated":true},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const ue=new Map,He=[Ve,Me,ze,Be];function Ge(e){if(!(e!=null&&e.length))throw new TypeError("Unknown error");const a=e[0];throw new TypeError(`${a.instancePath||"<root>"} ${a.message}${a.params?` - ${Object.entries(a.params).map(([o,s])=>`${o}: ${s}`).join(", ")}`:""}`)}function Ke(e,a={}){var o;const s=(o=a==null?void 0:a.disableCache)!==null&&o!==void 0?o:!1,r=s?"":JSON.stringify(e);if(!s){const f=ue.get(r);if(f)return f}const l=We(e),d=new(De())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});l.length&&d.addSchema(l,void 0,void 0,!0);const p=d.compile(e);return s||ue.set(r,p),p}function We(e){if(typeof e!="object")return[];const a=new Set;e.$id&&a.add(e.$id);const o=new Array,s=[e];for(;s.length;){const r=s.pop();for(const l of Fe(r))if(!a.has(l)){a.add(l);const d=He.find(p=>p.$id===l);d&&(o.push(d),s.push(d))}}return o}function*Fe(e){const a=[e];for(;a.length;){const o=a.pop();if(typeof o=="object"&&o)for(const[s,r]of Object.entries(o))s==="$ref"&&typeof r=="string"?yield r.split("#")[0]:a.push(r)}}function Je(e){const a=Ke(e);return o=>{var s;if(a(o)===!0)return o;const l=(s=a.errors)===null||s===void 0?void 0:s.filter(d=>["/kind","/apiVersion"].includes(d.instancePath));if(l!=null&&l.length&&l.every(d=>d.keyword==="enum"))return!1;throw Ge(a.errors)}}var Xe=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"TemplateV1beta3","description":"A Template describes a scaffolding task for use with the Scaffolder. It describes the required parameters as well as a series of steps that will be taken to execute the scaffolding task.","examples":[{"apiVersion":"scaffolder.backstage.io/v1beta3","kind":"Template","metadata":{"name":"react-ssr-template","title":"React SSR Template","description":"Next.js application skeleton for creating isomorphic web applications.","tags":["recommended","react"]},"spec":{"owner":"artist-relations-team","parameters":{"required":["name","description","repoUrl"],"backstage:permissions":{"tags":["one","two"]},"properties":{"name":{"title":"Name","type":"string","description":"Unique name of the component"},"description":{"title":"Description","type":"string","description":"Description of the component"},"repoUrl":{"title":"Pick a repository","type":"string","ui:field":"RepoUrlPicker"}}},"steps":[{"id":"fetch","name":"Fetch","action":"fetch:plain","parameters":{"url":"./template"},"backstage:permissions":{"tags":["one","two"]}},{"id":"publish","name":"Publish to GitHub","action":"publish:github","parameters":{"repoUrl":"${{ parameters.repoUrl }}"},"if":"${{ parameters.repoUrl }}"}],"output":{"catalogInfoUrl":"${{ steps.publish.output.catalogInfoUrl }}"}}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["scaffolder.backstage.io/v1beta3"]},"kind":{"enum":["Template"]},"spec":{"type":"object","required":["type","steps"],"properties":{"type":{"type":"string","description":"The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.","examples":["service","website","library"],"minLength":1},"owner":{"type":"string","description":"The user (or group) owner of the template","minLength":1},"parameters":{"oneOf":[{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}},{"type":"array","description":"A list of separate forms to collect parameters.","items":{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}}]},"steps":{"type":"array","description":"A list of steps to execute.","items":{"type":"object","description":"A description of the step to execute.","required":["action"],"properties":{"id":{"type":"string","description":"The ID of the step, which can be used to refer to its outputs."},"name":{"type":"string","description":"The name of the step, which will be displayed in the UI during the scaffolding process."},"action":{"type":"string","description":"The name of the action to execute."},"input":{"type":"object","description":"A templated object describing the inputs to the action."},"if":{"type":["string","boolean"],"description":"A templated condition that skips the step when evaluated to false. If the condition is true or not defined, the step is executed. The condition is true, if the input is not `false`, `undefined`, `null`, `\\"\\"`, `0`, or `[]`."},"backstage:permissions":{"type":"object","description":"Object used for authorizing the step","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}},"output":{"type":"object","description":"A templated object describing the outputs of the scaffolding task.","properties":{"links":{"type":"array","description":"A list of external hyperlinks, typically pointing to resources created or updated by the template","items":{"type":"object","required":[],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://github.com/my-org/my-new-repo"],"minLength":1},"entityRef":{"type":"string","description":"An entity reference to an entity in the catalog.","examples":["Component:default/my-app"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["View new repo"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}},"text":{"type":"array","description":"A list of Markdown text blobs, like output data from the template.","items":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"A user friendly display name for the text.","examples":["Output Content"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"content":{"type":"string","description":"The text blob to display in the UI, rendered as Markdown.","examples":["**hey** _I\'m_ Markdown"]}}}}},"additionalProperties":{"type":"string"}}}}}}]}');const Qe=Je(Xe),at={async check(e){return Qe(e)===e}},Ye=e=>e.apiVersion==="scaffolder.backstage.io/v1beta3"&&e.kind==="Template",qe="backstage.io/techdocs-ref",ne="backstage.io/techdocs-entity",_e=(0,x.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function et(e){var a,o,s,r,l;const{variant:d}=e,p=(0,re.q)(),f=_e(),{entity:i}=(0,ve.X2)(),ie=(0,X.h_)(G.q),_=(0,X.h_)(be.A),K=(0,X.h_)(ye.$),I=(0,X.h_)(ge.V),E=(0,le.t)(ce.jU),W=(0,le.t)(ce.ql),C=xe(i,ie),N=(a=i.metadata.annotations)===null||a===void 0?void 0:a[A.Tf];let T;if(!((o=i.metadata.annotations)===null||o===void 0)&&o[ne])try{var D;T=(0,R.of)((D=i.metadata.annotations)===null||D===void 0?void 0:D[ne])}catch{T=void 0}const F={label:"View Source",disabled:!C,icon:(0,n.jsx)(fe,{type:C==null?void 0:C.integrationType}),href:C==null?void 0:C.locationTargetUrl},ee={label:"View TechDocs",disabled:!(!((s=i.metadata.annotations)===null||s===void 0)&&s[qe]||!((r=i.metadata.annotations)===null||r===void 0)&&r[ne])||!E,icon:(0,n.jsx)(Pe.Z,{}),href:E&&E(T?{namespace:T.namespace||A.zG,kind:T.kind,name:T.name}:{namespace:i.metadata.namespace||A.zG,kind:i.kind,name:i.metadata.name})},M=[F,ee];if(Ye(i)){var g;const oe=(g=p.getSystemIcon("scaffolder"))!==null&&g!==void 0?g:Re.Z,it={label:"Launch Template",icon:(0,n.jsx)(oe,{}),disabled:!W,href:W&&W({templateName:i.metadata.name,namespace:i.metadata.namespace||A.zG})};M.push(it)}let O="";d==="gridItem"?O=f.gridItemCard:d==="fullHeight"&&(O=f.fullHeightCard);let ae="";d==="gridItem"?ae=f.gridItemCardContent:d==="fullHeight"&&(ae=f.fullHeightCardContent);const V=(l=i.metadata.annotations)===null||l===void 0?void 0:l[U.P1],tt=(V==null?void 0:V.startsWith("url:"))||(V==null?void 0:V.startsWith("file:")),nt=(0,c.useCallback)(async()=>{try{await _.refreshEntity((0,R.eE)(i)),K.post({message:"Refresh scheduled",severity:"info",display:"transient"})}catch(oe){I.post(oe)}},[_,K,I,i]);return(0,n.jsxs)(P.Z,{className:O,children:[(0,n.jsx)(z.Z,{title:"About",action:(0,n.jsxs)(n.Fragment,{children:[tt&&(0,n.jsx)(S.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:nt,children:(0,n.jsx)(Ue.Z,{})}),(0,n.jsx)(S.Z,{component:H.rU,"aria-label":"Edit",disabled:!N,title:"Edit Metadata",to:N!=null?N:"#",children:(0,n.jsx)(Ze.Z,{})})]}),subheader:(0,n.jsx)(m,{links:M})}),(0,n.jsx)(J.Z,{}),(0,n.jsx)(B.Z,{className:ae,children:(0,n.jsx)(he,{entity:i})})]})}},24851:function(se,$,t){t.d($,{s:function(){return w}});var n=t(52322),A=t(90348),U=t(11861),R=t(2784),x=t(79692),P=t(62774),z=t(90436),S=t(52160),J=t(98864);const B=(0,x.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function H(h){const{href:u,text:v,Icon:k}=h,b=B();return(0,n.jsxs)(P.Z,{display:"flex",children:[(0,n.jsx)(P.Z,{mr:1,className:b.svgIcon,children:(0,n.jsx)(z.Z,{component:"div",children:k?(0,n.jsx)(k,{}):(0,n.jsx)(S.Z,{})})}),(0,n.jsx)(P.Z,{flexGrow:"1",children:(0,n.jsx)(J.rU,{to:u,target:"_blank",rel:"noopener",children:v||u})})]})}var c=t(41156);const y={xs:1,sm:1,md:1,lg:2,xl:3};function j(h){const u=[(0,c.Z)(m=>m.breakpoints.up("xl"))?"xl":null,(0,c.Z)(m=>m.breakpoints.up("lg"))?"lg":null,(0,c.Z)(m=>m.breakpoints.up("md"))?"md":null,(0,c.Z)(m=>m.breakpoints.up("sm"))?"sm":null,(0,c.Z)(m=>m.breakpoints.up("xs"))?"xs":null];let v=1;if(typeof h=="number")v=h;else{var k;const m=(k=u.find(G=>G!==null))!==null&&k!==void 0?k:"xs";var b;v=(b=h==null?void 0:h[m])!==null&&b!==void 0?b:y[m]}return v}function w(h){const{items:u,cols:v=void 0}=h,k=j(v);return(0,n.jsx)(A.Z,{rowHeight:"auto",cols:k,children:u.map(({text:b,href:m,Icon:G},te)=>(0,n.jsx)(U.Z,{children:(0,n.jsx)(H,{href:m,text:b!=null?b:m,Icon:G})},te))})}}}]);})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=7893.8b70980c.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/7893.8b70980c.chunk.js","mappings":"kRAmCA,MAAMA,KAAmBC,EAAAA,IACvB,gBAAgB,EAqBLC,EAAuBC,GAAAA,CAClC,KAAM,CAAEC,SAAAA,EAAUC,OAAAA,EAAQC,QAAAA,EAASC,MAAAA,EAAOC,QAAAA,CAAQ,EAAIL,EAChDM,EAAQ,CAAEJ,OAAAA,EAAQC,QAAAA,EAASC,MAAAA,EAAOC,QAAAA,CAAQ,EAGhD,SACE,OAACR,EAAiBU,SAAQ,CAACD,SAAOE,EAAAA,GAAwB,CAAE,EAAGF,CAAM,CAAC,E,YACpE,OAACG,EAAAA,GAAgBA,CACfC,WAAY,CACV,GAAIR,EAAS,CAAES,aAAWC,EAAAA,IAAmBV,CAAM,CAAE,EAAIW,MAC3D,E,SAECZ,C,IAIT,EAiBaa,EAAkBd,GAC7B,KAACD,EAAAA,CACCG,OAAQF,EAAME,OACdC,QAAS,CAACY,QAAQf,EAAME,MAAM,EAC9BE,MAAOS,OACPR,QAASQ,OACTZ,SAAUD,EAAMC,Q,GAUb,SAASe,GAAAA,CAGd,MAAMC,KAAkBC,EAAAA,IACtB,gBAAgB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KAAAA,EAAO9K,MAAU,EAAIb,EAC9BsU,EAAYL,EAAkBtI,CAAI,EAExC,SACE,OAAC8I,EAAAA,EAASA,CAACC,UAAU,OAAO/I,KAAM2I,E,SAC/B1I,EAAMxH,IAAI,CAAC,CAAEnC,KAAAA,EAAMa,KAAAA,EAAM8B,KAAAA,CAAK,EAAG+P,QAChC,OAACC,EAAAA,EAAaA,C,YACZ,OAACnB,EAAQA,CAAC3Q,KAAMA,EAAMb,KAAMA,GAAAA,KAAAA,EAAQa,EAAM8B,KAAMA,C,IAD9B+P,EAAC,CAADA,C,EAM5B,C","sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntity.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/HeaderIconLinkRow/IconLinkVertical.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/HeaderIconLinkRow/HeaderIconLinkRow.tsx","webpack://techdocs-cli-embedded-app/../integration-react/src/components/ScmIntegrationIcon/ScmIntegrationIcon.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/utils/getEntitySourceLocation.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/MarkdownContent/MarkdownContent.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/AboutCard/AboutField.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/AboutCard/AboutContent.tsx","webpack://techdocs-cli-embedded-app/../catalog-model/src/validation/ajv.ts","webpack://techdocs-cli-embedded-app/../catalog-model/src/validation/entityKindSchemaValidator.ts","webpack://techdocs-cli-embedded-app/../../plugins/scaffolder-common/src/TemplateEntityV1beta3.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/AboutCard/AboutCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { 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 React, { 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 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 React from 'react';\nimport classnames from 'classnames';\nimport { makeStyles } from '@material-ui/core/styles';\nimport LinkIcon from '@material-ui/icons/Link';\nimport { Link } from '../Link';\nimport Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\n\nexport type IconLinkVerticalProps = {\n color?: 'primary' | 'secondary';\n disabled?: boolean;\n href?: string;\n icon?: React.ReactNode;\n label: string;\n onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n title?: string;\n};\n\n/** @public */\nexport type IconLinkVerticalClassKey =\n | 'link'\n | 'disabled'\n | 'primary'\n | 'secondary'\n | 'label';\n\nconst useIconStyles = makeStyles(\n theme => ({\n link: {\n display: 'grid',\n justifyItems: 'center',\n gridGap: 4,\n textAlign: 'center',\n },\n disabled: {\n color: theme.palette.text.secondary,\n cursor: 'default',\n },\n primary: {\n color: theme.palette.primary.main,\n },\n secondary: {\n color: theme.palette.secondary.main,\n },\n label: {\n textTransform: 'uppercase',\n fontWeight: theme.typography.fontWeightBold,\n letterSpacing: 1.2,\n },\n }),\n { name: 'BackstageIconLinkVertical' },\n);\n\n/** @public */\nexport function IconLinkVertical({\n color = 'primary',\n disabled = false,\n href = '#',\n icon = <LinkIcon />,\n label,\n onClick,\n title,\n}: IconLinkVerticalProps) {\n const classes = useIconStyles();\n\n if (disabled) {\n return (\n <Box title={title} className={classnames(classes.link, classes.disabled)}>\n {icon}\n <Typography\n variant=\"caption\"\n component=\"span\"\n className={classes.label}\n >\n {label}\n </Typography>\n </Box>\n );\n }\n\n return (\n <Link\n title={title}\n className={classnames(classes.link, classes[color])}\n to={href}\n onClick={onClick}\n >\n {icon}\n <Typography variant=\"caption\" component=\"span\" className={classes.label}>\n {label}\n </Typography>\n </Link>\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 */\nimport { makeStyles } from '@material-ui/core/styles';\nimport React from 'react';\nimport { IconLinkVertical, IconLinkVerticalProps } from './IconLinkVertical';\n\n/** @public */\nexport type HeaderIconLinkRowClassKey = 'links';\n\nconst useStyles = makeStyles(\n theme => ({\n links: {\n margin: theme.spacing(2, 0),\n display: 'grid',\n gridAutoFlow: 'column',\n gridAutoColumns: 'min-content',\n gridGap: theme.spacing(3),\n },\n }),\n { name: 'BackstageHeaderIconLinkRow' },\n);\n\ntype Props = {\n links: IconLinkVerticalProps[];\n};\n\n/**\n * HTML nav tag with links mapped inside\n *\n * @public\n *\n */\nexport function HeaderIconLinkRow(props: Props) {\n const { links } = props;\n const classes = useStyles();\n return (\n <nav className={classes.links}>\n {links.map((link, index) => (\n <IconLinkVertical key={index + 1} {...link} />\n ))}\n </nav>\n );\n}\n","/*\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 CodeIcon from '@material-ui/icons/Code';\nimport React from 'react';\nimport { useApp } from '@backstage/core-plugin-api';\n\n/**\n * Props for {@link ScmIntegrationIcon}.\n *\n * @public\n */\nexport type ScmIntegrationIconProps = {\n /**\n * The integration type, e.g. \"github\".\n */\n type?: string;\n};\n\n/**\n * An icon that represents a certain SCM integration.\n *\n * @public\n */\nexport const ScmIntegrationIcon = (props: ScmIntegrationIconProps) => {\n const { type } = props;\n const app = useApp();\n const DefaultIcon = CodeIcon;\n const Icon = type ? app.getSystemIcon(type) ?? DefaultIcon : DefaultIcon;\n return <Icon />;\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 ANNOTATION_SOURCE_LOCATION,\n Entity,\n parseLocationRef,\n} from '@backstage/catalog-model';\nimport { ScmIntegrationRegistry } from '@backstage/integration';\n\n/** @public */\nexport type EntitySourceLocation = {\n locationTargetUrl: string;\n integrationType?: string;\n};\n\n/** @public */\nexport function getEntitySourceLocation(\n entity: Entity,\n scmIntegrationsApi: ScmIntegrationRegistry,\n): EntitySourceLocation | undefined {\n const sourceLocation =\n entity.metadata.annotations?.[ANNOTATION_SOURCE_LOCATION];\n\n if (!sourceLocation) {\n return undefined;\n }\n\n try {\n const sourceLocationRef = parseLocationRef(sourceLocation);\n const integration = scmIntegrationsApi.byUrl(sourceLocationRef.target);\n return {\n locationTargetUrl: sourceLocationRef.target,\n integrationType: integration?.type,\n };\n } catch {\n return undefined;\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 { makeStyles } from '@material-ui/core/styles';\nimport ReactMarkdown, { Options } from 'react-markdown';\nimport gfm from 'remark-gfm';\nimport React from 'react';\nimport { BackstageTheme } from '@backstage/theme';\nimport { CodeSnippet } from '../CodeSnippet';\nimport { HeadingProps } from 'react-markdown/lib/ast-to-react';\n\nexport type MarkdownContentClassKey = 'markdown';\n\nconst useStyles = makeStyles<BackstageTheme>(\n theme => ({\n markdown: {\n '& table': {\n borderCollapse: 'collapse',\n border: `1px solid ${theme.palette.border}`,\n },\n '& th, & td': {\n border: `1px solid ${theme.palette.border}`,\n padding: theme.spacing(1),\n },\n '& td': {\n wordBreak: 'break-word',\n overflow: 'hidden',\n verticalAlign: 'middle',\n lineHeight: '1',\n margin: 0,\n padding: theme.spacing(3, 2, 3, 2.5),\n borderBottom: 0,\n },\n '& th': {\n backgroundColor: theme.palette.background.paper,\n },\n '& tr': {\n backgroundColor: theme.palette.background.paper,\n },\n '& tr:nth-child(odd)': {\n backgroundColor: theme.palette.background.default,\n },\n\n '& a': {\n color: theme.palette.link,\n },\n '& img': {\n maxWidth: '100%',\n },\n },\n }),\n { name: 'BackstageMarkdownContent' },\n);\n\ntype Props = {\n content: string;\n dialect?: 'gfm' | 'common-mark';\n linkTarget?: Options['linkTarget'];\n transformLinkUri?: (href: string) => string;\n transformImageUri?: (href: string) => string;\n className?: string;\n};\n\nconst flatten = (text: string, child: any): string => {\n if (!child) return text;\n\n return typeof child === 'string'\n ? text + child\n : React.Children.toArray(child.props.children).reduce(flatten, text);\n};\n\nconst headingRenderer = ({ level, children }: HeadingProps) => {\n const childrenArray = React.Children.toArray(children);\n const text = childrenArray.reduce(flatten, '');\n const slug = text.toLocaleLowerCase('en-US').replace(/\\W/g, '-');\n return React.createElement(`h${level}`, { id: slug }, children);\n};\n\nconst components: Options['components'] = {\n code: ({ inline, className, children, ...props }) => {\n const text = String(children).replace(/\\n+$/, '');\n const match = /language-(\\w+)/.exec(className || '');\n return !inline && match ? (\n <CodeSnippet language={match[1]} text={text} />\n ) : (\n <code className={className} {...props}>\n {children}\n </code>\n );\n },\n h1: headingRenderer,\n h2: headingRenderer,\n h3: headingRenderer,\n h4: headingRenderer,\n h5: headingRenderer,\n h6: headingRenderer,\n};\n\n/**\n * Renders markdown with the default dialect {@link https://github.github.com/gfm/ | gfm - GitHub flavored Markdown} to backstage theme styled HTML.\n *\n * @remarks\n * If you just want to render to plain {@link https://commonmark.org/ | CommonMark}, set the dialect to `'common-mark'`\n */\nexport function MarkdownContent(props: Props) {\n const {\n content,\n dialect = 'gfm',\n linkTarget,\n transformLinkUri,\n transformImageUri,\n className,\n } = props;\n const classes = useStyles();\n return (\n <ReactMarkdown\n remarkPlugins={dialect === 'gfm' ? [gfm] : []}\n className={`${classes.markdown} ${className}`}\n children={content}\n components={components}\n linkTarget={linkTarget}\n transformLinkUri={transformLinkUri}\n transformImageUri={transformImageUri}\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 { useElementFilter } from '@backstage/core-plugin-api';\nimport { Grid, makeStyles, Typography } from '@material-ui/core';\nimport React from 'react';\n\nconst useStyles = makeStyles(theme => ({\n value: {\n fontWeight: 'bold',\n overflow: 'hidden',\n lineHeight: '24px',\n wordBreak: 'break-word',\n },\n label: {\n color: theme.palette.text.secondary,\n textTransform: 'uppercase',\n fontSize: '10px',\n fontWeight: 'bold',\n letterSpacing: 0.5,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n },\n}));\n\n/**\n * Props for {@link AboutField}.\n *\n * @public\n */\nexport interface AboutFieldProps {\n label: string;\n value?: string;\n gridSizes?: Record<string, number>;\n children?: React.ReactNode;\n}\n\n/** @public */\nexport function AboutField(props: AboutFieldProps) {\n const { label, value, gridSizes, children } = props;\n const classes = useStyles();\n\n const childElements = useElementFilter(children, c => c.getElements());\n\n // Content is either children or a string prop `value`\n const content =\n childElements.length > 0 ? (\n childElements\n ) : (\n <Typography variant=\"body2\" className={classes.value}>\n {value || `unknown`}\n </Typography>\n );\n return (\n <Grid item {...gridSizes}>\n <Typography variant=\"h2\" className={classes.label}>\n {label}\n </Typography>\n {content}\n </Grid>\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 getEntitySourceLocation,\n RELATION_OWNED_BY,\n RELATION_PART_OF,\n} from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n getEntityRelations,\n} from '@backstage/plugin-catalog-react';\nimport { JsonArray } from '@backstage/types';\nimport { Chip, Grid, makeStyles } from '@material-ui/core';\nimport { MarkdownContent } from '@backstage/core-components';\nimport React from 'react';\nimport { AboutField } from './AboutField';\nimport { LinksGridList } from '../EntityLinksCard/LinksGridList';\n\nconst useStyles = makeStyles({\n description: {\n wordBreak: 'break-word',\n },\n});\n\n/**\n * Props for {@link AboutContent}.\n *\n * @public\n */\nexport interface AboutContentProps {\n entity: Entity;\n}\n\nfunction getLocationTargetHref(\n target: string,\n type: string,\n entitySourceLocation: {\n type: string;\n target: string;\n },\n): string {\n if (type === 'url' || target.includes('://')) {\n return target;\n }\n\n const srcLocationUrl =\n entitySourceLocation.type === 'file'\n ? `file://${entitySourceLocation.target}`\n : entitySourceLocation.target;\n\n if (type === 'file' || entitySourceLocation.type === 'file') {\n return new URL(target, srcLocationUrl).href;\n }\n\n return srcLocationUrl;\n}\n\n/** @public */\nexport function AboutContent(props: AboutContentProps) {\n const { entity } = props;\n const classes = useStyles();\n const isSystem = entity.kind.toLocaleLowerCase('en-US') === 'system';\n const isResource = entity.kind.toLocaleLowerCase('en-US') === 'resource';\n const isComponent = entity.kind.toLocaleLowerCase('en-US') === 'component';\n const isAPI = entity.kind.toLocaleLowerCase('en-US') === 'api';\n const isTemplate = entity.kind.toLocaleLowerCase('en-US') === 'template';\n const isLocation = entity.kind.toLocaleLowerCase('en-US') === 'location';\n const isGroup = entity.kind.toLocaleLowerCase('en-US') === 'group';\n\n const partOfSystemRelations = getEntityRelations(entity, RELATION_PART_OF, {\n kind: 'system',\n });\n const partOfComponentRelations = getEntityRelations(\n entity,\n RELATION_PART_OF,\n {\n kind: 'component',\n },\n );\n const partOfDomainRelations = getEntityRelations(entity, RELATION_PART_OF, {\n kind: 'domain',\n });\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n\n let entitySourceLocation:\n | {\n type: string;\n target: string;\n }\n | undefined;\n try {\n entitySourceLocation = getEntitySourceLocation(entity);\n } catch (e) {\n entitySourceLocation = undefined;\n }\n\n return (\n <Grid container>\n <AboutField label=\"Description\" gridSizes={{ xs: 12 }}>\n <MarkdownContent\n className={classes.description}\n content={entity?.metadata?.description || 'No description'}\n />\n </AboutField>\n <AboutField\n label=\"Owner\"\n value=\"No Owner\"\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {ownedByRelations.length > 0 && (\n <EntityRefLinks entityRefs={ownedByRelations} defaultKind=\"group\" />\n )}\n </AboutField>\n {(isSystem || partOfDomainRelations.length > 0) && (\n <AboutField\n label=\"Domain\"\n value=\"No Domain\"\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {partOfDomainRelations.length > 0 && (\n <EntityRefLinks\n entityRefs={partOfDomainRelations}\n defaultKind=\"domain\"\n />\n )}\n </AboutField>\n )}\n {(isAPI ||\n isComponent ||\n isResource ||\n partOfSystemRelations.length > 0) && (\n <AboutField\n label=\"System\"\n value=\"No System\"\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {partOfSystemRelations.length > 0 && (\n <EntityRefLinks\n entityRefs={partOfSystemRelations}\n defaultKind=\"system\"\n />\n )}\n </AboutField>\n )}\n {isComponent && partOfComponentRelations.length > 0 && (\n <AboutField\n label=\"Parent Component\"\n value=\"No Parent Component\"\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n <EntityRefLinks\n entityRefs={partOfComponentRelations}\n defaultKind=\"component\"\n />\n </AboutField>\n )}\n {(isAPI ||\n isComponent ||\n isResource ||\n isTemplate ||\n isGroup ||\n isLocation ||\n typeof entity?.spec?.type === 'string') && (\n <AboutField\n label=\"Type\"\n value={entity?.spec?.type as string}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n />\n )}\n {(isAPI ||\n isComponent ||\n typeof entity?.spec?.lifecycle === 'string') && (\n <AboutField\n label=\"Lifecycle\"\n value={entity?.spec?.lifecycle as string}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n />\n )}\n <AboutField\n label=\"Tags\"\n value=\"No Tags\"\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {(entity?.metadata?.tags || []).map(t => (\n <Chip key={t} size=\"small\" label={t} />\n ))}\n </AboutField>\n {isLocation && (entity?.spec?.targets || entity?.spec?.target) && (\n <AboutField label=\"Targets\" gridSizes={{ xs: 12 }}>\n <LinksGridList\n cols={1}\n items={((entity.spec.targets as JsonArray) || [entity.spec.target])\n .map(target => target as string)\n .map(target => ({\n text: target,\n href: getLocationTargetHref(\n target,\n (entity?.spec?.type || 'unknown') as string,\n entitySourceLocation!,\n ),\n }))}\n />\n </AboutField>\n )}\n </Grid>\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 Ajv, { Schema, ValidateFunction } from 'ajv';\nimport entitySchema from '../schema/Entity.schema.json';\nimport entityEnvelopeSchema from '../schema/EntityEnvelope.schema.json';\nimport entityMetaSchema from '../schema/EntityMeta.schema.json';\nimport commonSchema from '../schema/shared/common.schema.json';\n\n// A local cache of compiled schemas, to avoid duplicate work.\n// The keys are JSON stringified versions of the schema\nconst compiledSchemaCache = new Map<string, ValidateFunction<unknown>>();\n\n// The core schemas that others can depend on\nconst refDependencyCandidates = [\n entityEnvelopeSchema,\n entitySchema,\n entityMetaSchema,\n commonSchema,\n];\n\nexport function throwAjvError(\n errors: ValidateFunction<unknown>['errors'],\n): never {\n if (!errors?.length) {\n throw new TypeError('Unknown error');\n }\n\n const error = errors[0];\n throw new TypeError(\n `${error.instancePath || '<root>'} ${error.message}${\n error.params\n ? ` - ${Object.entries(error.params)\n .map(([key, val]) => `${key}: ${val}`)\n .join(', ')}`\n : ''\n }`,\n );\n}\n\n// Compiles the given schema, and makes sure to also grab any core dependencies\n// that it depends on\nexport function compileAjvSchema(\n schema: Schema,\n options: { disableCache?: boolean } = {},\n): ValidateFunction<unknown> {\n const disableCache = options?.disableCache ?? false;\n const cacheKey = disableCache ? '' : JSON.stringify(schema);\n\n if (!disableCache) {\n const cached = compiledSchemaCache.get(cacheKey);\n if (cached) {\n return cached;\n }\n }\n\n const extraSchemas = getExtraSchemas(schema);\n const ajv = new Ajv({\n allowUnionTypes: true,\n allErrors: true,\n validateSchema: true,\n });\n if (extraSchemas.length) {\n ajv.addSchema(extraSchemas, undefined, undefined, true);\n }\n const compiled = ajv.compile(schema);\n\n if (!disableCache) {\n compiledSchemaCache.set(cacheKey, compiled);\n }\n\n return compiled;\n}\n\n// Find refs in the given schema and recursively in all known schemas it\n// targets, collecting that list of schemas as we go\nfunction getExtraSchemas(schema: Schema): Schema[] {\n if (typeof schema !== 'object') {\n return [];\n }\n\n const seen = new Set<string>();\n if (schema.$id) {\n seen.add(schema.$id);\n }\n\n const selected = new Array<Schema>();\n\n const todo: Schema[] = [schema];\n while (todo.length) {\n const current = todo.pop()!;\n\n for (const ref of getAllRefs(current)) {\n if (!seen.has(ref)) {\n seen.add(ref);\n\n const match = refDependencyCandidates.find(c => c.$id === ref);\n if (match) {\n selected.push(match);\n todo.push(match);\n }\n }\n }\n }\n\n return selected;\n}\n\n// Naively step through the entire schema looking for \"$ref\": \"x\" pairs. The\n// resulting iterator may contain duplicates. Ignores fragments, i.e. for a ref\n// of \"a#b\", it will just yield \"a\".\nfunction* getAllRefs(schema: Schema): Iterable<string> {\n const todo: any[] = [schema];\n while (todo.length) {\n const current = todo.pop()!;\n if (typeof current === 'object' && current) {\n for (const [key, value] of Object.entries(current)) {\n if (key === '$ref' && typeof value === 'string') {\n yield value.split('#')[0];\n } else {\n todo.push(value);\n }\n }\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 { Schema } from 'ajv';\nimport { Entity } from '../entity';\nimport { compileAjvSchema, throwAjvError } from './ajv';\n\n/**\n * Creates a validation function that takes some arbitrary data, and either\n * returns that data cast to a `T` if it matches that schema, or `false` if the\n * schema apiVersion/kind didn't apply to that data, or throws a\n * {@link globals#TypeError} describing actual errors.\n *\n * @remarks\n *\n * This validator is highly specialized, in that it has special treatment of\n * the `kind` and `apiVersion` root keys. This only works if your schema has\n * their rule set to `\"enum\"`:\n *\n * ```\n * \"apiVersion\": {\n * \"enum\": [\"backstage.io/v1alpha1\", \"backstage.io/v1beta1\"]\n * },\n * \"kind\": {\n * \"enum\": [\"Group\"]\n * },\n * ```\n *\n * In the above example, the created validator will return `false` if and only\n * if the kind and/or apiVersion mismatch.\n *\n * Note that this validator is only meant for applying the base schema checks;\n * it does not take custom policies or additional processor based validation\n * into account.\n *\n * The given schema may contain `$ref` references to the following, which are\n * resolved automatically for you:\n *\n * - {@link Entity}\n *\n * - {@link EntityEnvelope}\n *\n * - {@link EntityMeta}\n *\n * - `common#<id>`\n * @see {@link https://github.com/backstage/backstage/tree/master/packages/catalog-model/src/schema}\n *\n * @public\n */\nexport function entityKindSchemaValidator<T extends Entity>(\n schema: unknown,\n): (data: unknown) => T | false {\n const validate = compileAjvSchema(schema as Schema);\n\n return data => {\n const result = validate(data);\n if (result === true) {\n return data as T;\n }\n\n // Only in the case where kind and/or apiVersion have enum mismatches AND\n // have NO other errors, we call it a soft error.\n const softCandidates = validate.errors?.filter(e =>\n ['/kind', '/apiVersion'].includes(e.instancePath),\n );\n if (\n softCandidates?.length &&\n softCandidates.every(e => e.keyword === 'enum')\n ) {\n return false;\n }\n\n throw throwAjvError(validate.errors);\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 entityKindSchemaValidator,\n KindValidator,\n} from '@backstage/catalog-model';\nimport { JsonObject } from '@backstage/types';\nimport schema from './Template.v1beta3.schema.json';\n\n/**\n * Backstage catalog Template kind Entity. Templates are used by the Scaffolder\n * plugin to create new entities, such as Components.\n *\n * @public\n */\nexport interface TemplateEntityV1beta3 extends Entity {\n /**\n * The apiVersion string of the TaskSpec.\n */\n apiVersion: 'scaffolder.backstage.io/v1beta3';\n /**\n * The kind of the entity\n */\n kind: 'Template';\n /**\n * The specification of the Template Entity\n */\n spec: {\n /**\n * The type that the Template will create. For example service, website or library.\n */\n type: string;\n /**\n * This is a JSONSchema or an array of JSONSchema's which is used to render a form in the frontend\n * to collect user input and validate it against that schema. This can then be used in the `steps` part below to template\n * variables passed from the user into each action in the template.\n */\n parameters?: TemplateParametersV1beta3 | TemplateParametersV1beta3[];\n /**\n * A list of steps to be executed in sequence which are defined by the template. These steps are a list of the underlying\n * javascript action and some optional input parameters that may or may not have been collected from the end user.\n */\n steps: Array<TemplateEntityStepV1beta3>;\n /**\n * The output is an object where template authors can pull out information from template actions and return them in a known standard way.\n */\n output?: { [name: string]: string };\n /**\n * The owner entityRef of the TemplateEntity\n */\n owner?: string;\n };\n}\n\n/**\n * Step that is part of a Template Entity.\n *\n * @public\n */\nexport interface TemplateEntityStepV1beta3 extends JsonObject {\n id?: string;\n name?: string;\n action: string;\n input?: JsonObject;\n if?: string | boolean;\n 'backstage:permissions'?: TemplatePermissionsV1beta3;\n}\n\n/**\n * Parameter that is part of a Template Entity.\n *\n * @public\n */\nexport interface TemplateParametersV1beta3 extends JsonObject {\n 'backstage:permissions'?: TemplatePermissionsV1beta3;\n}\n\n/**\n * Access control properties for parts of a template.\n *\n * @public\n */\nexport interface TemplatePermissionsV1beta3 extends JsonObject {\n tags?: string[];\n}\n\nconst validator = entityKindSchemaValidator(schema);\n\n/**\n * Entity data validator for {@link TemplateEntityV1beta3}.\n *\n * @public\n */\nexport const templateEntityV1beta3Validator: KindValidator = {\n // TODO(freben): Emulate the old KindValidator until we fix that type\n async check(data: Entity) {\n return validator(data) === data;\n },\n};\n\n/**\n * Typeguard for filtering entities and ensuring v1beta3 entities\n * @public\n */\nexport const isTemplateEntityV1beta3 = (\n entity: Entity,\n): entity is TemplateEntityV1beta3 =>\n entity.apiVersion === 'scaffolder.backstage.io/v1beta3' &&\n entity.kind === 'Template';\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 {\n ANNOTATION_EDIT_URL,\n ANNOTATION_LOCATION,\n CompoundEntityRef,\n DEFAULT_NAMESPACE,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n Card,\n CardContent,\n CardHeader,\n Divider,\n IconButton,\n makeStyles,\n} from '@material-ui/core';\nimport {\n HeaderIconLinkRow,\n IconLinkVerticalProps,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport React, { useCallback } from 'react';\nimport {\n ScmIntegrationIcon,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport {\n alertApiRef,\n errorApiRef,\n useApi,\n useApp,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n getEntitySourceLocation,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { createFromTemplateRouteRef, viewTechDocRouteRef } from '../../routes';\n\nimport { AboutContent } from './AboutContent';\nimport CachedIcon from '@material-ui/icons/Cached';\nimport CreateComponentIcon from '@material-ui/icons/AddCircleOutline';\nimport DocsIcon from '@material-ui/icons/Description';\nimport EditIcon from '@material-ui/icons/Edit';\nimport { isTemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { parseEntityRef } from '@backstage/catalog-model';\n\nconst TECHDOCS_ANNOTATION = 'backstage.io/techdocs-ref';\n\nconst TECHDOCS_EXTERNAL_ANNOTATION = 'backstage.io/techdocs-entity';\n\nconst useStyles = makeStyles({\n gridItemCard: {\n display: 'flex',\n flexDirection: 'column',\n height: 'calc(100% - 10px)', // for pages without content header\n marginBottom: '10px',\n },\n fullHeightCard: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n gridItemCardContent: {\n flex: 1,\n },\n fullHeightCardContent: {\n flex: 1,\n },\n});\n\n/**\n * Props for {@link EntityAboutCard}.\n *\n * @public\n */\nexport interface AboutCardProps {\n variant?: InfoCardVariants;\n}\n\n/**\n * Exported publicly via the EntityAboutCard\n */\nexport function AboutCard(props: AboutCardProps) {\n const { variant } = props;\n const app = useApp();\n const classes = useStyles();\n const { entity } = useEntity();\n const scmIntegrationsApi = useApi(scmIntegrationsApiRef);\n const catalogApi = useApi(catalogApiRef);\n const alertApi = useApi(alertApiRef);\n const errorApi = useApi(errorApiRef);\n const viewTechdocLink = useRouteRef(viewTechDocRouteRef);\n const templateRoute = useRouteRef(createFromTemplateRouteRef);\n\n const entitySourceLocation = getEntitySourceLocation(\n entity,\n scmIntegrationsApi,\n );\n const entityMetadataEditUrl =\n entity.metadata.annotations?.[ANNOTATION_EDIT_URL];\n\n let techdocsRef: CompoundEntityRef | undefined;\n\n if (entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]) {\n try {\n techdocsRef = parseEntityRef(\n entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION],\n );\n // not a fan of this but we don't care if the parseEntityRef fails\n } catch {\n techdocsRef = undefined;\n }\n }\n\n const viewInSource: IconLinkVerticalProps = {\n label: 'View Source',\n disabled: !entitySourceLocation,\n icon: <ScmIntegrationIcon type={entitySourceLocation?.integrationType} />,\n href: entitySourceLocation?.locationTargetUrl,\n };\n const viewInTechDocs: IconLinkVerticalProps = {\n label: 'View TechDocs',\n disabled:\n !(\n entity.metadata.annotations?.[TECHDOCS_ANNOTATION] ||\n entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]\n ) || !viewTechdocLink,\n icon: <DocsIcon />,\n href:\n viewTechdocLink &&\n (techdocsRef\n ? viewTechdocLink({\n namespace: techdocsRef.namespace || DEFAULT_NAMESPACE,\n kind: techdocsRef.kind,\n name: techdocsRef.name,\n })\n : viewTechdocLink({\n namespace: entity.metadata.namespace || DEFAULT_NAMESPACE,\n kind: entity.kind,\n name: entity.metadata.name,\n })),\n };\n\n const subHeaderLinks = [viewInSource, viewInTechDocs];\n\n if (isTemplateEntityV1beta3(entity)) {\n const Icon = app.getSystemIcon('scaffolder') ?? CreateComponentIcon;\n\n const launchTemplate: IconLinkVerticalProps = {\n label: 'Launch Template',\n icon: <Icon />,\n disabled: !templateRoute,\n href:\n templateRoute &&\n templateRoute({\n templateName: entity.metadata.name,\n namespace: entity.metadata.namespace || DEFAULT_NAMESPACE,\n }),\n };\n\n subHeaderLinks.push(launchTemplate);\n }\n\n let cardClass = '';\n if (variant === 'gridItem') {\n cardClass = classes.gridItemCard;\n } else if (variant === 'fullHeight') {\n cardClass = classes.fullHeightCard;\n }\n\n let cardContentClass = '';\n if (variant === 'gridItem') {\n cardContentClass = classes.gridItemCardContent;\n } else if (variant === 'fullHeight') {\n cardContentClass = classes.fullHeightCardContent;\n }\n\n const entityLocation = entity.metadata.annotations?.[ANNOTATION_LOCATION];\n // Limiting the ability to manually refresh to the less expensive locations\n const allowRefresh =\n entityLocation?.startsWith('url:') || entityLocation?.startsWith('file:');\n const refreshEntity = useCallback(async () => {\n try {\n await catalogApi.refreshEntity(stringifyEntityRef(entity));\n alertApi.post({\n message: 'Refresh scheduled',\n severity: 'info',\n display: 'transient',\n });\n } catch (e) {\n errorApi.post(e);\n }\n }, [catalogApi, alertApi, errorApi, entity]);\n\n return (\n <Card className={cardClass}>\n <CardHeader\n title=\"About\"\n action={\n <>\n {allowRefresh && (\n <IconButton\n aria-label=\"Refresh\"\n title=\"Schedule entity refresh\"\n onClick={refreshEntity}\n >\n <CachedIcon />\n </IconButton>\n )}\n <IconButton\n component={Link}\n aria-label=\"Edit\"\n disabled={!entityMetadataEditUrl}\n title=\"Edit Metadata\"\n to={entityMetadataEditUrl ?? '#'}\n >\n <EditIcon />\n </IconButton>\n </>\n }\n subheader={<HeaderIconLinkRow links={subHeaderLinks} />}\n />\n <Divider />\n <CardContent className={cardContentClass}>\n <AboutContent entity={entity} />\n </CardContent>\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 { makeStyles, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { Link } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport function IconLink(props: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n <Box display=\"flex\">\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n {Icon ? <Icon /> : <LanguageIcon />}\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={href} target=\"_blank\" rel=\"noopener\">\n {text || href}\n </Link>\n </Box>\n </Box>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Theme, useMediaQuery } from '@material-ui/core';\nimport { Breakpoint, ColumnBreakpoints } from './types';\n\nconst colDefaults: ColumnBreakpoints = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols: ColumnBreakpoints | number | undefined,\n): number {\n const matches: (Breakpoint | null)[] = [\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ImageList, ImageListItem } from '@material-ui/core';\nimport React from 'react';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <ImageList rowHeight=\"auto\" cols={numOfCols}>\n {items.map(({ text, href, Icon }, i) => (\n <ImageListItem key={i}>\n <IconLink href={href} text={text ?? href} Icon={Icon} />\n </ImageListItem>\n ))}\n </ImageList>\n );\n}\n"],"names":["NewEntityContext","createVersionedContext","AsyncEntityProvider","props","children","entity","loading","error","refresh","value","Provider","createVersionedValueMap","AnalyticsContext","attributes","entityRef","stringifyEntityRef","undefined","EntityProvider","Boolean","useEntity","versionedHolder","useVersionedContext","Error","atVersion","useAsyncEntity","useIconStyles","makeStyles","theme","link","display","justifyItems","gridGap","textAlign","disabled","color","palette","text","secondary","cursor","primary","main","label","textTransform","fontWeight","typography","fontWeightBold","letterSpacing","name","IconLinkVertical","href","icon","LinkIcon","onClick","title","classes","Box","className","classnames","Typography","variant","component","Link","to","useStyles","links","margin","spacing","gridAutoFlow","gridAutoColumns","HeaderIconLinkRow","nav","map","index","ScmIntegrationIcon","type","app","useApp","DefaultIcon","CodeIcon","Icon","getSystemIcon","getEntitySourceLocation","scmIntegrationsApi","sourceLocation","metadata","annotations","ANNOTATION_SOURCE_LOCATION","sourceLocationRef","parseLocationRef","integration","byUrl","target","locationTargetUrl","integrationType","markdown","borderCollapse","border","padding","wordBreak","overflow","verticalAlign","lineHeight","borderBottom","backgroundColor","background","paper","default","maxWidth","flatten","child","React","toArray","reduce","headingRenderer","level","slug","toLocaleLowerCase","replace","id","components","code","inline","String","match","exec","CodeSnippet","language","h1","h2","h3","h4","h5","h6","MarkdownContent","content","dialect","linkTarget","transformLinkUri","transformImageUri","ReactMarkdown","remarkPlugins","gfm","fontSize","whiteSpace","AboutField","gridSizes","childElements","useElementFilter","c","getElements","length","Grid","item","description","getLocationTargetHref","entitySourceLocation","includes","srcLocationUrl","URL","AboutContent","isSystem","kind","isResource","isComponent","isAPI","isTemplate","isLocation","isGroup","partOfSystemRelations","getEntityRelations","RELATION_PART_OF","partOfComponentRelations","partOfDomainRelations","ownedByRelations","RELATION_OWNED_BY","container","xs","sm","lg","EntityRefLinks","entityRefs","defaultKind","spec","lifecycle","tags","t","Chip","size","targets","LinksGridList","cols","items","compiledSchemaCache","Map","refDependencyCandidates","entityEnvelopeSchema","entitySchema","entityMetaSchema","commonSchema","throwAjvError","errors","TypeError","instancePath","message","params","Object","entries","key","val","join","compileAjvSchema","schema","options","disableCache","cacheKey","JSON","stringify","cached","get","extraSchemas","getExtraSchemas","ajv","Ajv","allowUnionTypes","allErrors","validateSchema","addSchema","compiled","compile","set","seen","Set","$id","add","selected","Array","todo","current","pop","ref","getAllRefs","has","find","push","split","entityKindSchemaValidator","validate","data","softCandidates","filter","e","every","keyword","validator","templateEntityV1beta3Validator","check","isTemplateEntityV1beta3","apiVersion","TECHDOCS_ANNOTATION","TECHDOCS_EXTERNAL_ANNOTATION","gridItemCard","flexDirection","height","marginBottom","fullHeightCard","gridItemCardContent","flex","fullHeightCardContent","AboutCard","useApi","scmIntegrationsApiRef","catalogApi","catalogApiRef","alertApi","alertApiRef","errorApi","errorApiRef","viewTechdocLink","useRouteRef","viewTechDocRouteRef","templateRoute","createFromTemplateRouteRef","entityMetadataEditUrl","ANNOTATION_EDIT_URL","techdocsRef","parseEntityRef","viewInSource","viewInTechDocs","DocsIcon","namespace","DEFAULT_NAMESPACE","subHeaderLinks","CreateComponentIcon","launchTemplate","templateName","cardClass","cardContentClass","entityLocation","ANNOTATION_LOCATION","allowRefresh","startsWith","refreshEntity","useCallback","post","severity","Card","CardHeader","action","IconButton","aria-label","CachedIcon","EditIcon","subheader","Divider","CardContent","svgIcon","IconLink","mr","LanguageIcon","flexGrow","rel","colDefaults","md","xl","useDynamicColumns","matches","useMediaQuery","breakpoints","up","numOfCols","breakpoint","k","ImageList","rowHeight","i","ImageListItem"],"sourceRoot":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[9545],{27597:function(z,g,t){var e,T=t(71600),x=t(34590);e={value:!0},g.Z=void 0;var c=x(t(2784)),f=T(t(50175)),L=(0,f.default)(c.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");g.Z=L},29862:function(z,g,t){t.d(g,{t:function(){return T}});var e=t(2784);function T(x){x===void 0&&(x=!1);var c=(0,e.useRef)(x),f=(0,e.useCallback)(function(){return c.current},[]);return(0,e.useEffect)(function(){return c.current=!0,function(){c.current=!1}},[]),f}},15277:function(z,g,t){var e,T,x;(function(c,f){if(!0)T=[g,t(2784),t(13980)],e=f,x=typeof e=="function"?e.apply(g,T):e,x!==void 0&&(z.exports=x);else var L})(void 0,function(c,f,L){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var M=Z(f),d=Z(L);function Z(r){return r&&r.__esModule?r:{default:r}}function l(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(a){return typeof a}:l=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},l(r)}function j(r,o){if(r==null)return{};var a=h(r,o),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(o.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(a[n]=r[n])}return a}function h(r,o){if(r==null)return{};var a={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(o.indexOf(i)>=0)&&(a[i]=r[i]);return a}function R(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function W(r,o){for(var a=0;a<o.length;a++){var n=o[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function B(r,o,a){return o&&W(r.prototype,o),a&&W(r,a),r}function y(r,o){return o&&(l(o)==="object"||typeof o=="function")?o:O(r)}function D(r){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},D(r)}function O(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function C(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(o&&o.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),o&&p(r,o)}function p(r,o){return p=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},p(r,o)}function b(r,o,a){return o in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a,r}var $=1e-4,I=function(o,a){return Math.abs(o-a)<$},m=function(r){C(o,r);function o(){var a,n;R(this,o);for(var i=arguments.length,s=new Array(i),P=0;P<i;P++)s[P]=arguments[P];return n=y(this,(a=D(o)).call.apply(a,[this].concat(s))),b(O(n),"onResize",function(){n.rafId&&window.cancelAnimationFrame(n.rafId),n.rafId=window.requestAnimationFrame(n.update.bind(O(n)))}),b(O(n),"onToggled",function(E){typeof n.props.onToggled=="function"&&setTimeout(function(){return n.props.onToggled(E)},0)}),b(O(n),"onTruncated",function(){typeof n.props.onTruncated=="function"&&setTimeout(function(){return n.props.onTruncated()},0)}),b(O(n),"onCalculated",function(){typeof n.props.onCalculated=="function"&&setTimeout(function(){return n.props.onCalculated()},0)}),b(O(n),"update",function(){var E=window.getComputedStyle(n.scope),K=[E["font-weight"],E["font-style"],E["font-size"],E["font-family"],E["letter-spacing"]].join(" ");n.canvas.font=K,n.forceUpdate()}),n}return B(o,[{key:"componentDidMount",value:function(){var n=document.createElement("canvas"),i=document.createDocumentFragment(),s=window.getComputedStyle(this.scope),P=[s["font-weight"],s["font-style"],s["font-size"],s["font-family"]].join(" ");i.appendChild(n),this.canvas=n.getContext("2d"),this.canvas.font=P,this.forceUpdate(),window.addEventListener("resize",this.onResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onResize),this.rafId&&window.cancelAnimationFrame(this.rafId)}},{key:"measureWidth",value:function(n){return this.canvas.measureText(n).width}},{key:"getRenderText",value:function(){var n=this.props,i=n.containerClassName,s=n.element,P=n.line,E=n.onCalculated,K=n.onTruncated,w=n.onToggled,u=n.text,F=n.textElement,S=n.textTruncateChild,J=n.truncateText,tt=n.maxCalculateTimes,V=j(n,["containerClassName","element","line","onCalculated","onTruncated","onToggled","text","textElement","textTruncateChild","truncateText","maxCalculateTimes"]),H=this.scope.getBoundingClientRect().width;if(H===0)return null;var q=this.measureWidth(u);if(H>q||I(H,q))return this.onToggled(!1),(0,f.createElement)(F,V,u);var G="";if(S&&typeof S.type=="string"){var _=S.type;(_.indexOf("span")>=0||_.indexOf("a")>=0)&&(G=S.props.children)}for(var v=1,N=u.length,A="",k=0,U=0,X=P,Y=0,Q=!1,at=!1,et=0,nt=-1,ot="",rt=0;X-- >0;){for(ot=X?"":J+(G?" "+G:"");v<=N;)if(A=u.substr(U,v),Y=this.measureWidth(A+ot),Y<H)k=u.indexOf(" ",v+1),k===-1?(v+=1,Q=!1):(Q=!0,v=k);else{do{if(rt++>=tt)break;A=u.substr(U,v),X||v--,A[A.length-1]===" "&&(A=u.substr(U,v-1)),Q?(nt=A.lastIndexOf(" "),nt>-1?(v=nt,X&&v++,A=u.substr(U,v)):(v--,A=u.substr(U,v))):(v--,A=u.substr(U,v)),Y=this.measureWidth(A+ot)}while((Y>H||I(Y,H))&&A.length>0);U+=v;break}if(v>=N){U=N;break}Q&&!at&&u.substr(et,v).indexOf(" ")===-1&&(at=u.substr(et,v).indexOf(" ")===-1,X--),et=v+1}return U===N?(this.onToggled(!1),(0,f.createElement)(F,V,u)):(this.onTruncated(),this.onToggled(!0),M.default.createElement("span",V,(0,f.createElement)(F,V,u.substr(0,U)+J+" "),S))}},{key:"render",value:function(){var n=this,i=this.props,s=i.element,P=i.text,E=i.style,K=E===void 0?{}:E,w=i.containerClassName,u=i.line,F=i.onCalculated,S=i.onTruncated,J=i.onToggled,tt=i.textElement,V=i.textTruncateChild,H=i.truncateText,q=i.maxCalculateTimes,G=j(i,["element","text","style","containerClassName","line","onCalculated","onTruncated","onToggled","textElement","textTruncateChild","truncateText","maxCalculateTimes"]),_=K.fontWeight,v=K.fontStyle,N=K.fontSize,A=K.fontFamily,k=this.scope&&u?this.getRenderText():(0,f.createElement)(tt,G,P),U={ref:function(Y){n.scope=Y},className:w,style:{overflow:"hidden",fontWeight:_,fontStyle:v,fontSize:N,fontFamily:A}};return this.scope&&this.onCalculated(),(0,f.createElement)(s,U,k)}}]),o}(f.Component);b(m,"propTypes",{containerClassName:d.default.string,element:d.default.string,line:d.default.oneOfType([d.default.number,d.default.bool]),onCalculated:d.default.func,onTruncated:d.default.func,onToggled:d.default.func,text:d.default.string,textElement:d.default.elementType,textTruncateChild:d.default.node,truncateText:d.default.string,maxCalculateTimes:d.default.number}),b(m,"defaultProps",{element:"div",line:1,text:"",textElement:"span",truncateText:"\u2026",maxCalculateTimes:10}),c.default=m,z.exports=c.default})},59119:function(z,g,t){t.d(g,{O:function(){return Z}});var e=t(52322),T=t(79692),x=t(80030),c=t(2784),f=t(15277),L=t.n(f),M=t(29862);const d=(0,T.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Z(l){const[j,h]=(0,c.useState)(!1),R=(0,M.t)(),W=d(),B=D=>{R()&&h(D)};var y;return(0,e.jsx)(x.ZP,{title:(y=l.title)!==null&&y!==void 0?y:l.text||"",placement:l.placement,disableHoverListener:!j,children:(0,e.jsx)(L(),{text:l.text,line:l.line,onToggled:B,containerClassName:W.container})})}},1546:function(z,g,t){t.d(g,{r:function(){return r}});var e=t(52322),T=t(94339),x=t(14503),c=t(24579),f=t(32552),L=t(85256),M=t(79692),d=t(15459),Z=t(72779),l=t.n(Z),j=t(2784),h=t(62774),R=t(90436),W=t(27597),B=t(98864);const y=(0,M.Z)(o=>({root:{maxWidth:"fit-content",padding:o.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:o.palette.textSubtle},arrow:{color:o.palette.textSubtle}}),{name:"BackstageBottomLink"});function D(o){const{link:a,title:n,onClick:i}=o,s=y();return(0,e.jsxs)(h.Z,{children:[(0,e.jsx)(L.Z,{}),(0,e.jsx)(B.rU,{to:a,onClick:i,underline:"none",children:(0,e.jsxs)(h.Z,{display:"flex",alignItems:"center",className:s.root,children:[(0,e.jsx)(h.Z,{className:s.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,e.jsx)(R.Z,{children:(0,e.jsx)("strong",{children:n})})}),(0,e.jsx)(W.Z,{className:s.arrow})]})})]})}var O=t(15929),C=t(74359);const p=o=>{const{slackChannel:a}=o;if(a){if(typeof a=="string")return(0,e.jsxs)(R.Z,{children:["Please contact ",a," for help."]});if(!a.href)return(0,e.jsxs)(R.Z,{children:["Please contact ",a.name," for help."]})}else return null;return(0,e.jsx)(O.Q,{to:a.href,variant:"contained",children:a.name})},b=class extends j.Component{componentDidCatch(a,n){console.error(`ErrorBoundary, error: ${a}, info: ${n}`),this.setState({error:a,errorInfo:n})}render(){const{slackChannel:a,children:n}=this.props,{error:i}=this.state;return i?(0,e.jsx)(C.y,{title:"Something Went Wrong",error:i,children:(0,e.jsx)(p,{slackChannel:a})}):n}constructor(a){super(a),this.state={error:void 0,errorInfo:void 0}}},$=(0,M.Z)(o=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:o.spacing(2,2,2,2.5)},headerTitle:{fontWeight:o.typography.fontWeightBold},headerSubheader:{paddingTop:o.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),I=(0,d.Z)(o=>({root:{display:"inline-block",padding:o.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(x.Z),m={card:{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"}}},cardContent:{fullHeight:{flex:1},gridItem:{flex:1}}};function r(o){const{title:a,subheader:n,divider:i=!0,deepLink:s,slackChannel:P,errorBoundaryProps:E,variant:K,children:w,headerStyle:u,headerProps:F,icon:S,action:J,actionsClassName:tt,actions:V,cardClassName:H,actionsTopRight:q,className:G,noPadding:_,titleTypographyProps:v}=o,N=$();let A={},k={};K&&K.split(/[\s]+/g).forEach(Q=>{A={...A,...m.card[Q]},k={...k,...m.cardContent[Q]}});const U=()=>!n&&!S?null:(0,e.jsxs)("div",{className:N.headerSubheader,"data-testid":"info-card-subheader",children:[n&&(0,e.jsx)("div",{className:N.subheader,children:n}),S]}),X=E||(P?{slackChannel:P}:{});return(0,e.jsx)(T.Z,{style:A,className:G,children:(0,e.jsxs)(b,{...X,children:[a&&(0,e.jsx)(f.Z,{classes:{root:N.header,title:N.headerTitle,subheader:N.headerSubheader,avatar:N.headerAvatar,action:N.headerAction,content:N.headerContent},title:a,subheader:U(),action:J,style:{...u},titleTypographyProps:v,...F}),q&&(0,e.jsx)(I,{children:q}),i&&(0,e.jsx)(L.Z,{}),(0,e.jsx)(c.Z,{className:l()(H,{[N.noPadding]:_}),style:k,children:w}),V&&(0,e.jsx)(x.Z,{className:tt,children:V}),s&&(0,e.jsx)(D,{...s})]})})}},48283:function(z,g,t){t.d(g,{u:function(){return B}});var e=t(52322),T=t(79692),x=t(2784),c=t(8709),f=t(59119),L=t(75435),M=t(86540),d=t(41748),Z=t(68138);const l=Object.freeze({createEntityRefColumn(y){const{defaultKind:D}=y;function O(C){var p;return((p=C.metadata)===null||p===void 0?void 0:p.title)||(0,M.$)(C,{defaultKind:D})}return{title:"Name",highlight:!0,customFilterAndSearch(C,p){return O(p).includes(C)},customSort(C,p){return O(C).localeCompare(O(p))},render:C=>{var p;return(0,e.jsx)(d.d,{entityRef:C,defaultKind:D,title:(p=C.metadata)===null||p===void 0?void 0:p.title})}}},createEntityRelationColumn(y){const{title:D,relation:O,defaultKind:C,filter:p}=y;function b(I){return(0,L.h)(I,O,p)}function $(I){return b(I).map(m=>(0,M.$)(m,{defaultKind:C})).join(", ")}return{title:D,customFilterAndSearch(I,m){return $(m).includes(I)},customSort(I,m){return $(I).localeCompare($(m))},render:I=>(0,e.jsx)(Z.r,{entityRefs:b(I),defaultKind:C})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:c.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:c.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:c.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:y=>(0,e.jsx)(f.O,{text:y.metadata.description,placement:"bottom-start",line:2})}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),j=[l.createEntityRefColumn({defaultKind:"system"}),l.createDomainColumn(),l.createOwnerColumn(),l.createMetadataDescriptionColumn()],h=[l.createEntityRefColumn({defaultKind:"component"}),l.createSystemColumn(),l.createOwnerColumn(),l.createSpecTypeColumn(),l.createSpecLifecycleColumn(),l.createMetadataDescriptionColumn()];var R=t(84462);const W=(0,T.Z)(y=>({empty:{padding:y.spacing(2),display:"flex",justifyContent:"center"}})),B=y=>{const{entities:D,title:O,emptyContent:C,variant:p="gridItem",columns:b,tableOptions:$={}}=y,I=W(),m={minWidth:"0",width:"100%"};return p==="gridItem"&&(m.height="calc(100% - 10px)"),(0,e.jsx)(R.i,{columns:b,title:O,style:m,emptyContent:C&&(0,e.jsx)("div",{className:I.empty,children:C}),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1,...$},data:D})};B.columns=l,B.systemEntityColumns=j,B.componentEntityColumns=h},96641:function(z,g,t){t.d(g,{X2:function(){return l},h$:function(){return d}});var e=t(52322),T=t(74314),x=t(72388),c=t(29651),f=t(68993),L=t(2784);const M=(0,c.CT)("entity-context"),d=h=>{const{children:R,entity:W,loading:B,error:y,refresh:D}=h,O={entity:W,loading:B,error:y,refresh:D};return(0,e.jsx)(M.Provider,{value:(0,f.E)({1:O}),children:(0,e.jsx)(x.fC,{attributes:{...W?{entityRef:(0,T.eE)(W)}:void 0},children:R})})},Z=h=>_jsx(d,{entity:h.entity,loading:!Boolean(h.entity),error:void 0,refresh:void 0,children:h.children});function l(){const h=(0,c.Vt)("entity-context");if(!h)throw new Error("Entity context is not available");const R=h.atVersion(1);if(!R)throw new Error("EntityContext v1 not available");if(!R.entity)throw new 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:R.entity}}function j(){const h=useVersionedContext("entity-context");if(!h)throw new Error("Entity context is not available");const R=h.atVersion(1);if(!R)throw new Error("EntityContext v1 not available");const{entity:W,loading:B,error:y,refresh:D}=R;return{entity:W,loading:B,error:y,refresh:D}}},19545:function(z,g,t){t.r(g),t.d(g,{DependsOnComponentsCard:function(){return L}});var e=t(52322),T=t(8709),x=t(2784),c=t(19431),f=t(30083);function L(M){const{variant:d="gridItem",title:Z="Depends on components",columns:l=c.we,tableOptions:j={}}=M;return(0,e.jsx)(f.f,{variant:d,title:Z,entityKind:"Component",relationType:T.nP,columns:l,emptyMessage:"No component is a dependency of this component",emptyHelpLink:c.AE,asRenderableEntities:c.D,tableOptions:j})}},30083:function(z,g,t){t.d(g,{f:function(){return I}});var e=t(52322),T=t(90436),x=t(96641),c=t(74314),f=t(44394),L=t(64279),M=t(88624);function d(m,r){var o,a;const n=r==null||(o=r.type)===null||o===void 0?void 0:o.toLocaleLowerCase("en-US"),i=r==null||(a=r.kind)===null||a===void 0?void 0:a.toLocaleLowerCase("en-US"),s=(0,f.h_)(M.A),{loading:P,value:E,error:K}=(0,L.default)(async()=>{var w;const u=(w=m.relations)===null||w===void 0?void 0:w.filter(S=>(!n||S.type.toLocaleLowerCase("en-US")===n)&&(!i||(0,c.of)(S.targetRef).kind===i));if(!(u!=null&&u.length))return[];const{items:F}=await s.getEntitiesByRefs({entityRefs:u.map(S=>S.targetRef)});return F.filter(S=>Boolean(S))},[m,n,i]);return{entities:E,loading:P,error:K}}var Z=t(48283),l=t(2784),j=t(1546),h=t(55015),R=t(79692),W=t(85256),B=t(38402),y=t(49378),D=t(9791),O=t(58033),C=t(74359);const p=(0,R.Z)(m=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:m.spacing(2)},divider:{margin:m.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function b(m){var r;const{title:o,error:a,defaultExpanded:n}=m,i=p();if(a.name!=="ResponseError")return(0,e.jsx)(C.y,{title:o!=null?o:a.message,defaultExpanded:n,error:a});const{body:s,cause:P}=a,{request:E,response:K}=s,w=`${K.statusCode}: ${P.name}`,u=E&&`${E.method} ${E.url}`,F=P.message.replace(/\\n/g,`
|
|
2
|
+
`),S=(r=P.stack)===null||r===void 0?void 0:r.replace(/\\n/g,`
|
|
3
|
+
`),J=JSON.stringify(s,void 0,2);return(0,e.jsxs)(C.y,{title:o!=null?o:a.message,defaultExpanded:n,error:{name:w,message:F,stack:S},children:[u&&(0,e.jsxs)(B.Z,{alignItems:"flex-start",children:[(0,e.jsx)(y.Z,{classes:{secondary:i.text},primary:"Request",secondary:E?`${u}`:void 0}),(0,e.jsx)(O.b,{text:u})]}),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(W.Z,{component:"li",className:i.divider}),(0,e.jsx)(B.Z,{alignItems:"flex-start",children:(0,e.jsx)(y.Z,{classes:{secondary:i.text},primary:"Full Error as JSON"})}),(0,e.jsx)(D.O,{language:"json",text:J,showCopyCodeButton:!0})]})]})}var $=t(98864);function I(m){const{variant:r="gridItem",title:o,columns:a,entityKind:n,relationType:i,emptyMessage:s,emptyHelpLink:P,asRenderableEntities:E,tableOptions:K={}}=m,{entity:w}=(0,x.X2)(),{entities:u,loading:F,error:S}=d(w,{type:i,kind:n});return F?(0,e.jsx)(j.r,{variant:r,title:o,children:(0,e.jsx)(h.E,{})}):S?(0,e.jsx)(j.r,{variant:r,title:o,children:(0,e.jsx)(b,{error:S})}):(0,e.jsx)(Z.u,{title:o,variant:r,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(T.Z,{variant:"body1",children:s}),(0,e.jsx)(T.Z,{variant:"body2",children:(0,e.jsx)($.rU,{to:P,children:"Learn how to change this."})})]}),columns:a,entities:E(u||[]),tableOptions:K})}},19431:function(z,g,t){t.d(g,{$c:function(){return M},AE:function(){return x},D:function(){return c},G5:function(){return Z},Uc:function(){return L},_v:function(){return d},el:function(){return l},we:function(){return T},xp:function(){return f}});var e=t(48283);const T=[e.u.columns.createEntityRefColumn({defaultKind:"component"}),e.u.columns.createOwnerColumn(),e.u.columns.createSpecTypeColumn(),e.u.columns.createSpecLifecycleColumn(),e.u.columns.createMetadataDescriptionColumn()],x="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",c=j=>j,f=[e.u.columns.createEntityRefColumn({defaultKind:"resource"}),e.u.columns.createOwnerColumn(),e.u.columns.createSpecTypeColumn(),e.u.columns.createSpecLifecycleColumn(),e.u.columns.createMetadataDescriptionColumn()],L="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",M=j=>j,d=[e.u.columns.createEntityRefColumn({defaultKind:"system"}),e.u.columns.createOwnerColumn(),e.u.columns.createMetadataDescriptionColumn()],Z="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",l=j=>j}}]);})();
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=9545.1f2986d6.chunk.js.map
|