@techdocs/cli 0.0.0-nightly-20220411023616 → 0.0.0-nightly-20220414023749

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 (62) hide show
  1. package/CHANGELOG.md +25 -4
  2. package/dist/embedded-app/index.html +1 -1
  3. package/dist/embedded-app/static/{1553.925835b9.chunk.js → 1553.a26067ce.chunk.js} +1 -1
  4. package/dist/embedded-app/static/{1553.925835b9.chunk.js.map → 1553.a26067ce.chunk.js.map} +1 -1
  5. package/dist/embedded-app/static/{1959.2eb957a4.chunk.js → 1959.38a96998.chunk.js} +1 -1
  6. package/dist/embedded-app/static/{1959.2eb957a4.chunk.js.map → 1959.38a96998.chunk.js.map} +1 -1
  7. package/dist/embedded-app/static/{2426.f9952783.chunk.js → 2426.56947b7f.chunk.js} +1 -1
  8. package/dist/embedded-app/static/{2426.f9952783.chunk.js.map → 2426.56947b7f.chunk.js.map} +1 -1
  9. package/dist/embedded-app/static/{390.cd301478.chunk.js → 390.a67c5759.chunk.js} +1 -1
  10. package/dist/embedded-app/static/{390.cd301478.chunk.js.map → 390.a67c5759.chunk.js.map} +1 -1
  11. package/dist/embedded-app/static/{4022.313be9b5.chunk.js → 4022.fa355d30.chunk.js} +1 -1
  12. package/dist/embedded-app/static/{4022.313be9b5.chunk.js.map → 4022.fa355d30.chunk.js.map} +1 -1
  13. package/dist/embedded-app/static/{6235.b3634d50.chunk.js → 6235.ec27c62a.chunk.js} +1 -1
  14. package/dist/embedded-app/static/{6235.b3634d50.chunk.js.map → 6235.ec27c62a.chunk.js.map} +1 -1
  15. package/dist/embedded-app/static/{6583.c98b5125.chunk.js → 6583.9071ac96.chunk.js} +1 -1
  16. package/dist/embedded-app/static/{6583.c98b5125.chunk.js.map → 6583.9071ac96.chunk.js.map} +1 -1
  17. package/dist/embedded-app/static/{7110.527cc68b.chunk.js → 7110.7d2c1934.chunk.js} +1 -1
  18. package/dist/embedded-app/static/{7110.527cc68b.chunk.js.map → 7110.7d2c1934.chunk.js.map} +1 -1
  19. package/dist/embedded-app/static/{7758.5a3ef4d5.chunk.js → 7758.f316879f.chunk.js} +1 -1
  20. package/dist/embedded-app/static/{7758.5a3ef4d5.chunk.js.map → 7758.f316879f.chunk.js.map} +1 -1
  21. package/dist/embedded-app/static/{8061.fd1f45d1.chunk.js → 8061.ec7736bc.chunk.js} +1 -1
  22. package/dist/embedded-app/static/{8061.fd1f45d1.chunk.js.map → 8061.ec7736bc.chunk.js.map} +1 -1
  23. package/dist/embedded-app/static/{8718.930c97ad.chunk.js → 8718.8f60efd2.chunk.js} +1 -1
  24. package/dist/embedded-app/static/{8718.930c97ad.chunk.js.map → 8718.8f60efd2.chunk.js.map} +1 -1
  25. package/dist/embedded-app/static/{8792.867bf73e.chunk.js → 8792.8a74fd9c.chunk.js} +1 -1
  26. package/dist/embedded-app/static/{8792.867bf73e.chunk.js.map → 8792.8a74fd9c.chunk.js.map} +1 -1
  27. package/dist/embedded-app/static/{9028.200536ea.chunk.js → 9028.77f3e990.chunk.js} +1 -1
  28. package/dist/embedded-app/static/{9028.200536ea.chunk.js.map → 9028.77f3e990.chunk.js.map} +1 -1
  29. package/dist/embedded-app/static/main.cdf7f78c.js +476 -0
  30. package/dist/embedded-app/static/main.cdf7f78c.js.map +1 -0
  31. package/dist/embedded-app/static/module-aria-query.f720b73c.js +9 -0
  32. package/dist/embedded-app/static/module-aria-query.f720b73c.js.map +1 -0
  33. package/dist/embedded-app/static/module-hot-loader.7955a91c.js +32 -0
  34. package/dist/embedded-app/static/module-hot-loader.7955a91c.js.map +1 -0
  35. package/dist/embedded-app/static/module-jss.cb0efade.js +38 -0
  36. package/dist/embedded-app/static/module-jss.cb0efade.js.map +1 -0
  37. package/dist/embedded-app/static/{module-lodash.f158b49a.js → module-lodash.055be129.js} +1 -1
  38. package/dist/embedded-app/static/{module-lodash.f158b49a.js.map → module-lodash.055be129.js.map} +1 -1
  39. package/dist/embedded-app/static/{module-material-ui.a1b91103.js → module-material-ui.84a6ac87.js} +11 -11
  40. package/dist/embedded-app/static/module-material-ui.84a6ac87.js.map +1 -0
  41. package/dist/embedded-app/static/module-testing-library.633b23c6.js +57 -0
  42. package/dist/embedded-app/static/module-testing-library.633b23c6.js.map +1 -0
  43. package/dist/embedded-app/static/{module-yaml.574c3290.js → module-yaml.57b26e04.js} +1 -1
  44. package/dist/embedded-app/static/{module-yaml.574c3290.js.map → module-yaml.57b26e04.js.map} +1 -1
  45. package/dist/embedded-app/static/{runtime.bae8d87a.js → runtime.cdf7f78c.js} +2 -2
  46. package/dist/embedded-app/static/runtime.cdf7f78c.js.map +1 -0
  47. package/dist/embedded-app/static/vendor.cdf7f78c.js +118 -0
  48. package/dist/embedded-app/static/vendor.cdf7f78c.js.map +1 -0
  49. package/dist/index.cjs.js +1 -1
  50. package/package.json +5 -5
  51. package/dist/embedded-app/static/3825.b0488503.chunk.js +0 -3
  52. package/dist/embedded-app/static/3825.b0488503.chunk.js.map +0 -1
  53. package/dist/embedded-app/static/6105.6eda23ad.chunk.js +0 -3
  54. package/dist/embedded-app/static/6105.6eda23ad.chunk.js.map +0 -1
  55. package/dist/embedded-app/static/main.bae8d87a.js +0 -489
  56. package/dist/embedded-app/static/main.bae8d87a.js.map +0 -1
  57. package/dist/embedded-app/static/module-hot-loader.7c7a4226.js +0 -25
  58. package/dist/embedded-app/static/module-hot-loader.7c7a4226.js.map +0 -1
  59. package/dist/embedded-app/static/module-material-ui.a1b91103.js.map +0 -1
  60. package/dist/embedded-app/static/runtime.bae8d87a.js.map +0 -1
  61. package/dist/embedded-app/static/vendor.bae8d87a.js +0 -140
  62. package/dist/embedded-app/static/vendor.bae8d87a.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @techdocs/cli
2
2
 
3
- ## 0.0.0-nightly-20220411023616
3
+ ## 0.0.0-nightly-20220414023749
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -18,9 +18,30 @@
18
18
  - 230ad0826f: Bump to using `@types/node` v16
19
19
  - eb470ea54c: Adds a new flag to override the entrypoint when using a custom docker image. It could be used to reuse existing images with different entrypoints.
20
20
  - Updated dependencies
21
- - @backstage/catalog-model@0.0.0-nightly-20220411023616
22
- - @backstage/backend-common@0.0.0-nightly-20220411023616
23
- - @backstage/plugin-techdocs-node@0.0.0-nightly-20220411023616
21
+ - @backstage/backend-common@0.0.0-nightly-20220414023749
22
+ - @backstage/catalog-model@0.0.0-nightly-20220414023749
23
+ - @backstage/plugin-techdocs-node@0.0.0-nightly-20220414023749
24
+
25
+ ## 1.1.0-next.1
26
+
27
+ ### Minor Changes
28
+
29
+ - bcf1a2496c: BREAKING: The default Techdocs behavior will no longer attempt to copy `docs/README.md` or `README.md` to `docs/index.md` (if not found). To retain this behavior in your instance, you can set the following config in your `app-config.yaml`:
30
+
31
+ ```yaml
32
+ techdocs:
33
+ generator:
34
+ mkdocs:
35
+ legacyCopyReadmeMdToIndexMd: true
36
+ ```
37
+
38
+ ### Patch Changes
39
+
40
+ - 230ad0826f: Bump to using `@types/node` v16
41
+ - eb470ea54c: Adds a new flag to override the entrypoint when using a custom docker image. It could be used to reuse existing images with different entrypoints.
42
+ - Updated dependencies
43
+ - @backstage/backend-common@0.13.2-next.2
44
+ - @backstage/plugin-techdocs-node@1.1.0-next.2
24
45
 
25
46
  ## 1.0.1-next.0
26
47
 
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.bae8d87a.js"></script><script defer="defer" src="/static/module-material-ui.a1b91103.js"></script><script defer="defer" src="/static/module-lodash.f158b49a.js"></script><script defer="defer" src="/static/module-date-fns.a08d117e.js"></script><script defer="defer" src="/static/module-ajv.d6f6d109.js"></script><script defer="defer" src="/static/module-material-table.cbad0c40.js"></script><script defer="defer" src="/static/module-yaml.574c3290.js"></script><script defer="defer" src="/static/module-hot-loader.7c7a4226.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.a9014a2e.js"></script><script defer="defer" src="/static/vendor.bae8d87a.js"></script><script defer="defer" src="/static/main.bae8d87a.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.cdf7f78c.js"></script><script defer="defer" src="/static/module-material-ui.84a6ac87.js"></script><script defer="defer" src="/static/module-lodash.055be129.js"></script><script defer="defer" src="/static/module-aria-query.f720b73c.js"></script><script defer="defer" src="/static/module-date-fns.a08d117e.js"></script><script defer="defer" src="/static/module-ajv.d6f6d109.js"></script><script defer="defer" src="/static/module-material-table.cbad0c40.js"></script><script defer="defer" src="/static/module-testing-library.633b23c6.js"></script><script defer="defer" src="/static/module-yaml.57b26e04.js"></script><script defer="defer" src="/static/module-hot-loader.7955a91c.js"></script><script defer="defer" src="/static/module-jss.cb0efade.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.a9014a2e.js"></script><script defer="defer" src="/static/vendor.cdf7f78c.js"></script><script defer="defer" src="/static/main.cdf7f78c.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1553,2426],{11553:function(y,i,n){n.r(i),n.d(i,{HasResourcesCard:function(){return s}});var r=n(48023),t=n(2784),e=n(62426);function s(a){const{variant:c="gridItem"}=a;return t.createElement(e.RelatedEntitiesCard,{variant:c,title:"Has resources",entityKind:"Resource",relationType:r.aS,columns:e.resourceEntityColumns,asRenderableEntities:e.asResourceEntities,emptyMessage:"No resource is part of this system",emptyHelpLink:e.resourceEntityHelpLink})}},62426:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return d},asResourceEntities:function(){return C},asSystemEntities:function(){return b},componentEntityColumns:function(){return c},componentEntityHelpLink:function(){return E},resourceEntityColumns:function(){return p},resourceEntityHelpLink:function(){return f},systemEntityColumns:function(){return T},systemEntityHelpLink:function(){return R}});var r=n(90436),t=n(53479),e=n(2784),s=n(9118);function a(o){const{variant:l="gridItem",title:u,columns:v,entityKind:g,relationType:h,emptyMessage:L,emptyHelpLink:k,asRenderableEntities:H}=o,{entity:S}=(0,t.useEntity)(),{entities:K,loading:M,error:m}=(0,t.useRelatedEntities)(S,{type:h,kind:g});return M?e.createElement(s.InfoCard,{variant:l,title:u},e.createElement(s.Progress,null)):m?e.createElement(s.InfoCard,{variant:l,title:u},e.createElement(s.ResponseErrorPanel,{error:m})):e.createElement(t.EntityTable,{title:u,variant:l,emptyContent:e.createElement("div",{style:{textAlign:"center"}},e.createElement(r.Z,{variant:"body1"},L),e.createElement(r.Z,{variant:"body2"},e.createElement(s.Link,{to:k},"Learn how to change this."))),columns:v,entities:H(K||[])})}const c=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"component"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",d=o=>o,p=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"resource"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],f="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",C=o=>o,T=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"system"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],R="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",b=o=>o}}]);})();
2
2
 
