@techdocs/cli 1.6.0 → 1.6.1-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/embedded-app/.config-schema.json +52 -28
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/static/{1032.d8d4547a.chunk.js → 1032.88fa9fda.chunk.js} +2 -2
  5. package/dist/embedded-app/static/{1032.d8d4547a.chunk.js.map → 1032.88fa9fda.chunk.js.map} +1 -1
  6. package/dist/embedded-app/static/{1105.250209d9.chunk.js → 1105.2ef0665c.chunk.js} +2 -2
  7. package/dist/embedded-app/static/{1105.250209d9.chunk.js.map → 1105.2ef0665c.chunk.js.map} +1 -1
  8. package/dist/embedded-app/static/1600.ef4a7196.chunk.js +3 -0
  9. package/dist/embedded-app/static/1600.ef4a7196.chunk.js.map +1 -0
  10. package/dist/embedded-app/static/{184.3d7fb6d2.chunk.js → 184.8fc549e9.chunk.js} +2 -2
  11. package/dist/embedded-app/static/{184.3d7fb6d2.chunk.js.map → 184.8fc549e9.chunk.js.map} +1 -1
  12. package/dist/embedded-app/static/{2440.8c636d46.chunk.js → 2440.2451b337.chunk.js} +2 -2
  13. package/dist/embedded-app/static/{2440.8c636d46.chunk.js.map → 2440.2451b337.chunk.js.map} +1 -1
  14. package/dist/embedded-app/static/{3487.ca0b20dd.chunk.js → 3487.1c93df49.chunk.js} +2 -2
  15. package/dist/embedded-app/static/{3487.ca0b20dd.chunk.js.map → 3487.1c93df49.chunk.js.map} +1 -1
  16. package/dist/embedded-app/static/{3893.18294a43.chunk.js → 3893.118c937c.chunk.js} +1 -1
  17. package/dist/embedded-app/static/{3893.18294a43.chunk.js.map → 3893.118c937c.chunk.js.map} +1 -1
  18. package/dist/embedded-app/static/4109.6335d16f.chunk.js +3 -0
  19. package/dist/embedded-app/static/4109.6335d16f.chunk.js.map +1 -0
  20. package/dist/embedded-app/static/{4966.9cb67949.chunk.js → 4966.e30bae7f.chunk.js} +1 -1
  21. package/dist/embedded-app/static/{4966.9cb67949.chunk.js.map → 4966.e30bae7f.chunk.js.map} +1 -1
  22. package/dist/embedded-app/static/{5458.e6517aa6.chunk.js → 5458.abed4572.chunk.js} +2 -2
  23. package/dist/embedded-app/static/{5458.e6517aa6.chunk.js.map → 5458.abed4572.chunk.js.map} +1 -1
  24. package/dist/embedded-app/static/{5877.829aa767.chunk.js → 5877.c521a57f.chunk.js} +1 -1
  25. package/dist/embedded-app/static/{5877.829aa767.chunk.js.map → 5877.c521a57f.chunk.js.map} +1 -1
  26. package/dist/embedded-app/static/{5914.92b59b3e.chunk.js → 5914.111b8c95.chunk.js} +2 -2
  27. package/dist/embedded-app/static/{5914.92b59b3e.chunk.js.map → 5914.111b8c95.chunk.js.map} +1 -1
  28. package/dist/embedded-app/static/{6051.84051083.chunk.js → 6051.9eefea24.chunk.js} +1 -1
  29. package/dist/embedded-app/static/{6051.84051083.chunk.js.map → 6051.9eefea24.chunk.js.map} +1 -1
  30. package/dist/embedded-app/static/{7670.4e34a90d.chunk.js → 7670.9faef6c0.chunk.js} +1 -1
  31. package/dist/embedded-app/static/{7670.4e34a90d.chunk.js.map → 7670.9faef6c0.chunk.js.map} +1 -1
  32. package/dist/embedded-app/static/{7750.3b7f34f8.chunk.js → 7750.cb06dc85.chunk.js} +1 -1
  33. package/dist/embedded-app/static/{7750.3b7f34f8.chunk.js.map → 7750.cb06dc85.chunk.js.map} +1 -1
  34. package/dist/embedded-app/static/{7893.8b70980c.chunk.js → 7893.e406114c.chunk.js} +2 -2
  35. package/dist/embedded-app/static/{7893.8b70980c.chunk.js.map → 7893.e406114c.chunk.js.map} +1 -1
  36. package/dist/embedded-app/static/{8629.18b8b029.chunk.js → 8629.34b012ba.chunk.js} +1 -1
  37. package/dist/embedded-app/static/{8629.18b8b029.chunk.js.map → 8629.34b012ba.chunk.js.map} +1 -1
  38. package/dist/embedded-app/static/{8662.e8af541f.chunk.js → 8662.7243a5c6.chunk.js} +1 -1
  39. package/dist/embedded-app/static/{8662.e8af541f.chunk.js.map → 8662.7243a5c6.chunk.js.map} +1 -1
  40. package/dist/embedded-app/static/{8951.b8daca92.chunk.js → 8951.6ae94626.chunk.js} +1 -1
  41. package/dist/embedded-app/static/{8951.b8daca92.chunk.js.map → 8951.6ae94626.chunk.js.map} +1 -1
  42. package/dist/embedded-app/static/{9545.1f2986d6.chunk.js → 9545.8e4a2868.chunk.js} +2 -2
  43. package/dist/embedded-app/static/{9545.1f2986d6.chunk.js.map → 9545.8e4a2868.chunk.js.map} +1 -1
  44. package/dist/embedded-app/static/{967.00bc7a39.chunk.js → 967.dadcb6bd.chunk.js} +3 -3
  45. package/dist/embedded-app/static/{967.00bc7a39.chunk.js.map → 967.dadcb6bd.chunk.js.map} +1 -1
  46. package/dist/embedded-app/static/{9770.5cb016d6.chunk.js → 9770.2d75fe33.chunk.js} +2 -2
  47. package/dist/embedded-app/static/{9770.5cb016d6.chunk.js.map → 9770.2d75fe33.chunk.js.map} +1 -1
  48. package/dist/embedded-app/static/main.167d1cf0.js +487 -0
  49. package/dist/embedded-app/static/main.167d1cf0.js.map +1 -0
  50. package/dist/embedded-app/static/module-lodash.fa492ce2.js +29 -0
  51. package/dist/embedded-app/static/module-lodash.fa492ce2.js.map +1 -0
  52. package/dist/embedded-app/static/{module-material-table.0f5635dd.js → module-material-table.3c68edc1.js} +1 -1
  53. package/dist/embedded-app/static/{module-material-table.0f5635dd.js.map → module-material-table.3c68edc1.js.map} +1 -1
  54. package/dist/embedded-app/static/{module-material-ui.bdbd8daa.js → module-material-ui.263ce9b5.js} +7 -7
  55. package/dist/embedded-app/static/module-material-ui.263ce9b5.js.map +1 -0
  56. package/dist/embedded-app/static/{module-react-beautiful-dnd.62627182.js → module-react-beautiful-dnd.0ca788d0.js} +1 -1
  57. package/dist/embedded-app/static/{module-react-beautiful-dnd.62627182.js.map → module-react-beautiful-dnd.0ca788d0.js.map} +1 -1
  58. package/dist/embedded-app/static/module-react-dom.f7ae1c8b.js +26 -0
  59. package/dist/embedded-app/static/module-react-dom.f7ae1c8b.js.map +1 -0
  60. package/dist/embedded-app/static/{module-react-router-dom.65ce4c09.js → module-react-router-dom.8eff32d7.js} +1 -1
  61. package/dist/embedded-app/static/{module-react-router-dom.65ce4c09.js.map → module-react-router-dom.8eff32d7.js.map} +1 -1
  62. package/dist/embedded-app/static/{module-react-router.652daaf3.js → module-react-router.05179f87.js} +1 -1
  63. package/dist/embedded-app/static/{module-react-router.652daaf3.js.map → module-react-router.05179f87.js.map} +1 -1
  64. package/dist/embedded-app/static/{runtime.02409009.js → runtime.167d1cf0.js} +2 -2
  65. package/dist/embedded-app/static/{runtime.02409009.js.map → runtime.167d1cf0.js.map} +1 -1
  66. package/dist/embedded-app/static/vendor.167d1cf0.js +167 -0
  67. package/dist/embedded-app/static/vendor.167d1cf0.js.map +1 -0
  68. package/dist/index.cjs.js +1 -1
  69. package/package.json +4 -4
  70. package/dist/embedded-app/static/1600.1ec85d5a.chunk.js +0 -3
  71. package/dist/embedded-app/static/1600.1ec85d5a.chunk.js.map +0 -1
  72. package/dist/embedded-app/static/2924.b96e10c0.chunk.js +0 -3
  73. package/dist/embedded-app/static/2924.b96e10c0.chunk.js.map +0 -1
  74. package/dist/embedded-app/static/main.02409009.js +0 -487
  75. package/dist/embedded-app/static/main.02409009.js.map +0 -1
  76. package/dist/embedded-app/static/module-lodash.adfd55fe.js +0 -29
  77. package/dist/embedded-app/static/module-lodash.adfd55fe.js.map +0 -1
  78. package/dist/embedded-app/static/module-material-ui.bdbd8daa.js.map +0 -1
  79. package/dist/embedded-app/static/module-react-dom.07625e59.js +0 -25
  80. package/dist/embedded-app/static/module-react-dom.07625e59.js.map +0 -1
  81. package/dist/embedded-app/static/vendor.02409009.js +0 -159
  82. package/dist/embedded-app/static/vendor.02409009.js.map +0 -1
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8662],{18662:function(_,c,t){t.r(c),t.d(c,{TechDocsIndexPage:function(){return o}});var e=t(52322),u=t(2784),d=t(73557),n=t(29895);const o=s=>(0,d.pC)()||(0,e.jsx)(n.u,{...s})}}]);})();
2
2
 