3
- //# sourceMappingURL=1553.925835b9.chunk.js.map
3
+ //# sourceMappingURL=1553.a26067ce.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/HasResourcesCard/HasResourcesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"kPA8BO,WAA0B,EAAO,CACtC,KAAM,CAAE,UAAU,YAAe,EACjC,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,gBACP,WAAY,WACZ,aAAc,KACd,QAAS,wBACT,qBAAsB,qBACtB,aAAc,qCACd,cAAe,wBAAuB,CACxC,CAEJ,C,yfCYO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/1553.925835b9.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asResourceEntities,\n RelatedEntitiesCard,\n resourceEntityColumns,\n resourceEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\n\n\n\n\nexport function HasResourcesCard(props) {\n const { variant = 'gridItem' } = props;\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: \"Has resources\" ,\n entityKind: \"Resource\",\n relationType: RELATION_HAS_PART,\n columns: resourceEntityColumns,\n asRenderableEntities: asResourceEntities,\n emptyMessage: \"No resource is part of this system\" ,\n emptyHelpLink: resourceEntityHelpLink,}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/HasResourcesCard/HasResourcesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"kPA8BO,WAA0B,EAAO,CACtC,KAAM,CAAE,UAAU,YAAe,EACjC,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,gBACP,WAAY,WACZ,aAAc,KACd,QAAS,wBACT,qBAAsB,qBACtB,aAAc,qCACd,cAAe,wBAAuB,CACxC,CAEJ,C,yfCYO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/1553.a26067ce.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asResourceEntities,\n RelatedEntitiesCard,\n resourceEntityColumns,\n resourceEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\n\n\n\n\nexport function HasResourcesCard(props) {\n const { variant = 'gridItem' } = props;\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: \"Has resources\" ,\n entityKind: \"Resource\",\n relationType: RELATION_HAS_PART,\n columns: resourceEntityColumns,\n asRenderableEntities: asResourceEntities,\n emptyMessage: \"No resource is part of this system\" ,\n emptyHelpLink: resourceEntityHelpLink,}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
@@ -5,4 +5,4 @@
5
5
  title: My Dashboard