3
- //# sourceMappingURL=8662.e8af541f.chunk.js.map
3
+ //# sourceMappingURL=8662.7243a5c6.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"static/8662.e8af541f.chunk.js","mappings":"yPAkCO,MAAMA,EAAqBC,MACjBC,EAAAA,IAAU,MAER,OAACC,EAAAA,EAAmBA,CAAE,GAAGF,C","sources":["webpack://techdocs-cli-embedded-app/../../plugins/techdocs/src/home/components/TechDocsIndexPage.tsx"],"sourcesContent":["/*\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 React from 'react';\nimport { useOutlet } from 'react-router-dom';\nimport { TableColumn, TableProps } from '@backstage/core-components';\nimport { UserListFilterKind } from '@backstage/plugin-catalog-react';\nimport { DefaultTechDocsHome } from './DefaultTechDocsHome';\nimport { DocsTableRow } from './Tables';\n\n/**\n * Props for {@link TechDocsIndexPage}\n *\n * @public\n */\nexport type TechDocsIndexPageProps = {\n initialFilter?: UserListFilterKind;\n columns?: TableColumn<DocsTableRow>[];\n actions?: TableProps<DocsTableRow>['actions'];\n};\n\nexport const TechDocsIndexPage = (props: TechDocsIndexPageProps) => {\n const outlet = useOutlet();\n\n return outlet || <DefaultTechDocsHome {...props} />;\n};\n"],"names":["TechDocsIndexPage","props","useOutlet","DefaultTechDocsHome"],"sourceRoot":""}
1
+ {"version":3,"file":"static/8662.7243a5c6.chunk.js","mappings":"yPAkCO,MAAMA,EAAqBC,MACjBC,EAAAA,IAAU,MAER,OAACC,EAAAA,EAAmBA,CAAE,GAAGF,C","sources":["webpack://techdocs-cli-embedded-app/../../plugins/techdocs/src/home/components/TechDocsIndexPage.tsx"],"sourcesContent":["/*\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 React from 'react';\nimport { useOutlet } from 'react-router-dom';\nimport { TableColumn, TableProps } from '@backstage/core-components';\nimport { UserListFilterKind } from '@backstage/plugin-catalog-react';\nimport { DefaultTechDocsHome } from './DefaultTechDocsHome';\nimport { DocsTableRow } from './Tables';\n\n/**\n * Props for {@link TechDocsIndexPage}\n *\n * @public\n */\nexport type TechDocsIndexPageProps = {\n initialFilter?: UserListFilterKind;\n columns?: TableColumn<DocsTableRow>[];\n actions?: TableProps<DocsTableRow>['actions'];\n};\n\nexport const TechDocsIndexPage = (props: TechDocsIndexPageProps) => {\n const outlet = useOutlet();\n\n return outlet || <DefaultTechDocsHome {...props} />;\n};\n"],"names":["TechDocsIndexPage","props","useOutlet","DefaultTechDocsHome"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8951],{61811:function(g,s,t){t.d(s,{O:function(){return c}});var i=t(73557);function c(u){return(0,i.UO)()}},96641:function(g,s,t){t.d(s,{X2:function(){return P},h$:function(){return l}});var i=t(52322),c=t(74314),u=t(72388),E=t(29651),v=t(68993),f=t(2784);const h=(0,E.CT)("entity-context"),l=n=>{const{children:e,entity:o,loading:r,error:a,refresh:d}=n,y={entity:o,loading:r,error:a,refresh:d};return(0,i.jsx)(h.Provider,{value:(0,v.E)({1:y}),children:(0,i.jsx)(u.fC,{attributes:{...o?{entityRef:(0,c.eE)(o)}:void 0},children:e})})},C=n=>_jsx(l,{entity:n.entity,loading:!Boolean(n.entity),error:void 0,refresh:void 0,children:n.children});function P(){const n=(0,E.Vt)("entity-context");if(!n)throw new Error("Entity context is not available");const e=n.atVersion(1);if(!e)throw new Error("EntityContext v1 not available");if(!e.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:e.entity}}function O(){const n=useVersionedContext("entity-context");if(!n)throw new Error("Entity context is not available");const e=n.atVersion(1);if(!e)throw new Error("EntityContext v1 not available");const{entity:o,loading:r,error:a,refresh:d}=e;return{entity:o,loading:r,error:a,refresh:d}}},78951:function(g,s,t){t.r(s),t.d(s,{CatalogEntityPage:function(){return n}});var i=t(52322),c=t(2784),u=t(73557),E=t(96641),v=t(61811),f=t(44394),h=t(58513),l=t(36434),C=t(88624),P=t(77446);const O=()=>{const{kind:e,namespace:o,name:r}=(0,v.O)(l.w),a=(0,u.s0)(),d=(0,f.h_)(h.V),y=(0,f.h_)(C.A),{value:A,error:m,loading:x,retry:R}=(0,P.Z)(()=>y.getEntityByRef({kind:e,namespace:o,name:r}),[y,e,o,r]);return(0,c.useEffect)(()=>{r||(d.post(new Error("No name provided!")),a("/"))},[d,a,m,x,A,r]),{entity:A,loading:x,error:m,refresh:R}};function n(){return(0,i.jsx)(E.h$,{...O(),children:(0,i.jsx)(u.j3,{})})}}}]);})();
2
2
 
3
- //# sourceMappingURL=8951.b8daca92.chunk.js.map
3
+ //# sourceMappingURL=8951.6ae94626.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"static/8951.b8daca92.chunk.js","mappings":"kMAwBO,SAASA,EACdC,EAAiD,CAEjD,SAAOC,EAAAA,IAAU,CACnB,C,sJCOA,MAAMC,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,EAGlB,GAAI,CAACD,EACH,MAAM,IAAIE,MAAM,iCAAiC,EAGnD,MAAMb,EAAQW,EAAgBG,UAAU,CAAC,EACzC,GAAI,CAACd,EACH,MAAM,IAAIa,MAAM,gCAAgC,EAGlD,GAAI,CAACb,EAAMJ,OACT,MAAM,IAAIiB,MACR,4JAA4J,EAIhK,MAAO,CAAEjB,OAAQI,EAAMJ,MAAkB,CAC3C,CAOO,SAASmB,GAAAA,CAGd,MAAMJ,EAAkBC,oBACtB,gBAAgB,EAGlB,GAAI,CAACD,EACH,MAAM,IAAIE,MAAM,iCAAiC,EAEnD,MAAMb,EAAQW,EAAgBG,UAAU,CAAC,EACzC,GAAI,CAACd,EACH,MAAM,IAAIa,MAAM,gCAAgC,EAGlD,KAAM,CAAEjB,OAAAA,EAAQC,QAAAA,EAASC,MAAAA,EAAOC,QAAAA,CAAQ,EAAIC,EAC5C,MAAO,CAAEJ,OAAQA,EAAmBC,QAAAA,EAASC,MAAAA,EAAOC,QAAAA,CAAQ,CAC9D,C,gMC3HO,MAAMiB,EAAmB,KAC9B,KAAM,CAAEC,KAAAA,EAAMC,UAAAA,EAAWC,KAAAA,CAAK,KAAI/B,EAAAA,GAAkBgC,EAAAA,CAAcA,EAC5DC,KAAWC,EAAAA,IAAY,EACvBC,KAAWC,EAAAA,IAAOC,EAAAA,CAAWA,EAC7BC,KAAaF,EAAAA,IAAOG,EAAAA,CAAaA,EAEjC,CACJ3B,MAAOJ,EACPE,MAAAA,EACAD,QAAAA,EACA+B,MAAO7B,CAAO,KACZ8B,EAAAA,GACF,IAAMH,EAAWI,eAAe,CAAEb,KAAAA,EAAMC,UAAAA,EAAWC,KAAAA,CAAK,CAAC,EACzD,CAACO,EAAYT,EAAMC,EAAWC,C,CAAK,EAGrCY,SAAAA,EAAAA,WAAU,KACHZ,IACHI,EAASS,KAAK,IAAInB,MAAM,mBAAmB,CAAC,EAC5CQ,EAAS,GAAG,EAEhB,EAAG,CAACE,EAAUF,EAAUvB,EAAOD,EAASD,EAAQuB,C,CAAK,EAE9C,CAAEvB,OAAAA,EAAQC,QAAAA,EAASC,MAAAA,EAAOC,QAAAA,CAAQ,CAC3C,EChCO,SAASkC,GAAoB,CAClC,SACE,OAACxC,EAAAA,GAAmBA,CAAE,GAAGuB,EAAiB,E,YACxC,OAACkB,EAAAA,GAAMA,CAAAA,CAAAA,C,EAGb,C","sources":["webpack://techdocs-cli-embedded-app/../core-plugin-api/src/routing/useRouteRefParams.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntity.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/CatalogEntityPage/useEntityFromUrl.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/CatalogEntityPage/CatalogEntityPage.tsx"],"sourcesContent":["/*\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 { useParams } from 'react-router-dom';\nimport { RouteRef, AnyParams, SubRouteRef } from './types';\n\n/**\n * React hook for retrieving dynamic params from the current URL.\n * @param _routeRef - Ref of the current route.\n * @public\n */\nexport function useRouteRefParams<Params extends AnyParams>(\n _routeRef: RouteRef<Params> | SubRouteRef<Params>,\n): Params {\n return useParams() as Params;\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 2022 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 errorApiRef,\n useApi,\n useRouteRefParams,\n} from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n EntityLoadingStatus,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { useEffect } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport useAsyncRetry from 'react-use/lib/useAsyncRetry';\n\nexport const useEntityFromUrl = (): EntityLoadingStatus => {\n const { kind, namespace, name } = useRouteRefParams(entityRouteRef);\n const navigate = useNavigate();\n const errorApi = useApi(errorApiRef);\n const catalogApi = useApi(catalogApiRef);\n\n const {\n value: entity,\n error,\n loading,\n retry: refresh,\n } = useAsyncRetry(\n () => catalogApi.getEntityByRef({ kind, namespace, name }),\n [catalogApi, kind, namespace, name],\n );\n\n useEffect(() => {\n if (!name) {\n errorApi.post(new Error('No name provided!'));\n navigate('/');\n }\n }, [errorApi, navigate, error, loading, entity, name]);\n\n return { entity, 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 React from 'react';\nimport { Outlet } from 'react-router-dom';\nimport { AsyncEntityProvider } from '@backstage/plugin-catalog-react';\nimport { useEntityFromUrl } from './useEntityFromUrl';\n\n/** @public */\nexport function CatalogEntityPage() {\n return (\n <AsyncEntityProvider {...useEntityFromUrl()}>\n <Outlet />\n </AsyncEntityProvider>\n );\n}\n"],"names":["useRouteRefParams","_routeRef","useParams","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","useEntityFromUrl","kind","namespace","name","entityRouteRef","navigate","useNavigate","errorApi","useApi","errorApiRef","catalogApi","catalogApiRef","retry","useAsyncRetry","getEntityByRef","useEffect","post","CatalogEntityPage","Outlet"],"sourceRoot":""}
1
+ {"version":3,"file":"static/8951.6ae94626.chunk.js","mappings":"kMAwBO,SAASA,EACdC,EAAiD,CAEjD,SAAOC,EAAAA,IAAU,CACnB,C,sJCOA,MAAMC,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,EAGlB,GAAI,CAACD,EACH,MAAM,IAAIE,MAAM,iCAAiC,EAGnD,MAAMb,EAAQW,EAAgBG,UAAU,CAAC,EACzC,GAAI,CAACd,EACH,MAAM,IAAIa,MAAM,gCAAgC,EAGlD,GAAI,CAACb,EAAMJ,OACT,MAAM,IAAIiB,MACR,4JAA4J,EAIhK,MAAO,CAAEjB,OAAQI,EAAMJ,MAAkB,CAC3C,CAOO,SAASmB,GAAAA,CAGd,MAAMJ,EAAkBC,oBACtB,gBAAgB,EAGlB,GAAI,CAACD,EACH,MAAM,IAAIE,MAAM,iCAAiC,EAEnD,MAAMb,EAAQW,EAAgBG,UAAU,CAAC,EACzC,GAAI,CAACd,EACH,MAAM,IAAIa,MAAM,gCAAgC,EAGlD,KAAM,CAAEjB,OAAAA,EAAQC,QAAAA,EAASC,MAAAA,EAAOC,QAAAA,CAAQ,EAAIC,EAC5C,MAAO,CAAEJ,OAAQA,EAAmBC,QAAAA,EAASC,MAAAA,EAAOC,QAAAA,CAAQ,CAC9D,C,gMC3HO,MAAMiB,EAAmB,KAC9B,KAAM,CAAEC,KAAAA,EAAMC,UAAAA,EAAWC,KAAAA,CAAK,KAAI/B,EAAAA,GAAkBgC,EAAAA,CAAcA,EAC5DC,KAAWC,EAAAA,IAAY,EACvBC,KAAWC,EAAAA,IAAOC,EAAAA,CAAWA,EAC7BC,KAAaF,EAAAA,IAAOG,EAAAA,CAAaA,EAEjC,CACJ3B,MAAOJ,EACPE,MAAAA,EACAD,QAAAA,EACA+B,MAAO7B,CAAO,KACZ8B,EAAAA,GACF,IAAMH,EAAWI,eAAe,CAAEb,KAAAA,EAAMC,UAAAA,EAAWC,KAAAA,CAAK,CAAC,EACzD,CAACO,EAAYT,EAAMC,EAAWC,C,CAAK,EAGrCY,SAAAA,EAAAA,WAAU,KACHZ,IACHI,EAASS,KAAK,IAAInB,MAAM,mBAAmB,CAAC,EAC5CQ,EAAS,GAAG,EAEhB,EAAG,CAACE,EAAUF,EAAUvB,EAAOD,EAASD,EAAQuB,C,CAAK,EAE9C,CAAEvB,OAAAA,EAAQC,QAAAA,EAASC,MAAAA,EAAOC,QAAAA,CAAQ,CAC3C,EChCO,SAASkC,GAAoB,CAClC,SACE,OAACxC,EAAAA,GAAmBA,CAAE,GAAGuB,EAAiB,E,YACxC,OAACkB,EAAAA,GAAMA,CAAAA,CAAAA,C,EAGb,C","sources":["webpack://techdocs-cli-embedded-app/../core-plugin-api/src/routing/useRouteRefParams.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntity.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/CatalogEntityPage/useEntityFromUrl.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/CatalogEntityPage/CatalogEntityPage.tsx"],"sourcesContent":["/*\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 { useParams } from 'react-router-dom';\nimport { RouteRef, AnyParams, SubRouteRef } from './types';\n\n/**\n * React hook for retrieving dynamic params from the current URL.\n * @param _routeRef - Ref of the current route.\n * @public\n */\nexport function useRouteRefParams<Params extends AnyParams>(\n _routeRef: RouteRef<Params> | SubRouteRef<Params>,\n): Params {\n return useParams() as Params;\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 2022 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 errorApiRef,\n useApi,\n useRouteRefParams,\n} from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n EntityLoadingStatus,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { useEffect } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport useAsyncRetry from 'react-use/lib/useAsyncRetry';\n\nexport const useEntityFromUrl = (): EntityLoadingStatus => {\n const { kind, namespace, name } = useRouteRefParams(entityRouteRef);\n const navigate = useNavigate();\n const errorApi = useApi(errorApiRef);\n const catalogApi = useApi(catalogApiRef);\n\n const {\n value: entity,\n error,\n loading,\n retry: refresh,\n } = useAsyncRetry(\n () => catalogApi.getEntityByRef({ kind, namespace, name }),\n [catalogApi, kind, namespace, name],\n );\n\n useEffect(() => {\n if (!name) {\n errorApi.post(new Error('No name provided!'));\n navigate('/');\n }\n }, [errorApi, navigate, error, loading, entity, name]);\n\n return { entity, 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 React from 'react';\nimport { Outlet } from 'react-router-dom';\nimport { AsyncEntityProvider } from '@backstage/plugin-catalog-react';\nimport { useEntityFromUrl } from './useEntityFromUrl';\n\n/** @public */\nexport function CatalogEntityPage() {\n return (\n <AsyncEntityProvider {...useEntityFromUrl()}>\n <Outlet />\n </AsyncEntityProvider>\n );\n}\n"],"names":["useRouteRefParams","_routeRef","useParams","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","useEntityFromUrl","kind","namespace","name","entityRouteRef","navigate","useNavigate","errorApi","useApi","errorApiRef","catalogApi","catalogApiRef","retry","useAsyncRetry","getEntityByRef","useEffect","post","CatalogEntityPage","Outlet"],"sourceRoot":""}
@@ -1,5 +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,`
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(84719),Z=t(51194);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
2
  `),S=(r=P.stack)===null||r===void 0?void 0:r.replace(/\\n/g,`
3
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
4
 
5
- //# sourceMappingURL=9545.1f2986d6.chunk.js.map
5
+ //# sourceMappingURL=9545.8e4a2868.chunk.js.map