6
6
  icon: dashboard`,x=(0,h.Z)(a=>({code:{borderRadius:6,margin:`${a.spacing(2)}px 0px`,background:a.palette.type==="dark"?"#444":"#fff"}}),{name:"PluginCatalogEntityLinksEmptyState"});function C(){const a=x();return e.createElement(e.Fragment,null,e.createElement(f.Z,{variant:"body1"},"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:"),e.createElement("div",{className:a.code},e.createElement(E.CodeSnippet,{text:L,language:"yaml",showLineNumbers:!0,highlightedNumbers:[3,4,5,6],customStyle:{background:"inherit",fontSize:"115%"}})),e.createElement(y.Z,{variant:"contained",color:"primary",target:"_blank",href:"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional"},"Read more"))}var I=n(90348),b=n(11861),k=n(95544);const z=(0,h.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function S(a){const{href:c,text:o,Icon:s}=a,l=z();return e.createElement(k.Z,{display:"flex"},e.createElement(k.Z,{mr:1,className:l.svgIcon},e.createElement(f.Z,{component:"div"},s?e.createElement(s,null):e.createElement(d.Z,null))),e.createElement(k.Z,{flexGrow:"1"},e.createElement(E.Link,{to:c,target:"_blank",rel:"noopener"},o||c)))}var u=n(41156);const M={xs:1,sm:1,md:1,lg:2,xl:3};function N(a){var s,l;const c=[(0,u.Z)(t=>t.breakpoints.up("xl"))?"xl":null,(0,u.Z)(t=>t.breakpoints.up("lg"))?"lg":null,(0,u.Z)(t=>t.breakpoints.up("md"))?"md":null,(0,u.Z)(t=>t.breakpoints.up("sm"))?"sm":null,(0,u.Z)(t=>t.breakpoints.up("xs"))?"xs":null];let o=1;if(typeof a=="number")o=a;else{const t=(s=c.find(r=>r!==null))!=null?s:"xs";o=(l=a==null?void 0:a[t])!=null?l:M[t]}return o}function R(a){const{items:c,cols:o=void 0}=a,s=N(o);return e.createElement(I.Z,{rowHeight:"auto",cols:s},c.map(({text:l,href:t,Icon:r},g)=>e.createElement(b.Z,{key:g},e.createElement(S,{href:t,text:l!=null?l:t,Icon:r}))))}var A=n(36964);function D(a){var g;const{cols:c=void 0,variant:o}=a,{entity:s}=(0,v.useEntity)(),l=(0,A.useApp)(),t=p=>{var i;return p&&(i=l.getSystemIcon(p))!=null?i:d.Z},r=(g=s==null?void 0:s.metadata)==null?void 0:g.links;return e.createElement(E.InfoCard,{title:"Links",variant:o},!r||r.length===0?e.createElement(C,null):e.createElement(R,{cols:c,items:r.map(({url:p,title:i,icon:H})=>({text:i!=null?i:p,href:p,Icon:t(H)}))}))}}}]);})();
7
7
 
8
- //# sourceMappingURL=1959.2eb957a4.chunk.js.map
8
+ //# sourceMappingURL=1959.38a96998.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@material-ui/icons/Language.js","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/EntityLinksEmptyState.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx"],"names":[],"mappings":"yJAEI,EAAyB,EAAQ,KAA8C,EAE/E,EAA0B,EAAQ,KAA+C,EAErF,EAA6C,CAC3C,MAAO,EACT,EACA,EAAQ,EAAU,OAElB,GAAI,GAAQ,EAAwB,EAAQ,IAAO,CAAC,EAEhD,EAAiB,EAAuB,EAAQ,KAAuB,CAAC,EAExE,EAAY,GAAG,EAAe,SAAuB,EAAM,cAAc,OAAQ,CACnF,EAAG,2yBACL,CAAC,EAAG,UAAU,EAEd,EAAQ,EAAU,C,4JCElB,KAAM,GAAc;AAAA;AAAA;AAAA;AAAA;AAAA,uBAUd,EAAY,QAChB,GAAU,EACR,KAAM,CACJ,aAAc,EACd,OAAQ,GAAG,EAAM,QAAQ,CAAC,UAC1B,WAAY,EAAM,QAAQ,OAAS,OAAS,OAAS,MACvD,CACF,GACA,CAAE,KAAM,oCAAqC,CAC/C,EAEO,YAAiC,CACtC,KAAM,GAAU,EAAU,EAE1B,MACE,iBAAoB,WAAgB,KAChC,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,oHAGxD,EACE,gBAAoB,MAAO,CAAE,UAAW,EAAQ,IAAK,EACnD,gBAAoB,cAAa,CACjC,KAAM,EACN,SAAU,OACV,gBAAiB,GACjB,mBAAoB,CAAC,EAAG,EAAG,EAAG,CAAC,EAC/B,YAAa,CAAE,WAAY,UAAW,SAAU,MAAO,CAAE,CAC3D,CACF,EACE,gBAAoB,IAAQ,CAC5B,QAAS,YACT,MAAO,UACP,OAAQ,SACR,KAAM,sFAAuF,EAC7F,WAEF,CACF,CAEJ,C,qCChDA,KAAM,GAAY,QAAW,CAC3B,QAAS,CACP,QAAS,eACT,QAAS,CACP,QAAS,eACT,SAAU,UACV,cAAe,UACjB,CACF,CACF,CAAC,EAEM,WAAkB,EAIvB,CACA,KAAM,CAAE,OAAM,OAAM,QAAS,EACvB,EAAU,EAAU,EAE1B,MACE,iBAAoB,IAAK,CAAE,QAAS,MAAO,EACvC,gBAAoB,IAAK,CAAE,GAAI,EAAG,UAAW,EAAQ,OAAQ,EAC3D,gBAAoB,IAAY,CAAE,UAAW,KAAM,EACjD,EAAO,gBAAoB,EAAM,IAAK,EAAI,gBAAoB,IAAc,IAAK,CACrF,CACF,EACE,gBAAoB,IAAK,CAAE,SAAU,GAAI,EACvC,gBAAoB,OAAM,CAAE,GAAI,EAAM,OAAQ,SAAU,IAAK,UAAW,EACtE,GAAQ,CACZ,CACF,CACF,CAEJ,C,eCpCA,KAAM,GAAc,CAClB,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,CACN,EAEO,WACL,EACA,C,QACA,KAAM,GAAU,CACd,QAAe,GAAU,EAAM,YAAY,GAAG,IAAI,CAAC,EAAI,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,IAAI,CAAC,EAAI,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,IAAI,CAAC,EAAI,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,IAAI,CAAC,EAAI,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,IAAI,CAAC,EAAI,KAAO,IAChE,EAEA,GAAI,GAAY,EAEhB,GAAI,MAAO,IAAS,SAClB,EAAY,MACP,CACL,KAAM,GAAa,KAAQ,KAAK,GAAK,IAAM,IAAI,IAA5B,OAAiC,KACpD,EAAY,oBAAO,KAAP,OAAsB,EAAY,EAChD,CAEA,MAAO,EACT,CCdO,WAAuB,EAAO,CACnC,KAAM,CAAE,QAAO,OAAO,QAAc,EAC9B,EAAY,EAAkB,CAAI,EAExC,MACE,iBAAoB,IAAW,CAAE,UAAW,OAAQ,KAAM,CAAU,EAChE,EAAM,IAAI,CAAC,CAAE,OAAM,OAAM,QAAQ,IACjC,gBAAoB,IAAe,CAAE,IAAK,CAAE,EACxC,gBAAoB,EAAU,CAAE,KAAM,EAAM,KAAM,UAAQ,EAAM,KAAM,CAAK,CAAE,CACjF,CACD,CACH,CAEJ,C,eChBO,WAAyB,EAAO,C,MACrC,KAAM,CAAE,OAAO,OAAW,WAAY,EAChC,CAAE,UAAW,gBAAU,EACvB,EAAM,aAAO,EAEb,EAAgB,GAAK,C,MACzB,UAAM,KAAI,cAAc,CAAG,IAArB,OAAyC,KAE3C,EAAQ,oBAAQ,WAAR,cAAkB,MAEhC,MACE,iBAAoB,WAAU,CAAE,MAAO,QAAS,QAAS,CAAQ,EAC7D,CAAC,GAAS,EAAM,SAAW,EAC3B,gBAAoB,EAAuB,IAAK,EAEhD,gBAAoB,EAAe,CACjC,KAAM,EACN,MAAO,EAAM,IAAI,CAAC,CAAE,MAAK,QAAO,UAAY,EAC1C,KAAM,UAAS,EACf,KAAM,EACN,KAAM,EAAa,CAAI,CACzB,EAAE,CAAE,CACN,CAEJ,CAEJ,C","file":"static/1959.2eb957a4.chunk.js","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z\"\n}), 'Language');\n\nexports.default = _default;","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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 */\n\n\nconst useStyles = makeStyles(\n theme => ({\n code: {\n borderRadius: 6,\n margin: `${theme.spacing(2)}px 0px`,\n background: theme.palette.type === 'dark' ? '#444' : '#fff',\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n\n return (\n React.createElement(React.Fragment, null\n , React.createElement(Typography, { variant: \"body1\",}, \"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:\"\n\n\n )\n , React.createElement('div', { className: classes.code,}\n , React.createElement(CodeSnippet, {\n text: ENTITY_YAML,\n language: \"yaml\",\n showLineNumbers: true,\n highlightedNumbers: [3, 4, 5, 6],\n customStyle: { background: 'inherit', fontSize: '115%' },}\n )\n )\n , React.createElement(Button, {\n variant: \"contained\",\n color: \"primary\",\n target: \"_blank\",\n href: \"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\",}\n , \"Read more\"\n\n )\n )\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { Link } from '@backstage/core-components';\n\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\n\n\n) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n React.createElement(Box, { display: \"flex\",}\n , React.createElement(Box, { mr: 1, className: classes.svgIcon,}\n , React.createElement(Typography, { component: \"div\",}\n , Icon ? React.createElement(Icon, null ) : React.createElement(LanguageIcon, null )\n )\n )\n , React.createElement(Box, { flexGrow: \"1\",}\n , React.createElement(Link, { to: href, target: \"_blank\", rel: \"noopener\",}\n , text || href\n )\n )\n )\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMediaQuery } from '@material-ui/core';\n\n\nconst colDefaults = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols,\n) {\n const matches = [\n useMediaQuery((theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((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';\n\nimport { useDynamicColumns } from './useDynamicColumns';\n\n\n\n\n\n\n\n\n\n\n\n\n\nexport function LinksGridList(props) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n React.createElement(ImageList, { rowHeight: \"auto\", cols: numOfCols,}\n , items.map(({ text, href, Icon }, i) => (\n React.createElement(ImageListItem, { key: i,}\n , React.createElement(IconLink, { href: href, text: text ?? href, Icon: Icon,} )\n )\n ))\n )\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { 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';\n\nimport { useApp } from '@backstage/core-plugin-api';\nimport { InfoCard } from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\nexport function EntityLinksCard(props) {\n const { cols = undefined, variant } = props;\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key) =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n React.createElement(InfoCard, { title: \"Links\", variant: variant,}\n , !links || links.length === 0 ? (\n React.createElement(EntityLinksEmptyState, null )\n ) : (\n React.createElement(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 )\n );\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@material-ui/icons/Language.js","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/EntityLinksEmptyState.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx"],"names":[],"mappings":"yJAEI,EAAyB,EAAQ,KAA8C,EAE/E,EAA0B,EAAQ,KAA+C,EAErF,EAA6C,CAC3C,MAAO,EACT,EACA,EAAQ,EAAU,OAElB,GAAI,GAAQ,EAAwB,EAAQ,IAAO,CAAC,EAEhD,EAAiB,EAAuB,EAAQ,KAAuB,CAAC,EAExE,EAAY,GAAG,EAAe,SAAuB,EAAM,cAAc,OAAQ,CACnF,EAAG,2yBACL,CAAC,EAAG,UAAU,EAEd,EAAQ,EAAU,C,4JCElB,KAAM,GAAc;AAAA;AAAA;AAAA;AAAA;AAAA,uBAUd,EAAY,QAChB,GAAU,EACR,KAAM,CACJ,aAAc,EACd,OAAQ,GAAG,EAAM,QAAQ,CAAC,UAC1B,WAAY,EAAM,QAAQ,OAAS,OAAS,OAAS,MACvD,CACF,GACA,CAAE,KAAM,oCAAqC,CAC/C,EAEO,YAAiC,CACtC,KAAM,GAAU,EAAU,EAE1B,MACE,iBAAoB,WAAgB,KAChC,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,oHAGxD,EACE,gBAAoB,MAAO,CAAE,UAAW,EAAQ,IAAK,EACnD,gBAAoB,cAAa,CACjC,KAAM,EACN,SAAU,OACV,gBAAiB,GACjB,mBAAoB,CAAC,EAAG,EAAG,EAAG,CAAC,EAC/B,YAAa,CAAE,WAAY,UAAW,SAAU,MAAO,CAAE,CAC3D,CACF,EACE,gBAAoB,IAAQ,CAC5B,QAAS,YACT,MAAO,UACP,OAAQ,SACR,KAAM,sFAAuF,EAC7F,WAEF,CACF,CAEJ,C,qCChDA,KAAM,GAAY,QAAW,CAC3B,QAAS,CACP,QAAS,eACT,QAAS,CACP,QAAS,eACT,SAAU,UACV,cAAe,UACjB,CACF,CACF,CAAC,EAEM,WAAkB,EAIvB,CACA,KAAM,CAAE,OAAM,OAAM,QAAS,EACvB,EAAU,EAAU,EAE1B,MACE,iBAAoB,IAAK,CAAE,QAAS,MAAO,EACvC,gBAAoB,IAAK,CAAE,GAAI,EAAG,UAAW,EAAQ,OAAQ,EAC3D,gBAAoB,IAAY,CAAE,UAAW,KAAM,EACjD,EAAO,gBAAoB,EAAM,IAAK,EAAI,gBAAoB,IAAc,IAAK,CACrF,CACF,EACE,gBAAoB,IAAK,CAAE,SAAU,GAAI,EACvC,gBAAoB,OAAM,CAAE,GAAI,EAAM,OAAQ,SAAU,IAAK,UAAW,EACtE,GAAQ,CACZ,CACF,CACF,CAEJ,C,eCpCA,KAAM,GAAc,CAClB,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,CACN,EAEO,WACL,EACA,C,QACA,KAAM,GAAU,CACd,QAAe,GAAU,EAAM,YAAY,GAAG,IAAI,CAAC,EAAI,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,IAAI,CAAC,EAAI,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,IAAI,CAAC,EAAI,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,IAAI,CAAC,EAAI,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,IAAI,CAAC,EAAI,KAAO,IAChE,EAEA,GAAI,GAAY,EAEhB,GAAI,MAAO,IAAS,SAClB,EAAY,MACP,CACL,KAAM,GAAa,KAAQ,KAAK,GAAK,IAAM,IAAI,IAA5B,OAAiC,KACpD,EAAY,oBAAO,KAAP,OAAsB,EAAY,EAChD,CAEA,MAAO,EACT,CCdO,WAAuB,EAAO,CACnC,KAAM,CAAE,QAAO,OAAO,QAAc,EAC9B,EAAY,EAAkB,CAAI,EAExC,MACE,iBAAoB,IAAW,CAAE,UAAW,OAAQ,KAAM,CAAU,EAChE,EAAM,IAAI,CAAC,CAAE,OAAM,OAAM,QAAQ,IACjC,gBAAoB,IAAe,CAAE,IAAK,CAAE,EACxC,gBAAoB,EAAU,CAAE,KAAM,EAAM,KAAM,UAAQ,EAAM,KAAM,CAAK,CAAE,CACjF,CACD,CACH,CAEJ,C,eChBO,WAAyB,EAAO,C,MACrC,KAAM,CAAE,OAAO,OAAW,WAAY,EAChC,CAAE,UAAW,gBAAU,EACvB,EAAM,aAAO,EAEb,EAAgB,GAAK,C,MACzB,UAAM,KAAI,cAAc,CAAG,IAArB,OAAyC,KAE3C,EAAQ,oBAAQ,WAAR,cAAkB,MAEhC,MACE,iBAAoB,WAAU,CAAE,MAAO,QAAS,QAAS,CAAQ,EAC7D,CAAC,GAAS,EAAM,SAAW,EAC3B,gBAAoB,EAAuB,IAAK,EAEhD,gBAAoB,EAAe,CACjC,KAAM,EACN,MAAO,EAAM,IAAI,CAAC,CAAE,MAAK,QAAO,UAAY,EAC1C,KAAM,UAAS,EACf,KAAM,EACN,KAAM,EAAa,CAAI,CACzB,EAAE,CAAE,CACN,CAEJ,CAEJ,C","file":"static/1959.38a96998.chunk.js","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z\"\n}), 'Language');\n\nexports.default = _default;","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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 */\n\n\nconst useStyles = makeStyles(\n theme => ({\n code: {\n borderRadius: 6,\n margin: `${theme.spacing(2)}px 0px`,\n background: theme.palette.type === 'dark' ? '#444' : '#fff',\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n\n return (\n React.createElement(React.Fragment, null\n , React.createElement(Typography, { variant: \"body1\",}, \"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:\"\n\n\n )\n , React.createElement('div', { className: classes.code,}\n , React.createElement(CodeSnippet, {\n text: ENTITY_YAML,\n language: \"yaml\",\n showLineNumbers: true,\n highlightedNumbers: [3, 4, 5, 6],\n customStyle: { background: 'inherit', fontSize: '115%' },}\n )\n )\n , React.createElement(Button, {\n variant: \"contained\",\n color: \"primary\",\n target: \"_blank\",\n href: \"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\",}\n , \"Read more\"\n\n )\n )\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { Link } from '@backstage/core-components';\n\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\n\n\n) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n React.createElement(Box, { display: \"flex\",}\n , React.createElement(Box, { mr: 1, className: classes.svgIcon,}\n , React.createElement(Typography, { component: \"div\",}\n , Icon ? React.createElement(Icon, null ) : React.createElement(LanguageIcon, null )\n )\n )\n , React.createElement(Box, { flexGrow: \"1\",}\n , React.createElement(Link, { to: href, target: \"_blank\", rel: \"noopener\",}\n , text || href\n )\n )\n )\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMediaQuery } from '@material-ui/core';\n\n\nconst colDefaults = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols,\n) {\n const matches = [\n useMediaQuery((theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((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';\n\nimport { useDynamicColumns } from './useDynamicColumns';\n\n\n\n\n\n\n\n\n\n\n\n\n\nexport function LinksGridList(props) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n React.createElement(ImageList, { rowHeight: \"auto\", cols: numOfCols,}\n , items.map(({ text, href, Icon }, i) => (\n React.createElement(ImageListItem, { key: i,}\n , React.createElement(IconLink, { href: href, text: text ?? href, Icon: Icon,} )\n )\n ))\n )\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { 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';\n\nimport { useApp } from '@backstage/core-plugin-api';\nimport { InfoCard } from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\nexport function EntityLinksCard(props) {\n const { cols = undefined, variant } = props;\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key) =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n React.createElement(InfoCard, { title: \"Links\", variant: variant,}\n , !links || links.length === 0 ? (\n React.createElement(EntityLinksEmptyState, null )\n ) : (\n React.createElement(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 )\n );\n}\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2426],{62426:function(K,r,o){o.r(r),o.d(r,{RelatedEntitiesCard:function(){return u},asComponentEntities:function(){return E},asResourceEntities:function(){return f},asSystemEntities:function(){return T},componentEntityColumns:function(){return m},componentEntityHelpLink:function(){return y},resourceEntityColumns:function(){return d},resourceEntityHelpLink:function(){return p},systemEntityColumns:function(){return C},systemEntityHelpLink:function(){return b}});var a=o(90436),t=o(53479),e=o(2784),s=o(9118);function u(n){const{variant:i="gridItem",title:c,columns:k,entityKind:g,relationType:h,emptyMessage:v,emptyHelpLink:L,asRenderableEntities:R}=n,{entity:H}=(0,t.useEntity)(),{entities:S,loading:w,error:l}=(0,t.useRelatedEntities)(H,{type:h,kind:g});return w?e.createElement(s.InfoCard,{variant:i,title:c},e.createElement(s.Progress,null)):l?e.createElement(s.InfoCard,{variant:i,title:c},e.createElement(s.ResponseErrorPanel,{error:l})):e.createElement(t.EntityTable,{title:c,variant:i,emptyContent:e.createElement("div",{style:{textAlign:"center"}},e.createElement(a.Z,{variant:"body1"},v),e.createElement(a.Z,{variant:"body2"},e.createElement(s.Link,{to:L},"Learn how to change this."))),columns:k,entities:R(S||[])})}const m=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"component"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],y="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",E=n=>n,d=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"resource"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],p="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",f=n=>n,C=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"system"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],b="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",T=n=>n}}]);})();
2
2
 
3
- //# sourceMappingURL=2426.f9952783.chunk.js.map
3
+ //# sourceMappingURL=2426.56947b7f.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"onBAwDO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/2426.f9952783.chunk.js","sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"onBAwDO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/2426.56947b7f.chunk.js","sourcesContent":["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[390,2426],{60390:function(y,o,n){n.r(o),n.d(o,{HasSystemsCard:function(){return s}});var a=n(48023),t=n(2784),e=n(62426);function s(r){const{variant:c="gridItem"}=r;return t.createElement(e.RelatedEntitiesCard,{variant:c,title:"Has systems",entityKind:"System",relationType:a.aS,columns:e.systemEntityColumns,asRenderableEntities:e.asSystemEntities,emptyMessage:"No system is part of this domain",emptyHelpLink:e.systemEntityHelpLink})}},62426:function(y,o,n){n.r(o),n.d(o,{RelatedEntitiesCard:function(){return r},asComponentEntities:function(){return E},asResourceEntities:function(){return C},asSystemEntities:function(){return v},componentEntityColumns:function(){return c},componentEntityHelpLink:function(){return d},resourceEntityColumns:function(){return p},resourceEntityHelpLink:function(){return f},systemEntityColumns:function(){return T},systemEntityHelpLink:function(){return b}});var a=n(90436),t=n(53479),e=n(2784),s=n(9118);function r(i){const{variant:l="gridItem",title:m,columns:g,entityKind:h,relationType:L,emptyMessage:R,emptyHelpLink:k,asRenderableEntities:H}=i,{entity:S}=(0,t.useEntity)(),{entities:K,loading:M,error:u}=(0,t.useRelatedEntities)(S,{type:L,kind:h});return M?e.createElement(s.InfoCard,{variant:l,title:m},e.createElement(s.Progress,null)):u?e.createElement(s.InfoCard,{variant:l,title:m},e.createElement(s.ResponseErrorPanel,{error:u})):e.createElement(t.EntityTable,{title:m,variant:l,emptyContent:e.createElement("div",{style:{textAlign:"center"}},e.createElement(a.Z,{variant:"body1"},R),e.createElement(a.Z,{variant:"body2"},e.createElement(s.Link,{to:k},"Learn how to change this."))),columns:g,entities:H(K||[])})}const c=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"component"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],d="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",E=i=>i,p=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"resource"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],f="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",C=i=>i,T=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"system"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],b="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",v=i=>i}}]);})();
2
2
 
3
- //# sourceMappingURL=390.cd301478.chunk.js.map
3
+ //# sourceMappingURL=390.a67c5759.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"+OA8BO,WAAwB,EAAO,CACpC,KAAM,CAAE,UAAU,YAAe,EACjC,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,cACP,WAAY,SACZ,aAAc,KACd,QAAS,sBACT,qBAAsB,mBACtB,aAAc,mCACd,cAAe,sBAAqB,CACtC,CAEJ,C,yfCYO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/390.cd301478.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asSystemEntities,\n RelatedEntitiesCard,\n systemEntityColumns,\n systemEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\n\n\n\n\nexport function HasSystemsCard(props) {\n const { variant = 'gridItem' } = props;\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: \"Has systems\" ,\n entityKind: \"System\",\n relationType: RELATION_HAS_PART,\n columns: systemEntityColumns,\n asRenderableEntities: asSystemEntities,\n emptyMessage: \"No system is part of this domain\" ,\n emptyHelpLink: systemEntityHelpLink,}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"+OA8BO,WAAwB,EAAO,CACpC,KAAM,CAAE,UAAU,YAAe,EACjC,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,cACP,WAAY,SACZ,aAAc,KACd,QAAS,sBACT,qBAAsB,mBACtB,aAAc,mCACd,cAAe,sBAAqB,CACtC,CAEJ,C,yfCYO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/390.a67c5759.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asSystemEntities,\n RelatedEntitiesCard,\n systemEntityColumns,\n systemEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\n\n\n\n\nexport function HasSystemsCard(props) {\n const { variant = 'gridItem' } = props;\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: \"Has systems\" ,\n entityKind: \"System\",\n relationType: RELATION_HAS_PART,\n columns: systemEntityColumns,\n asRenderableEntities: asSystemEntities,\n emptyMessage: \"No system is part of this domain\" ,\n emptyHelpLink: systemEntityHelpLink,}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[4022,2426],{4022:function(y,i,n){n.r(i),n.d(i,{HasComponentsCard:function(){return o}});var a=n(48023),t=n(2784),e=n(62426);function o(r){const{variant:c="gridItem"}=r;return t.createElement(e.RelatedEntitiesCard,{variant:c,title:"Has components",entityKind:"Component",relationType:a.aS,columns:e.componentEntityColumns,emptyMessage:"No component is part of this system",emptyHelpLink:e.componentEntityHelpLink,asRenderableEntities:e.asComponentEntities})}},62426:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return r},asComponentEntities:function(){return d},asResourceEntities:function(){return C},asSystemEntities:function(){return v},componentEntityColumns:function(){return c},componentEntityHelpLink:function(){return E},resourceEntityColumns:function(){return p},resourceEntityHelpLink:function(){return f},systemEntityColumns:function(){return T},systemEntityHelpLink:function(){return b}});var a=n(90436),t=n(53479),e=n(2784),o=n(9118);function r(s){const{variant:l="gridItem",title:m,columns:g,entityKind:h,relationType:L,emptyMessage:R,emptyHelpLink:k,asRenderableEntities:H}=s,{entity:S}=(0,t.useEntity)(),{entities:K,loading:M,error:u}=(0,t.useRelatedEntities)(S,{type:L,kind:h});return M?e.createElement(o.InfoCard,{variant:l,title:m},e.createElement(o.Progress,null)):u?e.createElement(o.InfoCard,{variant:l,title:m},e.createElement(o.ResponseErrorPanel,{error:u})):e.createElement(t.EntityTable,{title:m,variant:l,emptyContent:e.createElement("div",{style:{textAlign:"center"}},e.createElement(a.Z,{variant:"body1"},R),e.createElement(a.Z,{variant:"body2"},e.createElement(o.Link,{to:k},"Learn how to change this."))),columns:g,entities:H(K||[])})}const c=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"component"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",d=s=>s,p=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"resource"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],f="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",C=s=>s,T=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"system"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],b="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",v=s=>s}}]);})();
2
2
 
3
- //# sourceMappingURL=4022.313be9b5.chunk.js.map
3
+ //# sourceMappingURL=4022.fa355d30.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"kPA8BO,WAA2B,EAAO,CACvC,KAAM,CAAE,UAAU,YAAe,EACjC,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,iBACP,WAAY,YACZ,aAAc,KACd,QAAS,yBACT,aAAc,sCACd,cAAe,0BACf,qBAAsB,qBAAoB,CAC5C,CAEJ,C,yfCYO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/4022.313be9b5.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\n\n\n\n\nexport function HasComponentsCard(props) {\n const { variant = 'gridItem' } = props;\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: \"Has components\" ,\n entityKind: \"Component\",\n relationType: RELATION_HAS_PART,\n columns: componentEntityColumns,\n emptyMessage: \"No component is part of this system\" ,\n emptyHelpLink: componentEntityHelpLink,\n asRenderableEntities: asComponentEntities,}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"kPA8BO,WAA2B,EAAO,CACvC,KAAM,CAAE,UAAU,YAAe,EACjC,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,iBACP,WAAY,YACZ,aAAc,KACd,QAAS,yBACT,aAAc,sCACd,cAAe,0BACf,qBAAsB,qBAAoB,CAC5C,CAEJ,C,yfCYO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/4022.fa355d30.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\n\n\n\n\nexport function HasComponentsCard(props) {\n const { variant = 'gridItem' } = props;\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: \"Has components\" ,\n entityKind: \"Component\",\n relationType: RELATION_HAS_PART,\n columns: componentEntityColumns,\n emptyMessage: \"No component is part of this system\" ,\n emptyHelpLink: componentEntityHelpLink,\n asRenderableEntities: asComponentEntities,}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[6235,2426],{56235:function(d,s,n){n.r(s),n.d(s,{DependencyOfComponentsCard:function(){return o}});var a=n(48023),t=n(2784),e=n(62426);function o(c){const{variant:r="gridItem",title:l="Dependency of components"}=c;return t.createElement(e.RelatedEntitiesCard,{variant:r,title:l,entityKind:"Component",relationType:a.w$,columns:e.componentEntityColumns,emptyMessage:"No component depends on this component",emptyHelpLink:e.componentEntityHelpLink,asRenderableEntities:e.asComponentEntities})}},62426:function(d,s,n){n.r(s),n.d(s,{RelatedEntitiesCard:function(){return c},asComponentEntities:function(){return E},asResourceEntities:function(){return C},asSystemEntities:function(){return v},componentEntityColumns:function(){return r},componentEntityHelpLink:function(){return l},resourceEntityColumns:function(){return p},resourceEntityHelpLink:function(){return f},systemEntityColumns:function(){return T},systemEntityHelpLink:function(){return b}});var a=n(90436),t=n(53479),e=n(2784),o=n(9118);function c(i){const{variant:m="gridItem",title:u,columns:g,entityKind:h,relationType:L,emptyMessage:R,emptyHelpLink:k,asRenderableEntities:H}=i,{entity:D}=(0,t.useEntity)(),{entities:S,loading:K,error:y}=(0,t.useRelatedEntities)(D,{type:L,kind:h});return K?e.createElement(o.InfoCard,{variant:m,title:u},e.createElement(o.Progress,null)):y?e.createElement(o.InfoCard,{variant:m,title:u},e.createElement(o.ResponseErrorPanel,{error:y})):e.createElement(t.EntityTable,{title:u,variant:m,emptyContent:e.createElement("div",{style:{textAlign:"center"}},e.createElement(a.Z,{variant:"body1"},R),e.createElement(a.Z,{variant:"body2"},e.createElement(o.Link,{to:k},"Learn how to change this."))),columns:g,entities:H(S||[])})}const r=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"component"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],l="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",E=i=>i,p=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"resource"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],f="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",C=i=>i,T=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"system"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],b="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",v=i=>i}}]);})();
2
2
 
3
- //# sourceMappingURL=6235.b3634d50.chunk.js.map
3
+ //# sourceMappingURL=6235.ec27c62a.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"4PA+BO,WACL,EACA,CACA,KAAM,CAAE,UAAU,WAAY,QAAQ,4BAA+B,EACrE,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,EACP,WAAY,YACZ,aAAc,KACd,QAAS,yBACT,aAAc,yCACd,cAAe,0BACf,qBAAsB,qBAAoB,CAC5C,CAEJ,C,yfCSO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/6235.b3634d50.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_DEPENDENCY_OF } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\n\n\n\n\n\nexport function DependencyOfComponentsCard(\n props,\n) {\n const { variant = 'gridItem', title = 'Dependency of components' } = props;\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: title,\n entityKind: \"Component\",\n relationType: RELATION_DEPENDENCY_OF,\n columns: componentEntityColumns,\n emptyMessage: \"No component depends on this component\" ,\n emptyHelpLink: componentEntityHelpLink,\n asRenderableEntities: asComponentEntities,}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"4PA+BO,WACL,EACA,CACA,KAAM,CAAE,UAAU,WAAY,QAAQ,4BAA+B,EACrE,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,EACP,WAAY,YACZ,aAAc,KACd,QAAS,yBACT,aAAc,yCACd,cAAe,0BACf,qBAAsB,qBAAoB,CAC5C,CAEJ,C,yfCSO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/6235.ec27c62a.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_DEPENDENCY_OF } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\n\n\n\n\n\nexport function DependencyOfComponentsCard(\n props,\n) {\n const { variant = 'gridItem', title = 'Dependency of components' } = props;\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: title,\n entityKind: \"Component\",\n relationType: RELATION_DEPENDENCY_OF,\n columns: componentEntityColumns,\n emptyMessage: \"No component depends on this component\" ,\n emptyHelpLink: componentEntityHelpLink,\n asRenderableEntities: asComponentEntities,}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[6583],{96583:function(A,a,t){t.r(a),t.d(a,{CatalogEntityPage:function(){return v}});var r=t(2784),s=t(10289),o=t(53479),e=t(36964),g=t(77446);const m=()=>{const{kind:c,namespace:i,name:n}=(0,e.useRouteRefParams)(o.entityRouteRef),u=(0,s.s0)(),l=(0,e.useApi)(e.errorApiRef),d=(0,e.useApi)(o.catalogApiRef),{value:f,error:y,loading:p,retry:E}=(0,g.Z)(()=>d.getEntityByRef({kind:c,namespace:i,name:n}),[d,c,i,n]);return(0,r.useEffect)(()=>{n||(l.post(new Error("No name provided!")),u("/"))},[l,u,y,p,f,n]),{entity:f,loading:p,error:y,refresh:E}};function v(){return r.createElement(o.AsyncEntityProvider,{...m()},r.createElement(s.j3,null))}}}]);})();
2
2
 
3
- //# sourceMappingURL=6583.c98b5125.chunk.js.map
3
+ //# sourceMappingURL=6583.9071ac96.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/CatalogEntityPage/useEntityFromUrl.ts","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/CatalogEntityPage/CatalogEntityPage.tsx"],"names":[],"mappings":"oQA8BO,KAAM,GAAmB,IAAM,CACpC,KAAM,CAAE,OAAM,YAAW,QAAS,wBAAkB,gBAAc,EAC5D,EAAW,SAAY,EACvB,EAAW,aAAO,aAAW,EAC7B,EAAa,aAAO,eAAa,EAEjC,CACJ,MAAO,EACP,QACA,UACA,MAAO,GACL,QACF,IAAM,EAAW,eAAe,CAAE,OAAM,YAAW,MAAK,CAAC,EACzD,CAAC,EAAY,EAAM,EAAW,CAAI,CACpC,EAEA,sBAAU,IAAM,CACT,GACH,GAAS,KAAK,GAAI,OAAM,mBAAmB,CAAC,EAC5C,EAAS,GAAG,EAEhB,EAAG,CAAC,EAAU,EAAU,EAAO,EAAS,EAAQ,CAAI,CAAC,EAE9C,CAAE,SAAQ,UAAS,QAAO,SAAQ,CAC3C,EChCO,YAA6B,CAClC,MACE,iBAAoB,sBAAqB,IAAK,EAAiB,CAAE,EAC7D,gBAAoB,KAAQ,IAAK,CACrC,CAEJ,C","file":"static/6583.c98b5125.chunk.js","sourcesContent":["/*\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\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { useEffect } from 'react';\nimport { useNavigate } from 'react-router';\nimport useAsyncRetry from 'react-use/lib/useAsyncRetry';\n\nexport const useEntityFromUrl = () => {\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';\nimport { AsyncEntityProvider } from '@backstage/plugin-catalog-react';\nimport { useEntityFromUrl } from './useEntityFromUrl';\n\n/** @public */\nexport function CatalogEntityPage() {\n return (\n React.createElement(AsyncEntityProvider, { ...useEntityFromUrl(),}\n , React.createElement(Outlet, null )\n )\n );\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/CatalogEntityPage/useEntityFromUrl.ts","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/CatalogEntityPage/CatalogEntityPage.tsx"],"names":[],"mappings":"oQA8BO,KAAM,GAAmB,IAAM,CACpC,KAAM,CAAE,OAAM,YAAW,QAAS,wBAAkB,gBAAc,EAC5D,EAAW,SAAY,EACvB,EAAW,aAAO,aAAW,EAC7B,EAAa,aAAO,eAAa,EAEjC,CACJ,MAAO,EACP,QACA,UACA,MAAO,GACL,QACF,IAAM,EAAW,eAAe,CAAE,OAAM,YAAW,MAAK,CAAC,EACzD,CAAC,EAAY,EAAM,EAAW,CAAI,CACpC,EAEA,sBAAU,IAAM,CACT,GACH,GAAS,KAAK,GAAI,OAAM,mBAAmB,CAAC,EAC5C,EAAS,GAAG,EAEhB,EAAG,CAAC,EAAU,EAAU,EAAO,EAAS,EAAQ,CAAI,CAAC,EAE9C,CAAE,SAAQ,UAAS,QAAO,SAAQ,CAC3C,EChCO,YAA6B,CAClC,MACE,iBAAoB,sBAAqB,IAAK,EAAiB,CAAE,EAC7D,gBAAoB,KAAQ,IAAK,CACrC,CAEJ,C","file":"static/6583.9071ac96.chunk.js","sourcesContent":["/*\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\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { useEffect } from 'react';\nimport { useNavigate } from 'react-router';\nimport useAsyncRetry from 'react-use/lib/useAsyncRetry';\n\nexport const useEntityFromUrl = () => {\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';\nimport { AsyncEntityProvider } from '@backstage/plugin-catalog-react';\nimport { useEntityFromUrl } from './useEntityFromUrl';\n\n/** @public */\nexport function CatalogEntityPage() {\n return (\n React.createElement(AsyncEntityProvider, { ...useEntityFromUrl(),}\n , React.createElement(Outlet, null )\n )\n );\n}\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[7110],{57110:function(v,p,t){t.r(p),t.d(p,{TechDocsCustomHome:function(){return A}});var e=t(2784),D=t(64279),T=t(79692),d=t(53479),O=t(21956),g=t(51016),E=t(1114),a=t(9118),f=t(36964);const M={DocsTable:O.DocsTable,DocsCardGrid:g.f},h=({config:n,entities:o,index:r})=>{const u=(0,T.Z)({panelContainer:{marginBottom:"2rem",...n.panelCSS?n.panelCSS:{}}})(),{loading:c,isOwnedEntity:m}=(0,d.useEntityOwnership)(),i=M[n.panelType],_=o.filter(s=>n.filterPredicate==="ownedByUser"?c?!1:m(s):typeof n.filterPredicate=="function"&&n.filterPredicate(s));return e.createElement(e.Fragment,null,e.createElement(a.ContentHeader,{title:n.title,description:n.description},r===0?e.createElement(a.SupportButton,null,"Discover documentation in your ecosystem."):null),e.createElement("div",{className:u.panelContainer},e.createElement(i,{"data-testid":"techdocs-custom-panel",entities:_})))},A=n=>{const{tabsConfig:o}=n,[r,C]=(0,e.useState)(0),u=(0,f.useApi)(d.catalogApiRef),{value:c,loading:m,error:i}=(0,D.default)(async()=>(await u.getEntities({filter:{"metadata.annotations.backstage.io/techdocs-ref":d.CATALOG_FILTER_EXISTS},fields:["apiVersion","kind","metadata","relations","spec.owner","spec.type"]})).items.filter(l=>{var P;return!!((P=l.metadata.annotations)!=null&&P["backstage.io/techdocs-ref"])})),_=o[r];return m?e.createElement(E.j,null,e.createElement(a.Content,null,e.createElement(a.Progress,null))):i?e.createElement(E.j,null,e.createElement(a.Content,null,e.createElement(a.WarningPanel,{severity:"error",title:"Could not load available documentation."},e.createElement(a.CodeSnippet,{language:"text",text:i.toString()})))):e.createElement(E.j,null,e.createElement(a.HeaderTabs,{selectedIndex:r,onChange:s=>C(s),tabs:o.map(({label:s},l)=>({id:l.toString(),label:s}))}),e.createElement(a.Content,{"data-testid":"techdocs-content"},_.panels.map((s,l)=>e.createElement(h,{key:l,config:s,entities:c||[],index:l}))))}}}]);})();
2
2
 
3
- //# sourceMappingURL=7110.527cc68b.chunk.js.map
3
+ //# sourceMappingURL=7110.7d2c1934.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx"],"names":[],"mappings":"+SA0CA,KAAM,GAAS,CACb,UAAW,YACX,aAAc,GAChB,EAuCM,EAAc,CAAC,CACnB,SACA,WACA,WAKG,CAOH,KAAM,GAAU,GANE,KAAW,CAC3B,eAAgB,CACd,aAAc,UACV,EAAO,SAAW,EAAO,SAAW,CAAC,CAC3C,CACF,CAAC,EACyB,EACpB,CAAE,QAAS,EAAkB,iBAAkB,yBAAmB,EAElE,EAAQ,EAAO,EAAO,WAEtB,EAAgB,EAAS,OAAO,GAChC,EAAO,kBAAoB,cACzB,EACK,GAEF,EAAc,CAAM,EAI3B,MAAO,GAAO,iBAAoB,YAClC,EAAO,gBAAgB,CAAM,CAEhC,EAED,MACE,iBAAoB,WAAgB,KAChC,gBAAoB,gBAAe,CAAE,MAAO,EAAO,MAAO,YAAa,EAAO,WAAY,EACxF,IAAU,EACV,gBAAoB,gBAAe,KAAM,2CAEzC,EACE,IACN,EACE,gBAAoB,MAAO,CAAE,UAAW,EAAQ,cAAe,EAC7D,gBAAoB,EAAO,CAAE,cAAe,wBAAyB,SAAU,CAAc,CAAE,CACnG,CACF,CAEJ,EAWa,EAAsB,GAAU,CAC3C,KAAM,CAAE,cAAe,EACjB,CAAC,EAAa,GAAkB,eAAS,CAAC,EAC1C,EAAa,aAAO,eAAa,EAEjC,CACJ,MAAO,EACP,UACA,SACE,cAAS,SAcJ,MAbgB,GAAW,YAAY,CAC5C,OAAQ,CACN,iDAAkD,uBACpD,EACA,OAAQ,CACN,aACA,OACA,WACA,YACA,aACA,WACF,CACF,CAAC,GACe,MAAM,OAAQ,GAAW,C,MACvC,MAAO,CAAC,CAAC,MAAO,SAAS,cAAhB,QAA8B,6BACzC,CAAC,CACF,EAEK,EAAmB,EAAW,GAEpC,MAAI,GAEA,gBAAoB,IAAqB,KACrC,gBAAoB,UAAS,KAC3B,gBAAoB,WAAU,IAAK,CACvC,CACF,EAIA,EAEA,gBAAoB,IAAqB,KACrC,gBAAoB,UAAS,KAC3B,gBAAoB,eAAc,CAClC,SAAU,QACV,MAAO,yCAA8C,EAEnD,gBAAoB,cAAa,CAAE,SAAU,OAAQ,KAAM,EAAM,SAAS,CAAE,CAAE,CAClF,CACF,CACF,EAKF,gBAAoB,IAAqB,KACrC,gBAAoB,aAAY,CAChC,cAAe,EACf,SAAU,GAAS,EAAe,CAAK,EACvC,KAAM,EAAW,IAAI,CAAC,CAAE,SAAS,IAAW,EAC1C,GAAI,EAAM,SAAS,EACnB,OACF,EAAE,CAAE,CACN,EACE,gBAAoB,UAAS,CAAE,cAAe,kBAAmB,EAC/D,EAAiB,OAAO,IAAI,CAAC,EAAQ,IACrC,gBAAoB,EAAa,CAC/B,IAAK,EACL,OAAQ,EACR,SAAY,GAAsB,CAAC,EACnC,MAAO,CAAM,CACf,CACD,CACH,CACF,CAEJ,C","file":"static/7110.527cc68b.chunk.js","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, { useState } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\nimport { makeStyles } from '@material-ui/core';\n\nimport {\n CATALOG_FILTER_EXISTS,\n catalogApiRef,\n\n useEntityOwnership,\n} from '@backstage/plugin-catalog-react';\n\nimport { DocsTable } from './Tables';\nimport { DocsCardGrid } from './Grids';\nimport { TechDocsPageWrapper } from './TechDocsPageWrapper';\n\nimport {\n CodeSnippet,\n Content,\n HeaderTabs,\n Progress,\n WarningPanel,\n SupportButton,\n ContentHeader,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nconst panels = {\n DocsTable: DocsTable,\n DocsCardGrid: DocsCardGrid,\n};\n\n/**\n * Available panel types\n *\n * @public\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst CustomPanel = ({\n config,\n entities,\n index,\n}\n\n\n\n) => {\n const useStyles = makeStyles({\n panelContainer: {\n marginBottom: '2rem',\n ...(config.panelCSS ? config.panelCSS : {}),\n },\n });\n const classes = useStyles();\n const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();\n\n const Panel = panels[config.panelType];\n\n const shownEntities = entities.filter(entity => {\n if (config.filterPredicate === 'ownedByUser') {\n if (loadingOwnership) {\n return false;\n }\n return isOwnedEntity(entity);\n }\n\n return (\n typeof config.filterPredicate === 'function' &&\n config.filterPredicate(entity)\n );\n });\n\n return (\n React.createElement(React.Fragment, null\n , React.createElement(ContentHeader, { title: config.title, description: config.description,}\n , index === 0 ? (\n React.createElement(SupportButton, null, \"Discover documentation in your ecosystem.\"\n\n )\n ) : null\n )\n , React.createElement('div', { className: classes.panelContainer,}\n , React.createElement(Panel, { 'data-testid': \"techdocs-custom-panel\", entities: shownEntities,} )\n )\n )\n );\n};\n\n/**\n * Props for {@link TechDocsCustomHome}\n *\n * @public\n */\n\n\n\n\nexport const TechDocsCustomHome = (props) => {\n const { tabsConfig } = props;\n const [selectedTab, setSelectedTab] = useState(0);\n const catalogApi = useApi(catalogApiRef);\n\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: {\n 'metadata.annotations.backstage.io/techdocs-ref': CATALOG_FILTER_EXISTS,\n },\n fields: [\n 'apiVersion',\n 'kind',\n 'metadata',\n 'relations',\n 'spec.owner',\n 'spec.type',\n ],\n });\n return response.items.filter((entity) => {\n return !!entity.metadata.annotations?.['backstage.io/techdocs-ref'];\n });\n });\n\n const currentTabConfig = tabsConfig[selectedTab];\n\n if (loading) {\n return (\n React.createElement(TechDocsPageWrapper, null\n , React.createElement(Content, null\n , React.createElement(Progress, null )\n )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(TechDocsPageWrapper, null\n , React.createElement(Content, null\n , React.createElement(WarningPanel, {\n severity: \"error\",\n title: \"Could not load available documentation.\" ,}\n \n , React.createElement(CodeSnippet, { language: \"text\", text: error.toString(),} )\n )\n )\n )\n );\n }\n\n return (\n React.createElement(TechDocsPageWrapper, null\n , React.createElement(HeaderTabs, {\n selectedIndex: selectedTab,\n onChange: index => setSelectedTab(index),\n tabs: tabsConfig.map(({ label }, index) => ({\n id: index.toString(),\n label,\n })),}\n )\n , React.createElement(Content, { 'data-testid': \"techdocs-content\",}\n , currentTabConfig.panels.map((config, index) => (\n React.createElement(CustomPanel, {\n key: index,\n config: config,\n entities: !!entities ? entities : [],\n index: index,}\n )\n ))\n )\n )\n );\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx"],"names":[],"mappings":"+SA0CA,KAAM,GAAS,CACb,UAAW,YACX,aAAc,GAChB,EAuCM,EAAc,CAAC,CACnB,SACA,WACA,WAKG,CAOH,KAAM,GAAU,GANE,KAAW,CAC3B,eAAgB,CACd,aAAc,UACV,EAAO,SAAW,EAAO,SAAW,CAAC,CAC3C,CACF,CAAC,EACyB,EACpB,CAAE,QAAS,EAAkB,iBAAkB,yBAAmB,EAElE,EAAQ,EAAO,EAAO,WAEtB,EAAgB,EAAS,OAAO,GAChC,EAAO,kBAAoB,cACzB,EACK,GAEF,EAAc,CAAM,EAI3B,MAAO,GAAO,iBAAoB,YAClC,EAAO,gBAAgB,CAAM,CAEhC,EAED,MACE,iBAAoB,WAAgB,KAChC,gBAAoB,gBAAe,CAAE,MAAO,EAAO,MAAO,YAAa,EAAO,WAAY,EACxF,IAAU,EACV,gBAAoB,gBAAe,KAAM,2CAEzC,EACE,IACN,EACE,gBAAoB,MAAO,CAAE,UAAW,EAAQ,cAAe,EAC7D,gBAAoB,EAAO,CAAE,cAAe,wBAAyB,SAAU,CAAc,CAAE,CACnG,CACF,CAEJ,EAWa,EAAsB,GAAU,CAC3C,KAAM,CAAE,cAAe,EACjB,CAAC,EAAa,GAAkB,eAAS,CAAC,EAC1C,EAAa,aAAO,eAAa,EAEjC,CACJ,MAAO,EACP,UACA,SACE,cAAS,SAcJ,MAbgB,GAAW,YAAY,CAC5C,OAAQ,CACN,iDAAkD,uBACpD,EACA,OAAQ,CACN,aACA,OACA,WACA,YACA,aACA,WACF,CACF,CAAC,GACe,MAAM,OAAQ,GAAW,C,MACvC,MAAO,CAAC,CAAC,MAAO,SAAS,cAAhB,QAA8B,6BACzC,CAAC,CACF,EAEK,EAAmB,EAAW,GAEpC,MAAI,GAEA,gBAAoB,IAAqB,KACrC,gBAAoB,UAAS,KAC3B,gBAAoB,WAAU,IAAK,CACvC,CACF,EAIA,EAEA,gBAAoB,IAAqB,KACrC,gBAAoB,UAAS,KAC3B,gBAAoB,eAAc,CAClC,SAAU,QACV,MAAO,yCAA8C,EAEnD,gBAAoB,cAAa,CAAE,SAAU,OAAQ,KAAM,EAAM,SAAS,CAAE,CAAE,CAClF,CACF,CACF,EAKF,gBAAoB,IAAqB,KACrC,gBAAoB,aAAY,CAChC,cAAe,EACf,SAAU,GAAS,EAAe,CAAK,EACvC,KAAM,EAAW,IAAI,CAAC,CAAE,SAAS,IAAW,EAC1C,GAAI,EAAM,SAAS,EACnB,OACF,EAAE,CAAE,CACN,EACE,gBAAoB,UAAS,CAAE,cAAe,kBAAmB,EAC/D,EAAiB,OAAO,IAAI,CAAC,EAAQ,IACrC,gBAAoB,EAAa,CAC/B,IAAK,EACL,OAAQ,EACR,SAAY,GAAsB,CAAC,EACnC,MAAO,CAAM,CACf,CACD,CACH,CACF,CAEJ,C","file":"static/7110.7d2c1934.chunk.js","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, { useState } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\nimport { makeStyles } from '@material-ui/core';\n\nimport {\n CATALOG_FILTER_EXISTS,\n catalogApiRef,\n\n useEntityOwnership,\n} from '@backstage/plugin-catalog-react';\n\nimport { DocsTable } from './Tables';\nimport { DocsCardGrid } from './Grids';\nimport { TechDocsPageWrapper } from './TechDocsPageWrapper';\n\nimport {\n CodeSnippet,\n Content,\n HeaderTabs,\n Progress,\n WarningPanel,\n SupportButton,\n ContentHeader,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nconst panels = {\n DocsTable: DocsTable,\n DocsCardGrid: DocsCardGrid,\n};\n\n/**\n * Available panel types\n *\n * @public\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst CustomPanel = ({\n config,\n entities,\n index,\n}\n\n\n\n) => {\n const useStyles = makeStyles({\n panelContainer: {\n marginBottom: '2rem',\n ...(config.panelCSS ? config.panelCSS : {}),\n },\n });\n const classes = useStyles();\n const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();\n\n const Panel = panels[config.panelType];\n\n const shownEntities = entities.filter(entity => {\n if (config.filterPredicate === 'ownedByUser') {\n if (loadingOwnership) {\n return false;\n }\n return isOwnedEntity(entity);\n }\n\n return (\n typeof config.filterPredicate === 'function' &&\n config.filterPredicate(entity)\n );\n });\n\n return (\n React.createElement(React.Fragment, null\n , React.createElement(ContentHeader, { title: config.title, description: config.description,}\n , index === 0 ? (\n React.createElement(SupportButton, null, \"Discover documentation in your ecosystem.\"\n\n )\n ) : null\n )\n , React.createElement('div', { className: classes.panelContainer,}\n , React.createElement(Panel, { 'data-testid': \"techdocs-custom-panel\", entities: shownEntities,} )\n )\n )\n );\n};\n\n/**\n * Props for {@link TechDocsCustomHome}\n *\n * @public\n */\n\n\n\n\nexport const TechDocsCustomHome = (props) => {\n const { tabsConfig } = props;\n const [selectedTab, setSelectedTab] = useState(0);\n const catalogApi = useApi(catalogApiRef);\n\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: {\n 'metadata.annotations.backstage.io/techdocs-ref': CATALOG_FILTER_EXISTS,\n },\n fields: [\n 'apiVersion',\n 'kind',\n 'metadata',\n 'relations',\n 'spec.owner',\n 'spec.type',\n ],\n });\n return response.items.filter((entity) => {\n return !!entity.metadata.annotations?.['backstage.io/techdocs-ref'];\n });\n });\n\n const currentTabConfig = tabsConfig[selectedTab];\n\n if (loading) {\n return (\n React.createElement(TechDocsPageWrapper, null\n , React.createElement(Content, null\n , React.createElement(Progress, null )\n )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(TechDocsPageWrapper, null\n , React.createElement(Content, null\n , React.createElement(WarningPanel, {\n severity: \"error\",\n title: \"Could not load available documentation.\" ,}\n \n , React.createElement(CodeSnippet, { language: \"text\", text: error.toString(),} )\n )\n )\n )\n );\n }\n\n return (\n React.createElement(TechDocsPageWrapper, null\n , React.createElement(HeaderTabs, {\n selectedIndex: selectedTab,\n onChange: index => setSelectedTab(index),\n tabs: tabsConfig.map(({ label }, index) => ({\n id: index.toString(),\n label,\n })),}\n )\n , React.createElement(Content, { 'data-testid': \"techdocs-content\",}\n , currentTabConfig.panels.map((config, index) => (\n React.createElement(CustomPanel, {\n key: index,\n config: config,\n entities: !!entities ? entities : [],\n index: index,}\n )\n ))\n )\n )\n );\n};\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[7758],{7758:function(h,i,e){e.r(i),e.d(i,{CatalogPage:function(){return d},DefaultCatalogPage:function(){return r}});var t=e(2784),s=e(10289),l=e(9118),a=e(36964),n=e(53479),g=e(47851),E=e(30097),C=e(49782);function r(o){var m;const{columns:c,actions:f,initiallySelectedFilter:y="owned",initialKind:p="component",tableOptions:P={}}=o,v=(m=(0,a.useApi)(a.configApiRef).getOptionalString("organization.name"))!=null?m:"Backstage",u=(0,a.useRouteRef)(g.yw);return t.createElement(l.PageWithHeader,{title:`${v} Catalog`,themeId:"home"},t.createElement(n.EntityListProvider,null,t.createElement(l.Content,null,t.createElement(l.ContentHeader,{titleComponent:t.createElement(C.K,{initialFilter:p})},t.createElement(l.CreateButton,{title:"Create Component",to:u&&u()}),t.createElement(l.SupportButton,null,"All your software catalog entities")),t.createElement(n.CatalogFilterLayout,null,t.createElement(n.CatalogFilterLayout.Filters,null,t.createElement(n.EntityTypePicker,null),t.createElement(n.UserListPicker,{initialFilter:y}),t.createElement(n.EntityOwnerPicker,null),t.createElement(n.EntityLifecyclePicker,null),t.createElement(n.EntityTagPicker,null)),t.createElement(n.CatalogFilterLayout.Content,null,t.createElement(E.E,{columns:c,actions:f,tableOptions:P}))))))}function d(o){return(0,s.pC)()||t.createElement(r,{...o})}}}]);})();
2
2
 
3
- //# sourceMappingURL=7758.5a3ef4d5.chunk.js.map
3
+ //# sourceMappingURL=7758.f316879f.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx"],"names":[],"mappings":"qUAsDO,WAA4B,EAAO,C,MACxC,KAAM,CACJ,UACA,UACA,0BAA0B,QAC1B,cAAc,YACd,eAAe,CAAC,GACd,EACE,EACJ,G,GAAA,UAAO,cAAY,EAAE,kBAAkB,mBAAmB,IAA1D,OAA+D,YAC3D,EAAsB,kBAAY,IAAuB,EAE/D,MACE,iBAAoB,iBAAgB,CAAE,MAAO,GAAG,YAAmB,QAAS,MAAO,EAC/E,gBAAoB,qBAAoB,KACtC,gBAAoB,UAAS,KAC3B,gBAAoB,gBAAe,CACnC,eAAgB,gBAAoB,IAAmB,CAAE,cAAe,CAAY,CAAE,CAAE,EAEtF,gBAAoB,eAAc,CAClC,MAAO,mBACP,GAAI,GAAuB,EAAoB,CAAE,CACnD,EACE,gBAAoB,gBAAe,KAAM,oCAAwC,CACrF,EACE,gBAAoB,sBAAqB,KACvC,gBAAoB,8BAA6B,KAC/C,gBAAoB,mBAAkB,IAAK,EAC3C,gBAAoB,iBAAgB,CAAE,cAAe,CAAwB,CAAE,EAC/E,gBAAoB,oBAAmB,IAAK,EAC5C,gBAAoB,wBAAuB,IAAK,EAChD,gBAAoB,kBAAiB,IAAK,CAC9C,EACE,gBAAoB,8BAA6B,KAC/C,gBAAoB,IAAc,CAClC,QAAS,EACT,QAAS,EACT,aAAc,CAAa,CAC7B,CACF,CACF,CACF,CACF,CACF,CAEJ,CC5EO,WAAqB,EAAO,CAGjC,MAAO,GAFQ,MAAU,GAER,gBAAoB,EAAoB,IAAK,CAAM,CAAE,CACxE,C","file":"static/7758.5a3ef4d5.chunk.js","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 {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n\n\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogFilterLayout,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n\n UserListPicker,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { createComponentRouteRef } from '../../routes';\nimport { CatalogTable, } from '../CatalogTable';\nimport { CatalogKindHeader } from '../CatalogKindHeader';\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\n\n\n\n\n\n\n\n\nexport function DefaultCatalogPage(props) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n return (\n React.createElement(PageWithHeader, { title: `${orgName} Catalog`, themeId: \"home\",}\n , React.createElement(EntityListProvider, null\n , React.createElement(Content, null\n , React.createElement(ContentHeader, {\n titleComponent: React.createElement(CatalogKindHeader, { initialFilter: initialKind,} ),}\n \n , React.createElement(CreateButton, {\n title: \"Create Component\" ,\n to: createComponentLink && createComponentLink(),}\n )\n , React.createElement(SupportButton, null, \"All your software catalog entities\" )\n )\n , React.createElement(CatalogFilterLayout, null\n , React.createElement(CatalogFilterLayout.Filters, null\n , React.createElement(EntityTypePicker, null )\n , React.createElement(UserListPicker, { initialFilter: initiallySelectedFilter,} )\n , React.createElement(EntityOwnerPicker, null )\n , React.createElement(EntityLifecyclePicker, null )\n , React.createElement(EntityTagPicker, null )\n )\n , React.createElement(CatalogFilterLayout.Content, null\n , React.createElement(CatalogTable, {\n columns: columns,\n actions: actions,\n tableOptions: tableOptions,}\n )\n )\n )\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 React from 'react';\nimport { useOutlet } from 'react-router';\nimport {\n DefaultCatalogPage,\n\n} from './DefaultCatalogPage';\n\nexport function CatalogPage(props) {\n const outlet = useOutlet();\n\n return outlet || React.createElement(DefaultCatalogPage, { ...props,} );\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx"],"names":[],"mappings":"qUAsDO,WAA4B,EAAO,C,MACxC,KAAM,CACJ,UACA,UACA,0BAA0B,QAC1B,cAAc,YACd,eAAe,CAAC,GACd,EACE,EACJ,G,GAAA,UAAO,cAAY,EAAE,kBAAkB,mBAAmB,IAA1D,OAA+D,YAC3D,EAAsB,kBAAY,IAAuB,EAE/D,MACE,iBAAoB,iBAAgB,CAAE,MAAO,GAAG,YAAmB,QAAS,MAAO,EAC/E,gBAAoB,qBAAoB,KACtC,gBAAoB,UAAS,KAC3B,gBAAoB,gBAAe,CACnC,eAAgB,gBAAoB,IAAmB,CAAE,cAAe,CAAY,CAAE,CAAE,EAEtF,gBAAoB,eAAc,CAClC,MAAO,mBACP,GAAI,GAAuB,EAAoB,CAAE,CACnD,EACE,gBAAoB,gBAAe,KAAM,oCAAwC,CACrF,EACE,gBAAoB,sBAAqB,KACvC,gBAAoB,8BAA6B,KAC/C,gBAAoB,mBAAkB,IAAK,EAC3C,gBAAoB,iBAAgB,CAAE,cAAe,CAAwB,CAAE,EAC/E,gBAAoB,oBAAmB,IAAK,EAC5C,gBAAoB,wBAAuB,IAAK,EAChD,gBAAoB,kBAAiB,IAAK,CAC9C,EACE,gBAAoB,8BAA6B,KAC/C,gBAAoB,IAAc,CAClC,QAAS,EACT,QAAS,EACT,aAAc,CAAa,CAC7B,CACF,CACF,CACF,CACF,CACF,CAEJ,CC5EO,WAAqB,EAAO,CAGjC,MAAO,GAFQ,MAAU,GAER,gBAAoB,EAAoB,IAAK,CAAM,CAAE,CACxE,C","file":"static/7758.f316879f.chunk.js","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 {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n\n\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogFilterLayout,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n\n UserListPicker,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { createComponentRouteRef } from '../../routes';\nimport { CatalogTable, } from '../CatalogTable';\nimport { CatalogKindHeader } from '../CatalogKindHeader';\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\n\n\n\n\n\n\n\n\nexport function DefaultCatalogPage(props) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n return (\n React.createElement(PageWithHeader, { title: `${orgName} Catalog`, themeId: \"home\",}\n , React.createElement(EntityListProvider, null\n , React.createElement(Content, null\n , React.createElement(ContentHeader, {\n titleComponent: React.createElement(CatalogKindHeader, { initialFilter: initialKind,} ),}\n \n , React.createElement(CreateButton, {\n title: \"Create Component\" ,\n to: createComponentLink && createComponentLink(),}\n )\n , React.createElement(SupportButton, null, \"All your software catalog entities\" )\n )\n , React.createElement(CatalogFilterLayout, null\n , React.createElement(CatalogFilterLayout.Filters, null\n , React.createElement(EntityTypePicker, null )\n , React.createElement(UserListPicker, { initialFilter: initiallySelectedFilter,} )\n , React.createElement(EntityOwnerPicker, null )\n , React.createElement(EntityLifecyclePicker, null )\n , React.createElement(EntityTagPicker, null )\n )\n , React.createElement(CatalogFilterLayout.Content, null\n , React.createElement(CatalogTable, {\n columns: columns,\n actions: actions,\n tableOptions: tableOptions,}\n )\n )\n )\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 React from 'react';\nimport { useOutlet } from 'react-router';\nimport {\n DefaultCatalogPage,\n\n} from './DefaultCatalogPage';\n\nexport function CatalogPage(props) {\n const outlet = useOutlet();\n\n return outlet || React.createElement(DefaultCatalogPage, { ...props,} );\n}\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8061,2426],{48061:function(y,s,n){n.r(s),n.d(s,{DependsOnComponentsCard:function(){return o}});var a=n(48023),t=n(2784),e=n(62426);function o(r){const{variant:c="gridItem",title:l="Depends on components"}=r;return t.createElement(e.RelatedEntitiesCard,{variant:c,title:l,entityKind:"Component",relationType:a.nP,columns:e.componentEntityColumns,emptyMessage:"No component is a dependency of this component",emptyHelpLink:e.componentEntityHelpLink,asRenderableEntities:e.asComponentEntities})}},62426:function(y,s,n){n.r(s),n.d(s,{RelatedEntitiesCard:function(){return r},asComponentEntities:function(){return E},asResourceEntities:function(){return C},asSystemEntities:function(){return v},componentEntityColumns:function(){return c},componentEntityHelpLink:function(){return l},resourceEntityColumns:function(){return p},resourceEntityHelpLink:function(){return f},systemEntityColumns:function(){return T},systemEntityHelpLink:function(){return b}});var a=n(90436),t=n(53479),e=n(2784),o=n(9118);function r(i){const{variant:m="gridItem",title:u,columns:g,entityKind:h,relationType:L,emptyMessage:R,emptyHelpLink:k,asRenderableEntities:H}=i,{entity:D}=(0,t.useEntity)(),{entities:S,loading:K,error:d}=(0,t.useRelatedEntities)(D,{type:L,kind:h});return K?e.createElement(o.InfoCard,{variant:m,title:u},e.createElement(o.Progress,null)):d?e.createElement(o.InfoCard,{variant:m,title:u},e.createElement(o.ResponseErrorPanel,{error:d})):e.createElement(t.EntityTable,{title:u,variant:m,emptyContent:e.createElement("div",{style:{textAlign:"center"}},e.createElement(a.Z,{variant:"body1"},R),e.createElement(a.Z,{variant:"body2"},e.createElement(o.Link,{to:k},"Learn how to change this."))),columns:g,entities:H(S||[])})}const c=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"component"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],l="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",E=i=>i,p=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"resource"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createSpecTypeColumn(),t.EntityTable.columns.createSpecLifecycleColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],f="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",C=i=>i,T=[t.EntityTable.columns.createEntityRefColumn({defaultKind:"system"}),t.EntityTable.columns.createOwnerColumn(),t.EntityTable.columns.createMetadataDescriptionColumn()],b="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",v=i=>i}}]);})();
2
2
 
3
- //# sourceMappingURL=8061.fd1f45d1.chunk.js.map
3
+ //# sourceMappingURL=8061.ec7736bc.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/DependsOnComponentsCard/DependsOnComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"yPA+BO,WAAiC,EAAO,CAC7C,KAAM,CAAE,UAAU,WAAY,QAAQ,yBAA4B,EAClE,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,EACP,WAAY,YACZ,aAAc,KACd,QAAS,yBACT,aAAc,iDACd,cAAe,0BACf,qBAAsB,qBAAoB,CAC5C,CAEJ,C,yfCWO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/8061.fd1f45d1.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_DEPENDS_ON } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\n\n\n\n\n\nexport function DependsOnComponentsCard(props) {\n const { variant = 'gridItem', title = 'Depends on components' } = props;\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: title,\n entityKind: \"Component\",\n relationType: RELATION_DEPENDS_ON,\n columns: componentEntityColumns,\n emptyMessage: \"No component is a dependency of this component\" ,\n emptyHelpLink: componentEntityHelpLink,\n asRenderableEntities: asComponentEntities,}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/DependsOnComponentsCard/DependsOnComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":[],"mappings":"yPA+BO,WAAiC,EAAO,CAC7C,KAAM,CAAE,UAAU,WAAY,QAAQ,yBAA4B,EAClE,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,EACP,WAAY,YACZ,aAAc,KACd,QAAS,yBACT,aAAc,iDACd,cAAe,0BACf,qBAAsB,qBAAoB,CAC5C,CAEJ,C,yfCWO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCpFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/8061.ec7736bc.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_DEPENDS_ON } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\n\n\n\n\n\nexport function DependsOnComponentsCard(props) {\n const { variant = 'gridItem', title = 'Depends on components' } = props;\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: title,\n entityKind: \"Component\",\n relationType: RELATION_DEPENDS_ON,\n columns: componentEntityColumns,\n emptyMessage: \"No component is a dependency of this component\" ,\n emptyHelpLink: componentEntityHelpLink,\n asRenderableEntities: asComponentEntities,}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard(\n props,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"sourceRoot":""}
@@ -1,4 +1,4 @@
1
1
  "use strict";(()=>{var he=Object.defineProperty;var fe=(S,g,c)=>g in S?he(S,g,{enumerable:!0,configurable:!0,writable:!0,value:c}):S[g]=c;var k=(S,g,c)=>(fe(S,typeof g!="symbol"?g+"":g,c),c);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8718],{98718:function(S,g,c){c.r(g),c.d(g,{RealLogViewer:function(){return de}});var a=c(2784),U=c(10289),v=c(61837),W=c(19353),w=c(7688),D=c(50166),G=c(4903);const E=(0,G.Z)(),I=/\n\r?/g,b=Object.fromEntries(Object.entries({1:e=>({...e,bold:!0}),3:e=>({...e,italic:!0}),4:e=>({...e,underline:!0}),22:({bold:e,...t})=>t,23:({italic:e,...t})=>t,24:({underline:e,...t})=>t,30:e=>({...e,foreground:"black"}),31:e=>({...e,foreground:"red"}),32:e=>({...e,foreground:"green"}),33:e=>({...e,foreground:"yellow"}),34:e=>({...e,foreground:"blue"}),35:e=>({...e,foreground:"magenta"}),36:e=>({...e,foreground:"cyan"}),37:e=>({...e,foreground:"white"}),39:({foreground:e,...t})=>t,90:e=>({...e,foreground:"grey"}),40:e=>({...e,background:"black"}),41:e=>({...e,background:"red"}),42:e=>({...e,background:"green"}),43:e=>({...e,background:"yellow"}),44:e=>({...e,background:"blue"}),45:e=>({...e,background:"magenta"}),46:e=>({...e,background:"cyan"}),47:e=>({...e,background:"white"}),49:({background:e,...t})=>t}).map(([e,t])=>[`\x1B[${e}m`,t]));class L{constructor(t=1,n=[]){k(this,"text");this.lineNumber=t,this.chunks=n,this.text=n.map(s=>s.text).join("").toLocaleLowerCase("en-US")}lastChunk(){return this.chunks[this.chunks.length-1]}replaceLastChunk(t){t&&(this.chunks.splice(this.chunks.length-1,1,...t),this.text=this.chunks.map(n=>n.text).join("").toLocaleLowerCase("en-US"))}}class P{constructor(){k(this,"text","");k(this,"lines",[]);k(this,"processLines",(t,n={},s=1)=>{var l;const o=[];let i=n,r=s,u=0;for(I.lastIndex=0;;){const h=I.exec(t);if(!h){const f=this.processText(t.slice(u),i);return o.push(new L(r,f)),o}const d=t.slice(u,h.index);u=h.index+h[0].length;const p=this.processText(d,i);o.push(new L(r,p)),i=(l=p[p.length-1].modifiers)!=null?l:i,r+=1}});k(this,"processText",(t,n)=>{const s=[];let o=n,i=0;for(E.lastIndex=0;;){const r=E.exec(t);if(!r)return s.push({text:t.slice(i),modifiers:o}),s;const u=t.slice(i,r.index);s.push({text:u,modifiers:o}),i=r.index+r[0].length,o=this.processCode(r[0],o)}});k(this,"processCode",(t,n)=>{var s,o;return(o=(s=b[t])==null?void 0:s.call(b,n))!=null?o:n})}process(t){var n,s,o;if(this.text===t)return this.lines;if(t.startsWith(this.text)){const i=this.lines.length>0?this.lines.length-1:0,r=(n=this.lines[i])!=null?n:new L,u=r.lastChunk(),l=this.processLines(((s=u==null?void 0:u.text)!=null?s:"")+t.slice(this.text.length),u==null?void 0:u.modifiers,r==null?void 0:r.lineNumber);r.replaceLastChunk((o=l[0])==null?void 0:o.chunks),this.lines[i]=r,this.lines.push(...l.slice(1))}else this.lines=this.processLines(t);return this.text=t,this.lines}}var $=c(79692),B=c(41128),C=c(31754),F=c(66054),R=c(81463),M=c(34505),N=c(57186),T=c(32720),A=c(92901),j=c(45410);const z=40,Y=(0,$.Z)(e=>({root:{background:e.palette.background.paper},header:{height:z,display:"flex",alignItems:"center",justifyContent:"flex-end"},log:{fontFamily:'"Monaco", monospace',fontSize:e.typography.pxToRem(12)},line:{position:"relative",whiteSpace:"pre","&:hover":{background:e.palette.action.hover}},lineSelected:{background:e.palette.action.selected,"&:hover":{background:e.palette.action.selected}},lineCopyButton:{position:"absolute",paddingTop:0,paddingBottom:0},lineNumber:{display:"inline-block",textAlign:"end",width:60,marginRight:e.spacing(1),cursor:"pointer"},textHighlight:{background:(0,B.Fq)(e.palette.info.main,.15)},textSelectedHighlight:{background:(0,B.Fq)(e.palette.info.main,.4)},modifierBold:{fontWeight:e.typography.fontWeightBold},modifierItalic:{fontStyle:"italic"},modifierUnderline:{textDecoration:"underline"},modifierForegroundBlack:{color:C.Z.black},modifierForegroundRed:{color:F.Z[500]},modifierForegroundGreen:{color:R.Z[500]},modifierForegroundYellow:{color:M.Z[500]},modifierForegroundBlue:{color:N.Z[500]},modifierForegroundMagenta:{color:T.Z[500]},modifierForegroundCyan:{color:A.Z[500]},modifierForegroundWhite:{color:C.Z.white},modifierForegroundGrey:{color:j.Z[500]},modifierBackgroundBlack:{background:C.Z.black},modifierBackgroundRed:{background:F.Z[500]},modifierBackgroundGreen:{background:R.Z[500]},modifierBackgroundYellow:{background:M.Z[500]},modifierBackgroundBlue:{background:N.Z[500]},modifierBackgroundMagenta:{background:T.Z[500]},modifierBackgroundCyan:{background:A.Z[500]},modifierBackgroundWhite:{background:C.Z.white},modifierBackgroundGrey:{background:j.Z[500]}}),{name:"BackstageLogViewer"});var J=c(72779),K=c.n(J),Q=c(74600),H=c.n(Q);function X(e,t){const n=new Array;if(t.bold&&n.push(e.modifierBold),t.italic&&n.push(e.modifierItalic),t.underline&&n.push(e.modifierUnderline),t.foreground){const s=`modifierForeground${H()(t.foreground)}`;n.push(e[s])}if(t.background){const s=`modifierBackground${H()(t.background)}`;n.push(e[s])}return n.length>0?n.join(" "):void 0}function q(e,t){if(!t||!e.includes(t))return;const n=new Array;let s=0;for(;;){const o=e.indexOf(t,s);if(o===-1)break;const i=o+t.length;n.push({start:o,end:i}),s=i}return n}function _(e,t){const n=q(e.text,t);if(!n)return e.chunks;const s=new Array;let o=0,i=0,r=n[i];for(const u of e.chunks){const{text:l,modifiers:h}=u;if(!r||o+l.length<r.start){s.push(u),o+=l.length;continue}let d=0;for(;r;){const f=Math.max(r.start-o,0);if(f>l.length)break;const x=Math.min(r.end-o,l.length);if(f>d&&s.push({text:l.slice(d,f),modifiers:h}),x>f&&s.push({modifiers:h,highlight:i,text:l.slice(f,x)}),d=x,r.end-o===x)i+=1,r=n[i];else break}d<l.length&&s.push({text:l.slice(d),modifiers:h}),o+=l.length}return s}function ee({line:e,classes:t,searchText:n,highlightResultIndex:s}){const o=(0,a.useMemo)(()=>_(e,n),[e,n]),i=(0,a.useMemo)(()=>o.map(({text:r,modifiers:u,highlight:l},h)=>a.createElement("span",{key:h,className:K()(X(t,u),l!==void 0&&(l===s?t.textSelectedHighlight:t.textHighlight))},r)),[o,s,t]);return a.createElement(a.Fragment,null,i)}var te=c(86619),ne=c(90436),oe=c(48049),se=c(51209),O=c(36444);function re(e){var r;const{resultCount:t,resultIndexStep:n,toggleShouldFilter:s}=e,o=(r=e.resultIndex)!=null?r:0,i=u=>{u.key==="Enter"&&(u.metaKey||u.ctrlKey||u.altKey?s():n(u.shiftKey))};return a.createElement(a.Fragment,null,t!==void 0&&a.createElement(a.Fragment,null,a.createElement(v.Z,{size:"small",onClick:()=>n(!0)},a.createElement(oe.Z,null)),a.createElement(ne.Z,null,Math.min(o+1,t),"/",t),a.createElement(v.Z,{size:"small",onClick:()=>n()},a.createElement(se.Z,null))),a.createElement(te.Z,{size:"small",variant:"standard",placeholder:"Search",value:e.searchInput,onKeyPress:i,onChange:u=>e.setSearchInput(u.target.value)}),a.createElement(v.Z,{size:"small",onClick:s},e.shouldFilter?a.createElement(O.Z,{color:"primary"}):a.createElement(O.Z,{color:"disabled"})))}var le=c(3509);function ie(e,t){if(!t)return{lines:e};const n=[],s=[];for(const o of e)if(o.text.includes(t)){n.push(o);let i=0,r=0;for(;;){const u=o.text.indexOf(t,i);if(u===-1)break;s.push({lineNumber:o.lineNumber,lineIndex:r++}),i=u+t.length}}return{lines:n,results:s}}function ce(e){var f;const[t,n]=(0,a.useState)(""),s=t.toLocaleLowerCase("en-US"),[o,i]=(0,a.useState)(0),[r,u]=(0,le.O)(!1),l=(0,a.useMemo)(()=>ie(e,s),[e,s]),h=l.results?l.results[Math.min(o,l.results.length-1)]:void 0,d=(f=l.results)==null?void 0:f.length,p=x=>{if(x){if(d!==void 0){const m=Math.min(o-1,d-2);i(m<0?d-1:m)}}else if(d!==void 0){const m=o+1;i(m>=d?0:m)}};return{lines:r?l.lines:e,searchText:s,searchInput:t,setSearchInput:n,shouldFilter:r,toggleShouldFilter:u,resultCount:d,resultIndex:o,resultIndexStep:p,resultLine:h==null?void 0:h.lineNumber,resultLineIndex:h==null?void 0:h.lineIndex}}var V=c(36964),ae=c(95074);function ue(e){const t=(0,V.useApi)(V.errorApiRef),[n,s]=(0,a.useState)(),o=n?Math.min(n.start,n.end):void 0,i=n?Math.max(n.start,n.end):void 0,[{error:r},u]=(0,ae.Z)();return(0,a.useEffect)(()=>{r&&t.post(r)},[r,t]),{shouldShowButton(l){return o===l||i===l},isSelected(l){return n?o<=l&&l<=i:!1},setSelection(l,h){s(h?d=>d?{start:d.start,end:l}:{start:l,end:l}:d=>(d==null?void 0:d.start)===l&&(d==null?void 0:d.end)===l?void 0:{start:l,end:l})},copySelection(){if(n){const l=e.slice(Math.min(n.start,n.end)-1,Math.max(n.start,n.end)).map(h=>h.chunks.map(d=>d.text).join("")).join(`
2
2
  `);u(l),s(void 0)}}}}function de(e){const t=Y({classes:e.classes}),n=(0,a.useRef)(null),o=(0,a.useMemo)(()=>new P,[]).process(e.text),i=ce(o),r=ue(o),u=(0,U.TH)();(0,a.useEffect)(()=>{i.resultLine!==void 0&&n.current&&n.current.scrollToItem(i.resultLine-1,"center")},[i.resultLine]),(0,a.useEffect)(()=>{if(u.hash){const h=parseInt(u.hash.replace(/\D/g,""),10);r.setSelection(h,!1)}},[]);const l=(h,d)=>{r.setSelection(h,d.shiftKey)};return a.createElement(w.Z,null,({height:h,width:d})=>a.createElement("div",{style:{width:d,height:h},className:t.root},a.createElement("div",{className:t.header},a.createElement(re,{...i})),a.createElement(D.t7,{ref:n,className:t.log,height:h-z,width:d,itemData:i.lines,itemSize:20,itemCount:i.lines.length},({index:p,style:f,data:x})=>{const m=x[p],{lineNumber:y}=m;return a.createElement("div",{style:{...f},className:K()(t.line,{[t.lineSelected]:r.isSelected(y)})},r.shouldShowButton(y)&&a.createElement(v.Z,{"data-testid":"copy-button",size:"small",className:t.lineCopyButton,onClick:()=>r.copySelection()},a.createElement(W.Z,{fontSize:"inherit"})),a.createElement("a",{role:"row",target:"_self",href:`#line-${y}`,className:t.lineNumber,onClick:Z=>l(y,Z),onKeyPress:Z=>l(y,Z)},y),a.createElement(ee,{line:m,classes:t,searchText:i.searchText,highlightResultIndex:i.resultLine===y?i.resultLineIndex:void 0}))})))}}}]);})();
3
3
 
4
- //# sourceMappingURL=8718.930c97ad.chunk.js.map
4
+ //# sourceMappingURL=8718.8f60efd2.chunk.js.map